Commit Graph

36 Commits

Author SHA1 Message Date
Peter Wu 9c3d81adde Officially require Qt 4.8 or newer
Since v2.3.0rc0-1002-g1cd2255, Qt 4.8 became mandatory, reflect this in
the version requirements. This will not affect a lot of distributions
(RHEL and SLES only had Qt 4.6).

For a more complete list of supported platforms, see
https://wiki.wireshark.org/Development/Support_library_version_tracking

While at it, correct some other minimum versions in documentation.

Change-Id: I11f2dfba72c75429f6838404a81ed3b3dc302d5f
Reviewed-on: https://code.wireshark.org/review/18314
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-20 05:03:07 +00:00
Gerald Combs 1f633cfc84 Qt: Add html_escape to qt_ui_utils.
Add an html_escape convenience function, which escapes HTML
metacharacters using Qt::escape on Qt4 and QString::toHtmlEscaped on
Qt5. Use it where we were previously using #if QT_VERSION and calling
the API-specific functions.

Change-Id: Ifda3e9634a37fc00bdb46e08d5711f934692fef5
Reviewed-on: https://code.wireshark.org/review/17984
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: Roland Knall <rknall@gmail.com>
2016-09-29 19:41:25 +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
João Valverde 3343729457 Fix warnings for qt_ui_utils.cpp [-Wcast-qual]
Change-Id: Ie1d2779d9eaf59c2f440efa096f6707375f11c6f
Reviewed-on: https://code.wireshark.org/review/13443
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-22 19:29:42 +00:00
Gerald Combs 3b125e7aef Make rect_on_screen Qt4-compatible.
Use QDesktopWidget instead of QGuiApplication + QScreen. The former
exists in the Qt 4 API.

Ping-Bug: 11568
Change-Id: Icfbe9f78659b28efbc86061f94d946f70ab6dc41
Reviewed-on: https://code.wireshark.org/review/11604
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-11-06 20:28:47 +00:00
Gerald Combs d02104c9a6 Qt: Check for a sane window geometry.
On Windows (and probably X11) it's possible to set an offscreen window
geometry. Add a rect_on_screen function to qt_ui_utils and use it as a
sanity check in MainWindow::loadWindowGeometry.

If this doesn't work well (e.g. if we end up with dueling Qt and GTK+
geometries) we might want to create separate Qt and GTK+ preferences.

Bug: 11568
Change-Id: Icde1181671770356e87f07d584894ec3148e1bd2
Reviewed-on: https://code.wireshark.org/review/11584
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-11-05 23:39:58 +00:00
Gerald Combs f0d1b50044 Handle quotes in "Show in Finder".
Change-Id: I422e4679c86d23363a604e54ef2f91b1ad5b948c
Reviewed-on: https://code.wireshark.org/review/10981
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-13 19:13:55 +00:00
Gerald Combs 7c38002288 Qt: Recent list context menu.
Add a context menu to the main window recent list. Add items that let
the user open each file's containing folder and copy the file path to
the clipboard. When opening the folder on Windows and OS X try to
highlight the file in Explorer or the Finder.

Change-Id: I991e8df8ba9f1f8c6385d1a861eb40223cfdd047
Reviewed-on: https://code.wireshark.org/review/10915
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
2015-10-13 02:44:53 +00:00
Gerald Combs 5c80f08648 Add DCE-RPC and ONC-RPC service response time dialogs.
Add RpcServiceResponseTimeDialog, which handles DCE-RPC and ONC-RPC
service response time statistics. Try to make it as lightweight as
possible, since we might want to pull this into the RPC dissectors
similar to the other SRT statistics.

Allow program names on the command line in place of numbers or UUIDs. Make
matches case-insensitive. E.g. the following are equivalent:

    -z rpc,srt,100003,3
    -z rpc,srt,nfs,3
    -z rpc,srt,NFS,3

as are the following:

    -z dcerpc,srt,f5cc5a18-4264-101a-8c59-08002b2f8426,56
    -z dcerpc,srt,nspi,56
    -z dcerpc,srt,NSPI,56

Change-Id: Ie451c64bf6fbc776f27d81e3bc248435c5cbc9e4
Reviewed-on: https://code.wireshark.org/review/9981
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-08-12 20:17:35 +00:00
Gerald Combs fda29e1c95 Use int_to_qstring in a few more places.
Change-Id: Id324fe21f436a233088d106553db2ed6f6e410ac
Reviewed-on: https://code.wireshark.org/review/9899
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-08-06 20:13:08 +00:00
Gerald Combs b7f5eaa524 Convert the GSM MAP stats to new "generic stat API".
Convert both the MAP statistics and summary. As with the GSM A stats
this are mostly untested.

