Drop unused variables and lambda captures

Also, add context to connect() expressions where we are or were
capturing "this".

Change-Id: I6e006ba6f83d532478018550d148ee93eca59605
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Ulf Hermann
2017-09-07 17:05:47 +02:00
parent e3ae628584
commit 47886969cc
55 changed files with 216 additions and 218 deletions

View File

@@ -574,7 +574,7 @@ void LldbEngine::removeBreakpoint(Breakpoint bp)
if (response.id.isValid()) {
DebuggerCommand cmd("removeBreakpoint");
cmd.arg("lldbid", response.id.toString());
cmd.callback = [this, bp](const DebuggerResponse &) {
cmd.callback = [bp](const DebuggerResponse &) {
QTC_CHECK(bp.state() == BreakpointRemoveProceeding);
Breakpoint bp0 = bp;
bp0.notifyBreakpointRemoveOk();
@@ -679,7 +679,7 @@ void LldbEngine::requestModuleSymbols(const QString &moduleName)
{
DebuggerCommand cmd("fetchSymbols");
cmd.arg("module", moduleName);
cmd.callback = [this, moduleName](const DebuggerResponse &response) {
cmd.callback = [moduleName](const DebuggerResponse &response) {
const GdbMi &symbols = response.data["symbols"];
QString moduleName = response.data["module"].data();
Symbols syms;
@@ -1041,7 +1041,7 @@ void LldbEngine::fetchMemory(MemoryAgent *agent, quint64 addr, quint64 length)
DebuggerCommand cmd("fetchMemory");
cmd.arg("address", addr);
cmd.arg("length", length);
cmd.callback = [this, agent](const DebuggerResponse &response) {
cmd.callback = [agent](const DebuggerResponse &response) {
qulonglong addr = response.data["address"].toAddress();
QByteArray ba = QByteArray::fromHex(response.data["contents"].data().toUtf8());
agent->addData(addr, ba);
@@ -1055,7 +1055,7 @@ void LldbEngine::changeMemory(MemoryAgent *agent, quint64 addr, const QByteArray
DebuggerCommand cmd("writeMemory");
cmd.arg("address", addr);
cmd.arg("data", QString::fromUtf8(data.toHex()));
cmd.callback = [this](const DebuggerResponse &response) { Q_UNUSED(response); };
cmd.callback = [](const DebuggerResponse &response) { Q_UNUSED(response); };
runCommand(cmd);
}