Utils: Make DeviceFileHooks access a bit more self-contained

Change-Id: Ib13035820021e9eda0585f98885bef9cbd2317a6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
hjk
2022-08-04 10:44:45 +02:00
parent 451d02c88d
commit 8945b3832c
4 changed files with 10 additions and 15 deletions

View File

@@ -65,6 +65,11 @@ namespace Utils {
static DeviceFileHooks s_deviceHooks;
DeviceFileHooks &DeviceFileHooks::instance()
{
return s_deviceHooks;
}
static bool removeRecursivelyLocal(const FilePath &filePath, QString *error)
{
@@ -118,11 +123,6 @@ static bool removeRecursivelyLocal(const FilePath &filePath, QString *error)
return true;
}
void FilePath::setDeviceFileHooks(const DeviceFileHooks &hooks)
{
s_deviceHooks = hooks;
}
/*!
If this is a directory, the function will recursively check all files and return
true if one of them is newer than \a timeStamp. If this is a single file, true will