From d58da8ec9098f249abd3fd0dfb3e00dee6ff47b4 Mon Sep 17 00:00:00 2001 From: Roland Knall Date: Thu, 6 Oct 2016 17:04:45 +0200 Subject: Interface View/Model: Correct column ordering This orders the columns correctly in the sequence the developer has intended when adding them with setColumns. Also it allows for disabling and inverting the filtering by type, as well as query additional roles instead of only Qt::DisplayRole from the tree model. Change-Id: I90469e8e3f3caa50debb3c839590d42719a6fb10 Reviewed-on: https://code.wireshark.org/review/18096 Petri-Dish: Roland Knall Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall Reviewed-by: Peter Wu --- ui/qt/interface_tree_model.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui/qt/interface_tree_model.cpp') diff --git a/ui/qt/interface_tree_model.cpp b/ui/qt/interface_tree_model.cpp index 9fa3910d7f..4eb20f9472 100644 --- a/ui/qt/interface_tree_model.cpp +++ b/ui/qt/interface_tree_model.cpp @@ -194,9 +194,9 @@ QVariant InterfaceTreeModel::data(const QModelIndex &index, int role) const return QVariant(); } -QVariant InterfaceTreeModel::getColumnContent(int idx, int col) +QVariant InterfaceTreeModel::getColumnContent(int idx, int col, int role) { - return InterfaceTreeModel::data(index(idx, col), Qt::DisplayRole); + return InterfaceTreeModel::data(index(idx, col), role); } /** -- cgit v1.2.1