Update various qt function definitions and static methods for tqt3

master
Timothy Pearson 13 years ago
parent ff8e25721e
commit 35f6a1e3ad

@ -239,7 +239,7 @@ obsoletes KPixmapIO.
xi = XGetImage( x11Display(), hd, 0, 0, w, h, AllPlanes, xi = XGetImage( x11Display(), hd, 0, 0, w, h, AllPlanes,
mono ? XYPixmap : ZPixmap ); mono ? XYPixmap : ZPixmap );
+ } + }
Q_CHECK_PTR( xi ); TQ_CHECK_PTR( xi );
if (!xi) if (!xi)
return image; // null image return image; // null image
@@ -640,15 +754,31 @@ QImage QPixmap::convertToImage() const @@ -640,15 +754,31 @@ QImage QPixmap::convertToImage() const
@ -350,19 +350,19 @@ obsoletes KPixmapIO.
+ else + else
+#endif +#endif
xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 ); xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 );
- Q_CHECK_PTR( xi ); - TQ_CHECK_PTR( xi );
if (!xi) if (!xi)
return false; return false;
+ if( newbits == NULL ) + if( newbits == NULL )
newbits = (uchar *)malloc( xi->bytes_per_line*h ); newbits = (uchar *)malloc( xi->bytes_per_line*h );
Q_CHECK_PTR( newbits ); TQ_CHECK_PTR( newbits );
if ( !newbits ) // no memory if ( !newbits ) // no memory
@@ -1323,6 +1489,7 @@ bool QPixmap::convertFromImage( const QI @@ -1323,6 +1489,7 @@ bool QPixmap::convertFromImage( const QI
} }
newbits = (uchar *)malloc( nbytes ); // copy image into newbits newbits = (uchar *)malloc( nbytes ); // copy image into newbits
+ newbits_size = nbytes; + newbits_size = nbytes;
Q_CHECK_PTR( newbits ); TQ_CHECK_PTR( newbits );
if ( !newbits ) // no memory if ( !newbits ) // no memory
return FALSE; return FALSE;
@@ -1440,11 +1607,18 @@ bool QPixmap::convertFromImage( const QI @@ -1440,11 +1607,18 @@ bool QPixmap::convertFromImage( const QI
@ -381,7 +381,7 @@ obsoletes KPixmapIO.
int p2inc = xi->bytes_per_line/sizeof(ushort); int p2inc = xi->bytes_per_line/sizeof(ushort);
ushort *newerbits = (ushort *)malloc( xi->bytes_per_line * h ); ushort *newerbits = (ushort *)malloc( xi->bytes_per_line * h );
+ newbits_size = xi->bytes_per_line * h; + newbits_size = xi->bytes_per_line * h;
Q_CHECK_PTR( newerbits ); TQ_CHECK_PTR( newerbits );
if ( !newerbits ) // no memory if ( !newerbits ) // no memory
return FALSE; return FALSE;
@@ -1462,6 +1636,14 @@ bool QPixmap::convertFromImage( const QI @@ -1462,6 +1636,14 @@ bool QPixmap::convertFromImage( const QI
@ -449,7 +449,7 @@ obsoletes KPixmapIO.
+ if( axi->data==NULL ) { + if( axi->data==NULL ) {
// the data is deleted by qSafeXDestroyImage // the data is deleted by qSafeXDestroyImage
axi->data = (char *) malloc(h * axi->bytes_per_line); axi->data = (char *) malloc(h * axi->bytes_per_line);
Q_CHECK_PTR( axi->data ); TQ_CHECK_PTR( axi->data );
+ } + }
char *aptr = axi->data; char *aptr = axi->data;

@ -13,7 +13,7 @@ Fixes a regression in QProgress::writeToStdin()
{ {
QByteArray tmp = buf.local8Bit(); QByteArray tmp = buf.local8Bit();
- tmp.resize( tmp.size() - 1 ); // drop the implicit \0 - tmp.resize( tmp.size() - 1 ); // drop the implicit \0
+ tmp.resize( qstrlen( tmp.data() ) ); + tmp.resize( tqstrlen( tmp.data() ) );
writeToStdin( tmp ); writeToStdin( tmp );
} }

@ -54,7 +54,7 @@ Index: src/tools/qglobal.h
+++ work/qt-x11-free-3.3.8/src/tools/qglobal.h (working copy) +++ work/qt-x11-free-3.3.8/src/tools/qglobal.h (working copy)
@@ -865,6 +865,10 @@ @@ -865,6 +865,10 @@
# define Q_TEMPLATE_EXTERN # define Q_TEMPLATE_EXTERN
# undef Q_DISABLE_COPY /* avoid unresolved externals */ # undef TQ_DISABLE_COPY /* avoid unresolved externals */
# endif # endif
+#elif defined(Q_CC_GNU) && __GNUC__ - 0 >= 4 +#elif defined(Q_CC_GNU) && __GNUC__ - 0 >= 4
+# define Q_EXPORT __attribute__((visibility("default"))) +# define Q_EXPORT __attribute__((visibility("default")))

Loading…
Cancel
Save