spurious error messages from wxRegKey::HasValue() suppressed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -214,8 +214,10 @@ wxRegKey::wxRegKey(const wxRegKey& keyParent, const wxString& strKey)
|
|||||||
: m_strKey(keyParent.m_strKey)
|
: m_strKey(keyParent.m_strKey)
|
||||||
{
|
{
|
||||||
// combine our name with parent's to get the full name
|
// combine our name with parent's to get the full name
|
||||||
if ( !m_strKey.IsEmpty() && strKey[0] != REG_SEPARATOR )
|
if ( !m_strKey.IsEmpty() &&
|
||||||
m_strKey += REG_SEPARATOR;
|
(strKey.IsEmpty() || strKey[0] != REG_SEPARATOR) ) {
|
||||||
|
m_strKey += REG_SEPARATOR;
|
||||||
|
}
|
||||||
|
|
||||||
m_strKey += strKey;
|
m_strKey += strKey;
|
||||||
RemoveTrailingSeparator(m_strKey);
|
RemoveTrailingSeparator(m_strKey);
|
||||||
@@ -495,6 +497,9 @@ bool wxRegKey::DeleteValue(const char *szValue)
|
|||||||
// return TRUE if value exists
|
// return TRUE if value exists
|
||||||
bool wxRegKey::HasValue(const char *szValue) const
|
bool wxRegKey::HasValue(const char *szValue) const
|
||||||
{
|
{
|
||||||
|
// this function should be silent, so suppress possible messages from Open()
|
||||||
|
wxLogNull nolog;
|
||||||
|
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
if ( CONST_CAST Open() ) {
|
if ( CONST_CAST Open() ) {
|
||||||
return RegQueryValueEx(m_hKey, szValue, RESERVED,
|
return RegQueryValueEx(m_hKey, szValue, RESERVED,
|
||||||
|
Reference in New Issue
Block a user