I don't see why this would have detached, but make clazy happy

This commit is contained in:
Nicolas Werner 2022-12-13 23:47:08 +01:00
parent 8730586cfd
commit eefa6379f9
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9

View File

@ -42,7 +42,8 @@ MxcImageProvider::MxcImageProvider(QObject *parent)
QDir::SortFlags(QDir::Name | QDir::IgnoreCase),
QDir::Filter::Writable | QDir::Filter::NoDotAndDotDot | QDir::Filter::Files);
for (const auto &fileInfo : dir.entryInfoList()) {
auto files = dir.entryInfoList();
for (const auto &fileInfo : qAsConst(files)) {
if (fileInfo.fileTime(QFile::FileTime::FileAccessTime)
.daysTo(QDateTime::currentDateTime()) > 30) {
if (QFile::remove(fileInfo.absoluteFilePath()))