Commit 00e86a05 authored by Laurent Montel's avatar Laurent Montel 😁

Remove deprecated method

parent 9bc37c48
......@@ -228,7 +228,7 @@ void RunnerModel::matchesChanged(const QList<Plasma::QueryMatch> &matches)
// Sort matches for all runners in descending order. This allows the best
// match to win whilest preserving order between runners.
for (auto &list : matchesForRunner) {
qSort(list.begin(), list.end(), qGreater<Plasma::QueryMatch>());
std::sort(list.begin(), list.end(), qGreater<Plasma::QueryMatch>());
}
if (m_mergeResults) {
......
......@@ -253,9 +253,9 @@ void PositionerTest::tst_proxyMapping()
auto ensureUnique = [](const QHash<int, int> mapping) {
auto values = mapping.values();
qSort(values);
std::sort(values.begin(), values.end());
auto uniqueValues = values.toSet().toList();
qSort(uniqueValues);
std::sort(uniqueValues.begin(), uniqueValues.end());
QVERIFY(uniqueValues == values);
};
......
......@@ -996,7 +996,7 @@ void FolderModel::dragSelectedInternal(int x, int y)
m_dragIndexes = m_selectionModel->selectedIndexes();
qSort(m_dragIndexes.begin(), m_dragIndexes.end());
std::sort(m_dragIndexes.begin(), m_dragIndexes.end());
// TODO: Optimize to emit contiguous groups.
emit dataChanged(m_dragIndexes.first(), m_dragIndexes.last(), QVector<int>() << BlankRole);
......
......@@ -30,7 +30,7 @@ MimeTypesModel::MimeTypesModel(QObject *parent) : QAbstractListModel(parent)
{
QMimeDatabase db;
m_mimeTypesList = db.allMimeTypes();
qStableSort(m_mimeTypesList.begin(), m_mimeTypesList.end(), lessThan);
std::stable_sort(m_mimeTypesList.begin(), m_mimeTypesList.end(), lessThan);
m_checkedRows = QVector<bool>(m_mimeTypesList.size(), false);
}
......
......@@ -177,7 +177,7 @@ int Positioner::nearestItem(int currentIndex, Qt::ArrowType direction)
}
QList<int> rows(m_proxyToSource.keys());
qSort(rows);
std::sort(rows.begin(), rows.end());
int nearestItem = -1;
const QPoint currentPos(currentIndex % m_perStripe, currentIndex / m_perStripe);
......@@ -741,7 +741,7 @@ int Positioner::firstRow() const
{
if (!m_proxyToSource.isEmpty()) {
QList<int> keys(m_proxyToSource.keys());
qSort(keys);
std::sort(keys.begin(), keys.end());
return keys.first();
}
......@@ -753,7 +753,7 @@ int Positioner::lastRow() const
{
if (!m_proxyToSource.isEmpty()) {
QList<int> keys(m_proxyToSource.keys());
qSort(keys);
std::sort(keys.begin(), keys.end());
return keys.last();
}
......
......@@ -35,7 +35,7 @@ PreviewPluginsModel::PreviewPluginsModel(QObject *parent)
: QAbstractListModel(parent)
{
m_plugins = KServiceTypeTrader::self()->query(QStringLiteral("ThumbCreator"));
qStableSort(m_plugins.begin(), m_plugins.end(), lessThan);
std::stable_sort(m_plugins.begin(), m_plugins.end(), lessThan);
m_checkedRows = QVector<bool>(m_plugins.size(), false);
}
......
......@@ -253,7 +253,7 @@ void Autostart::load()
break;
}
if ( fi.isSymLink() ) {
QString link = fi.readLink();
QString link = fi.symLinkTarget();
addItem(item, fi.fileName(), link, type );
}
else
......
......@@ -57,7 +57,7 @@ XCursorTheme::XCursorTheme(const QDir &themeDir)
sizeList.append(images->images[i]->size);
};
XcursorImagesDestroy(images);
qSort(sizeList.begin(), sizeList.end());
std::sort(sizeList.begin(), sizeList.end());
m_availableSizes = sizeList;
}
if (!sizeList.isEmpty())
......
......@@ -151,7 +151,7 @@ void EmoticonList::load()
emoList->clear();
QStringList themeList = kEmoticons.themeList();
qSort(themeList.begin(), themeList.end(), caseInsensitiveLessThan);
std::sort(themeList.begin(), themeList.end(), caseInsensitiveLessThan);
for (int i = 0; i < themeList.count(); i++) {
loadTheme(themeList.at(i));
......
......@@ -74,7 +74,7 @@ bool countryLessThan(const QLocale & c1, const QLocale & c2)
void KCMFormats::load()
{
QList<QLocale> allLocales = QLocale::matchingLocales(QLocale::AnyLanguage, QLocale::AnyScript, QLocale::AnyCountry);
qSort(allLocales.begin(), allLocales.end(), countryLessThan);
std::sort(allLocales.begin(), allLocales.end(), countryLessThan);
foreach(QComboBox * combo, m_combos) {
initCombo(combo, allLocales);
}
......
......@@ -410,7 +410,7 @@ static QPair<int, int> getSelectedRowRange(const QModelIndexList& selected)
foreach(const QModelIndex& index, selected) {
rows << index.row();
}
qSort(rows);
std::sort(rows.begin(), rows.end());
return QPair<int, int>(rows[0], rows[rows.size()-1]);
}
......@@ -558,9 +558,9 @@ bool xkbOptionLessThan(const OptionInfo* o1, const OptionInfo* o2)
void KCMKeyboardWidget::initializeXkbOptionsUI()
{
qSort(rules->optionGroupInfos.begin(), rules->optionGroupInfos.end(), xkbOptionGroupLessThan);
std::sort(rules->optionGroupInfos.begin(), rules->optionGroupInfos.end(), xkbOptionGroupLessThan);
foreach(OptionGroupInfo* optionGroupInfo, rules->optionGroupInfos) {
qSort(optionGroupInfo->optionInfos.begin(), optionGroupInfo->optionInfos.end(), xkbOptionLessThan);
std::sort(optionGroupInfo->optionInfos.begin(), optionGroupInfo->optionInfos.end(), xkbOptionLessThan);
}
XkbOptionsTreeModel* model = new XkbOptionsTreeModel(rules, keyboardConfig, uiWidget->xkbOptionsTreeView);
......
......@@ -526,7 +526,7 @@ static bool compare(const QString &a, const QString &b)
void KGlobalShortcutsEditor::exportScheme()
{
QStringList keys = d->components.keys();
qSort(keys.begin(), keys.end(), compare);
std::sort(keys.begin(), keys.end(), compare);
ExportSchemeDialog dia(keys);
if (dia.exec() != KMessageBox::Ok) {
......
......@@ -167,7 +167,7 @@ void CDuplicatesDialog::scanFinished()
details.append(KFormat().formatByteSize(info.size()));
details.append(QLocale().toString(info.created()));
if(info.isSymLink())
details.append(info.readLink());
details.append(info.symLinkTarget());
new QTreeWidgetItem(top, details);
if(Misc::checkExt(*fit, "pfa") || Misc::checkExt(*fit, "pfb"))
t1++;
......
......@@ -104,7 +104,7 @@ static void sortActions(KSelectAction *group)
group->removeAction(*it);
}
qSort(sorted);
std::sort(sorted.begin(), sorted.end());
QList<SortAction>::ConstIterator s(sorted.constBegin()),
sEnd(sorted.constEnd());
......
......@@ -703,7 +703,7 @@ void CGroupList::sort(int, Qt::SortOrder order)
{
itsSortOrder=order;
qSort(itsGroups.begin(), itsGroups.end(),
std::sort(itsGroups.begin(), itsGroups.end(),
Qt::AscendingOrder==order ? groupNameLessThan : groupNameGreaterThan);
emit layoutChanged();
......
......@@ -363,7 +363,7 @@ int CJobRunner::exec(ECommand cmd, const ItemList &urls, bool destIsSystem)
itsDestIsSystem=destIsSystem;
itsUrls=urls;
if(CMD_INSTALL==cmd)
qSort(itsUrls.begin(), itsUrls.end()); // Sort list of fonts so that we have type1 fonts followed by their metrics...
std::sort(itsUrls.begin(), itsUrls.end()); // Sort list of fonts so that we have type1 fonts followed by their metrics...
else if(CMD_MOVE==cmd)
addEnableActions(itsUrls);
itsIt=itsUrls.constBegin();
......
......@@ -127,7 +127,7 @@ void BackendSelection::load()
}
}
qSort(backendList);
std::sort(backendList.begin(), backendList.end());
}
/// -------------- LOAD
......
......@@ -118,7 +118,7 @@ void ActionModel::buildActionList()
}
}
qSort( d->actions.begin(), d->actions.end(), sortAction );
std::sort(d->actions.begin(), d->actions.end(), sortAction);
endResetModel();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment