diff options
author | Alex Henrie <alexhenrie24@gmail.com> | 2015-02-06 11:43:56 -0700 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-02-09 11:17:54 +0000 |
commit | dc4ed9e1cb4b2ea4b02793a24eb276dec1758ccd (patch) | |
tree | c87280343eec4bc3dbc7c00aece4c023b75b7cd4 /src/linguist/shared/po.cpp | |
parent | 104241306b844bdc8608cba7022aba0898f16ce4 (diff) |
linguist: Consistently wrap PO file lines to 79 characters
If the space character is not taken into account, some lines are given
one extra character. This makes Qt Linguist wrap them differently from
gettext and produce unnecessarily large diffs when editing files
generated by gettext.
Change-Id: I310d747a8f455d8ca47e882af04b081e9db25f69
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src/linguist/shared/po.cpp')
-rw-r--r-- | src/linguist/shared/po.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linguist/shared/po.cpp b/src/linguist/shared/po.cpp index f4354246c..86fb6a1d1 100644 --- a/src/linguist/shared/po.cpp +++ b/src/linguist/shared/po.cpp @@ -162,7 +162,7 @@ static QString poEscapedLines(const QString &prefix, bool addSpace, const QStrin static QString poWrappedEscapedLines(const QString &prefix, bool addSpace, const QString &line) { - const int maxlen = MAX_LEN - prefix.length(); + const int maxlen = MAX_LEN - prefix.length() - addSpace; QStringList lines; int off = 0; while (off + maxlen < line.length()) { |