Merge lp:~aacid/qtmir/clazy_run into lp:qtmir

Proposed by Albert Astals Cid
Status: Superseded
Proposed branch: lp:~aacid/qtmir/clazy_run
Merge into: lp:qtmir
Prerequisite: lp:~ci-train-bot/qtmir/qtmir-ubuntu-yakkety-landing-025
Diff against target: 1410 lines (+206/-155)
61 files modified
CMakeLists.txt (+4/-6)
demos/qml-demo-client/CMakeLists.txt (+3/-6)
demos/qml-demo-shell/CMakeLists.txt (+3/-6)
src/common/debughelpers.cpp (+12/-12)
src/modules/Unity/Application/CMakeLists.txt (+6/-2)
src/modules/Unity/Application/application.cpp (+5/-5)
src/modules/Unity/Application/application.h (+1/-1)
src/modules/Unity/Application/application_manager.cpp (+9/-9)
src/modules/Unity/Application/application_manager.h (+1/-1)
src/modules/Unity/Application/dbuswindowstack.cpp (+4/-3)
src/modules/Unity/Application/mirbuffersgtexture.cpp (+1/-1)
src/modules/Unity/Application/mirbuffersgtexture.h (+1/-1)
src/modules/Unity/Application/mirsurface.cpp (+1/-1)
src/modules/Unity/Application/mirsurfaceitem.cpp (+6/-6)
src/modules/Unity/Application/mirsurfaceitem.h (+1/-1)
src/modules/Unity/Application/mirsurfacemanager.cpp (+2/-2)
src/modules/Unity/Application/mirsurfacemanager.h (+1/-1)
src/modules/Unity/Application/proc_info.cpp (+1/-1)
src/modules/Unity/Application/session.cpp (+8/-8)
src/modules/Unity/Application/session.h (+3/-3)
src/modules/Unity/Application/session_interface.h (+2/-2)
src/modules/Unity/Application/sessionmanager.cpp (+1/-1)
src/modules/Unity/Application/sharedwakelock.cpp (+4/-4)
src/modules/Unity/Application/ubuntukeyboardinfo.cpp (+1/-1)
src/modules/Unity/Application/upstart/taskcontroller.cpp (+1/-1)
src/modules/Unity/Screens/CMakeLists.txt (+4/-0)
src/modules/Unity/Screens/qquickscreenwindow.cpp (+1/-1)
src/platforms/mirserver/CMakeLists.txt (+4/-0)
src/platforms/mirserver/clipboard.cpp (+3/-2)
src/platforms/mirserver/creationhints.cpp (+1/-1)
src/platforms/mirserver/creationhints.h (+1/-1)
src/platforms/mirserver/cursor.cpp (+25/-25)
src/platforms/mirserver/cursor.h (+1/-0)
src/platforms/mirserver/mircursorimages.cpp (+1/-1)
src/platforms/mirserver/nativeinterface.cpp (+2/-2)
src/platforms/mirserver/nativeinterface.h (+2/-1)
src/platforms/mirserver/plugin.cpp (+1/-1)
src/platforms/mirserver/qteventfeeder.cpp (+1/-1)
src/platforms/mirserver/screen.cpp (+7/-7)
src/platforms/mirserver/screenscontroller.cpp (+2/-2)
src/platforms/mirserver/screenscontroller.h (+1/-1)
src/platforms/mirserver/screensmodel.cpp (+7/-7)
src/platforms/mirserver/screensmodel.h (+1/-1)
src/platforms/mirserver/sessionlistener.cpp (+1/-1)
src/platforms/mirserver/sessionlistener.h (+1/-1)
src/platforms/mirserver/surfaceobserver.cpp (+2/-2)
src/platforms/mirserver/surfaceobserver.h (+2/-2)
tests/framework/CMakeLists.txt (+5/-1)
tests/framework/fake_session.cpp (+2/-2)
tests/framework/fake_session.h (+2/-2)
tests/framework/mock_session.h (+2/-2)
tests/mirserver/Clipboard/CMakeLists.txt (+4/-0)
tests/mirserver/QtEventFeeder/CMakeLists.txt (+4/-0)
tests/mirserver/Screen/CMakeLists.txt (+4/-0)
tests/mirserver/ScreensModel/CMakeLists.txt (+4/-0)
tests/mirserver/WindowManager/CMakeLists.txt (+4/-0)
tests/modules/Application/CMakeLists.txt (+4/-1)
tests/modules/ApplicationManager/CMakeLists.txt (+5/-1)
tests/modules/SessionManager/CMakeLists.txt (+5/-1)
tests/modules/SharedWakelock/CMakeLists.txt (+4/-0)
tests/modules/SurfaceManager/CMakeLists.txt (+4/-0)
To merge this branch: bzr merge lp:~aacid/qtmir/clazy_run
Reviewer Review Type Date Requested Status
Unity8 CI Bot (community) continuous-integration Needs Fixing
PS Jenkins bot continuous-integration Pending
Mir development team Pending
Review via email: mp+296596@code.launchpad.net

This proposal supersedes a proposal from 2015-09-08.

This proposal has been superseded by a proposal from 2016-06-06.

Commit message

Improvements from running clazy over the code

* Use QStringLiterals for literals
* Add some QLatin1Strings
* Add some reserve() calls
* Change a QList to QVector since QList is not optimal on big items
* Add some const &
* Add one override
* Fix some struct/class mistmatches

clazy: https://quickgit.kde.org/?p=scratch%2Fsmartins%2Fclazy.git
Run over the src folder

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

Was this all done by the script? We've a couple of big things to land, and this will conflict with them all. Would prefer to do this when things more quiet.

Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

This is manual (acting on the tool warnings):
 * Add some reserve() calls
 * Change a QList to QVector since QList is not optimal on big items
 * Add some const &
 * Add one override
 * Fix some struct/class mistmatches

This is automatic:
 * Use QStringLiterals for literals
 * Add some QLatin1Strings

We're working on some improvements on the tool so that QLatin1String is used in places it is better than QStringLiteral so may make sense wait for that to land.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:378
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-1-ci/10/
Executed test runs:

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal

So what's the fate of this branch?

Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

Gerry always says he wants it in when I complain, but then nothing happens. I guess at this point it probably doesn't merge correctly? I can update it if there's real desire to merge it in.

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:519
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-ci/261/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/1884/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1910
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1846
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1846
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1846
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1837/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1837/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1837/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1837/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1837/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1837/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1837/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1837/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1837/console

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:520
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-ci/263/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/1885/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1911
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1847
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1847
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1847
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1838/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1838/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1838/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1838/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1838/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1838/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1838/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1838/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1838/console

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

review: Needs Fixing (continuous-integration)
lp:~aacid/qtmir/clazy_run updated
521. By Albert Astals Cid

Merge trunk

522. By Albert Astals Cid

Merge

523. By Albert Astals Cid

Merge

524. By Albert Astals Cid

Merge

525. By Albert Astals Cid

wops, remove

526. By Albert Astals Cid

spacing

527. By Albert Astals Cid

Remove change that conflicts with other branch removing this code

