summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-08-24 01:23:52 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-08-24 01:23:52 +0300
commit7373fd91fa42b3fce0804ccd10899a5d1fdb5c36 (patch)
tree54a107f3415c04e6e493f54e156c3ac278d36f99 /indra/newview/llinventoryfunctions.cpp
parent264d9c32d9e04df0ceeaf2a63f6872aad29dd46a (diff)
parentd454512050e636a19e4b7545515dea4f4b1bbf0d (diff)
Merge remote-tracking branch 'origin/main' into DRTVWR-489
# Conflicts: # indra/llcommon/llsdserialize.cpp # indra/llcommon/llsdserialize.h # indra/llmath/llvolume.cpp # indra/llrender/llgl.cpp # indra/llxml/llcontrol.cpp # indra/newview/llpanelnearbymedia.cpp # indra/newview/llsceneview.cpp # indra/newview/llselectmgr.cpp # indra/newview/llstartup.cpp # indra/newview/lltextureview.cpp # indra/newview/llvovolume.cpp # indra/newview/skins/default/xui/en/menu_viewer.xml
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r--indra/newview/llinventoryfunctions.cpp36
1 files changed, 34 insertions, 2 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 67240ac7e7..145814ab41 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -213,8 +213,7 @@ bool contains_nocopy_items(const LLUUID& id)
return false;
}
-// Generates a string containing the path to the item specified by
-// item_id.
+// Generates a string containing the path to the item specified by id.
void append_path(const LLUUID& id, std::string& path)
{
std::string temp;
@@ -234,6 +233,36 @@ void append_path(const LLUUID& id, std::string& path)
path.append(temp);
}
+// Generates a string containing the path name of the object.
+std::string make_path(const LLInventoryObject* object)
+{
+ std::string path;
+ append_path(object->getUUID(), path);
+ return path + "/" + object->getName();
+}
+
+// Generates a string containing the path name of the object specified by id.
+std::string make_inventory_path(const LLUUID& id)
+{
+ if (LLInventoryObject* object = gInventory.getObject(id))
+ return make_path(object);
+ return "";
+}
+
+// Generates a string containing the path name and id of the object.
+std::string make_info(const LLInventoryObject* object)
+{
+ return "'" + make_path(object) + "' (" + object->getUUID().asString() + ")";
+}
+
+// Generates a string containing the path name and id of the object specified by id.
+std::string make_inventory_info(const LLUUID& id)
+{
+ if (LLInventoryObject* object = gInventory.getObject(id))
+ return make_info(object);
+ return "<Inventory object not found!> (" + id.asString() + ")";
+}
+
void update_marketplace_folder_hierarchy(const LLUUID cat_id)
{
// When changing the marketplace status of a folder, the only thing that needs to happen is
@@ -1415,6 +1444,7 @@ bool move_item_to_marketplacelistings(LLInventoryItem* inv_item, LLUUID dest_fol
if (copy)
{
// Copy the item
+ LL_INFOS("SLM") << "Copy item '" << make_info(viewer_inv_item) << "' to '" << make_inventory_path(dest_folder) << "'" << LL_ENDL;
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(update_folder_cb, dest_folder));
copy_inventory_item(
gAgent.getID(),
@@ -1426,6 +1456,7 @@ bool move_item_to_marketplacelistings(LLInventoryItem* inv_item, LLUUID dest_fol
}
else
{
+ LL_INFOS("SLM") << "Move item '" << make_info(viewer_inv_item) << "' to '" << make_inventory_path(dest_folder) << "'" << LL_ENDL;
// Reparent the item
gInventory.changeItemParent(viewer_inv_item, dest_folder, true);
}
@@ -1472,6 +1503,7 @@ bool move_folder_to_marketplacelistings(LLInventoryCategory* inv_cat, const LLUU
}
else
{
+ LL_INFOS("SLM") << "Move category " << make_info(viewer_inv_cat) << " to '" << make_inventory_path(dest_folder) << "'" << LL_ENDL;
// Reparent the folder
gInventory.changeCategoryParent(viewer_inv_cat, dest_folder, false);
// Check the destination folder recursively for no copy items and promote the including folders if any