Commit c55ac5fb authored by hjk's avatar hjk

Debugger: Use more robust way to extract Qt version.

Also bump the fallback guess to Qt 5.3.

Change-Id: I8e9be14a34cdf6c6330de123cbed7243e0df968a
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 89f59646
......@@ -1029,7 +1029,8 @@ class Dumper(DumperBase):
def qtVersion(self):
try:
version = str(gdb.parse_and_eval("qVersion()"))
ns = self.qtNamespace()
version = str(gdb.parse_and_eval("((const char*(*)())'%s::qVersion')()" % ns))
(major, minor, patch) = version[version.find('"')+1:version.rfind('"')].split('.')
self.cachedQtVersion = 0x10000 * int(major) + 0x100 * int(minor) + int(patch)
except:
......@@ -1039,8 +1040,8 @@ class Dumper(DumperBase):
self.cachedQtVersion = 0x040800
except:
#self.cachedQtVersion = 0x050000
# Assume Qt 5 until we have a definitive answer.
return 0x050000
# Assume Qt 5.3 until we have a definitive answer.
return 0x050300
# Memoize good results.
self.qtVersion = lambda: self.cachedQtVersion
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment