Mercurial > octave
comparison m4/acinclude.m4 @ 29048:440ace36950e stable
avoid warnings about deprecated QWheelEvent::pos method
* TerminalView.cpp (TerminalView::wheelEvent):
Use QWheelEvent::position if available.
* Canvas.cc (Canvas::canvasWheelEvent): Likewise.
* acinclude.m4 (OCTAVE_CHECK_FUNC_QWHEELEVENT_POSITION): New macro.
(OCTAVE_CHECK_QT_VERSION): Use it.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 11 Nov 2020 23:18:47 -0500 |
parents | 94396ec1a89d |
children | 461bd8b9ce91 |
comparison
equal
deleted
inserted
replaced
29047:94396ec1a89d | 29048:440ace36950e |
---|---|
857 AC_LANG_POP(C++) | 857 AC_LANG_POP(C++) |
858 ]) | 858 ]) |
859 if test $octave_cv_func_qwheelevent_angledelta = yes; then | 859 if test $octave_cv_func_qwheelevent_angledelta = yes; then |
860 AC_DEFINE(HAVE_QWHEELEVENT_ANGLEDELTA, 1, | 860 AC_DEFINE(HAVE_QWHEELEVENT_ANGLEDELTA, 1, |
861 [Define to 1 if you have the `QWheelEvent::angleDelta' member function.]) | 861 [Define to 1 if you have the `QWheelEvent::angleDelta' member function.]) |
862 fi | |
863 ]) | |
864 dnl | |
865 dnl Check whether the Qt class QWheelEvent has the position member function. | |
866 dnl This member function was introduced in Qt 5.14. | |
867 dnl | |
868 AC_DEFUN([OCTAVE_CHECK_FUNC_QWHEELEVENT_POSITION], [ | |
869 AC_CACHE_CHECK([for QWheelEvent::position in <QWheelEvent>], | |
870 [octave_cv_func_qwheelevent_position], | |
871 [AC_LANG_PUSH(C++) | |
872 ac_octave_save_CPPFLAGS="$CPPFLAGS" | |
873 ac_octave_save_CXXFLAGS="$CXXFLAGS" | |
874 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" | |
875 CXXFLAGS="$CXXPICFLAG $CXXFLAGS" | |
876 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | |
877 #include <QWheelEvent> | |
878 void foo (const QWheelEvent& ev) | |
879 { | |
880 ev.position (); | |
881 }; | |
882 ]])], | |
883 octave_cv_func_qwheelevent_position=yes, | |
884 octave_cv_func_qwheelevent_position=no) | |
885 CPPFLAGS="$ac_octave_save_CPPFLAGS" | |
886 CXXFLAGS="$ac_octave_save_CXXFLAGS" | |
887 AC_LANG_POP(C++) | |
888 ]) | |
889 if test $octave_cv_func_qwheelevent_position = yes; then | |
890 AC_DEFINE(HAVE_QWHEELEVENT_POSITION, 1, | |
891 [Define to 1 if you have the `QWheelEvent::position' member function.]) | |
862 fi | 892 fi |
863 ]) | 893 ]) |
864 dnl | 894 dnl |
865 dnl Check whether Qt message handler function accepts QMessageLogContext | 895 dnl Check whether Qt message handler function accepts QMessageLogContext |
866 dnl argument. This change was introduced in Qt 5. | 896 dnl argument. This change was introduced in Qt 5. |
2403 OCTAVE_CHECK_FUNC_QOBJECT_FINDCHILDREN_ACCEPTS_FINDCHILDOPTIONS | 2433 OCTAVE_CHECK_FUNC_QOBJECT_FINDCHILDREN_ACCEPTS_FINDCHILDOPTIONS |
2404 OCTAVE_CHECK_FUNC_QSCREEN_DEVICEPIXELRATIO | 2434 OCTAVE_CHECK_FUNC_QSCREEN_DEVICEPIXELRATIO |
2405 OCTAVE_CHECK_FUNC_QTABWIDGET_SETMOVABLE | 2435 OCTAVE_CHECK_FUNC_QTABWIDGET_SETMOVABLE |
2406 OCTAVE_CHECK_FUNC_QTMESSAGEHANDLER_ACCEPTS_QMESSAGELOGCONTEXT | 2436 OCTAVE_CHECK_FUNC_QTMESSAGEHANDLER_ACCEPTS_QMESSAGELOGCONTEXT |
2407 OCTAVE_CHECK_FUNC_QWHEELEVENT_ANGLEDELTA | 2437 OCTAVE_CHECK_FUNC_QWHEELEVENT_ANGLEDELTA |
2438 OCTAVE_CHECK_FUNC_QWHEELEVENT_POSITION | |
2408 OCTAVE_CHECK_MEMBER_QFONT_FORCE_INTEGER_METRICS | 2439 OCTAVE_CHECK_MEMBER_QFONT_FORCE_INTEGER_METRICS |
2409 OCTAVE_CHECK_MEMBER_QFONT_MONOSPACE | 2440 OCTAVE_CHECK_MEMBER_QFONT_MONOSPACE |
2410 OCTAVE_HAVE_QGUIAPPLICATION | 2441 OCTAVE_HAVE_QGUIAPPLICATION |
2411 | 2442 |
2412 OCTAVE_CHECK_QREGION_ITERATORS | 2443 OCTAVE_CHECK_QREGION_ITERATORS |