[Telepathy-commits] [telepathy-qt4/master] ContactManager: Un-inline identifierForType and typeForIdentifier.
Andre Moreira Magalhaes (andrunko)
andre.magalhaes at collabora.co.uk
Fri Feb 27 11:36:59 PST 2009
---
TelepathyQt4/Client/contact-manager.cpp | 23 +++++++++++++++++++++++
TelepathyQt4/Client/contact-manager.h | 23 ++---------------------
2 files changed, 25 insertions(+), 21 deletions(-)
diff --git a/TelepathyQt4/Client/contact-manager.cpp b/TelepathyQt4/Client/contact-manager.cpp
index d7982ca..d0a5326 100644
--- a/TelepathyQt4/Client/contact-manager.cpp
+++ b/TelepathyQt4/Client/contact-manager.cpp
@@ -639,5 +639,28 @@ void ContactManager::Private::updateContactsPresenceState()
}
}
+QString ContactManager::ContactListChannel::identifierForType(Type type)
+{
+ static QString identifiers[LastType] = {
+ "subscribe", "publish", "stored"
+ };
+ return identifiers[type];
+}
+
+uint ContactManager::ContactListChannel::typeForIdentifier(const QString &identifier)
+{
+ static QHash<QString, uint> types;
+ if (types.isEmpty()) {
+ types.insert("subscribe", TypeSubscribe);
+ types.insert("publish", TypePublish);
+ types.insert("Stored", TypeStored);
+ }
+ if (types.contains(identifier)) {
+ return types[identifier];
+ }
+ return (uint) -1;
+}
+
+
}
}
diff --git a/TelepathyQt4/Client/contact-manager.h b/TelepathyQt4/Client/contact-manager.h
index af9d502..aa38100 100644
--- a/TelepathyQt4/Client/contact-manager.h
+++ b/TelepathyQt4/Client/contact-manager.h
@@ -129,27 +129,8 @@ class ContactManager : public QObject
channel.clear();
}
- static QString identifierForType(Type type)
- {
- static QString identifiers[LastType] = {
- "subscribe", "publish", "stored"
- };
- return identifiers[type];
- }
-
- static uint typeForIdentifier(const QString &identifier)
- {
- static QHash<QString, uint> types;
- if (types.isEmpty()) {
- types.insert("subscribe", TypeSubscribe);
- types.insert("publish", TypePublish);
- types.insert("Stored", TypeStored);
- }
- if (types.contains(identifier)) {
- return types[identifier];
- }
- return (uint) -1;
- }
+ static QString identifierForType(Type type);
+ static uint typeForIdentifier(const QString &identifier);
Type type;
ReferencedHandles handle;
--
1.5.6.5
More information about the telepathy-commits
mailing list