Rename qstringfixup to code_fixup

This commit is contained in:
Nyall Dawson 2025-02-07 09:31:13 +10:00
parent e6746f35da
commit 1403b2181b
2 changed files with 8 additions and 7 deletions

View File

@ -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

View File

@ -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"