From 1403b2181ba80cb2f1cf0ea941228dafa95d835b Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Fri, 7 Feb 2025 09:31:13 +1000 Subject: [PATCH] Rename qstringfixup to code_fixup --- scripts/{qstringfixup.py => code_fixup.py} | 9 +++++---- scripts/{qstringfixup.sh => code_fixup.sh} | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) rename scripts/{qstringfixup.py => code_fixup.py} (97%) rename scripts/{qstringfixup.sh => code_fixup.sh} (95%) diff --git a/scripts/qstringfixup.py b/scripts/code_fixup.py similarity index 97% rename from scripts/qstringfixup.py rename to scripts/code_fixup.py index ab7bfc0e770..cb9219625a9 100644 --- a/scripts/qstringfixup.py +++ b/scripts/code_fixup.py @@ -1,6 +1,6 @@ #!/usr/bin/env python ########################################################################### -# qstringfixup.py +# code_fixup.py # --------------- # Date : October 2020 # Copyright : (C) 2020 by Even Rouault @@ -26,14 +26,15 @@ # DEALINGS IN THE SOFTWARE. ########################################################################### -# This script fixes several suboptimal uses of QStringLiteral where QLatin1String would be better +# This script fixes several suboptimal uses of QStringLiteral where QLatin1String would be better, +# and other auto code-cleaning operations (such as use of auto with std::make_unique) # It is not automatically run yet. # Run it on whole code base with: -# ../scripts/qstringfixup.sh --all +# ../scripts/code_fixup.sh --all # or on modified files only with: -# ../scripts/qstringfixup.sh +# ../scripts/code_fixup.sh import re import sys diff --git a/scripts/qstringfixup.sh b/scripts/code_fixup.sh similarity index 95% rename from scripts/qstringfixup.sh rename to scripts/code_fixup.sh index 032d4157601..a53f3893ba4 100755 --- a/scripts/qstringfixup.sh +++ b/scripts/code_fixup.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash ########################################################################### -# qstringfixup.sh +# code_fixup.sh # --------------- # Date : October 2020 # Copyright : (C) 2020 by Even Rouault @@ -59,8 +59,8 @@ for f in $MODIFIED; do ;; esac - m=$f.qstringfixup - python "${TOPLEVEL}/scripts/qstringfixup.py" "$f" > "$m" + m=$f.code_fixup + python "${TOPLEVEL}/scripts/code_fixup.py" "$f" > "$m" if diff -u "$m" "$f" >/dev/null; then # no difference found rm "$m"