summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2016-11-15 13:31:46 +0100
committerhjk <hjk@qt.io>2016-11-16 08:37:18 +0000
commit5b058ebb34b035f71081921e5c76b09b401fc45a (patch)
tree9b8d27a51a751e78f3bd8f88e789652cf3a0eef4
parent3508a09010623f3be3fed78aedf30bc50b7aa2aa (diff)
downloadqt-creator-5b058ebb34b035f71081921e5c76b09b401fc45a.tar.gz
Debugger: Make QRegExp dumper test pass on Mac
We need DYLD_IMAGE_SUFFIX=_debug for the captures() cache warming call to succeed even if the actual access is by offset only. Change-Id: I24a90b4c4187459904f14a664b992a5bba9a20eb Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r--share/qtcreator/debugger/qttypes.py1
-rw-r--r--tests/auto/debugger/tst_dumpers.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py
index 57a7ed57d0..ed94f51ad3 100644
--- a/share/qtcreator/debugger/qttypes.py
+++ b/share/qtcreator/debugger/qttypes.py
@@ -1064,6 +1064,7 @@ def qdump__QRegExp(d, value):
privAddress = d.extractPointer(value)
(eng, pattern) = d.split('p{QString}', privAddress)
d.putStringValue(pattern)
+ d.putNumChild(1)
if d.isExpanded():
with Children(d):
d.call('void', value, 'capturedTexts') # Warm up internal cache.
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp
index 851f0d44ec..1c4f3cb808 100644
--- a/tests/auto/debugger/tst_dumpers.cpp
+++ b/tests/auto/debugger/tst_dumpers.cpp
@@ -2755,6 +2755,7 @@ void tst_Dumpers::dumper_data()
"int pos1 = re.indexIn(str1); unused(&pos1);\n"
"int pos2 = re.indexIn(str2); unused(&pos2);\n")
+ CoreProfile()
+ + UseDebugImage()
+ Check("re", "\"a(.*)b(.*)c\"", "@QRegExp")
+ Check("re.captures.0", "[0]", "\"a1121b344c\"", "@QString")
+ Check("re.captures.1", "[1]", "\"1121\"", "@QString")