diff options
author | Robin Burchell <robin+qt@viroteck.net> | 2012-09-01 13:57:32 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-03 23:01:06 +0200 |
commit | e5b200fa06e01a7ff7b0943b9c8bca564a7320c4 (patch) | |
tree | d3f2ad1c791d96f02a6874d646a1f94779128118 /src/declarative/qml/qdeclarativevaluetype_p.h | |
parent | 427c66394d21e004f35c349d23b02f63014eb225 (diff) |
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.
As an added bonus, forward-port a similar approach to 4.8's
a26f545d8e25af74fb43d16c9afa79f6e04463e7 and don't register graphical types in a
non-graphical application as someone (very naughtily) apparently forgot to get
it integrated to Qt 5 first.
Change-Id: I7821523750b3ab6770f367788725d0da70c5ec1f
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Alan Alpert <416365416c@gmail.com>
Diffstat (limited to 'src/declarative/qml/qdeclarativevaluetype_p.h')
-rw-r--r-- | src/declarative/qml/qdeclarativevaluetype_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativevaluetype_p.h b/src/declarative/qml/qdeclarativevaluetype_p.h index 66afdf95..3fac009b 100644 --- a/src/declarative/qml/qdeclarativevaluetype_p.h +++ b/src/declarative/qml/qdeclarativevaluetype_p.h @@ -90,6 +90,7 @@ public: static QDeclarativeValueType *valueType(int); static void registerValueTypes(); + static void registerValueTypesCompat(); QDeclarativeValueType *operator[](int idx) const { if (idx >= (int)QVariant::UserType) return 0; |