X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7ec698211d5d82a009ac80fb354059e9af497508..df97a4ef79613ac2f73a62601a9fa738d79c77a4:/src/os2/iniconf.cpp diff --git a/src/os2/iniconf.cpp b/src/os2/iniconf.cpp index d5730815d0..5b352380e6 100644 --- a/src/os2/iniconf.cpp +++ b/src/os2/iniconf.cpp @@ -12,19 +12,19 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#if wxUSE_CONFIG + #ifndef WX_PRECOMP - #include "wx/string.h" - #include "wx/intl.h" - #include "wx/event.h" - #include "wx/app.h" - #include "wx/utils.h" + #include "wx/dynarray.h" + #include "wx/string.h" + #include "wx/intl.h" + #include "wx/event.h" + #include "wx/app.h" + #include "wx/utils.h" + #include "wx/log.h" #endif //WX_PRECOMP -#include "wx/dynarray.h" -#include "wx/log.h" - #include "wx/config.h" -#if wxUSE_CONFIG #include "wx/os2/iniconf.h" @@ -255,11 +255,11 @@ bool wxIniConfig::IsEmpty() const // GetPrivateProfileString(m_strGroup, NULL, "", // szBuf, WXSIZEOF(szBuf), m_strLocalFilename); - if ( !::IsEmpty(szBuf) ) + if ( !::wxIsEmpty(szBuf) ) return false; // GetProfileString(m_strGroup, NULL, "", szBuf, WXSIZEOF(szBuf)); -// if ( !::IsEmpty(szBuf) ) +// if ( !::wxIsEmpty(szBuf) ) // return false; return true; @@ -281,14 +281,14 @@ bool wxIniConfig::Read(const wxString& szKey, wxString *pstr) const // NB: the lpDefault param to GetPrivateProfileString can't be NULL // GetPrivateProfileString(m_strGroup, strKey, "", // szBuf, WXSIZEOF(szBuf), m_strLocalFilename); - if ( ::IsEmpty((PSZ)szBuf) ) + if ( ::wxIsEmpty((PSZ)szBuf) ) { // now look in win.ini wxString strKey = GetKeyName(path.Name()); // GetProfileString(m_strGroup, strKey, "", szBuf, WXSIZEOF(szBuf)); } - if ( ::IsEmpty((PSZ)szBuf) ) + if ( ::wxIsEmpty((PSZ)szBuf) ) { return false; } @@ -310,14 +310,14 @@ bool wxIniConfig::Read(const wxString& szKey, wxString *pstr, // NB: the lpDefault param to GetPrivateProfileString can't be NULL // GetPrivateProfileString(m_strGroup, strKey, "", // szBuf, WXSIZEOF(szBuf), m_strLocalFilename); - if ( ::IsEmpty((PSZ)szBuf) ) + if ( ::wxIsEmpty((PSZ)szBuf) ) { // now look in win.ini wxString strKey = GetKeyName(path.Name()); // GetProfileString(m_strGroup, strKey, "", szBuf, WXSIZEOF(szBuf)); } - if ( ::IsEmpty((PSZ)szBuf) ) + if ( ::wxIsEmpty((PSZ)szBuf) ) { *pstr = szDefault; return false; @@ -372,7 +372,9 @@ bool wxIniConfig::Write(const wxString& szKey, const wxString& WXUNUSED(szValue) // szValue, m_strLocalFilename) != 0; if ( !bOk ) + { wxLogLastError(wxT("WritePrivateProfileString")); + } return bOk; } @@ -417,7 +419,9 @@ bool wxIniConfig::DeleteEntry(const wxString& szKey, bool bGroupIfEmptyAlso) // NULL, m_strLocalFilename) != 0; if ( !bOk ) + { wxLogLastError(wxT("WritePrivateProfileString")); + } return bOk; } @@ -432,7 +436,9 @@ bool wxIniConfig::DeleteGroup(const wxString& szKey) // NULL, m_strLocalFilename) != 0; if ( !bOk ) + { wxLogLastError(wxT("WritePrivateProfileString")); + } return bOk; }