Check if log file empty.

--HG--
branch : develop
This commit is contained in:
dismine 2014-12-27 21:12:45 +02:00
parent 4e6b5a8f24
commit 3febdd31fb

View File

@ -2280,7 +2280,15 @@ void VApplication::SendReport(const QString &reportName) const
QFile logFile(QString("%1/valentina.log").arg(LogDirPath()));
if (logFile.open(QIODevice::ReadOnly | QIODevice::Text))
{
content.append(ReadFileForSending(logFile));
const QString logContent = ReadFileForSending(logFile);
if (logContent.isEmpty())
{
content.append("Log file is empty.");
}
else
{
content.append(logContent);
}
logFile.close();
}
else