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 <tobias.hunger@qt.io>
This commit is contained in:
Friedemann Kleint
2017-08-28 11:29:15 +02:00
parent 34c0b2c23d
commit 2605108f68

View File

@@ -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.