[LyX/master] Fix compilation on bionic

Pavel Sanda sanda at lyx.org
Thu May 14 17:31:43 UTC 2026


commit 28da3bb70f6a175f731d7caa619d38866b9bd291
Author: Pavel Sanda <sanda at lyx.org>
Date:   Thu May 14 18:34:11 2026 +0200

    Fix compilation on bionic
---
 src/frontends/qt/GuiInputMethod.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/frontends/qt/GuiInputMethod.cpp b/src/frontends/qt/GuiInputMethod.cpp
index b9d8786824..de20273b76 100644
--- a/src/frontends/qt/GuiInputMethod.cpp
+++ b/src/frontends/qt/GuiInputMethod.cpp
@@ -821,7 +821,11 @@ int GuiInputMethod::preeditCaretOffset()
 	else
 		line = d->caret_elem_.str.substr(0, d->caret_pos_ - d->caret_elem_.pos);
 
+#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
 	return qfm.horizontalAdvance(toqstr(line));
+#else
+	return qfm.width(toqstr(line));
+#endif
 }
 
 


More information about the lyx-cvs mailing list