diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2020-05-29 15:37:12 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2020-06-02 11:20:16 +0000 |
commit | 26d46fc19dccb3b599dcd24f2a3701b7c4e25d2b (patch) | |
tree | 267e980f4da145fd3ece871ff2f7b7ac76d9048e /src/shared | |
parent | 95c4da7dd0d29a7955b2a83ec9fcdfe9dc71ce71 (diff) |
ProWriter: Do not insert a backslash when adding new files
... if the previous line already has a trailing backslash.
Fixes: QTCREATORBUG-24083
Change-Id: Ieabce541da2ef55bcbf3bd14d139b14f3a7575c7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/proparser/prowriter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/proparser/prowriter.cpp b/src/shared/proparser/prowriter.cpp index e3fcc5f600..557bef4371 100644 --- a/src/shared/proparser/prowriter.cpp +++ b/src/shared/proparser/prowriter.cpp @@ -347,7 +347,8 @@ void ProWriter::putVarValues(ProFile *profile, QStringList *lines, const QString QString newLine = effectiveContIndent(contInfo) + v; if (curLineNo == endLineNo) { QString &oldLastLine = (*lines)[endLineNo - 1]; - oldLastLine.insert(lineInfo(oldLastLine).continuationPos, " \\"); + if (!oldLastLine.endsWith('\\')) + oldLastLine.insert(lineInfo(oldLastLine).continuationPos, " \\"); } else { newLine += " \\"; } |