| 1 |
/* |
| 2 |
* wpa_gui - ScanResultsItem class |
| 3 |
* Copyright (c) 2015, Adrian Nowicki <[email protected]> |
| 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 |
} |