wpa-cute-freebsd/src/scanresultsitem.cpp
loh.tar 7b6d433368 Fork from wpa_supplicant version 2.6
...containing only the wpa_gui-qt4 sub tree and the bare necessities for
a successful compile.

The current /src tree conforms wpa_supplicant-2.6/wpa_supplicant/wpa_gui-qt4
whereas current /wpa_supplicant tree conforms wpa_supplicant-2.6/src
with the bare necessities to build a Linux vesion.

The original source was taken from http://w1.fi/wpa_supplicant
2018-06-07 17:54:03 +02:00

18 lines
504 B
C++

/*
* wpa_gui - ScanResultsItem class
* Copyright (c) 2015, Adrian Nowicki <adinowicki@gmail.com>
*
* This software may be distributed under the terms of the BSD license.
* See README for more details.
*/
#include "scanresultsitem.h"
bool ScanResultsItem::operator< (const QTreeWidgetItem &other) const
{
int sortCol = treeWidget()->sortColumn();
if (sortCol == 2 || sortCol == 3) {
return text(sortCol).toInt() < other.text(sortCol).toInt();
}
return text(sortCol) < other.text(sortCol);
}