mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
replace deprecated qSort() with std::sort()
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
This commit is contained in:
parent
d19cfec457
commit
e3d43b5696
6 changed files with 10 additions and 8 deletions
|
@ -402,7 +402,7 @@ void DiveListView::selectDives(const QList<int> &newDiveSelection)
|
|||
// select the dives, highest index first - this way the oldest of the dives
|
||||
// becomes the selected_dive that we scroll to
|
||||
QList<int> sortedSelection = newDiveSelection;
|
||||
qSort(sortedSelection.begin(), sortedSelection.end());
|
||||
std::sort(sortedSelection.begin(), sortedSelection.end());
|
||||
newSelection = firstInList = sortedSelection.first();
|
||||
|
||||
while (!sortedSelection.isEmpty())
|
||||
|
|
|
@ -97,7 +97,7 @@ bool abstractpreferenceswidget_lessthan(AbstractPreferencesWidget *p1, AbstractP
|
|||
void PreferencesDialog::addPreferencePage(AbstractPreferencesWidget *page)
|
||||
{
|
||||
pages.push_back(page);
|
||||
qSort(pages.begin(), pages.end(), abstractpreferenceswidget_lessthan);
|
||||
std::sort(pages.begin(), pages.end(), abstractpreferenceswidget_lessthan);
|
||||
}
|
||||
|
||||
void PreferencesDialog::refreshPages()
|
||||
|
|
|
@ -56,7 +56,7 @@ void PrintOptions::setupTemplates()
|
|||
// temp. store the template from options, as addItem() updates it via:
|
||||
// on_printTemplate_currentIndexChanged()
|
||||
QString storedTemplate = printOptions->p_template;
|
||||
qSort(currList);
|
||||
currList.sort();
|
||||
int current_index = 0;
|
||||
ui.printTemplate->clear();
|
||||
Q_FOREACH(const QString& theme, currList) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue