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 #!/usr/bin/env python
########################################################################### ###########################################################################
# qstringfixup.py # code_fixup.py
# --------------- # ---------------
# Date : October 2020 # Date : October 2020
# Copyright : (C) 2020 by Even Rouault # Copyright : (C) 2020 by Even Rouault
@ -26,14 +26,15 @@
# DEALINGS IN THE SOFTWARE. # 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. # It is not automatically run yet.
# Run it on whole code base with: # Run it on whole code base with:
# ../scripts/qstringfixup.sh --all # ../scripts/code_fixup.sh --all
# or on modified files only with: # or on modified files only with:
# ../scripts/qstringfixup.sh # ../scripts/code_fixup.sh
import re import re
import sys import sys

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
########################################################################### ###########################################################################
# qstringfixup.sh # code_fixup.sh
# --------------- # ---------------
# Date : October 2020 # Date : October 2020
# Copyright : (C) 2020 by Even Rouault # Copyright : (C) 2020 by Even Rouault
@ -59,8 +59,8 @@ for f in $MODIFIED; do
;; ;;
esac esac
m=$f.qstringfixup m=$f.code_fixup
python "${TOPLEVEL}/scripts/qstringfixup.py" "$f" > "$m" python "${TOPLEVEL}/scripts/code_fixup.py" "$f" > "$m"
if diff -u "$m" "$f" >/dev/null; then if diff -u "$m" "$f" >/dev/null; then
# no difference found # no difference found
rm "$m" rm "$m"