-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
Add support for opening links in incognito mode on Linux & BSD #4745
Conversation
- whitespace - use this explicitly - underscore prefix on private members
- don't use .leftRef/.splitRef - use QStringView where applicable
ca93b88
to
c1b7258
Compare
add Qt.hpp helper include to XDGDirectory.cpp
before this change, this ::mid call would have resulted in undefined behavior when running under Qt older than 5.15 on a key with an empty value (equals sign at the end of the line)
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.
clang-tidy made some suggestions
# Conflicts: # CHANGELOG.md
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.
Looked through everything except XDGHelper so far, other than some nitpicks that I've fixed myself it looks fine 👍
xdg-settings took around ~130ms to run on my system, whereas the mimapps solution took ~0.5ms
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.
Works as expected for me now. If you can think of some other tests, please add them.
Please also read through the commits I've done and see if there's anything I've misunderstood
When you're happy to have this merged in, let us know and we'll hit the merge button
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.
clang-tidy made some suggestions
- paths with spaces in them - paths with characters reserved by spec
Done and done. Looks good to me |
…erino#4745) Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
…erino#4745) Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
Description
This PR adds support for opening links in private/incognito mode under Linux/BSD when using a desktop environment that follows the freedesktop specification. See #4366
List of technical changes
ego check (add myself to contributors.txt)Discussion points
I originally thought that you could read desktop files, which are essentially .ini files, with QSettings. However, the default app database (which is a desktop file) uses mimetypes as key names, which is incompatible with QSettings as the key may include
/
. I wrote a parser for them which didn't end up bigger than the code consuming it, so I feel comfortable still not adding another dependency for this. That being said, it should probably get as many eyes on it as possible since it is still a home-rolled parser.Some other points I would appreciate opinions on:
getDefaultBrowserExecutable
is called twice per settings open. Is a big search like this PR adds worth caching?I've tested this under Windows (for the minor behavior change) and under Debian testing with gnome. Throw your hairiest setups at this and let me know if anything breaks.