commit 406a1357f61b661559f741d3de74cbd7aa57bda7 Author: Scott Kostyshak <skost...@lyx.org> Date: Thu Jul 3 16:59:46 2025 +0200
Fix LATTEST() call and a -Wstring-conversion LATTEST() expects an expression. This commit changes an LATTEST(string) call to instead first give an error and then call LATTEST(false). Fixes the following warning: src/frontends/qt/GuiInputMethod.cpp:383:11: error: implicit conversion turns string literal into bool: 'const char[53]' to 'bool' [-Werror,-Wstring-conversion] 383 | LATTEST("Turnouts of preedit segments have not been all swept"); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/support/lassert.h:83:6: note: expanded from macro 'LATTEST' 83 | if (expr) {} else { lyx::doAssert(#expr, __FILE__, __LINE__); } | ~~ ^~~~ Amends 29d41c1e. --- src/frontends/qt/GuiInputMethod.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt/GuiInputMethod.cpp b/src/frontends/qt/GuiInputMethod.cpp index 87c1717c66..971e084b87 100644 --- a/src/frontends/qt/GuiInputMethod.cpp +++ b/src/frontends/qt/GuiInputMethod.cpp @@ -380,7 +380,8 @@ void GuiInputMethod::setPreeditStyle( for (size_type i=0; i<d->seg_turnout_.size(); ++i) next_seg_pos = pickNextSegFromTurnout(next_seg_pos); if (!d->seg_turnout_.empty()) { - LATTEST("Turnouts of preedit segments have not been all swept"); + LYXERR0("Turnouts of preedit segments have not been all swept"); + LATTEST(false); } #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org https://lists.lyx.org/mailman/listinfo/lyx-cvs