aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_gui-qt4/scanresultsitem.cpp
blob: 9cd937cd6e24bf053a77d2c5e8d3709aae2cf597 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * 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);
}