diff options
author | Florian Bruhin <me@the-compiler.org> | 2022-04-13 20:47:32 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2022-08-23 18:31:40 +0200 |
commit | 76f9262defc0217289443467927cab7c211aff73 (patch) | |
tree | d502b76175b1ca19091c302620d20d25f779207e /qutebrowser/completion | |
parent | cedca4737003e9f3f153b6df5b51f43dc80f73cc (diff) | |
download | qutebrowser-76f9262defc0217289443467927cab7c211aff73.tar.gz qutebrowser-76f9262defc0217289443467927cab7c211aff73.zip |
Fix missed enum scope changes
For some reason, QtMsgType was not included and missing.
(cherry picked from commit 6afa00c465327a118dbcff46fa85b6df53037263)
For completiondelegate.py, we accessed the enum members via self instead of
properly using the class.
(cherry picked from commit d37cc4ac73545c6a2615456a3487536c2ec00803)
For interceptor.py, line breaks broke our script.
QKeyEvent.KeyPress was used inherited from QEvent.KeyPress, thus not
renamed.
Diffstat (limited to 'qutebrowser/completion')
-rw-r--r-- | qutebrowser/completion/completiondelegate.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qutebrowser/completion/completiondelegate.py b/qutebrowser/completion/completiondelegate.py index e561ecf39..bc7f2f9c2 100644 --- a/qutebrowser/completion/completiondelegate.py +++ b/qutebrowser/completion/completiondelegate.py @@ -95,7 +95,7 @@ class CompletionItemDelegate(QStyledItemDelegate): """Draw the background of an ItemViewItem.""" assert self._opt is not None assert self._style is not None - self._style.drawPrimitive(self._style.PE_PanelItemViewItem, self._opt, + self._style.drawPrimitive(QStyle.PrimitiveElement.PE_PanelItemViewItem, self._opt, self._painter, self._opt.widget) def _draw_icon(self): @@ -104,7 +104,7 @@ class CompletionItemDelegate(QStyledItemDelegate): assert self._style is not None icon_rect = self._style.subElementRect( - self._style.SE_ItemViewItemDecoration, self._opt, self._opt.widget) + QStyle.SubElement.SE_ItemViewItemDecoration, self._opt, self._opt.widget) if not icon_rect.isValid(): # The rect seems to be wrong in all kind of ways if no icon should # be displayed. @@ -135,7 +135,7 @@ class CompletionItemDelegate(QStyledItemDelegate): return text_rect_ = self._style.subElementRect( - self._style.SE_ItemViewItemText, self._opt, self._opt.widget) + QStyle.SubElement.SE_ItemViewItemText, self._opt, self._opt.widget) qtutils.ensure_valid(text_rect_) margin = self._style.pixelMetric(QStyle.PixelMetric.PM_FocusFrameHMargin, self._opt, self._opt.widget) + 1 @@ -259,7 +259,7 @@ class CompletionItemDelegate(QStyledItemDelegate): return o = self._opt o.rect = self._style.subElementRect( - self._style.SE_ItemViewItemFocusRect, self._opt, self._opt.widget) + QStyle.SubElement.SE_ItemViewItemFocusRect, self._opt, self._opt.widget) o.state |= int(QStyle.StateFlag.State_KeyboardFocusChange | QStyle.StateFlag.State_Item) qtutils.ensure_valid(o.rect) if state & QStyle.StateFlag.State_Enabled: |