forked from qt-creator/qt-creator
ProjectExplorer: Fix crashes on shutdown
Ensure that RunControls ramp down asynchronously. Since RunControls now ramp down asynchronously the plugin can only report synchronous shut down if no RunControl/OutputPane was present. Task-number: QTCREATORBUG-18605 Change-Id: Ib8d1f857f85c74d4f18ecb85db537121a2275668 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -674,7 +674,6 @@ RunControl::~RunControl()
|
||||
#ifdef WITH_JOURNALD
|
||||
JournaldWatcher::instance()->unsubscribe(this);
|
||||
#endif
|
||||
disconnect();
|
||||
delete d;
|
||||
d = nullptr;
|
||||
}
|
||||
@@ -698,7 +697,7 @@ void RunControl::initiateStop()
|
||||
|
||||
void RunControl::initiateFinish()
|
||||
{
|
||||
d->initiateFinish();
|
||||
QTimer::singleShot(0, d, &RunControlPrivate::initiateFinish);
|
||||
}
|
||||
|
||||
using WorkerCreators = QHash<Core::Id, RunControl::WorkerCreator>;
|
||||
@@ -1277,7 +1276,7 @@ void RunControlPrivate::setState(RunControlState newState)
|
||||
case RunControlState::Finished:
|
||||
emit q->finished();
|
||||
debugMessage("All finished. Deleting myself");
|
||||
deleteLater();
|
||||
q->deleteLater();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user