[Interest] #define in qml

Thiago Macieira thiago at kde.org
Mon Feb 20 09:47:14 CET 2012


On segunda-feira, 20 de fevereiro de 2012 09.15.37, Bo Thorsen wrote:
> > Again, not the use-case. You don't support multiple versions of Qt Quick.
> > Multiple versions of Qt Quick support you.
> > 
> > If you import Qt Quick 1.1, it will be the same version of 1.1 with the
> > same behaviour issues. If you don't change the import statement, the
> > behaviour will not change, even if Qt is upgraded.
> 
> True, but if a QML library is put out, you want to support the features
> of the later versions as well.

Then you change your import once and for all, making it a required dependency.

There's no way to get the current version and change behaviour with QML. You 
can only do that from the C++ side.

> > It's also possible to have different .qml files having slightly different
> > imports. You just can't mix major versions, because the backend library is
> > completely different.
> 
> I would also assume that it's necessary to have separate files for each
> supported version. I can only speculate on how many there would be, but
> my guess would be not too many. So it might not be a problem. If there
> are a lot of them, it would become a maintainance nightmare.

Indeed, separate files. The point is that you should not have to keep many 
files. Once you're ready to upgrade (and require a new version), you do it and 
don't look back. You don't keep two versions working.

> > I'm interested in what other problems you might have as a QML library
> > vendor (not an application vendor).
> 
> I don't have one yet. I do have a set of QML files I'm thinking of
> publishing, but if I do so it will probably just be on my Qt blog. Then
> it's up to the users to modify for newer versions :)

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120220/d35b0d57/attachment.sig>


More information about the Interest mailing list