[Development] Convenience Imports in QML

Thiago Macieira thiago.macieira at intel.com
Tue Dec 11 05:36:40 CET 2012


On segunda-feira, 10 de dezembro de 2012 19.25.57, Alan Alpert wrote:
> Even if this is a good idea, I have no answers for the following questions:
> Where will this be maintained? It practically depends on every Qt module

I think that we could implement this by a special "qmldir" file that simply 
tells the engine what else to import. A restricted version of this can be used 
to providing aliases.

> Who will maintain this? It needs to stay synchronized with all
> modules. That's probably not going to be easy, I bet that my quick
> automated attempt to find Qt 5.0 imports picked up some stuff that
> shouldn't be in there (like QtQuick 1 which I manually removed, and
> maybe QtMobility.sensors I don't know how that relates to QtSensors
> 5.0).

This would be as much a decision as what is Essentials and what isn't.

> Who actually uses all these types at once? I hear a lot of people
> annoyed by how confusing the versioning is, but I don't see many files
> importing more than a couple of modules.

That's the question we must answer before we introduce the feature. Especiall 
because of the next question.

> What's the performance impact of importing a hundred types you don't
> use? It's known to have a performance cost, perhaps this convenience
> import is bad enough for performance that we shouldn't allow people to
> shoot themselves in the foot like this.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- 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/development/attachments/20121210/1d2a82ae/attachment.sig>


More information about the Development mailing list