-rw-r--r-- | qt/qt-2.3.7.patch/qte237-all.patch | 7 | ||||
-rw-r--r-- | qt/qt-2.3.7.patch/qte237-iconviewspeed.patch | 7 |
2 files changed, 0 insertions, 14 deletions
diff --git a/qt/qt-2.3.7.patch/qte237-all.patch b/qt/qt-2.3.7.patch/qte237-all.patch index e3351a3..6f94211 100644 --- a/qt/qt-2.3.7.patch/qte237-all.patch +++ b/qt/qt-2.3.7.patch/qte237-all.patch | |||
@@ -1,1354 +1,1347 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | Included patches: | 3 | Included patches: |
4 | 4 | ||
5 | qte237-allowoverride.patch | 5 | qte237-allowoverride.patch |
6 | qte237-g++-aslinker.patch | 6 | qte237-g++-aslinker.patch |
7 | qte237-iconviewspeed.patch | 7 | qte237-iconviewspeed.patch |
8 | qte237-adjustsizes.patch | 8 | qte237-adjustsizes.patch |
9 | qte237-encoding.patch | 9 | qte237-encoding.patch |
10 | qte237-keyboard.patch | 10 | qte237-keyboard.patch |
11 | qte237-gcc34.patch | 11 | qte237-gcc34.patch |
12 | qte237-lefthand.patch | 12 | qte237-lefthand.patch |
13 | 13 | ||
14 | 14 | ||
15 | 15 | ||
16 | 16 | ||
17 | 17 | ||
18 | 18 | ||
19 | 19 | ||
20 | 20 | ||
21 | 21 | ||
22 | diff -ur qt-2.3.7-old/configs/linux-generic-g++-shared qt-2.3.7/configs/linux-generic-g++-shared | 22 | diff -ur qt-2.3.7-old/configs/linux-generic-g++-shared qt-2.3.7/configs/linux-generic-g++-shared |
23 | --- qt-2.3.7-old/configs/linux-generic-g++-shared2004-07-23 15:22:56.000000000 +0200 | 23 | --- qt-2.3.7-old/configs/linux-generic-g++-shared2004-07-23 15:22:56.000000000 +0200 |
24 | +++ qt-2.3.7/configs/linux-generic-g++-shared2004-07-23 15:23:12.000000000 +0200 | 24 | +++ qt-2.3.7/configs/linux-generic-g++-shared2004-07-23 15:23:12.000000000 +0200 |
25 | @@ -36,7 +36,7 @@ | 25 | @@ -36,7 +36,7 @@ |
26 | SYSCONF_LIBS_YACC= | 26 | SYSCONF_LIBS_YACC= |
27 | 27 | ||
28 | # Linking applications | 28 | # Linking applications |
29 | -SYSCONF_LINK = gcc | 29 | -SYSCONF_LINK = gcc |
30 | +SYSCONF_LINK = g++ | 30 | +SYSCONF_LINK = g++ |
31 | SYSCONF_LFLAGS = | 31 | SYSCONF_LFLAGS = |
32 | SYSCONF_LIBS = | 32 | SYSCONF_LIBS = |
33 | 33 | ||
34 | diff -ur qt-2.3.7-old/configs/linux-generic-g++-shared-debug qt-2.3.7/configs/linux-generic-g++-shared-debug | 34 | diff -ur qt-2.3.7-old/configs/linux-generic-g++-shared-debug qt-2.3.7/configs/linux-generic-g++-shared-debug |
35 | --- qt-2.3.7-old/configs/linux-generic-g++-shared-debug2004-07-23 15:22:56.000000000 +0200 | 35 | --- qt-2.3.7-old/configs/linux-generic-g++-shared-debug2004-07-23 15:22:56.000000000 +0200 |
36 | +++ qt-2.3.7/configs/linux-generic-g++-shared-debug2004-07-23 15:23:12.000000000 +0200 | 36 | +++ qt-2.3.7/configs/linux-generic-g++-shared-debug2004-07-23 15:23:12.000000000 +0200 |
37 | @@ -36,7 +36,7 @@ | 37 | @@ -36,7 +36,7 @@ |
38 | SYSCONF_LIBS_YACC= | 38 | SYSCONF_LIBS_YACC= |
39 | 39 | ||
40 | # Linking applications | 40 | # Linking applications |
41 | -SYSCONF_LINK = gcc | 41 | -SYSCONF_LINK = gcc |
42 | +SYSCONF_LINK = g++ | 42 | +SYSCONF_LINK = g++ |
43 | SYSCONF_LFLAGS = | 43 | SYSCONF_LFLAGS = |
44 | SYSCONF_LIBS = | 44 | SYSCONF_LIBS = |
45 | 45 | ||
46 | diff -ur qt-2.3.7-old/configs/linux-generic-g++-static qt-2.3.7/configs/linux-generic-g++-static | 46 | diff -ur qt-2.3.7-old/configs/linux-generic-g++-static qt-2.3.7/configs/linux-generic-g++-static |
47 | --- qt-2.3.7-old/configs/linux-generic-g++-static2004-07-23 15:22:56.000000000 +0200 | 47 | --- qt-2.3.7-old/configs/linux-generic-g++-static2004-07-23 15:22:56.000000000 +0200 |
48 | +++ qt-2.3.7/configs/linux-generic-g++-static2004-07-23 15:23:12.000000000 +0200 | 48 | +++ qt-2.3.7/configs/linux-generic-g++-static2004-07-23 15:23:12.000000000 +0200 |
49 | @@ -36,7 +36,7 @@ | 49 | @@ -36,7 +36,7 @@ |
50 | SYSCONF_LIBS_YACC= | 50 | SYSCONF_LIBS_YACC= |
51 | 51 | ||
52 | # Linking applications | 52 | # Linking applications |
53 | -SYSCONF_LINK = gcc | 53 | -SYSCONF_LINK = gcc |
54 | +SYSCONF_LINK = g++ | 54 | +SYSCONF_LINK = g++ |
55 | SYSCONF_LFLAGS = | 55 | SYSCONF_LFLAGS = |
56 | SYSCONF_LIBS = | 56 | SYSCONF_LIBS = |
57 | 57 | ||
58 | diff -ur qt-2.3.7-old/configs/linux-generic-g++-static-debug qt-2.3.7/configs/linux-generic-g++-static-debug | 58 | diff -ur qt-2.3.7-old/configs/linux-generic-g++-static-debug qt-2.3.7/configs/linux-generic-g++-static-debug |
59 | --- qt-2.3.7-old/configs/linux-generic-g++-static-debug2004-07-23 15:22:56.000000000 +0200 | 59 | --- qt-2.3.7-old/configs/linux-generic-g++-static-debug2004-07-23 15:22:56.000000000 +0200 |
60 | +++ qt-2.3.7/configs/linux-generic-g++-static-debug2004-07-23 15:23:12.000000000 +0200 | 60 | +++ qt-2.3.7/configs/linux-generic-g++-static-debug2004-07-23 15:23:12.000000000 +0200 |
61 | @@ -36,7 +36,7 @@ | 61 | @@ -36,7 +36,7 @@ |
62 | SYSCONF_LIBS_YACC= | 62 | SYSCONF_LIBS_YACC= |
63 | 63 | ||
64 | # Linking applications | 64 | # Linking applications |
65 | -SYSCONF_LINK = gcc | 65 | -SYSCONF_LINK = gcc |
66 | +SYSCONF_LINK = g++ | 66 | +SYSCONF_LINK = g++ |
67 | SYSCONF_LFLAGS = | 67 | SYSCONF_LFLAGS = |
68 | SYSCONF_LIBS = | 68 | SYSCONF_LIBS = |
69 | 69 | ||
70 | diff -ur qt-2.3.7-old/configs/linux-generic_rtti-g++-shared qt-2.3.7/configs/linux-generic_rtti-g++-shared | 70 | diff -ur qt-2.3.7-old/configs/linux-generic_rtti-g++-shared qt-2.3.7/configs/linux-generic_rtti-g++-shared |
71 | --- qt-2.3.7-old/configs/linux-generic_rtti-g++-shared2004-07-23 15:22:56.000000000 +0200 | 71 | --- qt-2.3.7-old/configs/linux-generic_rtti-g++-shared2004-07-23 15:22:56.000000000 +0200 |
72 | +++ qt-2.3.7/configs/linux-generic_rtti-g++-shared2004-07-23 15:23:12.000000000 +0200 | 72 | +++ qt-2.3.7/configs/linux-generic_rtti-g++-shared2004-07-23 15:23:12.000000000 +0200 |
73 | @@ -36,7 +36,7 @@ | 73 | @@ -36,7 +36,7 @@ |
74 | SYSCONF_LIBS_YACC= | 74 | SYSCONF_LIBS_YACC= |
75 | 75 | ||
76 | # Linking applications | 76 | # Linking applications |
77 | -SYSCONF_LINK = gcc | 77 | -SYSCONF_LINK = gcc |
78 | +SYSCONF_LINK = g++ | 78 | +SYSCONF_LINK = g++ |
79 | SYSCONF_LFLAGS = | 79 | SYSCONF_LFLAGS = |
80 | SYSCONF_LIBS = | 80 | SYSCONF_LIBS = |
81 | 81 | ||
82 | diff -ur qt-2.3.7-old/configs/linux-generic_rtti-g++-shared-debug qt-2.3.7/configs/linux-generic_rtti-g++-shared-debug | 82 | diff -ur qt-2.3.7-old/configs/linux-generic_rtti-g++-shared-debug qt-2.3.7/configs/linux-generic_rtti-g++-shared-debug |
83 | --- qt-2.3.7-old/configs/linux-generic_rtti-g++-shared-debug2004-07-23 15:22:56.000000000 +0200 | 83 | --- qt-2.3.7-old/configs/linux-generic_rtti-g++-shared-debug2004-07-23 15:22:56.000000000 +0200 |
84 | +++ qt-2.3.7/configs/linux-generic_rtti-g++-shared-debug2004-07-23 15:23:12.000000000 +0200 | 84 | +++ qt-2.3.7/configs/linux-generic_rtti-g++-shared-debug2004-07-23 15:23:12.000000000 +0200 |
85 | @@ -36,7 +36,7 @@ | 85 | @@ -36,7 +36,7 @@ |
86 | SYSCONF_LIBS_YACC= | 86 | SYSCONF_LIBS_YACC= |
87 | 87 | ||
88 | # Linking applications | 88 | # Linking applications |
89 | -SYSCONF_LINK = gcc | 89 | -SYSCONF_LINK = gcc |
90 | +SYSCONF_LINK = g++ | 90 | +SYSCONF_LINK = g++ |
91 | SYSCONF_LFLAGS = | 91 | SYSCONF_LFLAGS = |
92 | SYSCONF_LIBS = | 92 | SYSCONF_LIBS = |
93 | 93 | ||
94 | diff -ur qt-2.3.7-old/configs/linux-generic_rtti-g++-static qt-2.3.7/configs/linux-generic_rtti-g++-static | 94 | diff -ur qt-2.3.7-old/configs/linux-generic_rtti-g++-static qt-2.3.7/configs/linux-generic_rtti-g++-static |
95 | --- qt-2.3.7-old/configs/linux-generic_rtti-g++-static2004-07-23 15:22:56.000000000 +0200 | 95 | --- qt-2.3.7-old/configs/linux-generic_rtti-g++-static2004-07-23 15:22:56.000000000 +0200 |
96 | +++ qt-2.3.7/configs/linux-generic_rtti-g++-static2004-07-23 15:23:12.000000000 +0200 | 96 | +++ qt-2.3.7/configs/linux-generic_rtti-g++-static2004-07-23 15:23:12.000000000 +0200 |
97 | @@ -36,7 +36,7 @@ | 97 | @@ -36,7 +36,7 @@ |
98 | SYSCONF_LIBS_YACC= | 98 | SYSCONF_LIBS_YACC= |
99 | 99 | ||
100 | # Linking applications | 100 | # Linking applications |
101 | -SYSCONF_LINK = gcc | 101 | -SYSCONF_LINK = gcc |
102 | +SYSCONF_LINK = g++ | 102 | +SYSCONF_LINK = g++ |
103 | SYSCONF_LFLAGS = | 103 | SYSCONF_LFLAGS = |
104 | SYSCONF_LIBS = | 104 | SYSCONF_LIBS = |
105 | 105 | ||
106 | diff -ur qt-2.3.7-old/configs/linux-generic_rtti-g++-static-debug qt-2.3.7/configs/linux-generic_rtti-g++-static-debug | 106 | diff -ur qt-2.3.7-old/configs/linux-generic_rtti-g++-static-debug qt-2.3.7/configs/linux-generic_rtti-g++-static-debug |
107 | --- qt-2.3.7-old/configs/linux-generic_rtti-g++-static-debug2004-07-23 15:22:56.000000000 +0200 | 107 | --- qt-2.3.7-old/configs/linux-generic_rtti-g++-static-debug2004-07-23 15:22:56.000000000 +0200 |
108 | +++ qt-2.3.7/configs/linux-generic_rtti-g++-static-debug2004-07-23 15:23:12.000000000 +0200 | 108 | +++ qt-2.3.7/configs/linux-generic_rtti-g++-static-debug2004-07-23 15:23:12.000000000 +0200 |
109 | @@ -36,7 +36,7 @@ | 109 | @@ -36,7 +36,7 @@ |
110 | SYSCONF_LIBS_YACC= | 110 | SYSCONF_LIBS_YACC= |
111 | 111 | ||
112 | # Linking applications | 112 | # Linking applications |
113 | -SYSCONF_LINK = gcc | 113 | -SYSCONF_LINK = gcc |
114 | +SYSCONF_LINK = g++ | 114 | +SYSCONF_LINK = g++ |
115 | SYSCONF_LFLAGS = | 115 | SYSCONF_LFLAGS = |
116 | SYSCONF_LIBS = | 116 | SYSCONF_LIBS = |
117 | 117 | ||
118 | diff -ur qt-2.3.7-old/configs/linux-x86rtti-g++-shared qt-2.3.7/configs/linux-x86rtti-g++-shared | 118 | diff -ur qt-2.3.7-old/configs/linux-x86rtti-g++-shared qt-2.3.7/configs/linux-x86rtti-g++-shared |
119 | --- qt-2.3.7-old/configs/linux-x86rtti-g++-shared2004-07-23 15:22:56.000000000 +0200 | 119 | --- qt-2.3.7-old/configs/linux-x86rtti-g++-shared2004-07-23 15:22:56.000000000 +0200 |
120 | +++ qt-2.3.7/configs/linux-x86rtti-g++-shared2004-07-23 15:23:12.000000000 +0200 | 120 | +++ qt-2.3.7/configs/linux-x86rtti-g++-shared2004-07-23 15:23:12.000000000 +0200 |
121 | @@ -36,7 +36,7 @@ | 121 | @@ -36,7 +36,7 @@ |
122 | SYSCONF_LIBS_YACC= | 122 | SYSCONF_LIBS_YACC= |
123 | 123 | ||
124 | # Linking applications | 124 | # Linking applications |
125 | -SYSCONF_LINK = gcc | 125 | -SYSCONF_LINK = gcc |
126 | +SYSCONF_LINK = g++ | 126 | +SYSCONF_LINK = g++ |
127 | SYSCONF_LFLAGS = | 127 | SYSCONF_LFLAGS = |
128 | SYSCONF_LIBS = -lm | 128 | SYSCONF_LIBS = -lm |
129 | 129 | ||
130 | diff -ur qt-2.3.7-old/configs/linux-x86rtti-g++-shared-debug qt-2.3.7/configs/linux-x86rtti-g++-shared-debug | 130 | diff -ur qt-2.3.7-old/configs/linux-x86rtti-g++-shared-debug qt-2.3.7/configs/linux-x86rtti-g++-shared-debug |
131 | --- qt-2.3.7-old/configs/linux-x86rtti-g++-shared-debug2004-07-23 15:22:56.000000000 +0200 | 131 | --- qt-2.3.7-old/configs/linux-x86rtti-g++-shared-debug2004-07-23 15:22:56.000000000 +0200 |
132 | +++ qt-2.3.7/configs/linux-x86rtti-g++-shared-debug2004-07-23 15:23:12.000000000 +0200 | 132 | +++ qt-2.3.7/configs/linux-x86rtti-g++-shared-debug2004-07-23 15:23:12.000000000 +0200 |
133 | @@ -36,7 +36,7 @@ | 133 | @@ -36,7 +36,7 @@ |
134 | SYSCONF_LIBS_YACC= | 134 | SYSCONF_LIBS_YACC= |
135 | 135 | ||
136 | # Linking applications | 136 | # Linking applications |
137 | -SYSCONF_LINK = gcc | 137 | -SYSCONF_LINK = gcc |
138 | +SYSCONF_LINK = g++ | 138 | +SYSCONF_LINK = g++ |
139 | SYSCONF_LFLAGS = | 139 | SYSCONF_LFLAGS = |
140 | SYSCONF_LIBS = -lm | 140 | SYSCONF_LIBS = -lm |
141 | 141 | ||
142 | diff -ur qt-2.3.7-old/configs/linux-x86rtti-g++-static qt-2.3.7/configs/linux-x86rtti-g++-static | 142 | diff -ur qt-2.3.7-old/configs/linux-x86rtti-g++-static qt-2.3.7/configs/linux-x86rtti-g++-static |
143 | --- qt-2.3.7-old/configs/linux-x86rtti-g++-static2004-07-23 15:22:56.000000000 +0200 | 143 | --- qt-2.3.7-old/configs/linux-x86rtti-g++-static2004-07-23 15:22:56.000000000 +0200 |
144 | +++ qt-2.3.7/configs/linux-x86rtti-g++-static2004-07-23 15:23:12.000000000 +0200 | 144 | +++ qt-2.3.7/configs/linux-x86rtti-g++-static2004-07-23 15:23:12.000000000 +0200 |
145 | @@ -36,7 +36,7 @@ | 145 | @@ -36,7 +36,7 @@ |
146 | SYSCONF_LIBS_YACC= | 146 | SYSCONF_LIBS_YACC= |
147 | 147 | ||
148 | # Linking applications | 148 | # Linking applications |
149 | -SYSCONF_LINK = gcc | 149 | -SYSCONF_LINK = gcc |
150 | +SYSCONF_LINK = g++ | 150 | +SYSCONF_LINK = g++ |
151 | SYSCONF_LFLAGS = | 151 | SYSCONF_LFLAGS = |
152 | SYSCONF_LIBS = -lm | 152 | SYSCONF_LIBS = -lm |
153 | 153 | ||
154 | diff -ur qt-2.3.7-old/configs/linux-x86rtti-g++-static-debug qt-2.3.7/configs/linux-x86rtti-g++-static-debug | 154 | diff -ur qt-2.3.7-old/configs/linux-x86rtti-g++-static-debug qt-2.3.7/configs/linux-x86rtti-g++-static-debug |
155 | --- qt-2.3.7-old/configs/linux-x86rtti-g++-static-debug2004-07-23 15:22:56.000000000 +0200 | 155 | --- qt-2.3.7-old/configs/linux-x86rtti-g++-static-debug2004-07-23 15:22:56.000000000 +0200 |
156 | +++ qt-2.3.7/configs/linux-x86rtti-g++-static-debug2004-07-23 15:23:12.000000000 +0200 | 156 | +++ qt-2.3.7/configs/linux-x86rtti-g++-static-debug2004-07-23 15:23:12.000000000 +0200 |
157 | @@ -36,7 +36,7 @@ | 157 | @@ -36,7 +36,7 @@ |
158 | SYSCONF_LIBS_YACC= | 158 | SYSCONF_LIBS_YACC= |
159 | 159 | ||
160 | # Linking applications | 160 | # Linking applications |
161 | -SYSCONF_LINK = gcc | 161 | -SYSCONF_LINK = gcc |
162 | +SYSCONF_LINK = g++ | 162 | +SYSCONF_LINK = g++ |
163 | SYSCONF_LFLAGS = | 163 | SYSCONF_LFLAGS = |
164 | SYSCONF_LIBS = -lm | 164 | SYSCONF_LIBS = -lm |
165 | 165 | ||
166 | diff -ur qt-2.3.7-old/include/qapplication.h qt-2.3.7/include/qapplication.h | 166 | diff -ur qt-2.3.7-old/include/qapplication.h qt-2.3.7/include/qapplication.h |
167 | --- qt-2.3.7-old/include/qapplication.h2004-07-23 15:22:56.000000000 +0200 | 167 | --- qt-2.3.7-old/include/qapplication.h2004-07-23 15:22:56.000000000 +0200 |
168 | +++ qt-2.3.7/include/qapplication.h2004-07-23 15:25:42.000000000 +0200 | 168 | +++ qt-2.3.7/include/qapplication.h2004-07-23 15:25:42.000000000 +0200 |
169 | @@ -61,6 +61,10 @@ | 169 | @@ -61,6 +61,10 @@ |
170 | class QSemaphore; | 170 | class QSemaphore; |
171 | #endif | 171 | #endif |
172 | 172 | ||
173 | +#if !defined( QT_WEAK_SYMBOL ) | 173 | +#if !defined( QT_WEAK_SYMBOL ) |
174 | +#define QT_WEAK_SYMBOL | 174 | +#define QT_WEAK_SYMBOL |
175 | +#endif | 175 | +#endif |
176 | + | 176 | + |
177 | // REMOVE IN 3.0 (just here for moc source compatibility) | 177 | // REMOVE IN 3.0 (just here for moc source compatibility) |
178 | #define QNonBaseApplication QApplication | 178 | #define QNonBaseApplication QApplication |
179 | 179 | ||
180 | @@ -85,7 +89,10 @@ | 180 | @@ -85,7 +89,10 @@ |
181 | 181 | ||
182 | #ifndef QT_NO_STYLE | 182 | #ifndef QT_NO_STYLE |
183 | static QStyle &style(); | 183 | static QStyle &style(); |
184 | - static void setStyle( QStyle* ); | 184 | - static void setStyle( QStyle* ); |
185 | + static void setStyle( QStyle* ) QT_WEAK_SYMBOL; | 185 | + static void setStyle( QStyle* ) QT_WEAK_SYMBOL; |
186 | +private: | 186 | +private: |
187 | +static void setStyle_NonWeak( QStyle* ); | 187 | +static void setStyle_NonWeak( QStyle* ); |
188 | +public: | 188 | +public: |
189 | #endif | 189 | #endif |
190 | #if 1/* OBSOLETE */ | 190 | #if 1/* OBSOLETE */ |
191 | enum ColorMode { NormalColors, CustomColors }; | 191 | enum ColorMode { NormalColors, CustomColors }; |
192 | @@ -106,11 +113,19 @@ | 192 | @@ -106,11 +113,19 @@ |
193 | #ifndef QT_NO_PALETTE | 193 | #ifndef QT_NO_PALETTE |
194 | static QPalette palette( const QWidget* = 0 ); | 194 | static QPalette palette( const QWidget* = 0 ); |
195 | static void setPalette( const QPalette &, bool informWidgets=FALSE, | 195 | static void setPalette( const QPalette &, bool informWidgets=FALSE, |
196 | + const char* className = 0 ) QT_WEAK_SYMBOL; | 196 | + const char* className = 0 ) QT_WEAK_SYMBOL; |
197 | +private: | 197 | +private: |
198 | + static void setPalette_NonWeak( const QPalette &, bool informWidgets=FALSE, | 198 | + static void setPalette_NonWeak( const QPalette &, bool informWidgets=FALSE, |
199 | const char* className = 0 ); | 199 | const char* className = 0 ); |
200 | +public: | 200 | +public: |
201 | #endif | 201 | #endif |
202 | static QFont font( const QWidget* = 0 ); | 202 | static QFont font( const QWidget* = 0 ); |
203 | static void setFont( const QFont &, bool informWidgets=FALSE, | 203 | static void setFont( const QFont &, bool informWidgets=FALSE, |
204 | + const char* className = 0 ) QT_WEAK_SYMBOL; | 204 | + const char* className = 0 ) QT_WEAK_SYMBOL; |
205 | +private: | 205 | +private: |
206 | + static void setFont_NonWeak( const QFont &, bool informWidgets=FALSE, | 206 | + static void setFont_NonWeak( const QFont &, bool informWidgets=FALSE, |
207 | const char* className = 0 ); | 207 | const char* className = 0 ); |
208 | +public: | 208 | +public: |
209 | static QFontMetrics fontMetrics(); | 209 | static QFontMetrics fontMetrics(); |
210 | 210 | ||
211 | QWidget *mainWidget() const; | 211 | QWidget *mainWidget() const; |
212 | @@ -207,7 +222,10 @@ | 212 | @@ -207,7 +222,10 @@ |
213 | void qwsSetCustomColors( QRgb *colortable, int start, int numColors ); | 213 | void qwsSetCustomColors( QRgb *colortable, int start, int numColors ); |
214 | #ifndef QT_NO_QWS_MANAGER | 214 | #ifndef QT_NO_QWS_MANAGER |
215 | static QWSDecoration &qwsDecoration(); | 215 | static QWSDecoration &qwsDecoration(); |
216 | - static void qwsSetDecoration( QWSDecoration *); | 216 | - static void qwsSetDecoration( QWSDecoration *); |
217 | + static void qwsSetDecoration( QWSDecoration *) QT_WEAK_SYMBOL; | 217 | + static void qwsSetDecoration( QWSDecoration *) QT_WEAK_SYMBOL; |
218 | +private: | 218 | +private: |
219 | + static void qwsSetDecoration_NonWeak( QWSDecoration *); | 219 | + static void qwsSetDecoration_NonWeak( QWSDecoration *); |
220 | +public: | 220 | +public: |
221 | #endif | 221 | #endif |
222 | #endif | 222 | #endif |
223 | 223 | ||
224 | diff -ur qt-2.3.7-old/include/qcstring.h qt-2.3.7/include/qcstring.h | 224 | diff -ur qt-2.3.7-old/include/qcstring.h qt-2.3.7/include/qcstring.h |
225 | --- qt-2.3.7-old/include/qcstring.h2004-07-23 15:22:56.000000000 +0200 | 225 | --- qt-2.3.7-old/include/qcstring.h2004-07-23 15:22:56.000000000 +0200 |
226 | +++ qt-2.3.7/include/qcstring.h2004-07-23 15:42:01.000000000 +0200 | 226 | +++ qt-2.3.7/include/qcstring.h2004-07-23 15:42:01.000000000 +0200 |
227 | @@ -119,7 +119,7 @@ | 227 | @@ -119,7 +119,7 @@ |
228 | // We want to keep source compatibility for 2.x | 228 | // We want to keep source compatibility for 2.x |
229 | // ### TODO for 4.0: completely remove these and the cstr* functions | 229 | // ### TODO for 4.0: completely remove these and the cstr* functions |
230 | 230 | ||
231 | -#if !defined(QT_GENUINE_STR) | 231 | -#if !defined(QT_GENUINE_STR) |
232 | +#if 0 | 232 | +#if 0 |
233 | 233 | ||
234 | #undefstrlen | 234 | #undefstrlen |
235 | #define strlen qstrlen | 235 | #define strlen qstrlen |
236 | diff -ur qt-2.3.7-old/include/qfontdatabase.h qt-2.3.7/include/qfontdatabase.h | 236 | diff -ur qt-2.3.7-old/include/qfontdatabase.h qt-2.3.7/include/qfontdatabase.h |
237 | --- qt-2.3.7-old/include/qfontdatabase.h2004-07-23 15:22:56.000000000 +0200 | 237 | --- qt-2.3.7-old/include/qfontdatabase.h2004-07-23 15:22:56.000000000 +0200 |
238 | +++ qt-2.3.7/include/qfontdatabase.h2004-07-23 15:25:42.000000000 +0200 | 238 | +++ qt-2.3.7/include/qfontdatabase.h2004-07-23 15:25:42.000000000 +0200 |
239 | @@ -59,6 +59,10 @@ | 239 | @@ -59,6 +59,10 @@ |
240 | class QDiskFont; | 240 | class QDiskFont; |
241 | #endif | 241 | #endif |
242 | 242 | ||
243 | +#if !defined( QT_WEAK_SYMBOL ) | 243 | +#if !defined( QT_WEAK_SYMBOL ) |
244 | +#define QT_WEAK_SYMBOL | 244 | +#define QT_WEAK_SYMBOL |
245 | +#endif | 245 | +#endif |
246 | + | 246 | + |
247 | class QFontDatabasePrivate; | 247 | class QFontDatabasePrivate; |
248 | 248 | ||
249 | class Q_EXPORT QFontDatabase | 249 | class Q_EXPORT QFontDatabase |
250 | @@ -67,9 +71,16 @@ | 250 | @@ -67,9 +71,16 @@ |
251 | QFontDatabase(); | 251 | QFontDatabase(); |
252 | 252 | ||
253 | QStringList families( bool onlyForLocale = TRUE ) const; | 253 | QStringList families( bool onlyForLocale = TRUE ) const; |
254 | + | 254 | + |
255 | + | 255 | + |
256 | QValueList<int> pointSizes( const QString &family, | 256 | QValueList<int> pointSizes( const QString &family, |
257 | const QString &style = QString::null, | 257 | const QString &style = QString::null, |
258 | - const QString &charSet = QString::null ); | 258 | - const QString &charSet = QString::null ); |
259 | + const QString &charSet = QString::null ) QT_WEAK_SYMBOL; | 259 | + const QString &charSet = QString::null ) QT_WEAK_SYMBOL; |
260 | +private: | 260 | +private: |
261 | + QValueList<int> pointSizes_NonWeak( const QString &family, | 261 | + QValueList<int> pointSizes_NonWeak( const QString &family, |
262 | + const QString &style, | 262 | + const QString &style, |
263 | + const QString &charSet ); | 263 | + const QString &charSet ); |
264 | +public: | 264 | +public: |
265 | QStringList styles( const QString &family, | 265 | QStringList styles( const QString &family, |
266 | const QString &charSet = QString::null ) const; | 266 | const QString &charSet = QString::null ) const; |
267 | QStringList charSets( const QString &familyName, | 267 | QStringList charSets( const QString &familyName, |
268 | diff -ur qt-2.3.7-old/include/qglobal.h qt-2.3.7/include/qglobal.h | 268 | diff -ur qt-2.3.7-old/include/qglobal.h qt-2.3.7/include/qglobal.h |
269 | --- qt-2.3.7-old/include/qglobal.h2004-07-23 15:22:56.000000000 +0200 | 269 | --- qt-2.3.7-old/include/qglobal.h2004-07-23 15:22:56.000000000 +0200 |
270 | +++ qt-2.3.7/include/qglobal.h2004-07-23 15:42:01.000000000 +0200 | 270 | +++ qt-2.3.7/include/qglobal.h2004-07-23 15:42:01.000000000 +0200 |
271 | @@ -207,8 +207,16 @@ | 271 | @@ -207,8 +207,16 @@ |
272 | #if __GNUC__ == 2 && __GNUC_MINOR__ == 96 | 272 | #if __GNUC__ == 2 && __GNUC_MINOR__ == 96 |
273 | #define Q_FP_CCAST_BROKEN | 273 | #define Q_FP_CCAST_BROKEN |
274 | #endif | 274 | #endif |
275 | +/* ARM gcc pads structs to 32 bits, even when they contain a single | 275 | +/* ARM gcc pads structs to 32 bits, even when they contain a single |
276 | + char, or short. We tell gcc to pack QChars to 16 bits, to avoid | 276 | + char, or short. We tell gcc to pack QChars to 16 bits, to avoid |
277 | + QString bloat. However, gcc 3.4 doesn't allow us to create references to | 277 | + QString bloat. However, gcc 3.4 doesn't allow us to create references to |
278 | + members of a packed struct. (Pointers are OK, because then you | 278 | + members of a packed struct. (Pointers are OK, because then you |
279 | + supposedly know what you are doing.) */ | 279 | + supposedly know what you are doing.) */ |
280 | #if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) | 280 | #if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) |
281 | #define Q_PACKED __attribute__ ((packed)) | 281 | #define Q_PACKED __attribute__ ((packed)) |
282 | +# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 | 282 | +# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 |
283 | +# define Q_NO_PACKED_REFERENCE | 283 | +# define Q_NO_PACKED_REFERENCE |
284 | +# endif | 284 | +# endif |
285 | #endif | 285 | #endif |
286 | #elif defined(__xlC__) | 286 | #elif defined(__xlC__) |
287 | #define _CC_XLC_ | 287 | #define _CC_XLC_ |
288 | diff -ur qt-2.3.7-old/include/qiconview.h qt-2.3.7/include/qiconview.h | 288 | diff -ur qt-2.3.7-old/include/qiconview.h qt-2.3.7/include/qiconview.h |
289 | --- qt-2.3.7-old/include/qiconview.h2004-07-23 15:22:56.000000000 +0200 | 289 | --- qt-2.3.7-old/include/qiconview.h2004-07-23 15:22:56.000000000 +0200 |
290 | +++ qt-2.3.7/include/qiconview.h2004-07-23 15:45:34.000000000 +0200 | 290 | +++ qt-2.3.7/include/qiconview.h2004-07-23 15:45:34.000000000 +0200 |
291 | @@ -444,6 +444,7 @@ | 291 | @@ -444,6 +444,7 @@ |
292 | virtual void contentsDropEvent( QDropEvent *e ); | 292 | virtual void contentsDropEvent( QDropEvent *e ); |
293 | #endif | 293 | #endif |
294 | 294 | ||
295 | + void bufferedPaintEvent( QPaintEvent* ); | 295 | + void bufferedPaintEvent( QPaintEvent* ); |
296 | virtual void resizeEvent( QResizeEvent* e ); | 296 | virtual void resizeEvent( QResizeEvent* e ); |
297 | virtual void keyPressEvent( QKeyEvent *e ); | 297 | virtual void keyPressEvent( QKeyEvent *e ); |
298 | virtual void focusInEvent( QFocusEvent *e ); | 298 | virtual void focusInEvent( QFocusEvent *e ); |
299 | diff -ur qt-2.3.7-old/include/qsortedlist.h qt-2.3.7/include/qsortedlist.h | 299 | diff -ur qt-2.3.7-old/include/qsortedlist.h qt-2.3.7/include/qsortedlist.h |
300 | --- qt-2.3.7-old/include/qsortedlist.h2004-07-23 15:22:56.000000000 +0200 | 300 | --- qt-2.3.7-old/include/qsortedlist.h2004-07-23 15:22:56.000000000 +0200 |
301 | +++ qt-2.3.7/include/qsortedlist.h2004-07-23 15:42:01.000000000 +0200 | 301 | +++ qt-2.3.7/include/qsortedlist.h2004-07-23 15:42:01.000000000 +0200 |
302 | @@ -48,7 +48,7 @@ | 302 | @@ -48,7 +48,7 @@ |
303 | public: | 303 | public: |
304 | QSortedList() {} | 304 | QSortedList() {} |
305 | QSortedList( const QSortedList<type> &l ) : QList<type>(l) {} | 305 | QSortedList( const QSortedList<type> &l ) : QList<type>(l) {} |
306 | - ~QSortedList() { clear(); } | 306 | - ~QSortedList() { clear(); } |
307 | + ~QSortedList() { this->clear(); } | 307 | + ~QSortedList() { this->clear(); } |
308 | QSortedList<type> &operator=(const QSortedList<type> &l) | 308 | QSortedList<type> &operator=(const QSortedList<type> &l) |
309 | { return (QSortedList<type>&)QList<type>::operator=(l); } | 309 | { return (QSortedList<type>&)QList<type>::operator=(l); } |
310 | 310 | ||
311 | diff -ur qt-2.3.7-old/include/qstring.h qt-2.3.7/include/qstring.h | 311 | diff -ur qt-2.3.7-old/include/qstring.h qt-2.3.7/include/qstring.h |
312 | --- qt-2.3.7-old/include/qstring.h2004-07-23 15:22:56.000000000 +0200 | 312 | --- qt-2.3.7-old/include/qstring.h2004-07-23 15:22:56.000000000 +0200 |
313 | +++ qt-2.3.7/include/qstring.h2004-07-23 15:42:01.000000000 +0200 | 313 | +++ qt-2.3.7/include/qstring.h2004-07-23 15:42:01.000000000 +0200 |
314 | @@ -163,8 +163,16 @@ | 314 | @@ -163,8 +163,16 @@ |
315 | bool isLetterOrNumber() const; | 315 | bool isLetterOrNumber() const; |
316 | bool isDigit() const; | 316 | bool isDigit() const; |
317 | 317 | ||
318 | + | 318 | + |
319 | +#ifdef Q_NO_PACKED_REFERENCE | 319 | +#ifdef Q_NO_PACKED_REFERENCE |
320 | + uchar& cell() { return *(&cl); } | 320 | + uchar& cell() { return *(&cl); } |
321 | + uchar& row() { return *(&rw); } | 321 | + uchar& row() { return *(&rw); } |
322 | +#else | 322 | +#else |
323 | uchar& cell() { return cl; } | 323 | uchar& cell() { return cl; } |
324 | - uchar& row() { return rw; } | 324 | - uchar& row() { return rw; } |
325 | + uchar& row() { return rw; } | 325 | + uchar& row() { return rw; } |
326 | +#endif | 326 | +#endif |
327 | + | 327 | + |
328 | + | 328 | + |
329 | uchar cell() const { return cl; } | 329 | uchar cell() const { return cl; } |
330 | uchar row() const { return rw; } | 330 | uchar row() const { return rw; } |
331 | 331 | ||
332 | diff -ur qt-2.3.7-old/src/iconview/qiconview.cpp qt-2.3.7/src/iconview/qiconview.cpp | 332 | diff -ur qt-2.3.7-old/src/iconview/qiconview.cpp qt-2.3.7/src/iconview/qiconview.cpp |
333 | --- qt-2.3.7-old/src/iconview/qiconview.cpp2004-07-23 15:22:56.000000000 +0200 | 333 | --- qt-2.3.7-old/src/iconview/qiconview.cpp2004-07-23 15:22:56.000000000 +0200 |
334 | +++ qt-2.3.7/src/iconview/qiconview.cpp2004-07-23 15:45:34.000000000 +0200 | 334 | +++ qt-2.3.7/src/iconview/qiconview.cpp2004-07-23 15:45:34.000000000 +0200 |
335 | @@ -1,5 +1,5 @@ | ||
336 | /**************************************************************************** | ||
337 | -** $Id$ | ||
338 | +** $Id$ | ||
339 | ** | ||
340 | ** Implementation of QIconView widget class | ||
341 | ** | ||
342 | @@ -220,6 +220,7 @@ | 335 | @@ -220,6 +220,7 @@ |
343 | QIconView::SelectionMode selectionMode; | 336 | QIconView::SelectionMode selectionMode; |
344 | QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, *startDragItem, *pressedItem, *selectAnchor; | 337 | QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, *startDragItem, *pressedItem, *selectAnchor; |
345 | QRect *rubber; | 338 | QRect *rubber; |
346 | + QPixmap *backBuffer; | 339 | + QPixmap *backBuffer; |
347 | QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer, | 340 | QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer, |
348 | *fullRedrawTimer; | 341 | *fullRedrawTimer; |
349 | int rastX, rastY, spacing; | 342 | int rastX, rastY, spacing; |
350 | @@ -2263,6 +2264,7 @@ | 343 | @@ -2263,6 +2264,7 @@ |
351 | d->currentItem = 0; | 344 | d->currentItem = 0; |
352 | d->highlightedItem = 0; | 345 | d->highlightedItem = 0; |
353 | d->rubber = 0; | 346 | d->rubber = 0; |
354 | + d->backBuffer = 0; | 347 | + d->backBuffer = 0; |
355 | d->scrollTimer = 0; | 348 | d->scrollTimer = 0; |
356 | d->startDragItem = 0; | 349 | d->startDragItem = 0; |
357 | d->tmpCurrentItem = 0; | 350 | d->tmpCurrentItem = 0; |
358 | @@ -2411,6 +2413,8 @@ | 351 | @@ -2411,6 +2413,8 @@ |
359 | delete item; | 352 | delete item; |
360 | item = tmp; | 353 | item = tmp; |
361 | } | 354 | } |
362 | + delete d->backBuffer; | 355 | + delete d->backBuffer; |
363 | + d->backBuffer = 0; | 356 | + d->backBuffer = 0; |
364 | delete d->fm; | 357 | delete d->fm; |
365 | d->fm = 0; | 358 | d->fm = 0; |
366 | #ifndef QT_NO_TOOLTIP | 359 | #ifndef QT_NO_TOOLTIP |
367 | @@ -2877,6 +2881,48 @@ | 360 | @@ -2877,6 +2881,48 @@ |
368 | } | 361 | } |
369 | 362 | ||
370 | /*! | 363 | /*! |
371 | + This function grabs all paintevents that otherwise would have been | 364 | + This function grabs all paintevents that otherwise would have been |
372 | + processed by the QScrollView::viewportPaintEvent(). Here we use a | 365 | + processed by the QScrollView::viewportPaintEvent(). Here we use a |
373 | + doublebuffer to reduce 'on-paint' flickering on QIconView | 366 | + doublebuffer to reduce 'on-paint' flickering on QIconView |
374 | + (and of course its childs). | 367 | + (and of course its childs). |
375 | + | 368 | + |
376 | + \sa QScrollView::viewportPaintEvent(), QIconView::drawContents() | 369 | + \sa QScrollView::viewportPaintEvent(), QIconView::drawContents() |
377 | +*/ | 370 | +*/ |
378 | + | 371 | + |
379 | +void QIconView::bufferedPaintEvent( QPaintEvent* pe ) | 372 | +void QIconView::bufferedPaintEvent( QPaintEvent* pe ) |
380 | +{ | 373 | +{ |
381 | + QWidget* vp = viewport(); | 374 | + QWidget* vp = viewport(); |
382 | + QRect r = pe->rect() & vp->rect(); | 375 | + QRect r = pe->rect() & vp->rect(); |
383 | + int ex = r.x() + contentsX(); | 376 | + int ex = r.x() + contentsX(); |
384 | + int ey = r.y() + contentsY(); | 377 | + int ey = r.y() + contentsY(); |
385 | + int ew = r.width(); | 378 | + int ew = r.width(); |
386 | + int eh = r.height(); | 379 | + int eh = r.height(); |
387 | + | 380 | + |
388 | + if ( !d->backBuffer ) | 381 | + if ( !d->backBuffer ) |
389 | +d->backBuffer = new QPixmap(vp->size()); | 382 | +d->backBuffer = new QPixmap(vp->size()); |
390 | + if ( d->backBuffer->size() != vp->size() ) { | 383 | + if ( d->backBuffer->size() != vp->size() ) { |
391 | +//Resize function (with hysteesis). Uses a good compromise between memory | 384 | +//Resize function (with hysteesis). Uses a good compromise between memory |
392 | +//consumption and speed (number) of resizes. | 385 | +//consumption and speed (number) of resizes. |
393 | + float newWidth = (float)vp->width(); | 386 | + float newWidth = (float)vp->width(); |
394 | +float newHeight = (float)vp->height(); | 387 | +float newHeight = (float)vp->height(); |
395 | +if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() ) | 388 | +if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() ) |
396 | +{ | 389 | +{ |
397 | + newWidth *= 1.1892; | 390 | + newWidth *= 1.1892; |
398 | + newHeight *= 1.1892; | 391 | + newHeight *= 1.1892; |
399 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); | 392 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); |
400 | +} else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() ) | 393 | +} else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() ) |
401 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); | 394 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); |
402 | + } | 395 | + } |
403 | + | 396 | + |
404 | + QPainter p; | 397 | + QPainter p; |
405 | + p.begin(d->backBuffer, vp); | 398 | + p.begin(d->backBuffer, vp); |
406 | + drawContentsOffset(&p, contentsX(), contentsY(), ex, ey, ew, eh); | 399 | + drawContentsOffset(&p, contentsX(), contentsY(), ex, ey, ew, eh); |
407 | + p.end(); | 400 | + p.end(); |
408 | + bitBlt(vp, r.x(), r.y(), d->backBuffer, r.x(), r.y(), ew, eh); | 401 | + bitBlt(vp, r.x(), r.y(), d->backBuffer, r.x(), r.y(), ew, eh); |
409 | +} | 402 | +} |
410 | + | 403 | + |
411 | +/*! | 404 | +/*! |
412 | + | 405 | + |
413 | \reimp | 406 | \reimp |
414 | */ | 407 | */ |
415 | 408 | ||
416 | @@ -4855,7 +4901,7 @@ | 409 | @@ -4855,7 +4901,7 @@ |
417 | if ( !d->rubber ) | 410 | if ( !d->rubber ) |
418 | drawDragShapes( d->oldDragPos ); | 411 | drawDragShapes( d->oldDragPos ); |
419 | } | 412 | } |
420 | - viewportPaintEvent( (QPaintEvent*)e ); | 413 | - viewportPaintEvent( (QPaintEvent*)e ); |
421 | + bufferedPaintEvent ((QPaintEvent*)e ); | 414 | + bufferedPaintEvent ((QPaintEvent*)e ); |
422 | if ( d->dragging ) { | 415 | if ( d->dragging ) { |
423 | if ( !d->rubber ) | 416 | if ( !d->rubber ) |
424 | drawDragShapes( d->oldDragPos ); | 417 | drawDragShapes( d->oldDragPos ); |
425 | @@ -5286,11 +5332,19 @@ | 418 | @@ -5286,11 +5332,19 @@ |
426 | return; | 419 | return; |
427 | 420 | ||
428 | if ( item->d->container1 && d->firstContainer ) { | 421 | if ( item->d->container1 && d->firstContainer ) { |
429 | -item->d->container1->items.removeRef( item ); | 422 | -item->d->container1->items.removeRef( item ); |
430 | + //Special-case checking of the last item, since this may be | 423 | + //Special-case checking of the last item, since this may be |
431 | + //called a few times for the same item. | 424 | + //called a few times for the same item. |
432 | + if (item->d->container1->items.last() == item) | 425 | + if (item->d->container1->items.last() == item) |
433 | + item->d->container1->items.removeLast(); | 426 | + item->d->container1->items.removeLast(); |
434 | + else | 427 | + else |
435 | + item->d->container1->items.removeRef( item ); | 428 | + item->d->container1->items.removeRef( item ); |
436 | } | 429 | } |
437 | item->d->container1 = 0; | 430 | item->d->container1 = 0; |
438 | if ( item->d->container2 && d->firstContainer ) { | 431 | if ( item->d->container2 && d->firstContainer ) { |
439 | -item->d->container2->items.removeRef( item ); | 432 | -item->d->container2->items.removeRef( item ); |
440 | + if (item->d->container2->items.last() == item) | 433 | + if (item->d->container2->items.last() == item) |
441 | + item->d->container2->items.removeLast(); | 434 | + item->d->container2->items.removeLast(); |
442 | + else | 435 | + else |
443 | + item->d->container2->items.removeRef( item ); | 436 | + item->d->container2->items.removeRef( item ); |
444 | } | 437 | } |
445 | item->d->container2 = 0; | 438 | item->d->container2 = 0; |
446 | 439 | ||
447 | diff -ur qt-2.3.7-old/src/iconview/qiconview.h qt-2.3.7/src/iconview/qiconview.h | 440 | diff -ur qt-2.3.7-old/src/iconview/qiconview.h qt-2.3.7/src/iconview/qiconview.h |
448 | --- qt-2.3.7-old/src/iconview/qiconview.h2004-07-23 15:22:56.000000000 +0200 | 441 | --- qt-2.3.7-old/src/iconview/qiconview.h2004-07-23 15:22:56.000000000 +0200 |
449 | +++ qt-2.3.7/src/iconview/qiconview.h2004-07-23 15:45:34.000000000 +0200 | 442 | +++ qt-2.3.7/src/iconview/qiconview.h2004-07-23 15:45:34.000000000 +0200 |
450 | @@ -444,6 +444,7 @@ | 443 | @@ -444,6 +444,7 @@ |
451 | virtual void contentsDropEvent( QDropEvent *e ); | 444 | virtual void contentsDropEvent( QDropEvent *e ); |
452 | #endif | 445 | #endif |
453 | 446 | ||
454 | + void bufferedPaintEvent( QPaintEvent* ); | 447 | + void bufferedPaintEvent( QPaintEvent* ); |
455 | virtual void resizeEvent( QResizeEvent* e ); | 448 | virtual void resizeEvent( QResizeEvent* e ); |
456 | virtual void keyPressEvent( QKeyEvent *e ); | 449 | virtual void keyPressEvent( QKeyEvent *e ); |
457 | virtual void focusInEvent( QFocusEvent *e ); | 450 | virtual void focusInEvent( QFocusEvent *e ); |
458 | diff -ur qt-2.3.7-old/src/kernel/qapplication.cpp qt-2.3.7/src/kernel/qapplication.cpp | 451 | diff -ur qt-2.3.7-old/src/kernel/qapplication.cpp qt-2.3.7/src/kernel/qapplication.cpp |
459 | --- qt-2.3.7-old/src/kernel/qapplication.cpp2004-07-23 15:22:56.000000000 +0200 | 452 | --- qt-2.3.7-old/src/kernel/qapplication.cpp2004-07-23 15:22:56.000000000 +0200 |
460 | +++ qt-2.3.7/src/kernel/qapplication.cpp2004-07-23 15:25:42.000000000 +0200 | 453 | +++ qt-2.3.7/src/kernel/qapplication.cpp2004-07-23 15:25:42.000000000 +0200 |
461 | @@ -35,6 +35,8 @@ | 454 | @@ -35,6 +35,8 @@ |
462 | ** | 455 | ** |
463 | **********************************************************************/ | 456 | **********************************************************************/ |
464 | 457 | ||
465 | +#define QT_WEAK_SYMBOL__attribute__(( weak )) | 458 | +#define QT_WEAK_SYMBOL__attribute__(( weak )) |
466 | + | 459 | + |
467 | #include "qobjectlist.h" | 460 | #include "qobjectlist.h" |
468 | #include "qobjectdict.h" | 461 | #include "qobjectdict.h" |
469 | #include "qapplication.h" | 462 | #include "qapplication.h" |
470 | @@ -933,11 +935,16 @@ | 463 | @@ -933,11 +935,16 @@ |
471 | #ifndef QT_NO_STYLE | 464 | #ifndef QT_NO_STYLE |
472 | void QApplication::setStyle( QStyle *style ) | 465 | void QApplication::setStyle( QStyle *style ) |
473 | { | 466 | { |
474 | +setStyle_NonWeak ( style ); | 467 | +setStyle_NonWeak ( style ); |
475 | +} | 468 | +} |
476 | + | 469 | + |
477 | +void QApplication::setStyle_NonWeak( QStyle *style ) | 470 | +void QApplication::setStyle_NonWeak( QStyle *style ) |
478 | +{ | 471 | +{ |
479 | QStyle* old = app_style; | 472 | QStyle* old = app_style; |
480 | - app_style = style; | 473 | - app_style = style; |
481 | 474 | ||
482 | if ( startingUp() ) { | 475 | if ( startingUp() ) { |
483 | delete old; | 476 | delete old; |
484 | +app_style = style; | 477 | +app_style = style; |
485 | return; | 478 | return; |
486 | } | 479 | } |
487 | 480 | ||
488 | @@ -958,6 +965,8 @@ | 481 | @@ -958,6 +965,8 @@ |
489 | old->unPolish( qApp ); | 482 | old->unPolish( qApp ); |
490 | } | 483 | } |
491 | 484 | ||
492 | + app_style = style; | 485 | + app_style = style; |
493 | + | 486 | + |
494 | // take care of possible palette requirements of certain gui | 487 | // take care of possible palette requirements of certain gui |
495 | // styles. Do it before polishing the application since the style | 488 | // styles. Do it before polishing the application since the style |
496 | // might call QApplication::setStyle() itself | 489 | // might call QApplication::setStyle() itself |
497 | @@ -1184,13 +1193,30 @@ | 490 | @@ -1184,13 +1193,30 @@ |
498 | \sa QWidget::setPalette(), palette(), QStyle::polish() | 491 | \sa QWidget::setPalette(), palette(), QStyle::polish() |
499 | */ | 492 | */ |
500 | 493 | ||
501 | -void QApplication::setPalette( const QPalette &palette, bool informWidgets, | 494 | -void QApplication::setPalette( const QPalette &palette, bool informWidgets, |
502 | +void QApplication::setPalette ( const QPalette &palette, bool informWidgets, | 495 | +void QApplication::setPalette ( const QPalette &palette, bool informWidgets, |
503 | + const char* className ) | 496 | + const char* className ) |
504 | +{ | 497 | +{ |
505 | +setPalette_NonWeak ( palette, informWidgets, className ); | 498 | +setPalette_NonWeak ( palette, informWidgets, className ); |
506 | +} | 499 | +} |
507 | + | 500 | + |
508 | +void QApplication::setPalette_NonWeak ( const QPalette &palette, bool informWidgets, | 501 | +void QApplication::setPalette_NonWeak ( const QPalette &palette, bool informWidgets, |
509 | const char* className ) | 502 | const char* className ) |
510 | { | 503 | { |
511 | QPalette pal = palette; | 504 | QPalette pal = palette; |
512 | #ifndef QT_NO_STYLE | 505 | #ifndef QT_NO_STYLE |
513 | - if ( !startingUp() ) | 506 | - if ( !startingUp() ) |
514 | + if ( !startingUp() ) { | 507 | + if ( !startingUp() ) { |
515 | qApp->style().polish( pal );// NB: non-const reference | 508 | qApp->style().polish( pal );// NB: non-const reference |
516 | +if ( className ) { | 509 | +if ( className ) { |
517 | + // if we just polished a class specific palette (this normally | 510 | + // if we just polished a class specific palette (this normally |
518 | + // only called by qt_fix_tooltips - see below), we better re- | 511 | + // only called by qt_fix_tooltips - see below), we better re- |
519 | + // polish the global palette. Some styles like liquid can get | 512 | + // polish the global palette. Some styles like liquid can get |
520 | + // confused, because they can not detect if the polished palette | 513 | + // confused, because they can not detect if the polished palette |
521 | + // is the global one or only a class specific one. | 514 | + // is the global one or only a class specific one. |
522 | + // (liquid uses this palette to calculate blending pixmaps) | 515 | + // (liquid uses this palette to calculate blending pixmaps) |
523 | + QPalette p = qApp-> palette ( ); | 516 | + QPalette p = qApp-> palette ( ); |
524 | + qApp->style().polish ( p ); | 517 | + qApp->style().polish ( p ); |
525 | +} | 518 | +} |
526 | + } | 519 | + } |
527 | #endif | 520 | #endif |
528 | bool all = FALSE; | 521 | bool all = FALSE; |
529 | if ( !className ) { | 522 | if ( !className ) { |
530 | @@ -1275,6 +1301,12 @@ | 523 | @@ -1275,6 +1301,12 @@ |
531 | void QApplication::setFont( const QFont &font, bool informWidgets, | 524 | void QApplication::setFont( const QFont &font, bool informWidgets, |
532 | const char* className ) | 525 | const char* className ) |
533 | { | 526 | { |
534 | +setFont_NonWeak ( font, informWidgets, className ); | 527 | +setFont_NonWeak ( font, informWidgets, className ); |
535 | +} | 528 | +} |
536 | + | 529 | + |
537 | +void QApplication::setFont_NonWeak( const QFont &font, bool informWidgets, | 530 | +void QApplication::setFont_NonWeak( const QFont &font, bool informWidgets, |
538 | + const char* className ) | 531 | + const char* className ) |
539 | +{ | 532 | +{ |
540 | bool all = FALSE; | 533 | bool all = FALSE; |
541 | if ( !className ) { | 534 | if ( !className ) { |
542 | if ( !app_font ) { | 535 | if ( !app_font ) { |
543 | diff -ur qt-2.3.7-old/src/kernel/qapplication.h qt-2.3.7/src/kernel/qapplication.h | 536 | diff -ur qt-2.3.7-old/src/kernel/qapplication.h qt-2.3.7/src/kernel/qapplication.h |
544 | --- qt-2.3.7-old/src/kernel/qapplication.h2004-07-23 15:22:56.000000000 +0200 | 537 | --- qt-2.3.7-old/src/kernel/qapplication.h2004-07-23 15:22:56.000000000 +0200 |
545 | +++ qt-2.3.7/src/kernel/qapplication.h2004-07-23 15:25:42.000000000 +0200 | 538 | +++ qt-2.3.7/src/kernel/qapplication.h2004-07-23 15:25:42.000000000 +0200 |
546 | @@ -61,6 +61,10 @@ | 539 | @@ -61,6 +61,10 @@ |
547 | class QSemaphore; | 540 | class QSemaphore; |
548 | #endif | 541 | #endif |
549 | 542 | ||
550 | +#if !defined( QT_WEAK_SYMBOL ) | 543 | +#if !defined( QT_WEAK_SYMBOL ) |
551 | +#define QT_WEAK_SYMBOL | 544 | +#define QT_WEAK_SYMBOL |
552 | +#endif | 545 | +#endif |
553 | + | 546 | + |
554 | // REMOVE IN 3.0 (just here for moc source compatibility) | 547 | // REMOVE IN 3.0 (just here for moc source compatibility) |
555 | #define QNonBaseApplication QApplication | 548 | #define QNonBaseApplication QApplication |
556 | 549 | ||
557 | @@ -85,7 +89,10 @@ | 550 | @@ -85,7 +89,10 @@ |
558 | 551 | ||
559 | #ifndef QT_NO_STYLE | 552 | #ifndef QT_NO_STYLE |
560 | static QStyle &style(); | 553 | static QStyle &style(); |
561 | - static void setStyle( QStyle* ); | 554 | - static void setStyle( QStyle* ); |
562 | + static void setStyle( QStyle* ) QT_WEAK_SYMBOL; | 555 | + static void setStyle( QStyle* ) QT_WEAK_SYMBOL; |
563 | +private: | 556 | +private: |
564 | +static void setStyle_NonWeak( QStyle* ); | 557 | +static void setStyle_NonWeak( QStyle* ); |
565 | +public: | 558 | +public: |
566 | #endif | 559 | #endif |
567 | #if 1/* OBSOLETE */ | 560 | #if 1/* OBSOLETE */ |
568 | enum ColorMode { NormalColors, CustomColors }; | 561 | enum ColorMode { NormalColors, CustomColors }; |
569 | @@ -106,11 +113,19 @@ | 562 | @@ -106,11 +113,19 @@ |
570 | #ifndef QT_NO_PALETTE | 563 | #ifndef QT_NO_PALETTE |
571 | static QPalette palette( const QWidget* = 0 ); | 564 | static QPalette palette( const QWidget* = 0 ); |
572 | static void setPalette( const QPalette &, bool informWidgets=FALSE, | 565 | static void setPalette( const QPalette &, bool informWidgets=FALSE, |
573 | + const char* className = 0 ) QT_WEAK_SYMBOL; | 566 | + const char* className = 0 ) QT_WEAK_SYMBOL; |
574 | +private: | 567 | +private: |
575 | + static void setPalette_NonWeak( const QPalette &, bool informWidgets=FALSE, | 568 | + static void setPalette_NonWeak( const QPalette &, bool informWidgets=FALSE, |
576 | const char* className = 0 ); | 569 | const char* className = 0 ); |
577 | +public: | 570 | +public: |
578 | #endif | 571 | #endif |
579 | static QFont font( const QWidget* = 0 ); | 572 | static QFont font( const QWidget* = 0 ); |
580 | static void setFont( const QFont &, bool informWidgets=FALSE, | 573 | static void setFont( const QFont &, bool informWidgets=FALSE, |
581 | + const char* className = 0 ) QT_WEAK_SYMBOL; | 574 | + const char* className = 0 ) QT_WEAK_SYMBOL; |
582 | +private: | 575 | +private: |
583 | + static void setFont_NonWeak( const QFont &, bool informWidgets=FALSE, | 576 | + static void setFont_NonWeak( const QFont &, bool informWidgets=FALSE, |
584 | const char* className = 0 ); | 577 | const char* className = 0 ); |
585 | +public: | 578 | +public: |
586 | static QFontMetrics fontMetrics(); | 579 | static QFontMetrics fontMetrics(); |
587 | 580 | ||
588 | QWidget *mainWidget() const; | 581 | QWidget *mainWidget() const; |
589 | @@ -207,7 +222,10 @@ | 582 | @@ -207,7 +222,10 @@ |
590 | void qwsSetCustomColors( QRgb *colortable, int start, int numColors ); | 583 | void qwsSetCustomColors( QRgb *colortable, int start, int numColors ); |
591 | #ifndef QT_NO_QWS_MANAGER | 584 | #ifndef QT_NO_QWS_MANAGER |
592 | static QWSDecoration &qwsDecoration(); | 585 | static QWSDecoration &qwsDecoration(); |
593 | - static void qwsSetDecoration( QWSDecoration *); | 586 | - static void qwsSetDecoration( QWSDecoration *); |
594 | + static void qwsSetDecoration( QWSDecoration *) QT_WEAK_SYMBOL; | 587 | + static void qwsSetDecoration( QWSDecoration *) QT_WEAK_SYMBOL; |
595 | +private: | 588 | +private: |
596 | + static void qwsSetDecoration_NonWeak( QWSDecoration *); | 589 | + static void qwsSetDecoration_NonWeak( QWSDecoration *); |
597 | +public: | 590 | +public: |
598 | #endif | 591 | #endif |
599 | #endif | 592 | #endif |
600 | 593 | ||
601 | diff -ur qt-2.3.7-old/src/kernel/qapplication_qws.cpp qt-2.3.7/src/kernel/qapplication_qws.cpp | 594 | diff -ur qt-2.3.7-old/src/kernel/qapplication_qws.cpp qt-2.3.7/src/kernel/qapplication_qws.cpp |
602 | --- qt-2.3.7-old/src/kernel/qapplication_qws.cpp2004-07-23 15:22:56.000000000 +0200 | 595 | --- qt-2.3.7-old/src/kernel/qapplication_qws.cpp2004-07-23 15:22:56.000000000 +0200 |
603 | +++ qt-2.3.7/src/kernel/qapplication_qws.cpp2004-07-23 15:25:42.000000000 +0200 | 596 | +++ qt-2.3.7/src/kernel/qapplication_qws.cpp2004-07-23 15:25:42.000000000 +0200 |
604 | @@ -2804,6 +2804,11 @@ | 597 | @@ -2804,6 +2804,11 @@ |
605 | */ | 598 | */ |
606 | void QApplication::qwsSetDecoration( QWSDecoration *d ) | 599 | void QApplication::qwsSetDecoration( QWSDecoration *d ) |
607 | { | 600 | { |
608 | +qwsSetDecoration_NonWeak ( d ); | 601 | +qwsSetDecoration_NonWeak ( d ); |
609 | +} | 602 | +} |
610 | + | 603 | + |
611 | +void QApplication::qwsSetDecoration_NonWeak( QWSDecoration *d ) | 604 | +void QApplication::qwsSetDecoration_NonWeak( QWSDecoration *d ) |
612 | +{ | 605 | +{ |
613 | if ( d ) { | 606 | if ( d ) { |
614 | delete qws_decoration; | 607 | delete qws_decoration; |
615 | qws_decoration = d; | 608 | qws_decoration = d; |
616 | diff -ur qt-2.3.7-old/src/kernel/qfontdatabase.cpp qt-2.3.7/src/kernel/qfontdatabase.cpp | 609 | diff -ur qt-2.3.7-old/src/kernel/qfontdatabase.cpp qt-2.3.7/src/kernel/qfontdatabase.cpp |
617 | --- qt-2.3.7-old/src/kernel/qfontdatabase.cpp2004-07-23 15:22:56.000000000 +0200 | 610 | --- qt-2.3.7-old/src/kernel/qfontdatabase.cpp2004-07-23 15:22:56.000000000 +0200 |
618 | +++ qt-2.3.7/src/kernel/qfontdatabase.cpp2004-07-23 15:25:42.000000000 +0200 | 611 | +++ qt-2.3.7/src/kernel/qfontdatabase.cpp2004-07-23 15:25:42.000000000 +0200 |
619 | @@ -35,6 +35,8 @@ | 612 | @@ -35,6 +35,8 @@ |
620 | ** | 613 | ** |
621 | **********************************************************************/ | 614 | **********************************************************************/ |
622 | 615 | ||
623 | +#define QT_WEAK_SYMBOL __attribute__(( weak )) | 616 | +#define QT_WEAK_SYMBOL __attribute__(( weak )) |
624 | + | 617 | + |
625 | #include "qfontdatabase.h" | 618 | #include "qfontdatabase.h" |
626 | 619 | ||
627 | #ifndef QT_NO_FONTDATABASE | 620 | #ifndef QT_NO_FONTDATABASE |
628 | @@ -2424,6 +2426,13 @@ | 621 | @@ -2424,6 +2426,13 @@ |
629 | const QString &style, | 622 | const QString &style, |
630 | const QString &charSet ) | 623 | const QString &charSet ) |
631 | { | 624 | { |
632 | +return pointSizes_NonWeak ( family, style, charSet ); | 625 | +return pointSizes_NonWeak ( family, style, charSet ); |
633 | +} | 626 | +} |
634 | + | 627 | + |
635 | +QValueList<int> QFontDatabase::pointSizes_NonWeak ( const QString &family, | 628 | +QValueList<int> QFontDatabase::pointSizes_NonWeak ( const QString &family, |
636 | + const QString &style, | 629 | + const QString &style, |
637 | + const QString &charSet ) | 630 | + const QString &charSet ) |
638 | +{ | 631 | +{ |
639 | QString cs( charSet ); | 632 | QString cs( charSet ); |
640 | if ( charSet.isEmpty() ) { | 633 | if ( charSet.isEmpty() ) { |
641 | QStringList lst = charSets( family ); | 634 | QStringList lst = charSets( family ); |
642 | diff -ur qt-2.3.7-old/src/kernel/qfontdatabase.h qt-2.3.7/src/kernel/qfontdatabase.h | 635 | diff -ur qt-2.3.7-old/src/kernel/qfontdatabase.h qt-2.3.7/src/kernel/qfontdatabase.h |
643 | --- qt-2.3.7-old/src/kernel/qfontdatabase.h2004-07-23 15:22:56.000000000 +0200 | 636 | --- qt-2.3.7-old/src/kernel/qfontdatabase.h2004-07-23 15:22:56.000000000 +0200 |
644 | +++ qt-2.3.7/src/kernel/qfontdatabase.h2004-07-23 15:25:42.000000000 +0200 | 637 | +++ qt-2.3.7/src/kernel/qfontdatabase.h2004-07-23 15:25:42.000000000 +0200 |
645 | @@ -59,6 +59,10 @@ | 638 | @@ -59,6 +59,10 @@ |
646 | class QDiskFont; | 639 | class QDiskFont; |
647 | #endif | 640 | #endif |
648 | 641 | ||
649 | +#if !defined( QT_WEAK_SYMBOL ) | 642 | +#if !defined( QT_WEAK_SYMBOL ) |
650 | +#define QT_WEAK_SYMBOL | 643 | +#define QT_WEAK_SYMBOL |
651 | +#endif | 644 | +#endif |
652 | + | 645 | + |
653 | class QFontDatabasePrivate; | 646 | class QFontDatabasePrivate; |
654 | 647 | ||
655 | class Q_EXPORT QFontDatabase | 648 | class Q_EXPORT QFontDatabase |
656 | @@ -67,9 +71,16 @@ | 649 | @@ -67,9 +71,16 @@ |
657 | QFontDatabase(); | 650 | QFontDatabase(); |
658 | 651 | ||
659 | QStringList families( bool onlyForLocale = TRUE ) const; | 652 | QStringList families( bool onlyForLocale = TRUE ) const; |
660 | + | 653 | + |
661 | + | 654 | + |
662 | QValueList<int> pointSizes( const QString &family, | 655 | QValueList<int> pointSizes( const QString &family, |
663 | const QString &style = QString::null, | 656 | const QString &style = QString::null, |
664 | - const QString &charSet = QString::null ); | 657 | - const QString &charSet = QString::null ); |
665 | + const QString &charSet = QString::null ) QT_WEAK_SYMBOL; | 658 | + const QString &charSet = QString::null ) QT_WEAK_SYMBOL; |
666 | +private: | 659 | +private: |
667 | + QValueList<int> pointSizes_NonWeak( const QString &family, | 660 | + QValueList<int> pointSizes_NonWeak( const QString &family, |
668 | + const QString &style, | 661 | + const QString &style, |
669 | + const QString &charSet ); | 662 | + const QString &charSet ); |
670 | +public: | 663 | +public: |
671 | QStringList styles( const QString &family, | 664 | QStringList styles( const QString &family, |
672 | const QString &charSet = QString::null ) const; | 665 | const QString &charSet = QString::null ) const; |
673 | QStringList charSets( const QString &familyName, | 666 | QStringList charSets( const QString &familyName, |
674 | diff -ur qt-2.3.7-old/src/kernel/qgfxtransformed_qws.cpp qt-2.3.7/src/kernel/qgfxtransformed_qws.cpp | 667 | diff -ur qt-2.3.7-old/src/kernel/qgfxtransformed_qws.cpp qt-2.3.7/src/kernel/qgfxtransformed_qws.cpp |
675 | --- qt-2.3.7-old/src/kernel/qgfxtransformed_qws.cpp2004-07-23 15:22:56.000000000 +0200 | 668 | --- qt-2.3.7-old/src/kernel/qgfxtransformed_qws.cpp2004-07-23 15:22:56.000000000 +0200 |
676 | +++ qt-2.3.7/src/kernel/qgfxtransformed_qws.cpp2004-07-23 15:42:01.000000000 +0200 | 669 | +++ qt-2.3.7/src/kernel/qgfxtransformed_qws.cpp2004-07-23 15:42:01.000000000 +0200 |
677 | @@ -671,11 +671,11 @@ | 670 | @@ -671,11 +671,11 @@ |
678 | inline int tx( int x, int y ) { | 671 | inline int tx( int x, int y ) { |
679 | switch ( qt_trans_screen->transformation() ) { | 672 | switch ( qt_trans_screen->transformation() ) { |
680 | case QTransformedScreen::Rot90: | 673 | case QTransformedScreen::Rot90: |
681 | - return y - xoffs + yoffs; | 674 | - return y - xoffs + yoffs; |
682 | + return y - this->xoffs + this->yoffs; | 675 | + return y - this->xoffs + this->yoffs; |
683 | case QTransformedScreen::Rot180: | 676 | case QTransformedScreen::Rot180: |
684 | - return (width - x - 1) - xoffs - xoffs; | 677 | - return (width - x - 1) - xoffs - xoffs; |
685 | + return (this->width - x - 1) - this->xoffs - this->xoffs; | 678 | + return (this->width - x - 1) - this->xoffs - this->xoffs; |
686 | case QTransformedScreen::Rot270: | 679 | case QTransformedScreen::Rot270: |
687 | - return (height - y - 1) - xoffs - yoffs; | 680 | - return (height - y - 1) - xoffs - yoffs; |
688 | + return (this->height - y - 1) - this->xoffs - this->yoffs; | 681 | + return (this->height - y - 1) - this->xoffs - this->yoffs; |
689 | default: | 682 | default: |
690 | return x; | 683 | return x; |
691 | } | 684 | } |
692 | @@ -683,11 +683,11 @@ | 685 | @@ -683,11 +683,11 @@ |
693 | inline int ty( int x, int y ) { | 686 | inline int ty( int x, int y ) { |
694 | switch ( qt_trans_screen->transformation() ) { | 687 | switch ( qt_trans_screen->transformation() ) { |
695 | case QTransformedScreen::Rot90: | 688 | case QTransformedScreen::Rot90: |
696 | - return (width - x - 1) - yoffs - xoffs; | 689 | - return (width - x - 1) - yoffs - xoffs; |
697 | + return (this->width - x - 1) - this->yoffs - this->xoffs; | 690 | + return (this->width - x - 1) - this->yoffs - this->xoffs; |
698 | case QTransformedScreen::Rot180: | 691 | case QTransformedScreen::Rot180: |
699 | - return (height - y - 1) - yoffs - yoffs; | 692 | - return (height - y - 1) - yoffs - yoffs; |
700 | + return (this->height - y - 1) - this->yoffs - this->yoffs; | 693 | + return (this->height - y - 1) - this->yoffs - this->yoffs; |
701 | case QTransformedScreen::Rot270: | 694 | case QTransformedScreen::Rot270: |
702 | - return x - yoffs + xoffs; | 695 | - return x - yoffs + xoffs; |
703 | + return x - this->yoffs + this->xoffs; | 696 | + return x - this->yoffs + this->xoffs; |
704 | default: | 697 | default: |
705 | return y; | 698 | return y; |
706 | } | 699 | } |
707 | @@ -715,23 +715,23 @@ | 700 | @@ -715,23 +715,23 @@ |
708 | template <const int depth, const int type> | 701 | template <const int depth, const int type> |
709 | void QGfxTransformedRaster<depth,type>::setSourceWidgetOffset(int x, int y) | 702 | void QGfxTransformedRaster<depth,type>::setSourceWidgetOffset(int x, int y) |
710 | { | 703 | { |
711 | - if ( srcbits == buffer ) { | 704 | - if ( srcbits == buffer ) { |
712 | + if ( this->srcbits == this->buffer ) { | 705 | + if ( this->srcbits == this->buffer ) { |
713 | switch ( qt_trans_screen->transformation() ) { | 706 | switch ( qt_trans_screen->transformation() ) { |
714 | case QTransformedScreen::Rot90: | 707 | case QTransformedScreen::Rot90: |
715 | - srcwidgetoffs = QPoint( y, width - x - srcwidth ); | 708 | - srcwidgetoffs = QPoint( y, width - x - srcwidth ); |
716 | + this->srcwidgetoffs = QPoint( y, this->width - x - this->srcwidth ); | 709 | + this->srcwidgetoffs = QPoint( y, this->width - x - this->srcwidth ); |
717 | break; | 710 | break; |
718 | case QTransformedScreen::Rot180: | 711 | case QTransformedScreen::Rot180: |
719 | - srcwidgetoffs = QPoint( width - x - srcwidth, height - y - srcheight ); | 712 | - srcwidgetoffs = QPoint( width - x - srcwidth, height - y - srcheight ); |
720 | + this->srcwidgetoffs = QPoint( this->width - x - this->srcwidth, this->height - y - this->srcheight ); | 713 | + this->srcwidgetoffs = QPoint( this->width - x - this->srcwidth, this->height - y - this->srcheight ); |
721 | break; | 714 | break; |
722 | case QTransformedScreen::Rot270: | 715 | case QTransformedScreen::Rot270: |
723 | - srcwidgetoffs = QPoint( height - y - srcheight, x ); | 716 | - srcwidgetoffs = QPoint( height - y - srcheight, x ); |
724 | + this->srcwidgetoffs = QPoint( this->height - y - this->srcheight, x ); | 717 | + this->srcwidgetoffs = QPoint( this->height - y - this->srcheight, x ); |
725 | break; | 718 | break; |
726 | default: | 719 | default: |
727 | - srcwidgetoffs = QPoint( x, y ); | 720 | - srcwidgetoffs = QPoint( x, y ); |
728 | + this->srcwidgetoffs = QPoint( x, y ); | 721 | + this->srcwidgetoffs = QPoint( x, y ); |
729 | break; | 722 | break; |
730 | } | 723 | } |
731 | } else | 724 | } else |
732 | -srcwidgetoffs = QPoint( x, y ); | 725 | -srcwidgetoffs = QPoint( x, y ); |
733 | +this->srcwidgetoffs = QPoint( x, y ); | 726 | +this->srcwidgetoffs = QPoint( x, y ); |
734 | } | 727 | } |
735 | 728 | ||
736 | template <const int depth, const int type> | 729 | template <const int depth, const int type> |
737 | @@ -739,8 +739,8 @@ | 730 | @@ -739,8 +739,8 @@ |
738 | { | 731 | { |
739 | QT_TRANS_GFX_BASE<depth,type>::setSource(i); | 732 | QT_TRANS_GFX_BASE<depth,type>::setSource(i); |
740 | QSize s = qt_screen->mapToDevice( QSize(i->width(), i->height()) ); | 733 | QSize s = qt_screen->mapToDevice( QSize(i->width(), i->height()) ); |
741 | - srcwidth = s.width(); | 734 | - srcwidth = s.width(); |
742 | - srcheight = s.height(); | 735 | - srcheight = s.height(); |
743 | + this->srcwidth = s.width(); | 736 | + this->srcwidth = s.width(); |
744 | + this->srcheight = s.height(); | 737 | + this->srcheight = s.height(); |
745 | } | 738 | } |
746 | 739 | ||
747 | template <const int depth, const int type> | 740 | template <const int depth, const int type> |
748 | @@ -782,7 +782,7 @@ | 741 | @@ -782,7 +782,7 @@ |
749 | if ( w == 0 || h == 0 ) | 742 | if ( w == 0 || h == 0 ) |
750 | return; | 743 | return; |
751 | QRect r( x, y, w, h ); | 744 | QRect r( x, y, w, h ); |
752 | - if ( cbrush.style() == SolidPattern ) { | 745 | - if ( cbrush.style() == SolidPattern ) { |
753 | + if ( this->cbrush.style() == Qt::SolidPattern ) { | 746 | + if ( this->cbrush.style() == Qt::SolidPattern ) { |
754 | r.setCoords( tx(x,y), ty(x,y), tx(x+w-1,y+h-1), ty(x+w-1,y+h-1) ); | 747 | r.setCoords( tx(x,y), ty(x,y), tx(x+w-1,y+h-1), ty(x+w-1,y+h-1) ); |
755 | r = r.normalize(); | 748 | r = r.normalize(); |
756 | } | 749 | } |
757 | @@ -797,7 +797,7 @@ | 750 | @@ -797,7 +797,7 @@ |
758 | // solution. The brush offset logic is complicated enough, so we don't | 751 | // solution. The brush offset logic is complicated enough, so we don't |
759 | // fastpath patternedbrush. | 752 | // fastpath patternedbrush. |
760 | 753 | ||
761 | - if ( inDraw || cpen.style()==NoPen || patternedbrush ) { | 754 | - if ( inDraw || cpen.style()==NoPen || patternedbrush ) { |
762 | + if ( inDraw || this->cpen.style()==Qt::NoPen || this->patternedbrush ) { | 755 | + if ( inDraw || this->cpen.style()==Qt::NoPen || this->patternedbrush ) { |
763 | //slowpath | 756 | //slowpath |
764 | QT_TRANS_GFX_BASE<depth,type>::drawPolygon( a, w, idx, num ); | 757 | QT_TRANS_GFX_BASE<depth,type>::drawPolygon( a, w, idx, num ); |
765 | } else { | 758 | } else { |
766 | @@ -819,29 +819,29 @@ | 759 | @@ -819,29 +819,29 @@ |
767 | template <const int depth, const int type> | 760 | template <const int depth, const int type> |
768 | void QGfxTransformedRaster<depth,type>::processSpans( int n, QPoint* point, int* width ) | 761 | void QGfxTransformedRaster<depth,type>::processSpans( int n, QPoint* point, int* width ) |
769 | { | 762 | { |
770 | - if ( inDraw || patternedbrush && srcwidth != 0 && srcheight != 0 ) { | 763 | - if ( inDraw || patternedbrush && srcwidth != 0 && srcheight != 0 ) { |
771 | + if ( inDraw || this->patternedbrush && this->srcwidth != 0 && this->srcheight != 0 ) { | 764 | + if ( inDraw || this->patternedbrush && this->srcwidth != 0 && this->srcheight != 0 ) { |
772 | //in the patternedbrush case, we let blt do the transformation | 765 | //in the patternedbrush case, we let blt do the transformation |
773 | // so we leave inDraw false. | 766 | // so we leave inDraw false. |
774 | - QT_TRANS_GFX_BASE<depth,type>::processSpans( n, point, width ); | 767 | - QT_TRANS_GFX_BASE<depth,type>::processSpans( n, point, width ); |
775 | +QT_TRANS_GFX_BASE<depth,type>::processSpans( n, point, width ); | 768 | +QT_TRANS_GFX_BASE<depth,type>::processSpans( n, point, width ); |
776 | } else { | 769 | } else { |
777 | inDraw = TRUE; | 770 | inDraw = TRUE; |
778 | while (n--) { | 771 | while (n--) { |
779 | if ( *width > 0 ) { | 772 | if ( *width > 0 ) { |
780 | - int x=tx(point->x(),point->y())+xoffs; | 773 | - int x=tx(point->x(),point->y())+xoffs; |
781 | - int y=ty(point->x(),point->y())+yoffs; | 774 | - int y=ty(point->x(),point->y())+yoffs; |
782 | + int x=tx(point->x(),point->y())+this->xoffs; | 775 | + int x=tx(point->x(),point->y())+this->xoffs; |
783 | + int y=ty(point->x(),point->y())+this->yoffs; | 776 | + int y=ty(point->x(),point->y())+this->yoffs; |
784 | 777 | ||
785 | switch( qt_trans_screen->transformation() ) { | 778 | switch( qt_trans_screen->transformation() ) { |
786 | case QTransformedScreen::Rot90: | 779 | case QTransformedScreen::Rot90: |
787 | - vline( x, y-(*width-1), y ); | 780 | - vline( x, y-(*width-1), y ); |
788 | + this->vline( x, y-(*width-1), y ); | 781 | + this->vline( x, y-(*width-1), y ); |
789 | break; | 782 | break; |
790 | case QTransformedScreen::Rot180: | 783 | case QTransformedScreen::Rot180: |
791 | - hline( x - (*width-1), x, y ); | 784 | - hline( x - (*width-1), x, y ); |
792 | + this->hline( x - (*width-1), x, y ); | 785 | + this->hline( x - (*width-1), x, y ); |
793 | break; | 786 | break; |
794 | case QTransformedScreen::Rot270: | 787 | case QTransformedScreen::Rot270: |
795 | - vline( x, y, y+*width-1 ); | 788 | - vline( x, y, y+*width-1 ); |
796 | + this->vline( x, y, y+*width-1 ); | 789 | + this->vline( x, y, y+*width-1 ); |
797 | break; | 790 | break; |
798 | default: | 791 | default: |
799 | - hline( x, x+*width-1, y ); | 792 | - hline( x, x+*width-1, y ); |
800 | + this->hline( x, x+*width-1, y ); | 793 | + this->hline( x, x+*width-1, y ); |
801 | break; | 794 | break; |
802 | } | 795 | } |
803 | } | 796 | } |
804 | @@ -896,14 +896,14 @@ | 797 | @@ -896,14 +896,14 @@ |
805 | switch ( qt_trans_screen->transformation() ) { | 798 | switch ( qt_trans_screen->transformation() ) { |
806 | case QTransformedScreen::Rot90: | 799 | case QTransformedScreen::Rot90: |
807 | rsx = sy; | 800 | rsx = sy; |
808 | - rsy = srcwidth - sx - w; | 801 | - rsy = srcwidth - sx - w; |
809 | + rsy = this->srcwidth - sx - w; | 802 | + rsy = this->srcwidth - sx - w; |
810 | break; | 803 | break; |
811 | case QTransformedScreen::Rot180: | 804 | case QTransformedScreen::Rot180: |
812 | - rsx = srcwidth - sx - w; | 805 | - rsx = srcwidth - sx - w; |
813 | - rsy = srcheight - sy - h; | 806 | - rsy = srcheight - sy - h; |
814 | + rsx = this->srcwidth - sx - w; | 807 | + rsx = this->srcwidth - sx - w; |
815 | + rsy = this->srcheight - sy - h; | 808 | + rsy = this->srcheight - sy - h; |
816 | break; | 809 | break; |
817 | case QTransformedScreen::Rot270: | 810 | case QTransformedScreen::Rot270: |
818 | - rsx = srcheight - sy - h; | 811 | - rsx = srcheight - sy - h; |
819 | + rsx = this->srcheight - sy - h; | 812 | + rsx = this->srcheight - sy - h; |
820 | rsy = sx; | 813 | rsy = sx; |
821 | break; | 814 | break; |
822 | default: | 815 | default: |
823 | @@ -941,39 +941,39 @@ | 816 | @@ -941,39 +941,39 @@ |
824 | r.setCoords( tx(rx,ry), ty(rx,ry), tx(rx+w-1,ry+h-1), ty(rx+w-1,ry+h-1) ); | 817 | r.setCoords( tx(rx,ry), ty(rx,ry), tx(rx+w-1,ry+h-1), ty(rx+w-1,ry+h-1) ); |
825 | r = r.normalize(); | 818 | r = r.normalize(); |
826 | 819 | ||
827 | - QPoint oldBrushOffs = brushoffs; | 820 | - QPoint oldBrushOffs = brushoffs; |
828 | + QPoint oldBrushOffs = this->brushoffs; | 821 | + QPoint oldBrushOffs = this->brushoffs; |
829 | int brx, bry; | 822 | int brx, bry; |
830 | switch ( qt_trans_screen->transformation() ) { | 823 | switch ( qt_trans_screen->transformation() ) { |
831 | case QTransformedScreen::Rot90: | 824 | case QTransformedScreen::Rot90: |
832 | - brx = brushoffs.y(); | 825 | - brx = brushoffs.y(); |
833 | - bry = srcwidth - brushoffs.x() - w; | 826 | - bry = srcwidth - brushoffs.x() - w; |
834 | + brx = this->brushoffs.y(); | 827 | + brx = this->brushoffs.y(); |
835 | + bry = this->srcwidth - this->brushoffs.x() - w; | 828 | + bry = this->srcwidth - this->brushoffs.x() - w; |
836 | break; | 829 | break; |
837 | case QTransformedScreen::Rot180: | 830 | case QTransformedScreen::Rot180: |
838 | - brx = srcwidth - brushoffs.x() - w; | 831 | - brx = srcwidth - brushoffs.x() - w; |
839 | - bry = srcheight - brushoffs.y() - h; | 832 | - bry = srcheight - brushoffs.y() - h; |
840 | + brx = this->srcwidth - this->brushoffs.x() - w; | 833 | + brx = this->srcwidth - this->brushoffs.x() - w; |
841 | + bry = this->srcheight - this->brushoffs.y() - h; | 834 | + bry = this->srcheight - this->brushoffs.y() - h; |
842 | break; | 835 | break; |
843 | case QTransformedScreen::Rot270: | 836 | case QTransformedScreen::Rot270: |
844 | - brx = srcheight - brushoffs.y() - h; | 837 | - brx = srcheight - brushoffs.y() - h; |
845 | - bry = brushoffs.x(); | 838 | - bry = brushoffs.x(); |
846 | + brx = this->srcheight - this->brushoffs.y() - h; | 839 | + brx = this->srcheight - this->brushoffs.y() - h; |
847 | + bry = this->brushoffs.x(); | 840 | + bry = this->brushoffs.x(); |
848 | break; | 841 | break; |
849 | default: | 842 | default: |
850 | - brx = brushoffs.x(); | 843 | - brx = brushoffs.x(); |
851 | - bry = brushoffs.y(); | 844 | - bry = brushoffs.y(); |
852 | + brx = this->brushoffs.x(); | 845 | + brx = this->brushoffs.x(); |
853 | + bry = this->brushoffs.y(); | 846 | + bry = this->brushoffs.y(); |
854 | break; | 847 | break; |
855 | } | 848 | } |
856 | - brushoffs = QPoint( brx, bry ); | 849 | - brushoffs = QPoint( brx, bry ); |
857 | + this->brushoffs = QPoint( brx, bry ); | 850 | + this->brushoffs = QPoint( brx, bry ); |
858 | 851 | ||
859 | - int oldsw = srcwidth; | 852 | - int oldsw = srcwidth; |
860 | - int oldsh = srcheight; | 853 | - int oldsh = srcheight; |
861 | - QSize s = qt_screen->mapToDevice( QSize(srcwidth,srcheight) ); | 854 | - QSize s = qt_screen->mapToDevice( QSize(srcwidth,srcheight) ); |
862 | - srcwidth = s.width(); | 855 | - srcwidth = s.width(); |
863 | - srcheight = s.height(); | 856 | - srcheight = s.height(); |
864 | + int oldsw = this->srcwidth; | 857 | + int oldsw = this->srcwidth; |
865 | + int oldsh = this->srcheight; | 858 | + int oldsh = this->srcheight; |
866 | + QSize s = qt_screen->mapToDevice( QSize(this->srcwidth,this->srcheight) ); | 859 | + QSize s = qt_screen->mapToDevice( QSize(this->srcwidth,this->srcheight) ); |
867 | + this->srcwidth = s.width(); | 860 | + this->srcwidth = s.width(); |
868 | + this->srcheight = s.height(); | 861 | + this->srcheight = s.height(); |
869 | 862 | ||
870 | QT_TRANS_GFX_BASE<depth,type>::tiledBlt( r.x(), r.y(), r.width(), r.height() ); | 863 | QT_TRANS_GFX_BASE<depth,type>::tiledBlt( r.x(), r.y(), r.width(), r.height() ); |
871 | 864 | ||
872 | - srcwidth = oldsw; | 865 | - srcwidth = oldsw; |
873 | - srcheight = oldsh; | 866 | - srcheight = oldsh; |
874 | - brushoffs = oldBrushOffs; | 867 | - brushoffs = oldBrushOffs; |
875 | + this->srcwidth = oldsw; | 868 | + this->srcwidth = oldsw; |
876 | + this->srcheight = oldsh; | 869 | + this->srcheight = oldsh; |
877 | + this->brushoffs = oldBrushOffs; | 870 | + this->brushoffs = oldBrushOffs; |
878 | inDraw = FALSE; | 871 | inDraw = FALSE; |
879 | } | 872 | } |
880 | 873 | ||
881 | diff -ur qt-2.3.7-old/src/kernel/qgfxvfb_qws.cpp qt-2.3.7/src/kernel/qgfxvfb_qws.cpp | 874 | diff -ur qt-2.3.7-old/src/kernel/qgfxvfb_qws.cpp qt-2.3.7/src/kernel/qgfxvfb_qws.cpp |
882 | --- qt-2.3.7-old/src/kernel/qgfxvfb_qws.cpp2004-07-23 15:22:56.000000000 +0200 | 875 | --- qt-2.3.7-old/src/kernel/qgfxvfb_qws.cpp2004-07-23 15:22:56.000000000 +0200 |
883 | +++ qt-2.3.7/src/kernel/qgfxvfb_qws.cpp2004-07-23 15:42:01.000000000 +0200 | 876 | +++ qt-2.3.7/src/kernel/qgfxvfb_qws.cpp2004-07-23 15:42:01.000000000 +0200 |
884 | @@ -31,7 +31,6 @@ | 877 | @@ -31,7 +31,6 @@ |
885 | **********************************************************************/ | 878 | **********************************************************************/ |
886 | 879 | ||
887 | #include "qgfxraster_qws.h" | 880 | #include "qgfxraster_qws.h" |
888 | - | 881 | - |
889 | #ifndef QT_NO_QWS_VFB | 882 | #ifndef QT_NO_QWS_VFB |
890 | 883 | ||
891 | #include <sys/ipc.h> | 884 | #include <sys/ipc.h> |
892 | @@ -140,8 +139,8 @@ | 885 | @@ -140,8 +139,8 @@ |
893 | void QGfxVFb<depth,type>::drawPoint( int x, int y ) | 886 | void QGfxVFb<depth,type>::drawPoint( int x, int y ) |
894 | { | 887 | { |
895 | QWSDisplay::grab( TRUE ); | 888 | QWSDisplay::grab( TRUE ); |
896 | - if ( is_screen_gfx ) | 889 | - if ( is_screen_gfx ) |
897 | -qvfb_screen->setDirty( QRect( x+xoffs, y+yoffs, 1, 1 ) ); | 890 | -qvfb_screen->setDirty( QRect( x+xoffs, y+yoffs, 1, 1 ) ); |
898 | + if ( this->is_screen_gfx ) | 891 | + if ( this->is_screen_gfx ) |
899 | +qvfb_screen->setDirty( QRect( x+this->xoffs, y+this->yoffs, 1, 1 ) ); | 892 | +qvfb_screen->setDirty( QRect( x+this->xoffs, y+this->yoffs, 1, 1 ) ); |
900 | QGfxRaster<depth,type>::drawPoint( x, y ); | 893 | QGfxRaster<depth,type>::drawPoint( x, y ); |
901 | QWSDisplay::ungrab(); | 894 | QWSDisplay::ungrab(); |
902 | } | 895 | } |
903 | @@ -150,8 +149,8 @@ | 896 | @@ -150,8 +149,8 @@ |
904 | void QGfxVFb<depth,type>::drawPoints( const QPointArray &pa,int x,int y ) | 897 | void QGfxVFb<depth,type>::drawPoints( const QPointArray &pa,int x,int y ) |
905 | { | 898 | { |
906 | QWSDisplay::grab( TRUE ); | 899 | QWSDisplay::grab( TRUE ); |
907 | - if ( is_screen_gfx ) | 900 | - if ( is_screen_gfx ) |
908 | -qvfb_screen->setDirty( clipbounds ); | 901 | -qvfb_screen->setDirty( clipbounds ); |
909 | + if ( this->is_screen_gfx ) | 902 | + if ( this->is_screen_gfx ) |
910 | +qvfb_screen->setDirty( this->clipbounds ); | 903 | +qvfb_screen->setDirty( this->clipbounds ); |
911 | QGfxRaster<depth,type>::drawPoints( pa, x, y ); | 904 | QGfxRaster<depth,type>::drawPoints( pa, x, y ); |
912 | QWSDisplay::ungrab(); | 905 | QWSDisplay::ungrab(); |
913 | } | 906 | } |
914 | @@ -160,9 +159,9 @@ | 907 | @@ -160,9 +159,9 @@ |
915 | void QGfxVFb<depth,type>::drawLine( int x1,int y1,int x2,int y2 ) | 908 | void QGfxVFb<depth,type>::drawLine( int x1,int y1,int x2,int y2 ) |
916 | { | 909 | { |
917 | QWSDisplay::grab( TRUE ); | 910 | QWSDisplay::grab( TRUE ); |
918 | - if ( is_screen_gfx ) { | 911 | - if ( is_screen_gfx ) { |
919 | + if ( this->is_screen_gfx ) { | 912 | + if ( this->is_screen_gfx ) { |
920 | QRect r; | 913 | QRect r; |
921 | -r.setCoords( x1+xoffs, y1+yoffs, x2+xoffs, y2+yoffs ); | 914 | -r.setCoords( x1+xoffs, y1+yoffs, x2+xoffs, y2+yoffs ); |
922 | +r.setCoords( x1+this->xoffs, y1+this->yoffs, x2+this->xoffs, y2+this->yoffs ); | 915 | +r.setCoords( x1+this->xoffs, y1+this->yoffs, x2+this->xoffs, y2+this->yoffs ); |
923 | qvfb_screen->setDirty( r.normalize() ); | 916 | qvfb_screen->setDirty( r.normalize() ); |
924 | } | 917 | } |
925 | QGfxRaster<depth,type>::drawLine( x1, y1, x2, y2 ); | 918 | QGfxRaster<depth,type>::drawLine( x1, y1, x2, y2 ); |
926 | @@ -173,8 +172,8 @@ | 919 | @@ -173,8 +172,8 @@ |
927 | void QGfxVFb<depth,type>::fillRect( int x,int y,int w,int h ) | 920 | void QGfxVFb<depth,type>::fillRect( int x,int y,int w,int h ) |
928 | { | 921 | { |
929 | QWSDisplay::grab( TRUE ); | 922 | QWSDisplay::grab( TRUE ); |
930 | - if ( is_screen_gfx ) | 923 | - if ( is_screen_gfx ) |
931 | -qvfb_screen->setDirty( QRect( x+xoffs, y+yoffs, w, h ) ); | 924 | -qvfb_screen->setDirty( QRect( x+xoffs, y+yoffs, w, h ) ); |
932 | + if ( this->is_screen_gfx ) | 925 | + if ( this->is_screen_gfx ) |
933 | +qvfb_screen->setDirty( QRect( x+this->xoffs, y+this->yoffs, w, h ) ); | 926 | +qvfb_screen->setDirty( QRect( x+this->xoffs, y+this->yoffs, w, h ) ); |
934 | QGfxRaster<depth,type>::fillRect( x, y, w, h ); | 927 | QGfxRaster<depth,type>::fillRect( x, y, w, h ); |
935 | QWSDisplay::ungrab(); | 928 | QWSDisplay::ungrab(); |
936 | } | 929 | } |
937 | @@ -183,8 +182,8 @@ | 930 | @@ -183,8 +182,8 @@ |
938 | void QGfxVFb<depth,type>::drawPolyline( const QPointArray &pa,int x,int y ) | 931 | void QGfxVFb<depth,type>::drawPolyline( const QPointArray &pa,int x,int y ) |
939 | { | 932 | { |
940 | QWSDisplay::grab( TRUE ); | 933 | QWSDisplay::grab( TRUE ); |
941 | - if ( is_screen_gfx ) | 934 | - if ( is_screen_gfx ) |
942 | -qvfb_screen->setDirty( clipbounds ); | 935 | -qvfb_screen->setDirty( clipbounds ); |
943 | + if ( this->is_screen_gfx ) | 936 | + if ( this->is_screen_gfx ) |
944 | +qvfb_screen->setDirty( this->clipbounds ); | 937 | +qvfb_screen->setDirty( this->clipbounds ); |
945 | QGfxRaster<depth,type>::drawPolyline( pa, x, y ); | 938 | QGfxRaster<depth,type>::drawPolyline( pa, x, y ); |
946 | QWSDisplay::ungrab(); | 939 | QWSDisplay::ungrab(); |
947 | } | 940 | } |
948 | @@ -193,8 +192,8 @@ | 941 | @@ -193,8 +192,8 @@ |
949 | void QGfxVFb<depth,type>::drawPolygon( const QPointArray &pa,bool w,int x,int y ) | 942 | void QGfxVFb<depth,type>::drawPolygon( const QPointArray &pa,bool w,int x,int y ) |
950 | { | 943 | { |
951 | QWSDisplay::grab( TRUE ); | 944 | QWSDisplay::grab( TRUE ); |
952 | - if ( is_screen_gfx ) | 945 | - if ( is_screen_gfx ) |
953 | -qvfb_screen->setDirty( clipbounds ); | 946 | -qvfb_screen->setDirty( clipbounds ); |
954 | + if ( this->is_screen_gfx ) | 947 | + if ( this->is_screen_gfx ) |
955 | +qvfb_screen->setDirty( this->clipbounds ); | 948 | +qvfb_screen->setDirty( this->clipbounds ); |
956 | QGfxRaster<depth,type>::drawPolygon( pa, w, x, y ); | 949 | QGfxRaster<depth,type>::drawPolygon( pa, w, x, y ); |
957 | QWSDisplay::ungrab(); | 950 | QWSDisplay::ungrab(); |
958 | } | 951 | } |
959 | @@ -203,8 +202,8 @@ | 952 | @@ -203,8 +202,8 @@ |
960 | void QGfxVFb<depth,type>::blt( int x,int y,int w,int h, int sx, int sy ) | 953 | void QGfxVFb<depth,type>::blt( int x,int y,int w,int h, int sx, int sy ) |
961 | { | 954 | { |
962 | QWSDisplay::grab( TRUE ); | 955 | QWSDisplay::grab( TRUE ); |
963 | - if ( is_screen_gfx ) | 956 | - if ( is_screen_gfx ) |
964 | -qvfb_screen->setDirty( QRect( x+xoffs, y+yoffs, w, h ) ); | 957 | -qvfb_screen->setDirty( QRect( x+xoffs, y+yoffs, w, h ) ); |
965 | + if ( this->is_screen_gfx ) | 958 | + if ( this->is_screen_gfx ) |
966 | +qvfb_screen->setDirty( QRect( x+this->xoffs, y+this->yoffs, w, h ) ); | 959 | +qvfb_screen->setDirty( QRect( x+this->xoffs, y+this->yoffs, w, h ) ); |
967 | QGfxRaster<depth,type>::blt( x, y, w, h, sx, sy ); | 960 | QGfxRaster<depth,type>::blt( x, y, w, h, sx, sy ); |
968 | QWSDisplay::ungrab(); | 961 | QWSDisplay::ungrab(); |
969 | } | 962 | } |
970 | @@ -215,8 +214,8 @@ | 963 | @@ -215,8 +214,8 @@ |
971 | QWSDisplay::grab( TRUE ); | 964 | QWSDisplay::grab( TRUE ); |
972 | int dy = sy - y; | 965 | int dy = sy - y; |
973 | int dx = sx - x; | 966 | int dx = sx - x; |
974 | - if ( is_screen_gfx ) | 967 | - if ( is_screen_gfx ) |
975 | -qvfb_screen->setDirty( QRect(QMIN(x,sx) + xoffs, QMIN(y,sy) + yoffs, | 968 | -qvfb_screen->setDirty( QRect(QMIN(x,sx) + xoffs, QMIN(y,sy) + yoffs, |
976 | + if ( this->is_screen_gfx ) | 969 | + if ( this->is_screen_gfx ) |
977 | +qvfb_screen->setDirty( QRect(QMIN(x,sx) + this->xoffs, QMIN(y,sy) + this->yoffs, | 970 | +qvfb_screen->setDirty( QRect(QMIN(x,sx) + this->xoffs, QMIN(y,sy) + this->yoffs, |
978 | w+abs(dx), h+abs(dy)) ); | 971 | w+abs(dx), h+abs(dy)) ); |
979 | QGfxRaster<depth,type>::scroll( x, y, w, h, sx, sy ); | 972 | QGfxRaster<depth,type>::scroll( x, y, w, h, sx, sy ); |
980 | QWSDisplay::ungrab(); | 973 | QWSDisplay::ungrab(); |
981 | @@ -227,8 +226,8 @@ | 974 | @@ -227,8 +226,8 @@ |
982 | void QGfxVFb<depth,type>::stretchBlt( int x,int y,int w,int h,int sx,int sy ) | 975 | void QGfxVFb<depth,type>::stretchBlt( int x,int y,int w,int h,int sx,int sy ) |
983 | { | 976 | { |
984 | QWSDisplay::grab( TRUE ); | 977 | QWSDisplay::grab( TRUE ); |
985 | - if ( is_screen_gfx ) | 978 | - if ( is_screen_gfx ) |
986 | -qvfb_screen->setDirty( QRect( x + xoffs, y + yoffs, w, h) ); | 979 | -qvfb_screen->setDirty( QRect( x + xoffs, y + yoffs, w, h) ); |
987 | + if ( this->is_screen_gfx ) | 980 | + if ( this->is_screen_gfx ) |
988 | +qvfb_screen->setDirty( QRect( x + this->xoffs, y + this->yoffs, w, h) ); | 981 | +qvfb_screen->setDirty( QRect( x + this->xoffs, y + this->yoffs, w, h) ); |
989 | QGfxRaster<depth,type>::stretchBlt( x, y, w, h, sx, sy ); | 982 | QGfxRaster<depth,type>::stretchBlt( x, y, w, h, sx, sy ); |
990 | QWSDisplay::ungrab(); | 983 | QWSDisplay::ungrab(); |
991 | } | 984 | } |
992 | @@ -238,8 +237,8 @@ | 985 | @@ -238,8 +237,8 @@ |
993 | void QGfxVFb<depth,type>::tiledBlt( int x,int y,int w,int h ) | 986 | void QGfxVFb<depth,type>::tiledBlt( int x,int y,int w,int h ) |
994 | { | 987 | { |
995 | QWSDisplay::grab( TRUE ); | 988 | QWSDisplay::grab( TRUE ); |
996 | - if ( is_screen_gfx ) | 989 | - if ( is_screen_gfx ) |
997 | -qvfb_screen->setDirty( QRect(x + xoffs, y + yoffs, w, h) ); | 990 | -qvfb_screen->setDirty( QRect(x + xoffs, y + yoffs, w, h) ); |
998 | + if ( this->is_screen_gfx ) | 991 | + if ( this->is_screen_gfx ) |
999 | +qvfb_screen->setDirty( QRect(x + this->xoffs, y + this->yoffs, w, h) ); | 992 | +qvfb_screen->setDirty( QRect(x + this->xoffs, y + this->yoffs, w, h) ); |
1000 | QGfxRaster<depth,type>::tiledBlt( x, y, w, h ); | 993 | QGfxRaster<depth,type>::tiledBlt( x, y, w, h ); |
1001 | QWSDisplay::ungrab(); | 994 | QWSDisplay::ungrab(); |
1002 | } | 995 | } |
1003 | diff -ur qt-2.3.7-old/src/kernel/qkeyboard_qws.cpp qt-2.3.7/src/kernel/qkeyboard_qws.cpp | 996 | diff -ur qt-2.3.7-old/src/kernel/qkeyboard_qws.cpp qt-2.3.7/src/kernel/qkeyboard_qws.cpp |
1004 | --- qt-2.3.7-old/src/kernel/qkeyboard_qws.cpp2004-07-23 15:22:56.000000000 +0200 | 997 | --- qt-2.3.7-old/src/kernel/qkeyboard_qws.cpp2004-07-23 15:22:56.000000000 +0200 |
1005 | +++ qt-2.3.7/src/kernel/qkeyboard_qws.cpp2004-07-23 15:33:46.000000000 +0200 | 998 | +++ qt-2.3.7/src/kernel/qkeyboard_qws.cpp2004-07-23 15:33:46.000000000 +0200 |
1006 | @@ -238,7 +238,7 @@ | 999 | @@ -238,7 +238,7 @@ |
1007 | { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 63 | 1000 | { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 63 |
1008 | { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 64 | 1001 | { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 64 |
1009 | { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 65 | 1002 | { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 65 |
1010 | - { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 66 | 1003 | - { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 66 |
1011 | + { Qt::Key_F14, 0xffff , 0xffff , 0xffff }, // 66 | 1004 | + { Qt::Key_F14, 0xffff , 0xffff , 0xffff }, // 66 |
1012 | { Qt::Key_Meta, 0xffff , 0xffff , 0xffff }, // 67 | 1005 | { Qt::Key_Meta, 0xffff , 0xffff , 0xffff }, // 67 |
1013 | { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 68 | 1006 | { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 68 |
1014 | { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 69 | 1007 | { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 69 |
1015 | diff -ur qt-2.3.7-old/src/kernel/qwindowsystem_qws.cpp qt-2.3.7/src/kernel/qwindowsystem_qws.cpp | 1008 | diff -ur qt-2.3.7-old/src/kernel/qwindowsystem_qws.cpp qt-2.3.7/src/kernel/qwindowsystem_qws.cpp |
1016 | --- qt-2.3.7-old/src/kernel/qwindowsystem_qws.cpp2004-07-23 15:22:56.000000000 +0200 | 1009 | --- qt-2.3.7-old/src/kernel/qwindowsystem_qws.cpp2004-07-23 15:22:56.000000000 +0200 |
1017 | +++ qt-2.3.7/src/kernel/qwindowsystem_qws.cpp2004-07-23 15:33:47.000000000 +0200 | 1010 | +++ qt-2.3.7/src/kernel/qwindowsystem_qws.cpp2004-07-23 15:33:47.000000000 +0200 |
1018 | @@ -844,6 +844,18 @@ | 1011 | @@ -844,6 +844,18 @@ |
1019 | { | 1012 | { |
1020 | } | 1013 | } |
1021 | 1014 | ||
1022 | +static void catchSegvSignal( int ) | 1015 | +static void catchSegvSignal( int ) |
1023 | +{ | 1016 | +{ |
1024 | +#ifndef QT_NO_QWS_KEYBOARD | 1017 | +#ifndef QT_NO_QWS_KEYBOARD |
1025 | + if ( qwsServer ) | 1018 | + if ( qwsServer ) |
1026 | +qwsServer->closeKeyboard(); | 1019 | +qwsServer->closeKeyboard(); |
1027 | +#endif | 1020 | +#endif |
1028 | + QWSServer::closedown(); | 1021 | + QWSServer::closedown(); |
1029 | + fprintf(stderr, "Segmentation fault.\n"); | 1022 | + fprintf(stderr, "Segmentation fault.\n"); |
1030 | + exit(1); | 1023 | + exit(1); |
1031 | +} | 1024 | +} |
1032 | + | 1025 | + |
1033 | + | 1026 | + |
1034 | /*! | 1027 | /*! |
1035 | \class QWSServer qwindowsystem_qws.h | 1028 | \class QWSServer qwindowsystem_qws.h |
1036 | \brief Server-specific functionality in Qt/Embedded | 1029 | \brief Server-specific functionality in Qt/Embedded |
1037 | @@ -936,6 +948,7 @@ | 1030 | @@ -936,6 +948,7 @@ |
1038 | } | 1031 | } |
1039 | 1032 | ||
1040 | signal(SIGPIPE, ignoreSignal); //we get it when we read | 1033 | signal(SIGPIPE, ignoreSignal); //we get it when we read |
1041 | + signal(SIGSEGV, catchSegvSignal); //recover the keyboard on crash | 1034 | + signal(SIGSEGV, catchSegvSignal); //recover the keyboard on crash |
1042 | #endif | 1035 | #endif |
1043 | focusw = 0; | 1036 | focusw = 0; |
1044 | mouseGrabber = 0; | 1037 | mouseGrabber = 0; |
1045 | diff -ur qt-2.3.7-old/src/tools/qcstring.h qt-2.3.7/src/tools/qcstring.h | 1038 | diff -ur qt-2.3.7-old/src/tools/qcstring.h qt-2.3.7/src/tools/qcstring.h |
1046 | --- qt-2.3.7-old/src/tools/qcstring.h2004-07-23 15:22:56.000000000 +0200 | 1039 | --- qt-2.3.7-old/src/tools/qcstring.h2004-07-23 15:22:56.000000000 +0200 |
1047 | +++ qt-2.3.7/src/tools/qcstring.h2004-07-23 15:42:01.000000000 +0200 | 1040 | +++ qt-2.3.7/src/tools/qcstring.h2004-07-23 15:42:01.000000000 +0200 |
1048 | @@ -119,7 +119,7 @@ | 1041 | @@ -119,7 +119,7 @@ |
1049 | // We want to keep source compatibility for 2.x | 1042 | // We want to keep source compatibility for 2.x |
1050 | // ### TODO for 4.0: completely remove these and the cstr* functions | 1043 | // ### TODO for 4.0: completely remove these and the cstr* functions |
1051 | 1044 | ||
1052 | -#if !defined(QT_GENUINE_STR) | 1045 | -#if !defined(QT_GENUINE_STR) |
1053 | +#if 0 | 1046 | +#if 0 |
1054 | 1047 | ||
1055 | #undefstrlen | 1048 | #undefstrlen |
1056 | #define strlen qstrlen | 1049 | #define strlen qstrlen |
1057 | diff -ur qt-2.3.7-old/src/tools/qglobal.h qt-2.3.7/src/tools/qglobal.h | 1050 | diff -ur qt-2.3.7-old/src/tools/qglobal.h qt-2.3.7/src/tools/qglobal.h |
1058 | --- qt-2.3.7-old/src/tools/qglobal.h2004-07-23 15:22:56.000000000 +0200 | 1051 | --- qt-2.3.7-old/src/tools/qglobal.h2004-07-23 15:22:56.000000000 +0200 |
1059 | +++ qt-2.3.7/src/tools/qglobal.h2004-07-23 15:42:01.000000000 +0200 | 1052 | +++ qt-2.3.7/src/tools/qglobal.h2004-07-23 15:42:01.000000000 +0200 |
1060 | @@ -207,8 +207,16 @@ | 1053 | @@ -207,8 +207,16 @@ |
1061 | #if __GNUC__ == 2 && __GNUC_MINOR__ == 96 | 1054 | #if __GNUC__ == 2 && __GNUC_MINOR__ == 96 |
1062 | #define Q_FP_CCAST_BROKEN | 1055 | #define Q_FP_CCAST_BROKEN |
1063 | #endif | 1056 | #endif |
1064 | +/* ARM gcc pads structs to 32 bits, even when they contain a single | 1057 | +/* ARM gcc pads structs to 32 bits, even when they contain a single |
1065 | + char, or short. We tell gcc to pack QChars to 16 bits, to avoid | 1058 | + char, or short. We tell gcc to pack QChars to 16 bits, to avoid |
1066 | + QString bloat. However, gcc 3.4 doesn't allow us to create references to | 1059 | + QString bloat. However, gcc 3.4 doesn't allow us to create references to |
1067 | + members of a packed struct. (Pointers are OK, because then you | 1060 | + members of a packed struct. (Pointers are OK, because then you |
1068 | + supposedly know what you are doing.) */ | 1061 | + supposedly know what you are doing.) */ |
1069 | #if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) | 1062 | #if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) |
1070 | #define Q_PACKED __attribute__ ((packed)) | 1063 | #define Q_PACKED __attribute__ ((packed)) |
1071 | +# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 | 1064 | +# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 |
1072 | +# define Q_NO_PACKED_REFERENCE | 1065 | +# define Q_NO_PACKED_REFERENCE |
1073 | +# endif | 1066 | +# endif |
1074 | #endif | 1067 | #endif |
1075 | #elif defined(__xlC__) | 1068 | #elif defined(__xlC__) |
1076 | #define _CC_XLC_ | 1069 | #define _CC_XLC_ |
1077 | diff -ur qt-2.3.7-old/src/tools/qmodules.h qt-2.3.7/src/tools/qmodules.h | 1070 | diff -ur qt-2.3.7-old/src/tools/qmodules.h qt-2.3.7/src/tools/qmodules.h |
1078 | --- qt-2.3.7-old/src/tools/qmodules.h2004-07-23 15:22:56.000000000 +0200 | 1071 | --- qt-2.3.7-old/src/tools/qmodules.h2004-07-23 15:22:56.000000000 +0200 |
1079 | +++ qt-2.3.7/src/tools/qmodules.h2004-07-23 16:03:09.000000000 +0200 | 1072 | +++ qt-2.3.7/src/tools/qmodules.h2004-07-23 16:03:09.000000000 +0200 |
1080 | @@ -1,14 +1,11 @@ | 1073 | @@ -1,14 +1,11 @@ |
1081 | -#ifndef QT_H | 1074 | -#ifndef QT_H |
1082 | -#endif // QT_H | 1075 | -#endif // QT_H |
1083 | - | 1076 | - |
1084 | +// These modules are licensed to you | 1077 | +// These modules are licensed to you |
1085 | #define QT_MODULE_TOOLS | 1078 | #define QT_MODULE_TOOLS |
1086 | #define QT_MODULE_KERNEL | 1079 | #define QT_MODULE_KERNEL |
1087 | #define QT_MODULE_WIDGETS | 1080 | #define QT_MODULE_WIDGETS |
1088 | #define QT_MODULE_DIALOGS | 1081 | #define QT_MODULE_DIALOGS |
1089 | - | 1082 | - |
1090 | #define QT_MODULE_ICONVIEW | 1083 | #define QT_MODULE_ICONVIEW |
1091 | #define QT_MODULE_WORKSPACE | 1084 | #define QT_MODULE_WORKSPACE |
1092 | -#define QT_MODULE_TABLE | 1085 | -#define QT_MODULE_TABLE |
1093 | +#define QT_MODULE_NETWORK | 1086 | +#define QT_MODULE_NETWORK |
1094 | #define QT_MODULE_CANVAS | 1087 | #define QT_MODULE_CANVAS |
1095 | +#define QT_MODULE_TABLE | 1088 | +#define QT_MODULE_TABLE |
1096 | #define QT_MODULE_XML | 1089 | #define QT_MODULE_XML |
1097 | -#define QT_MODULE_NETWORK | 1090 | -#define QT_MODULE_NETWORK |
1098 | diff -ur qt-2.3.7-old/src/tools/qsortedlist.h qt-2.3.7/src/tools/qsortedlist.h | 1091 | diff -ur qt-2.3.7-old/src/tools/qsortedlist.h qt-2.3.7/src/tools/qsortedlist.h |
1099 | --- qt-2.3.7-old/src/tools/qsortedlist.h2004-07-23 15:22:56.000000000 +0200 | 1092 | --- qt-2.3.7-old/src/tools/qsortedlist.h2004-07-23 15:22:56.000000000 +0200 |
1100 | +++ qt-2.3.7/src/tools/qsortedlist.h2004-07-23 15:42:01.000000000 +0200 | 1093 | +++ qt-2.3.7/src/tools/qsortedlist.h2004-07-23 15:42:01.000000000 +0200 |
1101 | @@ -48,7 +48,7 @@ | 1094 | @@ -48,7 +48,7 @@ |
1102 | public: | 1095 | public: |
1103 | QSortedList() {} | 1096 | QSortedList() {} |
1104 | QSortedList( const QSortedList<type> &l ) : QList<type>(l) {} | 1097 | QSortedList( const QSortedList<type> &l ) : QList<type>(l) {} |
1105 | - ~QSortedList() { clear(); } | 1098 | - ~QSortedList() { clear(); } |
1106 | + ~QSortedList() { this->clear(); } | 1099 | + ~QSortedList() { this->clear(); } |
1107 | QSortedList<type> &operator=(const QSortedList<type> &l) | 1100 | QSortedList<type> &operator=(const QSortedList<type> &l) |
1108 | { return (QSortedList<type>&)QList<type>::operator=(l); } | 1101 | { return (QSortedList<type>&)QList<type>::operator=(l); } |
1109 | 1102 | ||
1110 | diff -ur qt-2.3.7-old/src/tools/qstring.cpp qt-2.3.7/src/tools/qstring.cpp | 1103 | diff -ur qt-2.3.7-old/src/tools/qstring.cpp qt-2.3.7/src/tools/qstring.cpp |
1111 | --- qt-2.3.7-old/src/tools/qstring.cpp2004-07-23 15:22:56.000000000 +0200 | 1104 | --- qt-2.3.7-old/src/tools/qstring.cpp2004-07-23 15:22:56.000000000 +0200 |
1112 | +++ qt-2.3.7/src/tools/qstring.cpp2004-07-23 15:44:25.000000000 +0200 | 1105 | +++ qt-2.3.7/src/tools/qstring.cpp2004-07-23 15:44:25.000000000 +0200 |
1113 | @@ -14469,7 +14469,11 @@ | 1106 | @@ -14469,7 +14469,11 @@ |
1114 | return qt_winQString2MB( *this ); | 1107 | return qt_winQString2MB( *this ); |
1115 | #endif | 1108 | #endif |
1116 | #ifdef _WS_QWS_ | 1109 | #ifdef _WS_QWS_ |
1117 | - return utf8(); // ##### if there is ANY 8 bit format supported? | 1110 | - return utf8(); // ##### if there is ANY 8 bit format supported? |
1118 | + QTextCodec* codec = QTextCodec::codecForLocale(); | 1111 | + QTextCodec* codec = QTextCodec::codecForLocale(); |
1119 | + return codec | 1112 | + return codec |
1120 | + ? codec->fromUnicode(*this) | 1113 | + ? codec->fromUnicode(*this) |
1121 | + : utf8(); | 1114 | + : utf8(); |
1122 | + //return latin1(); // ##### if there is ANY 8 bit format supported? | 1115 | + //return latin1(); // ##### if there is ANY 8 bit format supported? |
1123 | #endif | 1116 | #endif |
1124 | #endif | 1117 | #endif |
1125 | } | 1118 | } |
1126 | @@ -14515,7 +14519,12 @@ | 1119 | @@ -14515,7 +14519,12 @@ |
1127 | return qt_winMB2QString( local8Bit ); | 1120 | return qt_winMB2QString( local8Bit ); |
1128 | #endif | 1121 | #endif |
1129 | #ifdef _WS_QWS_ | 1122 | #ifdef _WS_QWS_ |
1130 | - return fromUtf8(local8Bit,len); | 1123 | - return fromUtf8(local8Bit,len); |
1131 | + QTextCodec* codec = QTextCodec::codecForLocale(); | 1124 | + QTextCodec* codec = QTextCodec::codecForLocale(); |
1132 | + if( len < 0) len = qstrlen(local8Bit); | 1125 | + if( len < 0) len = qstrlen(local8Bit); |
1133 | + return codec | 1126 | + return codec |
1134 | + ? codec->toUnicode(local8Bit, len) | 1127 | + ? codec->toUnicode(local8Bit, len) |
1135 | + : QString::fromUtf8(local8Bit,len); | 1128 | + : QString::fromUtf8(local8Bit,len); |
1136 | +// return fromLatin1(local8Bit,len); | 1129 | +// return fromLatin1(local8Bit,len); |
1137 | #endif | 1130 | #endif |
1138 | #endif // QT_NO_TEXTCODEC | 1131 | #endif // QT_NO_TEXTCODEC |
1139 | } | 1132 | } |
1140 | diff -ur qt-2.3.7-old/src/tools/qstring.h qt-2.3.7/src/tools/qstring.h | 1133 | diff -ur qt-2.3.7-old/src/tools/qstring.h qt-2.3.7/src/tools/qstring.h |
1141 | --- qt-2.3.7-old/src/tools/qstring.h2004-07-23 15:22:56.000000000 +0200 | 1134 | --- qt-2.3.7-old/src/tools/qstring.h2004-07-23 15:22:56.000000000 +0200 |
1142 | +++ qt-2.3.7/src/tools/qstring.h2004-07-23 15:42:01.000000000 +0200 | 1135 | +++ qt-2.3.7/src/tools/qstring.h2004-07-23 15:42:01.000000000 +0200 |
1143 | @@ -163,8 +163,16 @@ | 1136 | @@ -163,8 +163,16 @@ |
1144 | bool isLetterOrNumber() const; | 1137 | bool isLetterOrNumber() const; |
1145 | bool isDigit() const; | 1138 | bool isDigit() const; |
1146 | 1139 | ||
1147 | + | 1140 | + |
1148 | +#ifdef Q_NO_PACKED_REFERENCE | 1141 | +#ifdef Q_NO_PACKED_REFERENCE |
1149 | + uchar& cell() { return *(&cl); } | 1142 | + uchar& cell() { return *(&cl); } |
1150 | + uchar& row() { return *(&rw); } | 1143 | + uchar& row() { return *(&rw); } |
1151 | +#else | 1144 | +#else |
1152 | uchar& cell() { return cl; } | 1145 | uchar& cell() { return cl; } |
1153 | - uchar& row() { return rw; } | 1146 | - uchar& row() { return rw; } |
1154 | + uchar& row() { return rw; } | 1147 | + uchar& row() { return rw; } |
1155 | +#endif | 1148 | +#endif |
1156 | + | 1149 | + |
1157 | + | 1150 | + |
1158 | uchar cell() const { return cl; } | 1151 | uchar cell() const { return cl; } |
1159 | uchar row() const { return rw; } | 1152 | uchar row() const { return rw; } |
1160 | 1153 | ||
1161 | diff -ur qt-2.3.7-old/src/widgets/qcommonstyle.cpp qt-2.3.7/src/widgets/qcommonstyle.cpp | 1154 | diff -ur qt-2.3.7-old/src/widgets/qcommonstyle.cpp qt-2.3.7/src/widgets/qcommonstyle.cpp |
1162 | --- qt-2.3.7-old/src/widgets/qcommonstyle.cpp2004-07-23 15:22:56.000000000 +0200 | 1155 | --- qt-2.3.7-old/src/widgets/qcommonstyle.cpp2004-07-23 15:22:56.000000000 +0200 |
1163 | +++ qt-2.3.7/src/widgets/qcommonstyle.cpp2004-07-23 15:38:13.000000000 +0200 | 1156 | +++ qt-2.3.7/src/widgets/qcommonstyle.cpp2004-07-23 15:38:13.000000000 +0200 |
1164 | @@ -566,7 +566,7 @@ | 1157 | @@ -566,7 +566,7 @@ |
1165 | bool enabled, bool active ) | 1158 | bool enabled, bool active ) |
1166 | { | 1159 | { |
1167 | #ifndef QT_NO_MENUBAR | 1160 | #ifndef QT_NO_MENUBAR |
1168 | -#ifndef QT_NO_STYLE_SGI | 1161 | -#ifndef QT_NO_STYLE_SGI |
1169 | +#if 1 // #ifndef QT_NO_STYLE_SGI | 1162 | +#if 1 // #ifndef QT_NO_STYLE_SGI |
1170 | if (draw_menu_bar_impl != 0) { | 1163 | if (draw_menu_bar_impl != 0) { |
1171 | QDrawMenuBarItemImpl impl = draw_menu_bar_impl; | 1164 | QDrawMenuBarItemImpl impl = draw_menu_bar_impl; |
1172 | (this->*impl)(p, x, y, w, h, mi, g, enabled, active); | 1165 | (this->*impl)(p, x, y, w, h, mi, g, enabled, active); |
1173 | diff -ur qt-2.3.7-old/src/widgets/qlistview.cpp qt-2.3.7/src/widgets/qlistview.cpp | 1166 | diff -ur qt-2.3.7-old/src/widgets/qlistview.cpp qt-2.3.7/src/widgets/qlistview.cpp |
1174 | --- qt-2.3.7-old/src/widgets/qlistview.cpp2004-07-23 15:22:56.000000000 +0200 | 1167 | --- qt-2.3.7-old/src/widgets/qlistview.cpp2004-07-23 15:22:56.000000000 +0200 |
1175 | +++ qt-2.3.7/src/widgets/qlistview.cpp2004-07-23 15:38:13.000000000 +0200 | 1168 | +++ qt-2.3.7/src/widgets/qlistview.cpp2004-07-23 15:38:13.000000000 +0200 |
1176 | @@ -4968,9 +4968,9 @@ | 1169 | @@ -4968,9 +4968,9 @@ |
1177 | l = l->childItem ? l->childItem : l->siblingItem; | 1170 | l = l->childItem ? l->childItem : l->siblingItem; |
1178 | 1171 | ||
1179 | if ( l && l->height() ) | 1172 | if ( l && l->height() ) |
1180 | -s.setHeight( s.height() + 10 * l->height() ); | 1173 | -s.setHeight( s.height() + 10 * l->height() ); |
1181 | - else | 1174 | - else |
1182 | -s.setHeight( s.height() + 140 ); | 1175 | -s.setHeight( s.height() + 140 ); |
1183 | +s.setHeight( s.height() + 4 /*10*/ * l->height() ); | 1176 | +s.setHeight( s.height() + 4 /*10*/ * l->height() ); |
1184 | + else // ^v much too big for handhelds | 1177 | + else // ^v much too big for handhelds |
1185 | +s.setHeight( s.height() + 30 /*140*/ ); | 1178 | +s.setHeight( s.height() + 30 /*140*/ ); |
1186 | 1179 | ||
1187 | if ( s.width() > s.height() * 3 ) | 1180 | if ( s.width() > s.height() * 3 ) |
1188 | s.setHeight( s.width() / 3 ); | 1181 | s.setHeight( s.width() / 3 ); |
1189 | diff -ur qt-2.3.7-old/src/widgets/qscrollview.cpp qt-2.3.7/src/widgets/qscrollview.cpp | 1182 | diff -ur qt-2.3.7-old/src/widgets/qscrollview.cpp qt-2.3.7/src/widgets/qscrollview.cpp |
1190 | --- qt-2.3.7-old/src/widgets/qscrollview.cpp2004-07-23 19:25:18.000000000 +0200 | 1183 | --- qt-2.3.7-old/src/widgets/qscrollview.cpp2004-07-23 19:25:18.000000000 +0200 |
1191 | +++ qt-2.3.7/src/widgets/qscrollview.cpp2004-07-23 19:23:10.000000000 +0200 | 1184 | +++ qt-2.3.7/src/widgets/qscrollview.cpp2004-07-23 19:23:10.000000000 +0200 |
1192 | @@ -526,15 +526,16 @@ | 1185 | @@ -526,15 +526,16 @@ |
1193 | this, SLOT( doDragAutoScroll() ) ); | 1186 | this, SLOT( doDragAutoScroll() ) ); |
1194 | #endif | 1187 | #endif |
1195 | 1188 | ||
1196 | - connect( &d->hbar, SIGNAL( valueChanged( int ) ), | 1189 | - connect( &d->hbar, SIGNAL( valueChanged( int ) ), |
1197 | -this, SLOT( hslide( int ) ) ); | 1190 | -this, SLOT( hslide( int ) ) ); |
1198 | - connect( &d->vbar, SIGNAL( valueChanged( int ) ), | 1191 | - connect( &d->vbar, SIGNAL( valueChanged( int ) ), |
1199 | -this, SLOT( vslide( int ) ) ); | 1192 | -this, SLOT( vslide( int ) ) ); |
1200 | + connect( &d->hbar, SIGNAL( valueChanged(int) ), | 1193 | + connect( &d->hbar, SIGNAL( valueChanged(int) ), |
1201 | +this, SLOT( hslide(int) ) ); | 1194 | +this, SLOT( hslide(int) ) ); |
1202 | + connect( &d->vbar, SIGNAL( valueChanged(int) ), | 1195 | + connect( &d->vbar, SIGNAL( valueChanged(int) ), |
1203 | +this, SLOT( vslide(int) ) ); | 1196 | +this, SLOT( vslide(int) ) ); |
1204 | d->viewport.installEventFilter( this ); | 1197 | d->viewport.installEventFilter( this ); |
1205 | 1198 | ||
1206 | setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); | 1199 | setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); |
1207 | setLineWidth( style().defaultFrameWidth() ); | 1200 | setLineWidth( style().defaultFrameWidth() ); |
1208 | setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); | 1201 | setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); |
1209 | + | 1202 | + |
1210 | } | 1203 | } |
1211 | 1204 | ||
1212 | 1205 | ||
1213 | @@ -683,6 +684,11 @@ | 1206 | @@ -683,6 +684,11 @@ |
1214 | h-tmarg-bmarg - (showh ? hsbExt : 0) ); | 1207 | h-tmarg-bmarg - (showh ? hsbExt : 0) ); |
1215 | } | 1208 | } |
1216 | 1209 | ||
1217 | +/* | 1210 | +/* |
1218 | + The surrounding environment (or application, if there is no | 1211 | + The surrounding environment (or application, if there is no |
1219 | + environment, may set this. Requires Qt >= 2.3.8. | 1212 | + environment, may set this. Requires Qt >= 2.3.8. |
1220 | +*/ | 1213 | +*/ |
1221 | +bool qt_left_hand_scrollbars = FALSE; | 1214 | +bool qt_left_hand_scrollbars = FALSE; |
1222 | 1215 | ||
1223 | /*! | 1216 | /*! |
1224 | Updates scrollbars - all possibilities considered. You should never | 1217 | Updates scrollbars - all possibilities considered. You should never |
1225 | @@ -786,45 +792,50 @@ | 1218 | @@ -786,45 +792,50 @@ |
1226 | 1219 | ||
1227 | // Position the scrollbars, viewport, and corner widget. | 1220 | // Position the scrollbars, viewport, and corner widget. |
1228 | int bottom; | 1221 | int bottom; |
1229 | + int xoffset = ( qt_left_hand_scrollbars && ( showv || cornerWidget() ) ) ? vsbExt : 0; | 1222 | + int xoffset = ( qt_left_hand_scrollbars && ( showv || cornerWidget() ) ) ? vsbExt : 0; |
1230 | + int xpos = qt_left_hand_scrollbars ? 0 : w-vsbExt; | 1223 | + int xpos = qt_left_hand_scrollbars ? 0 : w-vsbExt; |
1231 | + xpos = (style() == WindowsStyle) && qt_left_hand_scrollbars ? xpos + fw : xpos - fw; | 1224 | + xpos = (style() == WindowsStyle) && qt_left_hand_scrollbars ? xpos + fw : xpos - fw; |
1232 | + int ypos = tmarg; | 1225 | + int ypos = tmarg; |
1233 | + ypos = (style() == WindowsStyle) ? ypos +fw : 0; | 1226 | + ypos = (style() == WindowsStyle) ? ypos +fw : 0; |
1234 | if ( showh ) { | 1227 | if ( showh ) { |
1235 | int right = ( showv || cornerWidget() ) ? w-vsbExt : w; | 1228 | int right = ( showv || cornerWidget() ) ? w-vsbExt : w; |
1236 | if ( style() == WindowsStyle ) | 1229 | if ( style() == WindowsStyle ) |
1237 | - setHBarGeometry(d->hbar, fw, h-hsbExt-fw, | 1230 | - setHBarGeometry(d->hbar, fw, h-hsbExt-fw, |
1238 | + setHBarGeometry(d->hbar, fw + xoffset , h-hsbExt-fw, | 1231 | + setHBarGeometry(d->hbar, fw + xoffset , h-hsbExt-fw, |
1239 | right-fw-fw, hsbExt ); | 1232 | right-fw-fw, hsbExt ); |
1240 | else | 1233 | else |
1241 | - setHBarGeometry(d->hbar, 0, h-hsbExt, right, | 1234 | - setHBarGeometry(d->hbar, 0, h-hsbExt, right, |
1242 | + setHBarGeometry(d->hbar, 0+ xoffset, h-hsbExt, right, | 1235 | + setHBarGeometry(d->hbar, 0+ xoffset, h-hsbExt, right, |
1243 | hsbExt ); | 1236 | hsbExt ); |
1244 | bottom=h-hsbExt; | 1237 | bottom=h-hsbExt; |
1245 | } else { | 1238 | } else { |
1246 | bottom=h; | 1239 | bottom=h; |
1247 | } | 1240 | } |
1248 | if ( showv ) { | 1241 | if ( showv ) { |
1249 | -clipper()->setGeometry( lmarg, tmarg, | 1242 | -clipper()->setGeometry( lmarg, tmarg, |
1250 | +clipper()->setGeometry( lmarg + xoffset, tmarg, | 1243 | +clipper()->setGeometry( lmarg + xoffset, tmarg, |
1251 | w-vsbExt-lmarg-rmarg, | 1244 | w-vsbExt-lmarg-rmarg, |
1252 | bottom-tmarg-bmarg ); | 1245 | bottom-tmarg-bmarg ); |
1253 | d->viewportResized( w-vsbExt-lmarg-rmarg, bottom-tmarg-bmarg ); | 1246 | d->viewportResized( w-vsbExt-lmarg-rmarg, bottom-tmarg-bmarg ); |
1254 | if ( style() == WindowsStyle ) | 1247 | if ( style() == WindowsStyle ) |
1255 | - changeFrameRect(QRect(0, 0, w, h) ); | 1248 | - changeFrameRect(QRect(0, 0, w, h) ); |
1256 | + changeFrameRect(QRect(xoffset, 0, w, h) ); | 1249 | + changeFrameRect(QRect(xoffset, 0, w, h) ); |
1257 | else | 1250 | else |
1258 | - changeFrameRect(QRect(0, 0, w-vsbExt, bottom)); | 1251 | - changeFrameRect(QRect(0, 0, w-vsbExt, bottom)); |
1259 | + changeFrameRect(QRect(xoffset, 0, w-vsbExt, bottom)); | 1252 | + changeFrameRect(QRect(xoffset, 0, w-vsbExt, bottom)); |
1260 | if (cornerWidget()) { | 1253 | if (cornerWidget()) { |
1261 | if ( style() == WindowsStyle ) | 1254 | if ( style() == WindowsStyle ) |
1262 | - setVBarGeometry( d->vbar, w-vsbExt-fw, | 1255 | - setVBarGeometry( d->vbar, w-vsbExt-fw, |
1263 | - fw, vsbExt, | 1256 | - fw, vsbExt, |
1264 | - h-hsbExt-fw-fw ); | 1257 | - h-hsbExt-fw-fw ); |
1265 | + setVBarGeometry( d->vbar, xpos, | 1258 | + setVBarGeometry( d->vbar, xpos, |
1266 | + ypos, vsbExt, | 1259 | + ypos, vsbExt, |
1267 | + bottom-fw-ypos ); | 1260 | + bottom-fw-ypos ); |
1268 | else | 1261 | else |
1269 | - setVBarGeometry( d->vbar, w-vsbExt, 0, | 1262 | - setVBarGeometry( d->vbar, w-vsbExt, 0, |
1270 | + setVBarGeometry( d->vbar, xpos, ypos, | 1263 | + setVBarGeometry( d->vbar, xpos, ypos, |
1271 | vsbExt, | 1264 | vsbExt, |
1272 | - h-hsbExt ); | 1265 | - h-hsbExt ); |
1273 | + bottom-ypos ); | 1266 | + bottom-ypos ); |
1274 | } | 1267 | } |
1275 | else { | 1268 | else { |
1276 | if ( style() == WindowsStyle ) | 1269 | if ( style() == WindowsStyle ) |
1277 | - setVBarGeometry( d->vbar, w-vsbExt-fw, | 1270 | - setVBarGeometry( d->vbar, w-vsbExt-fw, |
1278 | - fw, vsbExt, | 1271 | - fw, vsbExt, |
1279 | - bottom-fw-fw ); | 1272 | - bottom-fw-fw ); |
1280 | + setVBarGeometry( d->vbar, xpos, | 1273 | + setVBarGeometry( d->vbar, xpos, |
1281 | + ypos, vsbExt, | 1274 | + ypos, vsbExt, |
1282 | + bottom-fw-ypos ); | 1275 | + bottom-fw-ypos ); |
1283 | else | 1276 | else |
1284 | - setVBarGeometry( d->vbar, w-vsbExt, 0, | 1277 | - setVBarGeometry( d->vbar, w-vsbExt, 0, |
1285 | - vsbExt, bottom ); | 1278 | - vsbExt, bottom ); |
1286 | + setVBarGeometry( d->vbar, xpos, ypos, | 1279 | + setVBarGeometry( d->vbar, xpos, ypos, |
1287 | + vsbExt, bottom-ypos ); | 1280 | + vsbExt, bottom-ypos ); |
1288 | } | 1281 | } |
1289 | } else { | 1282 | } else { |
1290 | if ( style() == WindowsStyle ) | 1283 | if ( style() == WindowsStyle ) |
1291 | @@ -837,12 +848,12 @@ | 1284 | @@ -837,12 +848,12 @@ |
1292 | } | 1285 | } |
1293 | if ( d->corner ) { | 1286 | if ( d->corner ) { |
1294 | if ( style() == WindowsStyle ) | 1287 | if ( style() == WindowsStyle ) |
1295 | - d->corner->setGeometry( w-vsbExt-fw, | 1288 | - d->corner->setGeometry( w-vsbExt-fw, |
1296 | + d->corner->setGeometry( xpos, | 1289 | + d->corner->setGeometry( xpos, |
1297 | h-hsbExt-fw, | 1290 | h-hsbExt-fw, |
1298 | vsbExt, | 1291 | vsbExt, |
1299 | hsbExt ); | 1292 | hsbExt ); |
1300 | else | 1293 | else |
1301 | - d->corner->setGeometry( w-vsbExt, | 1294 | - d->corner->setGeometry( w-vsbExt, |
1302 | + d->corner->setGeometry( xpos, | 1295 | + d->corner->setGeometry( xpos, |
1303 | h-hsbExt, | 1296 | h-hsbExt, |
1304 | vsbExt, | 1297 | vsbExt, |
1305 | hsbExt ); | 1298 | hsbExt ); |
1306 | @@ -1266,6 +1277,9 @@ | 1299 | @@ -1266,6 +1277,9 @@ |
1307 | case QEvent::LayoutHint: | 1300 | case QEvent::LayoutHint: |
1308 | d->autoResizeHint(this); | 1301 | d->autoResizeHint(this); |
1309 | break; | 1302 | break; |
1310 | +case QEvent::WindowActivate: | 1303 | +case QEvent::WindowActivate: |
1311 | +case QEvent::WindowDeactivate: | 1304 | +case QEvent::WindowDeactivate: |
1312 | + return TRUE; | 1305 | + return TRUE; |
1313 | default: | 1306 | default: |
1314 | break; | 1307 | break; |
1315 | } | 1308 | } |
1316 | @@ -1675,7 +1689,7 @@ | 1309 | @@ -1675,7 +1689,7 @@ |
1317 | } | 1310 | } |
1318 | 1311 | ||
1319 | /*! | 1312 | /*! |
1320 | - Scrolls the content by \a x to the left and \a y upwards. | 1313 | - Scrolls the content by \a x to the left and \a y upwards. |
1321 | + Scrolls the content by \a dx to the left and \a dy upwards. | 1314 | + Scrolls the content by \a dx to the left and \a dy upwards. |
1322 | */ | 1315 | */ |
1323 | void QScrollView::scrollBy( int dx, int dy ) | 1316 | void QScrollView::scrollBy( int dx, int dy ) |
1324 | { | 1317 | { |
1325 | diff -ur qt-2.3.7-old/src/widgets/qtoolbutton.cpp qt-2.3.7/src/widgets/qtoolbutton.cpp | 1318 | diff -ur qt-2.3.7-old/src/widgets/qtoolbutton.cpp qt-2.3.7/src/widgets/qtoolbutton.cpp |
1326 | --- qt-2.3.7-old/src/widgets/qtoolbutton.cpp2004-07-23 15:22:56.000000000 +0200 | 1319 | --- qt-2.3.7-old/src/widgets/qtoolbutton.cpp2004-07-23 15:22:56.000000000 +0200 |
1327 | +++ qt-2.3.7/src/widgets/qtoolbutton.cpp2004-07-23 15:38:13.000000000 +0200 | 1320 | +++ qt-2.3.7/src/widgets/qtoolbutton.cpp2004-07-23 15:38:13.000000000 +0200 |
1328 | @@ -230,7 +230,7 @@ | 1321 | @@ -230,7 +230,7 @@ |
1329 | else | 1322 | else |
1330 | QToolTip::add( this, textLabel ); | 1323 | QToolTip::add( this, textLabel ); |
1331 | } | 1324 | } |
1332 | -#endif | 1325 | -#endif |
1333 | +#endif | 1326 | +#endif |
1334 | } | 1327 | } |
1335 | 1328 | ||
1336 | 1329 | ||
1337 | @@ -324,12 +324,12 @@ | 1330 | @@ -324,12 +324,12 @@ |
1338 | QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Large, QIconSet::Normal); | 1331 | QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Large, QIconSet::Normal); |
1339 | w = pm.width(); | 1332 | w = pm.width(); |
1340 | h = pm.height(); | 1333 | h = pm.height(); |
1341 | -if ( w < 32 ) | 1334 | -if ( w < 32 ) |
1342 | - w = 32; | 1335 | - w = 32; |
1343 | -if ( h < 32 ) | 1336 | -if ( h < 32 ) |
1344 | - h = 32; | 1337 | - h = 32; |
1345 | +if ( w < 24 ) | 1338 | +if ( w < 24 ) |
1346 | + w = 24; | 1339 | + w = 24; |
1347 | +if ( h < 24 ) | 1340 | +if ( h < 24 ) |
1348 | + h = 24; | 1341 | + h = 24; |
1349 | } else { | 1342 | } else { |
1350 | -w = h = 16; | 1343 | -w = h = 16; |
1351 | +w = h = 14; | 1344 | +w = h = 14; |
1352 | QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Small, QIconSet::Normal); | 1345 | QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Small, QIconSet::Normal); |
1353 | w = pm.width(); | 1346 | w = pm.width(); |
1354 | h = pm.height(); | 1347 | h = pm.height(); |
diff --git a/qt/qt-2.3.7.patch/qte237-iconviewspeed.patch b/qt/qt-2.3.7.patch/qte237-iconviewspeed.patch index 63e45ec..81064e1 100644 --- a/qt/qt-2.3.7.patch/qte237-iconviewspeed.patch +++ b/qt/qt-2.3.7.patch/qte237-iconviewspeed.patch | |||
@@ -1,149 +1,142 @@ | |||
1 | Speed up patches backported from | 1 | Speed up patches backported from |
2 | 2 | ||
3 | http://robotics.dei.unipd.it/~koral/KDE/kflicker.html | 3 | http://robotics.dei.unipd.it/~koral/KDE/kflicker.html |
4 | 4 | ||
5 | and | 5 | and |
6 | 6 | ||
7 | http://lists.kde.org/?l=kde-optimize&m=105382164111363&w=2 (complete thread) | 7 | http://lists.kde.org/?l=kde-optimize&m=105382164111363&w=2 (complete thread) |
8 | 8 | ||
9 | 9 | ||
10 | 10 | ||
11 | 11 | ||
12 | diff -u qt-2.3.7_old/src/iconview/qiconview.cpp qt-2.3.7/src/iconview/qiconview.cpp | 12 | diff -u qt-2.3.7_old/src/iconview/qiconview.cpp qt-2.3.7/src/iconview/qiconview.cpp |
13 | --- qt-2.3.7_old/src/iconview/qiconview.cpp2004-06-13 22:29:56.000000000 +0200 | 13 | --- qt-2.3.7_old/src/iconview/qiconview.cpp2004-06-13 22:29:56.000000000 +0200 |
14 | +++ qt-2.3.7/src/iconview/qiconview.cpp2004-06-13 22:33:32.000000000 +0200 | 14 | +++ qt-2.3.7/src/iconview/qiconview.cpp2004-06-13 22:33:32.000000000 +0200 |
15 | @@ -1,5 +1,5 @@ | ||
16 | /**************************************************************************** | ||
17 | -** $Id$ | ||
18 | +** $Id$ | ||
19 | ** | ||
20 | ** Implementation of QIconView widget class | ||
21 | ** | ||
22 | @@ -220,6 +220,7 @@ | 15 | @@ -220,6 +220,7 @@ |
23 | QIconView::SelectionMode selectionMode; | 16 | QIconView::SelectionMode selectionMode; |
24 | QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, *startDragItem, *pressedItem, *selectAnchor; | 17 | QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, *startDragItem, *pressedItem, *selectAnchor; |
25 | QRect *rubber; | 18 | QRect *rubber; |
26 | + QPixmap *backBuffer; | 19 | + QPixmap *backBuffer; |
27 | QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer, | 20 | QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer, |
28 | *fullRedrawTimer; | 21 | *fullRedrawTimer; |
29 | int rastX, rastY, spacing; | 22 | int rastX, rastY, spacing; |
30 | @@ -2263,6 +2264,7 @@ | 23 | @@ -2263,6 +2264,7 @@ |
31 | d->currentItem = 0; | 24 | d->currentItem = 0; |
32 | d->highlightedItem = 0; | 25 | d->highlightedItem = 0; |
33 | d->rubber = 0; | 26 | d->rubber = 0; |
34 | + d->backBuffer = 0; | 27 | + d->backBuffer = 0; |
35 | d->scrollTimer = 0; | 28 | d->scrollTimer = 0; |
36 | d->startDragItem = 0; | 29 | d->startDragItem = 0; |
37 | d->tmpCurrentItem = 0; | 30 | d->tmpCurrentItem = 0; |
38 | @@ -2411,6 +2413,8 @@ | 31 | @@ -2411,6 +2413,8 @@ |
39 | delete item; | 32 | delete item; |
40 | item = tmp; | 33 | item = tmp; |
41 | } | 34 | } |
42 | + delete d->backBuffer; | 35 | + delete d->backBuffer; |
43 | + d->backBuffer = 0; | 36 | + d->backBuffer = 0; |
44 | delete d->fm; | 37 | delete d->fm; |
45 | d->fm = 0; | 38 | d->fm = 0; |
46 | #ifndef QT_NO_TOOLTIP | 39 | #ifndef QT_NO_TOOLTIP |
47 | @@ -2877,6 +2881,48 @@ | 40 | @@ -2877,6 +2881,48 @@ |
48 | } | 41 | } |
49 | 42 | ||
50 | /*! | 43 | /*! |
51 | + This function grabs all paintevents that otherwise would have been | 44 | + This function grabs all paintevents that otherwise would have been |
52 | + processed by the QScrollView::viewportPaintEvent(). Here we use a | 45 | + processed by the QScrollView::viewportPaintEvent(). Here we use a |
53 | + doublebuffer to reduce 'on-paint' flickering on QIconView | 46 | + doublebuffer to reduce 'on-paint' flickering on QIconView |
54 | + (and of course its childs). | 47 | + (and of course its childs). |
55 | + | 48 | + |
56 | + \sa QScrollView::viewportPaintEvent(), QIconView::drawContents() | 49 | + \sa QScrollView::viewportPaintEvent(), QIconView::drawContents() |
57 | +*/ | 50 | +*/ |
58 | + | 51 | + |
59 | +void QIconView::bufferedPaintEvent( QPaintEvent* pe ) | 52 | +void QIconView::bufferedPaintEvent( QPaintEvent* pe ) |
60 | +{ | 53 | +{ |
61 | + QWidget* vp = viewport(); | 54 | + QWidget* vp = viewport(); |
62 | + QRect r = pe->rect() & vp->rect(); | 55 | + QRect r = pe->rect() & vp->rect(); |
63 | + int ex = r.x() + contentsX(); | 56 | + int ex = r.x() + contentsX(); |
64 | + int ey = r.y() + contentsY(); | 57 | + int ey = r.y() + contentsY(); |
65 | + int ew = r.width(); | 58 | + int ew = r.width(); |
66 | + int eh = r.height(); | 59 | + int eh = r.height(); |
67 | + | 60 | + |
68 | + if ( !d->backBuffer ) | 61 | + if ( !d->backBuffer ) |
69 | +d->backBuffer = new QPixmap(vp->size()); | 62 | +d->backBuffer = new QPixmap(vp->size()); |
70 | + if ( d->backBuffer->size() != vp->size() ) { | 63 | + if ( d->backBuffer->size() != vp->size() ) { |
71 | +//Resize function (with hysteesis). Uses a good compromise between memory | 64 | +//Resize function (with hysteesis). Uses a good compromise between memory |
72 | +//consumption and speed (number) of resizes. | 65 | +//consumption and speed (number) of resizes. |
73 | + float newWidth = (float)vp->width(); | 66 | + float newWidth = (float)vp->width(); |
74 | +float newHeight = (float)vp->height(); | 67 | +float newHeight = (float)vp->height(); |
75 | +if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() ) | 68 | +if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() ) |
76 | +{ | 69 | +{ |
77 | + newWidth *= 1.1892; | 70 | + newWidth *= 1.1892; |
78 | + newHeight *= 1.1892; | 71 | + newHeight *= 1.1892; |
79 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); | 72 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); |
80 | +} else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() ) | 73 | +} else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() ) |
81 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); | 74 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); |
82 | + } | 75 | + } |
83 | + | 76 | + |
84 | + QPainter p; | 77 | + QPainter p; |
85 | + p.begin(d->backBuffer, vp); | 78 | + p.begin(d->backBuffer, vp); |
86 | + drawContentsOffset(&p, contentsX(), contentsY(), ex, ey, ew, eh); | 79 | + drawContentsOffset(&p, contentsX(), contentsY(), ex, ey, ew, eh); |
87 | + p.end(); | 80 | + p.end(); |
88 | + bitBlt(vp, r.x(), r.y(), d->backBuffer, r.x(), r.y(), ew, eh); | 81 | + bitBlt(vp, r.x(), r.y(), d->backBuffer, r.x(), r.y(), ew, eh); |
89 | +} | 82 | +} |
90 | + | 83 | + |
91 | +/*! | 84 | +/*! |
92 | + | 85 | + |
93 | \reimp | 86 | \reimp |
94 | */ | 87 | */ |
95 | 88 | ||
96 | @@ -4855,7 +4901,7 @@ | 89 | @@ -4855,7 +4901,7 @@ |
97 | if ( !d->rubber ) | 90 | if ( !d->rubber ) |
98 | drawDragShapes( d->oldDragPos ); | 91 | drawDragShapes( d->oldDragPos ); |
99 | } | 92 | } |
100 | - viewportPaintEvent( (QPaintEvent*)e ); | 93 | - viewportPaintEvent( (QPaintEvent*)e ); |
101 | + bufferedPaintEvent ((QPaintEvent*)e ); | 94 | + bufferedPaintEvent ((QPaintEvent*)e ); |
102 | if ( d->dragging ) { | 95 | if ( d->dragging ) { |
103 | if ( !d->rubber ) | 96 | if ( !d->rubber ) |
104 | drawDragShapes( d->oldDragPos ); | 97 | drawDragShapes( d->oldDragPos ); |
105 | @@ -5286,11 +5332,19 @@ | 98 | @@ -5286,11 +5332,19 @@ |
106 | return; | 99 | return; |
107 | 100 | ||
108 | if ( item->d->container1 && d->firstContainer ) { | 101 | if ( item->d->container1 && d->firstContainer ) { |
109 | -item->d->container1->items.removeRef( item ); | 102 | -item->d->container1->items.removeRef( item ); |
110 | + //Special-case checking of the last item, since this may be | 103 | + //Special-case checking of the last item, since this may be |
111 | + //called a few times for the same item. | 104 | + //called a few times for the same item. |
112 | + if (item->d->container1->items.last() == item) | 105 | + if (item->d->container1->items.last() == item) |
113 | + item->d->container1->items.removeLast(); | 106 | + item->d->container1->items.removeLast(); |
114 | + else | 107 | + else |
115 | + item->d->container1->items.removeRef( item ); | 108 | + item->d->container1->items.removeRef( item ); |
116 | } | 109 | } |
117 | item->d->container1 = 0; | 110 | item->d->container1 = 0; |
118 | if ( item->d->container2 && d->firstContainer ) { | 111 | if ( item->d->container2 && d->firstContainer ) { |
119 | -item->d->container2->items.removeRef( item ); | 112 | -item->d->container2->items.removeRef( item ); |
120 | + if (item->d->container2->items.last() == item) | 113 | + if (item->d->container2->items.last() == item) |
121 | + item->d->container2->items.removeLast(); | 114 | + item->d->container2->items.removeLast(); |
122 | + else | 115 | + else |
123 | + item->d->container2->items.removeRef( item ); | 116 | + item->d->container2->items.removeRef( item ); |
124 | } | 117 | } |
125 | item->d->container2 = 0; | 118 | item->d->container2 = 0; |
126 | 119 | ||
127 | diff -u qt-2.3.7_old/src/iconview/qiconview.h qt-2.3.7/src/iconview/qiconview.h | 120 | diff -u qt-2.3.7_old/src/iconview/qiconview.h qt-2.3.7/src/iconview/qiconview.h |
128 | --- qt-2.3.7_old/src/iconview/qiconview.h2004-06-13 22:29:56.000000000 +0200 | 121 | --- qt-2.3.7_old/src/iconview/qiconview.h2004-06-13 22:29:56.000000000 +0200 |
129 | +++ qt-2.3.7/src/iconview/qiconview.h2004-06-13 22:33:32.000000000 +0200 | 122 | +++ qt-2.3.7/src/iconview/qiconview.h2004-06-13 22:33:32.000000000 +0200 |
130 | @@ -444,6 +444,7 @@ | 123 | @@ -444,6 +444,7 @@ |
131 | virtual void contentsDropEvent( QDropEvent *e ); | 124 | virtual void contentsDropEvent( QDropEvent *e ); |
132 | #endif | 125 | #endif |
133 | 126 | ||
134 | + void bufferedPaintEvent( QPaintEvent* ); | 127 | + void bufferedPaintEvent( QPaintEvent* ); |
135 | virtual void resizeEvent( QResizeEvent* e ); | 128 | virtual void resizeEvent( QResizeEvent* e ); |
136 | virtual void keyPressEvent( QKeyEvent *e ); | 129 | virtual void keyPressEvent( QKeyEvent *e ); |
137 | virtual void focusInEvent( QFocusEvent *e ); | 130 | virtual void focusInEvent( QFocusEvent *e ); |
138 | --- qt-2.3.7-old/src/widgets/qscrollview.cpp2004-07-23 15:22:56.000000000 +0200 | 131 | --- qt-2.3.7-old/src/widgets/qscrollview.cpp2004-07-23 15:22:56.000000000 +0200 |
139 | +++ qt-2.3.7/src/widgets/qscrollview.cpp2004-07-23 19:23:10.000000000 +0200 | 132 | +++ qt-2.3.7/src/widgets/qscrollview.cpp2004-07-23 19:23:10.000000000 +0200 |
140 | @@ -1266,6 +1277,9 @@ | 133 | @@ -1266,6 +1277,9 @@ |
141 | case QEvent::LayoutHint: | 134 | case QEvent::LayoutHint: |
142 | d->autoResizeHint(this); | 135 | d->autoResizeHint(this); |
143 | break; | 136 | break; |
144 | +case QEvent::WindowActivate: | 137 | +case QEvent::WindowActivate: |
145 | +case QEvent::WindowDeactivate: | 138 | +case QEvent::WindowDeactivate: |
146 | + return TRUE; | 139 | + return TRUE; |
147 | default: | 140 | default: |
148 | break; | 141 | break; |
149 | } | 142 | } |