From 6f533fb364e5d5b08eac742b1b9768add709b564 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 18 Dec 2011 14:51:32 -0600 Subject: [PATCH] Sync conversion scripts --- tqtinterface/conversion_scripts/convert_qt_itself10 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tqtinterface/conversion_scripts/convert_qt_itself10 b/tqtinterface/conversion_scripts/convert_qt_itself10 index 304aa2a..f115bee 100755 --- a/tqtinterface/conversion_scripts/convert_qt_itself10 +++ b/tqtinterface/conversion_scripts/convert_qt_itself10 @@ -109,6 +109,18 @@ find ./ -type f -iname "*" -exec sed -i 's/tqparent/parent/g' {} \; find ./ -type f -iname "*" -exec sed -i 's/tqmask/mask/g' {} \; find ./ -type f -iname "*" -exec sed -i 's/\"tqStatus/\"Status/g' {} \; + +# Replace all last occurrences of tqStatus within a quoted string # find ./ -type f -iname "*" -exec sed -i 's/\(.*\)\"\([^"]*\)tqStatus\([^"]*\)\"\(.*\)/\1\"\2Status\3\"\4/g' {} \; +# Replace all first occurrences of tqStatus within a quoted string +# find ./ -type f -iname "*" -exec sed -i 's/\([^"]*\)\"\([^"]*\)tqStatus\([^"]*\)\"\(.*\)/\1\"\2Status\3\"\4/g' {} \; +# Replace all second occurrences of tqStatus within a quoted string +# find ./ -type f -iname "*" -exec sed -i 's/\([^"]*\)\"\([^"]*\)\"\([^"]*\)\"\([^"]*\)tqStatus\([^"]*\)\"\(.*\)/\1\"\2\"\3\"\4Status\5\"\6/g' {} \; +# Replace all third occurrences of tqStatus within a quoted string +# find ./ -type f -iname "*" -exec sed -i 's/\([^"]*\)\"\([^"]*\)\"\([^"]*\)\"\([^"]*\)\"\([^"]*\)\"\([^"]*\)\"\([^"]*\)tqStatus\([^"]*\)\"\(.*\)/\1\"\2\"\3\"\4\"\5\"\6\"\7Status\8\"\9/g' {} \; find ./ -type f -iname "*" -exec sed -i 's/STQL/SQL/g' {} \; + +# If "TQ ended up in a cpp file it is probably wrong +find ./ -type f -iname "*.c*" -not -iwholename '*.svn*' -exec sed -i 's/\"TQ\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([ABCDEFGHIJKLMNOPQRSTUVWXYZ"]\)/\"Q\1\2\3/g' {} \; +find ./ -type f -iname "*.h*" -not -iwholename '*.svn*' -exec sed -i 's/\"TQ\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([ABCDEFGHIJKLMNOPQRSTUVWXYZ"]\)/\"Q\1\2\3/g' {} \;