summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qcommonstyle.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-04-07 10:47:20 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2016-04-07 10:47:20 +0200
commitee0951d69b38f766e67262487be95b88501aa4a5 (patch)
tree116c334060500be340d4d61c99026316b0df3ce9 /src/widgets/styles/qcommonstyle.cpp
parent0bb645b1ccc5a9d57b21cf0b2c4306b8e48c611c (diff)
parentd37239aa419ee4adff4b0a8d5c1403cadff72319 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: src/network/access/qftp.cpp src/widgets/itemviews/qheaderview.cpp src/widgets/itemviews/qlistview.cpp tests/auto/network/access/qftp/tst_qftp.cpp Change-Id: I9f928f25d45d8944dd60bb583f649fc1615bc5d9
Diffstat (limited to 'src/widgets/styles/qcommonstyle.cpp')
-rw-r--r--src/widgets/styles/qcommonstyle.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index 63024360ae..437becbf70 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -803,10 +803,8 @@ static void drawArrow(const QStyle *style, const QStyleOptionToolButton *toolbut
default:
return;
}
- QStyleOption arrowOpt;
+ QStyleOption arrowOpt = *toolbutton;
arrowOpt.rect = rect;
- arrowOpt.palette = toolbutton->palette;
- arrowOpt.state = toolbutton->state;
style->drawPrimitive(pe, &arrowOpt, painter, widget);
}
#endif // QT_NO_TOOLBUTTON
@@ -3345,8 +3343,7 @@ void QCommonStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCompl
mflags |= State_Sunken;
}
- QStyleOption tool(0);
- tool.palette = toolbutton->palette;
+ QStyleOption tool = *toolbutton;
if (toolbutton->subControls & SC_ToolButton) {
if (bflags & (State_Sunken | State_On | State_Raised)) {
tool.rect = button;
@@ -3415,8 +3412,7 @@ void QCommonStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCompl
bool down = false;
QPixmap pm;
- QStyleOption tool(0);
- tool.palette = tb->palette;
+ QStyleOption tool = *tb;
if (tb->subControls & SC_TitleBarCloseButton && tb->titleBarFlags & Qt::WindowSystemMenuHint) {
ir = proxy()->subControlRect(CC_TitleBar, tb, SC_TitleBarCloseButton, widget);
down = tb->activeSubControls & SC_TitleBarCloseButton && (opt->state & State_Sunken);