Just replace() method is enough. It replaces all occurrences.
--HG-- branch : feature
This commit is contained in:
parent
3b60eaff08
commit
b80bd85dec
|
@ -694,12 +694,9 @@ QString VTranslateVars::PlaceholderToUserText(QString text) const
|
||||||
const QString original = per + i.key() + per;
|
const QString original = per + i.key() + per;
|
||||||
|
|
||||||
if (translated != original)
|
if (translated != original)
|
||||||
{
|
|
||||||
while (text.indexOf(original) != -1)
|
|
||||||
{
|
{
|
||||||
text.replace(original, translated);
|
text.replace(original, translated);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
|
@ -716,12 +713,9 @@ QString VTranslateVars::PlaceholderFromUserText(QString text) const
|
||||||
const QString original = per + i.key() + per;
|
const QString original = per + i.key() + per;
|
||||||
|
|
||||||
if (translated != original)
|
if (translated != original)
|
||||||
{
|
|
||||||
while (text.indexOf(translated) != -1)
|
|
||||||
{
|
{
|
||||||
text.replace(translated, original);
|
text.replace(translated, original);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user