summaryrefslogtreecommitdiff
path: root/support/dktools/Dk4FcsApp.cpt
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-09-20 03:03:26 +0000
committerNorbert Preining <norbert@preining.info>2020-09-20 03:03:26 +0000
commit1f457376b478257b88d4a857f5ec1b6155442dd7 (patch)
tree2a06a60551dea362cf8cb0cb0ba66c78608717c4 /support/dktools/Dk4FcsApp.cpt
parentac690ca29ad5bf8a5203a65fd6252f7b564f4727 (diff)
CTAN sync 202009200303
Diffstat (limited to 'support/dktools/Dk4FcsApp.cpt')
-rw-r--r--support/dktools/Dk4FcsApp.cpt48
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;