summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-04-11 12:20:40 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-04-11 12:20:41 +0200
commitf2095f2c66d0dae8525879f6c14165ace650e7f1 (patch)
tree041a058747623112a9a7365403dd008b72b80b6f /src
parentb50b654ba4c1c2a59ae80420ed77e09d1080707b (diff)
parentf4c2fcc052e5c27e8765e68216f02e1e1915e5bc (diff)
Merge remote-tracking branch 'origin/5.9.5' into 5.9
Diffstat (limited to 'src')
-rw-r--r--src/widgets/kernel/qwidget.cpp4
-rw-r--r--src/widgets/styles/qfusionstyle.cpp8
-rw-r--r--src/widgets/widgets/qlabel.cpp2
3 files changed, 8 insertions, 6 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 1fea3836ec..0298359389 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -5520,11 +5520,11 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
setSystemClip(pdev, rgn.translated(offset));
QPainter p(pdev);
p.translate(offset);
- context.painter = context.sharedPainter = &p;
+ context.painter = &p;
graphicsEffect->draw(&p);
setSystemClip(pdev, QRegion());
} else {
- context.painter = context.sharedPainter = sharedPainter;
+ context.painter = sharedPainter;
if (sharedPainter->worldTransform() != sourced->lastEffectTransform) {
sourced->invalidateCache();
sourced->lastEffectTransform = sharedPainter->worldTransform();
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index 82228af4c6..4ccca93e01 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -801,8 +801,8 @@ void QFusionStyle::drawPrimitive(PrimitiveElement elem,
} else if (checkbox->state & State_On) {
qreal penWidth = QStyleHelper::dpiScaled(1.5);
- penWidth = qMax(penWidth , 0.13 * rect.height());
- penWidth = qMin(penWidth , 0.20 * rect.height());
+ penWidth = qMax<qreal>(penWidth, 0.13 * rect.height());
+ penWidth = qMin<qreal>(penWidth, 0.20 * rect.height());
QPen checkPen = QPen(checkMarkColor, penWidth);
checkMarkColor.setAlpha(210);
painter->translate(dpiScaled(-0.8), dpiScaled(0.5));
@@ -1584,8 +1584,8 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio
bool ignoreCheckMark = false;
const int checkColHOffset = windowsItemHMargin + windowsItemFrame - 1;
- int checkcol = qMax(menuItem->rect.height() * 0.79,
- qMax(menuItem->maxIconWidth * 1.0, dpiScaled(21))); // icon checkbox's highlihgt column width
+ int checkcol = qMax<int>(menuItem->rect.height() * 0.79,
+ qMax<int>(menuItem->maxIconWidth, dpiScaled(21))); // icon checkbox's highlight column width
if (
#if QT_CONFIG(combobox)
qobject_cast<const QComboBox*>(widget) ||
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp
index e3225800cc..46afac700a 100644
--- a/src/widgets/widgets/qlabel.cpp
+++ b/src/widgets/widgets/qlabel.cpp
@@ -964,6 +964,8 @@ bool QLabel::event(QEvent *e)
QShortcutEvent *se = static_cast<QShortcutEvent *>(e);
if (se->shortcutId() == d->shortcutId) {
QWidget * w = d->buddy;
+ if (!w)
+ return QFrame::event(e);
if (w->focusPolicy() != Qt::NoFocus)
w->setFocus(Qt::ShortcutFocusReason);
#if QT_CONFIG(abstractbutton)