Convert features.itemviews to QT_[REQUIRE_]CONFIG
The QT_NO_ITEMVIEWS queries in corelib/ seem to had no effect at all. Change-Id: I494ee2309a96b0cf25de18781fc9a675878a2ee9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
163863f77d
commit
16f375f549
@ -44,8 +44,6 @@
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
@ -1917,5 +1915,3 @@ QDebug operator<<(QDebug dbg, const QItemSelectionRange &range)
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qitemselectionmodel.cpp"
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
@ -42,8 +42,6 @@
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
|
||||
#include <QtCore/qset.h>
|
||||
#include <QtCore/qvector.h>
|
||||
#include <QtCore/qlist.h>
|
||||
@ -273,6 +271,4 @@ QT_END_NAMESPACE
|
||||
Q_DECLARE_METATYPE(QItemSelectionRange)
|
||||
Q_DECLARE_METATYPE(QItemSelection)
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
||||
#endif // QITEMSELECTIONMODEL_H
|
||||
|
@ -55,7 +55,6 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
class QItemSelectionModelPrivate: public QObjectPrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QItemSelectionModel)
|
||||
@ -106,8 +105,6 @@ public:
|
||||
int tableColCount, tableRowCount;
|
||||
};
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QITEMSELECTIONMODEL_P_H
|
||||
|
@ -5,7 +5,6 @@ qtConfig(accessibility) {
|
||||
accessible/qaccessiblewidget.h \
|
||||
accessible/qaccessiblewidgetfactory_p.h \
|
||||
accessible/complexwidgets_p.h \
|
||||
accessible/itemviews_p.h \
|
||||
accessible/qaccessiblemenu_p.h \
|
||||
accessible/qaccessiblewidgets_p.h \
|
||||
accessible/rangecontrols_p.h \
|
||||
@ -15,9 +14,13 @@ qtConfig(accessibility) {
|
||||
accessible/qaccessiblewidget.cpp \
|
||||
accessible/qaccessiblewidgetfactory.cpp \
|
||||
accessible/complexwidgets.cpp \
|
||||
accessible/itemviews.cpp \
|
||||
accessible/qaccessiblemenu.cpp \
|
||||
accessible/qaccessiblewidgets.cpp \
|
||||
accessible/rangecontrols.cpp \
|
||||
accessible/simplewidgets.cpp
|
||||
|
||||
qtConfig(itemviews) {
|
||||
HEADERS += accessible/itemviews_p.h
|
||||
SOURCES += accessible/itemviews.cpp
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,9 @@
|
||||
#include <qaccessible.h>
|
||||
#include <qapplication.h>
|
||||
#include <qevent.h>
|
||||
#if QT_CONFIG(itemviews)
|
||||
#include <qheaderview.h>
|
||||
#endif
|
||||
#include <qtabbar.h>
|
||||
#if QT_CONFIG(combobox)
|
||||
#include <qcombobox.h>
|
||||
|
@ -54,7 +54,9 @@
|
||||
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||
#include <QtCore/qpointer.h>
|
||||
#include <QtWidgets/qaccessiblewidget.h>
|
||||
#if QT_CONFIG(itemviews)
|
||||
#include <QtWidgets/qabstractitemview.h>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
@ -56,7 +56,6 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
/*
|
||||
Implementation of the IAccessible2 table2 interface. Much simpler than
|
||||
the other table interfaces since there is only the main table and cells:
|
||||
@ -1215,8 +1214,6 @@ QHeaderView *QAccessibleTableHeaderCell::headerView() const
|
||||
return header;
|
||||
}
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
|
@ -58,13 +58,12 @@
|
||||
#include <QtWidgets/qabstractitemview.h>
|
||||
#include <QtWidgets/qheaderview.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(itemviews);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
|
||||
class QAccessibleTableCell;
|
||||
class QAccessibleTableHeaderCell;
|
||||
|
||||
@ -299,8 +298,6 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -43,7 +43,9 @@
|
||||
#include "simplewidgets_p.h"
|
||||
#include "rangecontrols_p.h"
|
||||
#include "complexwidgets_p.h"
|
||||
#if QT_CONFIG(itemviews)
|
||||
#include "itemviews_p.h"
|
||||
#endif
|
||||
|
||||
#include <qtoolbutton.h>
|
||||
#if QT_CONFIG(treeview)
|
||||
@ -146,11 +148,11 @@ QAccessibleInterface *qAccessibleFactory(const QString &classname, QObject *obje
|
||||
} else if (classname == QLatin1String("QTreeView")) {
|
||||
iface = new QAccessibleTree(widget);
|
||||
#endif // QT_CONFIG(treeview)
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
} else if (classname == QLatin1String("QTableView") || classname == QLatin1String("QListView")) {
|
||||
iface = new QAccessibleTable(widget);
|
||||
// ### This should be cleaned up. We return the parent for the scrollarea to hide it.
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
#endif // QT_CONFIG(itemviews)
|
||||
#ifndef QT_NO_TABBAR
|
||||
} else if (classname == QLatin1String("QTabBar")) {
|
||||
iface = new QAccessibleTabBar(widget);
|
||||
|
@ -65,7 +65,9 @@
|
||||
#if QT_CONFIG(calendarwidget)
|
||||
#include <QCalendarWidget>
|
||||
#endif
|
||||
#if QT_CONFIG(itemviews)
|
||||
#include <QAbstractItemView>
|
||||
#endif
|
||||
#include <QDockWidget>
|
||||
#include <QMainWindow>
|
||||
#include <private/qdockwidget_p.h>
|
||||
|
@ -39,7 +39,6 @@
|
||||
|
||||
#include "qabstractitemdelegate.h"
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#include <qabstractitemmodel.h>
|
||||
#include <qabstractitemview.h>
|
||||
#include <qfontmetrics.h>
|
||||
@ -606,5 +605,3 @@ void QAbstractItemDelegatePrivate::_q_commitDataAndCloseEditor(QWidget *editor)
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qabstractitemdelegate.cpp"
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
@ -44,11 +44,10 @@
|
||||
#include <QtCore/qobject.h>
|
||||
#include <QtWidgets/qstyleoption.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(itemviews);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
|
||||
class QPainter;
|
||||
class QModelIndex;
|
||||
class QAbstractItemModel;
|
||||
@ -127,8 +126,6 @@ private:
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_commitDataAndCloseEditor(QWidget*))
|
||||
};
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QABSTRACTITEMDELEGATE_H
|
||||
|
@ -55,7 +55,7 @@
|
||||
#include "qabstractitemdelegate.h"
|
||||
#include <private/qobject_p.h>
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
QT_REQUIRE_CONFIG(itemviews);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -73,6 +73,4 @@ public:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
||||
#endif // QABSTRACTITEMDELEGATE_P_H
|
||||
|
@ -39,7 +39,6 @@
|
||||
|
||||
#include "qabstractitemview.h"
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#include <qpointer.h>
|
||||
#include <qapplication.h>
|
||||
#include <qclipboard.h>
|
||||
@ -4490,5 +4489,3 @@ QModelIndexList QAbstractItemViewPrivate::selectedDraggableIndexes() const
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qabstractitemview.cpp"
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
@ -49,11 +49,10 @@
|
||||
class tst_QAbstractItemView;
|
||||
class tst_QTreeView;
|
||||
|
||||
QT_REQUIRE_CONFIG(itemviews);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
|
||||
class QMenu;
|
||||
class QDrag;
|
||||
class QEvent;
|
||||
@ -381,8 +380,6 @@ private:
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractItemView::EditTriggers)
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QABSTRACTITEMVIEW_H
|
||||
|
@ -64,7 +64,7 @@
|
||||
#include "QtCore/qbasictimer.h"
|
||||
#include "QtCore/qelapsedtimer.h"
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
QT_REQUIRE_CONFIG(itemviews);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -477,6 +477,4 @@ inline int qBinarySearch(const QVector<T> &vec, const T &item, int start, int en
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
||||
#endif // QABSTRACTITEMVIEW_P_H
|
||||
|
@ -39,7 +39,6 @@
|
||||
|
||||
#include "qheaderview.h"
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#include <qbitarray.h>
|
||||
#include <qbrush.h>
|
||||
#include <qdebug.h>
|
||||
@ -3949,6 +3948,4 @@ bool QHeaderViewPrivate::read(QDataStream &in)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
||||
#include "moc_qheaderview.cpp"
|
||||
|
@ -43,11 +43,10 @@
|
||||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#include <QtWidgets/qabstractitemview.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(itemviews);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
|
||||
class QHeaderViewPrivate;
|
||||
class QStyleOptionHeader;
|
||||
|
||||
@ -265,8 +264,6 @@ inline void QHeaderView::hideSection(int alogicalIndex)
|
||||
inline void QHeaderView::showSection(int alogicalIndex)
|
||||
{ setSectionHidden(alogicalIndex, false); }
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QHEADERVIEW_H
|
||||
|
@ -54,14 +54,14 @@
|
||||
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||
#include "private/qabstractitemview_p.h"
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
|
||||
#include "QtCore/qbitarray.h"
|
||||
#include "QtWidgets/qapplication.h"
|
||||
#if QT_CONFIG(label)
|
||||
#include "QtWidgets/qlabel.h"
|
||||
#endif
|
||||
|
||||
QT_REQUIRE_CONFIG(itemviews);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QHeaderViewPrivate: public QAbstractItemViewPrivate
|
||||
@ -391,6 +391,4 @@ Q_DECLARE_TYPEINFO(QHeaderViewPrivate::SectionItem, Q_PRIMITIVE_TYPE);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
||||
#endif // QHEADERVIEW_P_H
|
||||
|
@ -39,7 +39,6 @@
|
||||
|
||||
#include "qitemdelegate.h"
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#include <qabstractitemmodel.h>
|
||||
#include <qapplication.h>
|
||||
#include <qbrush.h>
|
||||
@ -1199,5 +1198,3 @@ QStyleOptionViewItem QItemDelegate::setOptions(const QModelIndex &index,
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qitemdelegate.cpp"
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
@ -46,11 +46,10 @@
|
||||
#include <QtGui/qpixmap.h>
|
||||
#include <QtCore/qvariant.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(itemviews);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
|
||||
class QItemDelegatePrivate;
|
||||
class QItemEditorFactory;
|
||||
|
||||
@ -126,8 +125,6 @@ private:
|
||||
Q_DISABLE_COPY(QItemDelegate)
|
||||
};
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QITEMDELEGATE_H
|
||||
|
@ -41,8 +41,6 @@
|
||||
#include "qitemeditorfactory.h"
|
||||
#include "qitemeditorfactory_p.h"
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
|
||||
#if QT_CONFIG(combobox)
|
||||
#include <qcombobox.h>
|
||||
#endif
|
||||
@ -627,5 +625,3 @@ QT_END_NAMESPACE
|
||||
#endif
|
||||
|
||||
#include "moc_qitemeditorfactory_p.cpp"
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
@ -46,11 +46,10 @@
|
||||
#include <QtCore/qhash.h>
|
||||
#include <QtCore/qvariant.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(itemviews);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
|
||||
class QWidget;
|
||||
|
||||
class Q_WIDGETS_EXPORT QItemEditorCreatorBase
|
||||
@ -111,8 +110,6 @@ private:
|
||||
QHash<int, QItemEditorCreatorBase *> creatorMap;
|
||||
};
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QITEMEDITORFACTORY_H
|
||||
|
@ -55,12 +55,11 @@
|
||||
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||
#include <qlineedit.h>
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(itemviews);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QExpandingLineEdit : public QLineEdit
|
||||
{
|
||||
@ -92,6 +91,4 @@ QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_LINEEDIT
|
||||
|
||||
#endif //QT_NO_ITEMVIEWS
|
||||
|
||||
#endif //QITEMEDITORFACTORY_P_H
|
||||
|
@ -39,7 +39,6 @@
|
||||
|
||||
#include "qstyleditemdelegate.h"
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#include <qabstractitemmodel.h>
|
||||
#include <qapplication.h>
|
||||
#include <qbrush.h>
|
||||
@ -643,5 +642,3 @@ bool QStyledItemDelegate::editorEvent(QEvent *event,
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qstyleditemdelegate.cpp"
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
@ -46,11 +46,10 @@
|
||||
#include <QtGui/qpixmap.h>
|
||||
#include <QtCore/qvariant.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(itemviews);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
|
||||
class QStyledItemDelegatePrivate;
|
||||
class QItemEditorFactory;
|
||||
|
||||
@ -101,8 +100,6 @@ private:
|
||||
Q_DISABLE_COPY(QStyledItemDelegate)
|
||||
};
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QSTYLEDITEMDELEGATE_H
|
||||
|
@ -41,7 +41,9 @@
|
||||
#include "qcommonstyle_p.h"
|
||||
|
||||
#include <qfile.h>
|
||||
#if QT_CONFIG(itemviews)
|
||||
#include <qabstractitemview.h>
|
||||
#endif
|
||||
#include <qapplication.h>
|
||||
#include <private/qguiapplication_p.h>
|
||||
#include <qpa/qplatformtheme.h>
|
||||
@ -91,7 +93,7 @@
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
# include "private/qtextengine_p.h"
|
||||
#endif
|
||||
|
||||
@ -675,7 +677,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
|
||||
else
|
||||
p->drawRect(rect);
|
||||
break; }
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
case PE_PanelItemViewRow:
|
||||
if (const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)) {
|
||||
QPalette::ColorGroup cg = (widget ? widget->isEnabled() : (vopt->state & QStyle::State_Enabled))
|
||||
@ -713,7 +715,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif //QT_NO_ITEMVIEWS
|
||||
#endif // QT_CONFIG(itemviews)
|
||||
case PE_PanelScrollAreaCorner: {
|
||||
const QBrush brush(opt->palette.brush(QPalette::Window));
|
||||
p->fillRect(opt->rect, brush);
|
||||
@ -824,7 +826,7 @@ static void drawArrow(const QStyle *style, const QStyleOptionToolButton *toolbut
|
||||
}
|
||||
#endif // QT_NO_TOOLBUTTON
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
|
||||
static QSizeF viewItemTextLayout(QTextLayout &textLayout, int lineWidth)
|
||||
{
|
||||
@ -1095,7 +1097,7 @@ void QCommonStylePrivate::viewItemLayout(const QStyleOptionViewItem *opt, QRect
|
||||
*textRect = display;
|
||||
}
|
||||
}
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
#endif // QT_CONFIG(itemviews)
|
||||
|
||||
|
||||
#ifndef QT_NO_TABBAR
|
||||
@ -2168,7 +2170,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
|
||||
}
|
||||
break;
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
case CE_ItemViewItem:
|
||||
if (const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)) {
|
||||
p->save();
|
||||
@ -2248,7 +2250,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
|
||||
}
|
||||
break;
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
#endif // QT_CONFIG(itemviews)
|
||||
#ifndef QT_NO_FRAME
|
||||
case CE_ShapedFrame:
|
||||
if (const QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(opt)) {
|
||||
@ -3020,7 +3022,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
case SE_ItemViewItemCheckIndicator:
|
||||
if (!qstyleoption_cast<const QStyleOptionViewItem *>(opt)) {
|
||||
r = subElementRect(SE_CheckBoxIndicator, opt, widget);
|
||||
@ -3047,7 +3049,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
|
||||
r = d->displayRect;
|
||||
}
|
||||
break;
|
||||
#endif //QT_NO_ITEMVIEWS
|
||||
#endif // QT_CONFIG(itemviews)
|
||||
#ifndef QT_NO_TOOLBAR
|
||||
case SE_ToolBarHandle:
|
||||
if (const QStyleOptionToolBar *tbopt = qstyleoption_cast<const QStyleOptionToolBar *>(opt)) {
|
||||
@ -4897,7 +4899,7 @@ QSize QCommonStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
|
||||
sz = QSize(1 + 3 * (buttonSize + 1), buttonSize);
|
||||
}
|
||||
break;
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
case CT_ItemViewItem:
|
||||
if (const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)) {
|
||||
QRect decorationRect, displayRect, checkRect;
|
||||
@ -4909,7 +4911,7 @@ QSize QCommonStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
|
||||
break;
|
||||
#else
|
||||
Q_UNUSED(d);
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
#endif // QT_CONFIG(itemviews)
|
||||
#ifndef QT_NO_SPINBOX
|
||||
case CT_SpinBox:
|
||||
if (const QStyleOptionSpinBox *vopt = qstyleoption_cast<const QStyleOptionSpinBox *>(opt)) {
|
||||
|
@ -68,7 +68,7 @@ class QCommonStylePrivate : public QStylePrivate
|
||||
Q_DECLARE_PUBLIC(QCommonStyle)
|
||||
public:
|
||||
inline QCommonStylePrivate() :
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
cachedOption(0),
|
||||
#endif
|
||||
animationFps(30)
|
||||
@ -79,12 +79,12 @@ public:
|
||||
#ifndef QT_NO_ANIMATION
|
||||
qDeleteAll(animations);
|
||||
#endif
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
delete cachedOption;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
void viewItemDrawText(QPainter *p, const QStyleOptionViewItem *option, const QRect &rect) const;
|
||||
void viewItemLayout(const QStyleOptionViewItem *opt, QRect *checkRect,
|
||||
QRect *pixmapRect, QRect *textRect, bool sizehint) const;
|
||||
|
@ -55,11 +55,13 @@
|
||||
#if QT_CONFIG(combobox)
|
||||
#include <QComboBox>
|
||||
#endif
|
||||
#if QT_CONFIG(itemviews)
|
||||
#include <QAbstractItemView>
|
||||
#include <QStyledItemDelegate>
|
||||
#endif
|
||||
#if QT_CONFIG(listview)
|
||||
#include <QListView>
|
||||
#endif
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QAbstractScrollArea>
|
||||
#include <QScrollBar>
|
||||
|
||||
|
@ -3000,7 +3000,7 @@ QStyleOptionTitleBar::QStyleOptionTitleBar(int version)
|
||||
\sa Qt::WindowFlags
|
||||
*/
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
/*!
|
||||
\class QStyleOptionViewItem
|
||||
\brief The QStyleOptionViewItem class is used to describe the
|
||||
@ -3267,7 +3267,7 @@ QStyleOptionViewItem::QStyleOptionViewItem(int version)
|
||||
therefore both at the beginning and the end.
|
||||
*/
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
#endif // QT_CONFIG(itemviews)
|
||||
/*!
|
||||
\fn T qstyleoption_cast<T>(const QStyleOption *option)
|
||||
\relates QStyleOption
|
||||
|
@ -53,7 +53,7 @@
|
||||
#include <QtWidgets/qrubberband.h>
|
||||
#endif
|
||||
#include <QtWidgets/qframe.h>
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
# include <QtCore/qabstractitemmodel.h>
|
||||
#endif
|
||||
|
||||
@ -388,7 +388,7 @@ protected:
|
||||
|
||||
typedef Q_DECL_DEPRECATED QStyleOptionDockWidget QStyleOptionDockWidgetV2;
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
|
||||
class Q_WIDGETS_EXPORT QStyleOptionViewItem : public QStyleOption
|
||||
{
|
||||
@ -443,7 +443,7 @@ typedef Q_DECL_DEPRECATED QStyleOptionViewItem QStyleOptionViewItemV2;
|
||||
typedef Q_DECL_DEPRECATED QStyleOptionViewItem QStyleOptionViewItemV3;
|
||||
typedef Q_DECL_DEPRECATED QStyleOptionViewItem QStyleOptionViewItemV4;
|
||||
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
#endif // QT_CONFIG(itemviews)
|
||||
|
||||
class Q_WIDGETS_EXPORT QStyleOptionToolBox : public QStyleOption
|
||||
{
|
||||
|
@ -71,7 +71,9 @@
|
||||
#include <qcheckbox.h>
|
||||
#endif
|
||||
#include <qstatusbar.h>
|
||||
#if QT_CONFIG(itemviews)
|
||||
#include <qheaderview.h>
|
||||
#endif
|
||||
#include <private/qwindowsstyle_p_p.h>
|
||||
#include <private/qstyleanimation_p.h>
|
||||
#include <qtabbar.h>
|
||||
@ -2008,7 +2010,7 @@ QRenderRule QStyleSheetStyle::renderRule(const QObject *obj, const QStyleOption
|
||||
extraClass |= PseudoClass_Movable;
|
||||
}
|
||||
#endif // QT_NO_DOCKWIDGET
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
else if (const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)) {
|
||||
if (vopt->features & QStyleOptionViewItem::Alternate)
|
||||
extraClass |= PseudoClass_Alternate;
|
||||
@ -2805,7 +2807,7 @@ void QStyleSheetStyle::polish(QWidget *w)
|
||||
QRenderRule rule = renderRule(w, PseudoElement_None, PseudoClass_Any);
|
||||
if (rule.hasDrawable() || rule.hasBox()) {
|
||||
if (w->metaObject() == &QWidget::staticMetaObject
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
|| qobject_cast<QHeaderView *>(w)
|
||||
#endif
|
||||
#ifndef QT_NO_TABBAR
|
||||
@ -4069,7 +4071,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
|
||||
fallback = true;
|
||||
break;
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
case CE_ItemViewItem:
|
||||
if (const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)) {
|
||||
QRenderRule subRule = renderRule(w, opt, PseudoElement_ViewItem);
|
||||
@ -4086,7 +4088,7 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
|
||||
return;
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
#endif // QT_CONFIG(itemviews)
|
||||
|
||||
#ifndef QT_NO_TABBAR
|
||||
case CE_TabBarTab:
|
||||
@ -5107,7 +5109,7 @@ QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *op
|
||||
}
|
||||
break;
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
case CT_ItemViewItem: {
|
||||
QRenderRule subRule = renderRule(w, opt, PseudoElement_ViewItem);
|
||||
sz = baseStyle()->sizeFromContents(ct, opt, csz, w);
|
||||
@ -5116,7 +5118,7 @@ QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *op
|
||||
sz = subRule.boxSize(sz);
|
||||
return sz;
|
||||
}
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
#endif // QT_CONFIG(itemviews)
|
||||
|
||||
default:
|
||||
break;
|
||||
@ -5756,7 +5758,7 @@ QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, c
|
||||
case SE_CheckBoxClickRect: // relies on indicator and contents
|
||||
return ParentStyle::subElementRect(se, opt, w);
|
||||
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
case SE_ViewItemCheckIndicator:
|
||||
if (!qstyleoption_cast<const QStyleOptionViewItem *>(opt)) {
|
||||
return subElementRect(SE_CheckBoxIndicator, opt, w);
|
||||
@ -5785,7 +5787,7 @@ QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, c
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
#endif // QT_CONFIG(itemviews)
|
||||
|
||||
case SE_HeaderArrow: {
|
||||
QRenderRule subRule = renderRule(w, opt, PseudoElement_HeaderViewUpArrow);
|
||||
|
@ -1438,7 +1438,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
|
||||
}
|
||||
}
|
||||
break;
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
case CE_ItemViewItem:
|
||||
{
|
||||
const QStyleOptionViewItem *vopt;
|
||||
@ -1473,7 +1473,7 @@ void QWindowsVistaStyle::drawControl(ControlElement element, const QStyleOption
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif // QT_NO_ITEMVIEWS
|
||||
#endif // QT_CONFIG(itemviews)
|
||||
#if QT_CONFIG(combobox)
|
||||
case CE_ComboBoxLabel:
|
||||
QCommonStyle::drawControl(element, option, painter, widget);
|
||||
|
@ -40,7 +40,9 @@
|
||||
#include "private/qabstractbutton_p.h"
|
||||
|
||||
#include "private/qbuttongroup_p.h"
|
||||
#if QT_CONFIG(itemviews)
|
||||
#include "qabstractitemview.h"
|
||||
#endif
|
||||
#include "qbuttongroup.h"
|
||||
#include "qabstractbutton_p.h"
|
||||
#include "qevent.h"
|
||||
@ -1071,7 +1073,7 @@ void QAbstractButton::keyPressEvent(QKeyEvent *e)
|
||||
#ifndef QT_NO_BUTTONGROUP
|
||||
|| d->group
|
||||
#endif
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
|| (pw && qobject_cast<QAbstractItemView *>(pw->parentWidget()))
|
||||
#endif
|
||||
) {
|
||||
|
@ -50,7 +50,9 @@
|
||||
#include "qboxlayout.h"
|
||||
#include "qpainter.h"
|
||||
#include "qmargins.h"
|
||||
#if QT_CONFIG(itemviews)
|
||||
#include "qheaderview.h"
|
||||
#endif
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
|
@ -68,7 +68,9 @@
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
#if QT_CONFIG(itemviews)
|
||||
#include "qabstractitemview.h"
|
||||
#endif
|
||||
#include "private/qstylesheetstyle_p.h"
|
||||
|
||||
#ifndef QT_NO_SHORTCUT
|
||||
|
@ -43,7 +43,9 @@
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
|
||||
#include "qvariant.h"
|
||||
#if QT_CONFIG(itemviews)
|
||||
#include "qabstractitemview.h"
|
||||
#endif
|
||||
#include "qdrag.h"
|
||||
#include "qwidgetaction.h"
|
||||
#include "qclipboard.h"
|
||||
|
@ -85,7 +85,7 @@ private:
|
||||
|
||||
Q_DISABLE_COPY(QScrollBar)
|
||||
Q_DECLARE_PRIVATE(QScrollBar)
|
||||
#ifndef QT_NO_ITEMVIEWS
|
||||
#if QT_CONFIG(itemviews)
|
||||
friend class QTableView;
|
||||
friend class QTreeViewPrivate;
|
||||
friend class QCommonListViewBase;
|
||||
|
@ -38,7 +38,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "private/qlayoutengine_p.h"
|
||||
#if QT_CONFIG(itemviews)
|
||||
#include "qabstractitemdelegate.h"
|
||||
#endif
|
||||
#include "qapplication.h"
|
||||
#include "qbitmap.h"
|
||||
#include "qcursor.h"
|
||||
|
@ -41,7 +41,9 @@
|
||||
|
||||
#ifndef QT_NO_LINEEDIT
|
||||
|
||||
#if QT_CONFIG(itemviews)
|
||||
#include "qabstractitemview.h"
|
||||
#endif
|
||||
#include "qclipboard.h"
|
||||
#include <private/qguiapplication_p.h>
|
||||
#include <qpa/qplatformtheme.h>
|
||||
|
Loading…
Reference in New Issue
Block a user