forked from qt-creator/qt-creator
Core: skip text file size warning
... if the size exseeds our harcoded text file size limit and it is opened in the binary editor anyway. Fixes: QTCREATORBUG-15114 Change-Id: Ic806f425c2cf14632885c990bd5733a0abb17366 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -752,8 +752,9 @@ bool EditorManagerPrivate::skipOpeningBigTextFile(const QString &filePath)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
const QFileInfo fileInfo(filePath);
|
const QFileInfo fileInfo(filePath);
|
||||||
const double fileSizeInMB = fileInfo.size() / 1000.0 / 1000.0;
|
const qint64 fileSize = fileInfo.size();
|
||||||
if (fileSizeInMB > d->m_bigFileSizeLimitInMB) {
|
const double fileSizeInMB = fileSize / 1000.0 / 1000.0;
|
||||||
|
if (fileSizeInMB > d->m_bigFileSizeLimitInMB && fileSize < EditorManager::maxTextFileSize()) {
|
||||||
const QString title = EditorManager::tr("Continue Opening Huge Text File?");
|
const QString title = EditorManager::tr("Continue Opening Huge Text File?");
|
||||||
const QString text = EditorManager::tr(
|
const QString text = EditorManager::tr(
|
||||||
"The text file \"%1\" has the size %2MB and might take more memory to open"
|
"The text file \"%1\" has the size %2MB and might take more memory to open"
|
||||||
|
Reference in New Issue
Block a user