Commit Graph

3829 Commits

Author SHA1 Message Date
Stig Bjørlykke 73ee917841 Qt: Don't update expert icon without a capture file.
We don't show the expert info icon when not having a capture file,
so this should not be enabled when emitting redissectPackets().

Change-Id: I6ae6124ed9f69c214a2beadbdc670b15dfe3d060
Reviewed-on: https://code.wireshark.org/review/11937
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-18 16:36:21 +00:00
Stig Bjørlykke 13297438d9 Lua: Disable Reload Lua Plugins while reading file.
Hide the menu item if built without Lua.

Change-Id: I316cddd55064da590eb4167b495a7fb00a41581f
Reviewed-on: https://code.wireshark.org/review/11931
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>
2015-11-18 07:18:50 +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
Peter Wu 0fef9d752f Fix crash in RTP Player on stop and close
When dragging the UI, this somehow causes a great lag. Then by
spam-clicking on the Stop button, a double free seems to occur.

Fix this by moving the audio cleanup to the outputStateChanged callback
as documented at https://doc.qt.io/qt-5/qaudiooutput.html. Note that
calling stop() in the IdleState also triggers a change event, resulting
in the desired cleanup.

Stop streams before the dialog is closed (via accept/reject). This
*cannot* be done in the destrutor of RtpPlayerDialog because destructing
QAudioOutput processes events from the event queue, resulting in
preature destruction of other objects... crash.

Change-Id: I6bfb33c9396e9bc1ffd346519d22390a97b6bdaf
Reviewed-on: https://code.wireshark.org/review/11894
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-17 22:49:35 +00:00
Gerald Combs ec68330053 Qt: Fixup the I/O Graph color menu width on Windows.
Change-Id: I2032709fe62810a292121e8624a4b51f40070c36
Reviewed-on: https://code.wireshark.org/review/11921
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-17 21:59:57 +00:00
Gerald Combs 689334876e Qt: Fix some flow graph issues.
Make fillDiagram() a slot and call it after the dialog is visible.

Use the activated() signals instead of currentIndexChanged() for our
comboboxes. The former is only emitted as a result of user interaction
and the latter is always emitted when the value changed. This was a
problem for flowComboBox since initializing its value resulted an extra
call to fillDiagram().

Add a progress frame.

Change-Id: I17bcf5c990363ee758be9e3a0604dde34fc34f2d
Ping-Bug: 11710
Reviewed-on: https://code.wireshark.org/review/11897
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-17 17:45:56 +00:00
Gerald Combs a18f8c84cf Qt: Fix Follow Dialog crash.
Don't set WA_DeleteOnClose. This keeps the dialog from deleting itself
when we're inside a nested event loop (i.e. when we're reassembling
(TCP) or retapping (UDP or TLS)).

Make sure our beginRetapPackets() and endRetapPackets() calls are
balanced.  Move updateWidgets() calls to follow() so that we update on
the first run.

Bug: 11711
Change-Id: Id585be410a315b914b27f1a116d451c863087b00
Reviewed-on: https://code.wireshark.org/review/11892
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-17 17:29:48 +00:00
Gerald Combs 7518a74dbb Qt: Fix a merge crash.
Update the logic in ui/qt/main_window.cpp:mergeCaptureFile to match
ui/gtk/capture_file_dlg.c:file_merge_cmd. This ensures that we don't try
to use a stale (and freed) read filter.

Call cf_set_rfcode in both.

Bug: 11718
Change-Id: I6da65e428bff39e907f45992bac7337880c02ce9
Reviewed-on: https://code.wireshark.org/review/11895
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-17 09:40:39 +00:00
Stig Bjørlykke 2dc3b98cca Qt: Removed obsolete comments.
Change-Id: I7c0905b38a668a7a6dcaeee6ec16761c9b5c0a55
Reviewed-on: https://code.wireshark.org/review/11901
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-17 07:39:40 +00:00
Alexis La Goutte d3f68e5766 Qt: avoid crash when use Go Next/Previous Conversation
Only enable this menu when there is a packet

