commit 5ccbaf47bcdbb830cd74c0578c69d0d8e42441f0 Author: Jean-Marc Lasgouttes <lasgout...@lyx.org> Date: Tue Mar 11 17:44:34 2025 +0100
Fix uninitialized variable edit_mode_ This was detected by valgrind. --- src/frontends/qt/GuiInputMethod.cpp | 2 -- src/frontends/qt/GuiInputMethod.h | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/frontends/qt/GuiInputMethod.cpp b/src/frontends/qt/GuiInputMethod.cpp index c983500f64..358f810405 100644 --- a/src/frontends/qt/GuiInputMethod.cpp +++ b/src/frontends/qt/GuiInputMethod.cpp @@ -91,10 +91,8 @@ GuiInputMethod::GuiInputMethod(GuiWorkArea *parent) : QObject(parent), d(new Private) { d->work_area_ = parent; - d->im_state_.enabled_ = true; d->buffer_view_ = &d->work_area_->bufferView(); d->cur_ = &d->buffer_view_->cursor(); - d->im_state_.preediting_ = false; LYXERR(Debug::DEBUG, "GuiInputMethod: Address of parent: " << parent); LYXERR(Debug::DEBUG, "GuiInputMethod: Address of buffer_view_: " << diff --git a/src/frontends/qt/GuiInputMethod.h b/src/frontends/qt/GuiInputMethod.h index d8bf775f44..0b9037532e 100644 --- a/src/frontends/qt/GuiInputMethod.h +++ b/src/frontends/qt/GuiInputMethod.h @@ -66,9 +66,9 @@ public: }; struct InputMethodState { - bool enabled_; - bool preediting_; // either in edit or completing mode - bool edit_mode_; // i.e. not completing mode + bool enabled_ = true; + bool preediting_ = false; // either in edit or completing mode + bool edit_mode_ = true; // i.e. not completing mode QRectF cursor_rect_; QRectF anchor_rect_; docstring surrounding_text_; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org https://lists.lyx.org/mailman/listinfo/lyx-cvs