Commit Graph

14 Commits

Author SHA1 Message Date
Peter Wu f8dc2346df Qt: fix memleak of PointList in interface statistics
The list of points (for interface traffic statistics) is part of the
interface tree model/view. Remove the pointer indirection to simplify
cleanup and avoid leaking a PointList.

Note that the SparkLineDelegate is used in two different places
(CaptureInterfacesDialog and InterfaceTreeModel).

Change-Id: I5fef7dadd44fdf58c07844fee269f509c712a36f
Reviewed-on: https://code.wireshark.org/review/19606
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-01-12 13:41:09 +00:00
Roland Knall 9d47bf9939 InterfaceList: Add check for remote interface
Add a check, to allow the filtering of remote only interfaces. Also
add the necessary options to the type menu.

Change-Id: Ib82519362454094f64abf1cbe6d7bc917990d7ac
Reviewed-on: https://code.wireshark.org/review/19438
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-12-27 11:55:51 +00:00
Michael Mann 1619c4cf4a interface_tree_model.cpp - ensure QObject namespace for tr()
Change-Id: I64214b5e2eb8b64ae36e049174d94d10da1e5bc5
Reviewed-on: https://code.wireshark.org/review/18698
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-11-07 06:50:11 +00:00
Roland Knall 6500a660c2 ManageInterfacesDialog: New handling of pipes
This moves the handling of pipes to the new InterfaceTreeModel as well.
It also includes a new PathChooserDelegate and cache handling for adding
data to an interface list without putting it into storage

Change-Id: Id255a81161b4da517e26127abe8ea7f5eb36d55a
Reviewed-on: https://code.wireshark.org/review/18497
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-27 23:54:04 +00:00
Roland Knall 6eee29bf2a InterfaceTreeList: Enable all editable columns
In preparation for moving to the new interface list, adding all
necessary editors and changes to allow all columns, which are being
handled by CaptureInterfacesDialog or ManageInterfacesDialog to be
edited correctly

Change-Id: I8bfabff92a07950c74a4d7243dadd99ecd2024f4
Reviewed-on: https://code.wireshark.org/review/18446
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-26 07:49:50 +00:00
Roland Knall e68247e1fd InterfaceTree: Change foreach to const_iterator
Change all occurences of the foreach macro to while loops with
const_iterator for performance reasons

Change-Id: I1cd378696136b3d6cc100b9bfff95295baa2ff83
Reviewed-on: https://code.wireshark.org/review/18286
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-19 07:44:48 +00:00
Roland Knall 864f750be5 ManageInterfacesDialog: Implement View/Data Model
Implement the same interface view/data model as used for
the interface_tree selection in this dialog, to encapsulate
all access to global_capture_devices from the dialog.

Change-Id: I0e568fe236d077befa2a79765638db8bb3ed1a3f
Reviewed-on: https://code.wireshark.org/review/18062
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-19 07:43:45 +00:00
Joerg Mayer 4ff7799be8 Some get rid of the remaining trivial Q_UNUSED cases.
Fix the placement of Q_UNUSED inside #ifdef

Change-Id: I015ff87fcb300a701bf8ccb42bd85e3068a08138
Reviewed-on: https://code.wireshark.org/review/18228
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2016-10-17 05:37:29 +00:00
Roland Knall d58da8ec90 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 <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-10-07 14:31:30 +00:00
Dario Lombardo c8143e2077 Qt: add condition to compile without extcap.
Change-Id: Ieabccb5dfc7884bebf9f2b68caaa16a82609bd30
Reviewed-on: https://code.wireshark.org/review/18060
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-10-04 09:59:11 +00:00
Roland Knall fc234708a7 Interface View/Model: Fix pcap-less build
Change-Id: I88bc6c939b7ce6986299e4ebf99358437b758bd2
Reviewed-on: https://code.wireshark.org/review/18045
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-10-04 01:26:31 +00:00
Roland Knall a50bed094b Interface List: Allow column filtering in model
This change allows for the definition of columns to be shown
to the enduser if instanting the proxy model. The tree model
will allways transport ALL data, and it is the job of the proxy
model to determine which data is actually shown.

Additionally, this removes the final definitions of the global
interface array from interface_frame as well as sort_filter, so
that knowledge about the inner workings of the interface list
is contained to interface_tree_model

Change-Id: Ib34b150066ee344ad0d18bec1d90826eb0fa28b2
Reviewed-on: https://code.wireshark.org/review/18039
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-03 17:06:03 +00:00
Roland Knall 53523a739c Interface List: Fix build for no PCAP builds
This is a fix for building without libpcap. Also, changing _U_
to Q_UNUSED for the tree_model

Change-Id: I38a992731a3d3c4062ffab3cca0049cf08050794
Reviewed-on: https://code.wireshark.org/review/18019
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-10-02 18:18:34 +00:00
Roland Knall 99097dd3c6 Interface List: Change display to view/model
This changes the underlying model of the main interface tree.
Because of that, we can resort to a view/model approach, enlisting
the global interfaces list as only data source.

The interface list works identical to the old list, but allows
for filtering of the displayed interfaces by type. Only types, which
are present and whose interfaces are not hidden, are being displayed
for selection.

Change-Id: If8475b227daa026dc0ad3d25bc7fe050d5bf2ac3
Reviewed-on: https://code.wireshark.org/review/17940
Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-01 13:18:51 +00:00