From: Ivailo Monev Date: Sun, 27 Feb 2022 12:17:58 +0000 (+0200) Subject: build fix for the case when QT_NO_WHEELEVENT is defined X-Git-Tag: 4.12.0~845 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f07ccf82bfe53408a4e3810212191e9663969b87;p=kde%2FKatie.git build fix for the case when QT_NO_WHEELEVENT is defined Signed-off-by: Ivailo Monev --- diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index f313243d4..ddc4f7133 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -337,8 +337,6 @@ int QApplicationPrivate::mouse_double_click_time = 400; // mouse dbl clic int QApplicationPrivate::keyboard_input_time = 400; // keyboard input interval #ifndef QT_NO_WHEELEVENT int QApplicationPrivate::wheel_scroll_lines = 3; // number of lines to scroll -#else -int QApplicationPrivate::wheel_scroll_lines = 0; #endif bool qt_in_tab_key_event = false; static int drag_time = 500; diff --git a/src/tools/qtconfig/mainwindow.cpp b/src/tools/qtconfig/mainwindow.cpp index d932b20d0..9ac925ccb 100644 --- a/src/tools/qtconfig/mainwindow.cpp +++ b/src/tools/qtconfig/mainwindow.cpp @@ -201,7 +201,12 @@ MainWindow::MainWindow() ui->doubleClickIntervalSpinBox->setValue(QApplication::doubleClickInterval()); ui->cursorFlashTimeSpinBox->setValue(QApplication::cursorFlashTime()); +#ifndef QT_NO_WHEELEVENT ui->wheelScrollLinesSpinBox->setValue(QApplication::wheelScrollLines()); +#else // QT_NO_WHEELEVENT + ui->wheelScrollLinesLabel->hide(); + ui->wheelScrollLinesSpinBox->hide(); +#endif // QT_NO_WHEELEVENT // ############# // resolveLinksCheckBox->setChecked(qt_resolve_symlinks); diff --git a/tests/auto/qabstractslider/tst_qabstractslider.cpp b/tests/auto/qabstractslider/tst_qabstractslider.cpp index 64375ac66..1abc599f3 100644 --- a/tests/auto/qabstractslider/tst_qabstractslider.cpp +++ b/tests/auto/qabstractslider/tst_qabstractslider.cpp @@ -802,6 +802,7 @@ void tst_QAbstractSlider::wheelEvent_data() void tst_QAbstractSlider::wheelEvent() { +#ifndef QT_NO_WHEELEVENT QFETCH(int,initialSliderPosition); QFETCH(int,minimum); QFETCH(int,maximum); @@ -848,6 +849,9 @@ void tst_QAbstractSlider::wheelEvent() QCOMPARE(spy2.count(), expectedSignalCount); if (expectedSignalCount) QVERIFY(actionTriggeredTimeStamp < valueChangedTimeStamp); +#else // QT_NO_WHEELEVENT + QSKIP("Katie compiled without wheel event support (QT_NO_WHEELEVENT)", SkipAll); +#endif // QT_NO_WHEELEVENT } void tst_QAbstractSlider::sliderPressedReleased_data()