Commit fa304b45 authored by hjk's avatar hjk
Browse files

debugger: make qt namespace retrieval more robust

parent ad2be7e4
......@@ -792,6 +792,7 @@ def makeExpression(value):
qqNs = None
def qtNamespace():
# FIXME: This only works when call from inside a Qt function frame.
global qqNs
if not qqNs is None:
return qqNs
......@@ -803,8 +804,10 @@ def qtNamespace():
# "}"
pos1 = str.find("struct") + 7
pos2 = str.find("QString::Null")
qqNs = str[pos1:pos2]
return qqNs
if pos1 > -1 and pos2 > -1:
qqNs = str[pos1:pos2]
return qqNs
return ""
except:
return ""
......
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