forked from qt-creator/qt-creator
CppEditor: Cancel runner in ~CppUseSelectionsUpdater
...otherwise an already destructed QTextDocument might be accessed in the ClangCodeModel::Internal::IpcReceiver::references. Task-number: QTCREATORBUG-18459 Change-Id: I1868b2fd3a64341794f83eea6c4eeb7c2c1af812 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -49,6 +49,12 @@ CppUseSelectionsUpdater::CppUseSelectionsUpdater(TextEditor::TextEditorWidget *e
|
||||
connect(&m_timer, &QTimer::timeout, this, [this]() { update(); });
|
||||
}
|
||||
|
||||
CppUseSelectionsUpdater::~CppUseSelectionsUpdater()
|
||||
{
|
||||
if (m_runnerWatcher)
|
||||
m_runnerWatcher->cancel();
|
||||
}
|
||||
|
||||
void CppUseSelectionsUpdater::scheduleUpdate()
|
||||
{
|
||||
m_timer.start();
|
||||
|
||||
Reference in New Issue
Block a user