Double-click radio entry in SmartLink dialog to connect (#1139)#1153
Merged
Conversation
Connect QListWidget::itemDoubleClicked to onConnectClicked() so that double-clicking a radio entry is equivalent to single-click + Connect. The !m_connected guard prevents accidental disconnect when already connected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
7 tasks
Connect QListWidget::itemDoubleClicked to onConnectClicked() so that double-clicking a radio entry is equivalent to single-click + Connect. The !m_connected guard prevents accidental disconnect when already connected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Author
There was a problem hiding this comment.
Clean, minimal implementation — looks good.
The single connect() added at line 147 is the right approach: it reuses the existing onConnectClicked() handler rather than duplicating logic, so the two paths (button click and double-click) stay in sync automatically. A few things I checked:
!m_connectedguard — correct. Prevents a double-click from firing intoonConnectClickedwhile already connected, which could cause unintended re-connection attempts.- Empty list —
itemDoubleClickeddoesn't fire when there are no items, so no null dereference is possible; the unusedQListWidgetItem*parameter is correctly discarded. - Lambda capture —
thisis safe; both the list widget andConnectionPanelshare the same lifetime, so the connection is torn down with the panel. - No header changes — the lambda avoids a new named slot, which keeps the diff minimal. Appropriate for a one-liner behaviour change.
- Scope — only
ConnectionPanel.cpptouched; no drift into unrelated files.
No issues found. Thanks for the contribution — double-clicking to connect is a natural UX expectation for this kind of list dialog.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
QListWidget::itemDoubleClickedtoonConnectClicked()inConnectionPanelso double-clicking a radio entry is equivalent to single-click + Connect button.!m_connectedguard prevents an accidental disconnect when already connected.connect()call added.Fixes #1139
Test plan
🤖 Generated with Claude Code