Introduce EntryType. Retire userEntry boolean
Introduce EntryType, allowing to distnguish between: - inherietd entries: Those inherit their values from other entries, typcally system entries. They do not allow overwriting the value, except row/col. - system entries: those not created by the user in any way, usually .desktop files in /usr/share/applications/... - user entries: those that have been created by the user. they can however also inherit, and overwrite inherited values. inherited are used for the "favourites" feature.
This commit is contained in:
@ -15,10 +15,17 @@ class ConfigFormatException : public std::runtime_error
|
||||
}
|
||||
};
|
||||
|
||||
enum EntryType
|
||||
{
|
||||
USER,
|
||||
INHERIT,
|
||||
SYSTEM
|
||||
};
|
||||
|
||||
class EntryConfig
|
||||
{
|
||||
public:
|
||||
bool userEntry = false;
|
||||
EntryType type = SYSTEM;
|
||||
bool hidden = false;
|
||||
QString entryPath;
|
||||
QString key;
|
||||
@ -42,7 +49,7 @@ class EntryProvider
|
||||
EntryConfig readqsrunFile(const QString &path);
|
||||
EntryConfig readFromDesktopFile(const QString &path);
|
||||
std::optional<EntryConfig> readEntryFromPath(const QString &path);
|
||||
QVector<EntryConfig> readConfig(QStringList paths, bool userentrymode = false);
|
||||
QVector<EntryConfig> readConfig(QStringList paths);
|
||||
QString resolveEntryPath(QString path);
|
||||
|
||||
public:
|
||||
|
مرجع در شماره جدید
Block a user