Commit 38296f6a authored by Tomasz Olszak's avatar Tomasz Olszak Committed by Marco Benelli

Fix inserting the same multiple items to PathsAndLanguages

Change-Id: Ie1df6fad425fd7198a72f531c19b3681627a5210
Reviewed-by: default avatarMarco Benelli <marco.benelli@qt.io>
parent 629c137e
......@@ -280,11 +280,10 @@ bool PathsAndLanguages::maybeInsert(const PathAndLanguage &pathAndLanguage) {
if (currentElement.path() == pathAndLanguage.path()) {
int j = i;
do {
if (pathAndLanguage.language() < currentElement.language()) {
if (currentElement.language() == pathAndLanguage.language())
return false;
if (pathAndLanguage.language() < currentElement.language())
break;
}
if (currentElement.language() == pathAndLanguage.language())
return false;
++j;
if (j == m_list.length())
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment