TQFileDialog: cleanup pixmaps before destroying TQApplication

Otherwise it results in small memmory leakage on exit of Xlib data.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit fb0d62eec8)
r14.1.x
Alexander Golubev 2 months ago committed by Michele Calgaro
parent 32f9784928
commit b000ed6ad6
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -492,6 +492,10 @@ static TQString toRootIfNotExists( const TQString &path )
return drives->getFirst()->filePath();
}
static void tqt_do_qfd_cleanup_pixmap() {
qfd_cleanup_pixmap.clear();
}
static bool isDirectoryMode( int m )
{
return m == TQFileDialog::Directory || m == TQFileDialog::DirectoryOnly;
@ -608,6 +612,10 @@ static void makeVariables() {
qfd_cleanup_pixmap.add( &goBackIcon );
fifteenTransparentPixels = new TQPixmap( closedFolderIcon->width(), 1 );
qfd_cleanup_pixmap.add( &fifteenTransparentPixels );
// On X11 the pixmaps should be cleanup before we disconnect from the server
tqAddPostRoutine(&tqt_do_qfd_cleanup_pixmap);
TQBitmap m( fifteenTransparentPixels->width(), 1 );
m.fill( TQt::color0 );
fifteenTransparentPixels->setMask( m );

Loading…
Cancel
Save