Merge lp:~jonas-drange/ubuntu-system-settings/apl into lp:ubuntu-system-settings

Proposed by Jonas G. Drange on 2016-12-14
Status: Merged
Approved by: Ken VanDine on 2017-01-05
Approved revision: 1767
Merged at revision: 1754
Proposed branch: lp:~jonas-drange/ubuntu-system-settings/apl
Merge into: lp:ubuntu-system-settings
Prerequisite: lp:~jonas-drange/ubuntu-system-settings/lp1644268
Diff against target: 2257 lines (+770/-248)
59 files modified
debian/control (+1/-1)
plugins/about/DevMode.qml (+3/-1)
plugins/about/PageComponent.qml (+6/-6)
plugins/about/Software.qml (+3/-1)
plugins/about/Storage.qml (+2/-5)
plugins/background/MainPage.qml (+13/-18)
plugins/background/Preview.qml (+2/-2)
plugins/battery/PageComponent.qml (+6/-6)
plugins/bluetooth/DevicePage.qml (+12/-7)
plugins/bluetooth/PageComponent.qml (+11/-3)
plugins/brightness/PageComponent.qml (+3/-2)
plugins/brightness/WifiDisplays.qml (+1/-0)
plugins/cellular/Components/MultiSim.qml (+3/-4)
plugins/cellular/Components/SingleSim.qml (+2/-3)
plugins/cellular/PageApnEditor.qml (+1/-2)
plugins/cellular/PageCarrierAndApn.qml (+6/-3)
plugins/cellular/PageCarriersAndApns.qml (+6/-3)
plugins/cellular/PageChooseApn.qml (+9/-6)
plugins/cellular/PageChooseCarrier.qml (+1/-1)
plugins/cellular/PageComponent.qml (+1/-0)
plugins/hotspot/PageComponent.qml (+1/-0)
plugins/language/KeyboardLayouts.qml (+1/-0)
plugins/language/PageComponent.qml (+15/-27)
plugins/language/PageHardwareKeyboard.qml (+8/-4)
plugins/language/SpellChecking.qml (+2/-0)
plugins/launcher/PageComponent.qml (+1/-0)
plugins/notifications/PageComponent.qml (+11/-8)
plugins/phone/CallForwarding.qml (+1/-1)
plugins/phone/MultiSim.qml (+19/-13)
plugins/phone/Services.qml (+6/-1)
plugins/phone/SingleSim.qml (+7/-4)
plugins/security-privacy/AppAccess.qml (+20/-13)
plugins/security-privacy/AppAccessControl.qml (+2/-0)
plugins/security-privacy/Location.qml (+1/-1)
plugins/security-privacy/PageComponent.qml (+29/-41)
plugins/security-privacy/PhoneLocking.qml (+5/-2)
plugins/security-privacy/SimPin.qml (+2/-0)
plugins/security-privacy/here-terms.qml (+1/-0)
plugins/sound/PageComponent.qml (+8/-7)
plugins/sound/SoundsList.qml (+3/-5)
plugins/system-update/PageComponent.qml (+2/-1)
plugins/time-date/ChooseTimeZone.qml (+1/-1)
plugins/time-date/PageComponent.qml (+5/-3)
plugins/vpn/PageComponent.qml (+4/-2)
plugins/wifi/AccessPoint.qml (+3/-9)
plugins/wifi/PageComponent.qml (+4/-2)
plugins/wifi/PreviousNetworks.qml (+7/-5)
src/SystemSettings/CMakeLists.txt (+1/-0)
src/SystemSettings/ItemPage.qml (+21/-2)
src/SystemSettings/USSAdaptivePageLayout.qml (+40/-0)
src/SystemSettings/qmldir (+1/-0)
src/qml/CategorySection.qml (+14/-2)
src/qml/MainWindow.qml (+61/-11)
src/qml/UncategorizedItemsView.qml (+13/-4)
tests/autopilot/ubuntu_system_settings/tests/__init__.py (+1/-0)
tests/mocks/SystemSettings/MockPluginManager.cpp (+113/-4)
tests/mocks/SystemSettings/MockPluginManager.h (+52/-0)
tests/mocks/SystemSettings/qmldir (+1/-0)
tests/plugins/main/tst_MainWindow.qml (+191/-1)
To merge this branch: bzr merge lp:~jonas-drange/ubuntu-system-settings/apl
Reviewer Review Type Date Requested Status
Ken VanDine 2016-12-14 Approve on 2017-01-05
system-apps-ci-bot continuous-integration 2016-12-14 Approve on 2017-01-02
Review via email: mp+313243@code.launchpad.net

Commit message

migrates uss to apl

To post a comment you must log in.

PASSED: Continuous integration, rev:1760
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/279/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/2193
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/566
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2196
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2023
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2023/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2023
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2023/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2023
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2023/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2023
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2023/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2023
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2023/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2023
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2023/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2023
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2023/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2023
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2023/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2023
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2023/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/279/rebuild

review: Approve (continuous-integration)

PASSED: Continuous integration, rev:1761
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/280/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/2195
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/567
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2198
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2025
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2025/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2025
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2025/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2025
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2025/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2025
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2025/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2025
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2025/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2025
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2025/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2025
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2025/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2025
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2025/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2025
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2025/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/280/rebuild

review: Approve (continuous-integration)
1762. By Jonas G. Drange on 2016-12-16

fixes vpn and fingerprint issues, as far as USS can fix them

PASSED: Continuous integration, rev:1762
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/281/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/2199
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/568
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2202
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2029
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2029/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2029
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2029/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2029
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2029/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2029
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2029/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2029
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2029/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2029
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2029/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2029
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2029/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2029
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2029/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2029
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2029/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/281/rebuild

review: Approve (continuous-integration)
1763. By Jonas G. Drange on 2016-12-19

sets flickable on storage page correctly

FAILED: Continuous integration, rev:1763
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/283/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/system-apps/job/build/2208/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2211
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2039
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2039/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2039
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2039/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2039
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2039/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2039
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2039/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2039
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2039/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2039
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2039/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2039/console
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2039/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2039
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2039/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/283/rebuild

review: Needs Fixing (continuous-integration)
1764. By Jonas G. Drange on 2016-12-20

fixes broken itempage in hw kbd

FAILED: Continuous integration, rev:1764
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/284/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/system-apps/job/build/2212/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2215
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2042
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2042/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2042
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2042/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2042
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2042/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2042
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2042/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2042
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2042/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2042
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2042/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2042/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2042
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2042/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2042/console

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/284/rebuild

review: Needs Fixing (continuous-integration)
Ken VanDine (ken-vandine) wrote :

This looks good, one tiny inline comment about copyright years, otherwise good to go

review: Needs Fixing
1765. By Jonas G. Drange on 2017-01-02

fixes copyright date

1766. By Jonas G. Drange on 2017-01-02

merges trunk

1767. By Jonas G. Drange on 2017-01-02

merge prereq lp1644268

FAILED: Continuous integration, rev:1765
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/285/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/system-apps/job/build/2227/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2230
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2057/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2057
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2057/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2057
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2057/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2057
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2057/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2057
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2057/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2057
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2057/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2057
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2057/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2057
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2057/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2057
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2057/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/285/rebuild

review: Needs Fixing (continuous-integration)

PASSED: Continuous integration, rev:1767
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/286/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/2228
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/581
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2231
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2058
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2058/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2058
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2058/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2058
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2058/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2058
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2058/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2058
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2058/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2058
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2058/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2058
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/2058/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2058
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2058/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2058
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2058/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/286/rebuild

review: Approve (continuous-integration)
Ken VanDine (ken-vandine) wrote :

Great, thanks!

review: Approve
1768. By Jonas G. Drange on 2017-01-12

completes migration to apl for background panel

1769. By Jonas G. Drange on 2017-01-12

