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:
@@ -34,6 +34,7 @@
|
||||
|
||||
#include "ui_valgrindconfigwidget.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -216,11 +217,6 @@ void ValgrindConfigWidget::slotSuppressionsAdded(const QStringList &files)
|
||||
m_model->appendRow(new QStandardItem(file));
|
||||
}
|
||||
|
||||
bool sortReverse(int l, int r)
|
||||
{
|
||||
return l > r;
|
||||
}
|
||||
|
||||
void ValgrindConfigWidget::slotRemoveSuppression()
|
||||
{
|
||||
// remove from end so no rows get invalidated
|
||||
@@ -232,7 +228,7 @@ void ValgrindConfigWidget::slotRemoveSuppression()
|
||||
removed << index.data().toString();
|
||||
}
|
||||
|
||||
qSort(rows.begin(), rows.end(), sortReverse);
|
||||
Utils::sort(rows, std::greater<int>());
|
||||
|
||||
foreach (int row, rows)
|
||||
m_model->removeRow(row);
|
||||
|
||||
Reference in New Issue
Block a user