From 01440f728d0817b2903e17045d5d9ec09515e3d1 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Tue, 28 Jul 2020 21:21:20 +0200 Subject: [PATCH] Remove unused toVariant methods --- interfaces/conversationmessage.cpp | 27 --------------------------- interfaces/conversationmessage.h | 3 --- 2 files changed, 30 deletions(-) diff --git a/interfaces/conversationmessage.cpp b/interfaces/conversationmessage.cpp index f9951fa00..0877597ec 100644 --- a/interfaces/conversationmessage.cpp +++ b/interfaces/conversationmessage.cpp @@ -69,37 +69,10 @@ ConversationMessage ConversationMessage::fromDBus(const QDBusVariant& var) return message; } -QVariantMap ConversationMessage::toVariant() const -{ - QVariantList addresses; - for (const ConversationAddress& address : m_addresses) { - addresses.push_back(address.toVariant()); - } - - return { - {QStringLiteral("event"), m_eventField}, - {QStringLiteral("body"), m_body}, - {QStringLiteral("addresses"), addresses}, - {QStringLiteral("date"), m_date}, - {QStringLiteral("type"), m_type}, - {QStringLiteral("read"), m_read}, - {QStringLiteral("thread_id"), m_threadID}, - {QStringLiteral("_id"), m_uID}, - {QStringLiteral("sub_id"), m_subID} - }; -} - ConversationAddress::ConversationAddress(QString address) : m_address(address) {} -QVariantMap ConversationAddress::toVariant() const -{ - return { - {QStringLiteral("address"), address()}, - }; -} - void ConversationMessage::registerDbusType() { qDBusRegisterMetaType(); diff --git a/interfaces/conversationmessage.h b/interfaces/conversationmessage.h index aceee4208..84b7a0c74 100644 --- a/interfaces/conversationmessage.h +++ b/interfaces/conversationmessage.h @@ -76,8 +76,6 @@ public: qint32 uID() const { return m_uID; } qint64 subID() const { return m_subID; } - QVariantMap toVariant() const; - bool containsTextBody() const { return (eventField() & ConversationMessage::EventTextMessage); } bool isMultitarget() const { return (eventField() & ConversationMessage::EventMultiTarget); } @@ -146,7 +144,6 @@ public: QString address() const { return m_address; } - QVariantMap toVariant() const; private: QString m_address; };