migrate to Qt6

This commit is contained in:
codestation
2025-05-31 15:09:15 -05:00
parent 65f0eab8ca
commit 364dd34ced
24 changed files with 69 additions and 220 deletions

View File

@@ -70,31 +70,7 @@ bool removeRecursively(const QString &path)
QFileInfo file_info(path);
if(file_info.isDir()) {
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
return QDir(path).removeRecursively();
#else
bool result = false;
QDir dir(path);
QDir::Filters filter = QDir::NoDotAndDotDot | QDir::System | QDir::Hidden | QDir::AllDirs | QDir::Files;
if(dir.exists(path)) {
foreach(QFileInfo info, dir.entryInfoList(filter, QDir::DirsFirst)) {
if(info.isDir()) {
result = removeRecursively(info.absoluteFilePath());
} else {
result = QFile::remove(info.absoluteFilePath());
}
if(!result) {
return result;
}
}
result = dir.rmdir(path);
}
return result;
#endif
} else {
return QFile::remove(path);
}