1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

refactor: register GroupInvite as meta-type

This commit is contained in:
noavarice 2017-08-27 10:13:14 +03:00
parent fd1fbebae0
commit d514b48ef6
No known key found for this signature in database
GPG Key ID: 52A50775BE13DF17
2 changed files with 5 additions and 2 deletions

View File

@ -27,6 +27,7 @@
class GroupInvite class GroupInvite
{ {
public: public:
GroupInvite() = default;
GroupInvite(uint32_t friendId, uint8_t inviteType, const QByteArray& data); GroupInvite(uint32_t friendId, uint8_t inviteType, const QByteArray& data);
bool operator==(const GroupInvite& other) const; bool operator==(const GroupInvite& other) const;
@ -36,8 +37,8 @@ public:
QDateTime getInviteDate() const; QDateTime getInviteDate() const;
private: private:
uint32_t friendId; uint32_t friendId{0};
uint8_t type; uint8_t type{0};
QByteArray invite; QByteArray invite;
QDateTime date; QDateTime date;
}; };

View File

@ -22,6 +22,7 @@
#include "persistence/settings.h" #include "persistence/settings.h"
#include "src/core/core.h" #include "src/core/core.h"
#include "src/core/coreav.h" #include "src/core/coreav.h"
#include "src/model/groupinvite.h"
#include "src/persistence/profile.h" #include "src/persistence/profile.h"
#include "src/widget/widget.h" #include "src/widget/widget.h"
#include "video/camerasource.h" #include "video/camerasource.h"
@ -106,6 +107,7 @@ void Nexus::start()
qRegisterMetaType<std::shared_ptr<VideoFrame>>("std::shared_ptr<VideoFrame>"); qRegisterMetaType<std::shared_ptr<VideoFrame>>("std::shared_ptr<VideoFrame>");
qRegisterMetaType<ToxPk>("ToxPk"); qRegisterMetaType<ToxPk>("ToxPk");
qRegisterMetaType<ToxId>("ToxId"); qRegisterMetaType<ToxId>("ToxId");
qRegisterMetaType<GroupInvite>("GroupInvite");
loginScreen = new LoginScreen(); loginScreen = new LoginScreen();