Unmerged revisions

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-06-06 19:34:36 +0000
3+++ CMakeLists.txt 2016-06-06 19:34:36 +0000
4@@ -85,21 +85,19 @@
5 pkg_check_modules(QTDBUSMOCK libqtdbusmock-1 REQUIRED)
6 pkg_check_modules(APPLICATION_API REQUIRED unity-shell-application=18)
7
8-include_directories(${APPLICATION_API_INCLUDE_DIRS})
9+include_directories(SYSTEM ${APPLICATION_API_INCLUDE_DIRS})
10
11 add_definitions(-DMIR_REQUIRE_DEPRECATED_EVENT_OPT_IN=1)
12
13 # Use the fast string builder
14 add_definitions(-DQT_USE_QSTRINGBUILDER)
15
16-include_directories( ${APPLICATION_API_INCLUDE_DIRS} )
17-
18 # We expect this to be set via debian/rules for GLES builds
19 if ("${USE_OPENGLES}" STREQUAL 1)
20 message(STATUS "Qt5 determined to be compiled with GLES support")
21 pkg_check_modules(GLESv2 glesv2)
22 add_definitions(-DQT_USING_GLES)
23- include_directories (${GLESv2_INCLUDE_DIRS})
24+ include_directories (SYSTEM ${GLESv2_INCLUDE_DIRS})
25 set (GL_LIBRARIES "${GLESv2_LIBRARIES}")
26 # Because qt/gl and qt/gles are not parallel installable we have a difficulty
27 # building qtmir-desktop on armhf. We would like to link against opengl and bind the
28@@ -110,13 +108,13 @@
29 message(STATUS "Linking against OpenGL ES but binding OpenGL API")
30 pkg_check_modules(GLESv2 glesv2)
31 add_definitions(-DQT_USING_GL)
32- include_directories (${GLESv2_INCLUDE_DIRS})
33+ include_directories (SYSTEM ${GLESv2_INCLUDE_DIRS})
34 set (GL_LIBRARIES "${GLESv2_LIBRARIES}")
35 else()
36 message(STATUS "Qt5 determined to be compiled with OpenGL support")
37 pkg_check_modules(GL gl)
38 add_definitions(-DQT_USING_OPENGL)
39- include_directories (${GL_INCLUDE_DIRS})
40+ include_directories (SYSTEM ${GL_INCLUDE_DIRS})
41 endif()
42
43 # Standard install paths
44
45=== modified file 'demos/qml-demo-client/CMakeLists.txt'
46--- demos/qml-demo-client/CMakeLists.txt 2015-09-01 16:16:47 +0000
47+++ demos/qml-demo-client/CMakeLists.txt 2016-06-06 19:34:36 +0000
48@@ -2,19 +2,16 @@
49 configure_file(${DEMO_CLIENT}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${DEMO_CLIENT}.desktop @ONLY)
50
51 include_directories(
52+ SYSTEM
53 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
54+ ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
55+ ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
56 )
57
58 add_executable(${DEMO_CLIENT}
59 main.cpp
60 )
61
62-include_directories(
63- ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
64- ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
65- ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
66-)
67-
68 target_link_libraries(
69 ${DEMO_CLIENT}
70 Qt5::Core
71
72=== modified file 'demos/qml-demo-shell/CMakeLists.txt'
73--- demos/qml-demo-shell/CMakeLists.txt 2015-09-01 16:16:47 +0000
74+++ demos/qml-demo-shell/CMakeLists.txt 2016-06-06 19:34:36 +0000
75@@ -1,19 +1,16 @@
76 set(DEMO_SHELL qtmir-demo-shell)
77
78 include_directories(
79+ SYSTEM
80 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
81+ ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
82+ ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
83 )
84
85 add_executable(${DEMO_SHELL}
86 main.cpp
87 )
88
89-include_directories(
90- ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
91- ${Qt5Qml_PRIVATE_INCLUDE_DIRS}
92- ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
93-)
94-
95 target_link_libraries(
96 ${DEMO_SHELL}
97 Qt5::Core
98
99=== modified file 'src/common/debughelpers.cpp'
100--- src/common/debughelpers.cpp 2016-06-06 19:34:36 +0000
101+++ src/common/debughelpers.cpp 2016-06-06 19:34:36 +0000
102@@ -63,7 +63,7 @@
103
104 const QTouchEvent::TouchPoint& touchPoint = ev->touchPoints().at(i);
105 message.append(
106- QString("(id:%1, state:%2, scenePos:(%3,%4), pos:(%5,%6)) ")
107+ QStringLiteral("(id:%1, state:%2, scenePos:(%3,%4), pos:(%5,%6)) ")
108 .arg(touchPoint.id())
109 .arg(touchPointStateToString(touchPoint.state()))
110 .arg(touchPoint.scenePos().x())
111@@ -82,30 +82,30 @@
112
113 switch (attrib) {
114 case mir_surface_attrib_type:
115- str = QString("type=%1").arg(mirSurfaceTypeToStr(value));
116+ str = QStringLiteral("type=%1").arg(mirSurfaceTypeToStr(value));
117 break;
118
119 case mir_surface_attrib_state:
120- str = QString("state=%1").arg(mirSurfaceStateToStr(value));
121+ str = QStringLiteral("state=%1").arg(mirSurfaceStateToStr(value));
122 break;
123
124 case mir_surface_attrib_swapinterval:
125- str = QString("swapinterval=%1").arg(value);
126+ str = QStringLiteral("swapinterval=%1").arg(value);
127 break;
128
129 case mir_surface_attrib_focus:
130- str = QString("focus=%1").arg(mirSurfaceFocusStateToStr(value));
131+ str = QStringLiteral("focus=%1").arg(mirSurfaceFocusStateToStr(value));
132 break;
133
134 case mir_surface_attrib_dpi:
135- str = QString("dpi=%1").arg(value);
136+ str = QStringLiteral("dpi=%1").arg(value);
137 break;
138
139 case mir_surface_attrib_visibility:
140- str = QString("visibility=%1").arg(mirSurfaceVisibilityToStr(value));
141+ str = QStringLiteral("visibility=%1").arg(mirSurfaceVisibilityToStr(value));
142 break;
143 default:
144- str = QString("type'%1'=%2").arg((int)attrib).arg(value);
145+ str = QStringLiteral("type'%1'=%2").arg((int)attrib).arg(value);
146 }
147
148 return str;
149@@ -211,7 +211,7 @@
150
151 QString mirPointerEventToString(MirPointerEvent const* event)
152 {
153- QString string = QString("MirPointerEvent(x=%1,y=%2,relative_x=%3,relative_y=%4)")
154+ QString string = QStringLiteral("MirPointerEvent(x=%1,y=%2,relative_x=%3,relative_y=%4)")
155 .arg(mir_pointer_event_axis_value(event, mir_pointer_axis_x))
156 .arg(mir_pointer_event_axis_value(event, mir_pointer_axis_y))
157 .arg(mir_pointer_event_axis_value(event, mir_pointer_axis_relative_x))
158@@ -224,7 +224,7 @@
159 {
160 const int pointerCount = mir_touch_event_point_count(event);
161
162- QString string("MirTouchEvent(");
163+ QString string(QStringLiteral("MirTouchEvent("));
164
165 for (int i = 0; i < pointerCount; ++i) {
166
167@@ -234,7 +234,7 @@
168
169 MirTouchAction touchAction = mir_touch_event_action(event, i);
170
171- QString touchStr = QString("(id=%1,action=%2,x=%3,y=%4)")
172+ QString touchStr = QStringLiteral("(id=%1,action=%2,x=%3,y=%4)")
173 .arg(mir_touch_event_id(event, i))
174 .arg(mirTouchActionToString(touchAction))
175 .arg(mir_touch_event_axis_value(event, i, mir_touch_axis_x))
176@@ -291,7 +291,7 @@
177
178 xkb_keysym_t keyCode = mir_keyboard_event_key_code(event);
179
180- return QString("MirKeyboardEvent(action=%1,key_code=0x%2)")
181+ return QStringLiteral("MirKeyboardEvent(action=%1,key_code=0x%2)")
182 .arg(mirKeyboardActionToString(keyboardAction))
183 .arg(keyCode, 4, 16, QLatin1Char('0'));
184 }
185
186=== modified file 'src/modules/Unity/Application/CMakeLists.txt'
187--- src/modules/Unity/Application/CMakeLists.txt 2016-04-26 08:56:36 +0000
188+++ src/modules/Unity/Application/CMakeLists.txt 2016-06-06 19:34:36 +0000
189@@ -1,4 +1,10 @@
190 include_directories(
191+ ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
192+ ${CMAKE_SOURCE_DIR}/src/common
193+)
194+
195+include_directories(
196+ SYSTEM
197 ${GLIB_INCLUDE_DIRS}
198 ${GIO_INCLUDE_DIRS}
199 ${GIO_UNIX_INCLUDE_DIRS}
200@@ -7,8 +13,6 @@
201 ${PROCESS_CPP_INCLUDE_DIRS}
202 ${UBUNTU_PLATFORM_API_INCLUDE_DIRS}
203 ${UBUNTU_APP_LAUNCH_INCLUDE_DIRS}
204- ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
205- ${CMAKE_SOURCE_DIR}/src/common
206 ${GSETTINGS_QT_INCLUDE_DIRS}
207
208 ${LTTNG_INCLUDE_DIRS}
209
210=== modified file 'src/modules/Unity/Application/application.cpp'
211--- src/modules/Unity/Application/application.cpp 2016-06-06 19:34:36 +0000
212+++ src/modules/Unity/Application/application.cpp 2016-06-06 19:34:36 +0000
213@@ -174,8 +174,8 @@
214 color.setAlpha(255);
215 } else {
216 color.setRgba(qRgba(0, 0, 0, 0));
217- qCWarning(QTMIR_APPLICATIONS) << QString("Invalid %1: \"%2\"")
218- .arg(colorName).arg(colorString);
219+ qCWarning(QTMIR_APPLICATIONS) << QStringLiteral("Invalid %1: \"%2\"")
220+ .arg(colorName, colorString);
221 }
222 }
223
224@@ -466,7 +466,7 @@
225 m_pid = pid;
226 }
227
228-void Application::setArguments(const QStringList arguments)
229+void Application::setArguments(const QStringList &arguments)
230 {
231 m_arguments = arguments;
232 }
233@@ -738,7 +738,7 @@
234
235 void Application::acquireWakelock() const
236 {
237- if (appId() == "unity8-dash")
238+ if (appId() == QLatin1String("unity8-dash"))
239 return;
240
241 m_sharedWakelock->acquire(this);
242@@ -746,7 +746,7 @@
243
244 void Application::releaseWakelock() const
245 {
246- if (appId() == "unity8-dash")
247+ if (appId() == QLatin1String("unity8-dash"))
248 return;
249
250 m_sharedWakelock->release(this);
251
252=== modified file 'src/modules/Unity/Application/application.h'
253--- src/modules/Unity/Application/application.h 2016-06-06 19:34:36 +0000
254+++ src/modules/Unity/Application/application.h 2016-06-06 19:34:36 +0000
255@@ -160,7 +160,7 @@
256 void acquireWakelock() const;
257 void releaseWakelock() const;
258 void setPid(pid_t pid);
259- void setArguments(const QStringList arguments);
260+ void setArguments(const QStringList &arguments);
261 void setInternalState(InternalState state);
262 void wipeQMLCache();
263 void suspend();
264
265=== modified file 'src/modules/Unity/Application/application_manager.cpp'
266--- src/modules/Unity/Application/application_manager.cpp 2016-05-06 08:41:15 +0000
267+++ src/modules/Unity/Application/application_manager.cpp 2016-06-06 19:34:36 +0000
268@@ -64,12 +64,12 @@
269
270 // FIXME: To be removed once shell has fully adopted short appIds!!
271 QString toShortAppIdIfPossible(const QString &appId) {
272- QRegExp longAppIdMask("[a-z0-9][a-z0-9+.-]+_[a-zA-Z0-9+.-]+_[0-9][a-zA-Z0-9.+:~-]*");
273+ QRegExp longAppIdMask(QStringLiteral("[a-z0-9][a-z0-9+.-]+_[a-zA-Z0-9+.-]+_[0-9][a-zA-Z0-9.+:~-]*"));
274 if (longAppIdMask.exactMatch(appId)) {
275 qWarning() << "WARNING: long App ID encountered:" << appId;
276 // input string a long AppId, chop the version string off the end
277- QStringList parts = appId.split("_");
278- return QString("%1_%2").arg(parts.first()).arg(parts.at(1));
279+ QStringList parts = appId.split(QStringLiteral("_"));
280+ return QStringLiteral("%1_%2").arg(parts.first(), parts.at(1));
281 }
282 return appId;
283 }
284@@ -183,7 +183,7 @@
285 , m_settings(settings)
286 {
287 qCDebug(QTMIR_APPLICATIONS) << "ApplicationManager::ApplicationManager (this=%p)" << this;
288- setObjectName("qtmir::ApplicationManager");
289+ setObjectName(QStringLiteral("qtmir::ApplicationManager"));
290
291 /*
292 All begin[...]Rows() and end[...]Rows() functions cause signal emissions which can
293@@ -532,7 +532,7 @@
294
295 qCDebug(QTMIR_APPLICATIONS) << "ApplicationManager::authorizeSession - pid=" << pid;
296
297- for (Application *app : m_applications) {
298+ Q_FOREACH (Application *app, m_applications) {
299 if (app->state() == Application::Starting) {
300 tracepoint(qtmir, appIdHasProcessId_start);
301 if (m_taskController->appIdHasProcessId(app->appId(), pid)) {
302@@ -572,7 +572,7 @@
303 }
304
305 // Guess appId from the desktop file hint
306- const QString appId = toShortAppIdIfPossible(desktopFileName.split('/').last().remove(QRegExp(".desktop$")));
307+ const QString appId = toShortAppIdIfPossible(desktopFileName.split('/').last().remove(QRegExp(QStringLiteral(".desktop$"))));
308
309 qCDebug(QTMIR_APPLICATIONS) << "Process supplied desktop_file_hint, loading:" << appId;
310
311@@ -598,7 +598,7 @@
312 Application::Stage stage = Application::MainStage;
313 QString stageParam = info->getParameter("--stage_hint=");
314
315- if (stageParam == "side_stage") {
316+ if (stageParam == QLatin1String("side_stage")) {
317 stage = Application::SideStage;
318 }
319
320@@ -654,7 +654,7 @@
321 return findApplicationWithPid(session->process_id());
322 }
323
324-Application* ApplicationManager::findApplicationWithPid(const pid_t pid)
325+Application* ApplicationManager::findApplicationWithPid(const pid_t pid) const
326 {
327 if (pid <= 0)
328 return nullptr;
329@@ -878,7 +878,7 @@
330
331 Application *ApplicationManager::findApplication(qtmir::MirSurfaceInterface* surface)
332 {
333- for (Application *app : m_applications) {
334+ Q_FOREACH (Application *app, m_applications) {
335 if (app->session() == surface->session()) {
336 return app;
337 }
338
339=== modified file 'src/modules/Unity/Application/application_manager.h'
340--- src/modules/Unity/Application/application_manager.h 2016-05-05 15:02:01 +0000
341+++ src/modules/Unity/Application/application_manager.h 2016-06-06 19:34:36 +0000
342@@ -96,7 +96,7 @@
343 bool isEmpty() const { return rowCount() == 0; }
344
345 const QList<Application*> &list() const { return m_applications; }
346- qtmir::Application* findApplicationWithPid(const pid_t pid);
347+ qtmir::Application* findApplicationWithPid(const pid_t pid) const;
348
349 public Q_SLOTS:
350 void authorizeSession(const pid_t pid, bool &authorized);
351
352=== modified file 'src/modules/Unity/Application/dbuswindowstack.cpp'
353--- src/modules/Unity/Application/dbuswindowstack.cpp 2016-01-20 21:36:39 +0000
354+++ src/modules/Unity/Application/dbuswindowstack.cpp 2016-06-06 19:34:36 +0000
355@@ -33,9 +33,9 @@
356 qDBusRegisterMetaType<WindowInfo>();
357 qDBusRegisterMetaType< QList<WindowInfo> >();
358
359- QDBusConnection::sessionBus().registerService("com.canonical.Unity.WindowStack");
360+ QDBusConnection::sessionBus().registerService(QStringLiteral("com.canonical.Unity.WindowStack"));
361 // TODO ExportScriptableSlots shouldn't be needed but without it i don't get the methods :-/
362- QDBusConnection::sessionBus().registerObject("/com/canonical/Unity/WindowStack", this, QDBusConnection::ExportAllSignals | QDBusConnection::ExportScriptableSlots |QDBusConnection::ExportScriptableInvokables );
363+ QDBusConnection::sessionBus().registerObject(QStringLiteral("/com/canonical/Unity/WindowStack"), this, QDBusConnection::ExportAllSignals | QDBusConnection::ExportScriptableSlots |QDBusConnection::ExportScriptableInvokables );
364 }
365
366 DBusWindowStack::~DBusWindowStack()
367@@ -49,7 +49,7 @@
368 const Application *app = appMgr->findApplicationWithPid(pid);
369 if (app) {
370 res.app_id = app->appId();
371- res.desktop_file = "";
372+ res.desktop_file = QString();
373 }
374 return res;
375 }
376@@ -59,6 +59,7 @@
377 QList<WindowInfo> res;
378 ApplicationManager *appMgr = static_cast<ApplicationManager*>(parent());
379 const QList<Application*> &applications = appMgr->list();
380+ res.reserve(applications.count());
381 Q_FOREACH(Application* app, applications) {
382 WindowInfo wi;
383 wi.window_id = 0;
384
385=== modified file 'src/modules/Unity/Application/mirbuffersgtexture.cpp'
386--- src/modules/Unity/Application/mirbuffersgtexture.cpp 2015-12-10 13:08:43 +0000
387+++ src/modules/Unity/Application/mirbuffersgtexture.cpp 2016-06-06 19:34:36 +0000
388@@ -51,7 +51,7 @@
389 m_height = 0;
390 }
391
392-void MirBufferSGTexture::setBuffer(std::shared_ptr<mir::graphics::Buffer> buffer)
393+void MirBufferSGTexture::setBuffer(const std::shared_ptr<mir::graphics::Buffer>& buffer)
394 {
395 m_mirBuffer = buffer;
396 mg::Size size = buffer->size();
397
398=== modified file 'src/modules/Unity/Application/mirbuffersgtexture.h'
399--- src/modules/Unity/Application/mirbuffersgtexture.h 2015-09-28 09:57:18 +0000
400+++ src/modules/Unity/Application/mirbuffersgtexture.h 2016-06-06 19:34:36 +0000
401@@ -32,7 +32,7 @@
402 MirBufferSGTexture();
403 virtual ~MirBufferSGTexture();
404
405- void setBuffer(std::shared_ptr<mir::graphics::Buffer> buffer);
406+ void setBuffer(const std::shared_ptr<mir::graphics::Buffer>& buffer);
407 void freeBuffer();
408 bool hasBuffer() const;
409
410
411=== modified file 'src/modules/Unity/Application/mirsurface.cpp'
412--- src/modules/Unity/Application/mirsurface.cpp 2016-05-25 13:54:52 +0000
413+++ src/modules/Unity/Application/mirsurface.cpp 2016-06-06 19:34:36 +0000
414@@ -835,7 +835,7 @@
415
416 void MirSurface::applyKeymap()
417 {
418- QStringList stringList = m_keymap.split("+", QString::SkipEmptyParts);
419+ QStringList stringList = m_keymap.split('+', QString::SkipEmptyParts);
420
421 QString layout = stringList[0];
422 QString variant;
423
424=== modified file 'src/modules/Unity/Application/mirsurfaceitem.cpp'
425--- src/modules/Unity/Application/mirsurfaceitem.cpp 2016-05-24 20:13:10 +0000
426+++ src/modules/Unity/Application/mirsurfaceitem.cpp 2016-06-06 19:34:36 +0000
427@@ -61,7 +61,7 @@
428 {
429 Q_OBJECT
430 public:
431- MirTextureProvider(QSharedPointer<QSGTexture> texture) : t(texture) {}
432+ MirTextureProvider(const QSharedPointer<QSGTexture>& texture) : t(texture) {}
433 QSGTexture *texture() const {
434 if (t)
435 t->setFiltering(smooth ? QSGTexture::Linear : QSGTexture::Nearest);
436@@ -74,7 +74,7 @@
437 t.reset();
438 }
439
440- void setTexture(QSharedPointer<QSGTexture> newTexture) {
441+ void setTexture(const QSharedPointer<QSGTexture>& newTexture) {
442 t = newTexture;
443 }
444
445@@ -242,7 +242,7 @@
446 }
447
448 if (m_surface->numBuffersReadyForCompositor() > 0) {
449- QTimer::singleShot(0, this, SLOT(update()));
450+ QTimer::singleShot(0, this, &MirSurfaceItem::update);
451 }
452
453 m_textureProvider->smooth = smooth();
454@@ -388,7 +388,7 @@
455 if (m_surface) {
456 return m_surface->appId();
457 } else {
458- return QString("-");
459+ return QStringLiteral("-");
460 }
461 }
462
463@@ -433,7 +433,7 @@
464 Qt::TouchPointStates touchPointStates)
465 {
466 if (eventType == QEvent::TouchBegin && m_lastTouchEvent && m_lastTouchEvent->type != QEvent::TouchEnd) {
467- qCWarning(QTMIR_SURFACES) << qPrintable(QString("MirSurfaceItem(%1) - Got a QEvent::TouchBegin while "
468+ qCWarning(QTMIR_SURFACES) << qPrintable(QStringLiteral("MirSurfaceItem(%1) - Got a QEvent::TouchBegin while "
469 "there's still an active/unfinished touch sequence.").arg(appId()));
470 // Qt forgot to end the last touch sequence. Let's do it ourselves.
471 endCurrentTouchSequence(timestamp);
472@@ -749,7 +749,7 @@
473 }
474 }
475
476-void MirSurfaceItem::onActualSurfaceSizeChanged(const QSize &size)
477+void MirSurfaceItem::onActualSurfaceSizeChanged(QSize size)
478 {
479 setImplicitSize(size.width(), size.height());
480 }
481
482=== modified file 'src/modules/Unity/Application/mirsurfaceitem.h'
483--- src/modules/Unity/Application/mirsurfaceitem.h 2016-05-24 20:13:10 +0000
484+++ src/modules/Unity/Application/mirsurfaceitem.h 2016-06-06 19:34:36 +0000
485@@ -119,7 +119,7 @@
486 void updateMirSurfaceActiveFocus();
487 void updateMirSurfaceVisibility();
488
489- void onActualSurfaceSizeChanged(const QSize &size);
490+ void onActualSurfaceSizeChanged(QSize size);
491 void onCompositorSwappedBuffers();
492
493 void onWindowChanged(QQuickWindow *window);
494
495=== modified file 'src/modules/Unity/Application/mirsurfacemanager.cpp'
496--- src/modules/Unity/Application/mirsurfacemanager.cpp 2016-05-06 08:41:15 +0000
497+++ src/modules/Unity/Application/mirsurfacemanager.cpp 2016-06-06 19:34:36 +0000
498@@ -85,7 +85,7 @@
499 , m_sessionManager(sessionManager)
500 {
501 qCDebug(QTMIR_SURFACES) << "MirSurfaceManager::MirSurfaceManager - this=" << this;
502- setObjectName("qtmir::SurfaceManager");
503+ setObjectName(QStringLiteral("qtmir::SurfaceManager"));
504 }
505
506 MirSurfaceManager::~MirSurfaceManager()
507@@ -98,7 +98,7 @@
508 void MirSurfaceManager::onSessionCreatedSurface(const mir::scene::Session *mirSession,
509 const std::shared_ptr<mir::scene::Surface> &surface,
510 const std::shared_ptr<SurfaceObserver> &observer,
511- qtmir::CreationHints creationHints)
512+ const qtmir::CreationHints &creationHints)
513 {
514 qCDebug(QTMIR_SURFACES) << "MirSurfaceManager::onSessionCreatedSurface - mirSession=" << mirSession
515 << "surface=" << surface.get() << "surface.name=" << surface->name().c_str()
516
517=== modified file 'src/modules/Unity/Application/mirsurfacemanager.h'
518--- src/modules/Unity/Application/mirsurfacemanager.h 2016-05-06 08:28:44 +0000
519+++ src/modules/Unity/Application/mirsurfacemanager.h 2016-06-06 19:34:36 +0000
520@@ -75,7 +75,7 @@
521 void onSessionCreatedSurface(const mir::scene::Session *,
522 const std::shared_ptr<mir::scene::Surface> &,
523 std::shared_ptr<SurfaceObserver> const&,
524- qtmir::CreationHints);
525+ const qtmir::CreationHints &);
526 void onSessionDestroyingSurface(const mir::scene::Session *, const std::shared_ptr<mir::scene::Surface> &);
527
528 protected:
529
530=== modified file 'src/modules/Unity/Application/proc_info.cpp'
531--- src/modules/Unity/Application/proc_info.cpp 2015-10-08 11:20:30 +0000
532+++ src/modules/Unity/Application/proc_info.cpp 2016-06-06 19:34:36 +0000
533@@ -27,7 +27,7 @@
534 }
535
536 std::unique_ptr<ProcInfo::CommandLine> ProcInfo::commandLine(pid_t pid) {
537- QFile cmdline(QString("/proc/%1/cmdline").arg(pid));
538+ QFile cmdline(QStringLiteral("/proc/%1/cmdline").arg(pid));
539 if (!cmdline.open(QIODevice::ReadOnly | QIODevice::Text)) {
540 return nullptr;
541 }
542
543=== modified file 'src/modules/Unity/Application/session.cpp'
544--- src/modules/Unity/Application/session.cpp 2016-06-06 19:34:36 +0000
545+++ src/modules/Unity/Application/session.cpp 2016-06-06 19:34:36 +0000
546@@ -89,7 +89,7 @@
547 DEBUG_MSG << "()";
548 stopPromptSessions();
549
550- QList<SessionInterface*> children(m_children->list());
551+ const QList<SessionInterface*> children(m_children->list());
552 for (SessionInterface* child : children) {
553 delete child;
554 }
555@@ -438,9 +438,9 @@
556 deleteIfZombieAndEmpty();
557 }
558
559-void Session::foreachChildSession(std::function<void(SessionInterface* session)> f) const
560+void Session::foreachChildSession(const std::function<void(SessionInterface* session)>& f) const
561 {
562- QList<SessionInterface*> children(m_children->list());
563+ const QList<SessionInterface*> children(m_children->list());
564 for (SessionInterface* child : children) {
565 f(child);
566 }
567@@ -467,13 +467,13 @@
568
569 void Session::stopPromptSessions()
570 {
571- QList<SessionInterface*> children(m_children->list());
572+ const QList<SessionInterface*> children(m_children->list());
573 for (SessionInterface* child : children) {
574 static_cast<Session*>(child)->stopPromptSessions();
575 }
576
577- QList<std::shared_ptr<ms::PromptSession>> copy(m_promptSessions);
578- QListIterator<std::shared_ptr<ms::PromptSession>> it(copy);
579+ QVector<std::shared_ptr<ms::PromptSession>> copy(m_promptSessions);
580+ QVectorIterator<std::shared_ptr<ms::PromptSession>> it(copy);
581 for ( it.toBack(); it.hasPrevious(); ) {
582 std::shared_ptr<ms::PromptSession> promptSession = it.previous();
583 DEBUG_MSG << " - promptSession=" << promptSession.get();
584@@ -489,9 +489,9 @@
585 return nullptr;
586 }
587
588-void Session::foreachPromptSession(std::function<void(const std::shared_ptr<ms::PromptSession>&)> f) const
589+void Session::foreachPromptSession(const std::function<void(const std::shared_ptr<ms::PromptSession>&)>& f) const
590 {
591- for (std::shared_ptr<ms::PromptSession> promptSession : m_promptSessions) {
592+ Q_FOREACH (std::shared_ptr<ms::PromptSession> promptSession, m_promptSessions) {
593 f(promptSession);
594 }
595 }
596
597=== modified file 'src/modules/Unity/Application/session.h'
598--- src/modules/Unity/Application/session.h 2016-05-17 19:18:44 +0000
599+++ src/modules/Unity/Application/session.h 2016-06-06 19:34:36 +0000
600@@ -70,12 +70,12 @@
601 void addChildSession(SessionInterface* session) override;
602 void insertChildSession(uint index, SessionInterface* session) override;
603 void removeChildSession(SessionInterface* session) override;
604- void foreachChildSession(std::function<void(SessionInterface* session)> f) const override;
605+ void foreachChildSession(const std::function<void(SessionInterface* session)> &f) const override;
606
607 std::shared_ptr<mir::scene::Session> session() const override;
608
609 std::shared_ptr<mir::scene::PromptSession> activePromptSession() const override;
610- void foreachPromptSession(std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> f) const override;
611+ void foreachPromptSession(const std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> &f) const override;
612
613 SessionModel* childSessions() const override;
614
615@@ -115,7 +115,7 @@
616 State m_state;
617 bool m_live;
618 AbstractTimer* m_suspendTimer{nullptr};
619- QList<std::shared_ptr<mir::scene::PromptSession>> m_promptSessions;
620+ QVector<std::shared_ptr<mir::scene::PromptSession>> m_promptSessions;
621 std::shared_ptr<mir::scene::PromptSessionManager> const m_promptSessionManager;
622 QList<MirSurfaceInterface*> m_closingSurfaces;
623 bool m_hadSurface{false};
624
625=== modified file 'src/modules/Unity/Application/session_interface.h'
626--- src/modules/Unity/Application/session_interface.h 2016-05-17 19:18:44 +0000
627+++ src/modules/Unity/Application/session_interface.h 2016-06-06 19:34:36 +0000
628@@ -97,10 +97,10 @@
629 virtual void addChildSession(SessionInterface* session) = 0;
630 virtual void insertChildSession(uint index, SessionInterface* session) = 0;
631 virtual void removeChildSession(SessionInterface* session) = 0;
632- virtual void foreachChildSession(std::function<void(SessionInterface* session)> f) const = 0;
633+ virtual void foreachChildSession(const std::function<void(SessionInterface* session)>& f) const = 0;
634
635 virtual std::shared_ptr<mir::scene::PromptSession> activePromptSession() const = 0;
636- virtual void foreachPromptSession(std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> f) const = 0;
637+ virtual void foreachPromptSession(const std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)>& f) const = 0;
638
639 virtual void setFullscreen(bool fullscreen) = 0;
640 virtual void setLive(const bool) = 0;
641
642=== modified file 'src/modules/Unity/Application/sessionmanager.cpp'
643--- src/modules/Unity/Application/sessionmanager.cpp 2016-05-06 08:41:15 +0000
644+++ src/modules/Unity/Application/sessionmanager.cpp 2016-06-06 19:34:36 +0000
645@@ -92,7 +92,7 @@
646 , m_applicationManager(applicationManager)
647 {
648 qCDebug(QTMIR_SESSIONS) << "SessionManager::SessionManager - this=" << this;
649- setObjectName("qtmir::SessionManager");
650+ setObjectName(QStringLiteral("qtmir::SessionManager"));
651 }
652
653 SessionManager::~SessionManager()
654
655=== modified file 'src/modules/Unity/Application/sharedwakelock.cpp'
656--- src/modules/Unity/Application/sharedwakelock.cpp 2015-03-05 23:40:52 +0000
657+++ src/modules/Unity/Application/sharedwakelock.cpp 2016-06-06 19:34:36 +0000
658@@ -37,7 +37,7 @@
659 Q_OBJECT
660 public:
661 Wakelock(const QDBusConnection &connection) noexcept
662- : AbstractDBusServiceMonitor("com.canonical.powerd", "/com/canonical/powerd", "com.canonical.powerd", connection)
663+ : AbstractDBusServiceMonitor(QStringLiteral("com.canonical.powerd"), QStringLiteral("/com/canonical/powerd"), QStringLiteral("com.canonical.powerd"), connection)
664 , m_wakelockEnabled(false)
665 {
666 // (re-)acquire wake lock when powerd (re-)appears on the bus
667@@ -90,7 +90,7 @@
668 }
669
670 if (!m_cookie.isEmpty()) {
671- dbusInterface()->asyncCall("clearSysState", QString(m_cookie));
672+ dbusInterface()->asyncCall(QStringLiteral("clearSysState"), QString(m_cookie));
673 qCDebug(QTMIR_SESSIONS) << "Wakelock released" << m_cookie;
674 m_cookie.clear();
675 }
676@@ -132,7 +132,7 @@
677
678 if (!m_wakelockEnabled || !m_cookie.isEmpty()) {
679 // notified wakelock was created, but we either don't want it, or already have one - release it immediately
680- dbusInterface()->asyncCall("clearSysState", QString(cookie));
681+ dbusInterface()->asyncCall(QStringLiteral("clearSysState"), QString(cookie));
682 return;
683 }
684
685@@ -155,7 +155,7 @@
686 return;
687 }
688
689- QDBusPendingCall pcall = dbusInterface()->asyncCall("requestSysState", "active", POWERD_SYS_STATE_ACTIVE);
690+ QDBusPendingCall pcall = dbusInterface()->asyncCall(QStringLiteral("requestSysState"), "active", POWERD_SYS_STATE_ACTIVE);
691
692 QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pcall, this);
693 QObject::connect(watcher, &QDBusPendingCallWatcher::finished,
694
695=== modified file 'src/modules/Unity/Application/ubuntukeyboardinfo.cpp'
696--- src/modules/Unity/Application/ubuntukeyboardinfo.cpp 2016-06-06 19:34:36 +0000
697+++ src/modules/Unity/Application/ubuntukeyboardinfo.cpp 2016-06-06 19:34:36 +0000
698@@ -166,7 +166,7 @@
699 if (xdgRuntimeDir) {
700 m_socketFilePath = QDir(xdgRuntimeDir).filePath(gServerName);
701 } else {
702- m_socketFilePath = QDir("/tmp").filePath(gServerName);
703+ m_socketFilePath = QDir(QStringLiteral("/tmp")).filePath(gServerName);
704 }
705 }
706
707
708=== modified file 'src/modules/Unity/Application/upstart/taskcontroller.cpp'
709--- src/modules/Unity/Application/upstart/taskcontroller.cpp 2016-06-06 19:34:36 +0000
710+++ src/modules/Unity/Application/upstart/taskcontroller.cpp 2016-06-06 19:34:36 +0000
711@@ -59,7 +59,7 @@
712 gchar *package, *application;
713 if (ubuntu_app_launch_app_id_parse(appId.toLatin1().constData(), &package, &application, nullptr)) {
714 // is long appId, so assemble its short appId
715- QString shortAppId = QString("%1_%2").arg(package).arg(application);
716+ QString shortAppId = QStringLiteral("%1_%2").arg(package, application);
717 g_free(package);
718 g_free(application);
719 return shortAppId;
720
721=== modified file 'src/modules/Unity/Screens/CMakeLists.txt'
722--- src/modules/Unity/Screens/CMakeLists.txt 2016-01-28 22:33:35 +0000
723+++ src/modules/Unity/Screens/CMakeLists.txt 2016-06-06 19:34:36 +0000
724@@ -1,5 +1,9 @@
725 include_directories(
726 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
727+)
728+
729+include_directories(
730+ SYSTEM
731 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
732 ${Qt5Quick_INCLUDE_DIRS}
733 ${MIRSERVER_INCLUDE_DIRS}
734
735=== modified file 'src/modules/Unity/Screens/qquickscreenwindow.cpp'
736--- src/modules/Unity/Screens/qquickscreenwindow.cpp 2016-04-22 18:01:05 +0000
737+++ src/modules/Unity/Screens/qquickscreenwindow.cpp 2016-06-06 19:34:36 +0000
738@@ -50,7 +50,7 @@
739 , m_scale(-1.0) // start with invalid initial state, fetch correct value on first invokation
740 , m_formFactor(Screens::FormFactorUnknown)
741 {
742- if (qGuiApp->platformName() == "mirserver") {
743+ if (qGuiApp->platformName() == QLatin1String("mirserver")) {
744 connect(qGuiApp->platformNativeInterface(), &QPlatformNativeInterface::windowPropertyChanged,
745 this, &QQuickScreenWindow::nativePropertyChanged);
746 //m_scale = getScaleNativeProperty(); DO NOT CALL HERE - see note above
747
748=== modified file 'src/platforms/mirserver/CMakeLists.txt'
749--- src/platforms/mirserver/CMakeLists.txt 2016-06-06 19:34:36 +0000
750+++ src/platforms/mirserver/CMakeLists.txt 2016-06-06 19:34:36 +0000
751@@ -26,6 +26,10 @@
752 include_directories(
753 ${CMAKE_SOURCE_DIR}/src/common
754
755+)
756+
757+include_directories(
758+ SYSTEM
759 ${MIRCOMMON_INCLUDE_DIRS}
760 ${MIRSERVER_INCLUDE_DIRS}
761 ${MIRRENDERERGLDEV_INCLUDE_DIRS}
762
763=== modified file 'src/platforms/mirserver/clipboard.cpp'
764--- src/platforms/mirserver/clipboard.cpp 2016-05-03 19:45:51 +0000
765+++ src/platforms/mirserver/clipboard.cpp 2016-06-06 19:34:36 +0000
766@@ -65,12 +65,13 @@
767 int offset = headerSize;
768 header[0] = formatCount;
769 for (int i = 0; i < formatCount; i++) {
770+ const QByteArray data = mimeData->data(formats[i]);
771 const int formatOffset = offset;
772 const int formatSize = formats[i].size();
773 const int dataOffset = offset + formatSize;
774- const int dataSize = mimeData->data(formats[i]).size();
775+ const int dataSize = data.size();
776 memcpy(&buffer[formatOffset], formats[i].toLatin1().data(), formatSize);
777- memcpy(&buffer[dataOffset], mimeData->data(formats[i]).data(), dataSize);
778+ memcpy(&buffer[dataOffset], data.data(), dataSize);
779 header[i*4+1] = formatOffset;
780 header[i*4+2] = formatSize;
781 header[i*4+3] = dataOffset;
782
783=== modified file 'src/platforms/mirserver/creationhints.cpp'
784--- src/platforms/mirserver/creationhints.cpp 2016-03-18 12:15:54 +0000
785+++ src/platforms/mirserver/creationhints.cpp 2016-06-06 19:34:36 +0000
786@@ -56,7 +56,7 @@
787
788 QString CreationHints::toString() const
789 {
790- return QString("CreationHints(minW=%1,minH=%2,maxW=%3,maxH=%4,wIncr=%5,hInc=%6,shellChrome=%7)")
791+ return QStringLiteral("CreationHints(minW=%1,minH=%2,maxW=%3,maxH=%4,wIncr=%5,hInc=%6,shellChrome=%7)")
792 .arg(minWidth)
793 .arg(minHeight)
794 .arg(maxWidth)
795
796=== modified file 'src/platforms/mirserver/creationhints.h'
797--- src/platforms/mirserver/creationhints.h 2016-03-10 11:55:28 +0000
798+++ src/platforms/mirserver/creationhints.h 2016-06-06 19:34:36 +0000
799@@ -24,7 +24,7 @@
800
801 namespace mir {
802 namespace scene {
803- class SurfaceCreationParameters;
804+ struct SurfaceCreationParameters;
805 }
806 }
807
808
809=== modified file 'src/platforms/mirserver/cursor.cpp'
810--- src/platforms/mirserver/cursor.cpp 2015-11-25 15:38:50 +0000
811+++ src/platforms/mirserver/cursor.cpp 2016-06-06 19:34:36 +0000
812@@ -27,28 +27,28 @@
813
814 Cursor::Cursor()
815 {
816- m_shapeToCursorName[Qt::ArrowCursor] = "left_ptr";
817- m_shapeToCursorName[Qt::UpArrowCursor] = "up_arrow";
818- m_shapeToCursorName[Qt::CrossCursor] = "cross";
819- m_shapeToCursorName[Qt::WaitCursor] = "watch";
820- m_shapeToCursorName[Qt::IBeamCursor] = "xterm";
821- m_shapeToCursorName[Qt::SizeVerCursor] = "size_ver";
822- m_shapeToCursorName[Qt::SizeHorCursor] = "size_hor";
823- m_shapeToCursorName[Qt::SizeBDiagCursor] = "size_bdiag";
824- m_shapeToCursorName[Qt::SizeFDiagCursor] = "size_fdiag";
825- m_shapeToCursorName[Qt::SizeAllCursor] = "size_all";
826- m_shapeToCursorName[Qt::BlankCursor] = "blank";
827- m_shapeToCursorName[Qt::SplitVCursor] = "split_v";
828- m_shapeToCursorName[Qt::SplitHCursor] = "split_h";
829- m_shapeToCursorName[Qt::PointingHandCursor] = "hand";
830- m_shapeToCursorName[Qt::ForbiddenCursor] = "forbidden";
831- m_shapeToCursorName[Qt::WhatsThisCursor] = "whats_this";
832- m_shapeToCursorName[Qt::BusyCursor] = "left_ptr_watch";
833- m_shapeToCursorName[Qt::OpenHandCursor] = "openhand";
834- m_shapeToCursorName[Qt::ClosedHandCursor] = "closedhand";
835- m_shapeToCursorName[Qt::DragCopyCursor] = "dnd-copy";
836- m_shapeToCursorName[Qt::DragMoveCursor] = "dnd-move";
837- m_shapeToCursorName[Qt::DragLinkCursor] = "dnd-link";
838+ m_shapeToCursorName[Qt::ArrowCursor] = QStringLiteral("left_ptr");
839+ m_shapeToCursorName[Qt::UpArrowCursor] = QStringLiteral("up_arrow");
840+ m_shapeToCursorName[Qt::CrossCursor] = QStringLiteral("cross");
841+ m_shapeToCursorName[Qt::WaitCursor] = QStringLiteral("watch");
842+ m_shapeToCursorName[Qt::IBeamCursor] = QStringLiteral("xterm");
843+ m_shapeToCursorName[Qt::SizeVerCursor] = QStringLiteral("size_ver");
844+ m_shapeToCursorName[Qt::SizeHorCursor] = QStringLiteral("size_hor");
845+ m_shapeToCursorName[Qt::SizeBDiagCursor] = QStringLiteral("size_bdiag");
846+ m_shapeToCursorName[Qt::SizeFDiagCursor] = QStringLiteral("size_fdiag");
847+ m_shapeToCursorName[Qt::SizeAllCursor] = QStringLiteral("size_all");
848+ m_shapeToCursorName[Qt::BlankCursor] = QStringLiteral("blank");
849+ m_shapeToCursorName[Qt::SplitVCursor] = QStringLiteral("split_v");
850+ m_shapeToCursorName[Qt::SplitHCursor] = QStringLiteral("split_h");
851+ m_shapeToCursorName[Qt::PointingHandCursor] = QStringLiteral("hand");
852+ m_shapeToCursorName[Qt::ForbiddenCursor] = QStringLiteral("forbidden");
853+ m_shapeToCursorName[Qt::WhatsThisCursor] = QStringLiteral("whats_this");
854+ m_shapeToCursorName[Qt::BusyCursor] = QStringLiteral("left_ptr_watch");
855+ m_shapeToCursorName[Qt::OpenHandCursor] = QStringLiteral("openhand");
856+ m_shapeToCursorName[Qt::ClosedHandCursor] = QStringLiteral("closedhand");
857+ m_shapeToCursorName[Qt::DragCopyCursor] = QStringLiteral("dnd-copy");
858+ m_shapeToCursorName[Qt::DragMoveCursor] = QStringLiteral("dnd-move");
859+ m_shapeToCursorName[Qt::DragLinkCursor] = QStringLiteral("dnd-link");
860
861 connect(Mir::instance(), &Mir::cursorNameChanged, this, &Cursor::setMirCursorName);
862 }
863@@ -61,10 +61,10 @@
864
865 if (windowCursor) {
866 if (windowCursor->pixmap().isNull()) {
867- m_qtCursorName = m_shapeToCursorName.value(windowCursor->shape(), QLatin1String("left_ptr"));
868+ m_qtCursorName = m_shapeToCursorName.value(windowCursor->shape(), QStringLiteral("left_ptr"));
869 m_mousePointer->setCustomCursor(QCursor());
870 } else {
871- m_qtCursorName = QLatin1String("custom");
872+ m_qtCursorName = QStringLiteral("custom");
873 m_mousePointer->setCustomCursor(*windowCursor);
874 }
875 } else {
876@@ -170,7 +170,7 @@
877
878 if (m_mirCursorName.isEmpty()) {
879 if (m_qtCursorName.isEmpty()) {
880- m_mousePointer->setCursorName("left_ptr");
881+ m_mousePointer->setCursorName(QStringLiteral("left_ptr"));
882 } else {
883 m_mousePointer->setCursorName(m_qtCursorName);
884 }
885
886=== modified file 'src/platforms/mirserver/cursor.h'
887--- src/platforms/mirserver/cursor.h 2015-11-19 14:17:54 +0000
888+++ src/platforms/mirserver/cursor.h 2016-06-06 19:34:36 +0000
889@@ -28,6 +28,7 @@
890
891 class Cursor : public MirPlatformCursor
892 {
893+ Q_OBJECT
894 public:
895 Cursor();
896
897
898=== modified file 'src/platforms/mirserver/mircursorimages.cpp'
899--- src/platforms/mirserver/mircursorimages.cpp 2015-11-10 11:07:23 +0000
900+++ src/platforms/mirserver/mircursorimages.cpp 2016-06-06 19:34:36 +0000
901@@ -20,7 +20,7 @@
902 using namespace qtmir;
903
904 std::shared_ptr<mir::graphics::CursorImage> MirCursorImages::image(const std::string &cursor_name,
905- const mir::geometry::Size&)
906+ const mir::geometry::Size &)
907 {
908 // We are not responsible for loading cursors. This is left for shell to do as it's drawing its own QML cursor.
909 // So here we work around Mir API by storing just the cursor name in the CursorImage.
910
911=== modified file 'src/platforms/mirserver/nativeinterface.cpp'
912--- src/platforms/mirserver/nativeinterface.cpp 2016-05-05 14:17:14 +0000
913+++ src/platforms/mirserver/nativeinterface.cpp 2016-06-06 19:34:36 +0000
914@@ -56,8 +56,8 @@
915 auto w = static_cast<ScreenWindow*>(window);
916 auto s = static_cast<Screen*>(w->screen());
917 if (s) {
918- propertyMap.insert("scale", s->scale());
919- propertyMap.insert("formFactor", s->formFactor());
920+ propertyMap.insert(QStringLiteral("scale"), s->scale());
921+ propertyMap.insert(QStringLiteral("formFactor"), s->formFactor());
922 }
923 return propertyMap;
924 }
925
926=== modified file 'src/platforms/mirserver/nativeinterface.h'
927--- src/platforms/mirserver/nativeinterface.h 2016-05-05 14:17:14 +0000
928+++ src/platforms/mirserver/nativeinterface.h 2016-06-06 19:34:36 +0000
929@@ -27,10 +27,11 @@
930
931 class NativeInterface : public QPlatformNativeInterface
932 {
933+ Q_OBJECT
934 public:
935 NativeInterface(QMirServer *);
936
937- virtual void *nativeResourceForIntegration(const QByteArray &resource);
938+ void *nativeResourceForIntegration(const QByteArray &resource) override;
939
940 QVariantMap windowProperties(QPlatformWindow *window) const override;
941 QVariant windowProperty(QPlatformWindow *window, const QString &name) const override;
942
943=== modified file 'src/platforms/mirserver/plugin.cpp'
944--- src/platforms/mirserver/plugin.cpp 2015-10-19 21:17:18 +0000
945+++ src/platforms/mirserver/plugin.cpp 2016-06-06 19:34:36 +0000
946@@ -20,7 +20,7 @@
947 QPlatformIntegration *MirServerIntegrationPlugin::create(const QString &system, const QStringList &/*paramList*/,
948 int &argc, char **argv)
949 {
950- if (system.toLower() == "mirserver")
951+ if (system.toLower() == QLatin1String("mirserver"))
952 return new MirServerIntegration(argc, argv);
953 return 0;
954 }
955
956=== modified file 'src/platforms/mirserver/qteventfeeder.cpp'
957--- src/platforms/mirserver/qteventfeeder.cpp 2016-05-06 08:41:15 +0000
958+++ src/platforms/mirserver/qteventfeeder.cpp 2016-06-06 19:34:36 +0000
959@@ -852,7 +852,7 @@
960 result.append(",");
961 }
962 const struct QWindowSystemInterface::TouchPoint &point = points.at(i);
963- result.append(QString("(id=%1,state=%2,normalPosition=(%3,%4))")
964+ result.append(QStringLiteral("(id=%1,state=%2,normalPosition=(%3,%4))")
965 .arg(point.id)
966 .arg(touchPointStateToString(point.state))
967 .arg(point.normalPosition.x())
968
969=== modified file 'src/platforms/mirserver/screen.cpp'
970--- src/platforms/mirserver/screen.cpp 2016-05-06 08:41:15 +0000
971+++ src/platforms/mirserver/screen.cpp 2016-06-06 19:34:36 +0000
972@@ -169,15 +169,15 @@
973
974 if (!skipDBusRegistration) {
975 // FIXME This is a unity8 specific dbus call and shouldn't be in qtmir
976- m_unityScreen = new QDBusInterface("com.canonical.Unity.Screen",
977- "/com/canonical/Unity/Screen",
978- "com.canonical.Unity.Screen",
979+ m_unityScreen = new QDBusInterface(QStringLiteral("com.canonical.Unity.Screen"),
980+ QStringLiteral("/com/canonical/Unity/Screen"),
981+ QStringLiteral("com.canonical.Unity.Screen"),
982 QDBusConnection::systemBus(), this);
983
984- m_unityScreen->connection().connect("com.canonical.Unity.Screen",
985- "/com/canonical/Unity/Screen",
986- "com.canonical.Unity.Screen",
987- "DisplayPowerStateChange",
988+ m_unityScreen->connection().connect(QStringLiteral("com.canonical.Unity.Screen"),
989+ QStringLiteral("/com/canonical/Unity/Screen"),
990+ QStringLiteral("com.canonical.Unity.Screen"),
991+ QStringLiteral("DisplayPowerStateChange"),
992 this,
993 SLOT(onDisplayPowerStateChanged(int, int)));
994 }
995
996=== modified file 'src/platforms/mirserver/screenscontroller.cpp'
997--- src/platforms/mirserver/screenscontroller.cpp 2016-01-29 16:49:06 +0000
998+++ src/platforms/mirserver/screenscontroller.cpp 2016-06-06 19:34:36 +0000
999@@ -54,13 +54,13 @@
1000 return list;
1001 }
1002
1003-bool ScreensController::setConfiguration(CustomScreenConfigurationList newConfig)
1004+bool ScreensController::setConfiguration(const CustomScreenConfigurationList &newConfig)
1005 {
1006 using namespace mir::geometry;
1007
1008 auto displayConfiguration = m_display->configuration();
1009
1010- Q_FOREACH (auto config, newConfig) {
1011+ Q_FOREACH (const auto &config, newConfig) {
1012 displayConfiguration->for_each_output(
1013 [&config](mg::UserDisplayConfigurationOutput &outputConfig)
1014 {
1015
1016=== modified file 'src/platforms/mirserver/screenscontroller.h'
1017--- src/platforms/mirserver/screenscontroller.h 2016-01-29 16:49:06 +0000
1018+++ src/platforms/mirserver/screenscontroller.h 2016-06-06 19:34:36 +0000
1019@@ -43,7 +43,7 @@
1020 QObject *parent = 0);
1021
1022 CustomScreenConfigurationList configuration();
1023- bool setConfiguration(CustomScreenConfigurationList newConfig);
1024+ bool setConfiguration(const CustomScreenConfigurationList &newConfig);
1025
1026 private:
1027 const QSharedPointer<ScreensModel> m_screensModel;
1028
1029=== modified file 'src/platforms/mirserver/screensmodel.cpp'
1030--- src/platforms/mirserver/screensmodel.cpp 2016-05-06 08:41:15 +0000
1031+++ src/platforms/mirserver/screensmodel.cpp 2016-06-06 19:34:36 +0000
1032@@ -144,7 +144,7 @@
1033 );
1034
1035 // Announce new Screens to Qt
1036- for (auto screen : newScreenList) {
1037+ Q_FOREACH (auto screen, newScreenList) {
1038 Q_EMIT screenAdded(screen);
1039 }
1040
1041@@ -157,7 +157,7 @@
1042 }
1043
1044 // Delete any old & unused Screens
1045- for (auto screen: oldScreenList) {
1046+ Q_FOREACH (auto screen, oldScreenList) {
1047 qCDebug(QTMIR_SCREENS) << "Removed Screen with id" << screen->m_outputId.as_value()
1048 << "and geometry" << screen->geometry();
1049 auto window = static_cast<ScreenWindow *>(screen->window());
1050@@ -180,7 +180,7 @@
1051 buffer.view_area().size.width.as_int(),
1052 buffer.view_area().size.height.as_int());
1053
1054- for (auto screen : m_screenList) {
1055+ Q_FOREACH (auto screen, m_screenList) {
1056 if (dbGeom == screen->geometry()) {
1057 screen->setMirDisplayBuffer(&buffer, &group);
1058 break;
1059@@ -190,7 +190,7 @@
1060 });
1061
1062 qCDebug(QTMIR_SCREENS) << "=======================================";
1063- for (auto screen: m_screenList) {
1064+ Q_FOREACH (auto screen, m_screenList) {
1065 qCDebug(QTMIR_SCREENS) << screen << "- id:" << screen->m_outputId.as_value()
1066 << "geometry:" << screen->geometry()
1067 << "window:" << screen->window()
1068@@ -217,7 +217,7 @@
1069
1070 void ScreensModel::allWindowsSetExposed(bool exposed)
1071 {
1072- for (const auto screen : m_screenList) {
1073+ Q_FOREACH (const auto screen, m_screenList) {
1074 const auto window = static_cast<ScreenWindow *>(screen->window());
1075 if (window && window->window()) {
1076 window->setExposed(exposed);
1077@@ -240,7 +240,7 @@
1078 return nullptr;
1079 }
1080
1081-QWindow* ScreensModel::getWindowForPoint(const QPoint &point) //FIXME - not thread safe & not efficient
1082+QWindow* ScreensModel::getWindowForPoint(QPoint point) //FIXME - not thread safe & not efficient
1083 {
1084 // This is a part optimization, and a part work-around for AP generated input events occasionally
1085 // appearing outside the screen borders: https://bugs.launchpad.net/qtmir/+bug/1508415
1086@@ -248,7 +248,7 @@
1087 return m_screenList.first()->window()->window();
1088 }
1089
1090- for (Screen *screen : m_screenList) {
1091+ Q_FOREACH (Screen *screen, m_screenList) {
1092 if (screen->window() && screen->geometry().contains(point)) {
1093 return screen->window()->window();
1094 }
1095
1096=== modified file 'src/platforms/mirserver/screensmodel.h'
1097--- src/platforms/mirserver/screensmodel.h 2016-04-29 15:41:00 +0000
1098+++ src/platforms/mirserver/screensmodel.h 2016-06-06 19:34:36 +0000
1099@@ -62,7 +62,7 @@
1100 QList<Screen*> screens() const { return m_screenList; }
1101 bool compositing() const { return m_compositing; }
1102
1103- QWindow* getWindowForPoint(const QPoint &point);
1104+ QWindow* getWindowForPoint(QPoint point);
1105
1106 Q_SIGNALS:
1107 void screenAdded(Screen *screen);
1108
1109=== modified file 'src/platforms/mirserver/sessionlistener.cpp'
1110--- src/platforms/mirserver/sessionlistener.cpp 2016-03-10 11:55:28 +0000
1111+++ src/platforms/mirserver/sessionlistener.cpp 2016-06-06 19:34:36 +0000
1112@@ -90,7 +90,7 @@
1113 Q_EMIT sessionDestroyingSurface(&session, surface);
1114 }
1115
1116-void SessionListener::surfaceAboutToBeCreated(mir::scene::Session& session, qtmir::CreationHints creationHints)
1117+void SessionListener::surfaceAboutToBeCreated(mir::scene::Session& session, const qtmir::CreationHints &creationHints)
1118 {
1119 m_creationHintsForNewSurface[&session] = creationHints;
1120 }
1121
1122=== modified file 'src/platforms/mirserver/sessionlistener.h'
1123--- src/platforms/mirserver/sessionlistener.h 2016-03-10 11:55:28 +0000
1124+++ src/platforms/mirserver/sessionlistener.h 2016-06-06 19:34:36 +0000
1125@@ -42,7 +42,7 @@
1126 void surface_created(mir::scene::Session&, std::shared_ptr<mir::scene::Surface> const&) override;
1127 void destroying_surface(mir::scene::Session&, std::shared_ptr<mir::scene::Surface> const&) override;
1128
1129- void surfaceAboutToBeCreated(mir::scene::Session&, qtmir::CreationHints creationHints);
1130+ void surfaceAboutToBeCreated(mir::scene::Session&, const qtmir::CreationHints &creationHints);
1131
1132 Q_SIGNALS:
1133 void sessionStarting(std::shared_ptr<mir::scene::Session> const& session);
1134
1135=== modified file 'src/platforms/mirserver/surfaceobserver.cpp'
1136--- src/platforms/mirserver/surfaceobserver.cpp 2016-05-05 14:18:30 +0000
1137+++ src/platforms/mirserver/surfaceobserver.cpp 2016-06-06 19:34:36 +0000
1138@@ -28,7 +28,7 @@
1139 #include <mir/geometry/size.h>
1140 #include <mir/shell/surface_specification.h>
1141
1142-QMap<const mir::scene::Surface*, SurfaceObserver*> SurfaceObserver::m_surfaceToObserverMap;
1143+QHash<const mir::scene::Surface*, SurfaceObserver*> SurfaceObserver::m_surfaceToObserverMap;
1144 QMutex SurfaceObserver::mutex;
1145
1146 SurfaceObserver::SurfaceObserver()
1147@@ -83,7 +83,7 @@
1148 SurfaceObserver::~SurfaceObserver()
1149 {
1150 QMutexLocker locker(&mutex);
1151- QMutableMapIterator<const mir::scene::Surface*, SurfaceObserver*> i(m_surfaceToObserverMap);
1152+ QMutableHashIterator<const mir::scene::Surface*, SurfaceObserver*> i(m_surfaceToObserverMap);
1153 while (i.hasNext()) {
1154 i.next();
1155 if (i.value() == this) {
1156
1157=== modified file 'src/platforms/mirserver/surfaceobserver.h'
1158--- src/platforms/mirserver/surfaceobserver.h 2016-05-05 14:17:14 +0000
1159+++ src/platforms/mirserver/surfaceobserver.h 2016-06-06 19:34:36 +0000
1160@@ -30,7 +30,7 @@
1161 class Surface;
1162 }
1163 namespace shell {
1164- class SurfaceSpecification;
1165+ struct SurfaceSpecification;
1166 }
1167 }
1168
1169@@ -90,7 +90,7 @@
1170 QObject *m_listener;
1171 bool m_framesPosted;
1172 QMap<QByteArray, Qt::CursorShape> m_cursorNameToShape;
1173- static QMap<const mir::scene::Surface*, SurfaceObserver*> m_surfaceToObserverMap;
1174+ static QHash<const mir::scene::Surface*, SurfaceObserver*> m_surfaceToObserverMap;
1175 };
1176
1177 #endif
1178
1179=== modified file 'tests/framework/CMakeLists.txt'
1180--- tests/framework/CMakeLists.txt 2016-05-24 20:13:10 +0000
1181+++ tests/framework/CMakeLists.txt 2016-06-06 19:34:36 +0000
1182@@ -1,7 +1,11 @@
1183 include_directories(
1184- ${APPLICATION_API_INCLUDE_DIRS}
1185 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
1186 ${CMAKE_SOURCE_DIR}/src/modules
1187+)
1188+
1189+include_directories(
1190+ SYSTEM
1191+ ${APPLICATION_API_INCLUDE_DIRS}
1192 ${MIRSERVER_INCLUDE_DIRS}
1193 ${MIRRENDERERGLDEV_INCLUDE_DIRS}
1194
1195
1196=== modified file 'tests/framework/fake_session.cpp'
1197--- tests/framework/fake_session.cpp 2016-05-24 20:13:10 +0000
1198+++ tests/framework/fake_session.cpp 2016-06-06 19:34:36 +0000
1199@@ -92,14 +92,14 @@
1200
1201 void FakeSession::removeChildSession(SessionInterface *) {}
1202
1203-void FakeSession::foreachChildSession(std::function<void (SessionInterface *)>) const {}
1204+void FakeSession::foreachChildSession(const std::function<void (SessionInterface *)> &) const {}
1205
1206 std::shared_ptr<mir::scene::PromptSession> FakeSession::activePromptSession() const
1207 {
1208 return std::shared_ptr<mir::scene::PromptSession>();
1209 }
1210
1211-void FakeSession::foreachPromptSession(std::function<void (const std::shared_ptr<mir::scene::PromptSession> &)>) const {}
1212+void FakeSession::foreachPromptSession(const std::function<void (const std::shared_ptr<mir::scene::PromptSession> &)> &) const {}
1213
1214 void FakeSession::setFullscreen(bool) {}
1215
1216
1217=== modified file 'tests/framework/fake_session.h'
1218--- tests/framework/fake_session.h 2016-05-24 20:13:10 +0000
1219+++ tests/framework/fake_session.h 2016-06-06 19:34:36 +0000
1220@@ -63,10 +63,10 @@
1221 void addChildSession(SessionInterface*) override;
1222 void insertChildSession(uint, SessionInterface*) override;
1223 void removeChildSession(SessionInterface*) override;
1224- void foreachChildSession(std::function<void(SessionInterface* session)>) const override;
1225+ void foreachChildSession(const std::function<void(SessionInterface* session)> &) const override;
1226
1227 std::shared_ptr<mir::scene::PromptSession> activePromptSession() const override;
1228- void foreachPromptSession(std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)>) const override;
1229+ void foreachPromptSession(const std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> &) const override;
1230
1231 void setFullscreen(bool) override;
1232 void setLive(const bool) override;
1233
1234=== modified file 'tests/framework/mock_session.h'
1235--- tests/framework/mock_session.h 2016-03-28 18:02:26 +0000
1236+++ tests/framework/mock_session.h 2016-06-06 19:34:36 +0000
1237@@ -57,10 +57,10 @@
1238 MOCK_METHOD1(addChildSession, void(SessionInterface* session));
1239 MOCK_METHOD2(insertChildSession, void(uint index, SessionInterface* session));
1240 MOCK_METHOD1(removeChildSession, void(SessionInterface* session));
1241- MOCK_CONST_METHOD1(foreachChildSession, void(std::function<void(SessionInterface* session)> f));
1242+ MOCK_CONST_METHOD1(foreachChildSession, void(const std::function<void(SessionInterface* session)> &f));
1243
1244 MOCK_CONST_METHOD0(activePromptSession, std::shared_ptr<mir::scene::PromptSession>());
1245- MOCK_CONST_METHOD1(foreachPromptSession, void(std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> f));
1246+ MOCK_CONST_METHOD1(foreachPromptSession, void(const std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> &f));
1247
1248 void setState(State state);
1249
1250
1251=== modified file 'tests/mirserver/Clipboard/CMakeLists.txt'
1252--- tests/mirserver/Clipboard/CMakeLists.txt 2014-12-03 08:56:35 +0000
1253+++ tests/mirserver/Clipboard/CMakeLists.txt 2016-06-06 19:34:36 +0000
1254@@ -6,6 +6,10 @@
1255
1256 include_directories(
1257 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
1258+)
1259+
1260+include_directories(
1261+ SYSTEM
1262 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
1263 ${MIRSERVER_INCLUDE_DIRS}
1264 )
1265
1266=== modified file 'tests/mirserver/QtEventFeeder/CMakeLists.txt'
1267--- tests/mirserver/QtEventFeeder/CMakeLists.txt 2014-12-03 08:56:35 +0000
1268+++ tests/mirserver/QtEventFeeder/CMakeLists.txt 2016-06-06 19:34:36 +0000
1269@@ -7,6 +7,10 @@
1270 include_directories(
1271 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
1272 ${CMAKE_SOURCE_DIR}/src/common
1273+)
1274+
1275+include_directories(
1276+ SYSTEM
1277 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
1278 ${MIRSERVER_INCLUDE_DIRS}
1279 )
1280
1281=== modified file 'tests/mirserver/Screen/CMakeLists.txt'
1282--- tests/mirserver/Screen/CMakeLists.txt 2015-11-11 10:43:36 +0000
1283+++ tests/mirserver/Screen/CMakeLists.txt 2016-06-06 19:34:36 +0000
1284@@ -8,6 +8,10 @@
1285 ${CMAKE_SOURCE_DIR}/tests/framework
1286 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
1287 ${CMAKE_SOURCE_DIR}/src/common
1288+)
1289+
1290+include_directories(
1291+ SYSTEM
1292 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
1293 ${MIRSERVER_INCLUDE_DIRS}
1294 )
1295
1296=== modified file 'tests/mirserver/ScreensModel/CMakeLists.txt'
1297--- tests/mirserver/ScreensModel/CMakeLists.txt 2016-02-16 11:48:35 +0000
1298+++ tests/mirserver/ScreensModel/CMakeLists.txt 2016-06-06 19:34:36 +0000
1299@@ -11,6 +11,10 @@
1300 ${CMAKE_SOURCE_DIR}/tests/framework
1301 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
1302 ${CMAKE_SOURCE_DIR}/src/common
1303+)
1304+
1305+include_directories(
1306+ SYSTEM
1307 ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
1308 ${MIRSERVER_INCLUDE_DIRS}
1309 ${MIRRENDERERGLDEV_INCLUDE_DIRS}
1310
1311=== modified file 'tests/mirserver/WindowManager/CMakeLists.txt'
1312--- tests/mirserver/WindowManager/CMakeLists.txt 2016-03-10 11:55:28 +0000
1313+++ tests/mirserver/WindowManager/CMakeLists.txt 2016-06-06 19:34:36 +0000
1314@@ -1,5 +1,9 @@
1315 include_directories(
1316 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
1317+)
1318+
1319+include_directories(
1320+ SYSTEM
1321 ${MIRSERVER_INCLUDE_DIRS}
1322 )
1323
1324
1325=== modified file 'tests/modules/Application/CMakeLists.txt'
1326--- tests/modules/Application/CMakeLists.txt 2015-12-15 10:03:32 +0000
1327+++ tests/modules/Application/CMakeLists.txt 2016-06-06 19:34:36 +0000
1328@@ -7,8 +7,11 @@
1329 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
1330 ${CMAKE_SOURCE_DIR}/src/modules
1331 ${CMAKE_SOURCE_DIR}/tests/framework
1332+)
1333+
1334+include_directories(
1335+ SYSTEM
1336 ${MIRSERVER_INCLUDE_DIRS}
1337-
1338 ${Qt5Core_INCLUDE_DIRS}
1339 ${Qt5GUI_INCLUDE_DIRS}
1340 ${Qt5Quick_INCLUDE_DIRS}
1341
1342=== modified file 'tests/modules/ApplicationManager/CMakeLists.txt'
1343--- tests/modules/ApplicationManager/CMakeLists.txt 2015-09-30 15:45:17 +0000
1344+++ tests/modules/ApplicationManager/CMakeLists.txt 2016-06-06 19:34:36 +0000
1345@@ -5,10 +5,14 @@
1346 )
1347
1348 include_directories(
1349- ${APPLICATION_API_INCLUDE_DIRS}
1350 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
1351 ${CMAKE_SOURCE_DIR}/src/modules
1352 ${CMAKE_SOURCE_DIR}/tests/framework
1353+)
1354+
1355+include_directories(
1356+ SYSTEM
1357+ ${APPLICATION_API_INCLUDE_DIRS}
1358 ${MIRSERVER_INCLUDE_DIRS}
1359 )
1360
1361
1362=== modified file 'tests/modules/SessionManager/CMakeLists.txt'
1363--- tests/modules/SessionManager/CMakeLists.txt 2015-09-30 15:45:17 +0000
1364+++ tests/modules/SessionManager/CMakeLists.txt 2016-06-06 19:34:36 +0000
1365@@ -6,10 +6,14 @@
1366 )
1367
1368 include_directories(
1369- ${APPLICATION_API_INCLUDE_DIRS}
1370 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
1371 ${CMAKE_SOURCE_DIR}/src/modules
1372 ${CMAKE_SOURCE_DIR}/tests/framework
1373+)
1374+
1375+include_directories(
1376+ SYSTEM
1377+ ${APPLICATION_API_INCLUDE_DIRS}
1378 ${MIRSERVER_INCLUDE_DIRS}
1379 )
1380
1381
1382=== modified file 'tests/modules/SharedWakelock/CMakeLists.txt'
1383--- tests/modules/SharedWakelock/CMakeLists.txt 2015-09-30 15:45:17 +0000
1384+++ tests/modules/SharedWakelock/CMakeLists.txt 2016-06-06 19:34:36 +0000
1385@@ -5,6 +5,10 @@
1386
1387 include_directories(
1388 ${CMAKE_SOURCE_DIR}/src/modules
1389+)
1390+
1391+include_directories(
1392+ SYSTEM
1393 ${QTDBUSTEST_INCLUDE_DIRS}
1394 ${QTDBUSMOCK_INCLUDE_DIRS}
1395 )
1396
1397=== modified file 'tests/modules/SurfaceManager/CMakeLists.txt'
1398--- tests/modules/SurfaceManager/CMakeLists.txt 2016-05-24 20:13:10 +0000
1399+++ tests/modules/SurfaceManager/CMakeLists.txt 2016-06-06 19:34:36 +0000
1400@@ -9,6 +9,10 @@
1401 ${CMAKE_SOURCE_DIR}/src/modules
1402 ${CMAKE_SOURCE_DIR}/src/platforms/mirserver
1403 ${CMAKE_SOURCE_DIR}/tests/framework
1404+)
1405+
1406+include_directories(
1407+ SYSTEM
1408 ${MIRSERVER_INCLUDE_DIRS}
1409 ${Qt5Quick_PRIVATE_INCLUDE_DIRS}
1410 )

Subscribers

People subscribed via source and target branches