mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
build fix for the case when QT_STRICT_ITERATORS is not defined
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
8afa0fbd16
commit
ef4a737250
3 changed files with 28 additions and 0 deletions
|
@ -784,7 +784,11 @@ bool QDBusConnection::registerObject(const QString &path, QObject *object, Regis
|
|||
qLowerBound(node->children.begin(), node->children.end(), pathComponents.at(i));
|
||||
if (it != node->children.end() && it->name == pathComponents.at(i)) {
|
||||
// match: this node exists
|
||||
#ifdef QT_STRICT_ITERATORS
|
||||
node = it.i;
|
||||
#else
|
||||
node = it;
|
||||
#endif
|
||||
|
||||
// are we allowed to go deeper?
|
||||
if (node->flags & ExportChildObjects) {
|
||||
|
@ -795,7 +799,11 @@ bool QDBusConnection::registerObject(const QString &path, QObject *object, Regis
|
|||
}
|
||||
} else {
|
||||
// add entry
|
||||
#ifdef QT_STRICT_ITERATORS
|
||||
node = node->children.insert(it, pathComponents.at(i)).i;
|
||||
#else
|
||||
node = node->children.insert(it, pathComponents.at(i));
|
||||
#endif
|
||||
}
|
||||
|
||||
// iterate
|
||||
|
@ -842,7 +850,11 @@ void QDBusConnection::unregisterObject(const QString &path, UnregisterMode mode)
|
|||
if (it == node->children.end() || it->name != pathComponents.at(i))
|
||||
break; // node not found
|
||||
|
||||
#ifdef QT_STRICT_ITERATORS
|
||||
node = it.i;
|
||||
#else
|
||||
node = it;
|
||||
#endif
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
@ -876,7 +888,11 @@ QObject *QDBusConnection::objectRegisteredAt(const QString &path) const
|
|||
if (it == node->children.constEnd() || it->name != pathComponents.at(i))
|
||||
break; // node not found
|
||||
|
||||
#ifdef QT_STRICT_ITERATORS
|
||||
node = it.i;
|
||||
#else
|
||||
node = it;
|
||||
#endif
|
||||
++i;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -440,7 +440,11 @@ static bool findObject(const QDBusConnectionPrivate::ObjectTreeNode *root,
|
|||
qLowerBound(node->children.constBegin(), node->children.constEnd(), pathComponent);
|
||||
if (it != node->children.constEnd() && it->name == pathComponent)
|
||||
// match
|
||||
#ifdef QT_STRICT_ITERATORS
|
||||
node = it.i;
|
||||
#else
|
||||
node = it;
|
||||
#endif
|
||||
else
|
||||
node = 0;
|
||||
|
||||
|
|
|
@ -165,7 +165,11 @@ bool QScriptValueIterator::hasNext() const
|
|||
return false;
|
||||
|
||||
const_cast<QScriptValueIteratorPrivate*>(d)->ensureInitialized();
|
||||
#ifdef QT_STRICT_ITERATORS
|
||||
return d->it.i != d->propertyNames.end().i;
|
||||
#else
|
||||
return d->it != d->propertyNames.end();
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -201,7 +205,11 @@ bool QScriptValueIterator::hasPrevious() const
|
|||
return false;
|
||||
|
||||
const_cast<QScriptValueIteratorPrivate*>(d)->ensureInitialized();
|
||||
#ifdef QT_STRICT_ITERATORS
|
||||
return d->it.i != d->propertyNames.begin().i;
|
||||
#else
|
||||
return d->it != d->propertyNames.begin();
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
Loading…
Add table
Reference in a new issue