diff options
author | Alexander Golubev <fatzer2@gmail.com> | 2024-03-19 06:56:14 +0300 |
---|---|---|
committer | TDE Gitea <gitea@mirror.git.trinitydesktop.org> | 2024-03-22 01:11:47 +0000 |
commit | fb0d62eec811ab2d4d73550e455944cecbe7e091 (patch) | |
tree | 723146a4cfe0fc716e245e5d771bed8cd0866f3f /src | |
parent | ee63474739f0170485d50711944a430dad98cc91 (diff) | |
download | tqt3-fb0d62eec811ab2d4d73550e455944cecbe7e091.tar.gz tqt3-fb0d62eec811ab2d4d73550e455944cecbe7e091.zip |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/dialogs/qfiledialog.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dialogs/qfiledialog.cpp b/src/dialogs/qfiledialog.cpp index b3dc48e73..864139e12 100644 --- a/src/dialogs/qfiledialog.cpp +++ b/src/dialogs/qfiledialog.cpp @@ -491,6 +491,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; @@ -607,6 +611,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 ); |