diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2018-04-13 09:01:43 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2018-05-29 18:31:35 +0000 |
commit | 9f27bfb31acfba49a74a342d9249f24633a7ade2 (patch) | |
tree | b156192def25d688ff924b60f1c8defadd86c351 /tests/auto | |
parent | dd8e73504edbf71808d6585b7a08daddcdcbf18e (diff) |
Make sure we can build with -no-feature-draganddrop
We move QInternalMimeData to a separate file, because this class is
used, even if draganddrop is disabled. From now on, include
qinternalmimedata_p.h instead of qdnd_p.h for QInternalMimeData.
Change-Id: I594e08e2e90d574dc445119091686b4b69e4731b
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'tests/auto')
9 files changed, 21 insertions, 21 deletions
diff --git a/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp b/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp index b7d57dea55..a45539a041 100644 --- a/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp +++ b/tests/auto/gui/itemmodels/qstandarditem/tst_qstandarditem.cpp @@ -256,7 +256,7 @@ void tst_QStandardItem::getSetFlags() item.setAutoTristate(true); QVERIFY(item.isAutoTristate()); QVERIFY(item.flags() & Qt::ItemIsAutoTristate); -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) item.setDragEnabled(true); QVERIFY(item.isDragEnabled()); QVERIFY(item.flags() & Qt::ItemIsDragEnabled); @@ -287,7 +287,7 @@ void tst_QStandardItem::getSetFlags() item.setAutoTristate(false); QVERIFY(!item.isAutoTristate()); QVERIFY(!(item.flags() & Qt::ItemIsAutoTristate)); -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) QVERIFY(item.isDragEnabled()); item.setDragEnabled(false); QVERIFY(!item.isDragEnabled()); diff --git a/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp b/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp index 1ecfdb5e47..9399ebce34 100644 --- a/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp +++ b/tests/auto/gui/itemmodels/qstandarditemmodel/tst_qstandarditemmodel.cpp @@ -1426,7 +1426,7 @@ void tst_QStandardItemModel::rootItemFlags() QCOMPARE(model.invisibleRootItem()->flags() , f); QCOMPARE(model.invisibleRootItem()->flags() , model.flags(QModelIndex())); -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) model.invisibleRootItem()->setDropEnabled(false); #endif QCOMPARE(model.invisibleRootItem()->flags() , Qt::ItemIsEnabled); @@ -1560,7 +1560,7 @@ void tst_QStandardItemModel::treeDragAndDrop() view.setModel(&model); view.expandAll(); view.show(); -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) view.setDragDropMode(QAbstractItemView::InternalMove); #endif view.setSelectionMode(QAbstractItemView::ExtendedSelection); diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp index 0071c39f49..b256aab3e7 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp @@ -210,7 +210,7 @@ private slots: void mouseEventPropagation_focus(); void mouseEventPropagation_doubleclick(); void mouseEventPropagation_mouseMove(); -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) void dragAndDrop_simple(); void dragAndDrop_disabledOrInvisible(); void dragAndDrop_propagate(); @@ -2204,7 +2204,7 @@ private: } }; -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) void tst_QGraphicsScene::dragAndDrop_simple() { DndTester *item = new DndTester(QRectF(-10, -10, 20, 20)); diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp index f52bbce53a..fe5b320492 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -206,7 +206,7 @@ private slots: void resizeAnchor(); void viewportUpdateMode(); void viewportUpdateMode2(); -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) void acceptDrops(); #endif void optimizationFlags(); @@ -2561,7 +2561,7 @@ void tst_QGraphicsView::viewportUpdateMode2() #endif } -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) void tst_QGraphicsView::acceptDrops() { QGraphicsView view; diff --git a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp index 231474c71c..58a66f99b4 100644 --- a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp +++ b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp @@ -238,7 +238,7 @@ void tst_QAbstractItemView::getSetCheck() // bool QAbstractItemView::dragEnabled() // void QAbstractItemView::setDragEnabled(bool) -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) obj1->setDragEnabled(false); QCOMPARE(false, obj1->dragEnabled()); obj1->setDragEnabled(true); @@ -415,7 +415,7 @@ void tst_QAbstractItemView::basic_tests(QAbstractItemView *view) view->setTabKeyNavigation(true); QCOMPARE(view->tabKeyNavigation(), true); -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) // setDropIndicatorShown view->setDropIndicatorShown(false); QCOMPARE(view->showDropIndicator(), false); @@ -527,7 +527,7 @@ void tst_QAbstractItemView::basic_tests(QAbstractItemView *view) view->selectionCommand(QModelIndex(), 0); -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) if (!view->model()) view->startDrag(Qt::CopyAction); diff --git a/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp b/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp index f1239b2e7c..afd6d84486 100644 --- a/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp +++ b/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp @@ -327,7 +327,7 @@ void tst_QItemView::nonDestructiveBasicTest() QCOMPARE(view->tabKeyNavigation(), false); view->setTabKeyNavigation(true); QCOMPARE(view->tabKeyNavigation(), true); -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) // setDropIndicatorShown view->setDropIndicatorShown(false); QCOMPARE(view->showDropIndicator(), false); diff --git a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp index 4c637573d0..1ea1843abe 100644 --- a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp +++ b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp @@ -37,7 +37,7 @@ using namespace QTestPrivate; -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) Q_DECLARE_METATYPE(QAbstractItemView::DragDropMode) #endif Q_DECLARE_METATYPE(QAbstractItemView::EditTriggers) @@ -76,7 +76,7 @@ private slots: void alternatingRowColors(); void currentIndex_data(); void currentIndex(); -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) void dragDropMode_data(); void dragDropMode(); void dragDropModeFromDragEnabledAndAcceptDrops_data(); @@ -440,7 +440,7 @@ void tst_QTreeView::construction() // QAbstractItemView properties QVERIFY(!view.alternatingRowColors()); QCOMPARE(view.currentIndex(), QModelIndex()); -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) QCOMPARE(view.dragDropMode(), QAbstractItemView::NoDragDrop); QVERIFY(!view.dragDropOverwriteMode()); QVERIFY(!view.dragEnabled()); @@ -463,7 +463,7 @@ void tst_QTreeView::construction() QCOMPARE(view.selectionBehavior(), QAbstractItemView::SelectRows); QCOMPARE(view.selectionMode(), QAbstractItemView::SingleSelection); QVERIFY(!view.selectionModel()); -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) QVERIFY(view.showDropIndicator()); #endif QCOMPARE(view.QAbstractItemView::sizeHintForColumn(-1), -1); // <- protected in QTreeView @@ -573,7 +573,7 @@ void tst_QTreeView::currentIndex() // ### Test child and grandChild indexes. } -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) void tst_QTreeView::dragDropMode_data() { diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 47ffee1501..6a049aedf1 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -171,7 +171,7 @@ private slots: void enabledPropagation(); void ignoreKeyEventsWhenDisabled_QTBUG27417(); void properTabHandlingWhenDisabled_QTBUG27417(); -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) void acceptDropsPropagation(); #endif void isEnabledTo(); @@ -1048,7 +1048,7 @@ void tst_QWidget::properTabHandlingWhenDisabled_QTBUG27417() } // Drag'n drop disabled in this build. -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) void tst_QWidget::acceptDropsPropagation() { QScopedPointer<QWidget> testWidget(new QWidget); diff --git a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp index 1d2bb00678..b143555b0d 100644 --- a/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp +++ b/tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp @@ -81,7 +81,7 @@ private slots: void tst_paintEventOnSecondShow(); void tst_paintEventOnResize_QTBUG50796(); -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) void tst_dnd(); #endif @@ -393,7 +393,7 @@ void tst_QWidget_window::tst_paintEventOnResize_QTBUG50796() QTRY_COMPARE(native->paintEventCount, 1); // Only one paint event must occur } -#ifndef QT_NO_DRAGANDDROP +#if QT_CONFIG(draganddrop) /* DnD test for QWidgetWindow (handleDrag*Event() functions). * Simulates a drop onto a QWidgetWindow of a top level widget |