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

Proposed by Albert Astals Cid on 2015-11-23
Status: Merged
Approved by: Michał Sawicz on 2015-11-27
Approved revision: no longer in the source branch.
Merged at revision: 2064
Proposed branch: lp:~aacid/unity8/clazy_run
Merge into: lp:unity8
Prerequisite: lp:~dandrader/unity8/fallbackCursorNames
Diff against target: 701 lines (+124/-127)
26 files modified
libs/UbuntuGestures/Pool.h (+0/-8)
plugins/Cursor/CursorImageProvider.cpp (+64/-64)
plugins/Cursor/MousePointer.cpp (+2/-2)
plugins/Cursor/plugin.cpp (+1/-1)
plugins/Dash/horizontaljournal.cpp (+1/-1)
plugins/Dash/listviewwithpageheader.cpp (+3/-3)
plugins/Dash/organicgrid.cpp (+3/-3)
plugins/Dash/organicgrid.h (+2/-2)
plugins/Dash/verticaljournal.cpp (+6/-6)
plugins/Dash/verticaljournal.h (+1/-1)
plugins/GlobalShortcut/globalshortcutregistry.cpp (+1/-1)
plugins/IntegratedLightDM/liblightdm/Greeter.cpp (+1/-1)
plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.h (+1/-1)
plugins/Ubuntu/Gestures/Damper.h (+2/-2)
plugins/Ubuntu/Gestures/DirectionalDragArea.cpp (+3/-3)
plugins/Ubuntu/Gestures/DirectionalDragArea_p.h (+3/-3)
plugins/Unity/Launcher/asadapter.h (+3/-0)
plugins/Unity/Launcher/dbusinterface.cpp (+8/-7)
plugins/Unity/Platform/platform.cpp (+2/-2)
plugins/Utils/constants.cpp (+1/-1)
plugins/Utils/easingcurve.cpp (+1/-1)
plugins/Utils/easingcurve.h (+1/-1)
plugins/Utils/timezoneFormatter.cpp (+1/-1)
plugins/Utils/windowstatestorage.cpp (+5/-5)
plugins/Utils/windowstatestorage.h (+2/-2)
src/ShellApplication.cpp (+6/-5)
To merge this branch: bzr merge lp:~aacid/unity8/clazy_run
Reviewer Review Type Date Requested Status
Michał Sawicz Approve on 2015-11-27
Lukáš Tinkl (community) 2015-11-23 Needs Information on 2015-11-27
Michael Zanetti (community) Abstain on 2015-11-25
PS Jenkins bot continuous-integration 2015-11-23 Needs Fixing on 2015-11-23
Review via email: mp+278326@code.launchpad.net

This proposal supersedes a proposal from 2015-11-20.

Commit Message

clazy improvements

Pass small (<=16 bytes) and trivially-copyable[1] and trivially-destructible [2] type by value [3]
Don't call QList::operator[]() on temporary
Fix QString(const char*) being called
Use qEnvironmentVariableIsEmpty() instead of qgetenv().isEmpty()
Use the multiarg arg()
use Q_FOREACH for non const qt containers
delete copy constructor and assignment operator for non copyable class
remove assignment operator that does the same as the default one

[1] http://en.cppreference.com/w/cpp/concept/TriviallyCopyable
[2] http://www.cplusplus.com/reference/type_traits/is_trivially_destructible/
[3] http://www.macieira.org/blog/2012/02/the-value-of-passing-by-value/

Description of the Change

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

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

 * Did you make sure that your branch does not contain spurious tags?
Yes

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

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

To post a comment you must log in.
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2055
http://jenkins.qa.ubuntu.com/job/unity8-ci/6758/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/5296
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/173/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1471/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/173
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1365
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1366
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/172
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/172
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4201
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5316
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5316/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25335
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/45/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/173
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/173/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25336

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6758/rebuild

review: Needs Fixing (continuous-integration)
Lukáš Tinkl (lukas-kde) wrote : Posted in a previous version of this proposal

LGTM

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

Yes

* Did CI run pass? If not, please explain why.

Nope, not running :/

* Did you make sure that the branch does not contain spurious tags?

Yes

review: Approve
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:2055
http://jenkins.qa.ubuntu.com/job/unity8-ci/6766/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/5311
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/181/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1479
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/181
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1373
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1374
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/180
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/180
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4215
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5331
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5331/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25391
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/52/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/181
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/181/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25390

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6766/rebuild

review: Needs Fixing (continuous-integration)
Michael Zanetti (mzanetti) wrote :

Why is it removing the references on QRect arguments?

review: Needs Information
Michael Zanetti (mzanetti) wrote :

explained in the commit log...

review: Abstain
Albert Astals Cid (aacid) wrote :

> Why is it removing the references on QRect arguments?

Because it fits into the "Pass small (<=16 bytes) and trivially-copyable[1] and trivially-destructible [2] type by value [3]" clause. It's just faster to copy them than to ref them or so says thiago's blog.

lp:~aacid/unity8/clazy_run updated on 2015-11-26
2057. By Josh Arenson on 2015-11-26

Don't let IntegratedLightDM muck with the username Fixes: #1497081
Approved by: Lukáš Tinkl

2058. By Michael Zanetti on 2015-11-26

move screenshots out of the Dash dir

This was consuming 2.5 megs of installed size while they really are
only used for testing.
Approved by: Albert Astals Cid

2059. By Daniel d'Andrada on 2015-11-26

Don't stretch application surfaces when resizing Fixes: #1497083
Approved by: Michael Zanetti

2060. By Lukáš Tinkl on 2015-11-26

Implement new visuals for panel and window decorations Fixes: #1493066, #1497095, #1511020
Approved by: Daniel d'Andrada

2061. By Daniel d'Andrada on 2015-11-26

Mouse has to push against edges to show launcher or apps spread

edge-barrier-sensitivity is the property that should show up in the System Settings GUI.

edge-barrier-min-push and edge-barrier-max-push are exposed in GSettings merely as a convenience so you can tweak those values without having to restart unity8. But they should NOT show up in system settings. Fixes: #1510969
Approved by: Michael Zanetti

