Utils: Fix watch return value

Change-Id: If6c50e4e4b74a63dd9b669ce43af4ddeb3520767
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Marcus Tillmanns
2024-09-18 08:04:44 +02:00
parent 95f5d7cec1
commit d87cc5a6f6

View File

@@ -437,15 +437,24 @@ class DesktopFilePathWatcher final : public FilePathWatcher
void init() { QMetaObject::invokeMethod(this, &Private::_init, Qt::QueuedConnection); }
bool watch(DesktopFilePathWatcher *watcher)
{
return QMetaObject::invokeMethod(
this, [this, watcher] { return _watch(watcher); }, Qt::BlockingQueuedConnection);
bool result;
QMetaObject::invokeMethod(
this,
[this, watcher] { return _watch(watcher); },
Qt::BlockingQueuedConnection,
&result);
return result;
}
bool removeWatch(DesktopFilePathWatcher *watcher)
{
bool result;
return QMetaObject::invokeMethod(
this,
[this, watcher] { return _removeWatch(watcher); },
Qt::BlockingQueuedConnection);
Qt::BlockingQueuedConnection,
&result);
return result;
}
protected: