on xenial help sign in
delete watcher
7f64accNick Dedekind
plugins/AccountsService/AccountsService.cpp+45−18
@@ -136,7 +136,7 @@ void AccountsService::updateDemoEdges(bool async)
136
136
137 QDBusPendingReply<QDBusVariant> reply = *watcher;
137 QDBusPendingReply<QDBusVariant> reply = *watcher;
138 if (reply.isError()) {
138 if (reply.isError()) {
139− qWarning() << "Failed to get 'demo-edges' property";
139+ qWarning() << "Failed to get 'demo-edges' property - " << reply.error().message();
140 watcher->deleteLater();
140 watcher->deleteLater();
141 return;
141 return;
142 }
142 }
@@ -148,7 +148,10 @@ void AccountsService::updateDemoEdges(bool async)
148 }
148 }
149 watcher->deleteLater();
149 watcher->deleteLater();
150 });
150 });
151+ if (!async) {
151− if (!async) watcher->waitForFinished();
152+ watcher->waitForFinished();
153+ delete watcher;
154+ }
152}
155}
153
156
154void AccountsService::updateEnableLauncherWhileLocked(bool async)
157void AccountsService::updateEnableLauncherWhileLocked(bool async)
@@ -163,7 +166,7 @@ void AccountsService::updateEnableLauncherWhileLocked(bool async)
163
166
164 QDBusPendingReply<QDBusVariant> reply = *watcher;
167 QDBusPendingReply<QDBusVariant> reply = *watcher;
165 if (reply.isError()) {
168 if (reply.isError()) {
166− qWarning() << "Failed to get 'EnableLauncherWhileLocked' property";
169+ qWarning() << "Failed to get 'EnableLauncherWhileLocked' property - " << reply.error().message();
167 watcher->deleteLater();
170 watcher->deleteLater();
168 return;
171 return;
169 }
172 }
@@ -175,7 +178,10 @@ void AccountsService::updateEnableLauncherWhileLocked(bool async)
175 }
178 }
176 watcher->deleteLater();
179 watcher->deleteLater();
177 });
180 });
181+ if (!async) {
178− if (!async) watcher->waitForFinished();
182+ watcher->waitForFinished();
183+ delete watcher;
184+ }
179}
185}
180
186
181void AccountsService::updateEnableIndicatorsWhileLocked(bool async)
187void AccountsService::updateEnableIndicatorsWhileLocked(bool async)
@@ -190,7 +196,7 @@ void AccountsService::updateEnableIndicatorsWhileLocked(bool async)
190
196
191 QDBusPendingReply<QDBusVariant> reply = *watcher;
197 QDBusPendingReply<QDBusVariant> reply = *watcher;
192 if (reply.isError()) {
198 if (reply.isError()) {
193− qWarning() << "Failed to get 'EnableIndicatorsWhileLocked' property";
199+ qWarning() << "Failed to get 'EnableIndicatorsWhileLocked' property - " << reply.error().message();
194 watcher->deleteLater();
200 watcher->deleteLater();
195 return;
201 return;
196 }
202 }
@@ -202,7 +208,10 @@ void AccountsService::updateEnableIndicatorsWhileLocked(bool async)
202 }
208 }
203 watcher->deleteLater();
209 watcher->deleteLater();
204 });
210 });
211+ if (!async) {
205− if (!async) watcher->waitForFinished();
212+ watcher->waitForFinished();
213+ delete watcher;
214+ }
206}
215}
207
216
208void AccountsService::updateBackgroundFile(bool async)
217void AccountsService::updateBackgroundFile(bool async)
@@ -217,7 +226,7 @@ void AccountsService::updateBackgroundFile(bool async)
217
226
218 QDBusPendingReply<QDBusVariant> reply = *watcher;
227 QDBusPendingReply<QDBusVariant> reply = *watcher;
219 if (reply.isError()) {
228 if (reply.isError()) {
220− qWarning() << "Failed to get 'BackgroundFile' property";
229+ qWarning() << "Failed to get 'BackgroundFile' property - " << reply.error().message();
221 watcher->deleteLater();
230 watcher->deleteLater();
222 return;
231 return;
223 }
232 }
@@ -229,7 +238,10 @@ void AccountsService::updateBackgroundFile(bool async)
229 }
238 }
230 watcher->deleteLater();
239 watcher->deleteLater();
231 });
240 });
241+ if (!async) {
232− if (!async) watcher->waitForFinished();
242+ watcher->waitForFinished();
243+ delete watcher;
244+ }
233}
245}
234
246
235void AccountsService::updateStatsWelcomeScreen(bool async)
247void AccountsService::updateStatsWelcomeScreen(bool async)
@@ -244,7 +256,7 @@ void AccountsService::updateStatsWelcomeScreen(bool async)
244
256
245 QDBusPendingReply<QDBusVariant> reply = *watcher;
257 QDBusPendingReply<QDBusVariant> reply = *watcher;
246 if (reply.isError()) {
258 if (reply.isError()) {
247− qWarning() << "Failed to get 'StatsWelcomeScreen' property";
259+ qWarning() << "Failed to get 'StatsWelcomeScreen' property - " << reply.error().message();
248 watcher->deleteLater();
260 watcher->deleteLater();
249 return;
261 return;
250 }
262 }
@@ -256,7 +268,10 @@ void AccountsService::updateStatsWelcomeScreen(bool async)
256 }
268 }
257 watcher->deleteLater();
269 watcher->deleteLater();
258 });
270 });
271+ if (!async) {
259− if (!async) watcher->waitForFinished();
272+ watcher->waitForFinished();
273+ delete watcher;
274+ }
260}
275}
261
276
262void AccountsService::updatePasswordDisplayHint(bool async)
277void AccountsService::updatePasswordDisplayHint(bool async)
@@ -271,7 +286,7 @@ void AccountsService::updatePasswordDisplayHint(bool async)
271
286
272 QDBusPendingReply<QDBusVariant> reply = *watcher;
287 QDBusPendingReply<QDBusVariant> reply = *watcher;
273 if (reply.isError()) {
288 if (reply.isError()) {
274− qWarning() << "Failed to get 'PasswordDisplayHint' property";
289+ qWarning() << "Failed to get 'PasswordDisplayHint' property - " << reply.error().message();
275 watcher->deleteLater();
290 watcher->deleteLater();
276 return;
291 return;
277 }
292 }
@@ -283,7 +298,10 @@ void AccountsService::updatePasswordDisplayHint(bool async)
283 }
298 }
284 watcher->deleteLater();
299 watcher->deleteLater();
285 });
300 });
301+ if (!async) {
286− if (!async) watcher->waitForFinished();
302+ watcher->waitForFinished();
303+ delete watcher;
304+ }
287}
305}
288
306
289void AccountsService::updateFailedLogins(bool async)
307void AccountsService::updateFailedLogins(bool async)
@@ -298,7 +316,7 @@ void AccountsService::updateFailedLogins(bool async)
298
316
299 QDBusPendingReply<QDBusVariant> reply = *watcher;
317 QDBusPendingReply<QDBusVariant> reply = *watcher;
300 if (reply.isError()) {
318 if (reply.isError()) {
301− qWarning() << "Failed to get 'FailedLogins' property";
319+ qWarning() << "Failed to get 'FailedLogins' property - " << reply.error().message();
302 watcher->deleteLater();
320 watcher->deleteLater();
303 return;
321 return;
304 }
322 }
@@ -310,7 +328,10 @@ void AccountsService::updateFailedLogins(bool async)
310 }
328 }
311 watcher->deleteLater();
329 watcher->deleteLater();
312 });
330 });
331+ if (!async) {
313− if (!async) watcher->waitForFinished();
332+ watcher->waitForFinished();
333+ delete watcher;
334+ }
314}
335}
315
336
316void AccountsService::updateHereEnabled(bool async)
337void AccountsService::updateHereEnabled(bool async)
@@ -325,7 +346,7 @@ void AccountsService::updateHereEnabled(bool async)
325
346
326 QDBusPendingReply<QDBusVariant> reply = *watcher;
347 QDBusPendingReply<QDBusVariant> reply = *watcher;
327 if (reply.isError()) {
348 if (reply.isError()) {
328− qWarning() << "Failed to get 'LicenseAccepted' property";
349+ qWarning() << "Failed to get 'LicenseAccepted' property - " << reply.error().message();
329 watcher->deleteLater();
350 watcher->deleteLater();
330 return;
351 return;
331 }
352 }
@@ -337,7 +358,10 @@ void AccountsService::updateHereEnabled(bool async)
337 }
358 }
338 watcher->deleteLater();
359 watcher->deleteLater();
339 });
360 });
361+ if (!async) {
340− if (!async) watcher->waitForFinished();
362+ watcher->waitForFinished();
363+ delete watcher;
364+ }
341}
365}
342
366
343void AccountsService::updateHereLicensePath(bool async)
367void AccountsService::updateHereLicensePath(bool async)
@@ -352,7 +376,7 @@ void AccountsService::updateHereLicensePath(bool async)
352
376
353 QDBusPendingReply<QDBusVariant> reply = *watcher;
377 QDBusPendingReply<QDBusVariant> reply = *watcher;
354 if (reply.isError()) {
378 if (reply.isError()) {
355− qWarning() << "Failed to get 'LicenseBasePath' property";
379+ qWarning() << "Failed to get 'LicenseBasePath' property - " << reply.error().message();
356 watcher->deleteLater();
380 watcher->deleteLater();
357 return;
381 return;
358 }
382 }
@@ -367,7 +391,10 @@ void AccountsService::updateHereLicensePath(bool async)
367 }
391 }
368 watcher->deleteLater();
392 watcher->deleteLater();
369 });
393 });
394+ if (!async) {
370− if (!async) watcher->waitForFinished();
395+ watcher->waitForFinished();
396+ delete watcher;
397+ }
371}
398}
372
399
373uint AccountsService::failedLogins() const
400uint AccountsService::failedLogins() const