Commit 01440f72 authored by Nicolas Fella's avatar Nicolas Fella

Remove unused toVariant methods

parent 771c9dcd
Pipeline #30033 passed with stage
in 7 minutes and 30 seconds
......@@ -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<ConversationMessage>();
......
......@@ -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;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment