diff options
author | Florian Bruhin <me@the-compiler.org> | 2023-08-22 16:44:29 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2023-08-22 16:44:29 +0200 |
commit | 47daa9d872c6541931124e4786906c163dbc2ad9 (patch) | |
tree | 9e819c81dbe2dc9b3ec6c61d40affcd07eb71d18 | |
parent | 853a1b9d60953e61931bd1ac2d3c9c3892f96609 (diff) | |
download | qutebrowser-47daa9d872c6541931124e4786906c163dbc2ad9.tar.gz qutebrowser-47daa9d872c6541931124e4786906c163dbc2ad9.zip |
Fix url.auto_search=dns on Qt 6
With PyQt6, comparing an enum member to bool will always be False.
-rw-r--r-- | doc/changelog.asciidoc | 1 | ||||
-rw-r--r-- | qutebrowser/utils/urlutils.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 12416bcc2..3b6254141 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -24,6 +24,7 @@ Fixed - The "restore video" functionality of the `view_in_mpv` script works again on webengine. +- Setting `url.auto_search` to `dns` works correctly now with Qt 6. [[v3.0.0]] v3.0.0 (2023-08-18) diff --git a/qutebrowser/utils/urlutils.py b/qutebrowser/utils/urlutils.py index 0b571946d..7b613c0a2 100644 --- a/qutebrowser/utils/urlutils.py +++ b/qutebrowser/utils/urlutils.py @@ -226,7 +226,7 @@ def _is_url_dns(urlstr: str) -> bool: return False log.url.debug("Doing DNS request for {}".format(host)) info = QHostInfo.fromName(host) - return not info.error() + return info.error() == QHostInfo.HostInfoError.NoError def fuzzy_url(urlstr: str, |