forked from qt-creator/qt-creator
Remove use of deprecated Qt algorithms
Change-Id: Ib35cffa2d5762874feea9b1d4df7f569c0e5f496 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
d4b3789db4
commit
670e54345c
@@ -34,6 +34,7 @@
|
||||
#include "qmljsviewercontext.h"
|
||||
|
||||
#include <cplusplus/cppmodelmanagerbase.h>
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/runextensions.h>
|
||||
|
||||
@@ -439,9 +440,9 @@ void ModelManagerInterface::iterateQrcFiles(ProjectExplorer::Project *project,
|
||||
} else {
|
||||
pInfos = projectInfos();
|
||||
if (resources == ActiveQrcResources) // make the result predictable
|
||||
qSort(pInfos.begin(), pInfos.end(), &pInfoLessThanActive);
|
||||
Utils::sort(pInfos, &pInfoLessThanActive);
|
||||
else
|
||||
qSort(pInfos.begin(), pInfos.end(), &pInfoLessThanAll);
|
||||
Utils::sort(pInfos, &pInfoLessThanAll);
|
||||
}
|
||||
|
||||
QSet<QString> pathsChecked;
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
#include <qmljs/qmljsscanner.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
using namespace QmlJS;
|
||||
|
||||
namespace {
|
||||
@@ -410,10 +412,7 @@ int Scanner::state() const
|
||||
|
||||
bool Scanner::isKeyword(const QString &text) const
|
||||
{
|
||||
if (qBinaryFind(begin(js_keywords), end(js_keywords), text) != end(js_keywords))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return std::binary_search(begin(js_keywords), end(js_keywords), text);
|
||||
}
|
||||
|
||||
QStringList Scanner::keywords()
|
||||
|
||||
Reference in New Issue
Block a user