Fix MIT_SHM related condition

Prevent to build MIT_SHM related codes for !QT_MITSHM condition.

Signed-off-by: OBATA Akio <obache@wizdas.com>
(cherry picked from commit ac50013578)
r14.0.x
OBATA Akio 4 years ago committed by Slávek Banko
parent f7aac9f723
commit 8e2cfe9a0a
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -1243,8 +1243,8 @@ bool TQPixmap::convertFromImage( const TQImage &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 TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
}
newbits = (uchar *)malloc( nbytes ); // copy image into newbits
#ifdef QT_MITSHM_CONVERSIONS
newbits_size = nbytes;
#endif
TQ_CHECK_PTR( newbits );
if ( !newbits ) // no memory
return FALSE;
@ -1744,7 +1746,9 @@ bool TQPixmap::convertFromImage( const TQImage &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
TQ_CHECK_PTR( newerbits );
if ( !newerbits ) // no memory
return FALSE;

Loading…
Cancel
Save