diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2020-08-21 13:46:50 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2020-08-24 11:19:15 +0000 |
commit | 7f424ec15884e23ef56c7781f0a8de02ed016ae1 (patch) | |
tree | 096c118e13a5fa9b9cdbf6fa7bab8369be8354e0 /tests/auto/blackbox | |
parent | 450ccbdf8b9981d91980fd8917f428949129559d (diff) | |
download | qbs-7f424ec15884e23ef56c7781f0a8de02ed016ae1.tar.gz |
Introduce an "exportingProduct" variable
... for use in Export items.
It's not obvious that "product" refers to the exporting product, and in
fact setting it up this way pollutes the scope for modules loaded via
Export items.
Therefore, we introduce exportingProduct for symmetry with
importingProduct.
[ChangeLog] Deprecate the product variable inside Export items in favor
of the new exportingProduct variable.
Task-number: QBS-1576
Change-Id: Ie91752d1ae2160cb7701ae0167bccde0cd5c0e5d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Diffstat (limited to 'tests/auto/blackbox')
9 files changed, 16 insertions, 16 deletions
diff --git a/tests/auto/blackbox/testdata-java/java/vehicles.qbs b/tests/auto/blackbox/testdata-java/java/vehicles.qbs index 8153efe00..fa632b7b3 100644 --- a/tests/auto/blackbox/testdata-java/java/vehicles.qbs +++ b/tests/auto/blackbox/testdata-java/java/vehicles.qbs @@ -34,7 +34,7 @@ Project { Export { Depends { name: "java" } - java.manifestClassPath: [product.targetName + ".jar"] + java.manifestClassPath: [exportingProduct.targetName + ".jar"] } } @@ -50,7 +50,7 @@ Project { Export { Depends { name: "java" } - java.manifestClassPath: [product.targetName + ".jar"] + java.manifestClassPath: [exportingProduct.targetName + ".jar"] } } @@ -68,13 +68,13 @@ Project { cpp.systemIncludePaths: { var paths = importingProduct.java.jdkIncludePaths; if (Utilities.versionCompare(importingProduct.java.version, "1.8") >= 0) { - paths.push(product.buildDirectory); // generated JNI headers + paths.push(exportingProduct.buildDirectory); // generated JNI headers } return paths; } Depends { name: "java" } - java.manifestClassPath: [product.targetName + ".jar"] + java.manifestClassPath: [exportingProduct.targetName + ".jar"] } qbs.installPrefix: "" diff --git a/tests/auto/blackbox/testdata/exports-pkgconfig/exports-pkgconfig.qbs b/tests/auto/blackbox/testdata/exports-pkgconfig/exports-pkgconfig.qbs index 96d1cabb9..b855a6149 100644 --- a/tests/auto/blackbox/testdata/exports-pkgconfig/exports-pkgconfig.qbs +++ b/tests/auto/blackbox/testdata/exports-pkgconfig/exports-pkgconfig.qbs @@ -48,8 +48,8 @@ Project { condition: !someOtherCondition cpp.driverFlags: ["-pthread"] } - cpp.defines: product.name - cpp.includePaths: [FileInfo.joinPaths(product.qbs.installPrefix, "include")] + cpp.defines: exportingProduct.name + cpp.includePaths: [FileInfo.joinPaths(exportingProduct.qbs.installPrefix, "include")] Qt.core.mocName: "muck" } @@ -94,7 +94,7 @@ Project { Depends { name: "cpp" } cpp.includePaths: [ "/opt/thesecondlib/include", - product.sourceDirectory, + exportingProduct.sourceDirectory, importingProduct.buildDirectory ] property string hurz: importingProduct.name diff --git a/tests/auto/blackbox/testdata/exports-qbs/lib.qbs b/tests/auto/blackbox/testdata/exports-qbs/lib.qbs index 53a472dbb..453dac562 100644 --- a/tests/auto/blackbox/testdata/exports-qbs/lib.qbs +++ b/tests/auto/blackbox/testdata/exports-qbs/lib.qbs @@ -38,8 +38,8 @@ DynamicLibrary { Export { Depends { name: "cpp" } - property string includeDir: product.sourceDirectory - property var config: product.config + property string includeDir: exportingProduct.sourceDirectory + property var config: exportingProduct.config Properties { condition: true cpp.includePaths: [includeDir] @@ -52,7 +52,7 @@ DynamicLibrary { condition: true prefixMapping: [{ prefix: includeDir, - replacement: FileInfo.joinPaths(qbs.installPrefix, product.headersInstallDir) + replacement: FileInfo.joinPaths(qbs.installPrefix, exportingProduct.headersInstallDir) }] } } diff --git a/tests/auto/blackbox/testdata/exports-qbs/tool.qbs b/tests/auto/blackbox/testdata/exports-qbs/tool.qbs index 655597cf7..cea46d3fd 100644 --- a/tests/auto/blackbox/testdata/exports-qbs/tool.qbs +++ b/tests/auto/blackbox/testdata/exports-qbs/tool.qbs @@ -33,7 +33,7 @@ CppApplication { } Export { - property stringList toolTags: product.toolTags + property stringList toolTags: exportingProduct.toolTags property stringList outTags: [importingProduct.outTag] property var helper2Obj: Helper2 Rule { diff --git a/tests/auto/blackbox/testdata/installable-as-auxiliary-input/installable-as-auxiliary-input.qbs b/tests/auto/blackbox/testdata/installable-as-auxiliary-input/installable-as-auxiliary-input.qbs index 1fa8f5e47..c34b0ca74 100644 --- a/tests/auto/blackbox/testdata/installable-as-auxiliary-input/installable-as-auxiliary-input.qbs +++ b/tests/auto/blackbox/testdata/installable-as-auxiliary-input/installable-as-auxiliary-input.qbs @@ -48,7 +48,7 @@ Project { Export { Depends { name: "cpp" } - cpp.includePaths: FileInfo.joinPaths(qbs.installRoot, product.installDir); + cpp.includePaths: FileInfo.joinPaths(qbs.installRoot, exportingProduct.installDir); } Rule { diff --git a/tests/auto/blackbox/testdata/productproperties/header.qbs b/tests/auto/blackbox/testdata/productproperties/header.qbs index 42f9c88d9..13a62035f 100644 --- a/tests/auto/blackbox/testdata/productproperties/header.qbs +++ b/tests/auto/blackbox/testdata/productproperties/header.qbs @@ -29,6 +29,6 @@ Product { Export { Depends { name: "cpp" } - cpp.includePaths: product.buildDirectory + cpp.includePaths: exportingProduct.buildDirectory } } diff --git a/tests/auto/blackbox/testdata/property-evaluation-context/property-evaluation-context.qbs b/tests/auto/blackbox/testdata/property-evaluation-context/property-evaluation-context.qbs index 28216c150..ede32cf74 100644 --- a/tests/auto/blackbox/testdata/property-evaluation-context/property-evaluation-context.qbs +++ b/tests/auto/blackbox/testdata/property-evaluation-context/property-evaluation-context.qbs @@ -4,7 +4,7 @@ Project { name: "mylib" Export { Depends { name: "top" } - top.productInExport: product.name + top.productInExport: exportingProduct.name } } diff --git a/tests/auto/blackbox/testdata/scan-result-in-other-product/lib/lib.qbs b/tests/auto/blackbox/testdata/scan-result-in-other-product/lib/lib.qbs index fe2916714..a6ed0c990 100644 --- a/tests/auto/blackbox/testdata/scan-result-in-other-product/lib/lib.qbs +++ b/tests/auto/blackbox/testdata/scan-result-in-other-product/lib/lib.qbs @@ -2,6 +2,6 @@ Product { files: "lib.h" Export { Depends { name: "cpp" } - cpp.includePaths: product.sourceDirectory + cpp.includePaths: exportingProduct.sourceDirectory } } diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index f9777d90b..b08df0a9e 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -3984,7 +3984,7 @@ void TestBlackbox::exportsQbs() // Change tracking for accesses to product.exports (positive). WAIT_FOR_NEW_TIMESTAMP(); - REPLACE_IN_FILE("tool.qbs", "product.toolTags", "[]"); + REPLACE_IN_FILE("tool.qbs", "exportingProduct.toolTags", "[]"); QCOMPARE(runQbs(QStringList({"-p", "MyTool"})), 0); QVERIFY2(m_qbsStdout.contains("Creating MyTool.qbs"), m_qbsStdout.constData()); } |