forked from qt-creator/qt-creator
Debugger: Call qVersion() for pre qtHookData Qt versions
Change-Id: Id37f4c31b776ea5af960011e7485b11c1a51c8d3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -264,6 +264,14 @@ class Dumper(DumperBase):
|
||||
|
||||
def qtVersion(self):
|
||||
qtVersion = self.findValueByExpression('((void**)&%s)[2]' % self.qtHookDataSymbolName())
|
||||
if qtVersion is None and self.qtCoreModuleName() is not None:
|
||||
try:
|
||||
versionValue = cdbext.call(self.qtCoreModuleName() + '!qVersion()')
|
||||
version = self.extractCString(self.fromNativeValue(versionValue).address())
|
||||
(major, minor, patch) = version.decode('latin1').split('.')
|
||||
qtVersion = 0x10000 * int(major) + 0x100 * int(minor) + int(patch)
|
||||
except:
|
||||
pass
|
||||
if qtVersion is None:
|
||||
qtVersion = self.fallbackQtVersion
|
||||
self.qtVersion = lambda: qtVersion
|
||||
|
||||
Reference in New Issue
Block a user