diff options
author | Semih Yavuz <semih.yavuz@qt.io> | 2022-10-19 12:50:31 +0200 |
---|---|---|
committer | Semih Yavuz <semih.yavuz@qt.io> | 2022-10-24 18:03:05 +0000 |
commit | bc6c900b1556517e9fe20d73e40dc33d8c99a1cc (patch) | |
tree | 20fa3545ca6935f20fc39ffddc015449d9df734e /tools | |
parent | 61199f3309a34f8f0a5d16add11e05537272bad0 (diff) |
qmlformat: do not generate backup files
qmlformat used to backup the original input file up to 2 copies when used
with --inplace mode. Change this hardcoded number into 0 and generate no
backup file.
Fixes: QTBUG-107685
Change-Id: Ifca86968fa65be0fd678012fc2e41b9ed8601d21
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmlformat/qmlformat.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/qmlformat/qmlformat.cpp b/tools/qmlformat/qmlformat.cpp index 3aa452c21c..2e99dd3110 100644 --- a/tools/qmlformat/qmlformat.cpp +++ b/tools/qmlformat/qmlformat.cpp @@ -123,7 +123,8 @@ bool parseFile(const QString &filename, const Options &options) if (options.verbose) qWarning().noquote() << "Writing to file" << filename; FileWriter fw; - res = qmlFile.writeOut(filename, 2, lwOptions, &fw, checks); + const unsigned numberOfBackupFiles = 0; + res = qmlFile.writeOut(filename, numberOfBackupFiles, lwOptions, &fw, checks); } else { QFile out; out.open(stdout, QIODevice::WriteOnly); |