Commit c38b451c authored by Martin Straka's avatar Martin Straka

Fixed read fol file

parent 0d303c01
......@@ -25,7 +25,6 @@
#include <QFileInfo>
#include <QQmlEngine>
#include <QSysInfo>
#include <QTextStream>
#include "ios/src/url_opener.h"
#include "src/auxiliaries/attachment_helper.h"
......@@ -168,7 +167,6 @@ QString Files::loadLogContent(const QString &filePath)
if (filePath.isEmpty()) {
MemoryLog *mLog = GlobInstcs::logPtr->memoryLog();
if (mLog == Q_NULLPTR) {
return QString();
}
......@@ -178,7 +176,6 @@ QString Files::loadLogContent(const QString &filePath)
log.append(mLog->message(key));
}
} else {
QFile file(filePath);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
Q_ASSERT(0);
......@@ -186,12 +183,7 @@ QString Files::loadLogContent(const QString &filePath)
filePath.toUtf8().constData());
return QString();
}
QTextStream in(&file);
while (!in.atEnd()) {
QString line = in.readLine();
log.append(line);
}
log.append(file.readAll());
file.close();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment