forked from qt-creator/qt-creator
Update the qml code model parser
Updates the qml code model from qtdeclarative dev (commit: 164d8f66d82deea74464c68a2cdd19e5998835da). Fixes: QTCREATORBUG-28238 Change-Id: I383c98012f1efd56110d43c258fa1b398a6f8255 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2021 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -102,9 +102,11 @@ public:
|
||||
struct Import
|
||||
{
|
||||
enum Flag {
|
||||
Default = 0x0,
|
||||
Auto = 0x1, // forward the version of the importing module
|
||||
Optional = 0x2 // is not automatically imported but only a tooling hint
|
||||
Default = 0x0,
|
||||
Auto = 0x1, // forward the version of the importing module
|
||||
Optional = 0x2, // is not automatically imported but only a tooling hint
|
||||
OptionalDefault
|
||||
= 0x4, // tooling hint only, denotes this entry should be imported by tooling
|
||||
};
|
||||
Q_DECLARE_FLAGS(Flags, Flag)
|
||||
|
||||
@@ -117,6 +119,11 @@ public:
|
||||
QString module;
|
||||
LanguageUtils::ComponentVersion version; // invalid version is latest version, unless Flag::Auto
|
||||
Flags flags;
|
||||
|
||||
friend bool operator==(const Import &a, const Import &b)
|
||||
{
|
||||
return a.module == b.module && a.version == b.version && a.flags == b.flags;
|
||||
}
|
||||
};
|
||||
|
||||
QMultiHash<QString,Component> components() const { return _components; }
|
||||
@@ -125,6 +132,8 @@ public:
|
||||
QList<Script> scripts() const { return _scripts; }
|
||||
QList<Plugin> plugins() const { return _plugins; }
|
||||
bool designerSupported() const { return _designerSupported; }
|
||||
bool isStaticModule() const { return _isStaticModule; }
|
||||
bool isSystemModule() const { return _isSystemModule; }
|
||||
|
||||
QStringList typeInfos() const { return _typeInfos; }
|
||||
QStringList classNames() const { return _classNames; }
|
||||
@@ -145,6 +154,8 @@ private:
|
||||
QList<Script> _scripts;
|
||||
QList<Plugin> _plugins;
|
||||
bool _designerSupported = false;
|
||||
bool _isStaticModule = false;
|
||||
bool _isSystemModule = false;
|
||||
QStringList _typeInfos;
|
||||
QStringList _classNames;
|
||||
QString _linkTarget;
|
||||
|
||||
Reference in New Issue
Block a user