QmlJS: Scan app.qmltypes and lib.qmltypes for type information

app.qmltypes is being added as a new convention to Qt 5.15. These files
are to be found next to application binaries, and contain the QML types
those application register themselves, in contrast to QML types
registered from plugins loaded via the regular import mechanism.

lib.qmltypes works the same way, in principle, for libraries. This
change only adds it to the possible names for qmltypes files, though.

Change-Id: I1d7c5835c8c3e988d214c5cdb949ca677b48dfc5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Ulf Hermann
2019-10-22 16:29:40 +02:00
parent 7a4cf827d9
commit 1e587831d1
8 changed files with 109 additions and 17 deletions

View File

@@ -370,6 +370,13 @@ LibraryInfo::LibraryInfo(Status status)
updateFingerprint();
}
LibraryInfo::LibraryInfo(const QmlDirParser::TypeInfo &typeInfo)
: _status(Found)
{
_typeinfos.append(typeInfo);
updateFingerprint();
}
LibraryInfo::LibraryInfo(const QmlDirParser &parser, const QByteArray &fingerprint)
: _status(Found)
, _components(parser.components().values())