From 35f6a1e3ad8914c4c90bbf465feea145dadb1fd5 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 14 Feb 2012 21:14:06 -0600 Subject: [PATCH] Update various qt function definitions and static methods for tqt3 --- libs/qt-x11-free/files/0005-qpixmap_mitshm.patch | 12 ++++++------ libs/qt-x11-free/files/0076-fix-qprocess.diff | 2 +- libs/qt-x11-free/files/q_export-visibility.diff | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libs/qt-x11-free/files/0005-qpixmap_mitshm.patch b/libs/qt-x11-free/files/0005-qpixmap_mitshm.patch index 4131fdd..dc19392 100644 --- a/libs/qt-x11-free/files/0005-qpixmap_mitshm.patch +++ b/libs/qt-x11-free/files/0005-qpixmap_mitshm.patch @@ -239,7 +239,7 @@ obsoletes KPixmapIO. xi = XGetImage( x11Display(), hd, 0, 0, w, h, AllPlanes, mono ? XYPixmap : ZPixmap ); + } - Q_CHECK_PTR( xi ); + TQ_CHECK_PTR( xi ); if (!xi) return image; // null image @@ -640,15 +754,31 @@ QImage QPixmap::convertToImage() const @@ -350,19 +350,19 @@ obsoletes KPixmapIO. + else +#endif xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 ); -- Q_CHECK_PTR( xi ); +- TQ_CHECK_PTR( xi ); if (!xi) return false; + if( newbits == NULL ) newbits = (uchar *)malloc( xi->bytes_per_line*h ); - Q_CHECK_PTR( newbits ); + TQ_CHECK_PTR( newbits ); if ( !newbits ) // no memory @@ -1323,6 +1489,7 @@ bool QPixmap::convertFromImage( const QI } newbits = (uchar *)malloc( nbytes ); // copy image into newbits + newbits_size = nbytes; - Q_CHECK_PTR( newbits ); + TQ_CHECK_PTR( newbits ); if ( !newbits ) // no memory return FALSE; @@ -1440,11 +1607,18 @@ bool QPixmap::convertFromImage( const QI @@ -381,7 +381,7 @@ obsoletes KPixmapIO. int p2inc = xi->bytes_per_line/sizeof(ushort); ushort *newerbits = (ushort *)malloc( xi->bytes_per_line * h ); + newbits_size = xi->bytes_per_line * h; - Q_CHECK_PTR( newerbits ); + TQ_CHECK_PTR( newerbits ); if ( !newerbits ) // no memory return FALSE; @@ -1462,6 +1636,14 @@ bool QPixmap::convertFromImage( const QI @@ -449,7 +449,7 @@ obsoletes KPixmapIO. + if( axi->data==NULL ) { // the data is deleted by qSafeXDestroyImage axi->data = (char *) malloc(h * axi->bytes_per_line); - Q_CHECK_PTR( axi->data ); + TQ_CHECK_PTR( axi->data ); + } char *aptr = axi->data; diff --git a/libs/qt-x11-free/files/0076-fix-qprocess.diff b/libs/qt-x11-free/files/0076-fix-qprocess.diff index 3b5c132..00cc3ff 100644 --- a/libs/qt-x11-free/files/0076-fix-qprocess.diff +++ b/libs/qt-x11-free/files/0076-fix-qprocess.diff @@ -13,7 +13,7 @@ Fixes a regression in QProgress::writeToStdin() { QByteArray tmp = buf.local8Bit(); - tmp.resize( tmp.size() - 1 ); // drop the implicit \0 -+ tmp.resize( qstrlen( tmp.data() ) ); ++ tmp.resize( tqstrlen( tmp.data() ) ); writeToStdin( tmp ); } diff --git a/libs/qt-x11-free/files/q_export-visibility.diff b/libs/qt-x11-free/files/q_export-visibility.diff index a9830dd..422eb87 100644 --- a/libs/qt-x11-free/files/q_export-visibility.diff +++ b/libs/qt-x11-free/files/q_export-visibility.diff @@ -54,7 +54,7 @@ Index: src/tools/qglobal.h +++ work/qt-x11-free-3.3.8/src/tools/qglobal.h (working copy) @@ -865,6 +865,10 @@ # define Q_TEMPLATE_EXTERN - # undef Q_DISABLE_COPY /* avoid unresolved externals */ + # undef TQ_DISABLE_COPY /* avoid unresolved externals */ # endif +#elif defined(Q_CC_GNU) && __GNUC__ - 0 >= 4 +# define Q_EXPORT __attribute__((visibility("default")))