Cannot save capture with comments to a format that doesn't support it (no pop-up)
Summary
pcap-ng allows comments, but they are not supported in most capture file formats. When doing Save As or Exporting Specified Packets to a file format that does not support comments, there is supposed to be a modal dialog asking the user to confirm that the comments will be lost. Instead, the dialog doesn't appear and nothing happens.
The problem was introduced in 7c883dd7 and also appears in the 3.4 branch.
Steps to reproduce
- Open a pcapng.
- Add a comment through Capture File Properties.
- Save comments.
- Save As a file format that does not support comments (e.g., regular pcap)
What is the current bug behavior?
Nothing happens. The file is not saved, and there is no dialog.
What is the expected correct behavior?
The following dialog should pop up, allowing the user to choose whether to discard comments or pick another format.
Build information
3.5.0 (v3.5.0rc0-606-gd612e197)
Compiled (64-bit) with Qt 5.15.2, with libpcap, with POSIX capabilities (Linux), with libnl 3, with GLib 2.66.4, with zlib 1.2.11, with SMI 0.4.8, with c-ares 1.17.0, with Lua 5.1.5, with GnuTLS 3.6.15 and PKCS #11 (closed) support, with Gcrypt 1.8.7, with MIT Kerberos, with MaxMind DB resolver, with nghttp2 1.41.0, with brotli, with LZ4, with Zstandard, with Snappy, with libxml2 2.9.10, with QtMultimedia, without automatic updates, with SpeexDSP (using system library), with Minizip.
Running on Linux 5.9.16-200.fc33.x86_64, with Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz (with SSE4.2), with 15943 MB of physical memory, with locale en_US.utf8, with light display mode, without HiDPI, with libpcap version 1.9.1 (with TPACKET_V3), with GnuTLS 3.6.15, with Gcrypt 1.8.7, with brotli 1.0.9, with zlib 1.2.11, binary plugins supported (21 loaded).
Built using gcc 10.2.1 20201125 (Red Hat 10.2.1-9).