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;
|
||||
|
||||
if (translated != original)
|
||||
{
|
||||
while (text.indexOf(original) != -1)
|
||||
{
|
||||
text.replace(original, translated);
|
||||
}
|
||||
}
|
||||
++i;
|
||||
}
|
||||
return text;
|
||||
|
@ -716,12 +713,9 @@ QString VTranslateVars::PlaceholderFromUserText(QString text) const
|
|||
const QString original = per + i.key() + per;
|
||||
|
||||
if (translated != original)
|
||||
{
|
||||
while (text.indexOf(translated) != -1)
|
||||
{
|
||||
text.replace(translated, original);
|
||||
}
|
||||
}
|
||||
++i;
|
||||
}
|
||||
return text;
|
||||
|
|
Loading…
Reference in New Issue
Block a user