Commit 5f0e3ec0 authored by Jonah Brüchert's avatar Jonah Brüchert
Browse files

Another approach to use the enum everywhere in ApplicationListModel

parent 59f61325
......@@ -94,7 +94,7 @@ void ApplicationListModel::sycocaDbChanged(const QStringList &changes)
loadApplications();
}
bool appNameLessThan(const ApplicationData &a1, const ApplicationData &a2)
bool appNameLessThan(const ApplicationListModel::ApplicationData &a1, const ApplicationListModel::ApplicationData &a2)
{
return a1.name.toLower() < a2.name.toLower();
}
......
......@@ -32,15 +32,6 @@ class QString;
class ApplicationListModel;
struct ApplicationData {
QString name;
QString icon;
QString storageId;
QString entryPath;
int location = 0; //FIXME
bool startupNotify = true;
};
class ApplicationListModel : public QAbstractListModel {
Q_OBJECT
......@@ -56,6 +47,15 @@ public:
};
Q_ENUM(LauncherLocation)
struct ApplicationData {
QString name;
QString icon;
QString storageId;
QString entryPath;
LauncherLocation location = LauncherLocation::Grid;
bool startupNotify = true;
};
enum Roles {
ApplicationNameRole = Qt::UserRole + 1,
ApplicationIconRole,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment