From f9e6a9639519d76be4356797e746d00f263475af Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Thu, 6 May 2010 16:23:18 +0200
Subject: [PATCH] debugger: fix display of QStringList after a takeFirst();

---
 share/qtcreator/gdbmacros/gdbmacros.py  | 1 +
 tests/manual/gdbdebugger/simple/app.cpp | 1 +
 2 files changed, 2 insertions(+)

diff --git a/share/qtcreator/gdbmacros/gdbmacros.py b/share/qtcreator/gdbmacros/gdbmacros.py
index 600e99477d2..783a0efb59b 100644
--- a/share/qtcreator/gdbmacros/gdbmacros.py
+++ b/share/qtcreator/gdbmacros/gdbmacros.py
@@ -1421,6 +1421,7 @@ def qdump__QStringList(d, item):
     if d.isExpanded(item):
         innerType = gdb.lookup_type(d.ns + "QString")
         ptr = gdb.Value(d_ptr["array"]).cast(innerType.pointer())
+        ptr += d_ptr["begin"]
         with Children(d, [size, 1000], innerType):
             for i in d.childRange():
                 d.putItem(Item(ptr.dereference(), item.iname, i))
diff --git a/tests/manual/gdbdebugger/simple/app.cpp b/tests/manual/gdbdebugger/simple/app.cpp
index eb4e338aff0..03c191f9a0f 100644
--- a/tests/manual/gdbdebugger/simple/app.cpp
+++ b/tests/manual/gdbdebugger/simple/app.cpp
@@ -1200,6 +1200,7 @@ void testQStringList()
     l << "Hello ";
     l << " big, ";
     l << " fat ";
+    l.takeFirst();
     l << " World ";
 }
 
-- 
GitLab