2062. By Daniel d'Andrada on 2015-11-26

DesktopStage: swiping from right edge shows window spread
Approved by: Lukáš Tinkl

2063. By Daniel d'Andrada on 2015-11-26

Cursor: Add more fallback names, a blank and custom cursor support
Approved by: Lukáš Tinkl

2064. By Albert Astals Cid on 2015-11-26

clazy improvements

Pass small (<=16 bytes) and trivially-copyable[1] and trivially-destructible [2] type by value [3]
Don't call QList::operator[]() on temporary
Fix QString(const char*) being called
Use qEnvironmentVariableIsEmpty() instead of qgetenv().isEmpty()
Use the multiarg arg()
use Q_FOREACH for non const qt containers
delete copy constructor and assignment operator for non copyable class
remove assignment operator that does the same as the default one

[1] http://en.cppreference.com/w/cpp/concept/TriviallyCopyable
[2] http://www.cplusplus.com/reference/type_traits/is_trivially_destructible/
[3] http://www.macieira.org/blog/2012/02/the-value-of-passing-by-value/

Lukáš Tinkl (lukas-kde) wrote :

One autopilot test failing: unity8.shell.tests.test_helpers.DashHelperTestCase.test_search(Aquaris E4.5 Ubuntu Edition) https://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4215/

review: Needs Information
Albert Astals Cid (aacid) wrote :

> One autopilot test failing:
> unity8.shell.tests.test_helpers.DashHelperTestCase.test_search(Aquaris E4.5
> Ubuntu Edition) https://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-
> runner-vivid-touch/4215/

It's randomly happening in various MR's see https://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4248/ of https://code.launchpad.net/~aacid/unity8/unfavorite_scope_test/+merge/277157 for example.

Don't think it's this MR fault, I investigated/tried to reproduce yesterday and could not get it to happen.

Michał Sawicz (saviq) wrote :

