forked from qt-creator/qt-creator
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:
@@ -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 {
|
||||||
|
Reference in New Issue
Block a user