forked from qt-creator/qt-creator
Reinvent deprecated qSort as Utils::sort
Change-Id: I4f6011cc2b6127037249aabc2426a88ad7108ebf Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include "externaltoolconfig.h"
|
||||
#include "ui_externaltoolconfig.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
@@ -257,7 +258,7 @@ bool ExternalToolModel::setData(const QModelIndex &modelIndex, const QVariant &v
|
||||
int previousIndex = categories.indexOf(category);
|
||||
categories.removeAt(previousIndex);
|
||||
categories.append(string);
|
||||
qSort(categories);
|
||||
Utils::sort(categories);
|
||||
int newIndex = categories.indexOf(string);
|
||||
if (newIndex != previousIndex) {
|
||||
// we have same parent so we have to do special stuff for beginMoveRows...
|
||||
@@ -327,7 +328,7 @@ QModelIndex ExternalToolModel::addCategory()
|
||||
}
|
||||
QList<QString> categories = m_tools.keys();
|
||||
categories.append(category);
|
||||
qSort(categories);
|
||||
Utils::sort(categories);
|
||||
int pos = categories.indexOf(category);
|
||||
|
||||
beginInsertRows(QModelIndex(), pos, pos);
|
||||
|
||||
Reference in New Issue
Block a user