Change-Id: I750f2af6e9f565afce83a5e84394cc96b3b071f9
Reviewed-on: https://code.wireshark.org/review/11868
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-17 07:35:14 +00:00
Stig Bjørlykke 062e5b3118 Qt: setMenusForSelectedPacket when capture file is closed.
Moved setMenusForSelectedPacket() to captureFileClosed() because
capture_file_.capFile() is still valid in captureFileClosing().

Menu items depending on is_ip, is_tcp, is_udp, is_sctp, is_ssl,
is_rtp and is_lte_rlc must be disabled when closing the capture
file because many of the dialogs does crash when launched without
a valid frame selected.

All dialogs should probably have a guard for this to avoid crashes,
but that may be an exercise for an enhancement to add support for the
dialogs to follow the current loaded capture file.

Change-Id: If5837a355d08df76547572a25d46ffa539070de3
Reviewed-on: https://code.wireshark.org/review/11883
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>
2015-11-17 07:32:31 +00:00
Evan Huus c3025544b6 Misc minor issues caught by cppcheck
All trivial (unused variables, duplicate `break`s, etc).

Change-Id: Idbfffae4f6c0b0119a90ae5849de2ed7a1180c9b
Reviewed-on: https://code.wireshark.org/review/11886
Petri-Dish: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-11-17 04:18:37 +00:00
Gerald Combs 1aeb3cb989 Remove old, unused images.
Change-Id: I25c3d4b7d346940c4885b3b11c26fd3415d7fca8
Reviewed-on: https://code.wireshark.org/review/11893
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-17 00:44:44 +00:00
Pascal Quantin 4224aab345 Qt: do not clear display filter when merging files
The merge file dialog box contains a read filter, not a display filter.

Bug: 11713
Change-Id: Iff160e552e0440ea4c626d54d834d32f38dc54c2
Reviewed-on: https://code.wireshark.org/review/11875
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-16 20:40:08 +00:00
Guy Harris e9dd7c8bd4 Label the filter in the file open dialog as a "read filter".
This matches what the Windows file open dialog says, and also should
help prevent people thinking that it's a display filter, so that you can
clear it and see all the packets in the file.

I leave translations to native speakers.

Bug: 11708
Change-Id: I060816357bf7958d516429d09708a7ce16d609c5
Reviewed-on: https://code.wireshark.org/review/11877
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-16 19:01:12 +00:00
Pascal Quantin 92d487a461 Qt: deactivate save / close / reload buttons when rescanning a capture
Bug: 11703
Change-Id: I34f5c15c41ebbc62877945eabd3604ba90d5cf74
Reviewed-on: https://code.wireshark.org/review/11804
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-16 17:33:42 +00:00
Jim Young bf8ec76d40 Qt iograph: Trigger graph refresh when time-of-day checkbox is toggeled.
Bug: 11692
Change-Id: I2d9d17d3474210b5eb73002e131867d936426e36
Reviewed-on: https://code.wireshark.org/review/11837
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-16 16:50:13 +00:00
Pascal Quantin 2773596970 Qt: add a reference counter to sequence analysis info
Increment the reference counter each time a flow sequence window is opened.
Free seq_analysis_info_t structure once the last flow sequence / VoIP calls / SIP flow window is closed.

Bug: 11712
Change-Id: I20fcb922b0516417d4bd74cdf75475dcb31f8b90
Reviewed-on: https://code.wireshark.org/review/11851
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-11-16 09:56:46 +00:00
Jim Young 9451e529c4 Qt iograph: Fix off-by-one, insure we plot the last interval.
Bug: 11693
Change-Id: I035eaf7ff049e3631714c112daa5adb29bb90470
Reviewed-on: https://code.wireshark.org/review/11858
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-16 05:00:36 +00:00
Stig Bjørlykke 25fd5b5ca6 gtk: Fixed out-of-source autotools build.
Change-Id: Ic9b93aee15b015d51d666a1c6f4f358f689e8843
Ping-Bug: 10750
Reviewed-on: https://code.wireshark.org/review/11842
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>
2015-11-15 19:33:13 +00:00
Gerald Combs b44e3fc98e [Automatic update for 2015-11-15]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I7a2eaecb6f24992cb3023919c8bd8af2c15192c3
Reviewed-on: https://code.wireshark.org/review/11838
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-15 16:09:44 +00:00
Stig Bjørlykke 9196fa96ed Qt: Fixed use-of-deallocated-memory when removing a profile.
The memory used for profile item data is accessed in updateWidgets() which
is called when setting the Default profile as selected.  Ensure we free
this memory after this has happened.

