From 0c24b0ae7246d44e3111f2f35c57cf442c16c3df Mon Sep 17 00:00:00 2001 From: John Thacker Date: Thu, 5 Jan 2023 08:50:56 -0500 Subject: [PATCH] Qt: Remove duplicate column reset and cache invalidation The filterPackets method calls file.c/cf_filter_packets, which calls rescan_packets, which sends signals when done that eventually calls the PacketList::captureFileReadFinished PacketList::captureFileReadFinished invalidates all the column strings after the rescan may have updated their information (e.g., delta time to previous displayed packet), so it is not necessary to reset the column strings a second time explicitly in filterPackets. Commit 38cde83a5c178f8866d9337702733fae2c844363 added the reset to filterPackets, but commit bbe5fc102821cc3fa9e661078311f681501025ef added the invalidateAllColumnStrings to captureFileReadFinished that made the prior commit unnecessary. --- ui/logray/logray_main_window_slots.cpp | 3 --- ui/qt/wireshark_main_window_slots.cpp | 3 --- 2 files changed, 6 deletions(-) diff --git a/ui/logray/logray_main_window_slots.cpp b/ui/logray/logray_main_window_slots.cpp index 5390151857..5a769f73a1 100644 --- a/ui/logray/logray_main_window_slots.cpp +++ b/ui/logray/logray_main_window_slots.cpp @@ -288,9 +288,6 @@ void LograyMainWindow::filterPackets(QString new_filter, bool force) } else { emit displayFilterSuccess(false); } - if (packet_list_) { - packet_list_->resetColumns(); - } } void LograyMainWindow::layoutToolbars() diff --git a/ui/qt/wireshark_main_window_slots.cpp b/ui/qt/wireshark_main_window_slots.cpp index 7917dc2582..3e0fdc07ea 100644 --- a/ui/qt/wireshark_main_window_slots.cpp +++ b/ui/qt/wireshark_main_window_slots.cpp @@ -314,9 +314,6 @@ void WiresharkMainWindow::filterPackets(QString new_filter, bool force) } else { emit displayFilterSuccess(false); } - if (packet_list_) { - packet_list_->resetColumns(); - } } void WiresharkMainWindow::layoutToolbars()