summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-12-06Fix lintqt6-delay-window-showFlorian Bruhin
2022-12-06Use QProxyStyle for TabBarStyleFlorian Bruhin
Closes #812 This does *not* seem to help with the crashes in #5385 or #5124, weirdly enough, but it still seems simpler, so why not do it.
2022-12-06Always delay stage 2 shutdown, not only with promptsFlorian Bruhin
If we shut down qutebrowser directly, in some rare situations, we seem to get into some trouble related to a QWidget trying to call into a Q(Common|StyleSheet)Style at shutdown (checking the style hint SH_Widget_ShareActivation, to figure out the palette to use when the window is hidden, or somesuch?). With the recent changes for #7504, those crashes suddenly started happening much more often. After staring at the related changes and gdb for over a day, I still have no idea what actually causes them and why it's crashing - it smells like some kind of PyQt/Qt cleanup order bug... However, what I *did* find out (after a lot of painful debugging and messing around with things) is that delaying the shutdown done from :quit seems to reliably get rid of the issue. I don't know *why*, but I haven't seen it happen anymore with the latest changes... Fixes #5385 and #5124, both speculatively. Closes #7504 since this was the last change required to make it all work.
2022-12-06quitter: Simplify :quit implementationFlorian Bruhin
None is the default value for instance.shutdown()'s "session", so we can simplify this a bit.
2022-12-05app/mainwindow: Delay .show() calls until after tabs are addedFlorian Bruhin
With Qt 6.4, QtWebEngine closes/reopens the main window to switch the RHI rendering mode when a QWebEngineView gets added: https://github.com/qt/qtbase/blob/v6.4.1/src/widgets/kernel/qwidget.cpp#L10706-L10709 To avoid this, we need to make sure we only call .show() *after* adding a tab, similarly to what Qt did too: https://code.qt.io/cgit/qt/qtwebengine.git/commit/?id=d7e0fd5304ebdb12c6f809cdbcf8193b49b9ecd2 See #7504 ---- This commit handles changes around app.py/mainwindow.py, which was probably the most complex one of the whole set (and also involving the oldest code I bet...). This changes a couple of intertwined things: - app._process_args() now needs to take track of the window it opened (if any), so that it can call .show() on it *after* opening pages. * If a session was loaded instead, sessions.py takes care of showing it. * The setActiveWindow call was also moved for simplicitly. Before, it was called even with --nowindow given, but that doesn't really make much sense. * I'm not actually sure why the .setActiveWindow() call is there. Qt docs say "Warning: This function does not set the keyboard focus to the active widget. Call QWidget::activateWindow() instead.". It was added back in 2014: ae44aa01a6d7d6f2e2b2e97a48f49a579f342c9f ("Set initial focused window correctly."). It's possible it's not needed anymore, but that's for a separate commit. - app.process_pos_args() now gets a MainWindow (rather than win_id) from mainwindow.get_window(), and is responsible for calling .show() and .maybe_raise() on it when nothing else does (like open_url called from it). * To preserve existing behavior (and not fail tests), it also still calls .maybe_raise() when a command was given. Maybe we should get rid of this to fix #5094, but that's for a separate commit. * Note it does *not* call .show(). That's taken care of later in _process_args() already. - app.open_url() can directly show the window, because it already opens a URL. It now still returns the MainWindow object for consistency. Also gets rid of some questionable objreg usage just to access a tabbed browser, as a tiny step towards #640. - Similarly, app._open_startpage() could have stayed, but now also takes a MainWindow and uses objreg a bit less. - open_desktopservices_url also takes care of the show/raise (as this gets called isolated from Qt), and also avoids objreg stuff where an attribute access would have sufficed... - mainwindow.get_window() now doesn't show the window anymore, and returns the mainwindow object instead of a window ID. * However, this means it can't actually raise the window anymore (it needs to be shown first). - To keep the decision about whether to raise the window in a central place, MainWindow now has a new should_raise attribute and maybe_raise() method. mainwindow.get_window() sets should_raise accordingly, and the caller is responsible to call .maybe_raise() after showing.
2022-12-05mainwindow: Don't call qapp.alert on deleted windowsFlorian Bruhin
I got an exception there while running tests with the refactored code. I don't quite understand how/why it changed, but it seems sensible to skip this too if we skipped calling calling .activateWindow() due to it being deleted. See 2fd21bb16bdc1f0c3f719c572271cc730c02c7a6
2022-12-05Delay browser.commands .show() calls until after tabs are addedFlorian Bruhin
With Qt 6.4, QtWebEngine closes/reopens the main window to switch the RHI rendering mode when a QWebEngineView gets added: https://github.com/qt/qtbase/blob/v6.4.1/src/widgets/kernel/qwidget.cpp#L10706-L10709 To avoid this, we need to make sure we only call .show() *after* adding a tab, similarly to what Qt did too: https://code.qt.io/cgit/qt/qtwebengine.git/commit/?id=d7e0fd5304ebdb12c6f809cdbcf8193b49b9ecd2 See #7504 ---- This commit handles browser.commands, in particular the "_new_tabbed_browser" convenience method (which is now, sadly, likely less convenient).
2022-12-05Delay various .show() calls until after tabs are addedFlorian Bruhin
With Qt 6.4, QtWebEngine closes/reopens the main window to switch the RHI rendering mode when a QWebEngineView gets added: https://github.com/qt/qtbase/blob/v6.4.1/src/widgets/kernel/qwidget.cpp#L10706-L10709 To avoid this, we need to make sure we only call .show() *after* adding a tab, similarly to what Qt did too: https://code.qt.io/cgit/qt/qtwebengine.git/commit/?id=d7e0fd5304ebdb12c6f809cdbcf8193b49b9ecd2 See #7504 ---- This commit handles various simple and isolated cases. Things requiring a bit more refactoring are handled in a separate commit.
2022-12-05browser.command: Fix some type annotationsFlorian Bruhin
2022-12-01Fix minimum version for Array.at quirkFlorian Bruhin
2022-12-01tests: Use set comprehensionsFlorian Bruhin
2022-11-29ci: Deactivate Qt 6.4 for nowFlorian Bruhin
Still some stuff broken sadly, see #7314
2022-11-29Add missing setting entry for array-at quirkFlorian Bruhin
(cherry picked from commit 39e577c36eef9892165a6979c403e9b2d9bc239c)
2022-11-29Add tests to make sure quirk files/declaration/settings matchFlorian Bruhin
2022-11-29qt 6: Remove old JS quirksFlorian Bruhin
We don't support Qt 5.12 anymore, so those can go.
2022-11-29Add a quirk for Array.atFlorian Bruhin
Trivial to polyfill, needed by various pages in the wild, and only natively available with Qt 6.2. Closes #7501 Also see #7237 and 726d5e614b1f80c339084eba7d1c240bf467fa9b (cherry picked from commit ce64e5d899666bd469bf07bd0fecbc75d4bfed3a)
2022-11-24tests: Fix downloads.feature flakinessFlorian Bruhin
The "Answering a question for a cancelled download" test was flaky, due to the preceding PDF.js test sometimes not waiting properly for its download to finish: "I wait until the download is finished" waited for the initial PDF download above (which causes PDF.js to open), but not for the real download after clicking the save button. See #5390 TODO: Cherry-pick to master?
2022-11-24tests: Ignore new QtWebEngine 6.4 messageFlorian Bruhin
See #7314
2022-11-24Update Chromium version informationFlorian Bruhin
See #7314
2022-11-24Make skipping broken PDF.js work properlyFlorian Bruhin
Fixup for c7ea2f705f22cfb677ef1b32ce3ec7101cede137 See #7135
2022-11-24Update Qt doc links to Qt 6Florian Bruhin
2022-11-24Add WebSocket resource type for Qt 6.4Florian Bruhin
See #7314
2022-11-24tox/ci: Add PyQt 6.4Florian Bruhin
2022-11-20Fixup dockerfile template for qt6 configurationstoofar
The merge resolution I did in 2d6646619449 was a bit hasty. Hopefully all supported configurations should work now.
2022-11-20Merge branch 'master' into qt6-v2toofar
Just a few conflicts around CI and dependencies.
2022-11-19Update changelogFlorian Bruhin
2022-11-19dictcli: Switch from master to mainFlorian Bruhin
Fixes #7481
2022-11-16ci: Fix docker build and add sanity checkFlorian Bruhin
2022-11-16ci: Keep QtWebKit on live support a bit longerFlorian Bruhin
See #7478, #4039
2022-11-16Revert "ci: Drop QtWebKit"Florian Bruhin
This reverts commit 00ee3fad34cdabdab3e3b631191bafa0e5199e9f.
2022-11-16Update changelog URLFlorian Bruhin
2022-11-15Merge pull request #7478 from qutebrowser/update-dependenciesFlorian Bruhin
Update dependencies
2022-11-14ci: Drop QtWebKitFlorian Bruhin
See #7478, #4039
2022-11-14Adjust ignores/settings after mypy upgradeFlorian Bruhin
See #7478, #7098
2022-11-14Update dependenciesqutebrowser bot
2022-11-08tests: Use snake-case wait_untilFlorian Bruhin
2022-11-08pylint: Remove now-unneeded suppressionsFlorian Bruhin
The recent pytest 7.2 upgrade leads pylint to complain: ************* Module unit.browser.test_qutescheme tests/unit/browser/test_qutescheme.py:26:0: I0021: Useless suppression of 'no-name-in-module' (useless-suppression) tests/unit/browser/test_qutescheme.py:226:0: I0021: Useless suppression of 'no-member' (useless-suppression) ************* Module helpers.fixtures tests/helpers/fixtures.py:39:0: I0021: Useless suppression of 'no-name-in-module' (useless-suppression) tests/helpers/fixtures.py:639:0: I0021: Useless suppression of 'no-member' (useless-suppression) possibly due to it not being able to infer 'py' anymore with the weird shenanigans pytest does now? Also, what weird glitch in the matrix is it that those just happen to be on lines [2]26 and [6]39 for *both* files? 🤯
2022-11-08tests: Try to fix Windows flakiness in userscript runner testFlorian Bruhin
2022-11-08Remove pytest-bdd deprecation ignoreFlorian Bruhin
2022-11-08Merge remote-tracking branch 'origin/update-dependencies'Florian Bruhin
2022-11-08Skip problematic QtWebKit tests with OpenSSL 3Florian Bruhin
See https://github.com/cherrypy/cheroot/issues/517 and #7467
2022-11-07remove glob2 from changelog urlstoofar
Got dropped from pytest-bdd: https://github.com/pytest-dev/pytest-bdd/pull/570
2022-11-07Update dependenciesqutebrowser bot
2022-11-04Merge pull request #7464 from ↵Florian Bruhin
qutebrowser/dependabot/github_actions/peter-evans/create-pull-request-4 build(deps): bump peter-evans/create-pull-request from 3 to 4
2022-11-04build(deps): bump peter-evans/create-pull-request from 3 to 4dependabot[bot]
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3 to 4. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v3...v4) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
2022-11-04Retry dependabot for GitHub ActionsFlorian Bruhin
See 78709ce2b9537f710f24edba15243aef1d732891 and fa5e04fdaf8af9230c4cd9c386c5d8e0307655ca Hoping this will work better nowadays? Tenatively closes #7299
2022-11-03Merge pull request #7459 from qutebrowser/update-dependenciesFlorian Bruhin
Update dependencies
2022-11-03Revert to recompile_requirements.py with set-outputFlorian Bruhin
Newlines don't work anymore, see #7459 Partially reverts 0ff0eaa, see #7439
2022-11-03Update dependenciesqutebrowser bot
2022-11-03ci: Get rid of set-outputFlorian Bruhin
Fixes #7439