Change-Id: Ibd3a7346b09d1401e78724c0197ec2a38deb97a3
Reviewed-on: https://code.wireshark.org/review/9883
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-06 01:59:10 +00:00
Gerald Combs 05eb9b69b8 Add proper base prefixes in display filter expressions.
When the user selects an enum in the display filter expression dialog
make sure we add the proper base prefix

Add a Qt UI convenience routine for formatting integers. Because
deprecating QString::sprintf was a well-thought-out decision that will
be regarded highly for decades to come.

Fix search visibility while we're here.

Bug: 11421
Change-Id: I1368bc8f464983793bdc90760cf3b7c18b6bd859
Reviewed-on: https://code.wireshark.org/review/9885
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-06 01:58:12 +00:00
Gerald Combs d2acb04b4c Add the RTP Stream Analysis dialog.
Combine the GTK+ RTP Stream Analysis and RTP Graph Analysis dialogs into
one. Yell at the user less. Disable the Analyze RTP Stream menu item if
we don't have an RTP stream selected.

There are a *lot* of moving parts in this dialog. I've tested with the
few RTP captures I have but it's by no means complete.

"To do" items are listed at the top of rtp_analysis.cpp.

Change-Id: Id503977f069bebc46cc68bc749f0c9cbf4d37bf6
Reviewed-on: https://code.wireshark.org/review/9650
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-07-16 00:30:14 +00:00
Gerald Combs fdb85029fd Add ServiceResponseTimeDialog.
Add ServiceResponseTimeDialog as a subclass of TapParameterDialog,
similar to StatsTreeDialog. Add initial plumbing for statistics menu
items and command line invocation.

Don't append "..." to menu item names. Don't add menu icons. In each
case this avoids repetitive UI clutter.

Change-Id: I463b95c93090160bb81d2e80b16aad389dc0bd6c
Reviewed-on: https://code.wireshark.org/review/8864
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03 23:09:13 +00:00
Gerald Combs 2d863b9782 Add TapParameterDialog.
Split StatsTreeDialog into StatsTreeDialog and TapParameterDialog (its
base class). This more closely matches the GTK+ UI and paves the way for
more statistics dialogs.

Change-Id: I2630385534e829d99724673ade372fcb33200d07
Reviewed-on: https://code.wireshark.org/review/8842
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-06-08 19:51:34 +00:00
Gerald Combs ec3f923e3e Add the Display Filter Expression dialog.
Changes from the GTK+ UI:
- The display filter is built on the fly with immediate syntax feedback.
- Slightly different layout.
- You can search for fields.

Make the plain SyntaxLineEdit a bit more plain.

Bug: 11128
Change-Id: I06a48cd7b9ba7b9dc193b0199540aede4eb62fa7
Reviewed-on: https://code.wireshark.org/review/8742
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-06-03 02:27:00 +00:00
Gerald Combs df8b1a0154 Qt: Fix a couple of resource leaks found by Coverity.
Change-Id: Ic3156d8afc2fa237407f3893c34672b1306866fa
Reviewed-on: https://code.wireshark.org/review/7420
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-03-06 04:05:26 +00:00
Gerald Combs 0a4f93ab2b Qt: Show the full file path in the status bar.
Add file_size_to_qstring and use it to show the file size. Add a
"shrinkable" property to LabelStack. Make the info status shrinkable.
Elide text so that long file paths don't widen the main window.

Change-Id: Ieb1caaf7e016384609d41fcabaa63d8f7a293eff
Bug: 10949
Reviewed-on: https://code.wireshark.org/review/7534
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-03-05 00:49:11 +00:00
Gerald Combs 6e88978fd9 Qt: More #include → forward declarations.
Change-Id: Ib6de71f801cd3053374b6c867370acd594dcd396
Reviewed-on: https://code.wireshark.org/review/7089
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-02-13 02:31:16 +00:00
Gerald Combs 89e6f4c468 Qt: Add the Protocol Hierarchy statistics dialog.
Change-Id: I6872e323daca4798c638d764873f54c4c0dc0006
Reviewed-on: https://code.wireshark.org/review/6934
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-02-04 02:06:01 +00:00
Michael Mann b635997624 Convert val_to_str_ext -> val_to_str_ext_wmem for calls that don't have valid packet scope (GUI).
val_to_str_ext now officially uses wmem_packet_scope().

Removed const from val_to_str[_ext]_wmem return value since it's not really constant.

Created utility functions in qt_ui_utils.h to help with the new memory management for its GUI.

