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
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2016-12-12 16:45:09 +0000
3+++ CMakeLists.txt 2017-01-02 08:48:40 +0000
4@@ -62,13 +62,13 @@
5 ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/tests)
6
7 include(FindPkgConfig)
8-find_package(Qt5Core 5.4 REQUIRED)
9-find_package(Qt5Qml 5.4 REQUIRED)
10-find_package(Qt5Quick 5.4 REQUIRED)
11-find_package(Qt5Gui 5.4 REQUIRED)
12-find_package(Qt5DBus 5.4 REQUIRED)
13-find_package(Qt5Concurrent 5.4 REQUIRED)
14-find_package(Qt5Sql 5.4 REQUIRED)
15+find_package(Qt5Core 5.6 REQUIRED)
16+find_package(Qt5Qml 5.6 REQUIRED)
17+find_package(Qt5Quick 5.6 REQUIRED)
18+find_package(Qt5Gui 5.6 REQUIRED)
19+find_package(Qt5DBus 5.6 REQUIRED)
20+find_package(Qt5Concurrent 5.6 REQUIRED)
21+find_package(Qt5Sql 5.6 REQUIRED)
22
23 pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=23)
24 pkg_check_modules(GEONAMES REQUIRED geonames>=0.2)
25
26=== modified file 'debian/control'
27--- debian/control 2016-12-12 16:45:09 +0000
28+++ debian/control 2017-01-02 08:48:40 +0000
29@@ -51,7 +51,7 @@
30 qml-module-qt-labs-folderlistmodel,
31 qml-module-qt-labs-settings,
32 qml-module-qtqml-statemachine,
33- qml-module-qtmultimedia (>= 5.4.1-1ubuntu19~overlay2),
34+ qml-module-qtmultimedia (>= 5.6),
35 qml-module-qtquick-layouts,
36 qml-module-qtquick-xmllistmodel,
37 qml-module-qtquick2,
38@@ -60,12 +60,12 @@
39 qml-module-ubuntu-components (>= 1.3.2030) | qml-module-ubuntu-components-gles (>= 1.3.2030),
40 qml-module-ubuntu-web,
41 qt5-default,
42- qtbase5-dev (>= 5.4),
43+ qtbase5-dev (>= 5.6),
44 qtbase5-dev-tools,
45- qtbase5-private-dev (>= 5.4),
46- qtdeclarative5-dev (>= 5.4),
47+ qtbase5-private-dev (>= 5.6),
48+ qtdeclarative5-dev (>= 5.6),
49 qtdeclarative5-dev-tools,
50- qtdeclarative5-private-dev (>= 5.4),
51+ qtdeclarative5-private-dev (>= 5.6),
52 qtdeclarative5-ubuntu-content1,
53 qtdeclarative5-ubuntu-settings-components (>= 0.11),
54 ttf-ubuntu-font-family,
55
56=== modified file 'plugins/AccountsService/AccountsService.h'
57--- plugins/AccountsService/AccountsService.h 2016-08-08 10:10:25 +0000
58+++ plugins/AccountsService/AccountsService.h 2017-01-02 08:48:40 +0000
59@@ -29,7 +29,6 @@
60 class AccountsService: public QObject
61 {
62 Q_OBJECT
63- Q_ENUMS(PasswordDisplayHint)
64 Q_PROPERTY (QString user
65 READ user
66 WRITE setUser
67@@ -86,6 +85,7 @@
68 Keyboard,
69 Numeric,
70 };
71+ Q_ENUM(PasswordDisplayHint)
72
73 explicit AccountsService(QObject *parent = 0, const QString & user = QString());
74 ~AccountsService() = default;
75
76=== modified file 'plugins/Cursor/CursorImageInfo.cpp'
77--- plugins/Cursor/CursorImageInfo.cpp 2016-07-15 14:36:52 +0000
78+++ plugins/Cursor/CursorImageInfo.cpp 2017-01-02 08:48:40 +0000
79@@ -108,8 +108,7 @@
80 QUrl CursorImageInfo::imageSource() const
81 {
82 auto urlString = QString("image://cursor/%1/%2/%3")
83- .arg(m_themeName)
84- .arg(m_cursorName)
85+ .arg(m_themeName, m_cursorName)
86 .arg(m_cursorHeight);
87
88 return QUrl(urlString);
89
90=== modified file 'plugins/Dash/abstractdashview.cpp'
91--- plugins/Dash/abstractdashview.cpp 2016-07-12 15:05:58 +0000
92+++ plugins/Dash/abstractdashview.cpp 2017-01-02 08:48:40 +0000
93@@ -23,7 +23,7 @@
94 , m_asyncRequestedIndex(-1)
95 , m_columnSpacing(0)
96 , m_rowSpacing(0)
97- , m_buffer(320) // Same value used in qquickitemview.cpp in Qt 5.4
98+ , m_buffer(320) // Same value as QML_VIEW_DEFAULTCACHEBUFFER in qquickitemview.cpp (Qt 5.6)
99 , m_displayMarginBeginning(0)
100 , m_displayMarginEnd(0)
101 , m_needsRelayout(false)
102
103=== modified file 'plugins/LightDM/IntegratedLightDM/liblightdm/Greeter.h'
104--- plugins/LightDM/IntegratedLightDM/liblightdm/Greeter.h 2016-07-28 15:34:29 +0000
105+++ plugins/LightDM/IntegratedLightDM/liblightdm/Greeter.h 2017-01-02 08:48:40 +0000
106@@ -46,18 +46,18 @@
107 Q_PROPERTY(QString hostname READ hostname CONSTANT)
108 Q_PROPERTY(bool hasGuestAccount READ hasGuestAccountHint CONSTANT)
109
110- Q_ENUMS(PromptType MessageType)
111-
112 public:
113 enum PromptType {
114 PromptTypeQuestion,
115 PromptTypeSecret
116 };
117+ Q_ENUM(PromptType)
118
119 enum MessageType {
120 MessageTypeInfo,
121 MessageTypeError
122 };
123+ Q_ENUM(MessageType)
124
125 explicit Greeter(QObject* parent=0);
126 virtual ~Greeter();
127
128=== modified file 'plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModel.cpp'
129--- plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModel.cpp 2016-06-15 15:29:34 +0000
130+++ plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModel.cpp 2017-01-02 08:48:40 +0000
131@@ -38,7 +38,6 @@
132 QAbstractListModel(parent),
133 d_ptr(new SessionsModelPrivate(this))
134 {
135- Q_D(SessionsModel);
136 m_roleNames = QAbstractListModel::roleNames();
137 m_roleNames[KeyRole] = "key";
138 m_roleNames[TypeRole] = "type";
139
140=== modified file 'plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModel.h'
141--- plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModel.h 2015-11-23 22:45:55 +0000
142+++ plugins/LightDM/IntegratedLightDM/liblightdm/SessionsModel.h 2017-01-02 08:48:40 +0000
143@@ -35,8 +35,6 @@
144 {
145 Q_OBJECT
146
147- Q_ENUMS(SessionModelRoles SessionType)
148-
149 public:
150
151 enum SessionModelRoles {
152@@ -46,11 +44,13 @@
153 IdRole = KeyRole, /** Deprecated */
154 TypeRole
155 };
156+ Q_ENUM(SessionModelRoles)
157
158 enum SessionType {
159 LocalSessions,
160 RemoteSessions
161 };
162+ Q_ENUM(SessionType)
163
164 explicit SessionsModel(QObject* parent=0); /** Deprecated. Loads local sessions*/
165 explicit SessionsModel(SessionsModel::SessionType, QObject* parent=0);
166
167=== modified file 'plugins/LightDM/IntegratedLightDM/liblightdm/UsersModel.h'
168--- plugins/LightDM/IntegratedLightDM/liblightdm/UsersModel.h 2016-06-27 14:51:40 +0000
169+++ plugins/LightDM/IntegratedLightDM/liblightdm/UsersModel.h 2017-01-02 08:48:40 +0000
170@@ -37,8 +37,6 @@
171 {
172 Q_OBJECT
173
174- Q_ENUMS(UserModelRoles)
175-
176 public:
177 explicit UsersModel(QObject *parent = 0);
178 virtual ~UsersModel() = default;
179@@ -53,6 +51,7 @@
180 BackgroundPathRole,
181 UidRole
182 };
183+ Q_ENUM(UserModelRoles)
184
185 int rowCount(const QModelIndex &parent) const override;
186 QVariant data(const QModelIndex &index, int role) const override;
187
188=== modified file 'plugins/LightDM/SessionsModel.h'
189--- plugins/LightDM/SessionsModel.h 2015-11-24 00:25:27 +0000
190+++ plugins/LightDM/SessionsModel.h 2017-01-02 08:48:40 +0000
191@@ -28,8 +28,6 @@
192 {
193 Q_OBJECT
194
195- Q_ENUMS(SessionModelRoles)
196-
197 Q_PROPERTY(QList<QUrl> iconSearchDirectories READ iconSearchDirectories
198 WRITE setIconSearchDirectories NOTIFY iconSearchDirectoriesChanged)
199 Q_SIGNALS:
200@@ -45,6 +43,7 @@
201 TypeRole = QLightDM::SessionsModel::SessionModelRoles::TypeRole,
202 IconRole
203 };
204+ Q_ENUM(SessionModelRoles)
205
206 explicit SessionsModel(QObject* parent=nullptr);
207
208
209=== modified file 'plugins/Lights/Lights.h'
210--- plugins/Lights/Lights.h 2014-07-02 23:15:54 +0000
211+++ plugins/Lights/Lights.h 2017-01-02 08:48:40 +0000
212@@ -27,7 +27,6 @@
213 class Lights: public QObject
214 {
215 Q_OBJECT
216- Q_ENUMS(State)
217 Q_PROPERTY(State state READ state WRITE setState NOTIFY stateChanged)
218 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
219 Q_PROPERTY(int onMillisec READ onMillisec WRITE setOnMillisec NOTIFY onMillisecChanged)
220@@ -38,6 +37,7 @@
221 Off,
222 On,
223 };
224+ Q_ENUM(State)
225
226 explicit Lights(QObject *parent = 0);
227 ~Lights();
228
229=== modified file 'plugins/Powerd/Powerd.h'
230--- plugins/Powerd/Powerd.h 2015-10-05 02:14:13 +0000
231+++ plugins/Powerd/Powerd.h 2017-01-02 08:48:40 +0000
232@@ -27,8 +27,6 @@
233 class Powerd: public QObject
234 {
235 Q_OBJECT
236- Q_ENUMS(Status)
237- Q_ENUMS(DisplayStateChangeReason)
238 Q_PROPERTY(Status status READ status NOTIFY statusChanged)
239
240 public:
241@@ -41,11 +39,13 @@
242 SnapDecision = 5, // Display changed state due to snap decision prompt
243 CallDone = 6, // Display changed state due to voice call end
244 };
245+ Q_ENUM(DisplayStateChangeReason)
246
247 enum Status {
248 Off,
249 On,
250 };
251+ Q_ENUM(Status)
252
253 explicit Powerd(QObject *parent = 0);
254 ~Powerd();
255
256=== modified file 'plugins/UInput/uinput.h'
257--- plugins/UInput/uinput.h 2015-11-25 14:58:55 +0000
258+++ plugins/UInput/uinput.h 2017-01-02 08:48:40 +0000
259@@ -27,7 +27,6 @@
260 class UInput : public QObject
261 {
262 Q_OBJECT
263- Q_ENUMS(Button)
264
265 public:
266 enum Button {
267@@ -35,6 +34,7 @@
268 ButtonRight,
269 ButtonMiddle
270 };
271+ Q_ENUM(Button)
272
273 explicit UInput(QObject *parent = nullptr);
274 ~UInput();
275
276=== modified file 'plugins/Ubuntu/Gestures/Direction.h'
277--- plugins/Ubuntu/Gestures/Direction.h 2015-12-10 10:22:25 +0000
278+++ plugins/Ubuntu/Gestures/Direction.h 2017-01-02 08:48:40 +0000
279@@ -26,7 +26,6 @@
280 */
281 class UBUNTUGESTURESQML_EXPORT Direction : public QObject {
282 Q_OBJECT
283- Q_ENUMS(Type)
284
285 public:
286 // Make sure it is kept synchronized with SDK UCSwipeArea::Direction
287@@ -38,6 +37,7 @@
288 Horizontal, // Along the X axis, in any direction
289 Vertical // Along the Y axis, in any direction
290 };
291+ Q_ENUM(Type)
292
293 Q_INVOKABLE static bool isHorizontal(Direction::Type type);
294 Q_INVOKABLE static bool isVertical(Direction::Type type);
295
296=== modified file 'plugins/Ubuntu/Gestures/TouchGestureArea.h'
297--- plugins/Ubuntu/Gestures/TouchGestureArea.h 2016-08-29 23:35:35 +0000
298+++ plugins/Ubuntu/Gestures/TouchGestureArea.h 2017-01-02 08:48:40 +0000
299@@ -114,7 +114,6 @@
300 class UBUNTUGESTURESQML_EXPORT TouchGestureArea : public QQuickItem
301 {
302 Q_OBJECT
303- Q_ENUMS(Status)
304
305 Q_PROPERTY(int status READ status NOTIFY statusChanged)
306 Q_PROPERTY(bool dragging READ dragging NOTIFY draggingChanged)
307@@ -137,6 +136,7 @@
308 Recognized,
309 Rejected
310 };
311+ Q_ENUM(Status)
312 TouchGestureArea(QQuickItem* parent = nullptr);
313 ~TouchGestureArea();
314
315
316=== modified file 'plugins/Unity/DashCommunicator/CMakeLists.txt'
317--- plugins/Unity/DashCommunicator/CMakeLists.txt 2014-09-24 17:34:33 +0000
318+++ plugins/Unity/DashCommunicator/CMakeLists.txt 2017-01-02 08:48:40 +0000
319@@ -1,5 +1,6 @@
320 include_directories(
321 ${CMAKE_CURRENT_SOURCE_DIR}
322+ ${CMAKE_CURRENT_BINARY_DIR}
323 ${libunity8-private_SOURCE_DIR}
324 )
325
326
327=== modified file 'plugins/Unity/DashCommunicator/dashconnection.cpp'
328--- plugins/Unity/DashCommunicator/dashconnection.cpp 2015-09-14 09:11:08 +0000
329+++ plugins/Unity/DashCommunicator/dashconnection.cpp 2017-01-02 08:48:40 +0000
330@@ -32,6 +32,7 @@
331 */
332 class AsyncDBusInterface : public QDBusAbstractInterface
333 {
334+ Q_OBJECT
335 public:
336 AsyncDBusInterface(const QString &service, const QString &path,
337 const QString &interface, const QDBusConnection &connection,
338@@ -61,3 +62,5 @@
339 dbusInterface()->asyncCall(QStringLiteral("SetCurrentScope"), index, animate, isSwipe);
340 }
341 }
342+
343+#include "dashconnection.moc"
344
345=== modified file 'plugins/Unity/Indicators/indicators.h'
346--- plugins/Unity/Indicators/indicators.h 2015-01-20 16:21:07 +0000
347+++ plugins/Unity/Indicators/indicators.h 2017-01-02 08:48:40 +0000
348@@ -27,13 +27,13 @@
349 {
350 Q_OBJECT
351 public:
352- Q_ENUMS(ActionStates)
353 enum ActionStates {
354 Label = 0x00,
355 IconSource = 0x01,
356 AccessableName = 0x02,
357 Visible = 0x03,
358 };
359+ Q_ENUM(ActionStates)
360
361 ActionState(QObject*parent=0):QObject(parent) {}
362 };
363@@ -42,11 +42,11 @@
364 {
365 Q_OBJECT
366 public:
367- Q_ENUMS(NetworkActionStates)
368 enum NetworkActionStates {
369 Connection = 0x01,
370 SignalStrength = 0x02,
371 };
372+ Q_ENUM(NetworkActionStates)
373
374 NetworkActionState(QObject*parent=0):QObject(parent) {}
375 };
376@@ -55,13 +55,13 @@
377 {
378 Q_OBJECT
379 public:
380- Q_ENUMS(NetworkConnectionStates)
381 enum NetworkConnectionStates {
382 Initial = 0x00,
383 Activating = 0x01,
384 Activated = 0x02,
385 Deactivating = 0x03,
386 };
387+ Q_ENUM(NetworkConnectionStates)
388
389 NetworkConnection(QObject*parent=0):QObject(parent) {}
390 };
391@@ -70,12 +70,12 @@
392 {
393 Q_OBJECT
394 public:
395- Q_ENUMS(Roles)
396 enum Roles {
397 Identifier = 0,
398 Position,
399 IndicatorProperties
400 };
401+ Q_ENUM(Roles)
402
403 IndicatorsModelRole(QObject*parent=0):QObject(parent) {}
404 };
405@@ -84,7 +84,6 @@
406 {
407 Q_OBJECT
408 public:
409- Q_ENUMS(Roles)
410 enum Roles {
411 Action = Qt::DisplayRole + 1,
412 Label,
413@@ -93,6 +92,7 @@
414 hasSection,
415 hasSubMenu
416 };
417+ Q_ENUM(Roles)
418
419 FlatMenuProxyModelRole(QObject*parent=0):QObject(parent) {}
420 };
421
422=== modified file 'plugins/Unity/Indicators/indicatorsmodel.h'
423--- plugins/Unity/Indicators/indicatorsmodel.h 2015-11-21 22:41:41 +0000
424+++ plugins/Unity/Indicators/indicatorsmodel.h 2017-01-02 08:48:40 +0000
425@@ -32,7 +32,6 @@
426 class UNITYINDICATORS_EXPORT IndicatorsModel : public QAbstractListModel
427 {
428 Q_OBJECT
429- Q_ENUMS(Roles)
430 Q_PROPERTY(int count READ count NOTIFY countChanged)
431 Q_PROPERTY(QString profile READ profile WRITE setProfile NOTIFY profileChanged)
432
433
434=== modified file 'plugins/Unity/InputInfo/qinputinfo.h'
435--- plugins/Unity/InputInfo/qinputinfo.h 2015-10-02 14:23:01 +0000
436+++ plugins/Unity/InputInfo/qinputinfo.h 2017-01-02 08:48:40 +0000
437@@ -57,8 +57,6 @@
438 class QInputDevice : public QObject
439 {
440 Q_OBJECT
441- Q_ENUMS(InputType)
442- Q_FLAGS(InputType InputTypeFlags)
443 friend class QInputDeviceManagerPrivate;
444
445 public:
446@@ -72,8 +70,9 @@
447 Keyboard = 16,
448 Switch = 32
449 };
450- Q_ENUMS(InputType)
451+ Q_FLAG(InputType)
452 Q_DECLARE_FLAGS(InputTypeFlags, InputType)
453+ Q_FLAG(InputTypeFlags)
454
455 explicit QInputDevice(QObject *parent = 0);
456 QString name() const;
457
458=== modified file 'plugins/Utils/appdrawerproxymodel.cpp'
459--- plugins/Utils/appdrawerproxymodel.cpp 2016-11-28 13:27:22 +0000
460+++ plugins/Utils/appdrawerproxymodel.cpp 2017-01-02 08:48:40 +0000
461@@ -157,8 +157,8 @@
462 QStringList allWords = m_source->data(m_source->index(source_row, 0), AppDrawerModelInterface::RoleKeywords).toStringList();
463 allWords.prepend(m_source->data(m_source->index(source_row, 0), AppDrawerModelInterface::RoleName).toString());
464 bool found = false;
465- Q_FOREACH (const QString currentWord, allWords) {
466- if (currentWord.toLower().startsWith(m_filterString.toLower())) {
467+ Q_FOREACH (const QString &currentWord, allWords) {
468+ if (currentWord.startsWith(m_filterString, Qt::CaseInsensitive)) {
469 found = true;
470 break;
471 }
472
473=== modified file 'plugins/Utils/appdrawerproxymodel.h'
474--- plugins/Utils/appdrawerproxymodel.h 2016-11-28 10:17:22 +0000
475+++ plugins/Utils/appdrawerproxymodel.h 2017-01-02 08:48:40 +0000
476@@ -23,8 +23,6 @@
477 class AppDrawerProxyModel: public QSortFilterProxyModel
478 {
479 Q_OBJECT
480- Q_ENUMS(GroupBy)
481- Q_ENUMS(SortBy)
482 Q_PROPERTY(QAbstractItemModel* source READ source WRITE setSource NOTIFY sourceChanged)
483 Q_PROPERTY(GroupBy group READ group WRITE setGroup NOTIFY groupChanged)
484 Q_PROPERTY(QString filterLetter READ filterLetter WRITE setFilterLetter NOTIFY filterLetterChanged)
485@@ -38,10 +36,12 @@
486 GroupByAll,
487 GroupByAToZ
488 };
489+ Q_ENUM(GroupBy)
490 enum SortBy {
491 SortByAToZ,
492 SortByUsage
493 };
494+ Q_ENUM(SortBy)
495
496 AppDrawerProxyModel(QObject* parent = nullptr);
497
498
499=== modified file 'plugins/Utils/easingcurve.h'
500--- plugins/Utils/easingcurve.h 2015-11-20 15:01:39 +0000
501+++ plugins/Utils/easingcurve.h 2017-01-02 08:48:40 +0000
502@@ -36,7 +36,6 @@
503 class EasingCurve: public QObject
504 {
505 Q_OBJECT
506- Q_ENUMS(QEasingCurve::Type)
507 Q_PROPERTY(QEasingCurve::Type type READ type WRITE setType NOTIFY typeChanged)
508 Q_PROPERTY(qreal period READ period WRITE setPeriod NOTIFY periodChanged)
509 Q_PROPERTY(qreal progress READ progress WRITE setProgress NOTIFY progressChanged)
510
511=== modified file 'plugins/Utils/unitysortfilterproxymodelqml.h'
512--- plugins/Utils/unitysortfilterproxymodelqml.h 2015-04-30 09:31:51 +0000
513+++ plugins/Utils/unitysortfilterproxymodelqml.h 2017-01-02 08:48:40 +0000
514@@ -38,6 +38,11 @@
515 Q_INVOKABLE int mapRowToSource(int row);
516 bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
517
518+ // Make the QSortFilterProxyModel variants also accessible
519+ using QSortFilterProxyModel::data;
520+ using QSortFilterProxyModel::mapFromSource;
521+ using QSortFilterProxyModel::mapToSource;
522+
523 /* getters */
524 int totalCount() const;
525 bool invertMatch() const;
526
527=== modified file 'plugins/Utils/windowstatestorage.h'
528--- plugins/Utils/windowstatestorage.h 2016-12-01 18:35:18 +0000
529+++ plugins/Utils/windowstatestorage.h 2017-01-02 08:48:40 +0000
530@@ -25,7 +25,6 @@
531 class WindowStateStorage: public QObject
532 {
533 Q_OBJECT
534- Q_ENUMS(WindowState)
535 public:
536 enum WindowState {
537 WindowStateNormal = 1 << 0,
538@@ -42,10 +41,9 @@
539 WindowStateMaximizedBottomRight = 1 << 11,
540 WindowStateRestored = 1 << 12
541 };
542+ Q_ENUM(WindowState)
543 Q_DECLARE_FLAGS(WindowStates, WindowState)
544-#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))
545 Q_FLAG(WindowStates)
546-#endif
547
548 WindowStateStorage(QObject *parent = 0);
549 virtual ~WindowStateStorage();
550
551=== modified file 'plugins/Wizard/PageList.cpp'
552--- plugins/Wizard/PageList.cpp 2016-07-18 13:33:45 +0000
553+++ plugins/Wizard/PageList.cpp 2017-01-02 08:48:40 +0000
554@@ -71,11 +71,8 @@
555 // If there was a system update installed, skip until the last page to just greet the user
556 QSettings settings;
557 if (settings.value(QStringLiteral("Wizard/SkipUntilFinishedPage")).toBool()) {
558- const QString lastPage = m_pages.lastKey();
559- Q_FOREACH(const QString &page, m_pages.keys()) {
560- if (Q_UNLIKELY(page != lastPage)) {
561- m_pages.remove(page);
562- }
563+ while (m_pages.count() > 1) {
564+ m_pages.erase(m_pages.begin());
565 }
566
567 // ... and reset it again for the next run
568
569=== modified file 'plugins/Wizard/timezonemodel.h'
570--- plugins/Wizard/timezonemodel.h 2016-03-02 23:03:06 +0000
571+++ plugins/Wizard/timezonemodel.h 2017-01-02 08:48:40 +0000
572@@ -27,7 +27,6 @@
573 Q_PROPERTY(bool listUpdating READ listUpdating NOTIFY listUpdatingChanged)
574 Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged)
575 Q_PROPERTY(QString country READ country WRITE setCountry NOTIFY countryChanged)
576- Q_ENUMS(Roles)
577
578 public:
579 explicit TimeZoneLocationModel(QObject *parent = nullptr);
580@@ -42,6 +41,7 @@
581 LatitudeRole,
582 LongitudeRole
583 };
584+ Q_ENUM(Roles)
585
586 int rowCount(const QModelIndex &parent = QModelIndex()) const override;
587 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
588
589=== modified file 'src/libunity8-private/abstractdbusservicemonitor.h'
590--- src/libunity8-private/abstractdbusservicemonitor.h 2014-12-17 13:34:22 +0000
591+++ src/libunity8-private/abstractdbusservicemonitor.h 2017-01-02 08:48:40 +0000
592@@ -30,7 +30,6 @@
593 class Q_DECL_EXPORT AbstractDBusServiceMonitor : public QObject
594 {
595 Q_OBJECT
596- Q_ENUMS(Bus)
597 Q_PROPERTY(bool serviceAvailable READ serviceAvailable NOTIFY serviceAvailableChanged)
598
599 public:
600@@ -38,6 +37,7 @@
601 SessionBus,
602 SystemBus,
603 };
604+ Q_ENUM(Bus)
605
606 explicit AbstractDBusServiceMonitor(const QString &service, const QString &path, const QString &interface,
607 const Bus bus = SessionBus,
608
609=== modified file 'tests/mocks/AccountsService/AccountsService.h'
610--- tests/mocks/AccountsService/AccountsService.h 2016-08-30 13:43:08 +0000
611+++ tests/mocks/AccountsService/AccountsService.h 2017-01-02 08:48:40 +0000
612@@ -27,7 +27,6 @@
613 class AccountsService: public QObject
614 {
615 Q_OBJECT
616- Q_ENUMS(PasswordDisplayHint)
617 Q_PROPERTY (QString user
618 READ user
619 WRITE setUser
620@@ -94,6 +93,7 @@
621 Keyboard,
622 Numeric
623 };
624+ Q_ENUM(PasswordDisplayHint)
625
626 explicit AccountsService(QObject *parent = 0);
627
628
629=== modified file 'tests/mocks/LightDM/IntegratedLightDM/liblightdm/Greeter.cpp'
630--- tests/mocks/LightDM/IntegratedLightDM/liblightdm/Greeter.cpp 2016-07-28 15:34:29 +0000
631+++ tests/mocks/LightDM/IntegratedLightDM/liblightdm/Greeter.cpp 2017-01-02 08:48:40 +0000
632@@ -173,7 +173,7 @@
633
634 void Greeter::sendAuthenticationComplete()
635 {
636- if (qgetenv("UNITY_TESTING").isEmpty()) {
637+ if (qEnvironmentVariableIsEmpty("UNITY_TESTING")) {
638 // simulate PAM's delay
639 QTimer::singleShot(1000, this, &Greeter::authenticationComplete);
640 } else {
641
642=== modified file 'tests/mocks/LightDM/IntegratedLightDM/liblightdm/Greeter.h'
643--- tests/mocks/LightDM/IntegratedLightDM/liblightdm/Greeter.h 2016-07-28 15:34:29 +0000
644+++ tests/mocks/LightDM/IntegratedLightDM/liblightdm/Greeter.h 2017-01-02 08:48:40 +0000
645@@ -42,8 +42,6 @@
646 Q_PROPERTY(QString hostname READ hostname CONSTANT)
647 Q_PROPERTY(bool hasGuestAccount READ hasGuestAccountHint CONSTANT)
648
649- Q_ENUMS(PromptType MessageType)
650-
651 //Mock-only API for testing purposes
652 Q_PROPERTY(QString mockMode READ mockMode WRITE setMockMode NOTIFY mockModeChanged)
653
654@@ -52,11 +50,13 @@
655 PromptTypeQuestion,
656 PromptTypeSecret
657 };
658+ Q_ENUM(PromptType)
659
660 enum MessageType {
661 MessageTypeInfo,
662 MessageTypeError
663 };
664+ Q_ENUM(MessageType)
665
666 explicit Greeter(QObject* parent=0);
667 virtual ~Greeter();
668
669=== modified file 'tests/mocks/LightDM/IntegratedLightDM/liblightdm/SessionsModel.cpp'
670--- tests/mocks/LightDM/IntegratedLightDM/liblightdm/SessionsModel.cpp 2016-07-13 20:24:24 +0000
671+++ tests/mocks/LightDM/IntegratedLightDM/liblightdm/SessionsModel.cpp 2017-01-02 08:48:40 +0000
672@@ -33,7 +33,6 @@
673 QAbstractListModel(parent),
674 d_ptr(new SessionsModelPrivate(this))
675 {
676- Q_D(SessionsModel);
677 m_roleNames = QAbstractListModel::roleNames();
678 m_roleNames[KeyRole] = "key";
679 m_roleNames[TypeRole] = "type";
680
681=== modified file 'tests/mocks/LightDM/IntegratedLightDM/liblightdm/SessionsModel.h'
682--- tests/mocks/LightDM/IntegratedLightDM/liblightdm/SessionsModel.h 2016-07-13 20:24:24 +0000
683+++ tests/mocks/LightDM/IntegratedLightDM/liblightdm/SessionsModel.h 2017-01-02 08:48:40 +0000
684@@ -29,8 +29,6 @@
685 {
686 Q_OBJECT
687
688- Q_ENUMS(SessionModelRoles SessionType)
689-
690 public:
691
692 enum SessionModelRoles {
693@@ -40,11 +38,13 @@
694 IdRole = KeyRole, /** Deprecated */
695 TypeRole
696 };
697+ Q_ENUM(SessionModelRoles)
698
699 enum SessionType {
700 LocalSessions,
701 RemoteSessions
702 };
703+ Q_ENUM(SessionType)
704
705 explicit SessionsModel(QObject* parent=nullptr); /** Deprecated. Loads local sessions*/
706 explicit SessionsModel(SessionsModel::SessionType, QObject* parent=nullptr);
707
708=== modified file 'tests/mocks/LightDM/IntegratedLightDM/liblightdm/UsersModel.cpp'
709--- tests/mocks/LightDM/IntegratedLightDM/liblightdm/UsersModel.cpp 2016-05-24 22:11:21 +0000
710+++ tests/mocks/LightDM/IntegratedLightDM/liblightdm/UsersModel.cpp 2017-01-02 08:48:40 +0000
711@@ -34,8 +34,6 @@
712 QAbstractListModel(parent),
713 d_ptr(new UsersModelPrivate(this))
714 {
715- Q_D(UsersModel);
716-
717 // Extend roleNames (we want to keep the "display" role)
718 QHash<int, QByteArray> roles = roleNames();
719 roles[NameRole] = "name";
720
721=== modified file 'tests/mocks/LightDM/IntegratedLightDM/liblightdm/UsersModel.h'
722--- tests/mocks/LightDM/IntegratedLightDM/liblightdm/UsersModel.h 2016-05-24 22:11:21 +0000
723+++ tests/mocks/LightDM/IntegratedLightDM/liblightdm/UsersModel.h 2017-01-02 08:48:40 +0000
724@@ -31,8 +31,6 @@
725 {
726 Q_OBJECT
727
728- Q_ENUMS(UserModelRoles)
729-
730 //Mock-only API for testing purposes
731 Q_PROPERTY(QString mockMode READ mockMode WRITE setMockMode NOTIFY mockModeChanged)
732
733@@ -53,6 +51,7 @@
734 BackgroundPathRole,
735 UidRole
736 };
737+ Q_ENUM(UserModelRoles)
738
739 int rowCount(const QModelIndex &parent) const override;
740 QVariant data(const QModelIndex &index, int role) const override;
741
742=== modified file 'tests/mocks/Lights/Lights.h'
743--- tests/mocks/Lights/Lights.h 2014-11-11 10:45:41 +0000
744+++ tests/mocks/Lights/Lights.h 2017-01-02 08:48:40 +0000
745@@ -23,7 +23,6 @@
746 class Lights: public QObject
747 {
748 Q_OBJECT
749- Q_ENUMS(State)
750 Q_PROPERTY(State state READ state WRITE setState NOTIFY stateChanged)
751 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
752 Q_PROPERTY(int onMillisec READ onMillisec WRITE setOnMillisec NOTIFY onMillisecChanged)
753@@ -34,6 +33,7 @@
754 Off,
755 On,
756 };
757+ Q_ENUM(State)
758
759 explicit Lights(QObject *parent = 0);
760 ~Lights();
761
762=== modified file 'tests/mocks/Powerd/Powerd.h'
763--- tests/mocks/Powerd/Powerd.h 2015-09-02 13:42:24 +0000
764+++ tests/mocks/Powerd/Powerd.h 2017-01-02 08:48:40 +0000
765@@ -24,8 +24,6 @@
766 class Powerd: public QObject
767 {
768 Q_OBJECT
769- Q_ENUMS(Status)
770- Q_ENUMS(DisplayStateChangeReason)
771 Q_PROPERTY(Status status READ status NOTIFY statusChanged)
772
773 public:
774@@ -35,11 +33,13 @@
775 PowerKey = 2, // Display changed state due to user pressing power key
776 Proximity = 3, // Display changed state due to proximity events
777 };
778+ Q_ENUM(DisplayStateChangeReason)
779
780 enum Status {
781 Off,
782 On,
783 };
784+ Q_ENUM(Status)
785
786 explicit Powerd(QObject *parent = 0);
787
788
789=== modified file 'tests/mocks/QMenuModel/dbus-enums.h'
790--- tests/mocks/QMenuModel/dbus-enums.h 2014-11-14 17:47:00 +0000
791+++ tests/mocks/QMenuModel/dbus-enums.h 2017-01-02 08:48:40 +0000
792@@ -28,9 +28,6 @@
793 {
794 Q_OBJECT
795
796- Q_ENUMS(BusType)
797- Q_ENUMS(ConnectionStatus)
798-
799 public:
800 enum BusType {
801 None = 0,
802@@ -38,12 +35,14 @@
803 SystemBus,
804 LastBusType
805 };
806+ Q_ENUM(BusType)
807
808 enum ConnectionStatus {
809 Disconnected = 0,
810 Connecting,
811 Connected
812 };
813+ Q_ENUM(ConnectionStatus)
814
815 private:
816 DBusEnums() {}
817
818=== modified file 'tests/mocks/QMenuModel/unitymenumodel.cpp'
819--- tests/mocks/QMenuModel/unitymenumodel.cpp 2014-10-07 10:28:59 +0000
820+++ tests/mocks/QMenuModel/unitymenumodel.cpp 2017-01-02 08:48:40 +0000
821@@ -220,9 +220,9 @@
822 {
823 static QHash<QByteArray, int> roles;
824 if (roles.isEmpty()) {
825- QHash<int, QByteArray> names = roleNames();
826- Q_FOREACH (int role, names.keys())
827- roles.insert(names[role], role);
828+ const QHash<int, QByteArray> names = roleNames();
829+ for(auto it = names.begin(); it != names.end(); ++it)
830+ roles.insert(it.value(), it.key());
831 }
832
833 return this->data(this->index(row, 0), roles[role]);
834
835=== modified file 'tests/mocks/QtMultimedia/mediaplayer.cpp'
836--- tests/mocks/QtMultimedia/mediaplayer.cpp 2016-07-27 14:25:44 +0000
837+++ tests/mocks/QtMultimedia/mediaplayer.cpp 2017-01-02 08:48:40 +0000
838@@ -58,7 +58,7 @@
839 {
840 qsrand(time(nullptr));
841 m_timer.setInterval(100);
842- connect(&m_timer, &QTimer::timeout, this, &MediaPlayer::timerEvent);
843+ connect(&m_timer, &QTimer::timeout, this, &MediaPlayer::processTimer);
844
845 connect(MediaPlayerDataController::instance(), &MediaPlayerDataController::sourceAboutToBeRemoved,
846 this, [this](const QUrl& source) {
847@@ -188,7 +188,7 @@
848 }
849 }
850
851-void MediaPlayer::timerEvent()
852+void MediaPlayer::processTimer()
853 {
854 if (m_position + m_timer.interval() < duration()) {
855 m_position += m_timer.interval();
856
857=== modified file 'tests/mocks/QtMultimedia/mediaplayer.h'
858--- tests/mocks/QtMultimedia/mediaplayer.h 2016-07-27 14:25:44 +0000
859+++ tests/mocks/QtMultimedia/mediaplayer.h 2017-01-02 08:48:40 +0000
860@@ -45,17 +45,13 @@
861 Q_PROPERTY(QObject *metaData READ metaData CONSTANT)
862 Q_PROPERTY(DeclarativePlaylist *playlist READ playlist WRITE setPlaylist NOTIFY playlistChanged)
863
864- Q_ENUMS(PlaybackState)
865- Q_ENUMS(AudioRole)
866- Q_ENUMS(Availability)
867- Q_ENUMS(Status)
868- Q_ENUMS(Error)
869 public:
870 enum PlaybackState {
871 PlayingState,
872 PausedState,
873 StoppedState
874 };
875+ Q_ENUM(PlaybackState)
876
877 enum AudioRole {
878 UnknownRole,
879@@ -69,6 +65,7 @@
880 SonificationRole,
881 GameRole
882 };
883+ Q_ENUM(AudioRole)
884
885 enum Availability {
886 Available,
887@@ -76,6 +73,7 @@
888 Unavailable,
889 ResourceMissing
890 };
891+ Q_ENUM(Availability)
892
893 enum Status {
894 UnknownStatus,
895@@ -88,6 +86,7 @@
896 EndOfMedia,
897 InvalidMedia
898 };
899+ Q_ENUM(Status)
900
901 enum Error {
902 NoError,
903@@ -97,6 +96,7 @@
904 AccessDeniedError,
905 ServiceMissingError
906 };
907+ Q_ENUM(Error)
908
909 explicit MediaPlayer(QObject *parent = nullptr);
910
911@@ -145,7 +145,7 @@
912 void error(Error error, const QString &errorString);
913
914 private Q_SLOTS:
915- void timerEvent();
916+ void processTimer();
917
918 private:
919 QUrl m_source;
920
921=== modified file 'tests/mocks/UInput/mockuinput.h'
922--- tests/mocks/UInput/mockuinput.h 2016-01-20 19:21:31 +0000
923+++ tests/mocks/UInput/mockuinput.h 2017-01-02 08:48:40 +0000
924@@ -27,7 +27,6 @@
925 class MockUInput : public QObject
926 {
927 Q_OBJECT
928- Q_ENUMS(Button)
929
930 public:
931 enum Button {
932@@ -35,6 +34,7 @@
933 ButtonRight,
934 ButtonMiddle
935 };
936+ Q_ENUM(Button)
937
938 explicit MockUInput(QObject *parent = nullptr);
939 ~MockUInput();
940
941=== modified file 'tests/mocks/Ubuntu/Connectivity/networking-status.h'
942--- tests/mocks/Ubuntu/Connectivity/networking-status.h 2014-09-01 10:25:28 +0000
943+++ tests/mocks/Ubuntu/Connectivity/networking-status.h 2017-01-02 08:48:40 +0000
944@@ -26,9 +26,6 @@
945 Q_OBJECT
946 Q_DISABLE_COPY(NetworkingStatus)
947
948- Q_ENUMS(Limitations)
949- Q_ENUMS(Status)
950-
951 Q_PROPERTY(QVector<Limitations> limitations READ limitations NOTIFY limitationsChanged)
952 Q_PROPERTY(Status status READ status NOTIFY statusChanged)
953 Q_PROPERTY(bool online READ online NOTIFY onlineChanged)
954@@ -41,12 +38,14 @@
955 enum Limitations {
956 Bandwith
957 };
958+ Q_ENUM(Limitations)
959
960 enum Status {
961 Offline,
962 Connecting,
963 Online
964 };
965+ Q_ENUM(Status)
966
967 QVector<Limitations> limitations() const;
968 Status status() const;
969
970=== modified file 'tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/MockSecurityPrivacy.h'
971--- tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/MockSecurityPrivacy.h 2016-01-07 20:59:28 +0000
972+++ tests/mocks/Ubuntu/SystemSettings/SecurityPrivacy/MockSecurityPrivacy.h 2017-01-02 08:48:40 +0000
973@@ -22,7 +22,6 @@
974 class MockSecurityPrivacy : public QObject
975 {
976 Q_OBJECT
977- Q_ENUMS(SecurityType)
978 Q_PROPERTY (SecurityType securityType
979 READ getSecurityType
980 NOTIFY securityTypeChanged)
981@@ -33,6 +32,7 @@
982 Passcode,
983 Passphrase,
984 };
985+ Q_ENUM(SecurityType)
986
987 MockSecurityPrivacy(QObject *parent = 0);
988
989
990=== modified file 'tests/mocks/Unity/Application/ApplicationInfo.h'
991--- tests/mocks/Unity/Application/ApplicationInfo.h 2016-11-30 19:24:02 +0000
992+++ tests/mocks/Unity/Application/ApplicationInfo.h 2017-01-02 08:48:40 +0000
993@@ -112,7 +112,7 @@
994
995 //////
996 // internal mock stuff
997- void close();
998+ void close() override;
999 void requestFocus();
1000
1001 Q_SIGNALS:
1002
1003=== modified file 'tests/mocks/Unity/Application/MirSurfaceItem.cpp'
1004--- tests/mocks/Unity/Application/MirSurfaceItem.cpp 2016-11-30 19:24:02 +0000
1005+++ tests/mocks/Unity/Application/MirSurfaceItem.cpp 2017-01-02 08:48:40 +0000
1006@@ -216,7 +216,7 @@
1007 Q_EMIT touchReleaseCountChanged(m_touchReleaseCount);
1008 }
1009
1010- Q_FOREACH(QTouchEvent::TouchPoint touchPoint, event->touchPoints()) {
1011+ Q_FOREACH(const QTouchEvent::TouchPoint &touchPoint, event->touchPoints()) {
1012 QString id(touchPoint.id());
1013 QVariantList list = m_touchTrail[id].toList();
1014 list.append(QVariant::fromValue(touchPoint.pos()));
1015
1016=== modified file 'tests/mocks/Unity/Indicators/fakeindicatorsmodel.h'
1017--- tests/mocks/Unity/Indicators/fakeindicatorsmodel.h 2015-04-30 09:31:51 +0000
1018+++ tests/mocks/Unity/Indicators/fakeindicatorsmodel.h 2017-01-02 08:48:40 +0000
1019@@ -25,7 +25,6 @@
1020 class FakeIndicatorsModel : public QAbstractListModel
1021 {
1022 Q_OBJECT
1023- Q_ENUMS(Roles)
1024 Q_PROPERTY(int count READ count NOTIFY countChanged)
1025 Q_PROPERTY(QString profile READ profile WRITE setProfile NOTIFY profileChanged)
1026 Q_PROPERTY(QVariant modelData READ modelData WRITE setModelData NOTIFY modelDataChanged)
1027
1028=== modified file 'tests/mocks/Unity/InputInfo/qinputdeviceinfo_mock.cpp'
1029--- tests/mocks/Unity/InputInfo/qinputdeviceinfo_mock.cpp 2016-04-04 07:49:06 +0000
1030+++ tests/mocks/Unity/InputInfo/qinputdeviceinfo_mock.cpp 2017-01-02 08:48:40 +0000
1031@@ -43,10 +43,14 @@
1032
1033 void QInputDeviceManagerPrivate::removeDevice(const QString &path)
1034 {
1035- Q_FOREACH (const QString devicePath, deviceMap.keys()) {
1036+ auto it = deviceMap.begin();
1037+ while (it != deviceMap.end()) {
1038+ const QString devicePath = it.key();
1039 if (devicePath.contains(path)) {
1040- deviceMap.remove(devicePath);
1041+ it = deviceMap.erase(it);
1042 Q_EMIT deviceRemoved(devicePath);
1043+ } else {
1044+ ++it;
1045 }
1046 }
1047 }
1048
1049=== modified file 'tests/mocks/Unity/Launcher/MockAppDrawerModel.cpp'
1050--- tests/mocks/Unity/Launcher/MockAppDrawerModel.cpp 2016-11-24 16:17:30 +0000
1051+++ tests/mocks/Unity/Launcher/MockAppDrawerModel.cpp 2017-01-02 08:48:40 +0000
1052@@ -53,7 +53,7 @@
1053 qsrand(QDateTime::currentMSecsSinceEpoch() / 1000);
1054 }
1055
1056-int MockAppDrawerModel::rowCount(const QModelIndex &parent) const
1057+int MockAppDrawerModel::rowCount(const QModelIndex & /*parent*/) const
1058 {
1059 return m_list.count();
1060 }
1061
1062=== modified file 'tests/mocks/Unity/Notifications/MockActionModel.h'
1063--- tests/mocks/Unity/Notifications/MockActionModel.h 2015-09-23 11:21:07 +0000
1064+++ tests/mocks/Unity/Notifications/MockActionModel.h 2017-01-02 08:48:40 +0000
1065@@ -36,11 +36,11 @@
1066 QVariant data(const QModelIndex &index, int role) const override;
1067 QHash<int, QByteArray> roleNames() const override;
1068
1069- Q_ENUMS(ActionsRoles)
1070 enum ActionsRoles {
1071 RoleActionLabel = Qt::UserRole + 1,
1072 RoleActionId = Qt::UserRole + 2
1073 };
1074+ Q_ENUM(ActionsRoles)
1075 Q_INVOKABLE QVariant data(int row, int role) const;
1076
1077 Q_INVOKABLE void append(const QString &id, const QString &label);
1078
1079=== modified file 'tests/mocks/Unity/Notifications/MockNotification.h'
1080--- tests/mocks/Unity/Notifications/MockNotification.h 2016-08-19 13:41:07 +0000
1081+++ tests/mocks/Unity/Notifications/MockNotification.h 2017-01-02 08:48:40 +0000
1082@@ -30,7 +30,6 @@
1083
1084 class MockNotification : public QObject {
1085 Q_OBJECT
1086- Q_ENUMS(Type Urgency)
1087 Q_PROPERTY(QString summary READ getSummary WRITE setSummary NOTIFY summaryChanged)
1088 Q_PROPERTY(QString body READ getBody WRITE setBody NOTIFY bodyChanged)
1089 Q_PROPERTY(int nid READ getID WRITE setID NOTIFY idChanged)
1090@@ -48,7 +47,9 @@
1091
1092 public:
1093 enum Urgency { Low, Normal, Critical };
1094+ Q_ENUM(Urgency)
1095 enum Type { PlaceHolder, Confirmation, Ephemeral, Interactive, SnapDecision };
1096+ Q_ENUM(Type)
1097
1098 Q_SIGNALS:
1099 void summaryChanged(const QString &summary);
1100
1101=== modified file 'tests/mocks/Unity/Screens/screens.cpp'
1102--- tests/mocks/Unity/Screens/screens.cpp 2016-01-20 19:33:38 +0000
1103+++ tests/mocks/Unity/Screens/screens.cpp 2017-01-02 08:48:40 +0000
1104@@ -30,7 +30,7 @@
1105 m_screenList.append(new Screen());
1106 }
1107
1108-Screens::~Screens()
1109+Screens::~Screens() noexcept
1110 {
1111 qDeleteAll(m_screenList);
1112 m_screenList.clear();
1113
1114=== modified file 'tests/mocks/Unity/Screens/screens.h'
1115--- tests/mocks/Unity/Screens/screens.h 2015-12-03 11:45:52 +0000
1116+++ tests/mocks/Unity/Screens/screens.h 2017-01-02 08:48:40 +0000
1117@@ -25,7 +25,6 @@
1118 class Screens : public QAbstractListModel
1119 {
1120 Q_OBJECT
1121- Q_ENUMS(OutputTypes)
1122
1123 Q_PROPERTY(int count READ count NOTIFY countChanged)
1124
1125@@ -52,6 +51,7 @@
1126 TV,
1127 EDP
1128 };
1129+ Q_ENUM(OutputTypes)
1130
1131 explicit Screens(QObject *parent = 0);
1132 virtual ~Screens() noexcept;
1133
1134=== modified file 'tests/mocks/Unity/fake_previewwidgetmodel.h'
1135--- tests/mocks/Unity/fake_previewwidgetmodel.h 2014-05-13 14:05:47 +0000
1136+++ tests/mocks/Unity/fake_previewwidgetmodel.h 2017-01-02 08:48:40 +0000
1137@@ -23,7 +23,7 @@
1138 #include <QSharedPointer>
1139 #include <QVariantMap>
1140
1141-class PreviewData;
1142+struct PreviewData;
1143
1144 class PreviewWidgetModel : public unity::shell::scopes::PreviewWidgetModelInterface
1145 {
1146
1147=== modified file 'tests/mocks/Unity/fake_scopes.cpp'
1148--- tests/mocks/Unity/fake_scopes.cpp 2016-06-07 03:33:35 +0000
1149+++ tests/mocks/Unity/fake_scopes.cpp 2017-01-02 08:48:40 +0000
1150@@ -272,7 +272,7 @@
1151 beginInsertRows(QModelIndex(), index, index);
1152 m_scopes.append(scope);
1153 endInsertRows();
1154- connect(scope, &Scope::favoriteChanged, [this, scope]{
1155+ connect(scope, &Scope::favoriteChanged, this, [this, scope]{
1156 setFavorite(scope->id(), scope->favorite());
1157 });
1158 }
1159
1160=== modified file 'tests/mocks/Unity/fake_scopesoverview.h'
1161--- tests/mocks/Unity/fake_scopesoverview.h 2015-10-14 12:46:35 +0000
1162+++ tests/mocks/Unity/fake_scopesoverview.h 2017-01-02 08:48:40 +0000
1163@@ -34,6 +34,8 @@
1164 void setSearchQuery(const QString& search_query) override;
1165 Q_INVOKABLE void activate(QVariant const& result, QString const& categoryId) override;
1166
1167+ using Scope::setFavorite;
1168+
1169 // This is implementation detail
1170 void setFavorite(Scope *scope, bool favorite);
1171 void moveFavoriteTo(Scope *scope, int index);
1172
1173=== modified file 'tests/mocks/Utils/windowstatestorage.h'
1174--- tests/mocks/Utils/windowstatestorage.h 2016-12-02 16:45:50 +0000
1175+++ tests/mocks/Utils/windowstatestorage.h 2017-01-02 08:48:40 +0000
1176@@ -25,7 +25,6 @@
1177 {
1178 Q_OBJECT
1179 Q_PROPERTY(QVariantMap geometry READ geometry WRITE setGeometry NOTIFY geometryChanged)
1180- Q_ENUMS(WindowState)
1181 public:
1182 enum WindowState {
1183 WindowStateNormal = 1 << 0,
1184@@ -42,10 +41,9 @@
1185 WindowStateMaximizedBottomRight = 1 << 11,
1186 WindowStateRestored = 1 << 12
1187 };
1188+ Q_ENUM(WindowState)
1189 Q_DECLARE_FLAGS(WindowStates, WindowState)
1190-#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))
1191 Q_FLAG(WindowStates)
1192-#endif
1193
1194 WindowStateStorage(QObject *parent = 0);
1195
1196
1197=== modified file 'tests/mocks/libusermetrics/CMakeLists.txt'
1198--- tests/mocks/libusermetrics/CMakeLists.txt 2013-12-17 14:56:25 +0000
1199+++ tests/mocks/libusermetrics/CMakeLists.txt 2017-01-02 08:48:40 +0000
1200@@ -10,6 +10,7 @@
1201
1202 include_directories(
1203 ${CMAKE_SOURCE_DIR}/plugins/Utils
1204+ ${CMAKE_CURRENT_BINARY_DIR}
1205 )
1206
1207 set_target_properties(MockUserMetrics PROPERTIES
1208
1209=== modified file 'tests/mocks/libusermetrics/ColorTheme.cpp'
1210--- tests/mocks/libusermetrics/ColorTheme.cpp 2013-06-14 19:35:25 +0000
1211+++ tests/mocks/libusermetrics/ColorTheme.cpp 2017-01-02 08:48:40 +0000
1212@@ -30,6 +30,8 @@
1213
1214 class ColorThemePrivate: QObject
1215 {
1216+ Q_OBJECT
1217+
1218 public:
1219 explicit ColorThemePrivate(ColorTheme *parent = 0);
1220
1221@@ -126,3 +128,5 @@
1222 {
1223 return d_ptr->m_end;
1224 }
1225+
1226+#include "ColorTheme.moc"
1227
1228=== modified file 'tests/mocks/libusermetrics/UserMetrics.cpp'
1229--- tests/mocks/libusermetrics/UserMetrics.cpp 2016-10-27 09:20:20 +0000
1230+++ tests/mocks/libusermetrics/UserMetrics.cpp 2017-01-02 08:48:40 +0000
1231@@ -36,6 +36,7 @@
1232
1233 class Q_DECL_EXPORT UserMetricsData: public QObject
1234 {
1235+ Q_OBJECT
1236 public:
1237 explicit UserMetricsData(QObject *parent);
1238
1239@@ -64,6 +65,7 @@
1240
1241 class UserMetricsPrivate: QObject
1242 {
1243+ Q_OBJECT
1244 public:
1245 explicit UserMetricsPrivate(UserMetrics *parent);
1246
1247@@ -106,6 +108,7 @@
1248
1249 class UserMetricsDataPrivate: QObject
1250 {
1251+ Q_OBJECT
1252 public:
1253 explicit UserMetricsDataPrivate(UserMetricsData *parent);
1254
1255@@ -492,3 +495,5 @@
1256 {
1257 return new UserMetrics();
1258 }
1259+
1260+#include "UserMetrics.moc"
1261
1262=== modified file 'tests/plugins/Dash/horizontaljournaltest.cpp'
1263--- tests/plugins/Dash/horizontaljournaltest.cpp 2016-11-28 09:57:06 +0000
1264+++ tests/plugins/Dash/horizontaljournaltest.cpp 2017-01-02 08:48:40 +0000
1265@@ -28,6 +28,7 @@
1266 #include "horizontaljournal.h"
1267
1268 class WidthModel : public QAbstractListModel {
1269+ Q_OBJECT
1270 public:
1271 QHash<int, QByteArray> roleNames() const override
1272 {
1273@@ -85,7 +86,7 @@
1274 {
1275 QTRY_COMPARE(item->x(), x);
1276 QTRY_COMPARE(item->y(), y);
1277- QTRY_COMPARE(item->width(), model->stringList()[modelIndex].toDouble());
1278+ QTRY_COMPARE(item->width(), model->stringList().at(modelIndex).toDouble());
1279 QTRY_COMPARE(QQuickItemPrivate::get(item)->culled, !visible);
1280 }
1281
1282
1283=== modified file 'tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp'
1284--- tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp 2016-11-28 09:57:06 +0000
1285+++ tests/plugins/Dash/listviewwithpageheadersectionexternalmodeltest.cpp 2017-01-02 08:48:40 +0000
1286@@ -28,6 +28,7 @@
1287
1288 class StringListModel : public QAbstractListModel
1289 {
1290+ Q_OBJECT
1291 public:
1292 StringListModel()
1293 {
1294
1295=== modified file 'tests/plugins/Dash/organicgridtest.cpp'
1296--- tests/plugins/Dash/organicgridtest.cpp 2016-11-28 09:57:06 +0000
1297+++ tests/plugins/Dash/organicgridtest.cpp 2017-01-02 08:48:40 +0000
1298@@ -28,6 +28,7 @@
1299 #include "organicgrid.h"
1300
1301 class DummyModel : public QAbstractListModel {
1302+ Q_OBJECT
1303 public:
1304 DummyModel() : m_count(0) {}
1305
1306
1307=== modified file 'tests/plugins/Dash/verticaljournaltest.cpp'
1308--- tests/plugins/Dash/verticaljournaltest.cpp 2016-11-28 09:57:06 +0000
1309+++ tests/plugins/Dash/verticaljournaltest.cpp 2017-01-02 08:48:40 +0000
1310@@ -28,6 +28,7 @@
1311 #include "verticaljournal.h"
1312
1313 class HeightModel : public QAbstractListModel {
1314+ Q_OBJECT
1315 public:
1316 QHash<int, QByteArray> roleNames() const override
1317 {
1318@@ -100,7 +101,7 @@
1319 QTRY_COMPARE(item.m_modelIndex, modelIndex);
1320 QTRY_COMPARE(item.x(), x);
1321 QTRY_COMPARE(item.y(), y);
1322- QTRY_COMPARE(item.height(), model->stringList()[modelIndex].toDouble());
1323+ QTRY_COMPARE(item.height(), model->stringList().at(modelIndex).toDouble());
1324 QTRY_COMPARE(QQuickItemPrivate::get(item.m_item)->culled, !visible);
1325 }
1326
1327
1328=== modified file 'tests/plugins/Greeter/Unity/Launcher/launchermodelastest.cpp'
1329--- tests/plugins/Greeter/Unity/Launcher/launchermodelastest.cpp 2015-10-26 14:05:14 +0000
1330+++ tests/plugins/Greeter/Unity/Launcher/launchermodelastest.cpp 2017-01-02 08:48:40 +0000
1331@@ -34,7 +34,6 @@
1332 Q_OBJECT
1333
1334 private:
1335- LauncherModel *launcherModel;
1336 QStringList users;
1337 QHash<QString, QList<QVariantMap>> mockProperties;
1338
1339
1340=== modified file 'tests/plugins/Unity/Launcher/launchermodeltest.cpp'
1341--- tests/plugins/Unity/Launcher/launchermodeltest.cpp 2016-12-07 11:30:41 +0000
1342+++ tests/plugins/Unity/Launcher/launchermodeltest.cpp 2017-01-02 08:48:40 +0000
1343@@ -101,7 +101,7 @@
1344 }
1345 return nullptr;
1346 }
1347- unityapi::ApplicationInfoInterface *findApplicationWithSurface(unityapi::MirSurfaceInterface* surface) const override {
1348+ unityapi::ApplicationInfoInterface *findApplicationWithSurface(unityapi::MirSurfaceInterface* /*surface*/) const override {
1349 return nullptr;
1350 }
1351 unity::shell::application::ApplicationInfoInterface *startApplication(const QString &, const QStringList &) override { return nullptr; }
1352@@ -501,14 +501,14 @@
1353 QCOMPARE(spy.count(), 2);
1354
1355 QVariantList countEmissionArgs = spy.takeFirst();
1356- QCOMPARE(countEmissionArgs.at(0).value<QModelIndex>().row(), index);
1357- QCOMPARE(countEmissionArgs.at(1).value<QModelIndex>().row(), index);
1358+ QCOMPARE(countEmissionArgs.at(0).toModelIndex().row(), index);
1359+ QCOMPARE(countEmissionArgs.at(1).toModelIndex().row(), index);
1360 QVector<int> roles = countEmissionArgs.at(2).value<QVector<int> >();
1361 QCOMPARE(roles.first(), (int)LauncherModel::RoleCount);
1362
1363 QVariantList countVisibleEmissionArgs = spy.takeFirst();
1364- QCOMPARE(countVisibleEmissionArgs.at(0).value<QModelIndex>().row(), index);
1365- QCOMPARE(countVisibleEmissionArgs.at(1).value<QModelIndex>().row(), index);
1366+ QCOMPARE(countVisibleEmissionArgs.at(0).toModelIndex().row(), index);
1367+ QCOMPARE(countVisibleEmissionArgs.at(1).toModelIndex().row(), index);
1368 roles = countVisibleEmissionArgs.at(2).value<QVector<int> >();
1369 QVERIFY(roles.contains(LauncherModel::RoleCountVisible));
1370 QVERIFY(roles.contains(LauncherModel::RoleAlerting));
1371
1372=== modified file 'tests/uqmlscene/main.cpp'
1373--- tests/uqmlscene/main.cpp 2016-05-26 13:15:35 +0000
1374+++ tests/uqmlscene/main.cpp 2017-01-02 08:48:40 +0000
1375@@ -243,7 +243,7 @@
1376
1377 static bool checkVersion(const QUrl &url)
1378 {
1379- if (!qgetenv("QMLSCENE_IMPORT_NAME").isEmpty())
1380+ if (!qEnvironmentVariableIsEmpty("QMLSCENE_IMPORT_NAME"))
1381 qWarning("QMLSCENE_IMPORT_NAME is no longer supported.");
1382
1383 QString fileName = url.toLocalFile();
1384@@ -387,9 +387,9 @@
1385 Options options;
1386
1387 QStringList imports;
1388- QList<QPair<QString, QString> > bundles;
1389+ QVector<QPair<QString, QString> > bundles;
1390 for (int i = 1; i < argc; ++i) {
1391- if (*argv[i] != '-' && QFileInfo(QFile::decodeName(argv[i])).exists()) {
1392+ if (*argv[i] != '-' && QFileInfo::exists(QFile::decodeName(argv[i]))) {
1393 options.file = QUrl::fromLocalFile(argv[i]);
1394 } else {
1395 const QString lowerArgument = QString::fromLatin1(argv[i]).toLower();
1396
1397=== modified file 'tests/utils/modules/Unity/Test/testutil.cpp'
1398--- tests/utils/modules/Unity/Test/testutil.cpp 2016-07-15 11:21:55 +0000
1399+++ tests/utils/modules/Unity/Test/testutil.cpp 2017-01-02 08:48:40 +0000
1400@@ -103,7 +103,7 @@
1401 void TestUtil::ensureTargetWindow()
1402 {
1403 if (!m_targetWindow && !QGuiApplication::topLevelWindows().isEmpty())
1404- m_targetWindow = QGuiApplication::topLevelWindows()[0];
1405+ m_targetWindow = QGuiApplication::topLevelWindows().at(0);
1406 }
1407
1408 void TestUtil::ensureTouchDevice()

Subscribers

People subscribed via source and target branches