CHOP-962: Make LLControlVariable::setPersist() accept only enum.
Initial change made LLControlVariable::mPersist an enum, but retained bool/BOOL public API. setPersist(true) set one value, setPersist(false) set another, forcePersist() set the third. Per code review, expose enum to public, make setPersist() (and LLControlVariable constructor, and LLControlGroup:: declareControl(), and all the LLControlGroup::declareMumble() methods, and all the unit-test dummy declareMumble() method bodies) accept that enum. Remove forcePersist(). Fix calls to LLControlGroup::declareMumble() accordingly. Also rename PERSIST_YES to PERSIST_NONDFT, also per code review.master
parent
35bc91fc5d
commit
d2386652f8
|
|
@ -356,8 +356,8 @@ std::string LLFloaterReg::declareRectControl(const std::string& name)
|
|||
{
|
||||
std::string controlname = getRectControlName(name);
|
||||
LLFloater::getControlGroup()->declareRect(controlname, LLRect(),
|
||||
llformat("Window Size for %s", name.c_str()),
|
||||
TRUE);
|
||||
llformat("Window Size for %s", name.c_str()),
|
||||
LLControlVariable::PERSIST_NONDFT);
|
||||
return controlname;
|
||||
}
|
||||
|
||||
|
|
@ -367,7 +367,7 @@ std::string LLFloaterReg::declarePosXControl(const std::string& name)
|
|||
LLFloater::getControlGroup()->declareF32(controlname,
|
||||
10.f,
|
||||
llformat("Window X Position for %s", name.c_str()),
|
||||
TRUE);
|
||||
LLControlVariable::PERSIST_NONDFT);
|
||||
return controlname;
|
||||
}
|
||||
|
||||
|
|
@ -377,7 +377,7 @@ std::string LLFloaterReg::declarePosYControl(const std::string& name)
|
|||
LLFloater::getControlGroup()->declareF32(controlname,
|
||||
10.f,
|
||||
llformat("Window Y Position for %s", name.c_str()),
|
||||
TRUE);
|
||||
LLControlVariable::PERSIST_NONDFT);
|
||||
|
||||
return controlname;
|
||||
}
|
||||
|
|
@ -404,7 +404,7 @@ std::string LLFloaterReg::declareVisibilityControl(const std::string& name)
|
|||
std::string controlname = getVisibilityControlName(name);
|
||||
LLFloater::getControlGroup()->declareBOOL(controlname, FALSE,
|
||||
llformat("Window Visibility for %s", name.c_str()),
|
||||
TRUE);
|
||||
LLControlVariable::PERSIST_NONDFT);
|
||||
return controlname;
|
||||
}
|
||||
|
||||
|
|
@ -414,7 +414,7 @@ std::string LLFloaterReg::declareDockStateControl(const std::string& name)
|
|||
std::string controlname = getDockStateControlName(name);
|
||||
LLFloater::getControlGroup()->declareBOOL(controlname, TRUE,
|
||||
llformat("Window Docking state for %s", name.c_str()),
|
||||
TRUE);
|
||||
LLControlVariable::PERSIST_NONDFT);
|
||||
return controlname;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotifica
|
|||
}
|
||||
else
|
||||
{
|
||||
LLUI::sSettingGroups["ignores"]->declareBOOL(name, show_notification, "Show notification with this name", TRUE);
|
||||
LLUI::sSettingGroups["ignores"]->declareBOOL(name, show_notification, "Show notification with this name", LLControlVariable::PERSIST_NONDFT);
|
||||
mIgnoreSetting = LLUI::sSettingGroups["ignores"]->getControl(name);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,14 +132,14 @@ bool LLControlVariable::llsd_compare(const LLSD& a, const LLSD & b)
|
|||
|
||||
LLControlVariable::LLControlVariable(const std::string& name, eControlType type,
|
||||
LLSD initial, const std::string& comment,
|
||||
bool persist, bool hidefromsettingseditor)
|
||||
ePersist persist, bool hidefromsettingseditor)
|
||||
: mName(name),
|
||||
mComment(comment),
|
||||
mType(type),
|
||||
mPersist(persist? PERSIST_YES : PERSIST_NO),
|
||||
mPersist(persist),
|
||||
mHideFromSettingsEditor(hidefromsettingseditor)
|
||||
{
|
||||
if (persist && mComment.empty())
|
||||
if ((persist != PERSIST_NO) && mComment.empty())
|
||||
{
|
||||
llerrs << "Must supply a comment for control " << mName << llendl;
|
||||
}
|
||||
|
|
@ -260,14 +260,9 @@ void LLControlVariable::setDefaultValue(const LLSD& value)
|
|||
}
|
||||
}
|
||||
|
||||
void LLControlVariable::setPersist(bool state)
|
||||
void LLControlVariable::setPersist(ePersist state)
|
||||
{
|
||||
mPersist = state? PERSIST_YES : PERSIST_NO;
|
||||
}
|
||||
|
||||
void LLControlVariable::forcePersist()
|
||||
{
|
||||
mPersist = PERSIST_ALWAYS;
|
||||
mPersist = state;
|
||||
}
|
||||
|
||||
void LLControlVariable::setHiddenFromSettingsEditor(bool hide)
|
||||
|
|
@ -307,13 +302,13 @@ bool LLControlVariable::shouldSave(bool nondefault_only)
|
|||
if (mPersist == PERSIST_ALWAYS)
|
||||
return true;
|
||||
|
||||
// PERSIST_YES
|
||||
// PERSIST_NONDFT
|
||||
// If caller doesn't need us to filter, just save.
|
||||
if (! nondefault_only)
|
||||
return true;
|
||||
|
||||
// PERSIST_YES, but caller only wants us to save this variable if its
|
||||
// value differs from default.
|
||||
// PERSIST_NONDFT: caller only wants us to save this variable if its value
|
||||
// differs from default.
|
||||
if (isDefault()) // never been altered
|
||||
return false;
|
||||
|
||||
|
|
@ -379,12 +374,12 @@ std::string LLControlGroup::typeEnumToString(eControlType typeenum)
|
|||
return mTypeString[typeenum];
|
||||
}
|
||||
|
||||
LLControlVariable* LLControlGroup::declareControl(const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, BOOL persist, BOOL hidefromsettingseditor)
|
||||
LLControlVariable* LLControlGroup::declareControl(const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, LLControlVariable::ePersist persist, BOOL hidefromsettingseditor)
|
||||
{
|
||||
LLControlVariable* existing_control = getControl(name);
|
||||
if (existing_control)
|
||||
{
|
||||
if (persist && existing_control->isType(type))
|
||||
if ((persist != LLControlVariable::PERSIST_NO) && existing_control->isType(type))
|
||||
{
|
||||
if (!existing_control->llsd_compare(existing_control->getDefault(), initial_val))
|
||||
{
|
||||
|
|
@ -407,57 +402,57 @@ LLControlVariable* LLControlGroup::declareControl(const std::string& name, eCont
|
|||
return control;
|
||||
}
|
||||
|
||||
LLControlVariable* LLControlGroup::declareU32(const std::string& name, const U32 initial_val, const std::string& comment, BOOL persist)
|
||||
LLControlVariable* LLControlGroup::declareU32(const std::string& name, const U32 initial_val, const std::string& comment, LLControlVariable::ePersist persist)
|
||||
{
|
||||
return declareControl(name, TYPE_U32, (LLSD::Integer) initial_val, comment, persist);
|
||||
}
|
||||
|
||||
LLControlVariable* LLControlGroup::declareS32(const std::string& name, const S32 initial_val, const std::string& comment, BOOL persist)
|
||||
LLControlVariable* LLControlGroup::declareS32(const std::string& name, const S32 initial_val, const std::string& comment, LLControlVariable::ePersist persist)
|
||||
{
|
||||
return declareControl(name, TYPE_S32, initial_val, comment, persist);
|
||||
}
|
||||
|
||||
LLControlVariable* LLControlGroup::declareF32(const std::string& name, const F32 initial_val, const std::string& comment, BOOL persist)
|
||||
LLControlVariable* LLControlGroup::declareF32(const std::string& name, const F32 initial_val, const std::string& comment, LLControlVariable::ePersist persist)
|
||||
{
|
||||
return declareControl(name, TYPE_F32, initial_val, comment, persist);
|
||||
}
|
||||
|
||||
LLControlVariable* LLControlGroup::declareBOOL(const std::string& name, const BOOL initial_val, const std::string& comment, BOOL persist)
|
||||
LLControlVariable* LLControlGroup::declareBOOL(const std::string& name, const BOOL initial_val, const std::string& comment, LLControlVariable::ePersist persist)
|
||||
{
|
||||
return declareControl(name, TYPE_BOOLEAN, initial_val, comment, persist);
|
||||
}
|
||||
|
||||
LLControlVariable* LLControlGroup::declareString(const std::string& name, const std::string& initial_val, const std::string& comment, BOOL persist)
|
||||
LLControlVariable* LLControlGroup::declareString(const std::string& name, const std::string& initial_val, const std::string& comment, LLControlVariable::ePersist persist)
|
||||
{
|
||||
return declareControl(name, TYPE_STRING, initial_val, comment, persist);
|
||||
}
|
||||
|
||||
LLControlVariable* LLControlGroup::declareVec3(const std::string& name, const LLVector3 &initial_val, const std::string& comment, BOOL persist)
|
||||
LLControlVariable* LLControlGroup::declareVec3(const std::string& name, const LLVector3 &initial_val, const std::string& comment, LLControlVariable::ePersist persist)
|
||||
{
|
||||
return declareControl(name, TYPE_VEC3, initial_val.getValue(), comment, persist);
|
||||
}
|
||||
|
||||
LLControlVariable* LLControlGroup::declareVec3d(const std::string& name, const LLVector3d &initial_val, const std::string& comment, BOOL persist)
|
||||
LLControlVariable* LLControlGroup::declareVec3d(const std::string& name, const LLVector3d &initial_val, const std::string& comment, LLControlVariable::ePersist persist)
|
||||
{
|
||||
return declareControl(name, TYPE_VEC3D, initial_val.getValue(), comment, persist);
|
||||
}
|
||||
|
||||
LLControlVariable* LLControlGroup::declareRect(const std::string& name, const LLRect &initial_val, const std::string& comment, BOOL persist)
|
||||
LLControlVariable* LLControlGroup::declareRect(const std::string& name, const LLRect &initial_val, const std::string& comment, LLControlVariable::ePersist persist)
|
||||
{
|
||||
return declareControl(name, TYPE_RECT, initial_val.getValue(), comment, persist);
|
||||
}
|
||||
|
||||
LLControlVariable* LLControlGroup::declareColor4(const std::string& name, const LLColor4 &initial_val, const std::string& comment, BOOL persist )
|
||||
LLControlVariable* LLControlGroup::declareColor4(const std::string& name, const LLColor4 &initial_val, const std::string& comment, LLControlVariable::ePersist persist )
|
||||
{
|
||||
return declareControl(name, TYPE_COL4, initial_val.getValue(), comment, persist);
|
||||
}
|
||||
|
||||
LLControlVariable* LLControlGroup::declareColor3(const std::string& name, const LLColor3 &initial_val, const std::string& comment, BOOL persist )
|
||||
LLControlVariable* LLControlGroup::declareColor3(const std::string& name, const LLColor3 &initial_val, const std::string& comment, LLControlVariable::ePersist persist )
|
||||
{
|
||||
return declareControl(name, TYPE_COL3, initial_val.getValue(), comment, persist);
|
||||
}
|
||||
|
||||
LLControlVariable* LLControlGroup::declareLLSD(const std::string& name, const LLSD &initial_val, const std::string& comment, BOOL persist )
|
||||
LLControlVariable* LLControlGroup::declareLLSD(const std::string& name, const LLSD &initial_val, const std::string& comment, LLControlVariable::ePersist persist )
|
||||
{
|
||||
return declareControl(name, TYPE_LLSD, initial_val, comment, persist);
|
||||
}
|
||||
|
|
@ -688,11 +683,11 @@ U32 LLControlGroup::loadFromFileLegacy(const std::string& filename, BOOL require
|
|||
switch(declare_as)
|
||||
{
|
||||
case TYPE_COL4:
|
||||
declareColor4(name, LLColor4::white, LLStringUtil::null, NO_PERSIST);
|
||||
declareColor4(name, LLColor4::white, LLStringUtil::null, LLControlVariable::PERSIST_NO);
|
||||
break;
|
||||
case TYPE_STRING:
|
||||
default:
|
||||
declareString(name, LLStringUtil::null, LLStringUtil::null, NO_PERSIST);
|
||||
declareString(name, LLStringUtil::null, LLStringUtil::null, LLControlVariable::PERSIST_NO);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -877,13 +872,14 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v
|
|||
|
||||
for(LLSD::map_const_iterator itr = settings.beginMap(); itr != settings.endMap(); ++itr)
|
||||
{
|
||||
bool persist = true;
|
||||
LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT;
|
||||
std::string const & name = itr->first;
|
||||
LLSD const & control_map = itr->second;
|
||||
|
||||
if(control_map.has("Persist"))
|
||||
{
|
||||
persist = control_map["Persist"].asInteger();
|
||||
persist = control_map["Persist"].asInteger()?
|
||||
LLControlVariable::PERSIST_NONDFT : LLControlVariable::PERSIST_NO;
|
||||
}
|
||||
|
||||
// Sometimes we want to use the settings system to provide cheap persistence, but we
|
||||
|
|
@ -939,13 +935,6 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v
|
|||
// the initial set of default settings files (set_default_values)
|
||||
// -- or we're loading user settings last saved by a viewer that
|
||||
// supports a superset of the variables we know.
|
||||
LLControlVariable* control = declareControl(name,
|
||||
typeStringToEnum(control_map["Type"].asString()),
|
||||
control_map["Value"],
|
||||
control_map["Comment"].asString(),
|
||||
persist,
|
||||
hidefromsettingseditor
|
||||
);
|
||||
// CHOP-962: if we're loading an unrecognized user setting, make
|
||||
// sure we save it later. If you try an experimental viewer, tweak
|
||||
// a new setting, briefly revert to an old viewer, then return to
|
||||
|
|
@ -953,12 +942,12 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v
|
|||
// setting you changed.
|
||||
if (! set_default_values)
|
||||
{
|
||||
// Using forcePersist() insists that saveToFile() (which calls
|
||||
// Using PERSIST_ALWAYS insists that saveToFile() (which calls
|
||||
// LLControlVariable::shouldSave()) must save this control
|
||||
// variable regardless of its value. We can safely set this
|
||||
// LLControlVariable persistent because the 'persistent' flag
|
||||
// is not itself persisted!
|
||||
control->forcePersist();
|
||||
persist = LLControlVariable::PERSIST_ALWAYS;
|
||||
// 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
|
||||
|
|
@ -974,6 +963,14 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v
|
|||
<< " settings variable " << name << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
declareControl(name,
|
||||
typeStringToEnum(control_map["Type"].asString()),
|
||||
control_map["Value"],
|
||||
control_map["Comment"].asString(),
|
||||
persist,
|
||||
hidefromsettingseditor
|
||||
);
|
||||
}
|
||||
|
||||
++validitems;
|
||||
|
|
|
|||
|
|
@ -72,8 +72,6 @@ class LLVector3d;
|
|||
class LLColor4;
|
||||
class LLColor3;
|
||||
|
||||
const BOOL NO_PERSIST = FALSE;
|
||||
|
||||
typedef enum e_control_type
|
||||
{
|
||||
TYPE_U32 = 0,
|
||||
|
|
@ -100,17 +98,18 @@ public:
|
|||
typedef boost::signals2::signal<bool(LLControlVariable* control, const LLSD&), boost_boolean_combiner> validate_signal_t;
|
||||
typedef boost::signals2::signal<void(LLControlVariable* control, const LLSD&, const LLSD&)> commit_signal_t;
|
||||
|
||||
private:
|
||||
enum
|
||||
enum ePersist
|
||||
{
|
||||
PERSIST_NO, // don't save this var
|
||||
PERSIST_YES, // save this var if differs from default
|
||||
PERSIST_NONDFT, // save this var if differs from default
|
||||
PERSIST_ALWAYS // save this var even if has default value
|
||||
} mPersist;
|
||||
};
|
||||
|
||||
private:
|
||||
std::string mName;
|
||||
std::string mComment;
|
||||
eControlType mType;
|
||||
ePersist mPersist;
|
||||
bool mHideFromSettingsEditor;
|
||||
std::vector<LLSD> mValues;
|
||||
|
||||
|
|
@ -120,7 +119,7 @@ private:
|
|||
public:
|
||||
LLControlVariable(const std::string& name, eControlType type,
|
||||
LLSD initial, const std::string& comment,
|
||||
bool persist = true, bool hidefromsettingseditor = false);
|
||||
ePersist persist = PERSIST_NONDFT, bool hidefromsettingseditor = false);
|
||||
|
||||
virtual ~LLControlVariable();
|
||||
|
||||
|
|
@ -148,8 +147,7 @@ public:
|
|||
void set(const LLSD& val) { setValue(val); }
|
||||
void setValue(const LLSD& value, bool saved_value = TRUE);
|
||||
void setDefaultValue(const LLSD& value);
|
||||
void setPersist(bool state); // persist or not depending on value
|
||||
void forcePersist(); // always persist regardless of value
|
||||
void setPersist(ePersist);
|
||||
void setHiddenFromSettingsEditor(bool hide);
|
||||
void setComment(const std::string& comment);
|
||||
|
||||
|
|
@ -215,18 +213,18 @@ public:
|
|||
};
|
||||
void applyToAll(ApplyFunctor* func);
|
||||
|
||||
LLControlVariable* declareControl(const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, BOOL persist, BOOL hidefromsettingseditor = FALSE);
|
||||
LLControlVariable* declareU32(const std::string& name, U32 initial_val, const std::string& comment, BOOL persist = TRUE);
|
||||
LLControlVariable* declareS32(const std::string& name, S32 initial_val, const std::string& comment, BOOL persist = TRUE);
|
||||
LLControlVariable* declareF32(const std::string& name, F32 initial_val, const std::string& comment, BOOL persist = TRUE);
|
||||
LLControlVariable* declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, BOOL persist = TRUE);
|
||||
LLControlVariable* declareString(const std::string& name, const std::string &initial_val, const std::string& comment, BOOL persist = TRUE);
|
||||
LLControlVariable* declareVec3(const std::string& name, const LLVector3 &initial_val,const std::string& comment, BOOL persist = TRUE);
|
||||
LLControlVariable* declareVec3d(const std::string& name, const LLVector3d &initial_val, const std::string& comment, BOOL persist = TRUE);
|
||||
LLControlVariable* declareRect(const std::string& name, const LLRect &initial_val, const std::string& comment, BOOL persist = TRUE);
|
||||
LLControlVariable* declareColor4(const std::string& name, const LLColor4 &initial_val, const std::string& comment, BOOL persist = TRUE);
|
||||
LLControlVariable* declareColor3(const std::string& name, const LLColor3 &initial_val, const std::string& comment, BOOL persist = TRUE);
|
||||
LLControlVariable* declareLLSD(const std::string& name, const LLSD &initial_val, const std::string& comment, BOOL persist = TRUE);
|
||||
LLControlVariable* declareControl(const std::string& name, eControlType type, const LLSD initial_val, const std::string& comment, LLControlVariable::ePersist persist, BOOL hidefromsettingseditor = FALSE);
|
||||
LLControlVariable* declareU32(const std::string& name, U32 initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
|
||||
LLControlVariable* declareS32(const std::string& name, S32 initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
|
||||
LLControlVariable* declareF32(const std::string& name, F32 initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
|
||||
LLControlVariable* declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
|
||||
LLControlVariable* declareString(const std::string& name, const std::string &initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
|
||||
LLControlVariable* declareVec3(const std::string& name, const LLVector3 &initial_val,const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
|
||||
LLControlVariable* declareVec3d(const std::string& name, const LLVector3d &initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
|
||||
LLControlVariable* declareRect(const std::string& name, const LLRect &initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
|
||||
LLControlVariable* declareColor4(const std::string& name, const LLColor4 &initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
|
||||
LLControlVariable* declareColor3(const std::string& name, const LLColor3 &initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
|
||||
LLControlVariable* declareLLSD(const std::string& name, const LLSD &initial_val, const std::string& comment, LLControlVariable::ePersist persist = LLControlVariable::PERSIST_NONDFT);
|
||||
|
||||
std::string getString(const std::string& name);
|
||||
std::string getText(const std::string& name);
|
||||
|
|
@ -375,7 +373,7 @@ private:
|
|||
init_value = convert_to_llsd(default_value);
|
||||
if(type < TYPE_COUNT)
|
||||
{
|
||||
group.declareControl(name, type, init_value, comment, FALSE);
|
||||
group.declareControl(name, type, init_value, comment, LLControlVariable::PERSIST_NO);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ void LLAgent::init()
|
|||
{
|
||||
mMoveTimer.start();
|
||||
|
||||
gSavedSettings.declareBOOL("SlowMotionAnimation", FALSE, "Declared in code", FALSE);
|
||||
gSavedSettings.declareBOOL("SlowMotionAnimation", FALSE, "Declared in code", LLControlVariable::PERSIST_NO);
|
||||
gSavedSettings.getControl("SlowMotionAnimation")->getSignal()->connect(boost::bind(&handleSlowMotionAnimation, _2));
|
||||
|
||||
// *Note: this is where LLViewerCamera::getInstance() used to be constructed.
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ BOOL LLFloaterIMNearbyChat::postBuild()
|
|||
setTitle(LLTrans::getString("NearbyChatTitle"));
|
||||
|
||||
// obsolete, but may be needed for backward compatibility?
|
||||
gSavedSettings.declareS32("nearbychat_showicons_and_names", 2, "NearByChat header settings", true);
|
||||
gSavedSettings.declareS32("nearbychat_showicons_and_names", 2, "NearByChat header settings", LLControlVariable::PERSIST_NONDFT);
|
||||
|
||||
if (gSavedPerAccountSettings.getBOOL("LogShowHistory"))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ LLControlGroup::~LLControlGroup()
|
|||
}
|
||||
|
||||
// Implementation of just the LLControlGroup methods we requre
|
||||
LLControlVariable* LLControlGroup::declareU32(const std::string& name, U32 initial_val, const std::string& comment, BOOL persist)
|
||||
LLControlVariable* LLControlGroup::declareU32(const std::string& name, U32 initial_val, const std::string& comment, LLControlVariable::ePersist persist)
|
||||
{
|
||||
test_preferred_maturity = initial_val;
|
||||
return NULL;
|
||||
|
|
@ -80,7 +80,7 @@ namespace tut
|
|||
void agentaccess_object_t::test<1>()
|
||||
{
|
||||
LLControlGroup cgr("test");
|
||||
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
|
||||
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", LLControlVariable::PERSIST_NO);
|
||||
LLAgentAccess aa(cgr);
|
||||
|
||||
cgr.setU32("PreferredMaturity", SIM_ACCESS_PG);
|
||||
|
|
@ -109,7 +109,7 @@ namespace tut
|
|||
void agentaccess_object_t::test<2>()
|
||||
{
|
||||
LLControlGroup cgr("test");
|
||||
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
|
||||
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", LLControlVariable::PERSIST_NO);
|
||||
LLAgentAccess aa(cgr);
|
||||
|
||||
// make sure default is PG
|
||||
|
|
@ -157,7 +157,7 @@ namespace tut
|
|||
void agentaccess_object_t::test<3>()
|
||||
{
|
||||
LLControlGroup cgr("test");
|
||||
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
|
||||
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", LLControlVariable::PERSIST_NO);
|
||||
LLAgentAccess aa(cgr);
|
||||
|
||||
#ifndef HACKED_GODLIKE_VIEWER
|
||||
|
|
@ -195,7 +195,7 @@ namespace tut
|
|||
void agentaccess_object_t::test<4>()
|
||||
{
|
||||
LLControlGroup cgr("test");
|
||||
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
|
||||
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", LLControlVariable::PERSIST_NO);
|
||||
LLAgentAccess aa(cgr);
|
||||
|
||||
#ifndef HACKED_GODLIKE_VIEWER
|
||||
|
|
@ -272,7 +272,7 @@ namespace tut
|
|||
void agentaccess_object_t::test<5>()
|
||||
{
|
||||
LLControlGroup cgr("test");
|
||||
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", FALSE);
|
||||
cgr.declareU32("PreferredMaturity", SIM_ACCESS_PG, "declared_for_test", LLControlVariable::PERSIST_NO);
|
||||
LLAgentAccess aa(cgr);
|
||||
|
||||
cgr.setU32("PreferredMaturity", SIM_ACCESS_ADULT);
|
||||
|
|
|
|||
|
|
@ -175,8 +175,8 @@ F32 LLControlGroup::getF32(const std::string& name) { return 0.0f; }
|
|||
U32 LLControlGroup::saveToFile(const std::string& filename, BOOL nondefault_only) { return 1; }
|
||||
void LLControlGroup::setString(const std::string& name, const std::string& val) {}
|
||||
std::string LLControlGroup::getString(const std::string& name) { return "test_string"; }
|
||||
LLControlVariable* LLControlGroup::declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, BOOL persist) { return NULL; }
|
||||
LLControlVariable* LLControlGroup::declareString(const std::string& name, const std::string &initial_val, const std::string& comment, BOOL persist) { return NULL; }
|
||||
LLControlVariable* LLControlGroup::declareBOOL(const std::string& name, BOOL initial_val, const std::string& comment, LLControlVariable::ePersist persist) { return NULL; }
|
||||
LLControlVariable* LLControlGroup::declareString(const std::string& name, const std::string &initial_val, const std::string& comment, LLControlVariable::ePersist persist) { return NULL; }
|
||||
|
||||
#include "lluicolortable.h"
|
||||
void LLUIColorTable::saveUserSettings(void)const {}
|
||||
|
|
@ -344,13 +344,13 @@ namespace tut
|
|||
gTOSReplyPump = 0; // clear the callback.
|
||||
|
||||
|
||||
gSavedSettings.declareBOOL("NoInventoryLibrary", FALSE, "", FALSE);
|
||||
gSavedSettings.declareBOOL("ConnectAsGod", FALSE, "", FALSE);
|
||||
gSavedSettings.declareBOOL("UseDebugMenus", FALSE, "", FALSE);
|
||||
gSavedSettings.declareBOOL("ForceMandatoryUpdate", FALSE, "", FALSE);
|
||||
gSavedSettings.declareString("ClientSettingsFile", "test_settings.xml", "", FALSE);
|
||||
gSavedSettings.declareString("NextLoginLocation", "", "", FALSE);
|
||||
gSavedSettings.declareBOOL("LoginLastLocation", FALSE, "", FALSE);
|
||||
gSavedSettings.declareBOOL("NoInventoryLibrary", FALSE, "", LLControlVariable::PERSIST_NO);
|
||||
gSavedSettings.declareBOOL("ConnectAsGod", FALSE, "", LLControlVariable::PERSIST_NO);
|
||||
gSavedSettings.declareBOOL("UseDebugMenus", FALSE, "", LLControlVariable::PERSIST_NO);
|
||||
gSavedSettings.declareBOOL("ForceMandatoryUpdate", FALSE, "", LLControlVariable::PERSIST_NO);
|
||||
gSavedSettings.declareString("ClientSettingsFile", "test_settings.xml", "", LLControlVariable::PERSIST_NO);
|
||||
gSavedSettings.declareString("NextLoginLocation", "", "", LLControlVariable::PERSIST_NO);
|
||||
gSavedSettings.declareBOOL("LoginLastLocation", FALSE, "", LLControlVariable::PERSIST_NO);
|
||||
|
||||
LLSD authenticator = LLSD::emptyMap();
|
||||
LLSD identifier = LLSD::emptyMap();
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ LLControlGroup::~LLControlGroup() {}
|
|||
LLControlVariable* LLControlGroup::declareString(const std::string& name,
|
||||
const std::string& initial_val,
|
||||
const std::string& comment,
|
||||
BOOL persist) {return NULL;}
|
||||
LLControlVariable::ePersist persist) {return NULL;}
|
||||
void LLControlGroup::setString(const std::string& name, const std::string& val){}
|
||||
std::string LLControlGroup::getString(const std::string& name)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ LLControlGroup::~LLControlGroup() {}
|
|||
LLControlVariable* LLControlGroup::declareString(const std::string& name,
|
||||
const std::string& initial_val,
|
||||
const std::string& comment,
|
||||
BOOL persist) {return NULL;}
|
||||
LLControlVariable::ePersist persist) {return NULL;}
|
||||
void LLControlGroup::setString(const std::string& name, const std::string& val){}
|
||||
std::string LLControlGroup::getString(const std::string& name)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ LLControlGroup::~LLControlGroup() {}
|
|||
LLControlVariable* LLControlGroup::declareString(const std::string& name,
|
||||
const std::string& initial_val,
|
||||
const std::string& comment,
|
||||
BOOL persist) {return NULL;}
|
||||
LLControlVariable::ePersist persist) {return NULL;}
|
||||
void LLControlGroup::setString(const std::string& name, const std::string& val){}
|
||||
|
||||
std::string gCmdLineLoginURI;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ LLControlGroup::~LLControlGroup() {}
|
|||
LLControlVariable* LLControlGroup::declareString(const std::string& name,
|
||||
const std::string& initial_val,
|
||||
const std::string& comment,
|
||||
BOOL persist) {return NULL;}
|
||||
LLControlVariable::ePersist persist) {return NULL;}
|
||||
void LLControlGroup::setString(const std::string& name, const std::string& val){}
|
||||
std::string LLControlGroup::getString(const std::string& name)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ LLControlGroup::~LLControlGroup() {}
|
|||
LLControlVariable* LLControlGroup::declareString(const std::string& name,
|
||||
const std::string& initial_val,
|
||||
const std::string& comment,
|
||||
BOOL persist) {return NULL;}
|
||||
LLControlVariable::ePersist persist) {return NULL;}
|
||||
void LLControlGroup::setString(const std::string& name, const std::string& val){}
|
||||
|
||||
std::string gCmdLineLoginURI;
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ namespace tut
|
|||
// These variables are required by machinery used by
|
||||
// LLXMLRPCTransaction. The values reflect reality for this test
|
||||
// executable; hopefully these values are correct.
|
||||
gSavedSettings.declareBOOL("BrowserProxyEnabled", FALSE, "", FALSE); // don't persist
|
||||
gSavedSettings.declareBOOL("NoVerifySSLCert", TRUE, "", FALSE); // don't persist
|
||||
gSavedSettings.declareBOOL("BrowserProxyEnabled", FALSE, "", LLControlVariable::PERSIST_NO); // don't persist
|
||||
gSavedSettings.declareBOOL("NoVerifySSLCert", TRUE, "", LLControlVariable::PERSIST_NO); // don't persist
|
||||
}
|
||||
|
||||
// LLEventPump listener signature
|
||||
|
|
|
|||
Loading…
Reference in New Issue