From c75eb544afb18c05be83d04626fc02e3ed2eb603 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Sat, 21 Jul 2012 21:15:44 +0200 Subject: make QXmppMessage use implicit data sharing --- src/base/QXmppMessage.h | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) (limited to 'src/base/QXmppMessage.h') diff --git a/src/base/QXmppMessage.h b/src/base/QXmppMessage.h index 8bb6b835..c0ac487a 100644 --- a/src/base/QXmppMessage.h +++ b/src/base/QXmppMessage.h @@ -28,6 +28,8 @@ #include #include "QXmppStanza.h" +class QXmppMessagePrivate; + /// \brief The QXmppMessage class represents an XMPP message. /// /// \ingroup Stanzas @@ -60,8 +62,11 @@ public: QXmppMessage(const QString& from = "", const QString& to = "", const QString& body = "", const QString& thread = ""); + QXmppMessage(const QXmppMessage &other); ~QXmppMessage(); + QXmppMessage& operator=(const QXmppMessage &other); + QString body() const; void setBody(const QString&); @@ -98,29 +103,7 @@ public: /// \endcond private: - /// This enum describe a type of message timestamp. - enum StampType - { - LegacyDelayedDelivery, ///< XEP-0091: Legacy Delayed Delivery - DelayedDelivery, ///< XEP-0203: Delayed Delivery - }; - - Type m_type; - QDateTime m_stamp; - StampType m_stampType; - State m_state; - - bool m_attentionRequested; - QString m_body; - QString m_subject; - QString m_thread; - - // XEP-0071: XHTML-IM - QString m_xhtml; - - // Request message receipt as per XEP-0184. - QString m_receiptId; - bool m_receiptRequested; + QSharedDataPointer d; }; #endif // QXMPPMESSAGE_H -- cgit v1.2.3