summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/settings.cpp
diff options
context:
space:
mode:
authorAlexander Lenhardt <alexander.lenhardt@nokia.com>2012-05-16 11:22:47 +0200
committerAlexander Lenhardt <alexander.lenhardt@nokia.com>2012-05-16 12:06:43 +0200
commit88eb3c616d6e9eb49158f4b33d7e856742e536be (patch)
tree5dc90b511bc4cb20ebf080c1780f5147f2a97814 /src/libs/installer/settings.cpp
parentf9d1ca46325b5aff6c317b5606e1dece6952fc88 (diff)
let value() also query the Settings object
if a value can not be found in the m_vars hash, value() will query the Settings object first before returning the default value. This allows to specify arbitrary tags to be defined in e.g. config.xml which can later be accessed by installationscripts. Change-Id: I881ff961e3647fa32a0219bbfc8bbb89935ff3d4 Reviewed-by: Karsten Heimrich <karsten.heimrich@nokia.com>
Diffstat (limited to 'src/libs/installer/settings.cpp')
-rw-r--r--src/libs/installer/settings.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libs/installer/settings.cpp b/src/libs/installer/settings.cpp
index 151c412eb..181152646 100644
--- a/src/libs/installer/settings.cpp
+++ b/src/libs/installer/settings.cpp
@@ -465,6 +465,11 @@ void Settings::addUserRepositories(const QSet<Repository> &repositories)
d->m_data.insertMulti(scUserRepositories, QVariant().fromValue(repository));
}
+bool Settings::containsValue(const QString &key) const
+{
+ return d->m_data.contains(key);
+}
+
QVariant Settings::value(const QString &key, const QVariant &defaultValue) const
{
return d->m_data.value(key, defaultValue);