diff --git a/src/qtpromise/qpromise_p.h b/src/qtpromise/qpromise_p.h index c97e63d..2afb803 100644 --- a/src/qtpromise/qpromise_p.h +++ b/src/qtpromise/qpromise_p.h @@ -34,9 +34,10 @@ namespace QtPromisePrivate { template static void qtpromise_defer(F&& f, const QPointer& thread) { + using FType = typename std::decay::type; + struct Event : public QEvent { - using FType = typename std::decay::type; Event(FType&& f) : QEvent(QEvent::None), m_f(std::move(f)) { } Event(const FType& f) : QEvent(QEvent::None), m_f(f) { } ~Event() { m_f(); }