forked from qt-creator/qt-creator
BinEditor: Raise size limit to 32 GB
The determining limit is now the Qt api with int values for line numbers and scrollbar positions, giving us <= 2^31 lines with 16 bytes each. Change-Id: I266e5bdf358b377c6e27bc2be300a0f6a60e6f68 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
@@ -289,8 +289,9 @@ public:
|
||||
QMessageBox::critical(ICore::mainWindow(), tr("File Error"), msg);
|
||||
return OpenResult::CannotHandle;
|
||||
}
|
||||
if (size > INT_MAX) {
|
||||
QString msg = tr("The file is too big for the Binary Editor (max. 2GB).");
|
||||
if (size / 16 >= qint64(1) << 31) {
|
||||
// The limit is 2^31 lines (due to QText* interfaces) * 16 bytes per line.
|
||||
QString msg = tr("The file is too big for the Binary Editor (max. 32GB).");
|
||||
if (errorString)
|
||||
*errorString = msg;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user