summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOBATA Akio <obache@wizdas.com>2020-08-06 18:29:56 +0900
committerSlávek Banko <slavek.banko@axis.cz>2021-02-02 01:54:41 +0100
commitf013b070a1486c81cc02ddbe3e6375dd23d984cb (patch)
tree65dbd984fc616a28d9b10e97c75cef28199f360d
parent0fe2b27c819f536e7f678c8595d81120fab3c6ed (diff)
downloadqt3-f013b070a1486c81cc02ddbe3e6375dd23d984cb.tar.gz
qt3-f013b070a1486c81cc02ddbe3e6375dd23d984cb.zip
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 82d40179adeb02d3012e10c45ffde20e0e60fcd1)
-rw-r--r--src/kernel/qpixmap_x11.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/kernel/qpixmap_x11.cpp b/src/kernel/qpixmap_x11.cpp
index 79464de..f471af8 100644
--- a/src/kernel/qpixmap_x11.cpp
+++ b/src/kernel/qpixmap_x11.cpp
@@ -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;