aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2019-05-23 19:17:07 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2019-05-23 19:17:07 +0200
commit4a12d020600643d6fcbf65a3da7bc1c21fda6970 (patch)
treefe5f3c8061530d9ac49a6cc54377ed1ef87915b0
parenteb78330fcf98e56968ae5d436d17bc114b8a4890 (diff)
parent8cd4b8cec7ffda0b19b01129e96eda8d2fb75ec0 (diff)
Merge 1.13 into master
-rw-r--r--changelogs/changes-1.13.1.md9
-rw-r--r--doc/reference/modules/qt-plugin_support-module.qdoc2
-rw-r--r--share/qbs/imports/qbs/DarwinTools/darwin-tools.js2
-rw-r--r--share/qbs/module-providers/Qt/setup-qt.js36
-rw-r--r--share/qbs/modules/bundle/BundleModule.qbs3
-rw-r--r--share/qbs/modules/cpp/DarwinGCC.qbs11
-rw-r--r--src/lib/corelib/api/internaljobs.cpp5
-rw-r--r--src/lib/corelib/buildgraph/transformer.cpp4
-rw-r--r--src/lib/corelib/language/language.cpp11
-rw-r--r--src/lib/corelib/language/language.h2
10 files changed, 63 insertions, 22 deletions
diff --git a/changelogs/changes-1.13.1.md b/changelogs/changes-1.13.1.md
new file mode 100644
index 000000000..b2a315cdc
--- /dev/null
+++ b/changelogs/changes-1.13.1.md
@@ -0,0 +1,9 @@
+# Important bugfixes
+* Qt support: Plugins are no longer linked into static libraries when building against
+ a static Qt (QBS-1441).
+* Qt support: Fixed excessively long linker command lines (QBS-1441).
+* Qt support: Host libraries are now looked up at the right location (QBS-1445).
+* Qt support: Fixed failure to find Qt modules in Qt Creator when re-parsing a project that
+ hasn't been built yet.
+* macOS: Properties in bundle.infoPlist are no longer overridden (QBS-1447).
+* iOS: Fixed generation of default Info.plist (QBS-1447).
diff --git a/doc/reference/modules/qt-plugin_support-module.qdoc b/doc/reference/modules/qt-plugin_support-module.qdoc
index 9bd27c3f7..2f41e1cc0 100644
--- a/doc/reference/modules/qt-plugin_support-module.qdoc
+++ b/doc/reference/modules/qt-plugin_support-module.qdoc
@@ -80,6 +80,6 @@
Controls whether plugins of a statically built Qt should be linked into the product.
- \default \true if the product is an application or shared library, \c false otherwise.
+ \defaultvalue \c true if the product is an application or shared library, \c false otherwise.
*/
diff --git a/share/qbs/imports/qbs/DarwinTools/darwin-tools.js b/share/qbs/imports/qbs/DarwinTools/darwin-tools.js
index 01aa41ddf..889720fcd 100644
--- a/share/qbs/imports/qbs/DarwinTools/darwin-tools.js
+++ b/share/qbs/imports/qbs/DarwinTools/darwin-tools.js
@@ -78,7 +78,7 @@ function targetDevices(targetOS) {
function targetedDeviceFamily(deviceNames) {
return deviceNames.map(function (deviceName) {
return appleDeviceNumber(deviceName);
- }).join(",");
+ });
}
/**
diff --git a/share/qbs/module-providers/Qt/setup-qt.js b/share/qbs/module-providers/Qt/setup-qt.js
index b3044d72e..0206a16d3 100644
--- a/share/qbs/module-providers/Qt/setup-qt.js
+++ b/share/qbs/module-providers/Qt/setup-qt.js
@@ -226,6 +226,7 @@ function getQtProperties(qmakeFilePath, qbs) {
qtProps.documentationPath = pathQueryValue(queryResult, "QT_INSTALL_DOCS");
qtProps.includePath = pathQueryValue(queryResult, "QT_INSTALL_HEADERS");
qtProps.libraryPath = pathQueryValue(queryResult, "QT_INSTALL_LIBS");
+ qtProps.hostLibraryPath = pathQueryValue(queryResult, "QT_HOST_LIBS");
qtProps.binaryPath = pathQueryValue(queryResult, "QT_HOST_BINS")
|| pathQueryValue(queryResult, "QT_INSTALL_BINS");
qtProps.documentationPath = pathQueryValue(queryResult, "QT_INSTALL_DOCS");
@@ -417,8 +418,10 @@ function makeQtModuleInfo(name, qbsName, deps) {
moduleInfo.name = "";
moduleInfo.qbsName = qbsName; // Lower-case version without "qt" prefix.
moduleInfo.dependencies = deps || []; // qbs names.
- if (moduleInfo.qbsName !== "core" && !moduleInfo.dependencies.contains("core"))
+ if (moduleInfo.qbsName && moduleInfo.qbsName !== "core"
+ && !moduleInfo.dependencies.contains("core")) {
moduleInfo.dependencies.unshift("core");
+ }
moduleInfo.isPrivate = qbsName && qbsName.endsWith("-private");
moduleInfo.hasLibrary = !moduleInfo.isPrivate;
moduleInfo.isStaticLibrary = false;
@@ -441,6 +444,7 @@ function makeQtModuleInfo(name, qbsName, deps) {
moduleInfo.frameworkPathsDebug = [];
moduleInfo.frameworkPathsRelease = [];
moduleInfo.libraryPaths = [];
+ moduleInfo.libDir = "";
moduleInfo.config = [];
moduleInfo.supportedPluginTypes = [];
moduleInfo.pluginData = makePluginData();
@@ -626,7 +630,7 @@ function doSetupLibraries(modInfo, qtProps, debugBuild, nonExistingPrlFiles) {
}
var prlFilePath = modInfo.isPlugin
? FileInfo.joinPaths(qtProps.pluginPath, modInfo.pluginData.type)
- : qtProps.libraryPath;
+ : (modInfo.libDir ? modInfo.libDir : qtProps.libraryPath);
if (isFramework(modInfo, qtProps)) {
prlFilePath = FileInfo.joinPaths(prlFilePath,
libraryBaseName(modInfo, qtProps, false) + ".framework");
@@ -921,7 +925,7 @@ function extractPaths(rhs, filePath) {
function removeDuplicatedDependencyLibs(modules) {
var revDeps = {};
- var currentPath;
+ var currentPath = [];
var getLibraries;
var getLibFilePath;
@@ -935,9 +939,9 @@ function removeDuplicatedDependencyLibs(modules) {
var depmod = moduleByName[module.dependencies[j]];
if (!depmod)
continue;
- if (!revDeps[depmod])
- revDeps[depmod] = [];
- revDeps[depmod].push(module);
+ if (!revDeps[depmod.qbsName])
+ revDeps[depmod.qbsName] = [];
+ revDeps[depmod.qbsName].push(module);
}
}
}
@@ -946,7 +950,7 @@ function removeDuplicatedDependencyLibs(modules) {
var result = [];
for (i = 0; i < modules.length; ++i) {
var module = modules[i]
- if (module.dependencies.lenegth === 0)
+ if (module.dependencies.length === 0)
result.push(module);
}
return result;
@@ -956,7 +960,6 @@ function removeDuplicatedDependencyLibs(modules) {
if (currentPath.contains(module))
return;
currentPath.push(module);
-
var moduleLibraryLists = getLibraries(module);
for (var i = 0; i < moduleLibraryLists.length; ++i) {
var modLibList = moduleLibraryLists[i];
@@ -973,10 +976,11 @@ function removeDuplicatedDependencyLibs(modules) {
libs = libs.concat(moduleLibraryLists[i]);
libs.sort();
- for (i = 0; i < (revDeps[module] || []).length; ++i)
- traverse(revDeps[module][i], libs);
+ var deps = revDeps[module.qbsName];
+ for (i = 0; i < (deps || []).length; ++i)
+ traverse(deps[i], libs);
- m_currentPath.pop();
+ currentPath.pop();
}
setupReverseDependencies(modules);
@@ -1066,8 +1070,18 @@ function allQt5Modules(qtProps) {
for (k = 0; k < moduleInfo.includePaths.length; ++k) {
moduleInfo.includePaths[k] = moduleInfo.includePaths[k]
.replace("$$QT_MODULE_INCLUDE_BASE", qtProps.includePath)
+ .replace("$$QT_MODULE_HOST_LIB_BASE", qtProps.hostLibraryPath)
.replace("$$QT_MODULE_LIB_BASE", qtProps.libraryPath);
}
+ } else if (key.endsWith(".libs")) {
+ var libDirs = extractPaths(value, priFilePath);
+ if (libDirs.length === 1) {
+ moduleInfo.libDir = libDirs[0]
+ .replace("$$QT_MODULE_HOST_LIB_BASE", qtProps.hostLibraryPath)
+ .replace("$$QT_MODULE_LIB_BASE", qtProps.libraryPath);
+ } else {
+ moduleInfo.libDir = qtProps.libraryPath;
+ }
} else if (key.endsWith(".DEFINES")) {
moduleInfo.compilerDefines = splitNonEmpty(value, ' ');
} else if (key.endsWith(".VERSION")) {
diff --git a/share/qbs/modules/bundle/BundleModule.qbs b/share/qbs/modules/bundle/BundleModule.qbs
index ec0062347..f1845fe30 100644
--- a/share/qbs/modules/bundle/BundleModule.qbs
+++ b/share/qbs/modules/bundle/BundleModule.qbs
@@ -426,7 +426,8 @@ Module {
inputs.partial_infoplist[j].filePath)
|| {};
for (key in partialInfoPlist) {
- if (partialInfoPlist.hasOwnProperty(key))
+ if (partialInfoPlist.hasOwnProperty(key)
+ && !aggregatePlist.hasOwnProperty(key))
aggregatePlist[key] = partialInfoPlist[key];
}
}
diff --git a/share/qbs/modules/cpp/DarwinGCC.qbs b/share/qbs/modules/cpp/DarwinGCC.qbs
index 0bd294fb4..8f3fe72fc 100644
--- a/share/qbs/modules/cpp/DarwinGCC.qbs
+++ b/share/qbs/modules/cpp/DarwinGCC.qbs
@@ -118,8 +118,12 @@ UnixGCC {
dict["LSRequiresIPhoneOS"] = true;
if (xcode.platformType === "device") {
- if (qbs.targetOS.contains("ios"))
- dict["UIRequiredDeviceCapabilities"] = ["armv7"];
+ if (qbs.targetOS.contains("ios")) {
+ if (qbs.architecture === "arm64")
+ dict["UIRequiredDeviceCapabilities"] = ["arm64"];
+ else
+ dict["UIRequiredDeviceCapabilities"] = ["armv7"];
+ }
if (qbs.targetOS.contains("tvos"))
dict["UIRequiredDeviceCapabilities"] = ["arm64"];
@@ -195,7 +199,8 @@ UnixGCC {
env["TVOS_DEPLOYMENT_TARGET"] = minimumTvosVersion;
if (xcode.present)
- env["TARGETED_DEVICE_FAMILY"] = DarwinTools.targetedDeviceFamily(xcode.targetDevices);
+ env["TARGETED_DEVICE_FAMILY"] =
+ DarwinTools.targetedDeviceFamily(xcode.targetDevices).join(",");
return env;
}
diff --git a/src/lib/corelib/api/internaljobs.cpp b/src/lib/corelib/api/internaljobs.cpp
index c3313cc13..5cd4bd439 100644
--- a/src/lib/corelib/api/internaljobs.cpp
+++ b/src/lib/corelib/api/internaljobs.cpp
@@ -269,8 +269,11 @@ void InternalSetupProjectJob::start()
deleteLocker = true;
}
execute();
- if (m_existingProject)
+ if (m_existingProject) {
+ if (m_existingProject != m_newProject)
+ m_existingProject->makeModuleProvidersNonTransient();
m_existingProject->bgLocker = nullptr;
+ }
m_newProject->bgLocker = bgLocker;
deleteLocker = false;
} catch (const ErrorInfo &error) {
diff --git a/src/lib/corelib/buildgraph/transformer.cpp b/src/lib/corelib/buildgraph/transformer.cpp
index 0a4fa17f9..cc0b4c923 100644
--- a/src/lib/corelib/buildgraph/transformer.cpp
+++ b/src/lib/corelib/buildgraph/transformer.cpp
@@ -103,9 +103,9 @@ static QScriptValue js_children(QScriptContext *ctx, QScriptEngine *engine, cons
Q_UNUSED(ctx);
QScriptValue sv = engine->newArray();
uint idx = 0;
- for (const Artifact *parent : artifact->childArtifacts()) {
+ for (const Artifact *child : artifact->childArtifacts()) {
sv.setProperty(idx++, Transformer::translateFileConfig(static_cast<ScriptEngine *>(engine),
- parent, QString()));
+ child, QString()));
}
return sv;
}
diff --git a/src/lib/corelib/language/language.cpp b/src/lib/corelib/language/language.cpp
index 9c9313e17..d888700c5 100644
--- a/src/lib/corelib/language/language.cpp
+++ b/src/lib/corelib/language/language.cpp
@@ -622,6 +622,12 @@ QString TopLevelProject::profile() const
return projectProperties().value(StringConstants::profileProperty()).toString();
}
+void TopLevelProject::makeModuleProvidersNonTransient()
+{
+ for (ModuleProviderInfo &m : moduleProviderInfo)
+ m.transientOutput = false;
+}
+
QString TopLevelProject::buildGraphFilePath() const
{
return ProjectBuildData::deriveBuildGraphFilePath(buildDirectory, id());
@@ -637,8 +643,9 @@ void TopLevelProject::store(Logger logger)
qCDebug(lcBuildGraph) << "build graph is unchanged in project" << id();
return;
}
- for (ModuleProviderInfo &m : moduleProviderInfo)
- m.transientOutput = false;
+
+ makeModuleProvidersNonTransient();
+
const QString fileName = buildGraphFilePath();
qCDebug(lcBuildGraph) << "storing:" << fileName;
PersistentPool pool(logger);
diff --git a/src/lib/corelib/language/language.h b/src/lib/corelib/language/language.h
index 3dbe90747..65879dd56 100644
--- a/src/lib/corelib/language/language.h
+++ b/src/lib/corelib/language/language.h
@@ -707,6 +707,8 @@ public:
const QVariantMap &buildConfiguration() const { return m_buildConfiguration; }
QString id() const { return m_id; }
QString profile() const;
+ void makeModuleProvidersNonTransient();
+
QVariantMap profileConfigs;
QVariantMap overriddenValues;