forked from osmocom/wireshark
credentials: add sorting of table.
Remove QDebug leftover also. Change-Id: Ibfc3247d5b6256c9df238edec945b10837e2bd42 Reviewed-on: https://code.wireshark.org/review/33766 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com>
This commit is contained in:
parent
8e80415aaf
commit
03807b5050
|
@ -26,8 +26,7 @@
|
|||
#include <QMessageBox>
|
||||
#include <QPushButton>
|
||||
#include <QTextCursor>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
class CredentialsUrlDelegate : public UrlLinkDelegate
|
||||
{
|
||||
|
@ -55,7 +54,10 @@ CredentialsDialog::CredentialsDialog(QWidget &parent, CaptureFile &cf, PacketLis
|
|||
packet_list_ = packet_list;
|
||||
|
||||
CredentialsModel* model = new CredentialsModel(this, cf);
|
||||
ui->auths->setModel(model);
|
||||
QSortFilterProxyModel *proxyModel = new QSortFilterProxyModel(this);
|
||||
|
||||
proxyModel->setSourceModel(model);
|
||||
ui->auths->setModel(proxyModel);
|
||||
|
||||
setWindowSubtitle(tr("Credentials"));
|
||||
|
||||
|
@ -68,6 +70,7 @@ CredentialsDialog::CredentialsDialog(QWidget &parent, CaptureFile &cf, PacketLis
|
|||
ui->auths->resizeColumnToContents(CredentialsModel::COL_USERNAME);
|
||||
|
||||
ui->auths->setSortingEnabled(true);
|
||||
ui->auths->sortByColumn(CredentialsModel::COL_NUM, Qt::AscendingOrder);
|
||||
|
||||
connect(ui->auths, SIGNAL(clicked(const QModelIndex&)), this, SLOT(actionGoToPacket(const QModelIndex&)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue