diff --git a/src/model/interface.h b/src/model/interface.h index 37bf2a946..b9d122385 100644 --- a/src/model/interface.h +++ b/src/model/interface.h @@ -20,6 +20,8 @@ #ifndef INTERFACE_H #define INTERFACE_H +#include + #include /** @@ -48,7 +50,7 @@ */ #define DECLARE_SIGNAL(name, ...) \ using Slot_##name = std::function; \ - virtual void connectTo_##name(Slot_##name slot) const = 0 + virtual QMetaObject::Connection connectTo_##name(Slot_##name slot) const = 0 /** * @def DECLARE_SIGNAL @@ -56,7 +58,7 @@ */ #define DECLARE_SIGNAL(name, ...) \ using Slot_##name = std::function; \ - virtual void connectTo_##name(Slot_##name slot) const = 0 + virtual QMetaObject::Connection connectTo_##name(Slot_##name slot) const = 0 /** * @def SIGNAL_IMPL @@ -65,7 +67,7 @@ #define SIGNAL_IMPL(classname, name, ...) \ using Slot_##name = std::function; \ Q_SIGNAL void name(__VA_ARGS__); \ - void connectTo_##name(Slot_##name slot) const override { \ + QMetaObject::Connection connectTo_##name(Slot_##name slot) const override { \ connect(this, &classname::name, slot); \ }