Commit Graph
34 Commits
Author SHA1 Message Date
Edouard Griffiths 62ce6c7b88 Merge pull request #2955 from rgetz/rgetz-fix-message-queue-leaks
tree wide: Fix message ownership and reporting for unhandled queue messages
2026-09-27 00:56:58 +02:00
Robin Getz c2b30d4fa8 tree wide: Fix message ownership and reporting for unhandled queue messages
MessageQueue::pop() transfers ownership of the popped message to the
caller, but many handleInputMessages() implementations only deleted
the message when handleMessage() returned true. When a message was not
handled, ownership had already been transferred from the queue and the
message was leaked.

This was identified while investigating an ASAN leak in the audio
subsystem.

Update the applicable handleInputMessages() implementations to always
delete messages after handleMessage() returns. Unhandled messages are
also logged with the component and message identifier so unexpected
message routing is visible during debugging.

This change:
- Ensures every message popped from a queue has its ownership resolved.
- Prevents leaks when handleMessage() returns false.
- Makes unhandled messages visible instead of silently discarding them.
- Preserves the existing message handling logic and does not require
  components to handle message types that are legitimately irrelevant
  to them.

The changes are intentionally mechanical and limited to the common
message queue ownership and diagnostic pattern.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-09-25 23:49:05 -04:00
Jon BenistonandClaude Opus 5 ddedd59568 Add MessageDialog and use it in place of the QMessageBox static functions
QMessageBox::information() and friends build the box on the stack, parent
it to the calling widget and run a nested event loop in exec(). If the
parent is closed while the box is open, which the Web API can do at any
time, the parent deletes the box and its children and the heap is
corrupted.

MessageDialog offers the same calls, but the box is heap allocated, given
Qt::WA_DeleteOnClose and shown rather than exec'd, so nothing runs a
nested event loop and the box owns its own lifetime. A box with the same
text as one already up is raised instead of a second being created.

The trade off is that information(), warning() and critical() return
immediately and cannot report which button was pressed. question() takes
a callback for the cases that need the answer.

Converts the call sites in the device, channel and feature GUIs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 17:16:49 +01:00
f4exb 63348eeee1 Make device title editable in the basic device settings. Fixes #2292 2026-01-28 03:05:39 +01:00
Daniele Forsi 8c3f7e3775 Remove unused includes and use more direct includes 2024-04-11 23:31:34 +02:00
f4exb b6c4d10b62 Rewriting of copyright notices for plugins/samplesource. Part of #1893 2023-11-18 10:07:41 +01:00
Jon Beniston e799e5eb72 Fix resize cursor not being cleared when mouse moves over child widgets 2023-11-13 20:51:03 +00:00
Jon Beniston 0dd466a900 Add DialogPositioner to ensure dialogs are fully on screen and remain on
screen when screen orientation changes.
Add DialPopup to allow dials to adjusted with a slider, which is easier
on touchscreens.
Add TableTapAndHold to support table context menus on touchscreens.
2022-12-20 10:31:15 +00:00
Jon Beniston ee8b8ade88 Device GUIs: Constain window size via minimumSize/maximumSize, rather than handling resizeEvent. Add maximum button. Hide size buttons when window size is fixed 2022-11-09 15:53:44 +00:00
f4exb ba76cb03cc Perseus: set frequency dial to 5 digits when not in transverter mode 2022-11-05 19:09:39 +01:00
f4exb 112d0594b5 Perseus: Make settings assignments atomic. Part of #1329 2022-10-23 23:59:48 +02:00
Jon Beniston 929e0d34dc Adjust number of frequency digits depending whether transverter is enabled 2022-10-17 13:43:32 +01:00
f4exb 949a9e9380 Center frequency dials up to 9 digits and transverter delta frequency dial up to 12 digits. Fixes #1476 2022-10-15 03:04:29 +02:00
Jon Beniston d6a02f659a Device GUIs: Stop timers in destructors. 2022-10-05 15:40:09 +01:00
f4exb 9e5c629473 v7: API: added workspace handling for device, spectrum, feature and channel. Implements #1242 2022-05-13 22:24:48 +02:00
f4exb 218237c466 Massive UI revamping (v7): Devices: set the border on the outer side of the window. Part of #1213 2022-04-24 02:13:18 +02:00
f4exb 90d331675a Massive UI revamping (v7): fixed widget size handling: sample sources. Part ofs #1209 2022-04-21 07:53:36 +02:00
f4exb 40e34bdebd Massive UI revamping (v7): implemented device common settings from top bar and added documentation on device windows top and bottom bars 2022-04-17 01:31:50 +02:00
f4exb 32973132d9 Massive UI revamping (v7): unify custom widget borders 2022-04-10 02:19:26 +02:00
f4exb aad90aeabc Massive UI revamping (v7): devices basic 2022-04-07 16:32:03 +02:00
f4exb 841a8fe242 Morph PluginInstanceGUI in DeviceGUI and single line inheritance from QWidget 2020-10-05 19:48:05 +02:00
f4exb d085b4eb7d Removed undesirable methods from PluginInstanceGUI and related common plugins 2020-10-04 22:16:09 +02:00
f4exb e6e7ece46c Removed file recording function from device plugins 2020-08-09 00:47:06 +02:00
f4exb 128f091566 IQ swap: updated plugins GUI 2020-06-23 20:00:24 +02:00
f4exb bbe4605258 Samplesources GUI file record: right click to choose file 2020-04-02 05:00:43 +02:00
f4exb 323e75cddd REST API device and channel actions: extension of record action: implementation 2020-03-10 19:44:27 +01:00
f4exb 89e53cf179 Single DeviceAPI interface (1) 2019-05-08 22:11:53 +02:00
f4exb 4bb0f4f51a Fixed incomplete copyright headers (2): plugins/samplesource 2019-04-11 06:57:41 +02:00
f4exb f7028fac3a Reverse API: Perseus 2018-12-26 13:09:09 +01:00
f4exb b00aea8989 PVS studio static analyzer fixes (1) 2018-06-21 19:28:11 +02:00
f4exb 3203a5511d Airspy input: implemeted WEB API 2018-05-25 19:28:57 +02:00
f4exb fdabbe49da Perseus: set frequency limits in the GUI 2018-02-09 06:54:20 +01:00
f4exb 3ac1be034a Perseus support (9) 2018-02-08 18:16:22 +01:00
f4exb 47da4a2023 Perseus support (8) 2018-02-08 16:45:00 +01:00