From 5156399c681d6a47ceb47d99fed7130ac4b9f507 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Thu, 21 Dec 2017 02:49:29 +0200 Subject: [PATCH] Fix sorting of country flags column in Peers tab. --- src/gui/properties/peerlistsortmodel.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/gui/properties/peerlistsortmodel.h b/src/gui/properties/peerlistsortmodel.h index 451749b2c..83c4f715e 100644 --- a/src/gui/properties/peerlistsortmodel.h +++ b/src/gui/properties/peerlistsortmodel.h @@ -53,17 +53,11 @@ protected: const QString strL = left.data().toString(); const QString strR = right.data().toString(); const int result = Utils::String::naturalCompare(strL, strR, Qt::CaseInsensitive); - if (result != 0) - return (result < 0); - - return (left < right); - } + return (result < 0); + } break; default: - if (left.data() != right.data()) - return QSortFilterProxyModel::lessThan(left, right); - - return (left < right); + return QSortFilterProxyModel::lessThan(left, right); }; } };