diff options
author | hjk <hjk@theqtcompany.com> | 2015-08-31 08:48:49 +0200 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2015-09-03 15:18:36 +0000 |
commit | 7b0e771ad7bb8508997b451d1709ba8abd11b9eb (patch) | |
tree | 4298f8570e9b0d5f3e54711c78f35fc9430b59fc /src/corelib/global | |
parent | 51e501fa8d11277fef35da4d81d9cdd2d9657d21 (diff) |
Add a qtHookData field for Qt Creator's data display
Qt Creator needs to be able to determine structure sizes and data
member offsets for certain private types even in the absence of debug
information.
It is sufficient to keep and test the actual data sets on the Qt Creator
side, as long library provides a hint which data set is needed.
So far, HookDataVersion was meant to be used for that purpose. To
make it more explicit, this patch introduce a TypeInformationVersion
field in qtHookData.
Change-Id: Ia1c3c6f62f314d63c4df289ef456f047c5e84cf4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qhooks.cpp | 11 | ||||
-rw-r--r-- | src/corelib/global/qhooks_p.h | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/corelib/global/qhooks.cpp b/src/corelib/global/qhooks.cpp index 382f45f592..40a7c88f13 100644 --- a/src/corelib/global/qhooks.cpp +++ b/src/corelib/global/qhooks.cpp @@ -37,7 +37,7 @@ QT_BEGIN_NAMESPACE // Only add to the end, and bump version if you do. quintptr Q_CORE_EXPORT qtHookData[] = { - 2, // hook data version + 3, // hook data version QHooks::LastHookIndex, // size of qtHookData QT_VERSION, @@ -52,6 +52,15 @@ quintptr Q_CORE_EXPORT qtHookData[] = { 0, // Startup, void(*)(), called once QCoreApplication is operational + 0, + + // TypeInformationVersion, an integral value, bumped whenever private + // object sizes or member offsets that are used in Qt Creator's + // data structure "pretty printing" change. + // + // The required sizes and offsets are tested in tests/auto/other/toolsupport. + // When this fails and the change was intentional, adjust the test and + // adjust this value here. 0 }; diff --git a/src/corelib/global/qhooks_p.h b/src/corelib/global/qhooks_p.h index 12a59a1399..28e0c1ed37 100644 --- a/src/corelib/global/qhooks_p.h +++ b/src/corelib/global/qhooks_p.h @@ -50,6 +50,7 @@ enum HookIndex { AddQObject = 3, RemoveQObject = 4, Startup = 5, + TypeInformationVersion = 6, LastHookIndex }; |