forked from qt-creator/qt-creator
ProjectExplorer: Implement (Docker)Device::exists(filePath)
While the original plan was to use more specific functions like 'isReadableFile' to cut down the number of accesses, it is unrealistic to re-write all occurrences in reasonable time. So make the basic building blocks accessible, too. Change-Id: I2586ebd19e1e7ae2c884fd2a4180869421293e3a Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -832,7 +832,10 @@ void FilePath::setHost(const QString &host)
|
||||
/// FilePath exists.
|
||||
bool FilePath::exists() const
|
||||
{
|
||||
QTC_ASSERT(!needsDevice(), return false);
|
||||
if (needsDevice()) {
|
||||
QTC_ASSERT(s_deviceHooks.exists, return false);
|
||||
return s_deviceHooks.exists(*this);
|
||||
}
|
||||
return !isEmpty() && QFileInfo::exists(m_data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user