Make valgrind happy.
This commit is contained in:
parent
fbaf5f0f38
commit
cbc137f4e9
|
@ -35,6 +35,7 @@
|
||||||
|
|
||||||
#include "QtConcurrent/qtconcurrentrun.h"
|
#include "QtConcurrent/qtconcurrentrun.h"
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
#include <QDirIterator>
|
||||||
#include <QFileSystemWatcher>
|
#include <QFileSystemWatcher>
|
||||||
#include <QFuture>
|
#include <QFuture>
|
||||||
#include <QLibraryInfo>
|
#include <QLibraryInfo>
|
||||||
|
@ -669,7 +670,13 @@ void VAbstractApplication::ClearOldLogs()
|
||||||
// Restore working directory
|
// Restore working directory
|
||||||
auto restore = qScopeGuard([workingDirectory] { QDir::setCurrent(workingDirectory); });
|
auto restore = qScopeGuard([workingDirectory] { QDir::setCurrent(workingDirectory); });
|
||||||
|
|
||||||
const QStringList allFiles = logsDir.entryList(QDir::NoDotAndDotDot | QDir::Files);
|
QDirIterator it(logsDir.absolutePath(), QDir::Files | QDir::NoDotAndDotDot, QDirIterator::NoIteratorFlags);
|
||||||
|
QStringList allFiles;
|
||||||
|
while (it.hasNext())
|
||||||
|
{
|
||||||
|
allFiles << it.next();
|
||||||
|
}
|
||||||
|
|
||||||
if (allFiles.isEmpty())
|
if (allFiles.isEmpty())
|
||||||
{
|
{
|
||||||
qDebug("There are no old logs.");
|
qDebug("There are no old logs.");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user