mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
Another approach to use the enum everywhere in ApplicationListModel
This commit is contained in:
parent
59f61325a7
commit
5f0e3ec05d
2 changed files with 10 additions and 10 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue