comparison m4/acinclude.m4 @ 27842:e79999c5d782

fix Qt4 build errors (bug #57420) * acinclude.m4 (OCTAVE_CHECK_FUNC_QCOMBOBOX_SETCURRENTTEXT): New macro. (OCTAVE_CHECK_QT_VERSION): Use it. * find-dialog.cc (find_dialog::init_search_text): Provide replacement for QComboBox::setCurrentText. * octave-qscintilla.h: Include <QTemporaryFile> header.
author John W. Eaton <jwe@octave.org>
date Mon, 16 Dec 2019 01:47:18 -0500
parents a8c5255c34b1
children b442ec6dda5c
comparison
equal deleted inserted replaced
27841:f68c7c56e5f2 27842:e79999c5d782
339 AC_LANG_POP(C++) 339 AC_LANG_POP(C++)
340 ]) 340 ])
341 if test $octave_cv_func_qabstractitemmodel_beginresetmodel = yes; then 341 if test $octave_cv_func_qabstractitemmodel_beginresetmodel = yes; then
342 AC_DEFINE(HAVE_QABSTRACTITEMMODEL_BEGINRESETMODEL, 1, 342 AC_DEFINE(HAVE_QABSTRACTITEMMODEL_BEGINRESETMODEL, 1,
343 [Define to 1 if you have the `QAbstractItemModel::beginResetModel' member function.]) 343 [Define to 1 if you have the `QAbstractItemModel::beginResetModel' member function.])
344 fi
345 ])
346 dnl
347 dnl Check whether the Qt QComboBox class has the setCurrentText
348 dnl function. This function was introduced in Qt 5.
349 dnl
350 dnl FIXME: Delete this entirely when we drop support for Qt 4.
351 dnl
352 AC_DEFUN([OCTAVE_CHECK_FUNC_QCOMBOBOX_SETCURRENTTEXT], [
353 AC_CACHE_CHECK([for QComboBox::setCurrentText],
354 [octave_cv_func_qcombobox_setcurrenttext],
355 [AC_LANG_PUSH(C++)
356 ac_octave_save_CPPFLAGS="$CPPFLAGS"
357 ac_octave_save_CXXFLAGS="$CXXFLAGS"
358 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
359 CXXFLAGS="$CXXPICFLAG $CPPFLAGS"
360 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
361 #include <QComboBox>
362 ]], [[
363 QComboBox combo_box (nullptr);
364 combo_box.setCurrentText ("text");
365 ]])],
366 octave_cv_func_qcombobox_setcurrenttext=yes,
367 octave_cv_func_qcombobox_setcurrenttext=no)
368 CPPFLAGS="$ac_octave_save_CPPFLAGS"
369 CXXFLAGS="$ac_octave_save_CXXFLAGS"
370 AC_LANG_POP(C++)
371 ])
372 if test $octave_cv_func_qcombobox_setcurrenttext = yes; then
373 AC_DEFINE(HAVE_QCOMBOBOX_SETCURRENTTEXT, 1,
374 [Define to 1 if you have the `QComboBox::setCurrentText' member function.])
344 fi 375 fi
345 ]) 376 ])
346 dnl 377 dnl
347 dnl Check whether the Qt QGuiApplication class has the setDesktopFileName 378 dnl Check whether the Qt QGuiApplication class has the setDesktopFileName
348 dnl static member function. This function was introduced in Qt 5.7. 379 dnl static member function. This function was introduced in Qt 5.7.
2153 2184
2154 ## We don't need to unset cache variables for any of the remaining 2185 ## We don't need to unset cache variables for any of the remaining
2155 ## tests if they fail because we have already decided that the Qt 2186 ## tests if they fail because we have already decided that the Qt
2156 ## version that we are testing now will be the one used. 2187 ## version that we are testing now will be the one used.
2157 2188
2189 OCTAVE_CHECK_FUNC_QCOMBOBOX_SETCURRENTTEXT
2158 OCTAVE_CHECK_FUNC_QGUIAPPLICATION_SETDESKTOPFILENAME 2190 OCTAVE_CHECK_FUNC_QGUIAPPLICATION_SETDESKTOPFILENAME
2159 OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONRESIZEMODE 2191 OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONRESIZEMODE
2160 OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONSCLICKABLE 2192 OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONSCLICKABLE
2161 OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONSMOVABLE 2193 OCTAVE_CHECK_FUNC_QHEADERVIEW_SETSECTIONSMOVABLE
2162 OCTAVE_CHECK_FUNC_QHELPSEARCHQUERYWIDGET_SEARCHINPUT 2194 OCTAVE_CHECK_FUNC_QHELPSEARCHQUERYWIDGET_SEARCHINPUT