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

此提交包含在:
2020-09-13 20:09:32 +02:00
父節點 61001ed6cc
當前提交 f06e9a4f7b
共有 2 個檔案被更改,包括 4 行新增2 行删除

查看文件

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

查看文件

@ -26,6 +26,7 @@ class EntryConfig
QString command; QString command;
QStringList arguments; QStringList arguments;
QIcon icon; QIcon icon;
QString inherit;
int row = 0; int row = 0;
int col = 0; int col = 0;
@ -41,7 +42,7 @@ class EntryProvider
EntryConfig readqsrunFile(const QString &path); EntryConfig readqsrunFile(const QString &path);
EntryConfig readFromDesktopFile(const QString &path); EntryConfig readFromDesktopFile(const QString &path);
std::optional<EntryConfig> readEntryFromPath(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); QString resolveEntryPath(QString path);
public: public: