From 7528b3b02225f8992deb806f10432f151fccf303 Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Wed, 8 Sep 2010 12:18:04 +0200
Subject: [PATCH] debugger: fix editing of breakpoint conditions

---
 src/plugins/debugger/breakhandler.cpp                |  9 +++++++++
 .../manual/gdbdebugger/simple/simple_gdbtest_app.cpp | 12 ++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index 5fb48023d71..c0e26162ace 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -298,6 +298,15 @@ QVariant BreakHandler::data(const QModelIndex &mi, int role) const
     if (role == BreakpointFunctionNameRole)
         return data->funcName;
 
+    if (role == BreakpointConditionRole)
+        return data->condition;
+
+    if (role == BreakpointIgnoreCountRole)
+        return data->ignoreCount;
+
+    if (role == BreakpointThreadSpecRole)
+        return data->threadSpec;
+
     switch (mi.column()) {
         case 0:
             if (role == Qt::DisplayRole) {
diff --git a/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp b/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp
index d57b28863de..61edeb1069f 100644
--- a/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp
+++ b/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp
@@ -1837,8 +1837,20 @@ void testTypedef()
     ++t2;
 };
 
+void testConditional(const QString &str)
+{
+    //
+    QString res = str;
+    res += "x";
+    res += "x";
+    res += "x";
+}
+
 void testStuff()
 {
+    testConditional("foo");
+    testConditional("bar");
+    testConditional("zzz");
     Foo *f1 = new Foo(1);
     X *x = new X();
     Foo *f2 = x;
-- 
GitLab