Convert features.toolbox to QT_[REQUIRE_]CONFIG
Change-Id: I7abfe0166a021c439f6ed4465631ba62660ef001 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>bb10
parent
0987bda99e
commit
d1a3e674b6
|
|
@ -179,7 +179,7 @@ QAccessibleInterface *qAccessibleFactory(const QString &classname, QObject *obje
|
|||
} else if (classname == QLatin1String("QStackedWidget")) {
|
||||
iface = new QAccessibleStackedWidget(widget);
|
||||
#endif
|
||||
#ifndef QT_NO_TOOLBOX
|
||||
#if QT_CONFIG(toolbox)
|
||||
} else if (classname == QLatin1String("QToolBox")) {
|
||||
iface = new QAccessibleToolBox(widget);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -51,7 +51,9 @@
|
|||
#include "qdebug.h"
|
||||
#include <QApplication>
|
||||
#include <QStackedWidget>
|
||||
#if QT_CONFIG(toolbox)
|
||||
#include <QToolBox>
|
||||
#endif
|
||||
#include <QMdiArea>
|
||||
#include <QMdiSubWindow>
|
||||
#if QT_CONFIG(dialogbuttonbox)
|
||||
|
|
@ -354,7 +356,7 @@ QStackedWidget *QAccessibleStackedWidget::stackedWidget() const
|
|||
}
|
||||
#endif // QT_NO_STACKEDWIDGET
|
||||
|
||||
#ifndef QT_NO_TOOLBOX
|
||||
#if QT_CONFIG(toolbox)
|
||||
// ======================= QAccessibleToolBox ======================
|
||||
QAccessibleToolBox::QAccessibleToolBox(QWidget *widget)
|
||||
: QAccessibleWidget(widget, QAccessible::LayeredPane)
|
||||
|
|
@ -366,7 +368,7 @@ QToolBox * QAccessibleToolBox::toolBox() const
|
|||
{
|
||||
return static_cast<QToolBox *>(object());
|
||||
}
|
||||
#endif // QT_NO_TOOLBOX
|
||||
#endif // QT_CONFIG(toolbox)
|
||||
|
||||
// ======================= QAccessibleMdiArea ======================
|
||||
#ifndef QT_NO_MDIAREA
|
||||
|
|
|
|||
|
|
@ -1667,7 +1667,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
|
|||
}
|
||||
break;
|
||||
#endif // QT_NO_TOOLBUTTON
|
||||
#ifndef QT_NO_TOOLBOX
|
||||
#if QT_CONFIG(toolbox)
|
||||
case CE_ToolBoxTab:
|
||||
if (const QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(opt)) {
|
||||
proxy()->drawControl(CE_ToolBoxTabShape, tb, p, widget);
|
||||
|
|
@ -1719,7 +1719,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
|
|||
p->setBrush(Qt::NoBrush);
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_TOOLBOX
|
||||
#endif // QT_CONFIG(toolbox)
|
||||
#if QT_CONFIG(tabbar)
|
||||
case CE_TabBarTab:
|
||||
if (const QStyleOptionTab *tab = qstyleoption_cast<const QStyleOptionTab *>(opt)) {
|
||||
|
|
@ -2523,12 +2523,12 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
|
|||
}
|
||||
break;
|
||||
#endif // QT_CONFIG(combobox)
|
||||
#ifndef QT_NO_TOOLBOX
|
||||
#if QT_CONFIG(toolbox)
|
||||
case SE_ToolBoxTabContents:
|
||||
r = opt->rect;
|
||||
r.adjust(0, 0, -30, 0);
|
||||
break;
|
||||
#endif // QT_NO_TOOLBOX
|
||||
#endif // QT_CONFIG(toolbox)
|
||||
case SE_HeaderLabel: {
|
||||
int margin = proxy()->pixelMetric(QStyle::PM_HeaderMargin, opt, widget);
|
||||
r.setRect(opt->rect.x() + margin, opt->rect.y() + margin,
|
||||
|
|
|
|||
|
|
@ -1982,7 +1982,7 @@ QRenderRule QStyleSheetStyle::renderRule(const QObject *obj, const QStyleOption
|
|||
extraClass |= PseudoClass_OnlyOne;
|
||||
}
|
||||
#endif // QT_NO_TOOLBAR
|
||||
#ifndef QT_NO_TOOLBOX
|
||||
#if QT_CONFIG(toolbox)
|
||||
else if (const QStyleOptionToolBox *tb = qstyleoption_cast<const QStyleOptionToolBox *>(opt)) {
|
||||
if (tb->position == QStyleOptionToolBox::OnlyOneTab)
|
||||
extraClass |= PseudoClass_OnlyOne;
|
||||
|
|
@ -1998,7 +1998,7 @@ QRenderRule QStyleSheetStyle::renderRule(const QObject *obj, const QStyleOption
|
|||
else if (tb->selectedPosition == QStyleOptionToolBox::PreviousIsSelected)
|
||||
extraClass |= PseudoClass_PreviousSelected;
|
||||
}
|
||||
#endif // QT_NO_TOOLBOX
|
||||
#endif // QT_CONFIG(toolbox)
|
||||
#if QT_CONFIG(dockwidget)
|
||||
else if (const QStyleOptionDockWidget *dw = qstyleoption_cast<const QStyleOptionDockWidget *>(opt)) {
|
||||
if (dw->verticalTitleBar)
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@
|
|||
|
||||
#include "qtoolbox.h"
|
||||
|
||||
#ifndef QT_NO_TOOLBOX
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qeventloop.h>
|
||||
#include <qlayout.h>
|
||||
|
|
@ -734,5 +732,3 @@ QT_END_NAMESPACE
|
|||
|
||||
#include "moc_qtoolbox.cpp"
|
||||
#include "qtoolbox.moc"
|
||||
|
||||
#endif //QT_NO_TOOLBOX
|
||||
|
|
|
|||
|
|
@ -44,11 +44,10 @@
|
|||
#include <QtWidgets/qframe.h>
|
||||
#include <QtGui/qicon.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(toolbox);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_TOOLBOX
|
||||
|
||||
class QToolBoxPrivate;
|
||||
|
||||
class Q_WIDGETS_EXPORT QToolBox : public QFrame
|
||||
|
|
@ -119,8 +118,6 @@ inline int QToolBox::addItem(QWidget *item, const QIcon &iconSet,
|
|||
inline int QToolBox::insertItem(int index, QWidget *item, const QString &text)
|
||||
{ return insertItem(index, item, QIcon(), text); }
|
||||
|
||||
#endif // QT_NO_TOOLBOX
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QTOOLBOX_H
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ HEADERS += \
|
|||
widgets/qtoolbarlayout_p.h \
|
||||
widgets/qtoolbarextension_p.h \
|
||||
widgets/qtoolbarseparator_p.h \
|
||||
widgets/qtoolbox.h \
|
||||
widgets/qtoolbutton.h \
|
||||
widgets/qabstractscrollarea.h \
|
||||
widgets/qabstractscrollarea_p.h \
|
||||
|
|
@ -77,7 +76,6 @@ SOURCES += \
|
|||
widgets/qtoolbarlayout.cpp \
|
||||
widgets/qtoolbarextension.cpp \
|
||||
widgets/qtoolbarseparator.cpp \
|
||||
widgets/qtoolbox.cpp \
|
||||
widgets/qtoolbutton.cpp \
|
||||
widgets/qabstractscrollarea.cpp \
|
||||
widgets/qwidgetresizehandler.cpp \
|
||||
|
|
@ -248,6 +246,11 @@ qtConfig(tabwidget) {
|
|||
SOURCES += widgets/qtabwidget.cpp
|
||||
}
|
||||
|
||||
qtConfig(toolbox) {
|
||||
HEADERS += widgets/qtoolbox.h
|
||||
SOURCES += widgets/qtoolbox.cpp
|
||||
}
|
||||
|
||||
qtConfig(widgettextcontrol) {
|
||||
HEADERS += \
|
||||
widgets/qwidgettextcontrol_p.h \
|
||||
|
|
|
|||
Loading…
Reference in New Issue