aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/packet_dialog.cpp
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2017-12-07 08:15:30 -0800
committerAnders Broman <a.broman58@gmail.com>2017-12-15 20:58:14 +0000
commitbdb6baa7405d259fa2cd2f6f7d2fb21e13315885 (patch)
tree5c70190af46fef3fadb8a876e7b3e7f66dfe77b6 /ui/qt/packet_dialog.cpp
parent0909580a7e98c134785a96829b58076534b477b6 (diff)
Qt: Switch ProtoTree to a treeview+model.
Add a ProtoTreeModel and use it in ProtoTree. This should make the UI more responsive when we have lots of items in the tree. Change-Id: Id26e6bcff84663867a8da17fd9ae86ff639b633f Reviewed-on: https://code.wireshark.org/review/24774 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/packet_dialog.cpp')
-rw-r--r--ui/qt/packet_dialog.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/ui/qt/packet_dialog.cpp b/ui/qt/packet_dialog.cpp
index bf3e481b58..c8a8dfb4ca 100644
--- a/ui/qt/packet_dialog.cpp
+++ b/ui/qt/packet_dialog.cpp
@@ -4,19 +4,7 @@
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: GPL-2.0+
*/
#include "packet_dialog.h"
@@ -68,7 +56,7 @@ PacketDialog::PacketDialog(QWidget &parent, CaptureFile &cf, frame_data *fdata)
epan_dissect_fill_in_columns(&edt_, TRUE, TRUE);
proto_tree_ = new ProtoTree(ui->packetSplitter);
- proto_tree_->fillProtocolTree(edt_.tree);
+ proto_tree_->setRootNode(edt_.tree);
byte_view_tab_ = new ByteViewTab(ui->packetSplitter);
byte_view_tab_->setCaptureFile(cap_file_.capFile());