From 42fd9d5b21e41bdc1fc0ffb788fe96018c311d64 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Mon, 30 Mar 2009 16:50:29 +0200 Subject: Fix incorrect painting of checked itemview items We should check the item features instead of looking for a valid rect as a subclass trying to override the default checkrect size might not perform this check. Task-number: 232633 Reviewed-by: nrc --- src/gui/styles/qcommonstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index 86a3ce0..d5ce8df 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -2268,7 +2268,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, drawPrimitive(PE_PanelItemViewItem, opt, p, widget); // draw the check mark - if (checkRect.isValid()) { + if (vopt->features & QStyleOptionViewItemV2::HasCheckIndicator) { QStyleOptionViewItemV4 option(*vopt); option.rect = checkRect; option.state = option.state & ~QStyle::State_HasFocus; -- cgit v0.12