aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Schulz <[email protected]>2025-04-30 07:13:50 +0200
committerDavid Schulz <[email protected]>2025-04-30 09:52:56 +0000
commit2234af0e6113622bcc819bc5e90ba7b7c2dd2fef (patch)
tree21ddc070fdbd0caa6e1fea51cbae545a9527b876
parentcf83c0b651790446c73dae29f68cec9e2ba6af9e (diff)
Core: fix warning when opening big files
Fixes: QTCREATORBUG-32875 Change-Id: I4fb1a77ba1816310be8a35342f523974b884ad9b Reviewed-by: Eike Ziller <[email protected]> Reviewed-by: hjk <[email protected]>
-rw-r--r--src/plugins/coreplugin/editormanager/editormanager.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index cb882f9f000..19eddc4066e 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.cpp
+++ b/src/plugins/coreplugin/editormanager/editormanager.cpp
@@ -818,12 +818,11 @@ bool EditorManagerPrivate::skipOpeningBigTextFile(const FilePath &filePath)
.arg(filePath.fileName())
.arg(fileSizeInMB, 0, 'f', 2);
- bool askAgain = true;
- CheckableDecider decider(&askAgain);
+ auto shouldAskAgain = [] { return true; };
+ auto doNotAskAgain = [] { systemSettings().warnBeforeOpeningBigFiles.setValue(false); };
- QMessageBox::StandardButton clickedButton
- = CheckableMessageBox::question(title, text, decider);
- systemSettings().warnBeforeOpeningBigFiles.setValue(askAgain);
+ QMessageBox::StandardButton clickedButton = CheckableMessageBox::question(
+ title, text, {shouldAskAgain, doNotAskAgain});
return clickedButton != QMessageBox::Yes;
}