mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
Use std::sort instead of obsolete qSort
This commit is contained in:
parent
767e01fd22
commit
13b1614e11
@ -399,7 +399,7 @@ void BrowserWindow::createEncodingSubMenu(const QString &name, QStringList &code
|
||||
return;
|
||||
}
|
||||
|
||||
/// TODO: Alphanumeric sorting: QCollator (5.2+) or http://www.davekoelle.com/alphanum.html
|
||||
// TODO: Alphanumeric sorting: QCollator (5.2+) or http://www.davekoelle.com/alphanum.html
|
||||
std::sort(codecNames.begin(), codecNames.end());
|
||||
|
||||
QMenu* subMenu = new QMenu(name, menu);
|
||||
|
@ -237,7 +237,7 @@ void LocationCompleterDelegate::viewItemDrawText(QPainter *p, const QStyleOption
|
||||
QList<int> delimiters;
|
||||
QStringList searchStrings = searchText.split(QLatin1Char(' '), QString::SkipEmptyParts);
|
||||
// Look for longer parts first
|
||||
qSort(searchStrings.begin(), searchStrings.end(), sizeBiggerThan);
|
||||
std::sort(searchStrings.begin(), searchStrings.end(), sizeBiggerThan);
|
||||
|
||||
foreach (const QString &string, searchStrings) {
|
||||
int delimiter = text.indexOf(string, 0, Qt::CaseInsensitive);
|
||||
@ -265,7 +265,7 @@ void LocationCompleterDelegate::viewItemDrawText(QPainter *p, const QStyleOption
|
||||
}
|
||||
|
||||
// We need to sort delimiters to properly paint all parts that user typed
|
||||
qSort(delimiters);
|
||||
std::sort(delimiters.begin(), delimiters.end());
|
||||
|
||||
// If we don't find any match, just paint it without any highlight
|
||||
if (!delimiters.isEmpty() && !(delimiters.count() % 2)) {
|
||||
|
@ -159,7 +159,7 @@ void LocationCompleterRefreshJob::completeFromHistory()
|
||||
}
|
||||
|
||||
// Sort by count
|
||||
qSort(m_items.begin(), m_items.end(), countBiggerThan);
|
||||
std::sort(m_items.begin(), m_items.end(), countBiggerThan);
|
||||
|
||||
// Search in history
|
||||
if (showType == HistoryAndBookmarks || showType == History) {
|
||||
|
@ -99,7 +99,7 @@ QVector<PasswordEntry> GnomeKeyringPasswordBackend::getEntries(const QUrl &url)
|
||||
}
|
||||
|
||||
// Sort to prefer last updated entries
|
||||
qSort(list.begin(), list.end());
|
||||
std::sort(list.begin(), list.end());
|
||||
|
||||
return list;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user