Merge lp:~aacid/unity8/require_qt56 into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michael Zanetti
Approved revision: 2748
Merged at revision: 2760
Proposed branch: lp:~aacid/unity8/require_qt56
Merge into: lp:unity8
Diff against target: 1408 lines (+123/-115)
68 files modified
CMakeLists.txt (+7/-7)
debian/control (+5/-5)
plugins/AccountsService/AccountsService.h (+1/-1)
plugins/Cursor/CursorImageInfo.cpp (+1/-2)
plugins/Dash/abstractdashview.cpp (+1/-1)
plugins/LightDM/IntegratedLightDM/liblightdm/Greeter.h (+2/-2)
plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModel.cpp (+0/-1)
plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModel.h (+2/-2)
plugins/LightDM/IntegratedLightDM/liblightdm/UsersModel.h (+1/-2)
plugins/LightDM/SessionsModel.h (+1/-2)
plugins/Lights/Lights.h (+1/-1)
plugins/Powerd/Powerd.h (+2/-2)
plugins/UInput/uinput.h (+1/-1)
plugins/Ubuntu/Gestures/Direction.h (+1/-1)
plugins/Ubuntu/Gestures/TouchGestureArea.h (+1/-1)
plugins/Unity/DashCommunicator/CMakeLists.txt (+1/-0)
plugins/Unity/DashCommunicator/dashconnection.cpp (+3/-0)
plugins/Unity/Indicators/indicators.h (+5/-5)
plugins/Unity/Indicators/indicatorsmodel.h (+0/-1)
plugins/Unity/InputInfo/qinputinfo.h (+2/-3)
plugins/Utils/appdrawerproxymodel.cpp (+2/-2)
plugins/Utils/appdrawerproxymodel.h (+2/-2)
plugins/Utils/easingcurve.h (+0/-1)
plugins/Utils/unitysortfilterproxymodelqml.h (+5/-0)
plugins/Utils/windowstatestorage.h (+1/-3)
plugins/Wizard/PageList.cpp (+2/-5)
plugins/Wizard/timezonemodel.h (+1/-1)
src/libunity8-private/abstractdbusservicemonitor.h (+1/-1)
tests/mocks/AccountsService/AccountsService.h (+1/-1)
tests/mocks/LightDM/IntegratedLightDM/liblightdm/Greeter.cpp (+1/-1)
tests/mocks/LightDM/IntegratedLightDM/liblightdm/Greeter.h (+2/-2)
tests/mocks/LightDM/IntegratedLightDM/liblightdm/SessionsModel.cpp (+0/-1)
tests/mocks/LightDM/IntegratedLightDM/liblightdm/SessionsModel.h (+2/-2)
tests/mocks/LightDM/IntegratedLightDM/liblightdm/UsersModel.cpp (+0/-2)
tests/mocks/LightDM/IntegratedLightDM/liblightdm/UsersModel.h (+1/-2)
tests/mocks/Lights/Lights.h (+1/-1)
tests/mocks/Powerd/Powerd.h (+2/-2)
tests/mocks/QMenuModel/dbus-enums.h (+2/-3)
tests/mocks/QMenuModel/unitymenumodel.cpp (+3/-3)
tests/mocks/QtMultimedia/mediaplayer.cpp (+2/-2)
tests/mocks/QtMultimedia/mediaplayer.h (+6/-6)
tests/mocks/UInput/mockuinput.h (+1/-1)
tests/mocks/Ubuntu/Connectivity/networking-status.h (+2/-3)
tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/MockSecurityPrivacy.h (+1/-1)
tests/mocks/Unity/Application/ApplicationInfo.h (+1/-1)
tests/mocks/Unity/Application/MirSurfaceItem.cpp (+1/-1)
tests/mocks/Unity/Indicators/fakeindicatorsmodel.h (+0/-1)
tests/mocks/Unity/InputInfo/qinputdeviceinfo_mock.cpp (+6/-2)
tests/mocks/Unity/Launcher/MockAppDrawerModel.cpp (+1/-1)
tests/mocks/Unity/Notifications/MockActionModel.h (+1/-1)
tests/mocks/Unity/Notifications/MockNotification.h (+2/-1)
tests/mocks/Unity/Screens/screens.cpp (+1/-1)
tests/mocks/Unity/Screens/screens.h (+1/-1)
tests/mocks/Unity/fake_previewwidgetmodel.h (+1/-1)
tests/mocks/Unity/fake_scopes.cpp (+1/-1)
tests/mocks/Unity/fake_scopesoverview.h (+2/-0)
tests/mocks/Utils/windowstatestorage.h (+1/-3)
tests/mocks/libusermetrics/CMakeLists.txt (+1/-0)
tests/mocks/libusermetrics/ColorTheme.cpp (+4/-0)
tests/mocks/libusermetrics/UserMetrics.cpp (+5/-0)
tests/plugins/Dash/horizontaljournaltest.cpp (+2/-1)
tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp (+1/-0)
tests/plugins/Dash/organicgridtest.cpp (+1/-0)
tests/plugins/Dash/verticaljournaltest.cpp (+2/-1)
tests/plugins/Greeter/Unity/Launcher/launchermodelastest.cpp (+0/-1)
tests/plugins/Unity/Launcher/launchermodeltest.cpp (+5/-5)
tests/uqmlscene/main.cpp (+3/-3)
tests/utils/modules/Unity/Test/testutil.cpp (+1/-1)
To merge this branch: bzr merge lp:~aacid/unity8/require_qt56
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Approve
Unity8 CI Bot continuous-integration Approve
Review via email: mp+313831@code.launchpad.net

Commit message

Require Qt 5.6 & misc fixes

Require Qt 5.6:
    We align with what we're really testing
    We can use Q_ENUM/Q_FLAG instead of Q_ENUMS/Q_FLAGS (Qt 5.5)

CursorImageInfo.cpp
    Join two QString::arg into one

SessionsModel.cpp
UsersModel.cpp
    Remove useless Q_D

dashconnection.cpp
ColorTheme.cpp
UserMetrics.cpp
horizontaljournaltest.cpp
listviewwithpageheadersectionexternalmodeltest.cpp
organicgridtest.cpp
verticaljournaltest.cpp
    QObjects should have the Q_OBJECT macro

indicatorsmodel.h
fakeindicatorsmodel.h
    There's no Roles enum, remove

appdrawerproxymodel.cpp
MirSurfaceItem.cpp
    Add & to the foreach variable

appdrawerproxymodel.cpp
    Make the string comparison faster

easingcurve.h
    Remove QEasingCurve::Type declaration, it's already in Qt

unitysortfilterproxymodelqml.h
fake_scopesoverview.h
    Make some parent functions accessible to remove clang warnings

PageList.cpp
unitymenumodel.cpp
qinputdeviceinfo_mock.cpp
    Better way to iterate the container

Greeter.cpp
    Cheaper env var checking

mediaplayer.cpp
mediaplayer.h
    Rename timerEvent, clang was not happy since QObject has another one

ApplicationInfo.h
    Mark as override

MockAppDrawerModel.cpp
launchermodeltest.cpp
screens.cpp
    Fix warning

fake_previewwidgetmodel.h
    Forward declare struct the same way it is defined later

fake_scopes.cpp
    Safer connect

horizontaljournaltest.cpp
verticaljournaltest.cpp
testutil.cpp
    Use at instead of [] in temporary

launchermodelastest.cpp
    Remove unused member
    Use toModelIndex() instead of value<QModelIndex>()

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
lp:~aacid/unity8/require_qt56 updated
2747. By Albert Astals Cid

Easier way of deleting all but the last item

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2747
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2785/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3647
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2086
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2086
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3675
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3520
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3520/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3520
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3520/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3520
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3520/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3520
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3520/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3520
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3520/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3520
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3520/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2785/rebuild

review: Needs Fixing (continuous-integration)
lp:~aacid/unity8/require_qt56 updated
2748. By Albert Astals Cid

Fix the rwrite to use iterators properly

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2748
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2788/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/3650
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2088
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2088
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/3678
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3523
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3523/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3523
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3523/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3523
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3523/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3523
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3523/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3523
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3523/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3523
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3523/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2788/rebuild

review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Code changes look fine to me, it also builds fine with 5.6.1 here.

Revision history for this message
Michael Zanetti (mzanetti) wrote :

tested, works.

