blob: 8f0b8b6d8d56689a75d5a4d8a1b409d0a2da9693 (
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
#!/bin/bash
#find ./ -type f -iname "*.c*" -exec sed -i 's/Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzDE]\)/TQ\1\2\3/g' {} \;
#find ./ -type f -iname "*.h*" -exec sed -i 's/Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzDE]\)/TQ\1\2\3/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/^Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)/TQ\1\2/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/^Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)/TQ\1\2/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/\([^_]\)Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)/\1TQ\2\3/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/\([^_]\)Q\([ABCDEFGHIJKLMNOPQRSTUVWXYZ]\)\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)/\1TQ\2\3/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/Qt/TQt/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/Qt/TQt/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/TTQ/TQ/g' {} \;
find ./ -type f -iname "*.c*" -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
if [[ 0 == 1 ]]; then
find ./ -type f -iname "*.c*" -exec sed -i 's/\([^_]\)METHOD\([( ]\)/\1TQT_METHOD\2/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/\([^_]\)METHOD\([( ]\)/\1TQT_METHOD\2/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/\([^_]\)SLOT\([( ]\)/\1TQT_SLOT\2/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/\([^_]\)SLOT\([( ]\)/\1TQT_SLOT\2/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/\([^_]\)SIGNAL\([( ]\)/\1TQT_SIGNAL\2/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/\([^_]\)SIGNAL\([( ]\)/\1TQT_SIGNAL\2/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/TQT_TQT_/TQT_/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/TQT_TQT_/TQT_/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/TQT_TQT_/TQT_/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/TQT_TQT_/TQT_/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/TQT_TQT_/TQT_/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/TQT_TQT_/TQT_/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/TQT_TQT_/TQT_/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/TQT_TQT_/TQT_/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/MOC/TQMOC/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/TQTQMOC/TQMOC/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/RGB_MASK/TQRGB_MASK/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/TQTQRGB_MASK/TQRGB_MASK/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/tqslots/Q_SLOTS/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/tqsignals/Q_SIGNALS/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/Q_SIGNALSlotimp\.h/tqsignalslotimp\.h/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/TQ_SLOTS/Q_SLOTS/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/TQ_SIGNALS/Q_SIGNALS/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/Q_/TQ_/g' {} \;
find ./ -type f -iname "*.h*" -exec sed -i 's/Q_/TQ_/g' {} \;
# Certain Things Are Sacred
cd src/
# Rename headers
../../convert_qt_itself_qt3_rename
# Move files
find . -type d -exec ../../convert_qt_itself_qt3_helper "{}" \;
cd ../
cd qmake/
# Rename headers
../../convert_qt_itself_qt3_rename
cd ../
cd tools/
# Rename headers
../../convert_qt_itself_qt3_rename
cd ../
cd qmake/
find . -type d -exec ../../convert_qt_itself_qt3_helper "{}" \;
../../convert_qt_itself_qt3_rename
cd ../
cd include
ls -l | awk '{print "ln -s", $10, " ", $8, " && rm ", $8}' | sed 's/\(.*\) q\(.*\)\.h/\1 tq\2\.h/g' | sed 's/\(.*\)\/q\(.*\)\.h/\1\/tq\2\.h/g' | sh
cd ..
for i in {1..50}
do
find ./ -type f -iname "*.pro" -exec sed -i 's/\(.*\)\/q\(.*\)\.c\(.*\)/\1\/tq\2\.c\3/g' {} \;
find ./ -type f -iname "*.pro" -exec sed -i 's/\(.*\)\/q\(.*\)\.h\(.*\)/\1\/tq\2\.h\3/g' {} \;
find ./ -type f -iname "*.pri" -exec sed -i 's/\(.*\)\/q\(.*\)\.c\(.*\)/\1\/tq\2\.c\3/g' {} \;
find ./ -type f -iname "*.pri" -exec sed -i 's/\(.*\)\/q\(.*\)\.h\(.*\)/\1\/tq\2\.h\3/g' {} \;
done
fi
# Back out changes we did not want to make
find ./ -type f -iname "*" -exec sed -i 's/TQT_/QT_/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/TQMAKE/QMAKE/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/TQTDIR/QTDIR/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/OBLITQUE/OBLIQUE/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/ATQUA/AQUA/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/QUType_Q/QUType_TQ/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/\([ (]\)Q\#\#/\1TQ\#\#/g' {} \;
find ./ -type f -iname "*" -exec sed -i 's/STQL/SQL/g' {} \;
# Apply patches
patch -p0 < ../tqt3_fixups.diff
exit 0
# Fix up configure
sed -i 's/qconfig\./tqconfig\./g' configure
sed -i 's/qmodules\./tqmodules\./g' configure
#sed -i 's/qtmd5/tqtmd5/g' ./qmake/Makefile.unix
sed -i 's/\([ =/]\)q/\1tq/g' ./qmake/Makefile.unix
|