diff options
Diffstat (limited to 'src/kernel/qpixmap_x11.cpp')
-rw-r--r-- | src/kernel/qpixmap_x11.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/kernel/qpixmap_x11.cpp b/src/kernel/qpixmap_x11.cpp index 28d2926..f471af8 100644 --- a/src/kernel/qpixmap_x11.cpp +++ b/src/kernel/qpixmap_x11.cpp @@ -290,7 +290,7 @@ extern const uchar *qt_get_bitflip_array(); // defined in qimage.cpp static uchar *flip_bits( const uchar *bits, int len ) { - register const uchar *p = bits; + const uchar *p = bits; const uchar *end = p + len; uchar *newdata = new uchar[len]; uchar *b = newdata; @@ -958,7 +958,7 @@ QImage QPixmap::convertToImage() const image.setColor( 0, qRgb(255,255,255) ); image.setColor( 1, qRgb(0,0,0) ); } else if ( !trucol ) { // pixmap with colormap - register uchar *p; + uchar *p; uchar *end; uchar use[256]; // pixel-in-use table uchar pix[256]; // pixel translation table @@ -1243,8 +1243,8 @@ bool QPixmap::convertFromImage( const QImage &img, int conversion_flags ) bool trucol = (visual->c_class == TrueColor || visual->c_class == DirectColor); int nbytes = image.numBytes(); uchar *newbits= 0; - int newbits_size = 0; #ifdef QT_MITSHM_CONVERSIONS + int newbits_size = 0; bool mitshm_ximage = false; XShmSegmentInfo shminfo; #endif @@ -1615,7 +1615,9 @@ bool QPixmap::convertFromImage( const QImage &img, int conversion_flags ) } newbits = (uchar *)malloc( nbytes ); // copy image into newbits +#ifdef QT_MITSHM_CONVERSIONS newbits_size = nbytes; +#endif Q_CHECK_PTR( newbits ); if ( !newbits ) // no memory return FALSE; @@ -1744,7 +1746,9 @@ bool QPixmap::convertFromImage( const QImage &img, int conversion_flags ) ushort *p2; int p2inc = xi->bytes_per_line/sizeof(ushort); ushort *newerbits = (ushort *)malloc( xi->bytes_per_line * h ); +#ifdef QT_MITSHM_CONVERSIONS newbits_size = xi->bytes_per_line * h; +#endif Q_CHECK_PTR( newerbits ); if ( !newerbits ) // no memory return FALSE; |