@@ -127,9 +127,6 @@ private Q_SLOTS:
128 appManager->addApplication(new MockApp("no-icon"));
128 appManager->addApplication(new MockApp("no-icon"));
129 QCOMPARE(launcherModel->rowCount(QModelIndex()), 2);
129 QCOMPARE(launcherModel->rowCount(QModelIndex()), 2);
131− qputenv("TEST_CLICK_DB", CMAKE_BINARY_DIR "/tests/data/click/db");
132− qputenv("TEST_CLICK_USER", "test-user");
135 // Removing apps from appmanager and launcher as pinned ones would stick
132 // Removing apps from appmanager and launcher as pinned ones would stick
@@ -140,8 +137,6 @@ private Q_SLOTS:
140 while (launcherModel->rowCount(QModelIndex()) > 0) {
137 while (launcherModel->rowCount(QModelIndex()) > 0) {
141 launcherModel->requestRemove(launcherModel->get(0)->appId());
138 launcherModel->requestRemove(launcherModel->get(0)->appId());
143− qputenv("TEST_CLICK_DB", "");
144− qputenv("TEST_CLICK_USER", "");
147 void testMove() {
142 void testMove() {
@@ -283,14 +278,10 @@ private Q_SLOTS:
283 void testGetUrlForAppId() {
278 void testGetUrlForAppId() {
284 QCOMPARE(launcherModel->getUrlForAppId(QString()), QString());
279 QCOMPARE(launcherModel->getUrlForAppId(QString()), QString());
285 QCOMPARE(launcherModel->getUrlForAppId(""), QString());
280 QCOMPARE(launcherModel->getUrlForAppId(""), QString());
286− QCOMPARE(launcherModel->getUrlForAppId("not-an-app"), QString("application:///not-an-app.desktop"));
281+ QCOMPARE(launcherModel->getUrlForAppId("no-name"), QString("application:///no-name.desktop"));
287− QCOMPARE(launcherModel->getUrlForAppId("not_an_app"), QString("application:///not_an_app.desktop"));
288− QCOMPARE(launcherModel->getUrlForAppId("notes-app"), QString("application:///notes-app.desktop"));
289− QCOMPARE(launcherModel->getUrlForAppId("com.test.good"), QString("appid://com.test.good/application/1.2.3"));
282+ QCOMPARE(launcherModel->getUrlForAppId("com.test.good"), QString("appid://com.test.good/first-listed-app/current-user-version"));
290− QCOMPARE(launcherModel->getUrlForAppId("com.test.good_application"), QString("appid://com.test.good/application/1.2.3"));
283+ QCOMPARE(launcherModel->getUrlForAppId("com.test.good_application"), QString("appid://com.test.good/application/current-user-version"));
291− // Note that this version change is intentional -- we want to fix old links to use latest current version
292− QCOMPARE(launcherModel->getUrlForAppId("com.test.good_application_0.0.0"), QString("appid://com.test.good/application/1.2.3"));
293− QCOMPARE(launcherModel->getUrlForAppId("com.test.good_application_1.2.3"), QString("appid://com.test.good/application/1.2.3"));
284+ QCOMPARE(launcherModel->getUrlForAppId("com.test.good_application_1.2.3"), QString("appid://com.test.good/application/current-user-version"));