Change-Id: Idf2ce4a4ce78d628b2269ad23a3a48fbfc9c077c
Reviewed-on: https://code.wireshark.org/review/6926
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-03 13:03:32 +00:00
Gerald Combs 67b069e544 Qt: Add address conversion convenience routines
Add address_to_qstring and address_to_display_qstring, which wrap
address_to_string and address_to_display respectively and return
QStrings. Convert most of the instances in ui/qt to the new routines.

Fix a some memory leaks in the process.

Change-Id: Icda80bbfe0b2df723d54c8da84355255f819af89
Reviewed-on: https://code.wireshark.org/review/6848
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-01-29 22:51:43 +00:00
Alexis La Goutte 020d0f8963 Qt: Fix when build with Qt < 4.8.0
StyleName is not available in Qt < 4.8

Change-Id: Icbfcef7c62b124ce67f1a02ed928a96233ae2d9d
Reviewed-on: https://code.wireshark.org/review/3508
Reviewed-by: Christopher Maynard <Christopher.Maynard@gtech.com>
2014-08-09 14:15:25 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Gerald Combs 3b7c0fffe4 More size and position tweaks.
svn path=/trunk/; revision=52913
2013-10-28 01:39:20 +00:00
Gerald Combs 5c65e00ca7 Try to improve the appearance of the sequence diagram.
Use integer coordinates for the arrows and text. Add smooth_font_size()
to qt_ui_utils which will hopefully adjust the size on Windows to
something more readable.

svn path=/trunk/; revision=52906
2013-10-27 22:23:27 +00:00
Gerald Combs 1c0deb0fc8 Add Filter Expressions^WButton^WShortcut^WBookmark preferences.
Add comments noting that

- We might want to do something different when the bookmark button is
  pressed.
- The display filters (dfilters file) and gui.filter_expressions
  preferences should be merged.
- Many buttons on Qt4 + OS X + unifiedTitleAndToolBarOnMac makes the
  main window really wide.

Add a qstring_strdup convenience routine. Add "disabled" display filter
edit icons. Fix up whitespace and descriptions in a couple of places.

svn path=/trunk/; revision=47522
2013-02-06 18:22:54 +00:00
Guy Harris 6ebabce7b5 Move the GUI-independent window geometry stuff to ui/recent.c, so we
only have one copy.

svn path=/trunk/; revision=47440
2013-02-02 05:34:31 +00:00
Gerald Combs ae7ee61e84 Rename the "saved_val" preference element to "stashed_val" in order to
more clearly indicate that it's a copy of a preference value rather than
something we've saved in the preferences file. Update
prefs_pref_to_str() to handle default, stashed, and current prefs.

Create ui/preference_utils.[ch] and move some common routines there. Use
prefs_pref_type_name() in the GTK+ preferences dialog.

Make the "OK" button in the Qt preferences dialog work. We simply write
the prefs and redissect on "OK" and do nothing on "Cancel". This is
intentionally different from the Apply/OK/Cancel behavior in the GTK+
version.

Add a general "emitAppSignal" method to wsApp and use it for packet
dissection and preference changes.

Suggest that we might want to create a WsString class to make conversion
between QStrings, gchar *s, and GStrings easier.

svn path=/trunk/; revision=47139
2013-01-18 00:50:14 +00:00
Gerald Combs b82f42d8cf When the user is editing text or selecting from a combo box, don't
immediately close the dialog if he or she presses the escape or enter
keys. Revert the value if the user presses escape. Properly handle the
base for uint preferences. Fix a NULL pointer dereference.

Add a gchar_free_to_qstring utility routine which creates a QString from
a g_malloced string and frees it.

svn path=/trunk/; revision=47083
2013-01-14 22:21:11 +00:00
Gerald Combs b369a09cd2 The file set and export object trees are lists. Make them act like
it. Show human-readable sizes in the file set dialog. Move the
format_size_flags_e operator to qt_ui_utils.cpp for lack of a better
place.

svn path=/trunk/; revision=45661
2012-10-19 19:04:21 +00:00
Alexis La Goutte 42ace71553 Add modelines for Qtshark file
svn path=/trunk/; revision=44766
2012-09-04 08:18:31 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Guy Harris ee0089dfe7 Reflect the changes to make the recent-file code GUI-independent.
svn path=/trunk/; revision=40563
2012-01-18 19:59:13 +00:00
Jörg Mayer be706c6380 Move gtk to ui/gtk.
This looses the last checkin to gtk, will add this manually back.

svn path=/trunk/; revision=40518
2012-01-15 21:59:11 +00:00
Gerald Combs 23a520237b Add initial support for Qt along with a "ui" subdirectory.
svn path=/trunk/; revision=40378
2012-01-04 22:13:01 +00:00