diff options
author | Alexander Golubev <fatzer2@gmail.com> | 2024-03-19 05:56:36 +0300 |
---|---|---|
committer | Alexander Golubev <fatzer2@gmail.com> | 2024-03-29 13:47:58 +0300 |
commit | 676000853b614b9063e38568e94833683bf05ccd (patch) | |
tree | b54f928f010d01a04a0ba5cdf79b516a527aebc8 /src/kernel/qapplication.cpp | |
parent | fb0d62eec811ab2d4d73550e455944cecbe7e091 (diff) | |
download | tqt3-676000853b614b9063e38568e94833683bf05ccd.tar.gz tqt3-676000853b614b9063e38568e94833683bf05ccd.zip |
Improve TQFont-related cleanup
Improve TQFont cleanup making sure that all instances of TQFont are
destroyed before TQApplication (or specifically before disconnect from
X11). This gets reed of several valgrind complains about leaks deep
inside fontconfig.
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
Diffstat (limited to 'src/kernel/qapplication.cpp')
-rw-r--r-- | src/kernel/qapplication.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp index e8658cdab..403757e52 100644 --- a/src/kernel/qapplication.cpp +++ b/src/kernel/qapplication.cpp @@ -1203,6 +1203,12 @@ TQApplication::~TQApplication() tqt_desktopWidget = 0; is_app_closing = TRUE; + // Due to hacks to speadup TQStyle engine (see git hash 523c1fd99) TQObjects now contain a + // reference to TQStyleControlElementData object which among other contain TQFont memebers. + // But for a proper cleanup all fonts should be destroyed before disconnecting from X11 (in + // tqt_cleanup()). So we will have to cleanup up the data explicitly. + cleanupControlElementData(); + #ifndef TQT_NO_CLIPBOARD delete tqt_clipboard; tqt_clipboard = 0; |