# HG changeset patch # User Torsten # Date 1370683677 -7200 # Sat Jun 08 11:27:57 2013 +0200 # Node ID 61edff131b31f69754f5a5d364b5b39acbf0edcf # Parent 01d523d5f7964301d5daa0f1e9316493c762495c [mq]: check_qsci_260 diff -r 01d523d5f796 -r 61edff131b31 configure.ac --- a/configure.ac Fri Jun 07 23:13:48 2013 +0200 +++ b/configure.ac Sat Jun 08 11:27:57 2013 +0200 @@ -2645,7 +2645,7 @@ ## Let's assume Qscintilla library is at the same location as ## other regular Qt libraries. QT_LIBS="$QT_LIBS -lqscintilla2" - OCTAVE_CHECK_FUNC_FINDFIRST_MODERN + OCTAVE_CHECK_VERSION_2_6_0 AC_DEFINE(HAVE_QSCINTILLA, 1, [Define to 1 if the QScintilla library and header files are available]) diff -r 01d523d5f796 -r 61edff131b31 libgui/src/m-editor/octave-qscintilla.cc --- a/libgui/src/m-editor/octave-qscintilla.cc Fri Jun 07 23:13:48 2013 +0200 +++ b/libgui/src/m-editor/octave-qscintilla.cc Sat Jun 08 11:27:57 2013 +0200 @@ -37,6 +37,7 @@ { } +#ifdef HAVE_QSCI_VERSION_2_6_0 // context menu requested void octave_qscintilla::contextMenuEvent (QContextMenuEvent *e) @@ -74,6 +75,7 @@ context_menu->exec (global_pos); } +#endif // handle the menu entry for calling help @@ -84,4 +86,5 @@ emit execute_command_in_terminal_signal (command); } + #endif diff -r 01d523d5f796 -r 61edff131b31 libgui/src/m-editor/octave-qscintilla.h --- a/libgui/src/m-editor/octave-qscintilla.h Fri Jun 07 23:13:48 2013 +0200 +++ b/libgui/src/m-editor/octave-qscintilla.h Sat Jun 08 11:27:57 2013 +0200 @@ -36,7 +36,9 @@ octave_qscintilla (QWidget *p); ~octave_qscintilla (); +#ifdef HAVE_QSCI_VERSION_2_6_0 virtual void contextMenuEvent (QContextMenuEvent *e); +#endif signals: diff -r 01d523d5f796 -r 61edff131b31 m4/acinclude.m4 --- a/m4/acinclude.m4 Fri Jun 07 23:13:48 2013 +0200 +++ b/m4/acinclude.m4 Sat Jun 08 11:27:57 2013 +0200 @@ -194,14 +194,13 @@ fi ]) dnl -dnl Check whether Qscintilla FindFirst function is old (16 inputs) or -dnl new (17 inputs). +dnl Check whether Qscintilla has version 2.6.0 or later dnl FIXME: This test uses a version number. It potentially could dnl be re-written to actually call the function, but is it worth it? dnl -AC_DEFUN([OCTAVE_CHECK_FUNC_FINDFIRST_MODERN], [ - AC_CACHE_CHECK([whether Qscintilla FindFirst uses 17 input arguments], - [octave_cv_func_findfirst_modern], +AC_DEFUN([OCTAVE_CHECK_VERSION_2_6_0], [ + AC_CACHE_CHECK([whether Qscintilla has version 2.6.0 or later], + [octave_cv_version_2_6_0], [AC_LANG_PUSH(C++) ac_octave_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$QT_CPPFLAGS $CPPFLAGS" @@ -212,14 +211,14 @@ #error Old FindFirst function found. #endif ]])], - octave_cv_func_findfirst_modern=yes, - octave_cv_func_findfirst_modern=no) + octave_cv_version_2_6_0=yes, + octave_cv_version_2_6_0=no) CPPFLAGS="$ac_octave_save_CPPFLAGS" AC_LANG_POP(C++) ]) - if test $octave_cv_func_findfirst_modern = yes; then - AC_DEFINE(HAVE_FINDFIRST_MODERN, 1, - [Define to 1 if Qscintilla FindFirst uses modern form with 17 inputs.]) + if test $octave_cv_version_2_6_0 = yes; then + AC_DEFINE(HAVE_QSCI_VERSION_2_6_0, 1, + [Define to 1 if Qscintilla is of Version 2.6.0 or later.]) fi ]) dnl