Use faster form of QFileInfo(filename).exists(). [-Wclazy-qfileinfo-exists] Thanks Clazy!

This commit is contained in:
Mateusz Skowroński
2019-01-30 20:19:36 +01:00
committed by wmayer
parent 082647b2d1
commit fbdfe16462

View File

@@ -300,7 +300,11 @@ QString DownloadItem::getDownloadDirectory() const
dirPath = QString::fromUtf8(dir.c_str());
}
#if QT_VERSION >= 0x050000
if (QFileInfo::exists(dirPath) || QDir().mkpath(dirPath)) {
#else
if (QFileInfo(dirPath).exists() || QDir().mkpath(dirPath)) {
#endif
return dirPath;
}
else {