-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add URL double-click action option to Settings #12322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Add URL double-click action option to Settings #12322
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a configurable double-click action option for the URL field in the entry view, replacing the previous binary checkbox with a dropdown selector that offers three actions: edit entry, open in browser, or copy to clipboard. This enhancement provides users with more flexibility and brings consistency with existing username and password field double-click behaviors.
Key changes:
- Replaced boolean "Open browser on double clicking URL field" setting with a dropdown offering three actions
- Added migration logic to preserve existing user preferences when upgrading
- Updated the entry activation handler to support the new action types
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/core/Config.h | Added new URLDoubleClickAction configuration key |
src/core/Config.cpp | Added configuration mapping and migration logic for the new setting |
src/gui/ApplicationSettingsWidget.cpp | Updated settings UI logic to use dropdown instead of checkbox |
src/gui/ApplicationSettingsWidgetGeneral.ui | Replaced checkbox with dropdown containing three action options |
src/gui/DatabaseWidget.cpp | Modified entry activation handler to support multiple URL double-click actions |
tests/TestConfig.h | Added test method declaration for migration testing |
tests/TestConfig.cpp | Implemented comprehensive migration tests for the new setting |
Comments suppressed due to low confidence (1)
tests/TestConfig.cpp:52
- [nitpick] Variable names 'oldConfig' and 'oldConfig2' are not descriptive. Consider using names like 'configWithOpenUrlTrue' and 'configWithOpenUrlFalse' to better indicate the test scenario.
QSettings oldConfig(tempFile.fileName(), QSettings::IniFormat);
default: | ||
switchToEntryEdit(entry); | ||
break; | ||
} | ||
break; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The break statement after the switch block is unreachable because all switch cases already contain break statements. This creates dead code.
} |
Copilot uses AI. Check for mistakes.
Co-authored-by: juzu-o <[email protected]>
Co-authored-by: juzu-o <[email protected]>
43b6cd2
to
0e2adfb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a configurable double-click action for URL fields in the entry view, replacing a simple checkbox with a dropdown that offers three options: edit entry, open in browser, or copy to clipboard. This enhancement provides consistency with existing username and password field double-click behaviors while maintaining backward compatibility.
Key Changes:
- Replaced boolean "Open browser on double clicking URL field" checkbox with a dropdown selector offering three actions
- Implemented migration logic to preserve existing user preferences when upgrading
- Updated the double-click handler to execute the selected action based on the new configuration
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/core/Config.h |
Added new URLDoubleClickAction configuration key |
src/core/Config.cpp |
Added configuration directive and migration logic for the new setting |
src/gui/ApplicationSettingsWidgetGeneral.ui |
Replaced checkbox with dropdown and label in settings UI |
src/gui/ApplicationSettingsWidget.cpp |
Updated settings load/save logic to use dropdown instead of checkbox |
src/gui/DatabaseWidget.cpp |
Modified URL double-click handler to support multiple actions based on configuration |
tests/TestConfig.h |
Added test method declaration for migration testing |
tests/TestConfig.cpp |
Implemented test cases for configuration migration |
Description
This pull request adds an option in Application Settings to configure the double-click action for the URL field in the entry view. Instead of the previous "Open browser on double clicking URL field in entry view" checkbox, there is now a dropdown selector allowing users to choose the desired double-click action for the URL field:
This brings the URL field in line with the double-click behavior already available for username and password fields, allowing for a more consistent and customizable user experience.
Code changes include:
Open browser on double clicking URL field in entry view
checkbox in the Settings dialog with a dropdown menu to select the double-click action for the URL field.The feature was originally requested in #4717
AI Notice:
The majority of this code was written with the help of generative AI tools (GitHub Copilot / Claude Sonnet 4).
Screenshots
Testing strategy
Type of change
Additional notes