From fbdfe1646247d79cde7f01e9e69c551c9c629f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Skowro=C5=84ski?= Date: Wed, 30 Jan 2019 20:19:36 +0100 Subject: [PATCH] Use faster form of QFileInfo(filename).exists(). [-Wclazy-qfileinfo-exists] Thanks Clazy! --- src/Gui/DownloadItem.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Gui/DownloadItem.cpp b/src/Gui/DownloadItem.cpp index 5dc7db8c65..10f78346e2 100644 --- a/src/Gui/DownloadItem.cpp +++ b/src/Gui/DownloadItem.cpp @@ -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 {