Skip to content

Fix regression in lconvert handling empty translations

Fixes a regression introduced by commit b96fe95d, which enabled a sanity check that now failed to account for empty string.

The serialized format of a QString is such that '-1' indicates a null string, otherwise it's +. Since QChar is 2 bytes, length should therefore always be an even number ... except for -1.

While at it, also preserve the difference between an empty string and a null string.

Fixes: QTBUG-91558 Pick-to: 6.1 Change-Id: Iffbc6ee2c94b8363d2c1d91440022a77dbef4772 Reviewed-by: Joerg Bornemann joerg.bornemann@qt.io (cherry picked from commit b9a9f7b5)

  • This has no Pick-to 5.15, but discussion in the QTBUG makes clear this fix is in 5.15.5 too
  • Pick applied cleanly

See also: https://bugreports.qt.io/browse/QTBUG-91558 !3 (closed) !1 (merged)

Merge request reports