forked from qt-creator/qt-creator
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user