[Telepathy-commits] [telepathy-qt4/master] Change Message(type, text) constructor to take a ChannelTextMessageType, and make it public

Simon McVittie simon.mcvittie at collabora.co.uk
Fri Feb 20 11:48:58 PST 2009


---
 TelepathyQt4/Client/message.cpp |    4 ++--
 TelepathyQt4/Client/message.h   |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/TelepathyQt4/Client/message.cpp b/TelepathyQt4/Client/message.cpp
index dfed7c9..9f4f5cc 100644
--- a/TelepathyQt4/Client/message.cpp
+++ b/TelepathyQt4/Client/message.cpp
@@ -172,11 +172,11 @@ Message::Message(uint timestamp, uint type, const QString &text)
  * \param type The message type
  * \param text The text of the message
  */
-Message::Message(uint type, const QString &text)
+Message::Message(ChannelTextMessageType type, const QString &text)
     : mPriv(new Private(MessagePartList() << MessagePart() << MessagePart()))
 {
     mPriv->parts[0].insert(QString::fromAscii("message-type"),
-            QDBusVariant(type));
+            QDBusVariant(static_cast<uint>(type)));
 
     mPriv->parts[1].insert(QString::fromAscii("content-type"),
             QDBusVariant(QString::fromAscii("text/plain")));
diff --git a/TelepathyQt4/Client/message.h b/TelepathyQt4/Client/message.h
index e0ac335..c82be71 100644
--- a/TelepathyQt4/Client/message.h
+++ b/TelepathyQt4/Client/message.h
@@ -44,6 +44,7 @@ class Message
 {
 public:
 
+    Message(ChannelTextMessageType, const QString &);
     Message(const Message &other);
     Message &operator=(const Message &other);
     bool operator==(const Message &other) const;
@@ -80,7 +81,6 @@ private:
 
     Message();
     Message(const MessagePartList &parts);
-    Message(uint, const QString &);
     Message(uint, uint, const QString &);
 
     class Private;
-- 
1.5.6.5




More information about the telepathy-commits mailing list