finalizes migration to apl for bluetooth devicepage

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/control'
--- debian/control 2016-11-29 11:11:21 +0000
+++ debian/control 2017-01-12 12:47:26 +0000
@@ -95,7 +95,7 @@
95 qml-module-ofono (>=0.90~),95 qml-module-ofono (>=0.90~),
96 qml-module-qtsysteminfo,96 qml-module-qtsysteminfo,
97 qtdeclarative5-ubuntu-content1,97 qtdeclarative5-ubuntu-content1,
98 qtdeclarative5-ubuntu-settings-components (>= 0.11),98 qtdeclarative5-ubuntu-settings-components (>= 0.12),
99 qml-module-ubuntu-components (>= 1.3.1584) | qml-module-ubuntu-components-gles (>= 1.3.1584),99 qml-module-ubuntu-components (>= 1.3.1584) | qml-module-ubuntu-components-gles (>= 1.3.1584),
100 suru-icon-theme (>= 14.04+15.04.20150813~),100 suru-icon-theme (>= 14.04+15.04.20150813~),
101 whoopsie-preferences (>= 0.9),101 whoopsie-preferences (>= 0.9),
102102
=== modified file 'plugins/about/DevMode.qml'
--- plugins/about/DevMode.qml 2016-02-04 15:28:51 +0000
+++ plugins/about/DevMode.qml 2017-01-12 12:47:26 +0000
@@ -115,7 +115,9 @@
115 objectName: "lockSecurityItem"115 objectName: "lockSecurityItem"
116 text: i18n.tr("Lock security")116 text: i18n.tr("Lock security")
117 progression: true117 progression: true
118 onClicked: pageStack.push(Qt.resolvedUrl("../security-privacy/LockSecurity.qml"))118 onClicked: pageStack.addPageToNextColumn(
119 devModePage, Qt.resolvedUrl("../security-privacy/LockSecurity.qml")
120 )
119 }121 }
120 }122 }
121 }123 }
122124
=== modified file 'plugins/about/PageComponent.qml'
--- plugins/about/PageComponent.qml 2016-11-29 11:12:13 +0000
+++ plugins/about/PageComponent.qml 2017-01-12 12:47:26 +0000
@@ -150,7 +150,7 @@
150 text: i18n.tr("Storage")150 text: i18n.tr("Storage")
151 /* TRANSLATORS: that's the free disk space, indicated in the most appropriate storage unit */151 /* TRANSLATORS: that's the free disk space, indicated in the most appropriate storage unit */
152 value: i18n.tr("%1 free").arg(Utilities.formatSize(backendInfos.getFreeSpace("/home")))152 value: i18n.tr("%1 free").arg(Utilities.formatSize(backendInfos.getFreeSpace("/home")))
153 onClicked: pageStack.push(Qt.resolvedUrl("Storage.qml"))153 onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("Storage.qml"))
154 }154 }
155155
156 SettingsItemTitle {156 SettingsItemTitle {
@@ -173,7 +173,7 @@
173 value: "Ubuntu %1%2"173 value: "Ubuntu %1%2"
174 .arg(deviceInfos.version(DeviceInfo.Os))174 .arg(deviceInfos.version(DeviceInfo.Os))
175 .arg(versionIdentifier ? " (%1)".arg(versionIdentifier) : "")175 .arg(versionIdentifier ? " (%1)".arg(versionIdentifier) : "")
176 onClicked: pageStack.push(Qt.resolvedUrl("Version.qml"), {176 onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("Version.qml"), {
177 version: versionIdentifier177 version: versionIdentifier
178 })178 })
179 }179 }
@@ -199,7 +199,7 @@
199 var updatePage = upPlugin.pageComponent199 var updatePage = upPlugin.pageComponent
200 var updatePageItem;200 var updatePageItem;
201 if (updatePage) {201 if (updatePage) {
202 updatePageItem = pageStack.push(updatePage, {202 updatePageItem = pageStack.addPageToNextColumn(root, updatePage, {
203 plugin: upPlugin, pluginManager: pluginManager203 plugin: upPlugin, pluginManager: pluginManager
204 });204 });
205 updatePageItem.check(true); // Force a check.205 updatePageItem.check(true); // Force a check.
@@ -222,7 +222,7 @@
222 SettingsListItems.StandardProgression {222 SettingsListItems.StandardProgression {
223 objectName: "licenseItem"223 objectName: "licenseItem"
224 text: i18n.tr("Software licenses")224 text: i18n.tr("Software licenses")
225 onClicked: pageStack.push(Qt.resolvedUrl("Software.qml"))225 onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("Software.qml"))
226 }226 }
227227
228 SettingsListItems.StandardProgression {228 SettingsListItems.StandardProgression {
@@ -230,14 +230,14 @@
230 pluginManager.getByName("regulatory-information")230 pluginManager.getByName("regulatory-information")
231 text: i18n.tr("Regulatory info")231 text: i18n.tr("Regulatory info")
232 visible: regulatoryInfo232 visible: regulatoryInfo
233 onClicked: pageStack.push(regulatoryInfo.pageComponent)233 onClicked: pageStack.addPageToNextColumn(root, regulatoryInfo.pageComponent)
234 }234 }
235235
236 SettingsListItems.SingleValueProgression {236 SettingsListItems.SingleValueProgression {
237 objectName: "devmodeItem"237 objectName: "devmodeItem"
238 text: i18n.tr("Developer mode")238 text: i18n.tr("Developer mode")
239 visible: !isSnap && backendInfos.developerModeCapable || showAllUI239 visible: !isSnap && backendInfos.developerModeCapable || showAllUI
240 onClicked: pageStack.push(Qt.resolvedUrl("DevMode.qml"))240 onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("DevMode.qml"))
241 }241 }
242 }242 }
243 }243 }
244244
=== modified file 'plugins/about/Software.qml'
--- plugins/about/Software.qml 2016-11-28 13:27:33 +0000
+++ plugins/about/Software.qml 2017-01-12 12:47:26 +0000
@@ -30,7 +30,9 @@
30 delegate: ListItem.Standard {30 delegate: ListItem.Standard {
31 text: fileName31 text: fileName
32 progression: true32 progression: true
33 onClicked: pageStack.push(Qt.resolvedUrl("License.qml"), {binary: fileName})33 onClicked: pageStack.addPageToNextColumn(
34 licensesPage, Qt.resolvedUrl("License.qml"), {binary: fileName}
35 )
34 }36 }
3537
36 }38 }
3739
=== modified file 'plugins/about/Storage.qml'
--- plugins/about/Storage.qml 2016-03-29 15:49:29 +0000
+++ plugins/about/Storage.qml 2017-01-12 12:47:26 +0000
@@ -53,11 +53,6 @@
53 Loader {53 Loader {
54 id: pageLoader54 id: pageLoader
55 anchors.fill: parent55 anchors.fill: parent
56 onStateChanged: {
57 if (state === Loader.Ready)
58 storagePage.flickable = scrollWidget;
59 }
60
61 asynchronous: true56 asynchronous: true
62 visible: status == Loader.Ready57 visible: status == Loader.Ready
63 sourceComponent: Item {58 sourceComponent: Item {
@@ -151,6 +146,8 @@
151 anchors.fill: parent146 anchors.fill: parent
152 contentHeight: columnId.height147 contentHeight: columnId.height
153148
149 Component.onCompleted: storagePage.flickable = scrollWidget
150
154 Column {151 Column {
155 id: columnId152 id: columnId
156 anchors.left: parent.left153 anchors.left: parent.left
157154
=== modified file 'plugins/background/MainPage.qml'
--- plugins/background/MainPage.qml 2016-09-26 20:00:30 +0000
+++ plugins/background/MainPage.qml 2017-01-12 12:47:26 +0000
@@ -40,13 +40,18 @@
4040
41 property var activeTransfer41 property var activeTransfer
4242
43 function preview(props) {
44 var page = pageStack.addFileToNextColumnSync(
45 mainPage, Qt.resolvedUrl("Preview.qml"), props
46 );
47 selectedItemConnection.target = page;
48 }
49
43 // Action to import image50 // Action to import image
44 Action {51 Action {
45 id: selectPeer52 id: selectPeer
46 // when action has been activated, push the picker on the stack53 // when action has been activated, push the picker on the stack
47 onTriggered: {54 onTriggered: pageStack.addPageToNextColumn(mainPage, picker)
48 pageStack.push(picker);
49 }
50 }55 }
5156
52 // qml bindings for background stuff57 // qml bindings for background stuff
@@ -81,10 +86,7 @@
81 backgroundPanel: backgroundPanel86 backgroundPanel: backgroundPanel
82 title: i18n.tr("Ubuntu Art")87 title: i18n.tr("Ubuntu Art")
83 current: welcomeBackground88 current: welcomeBackground
84 onSelected: {89 onSelected: preview({ uri: uri })
85 pageStack.push(Qt.resolvedUrl("Preview.qml"), {uri: uri});
86 selectedItemConnection.target = pageStack.currentPage;
87 }
88 }90 }
8991
90 WallpaperGrid {92 WallpaperGrid {
@@ -99,10 +101,7 @@
99 current: welcomeBackground101 current: welcomeBackground
100 editable: true102 editable: true
101 isCustom: true103 isCustom: true
102 onSelected: {104 onSelected: preview({ uri: uri })
103 pageStack.push(Qt.resolvedUrl("Preview.qml"), {uri: uri});
104 selectedItemConnection.target = pageStack.currentPage
105 }
106 }105 }
107106
108 ListItem.ThinDivider {}107 ListItem.ThinDivider {}
@@ -172,7 +171,7 @@
172 contentType: ContentType.Pictures171 contentType: ContentType.Pictures
173172
174 onPeerSelected: {173 onPeerSelected: {
175 pageStack.pop();174 pageStack.removePages(picker);
176 // requests an active transfer from peer175 // requests an active transfer from peer
177 function startContentTransfer(callback) {176 function startContentTransfer(callback) {
178 if (callback)177 if (callback)
@@ -186,15 +185,11 @@
186 // when peer has been selected, request a transfer, providing185 // when peer has been selected, request a transfer, providing
187 // a callback that pushes the preview stack186 // a callback that pushes the preview stack
188 startContentTransfer(function(uri) {187 startContentTransfer(function(uri) {
189 pageStack.push(Qt.resolvedUrl("Preview.qml"), {188 preview({ uri: uri, imported: true });
190 uri: uri, imported: true
191 });
192 // set Connection target
193 selectedItemConnection.target = pageStack.currentPage;
194 });189 });
195 }190 }
196191
197 onCancelPressed: pageStack.pop();192 onCancelPressed: pageStack.removePages(picker)
198 }193 }
199 }194 }
200195
201196
=== modified file 'plugins/background/Preview.qml'
--- plugins/background/Preview.qml 2016-09-12 15:32:45 +0000
+++ plugins/background/Preview.qml 2017-01-12 12:47:26 +0000
@@ -52,7 +52,7 @@
52 StateChangeScript {52 StateChangeScript {
53 script: {53 script: {
54 save();54 save();
55 pageStack.pop();55 pageStack.removePages(preview);
56 }56 }
57 }57 }
58 },58 },
@@ -60,7 +60,7 @@
60 name: "cancelled"60 name: "cancelled"
61 StateChangeScript {61 StateChangeScript {
62 script: {62 script: {
63 pageStack.pop();63 pageStack.removePages(preview);
64 }64 }
65 }65 }
66 }66 }
6767
=== modified file 'plugins/battery/PageComponent.qml'
--- plugins/battery/PageComponent.qml 2016-11-21 14:47:12 +0000
+++ plugins/battery/PageComponent.qml 2017-01-12 12:47:26 +0000
@@ -297,9 +297,9 @@
297 onClicked: {297 onClicked: {
298 var brightnessPlugin = pluginManager.getByName("brightness");298 var brightnessPlugin = pluginManager.getByName("brightness");
299 if (brightnessPlugin) {299 if (brightnessPlugin) {
300 pageStack.push(brightnessPlugin.pageComponent, {300 pageStack.addPageToNextColumn(root,
301 plugin: brightnessPlugin, pluginManager: pluginManager301 brightnessPlugin.pageComponent, {
302 });302 plugin: brightnessPlugin, pluginManager: pluginManager});
303 } else {303 } else {
304 console.warn("Failed to get brightness plugin instance");304 console.warn("Failed to get brightness plugin instance");
305 }305 }
@@ -344,9 +344,9 @@
344 SlotsLayout.position: SlotsLayout.First344 SlotsLayout.position: SlotsLayout.First
345 }345 }
346346
347 onClicked: pageStack.push(347 onClicked: pageStack.addPageToNextColumn(root,
348 Qt.resolvedUrl("SleepValues.qml"),348 Qt.resolvedUrl("SleepValues.qml"),{
349 { title: text, lockOnSuspend: lockOnSuspend })349 title: text, lockOnSuspend: lockOnSuspend })
350 visible: !isSnap || showAllUI350 visible: !isSnap || showAllUI
351 }351 }
352352
353353
=== modified file 'plugins/bluetooth/DevicePage.qml'
--- plugins/bluetooth/DevicePage.qml 2016-07-14 13:51:56 +0000
+++ plugins/bluetooth/DevicePage.qml 2017-01-12 12:47:26 +0000
@@ -74,14 +74,19 @@
74 }74 }
75 }75 }
7676
77 title: backend.selectedDevice ?77 header: PageHeader {
78 backend.selectedDevice.name.length > 0 ?78 title: backend.selectedDevice ?
79 backend.selectedDevice.name :79 backend.selectedDevice.name.length > 0 ?
80 backend.selectedDevice.address80 backend.selectedDevice.name :
81 : i18n.tr("None")81 backend.selectedDevice.address
82 : i18n.tr("None")
83 flickable: scrollWidget
84 }
85
82 visible: false86 visible: false
8387
84 Flickable {88 Flickable {
89 id: scrollWidget
85 anchors.fill: parent90 anchors.fill: parent
86 contentHeight: contentItem.childrenRect.height91 contentHeight: contentItem.childrenRect.height
87 boundsBehavior: (contentHeight > root.height) ?92 boundsBehavior: (contentHeight > root.height) ?
@@ -153,7 +158,7 @@
153 }158 }
154159
155 backend.resetSelectedDevice();160 backend.resetSelectedDevice();
156 pageStack.pop();161 pageStack.removePages(connectedDevicePage);
157 }162 }
158 visible: backend.selectedDevice ? true : false163 visible: backend.selectedDevice ? true : false
159 enabled: backend.selectedDevice && backend.powered ? true : false164 enabled: backend.selectedDevice && backend.powered ? true : false
@@ -168,7 +173,7 @@
168 onClicked: {173 onClicked: {
169 backend.removeDevice();174 backend.removeDevice();
170 backend.resetSelectedDevice();175 backend.resetSelectedDevice();
171 pageStack.pop();176 pageStack.removePages(connectedDevicePage);
172 }177 }
173 enabled: backend.powered && backend.selectedDevice && backend.selectedDevice.path.length > 0 && backend.selectedDevice.paired ? true : false178 enabled: backend.powered && backend.selectedDevice && backend.selectedDevice.path.length > 0 && backend.selectedDevice.paired ? true : false
174 }179 }
175180
=== modified file 'plugins/bluetooth/PageComponent.qml'
--- plugins/bluetooth/PageComponent.qml 2016-07-14 13:51:56 +0000
+++ plugins/bluetooth/PageComponent.qml 2017-01-12 12:47:26 +0000
@@ -31,6 +31,7 @@
31ItemPage {31ItemPage {
32 id: root32 id: root
33 title: i18n.tr("Bluetooth")33 title: i18n.tr("Bluetooth")
34 flickable: scrollWidget
34 objectName: "bluetoothPage"35 objectName: "bluetoothPage"
3536
36 property var dialogPopupId37 property var dialogPopupId
@@ -205,6 +206,7 @@
205 }206 }
206207
207 Flickable {208 Flickable {
209 id: scrollWidget
208 anchors.fill: parent210 anchors.fill: parent
209 contentHeight: contentItem.childrenRect.height211 contentHeight: contentItem.childrenRect.height
210 boundsBehavior: (contentHeight > root.height) ?212 boundsBehavior: (contentHeight > root.height) ?
@@ -299,7 +301,9 @@
299 }301 }
300 onClicked: {302 onClicked: {
301 backend.setSelectedDevice(addressName);303 backend.setSelectedDevice(addressName);
302 pageStack.push(Qt.resolvedUrl("DevicePage.qml"), {backend: backend, root: root});304 pageStack.addPageToNextColumn(root,
305 Qt.resolvedUrl("DevicePage.qml"),
306 {backend: backend, root: root});
303 }307 }
304 }308 }
305 }309 }
@@ -341,7 +345,9 @@
341 text: getDisplayName(type, displayName)345 text: getDisplayName(type, displayName)
342 onClicked: {346 onClicked: {
343 backend.setSelectedDevice(addressName);347 backend.setSelectedDevice(addressName);
344 pageStack.push(Qt.resolvedUrl("DevicePage.qml"), {backend: backend, root: root});348 pageStack.addPageToNextColumn(root,
349 Qt.resolvedUrl("DevicePage.qml"),
350 {backend: backend, root: root});
345 }351 }
346 }352 }
347 }353 }
@@ -375,7 +381,9 @@
375 text: getDisplayName(type, displayName)381 text: getDisplayName(type, displayName)
376 onClicked: {382 onClicked: {
377 backend.setSelectedDevice(addressName);383 backend.setSelectedDevice(addressName);
378 pageStack.push(Qt.resolvedUrl("DevicePage.qml"), {backend: backend, root: root});384 pageStack.addPageToNextColumn(root,
385 Qt.resolvedUrl("DevicePage.qml"),
386 {backend: backend, root: root});
379 }387 }
380 }388 }
381 }389 }
382390
=== modified file 'plugins/brightness/PageComponent.qml'
--- plugins/brightness/PageComponent.qml 2016-07-06 15:38:55 +0000
+++ plugins/brightness/PageComponent.qml 2017-01-12 12:47:26 +0000
@@ -43,7 +43,7 @@
43 AethercastDisplays {43 AethercastDisplays {
44 id: aethercastDisplays44 id: aethercastDisplays
45 onEnabledChanged: {45 onEnabledChanged: {
46 /* This is a hack to ensure the aethercast enabled switch stays 46 /* This is a hack to ensure the aethercast enabled switch stays
47 * in sync with the enabled property47 * in sync with the enabled property
48 */48 */
49 enabledCheck.serverChecked = enabled;49 enabledCheck.serverChecked = enabled;
@@ -158,7 +158,8 @@
158 text: i18n.tr("Wireless display")158 text: i18n.tr("Wireless display")
159 value: aethercastDisplays.state === "connected" ? i18n.tr("Connected") : i18n.tr("Not connected")159 value: aethercastDisplays.state === "connected" ? i18n.tr("Connected") : i18n.tr("Not connected")
160 progression: true160 progression: true
161 onClicked: pageStack.push(Qt.resolvedUrl("WifiDisplays.qml"))161 onClicked: pageStack.addPageToNextColumn(
162 root, Qt.resolvedUrl("WifiDisplays.qml"))
162 }163 }
163 }164 }
164 }165 }
165166
=== modified file 'plugins/brightness/WifiDisplays.qml'
--- plugins/brightness/WifiDisplays.qml 2016-07-14 08:31:08 +0000
+++ plugins/brightness/WifiDisplays.qml 2017-01-12 12:47:26 +0000
@@ -25,6 +25,7 @@
25 id: wifiDisplays25 id: wifiDisplays
26 objectName: "wifiDisplays"26 objectName: "wifiDisplays"
27 title: i18n.tr("Wireless Display")27 title: i18n.tr("Wireless Display")
28 flickable: pageFlickable
2829
29 Component.onCompleted: {30 Component.onCompleted: {
30 if (!displays.scanning)31 if (!displays.scanning)
3132
=== modified file 'plugins/cellular/Components/MultiSim.qml'
--- plugins/cellular/Components/MultiSim.qml 2016-07-30 01:55:39 +0000
+++ plugins/cellular/Components/MultiSim.qml 2017-01-12 12:47:26 +0000
@@ -26,8 +26,8 @@
26import Ubuntu.Components.ListItems 1.3 as ListItems26import Ubuntu.Components.ListItems 1.3 as ListItems
2727
28Column {28Column {
29 id: multiSim
29 objectName: "multiSim"30 objectName: "multiSim"
30
31 property var sims31 property var sims
32 property var poweredSim: {32 property var poweredSim: {
33 var s = null;33 var s = null;
@@ -63,9 +63,8 @@
63 progressionVisible: enabled63 progressionVisible: enabled
64 showDivider: false64 showDivider: false
65 onClicked: {65 onClicked: {
66 pageStack.push(Qt.resolvedUrl("../PageCarriersAndApns.qml"), {66 pageStack.addPageToNextColumn(multiSim,
67 sims: sims67 Qt.resolvedUrl("../PageCarriersAndApns.qml"), { sims: sims });
68 });
69 }68 }
70 }69 }
7170
7271
=== modified file 'plugins/cellular/Components/SingleSim.qml'
--- plugins/cellular/Components/SingleSim.qml 2016-07-14 13:51:56 +0000
+++ plugins/cellular/Components/SingleSim.qml 2017-01-12 12:47:26 +0000
@@ -111,9 +111,8 @@
111 id: chooseCarrier111 id: chooseCarrier
112 objectName: "carrierApnEntry"112 objectName: "carrierApnEntry"
113 value: sim.netReg.name || ""113 value: sim.netReg.name || ""
114 onClicked: pageStack.push(Qt.resolvedUrl("../PageCarrierAndApn.qml"), {114 onClicked: pageStack.addPageToNextColumn(singlesim,
115 sim: sim115 Qt.resolvedUrl("../PageCarrierAndApn.qml"), { sim: sim })
116 })
117 }116 }
118117
119 RadioSingleSim {118 RadioSingleSim {
120119
=== modified file 'plugins/cellular/PageApnEditor.qml'
--- plugins/cellular/PageApnEditor.qml 2016-04-01 15:13:06 +0000
+++ plugins/cellular/PageApnEditor.qml 2017-01-12 12:47:26 +0000
@@ -67,7 +67,7 @@
67 signal canceled ()67 signal canceled ()
6868
69 title: contextQML ? i18n.tr("Edit") : i18n.tr("New APN")69 title: contextQML ? i18n.tr("Edit") : i18n.tr("New APN")
7070 flickable: scrollArea
71 state: "default"71 state: "default"
72 states: [72 states: [
73 PageHeadState {73 PageHeadState {
@@ -124,7 +124,6 @@
124 value: false124 value: false
125 }125 }
126126
127 flickable: null
128 Flickable {127 Flickable {
129 id: scrollArea128 id: scrollArea
130 objectName: "scrollArea"129 objectName: "scrollArea"
131130
=== modified file 'plugins/cellular/PageCarrierAndApn.qml'
--- plugins/cellular/PageCarrierAndApn.qml 2016-07-14 13:51:56 +0000
+++ plugins/cellular/PageCarrierAndApn.qml 2017-01-12 12:47:26 +0000
@@ -26,11 +26,12 @@
26 id: root26 id: root
27 title: i18n.tr("Carrier & APN")27 title: i18n.tr("Carrier & APN")
28 objectName: "carrierApnPage"28 objectName: "carrierApnPage"
29 flickable: null29 flickable: scrollWidget
3030
31 property var sim31 property var sim
3232
33 Flickable {33 Flickable {
34 id: scrollWidget
34 anchors.fill: parent35 anchors.fill: parent
35 contentWidth: parent.width36 contentWidth: parent.width
36 contentHeight: contentItem.childrenRect.height37 contentHeight: contentItem.childrenRect.height
@@ -47,7 +48,8 @@
47 enabled: (sim.netReg.status !== "") &&48 enabled: (sim.netReg.status !== "") &&
48 (sim.netReg.mode !== "auto-only")49 (sim.netReg.mode !== "auto-only")
49 progressionVisible: enabled50 progressionVisible: enabled
50 onClicked: pageStack.push(Qt.resolvedUrl("PageChooseCarrier.qml"), {51 onClicked: pageStack.addPageToNextColumn(root,
52 Qt.resolvedUrl("PageChooseCarrier.qml"), {
51 sim: sim,53 sim: sim,
52 title: i18n.tr("Carrier")54 title: i18n.tr("Carrier")
53 })55 })
@@ -57,7 +59,8 @@
57 text: i18n.tr("APN")59 text: i18n.tr("APN")
58 objectName: "apn"60 objectName: "apn"
59 progressionVisible: enabled61 progressionVisible: enabled
60 onClicked: pageStack.push(Qt.resolvedUrl("PageChooseApn.qml"), {62 onClicked: pageStack.addPageToNextColumn(root,
63 Qt.resolvedUrl("PageChooseApn.qml"), {
61 sim: sim64 sim: sim
62 })65 })
63 }66 }
6467
=== modified file 'plugins/cellular/PageCarriersAndApns.qml'
--- plugins/cellular/PageCarriersAndApns.qml 2016-07-14 13:51:56 +0000
+++ plugins/cellular/PageCarriersAndApns.qml 2017-01-12 12:47:26 +0000
@@ -26,11 +26,12 @@
26 id: root26 id: root
27 title: i18n.tr("Carriers & APNs")27 title: i18n.tr("Carriers & APNs")
28 objectName: "carrierApnPage"28 objectName: "carrierApnPage"
29 flickable: null29 flickable: scrollWidget
3030
31 property var sims31 property var sims
3232
33 Flickable {33 Flickable {
34 id: scrollWidget
34 anchors.fill: parent35 anchors.fill: parent
35 contentWidth: parent.width36 contentWidth: parent.width
36 contentHeight: contentItem.childrenRect.height37 contentHeight: contentItem.childrenRect.height
@@ -59,7 +60,8 @@
59 enabled: (sims[index].netReg.status !== "") &&60 enabled: (sims[index].netReg.status !== "") &&
60 (sims[index].netReg.mode !== "auto-only")61 (sims[index].netReg.mode !== "auto-only")
61 progressionVisible: enabled62 progressionVisible: enabled
62 onClicked: pageStack.push(Qt.resolvedUrl("PageChooseCarrier.qml"), {63 onClicked: pageStack.addPageToNextColumn(root,
64 Qt.resolvedUrl("PageChooseCarrier.qml"), {
63 sim: sims[index],65 sim: sims[index],
64 title: sims[index].title66 title: sims[index].title
65 })67 })
@@ -68,7 +70,8 @@
68 SettingsListItems.StandardProgression {70 SettingsListItems.StandardProgression {
69 text: i18n.tr("APN")71 text: i18n.tr("APN")
70 progressionVisible: enabled72 progressionVisible: enabled
71 onClicked: pageStack.push(Qt.resolvedUrl("PageChooseApn.qml"), {73 onClicked: pageStack.addPageToNextColumn(root,
74 Qt.resolvedUrl("PageChooseApn.qml"), {
72 sim: sims[index]75 sim: sims[index]
73 })76 })
74 }77 }
7578
=== modified file 'plugins/cellular/PageChooseApn.qml'
--- plugins/cellular/PageChooseApn.qml 2016-07-14 13:51:56 +0000
+++ plugins/cellular/PageChooseApn.qml 2017-01-12 12:47:26 +0000
@@ -35,6 +35,7 @@
35ItemPage {35ItemPage {
36 id: root36 id: root
37 title: i18n.tr("APN")37 title: i18n.tr("APN")
38 flickable: scrollWidget
38 objectName: "apnPage"39 objectName: "apnPage"
3940
40 property var sim41 property var sim
@@ -106,11 +107,13 @@
106 iconName: "add"107 iconName: "add"
107 objectName: "newApn"108 objectName: "newApn"
108 onTriggered: {109 onTriggered: {
109 editor = pageStack.push(pageApnEditor, {110 editor = pageStack.addPageToNextColumn(root,
110 mmsModel: mmsContexts,111 pageApnEditor, {
111 internetModel: internetContexts,112 mmsModel: mmsContexts,
112 iaModel: iaContexts113 internetModel: internetContexts,
113 });114 iaModel: iaContexts
115 }
116 );
114 }117 }
115 }118 }
116 ]119 ]
@@ -306,7 +309,7 @@
306 }309 }
307310
308 onClicked: {311 onClicked: {
309 editor = pageStack.push(pageApnEditor, {312 editor = pageStack.addPageToNextColumn(root, pageApnEditor, {
310 contextQML: qml,313 contextQML: qml,
311 mmsModel: mmsContexts,314 mmsModel: mmsContexts,
312 internetModel: internetContexts,315 internetModel: internetContexts,
313316
=== modified file 'plugins/cellular/PageChooseCarrier.qml'
--- plugins/cellular/PageChooseCarrier.qml 2015-11-13 13:37:40 +0000
+++ plugins/cellular/PageChooseCarrier.qml 2017-01-12 12:47:26 +0000
@@ -31,7 +31,7 @@
31 id: root31 id: root
32 title: i18n.tr("Carrier")32 title: i18n.tr("Carrier")
33 objectName: "chooseCarrierPage"33 objectName: "chooseCarrierPage"
34 flickable: null34 flickable: scrollWidget
3535
36 property var sim36 property var sim
37 property bool scanning: true37 property bool scanning: true
3838
=== modified file 'plugins/cellular/PageComponent.qml'
--- plugins/cellular/PageComponent.qml 2016-07-14 13:51:56 +0000
+++ plugins/cellular/PageComponent.qml 2017-01-12 12:47:26 +0000
@@ -30,6 +30,7 @@
30ItemPage {30ItemPage {
31 id: root31 id: root
32 title: i18n.tr("Cellular")32 title: i18n.tr("Cellular")
33 flickable: flick
33 objectName: "cellularPage"34 objectName: "cellularPage"
3435
35 property var modemsSorted: []36 property var modemsSorted: []
3637
=== modified file 'plugins/hotspot/PageComponent.qml'
--- plugins/hotspot/PageComponent.qml 2016-08-17 12:39:39 +0000
+++ plugins/hotspot/PageComponent.qml 2017-01-12 12:47:26 +0000
@@ -31,6 +31,7 @@
31 id: root31 id: root
32 objectName: "hotspotPage"32 objectName: "hotspotPage"
33 title: i18n.tr("Hotspot")33 title: i18n.tr("Hotspot")
34 flickable: flick
3435
35 states: [36 states: [
36 State {37 State {
3738
=== modified file 'plugins/language/KeyboardLayouts.qml'
--- plugins/language/KeyboardLayouts.qml 2016-01-27 15:32:11 +0000
+++ plugins/language/KeyboardLayouts.qml 2017-01-12 12:47:26 +0000
@@ -27,6 +27,7 @@
27ItemPage {27ItemPage {
28 id: root28 id: root
29 title: i18n.tr("Keyboard layouts")29 title: i18n.tr("Keyboard layouts")
30 flickable: subsetView
3031
31 property var plugin32 property var plugin
32 property bool currentLayoutsDraggable: false33 property bool currentLayoutsDraggable: false
3334
=== modified file 'plugins/language/PageComponent.qml'
--- plugins/language/PageComponent.qml 2017-01-12 12:47:26 +0000
+++ plugins/language/PageComponent.qml 2017-01-12 12:47:26 +0000
@@ -34,6 +34,7 @@
34 objectName: "languagePage"34 objectName: "languagePage"
3535
36 title: i18n.tr("Language & Text")36 title: i18n.tr("Language & Text")
37 flickable: scrollWidget
3738
38 InputDeviceManager {39 InputDeviceManager {
39 id: keyboardsModel40 id: keyboardsModel
@@ -42,30 +43,16 @@
4243
43 property bool externalKeyboardPresent: keyboardsModel.count > 044 property bool externalKeyboardPresent: keyboardsModel.count > 0
4445
45 property var pluginOptions46 onPushedOntoStack: {
46 Connections {47 if (pluginOptions && pluginOptions['subpage']) {
47 target: pageStack48 switch (pluginOptions['subpage']) {
48 onCurrentPageChanged: {49 case 'hw-keyboard-layouts':
49 // If we are called with subpage=foo, push foo on the stack.50 pageStack.addPageToNextColumn(
50 //51 root, Qt.resolvedUrl('KeyboardLayouts.qml'), {
51 // We need to wait until the PageComponent has been pushed to the stack52 plugin: hwKeyboardPlugin,
52 // before pushing the subpages, otherwise they will be pushed below the53 currentLayoutsDraggable: true
53 // PageComponent.54 });
54 if (pageStack.currentPage === root) {55 break;
55 if (pluginOptions && pluginOptions['subpage']) {
56 switch (pluginOptions['subpage']) {
57 case 'hw-keyboard-layouts':
58 pageStack.push(Qt.resolvedUrl("KeyboardLayouts.qml"), {
59 plugin: hwKeyboardPlugin,
60 currentLayoutsDraggable: true
61 })
62 break;
63 }
64 }
65
66 // Once done, disable this Connections, so that if the user navigates
67 // back to the root we won't push the subpages again
68 target = null
69 }56 }
70 }57 }
71 }58 }
@@ -122,6 +109,7 @@
122 }109 }
123110
124 Flickable {111 Flickable {
112 id: scrollWidget
125 anchors.fill: parent113 anchors.fill: parent
126 contentHeight: contentItem.childrenRect.height114 contentHeight: contentItem.childrenRect.height
127 boundsBehavior: contentHeight > root.height ?115 boundsBehavior: contentHeight > root.height ?
@@ -159,7 +147,7 @@
159 value: oskPlugin.keyboardLayoutsModel.subset.length == 1 ?147 value: oskPlugin.keyboardLayoutsModel.subset.length == 1 ?
160 oskPlugin.keyboardLayoutsModel.superset[oskPlugin.keyboardLayoutsModel.subset[0]][0] :148 oskPlugin.keyboardLayoutsModel.superset[oskPlugin.keyboardLayoutsModel.subset[0]][0] :
161 oskPlugin.keyboardLayoutsModel.subset.length149 oskPlugin.keyboardLayoutsModel.subset.length
162 onClicked: pageStack.push(Qt.resolvedUrl("KeyboardLayouts.qml"), {150 onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("KeyboardLayouts.qml"), {
163 plugin: oskPlugin151 plugin: oskPlugin
164 })152 })
165 }153 }
@@ -168,7 +156,7 @@
168 text: i18n.tr("External keyboard")156 text: i18n.tr("External keyboard")
169 progression: true157 progression: true
170 showDivider: false158 showDivider: false
171 onClicked: pageStack.push(Qt.resolvedUrl("PageHardwareKeyboard.qml"))159 onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("PageHardwareKeyboard.qml"))
172 visible: externalKeyboardPresent || showAllUI160 visible: externalKeyboardPresent || showAllUI
173 }161 }
174162
@@ -183,7 +171,7 @@
183 plugin.spellCheckingModel.subset.length171 plugin.spellCheckingModel.subset.length
184 progression: true172 progression: true
185173
186 onClicked: pageStack.push(spellChecking)174 onClicked: pageStack.addPageToNextColumn(root, spellChecking)
187 }175 }
188176
189 ListItem.Standard {177 ListItem.Standard {
190178
=== modified file 'plugins/language/PageHardwareKeyboard.qml'
--- plugins/language/PageHardwareKeyboard.qml 2016-11-15 13:19:23 +0000
+++ plugins/language/PageHardwareKeyboard.qml 2017-01-12 12:47:26 +0000
@@ -31,6 +31,7 @@
31 objectName: "hwKbdPage"31 objectName: "hwKbdPage"
3232
33 title: i18n.tr("Hardware keyboard")33 title: i18n.tr("Hardware keyboard")
34 flickable: scrollWidget
3435
35 Component {36 Component {
36 id: keyboardLayouts37 id: keyboardLayouts
@@ -43,6 +44,7 @@
43 }44 }
4445
45 Flickable {46 Flickable {
47 id: scrollWidget
46 anchors.fill: parent48 anchors.fill: parent
47 contentHeight: contentItem.childrenRect.height49 contentHeight: contentItem.childrenRect.height
48 boundsBehavior: contentHeight > root.height ?50 boundsBehavior: contentHeight > root.height ?
@@ -64,10 +66,12 @@
64 plugin.keyboardLayoutsModel.subset.length66 plugin.keyboardLayoutsModel.subset.length
65 progression: true67 progression: true
6668
67 onClicked: pageStack.push(Qt.resolvedUrl("KeyboardLayouts.qml"), {69 onClicked: pageStack.addPageToNextColumn(root,
68 plugin: plugin,70 Qt.resolvedUrl("KeyboardLayouts.qml"), {
69 currentLayoutsDraggable: true71 plugin: plugin,
70 })72 currentLayoutsDraggable: true
73 }
74 )
71 }75 }
72 }76 }
73 }77 }
7478
=== modified file 'plugins/language/SpellChecking.qml'
--- plugins/language/SpellChecking.qml 2016-07-12 16:40:18 +0000
+++ plugins/language/SpellChecking.qml 2017-01-12 12:47:26 +0000
@@ -27,6 +27,7 @@
2727
28ItemPage {28ItemPage {
29 title: i18n.tr("Spell checking")29 title: i18n.tr("Spell checking")
30 flickable: scrollWidget
3031
31 UbuntuLanguagePlugin {32 UbuntuLanguagePlugin {
32 id: plugin33 id: plugin
@@ -52,6 +53,7 @@
52 }53 }
5354
54 SubsetView {55 SubsetView {
56 id: scrollWidget
55 clip: true57 clip: true
5658
57 anchors.top: item.bottom59 anchors.top: item.bottom
5860
=== modified file 'plugins/launcher/PageComponent.qml'
--- plugins/launcher/PageComponent.qml 2016-11-16 17:06:51 +0000
+++ plugins/launcher/PageComponent.qml 2017-01-12 12:47:26 +0000
@@ -29,6 +29,7 @@
29 id: root29 id: root
30 objectName: "launcherPage"30 objectName: "launcherPage"
31 title: i18n.tr("Launcher")31 title: i18n.tr("Launcher")
32 flickable: flick
3233
33 /* The introductory label “On large displays:” should be present if the34 /* The introductory label “On large displays:” should be present if the
34 current display does not fall into <the large screen> category (to explain35 current display does not fall into <the large screen> category (to explain
3536
=== modified file 'plugins/notifications/PageComponent.qml'
--- plugins/notifications/PageComponent.qml 2016-07-08 22:13:26 +0000
+++ plugins/notifications/PageComponent.qml 2017-01-12 12:47:26 +0000
@@ -27,6 +27,7 @@
27 objectName: "systemNotificationsPage"27 objectName: "systemNotificationsPage"
2828
29 title: i18n.tr("Notifications")29 title: i18n.tr("Notifications")
30 flickable: notificationsList
3031
31 onActiveChanged: {32 onActiveChanged: {
32 if (active) {33 if (active) {
@@ -66,7 +67,7 @@
66 left: parent.left67 left: parent.left
67 right: parent.right68 right: parent.right
68 }69 }
69 70
70 ListItems.Base {71 ListItems.Base {
71 height: labelSubtitle.height + units.gu(2)72 height: labelSubtitle.height + units.gu(2)
72 Label {73 Label {
@@ -105,8 +106,9 @@
105 return106 return
106 }107 }
107108
108 pageStack.push(Qt.resolvedUrl("ClickAppsSoundsNotify.qml"),109 pageStack.addPageToNextColumn(
109 { model: clickAppsSoundsNotifyModel })110 root, Qt.resolvedUrl("ClickAppsSoundsNotify.qml"),
111 { model: clickAppsSoundsNotifyModel })
110 }112 }
111 }113 }
112114
@@ -130,8 +132,9 @@
130 return132 return
131 }133 }
132134
133 pageStack.push(Qt.resolvedUrl("ClickAppsVibrationsNotify.qml"),135 pageStack.addPageToNextColumn(
134 { model: clickAppsVibrationsNotifyModel })136 root, Qt.resolvedUrl("ClickAppsVibrationsNotify.qml"),
137 { model: clickAppsVibrationsNotifyModel })
135 }138 }
136 }139 }
137140
@@ -147,9 +150,9 @@
147 delegate: ListItem {150 delegate: ListItem {
148 height: layout.height + (divider.visible ? divider.height : 0)151 height: layout.height + (divider.visible ? divider.height : 0)
149152
150 onClicked: pageStack.push(Qt.resolvedUrl("ClickAppNotifications.qml"),153 onClicked: pageStack.addPageToNextColumn(
151 { entry: model,154 root, Qt.resolvedUrl("ClickAppNotifications.qml"),
152 entryIndex: index })155 { entry: model, entryIndex: index })
153156
154 ListItemLayout {157 ListItemLayout {
155 id: layout158 id: layout
156159
=== modified file 'plugins/phone/CallForwarding.qml'
--- plugins/phone/CallForwarding.qml 2016-07-14 13:51:56 +0000
+++ plugins/phone/CallForwarding.qml 2017-01-12 12:47:26 +0000
@@ -100,7 +100,7 @@
100 value: false100 value: false
101 }101 }
102102
103 flickable: null103 flickable: flick
104 Flickable {104 Flickable {
105 id: flick105 id: flick
106106
107107
=== modified file 'plugins/phone/MultiSim.qml'
--- plugins/phone/MultiSim.qml 2016-07-12 16:41:13 +0000
+++ plugins/phone/MultiSim.qml 2017-01-12 12:47:26 +0000
@@ -41,10 +41,12 @@
41 objectName: "callWaitSim" + index41 objectName: "callWaitSim" + index
42 text: i18n.tr("Call waiting")42 text: i18n.tr("Call waiting")
43 progression: true43 progression: true
44 onClicked: pageStack.push(Qt.resolvedUrl("CallWaiting.qml"), {44 onClicked: pageStack.addPageToNextColumn(root,
45 sim: sims[index],45 Qt.resolvedUrl("CallWaiting.qml"), {
46 headerTitle: sims[index].title46 sim: sims[index],
47 })47 headerTitle: sims[index].title
48 }
49 )
48 }50 }
4951
50 ListItem.SingleValue {52 ListItem.SingleValue {
@@ -52,10 +54,12 @@
52 text: i18n.tr("Call forwarding")54 text: i18n.tr("Call forwarding")
53 progression: true55 progression: true
54 value: sims[index].getCallForwardingSummary()56 value: sims[index].getCallForwardingSummary()
55 onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"), {57 onClicked: pageStack.addPageToNextColumn(root,
56 sim: sims[index],58 Qt.resolvedUrl("CallForwarding.qml"), {
57 headerTitle: sims[index].title59 sim: sims[index],
58 })60 headerTitle: sims[index].title
61 }
62 )
59 }63 }
6064
61 ListItem.Standard {65 ListItem.Standard {
@@ -75,11 +79,13 @@
75 return sims[index].simMng.present && nums;79 return sims[index].simMng.present && nums;
76 }80 }
77 showDivider: false81 showDivider: false
78 onClicked: pageStack.push(Qt.resolvedUrl("Services.qml"), {82 onClicked: pageStack.addPageToNextColumn(root,
79 carrierString: sims[index].netReg.name,83 Qt.resolvedUrl("Services.qml"), {
80 sim: sims[index].simMng,84 carrierString: sims[index].netReg.name,
81 headerTitle: sims[index].title85 sim: sims[index].simMng,
82 })86 headerTitle: sims[index].title
87 }
88 )
83 }89 }
8490
85 ListItem.Divider {91 ListItem.Divider {
8692
=== modified file 'plugins/phone/Services.qml'
--- plugins/phone/Services.qml 2016-07-12 16:41:13 +0000
+++ plugins/phone/Services.qml 2017-01-12 12:47:26 +0000
@@ -27,6 +27,7 @@
27 id: root27 id: root
28 objectName: "servicesPage"28 objectName: "servicesPage"
29 title: headerTitle29 title: headerTitle
30 flickable: scrollWidget
30 property string carrierString31 property string carrierString
31 property variant sim32 property variant sim
32 property var names: []33 property var names: []
@@ -44,6 +45,7 @@
44 }45 }
4546
46 Flickable {47 Flickable {
48 id: scrollWidget
47 anchors.fill: parent49 anchors.fill: parent
48 contentHeight: contentItem.childrenRect.height50 contentHeight: contentItem.childrenRect.height
49 boundsBehavior: (contentHeight > root.height) ?51 boundsBehavior: (contentHeight > root.height) ?
@@ -63,7 +65,10 @@
63 ListItem.Standard {65 ListItem.Standard {
64 progression: true66 progression: true
65 text: modelData67 text: modelData
66 onClicked: pageStack.push(Qt.resolvedUrl("ServiceInfo.qml"), {serviceName: modelData, serviceNumber: sim.serviceNumbers[modelData]})68 onClicked: pageStack.addPageToNextColumn(root,
69 Qt.resolvedUrl("ServiceInfo.qml"), {
70 serviceName: modelData,
71 serviceNumber: sim.serviceNumbers[modelData]})
67 }72 }
68 }73 }
69 }74 }
7075
=== modified file 'plugins/phone/SingleSim.qml'
--- plugins/phone/SingleSim.qml 2016-07-12 16:41:13 +0000
+++ plugins/phone/SingleSim.qml 2017-01-12 12:47:26 +0000
@@ -33,7 +33,8 @@
33 objectName: "callWait"33 objectName: "callWait"
34 text: i18n.tr("Call waiting")34 text: i18n.tr("Call waiting")
35 progression: true35 progression: true
36 onClicked: pageStack.push(Qt.resolvedUrl("CallWaiting.qml"), {sim: sim})36 onClicked: pageStack.addPageToNextColumn(root,
37 Qt.resolvedUrl("CallWaiting.qml"), {sim: sim})
37 }38 }
3839
39 ListItem.SingleValue {40 ListItem.SingleValue {
@@ -42,7 +43,8 @@
42 showDivider: false43 showDivider: false
43 progression: true44 progression: true
44 value: sim.getCallForwardingSummary()45 value: sim.getCallForwardingSummary()
45 onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"), {sim: sim})46 onClicked: pageStack.addPageToNextColumn(root,
47 Qt.resolvedUrl("CallForwarding.qml"), {sim: sim})
46 }48 }
4749
48 ListItem.Divider {}50 ListItem.Divider {}
@@ -65,7 +67,8 @@
65 }67 }
66 return sim.simMng.present && nums;68 return sim.simMng.present && nums;
67 }69 }
68 onClicked: pageStack.push(Qt.resolvedUrl("Services.qml"),70 onClicked: pageStack.addPageToNextColumn(root,
69 {carrierString: carrierString, sim: sim.simMng})71 Qt.resolvedUrl("Services.qml"),
72 {carrierString: carrierString, sim: sim.simMng})
70 }73 }
71}74}
7275
=== modified file 'plugins/security-privacy/AppAccess.qml'
--- plugins/security-privacy/AppAccess.qml 2016-07-14 13:51:56 +0000
+++ plugins/security-privacy/AppAccess.qml 2017-01-12 12:47:26 +0000
@@ -27,23 +27,30 @@
27ItemPage {27ItemPage {
28 id: root28 id: root
29 title: i18n.tr("App permissions")29 title: i18n.tr("App permissions")
30 flickable: scrollWidget
3031
31 function openService(service) {32 onPushedOntoStack: {
32 for (var i = 0; i < appsModel.count; i++) {33 var service;
33 var item = appsModel.get(i)34 if (pluginOptions && pluginOptions['service']) {
34 if (item.service === service) {35 service = pluginOptions['service'];
35 var model = trustStoreModelComponent.createObject(null, { serviceName: item.trustStoreService })36 for (var i = 0; i < appsModel.count; i++) {
36 pageStack.push(Qt.resolvedUrl("AppAccessControl.qml"), {37 var item = appsModel.get(i)
37 "title": i18n.tr(item.name),38 if (item.service === service) {
38 "caption": i18n.tr(item.caption),39 var model = trustStoreModelComponent.createObject(null, { serviceName: item.trustStoreService })
39 "model": model40 pageStack.addPageToNextColumn(
40 })41 root, Qt.resolvedUrl("AppAccessControl.qml"), {
41 return;42 "title": i18n.tr(item.name),
43 "caption": i18n.tr(item.caption),
44 "model": model,
45 });
46 return;
47 }
42 }48 }
43 }49 }
44 }50 }
4551
46 Flickable {52 Flickable {
53 id: scrollWidget
47 anchors.fill: parent54 anchors.fill: parent
48 contentHeight: contentItem.childrenRect.height55 contentHeight: contentItem.childrenRect.height
49 boundsBehavior: (contentHeight > root.height) ?56 boundsBehavior: (contentHeight > root.height) ?
@@ -99,7 +106,7 @@
99 value: trustStoreModel.count > 0 ?106 value: trustStoreModel.count > 0 ?
100 i18n.tr("%1/%2").arg(trustStoreModel.grantedCount).arg(trustStoreModel.count) :107 i18n.tr("%1/%2").arg(trustStoreModel.grantedCount).arg(trustStoreModel.count) :
101 i18n.tr("0")108 i18n.tr("0")
102 onClicked: pageStack.push(Qt.resolvedUrl("AppAccessControl.qml"), {109 onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("AppAccessControl.qml"), {
103 "title": i18n.tr(model.name),110 "title": i18n.tr(model.name),
104 "caption": i18n.tr(model.caption),111 "caption": i18n.tr(model.caption),
105 "model": trustStoreModel,112 "model": trustStoreModel,
@@ -125,7 +132,7 @@
125 if (oaPlugin) {132 if (oaPlugin) {
126 var accountsPage = oaPlugin.pageComponent133 var accountsPage = oaPlugin.pageComponent
127 if (accountsPage)134 if (accountsPage)
128 pageStack.push(accountsPage, {plugin: oaPlugin, pluginManager: pluginManager})135 pageStack.addPageToNextColumn(root, accountsPage, {plugin: oaPlugin, pluginManager: pluginManager})
129 else136 else
130 console.warn("online-accounts")137 console.warn("online-accounts")
131 } else {138 } else {
132139
=== modified file 'plugins/security-privacy/AppAccessControl.qml'
--- plugins/security-privacy/AppAccessControl.qml 2016-07-14 13:51:56 +0000
+++ plugins/security-privacy/AppAccessControl.qml 2017-01-12 12:47:26 +0000
@@ -25,11 +25,13 @@
2525
26ItemPage {26ItemPage {
27 id: root27 id: root
28 flickable: scrollWidget
2829
29 property alias model: repeater.model30 property alias model: repeater.model
30 property alias caption: captionLabel.text31 property alias caption: captionLabel.text
3132
32 Flickable {33 Flickable {
34 id: scrollWidget
33 anchors.fill: parent35 anchors.fill: parent
34 contentHeight: contentItem.childrenRect.height36 contentHeight: contentItem.childrenRect.height
35 boundsBehavior: (contentHeight > root.height) ?37 boundsBehavior: (contentHeight > root.height) ?
3638
=== modified file 'plugins/security-privacy/Location.qml'
--- plugins/security-privacy/Location.qml 2016-07-14 13:51:56 +0000
+++ plugins/security-privacy/Location.qml 2017-01-12 12:47:26 +0000
@@ -153,7 +153,7 @@
153 verticalAlignment: Text.AlignVCenter153 verticalAlignment: Text.AlignVCenter
154 height: contentHeight + units.gu(4)154 height: contentHeight + units.gu(4)
155 onLinkActivated: {155 onLinkActivated: {
156 pageStack.push(Qt.resolvedUrl(link))156 pageStack.addPageToNextColumn(locationPage, Qt.resolvedUrl(link))
157 }157 }
158 onLineLaidOut: {158 onLineLaidOut: {
159 dlgt.height = label.height159 dlgt.height = label.height
160160
=== modified file 'plugins/security-privacy/PageComponent.qml'
--- plugins/security-privacy/PageComponent.qml 2016-11-21 14:47:12 +0000
+++ plugins/security-privacy/PageComponent.qml 2017-01-12 12:47:26 +0000
@@ -56,40 +56,28 @@
56 });56 });
57 return t;57 return t;
58 }58 }
59 property var pluginOptions
60 Connections {
61 target: pageStack
62 onCurrentPageChanged: {
63 // If we are called with subpage=foo, push foo on the stack.
64 //
65 // We need to wait until the PageComponent has been pushed to the stack
66 // before pushing the subpages, otherwise they will be pushed below the
67 // PageComponent.
68 if (pageStack.currentPage === root) {
69 if (pluginOptions && pluginOptions['subpage']) {
70 switch (pluginOptions['subpage']) {
71 case 'location':
72 pageStack.push(Qt.resolvedUrl("Location.qml"));
73 break;
74 case 'permissions':
75 var page = pageStack.push(Qt.resolvedUrl("AppAccess.qml"), {pluginManager: pluginManager})
76 if (pluginOptions['service']) {
77 page.openService(pluginOptions['service'])
78 }
79 break;
80 }
81 } else if (pluginOptions && pluginOptions['service']) {
82 // This whole else if branch will be removed once the
83 // camera app asks for [1] as described in lp:1545733.
84 // [1] settings:///system/permissions?service=camera
85 var page = pageStack.push(Qt.resolvedUrl("AppAccess.qml"), {pluginManager: pluginManager})
86 page.openService(pluginOptions['service'])
87 }
8859
89 // Once done, disable this Connections, so that if the user navigates60 onPushedOntoStack: {
90 // back to the root we won't push the subpages again61 var page;
91 target = null62 var opts = {
63 pluginManager: pluginManager, pluginOptions: pluginOptions,};
64 if (pluginOptions && pluginOptions['subpage']) {
65 switch (pluginOptions['subpage']) {
66 case 'location':
67 page = Qt.resolvedUrl("Location.qml");
68 break;
69 case 'permissions':
70 page = Qt.resolvedUrl("AppAccess.qml")
71 break;
92 }72 }
73 } else if (pluginOptions && pluginOptions['service']) {
74 // This whole else if branch will be removed once the
75 // camera app asks for [1] as described in lp:1545733.
76 // [1] settings:///system/permissions?service=camera
77 page = Qt.resolvedUrl("AppAccess.qml");
78 }
79 if (page) {
80 pageStack.addPageToNextColumn(root, page, opts);
93 }81 }
94 }82 }
9583
@@ -158,18 +146,18 @@
158 id: fingerprintControl146 id: fingerprintControl
159 objectName: "fingerprintControl"147 objectName: "fingerprintControl"
160 text: i18n.tr("Fingerprint ID")148 text: i18n.tr("Fingerprint ID")
161 onClicked: pageStack.push(fingeprintPage, {149 onClicked: pageStack.addPageToNextColumn(root, fingeprintPage, {
162 passcodeSet: securityPrivacy.securityType !== UbuntuSecurityPrivacyPanel.Swipe150 passcodeSet: securityPrivacy.securityType !== UbuntuSecurityPrivacyPanel.Swipe
163 })151 })
164 visible: Biometryd.available152 visible: Biometryd.available || showAllUI
165 }153 }
166154
167 Component {155 Component {
168 id: fingeprintPage156 id: fingeprintPage
169 Fingerprints {157 Fingerprints {
170 onRequestPasscode: {158 onRequestPasscode: {
171 pageStack.pop();159 pageStack.removePages(root);
172 pageStack.push(Qt.resolvedUrl("LockSecurity.qml"));160 pageStack.addPageToNextColumn(root, Qt.resolvedUrl("LockSecurity.qml"));
173 }161 }
174 }162 }
175 }163 }
@@ -178,7 +166,7 @@
178 id: lockingControl166 id: lockingControl
179 objectName: "lockingControl"167 objectName: "lockingControl"
180 text: i18n.tr("Locking and unlocking")168 text: i18n.tr("Locking and unlocking")
181 onClicked: pageStack.push(Qt.resolvedUrl("PhoneLocking.qml"), {169 onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("PhoneLocking.qml"), {
182 usePowerd: usePowerd,170 usePowerd: usePowerd,
183 powerSettings: powerSettings171 powerSettings: powerSettings
184 })172 })
@@ -198,7 +186,7 @@
198 return i18n.tr("Off");186 return i18n.tr("Off");
199 }187 }
200 visible: simsPresent > 0188 visible: simsPresent > 0
201 onClicked: pageStack.push(Qt.resolvedUrl("SimPin.qml"), { sims: sims })189 onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("SimPin.qml"), { sims: sims })
202 }190 }
203191
204 SettingsListItems.Standard {192 SettingsListItems.Standard {
@@ -257,7 +245,7 @@
257 objectName: "locationItem"245 objectName: "locationItem"
258 text: i18n.tr("Location")246 text: i18n.tr("Location")
259 value: ""247 value: ""
260 onClicked: pageStack.push(Qt.resolvedUrl("Location.qml"))248 onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("Location.qml"))
261 visible: true249 visible: true
262 enabled: true250 enabled: true
263 property variant locationEnabled251 property variant locationEnabled
@@ -275,7 +263,7 @@
275263
276 SettingsListItems.SingleValueProgression {264 SettingsListItems.SingleValueProgression {
277 text: i18n.tr("App permissions")265 text: i18n.tr("App permissions")
278 onClicked: pageStack.push(Qt.resolvedUrl("AppAccess.qml"), {pluginManager: pluginManager})266 onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("AppAccess.qml"), {pluginManager: pluginManager})
279 }267 }
280268
281 SettingsListItems.SingleValueProgression {269 SettingsListItems.SingleValueProgression {
@@ -289,7 +277,7 @@
289 i18n.tr("Not sent")277 i18n.tr("Not sent")
290 onClicked: {278 onClicked: {
291 var path = "../diagnostics/PageComponent.qml";279 var path = "../diagnostics/PageComponent.qml";
292 pageStack.push(Qt.resolvedUrl(path));280 pageStack.addPageToNextColumn(root, Qt.resolvedUrl(path));
293 }281 }
294 }282 }
295 }283 }
296284
=== modified file 'plugins/security-privacy/PhoneLocking.qml'
--- plugins/security-privacy/PhoneLocking.qml 2016-07-14 13:51:56 +0000
+++ plugins/security-privacy/PhoneLocking.qml 2017-01-12 12:47:26 +0000
@@ -30,6 +30,7 @@
30 id: root30 id: root
31 objectName: "phoneLockingPage"31 objectName: "phoneLockingPage"
32 title: i18n.tr("Locking and unlocking")32 title: i18n.tr("Locking and unlocking")
33 flickable: scrollWidget
3334
34 property bool usePowerd35 property bool usePowerd
35 property var powerSettings36 property var powerSettings
@@ -39,6 +40,7 @@
39 }40 }
4041
41 Flickable {42 Flickable {
43 id: scrollWidget
42 anchors.fill: parent44 anchors.fill: parent
43 contentHeight: contentItem.childrenRect.height45 contentHeight: contentItem.childrenRect.height
44 boundsBehavior: (contentHeight > root.height) ?46 boundsBehavior: (contentHeight > root.height) ?
@@ -75,7 +77,8 @@
75 return fingerprint77 return fingerprint
76 }78 }
77 }79 }
78 onClicked: pageStack.push(Qt.resolvedUrl("LockSecurity.qml"))80 onClicked: pageStack.addPageToNextColumn(
81 root, Qt.resolvedUrl("LockSecurity.qml"))
79 }82 }
8083
81 SettingsListItems.SingleValueProgression {84 SettingsListItems.SingleValueProgression {
@@ -110,7 +113,7 @@
110 }113 }
111 }114 }
112 onClicked:115 onClicked:
113 pageStack.push(116 pageStack.addPageToNextColumn(root,
114 Qt.resolvedUrl("../battery/SleepValues.qml"),117 Qt.resolvedUrl("../battery/SleepValues.qml"),
115 { title: text, lockOnSuspend: lockOnSuspend } )118 { title: text, lockOnSuspend: lockOnSuspend } )
116 }119 }
117120
=== modified file 'plugins/security-privacy/SimPin.qml'
--- plugins/security-privacy/SimPin.qml 2016-07-14 13:51:56 +0000
+++ plugins/security-privacy/SimPin.qml 2017-01-12 12:47:26 +0000
@@ -35,6 +35,7 @@
35 id: root35 id: root
36 objectName: "simPinPage"36 objectName: "simPinPage"
37 title: i18n.tr("SIM PIN")37 title: i18n.tr("SIM PIN")
38 flickable: scrollWidget
3839
39 property var sims40 property var sims
40 property var curSim41 property var curSim
@@ -345,6 +346,7 @@
345 }346 }
346347
347 Flickable {348 Flickable {
349 id: scrollWidget
348 anchors.fill: parent350 anchors.fill: parent
349 contentHeight: contentItem.childrenRect.height351 contentHeight: contentItem.childrenRect.height
350 boundsBehavior: (contentHeight > root.height) ?352 boundsBehavior: (contentHeight > root.height) ?
351353
=== modified file 'plugins/security-privacy/here-terms.qml'
--- plugins/security-privacy/here-terms.qml 2015-08-10 13:31:45 +0000
+++ plugins/security-privacy/here-terms.qml 2017-01-12 12:47:26 +0000
@@ -22,6 +22,7 @@
2222
23ItemPage {23ItemPage {
24 title: i18n.tr("Nokia HERE")24 title: i18n.tr("Nokia HERE")
25 flickable: scrollWidget
25 id: termsPage26 id: termsPage
2627
27 UbuntuSecurityPrivacyPanel {28 UbuntuSecurityPrivacyPanel {
2829
=== modified file 'plugins/sound/PageComponent.qml'
--- plugins/sound/PageComponent.qml 2016-11-21 15:23:50 +0000
+++ plugins/sound/PageComponent.qml 2017-01-12 12:47:26 +0000
@@ -149,7 +149,7 @@
149 text: i18n.tr("Ringtone")149 text: i18n.tr("Ringtone")
150 value: Utilities.buildDisplayName(backendInfo.incomingCallSound)150 value: Utilities.buildDisplayName(backendInfo.incomingCallSound)
151151
152 onClicked: pageStack.push(152 onClicked: pageStack.addPageToNextColumn(root,
153 Qt.resolvedUrl("SoundsList.qml"), {153 Qt.resolvedUrl("SoundsList.qml"), {
154 title: i18n.tr("Ringtone"),154 title: i18n.tr("Ringtone"),
155 showStopButton: true,155 showStopButton: true,
@@ -209,12 +209,13 @@
209 text: i18n.tr("Message received")209 text: i18n.tr("Message received")
210 value:Utilities.buildDisplayName(210 value:Utilities.buildDisplayName(
211 backendInfo.incomingMessageSound)211 backendInfo.incomingMessageSound)
212 onClicked: pageStack.push(212 onClicked: pageStack.addPageToNextColumn(root,
213 Qt.resolvedUrl("SoundsList.qml"),213 Qt.resolvedUrl("SoundsList.qml"), {
214 { title: i18n.tr("Message received"),214 title: i18n.tr("Message received"),
215 soundType: 1,215 soundType: 1,
216 soundsDir:216 soundsDir: "sounds/ubuntu/notifications/"
217 "sounds/ubuntu/notifications/" })217 }
218 )
218 }219 }
219220
220 SettingsListItems.Standard {221 SettingsListItems.Standard {
221222
=== modified file 'plugins/sound/SoundsList.qml'
--- plugins/sound/SoundsList.qml 2016-09-19 14:53:19 +0000
+++ plugins/sound/SoundsList.qml 2017-01-12 12:47:26 +0000
@@ -128,9 +128,7 @@
128 text: i18n.tr("Custom Ringtone")128 text: i18n.tr("Custom Ringtone")
129 visible: soundType === 0129 visible: soundType === 0
130 progression: true130 progression: true
131 onClicked: {131 onClicked: pageStack.addPageToNextColumn(soundsPage, picker)
132 pageStack.push(picker);
133 }
134 }132 }
135 }133 }
136 }134 }
@@ -215,7 +213,7 @@
215 showTitle: false213 showTitle: false
216214
217 onPeerSelected: {215 onPeerSelected: {
218 pageStack.pop();216 pageStack.removePages(soundsPage);
219 // requests an active transfer from peer217 // requests an active transfer from peer
220 function startContentTransfer(callback) {218 function startContentTransfer(callback) {
221 if (callback)219 if (callback)
@@ -231,7 +229,7 @@
231 });229 });
232 }230 }
233231
234 onCancelPressed: pageStack.pop();232 onCancelPressed: pageStack.removePages(soundsPage);
235 }233 }
236 }234 }
237235
238236
=== modified file 'plugins/system-update/PageComponent.qml'
--- plugins/system-update/PageComponent.qml 2016-08-23 11:48:49 +0000
+++ plugins/system-update/PageComponent.qml 2017-01-12 12:47:26 +0000
@@ -421,7 +421,8 @@
421 return i18n.tr("Unknown")421 return i18n.tr("Unknown")
422 }422 }
423 progression: true423 progression: true
424 onClicked: pageStack.push(Qt.resolvedUrl("Configuration.qml"))424 onClicked: pageStack.addPageToNextColumn(
425 root, Qt.resolvedUrl("Configuration.qml"))
425 }426 }
426 }427 }
427428
428429
=== modified file 'plugins/time-date/ChooseTimeZone.qml'
--- plugins/time-date/ChooseTimeZone.qml 2016-07-14 13:51:56 +0000
+++ plugins/time-date/ChooseTimeZone.qml 2017-01-12 12:47:26 +0000
@@ -27,7 +27,7 @@
2727
28ItemPage {28ItemPage {
29 title: i18n.tr("Time zone")29 title: i18n.tr("Time zone")
3030 flickable: locationsListView
31 property UbuntuTimeDatePanel timeDatePanel31 property UbuntuTimeDatePanel timeDatePanel
3232
33 Timer {33 Timer {
3434
=== modified file 'plugins/time-date/PageComponent.qml'
--- plugins/time-date/PageComponent.qml 2016-07-14 13:51:56 +0000
+++ plugins/time-date/PageComponent.qml 2017-01-12 12:47:26 +0000
@@ -68,9 +68,11 @@
68 id: timeZone68 id: timeZone
69 text: timeDatePanel.timeZoneName69 text: timeDatePanel.timeZoneName
70 value: getUTCOffset()70 value: getUTCOffset()
71 onClicked: pageStack.push(Qt.resolvedUrl("ChooseTimeZone.qml"), {71 onClicked: pageStack.addPageToNextColumn(root,
72 timeDatePanel: timeDatePanel72 Qt.resolvedUrl("ChooseTimeZone.qml"), {
73 })73 timeDatePanel: timeDatePanel
74 }
75 )
74 }76 }
7577
76 SettingsItemTitle {78 SettingsItemTitle {
7779
=== modified file 'plugins/vpn/PageComponent.qml'
--- plugins/vpn/PageComponent.qml 2016-03-14 12:15:41 +0000
+++ plugins/vpn/PageComponent.qml 2017-01-12 12:47:26 +0000
@@ -35,7 +35,7 @@
35 property var diag35 property var diag
3636
37 function openConnection(connection, isNew) {37 function openConnection(connection, isNew) {
38 pageStack.push(vpnEditorDialog, {38 pageStack.addPageToNextColumn(root, vpnEditorDialog, {
39 "connection": connection,39 "connection": connection,
40 "isNew": isNew40 "isNew": isNew
41 });41 });
@@ -89,12 +89,14 @@
89 Component {89 Component {
90 id: vpnEditorDialog90 id: vpnEditorDialog
91 VpnEditor {91 VpnEditor {
92 id: vpnEditorPage
92 onTypeChanged: {93 onTypeChanged: {
93 connection.remove();94 connection.remove();
94 pageStack.pop();95 pageStack.removePages(vpnEditorPage);
95 Connectivity.vpnConnections.add(type);96 Connectivity.vpnConnections.add(type);
96 }97 }
97 onReconnectionPrompt: PopupUtils.open(reconnPrompt)98 onReconnectionPrompt: PopupUtils.open(reconnPrompt)
99 onDone: pageStack.removePages(vpnEditorPage)
98 }100 }
99 }101 }
100102
101103
=== modified file 'plugins/wifi/AccessPoint.qml'
--- plugins/wifi/AccessPoint.qml 2016-07-14 13:51:56 +0000
+++ plugins/wifi/AccessPoint.qml 2017-01-12 12:47:26 +0000
@@ -52,18 +52,12 @@
5252
53 signal activate()53 signal activate()
5454
55 onCheckedChanged: {
56 // if stack has NetworkDetailsBrief, pop it
57 if (pageStack.depth === 3) {
58 pageStack.pop();
59 }
60 }
61
62 progressionVisible: checked55 progressionVisible: checked
63 onClicked: {56 onClicked: {
64 if (checked) {57 if (checked) {
65 pageStack.push(Qt.resolvedUrl("NetworkDetailsBrief.qml"),58 pageStack.addPageToNextColumn(wifibase,
66 {networkName : text, accessPoint: accessPoint})59 Qt.resolvedUrl("NetworkDetailsBrief.qml"),
60 {networkName : text, accessPoint: accessPoint})
67 } else {61 } else {
68 accessPoint.activate();62 accessPoint.activate();
69 }63 }
7064
=== modified file 'plugins/wifi/PageComponent.qml'
--- plugins/wifi/PageComponent.qml 2016-09-27 13:41:19 +0000
+++ plugins/wifi/PageComponent.qml 2017-01-12 12:47:26 +0000
@@ -26,9 +26,10 @@
26 id: wifibase26 id: wifibase
27 objectName: "wifiPage"27 objectName: "wifiPage"
28 title: i18n.tr("Wi-Fi")28 title: i18n.tr("Wi-Fi")
29 flickable: pageFlickable
30
29 property bool wifiEnabled: actionGroup.actionObject.valid ?31 property bool wifiEnabled: actionGroup.actionObject.valid ?
30 actionGroup.actionObject.state : false32 actionGroup.actionObject.state : false
31 property var pluginOptions
3233
33 UnityMenuModel {34 UnityMenuModel {
34 id: menuModel35 id: menuModel
@@ -136,7 +137,8 @@
136 SettingsListItems.StandardProgression {137 SettingsListItems.StandardProgression {
137 objectName: "previousNetwork"138 objectName: "previousNetwork"
138 text: i18n.tr("Previous networks")139 text: i18n.tr("Previous networks")
139 onClicked: pageStack.push(Qt.resolvedUrl("PreviousNetworks.qml"))140 onClicked: pageStack.addPageToNextColumn(wifibase,
141 Qt.resolvedUrl("PreviousNetworks.qml"))
140 }142 }
141143
142 Loader {144 Loader {
143145
=== modified file 'plugins/wifi/PreviousNetworks.qml'
--- plugins/wifi/PreviousNetworks.qml 2016-07-14 13:51:56 +0000
+++ plugins/wifi/PreviousNetworks.qml 2017-01-12 12:47:26 +0000
@@ -25,6 +25,7 @@
25 id: previousNetworks25 id: previousNetworks
26 objectName: "previousNetworksPage"26 objectName: "previousNetworksPage"
27 title: i18n.tr("Previous networks")27 title: i18n.tr("Previous networks")
28 flickable: networkList
2829
29 PreviousNetworkModel {30 PreviousNetworkModel {
30 id: pnmodel31 id: pnmodel
@@ -56,11 +57,12 @@
56 }57 }
57 delegate: SettingsListItems.StandardProgression {58 delegate: SettingsListItems.StandardProgression {
58 text: name59 text: name
59 onClicked: {60 onClicked: pageStack.addPageToNextColumn(previousNetworks,
60 pageStack.push(Qt.resolvedUrl("NetworkDetails.qml"),61 Qt.resolvedUrl("NetworkDetails.qml"), {
61 {networkName : name, password : password, lastUsed : lastUsed,62 networkName : name, password : password,
62 dbusPath : objectPath});63 lastUsed : lastUsed, dbusPath : objectPath
63 }64 }
65 )
64 }66 }
65 }67 }
66}68}
6769
=== modified file 'src/SystemSettings/CMakeLists.txt'
--- src/SystemSettings/CMakeLists.txt 2015-11-18 15:59:45 +0000
+++ src/SystemSettings/CMakeLists.txt 2017-01-12 12:47:26 +0000
@@ -1,6 +1,7 @@
1set(QML_SOURCES1set(QML_SOURCES
2 ItemPage.qml2 ItemPage.qml
3 SettingsItemTitle.qml3 SettingsItemTitle.qml
4 USSAdaptivePageLayout.qml
4)5)
56
6set(PLUG_DIR ${PLUGIN_QML_DIR}/SystemSettings)7set(PLUG_DIR ${PLUGIN_QML_DIR}/SystemSettings)
78
=== modified file 'src/SystemSettings/ItemPage.qml'
--- src/SystemSettings/ItemPage.qml 2015-08-10 13:31:45 +0000
+++ src/SystemSettings/ItemPage.qml 2017-01-12 12:47:26 +0000
@@ -24,8 +24,27 @@
24Page {24Page {
25 id: root25 id: root
2626
27 property alias title: pageHeader.title
28 property alias flickable: pageHeader.flickable
29
30 header: PageHeader {
31 id: pageHeader
32 title: i18n.dtr(plugin.translations, plugin.displayName)
33 }
34
27 property variant plugin35 property variant plugin
28 property variant pluginManager36 property variant pluginManager
2937 property variant pluginOptions
30 title: i18n.dtr(plugin.translations, plugin.displayName)38
39 signal pushedOntoStack()
40
41 Connections {
42 target: root
43 onVisibleChanged: {
44 if (visible) {
45 pushedOntoStack();
46 target = null;
47 }
48 }
49 }
31}50}
3251
=== added file 'src/SystemSettings/USSAdaptivePageLayout.qml'
--- src/SystemSettings/USSAdaptivePageLayout.qml 1970-01-01 00:00:00 +0000
+++ src/SystemSettings/USSAdaptivePageLayout.qml 2017-01-12 12:47:26 +0000
@@ -0,0 +1,40 @@
1/*
2 * This file is part of system-settings
3 *
4 * Copyright (C) 2017 Canonical Ltd.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 3, as published
8 * by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranties of
12 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
13 * PURPOSE. See the GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19import QtQuick 2.0
20import Ubuntu.Components 1.3
21
22AdaptivePageLayout {
23 id: layout
24
25 function addFileToNextColumnSync(parentObject, resolvedUrl, properties) {
26 return addComponentToNextColumnSync(parentObject,
27 Qt.createComponent(resolvedUrl),
28 properties);
29 }
30
31 function addComponentToNextColumnSync(parentObject, component, properties) {
32 if (typeof(properties) === 'undefined') {
33 properties = {}
34 }
35
36 var incubator = layout.addPageToNextColumn(parentObject, component, properties)
37 incubator.forceCompletion()
38 return incubator.object
39 }
40}
041
=== modified file 'src/SystemSettings/qmldir'
--- src/SystemSettings/qmldir 2015-11-18 14:11:45 +0000
+++ src/SystemSettings/qmldir 2017-01-12 12:47:26 +0000
@@ -2,3 +2,4 @@
22
3ItemPage 1.0 ItemPage.qml3ItemPage 1.0 ItemPage.qml
4SettingsItemTitle 1.0 SettingsItemTitle.qml4SettingsItemTitle 1.0 SettingsItemTitle.qml
5USSAdaptivePageLayout 1.0 USSAdaptivePageLayout.qml
56
=== modified file 'src/qml/CategorySection.qml'
--- src/qml/CategorySection.qml 2016-07-14 13:51:56 +0000
+++ src/qml/CategorySection.qml 2017-01-12 12:47:26 +0000
@@ -68,11 +68,23 @@
68 onClicked: {68 onClicked: {
69 var pageComponent = model.item.pageComponent69 var pageComponent = model.item.pageComponent
70 if (pageComponent) {70 if (pageComponent) {
71 pageStack.push(model.item.pageComponent,71 Haptics.play();
72 { plugin: model.item, pluginManager: pluginManager })72 loadPluginByName(model.item.baseName);
73 }73 }
74 }74 }
75 }75 }
76 Binding {
77 target: loader.item
78 property: "color"
79 value: theme.palette.highlighted.background
80 when: currentPlugin == model.item.baseName && apl.columns > 1
81 }
82 Binding {
83 target: loader.item
84 property: "color"
85 value: "transparent"
86 when: currentPlugin != model.item.baseName || apl.columns == 1
87 }
76 }88 }
77 }89 }
78 }90 }
7991
=== modified file 'src/qml/MainWindow.qml'
--- src/qml/MainWindow.qml 2016-12-01 13:50:03 +0000
+++ src/qml/MainWindow.qml 2017-01-12 12:47:26 +0000
@@ -25,13 +25,18 @@
2525
26MainView {26MainView {
27 id: main27 id: main
28 implicitWidth: units.gu(50)28 implicitWidth: units.gu(140)
29 implicitHeight: units.gu(90)29 implicitHeight: units.gu(90)
30 applicationName: "ubuntu-system-settings"30 applicationName: "ubuntu-system-settings"
31 objectName: "systemSettingsMainView"31 objectName: "systemSettingsMainView"
32 automaticOrientation: true32 automaticOrientation: true
33 anchorToKeyboard: true33 anchorToKeyboard: true
34 property var pluginManager: PluginManager {}34 property var pluginManager: PluginManager {}
35 property string currentPlugin: ""
36
37 /* Workaround for lp:1648801, i.e. APL does not support a placeholder,
38 so we implement it here. */
39 property string placeholderPlugin: "about"
3540
36 function loadPluginByName(pluginName, pluginOptions) {41 function loadPluginByName(pluginName, pluginOptions) {
37 var plugin = pluginManager.getByName(pluginName)42 var plugin = pluginManager.getByName(pluginName)
@@ -44,10 +49,18 @@
44 if (plugin) {49 if (plugin) {
45 // Got a valid plugin name - load it50 // Got a valid plugin name - load it
46 var pageComponent = plugin.pageComponent51 var pageComponent = plugin.pageComponent
52 var page;
47 if (pageComponent) {53 if (pageComponent) {
48 while (pageStack.depth > 1)54 apl.removePages(apl.primaryPage);
49 pageStack.pop()55 page = apl.addComponentToNextColumnSync(
50 pageStack.push(pageComponent, opts)56 apl.primaryPage, pageComponent, opts
57 );
58 currentPlugin = pluginName;
59 page.Component.destruction.connect(function () {
60 if (currentPlugin == this.baseName) {
61 currentPlugin = "";
62 }
63 }.bind(plugin))
51 }64 }
52 return true65 return true
53 } else {66 } else {
@@ -60,15 +73,31 @@
60 Component.onCompleted: {73 Component.onCompleted: {
61 i18n.domain = "ubuntu-system-settings"74 i18n.domain = "ubuntu-system-settings"
62 i18n.bindtextdomain("ubuntu-system-settings", i18nDirectory)75 i18n.bindtextdomain("ubuntu-system-settings", i18nDirectory)
63 pageStack.push(mainPage)76
64 if (defaultPlugin) {77 if (defaultPlugin) {
65 if (!loadPluginByName(defaultPlugin, pluginOptions))78 if (!loadPluginByName(defaultPlugin, pluginOptions))
66 Qt.quit()79 Qt.quit()
80 } else if (apl.columns > 1) {
81 loadPluginByName(placeholderPlugin);
82 aplConnections.target = apl;
67 }83 }
6884
69 // when running in windowed mode, constrain width85 // when running in windowed mode, constrain width
70 view.minimumWidth = Qt.binding( function() { return units.gu(40) } )86 view.minimumWidth = Qt.binding( function() { return units.gu(40) } )
71 view.maximumWidth = Qt.binding( function() { return units.gu(50) } )87 view.maximumWidth = Qt.binding( function() { return units.gu(140) } )
88 }
89
90 Connections {
91 id: aplConnections
92 ignoreUnknownSignals: true
93 onColumnsChanged: {
94 var columns = target.columns;
95 if (columns > 1 && !currentPlugin) {
96 loadPluginByName(placeholderPlugin);
97 } else if (columns == 1 && currentPlugin == placeholderPlugin) {
98 apl.removePages(apl.primaryPage);
99 }
100 }
72 }101 }
73102
74 Connections {103 Connections {
@@ -100,12 +129,34 @@
100 } else {129 } else {
101 loadPluginByName(panel)130 loadPluginByName(panel)
102 }131 }
103
104 }132 }
105 }133 }
106134
107 PageStack {135 USSAdaptivePageLayout {
108 id: pageStack136 id: apl
137 objectName: "apl"
138 anchors.fill: parent
139 primaryPage: mainPage
140 layouts: [
141 PageColumnsLayout {
142 when: width >= units.gu(90)
143 PageColumn {
144 minimumWidth: units.gu(40)
145 maximumWidth: units.gu(50)
146 preferredWidth: units.gu(50)
147 }
148 PageColumn {
149 fillWidth: true
150 }
151 },
152 PageColumnsLayout {
153 when: true
154 PageColumn {
155 fillWidth: true
156 minimumWidth: units.gu(40)
157 }
158 }
159 ]
109160
110 Page {161 Page {
111 id: mainPage162 id: mainPage
@@ -146,8 +197,7 @@
146 verticalCenter: parent.verticalCenter197 verticalCenter: parent.verticalCenter
147 }198 }
148 inputMethodHints: Qt.ImhNoPredictiveText199 inputMethodHints: Qt.ImhNoPredictiveText
149 onDisplayTextChanged:200 onDisplayTextChanged: pluginManager.filter = displayText
150 pluginManager.filter = displayText
151 placeholderText: i18n.tr("Search")201 placeholderText: i18n.tr("Search")
152 hasClearButton: false202 hasClearButton: false
153 }203 }
154204
=== modified file 'src/qml/UncategorizedItemsView.qml'
--- src/qml/UncategorizedItemsView.qml 2016-05-06 01:55:01 +0000
+++ src/qml/UncategorizedItemsView.qml 2017-01-12 12:47:26 +0000
@@ -33,7 +33,6 @@
3333
34 Repeater {34 Repeater {
35 id: repeater35 id: repeater
36
37 Column {36 Column {
38 anchors.left: parent.left37 anchors.left: parent.left
39 anchors.right: parent.right38 anchors.right: parent.right
@@ -51,12 +50,22 @@
51 var pageComponent = model.item.pageComponent50 var pageComponent = model.item.pageComponent
52 if (pageComponent) {51 if (pageComponent) {
53 Haptics.play();52 Haptics.play();
54 pageStack.push(model.item.pageComponent,53 loadPluginByName(model.item.baseName);
55 { plugin: model.item,
56 pluginManager: pluginManager })
57 }54 }
58 }55 }
59 }56 }
57 Binding {
58 target: loader.item
59 property: "color"
60 value: theme.palette.highlighted.background
61 when: currentPlugin == model.item.baseName && apl.columns > 1
62 }
63 Binding {
64 target: loader.item
65 property: "color"
66 value: "transparent"
67 when: currentPlugin != model.item.baseName || apl.columns == 1
68 }
60 }69 }
61 }70 }
62 }71 }
6372
=== modified file 'tests/autopilot/ubuntu_system_settings/tests/__init__.py'
--- tests/autopilot/ubuntu_system_settings/tests/__init__.py 2016-09-27 13:41:19 +0000
+++ tests/autopilot/ubuntu_system_settings/tests/__init__.py 2017-01-12 12:47:26 +0000
@@ -612,6 +612,7 @@
612class PhoneOfonoBaseTestCase(UbuntuSystemSettingsOfonoTestCase):612class PhoneOfonoBaseTestCase(UbuntuSystemSettingsOfonoTestCase):
613 def setUp(self):613 def setUp(self):
614 """ Go to Phone page """614 """ Go to Phone page """
615 self.useFixture(EnvironmentVariable("USS_SHOW_ALL_UI", "1"))
615 super(PhoneOfonoBaseTestCase, self).setUp()616 super(PhoneOfonoBaseTestCase, self).setUp()
616 self.phone_page = self.main_view.go_to_phone_page()617 self.phone_page = self.main_view.go_to_phone_page()
617618
618619
=== modified file 'tests/mocks/SystemSettings/MockPluginManager.cpp'
--- tests/mocks/SystemSettings/MockPluginManager.cpp 2016-12-01 13:50:03 +0000
+++ tests/mocks/SystemSettings/MockPluginManager.cpp 2017-01-12 12:47:26 +0000
@@ -18,20 +18,25 @@
1818
19#include "MockPluginManager.h"19#include "MockPluginManager.h"
2020
21#include <QDebug>
22#include <QQmlEngine>
23
21MockPluginManager::MockPluginManager(QObject *parent) : QObject(parent)24MockPluginManager::MockPluginManager(QObject *parent) : QObject(parent)
22{25{
23}26}
2427
25QObject* MockPluginManager::getByName(const QString &name) const28QObject* MockPluginManager::getByName(const QString &name) const
26{29{
27 Q_UNUSED(name);30 MockItem* p = m_plugins.value(name);
28 return nullptr;31 QQmlEngine::setObjectOwnership(p, QQmlEngine::CppOwnership);
32 return p;
29}33}
3034
31QAbstractItemModel* MockPluginManager::itemModel(const QString &category)35QAbstractItemModel* MockPluginManager::itemModel(const QString &category)
32{36{
33 Q_UNUSED(category);37 QAbstractItemModel* m = m_models.value(category);
34 return nullptr;38 QQmlEngine::setObjectOwnership(m, QQmlEngine::CppOwnership);
39 return m;
35}40}
3641
37void MockPluginManager::resetPlugins()42void MockPluginManager::resetPlugins()
@@ -48,3 +53,107 @@
48 m_filter = filter;53 m_filter = filter;
49 Q_EMIT filterChanged();54 Q_EMIT filterChanged();
50}55}
56
57void MockPluginManager::addPlugin(const QString &name, QQmlComponent *entry,
58 QQmlComponent *page, const QString &category)
59{
60 MockItemModel *model = nullptr;
61 if (m_models.contains(category)) {
62 model = (MockItemModel*) m_models.value(category);
63 } else {
64 model = new MockItemModel(this);
65 m_models.insert(category, model);
66 }
67
68 MockItem* item = new MockItem(this);
69 item->setBaseName(name);
70 item->setEntryComponent(entry);
71 item->setPageComponent(page);
72 model->addPlugin(item);
73 m_plugins.insert(name, item);
74}
75
76bool MockItem::visible() const
77{
78 return true;
79}
80
81QString MockItem::baseName() const
82{
83 return m_baseName;
84}
85
86void MockItem::setBaseName(const QString &baseName)
87{
88 m_baseName = baseName;
89}
90
91QQmlComponent* MockItem::entryComponent()
92{
93 QQmlEngine::setObjectOwnership(m_entry, QQmlEngine::CppOwnership);
94 return m_entry;
95}
96QQmlComponent* MockItem::pageComponent()
97{
98 QQmlEngine::setObjectOwnership(m_page, QQmlEngine::CppOwnership);
99 return m_page;
100}
101
102void MockItem::setEntryComponent(QQmlComponent* c)
103{
104 m_entry = c;
105}
106
107void MockItem::setPageComponent(QQmlComponent* c)
108{
109 m_page = c;
110}
111
112MockItemModel::MockItemModel(QObject *parent) : QAbstractListModel(parent)
113{
114}
115
116void MockItemModel::addPlugin(MockItem *plugin)
117{
118 int row = m_plugins.size();
119 beginInsertRows(QModelIndex(), row, row);
120 m_plugins.append(plugin);
121 endInsertRows();
122}
123
124int MockItemModel::rowCount(const QModelIndex &parent) const
125{
126 Q_UNUSED(parent);
127 return m_plugins.count();
128}
129
130QVariant MockItemModel::data(const QModelIndex &index, int role) const
131{
132 if (index.row() >= m_plugins.count()) return QVariant();
133
134 const MockItem *item = m_plugins.at(index.row());
135 QVariant ret;
136
137 switch (role) {
138 case Qt::DisplayRole:
139 ret = item->baseName();
140 break;
141 case ItemRole:
142 ret = QVariant::fromValue<QObject*>(const_cast<MockItem*>(item));
143 break;
144 }
145
146 return ret;
147}
148
149QHash<int, QByteArray> MockItemModel::roleNames() const
150{
151 static QHash<int,QByteArray> names;
152 if (Q_UNLIKELY(names.empty())) {
153 names[Qt::DisplayRole] = "displayName";
154 names[MockItemModel::ItemRole] = "item";
155 }
156 return names;
157}
158
159// Q_DECLARE_METATYPE(MockItem*)
51160
=== modified file 'tests/mocks/SystemSettings/MockPluginManager.h'
--- tests/mocks/SystemSettings/MockPluginManager.h 2016-12-01 13:50:03 +0000
+++ tests/mocks/SystemSettings/MockPluginManager.h 2017-01-12 12:47:26 +0000
@@ -22,7 +22,10 @@
22#include <QAbstractItemModel>22#include <QAbstractItemModel>
23#include <QObject>23#include <QObject>
24#include <QString>24#include <QString>
25#include <QQmlComponent>
2526
27class MockItem;
28class MockItemModel;
26class MockPluginManager : public QObject29class MockPluginManager : public QObject
27{30{
28 Q_OBJECT31 Q_OBJECT
@@ -39,12 +42,61 @@
39 void resetPlugins();42 void resetPlugins();
40 QString getFilter();43 QString getFilter();
41 void setFilter(const QString &filter);44 void setFilter(const QString &filter);
45 void addPlugin(const QString &name,
46 QQmlComponent *entry,
47 QQmlComponent *page,
48 const QString &category = "uncategorized-bottom");
4249
43Q_SIGNALS:50Q_SIGNALS:
44 void filterChanged();51 void filterChanged();
4552
46private:53private:
47 QString m_filter = QString::null;54 QString m_filter = QString::null;
55 QMap<QString, MockItemModel*> m_models;
56 QMap<QString, MockItem*> m_plugins;
57};
58
59class MockItem : public QObject
60{
61 Q_OBJECT
62 Q_PROPERTY(QQmlComponent *entryComponent READ entryComponent CONSTANT)
63 Q_PROPERTY(QQmlComponent *pageComponent READ pageComponent CONSTANT)
64 Q_PROPERTY(bool visible READ visible CONSTANT)
65 Q_PROPERTY(QString baseName READ baseName CONSTANT)
66public:
67 explicit MockItem(QObject *parent = 0) : QObject(parent) {};
68 ~MockItem() {};
69 QQmlComponent* entryComponent();
70 void setEntryComponent(QQmlComponent* c);
71 QQmlComponent* pageComponent();
72 void setPageComponent(QQmlComponent* c);
73 bool visible() const;
74 QString baseName() const;
75 void setBaseName(const QString &baseName);
76private:
77 QQmlComponent* m_entry;
78 QQmlComponent* m_page;
79 QString m_baseName;
80};
81
82class MockItemModel : public QAbstractListModel
83{
84 Q_OBJECT
85public:
86 explicit MockItemModel(QObject *parent = 0);
87 ~MockItemModel() {};
88
89 enum Roles {
90 IconRole = Qt::UserRole + 1,
91 ItemRole,
92 };
93 void addPlugin(MockItem *plugin);
94 int rowCount(const QModelIndex &parent = QModelIndex()) const;
95 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
96 QHash<int, QByteArray> roleNames() const;
97
98private:
99 QList<MockItem*> m_plugins;
48};100};
49101
50#endif // MOCK_PLUGIN_MANAGER_H102#endif // MOCK_PLUGIN_MANAGER_H
51103
=== modified file 'tests/mocks/SystemSettings/qmldir'
--- tests/mocks/SystemSettings/qmldir 2016-12-01 14:00:12 +0000
+++ tests/mocks/SystemSettings/qmldir 2017-01-12 12:47:26 +0000
@@ -3,6 +3,7 @@
33
4ItemPage 1.0 file://${CMAKE_SOURCE_DIR}/src/SystemSettings/ItemPage.qml4ItemPage 1.0 file://${CMAKE_SOURCE_DIR}/src/SystemSettings/ItemPage.qml
5SettingsItemTitle 1.0 file://${CMAKE_SOURCE_DIR}/src/SystemSettings/SettingsItemTitle.qml5SettingsItemTitle 1.0 file://${CMAKE_SOURCE_DIR}/src/SystemSettings/SettingsItemTitle.qml
6USSAdaptivePageLayout 1.0 file://${CMAKE_SOURCE_DIR}/src/SystemSettings/USSAdaptivePageLayout.qml
6CategorySection 1.0 file://${CMAKE_SOURCE_DIR}/src/qml/CategorySection.qml7CategorySection 1.0 file://${CMAKE_SOURCE_DIR}/src/qml/CategorySection.qml
7UncategorizedItemsView.qml 1.0 file://${CMAKE_SOURCE_DIR}/src/qml/UncategorizedItemsView.qml.qml8UncategorizedItemsView.qml 1.0 file://${CMAKE_SOURCE_DIR}/src/qml/UncategorizedItemsView.qml.qml
8MainWindow 1.0 file://${CMAKE_SOURCE_DIR}/src/qml/MainWindow.qml9MainWindow 1.0 file://${CMAKE_SOURCE_DIR}/src/qml/MainWindow.qml
910
=== modified file 'tests/plugins/main/tst_MainWindow.qml'
--- tests/plugins/main/tst_MainWindow.qml 2016-12-01 13:50:03 +0000
+++ tests/plugins/main/tst_MainWindow.qml 2017-01-12 12:47:26 +0000
@@ -19,6 +19,7 @@
19import QtQuick 2.419import QtQuick 2.4
20import QtTest 1.020import QtTest 1.0
21import SystemSettings 1.021import SystemSettings 1.0
22import SystemSettings.ListItems 1.0 as SettingsListItems
22import Ubuntu.Components 1.323import Ubuntu.Components 1.3
23import Ubuntu.Test 0.124import Ubuntu.Test 0.1
2425
@@ -35,6 +36,7 @@
3536
36 property string i18nDirectory: ""37 property string i18nDirectory: ""
37 property string defaultPlugin: ""38 property string defaultPlugin: ""
39 property var pluginOptions: ({})
38 property var view: ({40 property var view: ({
39 minimumWidth: 0,41 minimumWidth: 0,
40 maximumWidth: 0,42 maximumWidth: 0,
@@ -43,13 +45,23 @@
43 }45 }
4446
45 UbuntuTestCase {47 UbuntuTestCase {
46 name: "MainWindowTest"48 name: "DefaultPluginMainWindowTest"
49 when: windowShown
50
51 function test_default_plugin () {
52 mainWindowComponent.createObject(testRoot, {});
53 }
54 }
55
56 UbuntuTestCase {
57 name: "MainWindowTests"
47 when: windowShown58 when: windowShown
4859
49 property var instance60 property var instance
5061
51 function init() {62 function init() {
52 instance = mainWindowComponent.createObject(testRoot, {});63 instance = mainWindowComponent.createObject(testRoot, {});
64 waitForRendering(instance);
53 }65 }
5466
55 function cleanup() {67 function cleanup() {
@@ -74,4 +86,182 @@
74 compare(instance.pluginManager.filter, "");86 compare(instance.pluginManager.filter, "");
75 }87 }
76 }88 }
89
90 UbuntuTestCase {
91 name: "MainWindowAPLTests"
92 when: windowShown
93
94 Component {
95 id: testPersonalEntry
96 SettingsListItems.IconProgression {
97 objectName: "testPersonalEntry"
98 text: "Test"
99 iconName: "system-users-symbolic"
100 }
101 }
102
103 Component {
104 id: testUncategorizedEntry
105 SettingsListItems.IconProgression {
106 objectName: "testUncategorizedEntry"
107 text: "Test 2"
108 iconName: "phone-smartphone-symbolic"
109 }
110 }
111
112 Component {
113 id: testPageComponent
114 Page {
115 objectName: "testPage"
116 visible: false
117 property var plugin
118 property var pluginOptions
119 property var pluginManager
120 header: testHeader
121 PageHeader {
122 id: testHeader
123 title: i18n.tr("Test PageComponent")
124 flickable: testFlickable
125 }
126 Flickable {
127 id: testFlickable
128 anchors.fill: parent
129 contentHeight: contentItem.childrenRect.height
130 Column {
131 anchors.left: parent.left
132 anchors.right: parent.right
133
134 Label {
135 text: "Test Content"
136 }
137 }
138 }
139 }
140 }
141
142 Component {
143 id: pluginManagerComponent
144 PluginManager {}
145 }
146
147 function waitForPage(page) {
148 tryCompareFunction(function () {
149 return !!findChild(testRoot, page);
150 }, true);
151 return findChild(testRoot, page);
152 }
153
154 function waitForPageToGoAway(page) {
155 tryCompareFunction(function () {
156 var p = findChild(testRoot, page);
157 var visible = p && p.visible;
158 return !!(p && visible);
159 }, false);
160 }
161
162 property var instance
163 property var personalEntry
164 property var uncategorizedEntry
165 property var page
166 property var manager
167
168 function init() {
169 manager = pluginManagerComponent.createObject(testRoot);
170 personalEntry = testPersonalEntry;
171 uncategorizedEntry = testUncategorizedEntry;
172 page = testPageComponent;
173
174 manager.addPlugin("Test", personalEntry, page, "personal");
175 manager.addPlugin("Phone", uncategorizedEntry, page, "uncategorized-bottom");
176 }
177
178 function cleanup() {
179 instance && instance.destroy();
180 }
181
182 function test_go_to_panel_data() {
183 return [
184 { tag: "one column, categorized", width: units.gu(50), entry: "testPersonalEntry" },
185 { tag: "one column, uncategorized", width: units.gu(50), entry: "testUncategorizedEntry" },
186 { tag: "two column, categorized", width: units.gu(110), entry: "testPersonalEntry" },
187 { tag: "two column, uncategorized", width: units.gu(110), entry: "testUncategorizedEntry" },
188 ];
189 }
190
191 function test_go_to_panel(data) {
192 instance = mainWindowComponent.createObject(testRoot, {
193 pluginManager: manager
194 });
195 waitForRendering(instance);
196 testRoot.width = data.width;
197 var entry = findChild(instance, data.entry);
198 mouseClick(entry, entry.width / 2, entry.height / 2);
199 waitForPage("testPage");
200 var page = waitForPage("testPage");
201 tryCompare(page, "visible", true);
202 }
203
204 function test_default_plugin_data() {
205 return [
206 { tag: "no default", default: "", pageObjectName: "" },
207 { tag: "default", default: "Test", pageObjectName: "testPage" },
208 ];
209 }
210
211 function test_default_plugin(data) {
212 instance = mainWindowComponent.createObject(testRoot, {
213 pluginManager: manager, defaultPlugin: data.default
214 });
215 waitForRendering(instance);
216 if (data.pageObjectName) {
217 var page = waitForPage(data.pageObjectName);
218 tryCompare(page, "visible", true);
219 }
220 }
221
222 function test_placeholder_plugin_created_and_destroyed() {
223 instance = mainWindowComponent.createObject(testRoot, {
224 pluginManager: manager, defaultPlugin: data.default,
225 placeholderPlugin: "Test"
226 });
227 waitForRendering(instance);
228 waitForPage("testPage");
229 testRoot.width = units.gu(50);
230 waitForPageToGoAway("testPage");
231 }
232
233 function test_current_plugin_property() {
234 var apl;
235 var entry;
236
237 instance = mainWindowComponent.createObject(testRoot, {
238 pluginManager: manager
239 });
240 waitForRendering(instance);
241 apl = findInvisibleChild(instance, "apl");
242
243 // Base case
244 compare(instance.currentPlugin, "");
245
246 // Push a page
247 instance.loadPluginByName("Test");
248 tryCompare(instance, "currentPlugin", "Test");
249
250 // Pop a page
251 apl.removePages(apl.primaryPage);
252 tryCompare(instance, "currentPlugin", "");
253 }
254
255 // Seems this is how Unity8 is resizing a window to its previous size.
256 function test_placeholder_plugin_is_not_initially_shown_on_narrow() {
257 testRoot.width = units.gu(150);
258 instance = mainWindowComponent.createObject(testRoot, {
259 pluginManager: manager, defaultPlugin: data.default,
260 placeholderPlugin: "Test"
261 });
262 testRoot.width = units.gu(50);
263 waitForRendering(instance);
264 waitForPageToGoAway("testPage");
265 }
266 }
77}267}

Subscribers

People subscribed via source and target branches