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