Skip to content

Commit

Permalink
Convert features.splitter to QT_[REQUIRE_]CONFIG
Browse files Browse the repository at this point in the history
Change-Id: I2eea5004938c581beb5a7c0c01409c576c5e5b39
Reviewed-by: Oswald Buddenhagen <[email protected]>
  • Loading branch information
sbinner committed Aug 10, 2017
1 parent 39851c6 commit e58fdba
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/widgets/accessible/qaccessiblewidgetfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ QAccessibleInterface *qAccessibleFactory(const QString &classname, QObject *obje
#endif
} else if (classname == QLatin1String("QSizeGrip")) {
iface = new QAccessibleWidget(widget, QAccessible::Grip);
#ifndef QT_NO_SPLITTER
#if QT_CONFIG(splitter)
} else if (classname == QLatin1String("QSplitter")) {
iface = new QAccessibleWidget(widget, QAccessible::Splitter);
} else if (classname == QLatin1String("QSplitterHandle")) {
Expand Down
2 changes: 2 additions & 0 deletions src/widgets/styles/qfusionstyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@
#include <qabstractslider.h>
#endif
#include <qslider.h>
#if QT_CONFIG(splitter)
#include <qsplitter.h>
#endif
#if QT_CONFIG(progressbar)
#include <qprogressbar.h>
#endif
Expand Down
2 changes: 2 additions & 0 deletions src/widgets/styles/qmacstyle_mac_p_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@
#endif
#include <qsizegrip.h>
#include <qspinbox.h>
#if QT_CONFIG(splitter)
#include <qsplitter.h>
#endif
#include <qstyleoption.h>
#include <qtextedit.h>
#include <qtextstream.h>
Expand Down
4 changes: 2 additions & 2 deletions src/widgets/styles/qwindowsstyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1494,11 +1494,11 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai
opt->state & (State_Sunken | State_On), 1,
&opt->palette.brush(QPalette::Button));
break;
#ifndef QT_NO_SPLITTER
#if QT_CONFIG(splitter)
case CE_Splitter:
p->eraseRect(opt->rect);
break;
#endif // QT_NO_SPLITTER
#endif // QT_CONFIG(splitter)
#if QT_CONFIG(scrollbar)
case CE_ScrollBarSubLine:
case CE_ScrollBarAddLine: {
Expand Down
3 changes: 0 additions & 3 deletions src/widgets/widgets/qsplitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
****************************************************************************/

#include "qsplitter.h"
#ifndef QT_NO_SPLITTER

#include "qapplication.h"
#include "qcursor.h"
Expand Down Expand Up @@ -1820,5 +1819,3 @@ QTextStream& operator>>(QTextStream& ts, QSplitter& splitter)
QT_END_NAMESPACE

#include "moc_qsplitter.cpp"

#endif // QT_NO_SPLITTER
7 changes: 2 additions & 5 deletions src/widgets/widgets/qsplitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@
#include <QtWidgets/qframe.h>
#include <QtWidgets/qsizepolicy.h>

QT_BEGIN_NAMESPACE

QT_REQUIRE_CONFIG(splitter);

#ifndef QT_NO_SPLITTER
QT_BEGIN_NAMESPACE

class QSplitterPrivate;
class QTextStream;
Expand Down Expand Up @@ -164,8 +163,6 @@ class Q_WIDGETS_EXPORT QSplitterHandle : public QWidget
Q_DECLARE_PRIVATE(QSplitterHandle)
};

#endif // QT_NO_SPLITTER

QT_END_NAMESPACE

#endif // QSPLITTER_H
2 changes: 2 additions & 0 deletions src/widgets/widgets/qsplitter_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
#include <QtWidgets/private/qtwidgetsglobal_p.h>
#include "private/qframe_p.h"

QT_REQUIRE_CONFIG(splitter);

QT_BEGIN_NAMESPACE

static const uint Default = 2;
Expand Down
11 changes: 8 additions & 3 deletions src/widgets/widgets/widgets.pri
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ HEADERS += \
widgets/qsizegrip.h \
widgets/qslider.h \
widgets/qspinbox.h \
widgets/qsplitter.h \
widgets/qsplitter_p.h \
widgets/qstackedwidget.h \
widgets/qtextedit.h \
widgets/qtextedit_p.h \
Expand Down Expand Up @@ -64,7 +62,6 @@ SOURCES += \
widgets/qsizegrip.cpp \
widgets/qslider.cpp \
widgets/qspinbox.cpp \
widgets/qsplitter.cpp \
widgets/qstackedwidget.cpp \
widgets/qtextedit.cpp \
widgets/qtoolbar.cpp \
Expand Down Expand Up @@ -231,6 +228,14 @@ qtConfig(splashscreen) {
widgets/qsplashscreen.cpp
}

qtConfig(splitter) {
HEADERS += \
widgets/qsplitter.h \
widgets/qsplitter_p.h

SOURCES += widgets/qsplitter.cpp
}

qtConfig(statusbar) {
HEADERS += widgets/qstatusbar.h
SOURCES += widgets/qstatusbar.cpp
Expand Down

0 comments on commit e58fdba

Please sign in to comment.