X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d546eba94e77831c41e3370484a41181517bd611..28b4db7f890258e83fa0a57ea85c72585e48b756:/src/common/appbase.cpp?ds=inline diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index 96eb54acc1..216d9b8647 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -33,15 +33,13 @@ #endif // wxUSE_LOG #endif //WX_PRECOMP +#include "wx/utils.h" #include "wx/apptrait.h" #include "wx/cmdline.h" #include "wx/confbase.h" #if wxUSE_FILENAME #include "wx/filename.h" #endif // wxUSE_FILENAME -#if wxUSE_FONTMAP - #include "wx/fontmap.h" -#endif // wxUSE_FONTMAP #include "wx/msgout.h" #include "wx/tokenzr.h" @@ -53,6 +51,10 @@ #include "wx/msw/private.h" // includes windows.h for MessageBox() #endif +#if wxUSE_FONTMAP + #include "wx/fontmap.h" +#endif // wxUSE_FONTMAP + #if defined(__WXMAC__) // VZ: MacTypes.h is enough under Mac OS X (where I could test it) but // I don't know which headers are needed under earlier systems so @@ -208,7 +210,7 @@ void wxAppConsole::Exit() wxAppTraits *wxAppConsole::CreateTraits() { - return wxAppTraits::CreateConsole(); + return new wxConsoleAppTraits; } wxAppTraits *wxAppConsole::GetTraits() @@ -261,11 +263,11 @@ void wxAppConsole::ProcessPendingEvents() } // iterate until the list becomes empty - wxNode *node = wxPendingEvents->GetFirst(); + wxList::compatibility_iterator node = wxPendingEvents->GetFirst(); while (node) { wxEvtHandler *handler = (wxEvtHandler *)node->GetData(); - delete node; + wxPendingEvents->Erase(node); // In ProcessPendingEvents(), new handlers might be add // and we can safely leave the critical section here. @@ -546,11 +548,6 @@ bool wxAppTraitsBase::ShowAssertDialog(const wxString& msg) #endif // __WXDEBUG__ -wxAppTraits *wxAppTraitsBase::CreateConsole() -{ - return new wxConsoleAppTraits; -} - // ============================================================================ // global functions implementation // ============================================================================ @@ -758,7 +755,7 @@ void ShowAssertDialog(const wxChar *szFile, if ( !s_bNoAsserts ) { // send it to the normal log destination - wxLogDebug(_T("%s"), msg); + wxLogDebug(_T("%s"), msg.c_str()); if ( traits ) {