aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2020-03-26 12:44:33 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2020-03-30 12:26:55 +0000
commit59d00bf838ab2d1fbfe29843febbd8c28b29a8d8 (patch)
treea8825a837d5a3fe1774847717982beb340cc5787
parentee44dae4f53d3c3fd16025c8d717f25084313070 (diff)
Do not use app.qmltypes anymore
Task-number: QTBUG-82710 Change-Id: Ibb7c94c4f5de7ecc2dc45634a31d88b3cf55b881 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--doc/reference/modules/qt-qml-module.qdoc5
-rw-r--r--share/qbs/module-providers/Qt/templates/qml.qbs2
-rw-r--r--tests/auto/blackbox/tst_blackboxqt.cpp4
3 files changed, 6 insertions, 5 deletions
diff --git a/doc/reference/modules/qt-qml-module.qdoc b/doc/reference/modules/qt-qml-module.qdoc
index 3d5758fc3..ba8dddf2f 100644
--- a/doc/reference/modules/qt-qml-module.qdoc
+++ b/doc/reference/modules/qt-qml-module.qdoc
@@ -98,8 +98,9 @@
\qmlproperty string Qt.qml::typesFileName
Specifies the name of the file that declares the types registered for this product.
- Per default, it is called "app.qmltypes" for applications and "plugins.qmltypes"
- otherwise.
+ For applications, the default value is \c{<name>.qmltypes},
+ where \c{<name>} is the product's \l{Product::targetName}{target name}.
+ Otherwise, the default value is "plugins.qmltypes".
\note The naming conventions are still in flux.
When in doubt, consult the Qt documentation.
diff --git a/share/qbs/module-providers/Qt/templates/qml.qbs b/share/qbs/module-providers/Qt/templates/qml.qbs
index f6d3fbb1f..c63937649 100644
--- a/share/qbs/module-providers/Qt/templates/qml.qbs
+++ b/share/qbs/module-providers/Qt/templates/qml.qbs
@@ -66,7 +66,7 @@ QtModule {
readonly property stringList _importVersionParts: (importVersion || "").split(".")
property string typesFileName: {
if (product.type && product.type.contains("application"))
- return "app.qmltypes";
+ return product.targetName + ".qmltypes";
return "plugins.qmltypes";
}
property string typesInstallDir
diff --git a/tests/auto/blackbox/tst_blackboxqt.cpp b/tests/auto/blackbox/tst_blackboxqt.cpp
index 33d0ba1b8..68e344a9a 100644
--- a/tests/auto/blackbox/tst_blackboxqt.cpp
+++ b/tests/auto/blackbox/tst_blackboxqt.cpp
@@ -412,9 +412,9 @@ void TestBlackboxQt::qmlTypeRegistrar()
QCOMPARE(m_qbsStdout.contains("running qmltyperegistrar"), enabled);
QCOMPARE(m_qbsStdout.contains("compiling myapp_qmltyperegistrations.cpp"), enabled);
const QString buildDir = relativeProductBuildDir("myapp");
- QCOMPARE(regularFileExists(buildDir + "/app.qmltypes"), enabled);
+ QCOMPARE(regularFileExists(buildDir + "/myapp.qmltypes"), enabled);
QCOMPARE(regularFileExists(relativeBuildDir() + "/install-root/" + installDir
- + "/app.qmltypes"), enabled && !installDir.isEmpty());
+ + "/myapp.qmltypes"), enabled && !installDir.isEmpty());
}
void TestBlackboxQt::qtKeywords()