QDirIterator::nextFileInfo is Qt 6.3+

This commit is contained in:
Basile Clément 2025-03-24 18:33:26 +01:00
parent 53cd3dffeb
commit b28b491ec3
No known key found for this signature in database

View file

@ -204,7 +204,13 @@ bool PictureLoader::hasCustomArt()
// Check if there is at least one non-directory file in the pics path, other
// than in the "downloadedPics" subdirectory.
while (it.hasNext()) {
QFileInfo dir = it.nextFileInfo();
#if (QT_VERSION >= QT_VERSION_CHECK(6, 3, 0))
QFileInfo dir(it.nextFileInfo());
#else
// nextFileInfo() is only available in Qt 6.3+, for previous versions, we build
// the QFileInfo from a QString which requires more system calls.
QFileInfo dir(it.next());
#endif
if (it.fileName() == "downloadedPics")
continue;