telepathy-qt: connection: Change QMap to QHash where possible
Dario Freddi
drf at kemper.freedesktop.org
Mon Jul 2 06:56:29 PDT 2012
Module: telepathy-qt
Branch: master
Commit: c35aa1bbd819b2b1cb3dc2105d1088a5094f0458
URL: http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=c35aa1bbd819b2b1cb3dc2105d1088a5094f0458
Author: Dario Freddi <dario.freddi at collabora.com>
Date: Sun Apr 29 16:05:12 2012 +0200
connection: Change QMap to QHash where possible
---
TelepathyQt/connection.cpp | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/TelepathyQt/connection.cpp b/TelepathyQt/connection.cpp
index 6b898d1..aa74433 100644
--- a/TelepathyQt/connection.cpp
+++ b/TelepathyQt/connection.cpp
@@ -46,7 +46,6 @@
#include <TelepathyQt/PendingVoid>
#include <TelepathyQt/ReferencedHandles>
-#include <QMap>
#include <QMetaObject>
#include <QMutex>
#include <QMutexLocker>
@@ -147,7 +146,7 @@ struct TP_QT_NO_EXPORT Connection::Private
// misc
// (Bus connection name, service name) -> HandleContext
- static QMap<QPair<QString, QString>, HandleContext *> handleContexts;
+ static QHash<QPair<QString, QString>, HandleContext *> handleContexts;
static QMutex handleContextsLock;
HandleContext *handleContext;
@@ -171,7 +170,7 @@ struct TP_QT_NO_EXPORT Connection::Private::HandleContext
{
struct Type
{
- QMap<uint, uint> refcounts;
+ QHash<uint, uint> refcounts;
QSet<uint> toRelease;
uint requestsInFlight;
bool releaseScheduled;
@@ -190,7 +189,7 @@ struct TP_QT_NO_EXPORT Connection::Private::HandleContext
int refcount;
QMutex lock;
- QMap<uint, Type> types;
+ QHash<uint, Type> types;
};
Connection::Private::Private(Connection *parent,
@@ -771,7 +770,7 @@ void Connection::PendingConnect::onConnInvalidated(Tp::DBusProxy *proxy, const Q
SLOT(onStatusChanged(Tp::ConnectionStatus)));
}
-QMap<QPair<QString, QString>, Connection::Private::HandleContext*> Connection::Private::handleContexts;
+QHash<QPair<QString, QString>, Connection::Private::HandleContext*> Connection::Private::handleContexts;
QMutex Connection::Private::handleContextsLock;
/**
More information about the telepathy-commits
mailing list