Check if log file empty.
--HG-- branch : develop
This commit is contained in:
parent
4e6b5a8f24
commit
3febdd31fb
|
@ -2280,7 +2280,15 @@ void VApplication::SendReport(const QString &reportName) const
|
||||||
QFile logFile(QString("%1/valentina.log").arg(LogDirPath()));
|
QFile logFile(QString("%1/valentina.log").arg(LogDirPath()));
|
||||||
if (logFile.open(QIODevice::ReadOnly | QIODevice::Text))
|
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();
|
logFile.close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user