Bug: 11705
Change-Id: I79e12d918289e1fcf25331c39439e9c6f3b774d5
Reviewed-on: https://code.wireshark.org/review/11827
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-14 18:10:56 +00:00
Uli Heilmeier 76dec3ba68 UDP Multicast Stats: Fixed typo
Change-Id: I98d6ef48448b32f57349facb2bbef538319c5da4
Reviewed-on: https://code.wireshark.org/review/11825
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-14 17:16:44 +00:00
Gerald Combs 661c9771f6 Qt: Add go to next + previous packet in conversation.
Add "Go→Next Packet in Conversation" and "Go→Previous Packet in
Conversation" menu items. Make sure the shortucts ("Ctrl+." and
"Ctrl+,") don't get switched to "Cmd+." and "Cmd+," on OS X. "Cmd+," is
already taken by the preferences dialog.

Change-Id: Iab9c7f60fdcf55f12c055b4d0948019bf667ebc9
Reviewed-on: https://code.wireshark.org/review/11771
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>
2015-11-13 09:43:24 +00:00
Pascal Quantin aa94bbedfe Qt: fix creation of a new profile broken by g328fbc0
Change-Id: Icbe8dbf6f0c4267d7ed4704f78e589a1a48e1424
Reviewed-on: https://code.wireshark.org/review/11783
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-13 06:35:02 +00:00
Stig Bjørlykke 1b6bf76604 Qt: Fixed signal name to avoid a warning.
Also terminate stream lines with endl.

Change-Id: Icbbe5b47695506888c03607ff0af66c59306faae
Reviewed-on: https://code.wireshark.org/review/11778
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>
2015-11-13 06:02:52 +00:00
Gerald Combs f5d7548497 Qt: Coloring Rules dialog fixups.
Insert new rules at the top. This matches the GTK+ UI behavior. Recolor
the packet list when we press "OK". Add a "to do" item about setting the
filter column width.

Change-Id: I2a9e58fe8642a89f12e1c34622b96613f3ec4c05
Reviewed-on: https://code.wireshark.org/review/11781
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-13 01:47:53 +00:00
Pascal Quantin 9fe7102b3a Qt: fix UI artifacts seen in UAT window on Linux or OSX
The QLabel::clear() method call does not seem to repaint the area on those platforms.
Let's force an update of the widget.

Bug: 11695
Change-Id: I9c708c8537140b26582e4365ceee3271eac23259
Reviewed-on: https://code.wireshark.org/review/11782
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-13 00:09:14 +00:00
Pascal Quantin 2ff3c750e9 Qt: initialize all remote interface options
Bug: 11699
Bug: 11701
Change-Id: Ib470e69bba015a006f9360cfdb429a816b80e37c
Reviewed-on: https://code.wireshark.org/review/11767
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-12 15:47:58 +00:00
João Valverde 2d7b0fc7d0 [GTK] Replace deprecated gdk_pixbuf_new_from_inline()
Use GResource instead, if available. Add autotools and cmake compile time
checks for build requirements (GIO >= 2.32 and GDK-Pixbuf >= 2.26).

Merge all the various static pixbuf csource header files into
a single pixbuf-csource.h header with external linkage through use of the
tools/make-pixbuf-csource.pl script.

Fix inline pixbuf build target for some image paths (broken for GTK
in gb4a4de7).

Add missing 'expert_ok.png' file to distribution (GTK only).

Minor improvements to style/structure of ui/gtk/Makefile.am.

