Commit Graph

25672 Commits

Author SHA1 Message Date
Florian Bruhin 7f45b178c9 Adjust imports 2025-10-11 20:49:52 +02:00
Florian Bruhin 26368f0b90 Work around per-domain UA header not working on redirects
See https://bugreports.qt.io/browse/QTBUG-140515
Fixes #8679
2025-10-11 20:49:19 +02:00
Teddy ff76871f4e replacing os.path with pathlib 2025-10-11 17:14:45 +02:00
Florian Bruhin 9ddbc964d4 Fix hardware acceleration on Wayland with Qt <= 6.9
Equivalent to https://codereview.qt-project.org/c/qt/qtwebengine/+/663568

    Specify native platform for ANGLE's EGL backend on Wayland

    Set EGL_PLATFORM=wayland to force ANGLE to obtain EGL display connection
    for wayland platform. Otherwise, the display connection for
    EGL_DEFAULT_DISPLAY may belong to a platform which Nvidia's EGL driver
    doesn't support. In case of unsupported platform, EGL may fallback to
    Mesa software renderer (LLVMPipe) disabling hardware acceleration in
    Chromium.

Fixes #8637
2025-10-10 23:33:28 +02:00
Florian Bruhin 2b4e5757b0 Reenable accelerated 3D canvas on QtWebEngine 6.8.2+
Qt 6.8.2 has a more fine-grained workaround:
https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/606122

This never seems to have it made to Qt 6.9+, but I can't seem to reproduce the
issue anymore (neither with PDF.js nor with Google Sheets), even on older
affected Qt versions, even on older Intel hardware. Maybe something else (mesa
etc.?) changed and this was fixed there?

Let's reenable this and find out if it breaks things again for someone.

Fixes #8346
See #7489, #8001, #8006
2025-10-10 23:07:09 +02:00
Florian Bruhin ddfd17d749 Fix focus issues with fullscreen notification
This is conceptually similar to the release_focus
signal added in 6aa19eb90f and
6f21accfae, but without having to thread the
signal through to TabbedBrowser and back.

Weirdly, doing self.setFocusPolicy(Qt.FocusPolicy.NoFocus) in
FullscreenNotification.__init__ did not help, so let's just set the focus
manually instead.

Fixes #8174.
Fixes #8625.
2025-10-10 20:46:48 +02:00
Florian Bruhin 6f21accfae Fix focus handling when closing hidden statusbar
From knezi's analysis in #8722:

    The problem was that in Qt, slots are called in the order of connection, so
    even though there's a code that tries to set up the focus correctly, it's
    run after the cmd widget is hidden and hence the focus is already moved and
    it doesn't work as expected.

Follow-up for #2236/#8024.
Fixes #8223.
Supersedes and closes #8722.
Also see #8625 and #8174 (which are not fixed by this).
2025-10-10 20:15:12 +02:00
Florian Bruhin 6b48ae4084 Update security patch version for Qt 6.10 release 2025-10-10 19:03:14 +02:00
Florian Bruhin e300327eea Update certifi changelog URL 2025-10-10 19:03:14 +02:00
mathis renaud 9d1dfcfe5c Make 'tox -e mypy' work again in tox.ini
Fix #8344
2025-10-10 19:03:16 +02:00
Florian Bruhin 897fc40f4d
Merge pull request #8725 from qutebrowser/update-dependencies
Update dependencies
2025-10-06 12:58:14 +02:00
qutebrowser bot 24aab77607 Update dependencies 2025-10-06 04:22:56 +00:00
Florian Bruhin c37b9ebf5b tests: Adjust for changed exception
Follow-up to 2ae3086244
2025-10-02 09:28:55 +02:00
Florian Bruhin 2ae3086244 qutescheme: Improve handling of invalid path -> host redirects 2025-10-02 09:07:15 +02:00
Florian Bruhin 4aa807032f qutescheme: Simplify URL/path normalization logic
See #8711
2025-10-02 09:04:17 +02:00
Florian Bruhin 0867a95abb qutescheme: Add tests for redirects 2025-10-02 08:59:23 +02:00
Florian Bruhin 25ff649efe Fix lint 2025-10-01 17:14:43 +02:00
Florian Bruhin f57afa39e8 webenginetab: Improve _on_navigation_request workarounds
- Use QTimer.singleShot to avoid crashes with QtWebEngine 6.10:
  https://bugreports.qt.io/browse/QTBUG-140543
