aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-01-13 12:01:09 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2017-01-16 15:05:37 +0000
commitdaba88c2c7c11fc7d58336afd7f045ea3ed02a3f (patch)
tree7b9cbdea78cb7db30d43ab64d2967ce22f6bacfb
parent67a9f23096ca534e73b549ea853114c4532400d1 (diff)
Fix outdated code construct in QtPlugin.qbs
Artifact.filePath is evaluated at build time these days. Task-number: QBS-1094 Change-Id: If0e4358973d56e58c99e6765f6a9e124e48d07f6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--src/lib/qtprofilesetup/templates/QtPlugin.qbs2
-rw-r--r--tests/auto/blackbox/testdata/static-qt-plugin-linking/static-qt-plugin-linking.qbs16
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp8
-rw-r--r--tests/auto/blackbox/tst_blackbox.h1
4 files changed, 26 insertions, 1 deletions
diff --git a/src/lib/qtprofilesetup/templates/QtPlugin.qbs b/src/lib/qtprofilesetup/templates/QtPlugin.qbs
index 9a916f695..dceb8ef6e 100644
--- a/src/lib/qtprofilesetup/templates/QtPlugin.qbs
+++ b/src/lib/qtprofilesetup/templates/QtPlugin.qbs
@@ -12,7 +12,7 @@ QtModule {
multiplex: true
Artifact {
filePath: product.targetName + "_qt_plugin_import_"
- + parent.parent.qtModuleName + ".cpp"
+ + product.moduleProperty(product.moduleName, "qtModuleName") + ".cpp"
fileTags: "cpp"
}
diff --git a/tests/auto/blackbox/testdata/static-qt-plugin-linking/static-qt-plugin-linking.qbs b/tests/auto/blackbox/testdata/static-qt-plugin-linking/static-qt-plugin-linking.qbs
new file mode 100644
index 000000000..b0e36dee0
--- /dev/null
+++ b/tests/auto/blackbox/testdata/static-qt-plugin-linking/static-qt-plugin-linking.qbs
@@ -0,0 +1,16 @@
+import qbs
+
+StaticLibrary {
+ Probe {
+ id: staticQtChecker
+ property bool staticQt: Qt.core.staticBuild
+ configure: {
+ found = staticQt;
+ if (found)
+ console.info("Qt is static");
+ }
+ }
+
+ Depends { name: "Qt.core" }
+ Depends { name: "Qt.qminimal"; condition: Qt.core.staticBuild; }
+}
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index 2bb056358..985587faf 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -165,6 +165,14 @@ void TestBlackbox::sevenZip()
QVERIFY2(output.contains("archivable.qbs"), output.constData());
}
+void TestBlackbox::staticQtPluginLinking()
+{
+ QDir::setCurrent(testDataDir + "/static-qt-plugin-linking");
+ QCOMPARE(runQbs(), 0);
+ const bool isStaticQt = m_qbsStdout.contains("Qt is static");
+ QVERIFY2(m_qbsStdout.contains("Creating static import") == isStaticQt, m_qbsStdout.constData());
+}
+
void TestBlackbox::suspiciousCalls()
{
const QString projectDir = testDataDir + "/suspicious-calls";
diff --git a/tests/auto/blackbox/tst_blackbox.h b/tests/auto/blackbox/tst_blackbox.h
index b8d93b5cf..15627b081 100644
--- a/tests/auto/blackbox/tst_blackbox.h
+++ b/tests/auto/blackbox/tst_blackbox.h
@@ -171,6 +171,7 @@ private slots:
void renameDependency();
void separateDebugInfo();
void sevenZip();
+ void staticQtPluginLinking();
void suspiciousCalls();
void suspiciousCalls_data();
void systemRunPaths();