diff options
-rw-r--r-- | doc/reference/modules/qt-qml-module.qdoc | 5 | ||||
-rw-r--r-- | share/qbs/module-providers/Qt/templates/qml.qbs | 2 | ||||
-rw-r--r-- | tests/auto/blackbox/tst_blackboxqt.cpp | 4 |
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() |