forked from qt-creator/qt-creator
BinEditor: Do not warn about empty file for memory editor
Change-Id: I124bf33a2b4ea4f81e8a6af21c1ccda0e0901ad2 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -222,7 +222,7 @@ public:
|
|||||||
bool open(QString *errorString, const QString &fileName, quint64 offset = 0) {
|
bool open(QString *errorString, const QString &fileName, quint64 offset = 0) {
|
||||||
QFile file(fileName);
|
QFile file(fileName);
|
||||||
quint64 size = static_cast<quint64>(file.size());
|
quint64 size = static_cast<quint64>(file.size());
|
||||||
if (size == 0) {
|
if (size == 0 && !fileName.isEmpty()) {
|
||||||
QString msg = tr("The Binary Editor cannot open empty files.");
|
QString msg = tr("The Binary Editor cannot open empty files.");
|
||||||
if (errorString)
|
if (errorString)
|
||||||
*errorString = msg;
|
*errorString = msg;
|
||||||
|
Reference in New Issue
Block a user