Commit 8f41be36 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Remove unneeded destructor/copy constructor/copy assignment operator

We don't have a custom destructor and the copy ctor/assignment operator don't do anything special, so the default one will do the right thing.

This is in accordance with the rule of zero (https://cpppatterns.com/patterns/rule-of-zero.html)
parent 1bd59787
Pipeline #28784 passed with stage
in 7 minutes and 26 seconds
......@@ -61,35 +61,6 @@ ConversationMessage::ConversationMessage (const qint32& eventField, const QStrin
{
}
ConversationMessage::ConversationMessage(const ConversationMessage& other)
: m_eventField(other.m_eventField)
, m_body(other.m_body)
, m_addresses(other.m_addresses)
, m_date(other.m_date)
, m_type(other.m_type)
, m_read(other.m_read)
, m_threadID(other.m_threadID)
, m_uID(other.m_uID)
, m_subID(other.m_subID)
{
}
ConversationMessage::~ConversationMessage() { }
ConversationMessage& ConversationMessage::operator=(const ConversationMessage& other)
{
this->m_eventField = other.m_eventField;
this->m_body = other.m_body;
this->m_addresses = other.m_addresses;
this->m_date = other.m_date;
this->m_type = other.m_type;
this->m_read = other.m_read;
this->m_threadID = other.m_threadID;
this->m_uID = other.m_uID;
this->m_subID = other.m_subID;
return *this;
}
ConversationMessage ConversationMessage::fromDBus(const QDBusVariant& var)
{
QDBusArgument data = var.variant().value<QDBusArgument>();
......@@ -122,19 +93,6 @@ ConversationAddress::ConversationAddress(QString address)
: m_address(address)
{}
ConversationAddress::ConversationAddress(const ConversationAddress& other)
: m_address(other.address())
{}
ConversationAddress::~ConversationAddress()
{}
ConversationAddress& ConversationAddress::operator=(const ConversationAddress& other)
{
this->m_address = other.m_address;
return *this;
}
QVariantMap ConversationAddress::toVariant() const
{
return {
......
......@@ -63,9 +63,6 @@ public:
const qint64& date, const qint32& type, const qint32& read,
const qint64& threadID, const qint32& uID, const qint64& subID);
ConversationMessage(const ConversationMessage& other);
~ConversationMessage();
ConversationMessage& operator=(const ConversationMessage& other);
static ConversationMessage fromDBus(const QDBusVariant&);
static void registerDbusType();
......@@ -146,9 +143,6 @@ class KDECONNECTINTERFACES_EXPORT ConversationAddress
{
public:
ConversationAddress(QString address = QStringLiteral());
ConversationAddress(const ConversationAddress& other);
~ConversationAddress();
ConversationAddress& operator=(const ConversationAddress& other);
QString address() const { return m_address; }
......
......@@ -198,7 +198,7 @@ void ConversationsDbusInterface::replyToConversation(const qint64& conversationI
QVariantList addresses;
for (const auto& address : addressList) {
addresses << QVariant::fromValue(addresse);
addresses << QVariant::fromValue(address);
}
m_smsInterface.sendSms(addresses, message, messagesList.first().subID());
......
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