From 55441a44831dc1e839731aef186440876adf743a Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 12 Oct 2018 15:15:04 +0300 Subject: [PATCH] Improvement for test 'TestTemplatePlaceholders()'. --HG-- branch : release --- src/test/TranslationsTest/tst_buitinregexp.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/test/TranslationsTest/tst_buitinregexp.cpp b/src/test/TranslationsTest/tst_buitinregexp.cpp index a76316f92..b8a08d720 100644 --- a/src/test/TranslationsTest/tst_buitinregexp.cpp +++ b/src/test/TranslationsTest/tst_buitinregexp.cpp @@ -240,7 +240,15 @@ void TST_BuitInRegExp::TestTemplatePlaceholders() const QRegularExpression re(QLatin1String("^[^\\s]+$")); if (re.match(translated).hasMatch()) { - translations.insert(translated); + if (not translations.contains(translated)) + { + translations.insert(translated); + } + else + { + issue << QString("Duplicate translation '%1' for placeholder '%2' in locale '%3'.\n") + .arg(translated, placeholder, m_locale); + } } else {