summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-11-18 09:01:51 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2015-11-18 09:01:51 +0100
commitc7934f2489e2eb9a539206bab35f335b1943c5bd (patch)
treea27d0ed6c001fe9432e2a0f28fb935acf9e4c65f /src/widgets/kernel/qwidget.cpp
parentf40593b11199fbef886bfcb6b210a214d8c3adf3 (diff)
parent08f9a1bd6ab9b1777ee5ba163d75e5c848c39eb4 (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/network/kernel/qnetworkinterface_winrt.cpp tools/configure/configureapp.cpp Change-Id: I47df00a01597d2e63b334b492b3b4221b29f58ea
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r--src/widgets/kernel/qwidget.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index efa032453f..14eb368973 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -4711,9 +4711,11 @@ QFont QWidgetPrivate::naturalWidgetFont(uint inheritedMask) const
if (QWidget *p = q->parentWidget()) {
if (!p->testAttribute(Qt::WA_StyleSheet) || useStyleSheetPropagationInWidgetStyles) {
if (!naturalFont.isCopyOf(QApplication::font())) {
- QFont inheritedFont = p->font();
- inheritedFont.resolve(inheritedMask);
- naturalFont = inheritedFont.resolve(naturalFont);
+ if (inheritedMask != 0) {
+ QFont inheritedFont = p->font();
+ inheritedFont.resolve(inheritedMask);
+ naturalFont = inheritedFont.resolve(naturalFont);
+ } // else nothing to do (naturalFont = naturalFont)
} else {
naturalFont = p->font();
}
@@ -4721,9 +4723,11 @@ QFont QWidgetPrivate::naturalWidgetFont(uint inheritedMask) const
}
#ifndef QT_NO_GRAPHICSVIEW
else if (extra && extra->proxyWidget) {
- QFont inheritedFont = extra->proxyWidget->font();
- inheritedFont.resolve(inheritedMask);
- naturalFont = inheritedFont.resolve(naturalFont);
+ if (inheritedMask != 0) {
+ QFont inheritedFont = extra->proxyWidget->font();
+ inheritedFont.resolve(inheritedMask);
+ naturalFont = inheritedFont.resolve(naturalFont);
+ } // else nothing to do (naturalFont = naturalFont)
}
#endif //QT_NO_GRAPHICSVIEW
}