Bug: 10750
Change-Id: I031296b666ee8b92730400dfa6f71f9ee4304863
Reviewed-on: https://code.wireshark.org/review/10992
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-12 07:14:32 +00:00
Pascal Quantin c712d65e91 Qt: save preferences after creating a filter from expression frame
Bug: 11690
Change-Id: Ice6a2341d3f39c107a3c9d6a0e23fd98312b48a8
Reviewed-on: https://code.wireshark.org/review/11748
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-12 07:02:28 +00:00
Stig Bjørlykke 864872ed61 Qt: Added IO Graph save to clipboard button.
Also added save as CSV file.
Do not add double quotes for values as we do in GTK.

Change-Id: I8576a73e10b71cdba0c8c80db8b21927d19528da
Reviewed-on: https://code.wireshark.org/review/11732
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Jim Young <jim.young.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-12 07:00:33 +00:00
Guy Harris 75dc2051e8 Add wtap_dump_open_tempfile routines, to write to a temporary file.
It includes the temporary-file generation, so you don't have to do it
yourself.

Change-Id: I0798df95a5c5646224ec49612f50b423ed78547a
Reviewed-on: https://code.wireshark.org/review/11751
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-12 00:59:40 +00:00
Pascal Quantin ca2ecc1241 Qt: fix cursor position when editing coloring rules names or filters
A call to setText will set the cursor to the end of the box.
As far as I can tell, this call is useless so let's remove it.

Bug: 11689
Change-Id: I40aee48745a9107331a017070a715a075106974a
Reviewed-on: https://code.wireshark.org/review/11727
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-11 20:43:06 +00:00
Pascal Quantin 328fbc001e Qt: fix profile rename
Bug: 11658
Change-Id: I271863557d13137d168e12d3c393de49823f288a
Reviewed-on: https://code.wireshark.org/review/11708
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-11 08:17:26 +00:00
Pascal Quantin a4981a279a Qt: fixes to 'Edit Column' dialog
- set field name and occurrence when editing a custom column
- convert occurrence number to a QString
- disable OK button when syntax is incorrect or empty for a custom column
- update syntax state when opening the edit dialog or when switching between custom and normal column

Bug: 11433
Change-Id: Ia8424474dd250c78a0b503e0e9d89c322f4f86a9
Reviewed-on: https://code.wireshark.org/review/11705
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-11 08:16:25 +00:00
Gerald Combs 757fe65474 Qt: Freeze+thaw the main window during nested operations.
As noted in main_window.cpp:

// Our event loop becomes nested whenever we call update_progress_dlg, which
// includes several places in file.c. The GTK+ UI stays out of trouble by
// showing a modal progress dialog. We attempt to do the equivalent below by
// disabling parts of the main window. At a minumum the ProgressFrame in the
// main status bar must remain accessible.

Move the freeze+thaw code from captureFileRetapStarted and
captureFileRetapFinished to its own set of member functions. Call them
when we {,un}mark and {,un}ignore packets and note that we should
probably call them elsewhere. Disable mark and ignore actions when we
freeze and restore their states when we thaw.

Bug: 11681
Change-Id: I6f015f7f5f6c98cd48ace2c87f43f48efe51a88b
Reviewed-on: https://code.wireshark.org/review/11690
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-11 05:28:10 +00:00
Guy Harris 0b05086754 Apple calls it just "OS X" these days.
Change-Id: I98905988ceb394d27307d1cbe883d8fe95ac23e4
Reviewed-on: https://code.wireshark.org/review/11703
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-10 21:08:45 +00:00
Gerald Combs 47172e7d51 Qt: Start adjusting icon sizes dynamically.
In the main toolbar get our initial icon size using the PM_SmallIconSize
pixel metric. On Windows this varies directly with the system text
magnification setting.

Pinging bug 11675 since we still need to adjust the icon sizes in the
filter edits, progress frame, status bar, and likely other places.

