summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/styles/modernwindows/qwindows11style.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/styles/modernwindows/qwindows11style.cpp b/src/plugins/styles/modernwindows/qwindows11style.cpp
index 7179109505b..3f40dea5eb9 100644
--- a/src/plugins/styles/modernwindows/qwindows11style.cpp
+++ b/src/plugins/styles/modernwindows/qwindows11style.cpp
@@ -1662,7 +1662,7 @@ void QWindows11Style::drawControl(ControlElement element, const QStyleOption *op
}
case CE_ItemViewItem: {
if (const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(option)) {
- if (const QAbstractItemView *view = qobject_cast<const QAbstractItemView *>(widget)) {
+ if (qobject_cast<const QAbstractItemView *>(widget)) {
QRect checkRect = proxy()->subElementRect(SE_ItemViewItemCheckIndicator, vopt, widget);
QRect iconRect = proxy()->subElementRect(SE_ItemViewItemDecoration, vopt, widget);
QRect textRect = proxy()->subElementRect(SE_ItemViewItemText, vopt, widget);
@@ -1764,10 +1764,10 @@ void QWindows11Style::drawControl(ControlElement element, const QStyleOption *op
QIcon::State state = vopt->state & QStyle::State_Open ? QIcon::On : QIcon::Off;
vopt->icon.paint(painter, iconRect, vopt->decorationAlignment, mode, state);
- if (!view || !view->isPersistentEditorOpen(vopt->index)) {
- painter->setPen(highlightCurrent && highContrastTheme ? vopt->palette.base().color() : option->palette.text().color());
- d->viewItemDrawText(painter, vopt, textRect);
- }
+ painter->setPen(highlightCurrent && highContrastTheme ? vopt->palette.base().color()
+ : vopt->palette.text().color());
+ d->viewItemDrawText(painter, vopt, textRect);
+
// paint a vertical marker for QListView
if (vopt->state & State_Selected) {
if (const QListView *lv = qobject_cast<const QListView *>(widget);