summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2016-09-16 14:30:14 +0200
committerhjk <hjk@qt.io>2016-09-22 09:57:29 +0000
commitad48b299b7fe0bbed2749adc66725e4f12661f79 (patch)
tree1b325bec729aad861bde19523895ca8b8b07dc2c /src
parente1a303dd01f2e7faa3ec54386ecbbfe113996790 (diff)
Add a facility to version type information for debugging
This serves the same purpose as qtbase/corelib/global/qhooks.cpp, but is meant to be in sync with changes in Qt Declarative internals. Change-Id: I5a4a7d9ca5c340367581749e05d09380590c46fb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qml/debugger/qqmldebug.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/qml/debugger/qqmldebug.cpp b/src/qml/debugger/qqmldebug.cpp
index 35dc110e9a..ea98bb16fa 100644
--- a/src/qml/debugger/qqmldebug.cpp
+++ b/src/qml/debugger/qqmldebug.cpp
@@ -119,4 +119,22 @@ bool QQmlDebuggingEnabler::connectToLocalDebugger(const QString &socketFileName,
return false;
}
+enum { HookCount = 3 };
+
+// Only add to the end, and bump version if you do.
+quintptr Q_QML_EXPORT qtDeclarativeHookData[] = {
+ // Version of this Array. Bump if you add to end.
+ 1,
+
+ // Number of entries in this array.
+ HookCount,
+
+ // TypeInformationVersion, an integral value, bumped whenever private
+ // object sizes or member offsets that are used in Qt Creator's
+ // data structure "pretty printing" change.
+ 1
+};
+
+Q_STATIC_ASSERT(HookCount == sizeof(qtDeclarativeHookData) / sizeof(qtDeclarativeHookData[0]));
+
QT_END_NAMESPACE