diff options
author | Florian Bruhin <me@the-compiler.org> | 2023-08-10 16:53:52 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2023-08-10 16:53:52 +0200 |
commit | fc843f39440e10f918d57b86c7043658a48d7366 (patch) | |
tree | 738137d32cd4441bd5e260c928a1f73acf6363c3 | |
parent | 216a9f9a9b7386823decf3c2c8a6124a86e2cad8 (diff) | |
download | qutebrowser-fc843f39440e10f918d57b86c7043658a48d7366.tar.gz qutebrowser-fc843f39440e10f918d57b86c7043658a48d7366.zip |
Fix lint/tests
-rw-r--r-- | qutebrowser/browser/browsertab.py | 2 | ||||
-rw-r--r-- | qutebrowser/browser/commands.py | 2 | ||||
-rw-r--r-- | qutebrowser/browser/webengine/webengineelem.py | 2 | ||||
-rw-r--r-- | qutebrowser/utils/urlutils.py | 3 | ||||
-rw-r--r-- | tests/end2end/features/qutescheme.feature | 11 | ||||
-rw-r--r-- | tests/end2end/features/urlmarks.feature | 6 |
6 files changed, 22 insertions, 4 deletions
diff --git a/qutebrowser/browser/browsertab.py b/qutebrowser/browser/browsertab.py index 82ef84a3d..442628717 100644 --- a/qutebrowser/browser/browsertab.py +++ b/qutebrowser/browser/browsertab.py @@ -1176,7 +1176,7 @@ class AbstractTab(QWidget): navigation.navigation_type == navigation.Type.form_submitted and navigation.url.matches( QUrl(config.val.url.searchengines['DEFAULT']), - QUrl.UrlFormattingOption.RemoveQuery) and + urlutils.FormatOption.REMOVE_QUERY) and objects.backend == usertypes.Backend.QtWebEngine and version.qtwebengine_versions().webengine >= utils.VersionNumber(6, 3) ): diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 2889b630c..83a846b85 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -1250,6 +1250,7 @@ class CommandDispatcher: if name is not None: raise cmdutils.CommandError("Cannot specify name and --all") quickmark_manager.clear() + message.info("Quickmarks cleared.") return if name is None: @@ -1342,6 +1343,7 @@ class CommandDispatcher: if url is not None: raise cmdutils.CommandError("Cannot specify url and --all") bookmark_manager.clear() + message.info("Bookmarks cleared.") return if url is None: diff --git a/qutebrowser/browser/webengine/webengineelem.py b/qutebrowser/browser/webengine/webengineelem.py index a0148148d..20c3a36d4 100644 --- a/qutebrowser/browser/webengine/webengineelem.py +++ b/qutebrowser/browser/webengine/webengineelem.py @@ -214,7 +214,7 @@ class WebEngineElement(webelem.AbstractWebElement): if baseurl.scheme() == url.scheme(): # e.g. a qute:// link return False - # Qt 6.3+ needs an user interaction to allow navigations from qute:// to + # Qt 6.3+ needs a user interaction to allow navigations from qute:// to # outside qute:// (like e.g. on qute://bookmarks). versions = version.qtwebengine_versions() if ( diff --git a/qutebrowser/utils/urlutils.py b/qutebrowser/utils/urlutils.py index c347ae53b..0b571946d 100644 --- a/qutebrowser/utils/urlutils.py +++ b/qutebrowser/utils/urlutils.py @@ -39,6 +39,7 @@ if machinery.IS_QT6: REMOVE_SCHEME = QUrl.UrlFormattingOption.RemoveScheme REMOVE_PASSWORD = QUrl.UrlFormattingOption.RemovePassword + REMOVE_QUERY = QUrl.UrlFormattingOption.RemoveQuery else: UrlFlagsType = Union[ QUrl.FormattingOptions, @@ -74,6 +75,8 @@ else: _QtFormattingOptions, QUrl.UrlFormattingOption.RemoveScheme) REMOVE_PASSWORD = cast( _QtFormattingOptions, QUrl.UrlFormattingOption.RemovePassword) + REMOVE_QUERY = cast( + _QtFormattingOptions, QUrl.UrlFormattingOption.RemoveQuery) # URL schemes supported by QtWebEngine diff --git a/tests/end2end/features/qutescheme.feature b/tests/end2end/features/qutescheme.feature index 85f68661a..76686162c 100644 --- a/tests/end2end/features/qutescheme.feature +++ b/tests/end2end/features/qutescheme.feature @@ -300,3 +300,14 @@ Feature: Special qute:// pages Scenario: Open qute://gpl When I open qute://gpl Then the page should contain the plaintext "GNU GENERAL PUBLIC LICENSE" + + # qute://start + + Scenario: Seaching on qute://start + When I set url.searchengines to {"DEFAULT": "http://localhost:(port)/data/title.html?q={}"} + And I open qute://start + And I run :click-element id search-field + And I wait for "Entering mode KeyMode.insert *" in the log + And I press the keys "test" + And I press the key "<Enter>" + Then data/title.html?q=test should be loaded diff --git a/tests/end2end/features/urlmarks.feature b/tests/end2end/features/urlmarks.feature index 65e6c051a..1c97ec322 100644 --- a/tests/end2end/features/urlmarks.feature +++ b/tests/end2end/features/urlmarks.feature @@ -92,7 +92,8 @@ Feature: quickmarks and bookmarks And I open data/numbers/2.txt And I run :bookmark-add And I run :bookmark-del --all - Then the bookmark file should not contain "http://localhost:*/data/numbers/1.txt" + Then the message "Bookmarks cleared." should be shown + And the bookmark file should not contain "http://localhost:*/data/numbers/1.txt" And the bookmark file should not contain "http://localhost:*/data/numbers/2.txt" Scenario: Deleting all bookmarks with url @@ -230,7 +231,8 @@ Feature: quickmarks and bookmarks When I run :quickmark-add http://localhost:(port)/data/numbers/1.txt one When I run :quickmark-add http://localhost:(port)/data/numbers/2.txt two And I run :quickmark-del --all - Then the quickmark file should not contain "one http://localhost:*/data/numbers/1.txt" + Then the message "Quickmarks cleared." should be shown + And the quickmark file should not contain "one http://localhost:*/data/numbers/1.txt" And the quickmark file should not contain "two http://localhost:*/data/numbers/2.txt" Scenario: Deleting all quickmarks with name |