-
-
Save tru/bd55935d43abb039dcac81d25b17ebc8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/settings/SettingsSection.cpp b/src/settings/SettingsSection.cpp | |
index 7519345..fe0e87f 100644 | |
--- a/src/settings/SettingsSection.cpp | |
+++ b/src/settings/SettingsSection.cpp | |
@@ -172,3 +172,11 @@ bool SettingsSection::isHidden() const | |
bool correctPlatform = ((m_platform & Utils::CurrentPlatform()) == Utils::CurrentPlatform()); | |
return (m_hidden || !correctPlatform); | |
} | |
+ | |
+///////////////////////////////////////////////////////////////////////////////////////// | |
+QVariant SettingsSection::defaultValue(const QString& key) | |
+{ | |
+ if (m_values.contains(key)) | |
+ return m_values.value(key)->defaultValue(); | |
+ return QVariant(); | |
+} | |
diff --git a/src/settings/SettingsSection.h b/src/settings/SettingsSection.h | |
index c0ef77c..8bd8b88 100644 | |
--- a/src/settings/SettingsSection.h | |
+++ b/src/settings/SettingsSection.h | |
@@ -27,6 +27,7 @@ public: | |
bool isHidden() const; | |
QVariant value(const QString& key); | |
+ QVariant defaultValue(const QString& key); | |
QString sectionName() const { return m_sectionID; } | |
const QVariantMap allValues() const; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment