[Interest] #define in qml

Thiago Macieira thiago at kde.org
Tue Feb 21 19:17:33 CET 2012


On terça-feira, 21 de fevereiro de 2012 22.16.09, Konstantin Tokarev wrote:
> 21.02.2012, 22:09, "Thiago Macieira" <thiago at kde.org>:
> > On terça-feira, 21 de fevereiro de 2012 18.06.37, qtnext wrote:
> >>  it's sure that lot of people will wait for a release version of 5.0, or
> >>  5.1, if there is no way to use the same source code with #ifdef ...
> >>  Providing the way to test Qt5 before, will allow more feedback from
> >>  users ... and a stronger release ! just my two cents !
> > 
> > There's nothing we can do. The language simply doesn't support it.
> 
> Wouldn't it be possible to enable simple version comparison like e.g.
> 
> if (QtQuick.Version < 2) {
> // some code
> } else {
> // other code
> }
> 
> ?

That's already possible. But it doesn't help in any way because you can't have 
an import statement in "some code" there.

You HAVE to write
	import QtQuick 1.1
or
	import QtQuick 2.0

without conditionals.

-- 
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/20120221/2fc0288e/attachment.sig>


More information about the Interest mailing list