[telepathy-qt4/master] ClientRegistrar: Use QDateTime to represent userActionTime.
Andre Moreira Magalhaes (andrunko)
andre.magalhaes at collabora.co.uk
Tue May 19 06:48:59 PDT 2009
---
TelepathyQt4/abstract-client.h | 2 +-
TelepathyQt4/client-registrar.cpp | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/TelepathyQt4/abstract-client.h b/TelepathyQt4/abstract-client.h
index aaf1a5d..6e8a67e 100644
--- a/TelepathyQt4/abstract-client.h
+++ b/TelepathyQt4/abstract-client.h
@@ -71,7 +71,7 @@ public:
const ConnectionPtr &connection,
const QList<ChannelPtr> &channels,
const QStringList &requestsSatisfied,
- qulonglong userActionTime,
+ const QDateTime &userActionTime,
const QVariantMap &handlerInfo) = 0;
bool isListeningRequests() const;
diff --git a/TelepathyQt4/client-registrar.cpp b/TelepathyQt4/client-registrar.cpp
index 2b942e3..4296c97 100644
--- a/TelepathyQt4/client-registrar.cpp
+++ b/TelepathyQt4/client-registrar.cpp
@@ -190,8 +190,16 @@ void ClientHandlerAdaptor::HandleChannelsCall::checkFinished()
foreach (const QDBusObjectPath &path, mRequestsSatisfied) {
requestsSatisfied.append(path.path());
}
+
+ // FIXME: Telepathy supports 64-bit time_t, but Qt only does so on
+ // ILP64 systems (e.g. sparc64, but not x86_64). If QDateTime
+ // gains a fromTimestamp64 method, we should use it instead.
+ QDateTime userActionTime;
+ if (mUserActionTime != 0) {
+ userActionTime = QDateTime::fromTime_t((uint) mUserActionTime);
+ }
mClient->handleChannels(mOperation, mAccount, mConnection, mChannels,
- requestsSatisfied, mUserActionTime, mHandlerInfo);
+ requestsSatisfied, userActionTime, mHandlerInfo);
emit finished();
}
--
1.5.6.5
More information about the telepathy-commits
mailing list