From f06e9a4f7bd4ec284b6d360e7784c550cef03979 Mon Sep 17 00:00:00 2001 From: Albert S Date: Sun, 13 Sep 2020 20:09:32 +0200 Subject: [PATCH] EntryConfig: Also store 'inherit' key. Needed to save entry later. --- entryprovider.cpp | 3 ++- entryprovider.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/entryprovider.cpp b/entryprovider.cpp index 7afe5ab..3165d93 100644 --- a/entryprovider.cpp +++ b/entryprovider.cpp @@ -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; diff --git a/entryprovider.h b/entryprovider.h index dcd7066..4a69a96 100644 --- a/entryprovider.h +++ b/entryprovider.h @@ -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 readEntryFromPath(const QString &path); - QVector readConfig(QStringList paths, bool userentrymode=false); + QVector readConfig(QStringList paths, bool userentrymode = false); QString resolveEntryPath(QString path); public: