Revert "Add workaround for PyQt 5.11 headerDataChanged bug"

PyQt 5.11.1 has already been released, with the bug fixed.

This reverts commit 291763a55643342a6f977ce2a12dcc6f4badbe8a.
This commit is contained in:
Florian Bruhin 2018-06-24 08:49:51 +02:00
parent eca08f064b
commit ad19833e34
5 changed files with 4 additions and 28 deletions

View File

@ -21,8 +21,7 @@ v1.4.0 (unreleased)
Added Added
~~~~~ ~~~~~
- Support for the bundled `sip` module in PyQt 5.11 and workarounds for - Support for the bundled `sip` module in PyQt 5.11.
PyQt 5.11 bugs.
- New `--debug-flag log-requests` to log requests to the debug log for - New `--debug-flag log-requests` to log requests to the debug log for
debugging. debugging.
- New `--first` flag for `:hint` (bound to `gi` for inputs) which automatically - New `--first` flag for `:hint` (bound to `gi` for inputs) which automatically

View File

@ -30,7 +30,7 @@ import tempfile
import enum import enum
from PyQt5.QtCore import (pyqtSlot, pyqtSignal, Qt, QObject, QModelIndex, from PyQt5.QtCore import (pyqtSlot, pyqtSignal, Qt, QObject, QModelIndex,
QTimer, QAbstractListModel, QUrl, PYQT_VERSION) QTimer, QAbstractListModel, QUrl)
from qutebrowser.commands import cmdexc, cmdutils from qutebrowser.commands import cmdexc, cmdutils
from qutebrowser.config import config from qutebrowser.config import config
@ -878,11 +878,6 @@ class DownloadModel(QAbstractListModel):
"""A list model showing downloads.""" """A list model showing downloads."""
if PYQT_VERSION == 0x050b00:
# WORKAROUND for PyQt 5.11 bug:
# https://www.riverbankcomputing.com/pipermail/pyqt/2018-June/040445.html
headerDataChanged = pyqtSignal(Qt.Orientation, int, int)
def __init__(self, qtnetwork_manager, webengine_manager=None, parent=None): def __init__(self, qtnetwork_manager, webengine_manager=None, parent=None):
super().__init__(parent) super().__init__(parent)
self._qtnetwork_manager = qtnetwork_manager self._qtnetwork_manager = qtnetwork_manager

View File

@ -19,8 +19,7 @@
"""A model that proxies access to one or more completion categories.""" """A model that proxies access to one or more completion categories."""
from PyQt5.QtCore import (Qt, QModelIndex, QAbstractItemModel, pyqtSignal, from PyQt5.QtCore import Qt, QModelIndex, QAbstractItemModel
PYQT_VERSION)
from qutebrowser.utils import log, qtutils from qutebrowser.utils import log, qtutils
from qutebrowser.commands import cmdexc from qutebrowser.commands import cmdexc
@ -39,11 +38,6 @@ class CompletionModel(QAbstractItemModel):
_categories: The sub-categories. _categories: The sub-categories.
""" """
if PYQT_VERSION == 0x050b00:
# WORKAROUND for PyQt 5.11 bug:
# https://www.riverbankcomputing.com/pipermail/pyqt/2018-June/040445.html
headerDataChanged = pyqtSignal(Qt.Orientation, int, int)
def __init__(self, *, column_widths=(30, 70, 0), parent=None): def __init__(self, *, column_widths=(30, 70, 0), parent=None):
super().__init__(parent) super().__init__(parent)
self.column_widths = column_widths self.column_widths = column_widths

View File

@ -19,7 +19,6 @@
"""A completion category that queries the SQL History store.""" """A completion category that queries the SQL History store."""
from PyQt5.QtCore import pyqtSignal, Qt, PYQT_VERSION
from PyQt5.QtSql import QSqlQueryModel from PyQt5.QtSql import QSqlQueryModel
from qutebrowser.misc import sql from qutebrowser.misc import sql
@ -31,11 +30,6 @@ class HistoryCategory(QSqlQueryModel):
"""A completion category that queries the SQL History store.""" """A completion category that queries the SQL History store."""
if PYQT_VERSION == 0x050b00:
# WORKAROUND for PyQt 5.11 bug:
# https://www.riverbankcomputing.com/pipermail/pyqt/2018-June/040445.html
headerDataChanged = pyqtSignal(Qt.Orientation, int, int)
def __init__(self, *, delete_func=None, parent=None): def __init__(self, *, delete_func=None, parent=None):
"""Create a new History completion category.""" """Create a new History completion category."""
super().__init__(parent=parent) super().__init__(parent=parent)

View File

@ -21,8 +21,7 @@
import re import re
from PyQt5.QtCore import (Qt, QSortFilterProxyModel, QRegExp, PYQT_VERSION, from PyQt5.QtCore import Qt, QSortFilterProxyModel, QRegExp
pyqtSignal)
from PyQt5.QtGui import QStandardItem, QStandardItemModel from PyQt5.QtGui import QStandardItem, QStandardItemModel
from qutebrowser.utils import qtutils from qutebrowser.utils import qtutils
@ -32,11 +31,6 @@ class ListCategory(QSortFilterProxyModel):
"""Expose a list of items as a category for the CompletionModel.""" """Expose a list of items as a category for the CompletionModel."""
if PYQT_VERSION == 0x050b00:
# WORKAROUND for PyQt 5.11 bug:
# https://www.riverbankcomputing.com/pipermail/pyqt/2018-June/040445.html
headerDataChanged = pyqtSignal(Qt.Orientation, int, int)
def __init__(self, name, items, sort=True, delete_func=None, parent=None): def __init__(self, name, items, sort=True, delete_func=None, parent=None):
super().__init__(parent) super().__init__(parent)
self.name = name self.name = name