Fix several unused warnings for misc disabled features
Change-Id: Id42daf684abeeb888155d65eca143150d9c5f5a7 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>bb10
parent
0db0441bb7
commit
8146fd5f8c
|
|
@ -416,6 +416,8 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
|
|||
proxy()->drawItemPixmap(p, opt->rect, Qt::AlignCenter, pixmap);
|
||||
break;
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(d);
|
||||
#endif // QT_NO_TABBAR
|
||||
case PE_FrameTabWidget:
|
||||
case PE_FrameWindow:
|
||||
|
|
@ -2315,6 +2317,9 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
#if !QT_CONFIG(tabbar) && !QT_CONFIG(itemviews)
|
||||
Q_UNUSED(d);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
@ -3058,6 +3063,9 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
|
|||
break;
|
||||
}
|
||||
return r;
|
||||
#if !QT_CONFIG(tabwidget) && !QT_CONFIG(itemviews)
|
||||
Q_UNUSED(d);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DIAL
|
||||
|
|
@ -4357,6 +4365,9 @@ QRect QCommonStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex
|
|||
default:
|
||||
qWarning("QCommonStyle::subControlRect: Case %d not handled", cc);
|
||||
}
|
||||
#if !QT_CONFIG(slider) && !QT_CONFIG(spinbox) && !QT_CONFIG(toolbutton) && !QT_CONFIG(groupbox)
|
||||
Q_UNUSED(widget);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -5275,6 +5286,7 @@ static inline QString clearText16IconPath()
|
|||
}
|
||||
#endif // !QT_NO_IMAGEFORMAT_PNG
|
||||
|
||||
#if defined(Q_OS_WIN) || QT_CONFIG(imageformat_png)
|
||||
static QIcon clearTextIcon(bool rtl)
|
||||
{
|
||||
const QString directionalThemeName = rtl
|
||||
|
|
@ -5298,6 +5310,7 @@ static QIcon clearTextIcon(bool rtl)
|
|||
#endif // !QT_NO_IMAGEFORMAT_PNG
|
||||
return icon;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*! \reimp */
|
||||
QPixmap QCommonStyle::standardPixmap(StandardPixmap sp, const QStyleOption *option,
|
||||
|
|
@ -5642,6 +5655,9 @@ QPixmap QCommonStyle::standardPixmap(StandardPixmap sp, const QStyleOption *opti
|
|||
}
|
||||
#endif //QT_NO_IMAGEFORMAT_XPM
|
||||
|
||||
#if !QT_CONFIG(imageformat_png) && !QT_CONFIG(imageformat_xpm) && !QT_CONFIG(imageformat_png)
|
||||
Q_UNUSED(rtl);
|
||||
#endif
|
||||
|
||||
return QPixmap();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1954,9 +1954,13 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption
|
|||
|
||||
Q_D (const QFusionStyle);
|
||||
|
||||
#if QT_CONFIG(spinbox) || QT_CONFIG(slider)
|
||||
QColor buttonColor = d->buttonColor(option->palette);
|
||||
#endif
|
||||
#if QT_CONFIG(slider)
|
||||
QColor gradientStartColor = buttonColor.lighter(118);
|
||||
QColor gradientStopColor = buttonColor;
|
||||
#endif
|
||||
QColor outline = d->outline(option->palette);
|
||||
|
||||
QColor alphaCornerColor;
|
||||
|
|
|
|||
|
|
@ -204,6 +204,9 @@ void QPixmapStyle::polish(QWidget *widget)
|
|||
#if QT_CONFIG(scrollbar)
|
||||
if (qobject_cast<QScrollBar*>(widget))
|
||||
widget->setAttribute(Qt::WA_OpaquePaintEvent, false);
|
||||
#endif
|
||||
#if !QT_CONFIG(progressbar) && !QT_CONFIG(combobox)
|
||||
Q_UNUSED(d);
|
||||
#endif
|
||||
QCommonStyle::polish(widget);
|
||||
}
|
||||
|
|
@ -929,6 +932,10 @@ void QPixmapStyle::drawSlider(const QStyleOptionComplex *option,
|
|||
painter->drawPixmap(handle, d->pixmaps.value(pix).pixmap);
|
||||
}
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(option);
|
||||
Q_UNUSED(painter);
|
||||
Q_UNUSED(widget);
|
||||
#endif // QT_CONFIG(slider)
|
||||
}
|
||||
|
||||
|
|
@ -968,6 +975,10 @@ void QPixmapStyle::drawScrollBar(const QStyleOptionComplex *option,
|
|||
? SB_Horizontal : SB_Vertical;
|
||||
drawCachedPixmap(control, rect, painter);
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(option);
|
||||
Q_UNUSED(painter);
|
||||
Q_UNUSED(widget);
|
||||
#endif // QT_CONFIG(slider)
|
||||
}
|
||||
|
||||
|
|
@ -1044,6 +1055,9 @@ QSize QPixmapStyle::sliderSizeFromContents(const QStyleOption *option,
|
|||
else
|
||||
return QSize(desc.size.width(), result.height());
|
||||
#else // QT_CONFIG(slider)
|
||||
Q_UNUSED(option);
|
||||
Q_UNUSED(contentsSize);
|
||||
Q_UNUSED(widget);
|
||||
return QSize();
|
||||
#endif // QT_CONFIG(slider)
|
||||
}
|
||||
|
|
@ -1160,6 +1174,9 @@ QRect QPixmapStyle::scrollBarSubControlRect(const QStyleOptionComplex *option,
|
|||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(option);
|
||||
Q_UNUSED(sc);
|
||||
#endif // QT_CONFIG(slider)
|
||||
return QRect();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -415,6 +415,8 @@ QColor backgroundColor(const QPalette &pal, const QWidget* widget)
|
|||
if (qobject_cast<const QScrollBar *>(widget) && widget->parent() &&
|
||||
qobject_cast<const QAbstractScrollArea *>(widget->parent()->parent()))
|
||||
return widget->parentWidget()->parentWidget()->palette().color(QPalette::Base);
|
||||
#else
|
||||
Q_UNUSED(widget);
|
||||
#endif
|
||||
return pal.color(QPalette::Base);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1734,6 +1734,8 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
|
|||
step = (animation->animationStep() / 3) % chunkCount;
|
||||
else
|
||||
d->startAnimation(new QProgressStyleAnimation(d->animationFps, opt->styleObject));
|
||||
#else
|
||||
Q_UNUSED(d);
|
||||
#endif
|
||||
int chunksInRow = 5;
|
||||
int myY = pbBits.rect.y();
|
||||
|
|
|
|||
Loading…
Reference in New Issue