diff options
Diffstat (limited to 'support/dktools/Dk4FcsApp.cpt')
-rw-r--r-- | support/dktools/Dk4FcsApp.cpt | 48 |
1 files changed, 45 insertions, 3 deletions
diff --git a/support/dktools/Dk4FcsApp.cpt b/support/dktools/Dk4FcsApp.cpt index a1fc98f48e..03fc73b380 100644 --- a/support/dktools/Dk4FcsApp.cpt +++ b/support/dktools/Dk4FcsApp.cpt @@ -2,7 +2,7 @@ copyright owner = Dirk Krause copyright year = 2015-xxxx -license = bsd +SPDX-License-Identifier: BSD-3-Clause @@ -55,12 +55,18 @@ class Dk4FcsApp : public wxApp /** Declaration as the wxApp object. */ + +#if wxCHECK_VERSION(3,0,0) +wxDECLARE_APP(Dk4FcsApp); +#else DECLARE_APP(Dk4FcsApp) +#endif %% module +#include "dk4conf.h" #include "wxdkfcs.h" @@ -201,7 +207,7 @@ aaaaa # 9 10 11 12 13 14 15 16: List of libraries used. # DK tools, wxWidgets, OpenSSL, libpng, libjpeg, libtiff, zlib. -http://dktools.sourceforge.net +http://sourceforge.net/p/dktools/wiki/Home/ http://www.wxwidgets.org http://www.openssl.org http://www.libpng.org/pub/png/libpng.html @@ -257,7 +263,12 @@ $!end /** Implementation of the wxApp functionality. */ + +#if wxCHECK_VERSION(3,0,0) +wxIMPLEMENT_APP(Dk4FcsApp); +#else IMPLEMENT_APP(Dk4FcsApp) +#endif bool @@ -299,6 +310,14 @@ Dk4FcsApp::OnInit() ShowMemoryErrorMessage(); goto finished; } + + /* CLANG STATIC ANALYSIS COMPLAINS ABOUT A POTENTIAL MEMORY LEAK, + because phPng is set using the new operator but there is no + matching delete. + The handler object is deleted from within wxImage destructor, + there is no memory leak. + */ + phXpm = new wxXPMHandler(); if (NULL != phXpm) { wxImage::AddHandler(phXpm); @@ -306,6 +325,14 @@ Dk4FcsApp::OnInit() ShowMemoryErrorMessage(); goto finished; } + + /* CLANG STATIC ANALYSIS COMPLAINS ABOUT A POTENTIAL MEMORY LEAK, + because phXpm is set using the new operator but there is no + matching delete. + The handler object is deleted from within wxImage destructor, + there is no memory leak. + */ + phIco = new wxICOHandler(); if (NULL != phIco) { wxImage::AddHandler(phIco); @@ -313,6 +340,14 @@ Dk4FcsApp::OnInit() ShowMemoryErrorMessage(); goto finished; } + + /* CLANG STATIC ANALYSIS COMPLAINS ABOUT A POTENTIAL MEMORY LEAK, + because phIco is set using the new operator but there is no + matching delete. + The handler object is deleted from within wxImage destructor, + there is no memory leak. + */ + $? ". image handlers ok" phArchiveFs = new wxArchiveFSHandler(); if (NULL != phArchiveFs) { @@ -322,6 +357,13 @@ Dk4FcsApp::OnInit() goto finished; } + /* CLANG STATIC ANALYSIS COMPLAINS ABOUT A POTENTIAL MEMORY LEAK, + because phArchiveFs is set using the new operator but there is no + matching delete. + The handler object is deleted from within wxFileSystem destructor, + there is no memory leak. + */ + pHc = new Dk4WxHelpController(); if (NULL == pHc) { ShowMemoryErrorMessage(); @@ -354,8 +396,8 @@ Dk4FcsApp::OnInit() } $? ". frame created" - frame->Show(); frame->RestorePosition(); + frame->Show(); $? ". frame shown" back = true; |