Convert features.columnview to QT_[REQUIRE_]CONFIG

Side effect: fix of QT_NO_COLUMNVIEW <-> QT_NO_QCOLUMNVIEW inconsistency.

Change-Id: I42702ea7b362a4b6fb5dad78ee105e6cbbf8bcf6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
Stephan Binner 2017-05-30 21:09:02 +02:00
parent 77c2dd4017
commit aad21102e9
6 changed files with 19 additions and 24 deletions

View File

@ -28,9 +28,6 @@ HEADERS += \
itemviews/qitemeditorfactory_p.h \
itemviews/qtreewidgetitemiterator.h \
itemviews/qdatawidgetmapper.h \
itemviews/qcolumnviewgrip_p.h \
itemviews/qcolumnview.h \
itemviews/qcolumnview_p.h \
itemviews/qstyleditemdelegate.h
SOURCES += \
@ -49,11 +46,20 @@ SOURCES += \
itemviews/qitemeditorfactory.cpp \
itemviews/qtreewidgetitemiterator.cpp \
itemviews/qdatawidgetmapper.cpp \
itemviews/qcolumnview.cpp \
itemviews/qcolumnviewgrip.cpp \
itemviews/qstyleditemdelegate.cpp
}
qtConfig(columnview) {
HEADERS += \
itemviews/qcolumnviewgrip_p.h \
itemviews/qcolumnview.h \
itemviews/qcolumnview_p.h
SOURCES += \
itemviews/qcolumnview.cpp \
itemviews/qcolumnviewgrip.cpp
}
HEADERS += \
itemviews/qfileiconprovider.h \
itemviews/qfileiconprovider_p.h \

View File

@ -43,11 +43,10 @@
#include <QtWidgets/qtwidgetsglobal.h>
#include <QtWidgets/qabstractitemview.h>
QT_REQUIRE_CONFIG(columnview);
QT_BEGIN_NAMESPACE
#ifndef QT_NO_COLUMNVIEW
class QColumnViewPrivate;
class Q_WIDGETS_EXPORT QColumnView : public QAbstractItemView {
@ -109,8 +108,6 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_clicked(const QModelIndex &))
};
#endif // QT_NO_COLUMNVIEW
QT_END_NAMESPACE
#endif // QCOLUMNVIEW_H

View File

@ -54,8 +54,6 @@
#include <QtWidgets/private/qtwidgetsglobal_p.h>
#include "qcolumnview.h"
#ifndef QT_NO_QCOLUMNVIEW
#include <private/qabstractitemview_p.h>
#include <QtCore/qabstractitemmodel.h>
@ -67,6 +65,8 @@
#include <qevent.h>
#include <qscrollbar.h>
QT_REQUIRE_CONFIG(columnview);
QT_BEGIN_NAMESPACE
class QColumnViewPreviewColumn : public QAbstractItemView {
@ -190,9 +190,7 @@ public:
const QStyleOptionViewItem &option,
const QModelIndex &index) const Q_DECL_OVERRIDE;
};
#endif // QT_NO_QCOLUMNVIEW
QT_END_NAMESPACE
#endif //QCOLUMNVIEW_P_H
#endif //QCOLUMNVIEW_P_H

View File

@ -37,8 +37,6 @@
**
****************************************************************************/
#ifndef QT_NO_QCOLUMNVIEW
#include "qcolumnviewgrip_p.h"
#include <qstyleoption.h>
#include <qpainter.h>
@ -190,5 +188,3 @@ originalXLocation(-1)
QT_END_NAMESPACE
#include "moc_qcolumnviewgrip_p.cpp"
#endif // QT_NO_QCOLUMNVIEW

View File

@ -54,7 +54,7 @@
#include <QtWidgets/private/qtwidgetsglobal_p.h>
#include <private/qwidget_p.h>
#ifndef QT_NO_QCOLUMNVIEW
QT_REQUIRE_CONFIG(columnview);
QT_BEGIN_NAMESPACE
@ -98,6 +98,4 @@ public:
QT_END_NAMESPACE
#endif // QT_NO_QCOLUMNVIEW
#endif //QCOLUMNVIEWGRIP_P_H

View File

@ -608,7 +608,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
}
break;
#endif // QT_NO_LINEEDIT
#ifndef QT_NO_COLUMNVIEW
#if QT_CONFIG(columnview)
case PE_IndicatorColumnViewArrow: {
if (const QStyleOptionViewItem *viewOpt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)) {
bool reverse = (viewOpt->direction == Qt::RightToLeft);
@ -660,7 +660,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
p->restore();
}
break; }
#endif //QT_NO_COLUMNVIEW
#endif //QT_CONFIG(columnview)
case PE_IndicatorItemViewItemDrop: {
QRect rect = opt->rect;
if (opt->rect.height() == 0)