- Disable back/forward workaround for QtWebEngine >= 6.6,
  as the underlying issue seems to be fixed there.

See https://github.com/qutebrowser/qutebrowser/issues/8694#issuecomment-3276397840
and #8711.
2025-10-01 17:09:01 +02:00
Florian Bruhin da8428f9ba webenginetab: Move QtWebEngine specific workaround
See #8711
2025-10-01 16:31:30 +02:00
Florian Bruhin 75475ee87b version: Adjust security patch version for Qt 6.10 RC 2025-09-30 09:02:07 +02:00
Florian Bruhin 8ebce896ad
Merge pull request #8717 from qutebrowser/update-dependencies
Update dependencies
2025-09-30 09:02:27 +02:00
qutebrowser bot 43b5618c0a Update dependencies 2025-09-29 04:23:12 +00:00
Florian Bruhin c9498995df
Merge pull request #8709 from andyflesner/patch-1
Update Python performance reference link in FAQ
2025-09-24 09:12:28 +02:00
Florian Bruhin aaba038a16
Merge pull request #8708 from qutebrowser/update-dependencies
Update dependencies
2025-09-24 08:00:56 +02:00
Florian Bruhin 92f3633662 tests: Skip nested prompts test on unaffected Qt versions
Qt < 6.9 doesn't crash in this situation, and seems to handle nested prompts
differently, causing the test to still wait for a prompt answer.

Follow-up to a13306a79f
2025-09-24 07:59:21 +02:00
Andy Flesner 7ce0e03614
Update Python performance reference link in FAQ 2025-09-23 21:45:27 -05:00
qutebrowser bot d64781c31c Update dependencies 2025-09-22 04:24:08 +00:00
Florian Bruhin a8f9fc1396 Update changelog 2025-09-21 18:36:36 +02:00
Florian Bruhin a13306a79f Fix exception when quitting with download prompt open
If we have a pending download with a prompt and quit qutebrowser, we get:

    mainwindow:closeEvent:715 Closing window 0
    quitter:shutdown:221 Shutting down with status 0, session None...
    prompt:shutdown:121 Shutting down with loops [<qutebrowser.utils.qtutils.EventLoop object at 0x7fa034725770>]
    quitter:shutdown:235 Deferring shutdown stage 2
    prompt:ask_question:179 Ending loop.exec() for <qutebrowser.utils.usertypes.Question default='/tmp/qbdl/download/' mode=<PromptMode.download: 5> option=None text='Please enter a location for <b>https://proof.ovh.net/files/1Mb.dat</b>' title='Save file to:'>
    prompt:ask_question:181 Restoring old question None
    prompt:_on_show_prompts:299 Deleting old prompt qutebrowser.mainwindow.prompt.DownloadFilenamePrompt(question=<qutebrowser.utils.usertypes.Question default='/tmp/qbdl/download/' mode=<PromptMode.download: 5> option=None text='Please enter a location for <b>https://proof.ovh.net/files/1Mb.dat</b>' title='Save file to:'>)
    prompt:_on_show_prompts:303 No prompts left, hiding prompt container.
    objreg:on_destroyed:112 schedule removal: 0
    objreg:on_destroyed:112 schedule removal: tab
    [...]
    objreg:on_destroyed:112 schedule removal: 0
    objreg:on_destroyed:112 schedule removal: main-window
    objreg:on_destroyed:112 schedule removal: tabbed-browser
    objreg:on_destroyed:112 schedule removal: status-command
    objreg:on_destroyed:112 schedule removal: completion
    objreg:on_destroyed:112 schedule removal: mode-manager
    objreg:on_destroyed:112 schedule removal: hintmanager
    objreg:on_destroyed:112 schedule removal: prompt-container
    quitter:_shutdown_2:241 Stage 2 of shutting down...
    [...]
    webenginedownloads:_on_state_changed:63 State for <qutebrowser.browser.webengine.webenginedownloads.DownloadItem basename='1Mb.dat'> changed to DownloadCancelled
    downloads:_on_begin_remove_row:1076 _on_begin_remove_row with idx 0, webengine True
    downloads:_remove_item:995 Removed download 1: 1Mb.dat [100%|?.??B]
    modeman:leave:429 Leaving mode KeyMode.prompt (reason: aborted)
    crashsignal:_handle_early_exits:229 Uncaught exception
    Traceback (most recent call last):
    File "[...]/qutebrowser/mainwindow/prompt.py", line 344, in _on_aborted
        modeman.leave(self._win_id, key_mode, 'aborted', maybe=True)
        ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "[...]/qutebrowser/keyinput/modeman.py", line 214, in leave
        instance(win_id).leave(mode, reason, maybe=maybe)
        ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "[...]/qutebrowser/keyinput/modeman.py", line 435, in leave
        self.left.emit(mode, self.mode, self._win_id)
        ^^^^^^^^^
    RuntimeError: wrapped C/C++ object of type ModeManager has been deleted
