Skip to content

Commit

Permalink
Allow using obsolete config values while upgrading
Browse files Browse the repository at this point in the history
- Fix for 'option x is not a valid boolean value' warning
  • Loading branch information
doxygen committed Aug 24, 2021
1 parent 41dc478 commit bc45027
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/configimpl.l
Expand Up @@ -232,16 +232,19 @@ static bool convertStringToBool(const QCString &str,bool &isValid)

void ConfigBool::convertStrToVal()
{
bool isValid=false;
bool b = convertStringToBool(m_valueString,isValid);
if (isValid)
if (!m_valueString.stripWhiteSpace().isEmpty())
{
m_value=b;
}
else
{
config_warn("argument '%s' for option %s is not a valid boolean value\n"
"Using the default: %s!\n",qPrint(m_valueString),qPrint(m_name),m_value?"YES":"NO");
bool isValid=false;
bool b = convertStringToBool(m_valueString,isValid);
if (isValid)
{
m_value=b;
}
else
{
config_warn("argument '%s' for option %s is not a valid boolean value\n"
"Using the default: %s!\n",qPrint(m_valueString),qPrint(m_name),m_value?"YES":"NO");
}
}
}

Expand Down

0 comments on commit bc45027

Please sign in to comment.