From 18ddad191e157d741d9ced12b3d42c3a315f5457 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 20 Mar 2012 19:18:51 +0100 Subject: permit explicitly empty qt.conf entries this allows expressing "no SettingsPath" cleanly, and makes the internals cleaner. this is marginally behavior-incompatible in that if somebody had Prefix or Data set to an empty string (rather than a dot, which is hinted at by the documentation and commanded by common sense), he would have gotten the binary's directory resp. Prefix, while now it will be just empty. Change-Id: I3c11cc4e8671ffb604d4889389764a9ba9c2e7e6 Reviewed-by: Thiago Macieira Reviewed-by: Joerg Bornemann --- src/corelib/global/qlibraryinfo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/corelib/global/qlibraryinfo.cpp') diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index cb4e0e753f..dc68ea760c 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -217,14 +217,14 @@ QLibraryInfo::isDebugBuild() static const struct { char key[14], value[13]; } qtConfEntries[] = { - { "Prefix", "" }, + { "Prefix", "." }, { "Documentation", "doc" }, { "Headers", "include" }, { "Libraries", "lib" }, { "Binaries", "bin" }, { "Plugins", "plugins" }, { "Imports", "imports" }, - { "Data", "" }, + { "Data", "." }, { "Translations", "translations" }, { "Examples", "examples" }, { "Tests", "tests" }, @@ -232,7 +232,7 @@ static const struct { { "Sysroot", "" }, { "HostPrefix", "" }, { "HostBinaries", "bin" }, - { "HostData", "" }, + { "HostData", "." }, #endif }; @@ -309,7 +309,7 @@ QLibraryInfo::rawLocation(LibraryLocation loc) } } - if (QDir::isRelativePath(ret)) { + if (!ret.isEmpty() && QDir::isRelativePath(ret)) { QString baseDir; #ifdef QT_BUILD_QMAKE if (loc == HostPrefixPath || loc == PrefixPath) { -- cgit v1.2.3