diff options
author | Richard Linden <none@none> | 2013-11-11 19:17:49 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2013-11-11 19:17:49 -0800 |
commit | 17e9c872ada0cd1d3bf5c16887ee7f220f3a10c7 (patch) | |
tree | 93f36acc00695d7b4ee2e43d08ce790358966f38 /indra/newview/lltooldraganddrop.cpp | |
parent | ebc9bcbf69f7a519677a6522979a6bf6cbb04bb8 (diff) | |
parent | 1983f52ce5211c02a55f5cabd86962eea3a22084 (diff) |
Automated merge with http://bitbucket.org/lindenlab/viewer-release
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rwxr-xr-x | indra/newview/lltooldraganddrop.cpp | 132 |
1 files changed, 66 insertions, 66 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 1a137f7129..12086dad5f 100755 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -175,7 +175,7 @@ public: virtual void done() { /* no-op: it's fire n forget right? */ - lldebugs << "LLCategoryFireAndForget::done()" << llendl; + LL_DEBUGS() << "LLCategoryFireAndForget::done()" << LL_ENDL; } }; @@ -256,7 +256,7 @@ void LLCategoryDropDescendentsObserver::done() LLInventoryModel::EXCLUDE_TRASH); } - S32 count = items.count(); + S32 count = items.size(); if (count) { std::set<LLUUID> unique_ids; @@ -371,7 +371,7 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type, { if (type == DAD_NONE) { - llwarns << "Attempted to start drag without a cargo type" << llendl; + LL_WARNS() << "Attempted to start drag without a cargo type" << LL_ENDL; return; } mCargoTypes.clear(); @@ -408,16 +408,16 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type, items, LLInventoryModel::EXCLUDE_TRASH, is_not_preferred); - S32 count = cats.count(); + S32 count = cats.size(); S32 i; for(i = 0; i < count; ++i) { - folder_ids.push_back(cats.get(i)->getUUID()); + folder_ids.push_back(cats.at(i)->getUUID()); } - count = items.count(); + count = items.size(); for(i = 0; i < count; ++i) { - item_ids.push_back(items.get(i)->getUUID()); + item_ids.push_back(items.at(i)->getUUID()); } if (!folder_ids.empty() || !item_ids.empty()) { @@ -443,7 +443,7 @@ void LLToolDragAndDrop::beginMultiDrag( { if (DAD_NONE == *types_it) { - llwarns << "Attempted to start drag without a cargo type" << llendl; + LL_WARNS() << "Attempted to start drag without a cargo type" << LL_ENDL; return; } } @@ -479,7 +479,7 @@ void LLToolDragAndDrop::beginMultiDrag( items, LLInventoryModel::EXCLUDE_TRASH, is_not_preferred); - S32 cat_count = cats.count(); + S32 cat_count = cats.size(); for(S32 i = 0; i < cat_count; ++i) { cat_ids.insert(cat->getUUID()); @@ -598,7 +598,7 @@ BOOL LLToolDragAndDrop::handleHover( S32 x, S32 y, MASK mask ) ECursorType cursor = acceptanceToCursor(acceptance); gViewerWindow->getWindow()->setCursor( cursor ); - lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolDragAndDrop" << llendl; + LL_DEBUGS("UserInput") << "hover handled by LLToolDragAndDrop" << LL_ENDL; return TRUE; } @@ -1035,7 +1035,7 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj, } else { - llwarns << "Unable to find source object." << llendl; + LL_WARNS() << "Unable to find source object." << LL_ENDL; return FALSE; } } @@ -1085,7 +1085,7 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj, { if (!item) { - llwarns << "LLToolDragAndDrop::dropTextureAllFaces no texture item." << llendl; + LL_WARNS() << "LLToolDragAndDrop::dropTextureAllFaces no texture item." << LL_ENDL; return; } LLUUID asset_id = item->getAssetUUID(); @@ -1095,7 +1095,7 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj, return; } LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(asset_id); - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT ); + add(LLStatViewer::EDIT_TEXTURE, 1); S32 num_faces = hit_obj->getNumTEs(); for( S32 face = 0; face < num_faces; face++ ) { @@ -1115,7 +1115,7 @@ void LLToolDragAndDrop::dropMesh(LLViewerObject* hit_obj, { if (!item) { - llwarns << "no inventory item." << llendl; + LL_WARNS() << "no inventory item." << LL_ENDL; return; } LLUUID asset_id = item->getAssetUUID(); @@ -1152,7 +1152,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj, if (hit_face == -1) return; if (!item) { - llwarns << "LLToolDragAndDrop::dropTextureOneFace no texture item." << llendl; + LL_WARNS() << "LLToolDragAndDrop::dropTextureOneFace no texture item." << LL_ENDL; return; } LLUUID asset_id = item->getAssetUUID(); @@ -1163,7 +1163,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj, } // update viewer side image in anticipation of update from simulator LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(asset_id); - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT ); + add(LLStatViewer::EDIT_TEXTURE, 1); LLTextureEntry* tep = hit_obj ? (hit_obj->getTE(hit_face)) : NULL; @@ -1227,8 +1227,8 @@ void LLToolDragAndDrop::dropScript(LLViewerObject* hit_obj, if ((SOURCE_WORLD == LLToolDragAndDrop::getInstance()->mSource) || (SOURCE_NOTECARD == LLToolDragAndDrop::getInstance()->mSource)) { - llwarns << "Call to LLToolDragAndDrop::dropScript() from world" - << " or notecard." << llendl; + LL_WARNS() << "Call to LLToolDragAndDrop::dropScript() from world" + << " or notecard." << LL_ENDL; return; } if (hit_obj && item) @@ -1255,7 +1255,7 @@ void LLToolDragAndDrop::dropScript(LLViewerObject* hit_obj, } else { - llwarns << "Unable to find source object." << llendl; + LL_WARNS() << "Unable to find source object." << LL_ENDL; return; } } @@ -1280,11 +1280,11 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, LLViewerRegion* regionp = LLWorld::getInstance()->getRegionFromPosGlobal(mLastHitPos); if (!regionp) { - llwarns << "Couldn't find region to rez object" << llendl; + LL_WARNS() << "Couldn't find region to rez object" << LL_ENDL; return; } - //llinfos << "Rezzing object" << llendl; + //LL_INFOS() << "Rezzing object" << LL_ENDL; make_ui_sound("UISndObjectRezIn"); LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; @@ -1431,7 +1431,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, effectp->setDuration(LL_HUD_DUR_SHORT); effectp->setColor(LLColor4U(gAgent.getEffectColor())); - LLViewerStats::getInstance()->incStat(LLViewerStats::ST_REZ_COUNT); + add(LLStatViewer::OBJECT_REZ, 1); } void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj, @@ -1444,8 +1444,8 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj, if ((SOURCE_WORLD == LLToolDragAndDrop::getInstance()->mSource) || (SOURCE_NOTECARD == LLToolDragAndDrop::getInstance()->mSource)) { - llwarns << "Call to LLToolDragAndDrop::dropInventory() from world" - << " or notecard." << llendl; + LL_WARNS() << "Call to LLToolDragAndDrop::dropInventory() from world" + << " or notecard." << LL_ENDL; return; } @@ -1475,7 +1475,7 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj, } else { - llwarns << "Unable to find source object." << llendl; + LL_WARNS() << "Unable to find source object." << LL_ENDL; return; } } @@ -1742,14 +1742,14 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_ EAcceptance LLToolDragAndDrop::dad3dNULL( LLViewerObject*, S32, MASK, BOOL) { - lldebugs << "LLToolDragAndDrop::dad3dNULL()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dNULL()" << LL_ENDL; return ACCEPT_NO; } EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dRezAttachmentFromInv()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezAttachmentFromInv()" << LL_ENDL; // must be in the user's inventory if(mSource != SOURCE_AGENT && mSource != SOURCE_LIBRARY) { @@ -1812,7 +1812,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( return dad3dRezFromObjectOnLand(obj, face, mask, drop); } - lldebugs << "LLToolDragAndDrop::dad3dRezObjectOnLand()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezObjectOnLand()" << LL_ENDL; LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); @@ -1875,7 +1875,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( return dad3dRezFromObjectOnObject(obj, face, mask, drop); } - lldebugs << "LLToolDragAndDrop::dad3dRezObjectOnObject()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezObjectOnObject()" << LL_ENDL; LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); @@ -1947,7 +1947,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( EAcceptance LLToolDragAndDrop::dad3dRezScript( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dRezScript()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezScript()" << LL_ENDL; // *HACK: In order to resolve SL-22177, we need to block drags // from notecards and objects onto other objects. @@ -1985,7 +1985,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezScript( EAcceptance LLToolDragAndDrop::dad3dApplyToObject( LLViewerObject* obj, S32 face, MASK mask, BOOL drop, EDragAndDropType cargo_type) { - lldebugs << "LLToolDragAndDrop::dad3dApplyToObject()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dApplyToObject()" << LL_ENDL; // *HACK: In order to resolve SL-22177, we need to block drags // from notecards and objects onto other objects. @@ -2036,7 +2036,7 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject( } else { - llwarns << "unsupported asset type" << llendl; + LL_WARNS() << "unsupported asset type" << LL_ENDL; } // VEFFECT: SetTexture @@ -2069,7 +2069,7 @@ EAcceptance LLToolDragAndDrop::dad3dMeshObject( EAcceptance LLToolDragAndDrop::dad3dTextureSelf( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dTextureAvatar()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dTextureAvatar()" << LL_ENDL; if(drop) { if( !(mask & MASK_SHIFT) ) @@ -2084,7 +2084,7 @@ EAcceptance LLToolDragAndDrop::dad3dTextureSelf( EAcceptance LLToolDragAndDrop::dad3dWearItem( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dWearItem()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dWearItem()" << LL_ENDL; LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); @@ -2117,7 +2117,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem( EAcceptance LLToolDragAndDrop::dad3dActivateGesture( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dActivateGesture()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dActivateGesture()" << LL_ENDL; LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); @@ -2166,7 +2166,7 @@ EAcceptance LLToolDragAndDrop::dad3dActivateGesture( EAcceptance LLToolDragAndDrop::dad3dWearCategory( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dWearCategory()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dWearCategory()" << LL_ENDL; LLViewerInventoryItem* item; LLViewerInventoryCategory* category; locateInventory(item, category); @@ -2217,7 +2217,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory( EAcceptance LLToolDragAndDrop::dad3dUpdateInventory( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dadUpdateInventory()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dadUpdateInventory()" << LL_ENDL; // *HACK: In order to resolve SL-22177, we need to block drags // from notecards and objects onto other objects. @@ -2257,10 +2257,10 @@ BOOL LLToolDragAndDrop::dadUpdateInventory(LLViewerObject* obj, BOOL drop) EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dUpdateInventoryCategory()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dUpdateInventoryCategory()" << LL_ENDL; if (obj == NULL) { - llwarns << "obj is NULL; aborting func with ACCEPT_NO" << llendl; + LL_WARNS() << "obj is NULL; aborting func with ACCEPT_NO" << LL_ENDL; return ACCEPT_NO; } @@ -2290,10 +2290,10 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory( items, LLInventoryModel::EXCLUDE_TRASH, droppable); - cats.put(cat); + cats.push_back(cat); if (droppable.countNoCopy() > 0) { - llwarns << "*** Need to confirm this step" << llendl; + LL_WARNS() << "*** Need to confirm this step" << LL_ENDL; } LLViewerObject* root_object = obj; if (obj->getParent()) @@ -2316,7 +2316,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory( rv = gInventory.isCategoryComplete(cat->getUUID()) ? ACCEPT_YES_MULTI : ACCEPT_NO; if(rv < ACCEPT_YES_SINGLE) { - lldebugs << "Category " << cat->getUUID() << "is not complete." << llendl; + LL_DEBUGS() << "Category " << cat->getUUID() << "is not complete." << LL_ENDL; break; } } @@ -2338,7 +2338,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory( rv = willObjectAcceptInventory(root_object, item); if (rv < ACCEPT_YES_COPY_SINGLE) { - lldebugs << "Object will not accept " << item->getUUID() << llendl; + LL_DEBUGS() << "Object will not accept " << item->getUUID() << LL_ENDL; break; } } @@ -2379,7 +2379,7 @@ BOOL LLToolDragAndDrop::dadUpdateInventoryCategory(LLViewerObject* obj, EAcceptance LLToolDragAndDrop::dad3dGiveInventoryObject( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dGiveInventoryObject()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dGiveInventoryObject()" << LL_ENDL; // item has to be in agent inventory. if(mSource != SOURCE_AGENT) return ACCEPT_NO; @@ -2417,7 +2417,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryObject( EAcceptance LLToolDragAndDrop::dad3dGiveInventory( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dGiveInventory()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dGiveInventory()" << LL_ENDL; // item has to be in agent inventory. if(mSource != SOURCE_AGENT) return ACCEPT_NO; LLViewerInventoryItem* item; @@ -2440,7 +2440,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventory( EAcceptance LLToolDragAndDrop::dad3dGiveInventoryCategory( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dGiveInventoryCategory()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dGiveInventoryCategory()" << LL_ENDL; if(drop && obj) { LLViewerInventoryItem* item; @@ -2458,7 +2458,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryCategory( EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dRezFromObjectOnLand()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezFromObjectOnLand()" << LL_ENDL; LLViewerInventoryItem* item = NULL; LLViewerInventoryCategory* cat = NULL; locateInventory(item, cat); @@ -2479,7 +2479,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand( EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnObject( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { - lldebugs << "LLToolDragAndDrop::dad3dRezFromObjectOnObject()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dRezFromObjectOnObject()" << LL_ENDL; LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); @@ -2516,7 +2516,7 @@ EAcceptance LLToolDragAndDrop::dad3dCategoryOnLand( { return ACCEPT_NO; /* - lldebugs << "LLToolDragAndDrop::dad3dCategoryOnLand()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dCategoryOnLand()" << LL_ENDL; LLInventoryItem* item; LLInventoryCategory* cat; locateInventory(item, cat); @@ -2532,7 +2532,7 @@ EAcceptance LLToolDragAndDrop::dad3dCategoryOnLand( items, LLInventoryModel::EXCLUDE_TRASH, droppable); - if(items.count() > 0) + if(items.size() > 0) { rv = ACCEPT_YES_SINGLE; } @@ -2554,19 +2554,19 @@ EAcceptance LLToolDragAndDrop::dad3dAssetOnLand( { return ACCEPT_NO; /* - lldebugs << "LLToolDragAndDrop::dad3dAssetOnLand()" << llendl; + LL_DEBUGS() << "LLToolDragAndDrop::dad3dAssetOnLand()" << LL_ENDL; LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; LLViewerInventoryItem::item_array_t copyable_items; locateMultipleInventory(items, cats); - if(!items.count()) return ACCEPT_NO; + if(!items.size()) return ACCEPT_NO; EAcceptance rv = ACCEPT_NO; - for (S32 i = 0; i < items.count(); i++) + for (S32 i = 0; i < items.size(); i++) { LLInventoryItem* item = items[i]; if(item->getPermissions().allowCopyBy(gAgent.getID())) { - copyable_items.put(item); + copyable_items.push_back(item); rv = ACCEPT_YES_SINGLE; } } @@ -2638,21 +2638,21 @@ LLInventoryObject* LLToolDragAndDrop::locateInventory( LLInventoryObject* LLToolDragAndDrop::locateMultipleInventory(LLViewerInventoryCategory::cat_array_t& cats, LLViewerInventoryItem::item_array_t& items) { - if(mCargoIDs.count() == 0) return NULL; + if(mCargoIDs.size() == 0) return NULL; if((mSource == SOURCE_AGENT) || (mSource == SOURCE_LIBRARY)) { // The object should be in user inventory. - for (S32 i = 0; i < mCargoIDs.count(); i++) + for (S32 i = 0; i < mCargoIDs.size(); i++) { LLInventoryItem* item = gInventory.getItem(mCargoIDs[i]); if (item) { - items.put(item); + items.push_back(item); } LLInventoryCategory* category = gInventory.getCategory(mCargoIDs[i]); if (category) { - cats.put(category); + cats.push_back(category); } } } @@ -2666,23 +2666,23 @@ LLInventoryObject* LLToolDragAndDrop::locateMultipleInventory(LLViewerInventoryC || (mCargoType == DAD_ROOT_CATEGORY)) { // The object should be in user inventory. - for (S32 i = 0; i < mCargoIDs.count(); i++) + for (S32 i = 0; i < mCargoIDs.size(); i++) { LLInventoryCategory* category = (LLInventoryCategory*)obj->getInventoryObject(mCargoIDs[i]); if (category) { - cats.put(category); + cats.push_back(category); } } } else { - for (S32 i = 0; i < mCargoIDs.count(); i++) + for (S32 i = 0; i < mCargoIDs.size(); i++) { LLInventoryItem* item = (LLInventoryItem*)obj->getInventoryObject(mCargoIDs[i]); if (item) { - items.put(item); + items.push_back(item); } } } @@ -2694,18 +2694,18 @@ LLInventoryObject* LLToolDragAndDrop::locateMultipleInventory(LLViewerInventoryC card = (LLPreviewNotecard*)LLPreview::find(mSourceID); if(card) { - items.put((LLInventoryItem*)card->getDragItem()); + items.push_back((LLInventoryItem*)card->getDragItem()); } } - if(items.count()) return items[0]; - if(cats.count()) return cats[0]; + if(items.size()) return items[0]; + if(cats.size()) return cats[0]; return NULL; } */ // void LLToolDragAndDrop::createContainer(LLViewerInventoryItem::item_array_t &items, const char* preferred_name ) // { -// llwarns << "LLToolDragAndDrop::createContainer()" << llendl; +// LL_WARNS() << "LLToolDragAndDrop::createContainer()" << LL_ENDL; // return; // } |