Skip to content

Commit

Permalink
maint: Merge default to bytecode-interpreter
Browse files Browse the repository at this point in the history
  • Loading branch information
arungiridhar committed Jan 9, 2025
2 parents 692da7b + 1f1a3a9 commit a1e5758
Show file tree
Hide file tree
Showing 10 changed files with 233 additions and 31 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3011,7 +3011,7 @@ fi

### Recommendations from the gnulib bootstrap script.

GNULIB_LINK_DEPS="$FREXPF_LIBM $FREXP_LIBM $GETHOSTNAME_LIB $LIBSOCKET $LIB_CLOCK_GETTIME $LIB_CRYPTO $LIB_GETLOGIN $LIB_NANOSLEEP $LIB_SELECT $LTLIBICONV $LTLIBINTL $LTLIBTHREAD $INTL_MACOSX_LIBS"
GNULIB_LINK_DEPS="$CLOCK_TIME_LIB $FREXPF_LIBM $FREXP_LIBM $GETHOSTNAME_LIB $GETHRXTIME_LIB $GETLOGIN_LIB $GETRANDOM_LIB $HARD_LOCALE_LIB $LIBPMULTITHREAD $LIBPTHREAD $LIBSOCKET $LIBTHREAD $LIB_CRYPTO $LTLIBC32CONV $LTLIBICONV $LTLIBINTL $LTLIBREADLINE $LTLIBUNISTRING $MBRTOWC_LIB $NANOSLEEP_LIB $PTHREAD_SIGMASK_LIB $SELECT_LIB $SETLOCALE_LIB $SETLOCALE_NULL_LIB $INTL_MACOSX_LIBS"

## FIXME: This is a kluge to transform $libdir/libiconv.dll.a to -liconv.
## It would probably be better to fix gnulib to not give us an absolute
Expand All @@ -3029,7 +3029,7 @@ case $host_os in
;;
esac

MKOCTFILE_GNULIB_LINK_DEPS="$FREXPF_LIBM $FREXP_LIBM $GETHOSTNAME_LIB $LIBSOCKET $LIB_CLOCK_GETTIME $LIB_CRYPTO $LIB_GETLOGIN $LIB_NANOSLEEP $LIB_SELECT $MKOCTFILE_LIBICONV $LIBINTL $LIBTHREAD $INTL_MACOSX_LIBS"
MKOCTFILE_GNULIB_LINK_DEPS="$CLOCK_TIME_LIB $FREXPF_LIBM $FREXP_LIBM $GETHOSTNAME_LIB $GETHRXTIME_LIB $GETLOGIN_LIB $GETRANDOM_LIB $HARD_LOCALE_LIB $LIBPMULTITHREAD $LIBPTHREAD $LIBSOCKET $LIBTHREAD $LIB_CRYPTO $LIBC32CONV $MKOCTFILE_LIBICONV $LIBINTL $LIBREADLINE $LIBUNISTRING $MBRTOWC_LIB $NANOSLEEP_LIB $PTHREAD_SIGMASK_LIB $SELECT_LIB $SETLOCALE_LIB $SETLOCALE_NULL_LIB $INTL_MACOSX_LIBS"

AC_SUBST(GNULIB_LINK_DEPS)

