75
75
if (m_demoEdges != demoEdges) {
76
76
m_demoEdges = demoEdges;
77
m_service->setUserProperty(m_user, "com.canonical.unity.AccountsService", "demo-edges", demoEdges);
77
m_service->setUserProperty(m_user, QStringLiteral("com.canonical.unity.AccountsService"), QStringLiteral("demo-edges"), demoEdges);
79
79
Q_EMIT demoEdgesChanged();
115
115
if (m_hereEnabled != enabled) {
116
116
m_hereEnabled = enabled;
117
m_service->setUserProperty(m_user, "com.ubuntu.location.providers.here.AccountsService", "LicenseAccepted", enabled);
117
m_service->setUserProperty(m_user, QStringLiteral("com.ubuntu.location.providers.here.AccountsService"), QStringLiteral("LicenseAccepted"), enabled);
119
119
Q_EMIT hereEnabledChanged();
133
133
void AccountsService::updateDemoEdges(bool async)
135
135
QDBusPendingCall pendingReply = m_service->getUserPropertyAsync(m_user,
136
"com.canonical.unity.AccountsService",
136
QStringLiteral("com.canonical.unity.AccountsService"),
137
QStringLiteral("demo-edges"));
138
138
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingReply, this);
140
140
connect(watcher, &QDBusPendingCallWatcher::finished,
162
162
void AccountsService::updateEnableLauncherWhileLocked(bool async)
164
164
QDBusPendingCall pendingReply = m_service->getUserPropertyAsync(m_user,
165
"com.ubuntu.AccountsService.SecurityPrivacy",
166
"EnableLauncherWhileLocked");
165
QStringLiteral("com.ubuntu.AccountsService.SecurityPrivacy"),
166
QStringLiteral("EnableLauncherWhileLocked"));
167
167
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingReply, this);
169
169
connect(watcher, &QDBusPendingCallWatcher::finished,
191
191
void AccountsService::updateEnableIndicatorsWhileLocked(bool async)
193
193
QDBusPendingCall pendingReply = m_service->getUserPropertyAsync(m_user,
194
"com.ubuntu.AccountsService.SecurityPrivacy",
195
"EnableIndicatorsWhileLocked");
194
QStringLiteral("com.ubuntu.AccountsService.SecurityPrivacy"),
195
QStringLiteral("EnableIndicatorsWhileLocked"));
196
196
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingReply, this);
198
198
connect(watcher, &QDBusPendingCallWatcher::finished,
220
220
void AccountsService::updateBackgroundFile(bool async)
222
222
QDBusPendingCall pendingReply = m_service->getUserPropertyAsync(m_user,
223
"org.freedesktop.Accounts.User",
223
QStringLiteral("org.freedesktop.Accounts.User"),
224
QStringLiteral("BackgroundFile"));
225
225
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingReply, this);
227
227
connect(watcher, &QDBusPendingCallWatcher::finished,
249
249
void AccountsService::updateStatsWelcomeScreen(bool async)
251
251
QDBusPendingCall pendingReply = m_service->getUserPropertyAsync(m_user,
252
"com.ubuntu.touch.AccountsService.SecurityPrivacy",
253
"StatsWelcomeScreen");
252
QStringLiteral("com.ubuntu.touch.AccountsService.SecurityPrivacy"),
253
QStringLiteral("StatsWelcomeScreen"));
254
254
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingReply, this);
256
256
connect(watcher, &QDBusPendingCallWatcher::finished,
278
278
void AccountsService::updatePasswordDisplayHint(bool async)
280
280
QDBusPendingCall pendingReply = m_service->getUserPropertyAsync(m_user,
281
"com.ubuntu.AccountsService.SecurityPrivacy",
282
"PasswordDisplayHint");
281
QStringLiteral("com.ubuntu.AccountsService.SecurityPrivacy"),
282
QStringLiteral("PasswordDisplayHint"));
283
283
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingReply, this);
285
285
connect(watcher, &QDBusPendingCallWatcher::finished,
307
307
void AccountsService::updateFailedLogins(bool async)
309
309
QDBusPendingCall pendingReply = m_service->getUserPropertyAsync(m_user,
310
"com.canonical.unity.AccountsService.Private",
310
QStringLiteral("com.canonical.unity.AccountsService.Private"),
311
QStringLiteral("FailedLogins"));
312
312
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingReply, this);
314
314
connect(watcher, &QDBusPendingCallWatcher::finished,
336
336
void AccountsService::updateHereEnabled(bool async)
338
338
QDBusPendingCall pendingReply = m_service->getUserPropertyAsync(m_user,
339
"com.ubuntu.location.providers.here.AccountsService",
339
QStringLiteral("com.ubuntu.location.providers.here.AccountsService"),
340
QStringLiteral("LicenseAccepted"));
341
341
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingReply, this);
343
343
connect(watcher, &QDBusPendingCallWatcher::finished,
365
365
void AccountsService::updateHereLicensePath(bool async)
367
367
QDBusPendingCall pendingReply = m_service->getUserPropertyAsync(m_user,
368
"com.ubuntu.location.providers.here.AccountsService",
368
QStringLiteral("com.ubuntu.location.providers.here.AccountsService"),
369
QStringLiteral("LicenseBasePath"));
370
370
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingReply, this);
372
372
connect(watcher, &QDBusPendingCallWatcher::finished,
382
382
QString hereLicensePath = reply.value().toString();
383
383
if (hereLicensePath.isEmpty() || !QFile::exists(hereLicensePath))
384
hereLicensePath = "";
384
hereLicensePath = QLatin1String("");
386
386
if (m_hereLicensePath.isNull() || m_hereLicensePath != hereLicensePath) {
387
387
m_hereLicensePath = hereLicensePath;
404
404
if (m_failedLogins != failedLogins) {
405
405
m_failedLogins = failedLogins;
406
m_service->setUserProperty(m_user, "com.canonical.unity.AccountsService.Private", "FailedLogins", failedLogins);
406
m_service->setUserProperty(m_user, QStringLiteral("com.canonical.unity.AccountsService.Private"), QStringLiteral("FailedLogins"), failedLogins);
408
408
Q_EMIT failedLoginsChanged();
418
if (interface == "com.canonical.unity.AccountsService") {
419
if (changed.contains("demo-edges")) {
418
if (interface == QLatin1String("com.canonical.unity.AccountsService")) {
419
if (changed.contains(QStringLiteral("demo-edges"))) {
420
420
updateDemoEdges();
422
} else if (interface == "com.canonical.unity.AccountsService.Private") {
423
if (changed.contains("FailedLogins")) {
422
} else if (interface == QLatin1String("com.canonical.unity.AccountsService.Private")) {
423
if (changed.contains(QStringLiteral("FailedLogins"))) {
424
424
updateFailedLogins();
426
} else if (interface == "com.ubuntu.touch.AccountsService.SecurityPrivacy") {
427
if (changed.contains("StatsWelcomeScreen")) {
426
} else if (interface == QLatin1String("com.ubuntu.touch.AccountsService.SecurityPrivacy")) {
427
if (changed.contains(QStringLiteral("StatsWelcomeScreen"))) {
428
428
updateStatsWelcomeScreen();
430
} else if (interface == "com.ubuntu.AccountsService.SecurityPrivacy") {
431
if (changed.contains("PasswordDisplayHint")) {
430
} else if (interface == QLatin1String("com.ubuntu.AccountsService.SecurityPrivacy")) {
431
if (changed.contains(QStringLiteral("PasswordDisplayHint"))) {
432
432
updatePasswordDisplayHint();
434
if (changed.contains("EnableLauncherWhileLocked")) {
434
if (changed.contains(QStringLiteral("EnableLauncherWhileLocked"))) {
435
435
updateEnableLauncherWhileLocked();
437
if (changed.contains("EnableIndicatorsWhileLocked")) {
437
if (changed.contains(QStringLiteral("EnableIndicatorsWhileLocked"))) {
438
438
updateEnableIndicatorsWhileLocked();
440
} else if (interface == "com.ubuntu.location.providers.here.AccountsService") {
441
if (changed.contains("LicenseAccepted")) {
440
} else if (interface == QLatin1String("com.ubuntu.location.providers.here.AccountsService")) {
441
if (changed.contains(QStringLiteral("LicenseAccepted"))) {
442
442
updateHereEnabled();
444
if (changed.contains("LicenseBasePath")) {
444
if (changed.contains(QStringLiteral("LicenseBasePath"))) {
445
445
updateHereLicensePath();