[Telepathy-commits] [telepathy-qt4/master] Message: add a default constructor for internal use

Simon McVittie simon.mcvittie at collabora.co.uk
Fri Feb 20 04:10:09 PST 2009


It turns out to be useful to be able to have a null Message; we need to
have an event queue that lists structures containing either a message
or a "message-removal event". Pending message IDs aren't necessarily
unique, so we can't process message-removal events out of order.
---
 TelepathyQt4/Client/text-channel.cpp |   14 ++++++++++++++
 TelepathyQt4/Client/text-channel.h   |    2 ++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/TelepathyQt4/Client/text-channel.cpp b/TelepathyQt4/Client/text-channel.cpp
index c432193..2f520db 100644
--- a/TelepathyQt4/Client/text-channel.cpp
+++ b/TelepathyQt4/Client/text-channel.cpp
@@ -127,6 +127,13 @@ void Message::Private::clearSenderHandle()
  */
 
 /**
+ * Default constructor, only used internally.
+ */
+Message::Message()
+{
+}
+
+/**
  * Constructor.
  *
  * \param parts The parts of a message as defined by the Telepathy D-Bus
@@ -392,6 +399,13 @@ MessagePart Message::part(uint index) const
  */
 
 /**
+ * Default constructor, only used internally.
+ */
+ReceivedMessage::ReceivedMessage()
+{
+}
+
+/**
  * Constructor.
  *
  * \param parts The parts of a message as defined by the Telepathy D-Bus
diff --git a/TelepathyQt4/Client/text-channel.h b/TelepathyQt4/Client/text-channel.h
index d87d5b0..479b5f3 100644
--- a/TelepathyQt4/Client/text-channel.h
+++ b/TelepathyQt4/Client/text-channel.h
@@ -72,6 +72,7 @@ public:
 protected:
     friend class TextChannel;
 
+    Message();
     Message(const MessagePartList &parts);
     Message(uint, uint, const QString &);
 
@@ -95,6 +96,7 @@ private:
     friend class TextChannel;
     ReceivedMessage(const MessagePartList &parts, const TextChannel *channel,
             QSharedPointer<Contact> sender);
+    ReceivedMessage();
 };
 
 class TextChannel : public Channel
-- 
1.5.6.5




More information about the telepathy-commits mailing list