fix non-global s///

QString::replace(QRegExp) pretty much always detaches, so the equality
check was bogus.

Change-Id: Iee9043c1ee3083edaf289886ac11b3e3a501d623
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Oswald Buddenhagen
2012-08-22 20:12:50 +02:00
parent e382138052
commit 43aa104e94

View File

@@ -329,7 +329,7 @@ static void replaceInList(ProStringList *varlist,
QString val = varit->toQString(tmp); QString val = varit->toQString(tmp);
QString copy = val; // Force detach and have a reference value QString copy = val; // Force detach and have a reference value
val.replace(regexp, replace); val.replace(regexp, replace);
if (!val.isSharedWith(copy)) { if (!val.isSharedWith(copy) && val != copy) {
if (val.isEmpty()) { if (val.isEmpty()) {
varit = varlist->erase(varit); varit = varlist->erase(varit);
} else { } else {