Ping-Bug: 11675
Change-Id: I53a78627ce850bd6dbd4628da481badee63a1208
Reviewed-on: https://code.wireshark.org/review/11605
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-08 19:51:25 +00:00
Gerald Combs 1e87ff4727 [Automatic update for 2015-11-08]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I5da56a10b8c73f804e98124895c513ad4c97a37b
Reviewed-on: https://code.wireshark.org/review/11643
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-08 18:51:12 +00:00
Guy Harris caa1e87410 Use ws_{read,write,fdopen,close}.
Be more consistent about using the ws_ routines, as we suggest in
README.developer.

In C++ on UN*X, define ws_close as ::close rather than close, so that it
works even in classes with methods or members named "close".

Change-Id: Ide2652229e6b6b4624cbddae0e909a4ea1efa591
Reviewed-on: https://code.wireshark.org/review/11637
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-08 10:32:09 +00:00
Guy Harris 0162e54075 Clean up includes of unistd.h, fcntl.h, and sys/stat.h.
Have wsutil/file_util.h include them on UN*X, just as it includes io.h
on Windows, so we can have a rule of "if you do file operations, include
<wsutil/file_util.h> and use the routines in it".

Remove includes of unistd.h, fcntl.h, and sys/stat.h that aren't
necessary (whether because of the addition of them to wsutil/file_util.h
or because they weren't needed in the first place).

Change-Id: Ie241dd74deff284e39a5f690a297dbb6e1dc485f
Reviewed-on: https://code.wireshark.org/review/11619
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-07 21:52:23 +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
Michael Mann 1799834898 Fix crash in internals menu dissector tables dialog by supporting FT_GUID type.
Change-Id: I1e4700b505746c49ea518dc401be590740720a57
Reviewed-on: https://code.wireshark.org/review/11600
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-06 19:51:04 +00:00
Guy Harris 2d00abcb81 No need to include io.h.
This includes wsutil/file_util.h, which includes io.h, so we don't need
to include it ourselves.

Change-Id: I96b111d2b5a4f27895c1e4b19c31eee2a4d5d554
Reviewed-on: https://code.wireshark.org/review/11595
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-06 18:33:43 +00:00
Guy Harris ce22578996 Don't include io.h in Flex scanners - they're not interactive.
We don't have any Flex scanners that support an interactive command-line
interface, so none of our scanners are, or need to be, interactive.
Mark text2pcap's scanner as not interactive.

That means none of our scanners should call isatty(), so they don't have
any need to include <io.h> on Windows; remove that include from the
Lucent/Ascent text capture scanner.

Update a comment to reflect that what matters isn't whether we can read
from a terminal or whether we actually do so, what matters is whether
they read *interactively* from a terminal (if you want to run text2pcap
reading from the standard input and type at it, be my guest).

Change-Id: I59979d1fdb37e1913125a400963ff7a3fa6b9bbd
Reviewed-on: https://code.wireshark.org/review/11587
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>
2015-11-06 01:14:31 +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
Guy Harris 2096c006aa Get rid of ws80211_frequency_to_channel().
Use ieee80211_mhz_to_chan() instead.

Change-Id: I1d9a3b9c3a5ad2b1a5bd3f8d10b7f8b1bbcba51d
Reviewed-on: https://code.wireshark.org/review/11586
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-05 22:56:07 +00:00
Michael Mann e0e574d167 Refactor DCE/RPC dissection to include a real dissector table.
This is hopefully just the first step in getting DCE/RPC dissection to use "standard" APIs instead of homegrown ones.
For starters, it allows Decode As functionality to be less hacky (although incomplete in Qt)

Change-Id: Ia0923a3d8d514ab7acce32e26ee7e08f6e24feca
Reviewed-on: https://code.wireshark.org/review/11468
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04 12:43:35 +00:00
Pascal Quantin ccca843a57 Activate word wrap for hintLabel defined as QLabel
Without this, a long hint string (like a wrong protocol name in the SSL UAT preference) will resize the window to match the string.
With this change, instead the hintLabel string is continuing on a new line to match currently configured window size

Change-Id: Ib8fcc7bd96585717f122b0921165c4d916442cb0
Reviewed-on: https://code.wireshark.org/review/11529
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-04 11:34:30 +00:00