Utils/ProjectExplorer: Add IDevice::searchInPath

Change-Id: Ibc7cc7bd6bf3a7776681f7cd2fff051525b19f60
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2021-06-07 15:47:06 +02:00
parent 16a8a08484
commit 18245dcf10
7 changed files with 55 additions and 0 deletions

View File

@@ -76,6 +76,7 @@ public:
std::function<bool(const FilePath &)> ensureWritableDir;
std::function<bool(const FilePath &)> createDir;
std::function<bool(const FilePath &)> exists;
std::function<FilePath(const FilePath &)> searchInPath;
std::function<QList<FilePath>(const FilePath &, const QStringList &, QDir::Filters)> dirEntries;
std::function<QByteArray(const FilePath &, int)> fileContents;
};
@@ -180,6 +181,8 @@ public:
static void setDeviceFileHooks(const DeviceFileHooks &hooks);
FilePath onDeviceSearchInPath() const;
private:
friend class ::tst_fileutils;
static QString calcRelativePath(const QString &absolutePath, const QString &absoluteAnchorPath);