From 4a1a0eaa398c9b8def88b17a14a265aed511c626 Mon Sep 17 00:00:00 2001 From: Sergey Levin Date: Mon, 11 Jul 2022 12:42:45 +0300 Subject: [PATCH] Core: Close ICore::showWarningWithOptions dialog on pressing Esc button Change-Id: Ic09202799bde9cb4fbc3ca4e9836ca0c0cc499f2 Reviewed-by: Eike Ziller --- src/plugins/coreplugin/icore.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/coreplugin/icore.cpp b/src/plugins/coreplugin/icore.cpp index 32bc047422f..0c8352584b6 100644 --- a/src/plugins/coreplugin/icore.cpp +++ b/src/plugins/coreplugin/icore.cpp @@ -345,6 +345,7 @@ bool ICore::showWarningWithOptions(const QString &title, const QString &text, parent = m_mainwindow; QMessageBox msgBox(QMessageBox::Warning, title, text, QMessageBox::Ok, parent); + msgBox.setEscapeButton(QMessageBox::Ok); if (!details.isEmpty()) msgBox.setDetailedText(details); QAbstractButton *settingsButton = nullptr;