1. Code::Blocks Source Code Compilers and Links against wxWidgets 2.9.0 with POD Warnings
2. Code::Blocks Source Code Compilers and Links against wxWidgets 2.9.0 with-out POD Warnings
3. Code::Blocks Opens and Closes without crashing using safe-mode option
4. Code::Blocks Opens and Closes without crashing without using safe-mode option
5. Code::Blocks Compiles Itself.
1. Code::Blocks Design Change Patches
2. Code::Blocks Implementation Change Patches
3. wxWidgets 2.9 required POD Warning Fixes Patches
4. wxWidgets 2.9 required design Change Patches
5. wxWidgets 2.9 optional deprecation Change Patches
I've committed a large number of patches to trunk in this regard. I've patched most of the core plugins (will patch today). Now Code::Blocks compiles without warnings. However, Compiler & Code-Completion plugins are creating runtime issues. I'm Investigating them. You can have a look at the patches and let me know if anything differs from your patch. :)
mingw32-make -f makefile.gcc USE_PROPGRID=1 USE_OPENGL=0 USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 CPPFLAGS="-Wmissing-include-dirs"
Patch Fails to work too often to be maintained.
Command, I Used, to build wxWidgets 2.9.0 RC2
Still Testing These Options, but should work.Codemingw32-make -f makefile.gcc USE_PROPGRID=1 USE_OPENGL=0 USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 LDFLAGS="-enable-stdcall-fixup" CXXFLAGS="-fno-strict-aliasing" CPPFLAGS="-Wmissing-include-dirs"
Optional: CPPFLAGS="-Wmissing-include-dirs"
Required: CXXFLAGS="-fno-strict-aliasing"
Not Certain: LDFLAGS="-enable-stdcall-fixup"
Required for wxSmith: USE_PROPGRID=1
warning: cannot pass objects of non-POD type ...
call will abort at runtime
Deleted patch to save space.
Deleted to save space.
Didn't notice that RC2 is out.
I did build wx without the required CXXFLAGS. Will download RC2 later and use it to build C::B.
Tim,
I've already have those patches applied. I didn't commit yesterday as it was quite late night. I'd request you to wrap your patches with wxCHECK_VERSION() so that we don't break existing compatibility with wx-2.8.x.
Edit 1: Some of the patches are already in trunk. I'll commit the rest when Berlios is up.
Thanks for your good work and keep posting patches. :)
Regards,
Biplab
FYI: The wx_str() is the same as c_str() under wxWidgets 2.8 and 2.6.
FYI: The wx_str() is the same as c_str() under wxWidgets 2.8 and 2.6.
But the docs say otherwise. As per the docs, wx_str() is not defined for wx-2.8.x series. Yes, the return value is of same type.
Deleted to save space
At one time, under windows GCC 4.x the wxWidgets would have runtime crashes ifFYI, this was only true for the 4.2 series; it has been fixed as of the 4.3 series.
CXXFLAGS="-fno-strict-aliasing" was not done. It might be fixed in wxWidgets or MinGW GCC 4.x.
@Biplab:
Possible method to add wx_str().
Does the following method meet with your OK?
Index: src/plugins/contrib/ThreadSearch/ThreadSearchView.cpp
===================================================================
--- src/plugins/contrib/ThreadSearch/ThreadSearchView.cpp (revision 5585)
+++ src/plugins/contrib/ThreadSearch/ThreadSearchView.cpp (working copy)
@@ -491,7 +491,11 @@
wxFocusEvent ev(wxEVT_SET_FOCUS);
ev.SetWindow(this);
+ #if wxCHECK_VERSION(2, 9, 0)
+ control->GetEventHandler()->AddPendingEvent(ev);
+ #else
control->AddPendingEvent(ev);
+ #endif
}
}
Index: src/plugins/contrib/dragscroll/dragscroll.cpp
===================================================================
--- src/plugins/contrib/dragscroll/dragscroll.cpp (revision 5585)
+++ src/plugins/contrib/dragscroll/dragscroll.cpp (working copy)
@@ -977,7 +977,11 @@
wheelEvt.SetEventObject(pWindow);
wheelEvt.m_controlDown = true;
wheelEvt.m_wheelRotation = 0;
+ #if wxCHECK_VERSION(2, 9, 0)
+ pWindow->GetEventHandler()->AddPendingEvent(wheelEvt);
+ #else
pWindow->AddPendingEvent(wheelEvt);
+ #endif
}while(0);
// Issue SetFont() for saved font sizes on our monitored windows
@@ -1006,7 +1010,11 @@
wheelEvt.SetEventObject(pWindow);
wheelEvt.m_controlDown = true;
wheelEvt.m_wheelRotation = 0;
+ #if wxCHECK_VERSION(2, 9, 0)
+ pWindow->GetEventHandler()->AddPendingEvent(wheelEvt);
+ #else
pWindow->AddPendingEvent(wheelEvt);
+ #endif
#if defined(LOGGING)
//LOGIT( _T("OnAppStartupDoneInit Issued Wheel Zoom event 0[%p]size[%d]"),pWindow, fontSize);
#endif
@@ -1143,7 +1151,11 @@
wheelEvt.SetEventObject(pWindow);
wheelEvt.m_controlDown = true;
wheelEvt.m_wheelRotation = 0; //set user font
+ #if wxCHECK_VERSION(2, 9, 0)
+ pWindow->GetEventHandler()->AddPendingEvent(wheelEvt);
+ #else
pWindow->AddPendingEvent(wheelEvt);
+ #endif
#if defined(LOGGING)
//LOGIT( _T("OnWindowOpen Issued htmlWindow Zoom event"));
#endif
My Method is to use wxWidgets version of wxPropertyGrid; which will need OK from wxSmith maintainer.
Will submit the wxSmith patch as separate file from rest. And, I am not sure how to do this using wxCHECK_VERSION() so will likely take time to work on some parts of wxSmith patch.
#if wxCHECK_VERSION(2, 9, 0)
#include <wx/propgrid/propgrid.h>
#else
#include "propgrid/propgrid.h"
#endif
As long as the API remain unchanged, this should do. I'll commit rest of your patches tonight. :)
Please go ahead with the patch. No objections to that.Careful!!! This won't easily work. The wxPropgrid of wxWidgets has heavily changed its API. I once tried to port wxSmith but unfortunately this got lost on the way. If you really want to try make sure you *remove* the old propgrid sources from C::B, including the compiled library.
Please go ahead with the patch. No objections to that.Careful!!! This won't easily work. The wxPropgrid of wxWidgets has heavily changed its API. I once tried to port wxSmith but unfortunately this got lost on the way. If you really want to try make sure you *remove* the old propgrid sources from C::B, including the compiled library.
Please go ahead with the patch. No objections to that.Careful!!! This won't easily work. The wxPropgrid of wxWidgets has heavily changed its API. I once tried to port wxSmith but unfortunately this got lost on the way. If you really want to try make sure you *remove* the old propgrid sources from C::B, including the compiled library.
Index: src/plugins/contrib/devpak_plugin/mytar.cpp
===================================================================
--- src/plugins/contrib/devpak_plugin/mytar.cpp (revision 5588)
+++ src/plugins/contrib/devpak_plugin/mytar.cpp (working copy)
@@ -19,7 +19,11 @@
m_SkipBytes(0),
m_Size(0)
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ if (!filename.IsEmpty())
+ #else
if (filename)
+ #endif
Open(filename);
}
Index: src/plugins/contrib/byogames/byosnake.cpp
===================================================================
--- src/plugins/contrib/byogames/byosnake.cpp (revision 5588)
+++ src/plugins/contrib/byogames/byosnake.cpp (working copy)
@@ -300,7 +300,11 @@
DC->SetTextBackground(*wxBLACK);
DC->SetFont(m_Font);
wxString Line1 = wxString::Format(_("Lives: %d Score: %d Length: %d"),m_Lives,m_Score,m_SnakeLen);
+ #if wxCHECK_VERSION(2, 9, 0)
+ wxString Line2 = IsPaused() ? wxString(_("Paused")) : wxString(wxEmptyString);
+ #else
wxString Line2 = IsPaused() ? _("Paused") : wxEmptyString;
+ #endif
wxString Line3 = GetBackToWorkString();
DC->DrawText(Line1,5,5);
int xs, ys;
Index: src/plugins/contrib/profiler/cbprofilerexec.cpp
===================================================================
--- src/plugins/contrib/profiler/cbprofilerexec.cpp (revision 5588)
+++ src/plugins/contrib/profiler/cbprofilerexec.cpp (working copy)
@@ -165,7 +165,7 @@
// Parsing Call Graph
for (n = begin ; n < msg.GetCount(); ++n )
{
- if ((msg[n].IsEmpty())||(msg[n].Find(0x0C) != -1))
+ if ((msg[n].IsEmpty())||(msg[n].Find(wxChar(0x0C)) != -1))
break;
outputCallGraphArea->InsertItem(next,_T(""));
char first_char = msg[n].GetChar(0);
@@ -209,7 +209,7 @@
wxString output_help;
for ( ; n < msg.GetCount(); ++n )
{
- if (msg[n].Find(0x0C) != -1)
+ if (msg[n].Find(wxChar(0x0C)) != -1)
break;
output_help << msg[n] << _T("\n");
progress.Update((100*n)/(msg.GetCount()-1));
@@ -247,7 +247,7 @@
// Parsing Call Graph
for (n = begin ; n < msg.GetCount(); ++n )
{
- if ((msg[n].IsEmpty())||(msg[n].Find(0x0C) != -1))
+ if ((msg[n].IsEmpty())||(msg[n].Find(wxChar(0x0C)) != -1))
break;
long item = outputFlatProfileArea->InsertItem(next,_T(""));
outputFlatProfileArea->SetItemData(item, next);
@@ -312,7 +312,7 @@
// Printing Flat Profile Help
for ( ; n < msg.GetCount(); ++n )
{
- if (msg[n].Find(0x0C) != -1)
+ if (msg[n].Find(wxChar(0x0C)) != -1)
break;
output_help << msg[n] << _T("\n");
progress.Update((100*n)/(msg.GetCount()-1));
Index: src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp
===================================================================
--- src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp (working copy)
@@ -1850,7 +1850,11 @@
#endif
delete filetype;
+ #if wxCHECK_VERSION(2, 9, 0)
+ if ( !open.IsEmpty() )
+ #else
if ( open )
+ #endif
::wxExecute( open, wxEXEC_ASYNC);
}
}
@@ -2154,7 +2158,11 @@
{
SetAssociatedItemID( treeItemID );
wxCommandEvent editEvt( wxEVT_COMMAND_MENU_SELECTED , idMnuEditSnippet);
+ #if wxCHECK_VERSION(2, 9, 0)
+ GetConfig()->GetSnippetsWindow()->GetEventHandler()->AddPendingEvent( editEvt);
+ #else
GetConfig()->GetSnippetsWindow()->AddPendingEvent( editEvt);
+ #endif
}
}
}//if id
Index: src/plugins/contrib/codesnippets/snippetsconfig.cpp
===================================================================
--- src/plugins/contrib/codesnippets/snippetsconfig.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/snippetsconfig.cpp (working copy)
@@ -232,7 +232,11 @@
cfgFile.Write( wxT("SnippetFolder"), SettingsSnippetsFolder ) ;
cfgFile.Write( wxT("ViewSearchBox"), SettingsSearchBox ) ;
cfgFile.Write( wxT("casesensitive"), m_SearchConfig.caseSensitive ) ;
+ #if wxCHECK_VERSION(2, 9, 0)
+ cfgFile.Write( wxT("scope"), int(m_SearchConfig.scope ));
+ #else
cfgFile.Write( wxT("scope"), m_SearchConfig.scope );
+ #endif
cfgFile.Write( wxT("EditorsStayOnTop"),SettingsEditorsStayOnTop );
if ( IsPlugin() )
{ // Write ExternalPersistent for plugin use only
Index: src/plugins/contrib/codesnippets/codesnippetsevent.cpp
===================================================================
--- src/plugins/contrib/codesnippets/codesnippetsevent.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/codesnippetsevent.cpp (working copy)
@@ -95,8 +95,13 @@
// Propagate the event to ThreadSearchFrame
if ( pSearchPath && pCodeSnippetsTreeCtrl)
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ pSearchPath->GetEventHandler()->AddPendingEvent( (wxEvent&)event );
+ pCodeSnippetsTreeCtrl->GetEventHandler()->AddPendingEvent( (wxEvent&)event );
+ #else
pSearchPath->AddPendingEvent( (wxEvent&)event );
pCodeSnippetsTreeCtrl->AddPendingEvent( (wxEvent&)event );
+ #endif
}
else
{
@@ -143,8 +148,13 @@
// Propagate the event to ThreadSearchFrame
if ( pSearchPath && pCodeSnippetsTreeCtrl)
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ pSearchPath->GetEventHandler()->ProcessEvent( (wxEvent&)event );
+ pCodeSnippetsTreeCtrl->GetEventHandler()->ProcessEvent( (wxEvent&)event );
+ #else
pSearchPath->ProcessEvent( (wxEvent&)event );
pCodeSnippetsTreeCtrl->ProcessEvent( (wxEvent&)event );
+ #endif
}
else
{
Index: src/plugins/contrib/codesnippets/editor/seditorcolourset.cpp
===================================================================
--- src/plugins/contrib/codesnippets/editor/seditorcolourset.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/editor/seditorcolourset.cpp (working copy)
@@ -112,7 +112,11 @@
wxString path = ConfigManager::GetFolder(sdDataUser) + _T("/lexers/");
if (dir.Open(path))
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ Manager::Get()->GetLogManager()->Log(F(_("Scanning for lexers in %s..."), path.wx_str()));
+ #else
Manager::Get()->GetLogManager()->Log(F(_("Scanning for lexers in %s..."), path.c_str()));
+ #endif
bool ok = dir.GetFirst(&filename, _T("lexer_*.xml"), wxDIR_FILES);
while(ok)
{
@@ -128,7 +132,11 @@
path = ConfigManager::GetFolder(sdDataGlobal) + _T("/lexers/");
if (dir.Open(path))
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ Manager::Get()->GetLogManager()->Log(F(_("Scanning for lexers in %s..."), path.wx_str()));
+ #else
Manager::Get()->GetLogManager()->Log(F(_("Scanning for lexers in %s..."), path.c_str()));
+ #endif
bool ok = dir.GetFirst(&filename, _T("lexer_*.xml"), wxDIR_FILES);
while(ok)
{
@@ -724,7 +732,11 @@
wxString tmp(_T(' '), keywords.length()); // faster than using Alloc()
const wxChar *src = keywords.c_str();
+ #if wxCHECK_VERSION(2, 9, 0)
+ wxChar *dst = (wxChar *) tmp.wx_str();
+ #else
wxChar *dst = (wxChar *) tmp.c_str();
+ #endif
wxChar c;
size_t len = 0;
Index: src/plugins/contrib/codesnippets/editor/scbeditor.cpp
===================================================================
--- src/plugins/contrib/codesnippets/editor/scbeditor.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/editor/scbeditor.cpp (working copy)
@@ -524,7 +524,11 @@
event.SetY(yArg);
//-wxPostEvent(Manager::Get()->GetAppWindow(), event);
//-Manager::Get()->GetPluginManager()->NotifyPlugins(event);
+ #if wxCHECK_VERSION(2, 9, 0)
+ parent->GetEventHandler()->ProcessEvent(event);
+ #else
parent->ProcessEvent(event);
+ #endif
}
void ScbEditor::DestroySplitView()
Index: src/plugins/contrib/codesnippets/editor/dragscroll.cpp
===================================================================
--- src/plugins/contrib/codesnippets/editor/dragscroll.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/editor/dragscroll.cpp (working copy)
@@ -1056,7 +1056,11 @@
wheelEvt.SetEventObject(pWindow);
wheelEvt.m_controlDown = true;
wheelEvt.m_wheelRotation = 0;
+ #if wxCHECK_VERSION(2, 9, 0)
+ pWindow->GetEventHandler()->AddPendingEvent(wheelEvt);
+ #else
pWindow->AddPendingEvent(wheelEvt);
+ #endif
#if defined(LOGGING)
LOGIT( _T("OnAppStartupDoneInit Issued Wheel Zoom event [%p][%d][%s]size[%d]"),pWindow, pWindow->GetId(), pWindow->GetName().c_str(),fontSize);
#endif
Index: src/plugins/contrib/codesnippets/Search/ThreadSearchView.cpp
===================================================================
--- src/plugins/contrib/codesnippets/Search/ThreadSearchView.cpp (revision 5588)
+++ src/plugins/contrib/codesnippets/Search/ThreadSearchView.cpp (working copy)
@@ -572,7 +572,11 @@
wxFocusEvent ev(wxEVT_SET_FOCUS);
ev.SetWindow(this);
+ #if wxCHECK_VERSION(2, 9, 0)
+ control->GetEventHandler()->AddPendingEvent(ev);
+ #else
control->AddPendingEvent(ev);
+ #endif
}
return;
}//if IsOpen
Index: src/plugins/contrib/source_exporter/wxPdfDocument/src/pdffont.cpp
===================================================================
--- src/plugins/contrib/source_exporter/wxPdfDocument/src/pdffont.cpp (revision 5588)
+++ src/plugins/contrib/source_exporter/wxPdfDocument/src/pdffont.cpp (working copy)
@@ -1054,7 +1054,7 @@
charIter = (*m_gn).find(s[i]);
if (charIter != (*m_gn).end())
{
- t.Append(charIter->second);
+ t.Append(wxChar(charIter->second));
}
else
{
Index: codeblocks-trunk/src/include/wxscintilla/include/wx/wxscintilla.h
===================================================================
--- codeblocks-trunk/src/include/wxscintilla/include/wx/wxscintilla.h (revision 5593)
+++ codeblocks-trunk/src/include/wxscintilla/include/wx/wxscintilla.h (working copy)
@@ -2067,7 +2067,9 @@
//----------------------------------------------------------------------
+#if !wxCHECK_VERSION(2, 9, 0)
typedef long wxIntPtr; // FIXME: back-port from wx29 (svn) to wx289
+#endif
class WXDLLIMPEXP_SCI wxScintilla : public wxControl {
public:
Index: src/plugins/contrib/lib_finder/lib_finder.cpp
===================================================================
--- src/plugins/contrib/lib_finder/lib_finder.cpp (revision 5585)
+++ src/plugins/contrib/lib_finder/lib_finder.cpp (working copy)
@@ -515,7 +515,11 @@
wxURL UrlData(Url);
if ( !UrlData.IsOk() )
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ LogManager::Get()->LogWarning(F(_T("lib_finder: Invalid url '%s'"),Url.wx_str()));
+ #else
LogManager::Get()->LogWarning(F(_T("lib_finder: Invalid url '%s'"),Url.c_str()));
+ #endif
continue;
}
UrlData.SetProxy( ConfigManager::GetProxy() );
@@ -523,7 +527,11 @@
wxInputStream* is = UrlData.GetInputStream();
if ( !is || !is->IsOk() )
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't open stream for '%s'"),Url.wx_str()));
+ #else
LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't open stream for '%s'"),Url.c_str()));
+ #endif
delete is;
continue;
}
@@ -531,7 +539,11 @@
wxFileOutputStream Output(FileName);
if ( !Output.IsOk() )
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't write to file '%s'"),FileName.wx_str()));
+ #else
LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't write to file '%s'"),FileName.c_str()));
+ #endif
delete is;
return false;
}
@@ -542,7 +554,11 @@
return ret;
}
+ #if wxCHECK_VERSION(2, 9, 0)
+ LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't find suitable download url for '%s'"),ShortCode.wx_str()));
+ #else
LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't find suitable download url for '%s'"),ShortCode.c_str()));
+ #endif
return false;
}
Index: src/plugins/contrib/lib_finder/defsdownloaddlg.cpp
===================================================================
--- src/plugins/contrib/lib_finder/defsdownloaddlg.cpp (revision 5585)
+++ src/plugins/contrib/lib_finder/defsdownloaddlg.cpp (working copy)
@@ -112,7 +112,11 @@
wxURL UrlData(Url);
if ( !UrlData.IsOk() )
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ LogManager::Get()->LogWarning(F(_T("lib_finder: Invalid url '%s'"),Url.wx_str()));
+ #else
LogManager::Get()->LogWarning(F(_T("lib_finder: Invalid url '%s'"),Url.c_str()));
+ #endif
continue;
}
UrlData.SetProxy( ConfigManager::GetProxy() );
@@ -120,7 +124,11 @@
std::auto_ptr< wxInputStream > is ( UrlData.GetInputStream() );
if ( !is.get() || !is->IsOk() )
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't open stream for '%s'"),Url.wx_str()));
+ #else
LogManager::Get()->LogWarning(F(_T("lib_finder: Couldn't open stream for '%s'"),Url.c_str()));
+ #endif
continue;
}
@@ -137,7 +145,11 @@
TiXmlDocument doc;
if ( !doc.Parse( (const char*) memory.GetOutputStreamBuffer()->GetBufferStart() ) )
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ LogManager::Get()->LogWarning(F(_T("lib_finder: Invalid XML data in '%s'"),Url.wx_str()));
+ #else
LogManager::Get()->LogWarning(F(_T("lib_finder: Invalid XML data in '%s'"),Url.c_str()));
+ #endif
continue;
}
Index: src/plugins/contrib/envvars/envvars_common.cpp
===================================================================
--- src/plugins/contrib/envvars/envvars_common.cpp (revision 5598)
+++ src/plugins/contrib/envvars/envvars_common.cpp (working copy)
@@ -165,7 +165,11 @@
if (!active_set_cfg.IsEmpty())
active_set = active_set_cfg;
+ #if wxCHECK_VERSION(2, 9, 0)
+ EV_DBGLOG(_T("EnvVars: Obtained '%s' as active envvar set from config."), active_set.wx_str());
+ #else
EV_DBGLOG(_T("EnvVars: Obtained '%s' as active envvar set from config."), active_set.c_str());
+ #endif
return active_set;
}// GetActiveSetName
@@ -213,7 +217,11 @@
#endif
wxArrayString envvars;
+ #if wxCHECK_VERSION(2, 9, 0)
+ EV_DBGLOG(_T("EnvVars: Searching for envvars in path '%s'."), set_path.wx_str());
+ #else
EV_DBGLOG(_T("EnvVars: Searching for envvars in path '%s'."), set_path.c_str());
+ #endif
ConfigManager *cfg = Manager::Get()->GetConfigManager(_T("envvars"));
if (!cfg || set_path.IsEmpty())
@@ -230,7 +238,11 @@
EV_DBGLOG(_T("EnvVars: Warning: empty envvar detected and skipped."));
}
EV_DBGLOG(_T("EnvVars: Read %d/%d envvars in path '%s'."),
+ #if wxCHECK_VERSION(2, 9, 0)
+ envvars.GetCount(), num_envvars, set_path.wx_str());
+ #else
envvars.GetCount(), num_envvars, set_path.c_str());
+ #endif
return envvars;
}// GetEnvvarsBySetPath
@@ -346,9 +358,19 @@
if (!wxUnsetEnv(the_key))
{
Manager::Get()->GetLogManager()->Log(F(
- _("Unsetting environment variable '%s' failed."), the_key.c_str()));
+ _("Unsetting environment variable '%s' failed."),
+ #if wxCHECK_VERSION(2, 9, 0)
+ the_key.wx_str())
+ #else
+ the_key.c_str())
+ #endif
+ );
EV_DBGLOG(_T("EnvVars: Unsetting environment variable '%s' failed."),
+ #if wxCHECK_VERSION(2, 9, 0)
+ the_key.wx_str());
+ #else
the_key.c_str());
+ #endif
return false;
}
@@ -386,7 +408,11 @@
if (value_set.Contains(recursion))
{
EV_DBGLOG(_T("EnvVars: Setting environment variable '%s' failed "
+ #if wxCHECK_VERSION(2, 9, 0)
+ "due to unsresolvable recursion."), the_key.wx_str());
+ #else
"due to unsresolvable recursion."), the_key.c_str());
+ #endif
if (lstEnvVars && (sel>=0))
lstEnvVars->Check(sel, false); // Unset to visualise it's NOT set
return false;
@@ -396,10 +422,18 @@
}
Manager::Get()->GetMacrosManager()->ReplaceMacros(the_value);
+ #if wxCHECK_VERSION(2, 9, 0)
+ EV_DBGLOG(_T("EnvVars: Trying to set environment variable '%s' to value '%s'..."), the_key.wx_str(), the_value.wx_str());
+ #else
EV_DBGLOG(_T("EnvVars: Trying to set environment variable '%s' to value '%s'..."), the_key.c_str(), the_value.c_str());
+ #endif
if (!wxSetEnv(the_key, the_value))
{
+ #if wxCHECK_VERSION(2, 9, 0)
+ EV_DBGLOG(_T("EnvVars: Setting environment variable '%s' failed."), the_key.wx_str());
+ #else
EV_DBGLOG(_T("EnvVars: Setting environment variable '%s' failed."), the_key.c_str());
+ #endif
if (lstEnvVars && (sel>=0))
lstEnvVars->Check(sel, false); // Unset to visualise it's NOT set
return false;
@@ -470,14 +504,22 @@
if (!even_if_active && set_to_apply.IsSameAs(last_set_applied))
{
EV_DBGLOG(_T("EnvVars: Set '%s' will not be applied (already active)."),
+ #if wxCHECK_VERSION(2, 9, 0)
+ set_to_apply.wx_str());
+ #else
set_to_apply.c_str());
+ #endif
return;
}
// Show currently activated set in debug log (for reference)
wxString set_path = nsEnvVars::GetSetPathByName(set_to_apply);
EV_DBGLOG(_T("EnvVars: Active envvar set is '%s', config path '%s'."),
+ #if wxCHECK_VERSION(2, 9, 0)
+ set_to_apply.wx_str(), set_path.wx_str());
+ #else
set_to_apply.c_str(), set_path.c_str());
+ #endif
// Read and apply all envvars from currently active set in config
wxArrayString vars = nsEnvVars::GetEnvvarsBySetPath(set_path);
@@ -490,8 +532,14 @@
if (nsEnvVars::EnvvarArrayApply(var_array))
envvars_applied++;
else
+ {
EV_DBGLOG(_T("EnvVars: Invalid envvar in '%s' at position #%d."),
+ #if wxCHECK_VERSION(2, 9, 0)
+ set_path.wx_str(), i);
+ #else
set_path.c_str(), i);
+ #endif
+ }
}// for
if (envvars_total>0)
@@ -522,7 +570,11 @@
// Show currently activated set in debug log (for reference)
wxString set_path = nsEnvVars::GetSetPathByName(set_to_discard);
EV_DBGLOG(_T("EnvVars: Active envvar set is '%s', config path '%s'."),
+ #if wxCHECK_VERSION(2, 9, 0)
+ set_to_discard.wx_str(), set_path.wx_str());
+ #else
set_to_discard.c_str(), set_path.c_str());
+ #endif
// Read and apply all envvars from currently active set in config
wxArrayString vars = nsEnvVars::GetEnvvarsBySetPath(set_path);
@@ -540,8 +592,14 @@
envvars_discarded++;
}
else
+ {
EV_DBGLOG(_T("EnvVars: Invalid envvar in '%s' at position #%d."),
+ #if wxCHECK_VERSION(2, 9, 0)
+ set_path.wx_str(), i);
+ #else
set_path.c_str(), i);
+ #endif
+ }
}// for
if (envvars_total>0)
Patch needed for lib_finderFor this patch I receive:
Patch needed for envvarsApplied in trunk. I've taken that one because I am testing a new version of this plugin currently. Thanks!
Attached patch to message for lib_finder
Index: src/plugins/contrib/wxSmith/wxwidgets/wxsnewwindowdlg.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/wxsnewwindowdlg.cpp (revision 5658)
+++ src/plugins/contrib/wxSmith/wxwidgets/wxsnewwindowdlg.cpp (working copy)
@@ -48,7 +48,7 @@
{
for ( size_t i=FileName.Length(); i-->0; )
{
- switch ( FileName[i] )
+ switch ( int(FileName[i]) )
{
case _T('/'):
case _T('\\'):
@@ -63,7 +63,7 @@
{
for ( size_t i=FileName.Length(); i-->0; )
{
- switch ( FileName[i] )
+ switch ( int(FileName[i]) )
{
case _T('/'):
case _T('\\'):
Index: src/plugins/contrib/wxSmith/wxwidgets/wxsitemres.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/wxsitemres.cpp (revision 5658)
+++ src/plugins/contrib/wxSmith/wxwidgets/wxsitemres.cpp (working copy)
@@ -39,10 +39,10 @@
_T("#include \"$(Include)\"\n")
_T("\n")
_T("$(InternalHeadersPch)")
- + wxsCodeMarks::Beg(wxsCPP,_T("InternalHeaders"),_T("$(ClassName)")) + _T("\n") +
+ + wxsCodeMarks::Beg(wxsCPP,_T("InternalHeaders"),_T("$(ClassName)")) + _T("\n")
+ wxsCodeMarks::End(wxsCPP) + _T("\n")
_T("\n")
- + wxsCodeMarks::Beg(wxsCPP,_T("IdInit"),_T("$(ClassName)")) + _T("\n") +
+ + wxsCodeMarks::Beg(wxsCPP,_T("IdInit"),_T("$(ClassName)")) + _T("\n")
+ wxsCodeMarks::End(wxsCPP) + _T("\n")
_T("\n")
_T("BEGIN_EVENT_TABLE($(ClassName),$(BaseClassName))\n")