Commit 43aa104e authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

fix non-global s///

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

Change-Id: Iee9043c1ee3083edaf289886ac11b3e3a501d623
Reviewed-by: default avatarDaniel Teske <>
parent e3821380
......@@ -329,7 +329,7 @@ static void replaceInList(ProStringList *varlist,
QString val = varit->toQString(tmp);
QString copy = val; // Force detach and have a reference value
val.replace(regexp, replace);
if (!val.isSharedWith(copy)) {
if (!val.isSharedWith(copy) && val != copy) {
if (val.isEmpty()) {
varit = varlist->erase(varit);
} else {
Supports Markdown
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