From 6fbe88b215155770ef8b15fcf74cc3e732cbf533 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 3 May 2021 14:09:15 +0200 Subject: [PATCH] TextEditor: Queue call to ICore::showOptionsDialog() ... from text marks. Direct calls appear to be unsafe, possibly because text marks are transient. Fixes: QTCREATORBUG-25623 Change-Id: I929ff6310c9d93b677f66acc8869e7aeceb5564b Reviewed-by: David Schulz --- src/plugins/texteditor/textmark.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/texteditor/textmark.cpp b/src/plugins/texteditor/textmark.cpp index abaac7c430f..94137d9ade4 100644 --- a/src/plugins/texteditor/textmark.cpp +++ b/src/plugins/texteditor/textmark.cpp @@ -400,9 +400,9 @@ void TextMark::setSettingsPage(Id settingsPage) m_settingsAction = new QAction; m_settingsAction->setIcon(Utils::Icons::SETTINGS_TOOLBAR.icon()); m_settingsAction->setToolTip(tr("Show Diagnostic Settings")); - QObject::connect(m_settingsAction, &QAction::triggered, [this, settingsPage] { - Core::ICore::showOptionsDialog(settingsPage); - }); + QObject::connect(m_settingsAction, &QAction::triggered, Core::ICore::instance(), + [settingsPage] { Core::ICore::showOptionsDialog(settingsPage); }, + Qt::QueuedConnection); } TextMarkRegistry::TextMarkRegistry(QObject *parent)