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