Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
Rather than shelling out to "osascript" and telling it to tell Finder to show
the file, we can directly use NSWorkspace's "activateFileViewerSelectingURLs:"
method to launch Finder and highlight the chosen file. It's less code, runs
faster, and should be much less risky regarding special characters, string
encodings, etc.
|
|
On Linux (and presumably other DBus-using Unix-like OSes), right-clicking on a
file on the Welcome page and choosing "Show in Folder" would only ever open the
folder, and would not highlight the chosen file.
Adding DBus support to function desktop_show_in_folder allows for the file
itself to be shown -- subject to support from the user's desktop environment...
|
|
Those links are to questions with answers that indicate how to show a
folder window with a particular file selected using system APIs rather
than firing up programs.
|
|
As it turns out, "Copy as Printable Text" is useful for copying
text-based protocol data.
Paritally revert 2a96b3e1d1 and add it back to DataPrinter::copyActions.
Fixes #19607
|
|
|
|
Move it from a some dialog boxes' code to get_open_dialog_initial_dir().
|
|
If an application is launched from the Finder, it appears to get / as
its current directory. This causes Wireshark open/save dialogs to open
up / if the user hasn't already opened a file in another directory, so
that there's no "last open directory" in the recent file.
Have get_persdatafile_dir(), on UN*X, cache the personal data directory
just as it does on Windows and, if nothing's been cached, have it fetch
the current directory and, if that succeeds *and* it's not the root
directory, use that. Otherwise, use the user's home directory.
Fixes #9862.
In addition, separate the notion of "last open directory" and "open
dialog initial directory", where the latter is the last open directory
*if* a file has been opened in this session or the recent file has the
last open directory from a previous session, otherwise it's the user's
personal data directory.
Use the latter notion in file open/save dialogs; use the former notion
when reading from and writing to the recent file.
This means we don't need to set the "last open directory" at startup
time. That way, running Wireshark without opening a file won't cause
the "last open directory" to be set, so that if a user runs it from a
directory, the "open dialog initial directory" won't be the last
directory from which Wireshark was run.
|
|
We already strongly recommend Qt version 5.12 and enforce 5.10.
Commit 06cd84a6e9f8bd0807cca35595b94b07de254b07 said "[a]lthough
build support for 5.10 and 5.11 is not being removed at this point,
it might be for 4.x at a later time."
Move to enforcing 5.11, and update macos-setup for that as well.
Remove the QT_VERSION_CHECKs for 5.10 and 5.11 (except in
qcustomplot.)
Hold off on enforcing 5.12 for now, because there isn't any code
that needs 5.12 or greater (there are two places for a workaround
for Qt 5.12.0 through 5.12.5), and because Debian Buster is on
Qt 5.11.3. There are not any known supported OS distributions on
Qt 5.10.
|
|
|
|
|
|
For all platforms, use QStyleHints::colorScheme to check for a dark
theme if it's available.
On Windows + Qt >= 6.5, use the fusion style for dark mode as described at
https://www.qt.io/blog/dark-mode-on-windows-11-with-qt-6.5
Although the blog post specifically mentions Windows 11, this seems to
work fine here on Windows 10.
Fixes #16221
|
|
Allow Edit Resolved Name to be called from the packet details,
for fields that are IPv4 or IPv6 addresses.
Add to the combobox of possible addresses to edit all (non hidden)
IPv4 or IPv6 fields. Set the index of the combobox to the selected
column (if it is an address, and the packet list has focus or was
selected), or to the currently selected field (if selected from
the packet details, and an IP address.) Check other types of
address columns (such as network address and custom columns) to
see if they match the unresolved string for an IP address.
Don't both redissecting the packets if the network resolution is
off, because it won't do anything. There's a use case for editing
several names before turning on the preference to avoid processor
intensive redissects.
Fix #17284
|
|
Implement the search as a QSortFilterProxyModel filter, instead of
using a simpler binary search.
The only practical difference is that the dialog now shows all
entries when the input is empty, instead of an empty table.
|
|
Remove the "printable text" action because it never does the right thing.
Copying bytes as text needs an encoding. Either this eats some bytes
silently, which is already bad, or it actually produces UTF-8
encoding errors by omitting values outside the ASCII range.
Copying as "printable text" is already correctly supported using the
copy "Value" context option. This is guaranteed to be valid UTF-8
(modulo any bugs).
Replace it with a C-style format using ASCII and escape sequences,
that is somewhat in the spirit on printable text, produces
valid output and should be really useful.
I opted to remove the "Escaped String" option too because it
is very similar to the C string added above and IMO less
friendly, but this is just opinion and if people really like
this format over escaped ASCII for some reason it can and
should be added back.
While here rename the "Raw Bytes" menu option to be more
meaningful.
|
|
Rename IS_FT_*() to FT_IS_*(). I find it to be more natural and
a better namespace for a public interface.
|
|
An attempt at implementing request in issue #18615. Adding octal view
while at it, in case anybody happens to prefer that or compare with
reference data in octal.
Both decimal and octal view have three byte wide columns, which is
visually distinctive from hex view. Decimal uses leading spaces, which
makes it clearly different from octal view.
Some ternary operators previously done based on BYTES_HEX are now using
BYTES_BITS. This change is done as the new BYTES_DEC and BYTES_OCT have
more in common with BYTES_HEX and are either equivalent in context or
closer linked to BYTES_HEX (e.g. for calculating column widths).
While translations should be updated, I am unsure if this is automated.
Also, if attempted, lupdate picks up changes from unrelated commits.
|
|
Call the base constructor so that the AudioRoutingFilter is
parented, and make the comment in rtp_audio_stream.cpp regarding
temp_file_ being released by audio_output_ true.
|
|
Have AudioSilenceGenerator inherit the QIODevice constructor that
takes a parent, and pass the parent into the constructor when
creating it in RtpPlayerDialog. This ensures that it is deleted
appropriately when marker_stream_ is deleted.
|
|
|
|
Remove bundled code and use vcpkg binary library instead.
|
|
On older Qt versions (5.12?) QVector needs to be included,
not just QObject. (It isn't needed on 5.15, possibly because
QVector is an alias for QList in newer Qt versions.)
|
|
When creating a ProtoNode, count the (non-hidden) children and put
them in a QVector. This saves time having to iterate through all
of a node's children (or the parent's children) each time the
model or view wants to get the row or index number. Create and
delete the needed ProtoNodes when the root node is changed, instead
of recreating them on demand from the proto_nodes (since they're no
longer a thin wrapper.)
Fix #18625
|
|
Move the utils for checking for the last used directory and storing
it out of ProfileDialog, as they are not Profiles specific
|
|
MS-DOS Date and MS-DOS Time are packed 16-bit values
(https://learn.microsoft.com/en-us/windows/win32/sysinfo/ms-dos-date-and-time)
and when combined they make a 32-bit value.
In the original minizip that comes with zlib, the combined dosDate
parameter is a uLong, which is 64 bits on LP64 platforms. In minizip-ng,
it is a uint32_t.
At one point, minizip-ng renamed the dosDate struct member of
zip_fileinfo to dos_date, but more recent versions changed it back
to dosDate for compatibility, except the size remains different,
so our compatibility check can't distinguish the size.
clang (and possibly other compilers) complain about shortening a 64 bit
unsigned long to a uint32_t so make the return value from our
qDateToDosDate a uint32_t as it should be to avoid warnings on
distributions with minizip-ng
Also the maximum year value that can be stored in the format is
127, since it occupies bits 9-15 of the MS-DOS Date. (There was
probably some confusion since the maximum year is 2107, but its
offset from 1980, not 1900.)
|
|
As the Qt6 QString::QString(const QByteArray &ba) documenation says:
"Note: any null ('\0') bytes in the byte array will be included in this
string, converted to Unicode null characters (U+0000). This behavior is
different from Qt 5.x."
Make sure FieldInformation::toString() truncates its display label byte
array before converting it to a QString.
Fixes #18428
|
|
|
|
|
|
In order to phase out older versions, we recommed 5.12 as a
minimum Qt version going forward. Although build support for
5.10 and 5.11 is not being removed at this point, it might
be for 4.x at a later time.
|
|
Increase the minimum required version of Qt from 5.6 to the next
LTS version, 5.9. The various Linux distributions that have not
released an update to 5.9 or later (SLES 12, Debian stretch) are
nearing end of support, and can be supported by the Wireshark 3.6 LTS
release.
Qt 5.9 requires macOS 10.0, so make that the minimum macOS version
as well.
Remove unneeded version checks (except from QCustomPlot).
|
|
Move WiresharkApplication.{cpp,h} to MainApplication.{cpp,h}. Add back
WiresharkApplication as a thin superclass of MainApplication, similar to
LogsharkApplication. Change all of our wsApp references to mainApp. We
will likely have to change many or most of them back, but that's a
commit for another time.
|
|
|
|
Qt 5.10 added qsizetype, aka an ssize_t and Qt 6 makes extensive use of
it. Add a compatibility typedef and use it where we can. Cast it away
where we can't.
|
|
|
|
Apparently on Windows, if a dialog contains spaces it is not properly
opened via /select. But opening the file via QDesktopServices leads to
the file not being selected in the open explorer windows (expectation by
the user). Therefore the original change is restored, but with a
differenc call which should handle the space issue in most cases better
than before. See
https://stackoverflow.com/questions/3490336/how-to-reveal-in-finder-or-show-in-explorer-with-qt
for a short explanation (bottom of post)
Fixes #17927
|
|
Opening a folder on Windows lead to undesired behaviour
Fixes: #17927
|
|
|
|
|
|
Use qApp instead of wsApp in ColorUtils and StockIcon.
|
|
Add @file markers for UI
header files so that Doxygen will
generate documentation for them.
|
|
Use an enum to select units and a bit flag for the other options,
currently only prefix type.
|
|
Wireshark successfully compiles on Windows with Qt6.2 with following
cmake options:
-DUSE_qt6=ON -DDISABLE_ERROR=ON
QCustomPlot QT 6.2 patch is taken from QCustomPlot forum post by miccs.
|
|
Replace 'gssize' with 'ssize_t'.
Add a CMake configure check for ssize_t.
Fix missing "config.h" includes.
|
|
This reverts commit 5f50fad289858ac84ac59e97a6af204b4f1dd534.
|
|
Do not keep epan_dissect_t instance hanging until FrameInformation
destructor is called. Simply copy the tvb data into local buffer and
cleanup epan_dissect_t instance as soon as possible.
Fixes #17590
|
|
Q_OBJECT is only needed for signals+slots, translations, and other
meta-object services. Remove it in some classes, since having it means
we're generating and compiling code unnecessarily.
|
|
|
|
The Ubuntu build commented on some spelling errors in executable code
files. Fix the errors that don't come from external files containing
the spelling errors (USB product and vendor IDs, PCI IDs, ASN.1
specifications), and fix some errors that don't show up in the
executable code files (e.g., in comments and variable names).
|
|
This patch allows the profile importer to recover from a file too large
to import as well as adjusts the maximum allowed config file size.
Closes: #17504
|