Convert features.progressbar to QT_[REQUIRE_]CONFIG
Change-Id: I66d00d5bac98ff337ba5877e5f23be5e14a97551 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
fab3261730
commit
0987bda99e
@ -130,7 +130,7 @@ QAccessibleInterface *qAccessibleFactory(const QString &classname, QObject *obje
|
||||
#endif
|
||||
} else if (classname == QLatin1String("QStatusBar")) {
|
||||
iface = new QAccessibleDisplay(widget);
|
||||
#ifndef QT_NO_PROGRESSBAR
|
||||
#if QT_CONFIG(progressbar)
|
||||
} else if (classname == QLatin1String("QProgressBar")) {
|
||||
iface = new QAccessibleProgressBar(widget);
|
||||
#endif
|
||||
|
@ -48,7 +48,9 @@
|
||||
#if QT_CONFIG(pushbutton)
|
||||
#include <qpushbutton.h>
|
||||
#endif
|
||||
#if QT_CONFIG(progressbar)
|
||||
#include <qprogressbar.h>
|
||||
#endif
|
||||
#if QT_CONFIG(statusbar)
|
||||
#include <qstatusbar.h>
|
||||
#endif
|
||||
@ -430,7 +432,7 @@ QAccessible::Role QAccessibleDisplay::role() const
|
||||
if (l->movie())
|
||||
return QAccessible::Animation;
|
||||
#endif
|
||||
#ifndef QT_NO_PROGRESSBAR
|
||||
#if QT_CONFIG(progressbar)
|
||||
} else if (qobject_cast<QProgressBar*>(object())) {
|
||||
return QAccessible::ProgressBar;
|
||||
#endif
|
||||
@ -484,7 +486,7 @@ QString QAccessibleDisplay::text(QAccessible::Text t) const
|
||||
}
|
||||
break;
|
||||
case QAccessible::Value:
|
||||
#ifndef QT_NO_PROGRESSBAR
|
||||
#if QT_CONFIG(progressbar)
|
||||
if (qobject_cast<QProgressBar*>(object()))
|
||||
str = QString::number(qobject_cast<QProgressBar*>(object())->value());
|
||||
#endif
|
||||
@ -891,7 +893,7 @@ void QAccessibleLineEdit::replaceText(int startOffset, int endOffset, const QStr
|
||||
|
||||
#endif // QT_NO_LINEEDIT
|
||||
|
||||
#ifndef QT_NO_PROGRESSBAR
|
||||
#if QT_CONFIG(progressbar)
|
||||
QAccessibleProgressBar::QAccessibleProgressBar(QWidget *o)
|
||||
: QAccessibleDisplay(o)
|
||||
{
|
||||
|
@ -190,7 +190,7 @@ protected:
|
||||
};
|
||||
#endif // QT_NO_LINEEDIT
|
||||
|
||||
#ifndef QT_NO_PROGRESSBAR
|
||||
#if QT_CONFIG(progressbar)
|
||||
class QAccessibleProgressBar : public QAccessibleDisplay, public QAccessibleValueInterface
|
||||
{
|
||||
public:
|
||||
|
@ -288,7 +288,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
|
||||
case PE_PanelToolBar:
|
||||
break;
|
||||
#endif // QT_NO_TOOLBAR
|
||||
#ifndef QT_NO_PROGRESSBAR
|
||||
#if QT_CONFIG(progressbar)
|
||||
case PE_IndicatorProgressChunk:
|
||||
{
|
||||
bool vertical = false;
|
||||
@ -303,7 +303,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_PROGRESSBAR
|
||||
#endif // QT_CONFIG(progressbar)
|
||||
case PE_IndicatorBranch: {
|
||||
static const int decoration_size = 9;
|
||||
int mid_h = opt->rect.x() + opt->rect.width() / 2;
|
||||
@ -1414,7 +1414,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
|
||||
p->eraseRect(opt->rect);
|
||||
break;
|
||||
#endif // QT_NO_MENUBAR
|
||||
#ifndef QT_NO_PROGRESSBAR
|
||||
#if QT_CONFIG(progressbar)
|
||||
case CE_ProgressBar:
|
||||
if (const QStyleOptionProgressBar *pb
|
||||
= qstyleoption_cast<const QStyleOptionProgressBar *>(opt)) {
|
||||
@ -1551,7 +1551,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_PROGRESSBAR
|
||||
#endif // QT_CONFIG(progressbar)
|
||||
case CE_HeaderLabel:
|
||||
if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(opt)) {
|
||||
QRect rect = header->rect;
|
||||
@ -2487,7 +2487,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_SLIDER
|
||||
#ifndef QT_NO_PROGRESSBAR
|
||||
#if QT_CONFIG(progressbar)
|
||||
case SE_ProgressBarGroove:
|
||||
case SE_ProgressBarContents:
|
||||
case SE_ProgressBarLabel:
|
||||
@ -2512,7 +2512,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
|
||||
r = visualRect(pb->direction, pb->rect, r);
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_PROGRESSBAR
|
||||
#endif // QT_CONFIG(progressbar)
|
||||
#if QT_CONFIG(combobox)
|
||||
case SE_ComboBoxFocusRect:
|
||||
if (const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) {
|
||||
|
@ -66,7 +66,9 @@
|
||||
#endif
|
||||
#include <qslider.h>
|
||||
#include <qsplitter.h>
|
||||
#if QT_CONFIG(progressbar)
|
||||
#include <qprogressbar.h>
|
||||
#endif
|
||||
#if QT_CONFIG(wizard)
|
||||
#include <qwizard.h>
|
||||
#endif
|
||||
|
@ -81,7 +81,9 @@
|
||||
#include <qpainter.h>
|
||||
#include <qpixmapcache.h>
|
||||
#include <qpointer.h>
|
||||
#if QT_CONFIG(progressbar)
|
||||
#include <qprogressbar.h>
|
||||
#endif
|
||||
#if QT_CONFIG(pushbutton)
|
||||
#include <qpushbutton.h>
|
||||
#endif
|
||||
@ -659,7 +661,7 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
|
||||
#endif
|
||||
else if (qobject_cast<const QSlider *>(widg))
|
||||
ct = QStyle::CT_Slider;
|
||||
#ifndef QT_NO_PROGRESSBAR
|
||||
#if QT_CONFIG(progressbar)
|
||||
else if (qobject_cast<const QProgressBar *>(widg))
|
||||
ct = QStyle::CT_ProgressBar;
|
||||
#endif
|
||||
@ -875,7 +877,7 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
|
||||
ret.setWidth(w);
|
||||
break;
|
||||
}
|
||||
#ifndef QT_NO_PROGRESSBAR
|
||||
#if QT_CONFIG(progressbar)
|
||||
case QStyle::CT_ProgressBar: {
|
||||
int finalValue = -1;
|
||||
Qt::Orientation orient = Qt::Horizontal;
|
||||
|
@ -83,7 +83,9 @@
|
||||
#include <qpainter.h>
|
||||
#include <qpixmapcache.h>
|
||||
#include <qpointer.h>
|
||||
#if QT_CONFIG(progressbar)
|
||||
#include <qprogressbar.h>
|
||||
#endif
|
||||
#if QT_CONFIG(pushbutton)
|
||||
#include <qpushbutton.h>
|
||||
#endif
|
||||
|
@ -49,7 +49,9 @@
|
||||
#include <QPixmapCache>
|
||||
#include <QStyleOption>
|
||||
#include <QString>
|
||||
#if QT_CONFIG(progressbar)
|
||||
#include <QProgressBar>
|
||||
#endif
|
||||
#include <QSlider>
|
||||
#include <QEvent>
|
||||
#if QT_CONFIG(combobox)
|
||||
|
@ -76,7 +76,9 @@
|
||||
#include <qcombobox.h>
|
||||
#endif
|
||||
#include <qscrollbar.h>
|
||||
#if QT_CONFIG(progressbar)
|
||||
#include <qprogressbar.h>
|
||||
#endif
|
||||
#if QT_CONFIG(dockwidget)
|
||||
#include <qdockwidget.h>
|
||||
#endif
|
||||
|
@ -38,7 +38,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "qprogressbar.h"
|
||||
#ifndef QT_NO_PROGRESSBAR
|
||||
|
||||
#include <qlocale.h>
|
||||
#include <qevent.h>
|
||||
#include <qpainter.h>
|
||||
@ -623,5 +623,3 @@ QString QProgressBar::format() const
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qprogressbar.cpp"
|
||||
|
||||
#endif // QT_NO_PROGRESSBAR
|
||||
|
@ -43,11 +43,10 @@
|
||||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#include <QtWidgets/qframe.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(progressbar);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_PROGRESSBAR
|
||||
|
||||
class QProgressBarPrivate;
|
||||
class QStyleOptionProgressBar;
|
||||
|
||||
@ -119,8 +118,6 @@ private:
|
||||
Q_DISABLE_COPY(QProgressBar)
|
||||
};
|
||||
|
||||
#endif // QT_NO_PROGRESSBAR
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QPROGRESSBAR_H
|
||||
|
@ -22,7 +22,6 @@ HEADERS += \
|
||||
widgets/qmenu_p.h \
|
||||
widgets/qmenubar.h \
|
||||
widgets/qmenubar_p.h \
|
||||
widgets/qprogressbar.h \
|
||||
widgets/qscrollbar.h \
|
||||
widgets/qscrollbar_p.h \
|
||||
widgets/qscrollarea_p.h \
|
||||
@ -67,7 +66,6 @@ SOURCES += \
|
||||
widgets/qmdisubwindow.cpp \
|
||||
widgets/qmenu.cpp \
|
||||
widgets/qmenubar.cpp \
|
||||
widgets/qprogressbar.cpp \
|
||||
widgets/qscrollbar.cpp \
|
||||
widgets/qsizegrip.cpp \
|
||||
widgets/qslider.cpp \
|
||||
@ -184,6 +182,11 @@ qtConfig(lcdnumber) {
|
||||
widgets/qlcdnumber.cpp
|
||||
}
|
||||
|
||||
qtConfig(progressbar) {
|
||||
HEADERS += widgets/qprogressbar.h
|
||||
SOURCES += widgets/qprogressbar.cpp
|
||||
}
|
||||
|
||||
qtConfig(pushbutton) {
|
||||
HEADERS += \
|
||||
widgets/qpushbutton.h \
|
||||
|
Loading…
Reference in New Issue
Block a user