Skip to content

Commit

Permalink
Rename qstringfixup to code_fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 6, 2025
1 parent 0d1ce1a commit 5adb08d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions scripts/qstringfixup.py → scripts/code_fixup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
###########################################################################
# qstringfixup.py
# code_fixup.py
# ---------------
# Date : October 2020
# Copyright : (C) 2020 by Even Rouault
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions scripts/qstringfixup.sh → scripts/code_fixup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
###########################################################################
# qstringfixup.sh
# code_fixup.sh
# ---------------
# Date : October 2020
# Copyright : (C) 2020 by Even Rouault
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 5adb08d

Please sign in to comment.