Register Qt 4.7 import on-demand, instead of at startup.
authorRobin Burchell <robin+qt@viroteck.net>
Fri, 31 Aug 2012 11:24:42 +0000 (13:24 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 4 Oct 2012 09:27:45 +0000 (11:27 +0200)
commitb5e6ca71283f0f68b7ba6d9fe9663650751ad43e
tree4a8c80646e34e299c3d740488231bbcd9cf3355f
parentd252cc7896200d6c82c345453fcb4d4fc3b42834
Register Qt 4.7 import on-demand, instead of at startup.

This is a slightly less awkward approach (keeps backwards-compatibility) while
speeding up startup for applications that don't use the old import path.

Also prints a warning to let developers know they should migrate their code when
possible. Completely disabling the Qt 4.7 import is still possible by setting
QT_NO_IMPORT_QT47_QML.

This takes around 10-15ms off a very simple "hello world" on my macbook.

(backport of qtquick1/2a3e9eb0ba00acf30b9cc40f7e2e4347726fb6b4)

Change-Id: I6960e7c28bb4f153d793802b978c1944977e8ed4
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
src/declarative/graphicsitems/qdeclarativeitemsmodule_p.h
src/declarative/qml/qdeclarativeengine.cpp
src/declarative/qml/qdeclarativeengine_p.h
src/declarative/qml/qdeclarativemetatype.cpp
src/declarative/qml/qdeclarativevaluetype.cpp
src/declarative/qml/qdeclarativevaluetype_p.h
src/declarative/util/qdeclarativeutilmodule.cpp
src/declarative/util/qdeclarativeutilmodule_p.h