From 95dd760fd77567e6809713bc87dd2830e42c4061 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 10 May 2019 15:26:48 +0200 Subject: Documentation: Fix two typos Change-Id: Id352796fbf535e381bafd7f98dd5a53b785f9064 Reviewed-by: Joerg Bornemann --- doc/reference/modules/qt-plugin_support-module.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. */ -- cgit v1.2.3 From c84efda483e0333e7963f260ea4eae42a8df4f50 Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Wed, 15 May 2019 00:04:31 +0200 Subject: Fix generation of the default Info.plist when building for iOS Task-number: QBS-1447 Change-Id: Icdd94b7731d1c84a225c53f780e339f9c7034320 Reviewed-by: Christian Kandeler --- share/qbs/imports/qbs/DarwinTools/darwin-tools.js | 2 +- share/qbs/modules/cpp/DarwinGCC.qbs | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) 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/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; } -- cgit v1.2.3 From 42c99ec8f78b3581c3b766d9867ea8797d068280 Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Wed, 15 May 2019 20:21:49 +0200 Subject: Do not override properties that are present in user plist Fixes: QBS-1447 Change-Id: Ie03530e960cbcf0ab14a9cb501a169aec311ec1a Reviewed-by: Christian Kandeler --- share/qbs/modules/bundle/BundleModule.qbs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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]; } } -- cgit v1.2.3 From e83b69a500f8ddd21d63f5fe731439022d3ed110 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 20 May 2019 17:59:39 +0300 Subject: Transformer: Fix wrong variable name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Amends commit f4f443a16a342300638d364175cf2958279cf23f. Change-Id: Ied9bd9188e719657228a53b7a7f1baca86c1bd71 Reviewed-by: Ivan Komissarov Reviewed-by: Jörg Bornemann --- src/lib/corelib/buildgraph/transformer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/corelib/buildgraph/transformer.cpp b/src/lib/corelib/buildgraph/transformer.cpp index cf632463d..d737e908b 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(engine), - parent, QString())); + child, QString())); } return sv; } -- cgit v1.2.3 From 4e3f44504e09c4a38298e3eeed84083c577363b2 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 22 May 2019 17:50:02 +0200 Subject: Fix module provider bug in IDE mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When re-resolving a project with an existing in-memory build graph, we must make sure that the old project object does not remove the generated modules from the build directory in its destructor. This fixes the following bug in Qt Creator: - Open a project initially (but do not build). - Edit the project file and re-resolve. - Build the project. This now fails, because the generated modules were erroneously removed in step 2. Change-Id: If6c1c1ed986e8f00e4d89ba5525bac7e032388d9 Reviewed-by: Jörg Bornemann --- src/lib/corelib/api/internaljobs.cpp | 5 ++++- src/lib/corelib/language/language.cpp | 11 +++++++++-- src/lib/corelib/language/language.h | 2 ++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/lib/corelib/api/internaljobs.cpp b/src/lib/corelib/api/internaljobs.cpp index 4d06821fd..f07927c71 100644 --- a/src/lib/corelib/api/internaljobs.cpp +++ b/src/lib/corelib/api/internaljobs.cpp @@ -268,8 +268,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/language/language.cpp b/src/lib/corelib/language/language.cpp index 239eddf1f..f21f724f1 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 82d9f94a2..297fedf1c 100644 --- a/src/lib/corelib/language/language.h +++ b/src/lib/corelib/language/language.h @@ -711,6 +711,8 @@ public: const QVariantMap &buildConfiguration() const { return m_buildConfiguration; } QString id() const { return m_id; } QString profile() const; + void makeModuleProvidersNonTransient(); + QVariantMap profileConfigs; QVariantMap overriddenValues; -- cgit v1.2.3 From bc8254e5423d775f162ff0b89cf2229ecd4d08a8 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 22 May 2019 11:31:12 +0200 Subject: Qt Support: Fix dependency de-duplication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This functionality broke completely in c4e60ed828, which went unnoticed because it turned into a no-op rather than causing an error. As a result, Qt libraries tended to appear more than once on the linker command line. Task-number: QBS-1441 Change-Id: Ic2634b4501f0360a1adb13aa847e34e9d38674f7 Reviewed-by: Ola Røer Thorsen Reviewed-by: Jörg Bornemann --- share/qbs/module-providers/Qt/setup-qt.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/share/qbs/module-providers/Qt/setup-qt.js b/share/qbs/module-providers/Qt/setup-qt.js index b3044d72e..318a141c9 100644 --- a/share/qbs/module-providers/Qt/setup-qt.js +++ b/share/qbs/module-providers/Qt/setup-qt.js @@ -417,8 +417,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; @@ -921,7 +923,7 @@ function extractPaths(rhs, filePath) { function removeDuplicatedDependencyLibs(modules) { var revDeps = {}; - var currentPath; + var currentPath = []; var getLibraries; var getLibFilePath; @@ -935,9 +937,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 +948,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 +958,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 +974,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); -- cgit v1.2.3 From 386f70fabd7a7741c303c1c58c259adfad6d2ee6 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 10 May 2019 14:59:59 +0200 Subject: Qt Support: Properly handle host libs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We did not take into account that these might be located in a different place than the target libs. Change-Id: I2c27b6be6c8962416f1c062cd1d51ebed45f1796 Fixes: QBS-1445 Reviewed-by: Ola Røer Thorsen Reviewed-by: Jörg Bornemann --- share/qbs/module-providers/Qt/setup-qt.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/share/qbs/module-providers/Qt/setup-qt.js b/share/qbs/module-providers/Qt/setup-qt.js index 318a141c9..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"); @@ -443,6 +444,7 @@ function makeQtModuleInfo(name, qbsName, deps) { moduleInfo.frameworkPathsDebug = []; moduleInfo.frameworkPathsRelease = []; moduleInfo.libraryPaths = []; + moduleInfo.libDir = ""; moduleInfo.config = []; moduleInfo.supportedPluginTypes = []; moduleInfo.pluginData = makePluginData(); @@ -628,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"); @@ -1068,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")) { -- cgit v1.2.3 From 8cd4b8cec7ffda0b19b01129e96eda8d2fb75ec0 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 23 May 2019 16:12:01 +0200 Subject: Add change log for 1.13.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2d1f0704385d3ba863a832f74718068c0d00ca6d Reviewed-by: Jörg Bornemann --- changelogs/changes-1.13.1.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 changelogs/changes-1.13.1.md 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). -- cgit v1.2.3