forked from qt-creator/qt-creator
Core: fix warning when opening big files
Fixes: QTCREATORBUG-32875 Change-Id: I4fb1a77ba1816310be8a35342f523974b884ad9b Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user