2025-09-21 18:33:05 +02:00
Florian Bruhin c6b486ce81 Fix segfault with nested download prompts
For an unknown reason, if a download prompt is triple-nested, Qt segfaults here:

    #0  add_lazy_attrs (td=0x7ffff52e0dd1 <QtPrivate::sizedFree(void*, unsigned long)+32>) at sip_core.c:6255
    #1  sip_add_all_lazy_attrs (td=0x7ffff52e0dd1 <QtPrivate::sizedFree(void*, unsigned long)+32>) at sip_core.c:6304
    #2  0x00007ffff636598e in sip_api_is_py_method_12_8 (gil=gil@entry=0x7fffffff8b8c, pymc=pymc@entry=0x7fffffff8b8b "", sipSelfp=sipSelfp@entry=0x7fffffff8ba8, cname=cname@entry=0x0, mname=mname@entry=0x7ffff636d57b "__dtor__") at sip_core.c:7402
    #3  0x00007ffff6365c2c in sip_api_is_py_method_12_8 (mname=0x7ffff636d57b "__dtor__", cname=0x0, sipSelfp=0x7fffffff8ba8, pymc=0x7fffffff8b8b "", gil=0x7fffffff8b8c) at sip_core.c:7356
    #4  callPyDtor (self=<optimized out>) at sip_core.c:5375
    #5  sip_api_instance_destroyed_ex (sipSelfp=0x7fffffff8c40) at sip_core.c:5311
    #6  0x00007ffff5fc9967 in sipQEventLoop::~sipQEventLoop() () from [...]/python3.13/site-packages/PyQt6/QtCore.abi3.so
    #7  0x00007ffff0bcd749 in QFileInfoGatherer::getInfo (this=0x5555583f9bc0, fileInfo=...) at [...]/qt5/qtbase/src/gui/itemmodels/qfileinfogatherer.cpp:349
    #8  0x00007ffff0be2629 in QFileSystemModelPrivate::fileSystemChanged (this=0x5555583f9870, path="/tmp/qbdl/download", updates=QList<std::pair<QString, QFileInfo>> (size = 3) = {...}) at [...]/qt5/qtbase/src/gui/itemmodels/qfilesystemmodel.cpp:1966
    (full stacktrace has 183 frames)

After a lot of experimentation, I figured out that moving the `NullIconProvider`
to a class variable (or removing it entirely) seems to help. Note that making it
`global` (but keeping the instanciation inside `FilenamePrompt._init_fileview()`)
did not!

