From c79edee12bfc7ef50ce9587ce2beb419b3e14f45 Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Sat, 17 Oct 2015 14:32:47 +0200 Subject: Allow KConfig to use resources as fallback config files Fallback will be :/kconfig/ REVIEW: 125598 --- src/core/kconfig.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/core/kconfig.cpp') 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 { -- cgit v1.2.1