Re: [Development] Determining what versions of imports a QML module provides

2020-02-25 Thread Ulf Hermann
> That was my first thought (before looking at the qmldir files) as well, but 
> it doesn't seem to help with the same modules that are problematic with the 
> qmldir scanner.
> e.g. QtQuick.tooling:

QtQuick.tooling does not exist. It's only there to have an import 
statement in the *.qmltypes files.

> I also don't see the version number for the QtQuick import - e.g.
> $ find /usr/lib64/qt5/qml/QtQuick* -name plugins.qmltypes |xargs grep '2\.15'
> only shows some submodules.

Each type has a list of exports that tells you the version at which each 
of its metaobject revisions was introduced. For example:

 Component {
 name: "QQuickAnimatedSprite"
 defaultProperty: "data"
 prototype: "QQuickItem"
 exports: [
 "QtQuick/AnimatedSprite 2.0",
 "QtQuick/AnimatedSprite 2.1",
 "QtQuick/AnimatedSprite 2.11",
 "QtQuick/AnimatedSprite 2.12",
 "QtQuick/AnimatedSprite 2.15",
 "QtQuick/AnimatedSprite 2.4",
 "QtQuick/AnimatedSprite 2.7"
 ]
 exportMetaObjectRevisions: [0, 1, 11, 12, 15, 4, 7]
[...]
 }

There is no global version for any specific import. For example, we may 
not change anything between version 7.20 and 7.21 of some module FooBar. 
Once we release the corresponding Qt version, you can still do "import 
FooBar 7.21". It will have the same effect as "import FooBar 7.20". The 
maximum version mentioned in the FooBar's plugins.qmltypes file will 
then be 7.20.

Ulf
___
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development


Re: [Development] Determining what versions of imports a QML module provides

2020-02-24 Thread Ulf Hermann
Hi,

> Is there a better way to determine what modules are provided?

You could scan the plugins.qmltypes files. There you get a detailed 
listing that tells you what components are available under what imports 
and versions.

best regards,
Ulf
___
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development


[Development] Determining what versions of imports a QML module provides

2020-02-24 Thread Bernhard Rosenkraenzer via Development
Hi,
I'm adding a Requires:/Provides: autogenerator for QML modules to rpm (so 
packages containing a qml file will automatically pull in the right library 
dependencies).

I have a more or less working prototype that extracts relevant information from 
qmldir files, but given "module" statements in qmldir don't have version 
information attached to them, there's no way to figure out that e.g. 
qtdeclarative 5.15 provides QtQuick 2.15 (and not any other version number).

Leaving version numbers aside, I also don't find a few submodules (that can be 
imported) by scanning qmldir files -- e.g. QtQuick, QtQuick.tooling, 
QtQuick.Window.

Is there a better way to determine what modules are provided?

Best regards
bero

___
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development