forked from qt-creator/qt-creator
Utils: Handle filePathInfo() like other path tests
filePathInfo() should not result in warning messages if the path is for a non existing device, just like exists etc. Fixes: QTCREATORBUG-28439 Change-Id: I47a66bd38a40a86460c4769c1a2156167e467c1b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -628,11 +628,6 @@ expected_str<qint64> FilePath::writeFileContents(const QByteArray &data, qint64
|
||||
return fileAccess()->writeFileContents(*this, data, offset);
|
||||
}
|
||||
|
||||
FilePathInfo FilePath::filePathInfo() const
|
||||
{
|
||||
return fileAccess()->filePathInfo(*this);
|
||||
}
|
||||
|
||||
FileStreamHandle FilePath::asyncCopy(const FilePath &target, QObject *context,
|
||||
const CopyContinuation &cont) const
|
||||
{
|
||||
@@ -1188,6 +1183,14 @@ bool FilePath::hasFileAccess() const
|
||||
return access.has_value();
|
||||
}
|
||||
|
||||
FilePathInfo FilePath::filePathInfo() const
|
||||
{
|
||||
const expected_str<DeviceFileAccess *> access = getFileAccess(*this);
|
||||
if (!access)
|
||||
return {};
|
||||
return (*access)->filePathInfo(*this);
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns a bool indicating whether a file or directory with this FilePath exists.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user