1
0

EntryConfig: Also store 'inherit' key. Needed to save entry later.

Este cometimento está contido em:
Albert S. 2020-09-13 20:09:32 +02:00
ascendente 61001ed6cc
cometimento f06e9a4f7b
2 ficheiros modificados com 4 adições e 2 eliminações

Ver ficheiro

@ -181,7 +181,8 @@ EntryConfig EntryProvider::readqsrunFile(const QString &path)
}
if(key == "inherit")
{
auto entry = readEntryFromPath(resolveEntryPath(splitted[1]));
result.inherit = splitted[1];
auto entry = readEntryFromPath(resolveEntryPath(result.inherit));
if(entry)
{
inheritedConfig = *entry;

Ver ficheiro

@ -26,6 +26,7 @@ class EntryConfig
QString command;
QStringList arguments;
QIcon icon;
QString inherit;
int row = 0;
int col = 0;
@ -41,7 +42,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, bool userentrymode = false);
QString resolveEntryPath(QString path);
public: