Commit Graph

185 Commits

Author SHA1 Message Date
Michael Mann b5759cafae Integrate LBM UIM Flow dialog into "regular" Flow diagram.
Reduce all of the code duplication and just register the sequence
analysis functionality in LBM dissector.

Change-Id: I6cb5a7f0a92b04357334bbae301fa2d730a21994
Reviewed-on: https://code.wireshark.org/review/23630
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-09-20 04:48:40 +00:00
Michael Mann d992e85fe8 Refactor Decode As dialog to use a model/delegate
The model provides a lot more flexibility and abstracting the
data from the view (dialog)

Noticeable changes from user perspective:
1. Value column doesn't always have a combobox.  If registered decode as
structure doesn't support multiple values, a simple edit box is used.
2. Existing value will always be a choice (default) in the Value combobox.
3. Duplicate values in Value combobox have been removed (for things like
UDP port where source port and dest. port are same)
4. When adding/copying a decode as item, only first column (table) is
editable, not the whole column.
5. Separator always present in Current protocol column to distinguish
"none" from rest of protocols.
6. "Current" protocol defaults to "default value" when first added to the
list instead of "none".

Noticeable changes from developer perspective:
1. Code is much more spread out, but most new additions (like DCE/RPC support)
should be limited to the model class (maybe delegate).  The dialog class
probably won't change much anymore.
2. decode_as_dialog.ui is much less useful because information is provided through
model and delegate.

Change-Id: I70a667cab2c07d251ab370430bc51e5c1f4a3a02
Reviewed-on: https://code.wireshark.org/review/22625
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-09-16 11:11:50 +00:00
João Valverde f091ed83f7 CMake: Try to fix build error with i18n.qrc dependency order
Change-Id: I7006b435508e72457413cd1b7c5bdf1b7b41ee5b
Reviewed-on: https://code.wireshark.org/review/23424
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-09-07 11:25:12 +00:00
Michael Mann 5b3e3ee587 Use UAT model for I/O graph
Convert from using TreeWidgetItems to UAT model/delegate.  More of the GUI
is "just handled" within the table.
Required to add support for "colors" and "protocol fields" to UAT types.
Also needed to add some hacks for "custom" UAT field handlers for
backwards compatibility with the existing UAT structure used.

Because UAT functionality was switched completely to the model, some
information in the table was "lost in translation" because the UATs
themselves aren't translated to other languages.

TODO:
2. Better "order of operations"?  A bunch of NULL/size checks needed to be added to prevent crashing.
Now with model/"view" should events/functions be reordered?

Bug: 13585
Change-Id: I2bbba78182317c4fada07b927c05d0c6f4cdc0fe
Reviewed-on: https://code.wireshark.org/review/22766
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-07 17:25:02 +00:00
Michael Mann ff7a6305a7 Use proper tab order for "file types" in UAT "table".
Directory and File "UAT types" have been using a separately launched
dialog, instead of an "editor", so it breaks "tab rules".  Create and
treat (File) dialog as an editor.

Change-Id: I983728abefb0cdd79899468a800328f1b56e2910
Reviewed-on: https://code.wireshark.org/review/22886
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: Anders Broman <a.broman58@gmail.com>
2017-08-07 04:53:42 +00:00
Michael Mann 6f12bf215f Fix copy/pasteo so Qt Model Source is displayed properly in Visual Studio
Change-Id: I81dbc6947f0d878d2c214541cf0d540444ea1592
Reviewed-on: https://code.wireshark.org/review/22867
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-30 15:48:41 +00:00
Roland Knall 02e80019f2 Qt: Create models directory
Following the move for widgets and utils directory, moving models
and delegates to the utils directory. Guidelines for this directory are:

 - Implementation of a model
 - Implementation of a delegate
 - Utility class for data storage used by a model

Note: additionally all includes affected by this move have been changed
to absolute path includes, instead of relative ones.

Change-Id: I3bb868af7d3570437682b722a0cd46c906628570
Reviewed-on: https://code.wireshark.org/review/22790
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-07-26 12:22:04 +00:00
Roland Knall ddfc1d37cc Qt: Move utils to separate utils directory
Following the move for widgets directory, moving utils
to the utils directory. Guidelines for this directory are:

 - Generic use but not a widget
 - Utility functionality used by many classes
 
 Note: additionally all includes affected by this move have been changed
 to absolute path includes, instead of relative ones.

Change-Id: I019ae4b6e6f6d06a5745a63ed195edbd36fb936b
Reviewed-on: https://code.wireshark.org/review/22602
Petri-Dish: Roland Knall <rknall@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-07-26 10:11:55 +00:00
Gerald Combs c6ed05ec73 Qt: Make SimpleDialog a plain, non-QObject class.
Don't assume that the application is initialized when we create a
SimpleDialog.

Bug: 13275
Change-Id: Ieeb52430500570db88463069833855c3789f686b
Reviewed-on: https://code.wireshark.org/review/22778
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-07-25 04:56:10 +00:00
Peter Wu 4beb7430d4 Qt: refactor UatTreeView into something reusable
UatTreeView had two functions:
 1. Saner navigation functionality when pressing tab.
 2. Start editing when the currently selected item changes.

Since this tab navigation functionality is desired in more places,
extract this functionality. Add more documentation while at it and use
an alternative, declarative style to connect signals.

Move the second functionality to the caller since not all views need it.

Change-Id: Ibe886f2c2763dbe024614203a44b72173fbbce06
Reviewed-on: https://code.wireshark.org/review/22639
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-16 14:47:01 +00:00
Peter Wu b992e69c19 Qt: implement saner tab navigation for coloring rules dialog
The default QTreeView/QTreeWidget behavior for (Shift-)Tab navigation is
to select the previous/next row. For data entries with multiple columns
(such as the UAT dialog or the coloring rules dialog), column
navigation is closer to what a user would expect, so implement that.

Bug: 13856
Change-Id: Ib585030380f894e0be214a95107cb264afac7eee
Reviewed-on: https://code.wireshark.org/review/22561
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-07-15 06:17:38 +00:00
Roland Knall ee699eb720 Qt: Move all utility widgets to widgets subdirectory
Move all utility widgets to the widgets subdirectory and
add separate source_group for their files

Correct some alphabetization in ui/qt/CMakeLists.txt noticed
during compare.

Change-Id: I2d664edc2b32f126438fb673ea53a5ae94cd43d1
Reviewed-on: https://code.wireshark.org/review/22531
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-11 21:30:29 +00:00
Michael Mann 354379095d Organize Qt source files for Visual Studio
Organize source into 5 categories:
moc Source Files - moc_* files
ui Header Files - Header files generated by .ui files
ui Files - .ui files
qrc Files - graphics? files
Header Files - Header files for Qt source headers

Change-Id: If32b8331592a2c685131ea9592893b7add1124ec
Reviewed-on: https://code.wireshark.org/review/22592
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-11 16:55:59 +00:00
Michael Mann 13b5f42b3b filter_expressions_preferences_frame -> uat_frame
There isn't anything "filter expression" specific about it and
there are a few other things that could take advantage of a
UatFrame.

Change-Id: I0d04d176caebf0c2d8043c3bf89a81668580eae8
Reviewed-on: https://code.wireshark.org/review/22570
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-09 21:38:22 +00:00
Roland Knall a2fe8be603 Qt: Add convenience function and cleanup
Add a convenience function for the displayfilter combobox
and clean up some code. On Linux, the AltModifier does not work
as it is being used by xDMs to move the window around. Setting
it to Shift.

Change-Id: I1ee9638c1cf37f40dc21f19c4e0860adc4629d4e
Reviewed-on: https://code.wireshark.org/review/22529
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-07-06 13:21:10 +00:00
Roland Knall 8020be30fd Qt: Drag/Drop Filter buttons to order
Allow the ordering of the filter buttons via drag/drop in
the toolbar

Change-Id: Id8793d6514bae36066a7a23d6890985665e753bd
Reviewed-on: https://code.wireshark.org/review/22422
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-06-28 15:09:03 +00:00
Simon Barber 21305e9835 Add a timeline view for packets, with the timing data used to generate the display
taken from the timing analysis done in the wlan_radio dissector. QT only.

The timeline background is light gray, white for packets displayed in the packetlist,
and blue for the currently selected packet. Packets are coloured according to the
colouring rules foreground colour. The timeline can be zoomed with controls on the
toolbar.

At higher zoom levels the duration (NAV) field is plotted as a horizontal line to the
right of a packet.

The height of a packet in the timeline is proportional to the RSSI.

The bottom half of the packet is only shown if it matches the display filter.

Todo:
Auto detect TSF timing reference point (start/end of packet)
Add a scrollbar
Add a ruler showing time
Improve handling of focus.
Do not display NAV for packets with bad FCS.
Show related packets graphically
Different Y axis modes
- bandwidth/channel use display
- different transmitters per line
- background color from coloring rules
Live capture support

Change-Id: Ic31fffb0d6854966361ade7abb5c0be50db9a247
Reviewed-on: https://code.wireshark.org/review/20043
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-05 11:25:51 +00:00
Stig Bjørlykke 77751c94f1 Qt: Add interface toolbar support
An extcap utility can provide configuration for controls to use in a
GUI interface toolbar.  This controls are bidirectional and can be
used to control the extcap utility while capturing.

This is useful in scenarios where configuration can be done based on
findings in the capture process, setting temporary values or give other
inputs without restarting current capture.

Todo:
- Add support for Windows

Change-Id: Ie15fa67f92eb27d8b73df6bb36f66b9a7d81932d
Reviewed-on: https://code.wireshark.org/review/19982
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-04-25 06:19:39 +00:00
Stig Bjørlykke 1b7677e32f CMake: Sort entries
Put additional_toolbar in sorted position.

Change-Id: I483bca72265a5932f54ccf882c6659e94be5d95b
Reviewed-on: https://code.wireshark.org/review/21183
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-04-18 10:57:28 +00:00
Peter Wu 370f3b358c Qt: add cache proxy model for Voip Calls dialog
When a capture file is reloaded, the information stored in
VoipCallsInfoModel is invalidated. Add another cache layer to fix this:

    VoipCallsInfoModel          wraps around raw data (invalid on close)
    CacheProxyModel             NEW: use prev. data or cache on close
    VoipCallsInfoSortedModel    provided sorting, etc.
    VoipCallsDialog             actual user of model (callTreeView)

This also fixes a UAF after a file was closed, and when a call is
selected (that got worse with the last model/view patch and is "fixed"
in this patch with the caching layer. Note that the Flow sequence and
Play Streams dialog are not that useful when the file is closed).

Change-Id: Ib4daff9dc01a54863fe1d943bdbdb876418924ee
Reviewed-on: https://code.wireshark.org/review/20574
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-24 23:02:43 +00:00
Peter Wu b4bc6c72c7 Qt: refactor Voip Calls Dialog into Model/View
Functional improvements:

 - "Time of day" option is now propagated to the CSV/YAML export.
 - The sorting order is preserved in the CSV/YAML export.

Other changes:

 - Convert column name identifiers to enum.
 - CSV output will now always be quoted (previously numbers like packet
   count were not quoted, but since CSV has no numeric type it should
   be OK to add quotes). Side-effect of model design decision.
 - Instead of clearing the widgets and re-adding all calls, now it will
   add new calls to the model. Not tested with a live capture, if the
   column data can change, maybe a dataChanged signal is needed.

Due to this patch, it should be easier to add a filter for finding calls
easier (e.g. by From, IP, etc.).

Note: extra QList is used in the model to ensure a O(1) lookup of calls
(rather than O(n) for GQueue).

Change-Id: Ie08462aae038d9c3daf1cc7a152b948724689017
Reviewed-on: https://code.wireshark.org/review/20084
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-03-24 23:02:30 +00:00
Roland Knall 321386e9f4 PluginIF: AdditionalToolbar
Creates an interface for plugins and other parts of the code, to
add a new toolbar to the system and have various widget types interact
with this toolbar.

All toolbars added via this interface, will be added to an additional
submenu called "Additional Toolbars" within Wireshark.

Also a demo plugin is being provided, demonstrating various features
of the toolbar, including updating the gui elements. It also demonstrates
how to update toolbar items.

Change-Id: I8d0351224b3d7f4b90220d58970b51695551d7e3
Reviewed-on: https://code.wireshark.org/review/19803
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-02-24 08:12:46 +00:00
Roland Knall 76cf1d0b0a Qt: Implement Custom CMake
Implement the custom cmake calls analog to the gtk version

Change-Id: I426d2a2df5a4bfb6fc385b970e3944415d3c8afd
Reviewed-on: https://code.wireshark.org/review/19563
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>
2017-01-22 10:42:30 +00:00
Moshe Kaplan 20c57cb298 Enable exporting objects with tshark
A new "--export-object <protocol>,<destdir>" option is added to tshark.

This required refactoring Export Object behavior in all GUIs to give the
export object handling to the dissector, rather than the ui layer.
Included in the refactoring was fixing some serious memory leaks in Qt
Export Object dialog, crash due to memory scope issues in GTK Export
Object dialog, and addition sorting column feature in Qt dialog (set
up by creating a widget to manage the items that were previously
leaking memory)

Bug: 9319
Ping-Bug: 13174
Change-Id: I515d7662fa1f150f672b1476716f347ec27deb9b
Reviewed-on: https://code.wireshark.org/review/18927
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-02 16:07:35 +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 961b05315d WelcomeUI: Make Open and Capture clickable
Make the texts "Open" and "Capture" clickable, and have them open
the FileOpen and CaptureOptions dialogs respectively

Change-Id: I2a3efbc4cdf160aa0b4efc6496d09228affbff46
Reviewed-on: https://code.wireshark.org/review/18303
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-20 05:09:58 +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
Peter Wu 1cd22559a8 Qt: convert UatDialog to model/view pattern, improve UX
Fixes:
 - Fix crash (heap-use-after-free) on removing a record while editing.
 - Mark a record as invalid if any of the fields fail the validation.
   (Fixes crash in at least the ISAKMP dissector.)
 - Prevent saving of invalid UAT entries (e.g. empty UATs).
 - Do not close the dialog on pressing Enter/Escape while editing,
   close the editor instead.
 - Fix HTML injection in the error messages.

Improvements:
 - Tab-navigation now works between fields.
 - The field editor is now closed once the focus is lost.
 - Fields that fail validation are marked (currently with a pink color).
 - The error hint selection has become smarter (see comments in
   UatDialog::checkForErrorHint).
 - Properly recognizes PT_TXTMOD_HEXBYTES formats like "aa:bb"
   (previously it would not expect the ":" and report a bad length).
   A validator prevents invalid strings from being entered.
 - The OK button is disabled when new/edited records are bad. Notably,
   existing (possibly invalid) records are skipped. (Bug 7471).

Live validation (while typing in the editor) was dropped during
conversion, but it can be added later if desired.

Drag and drop reordering still needs to be implemented.

Bug: 11714
Bug: 7471
Change-Id: Ic0b6a177f90503fbd65b5001d8a87a10e38f4d64
Reviewed-on: https://code.wireshark.org/review/17994
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-12 03:53:27 +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
Peter Wu 534787e402 cmake: make WERROR_COMMON_FLAGS a normal string
Instead of checking for the boolean "FALSE", just set an empty string.
This avoids the need to check for WERROR_COMMON_FLAGS before using it.

The transformation is the same for all files, remove
"if (WERROR_COMMON_FLAGS)" and "endif()", reindent and add quotes (since
we have a string here and not a list).

Modelines have been added where missing.

Change-Id: I0ab05ae507c51fa77336d49a99a226399cc81b92
Reviewed-on: https://code.wireshark.org/review/17997
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Dario Lombardo <lomato@gmail.com>
2016-09-30 20:08:02 +00:00
Gerald Combs 893e0e9608 Qt: Add a timeline indicator to conversations.
Add a timeline indicator to the Start and Duration columns in the
Conversations dialog. Add tooltips to the columns that explain what's
going on.

Round the timeline rect corners and do the same for Prototocol Hierarchy
Statistics. This should hopefully differentiate the graph bars from a
text selection and IMHO it looks better.

Update the PHS and Conversations images in the User's Guide.

Change-Id: I61d6c25843be522cc444e01ba77cb5b1e991fa36
Reviewed-on: https://code.wireshark.org/review/17396
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-09-02 20:01:51 +00:00
João Valverde 640382c743 CMake: Allow setting per target compiler warnings
Setting our compiler warning flags in CMAKE_C_FLAGS does not allow
using different flags per target.

Allow for that possibility by setting the internal WS_WARNINGS_{C,CXX}_FLAGS
and using the COMPILE_OPTIONS property to set them.

This change is just setting mechanism and there should be no difference
in generated warnings.

The check_X_compiler_flag cmake test is changed to test each flag individually.
We need a list, not a space separated string, and the aggregate test is not
significant.

Change-Id: I59fc5cd7e130c7a5e001c598e3df3e13f83a6a25
Reviewed-on: https://code.wireshark.org/review/17150
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-08-23 21:33:09 +00:00
João Valverde 5c03bda31a Qt: Generate .qm files during build
Change-Id: Ia2ee723227e1b331eeec0f0463654f35a4c9f37b
Reviewed-on: https://code.wireshark.org/review/14508
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-06-28 20:53:17 +00:00
Michal Labedzki 237f2d4006 Qt/Bluetooth: Add Device dialog
Device dialog appears when user double clicks on device in
Devices dialog (Bluetooth->Devices). It provides
summary of device, like BD_ADDR, name, timeouts, etc.
Base on information from HCI layer, so this feature is more interesting
for local devices (capturing on its side). Each field has changes counter,
what mean that value at specified field changes in time, for example:
user change device name 3 times. Please note that initial change
is not counted. It means that you can see fielkd without any value
then change occur and counter is not increased. It will be increased
next time. Reason for that is in most cases field value is unknown
at start.

Change-Id: Ife0a6bd454eac00a28f8eb2906e1b395695b0307
Reviewed-on: https://code.wireshark.org/review/15793
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-06-10 13:50:35 +00:00
Gerald Combs 987ff3ee1b Qt: Firewall Rules dialog.
Add the Firewall ACL Rules dialog. Try showing all valid rules for a
given product instead of making the user select from a combobox.  We can
add the combo back easily enough if that's desired.

Add a rule hint field and use it in the Qt and GTK+ UIs.

Bug: 12469
Change-Id: I39dd840e9838f96d7c5e2b4c34662811c21d0386
Reviewed-on: https://code.wireshark.org/review/15689
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-06-01 23:37:25 +00:00
Michael Mann 697996a8b0 Create a FieldFilterEdit class and apply it to custom column preference field.
DisplayFilterEdit deals with entire filters and some edit boxes just need a
single protocol field.  This control will do the trick.

Bug: 12321
Change-Id: I8e5837ea9a6955ada29b7e516ea022ab1dd46f0d
Reviewed-on: https://code.wireshark.org/review/15595
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-01 20:35:26 +00:00
Gerald Combs 6931f581f9 Qt: Make conversation menu items static.
Add a ConversationAction and ColorizeAction classes which respectively
handle conversation filtering and colorization.

Move conversation menu initialization to initConversationMenus and call
it once at startup. This keeps us from leaking quite a bit of memory
each time we select a packet or proto tree item.

Bug: 12044
Change-Id: I32e8cedaba08a419d5da6a7a9db31c910909f450
Reviewed-on: https://code.wireshark.org/review/14516
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-03-28 16:27:41 +00:00
Stig Bjørlykke 1a716800e3 Qt: Add dialog geometry restore
Add GeometryStateDialog class to handle load and save dialog geometry.
The QDialog class name will be used as window name.  For shared
classes the UAT name or the statistics title or abbr will be used.

Change-Id: I5a019598307fb3861518f41e733de834788184d8
Reviewed-on: https://code.wireshark.org/review/14139
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-28 18:25:50 +00:00
Stig Bjørlykke 44f74e7b26 Qt: Add FindLineEdit with regex search option
Add settings to the QLineEdit context menu to use textual or regular
expression search.  Use this in Follow Stream and Show Packet Bytes.

Change-Id: I3a9f5a923f616629aa40a334921871f98b518f30
Reviewed-on: https://code.wireshark.org/review/13942
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>
2016-02-15 19:44:27 +00:00
Stig Bjørlykke 1b5382caa5 Qt: Add Show Packet Bytes Dialog
Show selected packet bytes as ASCII, HTML, Image, ISO 8859-1, Raw or UTF-8.
Images supported are what's supported by QImage, and HTML supported
is what's supported by QTextEdit.

Change-Id: I96fc5c5d222c5389078576463cf78d82cf55528d
Reviewed-on: https://code.wireshark.org/review/13807
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-08 16:54:12 +00:00
João Valverde eeafb47a12 Fix Qt4 moc option argument and add build parametrization
Change-Id: Ib758f0eabaf96f9c6010201e7e16147fcfa0daa2
Reviewed-on: https://code.wireshark.org/review/13671
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-03 09:10:20 +00:00
João Valverde cd7daa77d9 Qt: Make moc less chatty
Change-Id: Ide644647271663517ddc6a84ffe61d58dabd6bd2
Reviewed-on: https://code.wireshark.org/review/13629
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-02-02 00:57:11 +00:00
Roland Knall 0921c8214e extcap: Add Required and cleanup
An option may now use the "required=true" argument (see sshdump.c)
 which will ensure, that the capture can only be started via the
 dialog, if the option has been provided. To ensure, that this is
 working properly, multiselect has been moved to a separate source
 file.

 Renamed one method so it may not interfere with a future save
 functionality, and cleaned up the interface to use only default
 buttons and roles

 ONLY the Qt interface is being supported.

Change-Id: Ie1c9a63c1bba2e557d55b1de6f4775d8b9fce515
Reviewed-on: https://code.wireshark.org/review/12912
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-30 08:10:54 +00:00
Alexis La Goutte b6f060ee0e CMakeList.txt (ui/gtk/qt) fix indent and modelines
Change-Id: I723dcd9bb99941332d1340150361a4a11803fcbb
Reviewed-on: https://code.wireshark.org/review/11871
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-17 22:50:31 +00:00
Gerald Combs f449dcd8a5 Qt: Add the ability to add filter expressions.
Add a "+" icon to the display filter toolbar which allows the addition
of a new filter expression button. (Hopefully this will be the last main
window UI change before 2.0.)

Change-Id: I52bf56bf699dddb7b387b9f4de1bf8b35eb3c4ce
Reviewed-on: https://code.wireshark.org/review/11375
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-29 19:00:34 +00:00
Gerald Combs b05803db4b CMake: Add /WX
Add "/WX" to the Visual C++ compiler flags if DISABLE_WERROR is off,
similar to config.nmake.

We haven't compiled C++ code with -Wshorten-64-to-32 for quite 
some time so there's no need to add -Wno-shorten-64-to-32 in
ui/qt/CMakeLists.txt.

Additionally, squelch

----
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3050) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3065) : see reference to function template instantiation 'void std::_Median<_RanIt,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_RanIt,_Pr)' being compiled
        with
        [
            _RanIt=QList<QString>::iterator
,            _Pr=bool (__cdecl *)(const QString &,const QString &)
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3127) : see reference to function template instantiation 'std::pair<_RanIt,_RanIt> std::_Unguarded_partition<_RanIt,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Pr)' being compiled
        with
        [
            _RanIt=QList<QString>::iterator
,            _Pr=bool (__cdecl *)(const QString &,const QString &)
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3157) : see reference to function template instantiation 'void std::_Sort<_Iter,int,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Diff,_Pr)' being compiled
        with
        [
            _Iter=QList<QString>::iterator
,            _RanIt=QList<QString>::iterator
,            _Diff=int
,            _Pr=bool (__cdecl *)(const QString &,const QString &)
        ]
        .\rpc_service_response_time_dialog.cpp(130) : see reference to function template instantiation 'void std::sort<QList<QString>::iterator,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Pr)' being compiled
        with
        [
            _RanIt=QList<QString>::iterator
,            _Pr=bool (__cdecl *)(const QString &,const QString &)
        ]
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3051) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3052) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3053) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
----

in both rpc_service_response_time_dialog.cpp and wireshark_application.cpp
so that we'll compile successfully.

Change-Id: I457bcede99dcb1f3c1001f1f559c4901bb000357
Reviewed-on: https://code.wireshark.org/review/10533
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-16 21:32:22 +00:00
Gerald Combs b4a4de78d8 Use buttons to display the main status bar icons.
Use QToolButtons to display the expert indicator and comment icons in
the main status bar. Use the same style sheet hack we use in
ProgressFrame to un-style the buttons.

Make sure we specify the @2x comment icon in our .qrc file so that it's
loaded and used on retina displays. Move the comment and expert .pngs to
the stock icon directory and use StockIcon to load them. Remove
status.qrc since it's no longer used.

Change-Id: I84485b22656f8f9af29ad3c02446ffefb6657ed5
Reviewed-on: https://code.wireshark.org/review/11048
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-16 03:52:42 +00:00
Martin Mathieson 3221dbf542 LTE RLC graphs - initial version
Change-Id: Ic5f2c353ae1f787ac19cb575a938cb093ff5f6dc
Reviewed-on: https://code.wireshark.org/review/10930
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-10-11 21:59:45 +00:00
Gerald Combs 3687d39304 Qt: Initial RTP playback.
Note the "initial". This is woefully incomplete.  See the "to do" lists
below and in the code.

This differs a bit from the GTK+ version in that you specify one or more
streams to be decoded.

Instead of showing waveforms in individual widgets, add them all to a
single QCustomPlot. This conserves screen real estate and lets us more
easily take advantage of the QCP API. It also looks better IMHO.

Change a bunch of checks for QtMultimediaWidgets to QtMultimedia. We
probably won't use the widgets until we make 5.0 our minimum Qt
version and plain old QtMultimedia lets us support Qt 4 more easily
(in theory at least).

Add resampling code from libspeex. I initially used this to resample
each packet to match the preferred rate of our output device, but this
resulted in poorer audio quality than expected. Leave it in and use to
create visual samples for QCP and to match rates any time the rate
changes. The latter is currently untested.

Add some debugging macros.

Note that both the RTP player and RTP analysis dialogs decode audio data
using different code.

Note that voip_calls_packet and voip_calls_init_tap appear to be dead
code.

To do:

- Add silence frames where needed.
- Implement the jitter buffer.
- Implement the playback timing controls.
- Tapping / scanning streams might be too slow.

Change-Id: I20dd3b66d3df53c9b1f3501262dc01458849f6b4
Bug: 9007
Reviewed-on: https://code.wireshark.org/review/10458
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-02 18:26:05 +00:00