diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2016-09-18 20:10:14 +0200 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2016-09-22 07:59:43 +0000 |
commit | 5b4ca98a5410d9c33be2aa54490ba57239ae73a7 (patch) | |
tree | 041c1abb69e8a4e55088b29b6bb5b38eb75a7f5e /ui | |
parent | b9d493f8de1cadfce591cdc20613c3ee8896c4cf (diff) | |
download | wireshark-5b4ca98a5410d9c33be2aa54490ba57239ae73a7.tar.gz |
Qt: Optimized setColumnVisibility() usage
Setting column visibility (show/hide columns) is only needed when
columns has changed and when show/hide from column popup menu.
Change-Id: Ia33d6fccab44443c453921fc2629bbf1d22efd01
Reviewed-on: https://code.wireshark.org/review/17781
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/packet_list.cpp | 8 | ||||
-rw-r--r-- | ui/qt/packet_list.h | 1 |
2 files changed, 0 insertions, 9 deletions
diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp index 82c9e38123..8d3199c033 100644 --- a/ui/qt/packet_list.cpp +++ b/ui/qt/packet_list.cpp @@ -491,10 +491,6 @@ PacketListModel *PacketList::packetListModel() const { return packet_list_model_; } -void PacketList::showEvent (QShowEvent *) { - setColumnVisibility(); -} - void PacketList::selectionChanged (const QItemSelection & selected, const QItemSelection & deselected) { QTreeView::selectionChanged(selected, deselected); @@ -914,8 +910,6 @@ void PacketList::thaw() // We don't reapply the recent settings because the user could have // resized the columns manually since they were initially loaded. header()->restoreState(column_state_); - - setColumnVisibility(); } void PacketList::clear() { @@ -931,8 +925,6 @@ void PacketList::clear() { overlay_sb_->setMarkedPacketImage(overlay); create_near_overlay_ = true; create_far_overlay_ = true; - - setColumnVisibility(); } void PacketList::writeRecent(FILE *rf) { diff --git a/ui/qt/packet_list.h b/ui/qt/packet_list.h index aad3d03fb6..446d13a6b5 100644 --- a/ui/qt/packet_list.h +++ b/ui/qt/packet_list.h @@ -77,7 +77,6 @@ public: void resetColumns(); protected: - void showEvent(QShowEvent *); void selectionChanged(const QItemSelection & selected, const QItemSelection & deselected); void contextMenuEvent(QContextMenuEvent *event); void timerEvent(QTimerEvent *event); |