summaryrefslogtreecommitdiff
path: root/qutebrowser/misc
AgeCommit message (Collapse)Author
2021-12-31Support fullscreen requests on Qt6Jimmy
QApplication.desktop() (And the QDesktopWidget that returns) has been deprecated since 5.11, we only support Qt 5.12+ (ref #3839). The recommended alternative is to use `QGuiApplication::screenAt(QPoint)`, but that doesn't support passing a widget. Stackoverflow [points out](https://stackoverflow.com/a/53490851) that you can get to the current screen of a widget, so that's what I'm using here. Once you get the screen there is both `geometry()` and `availableGeometry()` available. The later, sometimes, excludes window manager status bars and such, which fullscreen apps should cover. This approach works on both 5.15 and 6.2, so no version checks necessary.
2021-12-31sql: Make Query.bound_values() return a dict againJimmy
SqlQuery.boundValues() changed in Qt6 from returning a map of placeholders -> values to just providing a list of values. We can either: 1. follow that change and always return a list * this has the effect of making the return value have more items if the caller uses a placeholder more than once in a query, like histcategory does 2. maintain the current return type Here I have chosen to do (2). Although (1) is an option since it looks like no caller actually cares about the contents of the response at this point (apart from tests), just that it is Truthy/Falsy and the right length (if Truthy). And callers should know how many times they re-used placeholders so should be able to adjust their length comparison themselves. There is no API for enumerating placeholder labels anymore, if we want to maintain our API we must either 1) store the placeholders so we can look them up based on label later, 2) guess what they are (eg assume the caller always used sequential integers starting at 0), or 3) always return the dict keys as the positional indexes instead of labels (and return a larger dict if the caller used single placeholders multiple times). I've chosen to do 3 which should have the same result as the 5.15 implementation, at the cost of some more list allocations. So now we store the placeholders so we can query for them directly later. And the existing tests should all pass, if you can get them to run. This approach works on both 5.15 and 6.2, so no version checks necessary.
2021-12-08Fix keyhint widget sequence match enum comparisonJimmy
Change it from a truthy check to a != Nomatch check. Also to to improve formatting but the line is probably still too long.
2021-12-04elf: find webengine lib with wildcardJimmy
2021-11-26Fix IPCFlorian Bruhin
2021-08-26QUrl hacksFlorian Bruhin
2021-08-26More random API changesFlorian Bruhin
2021-08-26Automatically rewrite enumsFlorian Bruhin
See #5904
2021-08-26Comment out legacy stuffFlorian Bruhin
2021-08-26Blanket PyQt5 -> PyQt6Florian Bruhin
2021-07-03Cosmetic changeslufte
2021-07-02The database of a table shouldn't be privatelufte
2021-06-30No better type than Any for theselufte
2021-06-30Ensure in memory db closes after retuning versionlufte
2021-06-30The old code is now safe to removelufte
2021-06-30Isort and issing type annotationslufte
2021-06-30Make version() a plain functionlufte
2021-06-29No camel-case method nameslufte
2021-06-29Annotate return types of __init__ methodslufte
2021-06-29No type parameters for generics yetJavier Ayres
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2021-06-28Adjustments in typinglufte
2021-06-28Missing periods at the end of the docstringslufte
2021-06-28Add (almost) all missing types and docstringslufte
2021-06-27Replace missing .formats with f-stringslufte
2021-06-27Avoid running migrations partiallylufte
2021-06-27Upgrade user_version after migrations have runlufte
2021-06-27These are also no longer neededlufte
2021-06-26Remove old commentlufte
2021-06-26Fix linter errorslufte
2021-06-26Update usages of sql module to use the new class.lufte
2021-06-26Don't store database reference and use path as connection namelufte
2021-06-24Update module's stringdocJavier Ayres
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2021-06-22Missing selflufte
2021-06-22Initial work for Database classlufte
2021-05-30Handle un-encodable initial text for editorFlorian Bruhin
2021-05-30Make quitter.is_shutting_down publicFlorian Bruhin
Needed for a bugfix in the next commit.
2021-05-19mypy: Set disallow_any_genericsFlorian Bruhin
See #6100
2021-05-13Remove service workers based on QtWebEngine versionFlorian Bruhin
See https://bugreports.qt.io/browse/QTBUG-93744
2021-04-06Remove reduntant operationsDimitri Karamazov
2021-04-06Improve error handling, remove list callDimitri Karamazov
2021-04-06Add debug lines for lib_fileDimitri Karamazov
2021-04-06Pull the highest version of libQtWebEngineCore.soDimitri Karamazov
2021-04-05Fix QtWebEngine version detection on OpenBSDFlorian Bruhin
2021-04-01Work around QNAM logging hangsFlorian Bruhin
See #6325
2021-03-30Correctly add QtDBus dependencyFlorian Bruhin
2021-03-29ipc: Hide socket warning when re-getting socketFlorian Bruhin
2021-03-29ipc: Fix socket handlingFlorian Bruhin
Speculatively fixes #5344
2021-03-29Revert "ipc: Remove _old_socket handling"Florian Bruhin
This reverts commit c6cf3067e158265096410afee98407826b19c472. Seems to cause segfaults: #0 0x00007ffff5cecbcc in void doActivate<false>(QObject*, int, void**) () from /home/florian/proj/qutebrowser/git/.tox/py39-pyqt515/lib/python3.9/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5 #1 0x00007ffff5be4e31 in QIODevice::channelReadyRead(int) () from /home/florian/proj/qutebrowser/git/.tox/py39-pyqt515/lib/python3.9/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5 #2 0x00007fffeffccb54 in QAbstractSocketPrivate::canReadNotification() () from /home/florian/proj/qutebrowser/git/.tox/py39-pyqt515/lib/python3.9/site-packages/PyQt5/Qt5/lib/libQt5Network.so.5 #3 0x00007fffeffdf061 in QReadNotifier::event(QEvent*) () from /home/florian/proj/qutebrowser/git/.tox/py39-pyqt515/lib/python3.9/site-packages/PyQt5/Qt5/lib/libQt5Network.so.5 #4 0x00007ffff269e43c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/florian/proj/qutebrowser/git/.tox/py39-pyqt515/lib/python3.9/site-packages/PyQt5/Qt5/lib/libQt5Widgets.so.5 #5 0x00007ffff26a4f20 in QApplication::notify(QObject*, QEvent*) () from /home/florian/proj/qutebrowser/git/.tox/py39-pyqt515/lib/python3.9/site-packages/PyQt5/Qt5/lib/libQt5Widgets.so.5 #6 0x00007ffff318d0d6 in sipQApplication::notify(QObject*, QEvent*) () from /home/florian/proj/qutebrowser/git/.tox/py39-pyqt515/lib/python3.9/site-packages/PyQt5/QtWidgets.abi3.so #7 0x00007ffff5cb4808 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /home/florian/proj/qutebrowser/git/.tox/py39-pyqt515/lib/python3.9/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5 #8 0x00007ffff5d10d98 in socketNotifierSourceDispatch(_GSource*, int (*)(void*), void*) () from /home/florian/proj/qutebrowser/git/.tox/py39-pyqt515/lib/python3.9/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5 #9 0x00007ffff691df9c in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #10 0x00007ffff6971a49 in ?? () from /usr/lib/libglib-2.0.so.0 #11 0x00007ffff691b6f1 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #12 0x00007ffff5d101cc in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/florian/proj/qutebrowser/git/.tox/py39-pyqt515/lib/python3.9/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5 #13 0x00007ffff5cb321a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /home/florian/proj/qutebrowser/git/.tox/py39-pyqt515/lib/python3.9/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5 #14 0x00007ffff5cbc1d3 in QCoreApplication::exec() () from /home/florian/proj/qutebrowser/git/.tox/py39-pyqt515/lib/python3.9/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5
2021-03-29ipc: Remove _old_socket handlingFlorian Bruhin
Seems to cause more trouble than it solves nowadays.
2021-03-23Merge remote-tracking branch 'origin/pr/4545'Florian Bruhin