aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterreporter.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/llfloaterreporter.cpp
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/newview/llfloaterreporter.cpp')
-rw-r--r--linden/indra/newview/llfloaterreporter.cpp51
1 files changed, 25 insertions, 26 deletions
diff --git a/linden/indra/newview/llfloaterreporter.cpp b/linden/indra/newview/llfloaterreporter.cpp
index 49c6e83..3a9829d 100644
--- a/linden/indra/newview/llfloaterreporter.cpp
+++ b/linden/indra/newview/llfloaterreporter.cpp
@@ -137,8 +137,8 @@ LLFloaterReporter::LLFloaterReporter(
137 if (pick_btn) 137 if (pick_btn)
138 { 138 {
139 // XUI: Why aren't these in viewerart.ini? 139 // XUI: Why aren't these in viewerart.ini?
140 pick_btn->setImages( "UIImgFaceUUID", 140 pick_btn->setImages( std::string("UIImgFaceUUID"),
141 "UIImgFaceSelectedUUID" ); 141 std::string("UIImgFaceSelectedUUID") );
142 childSetAction("pick_btn", onClickObjPicker, this); 142 childSetAction("pick_btn", onClickObjPicker, this);
143 } 143 }
144 144
@@ -173,8 +173,8 @@ LLFloaterReporter::LLFloaterReporter(
173 setVisible(TRUE); 173 setVisible(TRUE);
174 174
175 // Default text to be blank 175 // Default text to be blank
176 childSetText("object_name", LLString::null); 176 childSetText("object_name", LLStringUtil::null);
177 childSetText("owner_name", LLString::null); 177 childSetText("owner_name", LLStringUtil::null);
178 178
179 childSetFocus("summary_edit"); 179 childSetFocus("summary_edit");
180 180
@@ -308,7 +308,7 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id)
308 if (objectp->isAvatar()) 308 if (objectp->isAvatar())
309 { 309 {
310 // we have the information we need 310 // we have the information we need
311 LLString object_owner; 311 std::string object_owner;
312 312
313 LLNameValue* firstname = objectp->getNVPair("FirstName"); 313 LLNameValue* firstname = objectp->getNVPair("FirstName");
314 LLNameValue* lastname = objectp->getNVPair("LastName"); 314 LLNameValue* lastname = objectp->getNVPair("LastName");
@@ -391,10 +391,10 @@ void LLFloaterReporter::onClickSend(void *userdata)
391 { 391 {
392 if ( ! self->mCopyrightWarningSeen ) 392 if ( ! self->mCopyrightWarningSeen )
393 { 393 {
394 LLString details_lc = self->childGetText("details_edit"); 394 std::string details_lc = self->childGetText("details_edit");
395 LLString::toLower( details_lc ); 395 LLStringUtil::toLower( details_lc );
396 LLString summary_lc = self->childGetText("summary_edit"); 396 std::string summary_lc = self->childGetText("summary_edit");
397 LLString::toLower( summary_lc ); 397 LLStringUtil::toLower( summary_lc );
398 if ( details_lc.find( "copyright" ) != std::string::npos || 398 if ( details_lc.find( "copyright" ) != std::string::npos ||
399 summary_lc.find( "copyright" ) != std::string::npos ) 399 summary_lc.find( "copyright" ) != std::string::npos )
400 { 400 {
@@ -457,8 +457,8 @@ void LLFloaterReporter::onClickObjPicker(void *userdata)
457 LLToolObjPicker::getInstance()->setExitCallback(LLFloaterReporter::closePickTool, self); 457 LLToolObjPicker::getInstance()->setExitCallback(LLFloaterReporter::closePickTool, self);
458 LLToolMgr::getInstance()->setTransientTool(LLToolObjPicker::getInstance()); 458 LLToolMgr::getInstance()->setTransientTool(LLToolObjPicker::getInstance());
459 self->mPicking = TRUE; 459 self->mPicking = TRUE;
460 self->childSetText("object_name", LLString::null); 460 self->childSetText("object_name", LLStringUtil::null);
461 self->childSetText("owner_name", LLString::null); 461 self->childSetText("owner_name", LLStringUtil::null);
462 LLButton* pick_btn = self->getChild<LLButton>("pick_btn"); 462 LLButton* pick_btn = self->getChild<LLButton>("pick_btn");
463 if (pick_btn) pick_btn->setToggleState(TRUE); 463 if (pick_btn) pick_btn->setToggleState(TRUE);
464} 464}
@@ -517,7 +517,7 @@ void LLFloaterReporter::showFromMenu(EReportType report_type)
517 } 517 }
518 518
519 // grab the user's name 519 // grab the user's name
520 LLString fullname; 520 std::string fullname;
521 gAgent.buildFullname(fullname); 521 gAgent.buildFullname(fullname);
522 f->childSetText("reporter_field", fullname); 522 f->childSetText("reporter_field", fullname);
523 } 523 }
@@ -532,7 +532,7 @@ void LLFloaterReporter::showFromObject(const LLUUID& object_id)
532 f->setFocus(TRUE); 532 f->setFocus(TRUE);
533 533
534 // grab the user's name 534 // grab the user's name
535 LLString fullname; 535 std::string fullname;
536 gAgent.buildFullname(fullname); 536 gAgent.buildFullname(fullname);
537 f->childSetText("reporter_field", fullname); 537 f->childSetText("reporter_field", fullname);
538 538
@@ -577,7 +577,7 @@ LLFloaterReporter* LLFloaterReporter::createNewBugReporter()
577 577
578 578
579 579
580void LLFloaterReporter::setPickedObjectProperties(const LLString& object_name, const LLString& owner_name, const LLUUID owner_id) 580void LLFloaterReporter::setPickedObjectProperties(const std::string& object_name, const std::string& owner_name, const LLUUID owner_id)
581{ 581{
582 childSetText("object_name", object_name); 582 childSetText("object_name", object_name);
583 childSetText("owner_name", owner_name); 583 childSetText("owner_name", owner_name);
@@ -661,7 +661,7 @@ LLSD LLFloaterReporter::gatherReport()
661 summary << "Preview "; 661 summary << "Preview ";
662 } 662 }
663 663
664 LLString category_name; 664 std::string category_name;
665 LLComboBox* combo = getChild<LLComboBox>( "category_combo"); 665 LLComboBox* combo = getChild<LLComboBox>( "category_combo");
666 if (combo) 666 if (combo)
667 { 667 {
@@ -711,8 +711,8 @@ LLSD LLFloaterReporter::gatherReport()
711 << LL_VERSION_PATCH << "." 711 << LL_VERSION_PATCH << "."
712 << LL_VIEWER_BUILD << std::endl << std::endl; 712 << LL_VIEWER_BUILD << std::endl << std::endl;
713 } 713 }
714 LLString object_name = childGetText("object_name"); 714 std::string object_name = childGetText("object_name");
715 LLString owner_name = childGetText("owner_name"); 715 std::string owner_name = childGetText("owner_name");
716 if (!object_name.empty() && !owner_name.empty()) 716 if (!object_name.empty() && !owner_name.empty())
717 { 717 {
718 details << "Object: " << object_name << "\n"; 718 details << "Object: " << object_name << "\n";
@@ -727,9 +727,8 @@ LLSD LLFloaterReporter::gatherReport()
727 727
728 details << childGetValue("details_edit").asString(); 728 details << childGetValue("details_edit").asString();
729 729
730 char version_string[MAX_STRING]; /* Flawfinder: ignore */ 730 std::string version_string;
731 snprintf(version_string, /* Flawfinder: ignore */ 731 version_string = llformat(
732 MAX_STRING,
733 "%d.%d.%d %s %s %s %s", 732 "%d.%d.%d %s %s %s %s",
734 LL_VERSION_MAJOR, 733 LL_VERSION_MAJOR,
735 LL_VERSION_MINOR, 734 LL_VERSION_MINOR,
@@ -794,7 +793,7 @@ void LLFloaterReporter::sendReportViaLegacy(const LLSD & report)
794 msg->addString("AbuseRegionName", report["abuse-region-name"].asString()); 793 msg->addString("AbuseRegionName", report["abuse-region-name"].asString());
795 msg->addUUID("AbuseRegionID", report["abuse-region-id"].asUUID()); 794 msg->addUUID("AbuseRegionID", report["abuse-region-id"].asUUID());
796 795
797 msg->addStringFast(_PREHASH_Summary, report["summary"].asString().c_str()); 796 msg->addStringFast(_PREHASH_Summary, report["summary"].asString());
798 msg->addString("VersionString", report["version-string"]); 797 msg->addString("VersionString", report["version-string"]);
799 msg->addStringFast(_PREHASH_Details, report["details"] ); 798 msg->addStringFast(_PREHASH_Details, report["details"] );
800 799
@@ -908,7 +907,7 @@ void LLFloaterReporter::takeScreenshot()
908 { 907 {
909 texture->setImageAssetID(mResourceDatap->mAssetInfo.mUuid); 908 texture->setImageAssetID(mResourceDatap->mAssetInfo.mUuid);
910 texture->setDefaultImageAssetID(mResourceDatap->mAssetInfo.mUuid); 909 texture->setDefaultImageAssetID(mResourceDatap->mAssetInfo.mUuid);
911 texture->setCaption("Screenshot"); 910 texture->setCaption(std::string("Screenshot"));
912 } 911 }
913 912
914} 913}
@@ -937,7 +936,7 @@ void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data,
937 936
938 if(result < 0) 937 if(result < 0)
939 { 938 {
940 LLStringBase<char>::format_map_t args; 939 LLStringUtil::format_map_t args;
941 args["[REASON]"] = std::string(LLAssetStorage::getErrorString(result)); 940 args["[REASON]"] = std::string(LLAssetStorage::getErrorString(result));
942 gViewerWindow->alertXml("ErrorUploadingReportScreenshot", args); 941 gViewerWindow->alertXml("ErrorUploadingReportScreenshot", args);
943 942
@@ -975,14 +974,14 @@ void LLFloaterReporter::uploadDoneCallback(const LLUUID &uuid, void *user_data,
975void LLFloaterReporter::setPosBox(const LLVector3d &pos) 974void LLFloaterReporter::setPosBox(const LLVector3d &pos)
976{ 975{
977 mPosition.setVec(pos); 976 mPosition.setVec(pos);
978 LLString pos_string = llformat("{%.1f, %.1f, %.1f}", 977 std::string pos_string = llformat("{%.1f, %.1f, %.1f}",
979 mPosition.mV[VX], 978 mPosition.mV[VX],
980 mPosition.mV[VY], 979 mPosition.mV[VY],
981 mPosition.mV[VZ]); 980 mPosition.mV[VZ]);
982 childSetText("pos_field", pos_string); 981 childSetText("pos_field", pos_string);
983} 982}
984 983
985void LLFloaterReporter::setDescription(const LLString& description, LLMeanCollisionData *mcd) 984void LLFloaterReporter::setDescription(const std::string& description, LLMeanCollisionData *mcd)
986{ 985{
987 LLFloaterReporter *self = gReporterInstances[COMPLAINT_REPORT]; 986 LLFloaterReporter *self = gReporterInstances[COMPLAINT_REPORT];
988 if (self) 987 if (self)
@@ -998,7 +997,7 @@ void LLFloaterReporter::setDescription(const LLString& description, LLMeanCollis
998 } 997 }
999} 998}
1000 999
1001void LLFloaterReporter::addDescription(const LLString& description, LLMeanCollisionData *mcd) 1000void LLFloaterReporter::addDescription(const std::string& description, LLMeanCollisionData *mcd)
1002{ 1001{
1003 LLFloaterReporter *self = gReporterInstances[COMPLAINT_REPORT]; 1002 LLFloaterReporter *self = gReporterInstances[COMPLAINT_REPORT];
1004 if (self) 1003 if (self)