This is semi-blind fix: It's unclear to me if this is a proper fix, or if the
changed memory layout just causes the issue to temporary disappear.

However, given that `QFileInfoGatherer::getInfo()` calls into the icon provider,
it might very well be the real deal.

Closes #8674
2025-09-21 18:07:34 +02:00
Florian Bruhin 18bea32975 Revert "pylint: Remove unneeded suppression"
This reverts commit 7e770765a9.
2025-09-17 18:08:06 +02:00
Florian Bruhin 7e770765a9 pylint: Remove unneeded suppression 2025-09-17 16:06:01 +02:00
Florian Bruhin 1aaf621409 pakjoy: Move main block to function 2025-09-17 15:59:08 +02:00
Florian Bruhin 7d8d14eb07 config: Add file select completions for yazi 2025-09-17 15:44:37 +02:00
Florian Bruhin 226d167ec7 Qt 6.10: Skip incompatible pakjoy tests
See https://github.com/qutebrowser/qutebrowser/issues/8694#issuecomment-3276414407
2025-09-17 15:35:22 +02:00
Florian Bruhin a7822d1e2a pakjoy: Add simple example code 2025-09-16 11:14:47 +02:00
Florian Bruhin 1f4ca40f78 tests: Work around Qt 6.10 permission persistence bug
https://bugreports.qt.io/browse/QTBUG-140194
https://github.com/qutebrowser/qutebrowser/issues/8694#issuecomment-3274635002
2025-09-16 10:58:47 +02:00
Florian Bruhin 75239be8b6 Merge branch 'update-dependencies' 2025-09-15 18:00:46 +02:00
Florian Bruhin 488339b3d5 coverage: Set patch = subprocess
Subprocess measuring got integrated into coverage.py and removed from
pytest-cov:

https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst#700-2025-09-09
https://coverage.readthedocs.io/en/latest/config.html#run-patch
2025-09-15 13:12:38 +02:00
qutebrowser bot 52917f9c31 Update dependencies 2025-09-15 04:21:54 +00:00
Florian Bruhin 326a83309a version: Update for Qt 6.10 Beta 4 2025-09-11 01:00:01 +02:00
Florian Bruhin 264d91eaec ci: Fix shellcheck 2025-09-09 23:27:24 +02:00
Florian Bruhin 9e280eb80f ci: Add scoop dir to PATH 2025-09-09 23:23:07 +02:00
Florian Bruhin c278069946 ci: Fix actionlint 2025-09-09 23:11:03 +02:00
Florian Bruhin 5894221924 ci: Upgrade release workflow to windows 2022
windows-2019 is unsupported by GitHub Actions:
https://github.com/actions/runner-images/issues/12045
2025-09-09 22:07:55 +02:00
Florian Bruhin af2450591c ci: Install NSIS manually for nightly builds
window-latest switched to windows-2025, where GitHub doesn't preinstall NSIS:
https://github.com/actions/runner-images/issues/12677

Let's install it manually (untested, might need follow-up commits).

The release.yml workflow uses windows-2019 (and will switch to windows-2022 in a
follow-up commit), so it is unaffected for now.
2025-09-09 22:07:55 +02:00
Florian Bruhin 65de4fde16 pakjoy: Fix filename for debug builds 2025-09-09 22:07:55 +02:00
Florian Bruhin 4d6dccfed5 Qt 6.10: Ignore new logging messages
See #8694
2025-09-09 22:07:55 +02:00
Florian Bruhin 45483d0994
Merge pull request #8698 from qutebrowser/update-dependencies
Update dependencies
2025-09-08 23:38:42 +02:00
Florian Bruhin c3eef39050
Merge pull request #8701 from qutebrowser/dependabot/github_actions/actions/setup-node-5
build(deps): bump actions/setup-node from 4 to 5
2025-09-08 23:31:04 +02:00