diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-06-26 00:39:00 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-06-26 00:39:00 +0000 |
commit | 25c10ed028da5c547b11f1f461916897272b0e6d (patch) | |
tree | 350a5858f8970b6e28b2dc395625d74d8bd597b2 /indra/newview/llpanellogin.cpp | |
parent | 6dd125d375b38455997a0c4b8747659f4c2351aa (diff) |
QAR-628 merge string-cleanup-5 -r 90476:90508 -> release
dataserver-is-deprecated
Diffstat (limited to 'indra/newview/llpanellogin.cpp')
-rw-r--r-- | indra/newview/llpanellogin.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index a3526dff21..c252c54ad7 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -79,7 +79,7 @@ #define USE_VIEWER_AUTH 0 -LLString load_password_from_disk(void); +std::string load_password_from_disk(void); void save_password_to_disk(const char* hashed_password); const S32 BLACK_BORDER_HEIGHT = 160; @@ -204,7 +204,7 @@ void LLLoginHandler::parse(const LLSD& queryMap) LLViewerLogin::getInstance()->setGridChoice(grid_choice); } - LLString startLocation = queryMap["location"].asString(); + std::string startLocation = queryMap["location"].asString(); if (startLocation == "specify") { @@ -213,12 +213,12 @@ void LLLoginHandler::parse(const LLSD& queryMap) else if (startLocation == "home") { gSavedSettings.setBOOL("LoginLastLocation", FALSE); - LLURLSimString::setString(""); + LLURLSimString::setString(LLStringUtil::null); } else if (startLocation == "last") { gSavedSettings.setBOOL("LoginLastLocation", TRUE); - LLURLSimString::setString(""); + LLURLSimString::setString(LLStringUtil::null); } } @@ -234,7 +234,7 @@ bool LLLoginHandler::handle(const LLSD& tokens, return true; } - LLString password = queryMap["password"].asString(); + std::string password = queryMap["password"].asString(); if (!password.empty()) { @@ -245,7 +245,7 @@ bool LLLoginHandler::handle(const LLSD& tokens, LLMD5 pass((unsigned char*)password.c_str()); char md5pass[33]; /* Flawfinder: ignore */ pass.hex_digest(md5pass); - password = md5pass; + password = ll_safe_string(md5pass, 32); save_password_to_disk(password.c_str()); } } @@ -324,7 +324,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, BOOL show_server, void (*callback)(S32 option, void* user_data), void *cb_data) -: LLPanel("panel_login", LLRect(0,600,800,0), FALSE), // not bordered +: LLPanel(std::string("panel_login"), LLRect(0,600,800,0), FALSE), // not bordered mLogoImage(), mCallback(callback), mCallbackData(cb_data), @@ -386,7 +386,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, // 2 - "<Type region name>" BOOL login_last = gSavedSettings.getBOOL("LoginLastLocation"); - LLString sim_string = LLURLSimString::sInstance.mSimString; + std::string sim_string = LLURLSimString::sInstance.mSimString; if (!sim_string.empty()) { // Replace "<Type region name>" with this region name @@ -415,7 +415,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, childSetAction("quit_btn", onClickQuit, this); LLTextBox* version_text = getChild<LLTextBox>("version_text"); - LLString version = llformat("%d.%d.%d (%d)", + std::string version = llformat("%d.%d.%d (%d)", LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, @@ -744,7 +744,7 @@ void LLPanelLogin::setFields(const std::string& firstname, const std::string& la // static -void LLPanelLogin::addServer(const char *server, S32 domain_name) +void LLPanelLogin::addServer(const std::string& server, S32 domain_name) { if (!sInstance) { @@ -758,7 +758,7 @@ void LLPanelLogin::addServer(const char *server, S32 domain_name) } // static -void LLPanelLogin::getFields(LLString &firstname, LLString &lastname, LLString &password, +void LLPanelLogin::getFields(std::string &firstname, std::string &lastname, std::string &password, BOOL &remember) { if (!sInstance) @@ -768,10 +768,10 @@ void LLPanelLogin::getFields(LLString &firstname, LLString &lastname, LLString & } firstname = sInstance->childGetText("first_name_edit"); - LLString::trim(firstname); + LLStringUtil::trim(firstname); lastname = sInstance->childGetText("last_name_edit"); - LLString::trim(lastname); + LLStringUtil::trim(lastname); password = sInstance->mMungedPassword; remember = sInstance->childGetValue("remember_check"); @@ -779,7 +779,7 @@ void LLPanelLogin::getFields(LLString &firstname, LLString &lastname, LLString & // static. Return TRUE if user made a choice from the popup -BOOL LLPanelLogin::getServer(LLString &server, S32 &domain_name) +BOOL LLPanelLogin::getServer(std::string &server, S32 &domain_name) { BOOL user_picked = FALSE; if (!sInstance) @@ -812,7 +812,7 @@ BOOL LLPanelLogin::getServer(LLString &server, S32 &domain_name) } // static -void LLPanelLogin::getLocation(LLString &location) +void LLPanelLogin::getLocation(std::string &location) { if (!sInstance) { @@ -914,7 +914,7 @@ void LLPanelLogin::loadLoginPage() } // Language - LLString language(gSavedSettings.getString("Language")); + std::string language(gSavedSettings.getString("Language")); if(language == "default") { language = gSavedSettings.getString("SystemLanguage"); @@ -928,7 +928,7 @@ void LLPanelLogin::loadLoginPage() } // Channel and Version - LLString version = llformat("%d.%d.%d (%d)", + std::string version = llformat("%d.%d.%d (%d)", LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD); char* curl_channel = curl_escape(gSavedSettings.getString("VersionChannelName").c_str(), 0); @@ -941,7 +941,7 @@ void LLPanelLogin::loadLoginPage() curl_free(curl_version); // Grid - LLString grid; + std::string grid; S32 grid_index; getServer( grid, grid_index ); @@ -958,9 +958,9 @@ void LLPanelLogin::loadLoginPage() #if USE_VIEWER_AUTH LLURLSimString::sInstance.parse(); - LLString location; - LLString region; - LLString password; + std::string location; + std::string region; + std::string password; if (LLURLSimString::parse()) { @@ -983,7 +983,7 @@ void LLPanelLogin::loadLoginPage() } } - LLString firstname, lastname; + std::string firstname, lastname; if(gSavedSettings.getLLSD("UserLoginInfo").size() == 3) { @@ -1076,8 +1076,8 @@ void LLPanelLogin::onClickConnect(void *) // JC - Make sure the fields all get committed. sInstance->setFocus(FALSE); - LLString first = sInstance->childGetText("first_name_edit"); - LLString last = sInstance->childGetText("last_name_edit"); + std::string first = sInstance->childGetText("first_name_edit"); + std::string last = sInstance->childGetText("last_name_edit"); if (!first.empty() && !last.empty()) { // has both first and last name typed @@ -1167,7 +1167,7 @@ void LLPanelLogin::onSelectServer(LLUICtrl*, void*) { // The user twiddled with the grid choice ui. // apply the selection to the grid setting. - LLString grid; + std::string grid; S32 grid_index; getServer( grid, grid_index ); |