Convert features.tableview to QT_[REQUIRE_]CONFIG
Change-Id: I7ab479deff7bbf3083d1efa196e0480b181548c5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>bb10
parent
6cd46c9a61
commit
01703d0264
|
|
@ -46,7 +46,6 @@
|
|||
#include <qtabbar.h>
|
||||
#include <qcombobox.h>
|
||||
#include <qlistview.h>
|
||||
#include <qtableview.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qstyle.h>
|
||||
#include <qstyleoption.h>
|
||||
|
|
|
|||
|
|
@ -40,7 +40,9 @@
|
|||
#include "itemviews_p.h"
|
||||
|
||||
#include <qheaderview.h>
|
||||
#if QT_CONFIG(tableview)
|
||||
#include <qtableview.h>
|
||||
#endif
|
||||
#include <qlistview.h>
|
||||
#include <qtreeview.h>
|
||||
#include <private/qtreeview_p.h>
|
||||
|
|
@ -81,7 +83,7 @@ QAccessibleTable::QAccessibleTable(QWidget *w)
|
|||
{
|
||||
Q_ASSERT(view());
|
||||
|
||||
#ifndef QT_NO_TABLEVIEW
|
||||
#if QT_CONFIG(tableview)
|
||||
if (qobject_cast<const QTableView*>(view())) {
|
||||
m_role = QAccessible::Table;
|
||||
} else
|
||||
|
|
@ -117,7 +119,7 @@ QHeaderView *QAccessibleTable::horizontalHeader() const
|
|||
{
|
||||
QHeaderView *header = 0;
|
||||
if (false) {
|
||||
#ifndef QT_NO_TABLEVIEW
|
||||
#if QT_CONFIG(tableview)
|
||||
} else if (const QTableView *tv = qobject_cast<const QTableView*>(view())) {
|
||||
header = tv->horizontalHeader();
|
||||
#endif
|
||||
|
|
@ -133,7 +135,7 @@ QHeaderView *QAccessibleTable::verticalHeader() const
|
|||
{
|
||||
QHeaderView *header = 0;
|
||||
if (false) {
|
||||
#ifndef QT_NO_TABLEVIEW
|
||||
#if QT_CONFIG(tableview)
|
||||
} else if (const QTableView *tv = qobject_cast<const QTableView*>(view())) {
|
||||
header = tv->verticalHeader();
|
||||
#endif
|
||||
|
|
@ -866,7 +868,7 @@ QHeaderView *QAccessibleTableCell::horizontalHeader() const
|
|||
QHeaderView *header = 0;
|
||||
|
||||
if (false) {
|
||||
#ifndef QT_NO_TABLEVIEW
|
||||
#if QT_CONFIG(tableview)
|
||||
} else if (const QTableView *tv = qobject_cast<const QTableView*>(view)) {
|
||||
header = tv->horizontalHeader();
|
||||
#endif
|
||||
|
|
@ -882,7 +884,7 @@ QHeaderView *QAccessibleTableCell::horizontalHeader() const
|
|||
QHeaderView *QAccessibleTableCell::verticalHeader() const
|
||||
{
|
||||
QHeaderView *header = 0;
|
||||
#ifndef QT_NO_TABLEVIEW
|
||||
#if QT_CONFIG(tableview)
|
||||
if (const QTableView *tv = qobject_cast<const QTableView*>(view))
|
||||
header = tv->verticalHeader();
|
||||
#endif
|
||||
|
|
@ -1125,7 +1127,7 @@ QRect QAccessibleTableHeaderCell::rect() const
|
|||
{
|
||||
QHeaderView *header = 0;
|
||||
if (false) {
|
||||
#ifndef QT_NO_TABLEVIEW
|
||||
#if QT_CONFIG(tableview)
|
||||
} else if (const QTableView *tv = qobject_cast<const QTableView*>(view)) {
|
||||
if (orientation == Qt::Horizontal) {
|
||||
header = tv->horizontalHeader();
|
||||
|
|
@ -1192,7 +1194,7 @@ QHeaderView *QAccessibleTableHeaderCell::headerView() const
|
|||
{
|
||||
QHeaderView *header = 0;
|
||||
if (false) {
|
||||
#ifndef QT_NO_TABLEVIEW
|
||||
#if QT_CONFIG(tableview)
|
||||
} else if (const QTableView *tv = qobject_cast<const QTableView*>(view)) {
|
||||
if (orientation == Qt::Horizontal) {
|
||||
header = tv->horizontalHeader();
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ HEADERS += \
|
|||
itemviews/qlistview.h \
|
||||
itemviews/qlistview_p.h \
|
||||
itemviews/qbsptree_p.h \
|
||||
itemviews/qtableview.h \
|
||||
itemviews/qtableview_p.h \
|
||||
itemviews/qtreeview.h \
|
||||
itemviews/qtreeview_p.h \
|
||||
itemviews/qabstractitemdelegate.h \
|
||||
|
|
@ -28,7 +26,6 @@ SOURCES += \
|
|||
itemviews/qheaderview.cpp \
|
||||
itemviews/qlistview.cpp \
|
||||
itemviews/qbsptree.cpp \
|
||||
itemviews/qtableview.cpp \
|
||||
itemviews/qtreeview.cpp \
|
||||
itemviews/qabstractitemdelegate.cpp \
|
||||
itemviews/qitemdelegate.cpp \
|
||||
|
|
@ -57,6 +54,14 @@ qtConfig(listwidget) {
|
|||
SOURCES += itemviews/qlistwidget.cpp
|
||||
}
|
||||
|
||||
qtConfig(tableview) {
|
||||
HEADERS += \
|
||||
itemviews/qtableview.h \
|
||||
itemviews/qtableview_p.h
|
||||
|
||||
SOURCES += itemviews/qtableview.cpp
|
||||
}
|
||||
|
||||
qtConfig(tablewidget) {
|
||||
HEADERS += \
|
||||
itemviews/qtablewidget.h \
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@
|
|||
#include <qlineedit.h>
|
||||
#include <qspinbox.h>
|
||||
#include <qtreeview.h>
|
||||
#include <qtableview.h>
|
||||
#include <qheaderview.h>
|
||||
#include <qstyleditemdelegate.h>
|
||||
#include <private/qabstractitemview_p.h>
|
||||
|
|
|
|||
|
|
@ -67,7 +67,9 @@
|
|||
#include <private/qlayoutengine_p.h>
|
||||
#include <qdebug.h>
|
||||
#include <qlocale.h>
|
||||
#if QT_CONFIG(tableview)
|
||||
#include <qtableview.h>
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
|
|
@ -500,7 +502,7 @@ void QStyledItemDelegate::updateEditorGeometry(QWidget *editor,
|
|||
// let the editor take up all available space
|
||||
//if the editor is not a QLineEdit
|
||||
//or it is in a QTableView
|
||||
#if !defined(QT_NO_TABLEVIEW) && !defined(QT_NO_LINEEDIT)
|
||||
#if QT_CONFIG(tableview) && !defined(QT_NO_LINEEDIT)
|
||||
if (qobject_cast<QExpandingLineEdit*>(editor) && !qobject_cast<const QTableView*>(widget))
|
||||
opt.showDecorationSelected = editor->style()->styleHint(QStyle::SH_ItemView_ShowDecorationSelected, 0, editor);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
|
||||
#include "qtableview.h"
|
||||
|
||||
#ifndef QT_NO_TABLEVIEW
|
||||
#include <qheaderview.h>
|
||||
#include <qitemdelegate.h>
|
||||
#include <qapplication.h>
|
||||
|
|
@ -3352,5 +3351,3 @@ QT_END_NAMESPACE
|
|||
#include "qtableview.moc"
|
||||
|
||||
#include "moc_qtableview.cpp"
|
||||
|
||||
#endif // QT_NO_TABLEVIEW
|
||||
|
|
|
|||
|
|
@ -43,11 +43,10 @@
|
|||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#include <QtWidgets/qabstractitemview.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(tableview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_TABLEVIEW
|
||||
|
||||
class QHeaderView;
|
||||
class QTableViewPrivate;
|
||||
|
||||
|
|
@ -191,8 +190,6 @@ private:
|
|||
Q_PRIVATE_SLOT(d_func(), void _q_updateSpanRemovedColumns(QModelIndex,int,int))
|
||||
};
|
||||
|
||||
#endif // QT_NO_TABLEVIEW
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QTABLEVIEW_H
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
#include <QtCore/QDebug>
|
||||
#include "private/qabstractitemview_p.h"
|
||||
|
||||
#ifndef QT_NO_TABLEVIEW
|
||||
QT_REQUIRE_CONFIG(tableview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
@ -261,6 +261,4 @@ public:
|
|||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_TABLEVIEW
|
||||
|
||||
#endif // QTABLEVIEW_P_H
|
||||
|
|
|
|||
|
|
@ -89,7 +89,9 @@
|
|||
#include <qtoolbar.h>
|
||||
#include <qtoolbutton.h>
|
||||
#include <qtreeview.h>
|
||||
#if QT_CONFIG(tableview)
|
||||
#include <qtableview.h>
|
||||
#endif
|
||||
#include <qoperatingsystemversion.h>
|
||||
#if QT_CONFIG(wizard)
|
||||
#include <qwizard.h>
|
||||
|
|
@ -3722,7 +3724,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
|||
HIRect bounds = qt_hirectForQRect(ir);
|
||||
|
||||
bool noVerticalHeader = true;
|
||||
#ifndef QT_NO_TABLEVIEW
|
||||
#if QT_CONFIG(tableview)
|
||||
if (w)
|
||||
if (const QTableView *table = qobject_cast<const QTableView *>(w->parentWidget()))
|
||||
noVerticalHeader = !table->verticalHeader()->isVisible();
|
||||
|
|
|
|||
|
|
@ -94,7 +94,9 @@
|
|||
#include <qtoolbar.h>
|
||||
#include <qtoolbutton.h>
|
||||
#include <qtreeview.h>
|
||||
#if QT_CONFIG(tableview)
|
||||
#include <qtableview.h>
|
||||
#endif
|
||||
#include <qdebug.h>
|
||||
#if QT_CONFIG(datetimeedit)
|
||||
#include <qdatetimeedit.h>
|
||||
|
|
|
|||
|
|
@ -84,7 +84,9 @@
|
|||
#include <qdialogbuttonbox.h>
|
||||
#endif
|
||||
#include <qinputdialog.h>
|
||||
#if QT_CONFIG(tableview)
|
||||
#include <qtableview.h>
|
||||
#endif
|
||||
#include <qdatetime.h>
|
||||
#include <qcommandlinkbutton.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,9 @@
|
|||
#include <qapplication.h>
|
||||
#include <qdesktopwidget.h>
|
||||
#include <qlistview.h>
|
||||
#if QT_CONFIG(tableview)
|
||||
#include <qtableview.h>
|
||||
#endif
|
||||
#include <qitemdelegate.h>
|
||||
#include <qmap.h>
|
||||
#include <qmenu.h>
|
||||
|
|
@ -598,7 +600,7 @@ int QComboBoxPrivateContainer::topMargin() const
|
|||
{
|
||||
if (const QListView *lview = qobject_cast<const QListView*>(view))
|
||||
return lview->spacing();
|
||||
#ifndef QT_NO_TABLEVIEW
|
||||
#if QT_CONFIG(tableview)
|
||||
if (const QTableView *tview = qobject_cast<const QTableView*>(view))
|
||||
return tview->showGrid() ? 1 : 0;
|
||||
#endif
|
||||
|
|
@ -613,7 +615,7 @@ int QComboBoxPrivateContainer::spacing() const
|
|||
QListView *lview = qobject_cast<QListView*>(view);
|
||||
if (lview)
|
||||
return 2 * lview->spacing(); // QListView::spacing is the padding around the item.
|
||||
#ifndef QT_NO_TABLEVIEW
|
||||
#if QT_CONFIG(tableview)
|
||||
QTableView *tview = qobject_cast<QTableView*>(view);
|
||||
if (tview)
|
||||
return tview->showGrid() ? 1 : 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue