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
1=== modified file 'debian/control'
2--- debian/control 2016-11-29 11:11:21 +0000
3+++ debian/control 2017-01-12 12:47:26 +0000
4@@ -95,7 +95,7 @@
5 qml-module-ofono (>=0.90~),
6 qml-module-qtsysteminfo,
7 qtdeclarative5-ubuntu-content1,
8- qtdeclarative5-ubuntu-settings-components (>= 0.11),
9+ qtdeclarative5-ubuntu-settings-components (>= 0.12),
10 qml-module-ubuntu-components (>= 1.3.1584) | qml-module-ubuntu-components-gles (>= 1.3.1584),
11 suru-icon-theme (>= 14.04+15.04.20150813~),
12 whoopsie-preferences (>= 0.9),
13
14=== modified file 'plugins/about/DevMode.qml'
15--- plugins/about/DevMode.qml 2016-02-04 15:28:51 +0000
16+++ plugins/about/DevMode.qml 2017-01-12 12:47:26 +0000
17@@ -115,7 +115,9 @@
18 objectName: "lockSecurityItem"
19 text: i18n.tr("Lock security")
20 progression: true
21- onClicked: pageStack.push(Qt.resolvedUrl("../security-privacy/LockSecurity.qml"))
22+ onClicked: pageStack.addPageToNextColumn(
23+ devModePage, Qt.resolvedUrl("../security-privacy/LockSecurity.qml")
24+ )
25 }
26 }
27 }
28
29=== modified file 'plugins/about/PageComponent.qml'
30--- plugins/about/PageComponent.qml 2016-11-29 11:12:13 +0000
31+++ plugins/about/PageComponent.qml 2017-01-12 12:47:26 +0000
32@@ -150,7 +150,7 @@
33 text: i18n.tr("Storage")
34 /* TRANSLATORS: that's the free disk space, indicated in the most appropriate storage unit */
35 value: i18n.tr("%1 free").arg(Utilities.formatSize(backendInfos.getFreeSpace("/home")))
36- onClicked: pageStack.push(Qt.resolvedUrl("Storage.qml"))
37+ onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("Storage.qml"))
38 }
39
40 SettingsItemTitle {
41@@ -173,7 +173,7 @@
42 value: "Ubuntu %1%2"
43 .arg(deviceInfos.version(DeviceInfo.Os))
44 .arg(versionIdentifier ? " (%1)".arg(versionIdentifier) : "")
45- onClicked: pageStack.push(Qt.resolvedUrl("Version.qml"), {
46+ onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("Version.qml"), {
47 version: versionIdentifier
48 })
49 }
50@@ -199,7 +199,7 @@
51 var updatePage = upPlugin.pageComponent
52 var updatePageItem;
53 if (updatePage) {
54- updatePageItem = pageStack.push(updatePage, {
55+ updatePageItem = pageStack.addPageToNextColumn(root, updatePage, {
56 plugin: upPlugin, pluginManager: pluginManager
57 });
58 updatePageItem.check(true); // Force a check.
59@@ -222,7 +222,7 @@
60 SettingsListItems.StandardProgression {
61 objectName: "licenseItem"
62 text: i18n.tr("Software licenses")
63- onClicked: pageStack.push(Qt.resolvedUrl("Software.qml"))
64+ onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("Software.qml"))
65 }
66
67 SettingsListItems.StandardProgression {
68@@ -230,14 +230,14 @@
69 pluginManager.getByName("regulatory-information")
70 text: i18n.tr("Regulatory info")
71 visible: regulatoryInfo
72- onClicked: pageStack.push(regulatoryInfo.pageComponent)
73+ onClicked: pageStack.addPageToNextColumn(root, regulatoryInfo.pageComponent)
74 }
75
76 SettingsListItems.SingleValueProgression {
77 objectName: "devmodeItem"
78 text: i18n.tr("Developer mode")
79 visible: !isSnap && backendInfos.developerModeCapable || showAllUI
80- onClicked: pageStack.push(Qt.resolvedUrl("DevMode.qml"))
81+ onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("DevMode.qml"))
82 }
83 }
84 }
85
86=== modified file 'plugins/about/Software.qml'
87--- plugins/about/Software.qml 2016-11-28 13:27:33 +0000
88+++ plugins/about/Software.qml 2017-01-12 12:47:26 +0000
89@@ -30,7 +30,9 @@
90 delegate: ListItem.Standard {
91 text: fileName
92 progression: true
93- onClicked: pageStack.push(Qt.resolvedUrl("License.qml"), {binary: fileName})
94+ onClicked: pageStack.addPageToNextColumn(
95+ licensesPage, Qt.resolvedUrl("License.qml"), {binary: fileName}
96+ )
97 }
98
99 }
100
101=== modified file 'plugins/about/Storage.qml'
102--- plugins/about/Storage.qml 2016-03-29 15:49:29 +0000
103+++ plugins/about/Storage.qml 2017-01-12 12:47:26 +0000
104@@ -53,11 +53,6 @@
105 Loader {
106 id: pageLoader
107 anchors.fill: parent
108- onStateChanged: {
109- if (state === Loader.Ready)
110- storagePage.flickable = scrollWidget;
111- }
112-
113 asynchronous: true
114 visible: status == Loader.Ready
115 sourceComponent: Item {
116@@ -151,6 +146,8 @@
117 anchors.fill: parent
118 contentHeight: columnId.height
119
120+ Component.onCompleted: storagePage.flickable = scrollWidget
121+
122 Column {
123 id: columnId
124 anchors.left: parent.left
125
126=== modified file 'plugins/background/MainPage.qml'
127--- plugins/background/MainPage.qml 2016-09-26 20:00:30 +0000
128+++ plugins/background/MainPage.qml 2017-01-12 12:47:26 +0000
129@@ -40,13 +40,18 @@
130
131 property var activeTransfer
132
133+ function preview(props) {
134+ var page = pageStack.addFileToNextColumnSync(
135+ mainPage, Qt.resolvedUrl("Preview.qml"), props
136+ );
137+ selectedItemConnection.target = page;
138+ }
139+
140 // Action to import image
141 Action {
142 id: selectPeer
143 // when action has been activated, push the picker on the stack
144- onTriggered: {
145- pageStack.push(picker);
146- }
147+ onTriggered: pageStack.addPageToNextColumn(mainPage, picker)
148 }
149
150 // qml bindings for background stuff
151@@ -81,10 +86,7 @@
152 backgroundPanel: backgroundPanel
153 title: i18n.tr("Ubuntu Art")
154 current: welcomeBackground
155- onSelected: {
156- pageStack.push(Qt.resolvedUrl("Preview.qml"), {uri: uri});
157- selectedItemConnection.target = pageStack.currentPage;
158- }
159+ onSelected: preview({ uri: uri })
160 }
161
162 WallpaperGrid {
163@@ -99,10 +101,7 @@
164 current: welcomeBackground
165 editable: true
166 isCustom: true
167- onSelected: {
168- pageStack.push(Qt.resolvedUrl("Preview.qml"), {uri: uri});
169- selectedItemConnection.target = pageStack.currentPage
170- }
171+ onSelected: preview({ uri: uri })
172 }
173
174 ListItem.ThinDivider {}
175@@ -172,7 +171,7 @@
176 contentType: ContentType.Pictures
177
178 onPeerSelected: {
179- pageStack.pop();
180+ pageStack.removePages(picker);
181 // requests an active transfer from peer
182 function startContentTransfer(callback) {
183 if (callback)
184@@ -186,15 +185,11 @@
185 // when peer has been selected, request a transfer, providing
186 // a callback that pushes the preview stack
187 startContentTransfer(function(uri) {
188- pageStack.push(Qt.resolvedUrl("Preview.qml"), {
189- uri: uri, imported: true
190- });
191- // set Connection target
192- selectedItemConnection.target = pageStack.currentPage;
193+ preview({ uri: uri, imported: true });
194 });
195 }
196
197- onCancelPressed: pageStack.pop();
198+ onCancelPressed: pageStack.removePages(picker)
199 }
200 }
201
202
203=== modified file 'plugins/background/Preview.qml'
204--- plugins/background/Preview.qml 2016-09-12 15:32:45 +0000
205+++ plugins/background/Preview.qml 2017-01-12 12:47:26 +0000
206@@ -52,7 +52,7 @@
207 StateChangeScript {
208 script: {
209 save();
210- pageStack.pop();
211+ pageStack.removePages(preview);
212 }
213 }
214 },
215@@ -60,7 +60,7 @@
216 name: "cancelled"
217 StateChangeScript {
218 script: {
219- pageStack.pop();
220+ pageStack.removePages(preview);
221 }
222 }
223 }
224
225=== modified file 'plugins/battery/PageComponent.qml'
226--- plugins/battery/PageComponent.qml 2016-11-21 14:47:12 +0000
227+++ plugins/battery/PageComponent.qml 2017-01-12 12:47:26 +0000
228@@ -297,9 +297,9 @@
229 onClicked: {
230 var brightnessPlugin = pluginManager.getByName("brightness");
231 if (brightnessPlugin) {
232- pageStack.push(brightnessPlugin.pageComponent, {
233- plugin: brightnessPlugin, pluginManager: pluginManager
234- });
235+ pageStack.addPageToNextColumn(root,
236+ brightnessPlugin.pageComponent, {
237+ plugin: brightnessPlugin, pluginManager: pluginManager});
238 } else {
239 console.warn("Failed to get brightness plugin instance");
240 }
241@@ -344,9 +344,9 @@
242 SlotsLayout.position: SlotsLayout.First
243 }
244
245- onClicked: pageStack.push(
246- Qt.resolvedUrl("SleepValues.qml"),
247- { title: text, lockOnSuspend: lockOnSuspend })
248+ onClicked: pageStack.addPageToNextColumn(root,
249+ Qt.resolvedUrl("SleepValues.qml"),{
250+ title: text, lockOnSuspend: lockOnSuspend })
251 visible: !isSnap || showAllUI
252 }
253
254
255=== modified file 'plugins/bluetooth/DevicePage.qml'
256--- plugins/bluetooth/DevicePage.qml 2016-07-14 13:51:56 +0000
257+++ plugins/bluetooth/DevicePage.qml 2017-01-12 12:47:26 +0000
258@@ -74,14 +74,19 @@
259 }
260 }
261
262- title: backend.selectedDevice ?
263- backend.selectedDevice.name.length > 0 ?
264- backend.selectedDevice.name :
265- backend.selectedDevice.address
266- : i18n.tr("None")
267+ header: PageHeader {
268+ title: backend.selectedDevice ?
269+ backend.selectedDevice.name.length > 0 ?
270+ backend.selectedDevice.name :
271+ backend.selectedDevice.address
272+ : i18n.tr("None")
273+ flickable: scrollWidget
274+ }
275+
276 visible: false
277
278 Flickable {
279+ id: scrollWidget
280 anchors.fill: parent
281 contentHeight: contentItem.childrenRect.height
282 boundsBehavior: (contentHeight > root.height) ?
283@@ -153,7 +158,7 @@
284 }
285
286 backend.resetSelectedDevice();
287- pageStack.pop();
288+ pageStack.removePages(connectedDevicePage);
289 }
290 visible: backend.selectedDevice ? true : false
291 enabled: backend.selectedDevice && backend.powered ? true : false
292@@ -168,7 +173,7 @@
293 onClicked: {
294 backend.removeDevice();
295 backend.resetSelectedDevice();
296- pageStack.pop();
297+ pageStack.removePages(connectedDevicePage);
298 }
299 enabled: backend.powered && backend.selectedDevice && backend.selectedDevice.path.length > 0 && backend.selectedDevice.paired ? true : false
300 }
301
302=== modified file 'plugins/bluetooth/PageComponent.qml'
303--- plugins/bluetooth/PageComponent.qml 2016-07-14 13:51:56 +0000
304+++ plugins/bluetooth/PageComponent.qml 2017-01-12 12:47:26 +0000
305@@ -31,6 +31,7 @@
306 ItemPage {
307 id: root
308 title: i18n.tr("Bluetooth")
309+ flickable: scrollWidget
310 objectName: "bluetoothPage"
311
312 property var dialogPopupId
313@@ -205,6 +206,7 @@
314 }
315
316 Flickable {
317+ id: scrollWidget
318 anchors.fill: parent
319 contentHeight: contentItem.childrenRect.height
320 boundsBehavior: (contentHeight > root.height) ?
321@@ -299,7 +301,9 @@
322 }
323 onClicked: {
324 backend.setSelectedDevice(addressName);
325- pageStack.push(Qt.resolvedUrl("DevicePage.qml"), {backend: backend, root: root});
326+ pageStack.addPageToNextColumn(root,
327+ Qt.resolvedUrl("DevicePage.qml"),
328+ {backend: backend, root: root});
329 }
330 }
331 }
332@@ -341,7 +345,9 @@
333 text: getDisplayName(type, displayName)
334 onClicked: {
335 backend.setSelectedDevice(addressName);
336- pageStack.push(Qt.resolvedUrl("DevicePage.qml"), {backend: backend, root: root});
337+ pageStack.addPageToNextColumn(root,
338+ Qt.resolvedUrl("DevicePage.qml"),
339+ {backend: backend, root: root});
340 }
341 }
342 }
343@@ -375,7 +381,9 @@
344 text: getDisplayName(type, displayName)
345 onClicked: {
346 backend.setSelectedDevice(addressName);
347- pageStack.push(Qt.resolvedUrl("DevicePage.qml"), {backend: backend, root: root});
348+ pageStack.addPageToNextColumn(root,
349+ Qt.resolvedUrl("DevicePage.qml"),
350+ {backend: backend, root: root});
351 }
352 }
353 }
354
355=== modified file 'plugins/brightness/PageComponent.qml'
356--- plugins/brightness/PageComponent.qml 2016-07-06 15:38:55 +0000
357+++ plugins/brightness/PageComponent.qml 2017-01-12 12:47:26 +0000
358@@ -43,7 +43,7 @@
359 AethercastDisplays {
360 id: aethercastDisplays
361 onEnabledChanged: {
362- /* This is a hack to ensure the aethercast enabled switch stays
363+ /* This is a hack to ensure the aethercast enabled switch stays
364 * in sync with the enabled property
365 */
366 enabledCheck.serverChecked = enabled;
367@@ -158,7 +158,8 @@
368 text: i18n.tr("Wireless display")
369 value: aethercastDisplays.state === "connected" ? i18n.tr("Connected") : i18n.tr("Not connected")
370 progression: true
371- onClicked: pageStack.push(Qt.resolvedUrl("WifiDisplays.qml"))
372+ onClicked: pageStack.addPageToNextColumn(
373+ root, Qt.resolvedUrl("WifiDisplays.qml"))
374 }
375 }
376 }
377
378=== modified file 'plugins/brightness/WifiDisplays.qml'
379--- plugins/brightness/WifiDisplays.qml 2016-07-14 08:31:08 +0000
380+++ plugins/brightness/WifiDisplays.qml 2017-01-12 12:47:26 +0000
381@@ -25,6 +25,7 @@
382 id: wifiDisplays
383 objectName: "wifiDisplays"
384 title: i18n.tr("Wireless Display")
385+ flickable: pageFlickable
386
387 Component.onCompleted: {
388 if (!displays.scanning)
389
390=== modified file 'plugins/cellular/Components/MultiSim.qml'
391--- plugins/cellular/Components/MultiSim.qml 2016-07-30 01:55:39 +0000
392+++ plugins/cellular/Components/MultiSim.qml 2017-01-12 12:47:26 +0000
393@@ -26,8 +26,8 @@
394 import Ubuntu.Components.ListItems 1.3 as ListItems
395
396 Column {
397+ id: multiSim
398 objectName: "multiSim"
399-
400 property var sims
401 property var poweredSim: {
402 var s = null;
403@@ -63,9 +63,8 @@
404 progressionVisible: enabled
405 showDivider: false
406 onClicked: {
407- pageStack.push(Qt.resolvedUrl("../PageCarriersAndApns.qml"), {
408- sims: sims
409- });
410+ pageStack.addPageToNextColumn(multiSim,
411+ Qt.resolvedUrl("../PageCarriersAndApns.qml"), { sims: sims });
412 }
413 }
414
415
416=== modified file 'plugins/cellular/Components/SingleSim.qml'
417--- plugins/cellular/Components/SingleSim.qml 2016-07-14 13:51:56 +0000
418+++ plugins/cellular/Components/SingleSim.qml 2017-01-12 12:47:26 +0000
419@@ -111,9 +111,8 @@
420 id: chooseCarrier
421 objectName: "carrierApnEntry"
422 value: sim.netReg.name || ""
423- onClicked: pageStack.push(Qt.resolvedUrl("../PageCarrierAndApn.qml"), {
424- sim: sim
425- })
426+ onClicked: pageStack.addPageToNextColumn(singlesim,
427+ Qt.resolvedUrl("../PageCarrierAndApn.qml"), { sim: sim })
428 }
429
430 RadioSingleSim {
431
432=== modified file 'plugins/cellular/PageApnEditor.qml'
433--- plugins/cellular/PageApnEditor.qml 2016-04-01 15:13:06 +0000
434+++ plugins/cellular/PageApnEditor.qml 2017-01-12 12:47:26 +0000
435@@ -67,7 +67,7 @@
436 signal canceled ()
437
438 title: contextQML ? i18n.tr("Edit") : i18n.tr("New APN")
439-
440+ flickable: scrollArea
441 state: "default"
442 states: [
443 PageHeadState {
444@@ -124,7 +124,6 @@
445 value: false
446 }
447
448- flickable: null
449 Flickable {
450 id: scrollArea
451 objectName: "scrollArea"
452
453=== modified file 'plugins/cellular/PageCarrierAndApn.qml'
454--- plugins/cellular/PageCarrierAndApn.qml 2016-07-14 13:51:56 +0000
455+++ plugins/cellular/PageCarrierAndApn.qml 2017-01-12 12:47:26 +0000
456@@ -26,11 +26,12 @@
457 id: root
458 title: i18n.tr("Carrier & APN")
459 objectName: "carrierApnPage"
460- flickable: null
461+ flickable: scrollWidget
462
463 property var sim
464
465 Flickable {
466+ id: scrollWidget
467 anchors.fill: parent
468 contentWidth: parent.width
469 contentHeight: contentItem.childrenRect.height
470@@ -47,7 +48,8 @@
471 enabled: (sim.netReg.status !== "") &&
472 (sim.netReg.mode !== "auto-only")
473 progressionVisible: enabled
474- onClicked: pageStack.push(Qt.resolvedUrl("PageChooseCarrier.qml"), {
475+ onClicked: pageStack.addPageToNextColumn(root,
476+ Qt.resolvedUrl("PageChooseCarrier.qml"), {
477 sim: sim,
478 title: i18n.tr("Carrier")
479 })
480@@ -57,7 +59,8 @@
481 text: i18n.tr("APN")
482 objectName: "apn"
483 progressionVisible: enabled
484- onClicked: pageStack.push(Qt.resolvedUrl("PageChooseApn.qml"), {
485+ onClicked: pageStack.addPageToNextColumn(root,
486+ Qt.resolvedUrl("PageChooseApn.qml"), {
487 sim: sim
488 })
489 }
490
491=== modified file 'plugins/cellular/PageCarriersAndApns.qml'
492--- plugins/cellular/PageCarriersAndApns.qml 2016-07-14 13:51:56 +0000
493+++ plugins/cellular/PageCarriersAndApns.qml 2017-01-12 12:47:26 +0000
494@@ -26,11 +26,12 @@
495 id: root
496 title: i18n.tr("Carriers & APNs")
497 objectName: "carrierApnPage"
498- flickable: null
499+ flickable: scrollWidget
500
501 property var sims
502
503 Flickable {
504+ id: scrollWidget
505 anchors.fill: parent
506 contentWidth: parent.width
507 contentHeight: contentItem.childrenRect.height
508@@ -59,7 +60,8 @@
509 enabled: (sims[index].netReg.status !== "") &&
510 (sims[index].netReg.mode !== "auto-only")
511 progressionVisible: enabled
512- onClicked: pageStack.push(Qt.resolvedUrl("PageChooseCarrier.qml"), {
513+ onClicked: pageStack.addPageToNextColumn(root,
514+ Qt.resolvedUrl("PageChooseCarrier.qml"), {
515 sim: sims[index],
516 title: sims[index].title
517 })
518@@ -68,7 +70,8 @@
519 SettingsListItems.StandardProgression {
520 text: i18n.tr("APN")
521 progressionVisible: enabled
522- onClicked: pageStack.push(Qt.resolvedUrl("PageChooseApn.qml"), {
523+ onClicked: pageStack.addPageToNextColumn(root,
524+ Qt.resolvedUrl("PageChooseApn.qml"), {
525 sim: sims[index]
526 })
527 }
528
529=== modified file 'plugins/cellular/PageChooseApn.qml'
530--- plugins/cellular/PageChooseApn.qml 2016-07-14 13:51:56 +0000
531+++ plugins/cellular/PageChooseApn.qml 2017-01-12 12:47:26 +0000
532@@ -35,6 +35,7 @@
533 ItemPage {
534 id: root
535 title: i18n.tr("APN")
536+ flickable: scrollWidget
537 objectName: "apnPage"
538
539 property var sim
540@@ -106,11 +107,13 @@
541 iconName: "add"
542 objectName: "newApn"
543 onTriggered: {
544- editor = pageStack.push(pageApnEditor, {
545- mmsModel: mmsContexts,
546- internetModel: internetContexts,
547- iaModel: iaContexts
548- });
549+ editor = pageStack.addPageToNextColumn(root,
550+ pageApnEditor, {
551+ mmsModel: mmsContexts,
552+ internetModel: internetContexts,
553+ iaModel: iaContexts
554+ }
555+ );
556 }
557 }
558 ]
559@@ -306,7 +309,7 @@
560 }
561
562 onClicked: {
563- editor = pageStack.push(pageApnEditor, {
564+ editor = pageStack.addPageToNextColumn(root, pageApnEditor, {
565 contextQML: qml,
566 mmsModel: mmsContexts,
567 internetModel: internetContexts,
568
569=== modified file 'plugins/cellular/PageChooseCarrier.qml'
570--- plugins/cellular/PageChooseCarrier.qml 2015-11-13 13:37:40 +0000
571+++ plugins/cellular/PageChooseCarrier.qml 2017-01-12 12:47:26 +0000
572@@ -31,7 +31,7 @@
573 id: root
574 title: i18n.tr("Carrier")
575 objectName: "chooseCarrierPage"
576- flickable: null
577+ flickable: scrollWidget
578
579 property var sim
580 property bool scanning: true
581
582=== modified file 'plugins/cellular/PageComponent.qml'
583--- plugins/cellular/PageComponent.qml 2016-07-14 13:51:56 +0000
584+++ plugins/cellular/PageComponent.qml 2017-01-12 12:47:26 +0000
585@@ -30,6 +30,7 @@
586 ItemPage {
587 id: root
588 title: i18n.tr("Cellular")
589+ flickable: flick
590 objectName: "cellularPage"
591
592 property var modemsSorted: []
593
594=== modified file 'plugins/hotspot/PageComponent.qml'
595--- plugins/hotspot/PageComponent.qml 2016-08-17 12:39:39 +0000
596+++ plugins/hotspot/PageComponent.qml 2017-01-12 12:47:26 +0000
597@@ -31,6 +31,7 @@
598 id: root
599 objectName: "hotspotPage"
600 title: i18n.tr("Hotspot")
601+ flickable: flick
602
603 states: [
604 State {
605
606=== modified file 'plugins/language/KeyboardLayouts.qml'
607--- plugins/language/KeyboardLayouts.qml 2016-01-27 15:32:11 +0000
608+++ plugins/language/KeyboardLayouts.qml 2017-01-12 12:47:26 +0000
609@@ -27,6 +27,7 @@
610 ItemPage {
611 id: root
612 title: i18n.tr("Keyboard layouts")
613+ flickable: subsetView
614
615 property var plugin
616 property bool currentLayoutsDraggable: false
617
618=== modified file 'plugins/language/PageComponent.qml'
619--- plugins/language/PageComponent.qml 2017-01-12 12:47:26 +0000
620+++ plugins/language/PageComponent.qml 2017-01-12 12:47:26 +0000
621@@ -34,6 +34,7 @@
622 objectName: "languagePage"
623
624 title: i18n.tr("Language & Text")
625+ flickable: scrollWidget
626
627 InputDeviceManager {
628 id: keyboardsModel
629@@ -42,30 +43,16 @@
630
631 property bool externalKeyboardPresent: keyboardsModel.count > 0
632
633- property var pluginOptions
634- Connections {
635- target: pageStack
636- onCurrentPageChanged: {
637- // If we are called with subpage=foo, push foo on the stack.
638- //
639- // We need to wait until the PageComponent has been pushed to the stack
640- // before pushing the subpages, otherwise they will be pushed below the
641- // PageComponent.
642- if (pageStack.currentPage === root) {
643- if (pluginOptions && pluginOptions['subpage']) {
644- switch (pluginOptions['subpage']) {
645- case 'hw-keyboard-layouts':
646- pageStack.push(Qt.resolvedUrl("KeyboardLayouts.qml"), {
647- plugin: hwKeyboardPlugin,
648- currentLayoutsDraggable: true
649- })
650- break;
651- }
652- }
653-
654- // Once done, disable this Connections, so that if the user navigates
655- // back to the root we won't push the subpages again
656- target = null
657+ onPushedOntoStack: {
658+ if (pluginOptions && pluginOptions['subpage']) {
659+ switch (pluginOptions['subpage']) {
660+ case 'hw-keyboard-layouts':
661+ pageStack.addPageToNextColumn(
662+ root, Qt.resolvedUrl('KeyboardLayouts.qml'), {
663+ plugin: hwKeyboardPlugin,
664+ currentLayoutsDraggable: true
665+ });
666+ break;
667 }
668 }
669 }
670@@ -122,6 +109,7 @@
671 }
672
673 Flickable {
674+ id: scrollWidget
675 anchors.fill: parent
676 contentHeight: contentItem.childrenRect.height
677 boundsBehavior: contentHeight > root.height ?
678@@ -159,7 +147,7 @@
679 value: oskPlugin.keyboardLayoutsModel.subset.length == 1 ?
680 oskPlugin.keyboardLayoutsModel.superset[oskPlugin.keyboardLayoutsModel.subset[0]][0] :
681 oskPlugin.keyboardLayoutsModel.subset.length
682- onClicked: pageStack.push(Qt.resolvedUrl("KeyboardLayouts.qml"), {
683+ onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("KeyboardLayouts.qml"), {
684 plugin: oskPlugin
685 })
686 }
687@@ -168,7 +156,7 @@
688 text: i18n.tr("External keyboard")
689 progression: true
690 showDivider: false
691- onClicked: pageStack.push(Qt.resolvedUrl("PageHardwareKeyboard.qml"))
692+ onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("PageHardwareKeyboard.qml"))
693 visible: externalKeyboardPresent || showAllUI
694 }
695
696@@ -183,7 +171,7 @@
697 plugin.spellCheckingModel.subset.length
698 progression: true
699
700- onClicked: pageStack.push(spellChecking)
701+ onClicked: pageStack.addPageToNextColumn(root, spellChecking)
702 }
703
704 ListItem.Standard {
705
706=== modified file 'plugins/language/PageHardwareKeyboard.qml'
707--- plugins/language/PageHardwareKeyboard.qml 2016-11-15 13:19:23 +0000
708+++ plugins/language/PageHardwareKeyboard.qml 2017-01-12 12:47:26 +0000
709@@ -31,6 +31,7 @@
710 objectName: "hwKbdPage"
711
712 title: i18n.tr("Hardware keyboard")
713+ flickable: scrollWidget
714
715 Component {
716 id: keyboardLayouts
717@@ -43,6 +44,7 @@
718 }
719
720 Flickable {
721+ id: scrollWidget
722 anchors.fill: parent
723 contentHeight: contentItem.childrenRect.height
724 boundsBehavior: contentHeight > root.height ?
725@@ -64,10 +66,12 @@
726 plugin.keyboardLayoutsModel.subset.length
727 progression: true
728
729- onClicked: pageStack.push(Qt.resolvedUrl("KeyboardLayouts.qml"), {
730- plugin: plugin,
731- currentLayoutsDraggable: true
732- })
733+ onClicked: pageStack.addPageToNextColumn(root,
734+ Qt.resolvedUrl("KeyboardLayouts.qml"), {
735+ plugin: plugin,
736+ currentLayoutsDraggable: true
737+ }
738+ )
739 }
740 }
741 }
742
743=== modified file 'plugins/language/SpellChecking.qml'
744--- plugins/language/SpellChecking.qml 2016-07-12 16:40:18 +0000
745+++ plugins/language/SpellChecking.qml 2017-01-12 12:47:26 +0000
746@@ -27,6 +27,7 @@
747
748 ItemPage {
749 title: i18n.tr("Spell checking")
750+ flickable: scrollWidget
751
752 UbuntuLanguagePlugin {
753 id: plugin
754@@ -52,6 +53,7 @@
755 }
756
757 SubsetView {
758+ id: scrollWidget
759 clip: true
760
761 anchors.top: item.bottom
762
763=== modified file 'plugins/launcher/PageComponent.qml'
764--- plugins/launcher/PageComponent.qml 2016-11-16 17:06:51 +0000
765+++ plugins/launcher/PageComponent.qml 2017-01-12 12:47:26 +0000
766@@ -29,6 +29,7 @@
767 id: root
768 objectName: "launcherPage"
769 title: i18n.tr("Launcher")
770+ flickable: flick
771
772 /* The introductory label “On large displays:” should be present if the
773 current display does not fall into <the large screen> category (to explain
774
775=== modified file 'plugins/notifications/PageComponent.qml'
776--- plugins/notifications/PageComponent.qml 2016-07-08 22:13:26 +0000
777+++ plugins/notifications/PageComponent.qml 2017-01-12 12:47:26 +0000
778@@ -27,6 +27,7 @@
779 objectName: "systemNotificationsPage"
780
781 title: i18n.tr("Notifications")
782+ flickable: notificationsList
783
784 onActiveChanged: {
785 if (active) {
786@@ -66,7 +67,7 @@
787 left: parent.left
788 right: parent.right
789 }
790-
791+
792 ListItems.Base {
793 height: labelSubtitle.height + units.gu(2)
794 Label {
795@@ -105,8 +106,9 @@
796 return
797 }
798
799- pageStack.push(Qt.resolvedUrl("ClickAppsSoundsNotify.qml"),
800- { model: clickAppsSoundsNotifyModel })
801+ pageStack.addPageToNextColumn(
802+ root, Qt.resolvedUrl("ClickAppsSoundsNotify.qml"),
803+ { model: clickAppsSoundsNotifyModel })
804 }
805 }
806
807@@ -130,8 +132,9 @@
808 return
809 }
810
811- pageStack.push(Qt.resolvedUrl("ClickAppsVibrationsNotify.qml"),
812- { model: clickAppsVibrationsNotifyModel })
813+ pageStack.addPageToNextColumn(
814+ root, Qt.resolvedUrl("ClickAppsVibrationsNotify.qml"),
815+ { model: clickAppsVibrationsNotifyModel })
816 }
817 }
818
819@@ -147,9 +150,9 @@
820 delegate: ListItem {
821 height: layout.height + (divider.visible ? divider.height : 0)
822
823- onClicked: pageStack.push(Qt.resolvedUrl("ClickAppNotifications.qml"),
824- { entry: model,
825- entryIndex: index })
826+ onClicked: pageStack.addPageToNextColumn(
827+ root, Qt.resolvedUrl("ClickAppNotifications.qml"),
828+ { entry: model, entryIndex: index })
829
830 ListItemLayout {
831 id: layout
832
833=== modified file 'plugins/phone/CallForwarding.qml'
834--- plugins/phone/CallForwarding.qml 2016-07-14 13:51:56 +0000
835+++ plugins/phone/CallForwarding.qml 2017-01-12 12:47:26 +0000
836@@ -100,7 +100,7 @@
837 value: false
838 }
839
840- flickable: null
841+ flickable: flick
842 Flickable {
843 id: flick
844
845
846=== modified file 'plugins/phone/MultiSim.qml'
847--- plugins/phone/MultiSim.qml 2016-07-12 16:41:13 +0000
848+++ plugins/phone/MultiSim.qml 2017-01-12 12:47:26 +0000
849@@ -41,10 +41,12 @@
850 objectName: "callWaitSim" + index
851 text: i18n.tr("Call waiting")
852 progression: true
853- onClicked: pageStack.push(Qt.resolvedUrl("CallWaiting.qml"), {
854- sim: sims[index],
855- headerTitle: sims[index].title
856- })
857+ onClicked: pageStack.addPageToNextColumn(root,
858+ Qt.resolvedUrl("CallWaiting.qml"), {
859+ sim: sims[index],
860+ headerTitle: sims[index].title
861+ }
862+ )
863 }
864
865 ListItem.SingleValue {
866@@ -52,10 +54,12 @@
867 text: i18n.tr("Call forwarding")
868 progression: true
869 value: sims[index].getCallForwardingSummary()
870- onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"), {
871- sim: sims[index],
872- headerTitle: sims[index].title
873- })
874+ onClicked: pageStack.addPageToNextColumn(root,
875+ Qt.resolvedUrl("CallForwarding.qml"), {
876+ sim: sims[index],
877+ headerTitle: sims[index].title
878+ }
879+ )
880 }
881
882 ListItem.Standard {
883@@ -75,11 +79,13 @@
884 return sims[index].simMng.present && nums;
885 }
886 showDivider: false
887- onClicked: pageStack.push(Qt.resolvedUrl("Services.qml"), {
888- carrierString: sims[index].netReg.name,
889- sim: sims[index].simMng,
890- headerTitle: sims[index].title
891- })
892+ onClicked: pageStack.addPageToNextColumn(root,
893+ Qt.resolvedUrl("Services.qml"), {
894+ carrierString: sims[index].netReg.name,
895+ sim: sims[index].simMng,
896+ headerTitle: sims[index].title
897+ }
898+ )
899 }
900
901 ListItem.Divider {
902
903=== modified file 'plugins/phone/Services.qml'
904--- plugins/phone/Services.qml 2016-07-12 16:41:13 +0000
905+++ plugins/phone/Services.qml 2017-01-12 12:47:26 +0000
906@@ -27,6 +27,7 @@
907 id: root
908 objectName: "servicesPage"
909 title: headerTitle
910+ flickable: scrollWidget
911 property string carrierString
912 property variant sim
913 property var names: []
914@@ -44,6 +45,7 @@
915 }
916
917 Flickable {
918+ id: scrollWidget
919 anchors.fill: parent
920 contentHeight: contentItem.childrenRect.height
921 boundsBehavior: (contentHeight > root.height) ?
922@@ -63,7 +65,10 @@
923 ListItem.Standard {
924 progression: true
925 text: modelData
926- onClicked: pageStack.push(Qt.resolvedUrl("ServiceInfo.qml"), {serviceName: modelData, serviceNumber: sim.serviceNumbers[modelData]})
927+ onClicked: pageStack.addPageToNextColumn(root,
928+ Qt.resolvedUrl("ServiceInfo.qml"), {
929+ serviceName: modelData,
930+ serviceNumber: sim.serviceNumbers[modelData]})
931 }
932 }
933 }
934
935=== modified file 'plugins/phone/SingleSim.qml'
936--- plugins/phone/SingleSim.qml 2016-07-12 16:41:13 +0000
937+++ plugins/phone/SingleSim.qml 2017-01-12 12:47:26 +0000
938@@ -33,7 +33,8 @@
939 objectName: "callWait"
940 text: i18n.tr("Call waiting")
941 progression: true
942- onClicked: pageStack.push(Qt.resolvedUrl("CallWaiting.qml"), {sim: sim})
943+ onClicked: pageStack.addPageToNextColumn(root,
944+ Qt.resolvedUrl("CallWaiting.qml"), {sim: sim})
945 }
946
947 ListItem.SingleValue {
948@@ -42,7 +43,8 @@
949 showDivider: false
950 progression: true
951 value: sim.getCallForwardingSummary()
952- onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"), {sim: sim})
953+ onClicked: pageStack.addPageToNextColumn(root,
954+ Qt.resolvedUrl("CallForwarding.qml"), {sim: sim})
955 }
956
957 ListItem.Divider {}
958@@ -65,7 +67,8 @@
959 }
960 return sim.simMng.present && nums;
961 }
962- onClicked: pageStack.push(Qt.resolvedUrl("Services.qml"),
963- {carrierString: carrierString, sim: sim.simMng})
964+ onClicked: pageStack.addPageToNextColumn(root,
965+ Qt.resolvedUrl("Services.qml"),
966+ {carrierString: carrierString, sim: sim.simMng})
967 }
968 }
969
970=== modified file 'plugins/security-privacy/AppAccess.qml'
971--- plugins/security-privacy/AppAccess.qml 2016-07-14 13:51:56 +0000
972+++ plugins/security-privacy/AppAccess.qml 2017-01-12 12:47:26 +0000
973@@ -27,23 +27,30 @@
974 ItemPage {
975 id: root
976 title: i18n.tr("App permissions")
977+ flickable: scrollWidget
978
979- function openService(service) {
980- for (var i = 0; i < appsModel.count; i++) {
981- var item = appsModel.get(i)
982- if (item.service === service) {
983- var model = trustStoreModelComponent.createObject(null, { serviceName: item.trustStoreService })
984- pageStack.push(Qt.resolvedUrl("AppAccessControl.qml"), {
985- "title": i18n.tr(item.name),
986- "caption": i18n.tr(item.caption),
987- "model": model
988- })
989- return;
990+ onPushedOntoStack: {
991+ var service;
992+ if (pluginOptions && pluginOptions['service']) {
993+ service = pluginOptions['service'];
994+ for (var i = 0; i < appsModel.count; i++) {
995+ var item = appsModel.get(i)
996+ if (item.service === service) {
997+ var model = trustStoreModelComponent.createObject(null, { serviceName: item.trustStoreService })
998+ pageStack.addPageToNextColumn(
999+ root, Qt.resolvedUrl("AppAccessControl.qml"), {
1000+ "title": i18n.tr(item.name),
1001+ "caption": i18n.tr(item.caption),
1002+ "model": model,
1003+ });
1004+ return;
1005+ }
1006 }
1007 }
1008 }
1009
1010 Flickable {
1011+ id: scrollWidget
1012 anchors.fill: parent
1013 contentHeight: contentItem.childrenRect.height
1014 boundsBehavior: (contentHeight > root.height) ?
1015@@ -99,7 +106,7 @@
1016 value: trustStoreModel.count > 0 ?
1017 i18n.tr("%1/%2").arg(trustStoreModel.grantedCount).arg(trustStoreModel.count) :
1018 i18n.tr("0")
1019- onClicked: pageStack.push(Qt.resolvedUrl("AppAccessControl.qml"), {
1020+ onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("AppAccessControl.qml"), {
1021 "title": i18n.tr(model.name),
1022 "caption": i18n.tr(model.caption),
1023 "model": trustStoreModel,
1024@@ -125,7 +132,7 @@
1025 if (oaPlugin) {
1026 var accountsPage = oaPlugin.pageComponent
1027 if (accountsPage)
1028- pageStack.push(accountsPage, {plugin: oaPlugin, pluginManager: pluginManager})
1029+ pageStack.addPageToNextColumn(root, accountsPage, {plugin: oaPlugin, pluginManager: pluginManager})
1030 else
1031 console.warn("online-accounts")
1032 } else {
1033
1034=== modified file 'plugins/security-privacy/AppAccessControl.qml'
1035--- plugins/security-privacy/AppAccessControl.qml 2016-07-14 13:51:56 +0000
1036+++ plugins/security-privacy/AppAccessControl.qml 2017-01-12 12:47:26 +0000
1037@@ -25,11 +25,13 @@
1038
1039 ItemPage {
1040 id: root
1041+ flickable: scrollWidget
1042
1043 property alias model: repeater.model
1044 property alias caption: captionLabel.text
1045
1046 Flickable {
1047+ id: scrollWidget
1048 anchors.fill: parent
1049 contentHeight: contentItem.childrenRect.height
1050 boundsBehavior: (contentHeight > root.height) ?
1051
1052=== modified file 'plugins/security-privacy/Location.qml'
1053--- plugins/security-privacy/Location.qml 2016-07-14 13:51:56 +0000
1054+++ plugins/security-privacy/Location.qml 2017-01-12 12:47:26 +0000
1055@@ -153,7 +153,7 @@
1056 verticalAlignment: Text.AlignVCenter
1057 height: contentHeight + units.gu(4)
1058 onLinkActivated: {
1059- pageStack.push(Qt.resolvedUrl(link))
1060+ pageStack.addPageToNextColumn(locationPage, Qt.resolvedUrl(link))
1061 }
1062 onLineLaidOut: {
1063 dlgt.height = label.height
1064
1065=== modified file 'plugins/security-privacy/PageComponent.qml'
1066--- plugins/security-privacy/PageComponent.qml 2016-11-21 14:47:12 +0000
1067+++ plugins/security-privacy/PageComponent.qml 2017-01-12 12:47:26 +0000
1068@@ -56,40 +56,28 @@
1069 });
1070 return t;
1071 }
1072- property var pluginOptions
1073- Connections {
1074- target: pageStack
1075- onCurrentPageChanged: {
1076- // If we are called with subpage=foo, push foo on the stack.
1077- //
1078- // We need to wait until the PageComponent has been pushed to the stack
1079- // before pushing the subpages, otherwise they will be pushed below the
1080- // PageComponent.
1081- if (pageStack.currentPage === root) {
1082- if (pluginOptions && pluginOptions['subpage']) {
1083- switch (pluginOptions['subpage']) {
1084- case 'location':
1085- pageStack.push(Qt.resolvedUrl("Location.qml"));
1086- break;
1087- case 'permissions':
1088- var page = pageStack.push(Qt.resolvedUrl("AppAccess.qml"), {pluginManager: pluginManager})
1089- if (pluginOptions['service']) {
1090- page.openService(pluginOptions['service'])
1091- }
1092- break;
1093- }
1094- } else if (pluginOptions && pluginOptions['service']) {
1095- // This whole else if branch will be removed once the
1096- // camera app asks for [1] as described in lp:1545733.
1097- // [1] settings:///system/permissions?service=camera
1098- var page = pageStack.push(Qt.resolvedUrl("AppAccess.qml"), {pluginManager: pluginManager})
1099- page.openService(pluginOptions['service'])
1100- }
1101
1102- // Once done, disable this Connections, so that if the user navigates
1103- // back to the root we won't push the subpages again
1104- target = null
1105+ onPushedOntoStack: {
1106+ var page;
1107+ var opts = {
1108+ pluginManager: pluginManager, pluginOptions: pluginOptions,};
1109+ if (pluginOptions && pluginOptions['subpage']) {
1110+ switch (pluginOptions['subpage']) {
1111+ case 'location':
1112+ page = Qt.resolvedUrl("Location.qml");
1113+ break;
1114+ case 'permissions':
1115+ page = Qt.resolvedUrl("AppAccess.qml")
1116+ break;
1117 }
1118+ } else if (pluginOptions && pluginOptions['service']) {
1119+ // This whole else if branch will be removed once the
1120+ // camera app asks for [1] as described in lp:1545733.
1121+ // [1] settings:///system/permissions?service=camera
1122+ page = Qt.resolvedUrl("AppAccess.qml");
1123+ }
1124+ if (page) {
1125+ pageStack.addPageToNextColumn(root, page, opts);
1126 }
1127 }
1128
1129@@ -158,18 +146,18 @@
1130 id: fingerprintControl
1131 objectName: "fingerprintControl"
1132 text: i18n.tr("Fingerprint ID")
1133- onClicked: pageStack.push(fingeprintPage, {
1134+ onClicked: pageStack.addPageToNextColumn(root, fingeprintPage, {
1135 passcodeSet: securityPrivacy.securityType !== UbuntuSecurityPrivacyPanel.Swipe
1136 })
1137- visible: Biometryd.available
1138+ visible: Biometryd.available || showAllUI
1139 }
1140
1141 Component {
1142 id: fingeprintPage
1143 Fingerprints {
1144 onRequestPasscode: {
1145- pageStack.pop();
1146- pageStack.push(Qt.resolvedUrl("LockSecurity.qml"));
1147+ pageStack.removePages(root);
1148+ pageStack.addPageToNextColumn(root, Qt.resolvedUrl("LockSecurity.qml"));
1149 }
1150 }
1151 }
1152@@ -178,7 +166,7 @@
1153 id: lockingControl
1154 objectName: "lockingControl"
1155 text: i18n.tr("Locking and unlocking")
1156- onClicked: pageStack.push(Qt.resolvedUrl("PhoneLocking.qml"), {
1157+ onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("PhoneLocking.qml"), {
1158 usePowerd: usePowerd,
1159 powerSettings: powerSettings
1160 })
1161@@ -198,7 +186,7 @@
1162 return i18n.tr("Off");
1163 }
1164 visible: simsPresent > 0
1165- onClicked: pageStack.push(Qt.resolvedUrl("SimPin.qml"), { sims: sims })
1166+ onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("SimPin.qml"), { sims: sims })
1167 }
1168
1169 SettingsListItems.Standard {
1170@@ -257,7 +245,7 @@
1171 objectName: "locationItem"
1172 text: i18n.tr("Location")
1173 value: ""
1174- onClicked: pageStack.push(Qt.resolvedUrl("Location.qml"))
1175+ onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("Location.qml"))
1176 visible: true
1177 enabled: true
1178 property variant locationEnabled
1179@@ -275,7 +263,7 @@
1180
1181 SettingsListItems.SingleValueProgression {
1182 text: i18n.tr("App permissions")
1183- onClicked: pageStack.push(Qt.resolvedUrl("AppAccess.qml"), {pluginManager: pluginManager})
1184+ onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("AppAccess.qml"), {pluginManager: pluginManager})
1185 }
1186
1187 SettingsListItems.SingleValueProgression {
1188@@ -289,7 +277,7 @@
1189 i18n.tr("Not sent")
1190 onClicked: {
1191 var path = "../diagnostics/PageComponent.qml";
1192- pageStack.push(Qt.resolvedUrl(path));
1193+ pageStack.addPageToNextColumn(root, Qt.resolvedUrl(path));
1194 }
1195 }
1196 }
1197
1198=== modified file 'plugins/security-privacy/PhoneLocking.qml'
1199--- plugins/security-privacy/PhoneLocking.qml 2016-07-14 13:51:56 +0000
1200+++ plugins/security-privacy/PhoneLocking.qml 2017-01-12 12:47:26 +0000
1201@@ -30,6 +30,7 @@
1202 id: root
1203 objectName: "phoneLockingPage"
1204 title: i18n.tr("Locking and unlocking")
1205+ flickable: scrollWidget
1206
1207 property bool usePowerd
1208 property var powerSettings
1209@@ -39,6 +40,7 @@
1210 }
1211
1212 Flickable {
1213+ id: scrollWidget
1214 anchors.fill: parent
1215 contentHeight: contentItem.childrenRect.height
1216 boundsBehavior: (contentHeight > root.height) ?
1217@@ -75,7 +77,8 @@
1218 return fingerprint
1219 }
1220 }
1221- onClicked: pageStack.push(Qt.resolvedUrl("LockSecurity.qml"))
1222+ onClicked: pageStack.addPageToNextColumn(
1223+ root, Qt.resolvedUrl("LockSecurity.qml"))
1224 }
1225
1226 SettingsListItems.SingleValueProgression {
1227@@ -110,7 +113,7 @@
1228 }
1229 }
1230 onClicked:
1231- pageStack.push(
1232+ pageStack.addPageToNextColumn(root,
1233 Qt.resolvedUrl("../battery/SleepValues.qml"),
1234 { title: text, lockOnSuspend: lockOnSuspend } )
1235 }
1236
1237=== modified file 'plugins/security-privacy/SimPin.qml'
1238--- plugins/security-privacy/SimPin.qml 2016-07-14 13:51:56 +0000
1239+++ plugins/security-privacy/SimPin.qml 2017-01-12 12:47:26 +0000
1240@@ -35,6 +35,7 @@
1241 id: root
1242 objectName: "simPinPage"
1243 title: i18n.tr("SIM PIN")
1244+ flickable: scrollWidget
1245
1246 property var sims
1247 property var curSim
1248@@ -345,6 +346,7 @@
1249 }
1250
1251 Flickable {
1252+ id: scrollWidget
1253 anchors.fill: parent
1254 contentHeight: contentItem.childrenRect.height
1255 boundsBehavior: (contentHeight > root.height) ?
1256
1257=== modified file 'plugins/security-privacy/here-terms.qml'
1258--- plugins/security-privacy/here-terms.qml 2015-08-10 13:31:45 +0000
1259+++ plugins/security-privacy/here-terms.qml 2017-01-12 12:47:26 +0000
1260@@ -22,6 +22,7 @@
1261
1262 ItemPage {
1263 title: i18n.tr("Nokia HERE")
1264+ flickable: scrollWidget
1265 id: termsPage
1266
1267 UbuntuSecurityPrivacyPanel {
1268
1269=== modified file 'plugins/sound/PageComponent.qml'
1270--- plugins/sound/PageComponent.qml 2016-11-21 15:23:50 +0000
1271+++ plugins/sound/PageComponent.qml 2017-01-12 12:47:26 +0000
1272@@ -149,7 +149,7 @@
1273 text: i18n.tr("Ringtone")
1274 value: Utilities.buildDisplayName(backendInfo.incomingCallSound)
1275
1276- onClicked: pageStack.push(
1277+ onClicked: pageStack.addPageToNextColumn(root,
1278 Qt.resolvedUrl("SoundsList.qml"), {
1279 title: i18n.tr("Ringtone"),
1280 showStopButton: true,
1281@@ -209,12 +209,13 @@
1282 text: i18n.tr("Message received")
1283 value:Utilities.buildDisplayName(
1284 backendInfo.incomingMessageSound)
1285- onClicked: pageStack.push(
1286- Qt.resolvedUrl("SoundsList.qml"),
1287- { title: i18n.tr("Message received"),
1288- soundType: 1,
1289- soundsDir:
1290- "sounds/ubuntu/notifications/" })
1291+ onClicked: pageStack.addPageToNextColumn(root,
1292+ Qt.resolvedUrl("SoundsList.qml"), {
1293+ title: i18n.tr("Message received"),
1294+ soundType: 1,
1295+ soundsDir: "sounds/ubuntu/notifications/"
1296+ }
1297+ )
1298 }
1299
1300 SettingsListItems.Standard {
1301
1302=== modified file 'plugins/sound/SoundsList.qml'
1303--- plugins/sound/SoundsList.qml 2016-09-19 14:53:19 +0000
1304+++ plugins/sound/SoundsList.qml 2017-01-12 12:47:26 +0000
1305@@ -128,9 +128,7 @@
1306 text: i18n.tr("Custom Ringtone")
1307 visible: soundType === 0
1308 progression: true
1309- onClicked: {
1310- pageStack.push(picker);
1311- }
1312+ onClicked: pageStack.addPageToNextColumn(soundsPage, picker)
1313 }
1314 }
1315 }
1316@@ -215,7 +213,7 @@
1317 showTitle: false
1318
1319 onPeerSelected: {
1320- pageStack.pop();
1321+ pageStack.removePages(soundsPage);
1322 // requests an active transfer from peer
1323 function startContentTransfer(callback) {
1324 if (callback)
1325@@ -231,7 +229,7 @@
1326 });
1327 }
1328
1329- onCancelPressed: pageStack.pop();
1330+ onCancelPressed: pageStack.removePages(soundsPage);
1331 }
1332 }
1333
1334
1335=== modified file 'plugins/system-update/PageComponent.qml'
1336--- plugins/system-update/PageComponent.qml 2016-08-23 11:48:49 +0000
1337+++ plugins/system-update/PageComponent.qml 2017-01-12 12:47:26 +0000
1338@@ -421,7 +421,8 @@
1339 return i18n.tr("Unknown")
1340 }
1341 progression: true
1342- onClicked: pageStack.push(Qt.resolvedUrl("Configuration.qml"))
1343+ onClicked: pageStack.addPageToNextColumn(
1344+ root, Qt.resolvedUrl("Configuration.qml"))
1345 }
1346 }
1347
1348
1349=== modified file 'plugins/time-date/ChooseTimeZone.qml'
1350--- plugins/time-date/ChooseTimeZone.qml 2016-07-14 13:51:56 +0000
1351+++ plugins/time-date/ChooseTimeZone.qml 2017-01-12 12:47:26 +0000
1352@@ -27,7 +27,7 @@
1353
1354 ItemPage {
1355 title: i18n.tr("Time zone")
1356-
1357+ flickable: locationsListView
1358 property UbuntuTimeDatePanel timeDatePanel
1359
1360 Timer {
1361
1362=== modified file 'plugins/time-date/PageComponent.qml'
1363--- plugins/time-date/PageComponent.qml 2016-07-14 13:51:56 +0000
1364+++ plugins/time-date/PageComponent.qml 2017-01-12 12:47:26 +0000
1365@@ -68,9 +68,11 @@
1366 id: timeZone
1367 text: timeDatePanel.timeZoneName
1368 value: getUTCOffset()
1369- onClicked: pageStack.push(Qt.resolvedUrl("ChooseTimeZone.qml"), {
1370- timeDatePanel: timeDatePanel
1371- })
1372+ onClicked: pageStack.addPageToNextColumn(root,
1373+ Qt.resolvedUrl("ChooseTimeZone.qml"), {
1374+ timeDatePanel: timeDatePanel
1375+ }
1376+ )
1377 }
1378
1379 SettingsItemTitle {
1380
1381=== modified file 'plugins/vpn/PageComponent.qml'
1382--- plugins/vpn/PageComponent.qml 2016-03-14 12:15:41 +0000
1383+++ plugins/vpn/PageComponent.qml 2017-01-12 12:47:26 +0000
1384@@ -35,7 +35,7 @@
1385 property var diag
1386
1387 function openConnection(connection, isNew) {
1388- pageStack.push(vpnEditorDialog, {
1389+ pageStack.addPageToNextColumn(root, vpnEditorDialog, {
1390 "connection": connection,
1391 "isNew": isNew
1392 });
1393@@ -89,12 +89,14 @@
1394 Component {
1395 id: vpnEditorDialog
1396 VpnEditor {
1397+ id: vpnEditorPage
1398 onTypeChanged: {
1399 connection.remove();
1400- pageStack.pop();
1401+ pageStack.removePages(vpnEditorPage);
1402 Connectivity.vpnConnections.add(type);
1403 }
1404 onReconnectionPrompt: PopupUtils.open(reconnPrompt)
1405+ onDone: pageStack.removePages(vpnEditorPage)
1406 }
1407 }
1408
1409
1410=== modified file 'plugins/wifi/AccessPoint.qml'
1411--- plugins/wifi/AccessPoint.qml 2016-07-14 13:51:56 +0000
1412+++ plugins/wifi/AccessPoint.qml 2017-01-12 12:47:26 +0000
1413@@ -52,18 +52,12 @@
1414
1415 signal activate()
1416
1417- onCheckedChanged: {
1418- // if stack has NetworkDetailsBrief, pop it
1419- if (pageStack.depth === 3) {
1420- pageStack.pop();
1421- }
1422- }
1423-
1424 progressionVisible: checked
1425 onClicked: {
1426 if (checked) {
1427- pageStack.push(Qt.resolvedUrl("NetworkDetailsBrief.qml"),
1428- {networkName : text, accessPoint: accessPoint})
1429+ pageStack.addPageToNextColumn(wifibase,
1430+ Qt.resolvedUrl("NetworkDetailsBrief.qml"),
1431+ {networkName : text, accessPoint: accessPoint})
1432 } else {
1433 accessPoint.activate();
1434 }
1435
1436=== modified file 'plugins/wifi/PageComponent.qml'
1437--- plugins/wifi/PageComponent.qml 2016-09-27 13:41:19 +0000
1438+++ plugins/wifi/PageComponent.qml 2017-01-12 12:47:26 +0000
1439@@ -26,9 +26,10 @@
1440 id: wifibase
1441 objectName: "wifiPage"
1442 title: i18n.tr("Wi-Fi")
1443+ flickable: pageFlickable
1444+
1445 property bool wifiEnabled: actionGroup.actionObject.valid ?
1446 actionGroup.actionObject.state : false
1447- property var pluginOptions
1448
1449 UnityMenuModel {
1450 id: menuModel
1451@@ -136,7 +137,8 @@
1452 SettingsListItems.StandardProgression {
1453 objectName: "previousNetwork"
1454 text: i18n.tr("Previous networks")
1455- onClicked: pageStack.push(Qt.resolvedUrl("PreviousNetworks.qml"))
1456+ onClicked: pageStack.addPageToNextColumn(wifibase,
1457+ Qt.resolvedUrl("PreviousNetworks.qml"))
1458 }
1459
1460 Loader {
1461
1462=== modified file 'plugins/wifi/PreviousNetworks.qml'
1463--- plugins/wifi/PreviousNetworks.qml 2016-07-14 13:51:56 +0000
1464+++ plugins/wifi/PreviousNetworks.qml 2017-01-12 12:47:26 +0000
1465@@ -25,6 +25,7 @@
1466 id: previousNetworks
1467 objectName: "previousNetworksPage"
1468 title: i18n.tr("Previous networks")
1469+ flickable: networkList
1470
1471 PreviousNetworkModel {
1472 id: pnmodel
1473@@ -56,11 +57,12 @@
1474 }
1475 delegate: SettingsListItems.StandardProgression {
1476 text: name
1477- onClicked: {
1478- pageStack.push(Qt.resolvedUrl("NetworkDetails.qml"),
1479- {networkName : name, password : password, lastUsed : lastUsed,
1480- dbusPath : objectPath});
1481- }
1482+ onClicked: pageStack.addPageToNextColumn(previousNetworks,
1483+ Qt.resolvedUrl("NetworkDetails.qml"), {
1484+ networkName : name, password : password,
1485+ lastUsed : lastUsed, dbusPath : objectPath
1486+ }
1487+ )
1488 }
1489 }
1490 }
1491
1492=== modified file 'src/SystemSettings/CMakeLists.txt'
1493--- src/SystemSettings/CMakeLists.txt 2015-11-18 15:59:45 +0000
1494+++ src/SystemSettings/CMakeLists.txt 2017-01-12 12:47:26 +0000
1495@@ -1,6 +1,7 @@
1496 set(QML_SOURCES
1497 ItemPage.qml
1498 SettingsItemTitle.qml
1499+ USSAdaptivePageLayout.qml
1500 )
1501
1502 set(PLUG_DIR ${PLUGIN_QML_DIR}/SystemSettings)
1503
1504=== modified file 'src/SystemSettings/ItemPage.qml'
1505--- src/SystemSettings/ItemPage.qml 2015-08-10 13:31:45 +0000
1506+++ src/SystemSettings/ItemPage.qml 2017-01-12 12:47:26 +0000
1507@@ -24,8 +24,27 @@
1508 Page {
1509 id: root
1510
1511+ property alias title: pageHeader.title
1512+ property alias flickable: pageHeader.flickable
1513+
1514+ header: PageHeader {
1515+ id: pageHeader
1516+ title: i18n.dtr(plugin.translations, plugin.displayName)
1517+ }
1518+
1519 property variant plugin
1520 property variant pluginManager
1521-
1522- title: i18n.dtr(plugin.translations, plugin.displayName)
1523+ property variant pluginOptions
1524+
1525+ signal pushedOntoStack()
1526+
1527+ Connections {
1528+ target: root
1529+ onVisibleChanged: {
1530+ if (visible) {
1531+ pushedOntoStack();
1532+ target = null;
1533+ }
1534+ }
1535+ }
1536 }
1537
1538=== added file 'src/SystemSettings/USSAdaptivePageLayout.qml'
1539--- src/SystemSettings/USSAdaptivePageLayout.qml 1970-01-01 00:00:00 +0000
1540+++ src/SystemSettings/USSAdaptivePageLayout.qml 2017-01-12 12:47:26 +0000
1541@@ -0,0 +1,40 @@
1542+/*
1543+ * This file is part of system-settings
1544+ *
1545+ * Copyright (C) 2017 Canonical Ltd.
1546+ *
1547+ * This program is free software: you can redistribute it and/or modify it
1548+ * under the terms of the GNU General Public License version 3, as published
1549+ * by the Free Software Foundation.
1550+ *
1551+ * This program is distributed in the hope that it will be useful, but
1552+ * WITHOUT ANY WARRANTY; without even the implied warranties of
1553+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
1554+ * PURPOSE. See the GNU General Public License for more details.
1555+ *
1556+ * You should have received a copy of the GNU General Public License along
1557+ * with this program. If not, see <http://www.gnu.org/licenses/>.
1558+ */
1559+
1560+import QtQuick 2.0
1561+import Ubuntu.Components 1.3
1562+
1563+AdaptivePageLayout {
1564+ id: layout
1565+
1566+ function addFileToNextColumnSync(parentObject, resolvedUrl, properties) {
1567+ return addComponentToNextColumnSync(parentObject,
1568+ Qt.createComponent(resolvedUrl),
1569+ properties);
1570+ }
1571+
1572+ function addComponentToNextColumnSync(parentObject, component, properties) {
1573+ if (typeof(properties) === 'undefined') {
1574+ properties = {}
1575+ }
1576+
1577+ var incubator = layout.addPageToNextColumn(parentObject, component, properties)
1578+ incubator.forceCompletion()
1579+ return incubator.object
1580+ }
1581+}
1582
1583=== modified file 'src/SystemSettings/qmldir'
1584--- src/SystemSettings/qmldir 2015-11-18 14:11:45 +0000
1585+++ src/SystemSettings/qmldir 2017-01-12 12:47:26 +0000
1586@@ -2,3 +2,4 @@
1587
1588 ItemPage 1.0 ItemPage.qml
1589 SettingsItemTitle 1.0 SettingsItemTitle.qml
1590+USSAdaptivePageLayout 1.0 USSAdaptivePageLayout.qml
1591
1592=== modified file 'src/qml/CategorySection.qml'
1593--- src/qml/CategorySection.qml 2016-07-14 13:51:56 +0000
1594+++ src/qml/CategorySection.qml 2017-01-12 12:47:26 +0000
1595@@ -68,11 +68,23 @@
1596 onClicked: {
1597 var pageComponent = model.item.pageComponent
1598 if (pageComponent) {
1599- pageStack.push(model.item.pageComponent,
1600- { plugin: model.item, pluginManager: pluginManager })
1601+ Haptics.play();
1602+ loadPluginByName(model.item.baseName);
1603 }
1604 }
1605 }
1606+ Binding {
1607+ target: loader.item
1608+ property: "color"
1609+ value: theme.palette.highlighted.background
1610+ when: currentPlugin == model.item.baseName && apl.columns > 1
1611+ }
1612+ Binding {
1613+ target: loader.item
1614+ property: "color"
1615+ value: "transparent"
1616+ when: currentPlugin != model.item.baseName || apl.columns == 1
1617+ }
1618 }
1619 }
1620 }
1621
1622=== modified file 'src/qml/MainWindow.qml'
1623--- src/qml/MainWindow.qml 2016-12-01 13:50:03 +0000
1624+++ src/qml/MainWindow.qml 2017-01-12 12:47:26 +0000
1625@@ -25,13 +25,18 @@
1626
1627 MainView {
1628 id: main
1629- implicitWidth: units.gu(50)
1630+ implicitWidth: units.gu(140)
1631 implicitHeight: units.gu(90)
1632 applicationName: "ubuntu-system-settings"
1633 objectName: "systemSettingsMainView"
1634 automaticOrientation: true
1635 anchorToKeyboard: true
1636 property var pluginManager: PluginManager {}
1637+ property string currentPlugin: ""
1638+
1639+ /* Workaround for lp:1648801, i.e. APL does not support a placeholder,
1640+ so we implement it here. */
1641+ property string placeholderPlugin: "about"
1642
1643 function loadPluginByName(pluginName, pluginOptions) {
1644 var plugin = pluginManager.getByName(pluginName)
1645@@ -44,10 +49,18 @@
1646 if (plugin) {
1647 // Got a valid plugin name - load it
1648 var pageComponent = plugin.pageComponent
1649+ var page;
1650 if (pageComponent) {
1651- while (pageStack.depth > 1)
1652- pageStack.pop()
1653- pageStack.push(pageComponent, opts)
1654+ apl.removePages(apl.primaryPage);
1655+ page = apl.addComponentToNextColumnSync(
1656+ apl.primaryPage, pageComponent, opts
1657+ );
1658+ currentPlugin = pluginName;
1659+ page.Component.destruction.connect(function () {
1660+ if (currentPlugin == this.baseName) {
1661+ currentPlugin = "";
1662+ }
1663+ }.bind(plugin))
1664 }
1665 return true
1666 } else {
1667@@ -60,15 +73,31 @@
1668 Component.onCompleted: {
1669 i18n.domain = "ubuntu-system-settings"
1670 i18n.bindtextdomain("ubuntu-system-settings", i18nDirectory)
1671- pageStack.push(mainPage)
1672+
1673 if (defaultPlugin) {
1674 if (!loadPluginByName(defaultPlugin, pluginOptions))
1675 Qt.quit()
1676+ } else if (apl.columns > 1) {
1677+ loadPluginByName(placeholderPlugin);
1678+ aplConnections.target = apl;
1679 }
1680
1681 // when running in windowed mode, constrain width
1682 view.minimumWidth = Qt.binding( function() { return units.gu(40) } )
1683- view.maximumWidth = Qt.binding( function() { return units.gu(50) } )
1684+ view.maximumWidth = Qt.binding( function() { return units.gu(140) } )
1685+ }
1686+
1687+ Connections {
1688+ id: aplConnections
1689+ ignoreUnknownSignals: true
1690+ onColumnsChanged: {
1691+ var columns = target.columns;
1692+ if (columns > 1 && !currentPlugin) {
1693+ loadPluginByName(placeholderPlugin);
1694+ } else if (columns == 1 && currentPlugin == placeholderPlugin) {
1695+ apl.removePages(apl.primaryPage);
1696+ }
1697+ }
1698 }
1699
1700 Connections {
1701@@ -100,12 +129,34 @@
1702 } else {
1703 loadPluginByName(panel)
1704 }
1705-
1706 }
1707 }
1708
1709- PageStack {
1710- id: pageStack
1711+ USSAdaptivePageLayout {
1712+ id: apl
1713+ objectName: "apl"
1714+ anchors.fill: parent
1715+ primaryPage: mainPage
1716+ layouts: [
1717+ PageColumnsLayout {
1718+ when: width >= units.gu(90)
1719+ PageColumn {
1720+ minimumWidth: units.gu(40)
1721+ maximumWidth: units.gu(50)
1722+ preferredWidth: units.gu(50)
1723+ }
1724+ PageColumn {
1725+ fillWidth: true
1726+ }
1727+ },
1728+ PageColumnsLayout {
1729+ when: true
1730+ PageColumn {
1731+ fillWidth: true
1732+ minimumWidth: units.gu(40)
1733+ }
1734+ }
1735+ ]
1736
1737 Page {
1738 id: mainPage
1739@@ -146,8 +197,7 @@
1740 verticalCenter: parent.verticalCenter
1741 }
1742 inputMethodHints: Qt.ImhNoPredictiveText
1743- onDisplayTextChanged:
1744- pluginManager.filter = displayText
1745+ onDisplayTextChanged: pluginManager.filter = displayText
1746 placeholderText: i18n.tr("Search")
1747 hasClearButton: false
1748 }
1749
1750=== modified file 'src/qml/UncategorizedItemsView.qml'
1751--- src/qml/UncategorizedItemsView.qml 2016-05-06 01:55:01 +0000
1752+++ src/qml/UncategorizedItemsView.qml 2017-01-12 12:47:26 +0000
1753@@ -33,7 +33,6 @@
1754
1755 Repeater {
1756 id: repeater
1757-
1758 Column {
1759 anchors.left: parent.left
1760 anchors.right: parent.right
1761@@ -51,12 +50,22 @@
1762 var pageComponent = model.item.pageComponent
1763 if (pageComponent) {
1764 Haptics.play();
1765- pageStack.push(model.item.pageComponent,
1766- { plugin: model.item,
1767- pluginManager: pluginManager })
1768+ loadPluginByName(model.item.baseName);
1769 }
1770 }
1771 }
1772+ Binding {
1773+ target: loader.item
1774+ property: "color"
1775+ value: theme.palette.highlighted.background
1776+ when: currentPlugin == model.item.baseName && apl.columns > 1
1777+ }
1778+ Binding {
1779+ target: loader.item
1780+ property: "color"
1781+ value: "transparent"
1782+ when: currentPlugin != model.item.baseName || apl.columns == 1
1783+ }
1784 }
1785 }
1786 }
1787
1788=== modified file 'tests/autopilot/ubuntu_system_settings/tests/__init__.py'
1789--- tests/autopilot/ubuntu_system_settings/tests/__init__.py 2016-09-27 13:41:19 +0000
1790+++ tests/autopilot/ubuntu_system_settings/tests/__init__.py 2017-01-12 12:47:26 +0000
1791@@ -612,6 +612,7 @@
1792 class PhoneOfonoBaseTestCase(UbuntuSystemSettingsOfonoTestCase):
1793 def setUp(self):
1794 """ Go to Phone page """
1795+ self.useFixture(EnvironmentVariable("USS_SHOW_ALL_UI", "1"))
1796 super(PhoneOfonoBaseTestCase, self).setUp()
1797 self.phone_page = self.main_view.go_to_phone_page()
1798
1799
1800=== modified file 'tests/mocks/SystemSettings/MockPluginManager.cpp'
1801--- tests/mocks/SystemSettings/MockPluginManager.cpp 2016-12-01 13:50:03 +0000
1802+++ tests/mocks/SystemSettings/MockPluginManager.cpp 2017-01-12 12:47:26 +0000
1803@@ -18,20 +18,25 @@
1804
1805 #include "MockPluginManager.h"
1806
1807+#include <QDebug>
1808+#include <QQmlEngine>
1809+
1810 MockPluginManager::MockPluginManager(QObject *parent) : QObject(parent)
1811 {
1812 }
1813
1814 QObject* MockPluginManager::getByName(const QString &name) const
1815 {
1816- Q_UNUSED(name);
1817- return nullptr;
1818+ MockItem* p = m_plugins.value(name);
1819+ QQmlEngine::setObjectOwnership(p, QQmlEngine::CppOwnership);
1820+ return p;
1821 }
1822
1823 QAbstractItemModel* MockPluginManager::itemModel(const QString &category)
1824 {
1825- Q_UNUSED(category);
1826- return nullptr;
1827+ QAbstractItemModel* m = m_models.value(category);
1828+ QQmlEngine::setObjectOwnership(m, QQmlEngine::CppOwnership);
1829+ return m;
1830 }
1831
1832 void MockPluginManager::resetPlugins()
1833@@ -48,3 +53,107 @@
1834 m_filter = filter;
1835 Q_EMIT filterChanged();
1836 }
1837+
1838+void MockPluginManager::addPlugin(const QString &name, QQmlComponent *entry,
1839+ QQmlComponent *page, const QString &category)
1840+{
1841+ MockItemModel *model = nullptr;
1842+ if (m_models.contains(category)) {
1843+ model = (MockItemModel*) m_models.value(category);
1844+ } else {
1845+ model = new MockItemModel(this);
1846+ m_models.insert(category, model);
1847+ }
1848+
1849+ MockItem* item = new MockItem(this);
1850+ item->setBaseName(name);
1851+ item->setEntryComponent(entry);
1852+ item->setPageComponent(page);
1853+ model->addPlugin(item);
1854+ m_plugins.insert(name, item);
1855+}
1856+
1857+bool MockItem::visible() const
1858+{
1859+ return true;
1860+}
1861+
1862+QString MockItem::baseName() const
1863+{
1864+ return m_baseName;
1865+}
1866+
1867+void MockItem::setBaseName(const QString &baseName)
1868+{
1869+ m_baseName = baseName;
1870+}
1871+
1872+QQmlComponent* MockItem::entryComponent()
1873+{
1874+ QQmlEngine::setObjectOwnership(m_entry, QQmlEngine::CppOwnership);
1875+ return m_entry;
1876+}
1877+QQmlComponent* MockItem::pageComponent()
1878+{
1879+ QQmlEngine::setObjectOwnership(m_page, QQmlEngine::CppOwnership);
1880+ return m_page;
1881+}
1882+
1883+void MockItem::setEntryComponent(QQmlComponent* c)
1884+{
1885+ m_entry = c;
1886+}
1887+
1888+void MockItem::setPageComponent(QQmlComponent* c)
1889+{
1890+ m_page = c;
1891+}
1892+
1893+MockItemModel::MockItemModel(QObject *parent) : QAbstractListModel(parent)
1894+{
1895+}
1896+
1897+void MockItemModel::addPlugin(MockItem *plugin)
1898+{
1899+ int row = m_plugins.size();
1900+ beginInsertRows(QModelIndex(), row, row);
1901+ m_plugins.append(plugin);
1902+ endInsertRows();
1903+}
1904+
1905+int MockItemModel::rowCount(const QModelIndex &parent) const
1906+{
1907+ Q_UNUSED(parent);
1908+ return m_plugins.count();
1909+}
1910+
1911+QVariant MockItemModel::data(const QModelIndex &index, int role) const
1912+{
1913+ if (index.row() >= m_plugins.count()) return QVariant();
1914+
1915+ const MockItem *item = m_plugins.at(index.row());
1916+ QVariant ret;
1917+
1918+ switch (role) {
1919+ case Qt::DisplayRole:
1920+ ret = item->baseName();
1921+ break;
1922+ case ItemRole:
1923+ ret = QVariant::fromValue<QObject*>(const_cast<MockItem*>(item));
1924+ break;
1925+ }
1926+
1927+ return ret;
1928+}
1929+
1930+QHash<int, QByteArray> MockItemModel::roleNames() const
1931+{
1932+ static QHash<int,QByteArray> names;
1933+ if (Q_UNLIKELY(names.empty())) {
1934+ names[Qt::DisplayRole] = "displayName";
1935+ names[MockItemModel::ItemRole] = "item";
1936+ }
1937+ return names;
1938+}
1939+
1940+// Q_DECLARE_METATYPE(MockItem*)
1941
1942=== modified file 'tests/mocks/SystemSettings/MockPluginManager.h'
1943--- tests/mocks/SystemSettings/MockPluginManager.h 2016-12-01 13:50:03 +0000
1944+++ tests/mocks/SystemSettings/MockPluginManager.h 2017-01-12 12:47:26 +0000
1945@@ -22,7 +22,10 @@
1946 #include <QAbstractItemModel>
1947 #include <QObject>
1948 #include <QString>
1949+#include <QQmlComponent>
1950
1951+class MockItem;
1952+class MockItemModel;
1953 class MockPluginManager : public QObject
1954 {
1955 Q_OBJECT
1956@@ -39,12 +42,61 @@
1957 void resetPlugins();
1958 QString getFilter();
1959 void setFilter(const QString &filter);
1960+ void addPlugin(const QString &name,
1961+ QQmlComponent *entry,
1962+ QQmlComponent *page,
1963+ const QString &category = "uncategorized-bottom");
1964
1965 Q_SIGNALS:
1966 void filterChanged();
1967
1968 private:
1969 QString m_filter = QString::null;
1970+ QMap<QString, MockItemModel*> m_models;
1971+ QMap<QString, MockItem*> m_plugins;
1972+};
1973+
1974+class MockItem : public QObject
1975+{
1976+ Q_OBJECT
1977+ Q_PROPERTY(QQmlComponent *entryComponent READ entryComponent CONSTANT)
1978+ Q_PROPERTY(QQmlComponent *pageComponent READ pageComponent CONSTANT)
1979+ Q_PROPERTY(bool visible READ visible CONSTANT)
1980+ Q_PROPERTY(QString baseName READ baseName CONSTANT)
1981+public:
1982+ explicit MockItem(QObject *parent = 0) : QObject(parent) {};
1983+ ~MockItem() {};
1984+ QQmlComponent* entryComponent();
1985+ void setEntryComponent(QQmlComponent* c);
1986+ QQmlComponent* pageComponent();
1987+ void setPageComponent(QQmlComponent* c);
1988+ bool visible() const;
1989+ QString baseName() const;
1990+ void setBaseName(const QString &baseName);
1991+private:
1992+ QQmlComponent* m_entry;
1993+ QQmlComponent* m_page;
1994+ QString m_baseName;
1995+};
1996+
1997+class MockItemModel : public QAbstractListModel
1998+{
1999+ Q_OBJECT
2000+public:
2001+ explicit MockItemModel(QObject *parent = 0);
2002+ ~MockItemModel() {};
2003+
2004+ enum Roles {
2005+ IconRole = Qt::UserRole + 1,
2006+ ItemRole,
2007+ };
2008+ void addPlugin(MockItem *plugin);
2009+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
2010+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
2011+ QHash<int, QByteArray> roleNames() const;
2012+
2013+private:
2014+ QList<MockItem*> m_plugins;
2015 };
2016
2017 #endif // MOCK_PLUGIN_MANAGER_H
2018
2019=== modified file 'tests/mocks/SystemSettings/qmldir'
2020--- tests/mocks/SystemSettings/qmldir 2016-12-01 14:00:12 +0000
2021+++ tests/mocks/SystemSettings/qmldir 2017-01-12 12:47:26 +0000
2022@@ -3,6 +3,7 @@
2023
2024 ItemPage 1.0 file://${CMAKE_SOURCE_DIR}/src/SystemSettings/ItemPage.qml
2025 SettingsItemTitle 1.0 file://${CMAKE_SOURCE_DIR}/src/SystemSettings/SettingsItemTitle.qml
2026+USSAdaptivePageLayout 1.0 file://${CMAKE_SOURCE_DIR}/src/SystemSettings/USSAdaptivePageLayout.qml
2027 CategorySection 1.0 file://${CMAKE_SOURCE_DIR}/src/qml/CategorySection.qml
2028 UncategorizedItemsView.qml 1.0 file://${CMAKE_SOURCE_DIR}/src/qml/UncategorizedItemsView.qml.qml
2029 MainWindow 1.0 file://${CMAKE_SOURCE_DIR}/src/qml/MainWindow.qml
2030
2031=== modified file 'tests/plugins/main/tst_MainWindow.qml'
2032--- tests/plugins/main/tst_MainWindow.qml 2016-12-01 13:50:03 +0000
2033+++ tests/plugins/main/tst_MainWindow.qml 2017-01-12 12:47:26 +0000
2034@@ -19,6 +19,7 @@
2035 import QtQuick 2.4
2036 import QtTest 1.0
2037 import SystemSettings 1.0
2038+import SystemSettings.ListItems 1.0 as SettingsListItems
2039 import Ubuntu.Components 1.3
2040 import Ubuntu.Test 0.1
2041
2042@@ -35,6 +36,7 @@
2043
2044 property string i18nDirectory: ""
2045 property string defaultPlugin: ""
2046+ property var pluginOptions: ({})
2047 property var view: ({
2048 minimumWidth: 0,
2049 maximumWidth: 0,
2050@@ -43,13 +45,23 @@
2051 }
2052
2053 UbuntuTestCase {
2054- name: "MainWindowTest"
2055+ name: "DefaultPluginMainWindowTest"
2056+ when: windowShown
2057+
2058+ function test_default_plugin () {
2059+ mainWindowComponent.createObject(testRoot, {});
2060+ }
2061+ }
2062+
2063+ UbuntuTestCase {
2064+ name: "MainWindowTests"
2065 when: windowShown
2066
2067 property var instance
2068
2069 function init() {
2070 instance = mainWindowComponent.createObject(testRoot, {});
2071+ waitForRendering(instance);
2072 }
2073
2074 function cleanup() {
2075@@ -74,4 +86,182 @@
2076 compare(instance.pluginManager.filter, "");
2077 }
2078 }
2079+
2080+ UbuntuTestCase {
2081+ name: "MainWindowAPLTests"
2082+ when: windowShown
2083+
2084+ Component {
2085+ id: testPersonalEntry
2086+ SettingsListItems.IconProgression {
2087+ objectName: "testPersonalEntry"
2088+ text: "Test"
2089+ iconName: "system-users-symbolic"
2090+ }
2091+ }
2092+
2093+ Component {
2094+ id: testUncategorizedEntry
2095+ SettingsListItems.IconProgression {
2096+ objectName: "testUncategorizedEntry"
2097+ text: "Test 2"
2098+ iconName: "phone-smartphone-symbolic"
2099+ }
2100+ }
2101+
2102+ Component {
2103+ id: testPageComponent
2104+ Page {
2105+ objectName: "testPage"
2106+ visible: false
2107+ property var plugin
2108+ property var pluginOptions
2109+ property var pluginManager
2110+ header: testHeader
2111+ PageHeader {
2112+ id: testHeader
2113+ title: i18n.tr("Test PageComponent")
2114+ flickable: testFlickable
2115+ }
2116+ Flickable {
2117+ id: testFlickable
2118+ anchors.fill: parent
2119+ contentHeight: contentItem.childrenRect.height
2120+ Column {
2121+ anchors.left: parent.left
2122+ anchors.right: parent.right
2123+
2124+ Label {
2125+ text: "Test Content"
2126+ }
2127+ }
2128+ }
2129+ }
2130+ }
2131+
2132+ Component {
2133+ id: pluginManagerComponent
2134+ PluginManager {}
2135+ }
2136+
2137+ function waitForPage(page) {
2138+ tryCompareFunction(function () {
2139+ return !!findChild(testRoot, page);
2140+ }, true);
2141+ return findChild(testRoot, page);
2142+ }
2143+
2144+ function waitForPageToGoAway(page) {
2145+ tryCompareFunction(function () {
2146+ var p = findChild(testRoot, page);
2147+ var visible = p && p.visible;
2148+ return !!(p && visible);
2149+ }, false);
2150+ }
2151+
2152+ property var instance
2153+ property var personalEntry
2154+ property var uncategorizedEntry
2155+ property var page
2156+ property var manager
2157+
2158+ function init() {
2159+ manager = pluginManagerComponent.createObject(testRoot);
2160+ personalEntry = testPersonalEntry;
2161+ uncategorizedEntry = testUncategorizedEntry;
2162+ page = testPageComponent;
2163+
2164+ manager.addPlugin("Test", personalEntry, page, "personal");
2165+ manager.addPlugin("Phone", uncategorizedEntry, page, "uncategorized-bottom");
2166+ }
2167+
2168+ function cleanup() {
2169+ instance && instance.destroy();
2170+ }
2171+
2172+ function test_go_to_panel_data() {
2173+ return [
2174+ { tag: "one column, categorized", width: units.gu(50), entry: "testPersonalEntry" },
2175+ { tag: "one column, uncategorized", width: units.gu(50), entry: "testUncategorizedEntry" },
2176+ { tag: "two column, categorized", width: units.gu(110), entry: "testPersonalEntry" },
2177+ { tag: "two column, uncategorized", width: units.gu(110), entry: "testUncategorizedEntry" },
2178+ ];
2179+ }
2180+
2181+ function test_go_to_panel(data) {
2182+ instance = mainWindowComponent.createObject(testRoot, {
2183+ pluginManager: manager
2184+ });
2185+ waitForRendering(instance);
2186+ testRoot.width = data.width;
2187+ var entry = findChild(instance, data.entry);
2188+ mouseClick(entry, entry.width / 2, entry.height / 2);
2189+ waitForPage("testPage");
2190+ var page = waitForPage("testPage");
2191+ tryCompare(page, "visible", true);
2192+ }
2193+
2194+ function test_default_plugin_data() {
2195+ return [
2196+ { tag: "no default", default: "", pageObjectName: "" },
2197+ { tag: "default", default: "Test", pageObjectName: "testPage" },
2198+ ];
2199+ }
2200+
2201+ function test_default_plugin(data) {
2202+ instance = mainWindowComponent.createObject(testRoot, {
2203+ pluginManager: manager, defaultPlugin: data.default
2204+ });
2205+ waitForRendering(instance);
2206+ if (data.pageObjectName) {
2207+ var page = waitForPage(data.pageObjectName);
2208+ tryCompare(page, "visible", true);
2209+ }
2210+ }
2211+
2212+ function test_placeholder_plugin_created_and_destroyed() {
2213+ instance = mainWindowComponent.createObject(testRoot, {
2214+ pluginManager: manager, defaultPlugin: data.default,
2215+ placeholderPlugin: "Test"
2216+ });
2217+ waitForRendering(instance);
2218+ waitForPage("testPage");
2219+ testRoot.width = units.gu(50);
2220+ waitForPageToGoAway("testPage");
2221+ }
2222+
2223+ function test_current_plugin_property() {
2224+ var apl;
2225+ var entry;
2226+
2227+ instance = mainWindowComponent.createObject(testRoot, {
2228+ pluginManager: manager
2229+ });
2230+ waitForRendering(instance);
2231+ apl = findInvisibleChild(instance, "apl");
2232+
2233+ // Base case
2234+ compare(instance.currentPlugin, "");
2235+
2236+ // Push a page
2237+ instance.loadPluginByName("Test");
2238+ tryCompare(instance, "currentPlugin", "Test");
2239+
2240+ // Pop a page
2241+ apl.removePages(apl.primaryPage);
2242+ tryCompare(instance, "currentPlugin", "");
2243+ }
2244+
2245+ // Seems this is how Unity8 is resizing a window to its previous size.
2246+ function test_placeholder_plugin_is_not_initially_shown_on_narrow() {
2247+ testRoot.width = units.gu(150);
2248+ instance = mainWindowComponent.createObject(testRoot, {
2249+ pluginManager: manager, defaultPlugin: data.default,
2250+ placeholderPlugin: "Test"
2251+ });
2252+ testRoot.width = units.gu(50);
2253+ waitForRendering(instance);
2254+ waitForPageToGoAway("testPage");
2255+ }
2256+ }
2257 }

Subscribers

People subscribed via source and target branches