From aba62280aee9f086fa2dce6bd6a3a40f7276b27e Mon Sep 17 00:00:00 2001
From: David Fries <David@Fries.net>
Date: Wed, 11 Nov 2015 14:59:02 -0600
Subject: [PATCH] Debugger: Fix compile for g++ 4.7.2

src/plugins/debugger/gdb/gdbengine.cpp: In lambda function:
src/plugins/debugger/gdb/gdbengine.cpp:3224:30: error: the value of 'this' is not usable in a constant expression
src/plugins/debugger/gdb/gdbengine.cpp:3210:61: note: 'this' was not declared 'constexpr'
src/plugins/debugger/gdb/gdbengine.cpp:3231:13: error: 'incmd' was not declared in this scope
This reverts one code block of commit
2b16b97f19a93e9dc9b1465e196be1de34cdd4fa

Change-Id: Iab7f5ec84e59d9f280e0405cdd82705c14bb2064
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
---
 src/plugins/debugger/gdb/gdbengine.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 1dbe494d46..8ac6c6ce5b 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -3218,9 +3218,10 @@ void GdbEngine::loadAdditionalQmlStack()
             return;
         }
         // Call the debug function of QML with the context address to obtain the QML stack trace.
-        runCommand({"-data-evaluate-expression \"qt_v4StackTrace((QV4::ExecutionContext *)0x"
-                        + QByteArray::number(contextAddress, 16) + ")\"",
-                    NoFlags, CB(handleQmlStackTrace)});
+        DebuggerCommand cmd("-data-evaluate-expression \"qt_v4StackTrace((QV4::ExecutionContext *)0x"
+                + QByteArray::number(contextAddress, 16) + ")\"");
+        cmd.callback = CB(handleQmlStackTrace);
+        runCommand(cmd);
     };
     runCommand(cmd);
 }
-- 
GitLab