From d514b48ef6dc68c9eaab4cefc49d99fdefe7843c Mon Sep 17 00:00:00 2001 From: noavarice Date: Sun, 27 Aug 2017 10:13:14 +0300 Subject: [PATCH] refactor: register GroupInvite as meta-type --- src/model/groupinvite.h | 5 +++-- src/nexus.cpp | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/model/groupinvite.h b/src/model/groupinvite.h index 96e291d55..acb7ac261 100644 --- a/src/model/groupinvite.h +++ b/src/model/groupinvite.h @@ -27,6 +27,7 @@ class GroupInvite { public: + GroupInvite() = default; GroupInvite(uint32_t friendId, uint8_t inviteType, const QByteArray& data); bool operator==(const GroupInvite& other) const; @@ -36,8 +37,8 @@ public: QDateTime getInviteDate() const; private: - uint32_t friendId; - uint8_t type; + uint32_t friendId{0}; + uint8_t type{0}; QByteArray invite; QDateTime date; }; diff --git a/src/nexus.cpp b/src/nexus.cpp index b7d96429a..617a61771 100644 --- a/src/nexus.cpp +++ b/src/nexus.cpp @@ -22,6 +22,7 @@ #include "persistence/settings.h" #include "src/core/core.h" #include "src/core/coreav.h" +#include "src/model/groupinvite.h" #include "src/persistence/profile.h" #include "src/widget/widget.h" #include "video/camerasource.h" @@ -106,6 +107,7 @@ void Nexus::start() qRegisterMetaType>("std::shared_ptr"); qRegisterMetaType("ToxPk"); qRegisterMetaType("ToxId"); + qRegisterMetaType("GroupInvite"); loginScreen = new LoginScreen();