Expand Down
2 changes: 0 additions & 2 deletions doc/interpreter/contributors.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ Avinoam Kalma
Avlas
Axel Mathéi
Balint Reczey
Barbara Locsi
Barbara Lócsi
Baylis Shanks
Ben Abbott
Expand Down Expand Up @@ -533,7 +532,6 @@ Tejaswi D Prakash
Tejaswi D. Prakash
Teresa Twaroch
Tetsuro Kurita
Tetsuro KURITA
Thomas Baier
Thomas D. Dean
Thomas Kasper
Expand Down
7 changes: 7 additions & 0 deletions libgui/graphics/KeyMap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,14 @@ namespace KeyMap
keyMapper[Qt::Key_twosuperior] = "twosuperior";
keyMapper[Qt::Key_threesuperior] = "threesuperior";
keyMapper[Qt::Key_acute] = "acute";
// FIXME: Should the following value be changed to "micro"? The string is,
// e.g., used as the value of the field "Key" that is passed to the
// "KeyPressFcn" callback.
#if defined (HAVE_QT_KEY_MICRO)
keyMapper[Qt::Key_micro] = "mu";
#else
keyMapper[Qt::Key_mu] = "mu";
#endif
keyMapper[Qt::Key_paragraph] = "paragraph";
keyMapper[Qt::Key_periodcentered] = "periodcentered";
keyMapper[Qt::Key_cedilla] = "cedilla";
Expand Down
4 changes: 4 additions & 0 deletions libgui/graphics/annotation-dialog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,11 @@ annotation_dialog::set_gui_props ()
if (m_props(1*i +1).is_matrix_type ())
color = octave::Utils::fromRgb (m_props(2*i +1).matrix_value ());
else
#if defined (HAVE_QCOLOR_FROMSTRING)
color.fromString (m_props(2*i +1).string_value ());
#else
color.setNamedColor (m_props(2*i +1).string_value ().c_str ());
#endif

if (color.isValid ())
m_ui->btn_color->setPalette (QPalette (color));
Expand Down
14 changes: 12 additions & 2 deletions libgui/src/m-editor/find-dialog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,22 @@ find_dialog::find_dialog (octave_dock_widget *ed, QWidget *p)
this, &find_dialog::replace);
connect (m_replace_all_button, &QPushButton::clicked,
this, &find_dialog::replace_all);
connect (m_backward_check_box, &QCheckBox::stateChanged,
connect (m_backward_check_box,
#if defined (HAVE_QCHECKBOX_CHECKSTATECHANGED)
&QCheckBox::checkStateChanged,
#else
&QCheckBox::stateChanged,
#endif
this, &find_dialog::handle_backward_search_changed);
connect (m_button_box, &QDialogButtonBox::rejected,
this, &find_dialog::close);

connect (m_search_selection_check_box, &QCheckBox::stateChanged,
connect (m_search_selection_check_box,
#if defined (HAVE_QCHECKBOX_CHECKSTATECHANGED)
&QCheckBox::checkStateChanged,
#else
&QCheckBox::stateChanged,
#endif
this, &find_dialog::handle_sel_search_changed);

QVBoxLayout *extension_layout = new QVBoxLayout ();
Expand Down
28 changes: 24 additions & 4 deletions libgui/src/settings-dialog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,12 @@ settings_dialog::read_settings (bool first)
editor_styles_layout->addLayout (current_line);

// update colors depending on second theme selection
connect (cb_color_mode, &QCheckBox::stateChanged,
connect (cb_color_mode,
#if defined (HAVE_QCHECKBOX_CHECKSTATECHANGED)
&QCheckBox::checkStateChanged,
#else
&QCheckBox::stateChanged,
#endif
this, &settings_dialog::update_editor_lexers);
connect (pb_reload_default_colors, &QPushButton::clicked,
[this] () { update_editor_lexers (settings_reload_default_colors_flag); });
Expand Down Expand Up @@ -1507,7 +1512,12 @@ settings_dialog::read_workspace_colors ()

// update colors depending on second theme selection or reloading
// the dfault values
connect (cb_color_mode, &QCheckBox::stateChanged,
connect (cb_color_mode,
#if defined (HAVE_QCHECKBOX_CHECKSTATECHANGED)
&QCheckBox::checkStateChanged,
#else
&QCheckBox::stateChanged,
#endif
this, &settings_dialog::update_workspace_colors);
connect (pb_reload_default_colors, &QPushButton::clicked,
[this] () { update_workspace_colors (settings_reload_default_colors_flag); });
Expand Down Expand Up @@ -1622,7 +1632,12 @@ settings_dialog::read_terminal_colors ()
terminal_colors_box->setLayout (style_grid);

// update colors depending on second theme selection
connect (cb_color_mode, &QCheckBox::stateChanged,
connect (cb_color_mode,
#if defined (HAVE_QCHECKBOX_CHECKSTATECHANGED)
&QCheckBox::checkStateChanged,
#else
&QCheckBox::stateChanged,
#endif
this, &settings_dialog::update_terminal_colors);
connect (pb_reload_default_colors, &QPushButton::clicked,
[this] () { update_terminal_colors (settings_reload_default_colors_flag); });
Expand Down Expand Up @@ -1735,7 +1750,12 @@ settings_dialog::read_varedit_colors ()
varedit_colors_box->setLayout (style_grid);

// update colors depending on second theme selection
connect (cb_color_mode, &QCheckBox::stateChanged,
connect (cb_color_mode,
#if defined (HAVE_QCHECKBOX_CHECKSTATECHANGED)
&QCheckBox::checkStateChanged,
#else
&QCheckBox::stateChanged,
#endif
this, &settings_dialog::update_varedit_colors);
connect (pb_reload_default_colors, &QPushButton::clicked,
[this] () { update_varedit_colors (settings_reload_default_colors_flag); });
Expand Down
14 changes: 12 additions & 2 deletions libgui/src/shortcuts-tree-widget.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,20 @@ shortcut_edit_dialog::shortcut_edit_dialog

setLayout (box);

connect (direct, &QCheckBox::stateChanged,
connect (direct,
#if defined (HAVE_QCHECKBOX_CHECKSTATECHANGED)
&QCheckBox::checkStateChanged,
#else
&QCheckBox::stateChanged,
#endif
m_edit_actual, &enter_shortcut::handle_direct_shortcut);

connect (shift, &QCheckBox::stateChanged,
connect (shift,
#if defined (HAVE_QCHECKBOX_CHECKSTATECHANGED)
&QCheckBox::checkStateChanged,
#else
&QCheckBox::stateChanged,
#endif
m_edit_actual, &enter_shortcut::handle_shift_modifier);

connect (this, &QDialog::finished,
Expand Down
7 changes: 6 additions & 1 deletion libgui/src/welcome-wizard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,12 @@ setup_community_news::setup_community_news (welcome_wizard *wizard)
m_next->setDefault (true);
m_next->setFocus ();

connect (m_checkbox, &QCheckBox::stateChanged,
connect (m_checkbox,
#if defined (HAVE_QCHECKBOX_CHECKSTATECHANGED)
&QCheckBox::checkStateChanged,
#else
&QCheckBox::stateChanged,
#endif
wizard, &welcome_wizard::handle_web_connect_option);

connect (m_previous, &QPushButton::clicked, wizard, &welcome_wizard::previous_page);
Expand Down
96 changes: 96 additions & 0 deletions m4/acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,99 @@ AC_DEFUN([OCTAVE_CHECK_FUNC_QTEXTSTREAM_SETENCODING], [
fi
])
dnl
dnl Check whether the Qt namespace contains a member Key_micro. This
dnl value was introduced in Qt 6.7.
dnl
dnl FIXME: Delete this entirely when we drop support for Qt 6.6 or older.
dnl
AC_DEFUN([OCTAVE_CHECK_ENUM_QT_KEY_MICRO], [
AC_CACHE_CHECK([for Qt::Key_micro enum value],
[octave_cv_enum_qt_key_micro],
[AC_LANG_PUSH(C++)
ac_octave_save_CPPFLAGS="$CPPFLAGS"
ac_octave_save_CXXFLAGS="$CXXFLAGS"
CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <Qt>
]], [[
Qt::Key key = Qt::Key_micro;
]])],
octave_cv_enum_qt_key_micro=yes,
octave_cv_enum_qt_key_micro=no)
CPPFLAGS="$ac_octave_save_CPPFLAGS"
CXXFLAGS="$ac_octave_save_CXXFLAGS"
AC_LANG_POP(C++)
])
if test $octave_cv_enum_qt_key_micro = yes; then
AC_DEFINE(HAVE_QT_KEY_MICRO, 1,
[Define to 1 if you have the `Qt::Key_micro' enum value.])
fi
])
dnl
dnl Check whether the Qt class QCheckBox has the checkStateChanged
dnl signal. This signal was introduced in Qt 6.7.
dnl
dnl FIXME: Delete this entirely when we drop support for Qt 6.6 or older.
dnl
AC_DEFUN([OCTAVE_CHECK_SIGNAL_QCHECKBOX_CHECKSTATECHANGED], [
AC_CACHE_CHECK([for QCheckBox::checkStateChanged signal],
[octave_cv_signal_qcheckbox_checkstatechanged],
[AC_LANG_PUSH(C++)
ac_octave_save_CPPFLAGS="$CPPFLAGS"
ac_octave_save_CXXFLAGS="$CXXFLAGS"
CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <QCheckBox>
]], [[
QCheckBox checkbox;
QObject::connect (&checkbox, &QCheckBox::checkStateChanged,
[] (Qt::CheckState) {});
]])],
octave_cv_signal_qcheckbox_checkstatechanged=yes,
octave_cv_signal_qcheckbox_checkstatechanged=no)
CPPFLAGS="$ac_octave_save_CPPFLAGS"
CXXFLAGS="$ac_octave_save_CXXFLAGS"
AC_LANG_POP(C++)
])
if test $octave_cv_signal_qcheckbox_checkstatechanged = yes; then
AC_DEFINE(HAVE_QCHECKBOX_CHECKSTATECHANGED, 1,
[Define to 1 if you have the `QCheckBox::checkStateChanged' signal.])
fi
])
dnl
dnl Check whether the Qt class QColor has the fromString member function.
dnl This member function was introduced in Qt 6.4.
dnl
dnl FIXME: Delete this entirely when we drop support for Qt 6.3 or older.
dnl
AC_DEFUN([OCTAVE_CHECK_FUNC_QCOLOR_FROMSTRING], [
AC_CACHE_CHECK([for QColor::fromString],
[octave_cv_func_qcolor_fromstring],
[AC_LANG_PUSH(C++)
ac_octave_save_CPPFLAGS="$CPPFLAGS"
ac_octave_save_CXXFLAGS="$CXXFLAGS"
CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
CXXFLAGS="$CXXPICFLAG $CXXFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <QColor>
]], [[
QColor color;
color.fromString ("green");
]])],
octave_cv_func_qcolor_fromstring=yes,
octave_cv_func_qcolor_fromstring=no)
CPPFLAGS="$ac_octave_save_CPPFLAGS"
CXXFLAGS="$ac_octave_save_CXXFLAGS"
AC_LANG_POP(C++)
])
if test $octave_cv_func_qcolor_fromstring = yes; then
AC_DEFINE(HAVE_QCOLOR_FROMSTRING, 1,
[Define to 1 if you have the `QColor::fromString' member function.])
fi
])
dnl
dnl Check whether HDF5 library has version 1.6 API functions.
dnl
AC_DEFUN([OCTAVE_CHECK_HDF5_HAS_VER_16_API], [
Expand Down Expand Up @@ -2265,6 +2358,9 @@ AC_DEFUN([OCTAVE_CHECK_QT_VERSION], [AC_MSG_CHECKING([Qt version $1])
OCTAVE_CHECK_FUNC_QCOLOR_FLOAT_TYPE
OCTAVE_CHECK_CLASS_QSTRINGVIEW
OCTAVE_CHECK_FUNC_QTEXTSTREAM_SETENCODING
OCTAVE_CHECK_ENUM_QT_KEY_MICRO
OCTAVE_CHECK_SIGNAL_QCHECKBOX_CHECKSTATECHANGED
OCTAVE_CHECK_FUNC_QCOLOR_FROMSTRING
OCTAVE_CHECK_QREGION_ITERATORS
OCTAVE_CHECK_QT_IMCURSORRECTANGLE_ENUM_VALUE
Expand Down
Loading

0 comments on commit a1e5758

Please sign in to comment.