forked from qt-creator/qt-creator
QmlPreview: Fix double deletion of RefreshTranslationWorker
The RunControl takes ownership of its RunWorkers. Change-Id: I720d4404f991651de5d5f7906fbea96f0e4e20ba Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -84,11 +84,10 @@ private:
|
||||
void stop() override;
|
||||
|
||||
QmlPreviewConnectionManager m_connectionManager;
|
||||
RefreshTranslationWorker m_refreshTranslationWorker;
|
||||
};
|
||||
|
||||
QmlPreviewRunner::QmlPreviewRunner(RunControl *runControl, const QmlPreviewRunnerSetting &settings)
|
||||
: RunWorker(runControl), m_refreshTranslationWorker(runControl, settings)
|
||||
: RunWorker(runControl)
|
||||
{
|
||||
setId("QmlPreviewRunner");
|
||||
m_connectionManager.setFileLoader(settings.fileLoader);
|
||||
@@ -134,7 +133,7 @@ QmlPreviewRunner::QmlPreviewRunner(RunControl *runControl, const QmlPreviewRunne
|
||||
runControl->initiateStop();
|
||||
});
|
||||
|
||||
addStartDependency(&m_refreshTranslationWorker);
|
||||
addStartDependency(new RefreshTranslationWorker(runControl, settings));
|
||||
}
|
||||
|
||||
void QmlPreviewRunner::start()
|
||||
|
Reference in New Issue
Block a user