Updated through tag hostap_2_5 from git://w1.fi/hostap.git
[mech_eap.git] / libeap / wpa_supplicant / wpa_gui-qt4 / scanresultsitem.cpp
1 /*
2  * wpa_gui - ScanResultsItem class
3  * Copyright (c) 2015, Adrian Nowicki <adinowicki@gmail.com>
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8
9 #include "scanresultsitem.h"
10
11 bool ScanResultsItem::operator< (const QTreeWidgetItem &other) const
12 {
13         int sortCol = treeWidget()->sortColumn();
14         if (sortCol == 2 || sortCol == 3) {
15                 return text(sortCol).toInt() < other.text(sortCol).toInt();
16         }
17         return text(sortCol) < other.text(sortCol);
18 }