summaryrefslogtreecommitdiffstats
path: root/tools/linguist/shared/qm.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-29 16:54:19 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-29 16:56:22 (GMT)
commitf0a66c60d1eba14be2b3fdc9307fdd2e4a421a5c (patch)
treeb1ef602a2ffef28c94d99a59ac8858691411c777 /tools/linguist/shared/qm.cpp
parent1414c682c532a95a2204bc1b2d01d2493357b686 (diff)
downloadQt-f0a66c60d1eba14be2b3fdc9307fdd2e4a421a5c.zip
Qt-f0a66c60d1eba14be2b3fdc9307fdd2e4a421a5c.tar.gz
Qt-f0a66c60d1eba14be2b3fdc9307fdd2e4a421a5c.tar.bz2
support editing of length variants
this is not complete, e.g. full text search does not discern which variant contains the hit, the integration with phrases&guesses is non-existing, etc. the form preview will do funny things as long as the widgets don't support the multi-variant strings.
Diffstat (limited to 'tools/linguist/shared/qm.cpp')
-rw-r--r--tools/linguist/shared/qm.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/tools/linguist/shared/qm.cpp b/tools/linguist/shared/qm.cpp
index 323bd29..ec61cb6 100644
--- a/tools/linguist/shared/qm.cpp
+++ b/tools/linguist/shared/qm.cpp
@@ -238,12 +238,8 @@ Prefix Releaser::commonPrefix(const ByteTranslatorMessage &m1, const ByteTransla
void Releaser::writeMessage(const ByteTranslatorMessage &msg, QDataStream &stream,
TranslatorSaveMode mode, Prefix prefix) const
{
- for (int i = 0; i < msg.translations().count(); ++i) {
- QString str = msg.translations().at(i);
- str.replace(QChar(Translator::DefaultVariantSeparator),
- QChar(Translator::InternalVariantSeparator));
- stream << quint8(Tag_Translation) << str;
- }
+ for (int i = 0; i < msg.translations().count(); ++i)
+ stream << quint8(Tag_Translation) << msg.translations().at(i);
if (mode == SaveEverything)
prefix = HashContextSourceTextComment;
@@ -592,8 +588,6 @@ bool loadQM(Translator &translator, QIODevice &dev, ConversionData &cd)
str[i] = QChar((str.at(i).unicode() >> 8) +
((str.at(i).unicode() << 8) & 0xff00));
}
- str.replace(QChar(Translator::InternalVariantSeparator),
- QChar(Translator::DefaultVariantSeparator));
translations << str;
m += len;
break;