#endif // wxUSE_LOG
#endif //WX_PRECOMP
+#include "wx/utils.h"
#include "wx/apptrait.h"
#include "wx/cmdline.h"
#include "wx/confbase.h"
this->argc = argc;
this->argv = argv;
- if ( m_appName.empty() )
+ if ( m_appName.empty() && argv )
{
// the application name is, by default, the name of its executable file
#if wxUSE_FILENAME
wxAppTraits *wxAppConsole::CreateTraits()
{
- return wxAppTraits::CreateConsole();
+ return new wxConsoleAppTraits;
}
wxAppTraits *wxAppConsole::GetTraits()
}
// 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.
#endif // __WXDEBUG__
-wxAppTraits *wxAppTraitsBase::CreateConsole()
-{
- return new wxConsoleAppTraits;
-}
-
// ============================================================================
// global functions implementation
// ============================================================================
if ( !s_bNoAsserts )
{
// send it to the normal log destination
- wxLogDebug(_T("%s"), msg);
+ wxLogDebug(_T("%s"), msg.c_str());
if ( traits )
{