Open URLs in Private Mode / Incognito#9694
Open
varjolintu wants to merge 1 commit intokeepassxreboot:developfrom
Open
Open URLs in Private Mode / Incognito#9694varjolintu wants to merge 1 commit intokeepassxreboot:developfrom
varjolintu wants to merge 1 commit intokeepassxreboot:developfrom
Conversation
droidmonkey
reviewed
Aug 5, 2023
whindsaks
suggested changes
May 7, 2024
| .arg(url.scheme()); | ||
| QSettings defaultBrowserRegistry(registryPath, QSettings::NativeFormat); | ||
| auto defaultBrowser = defaultBrowserRegistry.value("ProgId").toString(); | ||
| if (defaultBrowser.isEmpty()) { |
There was a problem hiding this comment.
It is possible for UserChoice not to exist, then you must find the progid the classic way.
| } | ||
|
|
||
| // Get the executable path from program ID | ||
| registryPath = QString("HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\%1\\shell\\open\\command").arg(defaultBrowser); |
| return (settings.value("Flags").toInt() & 1u) != 0; | ||
| } | ||
|
|
||
| QString WinUtils::getDefaultApplicationForUrl(const QUrl& url) |
There was a problem hiding this comment.
There is no need for this incorrect registry handling, just call AssocQueryStringW(ASSOCF_NOTRUNCATE | ASSOCF_INIT_IGNOREUNKNOWN, ASSOCSTR_EXECUTABLE, L"http", 0, ...)
c68bcbd to
920092f
Compare
920092f to
e3ce99e
Compare
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.
Adds a new menu item and keyboard shortcut for opening a URL using Private Mode / Incognito with the operating system default browser.
xdg-settingsNSWorkspace::URLForApplicationToOpenURL()callWith Firefox based browsers Firefox itself and Librewolf are detected automatically to use
-private-windowcommand line parameter. Chromium-based browsers will use-incognitoFixes #9468.
Testing strategy
Manually.
Type of change