QChar codepoints are 16 bit, so it is not wise to pass blindly a
char_type value to the QChar constructor.
Use the already defined isSpace() helper tht takes care of this issue.
Related to #12519, which is only known to bite with Qt6 for now; this
bug is thus theoretical in 2.3.
#include "Dimension.h"
#include "support/convert.h"
+#include "support/debug.h"
#include "support/lassert.h"
#include "support/lyxlib.h"
-#include "support/debug.h"
+#include "support/textutils.h"
#define DISABLE_PMPROF
#include "support/pmprof.h"
bool wasspace = false;
int nexp = 0;
for (char_type c : str)
- if (c > 0x0d && QChar(c).isSpace()) {
+ if (c > 0x0d && isSpace(c)) {
if (!wasspace) {
++nexp;
wasspace = true;