Approving as per superseded.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libs/UbuntuGestures/Pool.h'
2--- libs/UbuntuGestures/Pool.h 2014-10-22 20:04:57 +0000
3+++ libs/UbuntuGestures/Pool.h 2015-11-23 14:34:56 +0000
4@@ -60,14 +60,6 @@
5 ItemType &operator*() const { return *item; }
6 ItemType &value() const { return *item; }
7
8- Iterator &operator= (const Iterator& other) {
9- index = other.index;
10- item = other.item;
11-
12- // by convention, always return *this
13- return *this;
14- }
15-
16 operator bool() const { return item != nullptr; }
17
18 int index;
19
20=== modified file 'plugins/Cursor/CursorImageProvider.cpp'
21--- plugins/Cursor/CursorImageProvider.cpp 2015-11-23 14:34:56 +0000
22+++ plugins/Cursor/CursorImageProvider.cpp 2015-11-23 14:34:56 +0000
23@@ -113,67 +113,67 @@
24 }
25 m_instance = this;
26
27- m_fallbackNames[QLatin1String("closedhand")].append(QLatin1String("grabbing"));
28- m_fallbackNames[QLatin1String("closedhand")].append(QLatin1String("dnd-none"));
29-
30- m_fallbackNames[QLatin1String("dnd-copy")].append(QLatin1String("dnd-none"));
31- m_fallbackNames[QLatin1String("dnd-copy")].append(QLatin1String("grabbing"));
32- m_fallbackNames[QLatin1String("dnd-copy")].append(QLatin1String("closedhand"));
33-
34- m_fallbackNames[QLatin1String("dnd-move")].append(QLatin1String("dnd-none"));
35- m_fallbackNames[QLatin1String("dnd-move")].append(QLatin1String("grabbing"));
36- m_fallbackNames[QLatin1String("dnd-move")].append(QLatin1String("closedhand"));
37-
38- m_fallbackNames[QLatin1String("dnd-link")].append(QLatin1String("dnd-none"));
39- m_fallbackNames[QLatin1String("dnd-link")].append(QLatin1String("grabbing"));
40- m_fallbackNames[QLatin1String("dnd-link")].append(QLatin1String("closedhand"));
41-
42- m_fallbackNames[QLatin1String("forbidden")].append(QLatin1String("crossed_circle")); // DMZ-White and DMZ-Black themes
43- m_fallbackNames[QLatin1String("forbidden")].append(QLatin1String("not-allowed"));
44- m_fallbackNames[QLatin1String("forbidden")].append(QLatin1String("circle"));
45-
46- m_fallbackNames[QLatin1String("hand")].append(QLatin1String("pointing_hand"));
47- m_fallbackNames[QLatin1String("hand")].append(QLatin1String("pointer"));
48-
49- m_fallbackNames[QLatin1String("ibeam")].append(QLatin1String("xterm"));
50- m_fallbackNames[QLatin1String("ibeam")].append(QLatin1String("text"));
51-
52- m_fallbackNames[QLatin1String("left_ptr")].append(QLatin1String("default"));
53- m_fallbackNames[QLatin1String("left_ptr")].append(QLatin1String("top_left_arrow"));
54- m_fallbackNames[QLatin1String("left_ptr")].append(QLatin1String("left_arrow"));
55-
56- m_fallbackNames[QLatin1String("left_ptr_watch")].append(QLatin1String("half-busy"));
57- m_fallbackNames[QLatin1String("left_ptr_watch")].append(QLatin1String("progress"));
58-
59- m_fallbackNames[QLatin1String("size_bdiag")].append(QLatin1String("fd_double_arrow"));
60- m_fallbackNames[QLatin1String("size_bdiag")].append(QLatin1String("nesw-resize"));
61-
62- m_fallbackNames[QLatin1String("size_fdiag")].append(QLatin1String("bd_double_arrow")); // DMZ-White and DMZ-Black themes
63- m_fallbackNames[QLatin1String("size_fdiag")].append(QLatin1String("nwse-resize"));
64-
65- m_fallbackNames[QLatin1String("size_hor")].append(QLatin1String("sb_h_double_arrow")); // DMZ-White and DMZ-Black themes
66- m_fallbackNames[QLatin1String("size_hor")].append(QLatin1String("ew-resize"));
67- m_fallbackNames[QLatin1String("size_hor")].append(QLatin1String("h_double_arrow"));
68-
69- m_fallbackNames[QLatin1String("size_ver")].append(QLatin1String("sb_v_double_arrow")); // DMZ-White and DMZ-Black themes
70- m_fallbackNames[QLatin1String("size_ver")].append(QLatin1String("ns-resize"));
71- m_fallbackNames[QLatin1String("size_ver")].append(QLatin1String("v_double_arrow"));
72-
73- m_fallbackNames[QLatin1String("split_h")].append(QLatin1String("sb_h_double_arrow")); // DMZ-White and DMZ-Black themes
74- m_fallbackNames[QLatin1String("split_h")].append(QLatin1String("col-resize"));
75-
76- m_fallbackNames[QLatin1String("split_v")].append(QLatin1String("sb_v_double_arrow")); // DMZ-White and DMZ-Black themes
77- m_fallbackNames[QLatin1String("split_v")].append(QLatin1String("row-resize"));
78-
79- m_fallbackNames[QLatin1String("up_arrow")].append(QLatin1String("sb_up_arrow")); // DMZ-White and DMZ-Black themes
80-
81- m_fallbackNames[QLatin1String("watch")].append(QLatin1String("wait"));
82-
83- m_fallbackNames[QLatin1String("whats_this")].append(QLatin1String("left_ptr_help"));
84- m_fallbackNames[QLatin1String("whats_this")].append(QLatin1String("help"));
85- m_fallbackNames[QLatin1String("whats_this")].append(QLatin1String("question_arrow"));
86-
87- m_fallbackNames[QLatin1String("xterm")].append(QLatin1String("ibeam"));
88+ m_fallbackNames[QStringLiteral("closedhand")].append(QStringLiteral("grabbing"));
89+ m_fallbackNames[QStringLiteral("closedhand")].append(QStringLiteral("dnd-none"));
90+
91+ m_fallbackNames[QStringLiteral("dnd-copy")].append(QStringLiteral("dnd-none"));
92+ m_fallbackNames[QStringLiteral("dnd-copy")].append(QStringLiteral("grabbing"));
93+ m_fallbackNames[QStringLiteral("dnd-copy")].append(QStringLiteral("closedhand"));
94+
95+ m_fallbackNames[QStringLiteral("dnd-move")].append(QStringLiteral("dnd-none"));
96+ m_fallbackNames[QStringLiteral("dnd-move")].append(QStringLiteral("grabbing"));
97+ m_fallbackNames[QStringLiteral("dnd-move")].append(QStringLiteral("closedhand"));
98+
99+ m_fallbackNames[QStringLiteral("dnd-link")].append(QStringLiteral("dnd-none"));
100+ m_fallbackNames[QStringLiteral("dnd-link")].append(QStringLiteral("grabbing"));
101+ m_fallbackNames[QStringLiteral("dnd-link")].append(QStringLiteral("closedhand"));
102+
103+ m_fallbackNames[QStringLiteral("forbidden")].append(QStringLiteral("crossed_circle")); // DMZ-White and DMZ-Black themes
104+ m_fallbackNames[QStringLiteral("forbidden")].append(QStringLiteral("not-allowed"));
105+ m_fallbackNames[QStringLiteral("forbidden")].append(QStringLiteral("circle"));
106+
107+ m_fallbackNames[QStringLiteral("hand")].append(QStringLiteral("pointing_hand"));
108+ m_fallbackNames[QStringLiteral("hand")].append(QStringLiteral("pointer"));
109+
110+ m_fallbackNames[QStringLiteral("ibeam")].append(QStringLiteral("xterm"));
111+ m_fallbackNames[QStringLiteral("ibeam")].append(QStringLiteral("text"));
112+
113+ m_fallbackNames[QStringLiteral("left_ptr")].append(QStringLiteral("default"));
114+ m_fallbackNames[QStringLiteral("left_ptr")].append(QStringLiteral("top_left_arrow"));
115+ m_fallbackNames[QStringLiteral("left_ptr")].append(QStringLiteral("left_arrow"));
116+
117+ m_fallbackNames[QStringLiteral("left_ptr_watch")].append(QStringLiteral("half-busy"));
118+ m_fallbackNames[QStringLiteral("left_ptr_watch")].append(QStringLiteral("progress"));
119+
120+ m_fallbackNames[QStringLiteral("size_bdiag")].append(QStringLiteral("fd_double_arrow"));
121+ m_fallbackNames[QStringLiteral("size_bdiag")].append(QStringLiteral("nesw-resize"));
122+
123+ m_fallbackNames[QStringLiteral("size_fdiag")].append(QStringLiteral("bd_double_arrow")); // DMZ-White and DMZ-Black themes
124+ m_fallbackNames[QStringLiteral("size_fdiag")].append(QStringLiteral("nwse-resize"));
125+
126+ m_fallbackNames[QStringLiteral("size_hor")].append(QStringLiteral("sb_h_double_arrow")); // DMZ-White and DMZ-Black themes
127+ m_fallbackNames[QStringLiteral("size_hor")].append(QStringLiteral("ew-resize"));
128+ m_fallbackNames[QStringLiteral("size_hor")].append(QStringLiteral("h_double_arrow"));
129+
130+ m_fallbackNames[QStringLiteral("size_ver")].append(QStringLiteral("sb_v_double_arrow")); // DMZ-White and DMZ-Black themes
131+ m_fallbackNames[QStringLiteral("size_ver")].append(QStringLiteral("ns-resize"));
132+ m_fallbackNames[QStringLiteral("size_ver")].append(QStringLiteral("v_double_arrow"));
133+
134+ m_fallbackNames[QStringLiteral("split_h")].append(QStringLiteral("sb_h_double_arrow")); // DMZ-White and DMZ-Black themes
135+ m_fallbackNames[QStringLiteral("split_h")].append(QStringLiteral("col-resize"));
136+
137+ m_fallbackNames[QStringLiteral("split_v")].append(QStringLiteral("sb_v_double_arrow")); // DMZ-White and DMZ-Black themes
138+ m_fallbackNames[QStringLiteral("split_v")].append(QStringLiteral("row-resize"));
139+
140+ m_fallbackNames[QStringLiteral("up_arrow")].append(QStringLiteral("sb_up_arrow")); // DMZ-White and DMZ-Black themes
141+
142+ m_fallbackNames[QStringLiteral("watch")].append(QStringLiteral("wait"));
143+
144+ m_fallbackNames[QStringLiteral("whats_this")].append(QStringLiteral("left_ptr_help"));
145+ m_fallbackNames[QStringLiteral("whats_this")].append(QStringLiteral("help"));
146+ m_fallbackNames[QStringLiteral("whats_this")].append(QStringLiteral("question_arrow"));
147+
148+ m_fallbackNames[QStringLiteral("xterm")].append(QStringLiteral("ibeam"));
149 }
150
151 CursorImageProvider::~CursorImageProvider()
152@@ -217,7 +217,7 @@
153 QString themeName;
154 QString cursorName;
155 {
156- QStringList themeAndNameList = cursorThemeAndName.split("/");
157+ QStringList themeAndNameList = cursorThemeAndName.split('/');
158 if (themeAndNameList.size() != 2) {
159 return nullptr;
160 }
161@@ -246,10 +246,10 @@
162 }
163
164 // if it all fails, there must be at least a left_ptr
165- if (cursorImage->qimage.isNull() && cursorName != "left_ptr") {
166+ if (cursorImage->qimage.isNull() && cursorName != QLatin1String("left_ptr")) {
167 qDebug() << "CursorImageProvider:" << cursorName
168 << "not found (nor its fallbacks, if any). Going for \"left_ptr\" as a last resort.";
169- cursorImage = fetchCursorHelper(themeName, "left_ptr");
170+ cursorImage = fetchCursorHelper(themeName, QStringLiteral("left_ptr"));
171 }
172
173 if (cursorImage->qimage.isNull()) {
174
175=== modified file 'plugins/Cursor/MousePointer.cpp'
176--- plugins/Cursor/MousePointer.cpp 2015-11-23 14:34:56 +0000
177+++ plugins/Cursor/MousePointer.cpp 2015-11-23 14:34:56 +0000
178@@ -27,8 +27,8 @@
179
180 MousePointer::MousePointer(QQuickItem *parent)
181 : MirMousePointerInterface(parent)
182- , m_cursorName("left_ptr")
183- , m_themeName("default")
184+ , m_cursorName(QStringLiteral("left_ptr"))
185+ , m_themeName(QStringLiteral("default"))
186 , m_hotspotX(0)
187 , m_hotspotY(0)
188 {
189
190=== modified file 'plugins/Cursor/plugin.cpp'
191--- plugins/Cursor/plugin.cpp 2015-09-29 13:45:05 +0000
192+++ plugins/Cursor/plugin.cpp 2015-11-23 14:34:56 +0000
193@@ -35,5 +35,5 @@
194 {
195 QQmlExtensionPlugin::initializeEngine(engine, uri);
196
197- engine->addImageProvider(QLatin1String("cursor"), new CursorImageProvider());
198+ engine->addImageProvider(QStringLiteral("cursor"), new CursorImageProvider());
199 }
200
201=== modified file 'plugins/Dash/horizontaljournal.cpp'
202--- plugins/Dash/horizontaljournal.cpp 2015-11-12 20:40:56 +0000
203+++ plugins/Dash/horizontaljournal.cpp 2015-11-23 14:34:56 +0000
204@@ -184,7 +184,7 @@
205
206 void HorizontalJournal::processModelRemoves(const QVector<QQmlChangeSet::Change> &removes)
207 {
208- Q_FOREACH(const QQmlChangeSet::Change &remove, removes) {
209+ Q_FOREACH(const QQmlChangeSet::Change remove, removes) {
210 for (int i = remove.count - 1; i >= 0; --i) {
211 const int indexToRemove = remove.index + i;
212 // We only support removing from the end so
213
214=== modified file 'plugins/Dash/listviewwithpageheader.cpp'
215--- plugins/Dash/listviewwithpageheader.cpp 2015-09-14 09:11:08 +0000
216+++ plugins/Dash/listviewwithpageheader.cpp 2015-11-23 14:34:56 +0000
217@@ -941,7 +941,7 @@
218 // qDebug() << "ListViewWithPageHeader::onModelUpdated" << changeSet << reset;
219 const auto oldFirstVisibleIndex = m_firstVisibleIndex;
220
221- Q_FOREACH(const QQmlChangeSet::Change &remove, changeSet.removes()) {
222+ Q_FOREACH(const QQmlChangeSet::Change remove, changeSet.removes()) {
223 // qDebug() << "ListViewWithPageHeader::onModelUpdated Remove" << remove.index << remove.count;
224 if (remove.index + remove.count > m_firstVisibleIndex && remove.index < m_firstVisibleIndex + m_visibleItems.count()) {
225 const qreal oldFirstValidIndexPos = m_visibleItems.first()->y();
226@@ -994,7 +994,7 @@
227 }
228 }
229
230- Q_FOREACH(const QQmlChangeSet::Change &insert, changeSet.inserts()) {
231+ Q_FOREACH(const QQmlChangeSet::Change insert, changeSet.inserts()) {
232 // qDebug() << "ListViewWithPageHeader::onModelUpdated Insert" << insert.index << insert.count;
233 const bool insertingInValidIndexes = insert.index > m_firstVisibleIndex && insert.index < m_firstVisibleIndex + m_visibleItems.count();
234 const bool firstItemWithViewOnTop = insert.index == 0 && m_firstVisibleIndex == 0 && m_visibleItems.first()->y() + m_clipItem->y() > contentY();
235@@ -1052,7 +1052,7 @@
236 }
237 }
238
239- Q_FOREACH(const QQmlChangeSet::Change &change, changeSet.changes()) {
240+ Q_FOREACH(const QQmlChangeSet::Change change, changeSet.changes()) {
241 // qDebug() << "ListViewWithPageHeader::onModelUpdated Change" << change.index << change.count;
242 for (int i = change.index; i < change.count; ++i) {
243 ListItem *item = itemAtIndex(i);
244
245=== modified file 'plugins/Dash/organicgrid.cpp'
246--- plugins/Dash/organicgrid.cpp 2015-11-12 20:40:56 +0000
247+++ plugins/Dash/organicgrid.cpp 2015-11-23 14:34:56 +0000
248@@ -32,7 +32,7 @@
249 return m_smallDelegateSize;
250 }
251
252-void OrganicGrid::setSmallDelegateSize(const QSizeF &size)
253+void OrganicGrid::setSmallDelegateSize(const QSizeF size)
254 {
255 if (m_smallDelegateSize != size) {
256 m_smallDelegateSize = size;
257@@ -49,7 +49,7 @@
258 return m_bigDelegateSize;
259 }
260
261-void OrganicGrid::setBigDelegateSize(const QSizeF &size)
262+void OrganicGrid::setBigDelegateSize(const QSizeF size)
263 {
264 if (m_bigDelegateSize != size) {
265 m_bigDelegateSize = size;
266@@ -237,7 +237,7 @@
267
268 void OrganicGrid::processModelRemoves(const QVector<QQmlChangeSet::Change> &removes)
269 {
270- Q_FOREACH(const QQmlChangeSet::Change &remove, removes) {
271+ Q_FOREACH(const QQmlChangeSet::Change remove, removes) {
272 for (int i = remove.count - 1; i >= 0; --i) {
273 const int indexToRemove = remove.index + i;
274 // We only support removing from the end
275
276=== modified file 'plugins/Dash/organicgrid.h'
277--- plugins/Dash/organicgrid.h 2015-07-15 15:07:19 +0000
278+++ plugins/Dash/organicgrid.h 2015-11-23 14:34:56 +0000
279@@ -59,10 +59,10 @@
280 OrganicGrid();
281
282 QSizeF smallDelegateSize() const;
283- void setSmallDelegateSize(const QSizeF &size);
284+ void setSmallDelegateSize(const QSizeF size);
285
286 QSizeF bigDelegateSize() const;
287- void setBigDelegateSize(const QSizeF &size);
288+ void setBigDelegateSize(const QSizeF size);
289
290 Q_SIGNALS:
291 void smallDelegateSizeChanged();
292
293=== modified file 'plugins/Dash/verticaljournal.cpp'
294--- plugins/Dash/verticaljournal.cpp 2015-11-12 20:40:56 +0000
295+++ plugins/Dash/verticaljournal.cpp 2015-11-23 14:34:56 +0000
296@@ -50,7 +50,7 @@
297
298 if (isComponentComplete()) {
299 Q_FOREACH(const auto &column, m_columnVisibleItems) {
300- Q_FOREACH(const ViewItem &item, column) {
301+ Q_FOREACH(const ViewItem item, column) {
302 item.m_item->setWidth(columnWidth);
303 }
304 }
305@@ -172,7 +172,7 @@
306 // Cleanup the existing items
307 for (int i = 0; i < m_columnVisibleItems.count(); ++i) {
308 QList<ViewItem> &column = m_columnVisibleItems[i];
309- Q_FOREACH(const ViewItem &item, column)
310+ Q_FOREACH(const ViewItem item, column)
311 releaseItem(item.m_item);
312 column.clear();
313 }
314@@ -218,10 +218,10 @@
315
316 if (!allItems.isEmpty()) {
317 if (allItems.first().m_modelIndex == 0) {
318- Q_FOREACH(const ViewItem &item, allItems)
319+ Q_FOREACH(const ViewItem item, allItems)
320 addItemToView(item.m_modelIndex, item.m_item);
321 } else {
322- Q_FOREACH(const ViewItem &item, allItems)
323+ Q_FOREACH(const ViewItem item, allItems)
324 releaseItem(item.m_item);
325 }
326 }
327@@ -230,7 +230,7 @@
328 void VerticalJournal::updateItemCulling(qreal visibleFromY, qreal visibleToY)
329 {
330 Q_FOREACH(const auto &column, m_columnVisibleItems) {
331- Q_FOREACH(const ViewItem &item, column) {
332+ Q_FOREACH(const ViewItem item, column) {
333 const bool cull = item.y() + item.height() <= visibleFromY || item.y() >= visibleToY;
334 QQuickItemPrivate::get(item.m_item)->setCulled(cull);
335 }
336@@ -239,7 +239,7 @@
337
338 void VerticalJournal::processModelRemoves(const QVector<QQmlChangeSet::Change> &removes)
339 {
340- Q_FOREACH(const QQmlChangeSet::Change &remove, removes) {
341+ Q_FOREACH(const QQmlChangeSet::Change remove, removes) {
342 for (int i = remove.count - 1; i >= 0; --i) {
343 const int indexToRemove = remove.index + i;
344 // Since we only support removing from the end, indexToRemove
345
346=== modified file 'plugins/Dash/verticaljournal.h'
347--- plugins/Dash/verticaljournal.h 2015-07-15 15:07:19 +0000
348+++ plugins/Dash/verticaljournal.h 2015-11-23 14:34:56 +0000
349@@ -76,7 +76,7 @@
350 qreal x() const { return m_item->x(); }
351 qreal y() const { return m_item->y(); }
352 qreal height() const { return m_item->height(); }
353- bool operator<(const ViewItem &v) const { return m_modelIndex < v.m_modelIndex; }
354+ bool operator<(const ViewItem v) const { return m_modelIndex < v.m_modelIndex; }
355
356 QQuickItem *m_item;
357 int m_modelIndex;
358
359=== modified file 'plugins/GlobalShortcut/globalshortcutregistry.cpp'
360--- plugins/GlobalShortcut/globalshortcutregistry.cpp 2015-08-25 11:05:38 +0000
361+++ plugins/GlobalShortcut/globalshortcutregistry.cpp 2015-11-23 14:34:56 +0000
362@@ -104,7 +104,7 @@
363 s_windowId = 0;
364 }
365
366- for(QWindow *window: qApp->allWindows()) {
367+ Q_FOREACH(QWindow *window, qApp->allWindows()) {
368 if (window && window->winId() == wid) {
369 m_filteredWindow = window;
370 window->installEventFilter(this);
371
372=== modified file 'plugins/IntegratedLightDM/liblightdm/Greeter.cpp'
373--- plugins/IntegratedLightDM/liblightdm/Greeter.cpp 2015-09-14 09:11:08 +0000
374+++ plugins/IntegratedLightDM/liblightdm/Greeter.cpp 2015-11-23 14:34:56 +0000
375@@ -173,7 +173,7 @@
376
377 void Greeter::sendAuthenticationComplete()
378 {
379- if (qgetenv("UNITY_TESTING").isEmpty()) {
380+ if (qEnvironmentVariableIsEmpty("UNITY_TESTING")) {
381 // simulate PAM's delay
382 QTimer::singleShot(1000, this, &Greeter::authenticationComplete);
383 } else {
384
385=== modified file 'plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.h'
386--- plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.h 2013-08-12 08:01:08 +0000
387+++ plugins/Ubuntu/DownloadDaemonListener/DownloadTracker.h 2015-11-23 14:34:56 +0000
388@@ -48,7 +48,7 @@
389 Q_SIGNALS:
390 void serviceChanged(const QString &service);
391 void dbusPathChanged(const QString &dbusPath);
392- void serviceReadyChanged(const bool &serviceReady);
393+ void serviceReadyChanged(const bool serviceReady);
394
395 void canceled(bool success);
396 void error(const QString &error);
397
398=== modified file 'plugins/Ubuntu/Gestures/Damper.h'
399--- plugins/Ubuntu/Gestures/Damper.h 2015-04-10 21:16:37 +0000
400+++ plugins/Ubuntu/Gestures/Damper.h 2015-11-23 14:34:56 +0000
401@@ -67,12 +67,12 @@
402
403 qreal maxDelta() const { return m_x.maxDelta(); }
404
405- void reset(const QPointF &point) {
406+ void reset(const QPointF point) {
407 m_x.reset(point.x());
408 m_y.reset(point.y());
409 }
410
411- void update(const QPointF &point) {
412+ void update(const QPointF point) {
413 m_x.update(point.x());
414 m_y.update(point.y());
415 }
416
417=== modified file 'plugins/Ubuntu/Gestures/DirectionalDragArea.cpp'
418--- plugins/Ubuntu/Gestures/DirectionalDragArea.cpp 2015-05-18 23:04:12 +0000
419+++ plugins/Ubuntu/Gestures/DirectionalDragArea.cpp 2015-11-23 14:34:56 +0000
420@@ -614,7 +614,7 @@
421 }
422 }
423
424-void DirectionalDragAreaPrivate::setPublicPos(const QPointF &point)
425+void DirectionalDragAreaPrivate::setPublicPos(const QPointF point)
426 {
427 bool xChanged = publicPos.x() != point.x();
428 bool yChanged = publicPos.y() != point.y();
429@@ -653,7 +653,7 @@
430 }
431 }
432
433-void DirectionalDragAreaPrivate::setPublicScenePos(const QPointF &point)
434+void DirectionalDragAreaPrivate::setPublicScenePos(const QPointF point)
435 {
436 bool xChanged = publicScenePos.x() != point.x();
437 bool yChanged = publicScenePos.y() != point.y();
438@@ -863,7 +863,7 @@
439 sceneDirectionVector = sceneDirection - sceneOrigin;
440 }
441
442-qreal DirectionalDragAreaPrivate::projectOntoDirectionVector(const QPointF &sceneVector) const
443+qreal DirectionalDragAreaPrivate::projectOntoDirectionVector(const QPointF sceneVector) const
444 {
445 // same as dot product as sceneDirectionVector is a unit vector
446 return sceneVector.x() * sceneDirectionVector.x() +
447
448=== modified file 'plugins/Ubuntu/Gestures/DirectionalDragArea_p.h'
449--- plugins/Ubuntu/Gestures/DirectionalDragArea_p.h 2015-04-10 21:16:37 +0000
450+++ plugins/Ubuntu/Gestures/DirectionalDragArea_p.h 2015-11-23 14:34:56 +0000
451@@ -84,13 +84,13 @@
452 bool isPastMaxDistance() const;
453 const QTouchEvent::TouchPoint *fetchTargetTouchPoint(QTouchEvent *event);
454 void setStatus(Status newStatus);
455- void setPublicPos(const QPointF &point);
456- void setPublicScenePos(const QPointF &point);
457+ void setPublicPos(const QPointF point);
458+ void setPublicScenePos(const QPointF point);
459 bool isWithinTouchCompositionWindow();
460 void updateSceneDirectionVector();
461 // returns the scalar projection between the given vector (in scene coordinates)
462 // and m_sceneDirectionVector
463- qreal projectOntoDirectionVector(const QPointF &sceneVector) const;
464+ qreal projectOntoDirectionVector(const QPointF sceneVector) const;
465 void touchOwnershipEvent(TouchOwnershipEvent *event);
466 void unownedTouchEvent(UnownedTouchEvent *event);
467 void unownedTouchEvent_undecided(UnownedTouchEvent *unownedTouchEvent);
468
469=== modified file 'plugins/Unity/Launcher/asadapter.h'
470--- plugins/Unity/Launcher/asadapter.h 2015-07-07 13:18:04 +0000
471+++ plugins/Unity/Launcher/asadapter.h 2015-11-23 14:34:56 +0000
472@@ -28,6 +28,9 @@
473 ASAdapter();
474 ~ASAdapter();
475
476+ ASAdapter(const ASAdapter&) = delete;
477+ ASAdapter& operator=(const ASAdapter&) = delete;
478+
479 void syncItems(const QList<LauncherItem*> &list);
480
481 private:
482
483=== modified file 'plugins/Unity/Launcher/dbusinterface.cpp'
484--- plugins/Unity/Launcher/dbusinterface.cpp 2015-09-14 09:11:08 +0000
485+++ plugins/Unity/Launcher/dbusinterface.cpp 2015-11-23 14:34:56 +0000
486@@ -159,11 +159,12 @@
487 return false;
488 }
489
490- if (message.member() == QLatin1String("Get") && (message.arguments().count() != 2 || message.arguments()[0].toString() != QLatin1String("com.canonical.Unity.Launcher.Item"))) {
491+ const QList<QVariant> messageArguments = message.arguments();
492+ if (message.member() == QLatin1String("Get") && (messageArguments.count() != 2 || messageArguments[0].toString() != QLatin1String("com.canonical.Unity.Launcher.Item"))) {
493 return false;
494 }
495
496- if (message.member() == QLatin1String("Set") && (message.arguments().count() != 3 || message.arguments()[0].toString() != QLatin1String("com.canonical.Unity.Launcher.Item"))) {
497+ if (message.member() == QLatin1String("Set") && (messageArguments.count() != 3 || messageArguments[0].toString() != QLatin1String("com.canonical.Unity.Launcher.Item"))) {
498 return false;
499 }
500
501@@ -176,7 +177,7 @@
502
503 QVariantList retval;
504 if (message.member() == QLatin1String("Get")) {
505- QString cachedString = message.arguments()[1].toString();
506+ QString cachedString = messageArguments[1].toString();
507 if (!item) {
508 return false;
509 }
510@@ -188,21 +189,21 @@
511 retval.append(QVariant::fromValue(QDBusVariant(item->progress())));
512 }
513 } else if (message.member() == QLatin1String("Set")) {
514- QString cachedString = message.arguments()[1].toString();
515+ QString cachedString = messageArguments[1].toString();
516 if (cachedString == QLatin1String("count")) {
517- int newCount = message.arguments()[2].value<QDBusVariant>().variant().toInt();
518+ int newCount = messageArguments[2].value<QDBusVariant>().variant().toInt();
519 if (!item || newCount != item->count()) {
520 Q_EMIT countChanged(appid, newCount);
521 notifyPropertyChanged(QStringLiteral("com.canonical.Unity.Launcher.Item"), encodeAppId(appid), QStringLiteral("count"), QVariant(newCount));
522 }
523 } else if (cachedString == QLatin1String("countVisible")) {
524- bool newVisible = message.arguments()[2].value<QDBusVariant>().variant().toBool();
525+ bool newVisible = messageArguments[2].value<QDBusVariant>().variant().toBool();
526 if (!item || newVisible != item->countVisible()) {
527 Q_EMIT countVisibleChanged(appid, newVisible);
528 notifyPropertyChanged(QStringLiteral("com.canonical.Unity.Launcher.Item"), encodeAppId(appid), QStringLiteral("countVisible"), newVisible);
529 }
530 } else if (cachedString == QLatin1String("progress")) {
531- int newProgress = message.arguments()[2].value<QDBusVariant>().variant().toInt();
532+ int newProgress = messageArguments[2].value<QDBusVariant>().variant().toInt();
533 if (!item || newProgress != item->progress()) {
534 Q_EMIT progressChanged(appid, newProgress);
535 notifyPropertyChanged(QStringLiteral("com.canonical.Unity.Launcher.Item"), encodeAppId(appid), QStringLiteral("progress"), QVariant(newProgress));
536
537=== modified file 'plugins/Unity/Platform/platform.cpp'
538--- plugins/Unity/Platform/platform.cpp 2015-10-09 12:36:14 +0000
539+++ plugins/Unity/Platform/platform.cpp 2015-11-23 14:34:56 +0000
540@@ -20,7 +20,7 @@
541
542 Platform::Platform(QObject *parent)
543 : QObject(parent)
544- , m_iface("org.freedesktop.hostname1", "/org/freedesktop/hostname1", "org.freedesktop.hostname1",
545+ , m_iface(QStringLiteral("org.freedesktop.hostname1"), QStringLiteral("/org/freedesktop/hostname1"), QStringLiteral("org.freedesktop.hostname1"),
546 QDBusConnection::systemBus(), this)
547 {
548 QMetaObject::invokeMethod(this, "init");
549@@ -29,7 +29,7 @@
550 void Platform::init()
551 {
552 m_chassis = m_iface.property("Chassis").toString();
553- m_isPC = (m_chassis == "desktop" || m_chassis == "laptop" || m_chassis == "server");
554+ m_isPC = (m_chassis == QLatin1String("desktop") || m_chassis == QLatin1String("laptop") || m_chassis == QLatin1String("server"));
555 }
556
557 QString Platform::chassis() const
558
559=== modified file 'plugins/Utils/constants.cpp'
560--- plugins/Utils/constants.cpp 2015-03-11 08:07:31 +0000
561+++ plugins/Utils/constants.cpp 2015-11-23 14:34:56 +0000
562@@ -19,7 +19,7 @@
563 Constants::Constants(QObject *parent)
564 : QObject(parent)
565 {
566- if (qgetenv("QT_LOAD_TESTABILITY").isEmpty()) {
567+ if (qEnvironmentVariableIsEmpty("QT_LOAD_TESTABILITY")) {
568 m_indicatorValueTimeout = 30000;
569 } else {
570 m_indicatorValueTimeout = 5000;
571
572=== modified file 'plugins/Utils/easingcurve.cpp'
573--- plugins/Utils/easingcurve.cpp 2014-07-08 18:55:25 +0000
574+++ plugins/Utils/easingcurve.cpp 2015-11-23 14:34:56 +0000
575@@ -32,7 +32,7 @@
576 return m_easingCurve.type();
577 }
578
579-void EasingCurve::setType(const QEasingCurve::Type &type)
580+void EasingCurve::setType(const QEasingCurve::Type type)
581 {
582 // FIXME: Working around bug https://bugreports.qt-project.org/browse/QTBUG-38686 here
583 QEasingCurve newCurve;
584
585=== modified file 'plugins/Utils/easingcurve.h'
586--- plugins/Utils/easingcurve.h 2015-08-24 15:39:53 +0000
587+++ plugins/Utils/easingcurve.h 2015-11-23 14:34:56 +0000
588@@ -46,7 +46,7 @@
589 EasingCurve(QObject *parent = 0);
590
591 QEasingCurve::Type type() const;
592- void setType(const QEasingCurve::Type &type);
593+ void setType(const QEasingCurve::Type type);
594
595 qreal period() const;
596 void setPeriod(qreal period);
597
598=== modified file 'plugins/Utils/timezoneFormatter.cpp'
599--- plugins/Utils/timezoneFormatter.cpp 2015-09-29 12:45:19 +0000
600+++ plugins/Utils/timezoneFormatter.cpp 2015-11-23 14:34:56 +0000
601@@ -29,7 +29,7 @@
602 if (tz.isValid()) {
603 const QDateTime now = QDateTime::currentDateTime().toTimeZone(tz);
604 // return locale-aware string in the form "day, hh:mm", e.g. "Mon 14:30" or "Mon 1:30 pm"
605- return QStringLiteral("%1 %2").arg(now.toString(QStringLiteral("ddd"))).arg(now.time().toString(Qt::DefaultLocaleShortDate));
606+ return QStringLiteral("%1 %2").arg(now.toString(QStringLiteral("ddd")), now.time().toString(Qt::DefaultLocaleShortDate));
607 }
608 return QString();
609 }
610
611=== modified file 'plugins/Utils/windowstatestorage.cpp'
612--- plugins/Utils/windowstatestorage.cpp 2015-10-08 14:01:56 +0000
613+++ plugins/Utils/windowstatestorage.cpp 2015-11-23 14:34:56 +0000
614@@ -66,10 +66,10 @@
615 if (!query.first()) {
616 return defaultValue;
617 }
618- return (WindowState)query.value("state").toInt();
619+ return (WindowState)query.value(QStringLiteral("state")).toInt();
620 }
621
622-void WindowStateStorage::saveGeometry(const QString &windowId, const QRect &rect)
623+void WindowStateStorage::saveGeometry(const QString &windowId, const QRect rect)
624 {
625 const QString queryString = QStringLiteral("INSERT OR REPLACE INTO geometry (windowId, x, y, width, height) values ('%1', '%2', '%3', '%4', '%5');")
626 .arg(windowId)
627@@ -94,7 +94,7 @@
628 }
629 }
630
631-QRect WindowStateStorage::getGeometry(const QString &windowId, const QRect &defaultValue) const
632+QRect WindowStateStorage::getGeometry(const QString &windowId, const QRect defaultValue) const
633 {
634 QString queryString = QStringLiteral("SELECT * FROM geometry WHERE windowId = '%1';")
635 .arg(windowId);
636@@ -120,9 +120,9 @@
637 query.exec(QStringLiteral("CREATE TABLE geometry(windowId TEXT UNIQUE, x INTEGER, y INTEGER, width INTEGER, height INTEGER);"));
638 }
639
640- if (!m_db.tables().contains("state")) {
641+ if (!m_db.tables().contains(QStringLiteral("state"))) {
642 QSqlQuery query;
643- query.exec("CREATE TABLE state(windowId TEXT UNIQUE, state INTEGER);");
644+ query.exec(QStringLiteral("CREATE TABLE state(windowId TEXT UNIQUE, state INTEGER);"));
645 }
646 }
647
648
649=== modified file 'plugins/Utils/windowstatestorage.h'
650--- plugins/Utils/windowstatestorage.h 2015-10-08 14:01:56 +0000
651+++ plugins/Utils/windowstatestorage.h 2015-11-23 14:34:56 +0000
652@@ -35,8 +35,8 @@
653 Q_INVOKABLE void saveState(const QString &windowId, WindowState state);
654 Q_INVOKABLE WindowState getState(const QString &windowId, WindowState defaultValue) const;
655
656- Q_INVOKABLE void saveGeometry(const QString &windowId, const QRect &rect);
657- Q_INVOKABLE QRect getGeometry(const QString &windowId, const QRect &defaultValue) const;
658+ Q_INVOKABLE void saveGeometry(const QString &windowId, const QRect rect);
659+ Q_INVOKABLE QRect getGeometry(const QString &windowId, const QRect defaultValue) const;
660
661 private:
662 void initdb();
663
664=== modified file 'src/ShellApplication.cpp'
665--- src/ShellApplication.cpp 2015-10-20 16:43:53 +0000
666+++ src/ShellApplication.cpp 2015-11-23 14:34:56 +0000
667@@ -103,7 +103,7 @@
668 // (eg cloned desktop, several desktops, etc)
669 if (isMirServer && screens().count() == 2) {
670 m_shellView->setScreen(screens().at(1));
671- m_qmlArgs.setDeviceName("desktop");
672+ m_qmlArgs.setDeviceName(QStringLiteral("desktop"));
673
674 m_secondaryWindow = new SecondaryWindow(m_qmlEngine);
675 m_secondaryWindow->setScreen(screens().at(0));
676@@ -164,7 +164,7 @@
677 // (eg cloned desktop, several desktops, etc)
678 if (screens().count() == 2) {
679 m_shellView->setScreen(screens().at(1));
680- m_qmlArgs.setDeviceName("desktop");
681+ m_qmlArgs.setDeviceName(QStringLiteral("desktop"));
682 // Changing the QScreen where a QWindow is drawn makes it also lose focus (besides having
683 // its backing QPlatformWindow recreated). So lets refocus it.
684 m_shellView->requestActivate();
685@@ -183,12 +183,13 @@
686 // TODO: Support an arbitrary number of screens and different policies
687 // (eg cloned desktop, several desktops, etc)
688 if (screen == m_shellView->screen()) {
689- Q_ASSERT(screens().count() > 1);
690- Q_ASSERT(screens().at(0) != screen);
691+ const QList<QScreen *> allScreens = screens();
692+ Q_ASSERT(allScreens.count() > 1);
693+ Q_ASSERT(allScreens.at(0) != screen);
694 Q_ASSERT(m_secondaryWindow);
695 delete m_secondaryWindow;
696 m_secondaryWindow = nullptr;
697- m_shellView->setScreen(screens().first());
698+ m_shellView->setScreen(allScreens.first());
699 m_qmlArgs.setDeviceName(m_deviceName);
700 // Changing the QScreen where a QWindow is drawn makes it also lose focus (besides having
701 // its backing QPlatformWindow recreated). So lets refocus it.

Subscribers

People subscribed via source and target branches