diff options
Diffstat (limited to 'src/base')
| -rw-r--r-- | src/base/QXmppFutureUtils_p.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/base/QXmppFutureUtils_p.h b/src/base/QXmppFutureUtils_p.h index 9d188241..531d52e3 100644 --- a/src/base/QXmppFutureUtils_p.h +++ b/src/base/QXmppFutureUtils_p.h @@ -76,6 +76,12 @@ QFuture<T> makeReadyFuture(T &&value) return interface.future(); } +inline QFuture<void> makeReadyFuture() +{ + using State = QFutureInterfaceBase::State; + return QFutureInterface<void>(State(State::Started | State::Finished)).future(); +} + template<typename Result, typename Input, typename Converter> auto chain(QFuture<Input> &&source, QObject *context, Converter task) -> QFuture<Result> { |
