telepathy-qt: BaseChannelRoomInterface: Fixed CreationTimestamp property.

Alexandr Akulich kaffeine at kemper.freedesktop.org
Wed Sep 2 21:22:34 PDT 2015


Module: telepathy-qt
Branch: master
Commit: cc809cf8e109b8577a6b2b51e266255cfeed7ea6
URL:    http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=cc809cf8e109b8577a6b2b51e266255cfeed7ea6

Author: Alexandr Akulich <akulichalexander at gmail.com>
Date:   Tue Sep  1 16:47:46 2015 +0600

BaseChannelRoomInterface: Fixed CreationTimestamp property.

For C++ API the property is QDateTime, but
for Telepathy DBus API it is qlonglong (Unix_Timestamp64).

---

 TelepathyQt/base-channel-internal.h |    4 ++--
 TelepathyQt/base-channel.cpp        |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/TelepathyQt/base-channel-internal.h b/TelepathyQt/base-channel-internal.h
index 2344e74..c86e07b 100644
--- a/TelepathyQt/base-channel-internal.h
+++ b/TelepathyQt/base-channel-internal.h
@@ -358,7 +358,7 @@ class TP_QT_NO_EXPORT BaseChannelRoomInterface::Adaptee : public QObject
     Q_PROPERTY(QString server READ server)
     Q_PROPERTY(QString creator READ creator)
     Q_PROPERTY(uint creatorHandle READ creatorHandle)
-    Q_PROPERTY(QDateTime creationTimestamp READ creationTimestamp)
+    Q_PROPERTY(qlonglong creationTimestamp READ creationTimestamp)
 
 public:
     Adaptee(BaseChannelRoomInterface *interface);
@@ -368,7 +368,7 @@ public:
     QString server() const;
     QString creator() const;
     uint creatorHandle() const;
-    QDateTime creationTimestamp() const;
+    qlonglong creationTimestamp() const;
 
 private:
     BaseChannelRoomInterface *mInterface;
diff --git a/TelepathyQt/base-channel.cpp b/TelepathyQt/base-channel.cpp
index c31eff6..8eb33cf 100644
--- a/TelepathyQt/base-channel.cpp
+++ b/TelepathyQt/base-channel.cpp
@@ -2605,9 +2605,9 @@ uint BaseChannelRoomInterface::Adaptee::creatorHandle() const
     return mInterface->creatorHandle();
 }
 
-QDateTime BaseChannelRoomInterface::Adaptee::creationTimestamp() const
+qlonglong BaseChannelRoomInterface::Adaptee::creationTimestamp() const
 {
-    return mInterface->creationTimestamp();
+    return mInterface->creationTimestamp().toTime_t();
 }
 
 /**



More information about the telepathy-commits mailing list