23 #ifndef QTPDCOM_FUTUREWATCHERS_H 24 #define QTPDCOM_FUTUREWATCHERS_H 26 #include <QFutureWatcher> 27 #include <pdcom5/Variable.h> 87 using QFutureWatcher<PdCom::Variable>::QFutureWatcher;
95 using QFutureWatcher<VariableList>::QFutureWatcher;
99 template<
class Result,
class Object,
class Callback>
100 inline QFutureWatcher<Result>&
createWatcher(Object *obj, Callback &&callback)
102 const auto watcher =
new QFutureWatcher<Result>(obj);
105 &QFutureWatcherBase::finished,
107 [callback, watcher, obj]() {
109 watcher->deleteLater();
113 &QFutureWatcherBase::canceled,
115 &QObject::deleteLater);
122 #endif // QTPDCOM_FUTUREWATCHERS_H static void call(Func &&func, Obj &obj, QFutureWatcher< Result > const *watcher)
Definition: FutureWatchersDetails.h:109
Definition: FutureWatchers.h:90
Definition: BroadcastModel.h:32
#define QTPDCOM_PUBLIC
Definition: Export.h:30
Convenience class for processing the result of Process::findQt()
Definition: FutureWatchers.h:82
QFutureWatcher< Result > & createWatcher(Object *obj, Callback &&callback)
Definition: FutureWatchers.h:100