summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2017-01-18 15:04:06 +0100
committerDavid Schulz <david.schulz@qt.io>2017-01-19 10:03:34 +0000
commit58e7554f3d2f00bb3a65205274bfd0f73c491818 (patch)
tree4e07d3a67303395fd32b01190d511f99611afa84 /share
parent0af0d715b8dfbe39b419baa50ce4dc277e5efd92 (diff)
downloadqt-creator-58e7554f3d2f00bb3a65205274bfd0f73c491818.tar.gz
Debugger: Cache qtNamespace also if qstrdup wasn't resolved
Otherwise it will be looked up for every value in a none Qt build. Change-Id: Id5d82333b6fb93242d06c5d7e9fdf8ffa2ce6b38 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/debugger/cdbbridge.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/share/qtcreator/debugger/cdbbridge.py b/share/qtcreator/debugger/cdbbridge.py
index 6e2259fa3d..9fc3266714 100644
--- a/share/qtcreator/debugger/cdbbridge.py
+++ b/share/qtcreator/debugger/cdbbridge.py
@@ -287,15 +287,17 @@ class Dumper(DumperBase):
return hookSymbolName
def qtNamespace(self):
+ namespace = ''
qstrdupSymbolName = '*qstrdup'
coreModuleName = self.qtCoreModuleName()
if coreModuleName is not None:
qstrdupSymbolName = '%s!%s' % (coreModuleName, qstrdupSymbolName)
resolved = cdbext.resolveSymbol(qstrdupSymbolName)
- if not resolved:
- return ''
- name = resolved[0].split('!')[1]
- namespace = name[:name.find(':') + 2] if '::' in name else ''
+ if resolved:
+ name = resolved[0].split('!')[1]
+ namespaceIndex = name.find('::')
+ if namespaceIndex > 0:
+ namespace = name[:namespaceIndex + 2]
self.qtNamespace = lambda: namespace
return namespace