summaryrefslogtreecommitdiff
path: root/qutebrowser/utils
AgeCommit message (Collapse)Author
2021-10-03Make notifications mostly work.Jimmy
`QVariant.Type` has moved to `QMetaType.Type`[1][] and QMeta.Type doesn't work with int(). `QImage(':/icons/qutebrowser-64x64.png')` yields and empty QImage. This is not fixed but things don't crash because of it anymore. For instance the "Title & Body" test on https://web-push-book.gauntface.com/demos/notification-examples/ `QtWebEngineCore.QWebEnginePage.Feature` doesn't work with int(), so add it to the maps twice. `for s in scripts` was from a previous hack [1]: https://www.qt.io/blog/whats-new-in-qmetatype-qvariant
2021-08-26FIXME QMouseEvent weirdnessFlorian Bruhin
2021-08-26More enum changesFlorian Bruhin
2021-08-26OpenGL fixupFlorian Bruhin
2021-08-26Some more enum changesFlorian Bruhin
2021-08-26Automatically rewrite enumsFlorian Bruhin
See #5904
2021-08-26Blanket PyQt5 -> PyQt6Florian Bruhin
2021-07-12Revert "Fix enum stringification for Python 3.10 a7+"Florian Bruhin
This reverts commit e2c5fe6262564d9d85806bfa9d4486a411cf5045. See https://mail.python.org/archives/list/python-dev@python.org/thread/ZMC67QA2JVQJSWSFWRS6IM6ZX4EK277G/#LSTMFAPSPD3BGZ4D6HQFODXZVB3PLYKF
2021-06-01Merge remote-tracking branch 'origin/master' into 4nd3r/hostblock_subdomainsAnder Punnar
2021-05-28Fix tests/lintFlorian Bruhin
We need to set XDG_RUNTIME_DIR properly in the tests so that the log is empty.
2021-05-28log: Handle JSONLogger in change_console_formatterFlorian Bruhin
Fixes #6482
2021-05-20Merge remote-tracking branch 'origin/master' into 4nd3r/hostblock_subdomainsAnder Punnar
2021-05-19mypy: Set disallow_any_genericsFlorian Bruhin
See #6100
2021-05-18Update jinja.py typing after jinja upgradeFlorian Bruhin
jinja ships its own (more correct) stubs now see https://github.com/python/typeshed/issues/3197
2021-05-05Clarify backend version stringFlorian Bruhin
2021-04-24Merge remote-tracking branch 'origin/master' into 4nd3r/hostblock_subdomainsAnder Punnar
2021-04-15Add QUTE_QTWEBENGINE_VERSION_OVERRIDEFlorian Bruhin
See https://github.com/NixOS/nixpkgs/pull/119376#issuecomment-820073044
2021-04-15Revert accidental version.py changesFlorian Bruhin
2021-04-15Fix up testFlorian Bruhin
2021-04-13Merge remote-tracking branch 'origin/master' into 4nd3r/hostblock_subdomainsAnder Punnar
2021-04-13Avoid module-level circular importFlorian Bruhin
When running ua_fetch.py, websettings gets imported and fails: $ python3 scripts/dev/ua_fetch.py Traceback (most recent call last): File ".../scripts/dev/ua_fetch.py", line 16, in <module> import qutebrowser.config.websettings File ".../qutebrowser/config/websettings.py", line 32, in <module> from qutebrowser.config import config File ".../qutebrowser/config/config.py", line 31, in <module> from qutebrowser.config import configdata, configexc, configutils File ".../qutebrowser/config/configdata.py", line 32, in <module> from qutebrowser.config import configtypes File ".../qutebrowser/config/configtypes.py", line 65, in <module> from qutebrowser.utils import (standarddir, utils, qtutils, urlutils, urlmatch, File ".../qutebrowser/utils/standarddir.py", line 33, in <module> from qutebrowser.utils import log, debug, utils, version File ".../qutebrowser/utils/version.py", line 529, in <module> class WebEngineVersions: File ".../qutebrowser/utils/version.py", line 597, in WebEngineVersions def from_ua(cls, ua: websettings.UserAgent) -> 'WebEngineVersions': AttributeError: partially initialized module 'qutebrowser.config.websettings' has no attribute 'UserAgent' (most likely due to a circular import)
2021-04-09make _widened_hostnames public, move to urlutilsAnder Punnar
2021-04-08Fix enum stringification for Python 3.10 a7+Florian Bruhin
https://bugs.python.org/issue40066 https://mail.python.org/archives/list/python-dev@python.org/message/CHQW6THTDYNPPFWQ2KDDTUYSAJDCZFNP/ https://github.com/python/cpython/commit/b775106d940e3d77c8af7967545bb9a5b7b162df
2021-04-07Don't parse distribution versionsFlorian Bruhin
We don't actually need those values anywhere, and parsing can be tricky as there isn't a fixed format for those version numbers. Let's just not do it at all. See #6354.
2021-04-07Handle version numbers with >3 digitsFlorian Bruhin
Closes #6354
2021-03-31flatpak: Try getting ID from /.flatpak_infoFlorian Bruhin
2021-03-31flatpak: Make things work without FLATPAK_IDFlorian Bruhin
2021-03-29Fix QtWebEngine version guessing with PyInstallerFlorian Bruhin
Fixes #6337
2021-03-29Split QtWebEngine version handling into different methodsFlorian Bruhin
Preparation for #6337
2021-03-23Fix lintFlorian Bruhin
2021-03-23standarddir: Fix custom basedirs with flatpakFlorian Bruhin
See https://github.com/flathub/org.qutebrowser.qutebrowser/issues/18#issuecomment-802827816
2021-03-23Fix lint/testsFlorian Bruhin
2021-03-23More sophisticated replacing for messagesFlorian Bruhin
Every message now takes a replace='...' ID, similar to what "dunstify --replace" does. This allows messages to be replaced even if another message was shown in the meantime (or with process live output, if another process was spawned).
2021-03-19Fix lintFlorian Bruhin
2021-03-19Improve certificate error formattingFlorian Bruhin
2021-03-19Refactor cert error handling to act on single errorsFlorian Bruhin
With QtNetwork, we can get multiple errors at once (reproduced e.g. by using the Superfish certificate on badssl.com). With QtWebEngine, we can only get one error. Things like "is this error coming from a third-party resource" are hard to reason about if there is a list of errors, so change CertificateErrorWrapper so that it's exposed as one single error to the rest of the code.
2021-03-18Rename version.is_sandboxed() to is_flatpak()Florian Bruhin
2021-03-18Import webenginesettings lazily in versionFlorian Bruhin
2021-03-18Use correct runtime path for FlatpakFlorian Bruhin
See #6300 (cherry picked from commit 9f67a763ef86805f0981f037ccd2fb5cb0e84b88)
2021-03-17Drop libgl workaround entirelyFlorian Bruhin
2021-03-15tests: Add debug logging for standarddirFlorian Bruhin
Easier to diagnose issues if we end up in HOME
2021-03-12Fix lint/testsFlorian Bruhin
2021-03-12Add WebEngineVersions.chromium_majorFlorian Bruhin
2021-03-11Fix wrong replacementFlorian Bruhin
2021-03-11Make private things private againFlorian Bruhin
2021-03-11Merge remote-tracking branch 'origin/pr/6234'Florian Bruhin
2021-03-11Add custom VersionNumber classFlorian Bruhin
Qt's API is kind of painful, and we need some custom functionality anyways. Wrap QVersionNumber with our own class instead of piling up workarounds.
2021-03-11Fix coverageFlorian Bruhin
This code is removed again soon
2021-03-11Handle PyQt(WebEngine)-Qt5 packagesFlorian Bruhin
2021-03-11Fix Chromium version handling with PyQt 5.15.4+Florian Bruhin