diff options
Diffstat (limited to 'tests/auto/widgets')
20 files changed, 86 insertions, 71 deletions
diff --git a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp index ac7ba02700..d3bc83fe6d 100644 --- a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp +++ b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp @@ -339,7 +339,7 @@ void tst_QDialog::showFullScreen() QVERIFY(dialog.isFullScreen()); QVERIFY(!dialog.isVisible()); - dialog.show(); + dialog.setVisible(true); QVERIFY(dialog.isFullScreen()); QVERIFY(dialog.isVisible()); diff --git a/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp b/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp index 0ea9e0259f..4ea0de5ab9 100644 --- a/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp +++ b/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp @@ -349,11 +349,12 @@ void tst_QInputDialog::taskQTBUG_54693_crashWhenParentIsDeletedWhileDialogIsOpen } // getItem - for (int editable = false; editable <= true; ++editable) { + for (int editable = 0; editable < 2; ++editable) { QAutoPointer<SelfDestructParent> dialog(new SelfDestructParent); bool ok = true; const QString result = QInputDialog::getItem(dialog.get(), "Title", "Label", - QStringList() << "1" << "2", 1, editable, &ok); + QStringList() << "1" << "2", 1, + editable != 0, &ok); QVERIFY(!dialog); QVERIFY(!ok); QCOMPARE(result, QLatin1String("2")); diff --git a/tests/auto/widgets/dialogs/qprogressdialog/BLACKLIST b/tests/auto/widgets/dialogs/qprogressdialog/BLACKLIST index a2670e8f36..1789f51507 100644 --- a/tests/auto/widgets/dialogs/qprogressdialog/BLACKLIST +++ b/tests/auto/widgets/dialogs/qprogressdialog/BLACKLIST @@ -1,2 +1,2 @@ -[autoShow:50_to_100_fast_0_compat] -osx +[autoShow] +osx ci diff --git a/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp index 4d289dcb02..a1cb729849 100644 --- a/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp +++ b/tests/auto/widgets/effects/qgraphicseffect/tst_qgraphicseffect.cpp @@ -52,7 +52,6 @@ private slots: void boundingRect2(); void draw(); void opacity(); - void nestedOpaqueOpacity(); void grayscale(); void colorize(); void drawPixmapItem(); @@ -408,26 +407,6 @@ void tst_QGraphicsEffect::opacity() QCOMPARE(effect->m_opacity, qreal(0.5)); } -void tst_QGraphicsEffect::nestedOpaqueOpacity() -{ - // QTBUG-60231: Nesting widgets with a QGraphicsEffect on a toplevel with - // QGraphicsOpacityEffect caused crashes due to constructing several - // QPainter instances on a device in the fast path for - // QGraphicsOpacityEffect::opacity=1 - QWidget topLevel; - topLevel.setWindowTitle(QTest::currentTestFunction()); - topLevel.resize(QApplication::desktop()->screenGeometry(&topLevel).size() / 8); - QGraphicsOpacityEffect *opacityEffect = new QGraphicsOpacityEffect; - opacityEffect->setOpacity(1); - topLevel.setGraphicsEffect(opacityEffect); - QWidget *child = new QWidget(&topLevel); - child->resize(topLevel.size() / 2); - QGraphicsDropShadowEffect *childEffect = new QGraphicsDropShadowEffect; - child->setGraphicsEffect(childEffect); - topLevel.show(); - QVERIFY(QTest::qWaitForWindowExposed(&topLevel)); -} - void tst_QGraphicsEffect::grayscale() { if (qApp->desktop()->depth() < 24) 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 6abd3f6366..1430911cf0 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..c75c1dc87e 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 @@ -693,12 +693,14 @@ void tst_QTableView::keyboardNavigation() case Qt::Key_Backtab: if (!tabKeyNavigation) break; + Q_FALLTHROUGH(); case Qt::Key_Left: column = qMax(0, column - 1); break; case Qt::Key_Tab: if (!tabKeyNavigation) break; + Q_FALLTHROUGH(); case Qt::Key_Right: column = qMin(columnCount - 1, column + 1); break; @@ -3966,7 +3968,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 +4021,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 +4285,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/itemviews/qtreewidget/tst_qtreewidget.cpp b/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp index f20805f97e..fa7f9596da 100644 --- a/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp +++ b/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp @@ -1560,10 +1560,9 @@ void tst_QTreeWidget::scrollToItem() { // Check if all parent nodes of the item found are expanded. // Reported in task #78761 - QTreeWidgetItem *bar; - QTreeWidgetItem *search; + QTreeWidgetItem *search = nullptr; for (int i=0; i<2; ++i) { - bar = new QTreeWidgetItem(testWidget); + QTreeWidgetItem *bar = new QTreeWidgetItem(testWidget); bar->setText(0, QString::number(i)); for (int j=0; j<2; ++j) { @@ -1571,9 +1570,8 @@ void tst_QTreeWidget::scrollToItem() foo->setText(0, bar->text(0) + QString::number(j)); for (int k=0; k<2; ++k) { - QTreeWidgetItem *yo = new QTreeWidgetItem(foo); - yo->setText(0, foo->text(0) + QString::number(k)); - search = yo; + search = new QTreeWidgetItem(foo); + search->setText(0, foo->text(0) + QString::number(k)); } } } @@ -1582,10 +1580,10 @@ void tst_QTreeWidget::scrollToItem() testWidget->scrollToItem(search); QCOMPARE(search->text(0), QLatin1String("111")); - bar = search->parent(); - QVERIFY(testWidget->isItemExpanded(bar)); - bar = bar->parent(); - QVERIFY(testWidget->isItemExpanded(bar)); + QTreeWidgetItem *par = search->parent(); + QVERIFY(testWidget->isItemExpanded(par)); + par = par->parent(); + QVERIFY(testWidget->isItemExpanded(par)); } // From task #85413 @@ -2663,7 +2661,7 @@ void tst_QTreeWidget::expandAndCallapse() { QTreeWidget tw; QTreeWidgetItem *top = new QTreeWidgetItem(&tw, QStringList() << "top"); - QTreeWidgetItem *p; + QTreeWidgetItem *p = nullptr; for (int i = 0; i < 10; ++i) { p = new QTreeWidgetItem(top, QStringList(QString::number(i))); for (int j = 0; j < 10; ++j) 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/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST index 01c8e783ad..ab45a342e3 100644 --- a/tests/auto/widgets/kernel/qwidget/BLACKLIST +++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST @@ -47,6 +47,7 @@ osx osx [showMinimizedKeepsFocus] osx-10.10 +osx-10.11 ci [moveWindowInShowEvent:1] osx [moveWindowInShowEvent:2] diff --git a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp index 937be944a1..f8095badb8 100644 --- a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp +++ b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp @@ -348,7 +348,7 @@ void tst_QCompleter::getSetCheck() completer.setWrapAround(false); QCOMPARE(completer.wrapAround(), false); -#ifndef QT_NO_FILESYSTEMMODEL +#if QT_CONFIG(filesystemmodel) // QTBUG-54642, changing from QFileSystemModel to another model should restore role. completer.setCompletionRole(Qt::EditRole); QCOMPARE(completer.completionRole(), static_cast<int>(Qt::EditRole)); // default value @@ -361,7 +361,7 @@ void tst_QCompleter::getSetCheck() QStandardItemModel standardItemModel2(2, 2); // Do not clobber a custom role when changing models completer.setModel(&standardItemModel2); QCOMPARE(completer.completionRole(), static_cast<int>(Qt::ToolTipRole)); -#endif // QT_NO_FILESYSTEMMODEL +#endif // QT_CONFIG(filesystemmodel) } void tst_QCompleter::csMatchingOnCsSortedModel_data() 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 75b75ad44c..2f4e1a32f3 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(); @@ -2037,7 +2037,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 @@ -2134,7 +2134,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/qmenu/BLACKLIST b/tests/auto/widgets/widgets/qmenu/BLACKLIST index de49d5ff45..ea468b378e 100644 --- a/tests/auto/widgets/widgets/qmenu/BLACKLIST +++ b/tests/auto/widgets/widgets/qmenu/BLACKLIST @@ -1,2 +1,4 @@ [task258920_mouseBorder] osx +[submenuTearOffDontClose] +osx-10.11 ci diff --git a/tests/auto/widgets/widgets/qopenglwidget/BLACKLIST b/tests/auto/widgets/widgets/qopenglwidget/BLACKLIST index fa326a6ea5..7825c33a0a 100644 --- a/tests/auto/widgets/widgets/qopenglwidget/BLACKLIST +++ b/tests/auto/widgets/widgets/qopenglwidget/BLACKLIST @@ -1,5 +1,6 @@ [clearAndGrab] opensuse-13.1 +ubuntu #QTBUG-31611 [painter] diff --git a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp index 009a607818..e10c7591d5 100644 --- a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp +++ b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp @@ -55,6 +55,7 @@ private slots: void painter(); void reparentToAlreadyCreated(); void reparentToNotYetCreated(); + void reparentHidden(); void asViewport(); void requestUpdate(); void fboRedirect(); @@ -283,6 +284,36 @@ void tst_QOpenGLWidget::reparentToNotYetCreated() QVERIFY(image.pixel(20, 10) == qRgb(0, 0, 255)); } +void tst_QOpenGLWidget::reparentHidden() +{ + // Tests QTBUG-60896 + QWidget topLevel1; + + QWidget *container = new QWidget(&topLevel1); + PainterWidget *glw = new PainterWidget(container); + topLevel1.resize(640, 480); + glw->resize(320, 200); + topLevel1.show(); + + glw->hide(); // Explicitly hidden + + QTest::qWaitForWindowExposed(&topLevel1); + + QWidget topLevel2; + topLevel2.resize(640, 480); + topLevel2.show(); + QTest::qWaitForWindowExposed(&topLevel2); + + QOpenGLContext *originalContext = glw->context(); + QVERIFY(originalContext); + + container->setParent(&topLevel2); + glw->show(); // Should get a new context now + + QOpenGLContext *newContext = glw->context(); + QVERIFY(originalContext != newContext); +} + class CountingGraphicsView : public QGraphicsView { public: 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 { |