From b56849e33c5697537d44e77a316bfec82c3b457e Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 13 Dec 2015 19:29:39 +0200 Subject: [PATCH] Fixed bug in the test. --HG-- branch : develop --- src/test/ValentinaTest/tst_tstranslation.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/ValentinaTest/tst_tstranslation.cpp b/src/test/ValentinaTest/tst_tstranslation.cpp index 41d0cc46b..83719282b 100644 --- a/src/test/ValentinaTest/tst_tstranslation.cpp +++ b/src/test/ValentinaTest/tst_tstranslation.cpp @@ -86,15 +86,16 @@ void TST_TSTranslation::CheckEnglishLocalization() 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")) { continue; } } - const QString translation = message.firstChildElement(QStringLiteral("translation")).text(); + const QString translation = translationTag.text(); if (translation.isEmpty()) { continue;