X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/72957aa3ba10d6988560fd3f1f53b3be3387880e..ff79234425d7521719ca857b85f14d67701f30fc:/src/msw/regconf.cpp?ds=inline diff --git a/src/msw/regconf.cpp b/src/msw/regconf.cpp index af4dc5ab68..39a13a4bc4 100644 --- a/src/msw/regconf.cpp +++ b/src/msw/regconf.cpp @@ -148,8 +148,8 @@ wxRegConfig::wxRegConfig(const wxString& appName, const wxString& vendorName, if ( bDoUseGlobal ) { wxLogNull nolog; - m_keyGlobalRoot.Open(); - m_keyGlobal.Open(); + m_keyGlobalRoot.Open(wxRegKey::Read); + m_keyGlobal.Open(wxRegKey::Read); } } @@ -392,7 +392,7 @@ void wxRegConfig::SetPath(const wxString& strPath) m_keyGlobal.SetName(m_keyGlobalRoot, strRegPath); wxLogNull nolog; - m_keyGlobal.Open(); + m_keyGlobal.Open(wxRegKey::Read); } } @@ -688,7 +688,8 @@ bool wxRegConfig::RenameGroup(const wxString& oldName, const wxString& newName) // ---------------------------------------------------------------------------- // deleting // ---------------------------------------------------------------------------- -bool wxRegConfig::DeleteEntry(const wxString& value, bool WXUNUSED(bGroupIfEmptyAlso)) + +bool wxRegConfig::DeleteEntry(const wxString& value, bool bGroupIfEmptyAlso) { wxConfigPathChanger path(this, value); @@ -696,7 +697,7 @@ bool wxRegConfig::DeleteEntry(const wxString& value, bool WXUNUSED(bGroupIfEmpty if ( !m_keyLocal.DeleteValue(path.Name()) ) return FALSE; - if ( m_keyLocal.IsEmpty() ) { + if ( bGroupIfEmptyAlso && m_keyLocal.IsEmpty() ) { wxString strKey = GetPath().AfterLast(wxCONFIG_PATH_SEPARATOR); SetPath(_T("..")); // changes m_keyLocal return LocalKey().DeleteKey(strKey);