diff options
author | Florian Bruhin <git@the-compiler.org> | 2018-06-23 15:57:30 +0200 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2018-07-02 22:32:59 +0200 |
commit | c3455d9082bf7c32ed3932c9d4ad5edef1c51f0f (patch) | |
tree | 4fff1296f6b52bc16619e404a823e9aae30d1eaf /qutebrowser/qt.py | |
parent | f7ae7e7d40849ea033050e43d4d8515587c3abf2 (diff) | |
download | qutebrowser-c3455d9082bf7c32ed3932c9d4ad5edef1c51f0f.tar.gz qutebrowser-c3455d9082bf7c32ed3932c9d4ad5edef1c51f0f.zip |
Add a wrapper around sip
Starting with PyQt 5.11, the sip module now is bundled with PyQt as PyQt.sip.
Having a qutebrowser.qt also helps with #3625, see #995
Diffstat (limited to 'qutebrowser/qt.py')
-rw-r--r-- | qutebrowser/qt.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/qutebrowser/qt.py b/qutebrowser/qt.py new file mode 100644 index 000000000..2878bbe98 --- /dev/null +++ b/qutebrowser/qt.py @@ -0,0 +1,28 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: + +# Copyright 2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> +# +# This file is part of qutebrowser. +# +# qutebrowser is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# qutebrowser is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>. + +"""Wrappers around Qt/PyQt code.""" + +# pylint: disable=unused-import +# PyQt 5.11 comes with a bundled sip, +# for older PyQt versions it's a separate module. +try: + from PyQt5 import sip +except ImportError: + import sip |