]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/qwt/files/qt2-fix.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / qwt / files / qt2-fix.patch
1
2 #
3 # Patch managed by http://www.holgerschurig.de/patcher.html
4 #
5
6 --- qwt-4.2.0rc1/include/qwt_global.h~qt2-fix
7 +++ qwt-4.2.0rc1/include/qwt_global.h
8 @@ -58,7 +58,7 @@
9  #define QWT_EXPORT
10  #endif
11  
12 -#if QT_VERSION < 300
13 +#if QT_VERSION < 0x030000
14  // Use old QArray instead of QMemArray
15  #define QWT_NO_MEMARRAY 
16  #endif
17 @@ -68,7 +68,7 @@
18  #undef QWT_NO_STL
19  // #define QWT_NO_STL // disable Standard Template Library based classes
20  #if defined(_MSC_VER)
21 -#if QT_VERSION < 300
22 +#if QT_VERSION < 0x030000
23  // tmake does not produce the missing -GX flag for exception handling
24  #define QWT_NO_STL
25  #else
26 --- qwt-4.2.0rc1/include/qwt_picker.h~qt2-fix
27 +++ qwt-4.2.0rc1/include/qwt_picker.h
28 @@ -89,7 +89,7 @@
29      Q_PROPERTY(ResizeMode resizeMode READ resizeMode WRITE setResizeMode)
30      Q_PROPERTY(bool isEnabled READ isEnabled WRITE setEnabled)
31  
32 -#if QT_VERSION >= 300
33 +#if QT_VERSION >= 0x030000
34      // Unfortunately moc is not aware of #ifdefs. To enable the QPen
35      // attributes as properties uncomment the following lines.
36  
37 --- qwt-4.2.0rc1/src/qwt_text.cpp~qt2-fix
38 +++ qwt-4.2.0rc1/src/qwt_text.cpp
39 @@ -337,7 +337,7 @@
40  //! Set the font
41  void QwtRichText::setFont(const QFont &font)
42  {
43 -#if QT_VERSION >= 300
44 +#if QT_VERSION >= 0x030000
45      d_doc->setDefaultFont(font);
46  #endif
47      QwtText::setFont(font);
48 @@ -359,7 +359,7 @@
49  */
50  int QwtRichText::heightForWidth(int width) const
51  {
52 -#if QT_VERSION < 300
53 +#if QT_VERSION < 0x030000
54      const QFont defaultFont = QFont::defaultFont();
55      QFont::setDefaultFont(font());
56  #endif
57 @@ -367,7 +367,7 @@
58      const QwtLayoutMetrics metrics(QwtPainter::metricsMap());
59      const int height = metrics.heightForWidth(*d_doc, width);
60  
61 -#if QT_VERSION < 300
62 +#if QT_VERSION < 0x030000
63      QFont::setDefaultFont(defaultFont);
64  #endif
65  
66 @@ -390,7 +390,7 @@
67      painter->save();
68  
69      painter->setPen(color());
70 -#if QT_VERSION < 300
71 +#if QT_VERSION < 0x030000
72      const QFont defaultFont = QFont::defaultFont();
73      QFont::setDefaultFont(font());
74  #else
75 @@ -399,7 +399,7 @@
76  
77      QwtPainter::drawSimpleRichText(painter, rect, alignment(), *d_doc);
78  
79 -#if QT_VERSION < 300
80 +#if QT_VERSION < 0x030000
81      QFont::setDefaultFont(defaultFont);
82  #endif
83      painter->restore();
84 @@ -407,7 +407,7 @@
85  
86  QRect QwtRichText::boundingRect(QPainter *painter) const
87  {
88 -#if QT_VERSION < 300
89 +#if QT_VERSION < 0x030000
90      const QFont defaultFont = QFont::defaultFont();
91      QFont::setDefaultFont(font());
92  #endif
93 @@ -415,7 +415,7 @@
94      const QwtLayoutMetrics metrics(QwtPainter::metricsMap());
95      const QRect rect = metrics.boundingRect(*d_doc, alignment(), painter);
96  
97 -#if QT_VERSION < 300
98 +#if QT_VERSION < 0x030000
99      QFont::setDefaultFont(defaultFont);
100  #endif
101  
102 @@ -428,7 +428,7 @@
103      QString rich = text;
104  
105      // By default QwtSimpleRichText is Qt::AlignLeft
106 -#if QT_VERSION >= 300
107 +#if QT_VERSION >= 0x030000
108      if (align & Qt::AlignJustify) 
109      {
110          rich.prepend("<div align=\"justify\">");
111 --- qwt-4.2.0rc1/src/qwt_push_button.cpp~qt2-fix
112 +++ qwt-4.2.0rc1/src/qwt_push_button.cpp
113 @@ -88,7 +88,7 @@
114                  !(d_button->alignment() & Qt::AlignCenter))
115              {
116                  const QRect contentsRect =
117 -#if QT_VERSION >= 300
118 +#if QT_VERSION >= 0x030000
119                      d_button->style().subRect( 
120                          QStyle::SR_PushButtonContents, d_button);
121  #else
122 @@ -103,7 +103,7 @@
123                  // Many styles move the label right/down
124                  // when the button is down.
125  
126 -#if QT_VERSION >= 300
127 +#if QT_VERSION >= 0x030000
128                  const QRect &r = *((QRect *)param[0].rect);
129  #else
130                  const QRect r(*param[0].point, param[1].pixmap->size());
131 @@ -133,7 +133,7 @@
132                  d_inFilter = TRUE;
133  
134                  d_button->style().drawItem(painter, 
135 -#if QT_VERSION >= 300
136 +#if QT_VERSION >= 0x030000
137                      pixRect,
138  #else
139                      pixRect.x(), pixRect.y(), 
140 @@ -150,7 +150,7 @@
141                  // We save the position of the icon. We need it later
142                  // to align the label pixmap. Hope that there are no styles
143                  // that paint the pixmap before the icon.
144 -#if QT_VERSION < 300
145 +#if QT_VERSION < 0x030000
146                  d_iconRect = QRect(*param[0].point, param[1].pixmap->size());
147  #else
148                  d_iconRect = *param[0].rect;
149 @@ -427,7 +427,7 @@
150  
151      QPainter picPainter(&paintFilter);
152  
153 -#if QT_VERSION >= 300
154 +#if QT_VERSION >= 0x030000
155      // When painting to QPicture the dotted line of the focus rect is
156      // set to solid. ( 06.08.2003 )
157      // So we don´t set the Style_HasFocus flag and paint the focus rect
158 @@ -459,7 +459,7 @@
159  
160      paintFilter.play(painter); 
161  
162 -#if QT_VERSION >= 300
163 +#if QT_VERSION >= 0x030000
164      if (hasFocus())
165      {
166          // Paint the focus rect on top of the button label.
167 --- qwt-4.2.0rc1/src/qwt_layout_metrics.cpp~qt2-fix
168 +++ qwt-4.2.0rc1/src/qwt_layout_metrics.cpp
169 @@ -212,7 +212,7 @@
170  QRect QwtMetricsMap::translate(
171      const QWMatrix &m, const QRect &rect) 
172  {
173 -#if QT_VERSION < 300
174 +#if QT_VERSION < 0x030000
175      return m.map(rect.normalize());
176  #else
177      return m.mapRect(rect);
178 @@ -227,7 +227,7 @@
179  QPointArray QwtMetricsMap::translate(
180      const QWMatrix &m, const QPointArray &pa) 
181  {
182 -#if QT_VERSION < 300
183 +#if QT_VERSION < 0x030000
184      return m.map(pa);
185  #else
186      return m * pa;
187 --- qwt-4.2.0rc1/src/qwt_slider.cpp~qt2-fix
188 +++ qwt-4.2.0rc1/src/qwt_slider.cpp
189 @@ -353,7 +353,7 @@
190      {
191          const QRect rect = d_sliderRect;
192  
193 -#if QT_VERSION < 300
194 +#if QT_VERSION < 0x030000
195          style().drawFocusRect(painter, rect, colorGroup());
196  #else
197          style().drawPrimitive(QStyle::PE_FocusRect, painter,
198 --- qwt-4.2.0rc1/src/qwt_counter.cpp~qt2-fix
199 +++ qwt-4.2.0rc1/src/qwt_counter.cpp
200 @@ -330,7 +330,7 @@
201      // QLineEdit::minimumSizeHint is for one char. Subtracting
202      // the size for the char we get all the margins, frames ...
203  
204 -#if QT_VERSION < 300
205 +#if QT_VERSION < 0x030000
206      w += d_valueEdit->minimumSizeHint().width() - fm.maxWidth();
207  #else
208      w += 2 * d_valueEdit->frameWidth() + 
209 --- qwt-4.2.0rc1/src/qwt_paint
210 +++ /dev/null
211 --- qwt-4.2.0rc1/src/qwt_painter.cpp~qt2-fix
212 +++ qwt-4.2.0rc1/src/qwt_painter.cpp
213 @@ -201,7 +201,7 @@
214      QColorGroup cg;
215      cg.setColor(QColorGroup::Text, painter->pen().color());
216  
217 -#if QT_VERSION < 300
218 +#if QT_VERSION < 0x030000
219      const QFont defaultFont = QFont::defaultFont();
220      QFont::setDefaultFont(painter->font());
221  #endif
222 @@ -220,7 +220,7 @@
223  
224      text.draw(painter, scaledRect.x(), y, scaledRect, cg);
225  
226 -#if QT_VERSION < 300
227 +#if QT_VERSION < 0x030000
228      QFont::setDefaultFont(defaultFont);
229  #endif
230  }
231 --- qwt-4.2.0rc1/src/qwt_dial.cpp~qt2-fix
232 +++ qwt-4.2.0rc1/src/qwt_dial.cpp
233 @@ -491,7 +491,7 @@
234          // because round objects doesn´t cover all pixels.
235  
236          QRect br = boundingRect();
237 -#if QT_VERSION < 300
238 +#if QT_VERSION < 0x030000
239  #ifdef _WS_WIN32_
240          // Qt-230-NC draws ellipses not as nicely as Qt-2.3.x on X Windows
241          br.setTop(br.top()-1);
242 @@ -1044,7 +1044,7 @@
243  {
244      if ( isReadOnly() )
245      {
246 -#if QT_VERSION >= 300
247 +#if QT_VERSION >= 0x030000
248          e->ignore();
249  #endif
250          return;
251 @@ -1078,7 +1078,7 @@
252              setValue(maxValue());
253              break;
254          default:;
255 -#if QT_VERSION >= 300
256 +#if QT_VERSION >= 0x030000
257              e->ignore();
258  #endif
259      }
260 --- qwt-4.2.0rc1/src/qwt_knob.cpp~qt2-fix
261 +++ qwt-4.2.0rc1/src/qwt_knob.cpp
262 @@ -279,7 +279,7 @@
263      {
264          QRect r = rect();
265  
266 -#if QT_VERSION < 300
267 +#if QT_VERSION < 0x030000
268          style().drawFocusRect(painter, r, colorGroup());
269  #else
270          style().drawPrimitive(QStyle::PE_FocusRect, painter,
271 --- qwt-4.2.0rc1/src/qwt_arrbtn.cpp~qt2-fix
272 +++ qwt-4.2.0rc1/src/qwt_arrbtn.cpp
273 @@ -58,7 +58,7 @@
274  QRect QwtArrowButton::labelRect() const
275  {
276      QRect r =
277 -#if QT_VERSION < 300
278 +#if QT_VERSION < 0x030000
279          style().buttonRect(rect().x(), rect().y(),
280          rect().width(), rect().height());
281  #else
282 @@ -71,7 +71,7 @@
283      if ( isDown() )
284      {
285          int ph, pv;
286 -#if QT_VERSION < 300
287 +#if QT_VERSION < 0x030000
288          style().getButtonShift(ph, pv);
289  #else
290          ph = style().pixelMetric(
291 @@ -135,7 +135,7 @@
292      }
293      p->restore();
294  
295 -#if QT_VERSION >= 300
296 +#if QT_VERSION >= 0x030000
297      if ( hasFocus() )
298      {
299          const QRect focusRect =  
300 @@ -218,7 +218,7 @@
301      if ( d_arrowType == Qt::UpArrow || d_arrowType == Qt::DownArrow )
302          sz.transpose();
303  
304 -#if QT_VERSION < 300
305 +#if QT_VERSION < 0x030000
306      int bm = style().buttonMargin() - 1;
307      sz += QSize(2 * bm, 2 * bm);
308  #else
309 --- qwt-4.2.0rc1/src/qwt_wheel.cpp~qt2-fix
310 +++ qwt-4.2.0rc1/src/qwt_wheel.cpp
311 @@ -453,7 +453,7 @@
312      {
313          QRect r = rect();
314      
315 -#if QT_VERSION < 300
316 +#if QT_VERSION < 0x030000
317          style().drawFocusRect(painter, r, colorGroup());
318  #else
319          style().drawPrimitive(QStyle::PE_FocusRect, painter,
320 --- qwt-4.2.0rc1/src/qwt_plot_canvas.cpp~qt2-fix
321 +++ qwt-4.2.0rc1/src/qwt_plot_canvas.cpp
322 @@ -195,7 +195,7 @@
323  
324  void QwtPlotCanvas::drawFocusIndicator(QPainter *painter, const QRect &rect)
325  {
326 -#if QT_VERSION < 300
327 +#if QT_VERSION < 0x030000
328          style().drawFocusRect(painter, rect, colorGroup());
329  #else
330          style().drawPrimitive(QStyle::PE_FocusRect, painter,
331 --- qwt-4.2.0rc1/src/qwt_sldbase.cpp~qt2-fix
332 +++ qwt-4.2.0rc1/src/qwt_sldbase.cpp
333 @@ -115,7 +115,7 @@
334  {
335      if ( isReadOnly() )
336      {
337 -#if QT_VERSION >= 300
338 +#if QT_VERSION >= 0x030000
339          e->ignore();
340  #endif
341          return;
342 @@ -166,7 +166,7 @@
343  {
344      if ( isReadOnly() )
345      {
346 -#if QT_VERSION >= 300
347 +#if QT_VERSION >= 0x030000
348          e->ignore();
349  #endif
350          return;
351 @@ -274,7 +274,7 @@
352  {
353      if ( isReadOnly() )
354      {
355 -#if QT_VERSION >= 300
356 +#if QT_VERSION >= 0x030000
357          e->ignore();
358  #endif
359          return;
360 @@ -304,7 +304,7 @@
361  {
362      if ( isReadOnly() )
363      {
364 -#if QT_VERSION >= 300
365 +#if QT_VERSION >= 0x030000
366          e->ignore();
367  #endif
368          return;
369 @@ -341,7 +341,7 @@
370  {
371      if ( isReadOnly() )
372      {
373 -#if QT_VERSION >= 300
374 +#if QT_VERSION >= 0x030000
375          e->ignore();
376  #endif
377          return;
378 @@ -370,7 +370,7 @@
379                  increment = 1;
380              break;
381          default:;
382 -#if QT_VERSION >= 300
383 +#if QT_VERSION >= 0x030000
384              e->ignore();
385  #endif
386      }
387 --- qwt-4.2.0rc1/examples/realtime_plot/scrollbar.cpp~qt2-fix
388 +++ qwt-4.2.0rc1/examples/realtime_plot/scrollbar.cpp
389 @@ -154,7 +154,7 @@
390  int ScrollBar::extent() const
391  {
392      int dim;
393 -#if QT_VERSION >= 300
394 +#if QT_VERSION >= 0x030000
395      dim = style().pixelMetric(QStyle::PM_ScrollBarExtent, this);
396  #else
397      const QSize sz = style().scrollBarExtent();
398 --- qwt-4.2.0rc1/examples/event_filter/colorbar.cpp~qt2-fix
399 +++ qwt-4.2.0rc1/examples/event_filter/colorbar.cpp
400 @@ -48,7 +48,7 @@
401          const QRgb rgb = pm.convertToImage().pixel(e->x(), e->y());
402      
403          emit selected(QColor(rgb));
404 -#if QT_VERSION >= 300
405 +#if QT_VERSION >= 0x030000
406          e->accept();
407  #endif
408      }