Do common wxApp cleanup before port-specific part in all ports

Some ports called wxAppBase::CleanUp() before performing port-specific
cleanup, while some did it afterwards. The former seems preferable, as
some actions performed in wxAppBase (such as showing log dialogs) may
not work any more after the port-specific cleanup is done, while there
should be no dependencies in the other direction.

So standardize on calling wxAppBase version first in all ports, which
also makes them more consistent with each other.
This commit is contained in:
Vadim Zeitlin 2024-01-30 21:07:29 +01:00
parent c965c87290
commit a7aea0febf
3 changed files with 7 additions and 6 deletions

View file

@ -568,6 +568,8 @@ bool wxApp::Initialize(int& argc_, wxChar **argv_)
void wxApp::CleanUp() void wxApp::CleanUp()
{ {
wxAppBase::CleanUp();
if (m_idleSourceId != 0) if (m_idleSourceId != 0)
g_source_remove(m_idleSourceId); g_source_remove(m_idleSourceId);
@ -577,8 +579,6 @@ void wxApp::CleanUp()
g_type_class_unref(gt); g_type_class_unref(gt);
gdk_threads_leave(); gdk_threads_leave();
wxAppBase::CleanUp();
} }
void wxApp::WakeUpIdle() void wxApp::WakeUpIdle()

View file

@ -358,13 +358,14 @@ int wxApp::OnRun()
void wxApp::CleanUp() void wxApp::CleanUp()
{ {
wxMacAutoreleasePool autoreleasepool; wxMacAutoreleasePool autoreleasepool;
wxAppBase::CleanUp();
#if wxUSE_TOOLTIPS #if wxUSE_TOOLTIPS
wxToolTip::RemoveToolTips() ; wxToolTip::RemoveToolTips() ;
#endif #endif
DoCleanUp(); DoCleanUp();
wxAppBase::CleanUp();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View file

@ -198,10 +198,10 @@ bool wxApp::Initialize(int& argC, wxChar **argV)
void wxApp::CleanUp() void wxApp::CleanUp()
{ {
wxAppBase::CleanUp();
wxDELETE(wxWidgetHashTable); wxDELETE(wxWidgetHashTable);
wxDELETE(wxClientWidgetHashTable); wxDELETE(wxClientWidgetHashTable);
wxAppBase::CleanUp();
} }
wxApp::wxApp() wxApp::wxApp()