forked from qt-creator/qt-creator
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:
@@ -437,15 +437,24 @@ class DesktopFilePathWatcher final : public FilePathWatcher
|
|||||||
void init() { QMetaObject::invokeMethod(this, &Private::_init, Qt::QueuedConnection); }
|
void init() { QMetaObject::invokeMethod(this, &Private::_init, Qt::QueuedConnection); }
|
||||||
bool watch(DesktopFilePathWatcher *watcher)
|
bool watch(DesktopFilePathWatcher *watcher)
|
||||||
{
|
{
|
||||||
return QMetaObject::invokeMethod(
|
bool result;
|
||||||
this, [this, watcher] { return _watch(watcher); }, Qt::BlockingQueuedConnection);
|
QMetaObject::invokeMethod(
|
||||||
|
this,
|
||||||
|
[this, watcher] { return _watch(watcher); },
|
||||||
|
Qt::BlockingQueuedConnection,
|
||||||
|
&result);
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
bool removeWatch(DesktopFilePathWatcher *watcher)
|
bool removeWatch(DesktopFilePathWatcher *watcher)
|
||||||
{
|
{
|
||||||
|
bool result;
|
||||||
return QMetaObject::invokeMethod(
|
return QMetaObject::invokeMethod(
|
||||||
this,
|
this,
|
||||||
[this, watcher] { return _removeWatch(watcher); },
|
[this, watcher] { return _removeWatch(watcher); },
|
||||||
Qt::BlockingQueuedConnection);
|
Qt::BlockingQueuedConnection,
|
||||||
|
&result);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Reference in New Issue
Block a user