summaryrefslogtreecommitdiffstats
path: root/conversions/qt3-tqt3/convert_qt_itself_qt3
blob: a7c1a0222cb17da905aa3823e4ded517bcf0ee94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash

find ./ -type f -iname "*.c*" -not -iwholename '*.git*' -exec sed -i 's/^Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)/TQ\1\2/g' {} \;
find ./ -type f -iname "*.h*" -not -iwholename '*.git*' -exec sed -i 's/^Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)/TQ\1\2/g' {} \;
find ./ -type f -iname "*.ui*" -not -iwholename '*.git*' -exec sed -i 's/^Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)/TQ\1\2/g' {} \;

find ./ -type f -iname "*.c*" -not -iwholename '*.git*' -exec sed -i 's/\([^_]\)Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)/\1TQ\2\3/g' {} \;
find ./ -type f -iname "*.h*" -not -iwholename '*.git*' -exec sed -i 's/\([^_]\)Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)/\1TQ\2\3/g' {} \;
find ./ -type f -iname "*.ui*" -not -iwholename '*.git*' -exec sed -i 's/\([^_]\)Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)/\1TQ\2\3/g' {} \;

find ./ -type f -iname "*.c*" -not -iwholename '*.git*' -exec sed -i 's/Qt/TQt/g' {} \;
find ./ -type f -iname "*.h*" -not -iwholename '*.git*' -exec sed -i 's/Qt/TQt/g' {} \;
find ./ -type f -iname "*.ui*" -not -iwholename '*.git*' -exec sed -i 's/Qt/TQt/g' {} \;

find ./ -type f -iname "*.h*" -not -iwholename '*.git*' -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.h*" -not -iwholename '*.git*' -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.h*" -not -iwholename '*.git*' -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.h*" -not -iwholename '*.git*' -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.c*" -not -iwholename '*.git*' -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.c*" -not -iwholename '*.git*' -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.c*" -not -iwholename '*.git*' -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.c*" -not -iwholename '*.git*' -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.ui*" -not -iwholename '*.git*' -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.ui*" -not -iwholename '*.git*' -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.ui*" -not -iwholename '*.git*' -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.ui*" -not -iwholename '*.git*' -exec sed -i 's/TTQ/TQ/g' {} \;

sed -i 's/^Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)/TQ\1\2/g' src/moc/moc.l
sed -i 's/^Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)/TQ\1\2/g' src/moc/moc.y
sed -i 's/\([^_]\)Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)/\1TQ\2\3/g' src/moc/moc.l
sed -i 's/\([^_]\)Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)/\1TQ\2\3/g' src/moc/moc.y
sed -i 's/Qt/TQt/g' src/moc/moc.l
sed -i 's/Qt/TQt/g' src/moc/moc.y
sed -i 's/TTQ/TQ/g' src/moc/moc.l
sed -i 's/TTQ/TQ/g' src/moc/moc.y
sed -i 's/TTQ/TQ/g' src/moc/moc.l
sed -i 's/TTQ/TQ/g' src/moc/moc.y
sed -i 's/TTQ/TQ/g' src/moc/moc.l
sed -i 's/TTQ/TQ/g' src/moc/moc.y
sed -i 's/TTQ/TQ/g' src/moc/moc.l
sed -i 's/TTQ/TQ/g' src/moc/moc.y

# Move the library
find ./ -type f -iname "*" -not -iwholename '*.git*' -exec sed -i 's/qt-mt/tqt-mt/g' {} \;
find ./ -type f -iname "*" -not -iwholename '*.git*' -exec sed -i 's/qui/tqui/g' {} \;

# Back out changes we did not want to make
find ./ -type f -iname "*" -not -iwholename '*.git*' -exec sed -i 's/TQT_/QT_/g' {} \;
find ./ -type f -iname "*" -not -iwholename '*.git*' -exec sed -i 's/TQMAKE/QMAKE/g' {} \;
find ./ -type f -iname "*" -not -iwholename '*.git*' -exec sed -i 's/TQTDIR/QTDIR/g' {} \;
find ./ -type f -iname "*" -not -iwholename '*.git*' -exec sed -i 's/OBLITQUE/OBLIQUE/g' {} \;
find ./ -type f -iname "*" -not -iwholename '*.git*' -exec sed -i 's/ATQUA/AQUA/g' {} \;

find ./ -type f -iname "*" -not -iwholename '*.git*' -exec sed -i 's/QUType_Q/QUType_TQ/g' {} \;
find ./ -type f -iname "*" -not -iwholename '*.git*' -exec sed -i 's/\([ (]\)Q\#\#/\1TQ\#\#/g' {} \;
find ./ -type f -iname "*" -not -iwholename '*.git*' -exec sed -i 's/STQL/SQL/g' {} \;

find ./ -type f -iname "*" -not -iwholename '*.git*' -exec sed -i 's/tquiv/quiv/g' {} \;

find ./ -type f -iname "*" -not -iwholename '*.git*' -exec sed -i 's/\([^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)tquit/\1quit/g' {} \;
find ./ -type f -iname "*" -not -iwholename '*.git*' -exec sed -i 's/^tquit/quit/g' {} \;

find ./ -type f -iname "*" -not -iwholename '*.git*' -exec sed -i 's/RETQUIRE/REQUIRE/g' {} \;
find ./ -type f -iname "*" -not -iwholename '*.git*' -exec sed -i 's/Retquire/Require/g' {} \;
find ./ -type f -iname "*" -not -iwholename '*.git*' -exec sed -i 's/retquire/require/g' {} \;

# Apply changes that should have been made but were not
find ./ -type f -iname "*" -not -iwholename '*.git*' -exec sed -i 's/aboutQt/aboutTQt/g' {} \;

# Back out linear alphabet string changes
find ./ -type f -iname "*" -not -iwholename '*.git*' -exec sed -i 's/MNOPTQR/MNOPQR/g' {} \;

# Apply patches
patch -p0 < ../tqt3_fixups.diff

exit 0