QtDBus: compile with QT_STRICT_ITERATORS

Unlike most other modules, QtDBus in its use of QVector also needs to
check if the item isn't null, which makes for some special changes.

Change-Id: Ia22ad2a6b26c9c34dc09ab882d81323a941d166a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
Thiago Macieira 2012-05-24 16:45:11 +02:00 committed by Qt by Nokia
parent 395f7579c0
commit fad1fa65ed
2 changed files with 5 additions and 5 deletions

View File

@ -789,7 +789,7 @@ bool QDBusConnection::registerObject(const QString &path, QObject *object, Regis
QDBusWriteLocker locker(RegisterObjectAction, d);
// lower-bound search for where this object should enter in the tree
QDBusConnectionPrivate::ObjectTreeNode *node = &d->rootNode;
QDBusConnectionPrivate::ObjectTreeNode::DataList::Iterator node = &d->rootNode;
int i = 1;
while (node) {
if (pathComponents.count() == i) {

View File

@ -442,7 +442,7 @@ static bool findObject(const QDBusConnectionPrivate::ObjectTreeNode *root,
start = 1;
// walk the object tree
const QDBusConnectionPrivate::ObjectTreeNode *node = root;
QDBusConnectionPrivate::ObjectTreeNode::DataList::ConstIterator node = root;
while (start < length && node) {
if (node->flags & QDBusConnection::ExportChildObjects)
break;
@ -1538,7 +1538,7 @@ void QDBusActivateObjectEvent::placeMetaCall(QObject *)
void QDBusConnectionPrivate::handleSignal(const QString &key, const QDBusMessage& msg)
{
SignalHookHash::const_iterator it = signalHooks.find(key);
SignalHookHash::const_iterator it = signalHooks.constFind(key);
SignalHookHash::const_iterator end = signalHooks.constEnd();
//qDebug("looking for: %s", path.toLocal8Bit().constData());
//qDBusDebug() << signalHooks.keys();
@ -2071,7 +2071,7 @@ bool QDBusConnectionPrivate::connectSignal(const QString &service,
return false; // don't connect
// avoid duplicating:
QDBusConnectionPrivate::SignalHookHash::ConstIterator it = signalHooks.find(key);
QDBusConnectionPrivate::SignalHookHash::ConstIterator it = signalHooks.constFind(key);
QDBusConnectionPrivate::SignalHookHash::ConstIterator end = signalHooks.constEnd();
for ( ; it != end && it.key() == key; ++it) {
const QDBusConnectionPrivate::SignalHook &entry = it.value();
@ -2252,7 +2252,7 @@ void QDBusConnectionPrivate::connectRelay(const QString &service,
// add it to our list:
QDBusWriteLocker locker(ConnectRelayAction, this);
SignalHookHash::ConstIterator it = signalHooks.find(key);
SignalHookHash::ConstIterator it = signalHooks.constFind(key);
SignalHookHash::ConstIterator end = signalHooks.constEnd();
for ( ; it != end && it.key() == key; ++it) {
const SignalHook &entry = it.value();