Compilation fix for Qt4

This commit is contained in:
Jean-Marc Lasgouttes 2022-01-13 19:34:46 +01:00
parent 473a4f2648
commit c638caddd8

View File

@ -19,6 +19,7 @@
#include "support/convert.h" #include "support/convert.h"
#include "support/lassert.h" #include "support/lassert.h"
#include "support/lstrings.h" // for breakString_helper with qt4
#include "support/lyxlib.h" #include "support/lyxlib.h"
#include "support/debug.h" #include "support/debug.h"
@ -624,7 +625,7 @@ GuiFontMetrics::breakString_helper(docstring const & s, int first_wid, int wid,
// FIXME: this is slower than it could be but we'll get rid of Qt4 anyway // FIXME: this is slower than it could be but we'll get rid of Qt4 anyway
docstring const ss = s.substr(pos, epos - pos); docstring const ss = s.substr(pos, epos - pos);
int const wid = width(ss); int const wid = width(ss);
int const nspc_wid = i + 1 < tl.lineCount() ? wid : width(trim(ss)); int const nspc_wid = i + 1 < tl.lineCount() ? wid : width(rtrim(ss));
#endif #endif
breaks.emplace_back(epos - pos, wid, nspc_wid); breaks.emplace_back(epos - pos, wid, nspc_wid);
pos = epos; pos = epos;