forked from qt-creator/qt-creator
CMake: Make sure to never trigger a timer on an destroyed object
This object might have gone out of scope by the time the timer hits. Task-number: QTCREATORBUG-17289 Change-Id: I4b9ea75c9b4b1c905ece44965e80a5accc3590f3 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -112,7 +112,7 @@ ServerMode::ServerMode(const Environment &env,
|
||||
m_cmakeProcess->setCommand(cmakeExecutable.toString(), argumentString);
|
||||
|
||||
// Delay start:
|
||||
QTimer::singleShot(0, [argumentString, this] {
|
||||
QTimer::singleShot(0, this, [argumentString, this] {
|
||||
emit message(tr("Running \"%1 %2\" in %3.")
|
||||
.arg(m_cmakeExecutable.toUserOutput())
|
||||
.arg(argumentString)
|
||||
|
||||
Reference in New Issue
Block a user