[Telepathy-commits] [telepathy-qt4/master] Connection: Changed for/Q_FOREACH to foreach wherever possible.
Andre Moreira Magalhaes (andrunko)
andre.magalhaes at collabora.co.uk
Thu Jan 22 09:55:27 PST 2009
---
TelepathyQt4/Client/connection.cpp | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/TelepathyQt4/Client/connection.cpp b/TelepathyQt4/Client/connection.cpp
index 1f9e3a4..6d83c8d 100644
--- a/TelepathyQt4/Client/connection.cpp
+++ b/TelepathyQt4/Client/connection.cpp
@@ -161,7 +161,7 @@ Connection::Private::~Private()
if (!--handleContext->refcount) {
debug() << "Destroying HandleContext";
- Q_FOREACH (uint handleType, handleContext->types.keys()) {
+ foreach (uint handleType, handleContext->types.keys()) {
HandleContext::Type type = handleContext->types[handleType];
if (!type.refcounts.empty()) {
@@ -851,17 +851,16 @@ void Connection::gotInterfaces(QDBusPendingCallWatcher *watcher)
"- assuming no new interfaces";
}
- for (QStringList::const_iterator i = mPriv->interfaces.constBegin();
- i != mPriv->interfaces.constEnd(); ++i) {
+ foreach (const QString &interface, mPriv->interfaces) {
void (Private::*introspectFunc)() = 0;
- if (*i == TELEPATHY_INTERFACE_CONNECTION_INTERFACE_ALIASING) {
+ if (interface == TELEPATHY_INTERFACE_CONNECTION_INTERFACE_ALIASING) {
introspectFunc = &Private::introspectAliasing;
}
- else if (*i == TELEPATHY_INTERFACE_CONNECTION_INTERFACE_PRESENCE) {
+ else if (interface == TELEPATHY_INTERFACE_CONNECTION_INTERFACE_PRESENCE) {
introspectFunc = &Private::introspectPresence;
}
- else if (*i == TELEPATHY_INTERFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE) {
+ else if (interface == TELEPATHY_INTERFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE) {
introspectFunc = &Private::introspectSimplePresence;
}
--
1.5.6.5
More information about the Telepathy-commits
mailing list