CHOP-962: Emit unrecognized-var log message only for Global settings.

LLControlGroup::loadFromFile() can of course detect which LLControlGroup
instance it's loading. We only want to log unrecognized settings variables in
LLControlGroup "Global". Settings for "Don't show me this again" notifications
are in group "Warnings".
master
Nat Goodspeed 2013-07-22 22:06:48 -04:00
parent fd14c250b8
commit 35bc91fc5d
1 changed files with 14 additions and 2 deletions

View File

@ -959,8 +959,20 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v
// LLControlVariable persistent because the 'persistent' flag
// is not itself persisted!
control->forcePersist();
LL_INFOS("LLControlGroup") << "preserving unrecognized user settings variable "
<< name << LL_ENDL;
// We want to mention unrecognized user settings variables
// (e.g. from a newer version of the viewer) in the log. But
// we also arrive here for Boolean variables generated by
// the notifications subsystem when the user checks "Don't
// show me this again." These aren't declared in settings.xml;
// they're actually named for the notification they suppress.
// We don't want to mention those. Apologies, this is a bit of
// a hack: we happen to know that user settings go into an
// LLControlGroup whose name is "Global".
if (getKey() == "Global")
{
LL_INFOS("LLControlGroup") << "preserving unrecognized " << getKey()
<< " settings variable " << name << LL_ENDL;
}
}
}