Merge lp:~aacid/qtmir/clazy_run into lp:qtmir
- clazy_run
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Gerry Boland |
Approved revision: | 527 |
Merged at revision: | 541 |
Proposed branch: | lp:~aacid/qtmir/clazy_run |
Merge into: | lp:qtmir |
Prerequisite: | lp:~aacid/qtmir/system_includes |
Diff against target: |
1146 lines (+146/-135) 48 files modified
src/common/abstractdbusservicemonitor.cpp (+3/-0) src/common/debughelpers.cpp (+12/-12) src/modules/Unity/Application/application.cpp (+5/-5) src/modules/Unity/Application/application.h (+1/-1) src/modules/Unity/Application/application_manager.cpp (+8/-8) src/modules/Unity/Application/application_manager.h (+1/-1) src/modules/Unity/Application/cgmanager.cpp (+2/-2) 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/upstart/taskcontroller.cpp (+1/-1) src/modules/Unity/Screens/qquickscreenwindow.cpp (+1/-1) 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/mirwindowmanager.cpp (+3/-0) 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 (+3/-2) src/platforms/mirserver/surfaceobserver.h (+2/-2) tests/framework/fake_application_info.h (+1/-0) tests/framework/fake_mirsurface.h (+6/-6) tests/framework/fake_session.cpp (+2/-2) tests/framework/fake_session.h (+2/-2) tests/framework/mock_session.h (+2/-2) tests/mirserver/ScreensModel/stub_display.h (+1/-1) |
To merge this branch: | bzr merge lp:~aacid/qtmir/clazy_run |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gerry Boland (community) | Approve | ||
Unity8 CI Bot (community) | continuous-integration | Needs Fixing | |
MichaĆ Sawicz | Needs Fixing | ||
PS Jenkins bot | continuous-integration | Pending | |
Review via email: mp+296599@code.launchpad.net |
This proposal supersedes 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:/
Run over the src folder
Description of the change
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:370
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
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.
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.
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:372
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:373
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
PASSED: Continuous integration, rev:374
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:375
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:376
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:378
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:378
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:378
https:/
Executed test runs:
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Daniel d'Andrada (dandrader) wrote : Posted in a previous version of this proposal | # |
So what's the fate of this branch?
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.
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:519
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:520
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:520
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:521
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:521
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Gerry Boland (gerboland) wrote : | # |
I'm going to approve this. We'll figure out conflicts when we try to land
MichaĆ Sawicz (saviq) wrote : | # |
Contents conflict in src/modules/
Text conflict in src/platforms/
2 conflicts encountered.
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:522
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 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
Gerry Boland (gerboland) wrote : | # |
Looks mostly fine.
I'm a bit iffy about adding the Q_OBJECT macro to classes that don't require it, but am not going to block on it.
Not tested, will wait for silo for that
- 527. By Albert Astals Cid
-
Remove change that conflicts with other branch removing this code
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:524
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:527
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Gerry Boland (gerboland) : | # |
Preview Diff
1 | === modified file 'src/common/abstractdbusservicemonitor.cpp' |
2 | --- src/common/abstractdbusservicemonitor.cpp 2015-08-11 12:08:32 +0000 |
3 | +++ src/common/abstractdbusservicemonitor.cpp 2016-08-08 15:09:02 +0000 |
4 | @@ -27,6 +27,7 @@ |
5 | // let's subclass that and avoid the blocking scenario. |
6 | class AsyncDBusInterface : public QDBusAbstractInterface |
7 | { |
8 | + Q_OBJECT |
9 | public: |
10 | AsyncDBusInterface(const QString &service, const QString &path, |
11 | const QString &interface, const QDBusConnection &connection, |
12 | @@ -94,3 +95,5 @@ |
13 | { |
14 | return m_dbusInterface != nullptr; |
15 | } |
16 | + |
17 | +#include "abstractdbusservicemonitor.moc" |
18 | |
19 | === modified file 'src/common/debughelpers.cpp' |
20 | --- src/common/debughelpers.cpp 2016-05-27 07:27:44 +0000 |
21 | +++ src/common/debughelpers.cpp 2016-08-08 15:09:02 +0000 |
22 | @@ -63,7 +63,7 @@ |
23 | |
24 | const QTouchEvent::TouchPoint& touchPoint = ev->touchPoints().at(i); |
25 | message.append( |
26 | - QString("(id:%1, state:%2, scenePos:(%3,%4), pos:(%5,%6)) ") |
27 | + QStringLiteral("(id:%1, state:%2, scenePos:(%3,%4), pos:(%5,%6)) ") |
28 | .arg(touchPoint.id()) |
29 | .arg(touchPointStateToString(touchPoint.state())) |
30 | .arg(touchPoint.scenePos().x()) |
31 | @@ -82,30 +82,30 @@ |
32 | |
33 | switch (attrib) { |
34 | case mir_surface_attrib_type: |
35 | - str = QString("type=%1").arg(mirSurfaceTypeToStr(value)); |
36 | + str = QStringLiteral("type=%1").arg(mirSurfaceTypeToStr(value)); |
37 | break; |
38 | |
39 | case mir_surface_attrib_state: |
40 | - str = QString("state=%1").arg(mirSurfaceStateToStr(value)); |
41 | + str = QStringLiteral("state=%1").arg(mirSurfaceStateToStr(value)); |
42 | break; |
43 | |
44 | case mir_surface_attrib_swapinterval: |
45 | - str = QString("swapinterval=%1").arg(value); |
46 | + str = QStringLiteral("swapinterval=%1").arg(value); |
47 | break; |
48 | |
49 | case mir_surface_attrib_focus: |
50 | - str = QString("focus=%1").arg(mirSurfaceFocusStateToStr(value)); |
51 | + str = QStringLiteral("focus=%1").arg(mirSurfaceFocusStateToStr(value)); |
52 | break; |
53 | |
54 | case mir_surface_attrib_dpi: |
55 | - str = QString("dpi=%1").arg(value); |
56 | + str = QStringLiteral("dpi=%1").arg(value); |
57 | break; |
58 | |
59 | case mir_surface_attrib_visibility: |
60 | - str = QString("visibility=%1").arg(mirSurfaceVisibilityToStr(value)); |
61 | + str = QStringLiteral("visibility=%1").arg(mirSurfaceVisibilityToStr(value)); |
62 | break; |
63 | default: |
64 | - str = QString("type'%1'=%2").arg((int)attrib).arg(value); |
65 | + str = QStringLiteral("type'%1'=%2").arg((int)attrib).arg(value); |
66 | } |
67 | |
68 | return str; |
69 | @@ -211,7 +211,7 @@ |
70 | |
71 | QString mirPointerEventToString(MirPointerEvent const* event) |
72 | { |
73 | - QString string = QString("MirPointerEvent(x=%1,y=%2,relative_x=%3,relative_y=%4)") |
74 | + QString string = QStringLiteral("MirPointerEvent(x=%1,y=%2,relative_x=%3,relative_y=%4)") |
75 | .arg(mir_pointer_event_axis_value(event, mir_pointer_axis_x)) |
76 | .arg(mir_pointer_event_axis_value(event, mir_pointer_axis_y)) |
77 | .arg(mir_pointer_event_axis_value(event, mir_pointer_axis_relative_x)) |
78 | @@ -224,7 +224,7 @@ |
79 | { |
80 | const int pointerCount = mir_touch_event_point_count(event); |
81 | |
82 | - QString string("MirTouchEvent("); |
83 | + QString string(QStringLiteral("MirTouchEvent(")); |
84 | |
85 | for (int i = 0; i < pointerCount; ++i) { |
86 | |
87 | @@ -234,7 +234,7 @@ |
88 | |
89 | MirTouchAction touchAction = mir_touch_event_action(event, i); |
90 | |
91 | - QString touchStr = QString("(id=%1,action=%2,x=%3,y=%4)") |
92 | + QString touchStr = QStringLiteral("(id=%1,action=%2,x=%3,y=%4)") |
93 | .arg(mir_touch_event_id(event, i)) |
94 | .arg(mirTouchActionToString(touchAction)) |
95 | .arg(mir_touch_event_axis_value(event, i, mir_touch_axis_x)) |
96 | @@ -291,7 +291,7 @@ |
97 | |
98 | xkb_keysym_t keyCode = mir_keyboard_event_key_code(event); |
99 | |
100 | - return QString("MirKeyboardEvent(action=%1,key_code=0x%2)") |
101 | + return QStringLiteral("MirKeyboardEvent(action=%1,key_code=0x%2)") |
102 | .arg(mirKeyboardActionToString(keyboardAction)) |
103 | .arg(keyCode, 4, 16, QLatin1Char('0')); |
104 | } |
105 | |
106 | === modified file 'src/modules/Unity/Application/application.cpp' |
107 | --- src/modules/Unity/Application/application.cpp 2016-06-24 13:46:39 +0000 |
108 | +++ src/modules/Unity/Application/application.cpp 2016-08-08 15:09:02 +0000 |
109 | @@ -175,8 +175,8 @@ |
110 | color.setAlpha(255); |
111 | } else { |
112 | color.setRgba(qRgba(0, 0, 0, 0)); |
113 | - qCWarning(QTMIR_APPLICATIONS) << QString("Invalid %1: \"%2\"") |
114 | - .arg(colorName).arg(colorString); |
115 | + qCWarning(QTMIR_APPLICATIONS) << QStringLiteral("Invalid %1: \"%2\"") |
116 | + .arg(colorName, colorString); |
117 | } |
118 | } |
119 | |
120 | @@ -467,7 +467,7 @@ |
121 | m_pid = pid; |
122 | } |
123 | |
124 | -void Application::setArguments(const QStringList arguments) |
125 | +void Application::setArguments(const QStringList &arguments) |
126 | { |
127 | m_arguments = arguments; |
128 | } |
129 | @@ -739,7 +739,7 @@ |
130 | |
131 | void Application::acquireWakelock() const |
132 | { |
133 | - if (appId() == "unity8-dash") |
134 | + if (appId() == QLatin1String("unity8-dash")) |
135 | return; |
136 | |
137 | m_sharedWakelock->acquire(this); |
138 | @@ -747,7 +747,7 @@ |
139 | |
140 | void Application::releaseWakelock() const |
141 | { |
142 | - if (appId() == "unity8-dash") |
143 | + if (appId() == QLatin1String("unity8-dash")) |
144 | return; |
145 | |
146 | m_sharedWakelock->release(this); |
147 | |
148 | === modified file 'src/modules/Unity/Application/application.h' |
149 | --- src/modules/Unity/Application/application.h 2016-06-24 13:46:39 +0000 |
150 | +++ src/modules/Unity/Application/application.h 2016-08-08 15:09:02 +0000 |
151 | @@ -160,7 +160,7 @@ |
152 | void acquireWakelock() const; |
153 | void releaseWakelock() const; |
154 | void setPid(pid_t pid); |
155 | - void setArguments(const QStringList arguments); |
156 | + void setArguments(const QStringList &arguments); |
157 | void setInternalState(InternalState state); |
158 | void wipeQMLCache(); |
159 | void suspend(); |
160 | |
161 | === modified file 'src/modules/Unity/Application/application_manager.cpp' |
162 | --- src/modules/Unity/Application/application_manager.cpp 2016-07-30 21:19:59 +0000 |
163 | +++ src/modules/Unity/Application/application_manager.cpp 2016-08-08 15:09:02 +0000 |
164 | @@ -64,12 +64,12 @@ |
165 | |
166 | // FIXME: To be removed once shell has fully adopted short appIds!! |
167 | QString toShortAppIdIfPossible(const QString &appId) { |
168 | - QRegExp longAppIdMask("[a-z0-9][a-z0-9+.-]+_[a-zA-Z0-9+.-]+_[0-9][a-zA-Z0-9.+:~-]*"); |
169 | + QRegExp longAppIdMask(QStringLiteral("[a-z0-9][a-z0-9+.-]+_[a-zA-Z0-9+.-]+_[0-9][a-zA-Z0-9.+:~-]*")); |
170 | if (longAppIdMask.exactMatch(appId)) { |
171 | qWarning() << "WARNING: long App ID encountered:" << appId; |
172 | // input string a long AppId, chop the version string off the end |
173 | - QStringList parts = appId.split("_"); |
174 | - return QString("%1_%2").arg(parts.first()).arg(parts.at(1)); |
175 | + QStringList parts = appId.split(QStringLiteral("_")); |
176 | + return QStringLiteral("%1_%2").arg(parts.first(), parts.at(1)); |
177 | } |
178 | return appId; |
179 | } |
180 | @@ -176,7 +176,7 @@ |
181 | , m_settings(settings) |
182 | { |
183 | qCDebug(QTMIR_APPLICATIONS) << "ApplicationManager::ApplicationManager (this=%p)" << this; |
184 | - setObjectName("qtmir::ApplicationManager"); |
185 | + setObjectName(QStringLiteral("qtmir::ApplicationManager")); |
186 | |
187 | /* |
188 | All begin[...]Rows() and end[...]Rows() functions cause signal emissions which can |
189 | @@ -526,7 +526,7 @@ |
190 | |
191 | qCDebug(QTMIR_APPLICATIONS) << "ApplicationManager::authorizeSession - pid=" << pid; |
192 | |
193 | - for (Application *app : m_applications) { |
194 | + Q_FOREACH (Application *app, m_applications) { |
195 | if (app->state() == Application::Starting) { |
196 | tracepoint(qtmir, appIdHasProcessId_start); |
197 | if (m_taskController->appIdHasProcessId(app->appId(), pid)) { |
198 | @@ -566,7 +566,7 @@ |
199 | } |
200 | |
201 | // Guess appId from the desktop file hint |
202 | - const QString appId = toShortAppIdIfPossible(desktopFileName.split('/').last().remove(QRegExp(".desktop$"))); |
203 | + const QString appId = toShortAppIdIfPossible(desktopFileName.split('/').last().remove(QRegExp(QStringLiteral(".desktop$")))); |
204 | |
205 | qCDebug(QTMIR_APPLICATIONS) << "Process supplied desktop_file_hint, loading:" << appId; |
206 | |
207 | @@ -623,7 +623,7 @@ |
208 | return findApplicationWithPid(session->process_id()); |
209 | } |
210 | |
211 | -Application* ApplicationManager::findApplicationWithPid(const pid_t pid) |
212 | +Application* ApplicationManager::findApplicationWithPid(const pid_t pid) const |
213 | { |
214 | if (pid <= 0) |
215 | return nullptr; |
216 | @@ -847,7 +847,7 @@ |
217 | |
218 | Application *ApplicationManager::findApplication(qtmir::MirSurfaceInterface* surface) |
219 | { |
220 | - for (Application *app : m_applications) { |
221 | + Q_FOREACH (Application *app, m_applications) { |
222 | if (app->session() == surface->session()) { |
223 | return app; |
224 | } |
225 | |
226 | === modified file 'src/modules/Unity/Application/application_manager.h' |
227 | --- src/modules/Unity/Application/application_manager.h 2016-07-30 21:19:59 +0000 |
228 | +++ src/modules/Unity/Application/application_manager.h 2016-08-08 15:09:02 +0000 |
229 | @@ -97,7 +97,7 @@ |
230 | bool isEmpty() const { return rowCount() == 0; } |
231 | |
232 | const QList<Application*> &list() const { return m_applications; } |
233 | - qtmir::Application* findApplicationWithPid(const pid_t pid); |
234 | + qtmir::Application* findApplicationWithPid(const pid_t pid) const; |
235 | |
236 | public Q_SLOTS: |
237 | void authorizeSession(const pid_t pid, bool &authorized); |
238 | |
239 | === modified file 'src/modules/Unity/Application/cgmanager.cpp' |
240 | --- src/modules/Unity/Application/cgmanager.cpp 2016-07-01 16:19:40 +0000 |
241 | +++ src/modules/Unity/Application/cgmanager.cpp 2016-08-08 15:09:02 +0000 |
242 | @@ -71,7 +71,7 @@ |
243 | QDBusMessage reply = connection.call(message); |
244 | |
245 | if (reply.type() == QDBusMessage::ReplyMessage) { |
246 | - return reply.arguments()[0].toString(); |
247 | + return reply.arguments().at(0).toString(); |
248 | } else { |
249 | Q_ASSERT(reply.type() == QDBusMessage::ErrorMessage); |
250 | qCWarning(QTMIR_DBUS) << "CGManager::getCGroupOfPid failed." << reply.errorMessage(); |
251 | @@ -103,7 +103,7 @@ |
252 | |
253 | Q_ASSERT(reply.type() == QDBusMessage::ReplyMessage); |
254 | |
255 | - auto arg = reply.arguments()[0].value<QDBusArgument>(); |
256 | + auto arg = reply.arguments().at(0).value<QDBusArgument>(); |
257 | Q_ASSERT(arg.currentType() == QDBusArgument::ArrayType); |
258 | |
259 | auto pidList = qdbus_cast<QList<int>>(arg); |
260 | |
261 | === modified file 'src/modules/Unity/Application/mirbuffersgtexture.cpp' |
262 | --- src/modules/Unity/Application/mirbuffersgtexture.cpp 2015-12-10 13:08:43 +0000 |
263 | +++ src/modules/Unity/Application/mirbuffersgtexture.cpp 2016-08-08 15:09:02 +0000 |
264 | @@ -51,7 +51,7 @@ |
265 | m_height = 0; |
266 | } |
267 | |
268 | -void MirBufferSGTexture::setBuffer(std::shared_ptr<mir::graphics::Buffer> buffer) |
269 | +void MirBufferSGTexture::setBuffer(const std::shared_ptr<mir::graphics::Buffer>& buffer) |
270 | { |
271 | m_mirBuffer = buffer; |
272 | mg::Size size = buffer->size(); |
273 | |
274 | === modified file 'src/modules/Unity/Application/mirbuffersgtexture.h' |
275 | --- src/modules/Unity/Application/mirbuffersgtexture.h 2015-09-28 09:57:18 +0000 |
276 | +++ src/modules/Unity/Application/mirbuffersgtexture.h 2016-08-08 15:09:02 +0000 |
277 | @@ -32,7 +32,7 @@ |
278 | MirBufferSGTexture(); |
279 | virtual ~MirBufferSGTexture(); |
280 | |
281 | - void setBuffer(std::shared_ptr<mir::graphics::Buffer> buffer); |
282 | + void setBuffer(const std::shared_ptr<mir::graphics::Buffer>& buffer); |
283 | void freeBuffer(); |
284 | bool hasBuffer() const; |
285 | |
286 | |
287 | === modified file 'src/modules/Unity/Application/mirsurface.cpp' |
288 | --- src/modules/Unity/Application/mirsurface.cpp 2016-07-30 21:17:59 +0000 |
289 | +++ src/modules/Unity/Application/mirsurface.cpp 2016-08-08 15:09:02 +0000 |
290 | @@ -841,7 +841,7 @@ |
291 | |
292 | void MirSurface::applyKeymap() |
293 | { |
294 | - QStringList stringList = m_keymap.split("+", QString::SkipEmptyParts); |
295 | + QStringList stringList = m_keymap.split('+', QString::SkipEmptyParts); |
296 | |
297 | QString layout = stringList[0]; |
298 | QString variant; |
299 | |
300 | === modified file 'src/modules/Unity/Application/mirsurfaceitem.cpp' |
301 | --- src/modules/Unity/Application/mirsurfaceitem.cpp 2016-06-20 14:23:40 +0000 |
302 | +++ src/modules/Unity/Application/mirsurfaceitem.cpp 2016-08-08 15:09:02 +0000 |
303 | @@ -60,7 +60,7 @@ |
304 | { |
305 | Q_OBJECT |
306 | public: |
307 | - MirTextureProvider(QSharedPointer<QSGTexture> texture) : t(texture) {} |
308 | + MirTextureProvider(const QSharedPointer<QSGTexture>& texture) : t(texture) {} |
309 | QSGTexture *texture() const { |
310 | if (t) |
311 | t->setFiltering(smooth ? QSGTexture::Linear : QSGTexture::Nearest); |
312 | @@ -73,7 +73,7 @@ |
313 | t.reset(); |
314 | } |
315 | |
316 | - void setTexture(QSharedPointer<QSGTexture> newTexture) { |
317 | + void setTexture(const QSharedPointer<QSGTexture>& newTexture) { |
318 | t = newTexture; |
319 | } |
320 | |
321 | @@ -237,7 +237,7 @@ |
322 | } |
323 | |
324 | if (m_surface->numBuffersReadyForCompositor() > 0) { |
325 | - QTimer::singleShot(0, this, SLOT(update())); |
326 | + QTimer::singleShot(0, this, &MirSurfaceItem::update); |
327 | } |
328 | |
329 | m_textureProvider->smooth = smooth(); |
330 | @@ -375,7 +375,7 @@ |
331 | if (m_surface) { |
332 | return m_surface->appId(); |
333 | } else { |
334 | - return QString("-"); |
335 | + return QStringLiteral("-"); |
336 | } |
337 | } |
338 | |
339 | @@ -420,7 +420,7 @@ |
340 | Qt::TouchPointStates touchPointStates) |
341 | { |
342 | if (eventType == QEvent::TouchBegin && m_lastTouchEvent && m_lastTouchEvent->type != QEvent::TouchEnd) { |
343 | - qCWarning(QTMIR_SURFACES) << qPrintable(QString("MirSurfaceItem(%1) - Got a QEvent::TouchBegin while " |
344 | + qCWarning(QTMIR_SURFACES) << qPrintable(QStringLiteral("MirSurfaceItem(%1) - Got a QEvent::TouchBegin while " |
345 | "there's still an active/unfinished touch sequence.").arg(appId())); |
346 | // Qt forgot to end the last touch sequence. Let's do it ourselves. |
347 | endCurrentTouchSequence(timestamp); |
348 | @@ -711,7 +711,7 @@ |
349 | } |
350 | } |
351 | |
352 | -void MirSurfaceItem::onActualSurfaceSizeChanged(const QSize &size) |
353 | +void MirSurfaceItem::onActualSurfaceSizeChanged(QSize size) |
354 | { |
355 | setImplicitSize(size.width(), size.height()); |
356 | } |
357 | |
358 | === modified file 'src/modules/Unity/Application/mirsurfaceitem.h' |
359 | --- src/modules/Unity/Application/mirsurfaceitem.h 2016-06-20 14:23:40 +0000 |
360 | +++ src/modules/Unity/Application/mirsurfaceitem.h 2016-08-08 15:09:02 +0000 |
361 | @@ -119,7 +119,7 @@ |
362 | void updateMirSurfaceActiveFocus(); |
363 | void updateMirSurfaceVisibility(); |
364 | |
365 | - void onActualSurfaceSizeChanged(const QSize &size); |
366 | + void onActualSurfaceSizeChanged(QSize size); |
367 | void onCompositorSwappedBuffers(); |
368 | |
369 | void onWindowChanged(QQuickWindow *window); |
370 | |
371 | === modified file 'src/modules/Unity/Application/mirsurfacemanager.cpp' |
372 | --- src/modules/Unity/Application/mirsurfacemanager.cpp 2016-05-06 08:41:15 +0000 |
373 | +++ src/modules/Unity/Application/mirsurfacemanager.cpp 2016-08-08 15:09:02 +0000 |
374 | @@ -85,7 +85,7 @@ |
375 | , m_sessionManager(sessionManager) |
376 | { |
377 | qCDebug(QTMIR_SURFACES) << "MirSurfaceManager::MirSurfaceManager - this=" << this; |
378 | - setObjectName("qtmir::SurfaceManager"); |
379 | + setObjectName(QStringLiteral("qtmir::SurfaceManager")); |
380 | } |
381 | |
382 | MirSurfaceManager::~MirSurfaceManager() |
383 | @@ -98,7 +98,7 @@ |
384 | void MirSurfaceManager::onSessionCreatedSurface(const mir::scene::Session *mirSession, |
385 | const std::shared_ptr<mir::scene::Surface> &surface, |
386 | const std::shared_ptr<SurfaceObserver> &observer, |
387 | - qtmir::CreationHints creationHints) |
388 | + const qtmir::CreationHints &creationHints) |
389 | { |
390 | qCDebug(QTMIR_SURFACES) << "MirSurfaceManager::onSessionCreatedSurface - mirSession=" << mirSession |
391 | << "surface=" << surface.get() << "surface.name=" << surface->name().c_str() |
392 | |
393 | === modified file 'src/modules/Unity/Application/mirsurfacemanager.h' |
394 | --- src/modules/Unity/Application/mirsurfacemanager.h 2016-05-06 08:28:44 +0000 |
395 | +++ src/modules/Unity/Application/mirsurfacemanager.h 2016-08-08 15:09:02 +0000 |
396 | @@ -75,7 +75,7 @@ |
397 | void onSessionCreatedSurface(const mir::scene::Session *, |
398 | const std::shared_ptr<mir::scene::Surface> &, |
399 | std::shared_ptr<SurfaceObserver> const&, |
400 | - qtmir::CreationHints); |
401 | + const qtmir::CreationHints &); |
402 | void onSessionDestroyingSurface(const mir::scene::Session *, const std::shared_ptr<mir::scene::Surface> &); |
403 | |
404 | protected: |
405 | |
406 | === modified file 'src/modules/Unity/Application/proc_info.cpp' |
407 | --- src/modules/Unity/Application/proc_info.cpp 2015-10-08 11:20:30 +0000 |
408 | +++ src/modules/Unity/Application/proc_info.cpp 2016-08-08 15:09:02 +0000 |
409 | @@ -27,7 +27,7 @@ |
410 | } |
411 | |
412 | std::unique_ptr<ProcInfo::CommandLine> ProcInfo::commandLine(pid_t pid) { |
413 | - QFile cmdline(QString("/proc/%1/cmdline").arg(pid)); |
414 | + QFile cmdline(QStringLiteral("/proc/%1/cmdline").arg(pid)); |
415 | if (!cmdline.open(QIODevice::ReadOnly | QIODevice::Text)) { |
416 | return nullptr; |
417 | } |
418 | |
419 | === modified file 'src/modules/Unity/Application/session.cpp' |
420 | --- src/modules/Unity/Application/session.cpp 2016-07-15 15:09:41 +0000 |
421 | +++ src/modules/Unity/Application/session.cpp 2016-08-08 15:09:02 +0000 |
422 | @@ -89,7 +89,7 @@ |
423 | DEBUG_MSG << "()"; |
424 | stopPromptSessions(); |
425 | |
426 | - QList<SessionInterface*> children(m_children->list()); |
427 | + const QList<SessionInterface*> children(m_children->list()); |
428 | for (SessionInterface* child : children) { |
429 | delete child; |
430 | } |
431 | @@ -438,9 +438,9 @@ |
432 | deleteIfZombieAndEmpty(); |
433 | } |
434 | |
435 | -void Session::foreachChildSession(std::function<void(SessionInterface* session)> f) const |
436 | +void Session::foreachChildSession(const std::function<void(SessionInterface* session)>& f) const |
437 | { |
438 | - QList<SessionInterface*> children(m_children->list()); |
439 | + const QList<SessionInterface*> children(m_children->list()); |
440 | for (SessionInterface* child : children) { |
441 | f(child); |
442 | } |
443 | @@ -467,13 +467,13 @@ |
444 | |
445 | void Session::stopPromptSessions() |
446 | { |
447 | - QList<SessionInterface*> children(m_children->list()); |
448 | + const QList<SessionInterface*> children(m_children->list()); |
449 | for (SessionInterface* child : children) { |
450 | static_cast<Session*>(child)->stopPromptSessions(); |
451 | } |
452 | |
453 | - QList<std::shared_ptr<ms::PromptSession>> copy(m_promptSessions); |
454 | - QListIterator<std::shared_ptr<ms::PromptSession>> it(copy); |
455 | + QVector<std::shared_ptr<ms::PromptSession>> copy(m_promptSessions); |
456 | + QVectorIterator<std::shared_ptr<ms::PromptSession>> it(copy); |
457 | for ( it.toBack(); it.hasPrevious(); ) { |
458 | std::shared_ptr<ms::PromptSession> promptSession = it.previous(); |
459 | DEBUG_MSG << " - promptSession=" << promptSession.get(); |
460 | @@ -489,9 +489,9 @@ |
461 | return nullptr; |
462 | } |
463 | |
464 | -void Session::foreachPromptSession(std::function<void(const std::shared_ptr<ms::PromptSession>&)> f) const |
465 | +void Session::foreachPromptSession(const std::function<void(const std::shared_ptr<ms::PromptSession>&)>& f) const |
466 | { |
467 | - for (std::shared_ptr<ms::PromptSession> promptSession : m_promptSessions) { |
468 | + Q_FOREACH (std::shared_ptr<ms::PromptSession> promptSession, m_promptSessions) { |
469 | f(promptSession); |
470 | } |
471 | } |
472 | |
473 | === modified file 'src/modules/Unity/Application/session.h' |
474 | --- src/modules/Unity/Application/session.h 2016-06-24 13:46:39 +0000 |
475 | +++ src/modules/Unity/Application/session.h 2016-08-08 15:09:02 +0000 |
476 | @@ -74,12 +74,12 @@ |
477 | void addChildSession(SessionInterface* session) override; |
478 | void insertChildSession(uint index, SessionInterface* session) override; |
479 | void removeChildSession(SessionInterface* session) override; |
480 | - void foreachChildSession(std::function<void(SessionInterface* session)> f) const override; |
481 | + void foreachChildSession(const std::function<void(SessionInterface* session)> &f) const override; |
482 | |
483 | std::shared_ptr<mir::scene::Session> session() const override; |
484 | |
485 | std::shared_ptr<mir::scene::PromptSession> activePromptSession() const override; |
486 | - void foreachPromptSession(std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> f) const override; |
487 | + void foreachPromptSession(const std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> &f) const override; |
488 | |
489 | SessionModel* childSessions() const override; |
490 | |
491 | @@ -119,7 +119,7 @@ |
492 | State m_state; |
493 | bool m_live; |
494 | AbstractTimer* m_suspendTimer{nullptr}; |
495 | - QList<std::shared_ptr<mir::scene::PromptSession>> m_promptSessions; |
496 | + QVector<std::shared_ptr<mir::scene::PromptSession>> m_promptSessions; |
497 | std::shared_ptr<mir::scene::PromptSessionManager> const m_promptSessionManager; |
498 | QList<MirSurfaceInterface*> m_closingSurfaces; |
499 | bool m_hadSurface{false}; |
500 | |
501 | === modified file 'src/modules/Unity/Application/session_interface.h' |
502 | --- src/modules/Unity/Application/session_interface.h 2016-06-24 13:46:39 +0000 |
503 | +++ src/modules/Unity/Application/session_interface.h 2016-08-08 15:09:02 +0000 |
504 | @@ -103,10 +103,10 @@ |
505 | virtual void addChildSession(SessionInterface* session) = 0; |
506 | virtual void insertChildSession(uint index, SessionInterface* session) = 0; |
507 | virtual void removeChildSession(SessionInterface* session) = 0; |
508 | - virtual void foreachChildSession(std::function<void(SessionInterface* session)> f) const = 0; |
509 | + virtual void foreachChildSession(const std::function<void(SessionInterface* session)>& f) const = 0; |
510 | |
511 | virtual std::shared_ptr<mir::scene::PromptSession> activePromptSession() const = 0; |
512 | - virtual void foreachPromptSession(std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> f) const = 0; |
513 | + virtual void foreachPromptSession(const std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)>& f) const = 0; |
514 | |
515 | virtual void setFullscreen(bool fullscreen) = 0; |
516 | virtual void setLive(const bool) = 0; |
517 | |
518 | === modified file 'src/modules/Unity/Application/sessionmanager.cpp' |
519 | --- src/modules/Unity/Application/sessionmanager.cpp 2016-05-06 08:41:15 +0000 |
520 | +++ src/modules/Unity/Application/sessionmanager.cpp 2016-08-08 15:09:02 +0000 |
521 | @@ -92,7 +92,7 @@ |
522 | , m_applicationManager(applicationManager) |
523 | { |
524 | qCDebug(QTMIR_SESSIONS) << "SessionManager::SessionManager - this=" << this; |
525 | - setObjectName("qtmir::SessionManager"); |
526 | + setObjectName(QStringLiteral("qtmir::SessionManager")); |
527 | } |
528 | |
529 | SessionManager::~SessionManager() |
530 | |
531 | === modified file 'src/modules/Unity/Application/sharedwakelock.cpp' |
532 | --- src/modules/Unity/Application/sharedwakelock.cpp 2015-03-05 23:40:52 +0000 |
533 | +++ src/modules/Unity/Application/sharedwakelock.cpp 2016-08-08 15:09:02 +0000 |
534 | @@ -37,7 +37,7 @@ |
535 | Q_OBJECT |
536 | public: |
537 | Wakelock(const QDBusConnection &connection) noexcept |
538 | - : AbstractDBusServiceMonitor("com.canonical.powerd", "/com/canonical/powerd", "com.canonical.powerd", connection) |
539 | + : AbstractDBusServiceMonitor(QStringLiteral("com.canonical.powerd"), QStringLiteral("/com/canonical/powerd"), QStringLiteral("com.canonical.powerd"), connection) |
540 | , m_wakelockEnabled(false) |
541 | { |
542 | // (re-)acquire wake lock when powerd (re-)appears on the bus |
543 | @@ -90,7 +90,7 @@ |
544 | } |
545 | |
546 | if (!m_cookie.isEmpty()) { |
547 | - dbusInterface()->asyncCall("clearSysState", QString(m_cookie)); |
548 | + dbusInterface()->asyncCall(QStringLiteral("clearSysState"), QString(m_cookie)); |
549 | qCDebug(QTMIR_SESSIONS) << "Wakelock released" << m_cookie; |
550 | m_cookie.clear(); |
551 | } |
552 | @@ -132,7 +132,7 @@ |
553 | |
554 | if (!m_wakelockEnabled || !m_cookie.isEmpty()) { |
555 | // notified wakelock was created, but we either don't want it, or already have one - release it immediately |
556 | - dbusInterface()->asyncCall("clearSysState", QString(cookie)); |
557 | + dbusInterface()->asyncCall(QStringLiteral("clearSysState"), QString(cookie)); |
558 | return; |
559 | } |
560 | |
561 | @@ -155,7 +155,7 @@ |
562 | return; |
563 | } |
564 | |
565 | - QDBusPendingCall pcall = dbusInterface()->asyncCall("requestSysState", "active", POWERD_SYS_STATE_ACTIVE); |
566 | + QDBusPendingCall pcall = dbusInterface()->asyncCall(QStringLiteral("requestSysState"), "active", POWERD_SYS_STATE_ACTIVE); |
567 | |
568 | QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pcall, this); |
569 | QObject::connect(watcher, &QDBusPendingCallWatcher::finished, |
570 | |
571 | === modified file 'src/modules/Unity/Application/upstart/taskcontroller.cpp' |
572 | --- src/modules/Unity/Application/upstart/taskcontroller.cpp 2016-05-27 07:27:44 +0000 |
573 | +++ src/modules/Unity/Application/upstart/taskcontroller.cpp 2016-08-08 15:09:02 +0000 |
574 | @@ -59,7 +59,7 @@ |
575 | gchar *package, *application; |
576 | if (ubuntu_app_launch_app_id_parse(appId.toLatin1().constData(), &package, &application, nullptr)) { |
577 | // is long appId, so assemble its short appId |
578 | - QString shortAppId = QString("%1_%2").arg(package).arg(application); |
579 | + QString shortAppId = QStringLiteral("%1_%2").arg(package, application); |
580 | g_free(package); |
581 | g_free(application); |
582 | return shortAppId; |
583 | |
584 | === modified file 'src/modules/Unity/Screens/qquickscreenwindow.cpp' |
585 | --- src/modules/Unity/Screens/qquickscreenwindow.cpp 2016-04-22 18:01:05 +0000 |
586 | +++ src/modules/Unity/Screens/qquickscreenwindow.cpp 2016-08-08 15:09:02 +0000 |
587 | @@ -50,7 +50,7 @@ |
588 | , m_scale(-1.0) // start with invalid initial state, fetch correct value on first invokation |
589 | , m_formFactor(Screens::FormFactorUnknown) |
590 | { |
591 | - if (qGuiApp->platformName() == "mirserver") { |
592 | + if (qGuiApp->platformName() == QLatin1String("mirserver")) { |
593 | connect(qGuiApp->platformNativeInterface(), &QPlatformNativeInterface::windowPropertyChanged, |
594 | this, &QQuickScreenWindow::nativePropertyChanged); |
595 | //m_scale = getScaleNativeProperty(); DO NOT CALL HERE - see note above |
596 | |
597 | === modified file 'src/platforms/mirserver/clipboard.cpp' |
598 | --- src/platforms/mirserver/clipboard.cpp 2016-05-03 19:45:51 +0000 |
599 | +++ src/platforms/mirserver/clipboard.cpp 2016-08-08 15:09:02 +0000 |
600 | @@ -65,12 +65,13 @@ |
601 | int offset = headerSize; |
602 | header[0] = formatCount; |
603 | for (int i = 0; i < formatCount; i++) { |
604 | + const QByteArray data = mimeData->data(formats[i]); |
605 | const int formatOffset = offset; |
606 | const int formatSize = formats[i].size(); |
607 | const int dataOffset = offset + formatSize; |
608 | - const int dataSize = mimeData->data(formats[i]).size(); |
609 | + const int dataSize = data.size(); |
610 | memcpy(&buffer[formatOffset], formats[i].toLatin1().data(), formatSize); |
611 | - memcpy(&buffer[dataOffset], mimeData->data(formats[i]).data(), dataSize); |
612 | + memcpy(&buffer[dataOffset], data.data(), dataSize); |
613 | header[i*4+1] = formatOffset; |
614 | header[i*4+2] = formatSize; |
615 | header[i*4+3] = dataOffset; |
616 | |
617 | === modified file 'src/platforms/mirserver/creationhints.cpp' |
618 | --- src/platforms/mirserver/creationhints.cpp 2016-03-18 12:15:54 +0000 |
619 | +++ src/platforms/mirserver/creationhints.cpp 2016-08-08 15:09:02 +0000 |
620 | @@ -56,7 +56,7 @@ |
621 | |
622 | QString CreationHints::toString() const |
623 | { |
624 | - return QString("CreationHints(minW=%1,minH=%2,maxW=%3,maxH=%4,wIncr=%5,hInc=%6,shellChrome=%7)") |
625 | + return QStringLiteral("CreationHints(minW=%1,minH=%2,maxW=%3,maxH=%4,wIncr=%5,hInc=%6,shellChrome=%7)") |
626 | .arg(minWidth) |
627 | .arg(minHeight) |
628 | .arg(maxWidth) |
629 | |
630 | === modified file 'src/platforms/mirserver/creationhints.h' |
631 | --- src/platforms/mirserver/creationhints.h 2016-03-10 11:55:28 +0000 |
632 | +++ src/platforms/mirserver/creationhints.h 2016-08-08 15:09:02 +0000 |
633 | @@ -24,7 +24,7 @@ |
634 | |
635 | namespace mir { |
636 | namespace scene { |
637 | - class SurfaceCreationParameters; |
638 | + struct SurfaceCreationParameters; |
639 | } |
640 | } |
641 | |
642 | |
643 | === modified file 'src/platforms/mirserver/cursor.cpp' |
644 | --- src/platforms/mirserver/cursor.cpp 2016-06-06 20:33:23 +0000 |
645 | +++ src/platforms/mirserver/cursor.cpp 2016-08-08 15:09:02 +0000 |
646 | @@ -27,28 +27,28 @@ |
647 | |
648 | Cursor::Cursor() |
649 | { |
650 | - m_shapeToCursorName[Qt::ArrowCursor] = "left_ptr"; |
651 | - m_shapeToCursorName[Qt::UpArrowCursor] = "up_arrow"; |
652 | - m_shapeToCursorName[Qt::CrossCursor] = "cross"; |
653 | - m_shapeToCursorName[Qt::WaitCursor] = "watch"; |
654 | - m_shapeToCursorName[Qt::IBeamCursor] = "xterm"; |
655 | - m_shapeToCursorName[Qt::SizeVerCursor] = "size_ver"; |
656 | - m_shapeToCursorName[Qt::SizeHorCursor] = "size_hor"; |
657 | - m_shapeToCursorName[Qt::SizeBDiagCursor] = "size_bdiag"; |
658 | - m_shapeToCursorName[Qt::SizeFDiagCursor] = "size_fdiag"; |
659 | - m_shapeToCursorName[Qt::SizeAllCursor] = "size_all"; |
660 | - m_shapeToCursorName[Qt::BlankCursor] = "blank"; |
661 | - m_shapeToCursorName[Qt::SplitVCursor] = "split_v"; |
662 | - m_shapeToCursorName[Qt::SplitHCursor] = "split_h"; |
663 | - m_shapeToCursorName[Qt::PointingHandCursor] = "hand"; |
664 | - m_shapeToCursorName[Qt::ForbiddenCursor] = "forbidden"; |
665 | - m_shapeToCursorName[Qt::WhatsThisCursor] = "whats_this"; |
666 | - m_shapeToCursorName[Qt::BusyCursor] = "left_ptr_watch"; |
667 | - m_shapeToCursorName[Qt::OpenHandCursor] = "openhand"; |
668 | - m_shapeToCursorName[Qt::ClosedHandCursor] = "closedhand"; |
669 | - m_shapeToCursorName[Qt::DragCopyCursor] = "dnd-copy"; |
670 | - m_shapeToCursorName[Qt::DragMoveCursor] = "dnd-move"; |
671 | - m_shapeToCursorName[Qt::DragLinkCursor] = "dnd-link"; |
672 | + m_shapeToCursorName[Qt::ArrowCursor] = QStringLiteral("left_ptr"); |
673 | + m_shapeToCursorName[Qt::UpArrowCursor] = QStringLiteral("up_arrow"); |
674 | + m_shapeToCursorName[Qt::CrossCursor] = QStringLiteral("cross"); |
675 | + m_shapeToCursorName[Qt::WaitCursor] = QStringLiteral("watch"); |
676 | + m_shapeToCursorName[Qt::IBeamCursor] = QStringLiteral("xterm"); |
677 | + m_shapeToCursorName[Qt::SizeVerCursor] = QStringLiteral("size_ver"); |
678 | + m_shapeToCursorName[Qt::SizeHorCursor] = QStringLiteral("size_hor"); |
679 | + m_shapeToCursorName[Qt::SizeBDiagCursor] = QStringLiteral("size_bdiag"); |
680 | + m_shapeToCursorName[Qt::SizeFDiagCursor] = QStringLiteral("size_fdiag"); |
681 | + m_shapeToCursorName[Qt::SizeAllCursor] = QStringLiteral("size_all"); |
682 | + m_shapeToCursorName[Qt::BlankCursor] = QStringLiteral("blank"); |
683 | + m_shapeToCursorName[Qt::SplitVCursor] = QStringLiteral("split_v"); |
684 | + m_shapeToCursorName[Qt::SplitHCursor] = QStringLiteral("split_h"); |
685 | + m_shapeToCursorName[Qt::PointingHandCursor] = QStringLiteral("hand"); |
686 | + m_shapeToCursorName[Qt::ForbiddenCursor] = QStringLiteral("forbidden"); |
687 | + m_shapeToCursorName[Qt::WhatsThisCursor] = QStringLiteral("whats_this"); |
688 | + m_shapeToCursorName[Qt::BusyCursor] = QStringLiteral("left_ptr_watch"); |
689 | + m_shapeToCursorName[Qt::OpenHandCursor] = QStringLiteral("openhand"); |
690 | + m_shapeToCursorName[Qt::ClosedHandCursor] = QStringLiteral("closedhand"); |
691 | + m_shapeToCursorName[Qt::DragCopyCursor] = QStringLiteral("dnd-copy"); |
692 | + m_shapeToCursorName[Qt::DragMoveCursor] = QStringLiteral("dnd-move"); |
693 | + m_shapeToCursorName[Qt::DragLinkCursor] = QStringLiteral("dnd-link"); |
694 | |
695 | connect(Mir::instance(), &Mir::cursorNameChanged, this, &Cursor::setMirCursorName); |
696 | } |
697 | @@ -61,7 +61,7 @@ |
698 | |
699 | if (windowCursor) { |
700 | if (windowCursor->pixmap().isNull()) { |
701 | - m_qtCursorName = m_shapeToCursorName.value(windowCursor->shape(), QLatin1String("left_ptr")); |
702 | + m_qtCursorName = m_shapeToCursorName.value(windowCursor->shape(), QStringLiteral("left_ptr")); |
703 | m_mousePointer->setCustomCursor(QCursor()); |
704 | } else { |
705 | // Ensure we get different names for consecutive custom cursors. |
706 | @@ -69,7 +69,7 @@ |
707 | // just different from the previous custom cursor name, which is enough to trigger a change in the cursor |
708 | // source image URL in the QML side which on is turn makes QML request the new cursor image. |
709 | static quint8 serialNumber = 1; |
710 | - m_qtCursorName = QString("custom%1").arg(serialNumber++); |
711 | + m_qtCursorName = QStringLiteral("custom%1").arg(serialNumber++); |
712 | m_mousePointer->setCustomCursor(*windowCursor); |
713 | } |
714 | } else { |
715 | @@ -175,7 +175,7 @@ |
716 | |
717 | if (m_mirCursorName.isEmpty()) { |
718 | if (m_qtCursorName.isEmpty()) { |
719 | - m_mousePointer->setCursorName("left_ptr"); |
720 | + m_mousePointer->setCursorName(QStringLiteral("left_ptr")); |
721 | } else { |
722 | m_mousePointer->setCursorName(m_qtCursorName); |
723 | } |
724 | |
725 | === modified file 'src/platforms/mirserver/cursor.h' |
726 | --- src/platforms/mirserver/cursor.h 2015-11-19 14:17:54 +0000 |
727 | +++ src/platforms/mirserver/cursor.h 2016-08-08 15:09:02 +0000 |
728 | @@ -28,6 +28,7 @@ |
729 | |
730 | class Cursor : public MirPlatformCursor |
731 | { |
732 | + Q_OBJECT |
733 | public: |
734 | Cursor(); |
735 | |
736 | |
737 | === modified file 'src/platforms/mirserver/mircursorimages.cpp' |
738 | --- src/platforms/mirserver/mircursorimages.cpp 2015-11-10 11:07:23 +0000 |
739 | +++ src/platforms/mirserver/mircursorimages.cpp 2016-08-08 15:09:02 +0000 |
740 | @@ -20,7 +20,7 @@ |
741 | using namespace qtmir; |
742 | |
743 | std::shared_ptr<mir::graphics::CursorImage> MirCursorImages::image(const std::string &cursor_name, |
744 | - const mir::geometry::Size&) |
745 | + const mir::geometry::Size &) |
746 | { |
747 | // We are not responsible for loading cursors. This is left for shell to do as it's drawing its own QML cursor. |
748 | // So here we work around Mir API by storing just the cursor name in the CursorImage. |
749 | |
750 | === modified file 'src/platforms/mirserver/mirwindowmanager.cpp' |
751 | --- src/platforms/mirserver/mirwindowmanager.cpp 2016-06-20 14:23:40 +0000 |
752 | +++ src/platforms/mirserver/mirwindowmanager.cpp 2016-08-08 15:09:02 +0000 |
753 | @@ -33,6 +33,7 @@ |
754 | { |
755 | class MirWindowManagerImpl : public MirWindowManager |
756 | { |
757 | + Q_OBJECT |
758 | public: |
759 | |
760 | MirWindowManagerImpl(const std::shared_ptr<mir::shell::DisplayLayout> &displayLayout, |
761 | @@ -218,3 +219,5 @@ |
762 | { |
763 | return std::make_shared<MirWindowManagerImpl>(displayLayout, sessionListener); |
764 | } |
765 | + |
766 | +#include "mirwindowmanager.moc" |
767 | \ No newline at end of file |
768 | |
769 | === modified file 'src/platforms/mirserver/nativeinterface.cpp' |
770 | --- src/platforms/mirserver/nativeinterface.cpp 2016-05-05 14:17:14 +0000 |
771 | +++ src/platforms/mirserver/nativeinterface.cpp 2016-08-08 15:09:02 +0000 |
772 | @@ -56,8 +56,8 @@ |
773 | auto w = static_cast<ScreenWindow*>(window); |
774 | auto s = static_cast<Screen*>(w->screen()); |
775 | if (s) { |
776 | - propertyMap.insert("scale", s->scale()); |
777 | - propertyMap.insert("formFactor", s->formFactor()); |
778 | + propertyMap.insert(QStringLiteral("scale"), s->scale()); |
779 | + propertyMap.insert(QStringLiteral("formFactor"), s->formFactor()); |
780 | } |
781 | return propertyMap; |
782 | } |
783 | |
784 | === modified file 'src/platforms/mirserver/nativeinterface.h' |
785 | --- src/platforms/mirserver/nativeinterface.h 2016-05-05 14:17:14 +0000 |
786 | +++ src/platforms/mirserver/nativeinterface.h 2016-08-08 15:09:02 +0000 |
787 | @@ -27,10 +27,11 @@ |
788 | |
789 | class NativeInterface : public QPlatformNativeInterface |
790 | { |
791 | + Q_OBJECT |
792 | public: |
793 | NativeInterface(QMirServer *); |
794 | |
795 | - virtual void *nativeResourceForIntegration(const QByteArray &resource); |
796 | + void *nativeResourceForIntegration(const QByteArray &resource) override; |
797 | |
798 | QVariantMap windowProperties(QPlatformWindow *window) const override; |
799 | QVariant windowProperty(QPlatformWindow *window, const QString &name) const override; |
800 | |
801 | === modified file 'src/platforms/mirserver/plugin.cpp' |
802 | --- src/platforms/mirserver/plugin.cpp 2015-10-19 21:17:18 +0000 |
803 | +++ src/platforms/mirserver/plugin.cpp 2016-08-08 15:09:02 +0000 |
804 | @@ -20,7 +20,7 @@ |
805 | QPlatformIntegration *MirServerIntegrationPlugin::create(const QString &system, const QStringList &/*paramList*/, |
806 | int &argc, char **argv) |
807 | { |
808 | - if (system.toLower() == "mirserver") |
809 | + if (system.toLower() == QLatin1String("mirserver")) |
810 | return new MirServerIntegration(argc, argv); |
811 | return 0; |
812 | } |
813 | |
814 | === modified file 'src/platforms/mirserver/qteventfeeder.cpp' |
815 | --- src/platforms/mirserver/qteventfeeder.cpp 2016-05-06 08:41:15 +0000 |
816 | +++ src/platforms/mirserver/qteventfeeder.cpp 2016-08-08 15:09:02 +0000 |
817 | @@ -852,7 +852,7 @@ |
818 | result.append(","); |
819 | } |
820 | const struct QWindowSystemInterface::TouchPoint &point = points.at(i); |
821 | - result.append(QString("(id=%1,state=%2,normalPosition=(%3,%4))") |
822 | + result.append(QStringLiteral("(id=%1,state=%2,normalPosition=(%3,%4))") |
823 | .arg(point.id) |
824 | .arg(touchPointStateToString(point.state)) |
825 | .arg(point.normalPosition.x()) |
826 | |
827 | === modified file 'src/platforms/mirserver/screen.cpp' |
828 | --- src/platforms/mirserver/screen.cpp 2016-05-06 08:41:15 +0000 |
829 | +++ src/platforms/mirserver/screen.cpp 2016-08-08 15:09:02 +0000 |
830 | @@ -169,15 +169,15 @@ |
831 | |
832 | if (!skipDBusRegistration) { |
833 | // FIXME This is a unity8 specific dbus call and shouldn't be in qtmir |
834 | - m_unityScreen = new QDBusInterface("com.canonical.Unity.Screen", |
835 | - "/com/canonical/Unity/Screen", |
836 | - "com.canonical.Unity.Screen", |
837 | + m_unityScreen = new QDBusInterface(QStringLiteral("com.canonical.Unity.Screen"), |
838 | + QStringLiteral("/com/canonical/Unity/Screen"), |
839 | + QStringLiteral("com.canonical.Unity.Screen"), |
840 | QDBusConnection::systemBus(), this); |
841 | |
842 | - m_unityScreen->connection().connect("com.canonical.Unity.Screen", |
843 | - "/com/canonical/Unity/Screen", |
844 | - "com.canonical.Unity.Screen", |
845 | - "DisplayPowerStateChange", |
846 | + m_unityScreen->connection().connect(QStringLiteral("com.canonical.Unity.Screen"), |
847 | + QStringLiteral("/com/canonical/Unity/Screen"), |
848 | + QStringLiteral("com.canonical.Unity.Screen"), |
849 | + QStringLiteral("DisplayPowerStateChange"), |
850 | this, |
851 | SLOT(onDisplayPowerStateChanged(int, int))); |
852 | } |
853 | |
854 | === modified file 'src/platforms/mirserver/screenscontroller.cpp' |
855 | --- src/platforms/mirserver/screenscontroller.cpp 2016-01-29 16:49:06 +0000 |
856 | +++ src/platforms/mirserver/screenscontroller.cpp 2016-08-08 15:09:02 +0000 |
857 | @@ -54,13 +54,13 @@ |
858 | return list; |
859 | } |
860 | |
861 | -bool ScreensController::setConfiguration(CustomScreenConfigurationList newConfig) |
862 | +bool ScreensController::setConfiguration(const CustomScreenConfigurationList &newConfig) |
863 | { |
864 | using namespace mir::geometry; |
865 | |
866 | auto displayConfiguration = m_display->configuration(); |
867 | |
868 | - Q_FOREACH (auto config, newConfig) { |
869 | + Q_FOREACH (const auto &config, newConfig) { |
870 | displayConfiguration->for_each_output( |
871 | [&config](mg::UserDisplayConfigurationOutput &outputConfig) |
872 | { |
873 | |
874 | === modified file 'src/platforms/mirserver/screenscontroller.h' |
875 | --- src/platforms/mirserver/screenscontroller.h 2016-01-29 16:49:06 +0000 |
876 | +++ src/platforms/mirserver/screenscontroller.h 2016-08-08 15:09:02 +0000 |
877 | @@ -43,7 +43,7 @@ |
878 | QObject *parent = 0); |
879 | |
880 | CustomScreenConfigurationList configuration(); |
881 | - bool setConfiguration(CustomScreenConfigurationList newConfig); |
882 | + bool setConfiguration(const CustomScreenConfigurationList &newConfig); |
883 | |
884 | private: |
885 | const QSharedPointer<ScreensModel> m_screensModel; |
886 | |
887 | === modified file 'src/platforms/mirserver/screensmodel.cpp' |
888 | --- src/platforms/mirserver/screensmodel.cpp 2016-05-06 08:41:15 +0000 |
889 | +++ src/platforms/mirserver/screensmodel.cpp 2016-08-08 15:09:02 +0000 |
890 | @@ -144,7 +144,7 @@ |
891 | ); |
892 | |
893 | // Announce new Screens to Qt |
894 | - for (auto screen : newScreenList) { |
895 | + Q_FOREACH (auto screen, newScreenList) { |
896 | Q_EMIT screenAdded(screen); |
897 | } |
898 | |
899 | @@ -157,7 +157,7 @@ |
900 | } |
901 | |
902 | // Delete any old & unused Screens |
903 | - for (auto screen: oldScreenList) { |
904 | + Q_FOREACH (auto screen, oldScreenList) { |
905 | qCDebug(QTMIR_SCREENS) << "Removed Screen with id" << screen->m_outputId.as_value() |
906 | << "and geometry" << screen->geometry(); |
907 | auto window = static_cast<ScreenWindow *>(screen->window()); |
908 | @@ -180,7 +180,7 @@ |
909 | buffer.view_area().size.width.as_int(), |
910 | buffer.view_area().size.height.as_int()); |
911 | |
912 | - for (auto screen : m_screenList) { |
913 | + Q_FOREACH (auto screen, m_screenList) { |
914 | if (dbGeom == screen->geometry()) { |
915 | screen->setMirDisplayBuffer(&buffer, &group); |
916 | break; |
917 | @@ -190,7 +190,7 @@ |
918 | }); |
919 | |
920 | qCDebug(QTMIR_SCREENS) << "======================================="; |
921 | - for (auto screen: m_screenList) { |
922 | + Q_FOREACH (auto screen, m_screenList) { |
923 | qCDebug(QTMIR_SCREENS) << screen << "- id:" << screen->m_outputId.as_value() |
924 | << "geometry:" << screen->geometry() |
925 | << "window:" << screen->window() |
926 | @@ -217,7 +217,7 @@ |
927 | |
928 | void ScreensModel::allWindowsSetExposed(bool exposed) |
929 | { |
930 | - for (const auto screen : m_screenList) { |
931 | + Q_FOREACH (const auto screen, m_screenList) { |
932 | const auto window = static_cast<ScreenWindow *>(screen->window()); |
933 | if (window && window->window()) { |
934 | window->setExposed(exposed); |
935 | @@ -240,7 +240,7 @@ |
936 | return nullptr; |
937 | } |
938 | |
939 | -QWindow* ScreensModel::getWindowForPoint(const QPoint &point) //FIXME - not thread safe & not efficient |
940 | +QWindow* ScreensModel::getWindowForPoint(QPoint point) //FIXME - not thread safe & not efficient |
941 | { |
942 | // This is a part optimization, and a part work-around for AP generated input events occasionally |
943 | // appearing outside the screen borders: https://bugs.launchpad.net/qtmir/+bug/1508415 |
944 | @@ -248,7 +248,7 @@ |
945 | return m_screenList.first()->window()->window(); |
946 | } |
947 | |
948 | - for (Screen *screen : m_screenList) { |
949 | + Q_FOREACH (Screen *screen, m_screenList) { |
950 | if (screen->window() && screen->geometry().contains(point)) { |
951 | return screen->window()->window(); |
952 | } |
953 | |
954 | === modified file 'src/platforms/mirserver/screensmodel.h' |
955 | --- src/platforms/mirserver/screensmodel.h 2016-04-29 15:41:00 +0000 |
956 | +++ src/platforms/mirserver/screensmodel.h 2016-08-08 15:09:02 +0000 |
957 | @@ -62,7 +62,7 @@ |
958 | QList<Screen*> screens() const { return m_screenList; } |
959 | bool compositing() const { return m_compositing; } |
960 | |
961 | - QWindow* getWindowForPoint(const QPoint &point); |
962 | + QWindow* getWindowForPoint(QPoint point); |
963 | |
964 | Q_SIGNALS: |
965 | void screenAdded(Screen *screen); |
966 | |
967 | === modified file 'src/platforms/mirserver/sessionlistener.cpp' |
968 | --- src/platforms/mirserver/sessionlistener.cpp 2016-03-10 11:55:28 +0000 |
969 | +++ src/platforms/mirserver/sessionlistener.cpp 2016-08-08 15:09:02 +0000 |
970 | @@ -90,7 +90,7 @@ |
971 | Q_EMIT sessionDestroyingSurface(&session, surface); |
972 | } |
973 | |
974 | -void SessionListener::surfaceAboutToBeCreated(mir::scene::Session& session, qtmir::CreationHints creationHints) |
975 | +void SessionListener::surfaceAboutToBeCreated(mir::scene::Session& session, const qtmir::CreationHints &creationHints) |
976 | { |
977 | m_creationHintsForNewSurface[&session] = creationHints; |
978 | } |
979 | |
980 | === modified file 'src/platforms/mirserver/sessionlistener.h' |
981 | --- src/platforms/mirserver/sessionlistener.h 2016-03-10 11:55:28 +0000 |
982 | +++ src/platforms/mirserver/sessionlistener.h 2016-08-08 15:09:02 +0000 |
983 | @@ -42,7 +42,7 @@ |
984 | void surface_created(mir::scene::Session&, std::shared_ptr<mir::scene::Surface> const&) override; |
985 | void destroying_surface(mir::scene::Session&, std::shared_ptr<mir::scene::Surface> const&) override; |
986 | |
987 | - void surfaceAboutToBeCreated(mir::scene::Session&, qtmir::CreationHints creationHints); |
988 | + void surfaceAboutToBeCreated(mir::scene::Session&, const qtmir::CreationHints &creationHints); |
989 | |
990 | Q_SIGNALS: |
991 | void sessionStarting(std::shared_ptr<mir::scene::Session> const& session); |
992 | |
993 | === modified file 'src/platforms/mirserver/surfaceobserver.cpp' |
994 | --- src/platforms/mirserver/surfaceobserver.cpp 2016-06-20 14:23:40 +0000 |
995 | +++ src/platforms/mirserver/surfaceobserver.cpp 2016-08-08 15:09:02 +0000 |
996 | @@ -28,6 +28,7 @@ |
997 | #include <mir/geometry/size.h> |
998 | #include <mir/shell/surface_specification.h> |
999 | |
1000 | + |
1001 | namespace { |
1002 | |
1003 | QRect calculateBoundingRect(const std::vector<mir::geometry::Rectangle> &rectVector) |
1004 | @@ -44,7 +45,7 @@ |
1005 | |
1006 | } // anonymous namespace |
1007 | |
1008 | -QMap<const mir::scene::Surface*, SurfaceObserver*> SurfaceObserver::m_surfaceToObserverMap; |
1009 | +QHash<const mir::scene::Surface*, SurfaceObserver*> SurfaceObserver::m_surfaceToObserverMap; |
1010 | QMutex SurfaceObserver::mutex; |
1011 | |
1012 | SurfaceObserver::SurfaceObserver() |
1013 | @@ -99,7 +100,7 @@ |
1014 | SurfaceObserver::~SurfaceObserver() |
1015 | { |
1016 | QMutexLocker locker(&mutex); |
1017 | - QMutableMapIterator<const mir::scene::Surface*, SurfaceObserver*> i(m_surfaceToObserverMap); |
1018 | + QMutableHashIterator<const mir::scene::Surface*, SurfaceObserver*> i(m_surfaceToObserverMap); |
1019 | while (i.hasNext()) { |
1020 | i.next(); |
1021 | if (i.value() == this) { |
1022 | |
1023 | === modified file 'src/platforms/mirserver/surfaceobserver.h' |
1024 | --- src/platforms/mirserver/surfaceobserver.h 2016-06-20 14:23:40 +0000 |
1025 | +++ src/platforms/mirserver/surfaceobserver.h 2016-08-08 15:09:02 +0000 |
1026 | @@ -31,7 +31,7 @@ |
1027 | class Surface; |
1028 | } |
1029 | namespace shell { |
1030 | - class SurfaceSpecification; |
1031 | + struct SurfaceSpecification; |
1032 | } |
1033 | } |
1034 | |
1035 | @@ -92,7 +92,7 @@ |
1036 | QObject *m_listener; |
1037 | bool m_framesPosted; |
1038 | QMap<QByteArray, Qt::CursorShape> m_cursorNameToShape; |
1039 | - static QMap<const mir::scene::Surface*, SurfaceObserver*> m_surfaceToObserverMap; |
1040 | + static QHash<const mir::scene::Surface*, SurfaceObserver*> m_surfaceToObserverMap; |
1041 | }; |
1042 | |
1043 | #endif |
1044 | |
1045 | === modified file 'tests/framework/fake_application_info.h' |
1046 | --- tests/framework/fake_application_info.h 2016-02-18 17:27:58 +0000 |
1047 | +++ tests/framework/fake_application_info.h 2016-08-08 15:09:02 +0000 |
1048 | @@ -23,6 +23,7 @@ |
1049 | |
1050 | class FakeApplicationInfo : public ApplicationInfo |
1051 | { |
1052 | + Q_OBJECT |
1053 | public: |
1054 | FakeApplicationInfo(const QString &appId); |
1055 | FakeApplicationInfo(); |
1056 | |
1057 | === modified file 'tests/framework/fake_mirsurface.h' |
1058 | --- tests/framework/fake_mirsurface.h 2016-07-05 12:41:04 +0000 |
1059 | +++ tests/framework/fake_mirsurface.h 2016-08-08 15:09:02 +0000 |
1060 | @@ -141,12 +141,12 @@ |
1061 | public Q_SLOTS: |
1062 | void onCompositorSwappedBuffers() override; |
1063 | |
1064 | - void setMinimumWidth(int) {} |
1065 | - void setMinimumHeight(int) {} |
1066 | - void setMaximumWidth(int) {} |
1067 | - void setMaximumHeight(int) {} |
1068 | - void setWidthIncrement(int) {} |
1069 | - void setHeightIncrement(int) {} |
1070 | + void setMinimumWidth(int) override {} |
1071 | + void setMinimumHeight(int) override {} |
1072 | + void setMaximumWidth(int) override {} |
1073 | + void setMaximumHeight(int) override {} |
1074 | + void setWidthIncrement(int) override {} |
1075 | + void setHeightIncrement(int) override {} |
1076 | void setShellChrome(Mir::ShellChrome) override {} |
1077 | |
1078 | //// |
1079 | |
1080 | === modified file 'tests/framework/fake_session.cpp' |
1081 | --- tests/framework/fake_session.cpp 2016-05-24 20:13:10 +0000 |
1082 | +++ tests/framework/fake_session.cpp 2016-08-08 15:09:02 +0000 |
1083 | @@ -92,14 +92,14 @@ |
1084 | |
1085 | void FakeSession::removeChildSession(SessionInterface *) {} |
1086 | |
1087 | -void FakeSession::foreachChildSession(std::function<void (SessionInterface *)>) const {} |
1088 | +void FakeSession::foreachChildSession(const std::function<void (SessionInterface *)> &) const {} |
1089 | |
1090 | std::shared_ptr<mir::scene::PromptSession> FakeSession::activePromptSession() const |
1091 | { |
1092 | return std::shared_ptr<mir::scene::PromptSession>(); |
1093 | } |
1094 | |
1095 | -void FakeSession::foreachPromptSession(std::function<void (const std::shared_ptr<mir::scene::PromptSession> &)>) const {} |
1096 | +void FakeSession::foreachPromptSession(const std::function<void (const std::shared_ptr<mir::scene::PromptSession> &)> &) const {} |
1097 | |
1098 | void FakeSession::setFullscreen(bool) {} |
1099 | |
1100 | |
1101 | === modified file 'tests/framework/fake_session.h' |
1102 | --- tests/framework/fake_session.h 2016-06-24 13:46:39 +0000 |
1103 | +++ tests/framework/fake_session.h 2016-08-08 15:09:02 +0000 |
1104 | @@ -67,10 +67,10 @@ |
1105 | void addChildSession(SessionInterface*) override; |
1106 | void insertChildSession(uint, SessionInterface*) override; |
1107 | void removeChildSession(SessionInterface*) override; |
1108 | - void foreachChildSession(std::function<void(SessionInterface* session)>) const override; |
1109 | + void foreachChildSession(const std::function<void(SessionInterface* session)> &) const override; |
1110 | |
1111 | std::shared_ptr<mir::scene::PromptSession> activePromptSession() const override; |
1112 | - void foreachPromptSession(std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)>) const override; |
1113 | + void foreachPromptSession(const std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> &) const override; |
1114 | |
1115 | void setFullscreen(bool) override; |
1116 | void setLive(const bool) override; |
1117 | |
1118 | === modified file 'tests/framework/mock_session.h' |
1119 | --- tests/framework/mock_session.h 2016-03-28 18:02:26 +0000 |
1120 | +++ tests/framework/mock_session.h 2016-08-08 15:09:02 +0000 |
1121 | @@ -57,10 +57,10 @@ |
1122 | MOCK_METHOD1(addChildSession, void(SessionInterface* session)); |
1123 | MOCK_METHOD2(insertChildSession, void(uint index, SessionInterface* session)); |
1124 | MOCK_METHOD1(removeChildSession, void(SessionInterface* session)); |
1125 | - MOCK_CONST_METHOD1(foreachChildSession, void(std::function<void(SessionInterface* session)> f)); |
1126 | + MOCK_CONST_METHOD1(foreachChildSession, void(const std::function<void(SessionInterface* session)> &f)); |
1127 | |
1128 | MOCK_CONST_METHOD0(activePromptSession, std::shared_ptr<mir::scene::PromptSession>()); |
1129 | - MOCK_CONST_METHOD1(foreachPromptSession, void(std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> f)); |
1130 | + MOCK_CONST_METHOD1(foreachPromptSession, void(const std::function<void(const std::shared_ptr<mir::scene::PromptSession>&)> &f)); |
1131 | |
1132 | void setState(State state); |
1133 | |
1134 | |
1135 | === modified file 'tests/mirserver/ScreensModel/stub_display.h' |
1136 | --- tests/mirserver/ScreensModel/stub_display.h 2015-12-02 12:27:00 +0000 |
1137 | +++ tests/mirserver/ScreensModel/stub_display.h 2016-08-08 15:09:02 +0000 |
1138 | @@ -58,7 +58,7 @@ |
1139 | { |
1140 | f(*buffer); |
1141 | } |
1142 | - std::chrono::milliseconds recommended_sleep() const |
1143 | + std::chrono::milliseconds recommended_sleep() const override |
1144 | { |
1145 | std::chrono::milliseconds one{1}; |
1146 | return one; |
FAILED: Continuous integration, rev:370 jenkins. qa.ubuntu. com/job/ qtmir-ci/ 404/ jenkins. qa.ubuntu. com/job/ qtmir-wily- amd64-ci/ 137/console jenkins. qa.ubuntu. com/job/ qtmir-wily- armhf-ci/ 137/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/qtmir- ci/404/ rebuild
http://