diff --git a/doc/contributions.txt b/doc/contributions.txt index 9a42f9164f..c584d98619 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -228,6 +228,7 @@ Ansariel Hiller SL-13364 SL-13858 SL-13697 + SL-13395 Aralara Rajal Arare Chantilly CHUIBUG-191 diff --git a/indra/llui/llnotificationptr.h b/indra/llui/llnotificationptr.h index acc047527f..580f353c7d 100644 --- a/indra/llui/llnotificationptr.h +++ b/indra/llui/llnotificationptr.h @@ -27,9 +27,8 @@ // Many classes just store a single LLNotificationPtr // and llnotifications.h is very large, so define this ligher header. -#include class LLNotification; -typedef boost::shared_ptr LLNotificationPtr; +typedef std::shared_ptr LLNotificationPtr; #endif diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 3b9f61b345..c884933bbf 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -85,7 +85,6 @@ #include #include -#include #include #include #include @@ -306,7 +305,7 @@ typedef boost::shared_ptr LLNotificationVisibility */ class LLNotification : boost::noncopyable, - public boost::enable_shared_from_this + public std::enable_shared_from_this { LOG_CLASS(LLNotification); friend class LLNotifications; @@ -762,7 +761,10 @@ public: : mFilter(filter), mItems() {} - virtual ~LLNotificationChannelBase() {} + virtual ~LLNotificationChannelBase() + { + mItems.clear(); + } // you can also connect to a Channel, so you can be notified of // changes to this channel LLBoundListener connectChanged(const LLEventListener& slot) @@ -892,6 +894,7 @@ class LLNotifications : { LLSINGLETON(LLNotifications); LOG_CLASS(LLNotifications); + virtual ~LLNotifications() {} public: @@ -1092,7 +1095,11 @@ public: LLPersistentNotificationChannel() : LLNotificationChannel("Persistent", "Visible", ¬ificationFilter) {} - virtual ~LLPersistentNotificationChannel() {} + + virtual ~LLPersistentNotificationChannel() + { + mHistory.clear(); + } typedef std::vector history_list_t; history_list_t::iterator beginHistory() { sortHistory(); return mHistory.begin(); } diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 4500baa049..36c05a9dde 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -1262,7 +1262,7 @@ std::string LLUrlEntryPlace::getLocation(const std::string &url) const // LLUrlEntryRegion::LLUrlEntryRegion() { - mPattern = boost::regex("secondlife:///app/region/[^/\\s]+(/\\d+)?(/\\d+)?(/\\d+)?/?", + mPattern = boost::regex("secondlife:///app/region/[A-Za-z0-9()_%]+(/\\d+)?(/\\d+)?(/\\d+)?/?", boost::regex::perl|boost::regex::icase); mMenuName = "menu_url_slurl.xml"; mTooltip = LLTrans::getString("TooltipSLURL"); diff --git a/indra/llui/tests/llurlentry_test.cpp b/indra/llui/tests/llurlentry_test.cpp index 4a4fdb72e3..1a474cca90 100644 --- a/indra/llui/tests/llurlentry_test.cpp +++ b/indra/llui/tests/llurlentry_test.cpp @@ -739,11 +739,6 @@ namespace tut "XXX secondlife:///app/region/Burning%20Life%20(Hyper)/27/210/30 XXX", "secondlife:///app/region/Burning%20Life%20(Hyper)/27/210/30"); - // DEV-35459: SLURLs and teleport Links not parsed properly - testRegex("Region with quote", url, - "XXX secondlife:///app/region/A'ksha%20Oasis/41/166/701 XXX", - "secondlife:///app/region/A%27ksha%20Oasis/41/166/701"); - // Rendering tests. testLabel("Render /app/region/Ahern/50/50/50/", url, "secondlife:///app/region/Ahern/50/50/50/", diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 90c0c62079..1e43d7b737 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4387,7 +4387,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items const LLUUID &lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); const LLUUID &favorites = model->findCategoryUUIDForType(LLFolderType::FT_FAVORITE); const LLUUID &marketplace_listings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false); - const LLUUID &outfits_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS, false); // Fix "outfits" context menu + const LLUUID &outfits_id = model->findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS, false); // FIRE-11628: Option to delete broken links from AO folder if (mUUID == AOEngine::instance().getAOFolder()) @@ -4395,7 +4395,9 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items items.push_back(std::string("Cleanup broken Links")); } // + // Fix "outfits" context menu + //if (outfits_id == mUUID) if (model->isObjectDescendentOf(mUUID, outfits_id) && getCategory() && (getCategory()->getPreferredType() == LLFolderType::FT_NONE || getCategory()->getPreferredType() == LLFolderType::FT_MY_OUTFITS)) @@ -4403,6 +4405,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items items.push_back(std::string("New Outfit")); } // + if (lost_and_found_id == mUUID) { // This is the lost+found folder. @@ -4504,7 +4507,8 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items // Not sure what the right thing is to do here. if (!isCOFFolder() && cat && (cat->getPreferredType() != LLFolderType::FT_OUTFIT)) { - if (!isInboxFolder()) // don't allow creation in inbox + if (!isInboxFolder() // don't allow creation in inbox + && outfits_id != mUUID) { // Do not allow to create 2-level subfolder in the Calling Card/Friends folder. EXT-694. if (!LLFriendCardsManager::instance().isCategoryInFriendFolder(cat)) diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index 3f33aad867..b0baeb0ca6 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -31,6 +31,7 @@ #include "lluictrl.h" #include "llframetimer.h" +#include "llnotificationptr.h" class LLViewBorder; class LLUICtrlFactory; @@ -145,7 +146,7 @@ public: void setTextureSize(S32 width, S32 height); - void showNotification(boost::shared_ptr notify); + void showNotification(LLNotificationPtr notify); void hideNotification(); void setTrustedContent(bool trusted); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 57cb552628..ac27e3fc3e 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -256,7 +256,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLLineEditor* password_edit(getChild("password_edit")); password_edit->setKeystrokeCallback(onPassKey, this); // STEAM-14: When user presses Enter with this field in focus, initiate login - password_edit->setCommitCallback(boost::bind(&LLPanelLogin::onClickConnect, this)); + password_edit->setCommitCallback(boost::bind(&LLPanelLogin::onClickConnect, false)); // change z sort of clickable text to be behind buttons sendChildToBack(getChildView("forgot_password_text")); @@ -267,7 +267,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, { LLComboBox* favorites_combo = getChild("start_location_combo"); updateLocationSelectorsVisibility(); // separate so that it can be called from preferences - favorites_combo->setReturnCallback(boost::bind(&LLPanelLogin::onClickConnect, this)); + favorites_combo->setReturnCallback(boost::bind(&LLPanelLogin::onClickConnect, false)); favorites_combo->setFocusLostCallback(boost::bind(&LLPanelLogin::onLocationSLURL, this)); LLComboBox* server_choice_combo = getChild("server_combo"); @@ -999,12 +999,15 @@ void LLPanelLogin::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent ev // Protected methods //--------------------------------------------------------------------------- // static -void LLPanelLogin::onClickConnect(void *) +void LLPanelLogin::onClickConnect(bool commit_fields) { if (sInstance && sInstance->mCallback) { - // JC - Make sure the fields all get committed. - sInstance->setFocus(FALSE); + if (commit_fields) + { + // JC - Make sure the fields all get committed. + sInstance->setFocus(FALSE); + } LLComboBox* combo = sInstance->getChild("server_combo"); LLSD combo_val = combo->getSelectedValue(); @@ -1127,7 +1130,7 @@ void LLPanelLogin::onUserListCommit(void*) } else { - onClickConnect(NULL); + onClickConnect(); } } } diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index 963e9a3996..589bad290c 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -100,7 +100,7 @@ private: static void setFields(LLPointer credential); - static void onClickConnect(void*); + static void onClickConnect(bool commit_fields = true); static void onClickNewAccount(void*); static void onClickVersion(void*); static void onClickForgotPassword(void*); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index fea5ba01a7..77cece4577 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -83,6 +83,8 @@ #include "llcallstack.h" #include "llsettingsdaycycle.h" +#include + // Firestorm includes #include "lfsimfeaturehandler.h" #include "llviewermenu.h" @@ -150,15 +152,22 @@ public: // build a secondlife://{PLACE} SLurl from this SLapp std::string url = "secondlife://"; + boost::regex name_rx("[A-Za-z0-9()_%]+"); + boost::regex coord_rx("[0-9]+"); for (int i = 0; i < num_params; i++) { if (i > 0) { url += "/"; } + if (!boost::regex_match(params[i].asString(), i > 0 ? coord_rx : name_rx)) + { + return false; + } + url += params[i].asString(); } - + // Process the SLapp as if it was a secondlife://{PLACE} SLurl LLURLDispatcher::dispatch(url, "clicked", web, true); return true;