aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2019-08-10 00:57:00 +0100
committerRoland Knall <rknall@gmail.com>2019-08-10 18:50:42 +0000
commite1e41c0db5538c58bcbe907cb8020ea89c830fc7 (patch)
treebd43e25e3e23fe345841a49e9eb89ef1e5a080a8 /ui
parent5750f247870b07d180e17ee93219c1b481f1ff09 (diff)
Qt: fix wrong default packet list order in Qt 5.13
Workaround a Qt 5.13 bug that made QTreeView::sortByColumn(-1) ineffective and results in sorting rows by the first column in reverse order. This must be called before setModel since that already triggers sorting. Bug: 15979 Change-Id: I86c26959d3cb9dd4118193dcda4b1308cc911290 Reviewed-on: https://code.wireshark.org/review/34226 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/packet_list.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp
index d74d4dd3e6..3e52a027a9 100644
--- a/ui/qt/packet_list.cpp
+++ b/ui/qt/packet_list.cpp
@@ -247,9 +247,10 @@ PacketList::PacketList(QWidget *parent) :
overlay_sb_ = new OverlayScrollBar(Qt::Vertical, this);
setVerticalScrollBar(overlay_sb_);
+ header()->setSortIndicator(-1, Qt::AscendingOrder);
+
packet_list_model_ = new PacketListModel(this, cap_file_);
setModel(packet_list_model_);
- sortByColumn(-1, Qt::AscendingOrder);
Q_ASSERT(gbl_cur_packet_list == Q_NULLPTR);
gbl_cur_packet_list = this;