@@ -421,6 +421,7 @@ private Q_SLOTS:
422 void testSettings() {
422 void testSettings() {
423 GSettings *settings = launcherModel->m_settings;
423 GSettings *settings = launcherModel->m_settings;
424+ QSignalSpy spy(launcherModel, SIGNAL(hintChanged()));
425 // Nothing pinned at startup
426 // Nothing pinned at startup
426 QCOMPARE(settings->storedApplications().count(), 0);
427 QCOMPARE(settings->storedApplications().count(), 0);
@@ -428,6 +429,7 @@ private Q_SLOTS:
428 // pin both apps
429 // pin both apps
429 launcherModel->pin("abs-icon");
430 launcherModel->pin("abs-icon");
430 launcherModel->pin("no-icon");
431 launcherModel->pin("no-icon");
432+ QCOMPARE(spy.count(), 0);
432 // Now settings should have 2 apps
434 // Now settings should have 2 apps
433 QCOMPARE(settings->storedApplications().count(), 2);
435 QCOMPARE(settings->storedApplications().count(), 2);
@@ -440,17 +442,19 @@ private Q_SLOTS:
440 QCOMPARE(settings->storedApplications().count(), 2);
442 QCOMPARE(settings->storedApplications().count(), 2);
442 // Now remove 1 app through the backend, make sure one is still there
444 // Now remove 1 app through the backend, make sure one is still there
443− settings->setStoredApplications(QStringList() << "abs-icon");
445+ settings->simulateDconfChange(QStringList() << "abs-icon");
444 QCOMPARE(settings->storedApplications().count(), 1);
446 QCOMPARE(settings->storedApplications().count(), 1);
447+ QCOMPARE(spy.count(), 1);
446 // Check if it disappeared from the frontend too
449 // Check if it disappeared from the frontend too
447 QCOMPARE(launcherModel->rowCount(), 1);
450 QCOMPARE(launcherModel->rowCount(), 1);
449 // Add them back but in reverse order
452 // Add them back but in reverse order
450− settings->setStoredApplications(QStringList() << "no-icon" << "abs-icon");
453+ settings->simulateDconfChange(QStringList() << "no-icon" << "abs-icon");
451 QCOMPARE(launcherModel->rowCount(), 2);
454 QCOMPARE(launcherModel->rowCount(), 2);
452 QCOMPARE(launcherModel->get(0)->appId(), QString("no-icon"));
455 QCOMPARE(launcherModel->get(0)->appId(), QString("no-icon"));
453 QCOMPARE(launcherModel->get(1)->appId(), QString("abs-icon"));
456 QCOMPARE(launcherModel->get(1)->appId(), QString("abs-icon"));
457+ QCOMPARE(spy.count(), 2);