Work around a compiler error message - hopefully

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7076 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2016-09-11 12:27:35 +00:00
parent 698dee5e32
commit b1b0f26026

View File

@ -220,14 +220,14 @@ QSettings * MultiSettings::settings ()
QVariant MultiSettings::common_value (QString const& key, QVariant const& default_value) const
{
QVariant value;
QSettings& mutable_settings {const_cast<QSettings&> (m_->settings_)};
auto const& current_group = mutable_settings.group ();
if (current_group.size ()) mutable_settings.endGroup ();
QSettings * mutable_settings {const_cast<QSettings *> (&m_->settings_)};
auto const& current_group = mutable_settings->group ();
if (current_group.size ()) mutable_settings->endGroup ();
{
SettingsGroup alternatives {&mutable_settings, multi_settings_root_group};
value = mutable_settings.value (key, default_value);
SettingsGroup alternatives {mutable_settings, multi_settings_root_group};
value = mutable_settings->value (key, default_value);
}
if (current_group.size ()) mutable_settings.beginGroup (current_group);
if (current_group.size ()) mutable_settings->beginGroup (current_group);
return value;
}