Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
89884d82
Commit
89884d82
authored
Feb 22, 2011
by
hjk
Browse files
texteditor: don't crash when trying to open too large files
Task-number: QTCREATORBUG-3828
parent
07d6a7ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/texteditor/basetextdocument.cpp
View file @
89884d82
...
...
@@ -444,7 +444,12 @@ bool BaseTextDocument::open(const QString &fileName)
title
=
fi
.
fileName
();
QByteArray
buf
=
file
.
readAll
();
QByteArray
buf
;
try
{
buf
=
file
.
readAll
();
}
catch
(
std
::
bad_alloc
)
{
return
false
;
}
int
bytesRead
=
buf
.
size
();
QTextCodec
*
codec
=
d
->
m_codec
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment