diff options
Diffstat (limited to 'src/widgets/styles/qstylesheetstyle.cpp')
-rw-r--r-- | src/widgets/styles/qstylesheetstyle.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index c2ffcc82b1..5c9d19a49d 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -44,6 +44,7 @@ #include "private/qcssutil_p.h" #include <qdebug.h> +#include <qdir.h> #include <qapplication.h> #if QT_CONFIG(menu) #include <qmenu.h> @@ -952,8 +953,12 @@ QRenderRule::QRenderRule(const QVector<Declaration> &declarations, const QObject Attachment attachment = Attachment_Scroll; origin = Origin_Padding; Origin clip = Origin_Border; - if (v.extractBackground(&brush, &uri, &repeat, &alignment, &origin, &attachment, &clip)) - bg = new QStyleSheetBackgroundData(brush, QPixmap(uri), repeat, alignment, origin, attachment, clip); + if (v.extractBackground(&brush, &uri, &repeat, &alignment, &origin, &attachment, &clip)) { + QPixmap pixmap(uri); + if (!uri.isEmpty() && pixmap.isNull()) + qWarning("Could not create pixmap from %s", qPrintable(QDir::toNativeSeparators(uri))); + bg = new QStyleSheetBackgroundData(brush, pixmap, repeat, alignment, origin, attachment, clip); + } QBrush sfg, fg; QBrush sbg, abg; @@ -5818,7 +5823,7 @@ QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, c return ParentStyle::subElementRect(se, opt, w); #if QT_CONFIG(itemviews) - case SE_ViewItemCheckIndicator: + case SE_ItemViewItemCheckIndicator: if (!qstyleoption_cast<const QStyleOptionViewItem *>(opt)) { return subElementRect(SE_CheckBoxIndicator, opt, w); } |