diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2022-03-23 10:53:22 +0100 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2022-03-23 11:54:56 +0000 |
commit | 39a81a7baa1fc2601f7ac3b9cc0ef6142115d71e (patch) | |
tree | ac80efd797e7115a17138c6f5bb155370ff0f016 | |
parent | 816746a06ddf95cba8575edf9664aee23eba07b1 (diff) |
QmlDesigner: Force QtQuick.Studio.x components to use version 1.0
With the latest chages and switching to cmake the version
is actually 6.x, but 1.0 is also supported and this will
keep projects backwards compatible.
Change-Id: Id3d77b323f008ca20bd276859d5a4a573663120c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
-rw-r--r-- | src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp index d9c369e3dd..ad3c169330 100644 --- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp @@ -958,6 +958,12 @@ static QList<QmlDesigner::Import> generatePossibleLibraryImports(const QHash<QSt int majorVersion = importKey.majorVersion; if (majorVersion >= 0) { int minorVersion = (importKey.minorVersion == LanguageUtils::ComponentVersion::NoVersion) ? 0 : importKey.minorVersion; + + if (libraryName.contains("QtQuick.Studio")) { + majorVersion = 1; + minorVersion = 0; + } + QString version = QStringLiteral("%1.%2").arg(majorVersion).arg(minorVersion); if (!libraryName.endsWith(".impl")) possibleImports.append(QmlDesigner::Import::createLibraryImport(libraryName, version)); |