aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2023-09-08 12:53:14 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2023-09-08 12:55:13 +0200
commit2a07602a11217293a67f072130f24eaf6139f754 (patch)
tree3c0be48869adc051a4bde95a4b76a2513c9f22de
parent05923d13b5272924105576ca215a038f8b554ead (diff)
parent40d304808479ea72c1d02dacf007ab8b05851e2e (diff)
Merge 2.1 into master
-rw-r--r--changelogs/changes-2.1.2.md7
-rw-r--r--doc/reference/items/convenience/appleapplicationdiskimage.qdoc7
-rw-r--r--doc/reference/items/language/group.qdoc28
-rw-r--r--doc/reference/module-providers/qbspkgconfig-module-provider.qdoc2
-rw-r--r--doc/reference/modules/qt-core-module.qdoc42
-rw-r--r--share/qbs/imports/qbs/base/AppleApplicationDiskImage.qbs3
-rw-r--r--share/qbs/modules/dmg/dmg.js13
-rw-r--r--src/lib/corelib/language/scriptengine.cpp3
-rw-r--r--src/lib/corelib/loader/moduleproviderloader.cpp1
-rw-r--r--tests/auto/blackbox/testdata-apple/apple-dmg/apple-dmg.qbs8
-rw-r--r--tests/auto/blackbox/testdata-apple/apple-dmg/ko_KR.lproj/eula.rtf49
-rw-r--r--tests/auto/blackbox/testdata-apple/apple-dmg/ru_RU.lproj/eula.txt6
-rw-r--r--tests/auto/blackbox/testdata-providers/module-providers/module-providers.qbs3
13 files changed, 90 insertions, 82 deletions
diff --git a/changelogs/changes-2.1.2.md b/changelogs/changes-2.1.2.md
index 779f3fc5a..7b059e10d 100644
--- a/changelogs/changes-2.1.2.md
+++ b/changelogs/changes-2.1.2.md
@@ -1,9 +1,16 @@
# General
* Fixed handling JS floating-point values for x86.
+* Fixed scope pollution and potential crash when assigning to provider properties (QBS-1747).
+* Fixed potential access to freed JSValues (QBS-1751).
# Apple
* Fixed bundle module with Xcode-less profiles.
* Fixed ApplicationExtension with Xcode-less profiles.
+# Infrastructure
+* Added CI job to be able to test XCode-less profiles on macOS.
+
# Contributors
+* Christian Kandeler
* Dmitry Shachnev
+* Ivan Komissarov
diff --git a/doc/reference/items/convenience/appleapplicationdiskimage.qdoc b/doc/reference/items/convenience/appleapplicationdiskimage.qdoc
index 8db7bc4db..d1fa15052 100644
--- a/doc/reference/items/convenience/appleapplicationdiskimage.qdoc
+++ b/doc/reference/items/convenience/appleapplicationdiskimage.qdoc
@@ -77,10 +77,11 @@
The base directory from which artifacts installed into the disk image will be copied.
This directory is always considered to be relative to \l{qbs::installRoot}
- {qbs.installRoot}.
+ {qbs.installRoot}/\l{qbs::installPrefix}
+ {qbs.installPrefix}.
For example, if the application Example.app exists at
- \c{qbs.installRoot/Applications/Example.app}, and the value of this property
- is \c{"/Applications"}, the application will be located at\c{/Example.app}
+ \c{qbs.installRoot/qbs.installPrefix/Applications/Example.app}, and the value of this property
+ is \c{"/Applications"}, the application will be located at \c{/Example.app}
relative to the disk image root. Therefore, its full path when the disk
image is mounted would be something like \c{/Volumes/Example-1.0/Example.app}.
diff --git a/doc/reference/items/language/group.qdoc b/doc/reference/items/language/group.qdoc
index c9b6dd1cf..fa6784ca6 100644
--- a/doc/reference/items/language/group.qdoc
+++ b/doc/reference/items/language/group.qdoc
@@ -74,10 +74,13 @@
}
}
\endcode
- When specifying files, you can use the wildcards "*", "?" and "[]", which have their usual meaning.
- By default, matching files are only picked up directly from the parent directory, but you can tell \QBS to
- consider the whole directory tree. It is also possible to exclude certain files from the list.
- The pattern ** used in a pathname expansion context will match all files and zero or more
+ When specifying files, you can use the wildcards \c "*", \c "?" and \c "[]", which
+ have their
+ \l{https://en.wikipedia.org/wiki/Wildcard_character#File_and_directory_patterns}{usual meaning}
+ as in Unix Shell. By default, matching files are only picked up directly from the
+ parent directory, but you can tell \QBS to consider the whole directory tree.
+ It is also possible to exclude certain files from the list.
+ The pattern \c "**" used in a pathname expansion context will match all files and zero or more
directories and subdirectories.
For example:
\snippet reference/items/language/group.qbs 0
@@ -114,13 +117,15 @@
*/
/*!
- \qmlproperty list Group::files
+ \qmlproperty pathList Group::files
The files in the group. Mutually exclusive with \l{fileTagsFilter}.
Relative paths are resolved using the parent directory of the file
that contains the Group item. However, if the \l{prefix} property is set to
an absolute path, then that one becomes the base directory.
+ The values can contain wildcards.
+
\defaultvalue An empty list
*/
@@ -146,7 +151,7 @@
*/
/*!
- \qmlproperty list Group::fileTagsFilter
+ \qmlproperty stringList Group::fileTagsFilter
List of \l{Artifact::fileTags}{artifact.fileTags} to match. Any properties
set in this group will be applied to the product's artifacts whose file tags
@@ -170,7 +175,7 @@
*/
/*!
- \qmlproperty list Group::fileTags
+ \qmlproperty stringList Group::fileTags
A list of file tags to attach to the group's files. These can then be
matched by a \l{Rule}{rule}.
@@ -196,10 +201,13 @@
*/
/*!
- \qmlproperty list Group::excludeFiles
+ \qmlproperty pathList Group::excludeFiles
+
+ A list of files that are \e subtracted from the \l{files} list.
- A list of files that are \e subtracted from the files list. Useful when
- using wildcards.
+ The values can contain wildcards.
+
+ This property is ignored if \l{fileTagsFilter} is set.
\defaultvalue An empty list
*/
diff --git a/doc/reference/module-providers/qbspkgconfig-module-provider.qdoc b/doc/reference/module-providers/qbspkgconfig-module-provider.qdoc
index e48be1633..461536fbc 100644
--- a/doc/reference/module-providers/qbspkgconfig-module-provider.qdoc
+++ b/doc/reference/module-providers/qbspkgconfig-module-provider.qdoc
@@ -100,7 +100,7 @@
Setting this property to \c undefined or empty (\c "") value will use pkg-config's default
search paths:
\code
- qbs build module-providers.pkgconfig.sysroot:undefined
+ qbs resolve moduleProviders.qbspkgconfig.sysroot:undefined
\endcode
This property is the equivalent of the \c{PKG_CONFIG_SYSROOT_DIR} variable for the
diff --git a/doc/reference/modules/qt-core-module.qdoc b/doc/reference/modules/qt-core-module.qdoc
index afc4a0f11..2211c4be6 100644
--- a/doc/reference/modules/qt-core-module.qdoc
+++ b/doc/reference/modules/qt-core-module.qdoc
@@ -211,6 +211,32 @@
*/
/*!
+ \qmlproperty string Qt.core::generatedHeadersDir
+
+ The directory where tools that generate headers (such as \c moc or \c uic) put resulting
+ files.
+
+ Normally, you don't need to change this property. The one use-case is when there are several
+ files with the same file name in the Product. The file name produced by \c moc is based
+ only on the source file's base file name (without the directory path) which leads to a conflict
+ in the mentioned case. You can resolve the conflict by setting this property to a non-default
+ value for one of the files. For example:
+
+ \code
+ QtApplication {
+ files: ["my_cool_header.h", "main.cpp"]
+ Group {
+ name: "legacy"
+ files: "legacy/my_cool_header.h"
+ Qt.core.generatedHeadersDir: "qt.legacy.headers"
+ }
+ }
+ \endcode
+
+ \defaultvalue \c product.buildDirectory + "/qt.headers"
+*/
+
+/*!
\qmlproperty bool Qt.core::metaTypesInstallDir
The directory to install the metatypes file into. If this property is empty or undefined,
@@ -352,6 +378,14 @@
*/
/*!
+ \qmlproperty string Qt.core::qdocOutputDir
+
+ The directory name where the \c qdoc tool writes its output.
+
+ \defaultvalue \c{product.buildDirectory + "/qdoc_html"}
+*/
+
+/*!
\qmlproperty string Qt.core::qmBaseName
The base name of the \c .qm file to be built from the \c .ts files in the
@@ -363,6 +397,14 @@
*/
/*!
+ \qmlproperty string Qt.core::qmDir
+
+ The directory name where to put the \c .qm file to be built.
+
+ \defaultvalue \l{Product::destinationDirectory}{product.destinationDirectory}
+*/
+
+/*!
\qmlproperty string Qt.core::qtBuildVariant
Specifies the type of Qt libraries to build against: \c "debug" or
diff --git a/share/qbs/imports/qbs/base/AppleApplicationDiskImage.qbs b/share/qbs/imports/qbs/base/AppleApplicationDiskImage.qbs
index 6491bf14a..462b96b7c 100644
--- a/share/qbs/imports/qbs/base/AppleApplicationDiskImage.qbs
+++ b/share/qbs/imports/qbs/base/AppleApplicationDiskImage.qbs
@@ -34,7 +34,8 @@ import qbs.ModUtils
AppleDiskImage {
property string sourceBase: "/Applications"
- readonly property string absoluteSourceBase: FileInfo.joinPaths(qbs.installRoot, sourceBase)
+ readonly property string absoluteSourceBase:
+ FileInfo.joinPaths(qbs.installRoot, qbs.installPrefix, sourceBase)
property stringList symlinks: ["/Applications:Applications"]
readonly property string stageDirectory: FileInfo.joinPaths(destinationDirectory, "Volumes", dmg.volumeName)
diff --git a/share/qbs/modules/dmg/dmg.js b/share/qbs/modules/dmg/dmg.js
index 4bd735e90..06fe7b906 100644
--- a/share/qbs/modules/dmg/dmg.js
+++ b/share/qbs/modules/dmg/dmg.js
@@ -135,7 +135,7 @@ function dmgbuildSettings(product, inputs) {
}
});
- return {
+ var result = {
"title": product.dmg.volumeName,
"icon": !product.dmg.badgeVolumeIcon ? volumeIcon : undefined,
"badge-icon": product.dmg.badgeVolumeIcon ? volumeIcon : undefined,
@@ -154,13 +154,16 @@ function dmgbuildSettings(product, inputs) {
},
"format": product.dmg.format,
"compression-level": product.dmg.compressionLevel,
- "build_license": {
+ "contents": contentsArray
+ };
+ if (licenseFileObjects.length >= 0) {
+ result["license"] = {
"default-language": product.dmg.defaultLicenseLocale,
"licenses": reduceLicensesForKey(licenseFileObjects, "licenses"),
"buttons": reduceLicensesForKey(licenseFileObjects, "buttons")
- },
- "contents": contentsArray
- };
+ };
+ }
+ return result;
}
function prepareLicense(project, product, inputs, outputs, input, output) {
diff --git a/src/lib/corelib/language/scriptengine.cpp b/src/lib/corelib/language/scriptengine.cpp
index a89949bf4..d655c0073 100644
--- a/src/lib/corelib/language/scriptengine.cpp
+++ b/src/lib/corelib/language/scriptengine.cpp
@@ -1080,8 +1080,7 @@ ScriptEngine::Importer::Importer(
ScriptEngine::Importer::~Importer()
{
- if (m_engine.m_observeMode == ObserveMode::Enabled)
- m_engine.m_requireResults.clear();
+ m_engine.m_requireResults.clear();
m_engine.m_currentDirPathStack.pop();
m_engine.m_extensionSearchPathsStack.pop();
m_engine.uninstallImportFunctions();
diff --git a/src/lib/corelib/loader/moduleproviderloader.cpp b/src/lib/corelib/loader/moduleproviderloader.cpp
index 9ab1fd14f..1d4af1896 100644
--- a/src/lib/corelib/loader/moduleproviderloader.cpp
+++ b/src/lib/corelib/loader/moduleproviderloader.cpp
@@ -221,6 +221,7 @@ void ModuleProviderLoader::setupModuleProviderConfig(ProductContext &product)
continue;
}
case Value::JSSourceValueType: {
+ it.value()->setScope(item->scope(), {});
const ScopedJsValue sv(m_loaderState.evaluator().engine()->context(),
m_loaderState.evaluator().value(item, it.key()));
value = getJsVariant(m_loaderState.evaluator().engine()->context(), sv);
diff --git a/tests/auto/blackbox/testdata-apple/apple-dmg/apple-dmg.qbs b/tests/auto/blackbox/testdata-apple/apple-dmg/apple-dmg.qbs
index b3d39fe27..ff77afbe0 100644
--- a/tests/auto/blackbox/testdata-apple/apple-dmg/apple-dmg.qbs
+++ b/tests/auto/blackbox/testdata-apple/apple-dmg/apple-dmg.qbs
@@ -63,9 +63,9 @@ Project {
name: "custom-buttons"
Group {
- files: ["ru_RU.lproj/eula.txt"]
- dmg.licenseLocale: "sv_SE" // override auto-detected ru_RU with sv_SE
- dmg.licenseLanguageName: "Swedish, not Russian"
+ files: ["de_DE.lproj/eula.txt"]
+ dmg.licenseLocale: "sv_SE" // override auto-detected de_DE with sv_SE
+ dmg.licenseLanguageName: "Swedish, not Deutsch"
dmg.licenseAgreeButtonText: "Of course"
dmg.licenseDisagreeButtonText: "Never!"
dmg.licensePrintButtonText: "Make Paper"
@@ -75,7 +75,7 @@ Project {
Group {
files: ["*.lproj/**"]
- excludeFiles: ["ru_RU.lproj/eula.txt"]
+ excludeFiles: ["de_DE.lproj/eula.txt"]
}
}
}
diff --git a/tests/auto/blackbox/testdata-apple/apple-dmg/ko_KR.lproj/eula.rtf b/tests/auto/blackbox/testdata-apple/apple-dmg/ko_KR.lproj/eula.rtf
deleted file mode 100644
index 5b7c49d56..000000000
--- a/tests/auto/blackbox/testdata-apple/apple-dmg/ko_KR.lproj/eula.rtf
+++ /dev/null
@@ -1,49 +0,0 @@
-{\rtf1\ansi\ansicpg1252\cocoartf1265
-{\fonttbl\f0\fnil\fcharset129 AppleSDGothicNeo-Regular;\f1\fswiss\fcharset0 Helvetica;}
-{\colortbl;\red255\green255\blue255;}
-\margl1440\margr1440\vieww10800\viewh8400\viewkind0
-\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
-
-\f0\b\fs24 \cf0 \'c7\'e3\'b1\'b8
-\f1 CORPORATION\
-
-\f0 \'bc\'d2\'c7\'c1\'c6\'ae\'bf\'fe\'be\'ee
-\f1
-\f0 \'bf\'b9
-\f1
-\f0 \'b0\'e8\'be\'e0
-\f1\b0 \
-\
-
-\f0 \'b4\'e7\'bd\'c5\'c0\'ba
-\f1
-\f0 \'b4\'e7\'bd\'c5\'c0\'cc
-\f1
-\f0 \'c7\'d9\'b9\'ab\'b1\'e2\'b8\'a6
-\f1
-\f0 \'b8\'b8\'b5\'e9\'b1\'e2
-\f1
-\f0 \'c0\'a7\'c7\'d8\'c0\'cc
-\f1
-\f0 \'c0\'c0\'bf\'eb
-\f1
-\f0 \'c7\'c1\'b7\'ce\'b1\'d7\'b7\'a5\'c0\'bb
-\f1
-\f0 \'bb\'e7\'bf\'eb\'c7\'cf\'c1\'f6
-\f1
-\f0 \'be\'ca\'c0\'bb
-\f1
-\f0 \'b0\'cd\'bf\'a1
-\f1
-\f0 \'b5\'bf\'c0\'c7\'c7\'d5\'b4\'cf\'b4\'d9
-\f1 .\
-\
-
-\f0 \'b4\'e7\'bd\'c5\'c0\'ba
-\f1 QBS
-\f0 \'b0\'a1
-\f1
-\f0 \'c3\'d6\'b0\'ed\'b6\'f3\'b0\'ed
-\f1
-\f0 \'b5\'bf\'c0\'c7\'c7\'d5\'b4\'cf\'b4\'d9
-\f1 .} \ No newline at end of file
diff --git a/tests/auto/blackbox/testdata-apple/apple-dmg/ru_RU.lproj/eula.txt b/tests/auto/blackbox/testdata-apple/apple-dmg/ru_RU.lproj/eula.txt
deleted file mode 100644
index e2b7adbed..000000000
--- a/tests/auto/blackbox/testdata-apple/apple-dmg/ru_RU.lproj/eula.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-FICTIONAL CORPORATION
-SOFTWARE EXAMPLE AGREEMENT
-
-You agree that you will not use this app to make nuclear weapons.
-
-You agree that Qbs is the best.
diff --git a/tests/auto/blackbox/testdata-providers/module-providers/module-providers.qbs b/tests/auto/blackbox/testdata-providers/module-providers/module-providers.qbs
index e83c80bb1..89bd1a11d 100644
--- a/tests/auto/blackbox/testdata-providers/module-providers/module-providers.qbs
+++ b/tests/auto/blackbox/testdata-providers/module-providers/module-providers.qbs
@@ -10,10 +10,11 @@ Project {
readonly property string beginning: "beginning"
CppApplication {
name: "app1"
+ property string chooseLettersFrom: project.beginning // This indirection tests QBS-1747.
Depends { name: "mygenerator.module1" }
Depends { name: "mygenerator.module2" }
Depends { name: "othergenerator" }
- moduleProviders.mygenerator.chooseLettersFrom: project.beginning
+ moduleProviders.mygenerator.chooseLettersFrom: chooseLettersFrom
moduleProviders.othergenerator.someDefines: name
files: "main.cpp"
}