summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp10
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp6
-rw-r--r--tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp10
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp6
-rw-r--r--tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp6
-rw-r--r--tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp8
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp6
-rw-r--r--tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp4
-rw-r--r--tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp4
-rw-r--r--tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp4
10 files changed, 32 insertions, 32 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index 65c9938f89..e49cd87941 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -112,7 +112,7 @@ private slots:
void resizeEvent_data();
void resizeEvent();
void paintEvent();
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void wheelEvent();
#endif
void sizeHint_data();
@@ -254,7 +254,7 @@ public:
int focusOut;
};
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
class WheelWidget : public QWidget
{
public:
@@ -264,7 +264,7 @@ public:
bool wheelEventCalled;
};
-#endif // !QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
// This will be called before the first test function is executed.
// It is only called once.
@@ -1297,7 +1297,7 @@ void tst_QGraphicsProxyWidget::paintEvent()
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void tst_QGraphicsProxyWidget::wheelEvent()
{
QGraphicsScene scene;
@@ -1321,7 +1321,7 @@ void tst_QGraphicsProxyWidget::wheelEvent()
QVERIFY(event.isAccepted());
QVERIFY(wheelWidget->wheelEventCalled);
}
-#endif // !QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
Q_DECLARE_METATYPE(Qt::SizeHint)
void tst_QGraphicsProxyWidget::sizeHint_data()
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
index 1a96180c05..121836234d 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
@@ -199,7 +199,7 @@ private slots:
void mapFromScenePoly();
void mapFromScenePath();
void sendEvent();
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void wheelEvent();
#endif
#ifndef QT_NO_CURSOR
@@ -2188,7 +2188,7 @@ void tst_QGraphicsView::sendEvent()
QCOMPARE(item->events.last(), QEvent::KeyPress);
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
class MouseWheelScene : public QGraphicsScene
{
public:
@@ -2245,7 +2245,7 @@ void tst_QGraphicsView::wheelEvent()
QCOMPARE(spy.count(), 2);
QVERIFY(widget->hasFocus());
}
-#endif // !QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
#ifndef QT_NO_CURSOR
void tst_QGraphicsView::cursor()
diff --git a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
index cf8ee310d3..5c0bb67825 100644
--- a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
+++ b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
@@ -180,7 +180,7 @@ private slots:
void task191545_dragSelectRows();
void taskQTBUG_5062_spansInconsistency();
void taskQTBUG_4516_clickOnRichTextLabel();
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void taskQTBUG_5237_wheelEventOnHeader();
#endif
void taskQTBUG_8585_crashForNoGoodReason();
@@ -190,7 +190,7 @@ private slots:
void taskQTBUG_30653_doItemsLayout();
void taskQTBUG_50171_selectRowAfterSwapColumns();
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void mouseWheel_data();
void mouseWheel();
#endif
@@ -3966,7 +3966,7 @@ void tst_QTableView::task248688_autoScrollNavigation()
}
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void tst_QTableView::mouseWheel_data()
{
QTest::addColumn<int>("scrollMode");
@@ -4019,7 +4019,7 @@ void tst_QTableView::mouseWheel()
QApplication::sendEvent(view.viewport(), &verticalEvent);
QVERIFY(qAbs(view.verticalScrollBar()->value() - verticalPosition) < 15);
}
-#endif // !QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
void tst_QTableView::addColumnWhileEditing()
{
@@ -4283,7 +4283,7 @@ void tst_QTableView::changeHeaderData()
QVERIFY(view.verticalHeader()->width() > textWidth);
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void tst_QTableView::taskQTBUG_5237_wheelEventOnHeader()
{
QTableView view;
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index b98cc048c8..6ff38abdb8 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -140,7 +140,7 @@ private slots:
void execAfterExit();
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void wheelScrollLines();
#endif
@@ -1773,7 +1773,7 @@ void tst_QApplication::execAfterExit()
QCOMPARE(exitCode, 0);
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void tst_QApplication::wheelScrollLines()
{
int argc = 1;
@@ -1781,7 +1781,7 @@ void tst_QApplication::wheelScrollLines()
// If wheelScrollLines returns 0, the mose wheel will be disabled.
QVERIFY(app.wheelScrollLines() > 0);
}
-#endif // !QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
void tst_QApplication::style()
{
diff --git a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
index 17a5320433..f0d74e7797 100644
--- a/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
+++ b/tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
@@ -74,7 +74,7 @@ private slots:
void minimum_maximum();
void keyPressed_data();
void keyPressed();
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void wheelEvent_data();
void wheelEvent();
void fineGrainedWheelEvent_data();
@@ -690,7 +690,7 @@ void tst_QAbstractSlider::keyPressed()
QCOMPARE(slider->sliderPosition(), expectedSliderPositionVerticalInverted);
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void tst_QAbstractSlider::wheelEvent_data()
{
QTest::addColumn<int>("initialSliderPosition");
@@ -941,7 +941,7 @@ void tst_QAbstractSlider::fineGrainedWheelEvent()
QCOMPARE(slider->sliderPosition(), 1);
}
-#endif // !QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
void tst_QAbstractSlider::sliderPressedReleased_data()
{
diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
index b882055888..bf190cf60a 100644
--- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
@@ -120,11 +120,11 @@ private slots:
void flaggedItems_data();
void flaggedItems();
void pixmapIcon();
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void mouseWheel_data();
void mouseWheel();
void popupWheelHandling();
-#endif // !QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
void layoutDirection();
void itemListPosition();
void separatorItem_data();
@@ -2036,7 +2036,7 @@ void tst_QComboBox::pixmapIcon()
QCOMPARE( box.itemIcon(1).isNull(), false );
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
// defined to be 120 by the wheel mouse vendors according to the docs
#define WHEEL_DELTA 120
@@ -2133,7 +2133,7 @@ void tst_QComboBox::popupWheelHandling()
QVERIFY(comboBox->view()->isVisible());
QCOMPARE(comboBox->view()->pos(), popupPos);
}
-#endif // !QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
void tst_QComboBox::layoutDirection()
{
diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
index 9ab755c5f1..94e4fc005c 100644
--- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
+++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
@@ -205,7 +205,7 @@ private slots:
void reverseTest();
void ddMMMMyyyy();
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void wheelEvent();
#endif
@@ -2998,7 +2998,7 @@ void tst_QDateTimeEdit::ddMMMMyyyy()
QCOMPARE(testWidget->lineEdit()->text(), "01." + QDate::longMonthName(1) + ".200");
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void tst_QDateTimeEdit::wheelEvent()
{
testWidget->setDisplayFormat("dddd/MM");
@@ -3011,7 +3011,7 @@ void tst_QDateTimeEdit::wheelEvent()
qApp->sendEvent(testWidget, &w);
QCOMPARE(testWidget->date(), QDate(2000, 3, 22));
}
-#endif // !QT_NO_WHEELEVENT
+#endif // QT_CONFIG(wheelevent)
void tst_QDateTimeEdit::specialValueCornerCase()
{
diff --git a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
index 08ef96bf1b..5238eea592 100644
--- a/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
+++ b/tests/auto/widgets/widgets/qscrollbar/tst_qscrollbar.cpp
@@ -50,7 +50,7 @@ class tst_QScrollBar : public QObject
private slots:
void scrollSingleStep();
void task_209492();
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void QTBUG_27308();
#endif
void QTBUG_42871();
@@ -143,7 +143,7 @@ void tst_QScrollBar::task_209492()
QCOMPARE(spy.count(), 1);
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
#define WHEEL_DELTA 120 // copied from tst_QAbstractSlider / tst_QComboBox
void tst_QScrollBar::QTBUG_27308()
{
diff --git a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
index 808c7f9d3d..07a2fd859d 100644
--- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
+++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
@@ -69,7 +69,7 @@ public:
{
return QSpinBox::valueFromText(text);
}
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void wheelEvent(QWheelEvent *event)
{
QSpinBox::wheelEvent(event);
@@ -1218,7 +1218,7 @@ void tst_QSpinBox::setGroupSeparatorShown()
void tst_QSpinBox::wheelEvents()
{
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
SpinBox spinBox;
spinBox.setRange(-20, 20);
spinBox.setValue(0);
diff --git a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
index bc94e2a05b..55ef44f4e0 100644
--- a/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
@@ -199,7 +199,7 @@ private slots:
void findWithRegExpReturnsFalseIfNoMoreResults();
#endif
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
void wheelEvent();
#endif
@@ -2566,7 +2566,7 @@ void tst_QTextEdit::findWithRegExpReturnsFalseIfNoMoreResults()
}
#endif
-#ifndef QT_NO_WHEELEVENT
+#if QT_CONFIG(wheelevent)
class TextEdit : public QTextEdit
{