[LyX/master] Fix uninitialized variable
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Fri Sep 13 09:22:29 UTC 2024
commit ffca6730d6fd97ec9be1bbf70eabd2ef9835f607
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date: Fri Sep 13 11:21:19 2024 +0200
Fix uninitialized variable
Spotted by Coverity scan.
---
src/frontends/qt/GuiWorkArea.cpp | 2 +-
src/frontends/qt/GuiWorkArea_Private.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/frontends/qt/GuiWorkArea.cpp b/src/frontends/qt/GuiWorkArea.cpp
index 0535ee70d1..210a15036f 100644
--- a/src/frontends/qt/GuiWorkArea.cpp
+++ b/src/frontends/qt/GuiWorkArea.cpp
@@ -1184,7 +1184,7 @@ void GuiWorkArea::Private::paintPreeditText(GuiPainter & pain)
im_lang_ = lang;
}
#endif
-
+
// Chinese IM may want cursor position even when preedit string is empty
// such a case is handled below
if (preedit_string_.empty() && im_->locale().language() != QLocale::Chinese)
diff --git a/src/frontends/qt/GuiWorkArea_Private.h b/src/frontends/qt/GuiWorkArea_Private.h
index 672cba2056..05bc1d8d77 100644
--- a/src/frontends/qt/GuiWorkArea_Private.h
+++ b/src/frontends/qt/GuiWorkArea_Private.h
@@ -149,7 +149,7 @@ struct GuiWorkArea::Private
QTransform item_trans_;
bool item_trans_needs_reset_ = false;
/// for debug
- QLocale::Language im_lang_;
+ QLocale::Language im_lang_ = QLocale::AnyLanguage;
/// Ratio between physical pixels and device-independent pixels
/// We save the last used value to detect changes of the
More information about the lyx-cvs
mailing list