telepathy-qt: contact-manager-roster: Change QMap to QHash where possible
Dario Freddi
drf at kemper.freedesktop.org
Mon Jul 2 06:56:30 PDT 2012
Module: telepathy-qt
Branch: master
Commit: 383f731cb1932288b37f6755168d1c698ec0d3f2
URL: http://cgit.freedesktop.org/telepathy/telepathy-qt/commit/?id=383f731cb1932288b37f6755168d1c698ec0d3f2
Author: Dario Freddi <dario.freddi at collabora.com>
Date: Sun Apr 29 16:05:49 2012 +0200
contact-manager-roster: Change QMap to QHash where possible
---
TelepathyQt/contact-manager-internal.h | 7 +++----
TelepathyQt/contact-manager-roster.cpp | 2 +-
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/TelepathyQt/contact-manager-internal.h b/TelepathyQt/contact-manager-internal.h
index e3bba7f..9632964 100644
--- a/TelepathyQt/contact-manager-internal.h
+++ b/TelepathyQt/contact-manager-internal.h
@@ -29,7 +29,6 @@
#include <TelepathyQt/Types>
#include <QList>
-#include <QMap>
#include <QObject>
#include <QQueue>
#include <QString>
@@ -223,12 +222,12 @@ private:
QQueue<QStringList> contactListGroupsRemovedQueue;
bool processingContactListChanges;
- QMap<PendingOperation * /* actual */, ModifyFinishOp *> returnedModifyOps;
+ QHash<PendingOperation * /* actual */, ModifyFinishOp *> returnedModifyOps;
QQueue<ModifyFinishOp *> modifyFinishQueue;
// old roster API
uint contactListChannelsReady;
- QMap<uint, ChannelInfo> contactListChannels;
+ QHash<uint, ChannelInfo> contactListChannels;
ChannelPtr subscribeChannel;
ChannelPtr publishChannel;
ChannelPtr storedChannel;
@@ -238,7 +237,7 @@ private:
// 1 for Get("Channels") + 1 per channel not ready
uint featureContactListGroupsTodo;
QList<ChannelPtr> pendingContactListGroupChannels;
- QMap<QString, ChannelPtr> contactListGroupChannels;
+ QHash<QString, ChannelPtr> contactListGroupChannels;
QList<ChannelPtr> removedContactListGroupChannels;
// If RosterGroups introspection completing should advance the ContactManager state to Success
diff --git a/TelepathyQt/contact-manager-roster.cpp b/TelepathyQt/contact-manager-roster.cpp
index 95cb2f9..db45ca1 100644
--- a/TelepathyQt/contact-manager-roster.cpp
+++ b/TelepathyQt/contact-manager-roster.cpp
@@ -1893,7 +1893,7 @@ void ContactManager::Roster::setContactListChannelsReady()
uint type;
ChannelPtr channel;
const char *method;
- for (QMap<uint, ChannelInfo>::const_iterator i = contactListChannels.constBegin();
+ for (QHash<uint, ChannelInfo>::const_iterator i = contactListChannels.constBegin();
i != contactListChannels.constEnd(); ++i) {
type = i.key();
channel = i.value().channel;
More information about the telepathy-commits
mailing list