Revert "Sort application display order" 30/20830/1
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Wed, 27 Mar 2019 16:34:53 +0000 (16:34 +0000)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Wed, 27 Mar 2019 16:34:53 +0000 (16:34 +0000)
https://gerrit.automotivelinux.org/gerrit/#/c/20559/
and
https://gerrit.automotivelinux.org/gerrit/#/c/20223/

caused the launcher not to display any icons.

Reverting until resolved.

This reverts commit 259a07d696b455f22b13edcae107de67079036f3.

Change-Id: Icdb2accf003cdf9d76a5a69bce3fef0b218093ea

launcher/src/applicationmodel.cpp

index 261e43e..258fac6 100644 (file)
@@ -71,13 +71,7 @@ void ApplicationModel::Private::addApp(QString icon, QString name, QString id)
     {
         _icon = "blank";
     }
-
-    int pos = 0;
-    for (pos = 0; pos < this->data.size(); ++pos) {
-        if (QString::compare(this->data.at(pos).name(), name, Qt::CaseInsensitive) > 0)
-            break;
-    }
-    this->data.insert(pos, AppInfo(_icon, name, id));
+    this->data.append(AppInfo(_icon, name, id));
 }
 
 void ApplicationModel::Private::removeApp(QString id)