Remove some qBinaryFind usages from QtWidgets
This is done per the mailing list discussion at http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I7e4a5a4010b0ded59dbe2cacc6afe23ae4121bfe Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
This commit is contained in:
parent
bacbf1fcf3
commit
893a9e1cf8
@ -1689,12 +1689,10 @@ void QFileSystemModelPrivate::_q_directoryChanged(const QString &directory, cons
|
||||
std::sort(newFiles.begin(), newFiles.end());
|
||||
QHash<QString, QFileSystemNode*>::const_iterator i = parentNode->children.constBegin();
|
||||
while (i != parentNode->children.constEnd()) {
|
||||
QStringList::iterator iterator;
|
||||
iterator = qBinaryFind(newFiles.begin(), newFiles.end(),
|
||||
i.value()->fileName);
|
||||
if (iterator == newFiles.end()) {
|
||||
QStringList::iterator iterator = std::lower_bound(newFiles.begin(), newFiles.end(), i.value()->fileName);
|
||||
if ((iterator == newFiles.end()) || (i.value()->fileName < *iterator))
|
||||
toRemove.append(i.value()->fileName);
|
||||
}
|
||||
|
||||
++i;
|
||||
}
|
||||
for (int i = 0 ; i < toRemove.count() ; ++i )
|
||||
|
@ -176,8 +176,8 @@ void QGraphicsItemAnimationPrivate::insertUniquePair(qreal step, qreal value, QL
|
||||
|
||||
Pair pair(step, value);
|
||||
|
||||
QList<Pair>::iterator result = qBinaryFind(binList->begin(), binList->end(), pair);
|
||||
if (result != binList->end())
|
||||
QList<Pair>::iterator result = std::lower_bound(binList->begin(), binList->end(), pair);
|
||||
if ((result != binList->end()) && !(pair < *result))
|
||||
result->value = value;
|
||||
else {
|
||||
*binList << pair;
|
||||
|
Loading…
Reference in New Issue
Block a user