diff options
author | Anders Broman <anders.broman@ericsson.com> | 2019-02-15 15:13:46 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2019-02-15 15:10:03 +0000 |
commit | 97d34eb1bdc4153cb7f1baf23f67f5ce9289fc55 (patch) | |
tree | 8792180c22960aa6c41674826796a2fe29f9491a /ui | |
parent | e6904308d3652e082b5499987626bd03a7908d1a (diff) |
Replace Qsort with std::sort
Change-Id: Ia3741e7b3542524370ac69f731db072d19a44616
Reviewed-on: https://code.wireshark.org/review/32044
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/coloring_rules_dialog.cpp | 4 | ||||
-rw-r--r-- | ui/qt/models/decode_as_delegate.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ui/qt/coloring_rules_dialog.cpp b/ui/qt/coloring_rules_dialog.cpp index e04543359c..eb260f3ec3 100644 --- a/ui/qt/coloring_rules_dialog.cpp +++ b/ui/qt/coloring_rules_dialog.cpp @@ -189,7 +189,7 @@ void ColoringRulesDialog::updateHint() QList<QModelIndex> keys = errors_.keys(); //list is not guaranteed to be sorted, so force it - qSort(keys.begin(), keys.end()); + std::sort(keys.begin(), keys.end()); const QModelIndex& error_key = keys[0]; error_text = QString("%1: %2") .arg(colorRuleModel_.data(colorRuleModel_.index(error_key.row(), ColoringRulesModel::colName), Qt::DisplayRole).toString()) @@ -323,7 +323,7 @@ void ColoringRulesDialog::on_deleteToolButton_clicked() int num_selected = selectedList.count()/colorRuleModel_.columnCount(); if (num_selected > 0) { //list is not guaranteed to be sorted, so force it - qSort(selectedList.begin(), selectedList.end()); + std::sort(selectedList.begin(), selectedList.end()); //walk the list from the back because deleting a value in //the middle will leave the selectedList out of sync and diff --git a/ui/qt/models/decode_as_delegate.cpp b/ui/qt/models/decode_as_delegate.cpp index e57676c768..db83b6750a 100644 --- a/ui/qt/models/decode_as_delegate.cpp +++ b/ui/qt/models/decode_as_delegate.cpp @@ -160,7 +160,7 @@ QWidget* DecodeAsDelegate::createEditor(QWidget *parentWidget, const QStyleOptio //put the rest of the protocols in the combo box QList<QString> da_list = da_set.toList(); - qSort(da_list.begin(), da_list.end()); + std::sort(da_list.begin(), da_list.end()); foreach (table_ui_name, da_list) { editor->addItem(table_ui_name, table_ui_name); |