diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2013-07-25 16:46:51 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2013-07-25 16:46:51 -0400 |
commit | d2386652f8a44c5adcc7fbcc65741649dd90aa2b (patch) | |
tree | 3e760a558cf5cdb02d2472d294b1007a8c188142 /indra/newview | |
parent | 35bc91fc5dee77133fff0c0066e3e34689941dfd (diff) |
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.
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llagent.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/llfloaterimnearbychat.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/tests/llagentaccess_test.cpp | 12 | ||||
-rwxr-xr-x | indra/newview/tests/lllogininstance_test.cpp | 18 | ||||
-rwxr-xr-x | indra/newview/tests/llsecapi_test.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/tests/llsechandler_basic_test.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/tests/llslurl_test.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/tests/llviewerhelputil_test.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/tests/llviewernetwork_test.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/tests/llxmlrpclistener_test.cpp | 4 |
10 files changed, 24 insertions, 24 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 3e94c5edf7..05f3824485 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -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. diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index 56b0c15cb9..38592b3f65 100755 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -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")) { diff --git a/indra/newview/tests/llagentaccess_test.cpp b/indra/newview/tests/llagentaccess_test.cpp index 1f379ead32..a40b5c9a3d 100755 --- a/indra/newview/tests/llagentaccess_test.cpp +++ b/indra/newview/tests/llagentaccess_test.cpp @@ -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); diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index 4768d9351e..272a46aa8d 100755 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -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(); diff --git a/indra/newview/tests/llsecapi_test.cpp b/indra/newview/tests/llsecapi_test.cpp index 05bac0e23b..d7e87ed52e 100755 --- a/indra/newview/tests/llsecapi_test.cpp +++ b/indra/newview/tests/llsecapi_test.cpp @@ -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) { diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp index 3fbb45f8b4..2a8dc15346 100755 --- a/indra/newview/tests/llsechandler_basic_test.cpp +++ b/indra/newview/tests/llsechandler_basic_test.cpp @@ -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) { diff --git a/indra/newview/tests/llslurl_test.cpp b/indra/newview/tests/llslurl_test.cpp index a3735388df..86229ad636 100755 --- a/indra/newview/tests/llslurl_test.cpp +++ b/indra/newview/tests/llslurl_test.cpp @@ -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; diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp index 8e9cc7111b..f6456a2839 100755 --- a/indra/newview/tests/llviewerhelputil_test.cpp +++ b/indra/newview/tests/llviewerhelputil_test.cpp @@ -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) { diff --git a/indra/newview/tests/llviewernetwork_test.cpp b/indra/newview/tests/llviewernetwork_test.cpp index f80c02475d..06de1cbfa2 100755 --- a/indra/newview/tests/llviewernetwork_test.cpp +++ b/indra/newview/tests/llviewernetwork_test.cpp @@ -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; diff --git a/indra/newview/tests/llxmlrpclistener_test.cpp b/indra/newview/tests/llxmlrpclistener_test.cpp index 711c2a3d51..20f913b670 100755 --- a/indra/newview/tests/llxmlrpclistener_test.cpp +++ b/indra/newview/tests/llxmlrpclistener_test.cpp @@ -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 |