Fixed bug in the test.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-12-13 19:29:39 +02:00
parent 5343e4e68d
commit b56849e33c

View file

@ -86,15 +86,16 @@ void TST_TSTranslation::CheckEnglishLocalization()
continue; continue;
} }
if (message.hasAttribute(attrType)) const QDomElement translationTag = message.firstChildElement(QStringLiteral("translation"));
if (translationTag.hasAttribute(attrType))
{ {
const QString attrVal = message.attribute(attrType); const QString attrVal = translationTag.attribute(attrType);
if (attrVal == QLatin1Literal("vanished") || attrVal == QLatin1Literal("unfinished")) if (attrVal == QLatin1Literal("vanished") || attrVal == QLatin1Literal("unfinished"))
{ {
continue; continue;
} }
} }
const QString translation = message.firstChildElement(QStringLiteral("translation")).text(); const QString translation = translationTag.text();
if (translation.isEmpty()) if (translation.isEmpty())
{ {
continue; continue;