various cleanups

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2019-06-24 23:52:18 +00:00
parent c67c0c6a09
commit 5ce9a965be
3 changed files with 37 additions and 28 deletions

View file

@ -345,9 +345,9 @@ public:
QRect clipRect;
QRegion clipRegion;
uint enabled : 1;
uint hasRectClip : 1;
uint hasRegionClip : 1;
bool enabled;
bool hasRectClip;
bool hasRegionClip;
void appendSpan(const int x, const int length, const int y, const int coverage);
void appendSpans(const QSpan *s, const int num);

View file

@ -626,7 +626,10 @@ void QToolBar::setOrientation(Qt::Orientation orientation)
}
Qt::Orientation QToolBar::orientation() const
{ Q_D(const QToolBar); return d->orientation; }
{
Q_D(const QToolBar);
return d->orientation;
}
/*!
\property QToolBar::iconSize
@ -639,7 +642,10 @@ Qt::Orientation QToolBar::orientation() const
*/
QSize QToolBar::iconSize() const
{ Q_D(const QToolBar); return d->iconSize; }
{
Q_D(const QToolBar);
return d->iconSize;
}
void QToolBar::setIconSize(const QSize &iconSize)
{
@ -684,7 +690,10 @@ void QToolBar::setIconSize(const QSize &iconSize)
*/
Qt::ToolButtonStyle QToolBar::toolButtonStyle() const
{ Q_D(const QToolBar); return d->toolButtonStyle; }
{
Q_D(const QToolBar);
return d->toolButtonStyle;
}
void QToolBar::setToolButtonStyle(Qt::ToolButtonStyle toolButtonStyle)
{
@ -959,7 +968,7 @@ void QToolBar::paintEvent(QPaintEvent *)
initStyleOption(&opt);
if (d->layout->expanded || d->layout->animating || isWindow()) {
//if the toolbar is expended, we need to fill the background with the window color
//if the toolbar is expanded, we need to fill the background with the window color
//because some styles may expects that.
p.fillRect(opt.rect, palette().background());
style->drawControl(QStyle::CE_ToolBar, &opt, &p, this);