From 4c479301ff812698b6a181e4ba35757273abec68 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sat, 29 Jan 2022 00:17:37 +0100 Subject: [PATCH] Register MtpConnection as metatype Fixes: ``` 00:13:02.210 WARN unknown QObject::connect: Cannot queue arguments of type 'MtpConnection*' 00:13:02.210 WARN unknown (Make sure 'MtpConnection*' is registered using qRegisterMetaType().) ``` --- src/core/metatypes.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/metatypes.cpp b/src/core/metatypes.cpp index 1f2611d2e..36ff68fca 100644 --- a/src/core/metatypes.cpp +++ b/src/core/metatypes.cpp @@ -74,6 +74,10 @@ #include "radios/radiochannel.h" +#ifdef HAVE_LIBMTP + #include "device/mtpconnection.h" +#endif + void RegisterMetaTypes() { qRegisterMetaType("const char*"); @@ -147,4 +151,8 @@ void RegisterMetaTypes() { qRegisterMetaType("RadioChannelList"); +#ifdef HAVE_LIBMTP + qRegisterMetaType("MtpConnection*"); +#endif + }