aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2015-10-17 14:32:47 +0200
committerChristoph Cullmann <cullmann@kde.org>2015-10-17 14:32:47 +0200
commitc79edee12bfc7ef50ce9587ce2beb419b3e14f45 (patch)
tree36736562f2699420c9083e3e81c0cf865f5e616a /src
parent0e618f832e5ec3862a4acbbfd475153b7ec3c12d (diff)
downloadkconfig-c79edee12bfc7ef50ce9587ce2beb419b3e14f45.tar.gz
kconfig-c79edee12bfc7ef50ce9587ce2beb419b3e14f45.tar.bz2
Allow KConfig to use resources as fallback config files
Fallback will be :/kconfig/ REVIEW: 125598
Diffstat (limited to 'src')
-rw-r--r--src/core/kconfig.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/kconfig.cpp b/src/core/kconfig.cpp
index 7f03869b..07fa6f55 100644
--- a/src/core/kconfig.cpp
+++ b/src/core/kconfig.cpp
@@ -713,6 +713,12 @@ void KConfigPrivate::parseConfigFiles()
Q_FOREACH (const QString &f, QStandardPaths::locateAll(resourceType, fileName)) {
files.prepend(f);
}
+
+ // allow fallback to config files bundled in resources
+ const QString resourceFile(QStringLiteral(":/kconfig/") + fileName);
+ if (QFile::exists(resourceFile)) {
+ files.prepend(resourceFile);
+ }
}
}
} else {