summaryrefslogtreecommitdiff
path: root/ui/qt/interface_tree_cache_model.cpp
AgeCommit message (Collapse)AuthorFilesLines
2017-06-27Qt: fix alloc-dealloc-mismatch while adding named pipePeter Wu1-16/+11
ManageInterfacesDialog::on_addPipe_clicked uses g_new0 to create an "interface_t" instance, but InterfaceTreeCacheModel uses qDeleteAll which results in ASAN reporting "alloc-dealloc-mismatch (malloc vs operator delete)". To fix this, remove the dynamic allocation and make InterfaceTreeCacheModel store the instance internally. Change-Id: I9426dfc88d0a54a889bbbc9cf336c0a6af76920e Reviewed-on: https://code.wireshark.org/review/22410 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-06-05Allow bigger snapshot lengths for D-Bus captures.Guy Harris1-3/+3
Use WTAP_MAX_PACKET_SIZE_STANDARD, set to 256KB, for everything except for D-Bus captures. Use WTAP_MAX_PACKET_SIZE_DBUS, set to 128MB, for them, because that's the largest possible D-Bus message size. See https://bugs.freedesktop.org/show_bug.cgi?id=100220 for an example of the problems caused by limiting the snapshot length to 256KB for D-Bus. Have a snapshot length of 0 in a capture_file structure mean "there is no snapshot length for the file"; we don't need the has_snap field in that case, a value of 0 mean "no, we don't have a snapshot length". In dumpcap, start out with a pipe buffer size of 2KB, and grow it as necessary. When checking for a too-big packet from a pipe, check against the appropriate maximum - 128MB for DLT_DBUS, 256KB for everything else. Change-Id: Ib2ce7a0cf37b971fbc0318024fd011e18add8b20 Reviewed-on: https://code.wireshark.org/review/21952 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-01Qt: Enable unhiding all interfaces.Stig Bjørlykke1-1/+3
When having hidden interfaces it was not possible to unhide all in the "Manage Interfaces" dialog because prefs.capture_devices_hide was not updated when not having any hidden interfaces. This bug was introduced in g6eee29bf. Change-Id: If94c2e592eea60e6f1ef1ce2107ff9b2b27c3176 Reviewed-on: https://code.wireshark.org/review/21869 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
2017-04-26Qt: Remove semicolon behind Q_UNUSED macroStig Bjørlykke1-2/+2
Change-Id: I75ff975216da23447b94bc513671ac269c52b7dc Reviewed-on: https://code.wireshark.org/review/21342 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>
2017-03-13Qt: Use em dash when hide the "Show" checkboxStig Bjørlykke1-1/+2
Match the style used in "Capture Interfaces" table when elements are N/A by using the em dash. This item should also be disabled using QPalette::Disabled to get a even better match. Change-Id: I127ce309318df2c36515996df8584d1e4ce690c0 Reviewed-on: https://code.wireshark.org/review/20527 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>
2017-03-12Qt: hide the "Show" checkbox for default devicesPeter Wu1-10/+13
When marking a previously hidden device as default (e.g. via wireshark -ocapture.device:eth0), an unchecked checkbox is visible. This is just confusing, just hide the checkbox completely. Change-Id: I3f85cfcb659c351c72237dced52f0684733188c4 Reviewed-on: https://code.wireshark.org/review/20478 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-11-06Qt: move declaration inside ifdef.Dario Lombardo1-1/+1
Variable col is unused if compiled without extcap. Change-Id: Iffc4951d4655e2649ecf350eefb09988370277e6 Reviewed-on: https://code.wireshark.org/review/18680 Reviewed-by: Roland Knall <rknall@gmail.com> Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-30InterfaceList: Fix build without pcapRoland Knall1-9/+35
Change-Id: I2b1a955270e7d3fe0097b09517a268263facd1be Reviewed-on: https://code.wireshark.org/review/18580 Reviewed-by: Roland Knall <rknall@gmail.com>
2016-10-27ManageInterfacesDialog: New handling of pipesRoland Knall1-29/+218
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-26qt: fix build without pcap_createPeter Wu1-1/+4
Fixes a build failure on the OS X buildbot which has libpcap disabled. Change-Id: I5564c0e3f2097cb45905bb503f45bb03561bf748 Fixes: v2.3.0rc0-1237-g6eee29b ("InterfaceTreeList: Enable all editable columns") Reviewed-on: https://code.wireshark.org/review/18472 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Peter Wu <peter@lekensteyn.nl>
2016-10-26InterfaceTreeList: Enable all editable columnsRoland Knall1-21/+159
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-19InterfaceList: Changing text clears the cellRoland Knall1-1/+1
If the cell is double-clicked to edit an existing text, it is cleared upon start of the edit widget Change-Id: I9d718635de5c4b091aab1f88c2482434aaae1286 Reviewed-on: https://code.wireshark.org/review/18319 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-19Qt: add include to fix compilation without pcap.Dario Lombardo1-0/+1
Regression introduced in 864f750be560a7a739c7453f19a8f5679cf7d6b3. Change-Id: I306903e8252d932425f420e1901a8f3e949f5568 Reviewed-on: https://code.wireshark.org/review/18309 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-19ManageInterfacesDialog: Implement View/Data ModelRoland Knall1-0/+261
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>