summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2017-03-15 10:05:05 +0100
committerhjk <hjk@qt.io>2017-03-15 11:36:18 +0000
commit61501042bcf6c3e0e22ee3b8294b1752846b8c84 (patch)
tree585c0d6bbda137fb2a08cea5e39cdf09e47f9119 /share
parent68a4a3db943884c152694bfcc3c6e8f5f069c2ed (diff)
downloadqt-creator-61501042bcf6c3e0e22ee3b8294b1752846b8c84.tar.gz
Debugger: Simplify Qt namespace guessing code
We get proper notification when QtCore is loaded now, and we either got it, or not. Change-Id: I9485126d9b15b8d859ba440f3ba1623f03527ef8 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/debugger/dumper.py7
-rw-r--r--share/qtcreator/debugger/gdbbridge.py25
2 files changed, 8 insertions, 24 deletions
diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py
index 9111b230b3..40230fee14 100644
--- a/share/qtcreator/debugger/dumper.py
+++ b/share/qtcreator/debugger/dumper.py
@@ -286,8 +286,6 @@ class DumperBase:
'personaltypes',
]
- self.currentQtNamespaceGuess = None
-
# These values are never used, but the variables need to have
# some value base for the swapping logic in Children.__enter__()
# and Children.__exit__().
@@ -324,11 +322,6 @@ class DumperBase:
#warn('EXPANDED INAMES: %s' % self.expandedINames)
#warn('WATCHERS: %s' % self.watchers)
- # The guess does not need to be updated during a fetchVariables()
- # as the result is fixed during that time (ignoring "active"
- # dumpers causing loading of shared objects etc).
- self.currentQtNamespaceGuess = None
-
def resetCaches(self):
# This is a cache mapping from 'type name' to 'display alternatives'.
self.qqFormats = { 'QVariant (QVariantMap)' : mapForms() }
diff --git a/share/qtcreator/debugger/gdbbridge.py b/share/qtcreator/debugger/gdbbridge.py
index fc21ecb212..33c19a2065 100644
--- a/share/qtcreator/debugger/gdbbridge.py
+++ b/share/qtcreator/debugger/gdbbridge.py
@@ -959,10 +959,8 @@ class Dumper(DumperBase):
self.importPlainDumper(printer)
def qtNamespace(self):
- self.preping('qtNamespace')
- res = self.qtNamespaceX()
- self.ping('qtNamespace')
- return res
+ # This function is replaced by handleQtCoreLoaded()
+ return ''
def findSymbol(self, symbolName):
try:
@@ -1003,6 +1001,12 @@ class Dumper(DumperBase):
strns = ('%d%s' % (lenns - 2, ns[:lenns - 2])) if lenns else ''
if lenns:
+ # This might be wrong, but we can't do better: We found
+ # a libQt5Core and could not extract a namespace.
+ # The best guess is that there isn't any.
+ self.qtNamespaceToReport = ns
+ self.qtNamespace = lambda: ns
+
sym = '_ZN%s7QObject11customEventEPNS_6QEventE' % strns
else:
sym = '_ZN7QObject11customEventEP6QEvent'
@@ -1014,19 +1018,6 @@ class Dumper(DumperBase):
sym = '_ZNK%s7QObject8propertyEPKc' % strns
self.qtPropertyFunc = self.findSymbol(sym)
- # This might be wrong, but we can't do better: We found
- # a libQt5Core and could not extract a namespace.
- # The best guess is that there isn't any.
- self.qtNamespaceToReport = ns
- self.qtNamespace = lambda: ns
-
- def qtNamespaceX(self):
- if not self.currentQtNamespaceGuess is None:
- return self.currentQtNamespaceGuess
-
- self.currentQtNamespaceGuess = ''
- return ''
-
def assignValue(self, args):
typeName = self.hexdecode(args['type'])
expr = self.hexdecode(args['expr'])