summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure6
-rw-r--r--mkspecs/features/qt_module_pris.prf2
-rw-r--r--qmake/property.cpp4
-rw-r--r--src/corelib/global/qlibraryinfo.cpp25
-rw-r--r--src/corelib/global/qlibraryinfo.h2
-rw-r--r--tools/configure/configureapp.cpp6
6 files changed, 32 insertions, 13 deletions
diff --git a/configure b/configure
index c4c52ac452..ebb2057cc6 100755
--- a/configure
+++ b/configure
@@ -3736,10 +3736,9 @@ static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$
static const char qt_configure_installation [12+11] = "qt_instdate=`date +%Y-%m-%d`";
/* Installation Info */
-#ifndef QT_BUILD_QMAKE
static const char qt_configure_prefix_path_str [256 + 12] = "qt_prfxpath=$QT_INSTALL_PREFIX";
-#else
-static const char qt_configure_prefix_path_str [256 + 12] = "qt_prfxpath=$QT_EXT_PREFIX";
+#ifdef QT_BUILD_QMAKE
+static const char qt_configure_ext_prefix_path_str [256 + 12] = "qt_epfxpath=$QT_EXT_PREFIX";
static const char qt_configure_host_prefix_path_str [256 + 12] = "qt_hpfxpath=$QT_HOST_PREFIX";
#endif
@@ -3766,6 +3765,7 @@ $QT_CONFIGURE_STRS#endif
#define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12
#ifdef QT_BUILD_QMAKE
+# define QT_CONFIGURE_EXT_PREFIX_PATH qt_configure_ext_prefix_path_str + 12
# define QT_CONFIGURE_HOST_PREFIX_PATH qt_configure_host_prefix_path_str + 12
#endif
EOF
diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf
index 03a8e5db71..74517a3fde 100644
--- a/mkspecs/features/qt_module_pris.prf
+++ b/mkspecs/features/qt_module_pris.prf
@@ -50,7 +50,7 @@ MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
host_build: \
module_rpath = "QT.$${MODULE_ID}.rpath = $$[QT_HOST_LIBS]"
else: \
- module_rpath = "QT.$${MODULE_ID}.rpath = $$[QT_INSTALL_LIBS/raw]"
+ module_rpath = "QT.$${MODULE_ID}.rpath = $$[QT_INSTALL_LIBS/dev]"
} else {
module_rpath =
}
diff --git a/qmake/property.cpp b/qmake/property.cpp
index bf1bb58a31..f7787aff99 100644
--- a/qmake/property.cpp
+++ b/qmake/property.cpp
@@ -80,6 +80,7 @@ QMakeProperty::QMakeProperty() : settings(0)
m_values[ProKey(name + "/get")] = QLibraryInfo::rawLocation(propList[i].loc, QLibraryInfo::EffectivePaths);
QString val = QLibraryInfo::rawLocation(propList[i].loc, QLibraryInfo::FinalPaths);
if (!propList[i].raw) {
+ m_values[ProKey(name + "/dev")] = QLibraryInfo::rawLocation(propList[i].loc, QLibraryInfo::DevicePaths);
m_values[ProKey(name)] = QLibraryInfo::location(propList[i].loc);
name += "/raw";
}
@@ -159,6 +160,7 @@ QMakeProperty::exec()
ProString pval = value(ProKey(prop + "/raw"));
ProString gval = value(ProKey(prop + "/get"));
ProString sval = value(ProKey(prop + "/src"));
+ ProString dval = value(ProKey(prop + "/dev"));
fprintf(stdout, "%s:%s\n", prop.toLatin1().constData(), val.toLatin1().constData());
if (!pval.isEmpty() && pval != val)
fprintf(stdout, "%s/raw:%s\n", prop.toLatin1().constData(), pval.toLatin1().constData());
@@ -166,6 +168,8 @@ QMakeProperty::exec()
fprintf(stdout, "%s/get:%s\n", prop.toLatin1().constData(), gval.toLatin1().constData());
if (!sval.isEmpty() && sval != gval)
fprintf(stdout, "%s/src:%s\n", prop.toLatin1().constData(), sval.toLatin1().constData());
+ if (!dval.isEmpty() && dval != pval)
+ fprintf(stdout, "%s/dev:%s\n", prop.toLatin1().constData(), dval.toLatin1().constData());
}
return true;
}
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index a75fb365a3..dc04f898f7 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -65,6 +65,7 @@ struct QLibrarySettings
QLibrarySettings();
QScopedPointer<QSettings> settings;
#ifdef QT_BUILD_QMAKE
+ bool haveDevicePaths;
bool haveEffectiveSourcePaths;
bool haveEffectivePaths;
bool havePaths;
@@ -83,7 +84,10 @@ public:
return ls ? (group == QLibraryInfo::EffectiveSourcePaths
? ls->haveEffectiveSourcePaths
: group == QLibraryInfo::EffectivePaths
- ? ls->haveEffectivePaths : ls->havePaths) : false;
+ ? ls->haveEffectivePaths
+ : group == QLibraryInfo::DevicePaths
+ ? ls->haveDevicePaths
+ : ls->havePaths) : false;
}
#endif
static QSettings *configuration()
@@ -99,6 +103,7 @@ QLibrarySettings::QLibrarySettings()
: settings(QLibraryInfoPrivate::findConfiguration())
{
#ifndef QT_BUILD_QMAKE
+ bool haveDevicePaths;
bool haveEffectivePaths;
bool havePaths;
#endif
@@ -106,6 +111,7 @@ QLibrarySettings::QLibrarySettings()
// This code needs to be in the regular library, as otherwise a qt.conf that
// works for qmake would break things for dynamically built Qt tools.
QStringList children = settings->childGroups();
+ haveDevicePaths = children.contains(QLatin1String("DevicePaths"));
#ifdef QT_BUILD_QMAKE
haveEffectiveSourcePaths = children.contains(QLatin1String("EffectiveSourcePaths"));
#else
@@ -114,13 +120,15 @@ QLibrarySettings::QLibrarySettings()
#endif
haveEffectivePaths = haveEffectiveSourcePaths || children.contains(QLatin1String("EffectivePaths"));
// Backwards compat: an existing but empty file is claimed to contain the Paths section.
- havePaths = (!haveEffectivePaths && !children.contains(QLatin1String(platformsSection)))
+ havePaths = (!haveDevicePaths && !haveEffectivePaths
+ && !children.contains(QLatin1String(platformsSection)))
|| children.contains(QLatin1String("Paths"));
#ifndef QT_BUILD_QMAKE
if (!havePaths)
settings.reset(0);
#else
} else {
+ haveDevicePaths = false;
haveEffectiveSourcePaths = false;
haveEffectivePaths = false;
havePaths = false;
@@ -404,11 +412,12 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
// FinalPaths. For FinalPaths, use qt.conf if present and contains not only
// [EffectivePaths], otherwise fall back to builtins.
// EffectiveSourcePaths falls back to EffectivePaths.
+ // DevicePaths falls back to FinalPaths.
PathGroup orig_group = group;
if (!QLibraryInfoPrivate::haveGroup(group)
&& !(group == EffectiveSourcePaths
&& (group = EffectivePaths, QLibraryInfoPrivate::haveGroup(group)))
- && !(group == EffectivePaths
+ && !((group == EffectivePaths || group == DevicePaths)
&& (group = FinalPaths, QLibraryInfoPrivate::haveGroup(group)))
&& (group = orig_group, true))
#elif !defined(QT_NO_SETTINGS)
@@ -417,14 +426,19 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
{
const char *path = 0;
if (loc == PrefixPath) {
- path = QT_CONFIGURE_PREFIX_PATH;
+ path =
+#ifdef QT_BUILD_QMAKE
+ (group != DevicePaths) ?
+ QT_CONFIGURE_EXT_PREFIX_PATH :
+#endif
+ QT_CONFIGURE_PREFIX_PATH;
} else if (unsigned(loc) <= sizeof(qt_configure_str_offsets)/sizeof(qt_configure_str_offsets[0])) {
path = qt_configure_strs + qt_configure_str_offsets[loc - 1];
#ifndef Q_OS_WIN // On Windows we use the registry
} else if (loc == SettingsPath) {
path = QT_CONFIGURE_SETTINGS_PATH;
#endif
-#ifdef QT_BOOTSTRAPPED
+#ifdef QT_BUILD_QMAKE
} else if (loc == HostPrefixPath) {
path = QT_CONFIGURE_HOST_PREFIX_PATH;
#endif
@@ -449,6 +463,7 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
QSettings *config = QLibraryInfoPrivate::configuration();
config->beginGroup(QLatin1String(
#ifdef QT_BUILD_QMAKE
+ group == DevicePaths ? "DevicePaths" :
group == EffectiveSourcePaths ? "EffectiveSourcePaths" :
group == EffectivePaths ? "EffectivePaths" :
#endif
diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h
index 8dccb25665..4dff8ca494 100644
--- a/src/corelib/global/qlibraryinfo.h
+++ b/src/corelib/global/qlibraryinfo.h
@@ -88,7 +88,7 @@ public:
};
static QString location(LibraryLocation); // ### Qt 6: consider renaming it to path()
#ifdef QT_BUILD_QMAKE
- enum PathGroup { FinalPaths, EffectivePaths, EffectiveSourcePaths };
+ enum PathGroup { FinalPaths, EffectivePaths, EffectiveSourcePaths, DevicePaths };
static QString rawLocation(LibraryLocation, PathGroup);
#endif
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index c206075646..fbf25174f6 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -4054,10 +4054,9 @@ void Configure::generateQConfigCpp()
<< "static const char qt_configure_installation [11 + 12] = \"qt_instdate=" << QDate::currentDate().toString(Qt::ISODate) << "\";" << endl
<< endl
<< "/* Installation Info */" << endl
- << "#ifndef QT_BUILD_QMAKE" << endl
<< "static const char qt_configure_prefix_path_str [512 + 12] = \"qt_prfxpath=" << dictionary["QT_INSTALL_PREFIX"] << "\";" << endl
- << "#else" << endl
- << "static const char qt_configure_prefix_path_str [512 + 12] = \"qt_prfxpath=" << dictionary["QT_EXT_PREFIX"] << "\";" << endl
+ << "#ifdef QT_BUILD_QMAKE" << endl
+ << "static const char qt_configure_ext_prefix_path_str [512 + 12] = \"qt_epfxpath=" << dictionary["QT_EXT_PREFIX"] << "\";" << endl
<< "static const char qt_configure_host_prefix_path_str [512 + 12] = \"qt_hpfxpath=" << dictionary["QT_HOST_PREFIX"] << "\";" << endl
<< "#endif" << endl
<< endl
@@ -4085,6 +4084,7 @@ void Configure::generateQConfigCpp()
<< endl
<< "#define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12\n"
<< "#ifdef QT_BUILD_QMAKE\n"
+ << "# define QT_CONFIGURE_EXT_PREFIX_PATH qt_configure_ext_prefix_path_str + 12\n"
<< "# define QT_CONFIGURE_HOST_PREFIX_PATH qt_configure_host_prefix_path_str + 12\n"
<< "#endif\n";