CI is happy too

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2016-12-12 16:45:09 +0000
+++ CMakeLists.txt 2017-01-02 08:48:40 +0000
@@ -62,13 +62,13 @@
62 ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/tests)62 ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/tests)
6363
64include(FindPkgConfig)64include(FindPkgConfig)
65find_package(Qt5Core 5.4 REQUIRED)65find_package(Qt5Core 5.6 REQUIRED)
66find_package(Qt5Qml 5.4 REQUIRED)66find_package(Qt5Qml 5.6 REQUIRED)
67find_package(Qt5Quick 5.4 REQUIRED)67find_package(Qt5Quick 5.6 REQUIRED)
68find_package(Qt5Gui 5.4 REQUIRED)68find_package(Qt5Gui 5.6 REQUIRED)
69find_package(Qt5DBus 5.4 REQUIRED)69find_package(Qt5DBus 5.6 REQUIRED)
70find_package(Qt5Concurrent 5.4 REQUIRED)70find_package(Qt5Concurrent 5.6 REQUIRED)
71find_package(Qt5Sql 5.4 REQUIRED)71find_package(Qt5Sql 5.6 REQUIRED)
7272
73pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=23)73pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=23)
74pkg_check_modules(GEONAMES REQUIRED geonames>=0.2)74pkg_check_modules(GEONAMES REQUIRED geonames>=0.2)
7575
=== modified file 'debian/control'
--- debian/control 2016-12-12 16:45:09 +0000
+++ debian/control 2017-01-02 08:48:40 +0000
@@ -51,7 +51,7 @@
51 qml-module-qt-labs-folderlistmodel,51 qml-module-qt-labs-folderlistmodel,
52 qml-module-qt-labs-settings,52 qml-module-qt-labs-settings,
53 qml-module-qtqml-statemachine,53 qml-module-qtqml-statemachine,
54 qml-module-qtmultimedia (>= 5.4.1-1ubuntu19~overlay2),54 qml-module-qtmultimedia (>= 5.6),
55 qml-module-qtquick-layouts,55 qml-module-qtquick-layouts,
56 qml-module-qtquick-xmllistmodel,56 qml-module-qtquick-xmllistmodel,
57 qml-module-qtquick2,57 qml-module-qtquick2,
@@ -60,12 +60,12 @@
60 qml-module-ubuntu-components (>= 1.3.2030) | qml-module-ubuntu-components-gles (>= 1.3.2030),60 qml-module-ubuntu-components (>= 1.3.2030) | qml-module-ubuntu-components-gles (>= 1.3.2030),
61 qml-module-ubuntu-web,61 qml-module-ubuntu-web,
62 qt5-default,62 qt5-default,
63 qtbase5-dev (>= 5.4),63 qtbase5-dev (>= 5.6),
64 qtbase5-dev-tools,64 qtbase5-dev-tools,
65 qtbase5-private-dev (>= 5.4),65 qtbase5-private-dev (>= 5.6),
66 qtdeclarative5-dev (>= 5.4),66 qtdeclarative5-dev (>= 5.6),
67 qtdeclarative5-dev-tools,67 qtdeclarative5-dev-tools,
68 qtdeclarative5-private-dev (>= 5.4),68 qtdeclarative5-private-dev (>= 5.6),
69 qtdeclarative5-ubuntu-content1,69 qtdeclarative5-ubuntu-content1,
70 qtdeclarative5-ubuntu-settings-components (>= 0.11),70 qtdeclarative5-ubuntu-settings-components (>= 0.11),
71 ttf-ubuntu-font-family,71 ttf-ubuntu-font-family,
7272
=== modified file 'plugins/AccountsService/AccountsService.h'
--- plugins/AccountsService/AccountsService.h 2016-08-08 10:10:25 +0000
+++ plugins/AccountsService/AccountsService.h 2017-01-02 08:48:40 +0000
@@ -29,7 +29,6 @@
29class AccountsService: public QObject29class AccountsService: public QObject
30{30{
31 Q_OBJECT31 Q_OBJECT
32 Q_ENUMS(PasswordDisplayHint)
33 Q_PROPERTY (QString user32 Q_PROPERTY (QString user
34 READ user33 READ user
35 WRITE setUser34 WRITE setUser
@@ -86,6 +85,7 @@
86 Keyboard,85 Keyboard,
87 Numeric,86 Numeric,
88 };87 };
88 Q_ENUM(PasswordDisplayHint)
8989
90 explicit AccountsService(QObject *parent = 0, const QString & user = QString());90 explicit AccountsService(QObject *parent = 0, const QString & user = QString());
91 ~AccountsService() = default;91 ~AccountsService() = default;
9292
=== modified file 'plugins/Cursor/CursorImageInfo.cpp'
--- plugins/Cursor/CursorImageInfo.cpp 2016-07-15 14:36:52 +0000
+++ plugins/Cursor/CursorImageInfo.cpp 2017-01-02 08:48:40 +0000
@@ -108,8 +108,7 @@
108QUrl CursorImageInfo::imageSource() const108QUrl CursorImageInfo::imageSource() const
109{109{
110 auto urlString = QString("image://cursor/%1/%2/%3")110 auto urlString = QString("image://cursor/%1/%2/%3")
111 .arg(m_themeName)111 .arg(m_themeName, m_cursorName)
112 .arg(m_cursorName)
113 .arg(m_cursorHeight);112 .arg(m_cursorHeight);
114113
115 return QUrl(urlString);114 return QUrl(urlString);
116115
=== modified file 'plugins/Dash/abstractdashview.cpp'
--- plugins/Dash/abstractdashview.cpp 2016-07-12 15:05:58 +0000
+++ plugins/Dash/abstractdashview.cpp 2017-01-02 08:48:40 +0000
@@ -23,7 +23,7 @@
23 , m_asyncRequestedIndex(-1)23 , m_asyncRequestedIndex(-1)
24 , m_columnSpacing(0)24 , m_columnSpacing(0)
25 , m_rowSpacing(0)25 , m_rowSpacing(0)
26 , m_buffer(320) // Same value used in qquickitemview.cpp in Qt 5.426 , m_buffer(320) // Same value as QML_VIEW_DEFAULTCACHEBUFFER in qquickitemview.cpp (Qt 5.6)
27 , m_displayMarginBeginning(0)27 , m_displayMarginBeginning(0)
28 , m_displayMarginEnd(0)28 , m_displayMarginEnd(0)
29 , m_needsRelayout(false)29 , m_needsRelayout(false)
3030
=== modified file 'plugins/LightDM/IntegratedLightDM/liblightdm/Greeter.h'
--- plugins/LightDM/IntegratedLightDM/liblightdm/Greeter.h 2016-07-28 15:34:29 +0000
+++ plugins/LightDM/IntegratedLightDM/liblightdm/Greeter.h 2017-01-02 08:48:40 +0000
@@ -46,18 +46,18 @@
46 Q_PROPERTY(QString hostname READ hostname CONSTANT)46 Q_PROPERTY(QString hostname READ hostname CONSTANT)
47 Q_PROPERTY(bool hasGuestAccount READ hasGuestAccountHint CONSTANT)47 Q_PROPERTY(bool hasGuestAccount READ hasGuestAccountHint CONSTANT)
4848
49 Q_ENUMS(PromptType MessageType)
50
51public:49public:
52 enum PromptType {50 enum PromptType {
53 PromptTypeQuestion,51 PromptTypeQuestion,
54 PromptTypeSecret52 PromptTypeSecret
55 };53 };
54 Q_ENUM(PromptType)
5655
57 enum MessageType {56 enum MessageType {
58 MessageTypeInfo,57 MessageTypeInfo,
59 MessageTypeError58 MessageTypeError
60 };59 };
60 Q_ENUM(MessageType)
6161
62 explicit Greeter(QObject* parent=0);62 explicit Greeter(QObject* parent=0);
63 virtual ~Greeter();63 virtual ~Greeter();
6464
=== modified file 'plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModel.cpp'
--- plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModel.cpp 2016-06-15 15:29:34 +0000
+++ plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModel.cpp 2017-01-02 08:48:40 +0000
@@ -38,7 +38,6 @@
38 QAbstractListModel(parent),38 QAbstractListModel(parent),
39 d_ptr(new SessionsModelPrivate(this))39 d_ptr(new SessionsModelPrivate(this))
40{40{
41 Q_D(SessionsModel);
42 m_roleNames = QAbstractListModel::roleNames();41 m_roleNames = QAbstractListModel::roleNames();
43 m_roleNames[KeyRole] = "key";42 m_roleNames[KeyRole] = "key";
44 m_roleNames[TypeRole] = "type";43 m_roleNames[TypeRole] = "type";
4544
=== modified file 'plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModel.h'
--- plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModel.h 2015-11-23 22:45:55 +0000
+++ plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModel.h 2017-01-02 08:48:40 +0000
@@ -35,8 +35,6 @@
35 {35 {
36 Q_OBJECT36 Q_OBJECT
3737
38 Q_ENUMS(SessionModelRoles SessionType)
39
40 public:38 public:
4139
42 enum SessionModelRoles {40 enum SessionModelRoles {
@@ -46,11 +44,13 @@
46 IdRole = KeyRole, /** Deprecated */44 IdRole = KeyRole, /** Deprecated */
47 TypeRole45 TypeRole
48 };46 };
47 Q_ENUM(SessionModelRoles)
4948
50 enum SessionType {49 enum SessionType {
51 LocalSessions,50 LocalSessions,
52 RemoteSessions51 RemoteSessions
53 };52 };
53 Q_ENUM(SessionType)
5454
55 explicit SessionsModel(QObject* parent=0); /** Deprecated. Loads local sessions*/55 explicit SessionsModel(QObject* parent=0); /** Deprecated. Loads local sessions*/
56 explicit SessionsModel(SessionsModel::SessionType, QObject* parent=0);56 explicit SessionsModel(SessionsModel::SessionType, QObject* parent=0);
5757
=== modified file 'plugins/LightDM/IntegratedLightDM/liblightdm/UsersModel.h'
--- plugins/LightDM/IntegratedLightDM/liblightdm/UsersModel.h 2016-06-27 14:51:40 +0000
+++ plugins/LightDM/IntegratedLightDM/liblightdm/UsersModel.h 2017-01-02 08:48:40 +0000
@@ -37,8 +37,6 @@
37{37{
38 Q_OBJECT38 Q_OBJECT
3939
40 Q_ENUMS(UserModelRoles)
41
42public:40public:
43 explicit UsersModel(QObject *parent = 0);41 explicit UsersModel(QObject *parent = 0);
44 virtual ~UsersModel() = default;42 virtual ~UsersModel() = default;
@@ -53,6 +51,7 @@
53 BackgroundPathRole,51 BackgroundPathRole,
54 UidRole52 UidRole
55 };53 };
54 Q_ENUM(UserModelRoles)
5655
57 int rowCount(const QModelIndex &parent) const override;56 int rowCount(const QModelIndex &parent) const override;
58 QVariant data(const QModelIndex &index, int role) const override;57 QVariant data(const QModelIndex &index, int role) const override;
5958
=== modified file 'plugins/LightDM/SessionsModel.h'
--- plugins/LightDM/SessionsModel.h 2015-11-24 00:25:27 +0000
+++ plugins/LightDM/SessionsModel.h 2017-01-02 08:48:40 +0000
@@ -28,8 +28,6 @@
28{28{
29 Q_OBJECT29 Q_OBJECT
3030
31 Q_ENUMS(SessionModelRoles)
32
33 Q_PROPERTY(QList<QUrl> iconSearchDirectories READ iconSearchDirectories31 Q_PROPERTY(QList<QUrl> iconSearchDirectories READ iconSearchDirectories
34 WRITE setIconSearchDirectories NOTIFY iconSearchDirectoriesChanged)32 WRITE setIconSearchDirectories NOTIFY iconSearchDirectoriesChanged)
35Q_SIGNALS:33Q_SIGNALS:
@@ -45,6 +43,7 @@
45 TypeRole = QLightDM::SessionsModel::SessionModelRoles::TypeRole,43 TypeRole = QLightDM::SessionsModel::SessionModelRoles::TypeRole,
46 IconRole44 IconRole
47 };45 };
46 Q_ENUM(SessionModelRoles)
4847
49 explicit SessionsModel(QObject* parent=nullptr);48 explicit SessionsModel(QObject* parent=nullptr);
5049
5150
=== modified file 'plugins/Lights/Lights.h'
--- plugins/Lights/Lights.h 2014-07-02 23:15:54 +0000
+++ plugins/Lights/Lights.h 2017-01-02 08:48:40 +0000
@@ -27,7 +27,6 @@
27class Lights: public QObject27class Lights: public QObject
28{28{
29 Q_OBJECT29 Q_OBJECT
30 Q_ENUMS(State)
31 Q_PROPERTY(State state READ state WRITE setState NOTIFY stateChanged)30 Q_PROPERTY(State state READ state WRITE setState NOTIFY stateChanged)
32 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)31 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
33 Q_PROPERTY(int onMillisec READ onMillisec WRITE setOnMillisec NOTIFY onMillisecChanged)32 Q_PROPERTY(int onMillisec READ onMillisec WRITE setOnMillisec NOTIFY onMillisecChanged)
@@ -38,6 +37,7 @@
38 Off,37 Off,
39 On,38 On,
40 };39 };
40 Q_ENUM(State)
4141
42 explicit Lights(QObject *parent = 0);42 explicit Lights(QObject *parent = 0);
43 ~Lights();43 ~Lights();
4444
=== modified file 'plugins/Powerd/Powerd.h'
--- plugins/Powerd/Powerd.h 2015-10-05 02:14:13 +0000
+++ plugins/Powerd/Powerd.h 2017-01-02 08:48:40 +0000
@@ -27,8 +27,6 @@
27class Powerd: public QObject27class Powerd: public QObject
28{28{
29 Q_OBJECT29 Q_OBJECT
30 Q_ENUMS(Status)
31 Q_ENUMS(DisplayStateChangeReason)
32 Q_PROPERTY(Status status READ status NOTIFY statusChanged)30 Q_PROPERTY(Status status READ status NOTIFY statusChanged)
3331
34public:32public:
@@ -41,11 +39,13 @@
41 SnapDecision = 5, // Display changed state due to snap decision prompt39 SnapDecision = 5, // Display changed state due to snap decision prompt
42 CallDone = 6, // Display changed state due to voice call end40 CallDone = 6, // Display changed state due to voice call end
43 };41 };
42 Q_ENUM(DisplayStateChangeReason)
4443
45 enum Status {44 enum Status {
46 Off,45 Off,
47 On,46 On,
48 };47 };
48 Q_ENUM(Status)
4949
50 explicit Powerd(QObject *parent = 0);50 explicit Powerd(QObject *parent = 0);
51 ~Powerd();51 ~Powerd();
5252
=== modified file 'plugins/UInput/uinput.h'
--- plugins/UInput/uinput.h 2015-11-25 14:58:55 +0000
+++ plugins/UInput/uinput.h 2017-01-02 08:48:40 +0000
@@ -27,7 +27,6 @@
27class UInput : public QObject27class UInput : public QObject
28{28{
29 Q_OBJECT29 Q_OBJECT
30 Q_ENUMS(Button)
3130
32public:31public:
33 enum Button {32 enum Button {
@@ -35,6 +34,7 @@
35 ButtonRight,34 ButtonRight,
36 ButtonMiddle35 ButtonMiddle
37 };36 };
37 Q_ENUM(Button)
3838
39 explicit UInput(QObject *parent = nullptr);39 explicit UInput(QObject *parent = nullptr);
40 ~UInput();40 ~UInput();
4141
=== modified file 'plugins/Ubuntu/Gestures/Direction.h'
--- plugins/Ubuntu/Gestures/Direction.h 2015-12-10 10:22:25 +0000
+++ plugins/Ubuntu/Gestures/Direction.h 2017-01-02 08:48:40 +0000
@@ -26,7 +26,6 @@
26 */26 */
27class UBUNTUGESTURESQML_EXPORT Direction : public QObject {27class UBUNTUGESTURESQML_EXPORT Direction : public QObject {
28 Q_OBJECT28 Q_OBJECT
29 Q_ENUMS(Type)
3029
31public:30public:
32 // Make sure it is kept synchronized with SDK UCSwipeArea::Direction31 // Make sure it is kept synchronized with SDK UCSwipeArea::Direction
@@ -38,6 +37,7 @@
38 Horizontal, // Along the X axis, in any direction37 Horizontal, // Along the X axis, in any direction
39 Vertical // Along the Y axis, in any direction38 Vertical // Along the Y axis, in any direction
40 };39 };
40 Q_ENUM(Type)
4141
42 Q_INVOKABLE static bool isHorizontal(Direction::Type type);42 Q_INVOKABLE static bool isHorizontal(Direction::Type type);
43 Q_INVOKABLE static bool isVertical(Direction::Type type);43 Q_INVOKABLE static bool isVertical(Direction::Type type);
4444
=== modified file 'plugins/Ubuntu/Gestures/TouchGestureArea.h'
--- plugins/Ubuntu/Gestures/TouchGestureArea.h 2016-08-29 23:35:35 +0000
+++ plugins/Ubuntu/Gestures/TouchGestureArea.h 2017-01-02 08:48:40 +0000
@@ -114,7 +114,6 @@
114class UBUNTUGESTURESQML_EXPORT TouchGestureArea : public QQuickItem114class UBUNTUGESTURESQML_EXPORT TouchGestureArea : public QQuickItem
115{115{
116 Q_OBJECT116 Q_OBJECT
117 Q_ENUMS(Status)
118117
119 Q_PROPERTY(int status READ status NOTIFY statusChanged)118 Q_PROPERTY(int status READ status NOTIFY statusChanged)
120 Q_PROPERTY(bool dragging READ dragging NOTIFY draggingChanged)119 Q_PROPERTY(bool dragging READ dragging NOTIFY draggingChanged)
@@ -137,6 +136,7 @@
137 Recognized,136 Recognized,
138 Rejected137 Rejected
139 };138 };
139 Q_ENUM(Status)
140 TouchGestureArea(QQuickItem* parent = nullptr);140 TouchGestureArea(QQuickItem* parent = nullptr);
141 ~TouchGestureArea();141 ~TouchGestureArea();
142142
143143
=== modified file 'plugins/Unity/DashCommunicator/CMakeLists.txt'
--- plugins/Unity/DashCommunicator/CMakeLists.txt 2014-09-24 17:34:33 +0000
+++ plugins/Unity/DashCommunicator/CMakeLists.txt 2017-01-02 08:48:40 +0000
@@ -1,5 +1,6 @@
1include_directories(1include_directories(
2 ${CMAKE_CURRENT_SOURCE_DIR}2 ${CMAKE_CURRENT_SOURCE_DIR}
3 ${CMAKE_CURRENT_BINARY_DIR}
3 ${libunity8-private_SOURCE_DIR}4 ${libunity8-private_SOURCE_DIR}
4)5)
56
67
=== modified file 'plugins/Unity/DashCommunicator/dashconnection.cpp'
--- plugins/Unity/DashCommunicator/dashconnection.cpp 2015-09-14 09:11:08 +0000
+++ plugins/Unity/DashCommunicator/dashconnection.cpp 2017-01-02 08:48:40 +0000
@@ -32,6 +32,7 @@
32 */32 */
33class AsyncDBusInterface : public QDBusAbstractInterface33class AsyncDBusInterface : public QDBusAbstractInterface
34{34{
35 Q_OBJECT
35public:36public:
36 AsyncDBusInterface(const QString &service, const QString &path,37 AsyncDBusInterface(const QString &service, const QString &path,
37 const QString &interface, const QDBusConnection &connection,38 const QString &interface, const QDBusConnection &connection,
@@ -61,3 +62,5 @@
61 dbusInterface()->asyncCall(QStringLiteral("SetCurrentScope"), index, animate, isSwipe);62 dbusInterface()->asyncCall(QStringLiteral("SetCurrentScope"), index, animate, isSwipe);
62 }63 }
63}64}
65
66#include "dashconnection.moc"
6467
=== modified file 'plugins/Unity/Indicators/indicators.h'
--- plugins/Unity/Indicators/indicators.h 2015-01-20 16:21:07 +0000
+++ plugins/Unity/Indicators/indicators.h 2017-01-02 08:48:40 +0000
@@ -27,13 +27,13 @@
27{27{
28 Q_OBJECT28 Q_OBJECT
29public:29public:
30 Q_ENUMS(ActionStates)
31 enum ActionStates {30 enum ActionStates {
32 Label = 0x00,31 Label = 0x00,
33 IconSource = 0x01,32 IconSource = 0x01,
34 AccessableName = 0x02,33 AccessableName = 0x02,
35 Visible = 0x03,34 Visible = 0x03,
36 };35 };
36 Q_ENUM(ActionStates)
3737
38 ActionState(QObject*parent=0):QObject(parent) {}38 ActionState(QObject*parent=0):QObject(parent) {}
39};39};
@@ -42,11 +42,11 @@
42{42{
43 Q_OBJECT43 Q_OBJECT
44public:44public:
45 Q_ENUMS(NetworkActionStates)
46 enum NetworkActionStates {45 enum NetworkActionStates {
47 Connection = 0x01,46 Connection = 0x01,
48 SignalStrength = 0x02,47 SignalStrength = 0x02,
49 };48 };
49 Q_ENUM(NetworkActionStates)
5050
51 NetworkActionState(QObject*parent=0):QObject(parent) {}51 NetworkActionState(QObject*parent=0):QObject(parent) {}
52};52};
@@ -55,13 +55,13 @@
55{55{
56 Q_OBJECT56 Q_OBJECT
57public:57public:
58 Q_ENUMS(NetworkConnectionStates)
59 enum NetworkConnectionStates {58 enum NetworkConnectionStates {
60 Initial = 0x00,59 Initial = 0x00,
61 Activating = 0x01,60 Activating = 0x01,
62 Activated = 0x02,61 Activated = 0x02,
63 Deactivating = 0x03,62 Deactivating = 0x03,
64 };63 };
64 Q_ENUM(NetworkConnectionStates)
6565
66 NetworkConnection(QObject*parent=0):QObject(parent) {}66 NetworkConnection(QObject*parent=0):QObject(parent) {}
67};67};
@@ -70,12 +70,12 @@
70{70{
71 Q_OBJECT71 Q_OBJECT
72public:72public:
73 Q_ENUMS(Roles)
74 enum Roles {73 enum Roles {
75 Identifier = 0,74 Identifier = 0,
76 Position,75 Position,
77 IndicatorProperties76 IndicatorProperties
78 };77 };
78 Q_ENUM(Roles)
7979
80 IndicatorsModelRole(QObject*parent=0):QObject(parent) {}80 IndicatorsModelRole(QObject*parent=0):QObject(parent) {}
81};81};
@@ -84,7 +84,6 @@
84{84{
85 Q_OBJECT85 Q_OBJECT
86public:86public:
87 Q_ENUMS(Roles)
88 enum Roles {87 enum Roles {
89 Action = Qt::DisplayRole + 1,88 Action = Qt::DisplayRole + 1,
90 Label,89 Label,
@@ -93,6 +92,7 @@
93 hasSection,92 hasSection,
94 hasSubMenu93 hasSubMenu
95 };94 };
95 Q_ENUM(Roles)
9696
97 FlatMenuProxyModelRole(QObject*parent=0):QObject(parent) {}97 FlatMenuProxyModelRole(QObject*parent=0):QObject(parent) {}
98};98};
9999
=== modified file 'plugins/Unity/Indicators/indicatorsmodel.h'
--- plugins/Unity/Indicators/indicatorsmodel.h 2015-11-21 22:41:41 +0000
+++ plugins/Unity/Indicators/indicatorsmodel.h 2017-01-02 08:48:40 +0000
@@ -32,7 +32,6 @@
32class UNITYINDICATORS_EXPORT IndicatorsModel : public QAbstractListModel32class UNITYINDICATORS_EXPORT IndicatorsModel : public QAbstractListModel
33{33{
34 Q_OBJECT34 Q_OBJECT
35 Q_ENUMS(Roles)
36 Q_PROPERTY(int count READ count NOTIFY countChanged)35 Q_PROPERTY(int count READ count NOTIFY countChanged)
37 Q_PROPERTY(QString profile READ profile WRITE setProfile NOTIFY profileChanged)36 Q_PROPERTY(QString profile READ profile WRITE setProfile NOTIFY profileChanged)
3837
3938
=== modified file 'plugins/Unity/InputInfo/qinputinfo.h'
--- plugins/Unity/InputInfo/qinputinfo.h 2015-10-02 14:23:01 +0000
+++ plugins/Unity/InputInfo/qinputinfo.h 2017-01-02 08:48:40 +0000
@@ -57,8 +57,6 @@
57class QInputDevice : public QObject57class QInputDevice : public QObject
58{58{
59 Q_OBJECT59 Q_OBJECT
60 Q_ENUMS(InputType)
61 Q_FLAGS(InputType InputTypeFlags)
62 friend class QInputDeviceManagerPrivate;60 friend class QInputDeviceManagerPrivate;
6361
64public:62public:
@@ -72,8 +70,9 @@
72 Keyboard = 16,70 Keyboard = 16,
73 Switch = 3271 Switch = 32
74 };72 };
75 Q_ENUMS(InputType)73 Q_FLAG(InputType)
76 Q_DECLARE_FLAGS(InputTypeFlags, InputType)74 Q_DECLARE_FLAGS(InputTypeFlags, InputType)
75 Q_FLAG(InputTypeFlags)
7776
78 explicit QInputDevice(QObject *parent = 0);77 explicit QInputDevice(QObject *parent = 0);
79 QString name() const;78 QString name() const;
8079
=== modified file 'plugins/Utils/appdrawerproxymodel.cpp'
--- plugins/Utils/appdrawerproxymodel.cpp 2016-11-28 13:27:22 +0000
+++ plugins/Utils/appdrawerproxymodel.cpp 2017-01-02 08:48:40 +0000
@@ -157,8 +157,8 @@
157 QStringList allWords = m_source->data(m_source->index(source_row, 0), AppDrawerModelInterface::RoleKeywords).toStringList();157 QStringList allWords = m_source->data(m_source->index(source_row, 0), AppDrawerModelInterface::RoleKeywords).toStringList();
158 allWords.prepend(m_source->data(m_source->index(source_row, 0), AppDrawerModelInterface::RoleName).toString());158 allWords.prepend(m_source->data(m_source->index(source_row, 0), AppDrawerModelInterface::RoleName).toString());
159 bool found = false;159 bool found = false;
160 Q_FOREACH (const QString currentWord, allWords) {160 Q_FOREACH (const QString &currentWord, allWords) {
161 if (currentWord.toLower().startsWith(m_filterString.toLower())) {161 if (currentWord.startsWith(m_filterString, Qt::CaseInsensitive)) {
162 found = true;162 found = true;
163 break;163 break;
164 }164 }
165165
=== modified file 'plugins/Utils/appdrawerproxymodel.h'
--- plugins/Utils/appdrawerproxymodel.h 2016-11-28 10:17:22 +0000
+++ plugins/Utils/appdrawerproxymodel.h 2017-01-02 08:48:40 +0000
@@ -23,8 +23,6 @@
23class AppDrawerProxyModel: public QSortFilterProxyModel23class AppDrawerProxyModel: public QSortFilterProxyModel
24{24{
25 Q_OBJECT25 Q_OBJECT
26 Q_ENUMS(GroupBy)
27 Q_ENUMS(SortBy)
28 Q_PROPERTY(QAbstractItemModel* source READ source WRITE setSource NOTIFY sourceChanged)26 Q_PROPERTY(QAbstractItemModel* source READ source WRITE setSource NOTIFY sourceChanged)
29 Q_PROPERTY(GroupBy group READ group WRITE setGroup NOTIFY groupChanged)27 Q_PROPERTY(GroupBy group READ group WRITE setGroup NOTIFY groupChanged)
30 Q_PROPERTY(QString filterLetter READ filterLetter WRITE setFilterLetter NOTIFY filterLetterChanged)28 Q_PROPERTY(QString filterLetter READ filterLetter WRITE setFilterLetter NOTIFY filterLetterChanged)
@@ -38,10 +36,12 @@
38 GroupByAll,36 GroupByAll,
39 GroupByAToZ37 GroupByAToZ
40 };38 };
39 Q_ENUM(GroupBy)
41 enum SortBy {40 enum SortBy {
42 SortByAToZ,41 SortByAToZ,
43 SortByUsage42 SortByUsage
44 };43 };
44 Q_ENUM(SortBy)
4545
46 AppDrawerProxyModel(QObject* parent = nullptr);46 AppDrawerProxyModel(QObject* parent = nullptr);
4747
4848
=== modified file 'plugins/Utils/easingcurve.h'
--- plugins/Utils/easingcurve.h 2015-11-20 15:01:39 +0000
+++ plugins/Utils/easingcurve.h 2017-01-02 08:48:40 +0000
@@ -36,7 +36,6 @@
36class EasingCurve: public QObject36class EasingCurve: public QObject
37{37{
38 Q_OBJECT38 Q_OBJECT
39 Q_ENUMS(QEasingCurve::Type)
40 Q_PROPERTY(QEasingCurve::Type type READ type WRITE setType NOTIFY typeChanged)39 Q_PROPERTY(QEasingCurve::Type type READ type WRITE setType NOTIFY typeChanged)
41 Q_PROPERTY(qreal period READ period WRITE setPeriod NOTIFY periodChanged)40 Q_PROPERTY(qreal period READ period WRITE setPeriod NOTIFY periodChanged)
42 Q_PROPERTY(qreal progress READ progress WRITE setProgress NOTIFY progressChanged)41 Q_PROPERTY(qreal progress READ progress WRITE setProgress NOTIFY progressChanged)
4342
=== modified file 'plugins/Utils/unitysortfilterproxymodelqml.h'
--- plugins/Utils/unitysortfilterproxymodelqml.h 2015-04-30 09:31:51 +0000
+++ plugins/Utils/unitysortfilterproxymodelqml.h 2017-01-02 08:48:40 +0000
@@ -38,6 +38,11 @@
38 Q_INVOKABLE int mapRowToSource(int row);38 Q_INVOKABLE int mapRowToSource(int row);
39 bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;39 bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
4040
41 // Make the QSortFilterProxyModel variants also accessible
42 using QSortFilterProxyModel::data;
43 using QSortFilterProxyModel::mapFromSource;
44 using QSortFilterProxyModel::mapToSource;
45
41 /* getters */46 /* getters */
42 int totalCount() const;47 int totalCount() const;
43 bool invertMatch() const;48 bool invertMatch() const;
4449
=== modified file 'plugins/Utils/windowstatestorage.h'
--- plugins/Utils/windowstatestorage.h 2016-12-01 18:35:18 +0000
+++ plugins/Utils/windowstatestorage.h 2017-01-02 08:48:40 +0000
@@ -25,7 +25,6 @@
25class WindowStateStorage: public QObject25class WindowStateStorage: public QObject
26{26{
27 Q_OBJECT27 Q_OBJECT
28 Q_ENUMS(WindowState)
29public:28public:
30 enum WindowState {29 enum WindowState {
31 WindowStateNormal = 1 << 0,30 WindowStateNormal = 1 << 0,
@@ -42,10 +41,9 @@
42 WindowStateMaximizedBottomRight = 1 << 11,41 WindowStateMaximizedBottomRight = 1 << 11,
43 WindowStateRestored = 1 << 1242 WindowStateRestored = 1 << 12
44 };43 };
44 Q_ENUM(WindowState)
45 Q_DECLARE_FLAGS(WindowStates, WindowState)45 Q_DECLARE_FLAGS(WindowStates, WindowState)
46#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))
47 Q_FLAG(WindowStates)46 Q_FLAG(WindowStates)
48#endif
4947
50 WindowStateStorage(QObject *parent = 0);48 WindowStateStorage(QObject *parent = 0);
51 virtual ~WindowStateStorage();49 virtual ~WindowStateStorage();
5250
=== modified file 'plugins/Wizard/PageList.cpp'
--- plugins/Wizard/PageList.cpp 2016-07-18 13:33:45 +0000
+++ plugins/Wizard/PageList.cpp 2017-01-02 08:48:40 +0000
@@ -71,11 +71,8 @@
71 // If there was a system update installed, skip until the last page to just greet the user71 // If there was a system update installed, skip until the last page to just greet the user
72 QSettings settings;72 QSettings settings;
73 if (settings.value(QStringLiteral("Wizard/SkipUntilFinishedPage")).toBool()) {73 if (settings.value(QStringLiteral("Wizard/SkipUntilFinishedPage")).toBool()) {
74 const QString lastPage = m_pages.lastKey();74 while (m_pages.count() > 1) {
75 Q_FOREACH(const QString &page, m_pages.keys()) {75 m_pages.erase(m_pages.begin());
76 if (Q_UNLIKELY(page != lastPage)) {
77 m_pages.remove(page);
78 }
79 }76 }
8077
81 // ... and reset it again for the next run78 // ... and reset it again for the next run
8279
=== modified file 'plugins/Wizard/timezonemodel.h'
--- plugins/Wizard/timezonemodel.h 2016-03-02 23:03:06 +0000
+++ plugins/Wizard/timezonemodel.h 2017-01-02 08:48:40 +0000
@@ -27,7 +27,6 @@
27 Q_PROPERTY(bool listUpdating READ listUpdating NOTIFY listUpdatingChanged)27 Q_PROPERTY(bool listUpdating READ listUpdating NOTIFY listUpdatingChanged)
28 Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged)28 Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged)
29 Q_PROPERTY(QString country READ country WRITE setCountry NOTIFY countryChanged)29 Q_PROPERTY(QString country READ country WRITE setCountry NOTIFY countryChanged)
30 Q_ENUMS(Roles)
3130
32public:31public:
33 explicit TimeZoneLocationModel(QObject *parent = nullptr);32 explicit TimeZoneLocationModel(QObject *parent = nullptr);
@@ -42,6 +41,7 @@
42 LatitudeRole,41 LatitudeRole,
43 LongitudeRole42 LongitudeRole
44 };43 };
44 Q_ENUM(Roles)
4545
46 int rowCount(const QModelIndex &parent = QModelIndex()) const override;46 int rowCount(const QModelIndex &parent = QModelIndex()) const override;
47 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;47 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
4848
=== modified file 'src/libunity8-private/abstractdbusservicemonitor.h'
--- src/libunity8-private/abstractdbusservicemonitor.h 2014-12-17 13:34:22 +0000
+++ src/libunity8-private/abstractdbusservicemonitor.h 2017-01-02 08:48:40 +0000
@@ -30,7 +30,6 @@
30class Q_DECL_EXPORT AbstractDBusServiceMonitor : public QObject30class Q_DECL_EXPORT AbstractDBusServiceMonitor : public QObject
31{31{
32 Q_OBJECT32 Q_OBJECT
33 Q_ENUMS(Bus)
34 Q_PROPERTY(bool serviceAvailable READ serviceAvailable NOTIFY serviceAvailableChanged)33 Q_PROPERTY(bool serviceAvailable READ serviceAvailable NOTIFY serviceAvailableChanged)
3534
36public:35public:
@@ -38,6 +37,7 @@
38 SessionBus,37 SessionBus,
39 SystemBus,38 SystemBus,
40 };39 };
40 Q_ENUM(Bus)
4141
42 explicit AbstractDBusServiceMonitor(const QString &service, const QString &path, const QString &interface,42 explicit AbstractDBusServiceMonitor(const QString &service, const QString &path, const QString &interface,
43 const Bus bus = SessionBus,43 const Bus bus = SessionBus,
4444
=== modified file 'tests/mocks/AccountsService/AccountsService.h'
--- tests/mocks/AccountsService/AccountsService.h 2016-08-30 13:43:08 +0000
+++ tests/mocks/AccountsService/AccountsService.h 2017-01-02 08:48:40 +0000
@@ -27,7 +27,6 @@
27class AccountsService: public QObject27class AccountsService: public QObject
28{28{
29 Q_OBJECT29 Q_OBJECT
30 Q_ENUMS(PasswordDisplayHint)
31 Q_PROPERTY (QString user30 Q_PROPERTY (QString user
32 READ user31 READ user
33 WRITE setUser32 WRITE setUser
@@ -94,6 +93,7 @@
94 Keyboard,93 Keyboard,
95 Numeric94 Numeric
96 };95 };
96 Q_ENUM(PasswordDisplayHint)
9797
98 explicit AccountsService(QObject *parent = 0);98 explicit AccountsService(QObject *parent = 0);
9999
100100
=== modified file 'tests/mocks/LightDM/IntegratedLightDM/liblightdm/Greeter.cpp'
--- tests/mocks/LightDM/IntegratedLightDM/liblightdm/Greeter.cpp 2016-07-28 15:34:29 +0000
+++ tests/mocks/LightDM/IntegratedLightDM/liblightdm/Greeter.cpp 2017-01-02 08:48:40 +0000
@@ -173,7 +173,7 @@
173173
174void Greeter::sendAuthenticationComplete()174void Greeter::sendAuthenticationComplete()
175{175{
176 if (qgetenv("UNITY_TESTING").isEmpty()) {176 if (qEnvironmentVariableIsEmpty("UNITY_TESTING")) {
177 // simulate PAM's delay177 // simulate PAM's delay
178 QTimer::singleShot(1000, this, &Greeter::authenticationComplete);178 QTimer::singleShot(1000, this, &Greeter::authenticationComplete);
179 } else {179 } else {
180180
=== modified file 'tests/mocks/LightDM/IntegratedLightDM/liblightdm/Greeter.h'
--- tests/mocks/LightDM/IntegratedLightDM/liblightdm/Greeter.h 2016-07-28 15:34:29 +0000
+++ tests/mocks/LightDM/IntegratedLightDM/liblightdm/Greeter.h 2017-01-02 08:48:40 +0000
@@ -42,8 +42,6 @@
42 Q_PROPERTY(QString hostname READ hostname CONSTANT)42 Q_PROPERTY(QString hostname READ hostname CONSTANT)
43 Q_PROPERTY(bool hasGuestAccount READ hasGuestAccountHint CONSTANT)43 Q_PROPERTY(bool hasGuestAccount READ hasGuestAccountHint CONSTANT)
4444
45 Q_ENUMS(PromptType MessageType)
46
47 //Mock-only API for testing purposes45 //Mock-only API for testing purposes
48 Q_PROPERTY(QString mockMode READ mockMode WRITE setMockMode NOTIFY mockModeChanged)46 Q_PROPERTY(QString mockMode READ mockMode WRITE setMockMode NOTIFY mockModeChanged)
4947
@@ -52,11 +50,13 @@
52 PromptTypeQuestion,50 PromptTypeQuestion,
53 PromptTypeSecret51 PromptTypeSecret
54 };52 };
53 Q_ENUM(PromptType)
5554
56 enum MessageType {55 enum MessageType {
57 MessageTypeInfo,56 MessageTypeInfo,
58 MessageTypeError57 MessageTypeError
59 };58 };
59 Q_ENUM(MessageType)
6060
61 explicit Greeter(QObject* parent=0);61 explicit Greeter(QObject* parent=0);
62 virtual ~Greeter();62 virtual ~Greeter();
6363
=== modified file 'tests/mocks/LightDM/IntegratedLightDM/liblightdm/SessionsModel.cpp'
--- tests/mocks/LightDM/IntegratedLightDM/liblightdm/SessionsModel.cpp 2016-07-13 20:24:24 +0000
+++ tests/mocks/LightDM/IntegratedLightDM/liblightdm/SessionsModel.cpp 2017-01-02 08:48:40 +0000
@@ -33,7 +33,6 @@
33 QAbstractListModel(parent),33 QAbstractListModel(parent),
34 d_ptr(new SessionsModelPrivate(this))34 d_ptr(new SessionsModelPrivate(this))
35{35{
36 Q_D(SessionsModel);
37 m_roleNames = QAbstractListModel::roleNames();36 m_roleNames = QAbstractListModel::roleNames();
38 m_roleNames[KeyRole] = "key";37 m_roleNames[KeyRole] = "key";
39 m_roleNames[TypeRole] = "type";38 m_roleNames[TypeRole] = "type";
4039
=== modified file 'tests/mocks/LightDM/IntegratedLightDM/liblightdm/SessionsModel.h'
--- tests/mocks/LightDM/IntegratedLightDM/liblightdm/SessionsModel.h 2016-07-13 20:24:24 +0000
+++ tests/mocks/LightDM/IntegratedLightDM/liblightdm/SessionsModel.h 2017-01-02 08:48:40 +0000
@@ -29,8 +29,6 @@
29 {29 {
30 Q_OBJECT30 Q_OBJECT
3131
32 Q_ENUMS(SessionModelRoles SessionType)
33
34 public:32 public:
3533
36 enum SessionModelRoles {34 enum SessionModelRoles {
@@ -40,11 +38,13 @@
40 IdRole = KeyRole, /** Deprecated */38 IdRole = KeyRole, /** Deprecated */
41 TypeRole39 TypeRole
42 };40 };
41 Q_ENUM(SessionModelRoles)
4342
44 enum SessionType {43 enum SessionType {
45 LocalSessions,44 LocalSessions,
46 RemoteSessions45 RemoteSessions
47 };46 };
47 Q_ENUM(SessionType)
4848
49 explicit SessionsModel(QObject* parent=nullptr); /** Deprecated. Loads local sessions*/49 explicit SessionsModel(QObject* parent=nullptr); /** Deprecated. Loads local sessions*/
50 explicit SessionsModel(SessionsModel::SessionType, QObject* parent=nullptr);50 explicit SessionsModel(SessionsModel::SessionType, QObject* parent=nullptr);
5151
=== modified file 'tests/mocks/LightDM/IntegratedLightDM/liblightdm/UsersModel.cpp'
--- tests/mocks/LightDM/IntegratedLightDM/liblightdm/UsersModel.cpp 2016-05-24 22:11:21 +0000
+++ tests/mocks/LightDM/IntegratedLightDM/liblightdm/UsersModel.cpp 2017-01-02 08:48:40 +0000
@@ -34,8 +34,6 @@
34 QAbstractListModel(parent),34 QAbstractListModel(parent),
35 d_ptr(new UsersModelPrivate(this))35 d_ptr(new UsersModelPrivate(this))
36{36{
37 Q_D(UsersModel);
38
39 // Extend roleNames (we want to keep the "display" role)37 // Extend roleNames (we want to keep the "display" role)
40 QHash<int, QByteArray> roles = roleNames();38 QHash<int, QByteArray> roles = roleNames();
41 roles[NameRole] = "name";39 roles[NameRole] = "name";
4240
=== modified file 'tests/mocks/LightDM/IntegratedLightDM/liblightdm/UsersModel.h'
--- tests/mocks/LightDM/IntegratedLightDM/liblightdm/UsersModel.h 2016-05-24 22:11:21 +0000
+++ tests/mocks/LightDM/IntegratedLightDM/liblightdm/UsersModel.h 2017-01-02 08:48:40 +0000
@@ -31,8 +31,6 @@
31{31{
32 Q_OBJECT32 Q_OBJECT
3333
34 Q_ENUMS(UserModelRoles)
35
36 //Mock-only API for testing purposes34 //Mock-only API for testing purposes
37 Q_PROPERTY(QString mockMode READ mockMode WRITE setMockMode NOTIFY mockModeChanged)35 Q_PROPERTY(QString mockMode READ mockMode WRITE setMockMode NOTIFY mockModeChanged)
3836
@@ -53,6 +51,7 @@
53 BackgroundPathRole,51 BackgroundPathRole,
54 UidRole52 UidRole
55 };53 };
54 Q_ENUM(UserModelRoles)
5655
57 int rowCount(const QModelIndex &parent) const override;56 int rowCount(const QModelIndex &parent) const override;
58 QVariant data(const QModelIndex &index, int role) const override;57 QVariant data(const QModelIndex &index, int role) const override;
5958
=== modified file 'tests/mocks/Lights/Lights.h'
--- tests/mocks/Lights/Lights.h 2014-11-11 10:45:41 +0000
+++ tests/mocks/Lights/Lights.h 2017-01-02 08:48:40 +0000
@@ -23,7 +23,6 @@
23class Lights: public QObject23class Lights: public QObject
24{24{
25 Q_OBJECT25 Q_OBJECT
26 Q_ENUMS(State)
27 Q_PROPERTY(State state READ state WRITE setState NOTIFY stateChanged)26 Q_PROPERTY(State state READ state WRITE setState NOTIFY stateChanged)
28 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)27 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
29 Q_PROPERTY(int onMillisec READ onMillisec WRITE setOnMillisec NOTIFY onMillisecChanged)28 Q_PROPERTY(int onMillisec READ onMillisec WRITE setOnMillisec NOTIFY onMillisecChanged)
@@ -34,6 +33,7 @@
34 Off,33 Off,
35 On,34 On,
36 };35 };
36 Q_ENUM(State)
3737
38 explicit Lights(QObject *parent = 0);38 explicit Lights(QObject *parent = 0);
39 ~Lights();39 ~Lights();
4040
=== modified file 'tests/mocks/Powerd/Powerd.h'
--- tests/mocks/Powerd/Powerd.h 2015-09-02 13:42:24 +0000
+++ tests/mocks/Powerd/Powerd.h 2017-01-02 08:48:40 +0000
@@ -24,8 +24,6 @@
24class Powerd: public QObject24class Powerd: public QObject
25{25{
26 Q_OBJECT26 Q_OBJECT
27 Q_ENUMS(Status)
28 Q_ENUMS(DisplayStateChangeReason)
29 Q_PROPERTY(Status status READ status NOTIFY statusChanged)27 Q_PROPERTY(Status status READ status NOTIFY statusChanged)
3028
31public:29public:
@@ -35,11 +33,13 @@
35 PowerKey = 2, // Display changed state due to user pressing power key33 PowerKey = 2, // Display changed state due to user pressing power key
36 Proximity = 3, // Display changed state due to proximity events34 Proximity = 3, // Display changed state due to proximity events
37 };35 };
36 Q_ENUM(DisplayStateChangeReason)
3837
39 enum Status {38 enum Status {
40 Off,39 Off,
41 On,40 On,
42 };41 };
42 Q_ENUM(Status)
4343
44 explicit Powerd(QObject *parent = 0);44 explicit Powerd(QObject *parent = 0);
4545
4646
=== modified file 'tests/mocks/QMenuModel/dbus-enums.h'
--- tests/mocks/QMenuModel/dbus-enums.h 2014-11-14 17:47:00 +0000
+++ tests/mocks/QMenuModel/dbus-enums.h 2017-01-02 08:48:40 +0000
@@ -28,9 +28,6 @@
28{28{
29 Q_OBJECT29 Q_OBJECT
3030
31 Q_ENUMS(BusType)
32 Q_ENUMS(ConnectionStatus)
33
34public:31public:
35 enum BusType {32 enum BusType {
36 None = 0,33 None = 0,
@@ -38,12 +35,14 @@
38 SystemBus,35 SystemBus,
39 LastBusType36 LastBusType
40 };37 };
38 Q_ENUM(BusType)
4139
42 enum ConnectionStatus {40 enum ConnectionStatus {
43 Disconnected = 0,41 Disconnected = 0,
44 Connecting,42 Connecting,
45 Connected43 Connected
46 };44 };
45 Q_ENUM(ConnectionStatus)
4746
48private:47private:
49 DBusEnums() {}48 DBusEnums() {}
5049
=== modified file 'tests/mocks/QMenuModel/unitymenumodel.cpp'
--- tests/mocks/QMenuModel/unitymenumodel.cpp 2014-10-07 10:28:59 +0000
+++ tests/mocks/QMenuModel/unitymenumodel.cpp 2017-01-02 08:48:40 +0000
@@ -220,9 +220,9 @@
220{220{
221 static QHash<QByteArray, int> roles;221 static QHash<QByteArray, int> roles;
222 if (roles.isEmpty()) {222 if (roles.isEmpty()) {
223 QHash<int, QByteArray> names = roleNames();223 const QHash<int, QByteArray> names = roleNames();
224 Q_FOREACH (int role, names.keys())224 for(auto it = names.begin(); it != names.end(); ++it)
225 roles.insert(names[role], role);225 roles.insert(it.value(), it.key());
226 }226 }
227227
228 return this->data(this->index(row, 0), roles[role]);228 return this->data(this->index(row, 0), roles[role]);
229229
=== modified file 'tests/mocks/QtMultimedia/mediaplayer.cpp'
--- tests/mocks/QtMultimedia/mediaplayer.cpp 2016-07-27 14:25:44 +0000
+++ tests/mocks/QtMultimedia/mediaplayer.cpp 2017-01-02 08:48:40 +0000
@@ -58,7 +58,7 @@
58{58{
59 qsrand(time(nullptr));59 qsrand(time(nullptr));
60 m_timer.setInterval(100);60 m_timer.setInterval(100);
61 connect(&m_timer, &QTimer::timeout, this, &MediaPlayer::timerEvent);61 connect(&m_timer, &QTimer::timeout, this, &MediaPlayer::processTimer);
6262
63 connect(MediaPlayerDataController::instance(), &MediaPlayerDataController::sourceAboutToBeRemoved,63 connect(MediaPlayerDataController::instance(), &MediaPlayerDataController::sourceAboutToBeRemoved,
64 this, [this](const QUrl& source) {64 this, [this](const QUrl& source) {
@@ -188,7 +188,7 @@
188 }188 }
189}189}
190190
191void MediaPlayer::timerEvent()191void MediaPlayer::processTimer()
192{192{
193 if (m_position + m_timer.interval() < duration()) {193 if (m_position + m_timer.interval() < duration()) {
194 m_position += m_timer.interval();194 m_position += m_timer.interval();
195195
=== modified file 'tests/mocks/QtMultimedia/mediaplayer.h'
--- tests/mocks/QtMultimedia/mediaplayer.h 2016-07-27 14:25:44 +0000
+++ tests/mocks/QtMultimedia/mediaplayer.h 2017-01-02 08:48:40 +0000
@@ -45,17 +45,13 @@
45 Q_PROPERTY(QObject *metaData READ metaData CONSTANT)45 Q_PROPERTY(QObject *metaData READ metaData CONSTANT)
46 Q_PROPERTY(DeclarativePlaylist *playlist READ playlist WRITE setPlaylist NOTIFY playlistChanged)46 Q_PROPERTY(DeclarativePlaylist *playlist READ playlist WRITE setPlaylist NOTIFY playlistChanged)
4747
48 Q_ENUMS(PlaybackState)
49 Q_ENUMS(AudioRole)
50 Q_ENUMS(Availability)
51 Q_ENUMS(Status)
52 Q_ENUMS(Error)
53public:48public:
54 enum PlaybackState {49 enum PlaybackState {
55 PlayingState,50 PlayingState,
56 PausedState,51 PausedState,
57 StoppedState52 StoppedState
58 };53 };
54 Q_ENUM(PlaybackState)
5955
60 enum AudioRole {56 enum AudioRole {
61 UnknownRole,57 UnknownRole,
@@ -69,6 +65,7 @@
69 SonificationRole,65 SonificationRole,
70 GameRole66 GameRole
71 };67 };
68 Q_ENUM(AudioRole)
7269
73 enum Availability {70 enum Availability {
74 Available,71 Available,
@@ -76,6 +73,7 @@
76 Unavailable,73 Unavailable,
77 ResourceMissing74 ResourceMissing
78 };75 };
76 Q_ENUM(Availability)
7977
80 enum Status {78 enum Status {
81 UnknownStatus,79 UnknownStatus,
@@ -88,6 +86,7 @@
88 EndOfMedia,86 EndOfMedia,
89 InvalidMedia87 InvalidMedia
90 };88 };
89 Q_ENUM(Status)
9190
92 enum Error {91 enum Error {
93 NoError,92 NoError,
@@ -97,6 +96,7 @@
97 AccessDeniedError,96 AccessDeniedError,
98 ServiceMissingError97 ServiceMissingError
99 };98 };
99 Q_ENUM(Error)
100100
101 explicit MediaPlayer(QObject *parent = nullptr);101 explicit MediaPlayer(QObject *parent = nullptr);
102102
@@ -145,7 +145,7 @@
145 void error(Error error, const QString &errorString);145 void error(Error error, const QString &errorString);
146146
147private Q_SLOTS:147private Q_SLOTS:
148 void timerEvent();148 void processTimer();
149149
150private:150private:
151 QUrl m_source;151 QUrl m_source;
152152
=== modified file 'tests/mocks/UInput/mockuinput.h'
--- tests/mocks/UInput/mockuinput.h 2016-01-20 19:21:31 +0000
+++ tests/mocks/UInput/mockuinput.h 2017-01-02 08:48:40 +0000
@@ -27,7 +27,6 @@
27class MockUInput : public QObject27class MockUInput : public QObject
28{28{
29 Q_OBJECT29 Q_OBJECT
30 Q_ENUMS(Button)
3130
32public:31public:
33 enum Button {32 enum Button {
@@ -35,6 +34,7 @@
35 ButtonRight,34 ButtonRight,
36 ButtonMiddle35 ButtonMiddle
37 };36 };
37 Q_ENUM(Button)
3838
39 explicit MockUInput(QObject *parent = nullptr);39 explicit MockUInput(QObject *parent = nullptr);
40 ~MockUInput();40 ~MockUInput();
4141
=== modified file 'tests/mocks/Ubuntu/Connectivity/networking-status.h'
--- tests/mocks/Ubuntu/Connectivity/networking-status.h 2014-09-01 10:25:28 +0000
+++ tests/mocks/Ubuntu/Connectivity/networking-status.h 2017-01-02 08:48:40 +0000
@@ -26,9 +26,6 @@
26 Q_OBJECT26 Q_OBJECT
27 Q_DISABLE_COPY(NetworkingStatus)27 Q_DISABLE_COPY(NetworkingStatus)
2828
29 Q_ENUMS(Limitations)
30 Q_ENUMS(Status)
31
32 Q_PROPERTY(QVector<Limitations> limitations READ limitations NOTIFY limitationsChanged)29 Q_PROPERTY(QVector<Limitations> limitations READ limitations NOTIFY limitationsChanged)
33 Q_PROPERTY(Status status READ status NOTIFY statusChanged)30 Q_PROPERTY(Status status READ status NOTIFY statusChanged)
34 Q_PROPERTY(bool online READ online NOTIFY onlineChanged)31 Q_PROPERTY(bool online READ online NOTIFY onlineChanged)
@@ -41,12 +38,14 @@
41 enum Limitations {38 enum Limitations {
42 Bandwith39 Bandwith
43 };40 };
41 Q_ENUM(Limitations)
4442
45 enum Status {43 enum Status {
46 Offline,44 Offline,
47 Connecting,45 Connecting,
48 Online46 Online
49 };47 };
48 Q_ENUM(Status)
5049
51 QVector<Limitations> limitations() const;50 QVector<Limitations> limitations() const;
52 Status status() const;51 Status status() const;
5352
=== modified file 'tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/MockSecurityPrivacy.h'
--- tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/MockSecurityPrivacy.h 2016-01-07 20:59:28 +0000
+++ tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/MockSecurityPrivacy.h 2017-01-02 08:48:40 +0000
@@ -22,7 +22,6 @@
22class MockSecurityPrivacy : public QObject22class MockSecurityPrivacy : public QObject
23{23{
24 Q_OBJECT24 Q_OBJECT
25 Q_ENUMS(SecurityType)
26 Q_PROPERTY (SecurityType securityType25 Q_PROPERTY (SecurityType securityType
27 READ getSecurityType26 READ getSecurityType
28 NOTIFY securityTypeChanged)27 NOTIFY securityTypeChanged)
@@ -33,6 +32,7 @@
33 Passcode,32 Passcode,
34 Passphrase,33 Passphrase,
35 };34 };
35 Q_ENUM(SecurityType)
3636
37 MockSecurityPrivacy(QObject *parent = 0);37 MockSecurityPrivacy(QObject *parent = 0);
3838
3939
=== modified file 'tests/mocks/Unity/Application/ApplicationInfo.h'
--- tests/mocks/Unity/Application/ApplicationInfo.h 2016-11-30 19:24:02 +0000
+++ tests/mocks/Unity/Application/ApplicationInfo.h 2017-01-02 08:48:40 +0000
@@ -112,7 +112,7 @@
112112
113 //////113 //////
114 // internal mock stuff114 // internal mock stuff
115 void close();115 void close() override;
116 void requestFocus();116 void requestFocus();
117117
118Q_SIGNALS:118Q_SIGNALS:
119119
=== modified file 'tests/mocks/Unity/Application/MirSurfaceItem.cpp'
--- tests/mocks/Unity/Application/MirSurfaceItem.cpp 2016-11-30 19:24:02 +0000
+++ tests/mocks/Unity/Application/MirSurfaceItem.cpp 2017-01-02 08:48:40 +0000
@@ -216,7 +216,7 @@
216 Q_EMIT touchReleaseCountChanged(m_touchReleaseCount);216 Q_EMIT touchReleaseCountChanged(m_touchReleaseCount);
217 }217 }
218218
219 Q_FOREACH(QTouchEvent::TouchPoint touchPoint, event->touchPoints()) {219 Q_FOREACH(const QTouchEvent::TouchPoint &touchPoint, event->touchPoints()) {
220 QString id(touchPoint.id());220 QString id(touchPoint.id());
221 QVariantList list = m_touchTrail[id].toList();221 QVariantList list = m_touchTrail[id].toList();
222 list.append(QVariant::fromValue(touchPoint.pos()));222 list.append(QVariant::fromValue(touchPoint.pos()));
223223
=== modified file 'tests/mocks/Unity/Indicators/fakeindicatorsmodel.h'
--- tests/mocks/Unity/Indicators/fakeindicatorsmodel.h 2015-04-30 09:31:51 +0000
+++ tests/mocks/Unity/Indicators/fakeindicatorsmodel.h 2017-01-02 08:48:40 +0000
@@ -25,7 +25,6 @@
25class FakeIndicatorsModel : public QAbstractListModel25class FakeIndicatorsModel : public QAbstractListModel
26{26{
27 Q_OBJECT27 Q_OBJECT
28 Q_ENUMS(Roles)
29 Q_PROPERTY(int count READ count NOTIFY countChanged)28 Q_PROPERTY(int count READ count NOTIFY countChanged)
30 Q_PROPERTY(QString profile READ profile WRITE setProfile NOTIFY profileChanged)29 Q_PROPERTY(QString profile READ profile WRITE setProfile NOTIFY profileChanged)
31 Q_PROPERTY(QVariant modelData READ modelData WRITE setModelData NOTIFY modelDataChanged)30 Q_PROPERTY(QVariant modelData READ modelData WRITE setModelData NOTIFY modelDataChanged)
3231
=== modified file 'tests/mocks/Unity/InputInfo/qinputdeviceinfo_mock.cpp'
--- tests/mocks/Unity/InputInfo/qinputdeviceinfo_mock.cpp 2016-04-04 07:49:06 +0000
+++ tests/mocks/Unity/InputInfo/qinputdeviceinfo_mock.cpp 2017-01-02 08:48:40 +0000
@@ -43,10 +43,14 @@
4343
44void QInputDeviceManagerPrivate::removeDevice(const QString &path)44void QInputDeviceManagerPrivate::removeDevice(const QString &path)
45{45{
46 Q_FOREACH (const QString devicePath, deviceMap.keys()) {46 auto it = deviceMap.begin();
47 while (it != deviceMap.end()) {
48 const QString devicePath = it.key();
47 if (devicePath.contains(path)) {49 if (devicePath.contains(path)) {
48 deviceMap.remove(devicePath);50 it = deviceMap.erase(it);
49 Q_EMIT deviceRemoved(devicePath);51 Q_EMIT deviceRemoved(devicePath);
52 } else {
53 ++it;
50 }54 }
51 }55 }
52}56}
5357
=== modified file 'tests/mocks/Unity/Launcher/MockAppDrawerModel.cpp'
--- tests/mocks/Unity/Launcher/MockAppDrawerModel.cpp 2016-11-24 16:17:30 +0000
+++ tests/mocks/Unity/Launcher/MockAppDrawerModel.cpp 2017-01-02 08:48:40 +0000
@@ -53,7 +53,7 @@
53 qsrand(QDateTime::currentMSecsSinceEpoch() / 1000);53 qsrand(QDateTime::currentMSecsSinceEpoch() / 1000);
54}54}
5555
56int MockAppDrawerModel::rowCount(const QModelIndex &parent) const56int MockAppDrawerModel::rowCount(const QModelIndex & /*parent*/) const
57{57{
58 return m_list.count();58 return m_list.count();
59}59}
6060
=== modified file 'tests/mocks/Unity/Notifications/MockActionModel.h'
--- tests/mocks/Unity/Notifications/MockActionModel.h 2015-09-23 11:21:07 +0000
+++ tests/mocks/Unity/Notifications/MockActionModel.h 2017-01-02 08:48:40 +0000
@@ -36,11 +36,11 @@
36 QVariant data(const QModelIndex &index, int role) const override;36 QVariant data(const QModelIndex &index, int role) const override;
37 QHash<int, QByteArray> roleNames() const override;37 QHash<int, QByteArray> roleNames() const override;
3838
39 Q_ENUMS(ActionsRoles)
40 enum ActionsRoles {39 enum ActionsRoles {
41 RoleActionLabel = Qt::UserRole + 1,40 RoleActionLabel = Qt::UserRole + 1,
42 RoleActionId = Qt::UserRole + 241 RoleActionId = Qt::UserRole + 2
43 };42 };
43 Q_ENUM(ActionsRoles)
44 Q_INVOKABLE QVariant data(int row, int role) const;44 Q_INVOKABLE QVariant data(int row, int role) const;
4545
46 Q_INVOKABLE void append(const QString &id, const QString &label);46 Q_INVOKABLE void append(const QString &id, const QString &label);
4747
=== modified file 'tests/mocks/Unity/Notifications/MockNotification.h'
--- tests/mocks/Unity/Notifications/MockNotification.h 2016-08-19 13:41:07 +0000
+++ tests/mocks/Unity/Notifications/MockNotification.h 2017-01-02 08:48:40 +0000
@@ -30,7 +30,6 @@
3030
31class MockNotification : public QObject {31class MockNotification : public QObject {
32 Q_OBJECT32 Q_OBJECT
33 Q_ENUMS(Type Urgency)
34 Q_PROPERTY(QString summary READ getSummary WRITE setSummary NOTIFY summaryChanged)33 Q_PROPERTY(QString summary READ getSummary WRITE setSummary NOTIFY summaryChanged)
35 Q_PROPERTY(QString body READ getBody WRITE setBody NOTIFY bodyChanged)34 Q_PROPERTY(QString body READ getBody WRITE setBody NOTIFY bodyChanged)
36 Q_PROPERTY(int nid READ getID WRITE setID NOTIFY idChanged)35 Q_PROPERTY(int nid READ getID WRITE setID NOTIFY idChanged)
@@ -48,7 +47,9 @@
4847
49public:48public:
50 enum Urgency { Low, Normal, Critical };49 enum Urgency { Low, Normal, Critical };
50 Q_ENUM(Urgency)
51 enum Type { PlaceHolder, Confirmation, Ephemeral, Interactive, SnapDecision };51 enum Type { PlaceHolder, Confirmation, Ephemeral, Interactive, SnapDecision };
52 Q_ENUM(Type)
5253
53Q_SIGNALS:54Q_SIGNALS:
54 void summaryChanged(const QString &summary);55 void summaryChanged(const QString &summary);
5556
=== modified file 'tests/mocks/Unity/Screens/screens.cpp'
--- tests/mocks/Unity/Screens/screens.cpp 2016-01-20 19:33:38 +0000
+++ tests/mocks/Unity/Screens/screens.cpp 2017-01-02 08:48:40 +0000
@@ -30,7 +30,7 @@
30 m_screenList.append(new Screen());30 m_screenList.append(new Screen());
31}31}
3232
33Screens::~Screens()33Screens::~Screens() noexcept
34{34{
35 qDeleteAll(m_screenList);35 qDeleteAll(m_screenList);
36 m_screenList.clear();36 m_screenList.clear();
3737
=== modified file 'tests/mocks/Unity/Screens/screens.h'
--- tests/mocks/Unity/Screens/screens.h 2015-12-03 11:45:52 +0000
+++ tests/mocks/Unity/Screens/screens.h 2017-01-02 08:48:40 +0000
@@ -25,7 +25,6 @@
25class Screens : public QAbstractListModel25class Screens : public QAbstractListModel
26{26{
27 Q_OBJECT27 Q_OBJECT
28 Q_ENUMS(OutputTypes)
2928
30 Q_PROPERTY(int count READ count NOTIFY countChanged)29 Q_PROPERTY(int count READ count NOTIFY countChanged)
3130
@@ -52,6 +51,7 @@
52 TV,51 TV,
53 EDP52 EDP
54 };53 };
54 Q_ENUM(OutputTypes)
5555
56 explicit Screens(QObject *parent = 0);56 explicit Screens(QObject *parent = 0);
57 virtual ~Screens() noexcept;57 virtual ~Screens() noexcept;
5858
=== modified file 'tests/mocks/Unity/fake_previewwidgetmodel.h'
--- tests/mocks/Unity/fake_previewwidgetmodel.h 2014-05-13 14:05:47 +0000
+++ tests/mocks/Unity/fake_previewwidgetmodel.h 2017-01-02 08:48:40 +0000
@@ -23,7 +23,7 @@
23#include <QSharedPointer>23#include <QSharedPointer>
24#include <QVariantMap>24#include <QVariantMap>
2525
26class PreviewData;26struct PreviewData;
2727
28class PreviewWidgetModel : public unity::shell::scopes::PreviewWidgetModelInterface28class PreviewWidgetModel : public unity::shell::scopes::PreviewWidgetModelInterface
29{29{
3030
=== modified file 'tests/mocks/Unity/fake_scopes.cpp'
--- tests/mocks/Unity/fake_scopes.cpp 2016-06-07 03:33:35 +0000
+++ tests/mocks/Unity/fake_scopes.cpp 2017-01-02 08:48:40 +0000
@@ -272,7 +272,7 @@
272 beginInsertRows(QModelIndex(), index, index);272 beginInsertRows(QModelIndex(), index, index);
273 m_scopes.append(scope);273 m_scopes.append(scope);
274 endInsertRows();274 endInsertRows();
275 connect(scope, &Scope::favoriteChanged, [this, scope]{275 connect(scope, &Scope::favoriteChanged, this, [this, scope]{
276 setFavorite(scope->id(), scope->favorite());276 setFavorite(scope->id(), scope->favorite());
277 });277 });
278 }278 }
279279
=== modified file 'tests/mocks/Unity/fake_scopesoverview.h'
--- tests/mocks/Unity/fake_scopesoverview.h 2015-10-14 12:46:35 +0000
+++ tests/mocks/Unity/fake_scopesoverview.h 2017-01-02 08:48:40 +0000
@@ -34,6 +34,8 @@
34 void setSearchQuery(const QString& search_query) override;34 void setSearchQuery(const QString& search_query) override;
35 Q_INVOKABLE void activate(QVariant const& result, QString const& categoryId) override;35 Q_INVOKABLE void activate(QVariant const& result, QString const& categoryId) override;
3636
37 using Scope::setFavorite;
38
37 // This is implementation detail39 // This is implementation detail
38 void setFavorite(Scope *scope, bool favorite);40 void setFavorite(Scope *scope, bool favorite);
39 void moveFavoriteTo(Scope *scope, int index);41 void moveFavoriteTo(Scope *scope, int index);
4042
=== modified file 'tests/mocks/Utils/windowstatestorage.h'
--- tests/mocks/Utils/windowstatestorage.h 2016-12-02 16:45:50 +0000
+++ tests/mocks/Utils/windowstatestorage.h 2017-01-02 08:48:40 +0000
@@ -25,7 +25,6 @@
25{25{
26 Q_OBJECT26 Q_OBJECT
27 Q_PROPERTY(QVariantMap geometry READ geometry WRITE setGeometry NOTIFY geometryChanged)27 Q_PROPERTY(QVariantMap geometry READ geometry WRITE setGeometry NOTIFY geometryChanged)
28 Q_ENUMS(WindowState)
29public:28public:
30 enum WindowState {29 enum WindowState {
31 WindowStateNormal = 1 << 0,30 WindowStateNormal = 1 << 0,
@@ -42,10 +41,9 @@
42 WindowStateMaximizedBottomRight = 1 << 11,41 WindowStateMaximizedBottomRight = 1 << 11,
43 WindowStateRestored = 1 << 1242 WindowStateRestored = 1 << 12
44 };43 };
44 Q_ENUM(WindowState)
45 Q_DECLARE_FLAGS(WindowStates, WindowState)45 Q_DECLARE_FLAGS(WindowStates, WindowState)
46#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))
47 Q_FLAG(WindowStates)46 Q_FLAG(WindowStates)
48#endif
4947
50 WindowStateStorage(QObject *parent = 0);48 WindowStateStorage(QObject *parent = 0);
5149
5250
=== modified file 'tests/mocks/libusermetrics/CMakeLists.txt'
--- tests/mocks/libusermetrics/CMakeLists.txt 2013-12-17 14:56:25 +0000
+++ tests/mocks/libusermetrics/CMakeLists.txt 2017-01-02 08:48:40 +0000
@@ -10,6 +10,7 @@
1010
11include_directories(11include_directories(
12 ${CMAKE_SOURCE_DIR}/plugins/Utils12 ${CMAKE_SOURCE_DIR}/plugins/Utils
13 ${CMAKE_CURRENT_BINARY_DIR}
13)14)
1415
15set_target_properties(MockUserMetrics PROPERTIES16set_target_properties(MockUserMetrics PROPERTIES
1617
=== modified file 'tests/mocks/libusermetrics/ColorTheme.cpp'
--- tests/mocks/libusermetrics/ColorTheme.cpp 2013-06-14 19:35:25 +0000
+++ tests/mocks/libusermetrics/ColorTheme.cpp 2017-01-02 08:48:40 +0000
@@ -30,6 +30,8 @@
3030
31class ColorThemePrivate: QObject31class ColorThemePrivate: QObject
32{32{
33 Q_OBJECT
34
33public:35public:
34 explicit ColorThemePrivate(ColorTheme *parent = 0);36 explicit ColorThemePrivate(ColorTheme *parent = 0);
3537
@@ -126,3 +128,5 @@
126{128{
127 return d_ptr->m_end;129 return d_ptr->m_end;
128}130}
131
132#include "ColorTheme.moc"
129133
=== modified file 'tests/mocks/libusermetrics/UserMetrics.cpp'
--- tests/mocks/libusermetrics/UserMetrics.cpp 2016-10-27 09:20:20 +0000
+++ tests/mocks/libusermetrics/UserMetrics.cpp 2017-01-02 08:48:40 +0000
@@ -36,6 +36,7 @@
3636
37class Q_DECL_EXPORT UserMetricsData: public QObject37class Q_DECL_EXPORT UserMetricsData: public QObject
38{38{
39 Q_OBJECT
39public:40public:
40 explicit UserMetricsData(QObject *parent);41 explicit UserMetricsData(QObject *parent);
4142
@@ -64,6 +65,7 @@
6465
65class UserMetricsPrivate: QObject66class UserMetricsPrivate: QObject
66{67{
68 Q_OBJECT
67public:69public:
68 explicit UserMetricsPrivate(UserMetrics *parent);70 explicit UserMetricsPrivate(UserMetrics *parent);
6971
@@ -106,6 +108,7 @@
106108
107class UserMetricsDataPrivate: QObject109class UserMetricsDataPrivate: QObject
108{110{
111 Q_OBJECT
109public:112public:
110 explicit UserMetricsDataPrivate(UserMetricsData *parent);113 explicit UserMetricsDataPrivate(UserMetricsData *parent);
111114
@@ -492,3 +495,5 @@
492{495{
493 return new UserMetrics();496 return new UserMetrics();
494}497}
498
499#include "UserMetrics.moc"
495500
=== modified file 'tests/plugins/Dash/horizontaljournaltest.cpp'
--- tests/plugins/Dash/horizontaljournaltest.cpp 2016-11-28 09:57:06 +0000
+++ tests/plugins/Dash/horizontaljournaltest.cpp 2017-01-02 08:48:40 +0000
@@ -28,6 +28,7 @@
28#include "horizontaljournal.h"28#include "horizontaljournal.h"
2929
30class WidthModel : public QAbstractListModel {30class WidthModel : public QAbstractListModel {
31 Q_OBJECT
31public:32public:
32 QHash<int, QByteArray> roleNames() const override33 QHash<int, QByteArray> roleNames() const override
33 {34 {
@@ -85,7 +86,7 @@
85 {86 {
86 QTRY_COMPARE(item->x(), x);87 QTRY_COMPARE(item->x(), x);
87 QTRY_COMPARE(item->y(), y);88 QTRY_COMPARE(item->y(), y);
88 QTRY_COMPARE(item->width(), model->stringList()[modelIndex].toDouble());89 QTRY_COMPARE(item->width(), model->stringList().at(modelIndex).toDouble());
89 QTRY_COMPARE(QQuickItemPrivate::get(item)->culled, !visible);90 QTRY_COMPARE(QQuickItemPrivate::get(item)->culled, !visible);
90 }91 }
9192
9293
=== modified file 'tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp'
--- tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp 2016-11-28 09:57:06 +0000
+++ tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp 2017-01-02 08:48:40 +0000
@@ -28,6 +28,7 @@
2828
29class StringListModel : public QAbstractListModel29class StringListModel : public QAbstractListModel
30{30{
31 Q_OBJECT
31public:32public:
32 StringListModel()33 StringListModel()
33 {34 {
3435
=== modified file 'tests/plugins/Dash/organicgridtest.cpp'
--- tests/plugins/Dash/organicgridtest.cpp 2016-11-28 09:57:06 +0000
+++ tests/plugins/Dash/organicgridtest.cpp 2017-01-02 08:48:40 +0000
@@ -28,6 +28,7 @@
28#include "organicgrid.h"28#include "organicgrid.h"
2929
30class DummyModel : public QAbstractListModel {30class DummyModel : public QAbstractListModel {
31 Q_OBJECT
31public:32public:
32 DummyModel() : m_count(0) {}33 DummyModel() : m_count(0) {}
3334
3435
=== modified file 'tests/plugins/Dash/verticaljournaltest.cpp'
--- tests/plugins/Dash/verticaljournaltest.cpp 2016-11-28 09:57:06 +0000
+++ tests/plugins/Dash/verticaljournaltest.cpp 2017-01-02 08:48:40 +0000
@@ -28,6 +28,7 @@
28#include "verticaljournal.h"28#include "verticaljournal.h"
2929
30class HeightModel : public QAbstractListModel {30class HeightModel : public QAbstractListModel {
31 Q_OBJECT
31public:32public:
32 QHash<int, QByteArray> roleNames() const override33 QHash<int, QByteArray> roleNames() const override
33 {34 {
@@ -100,7 +101,7 @@
100 QTRY_COMPARE(item.m_modelIndex, modelIndex);101 QTRY_COMPARE(item.m_modelIndex, modelIndex);
101 QTRY_COMPARE(item.x(), x);102 QTRY_COMPARE(item.x(), x);
102 QTRY_COMPARE(item.y(), y);103 QTRY_COMPARE(item.y(), y);
103 QTRY_COMPARE(item.height(), model->stringList()[modelIndex].toDouble());104 QTRY_COMPARE(item.height(), model->stringList().at(modelIndex).toDouble());
104 QTRY_COMPARE(QQuickItemPrivate::get(item.m_item)->culled, !visible);105 QTRY_COMPARE(QQuickItemPrivate::get(item.m_item)->culled, !visible);
105 }106 }
106107
107108
=== modified file 'tests/plugins/Greeter/Unity/Launcher/launchermodelastest.cpp'
--- tests/plugins/Greeter/Unity/Launcher/launchermodelastest.cpp 2015-10-26 14:05:14 +0000
+++ tests/plugins/Greeter/Unity/Launcher/launchermodelastest.cpp 2017-01-02 08:48:40 +0000
@@ -34,7 +34,6 @@
34 Q_OBJECT34 Q_OBJECT
3535
36private:36private:
37 LauncherModel *launcherModel;
38 QStringList users;37 QStringList users;
39 QHash<QString, QList<QVariantMap>> mockProperties;38 QHash<QString, QList<QVariantMap>> mockProperties;
4039
4140
=== modified file 'tests/plugins/Unity/Launcher/launchermodeltest.cpp'
--- tests/plugins/Unity/Launcher/launchermodeltest.cpp 2016-12-07 11:30:41 +0000
+++ tests/plugins/Unity/Launcher/launchermodeltest.cpp 2017-01-02 08:48:40 +0000
@@ -101,7 +101,7 @@
101 }101 }
102 return nullptr;102 return nullptr;
103 }103 }
104 unityapi::ApplicationInfoInterface *findApplicationWithSurface(unityapi::MirSurfaceInterface* surface) const override {104 unityapi::ApplicationInfoInterface *findApplicationWithSurface(unityapi::MirSurfaceInterface* /*surface*/) const override {
105 return nullptr;105 return nullptr;
106 }106 }
107 unity::shell::application::ApplicationInfoInterface *startApplication(const QString &, const QStringList &) override { return nullptr; }107 unity::shell::application::ApplicationInfoInterface *startApplication(const QString &, const QStringList &) override { return nullptr; }
@@ -501,14 +501,14 @@
501 QCOMPARE(spy.count(), 2);501 QCOMPARE(spy.count(), 2);
502502
503 QVariantList countEmissionArgs = spy.takeFirst();503 QVariantList countEmissionArgs = spy.takeFirst();
504 QCOMPARE(countEmissionArgs.at(0).value<QModelIndex>().row(), index);504 QCOMPARE(countEmissionArgs.at(0).toModelIndex().row(), index);
505 QCOMPARE(countEmissionArgs.at(1).value<QModelIndex>().row(), index);505 QCOMPARE(countEmissionArgs.at(1).toModelIndex().row(), index);
506 QVector<int> roles = countEmissionArgs.at(2).value<QVector<int> >();506 QVector<int> roles = countEmissionArgs.at(2).value<QVector<int> >();
507 QCOMPARE(roles.first(), (int)LauncherModel::RoleCount);507 QCOMPARE(roles.first(), (int)LauncherModel::RoleCount);
508508
509 QVariantList countVisibleEmissionArgs = spy.takeFirst();509 QVariantList countVisibleEmissionArgs = spy.takeFirst();
510 QCOMPARE(countVisibleEmissionArgs.at(0).value<QModelIndex>().row(), index);510 QCOMPARE(countVisibleEmissionArgs.at(0).toModelIndex().row(), index);
511 QCOMPARE(countVisibleEmissionArgs.at(1).value<QModelIndex>().row(), index);511 QCOMPARE(countVisibleEmissionArgs.at(1).toModelIndex().row(), index);
512 roles = countVisibleEmissionArgs.at(2).value<QVector<int> >();512 roles = countVisibleEmissionArgs.at(2).value<QVector<int> >();
513 QVERIFY(roles.contains(LauncherModel::RoleCountVisible));513 QVERIFY(roles.contains(LauncherModel::RoleCountVisible));
514 QVERIFY(roles.contains(LauncherModel::RoleAlerting));514 QVERIFY(roles.contains(LauncherModel::RoleAlerting));
515515
=== modified file 'tests/uqmlscene/main.cpp'
--- tests/uqmlscene/main.cpp 2016-05-26 13:15:35 +0000
+++ tests/uqmlscene/main.cpp 2017-01-02 08:48:40 +0000
@@ -243,7 +243,7 @@
243243
244static bool checkVersion(const QUrl &url)244static bool checkVersion(const QUrl &url)
245{245{
246 if (!qgetenv("QMLSCENE_IMPORT_NAME").isEmpty())246 if (!qEnvironmentVariableIsEmpty("QMLSCENE_IMPORT_NAME"))
247 qWarning("QMLSCENE_IMPORT_NAME is no longer supported.");247 qWarning("QMLSCENE_IMPORT_NAME is no longer supported.");
248248
249 QString fileName = url.toLocalFile();249 QString fileName = url.toLocalFile();
@@ -387,9 +387,9 @@
387 Options options;387 Options options;
388388
389 QStringList imports;389 QStringList imports;
390 QList<QPair<QString, QString> > bundles;390 QVector<QPair<QString, QString> > bundles;
391 for (int i = 1; i < argc; ++i) {391 for (int i = 1; i < argc; ++i) {
392 if (*argv[i] != '-' && QFileInfo(QFile::decodeName(argv[i])).exists()) {392 if (*argv[i] != '-' && QFileInfo::exists(QFile::decodeName(argv[i]))) {
393 options.file = QUrl::fromLocalFile(argv[i]);393 options.file = QUrl::fromLocalFile(argv[i]);
394 } else {394 } else {
395 const QString lowerArgument = QString::fromLatin1(argv[i]).toLower();395 const QString lowerArgument = QString::fromLatin1(argv[i]).toLower();
396396
=== modified file 'tests/utils/modules/Unity/Test/testutil.cpp'
--- tests/utils/modules/Unity/Test/testutil.cpp 2016-07-15 11:21:55 +0000
+++ tests/utils/modules/Unity/Test/testutil.cpp 2017-01-02 08:48:40 +0000
@@ -103,7 +103,7 @@
103void TestUtil::ensureTargetWindow()103void TestUtil::ensureTargetWindow()
104{104{
105 if (!m_targetWindow && !QGuiApplication::topLevelWindows().isEmpty())105 if (!m_targetWindow && !QGuiApplication::topLevelWindows().isEmpty())
106 m_targetWindow = QGuiApplication::topLevelWindows()[0];106 m_targetWindow = QGuiApplication::topLevelWindows().at(0);
107}107}
108108
109void TestUtil::ensureTouchDevice()109void TestUtil::ensureTouchDevice()

Subscribers

People subscribed via source and target branches