mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-29 10:48:22 -05:00
ad905e4a79
Signal strength was sorted lexically rather than numerically, which put "-100 dBm" before "-50 dBm" if sorted in descending order. This change fixes that. It also treats frequency in the same manner, preparing it for the IEEE 802.11ah. Signed-off-by: Adrian Nowicki <adinowicki@gmail.com>
19 lines
504 B
C++
19 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);
|
|
}
|