Commit a6b92801 authored by hjk's avatar hjk

debugger: attempty to work around old ini files containing @Invalid() entries

parent 63587ff7
......@@ -243,8 +243,13 @@ void SavedAction::readSettings(QSettings *settings)
if (m_settingsGroup.isEmpty() || m_settingsKey.isEmpty())
return;
settings->beginGroup(m_settingsGroup);
setValue(settings->value(m_settingsKey, m_defaultValue), false);
//qDebug() << "READING: " << m_settingsKey << " -> " << m_value;
QVariant var = settings->value(m_settingsKey, m_defaultValue);
// work around old ini files containing @Invalid() entries
if (isCheckable() && !var.isValid())
var = false;
setValue(var);
//qDebug() << "READING: " << var.isValid() << m_settingsKey << " -> " << m_value
// << " (default: " << m_defaultValue << ")" << var;
settings->endGroup();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment