telepathy-qt: BaseChannelMessagesInterface: Use QMap::contains() instead of count()

Alexandr Akulich kaffeine at kemper.freedesktop.org
Wed May 2 17:52:29 UTC 2018


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

Author: Alexandr Akulich <akulichalexander at gmail.com>
Date:   Wed Apr 26 04:22:15 2017 +0500

BaseChannelMessagesInterface: Use QMap::contains() instead of count()

---

 TelepathyQt/base-channel.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/TelepathyQt/base-channel.cpp b/TelepathyQt/base-channel.cpp
index 3832f0ba..04683571 100644
--- a/TelepathyQt/base-channel.cpp
+++ b/TelepathyQt/base-channel.cpp
@@ -771,7 +771,7 @@ QString BaseChannelMessagesInterface::sendMessage(const Tp::MessagePartList &mes
     MessagePart header = fixedMessage.front();
 
     uint timestamp = 0;
-    if (header.count(QLatin1String("message-sent"))) {
+    if (header.contains(QLatin1String("message-sent"))) {
         timestamp = header[QLatin1String("message-sent")].variant().toUInt();
     } else {
         timestamp = QDateTime::currentMSecsSinceEpoch() / 1000;



More information about the telepathy-commits mailing list