summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qfusionstyle_p_p.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2015-01-12 14:57:08 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-02-02 22:05:31 +0000
commit9cd5c614559159fe09b414d568f88a192405b84d (patch)
tree6e577b7b00862e94a29f6b974d80ef73ca3c23fd /src/widgets/styles/qfusionstyle_p_p.h
parentcc7d84e09ed824af96aa5e59ba8f3a6522e7d7e6 (diff)
Avoid unneeded QBrush::texture() calls
If a QBrush has been created without QPixmap the texture() method will create one. This patch avoids that in several places by checking the type of the texture brush before accessing it, or not accessing it at all. Task-number: QTBUG-43766 Change-Id: If6009fe1d5bd51b239ae2c838e5c3b904b56b11a Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/widgets/styles/qfusionstyle_p_p.h')
-rw-r--r--src/widgets/styles/qfusionstyle_p_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/styles/qfusionstyle_p_p.h b/src/widgets/styles/qfusionstyle_p_p.h
index f0f00c4311..21d9d439a4 100644
--- a/src/widgets/styles/qfusionstyle_p_p.h
+++ b/src/widgets/styles/qfusionstyle_p_p.h
@@ -104,7 +104,7 @@ public:
}
QColor outline(const QPalette &pal) const {
- if (!pal.window().texture().isNull())
+ if (pal.window().style() == Qt::TexturePattern)
return QColor(0, 0, 0, 160);
return pal.background().color().darker(140);
}
@@ -117,7 +117,7 @@ public:
}
QColor tabFrameColor(const QPalette &pal) const {
- if (!pal.button().texture().isNull())
+ if (pal.window().style() == Qt::TexturePattern)
return QColor(255, 255, 255, 8);
return buttonColor(pal).lighter(104);
}