forked from qt-creator/qt-creator
Install LocalAddressFinder also as stop dependency
The LocalAddressFinder was installed as a start dependency for MemcheckToolRunner. However, it wasn't registered as stop dependency for it. This means that when MemcheckToolRunner was finished, its RunControl couldn't finish as one of its RunWorkers wasn't finished yet. Install LocalAddressFinder as a stop dependency and implement a stop() method which disconnects the conneciton. This also prevents the ApplicationOutput pane to open a new tab on successive run of Memcheck for the same application. Fixes: QTCREATORBUG-26758 Change-Id: Ib71ddbe787e5c1bcc7b96687ebf15c9b63b714dc Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -166,6 +166,12 @@ public:
|
|||||||
connection.connectToHost();
|
connection.connectToHost();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void stop() override
|
||||||
|
{
|
||||||
|
connection.disconnectFromHost();
|
||||||
|
reportStopped();
|
||||||
|
}
|
||||||
|
|
||||||
QSsh::SshConnection connection;
|
QSsh::SshConnection connection;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1170,8 +1176,11 @@ MemcheckToolRunner::MemcheckToolRunner(RunControl *runControl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We need a real address to connect to from the outside.
|
// We need a real address to connect to from the outside.
|
||||||
if (device()->type() != ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE)
|
if (device()->type() != ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) {
|
||||||
addStartDependency(new LocalAddressFinder(runControl, &m_localServerAddress));
|
auto *dependentWorker = new LocalAddressFinder(runControl, &m_localServerAddress);
|
||||||
|
addStartDependency(dependentWorker);
|
||||||
|
addStopDependency(dependentWorker);
|
||||||
|
}
|
||||||
|
|
||||||
dd->setupRunner(this);
|
dd->setupRunner(this);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user