Deprecate qmlplugindump

You should use qmltyperegistrar these days.

[ChangeLog][QML][Important Behavior Changes] qmlplugindump is
deprecated. Instead of using qmlplugindump to generate qmltypes files by
loading and analyzing the pre-built plugins, you should declare your QML
types using QML_ELEMENT and friends. Then you can automatically generate
the qmltypes files at compile time using qmltyperegistrar.

Fixes: QTBUG-91089
Change-Id: Iebd1b71a8e36c311d1590cb10128f9fc6d5e318c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Ulf Hermann 2021-02-11 18:32:20 +01:00
parent 4cc91a6a0e
commit 953ea29328
5 changed files with 15 additions and 0 deletions

View File

@ -5,6 +5,8 @@ import QtQuick.tooling 1.2
//
// This file was auto-generated by:
// 'qmlplugindump -nonrelocatable -noforceqtquick dumper.Dummy 1.0 .'
//
// qmlplugindump is deprecated! You should use qmltyperegistrar instead.
Module {
Component {

View File

@ -5,6 +5,8 @@ import QtQuick.tooling 1.2
//
// This file was auto-generated by:
// 'qmlplugindump -nonrelocatable -noforceqtquick dumper.ExtendedType 1.1 .'
//
// qmlplugindump is deprecated! You should use qmltyperegistrar instead.
Module {
Component {

View File

@ -5,6 +5,8 @@ import QtQuick.tooling 1.2
//
// This file was auto-generated by:
// 'qmlplugindump -nonrelocatable -noforceqtquick dumper.Imports 1.0 .'
//
// qmlplugindump is deprecated! You should use qmltyperegistrar instead.
Module {
Component {

View File

@ -5,6 +5,8 @@ import QtQuick.tooling 1.2
//
// This file was auto-generated by:
// 'qmlplugindump -nonrelocatable -noforceqtquick dumper.Versions 1.1 .'
//
// qmlplugindump is deprecated! You should use qmltyperegistrar instead.
Module {
Component {

View File

@ -1157,6 +1157,11 @@ int main(int argc, char *argv[])
}
}
std::cerr << "qmlplugindump is deprecated.\n"
<< "Please declare your types using QML_ELEMENT and related macros.\n"
<< "Then utilize the build system to invoke qmltyperegistrar in order to\n"
<< "generate qmltypes files.\n";
if (action == Uri) {
if (positionalArgs.size() != 3 && positionalArgs.size() != 4) {
std::cerr << "Incorrect number of positional arguments" << std::endl;
@ -1350,6 +1355,8 @@ int main(int argc, char *argv[])
"//\n"
"// This file was auto-generated by:\n"
"// '%1 %2'\n"
"//\n"
"// qmlplugindump is deprecated! You should use qmltyperegistrar instead.\n"
"\n").arg(QFileInfo(args.at(0)).baseName(), args.mid(1).join(QLatin1Char(' '))));
qml.writeStartObject("Module");