From 2605108f686ee4ffbbe580272ad7b2da9f18b0c0 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 28 Aug 2017 11:29:15 +0200 Subject: [PATCH] FileName::exists(): Check for empty files first Fixes warnings "Empty filename passed to function" (introduced by qtbase 0dee566e98f5ff4f224e596de1c04de4f9685df4) emitted when running Qt Creator against 5.10. The warnings originate from Kit::icon(). Change-Id: I501914195b8e4d340fd02362b215ffc6e3dc99d4 Reviewed-by: Tobias Hunger --- src/libs/utils/fileutils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/utils/fileutils.cpp b/src/libs/utils/fileutils.cpp index 254b7700e8a..338ae657d8b 100644 --- a/src/libs/utils/fileutils.cpp +++ b/src/libs/utils/fileutils.cpp @@ -615,7 +615,7 @@ QString FileName::fileName(int pathComponents) const /// FileName exists. bool FileName::exists() const { - return QFileInfo::exists(*this); + return !isEmpty() && QFileInfo::exists(*this); } /// Find the parent directory of a given directory.