diff options
Diffstat (limited to 'indra/llui')
52 files changed, 528 insertions, 443 deletions
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index d636161baf..b787794b95 100755 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -69,7 +69,7 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params) mSingleExpansion = params.single_expansion; if(mFitParent && !mSingleExpansion) { - llinfos << "fit_parent works best when combined with single_expansion" << llendl; + LL_INFOS() << "fit_parent works best when combined with single_expansion" << LL_ENDL; } } @@ -845,7 +845,7 @@ void LLAccordionCtrl::sort() { if (!mTabComparator) { - llwarns << "No comparator specified for sorting accordion tabs." << llendl; + LL_WARNS() << "No comparator specified for sorting accordion tabs." << LL_ENDL; return; } diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp index 8ede4e3468..30cb18812b 100755 --- a/indra/llui/llbadge.cpp +++ b/indra/llui/llbadge.cpp @@ -105,7 +105,7 @@ LLBadge::LLBadge(const LLBadge::Params& p) { if (mImage.isNull()) { - llwarns << "Badge: " << getName() << " with no image!" << llendl; + LL_WARNS() << "Badge: " << getName() << " with no image!" << LL_ENDL; } if (p.location_offset_hcenter.isProvided()) @@ -335,7 +335,7 @@ void LLBadge::draw() } else { - lldebugs << "No image for badge " << getName() << " on owner " << owner_view->getName() << llendl; + LL_DEBUGS() << "No image for badge " << getName() << " on owner " << owner_view->getName() << LL_ENDL; renderBadgeBackground(badge_center_x, badge_center_y, badge_width, badge_height, diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index ed12f686a1..913793803c 100755 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -252,7 +252,7 @@ LLButton::LLButton(const LLButton::Params& p) if (mImageUnselected.isNull()) { - llwarns << "Button: " << getName() << " with no image!" << llendl; + LL_WARNS() << "Button: " << getName() << " with no image!" << LL_ENDL; } if (p.click_callback.isProvided()) @@ -591,7 +591,7 @@ BOOL LLButton::handleHover(S32 x, S32 y, MASK mask) // We only handle the click if the click both started and ended within us getWindow()->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << LL_ENDL; } return TRUE; } @@ -816,7 +816,7 @@ void LLButton::draw() else { // no image - lldebugs << "No image for button " << getName() << llendl; + LL_DEBUGS() << "No image for button " << getName() << LL_ENDL; // draw it in pink so we can find it gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, LLColor4::pink1 % alpha, FALSE); } @@ -1039,7 +1039,7 @@ void LLButton::setImageUnselected(LLPointer<LLUIImage> image) mImageUnselected = image; if (mImageUnselected.isNull()) { - llwarns << "Setting default button image for: " << getName() << " to NULL" << llendl; + LL_WARNS() << "Setting default button image for: " << getName() << " to NULL" << LL_ENDL; } } diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp index 625fb8e870..74ef8dd0c3 100755 --- a/indra/llui/llcommandmanager.cpp +++ b/indra/llui/llcommandmanager.cpp @@ -137,7 +137,7 @@ void LLCommandManager::addCommand(LLCommand * command) mCommandIndices[command_id.uuid()] = mCommands.size(); mCommands.push_back(command); - lldebugs << "Successfully added command: " << command->name() << llendl; + LL_DEBUGS() << "Successfully added command: " << command->name() << LL_ENDL; } //static @@ -153,13 +153,13 @@ bool LLCommandManager::load() if (!parser.readXUI(commands_file, commandsParams)) { - llerrs << "Unable to load xml file: " << commands_file << llendl; + LL_ERRS() << "Unable to load xml file: " << commands_file << LL_ENDL; return false; } if (!commandsParams.validateBlock()) { - llerrs << "Invalid commands file: " << commands_file << llendl; + LL_ERRS() << "Invalid commands file: " << commands_file << LL_ENDL; return false; } diff --git a/indra/llui/llcontainerview.cpp b/indra/llui/llcontainerview.cpp index 6b1e3ce669..727fbe850e 100755 --- a/indra/llui/llcontainerview.cpp +++ b/indra/llui/llcontainerview.cpp @@ -188,7 +188,7 @@ void LLContainerView::arrange(S32 width, S32 height, BOOL called_from_parent) LLView *childp = *child_iter; if (!childp->getVisible()) { - llwarns << "Incorrect visibility!" << llendl; + LL_WARNS() << "Incorrect visibility!" << LL_ENDL; } LLRect child_rect = childp->getRequiredRect(); child_height += child_rect.getHeight(); diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp index a36bc4743e..b7f67f8556 100755 --- a/indra/llui/lldraghandle.cpp +++ b/indra/llui/lldraghandle.cpp @@ -365,13 +365,13 @@ BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask) mDragLastScreenY += delta_y; getWindow()->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" <<llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" <<LL_ENDL; handled = TRUE; } else { getWindow()->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL; handled = TRUE; } diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 43c22f8bf3..299f5e42d4 100755 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -347,7 +347,7 @@ void LLFlatListView::sort() { if (!mItemComparator) { - llwarns << "No comparator specified for sorting FlatListView items." << llendl; + LL_WARNS() << "No comparator specified for sorting FlatListView items." << LL_ENDL; return; } diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 11802904e4..7d0779d88d 100755 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -133,7 +133,7 @@ bool LLFloater::KeyCompare::compare(const LLSD& a, const LLSD& b) { if (a.type() != b.type()) { - //llerrs << "Mismatched LLSD types: (" << a << ") mismatches (" << b << ")" << llendl; + //LL_ERRS() << "Mismatched LLSD types: (" << a << ") mismatches (" << b << ")" << LL_ENDL; return false; } else if (a.isUndefined()) @@ -1102,7 +1102,7 @@ BOOL LLFloater::canSnapTo(const LLView* other_view) { if (NULL == other_view) { - llwarns << "other_view is NULL" << llendl; + LL_WARNS() << "other_view is NULL" << LL_ENDL; return FALSE; } @@ -3158,7 +3158,7 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str LLFastTimer _(FTM_EXTERNAL_FLOATER_LOAD); if (!LLUICtrlFactory::getLayeredXMLNode(xml_filename, referenced_xml)) { - llwarns << "Couldn't parse panel from: " << xml_filename << llendl; + LL_WARNS() << "Couldn't parse panel from: " << xml_filename << LL_ENDL; return FALSE; } @@ -3239,7 +3239,7 @@ bool LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::str if (!result) { - llerrs << "Failed to construct floater " << getName() << llendl; + LL_ERRS() << "Failed to construct floater " << getName() << LL_ENDL; } applyRectControl(); // If we have a saved rect control, apply it @@ -3284,20 +3284,20 @@ bool LLFloater::buildFromFile(const std::string& filename) if (!LLUICtrlFactory::getLayeredXMLNode(filename, root)) { - llwarns << "Couldn't find (or parse) floater from: " << filename << llendl; + LL_WARNS() << "Couldn't find (or parse) floater from: " << filename << LL_ENDL; return false; } // root must be called floater if( !(root->hasName("floater") || root->hasName("multi_floater")) ) { - llwarns << "Root node should be named floater in: " << filename << llendl; + LL_WARNS() << "Root node should be named floater in: " << filename << LL_ENDL; return false; } bool res = true; - lldebugs << "Building floater " << filename << llendl; + LL_DEBUGS() << "Building floater " << filename << LL_ENDL; LLUICtrlFactory::instance().pushFileName(filename); { if (!getFactoryMap().empty()) diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index 1cdddf0d5b..072addfa4a 100755 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -151,13 +151,13 @@ LLFloater* LLFloaterReg::getInstance(const std::string& name, const LLSD& key) res = build_func(key); if (!res) { - llwarns << "Failed to build floater type: '" << name << "'." << llendl; + LL_WARNS() << "Failed to build floater type: '" << name << "'." << LL_ENDL; return NULL; } bool success = res->buildFromFile(xui_file); if (!success) { - llwarns << "Failed to build floater type: '" << name << "'." << llendl; + LL_WARNS() << "Failed to build floater type: '" << name << "'." << LL_ENDL; return NULL; } @@ -179,7 +179,7 @@ LLFloater* LLFloaterReg::getInstance(const std::string& name, const LLSD& key) } if (!res) { - llwarns << "Floater type: '" << name << "' not registered." << llendl; + LL_WARNS() << "Floater type: '" << name << "' not registered." << LL_ENDL; } } return res; @@ -475,7 +475,7 @@ void LLFloaterReg::toggleInstanceOrBringToFront(const LLSD& sdname, const LLSD& if (!instance) { - lldebugs << "Unable to get instance of floater '" << name << "'" << llendl; + LL_DEBUGS() << "Unable to get instance of floater '" << name << "'" << LL_ENDL; return; } diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp index 724d190307..c1fe70bc26 100755 --- a/indra/llui/llfocusmgr.cpp +++ b/indra/llui/llfocusmgr.cpp @@ -358,11 +358,11 @@ void LLFocusMgr::setMouseCapture( LLMouseHandler* new_captor ) { if (new_captor) { - llinfos << "New mouse captor: " << new_captor->getName() << llendl; + LL_INFOS() << "New mouse captor: " << new_captor->getName() << LL_ENDL; } else { - llinfos << "New mouse captor: NULL" << llendl; + LL_INFOS() << "New mouse captor: NULL" << LL_ENDL; } } diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index b5ac7db4e7..92504ba8c2 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -636,7 +636,7 @@ BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, } if (handled) { - LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFolderViewItem" << llendl; + LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFolderViewItem" << LL_ENDL; } return handled; @@ -1753,7 +1753,7 @@ BOOL LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask, { handleDragAndDropToThisFolder(mask, drop, cargo_type, cargo_data, accept, tooltip_msg); - LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFolderViewFolder" << llendl; + LL_DEBUGS("UserInput") << "dragAndDrop handled by LLFolderViewFolder" << LL_ENDL; } return TRUE; diff --git a/indra/llui/llfunctorregistry.h b/indra/llui/llfunctorregistry.h index beac212441..f5364f4863 100755 --- a/indra/llui/llfunctorregistry.h +++ b/indra/llui/llfunctorregistry.h @@ -75,7 +75,7 @@ public: } else { - llerrs << "attempt to store duplicate name '" << name << "' in LLFunctorRegistry. NOT ADDED." << llendl; + LL_ERRS() << "attempt to store duplicate name '" << name << "' in LLFunctorRegistry. NOT ADDED." << LL_ENDL; retval = false; } @@ -86,7 +86,7 @@ public: { if (mMap.count(name) == 0) { - llwarns << "trying to remove '" << name << "' from LLFunctorRegistry but it's not there." << llendl; + LL_WARNS() << "trying to remove '" << name << "' from LLFunctorRegistry but it's not there." << LL_ENDL; return false; } mMap.erase(name); @@ -101,7 +101,7 @@ public: } else { - lldebugs << "tried to find '" << name << "' in LLFunctorRegistry, but it wasn't there." << llendl; + LL_DEBUGS() << "tried to find '" << name << "' in LLFunctorRegistry, but it wasn't there." << LL_ENDL; return mMap[LOGFUNCTOR]; } } @@ -113,7 +113,7 @@ private: static void log_functor(const LLSD& notification, const LLSD& payload) { - lldebugs << "log_functor called with payload: " << payload << llendl; + LL_DEBUGS() << "log_functor called with payload: " << payload << LL_ENDL; } static void do_nothing(const LLSD& notification, const LLSD& payload) diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h index 5930741d5c..dbc4999678 100755 --- a/indra/llui/lllayoutstack.h +++ b/indra/llui/lllayoutstack.h @@ -62,7 +62,7 @@ public: /*virtual*/ void draw(); /*virtual*/ void removeChild(LLView*); /*virtual*/ BOOL postBuild(); - /*virtual*/ bool addChild(LLView* child, S32 tab_groupdatefractuiona = 0); + /*virtual*/ bool addChild(LLView* child, S32 tab_group = 0); /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index f2e9843bf3..d410a2de33 100755 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -785,7 +785,7 @@ BOOL LLLineEditor::handleMouseDown(S32 x, S32 y, MASK mask) BOOL LLLineEditor::handleMiddleMouseDown(S32 x, S32 y, MASK mask) { - // llinfos << "MiddleMouseDown" << llendl; + // LL_INFOS() << "MiddleMouseDown" << LL_ENDL; setFocus( TRUE ); if( canPastePrimary() ) { @@ -855,14 +855,14 @@ BOOL LLLineEditor::handleHover(S32 x, S32 y, MASK mask) mKeystrokeTimer.reset(); getWindow()->setCursor(UI_CURSOR_IBEAM); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << LL_ENDL; handled = TRUE; } if( !handled ) { getWindow()->setCursor(UI_CURSOR_IBEAM); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL; handled = TRUE; } @@ -1347,7 +1347,7 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) case KEY_BACKSPACE: if (!mReadOnly) { - //llinfos << "Handling backspace" << llendl; + //LL_INFOS() << "Handling backspace" << LL_ENDL; if( hasSelection() ) { deleteSelection(); @@ -2379,7 +2379,7 @@ void LLLineEditor::resetPreedit() { if (hasPreeditString()) { - llwarns << "Preedit and selection!" << llendl; + LL_WARNS() << "Preedit and selection!" << LL_ENDL; deselect(); } else @@ -2543,7 +2543,7 @@ void LLLineEditor::markAsPreedit(S32 position, S32 length) setCursor(position); if (hasPreeditString()) { - llwarns << "markAsPreedit invoked when hasPreeditString is true." << llendl; + LL_WARNS() << "markAsPreedit invoked when hasPreeditString is true." << LL_ENDL; } mPreeditWString.assign( LLWString( mText.getWString(), position, length ) ); if (length > 0) diff --git a/indra/llui/llmenubutton.cpp b/indra/llui/llmenubutton.cpp index 746ade4648..0609cd8b42 100755 --- a/indra/llui/llmenubutton.cpp +++ b/indra/llui/llmenubutton.cpp @@ -96,7 +96,7 @@ void LLMenuButton::setMenu(const std::string& menu_filename, EMenuPosition posit LLToggleableMenu* menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(menu_filename, LLMenuGL::sMenuContainer, LLMenuHolderGL::child_registry_t::instance()); if (!menu) { - llwarns << "Error loading menu_button menu" << llendl; + LL_WARNS() << "Error loading menu_button menu" << LL_ENDL; return; } diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 385dbc6e19..38afee9b79 100755 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -280,7 +280,7 @@ BOOL LLMenuItemGL::addToAcceleratorList(std::list <LLKeyBinding*> *listp) // warning.append("\n "); // warning.append(mLabel); - // llwarns << warning << llendl; + // LL_WARNS() << warning << LL_ENDL; // LLAlertDialog::modalAlert(warning); return FALSE; } @@ -1962,7 +1962,7 @@ bool LLMenuGL::scrollItems(EScrollingDirection direction) break; } default: - llwarns << "Unknown scrolling direction: " << direction << llendl; + LL_WARNS() << "Unknown scrolling direction: " << direction << LL_ENDL; } mNeedsArrange = TRUE; @@ -2562,8 +2562,8 @@ BOOL LLMenuGL::appendMenu( LLMenuGL* menu ) { if( menu == this ) { - llerrs << "** Attempt to attach menu to itself. This is certainly " - << "a logic error." << llendl; + LL_ERRS() << "** Attempt to attach menu to itself. This is certainly " + << "a logic error." << LL_ENDL; } BOOL success = TRUE; @@ -2591,7 +2591,7 @@ BOOL LLMenuGL::appendContextSubMenu(LLMenuGL *menu) { if (menu == this) { - llerrs << "Can't attach a context menu to itself" << llendl; + LL_ERRS() << "Can't attach a context menu to itself" << LL_ENDL; } LLContextMenuBranch *item; @@ -3114,7 +3114,7 @@ LLMenuGL* LLMenuGL::findChildMenuByName(const std::string& name, BOOL recurse) c return menup; } } - llwarns << "Child Menu " << name << " not found in menu " << getName() << llendl; + LL_WARNS() << "Child Menu " << name << " not found in menu " << getName() << LL_ENDL; return NULL; } @@ -3419,8 +3419,8 @@ BOOL LLMenuBarGL::appendMenu( LLMenuGL* menu ) { if( menu == this ) { - llerrs << "** Attempt to attach menu to itself. This is certainly " - << "a logic error." << llendl; + LL_ERRS() << "** Attempt to attach menu to itself. This is certainly " + << "a logic error." << LL_ENDL; } BOOL success = TRUE; diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp index 8aefef07e2..45505e232e 100755 --- a/indra/llui/llmodaldialog.cpp +++ b/indra/llui/llmodaldialog.cpp @@ -65,7 +65,7 @@ LLModalDialog::~LLModalDialog() std::list<LLModalDialog*>::iterator iter = std::find(sModalStack.begin(), sModalStack.end(), this); if (iter != sModalStack.end()) { - llerrs << "Attempt to delete dialog while still in sModalStack!" << llendl; + LL_ERRS() << "Attempt to delete dialog while still in sModalStack!" << LL_ENDL; } } @@ -126,7 +126,7 @@ void LLModalDialog::stopModal() } else { - llwarns << "LLModalDialog::stopModal not in list!" << llendl; + LL_WARNS() << "LLModalDialog::stopModal not in list!" << LL_ENDL; } } if (!sModalStack.empty()) @@ -181,7 +181,7 @@ BOOL LLModalDialog::handleHover(S32 x, S32 y, MASK mask) if( childrenHandleHover(x, y, mask) == NULL ) { getWindow()->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << LL_ENDL; } return TRUE; } @@ -300,7 +300,7 @@ void LLModalDialog::shutdownModals() // app, we shouldn't have to care WHAT's open. Put differently, if a modal // dialog is so crucial that we can't let the user terminate until s/he // addresses it, we should reject a termination request. The current state - // of affairs is that we accept it, but then produce an llerrs popup that + // of affairs is that we accept it, but then produce an LL_ERRS() popup that // simply makes our software look unreliable. sModalStack.clear(); } diff --git a/indra/llui/llmultifloater.cpp b/indra/llui/llmultifloater.cpp index 179b251cdb..48b5b08c1b 100755 --- a/indra/llui/llmultifloater.cpp +++ b/indra/llui/llmultifloater.cpp @@ -159,7 +159,7 @@ void LLMultiFloater::addFloater(LLFloater* floaterp, BOOL select_added_floater, if (!mTabContainer) { - llerrs << "Tab Container used without having been initialized." << llendl; + LL_ERRS() << "Tab Container used without having been initialized." << LL_ENDL; return; } diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp index 17d07f4dae..0aa3e17075 100755 --- a/indra/llui/llmultislider.cpp +++ b/indra/llui/llmultislider.cpp @@ -301,7 +301,7 @@ bool LLMultiSlider::findUnusedValue(F32& initVal) // stop if it's filled if(initVal == mInitialValue && !firstTry) { - llwarns << "Whoa! Too many multi slider elements to add one to" << llendl; + LL_WARNS() << "Whoa! Too many multi slider elements to add one to" << LL_ENDL; return false; } @@ -356,12 +356,12 @@ BOOL LLMultiSlider::handleHover(S32 x, S32 y, MASK mask) onCommit(); getWindow()->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << LL_ENDL; } else { getWindow()->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL; } return TRUE; } diff --git a/indra/llui/llmultisliderctrl.cpp b/indra/llui/llmultisliderctrl.cpp index 91e5b6b9de..c460a08afc 100755 --- a/indra/llui/llmultisliderctrl.cpp +++ b/indra/llui/llmultisliderctrl.cpp @@ -450,7 +450,7 @@ void LLMultiSliderCtrl::setPrecision(S32 precision) { if (precision < 0 || precision > 10) { - llerrs << "LLMultiSliderCtrl::setPrecision - precision out of range" << llendl; + LL_ERRS() << "LLMultiSliderCtrl::setPrecision - precision out of range" << LL_ENDL; return; } diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 7932299281..fbeb8355db 100755 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -246,7 +246,7 @@ LLNotificationForm::LLNotificationForm(const LLSD& sd) } else { - llwarns << "Invalid form data " << sd << llendl; + LL_WARNS() << "Invalid form data " << sd << LL_ENDL; mFormData = LLSD::emptyArray(); } } @@ -438,11 +438,11 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par mUniqueContext.push_back(context.value); } - lldebugs << "notification \"" << mName << "\": tag count is " << p.tags.size() << llendl; + LL_DEBUGS() << "notification \"" << mName << "\": tag count is " << p.tags.size() << LL_ENDL; BOOST_FOREACH(const LLNotificationTemplate::Tag& tag, p.tags) { - lldebugs << " tag \"" << std::string(tag.value) << "\"" << llendl; + LL_DEBUGS() << " tag \"" << std::string(tag.value) << "\"" << LL_ENDL; mTags.push_back(tag.value); } @@ -1405,7 +1405,7 @@ void LLNotifications::forceResponse(const LLNotification::Params& params, S32 op if (selected_item.isUndefined()) { - llwarns << "Invalid option" << option << " for notification " << (std::string)params.name << llendl; + LL_WARNS() << "Invalid option" << option << " for notification " << (std::string)params.name << LL_ENDL; return; } response[selected_item["name"].asString()] = true; @@ -1439,12 +1439,12 @@ void replaceSubstitutionStrings(LLXMLNodePtr node, StringMap& replacements) if (found != replacements.end()) { replacement = found->second; - lldebugs << "replaceSubstitutionStrings: value: \"" << value << "\" repl: \"" << replacement << "\"." << llendl; + LL_DEBUGS() << "replaceSubstitutionStrings: value: \"" << value << "\" repl: \"" << replacement << "\"." << LL_ENDL; it->second->setValue(replacement); } else { - llwarns << "replaceSubstitutionStrings FAILURE: could not find replacement \"" << value << "\"." << llendl; + LL_WARNS() << "replaceSubstitutionStrings FAILURE: could not find replacement \"" << value << "\"." << LL_ENDL; } } } @@ -1483,7 +1483,7 @@ void addPathIfExists(const std::string& new_path, std::vector<std::string>& path bool LLNotifications::loadTemplates() { - llinfos << "Reading notifications template" << llendl; + LL_INFOS() << "Reading notifications template" << LL_ENDL; // Passing findSkinnedFilenames(constraint=LLDir::ALL_SKINS) makes it // output all relevant pathnames instead of just the ones from the most // specific skin. @@ -1496,7 +1496,7 @@ bool LLNotifications::loadTemplates() if (!success || root.isNull() || !root->hasName( "notifications" )) { - llerrs << "Problem reading XML from UI Notifications file: " << base_filename << llendl; + LL_ERRS() << "Problem reading XML from UI Notifications file: " << base_filename << LL_ENDL; return false; } @@ -1506,7 +1506,7 @@ bool LLNotifications::loadTemplates() if(!params.validateBlock()) { - llerrs << "Problem reading XUI from UI Notifications file: " << base_filename << llendl; + LL_ERRS() << "Problem reading XUI from UI Notifications file: " << base_filename << LL_ENDL; return false; } @@ -1554,7 +1554,7 @@ bool LLNotifications::loadTemplates() mTemplates[notification.name] = LLNotificationTemplatePtr(new LLNotificationTemplate(notification)); } - llinfos << "...done" << llendl; + LL_INFOS() << "...done" << LL_ENDL; return true; } @@ -1572,7 +1572,7 @@ bool LLNotifications::loadVisibilityRules() if(!params.validateBlock()) { - llerrs << "Problem reading UI Notification Visibility Rules file: " << full_filename << llendl; + LL_ERRS() << "Problem reading UI Notification Visibility Rules file: " << full_filename << LL_ENDL; return false; } @@ -1637,7 +1637,7 @@ void LLNotifications::add(const LLNotificationPtr pNotif) LLNotificationSet::iterator it=mItems.find(pNotif); if (it != mItems.end()) { - llerrs << "Notification added a second time to the master notification channel." << llendl; + LL_ERRS() << "Notification added a second time to the master notification channel." << LL_ENDL; } updateItem(LLSD().with("sigtype", "add").with("id", pNotif->id()), pNotif); @@ -1695,7 +1695,7 @@ LLNotificationPtr LLNotifications::find(LLUUID uuid) LLNotificationSet::iterator it=mItems.find(target); if (it == mItems.end()) { - LL_DEBUGS("Notifications") << "Tried to dereference uuid '" << uuid << "' as a notification key but didn't find it." << llendl; + LL_DEBUGS("Notifications") << "Tried to dereference uuid '" << uuid << "' as a notification key but didn't find it." << LL_ENDL; return LLNotificationPtr((LLNotification*)NULL); } else @@ -1746,13 +1746,13 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n) for(it = mVisibilityRules.begin(); it != mVisibilityRules.end(); it++) { // An empty type/tag/name string will match any notification, so only do the comparison when the string is non-empty in the rule. - lldebugs + LL_DEBUGS() << "notification \"" << n->getName() << "\" " << "testing against " << ((*it)->mVisible?"show":"hide") << " rule, " << "name = \"" << (*it)->mName << "\" " << "tag = \"" << (*it)->mTag << "\" " << "type = \"" << (*it)->mType << "\" " - << llendl; + << LL_ENDL; if(!(*it)->mType.empty()) { @@ -1791,7 +1791,7 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n) if((*it)->mResponse.empty()) { // Response property is empty. Cancel this notification. - lldebugs << "cancelling notification " << n->getName() << llendl; + LL_DEBUGS() << "cancelling notification " << n->getName() << LL_ENDL; cancel(n); } @@ -1802,7 +1802,7 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n) // TODO: verify that the response template has an item with the correct name response[(*it)->mResponse] = true; - lldebugs << "responding to notification " << n->getName() << " with response = " << response << llendl; + LL_DEBUGS() << "responding to notification " << n->getName() << " with response = " << response << LL_ENDL; n->respond(response); } @@ -1814,7 +1814,7 @@ bool LLNotifications::isVisibleByRules(LLNotificationPtr n) break; } - lldebugs << "allowing notification " << n->getName() << llendl; + LL_DEBUGS() << "allowing notification " << n->getName() << LL_ENDL; return true; } @@ -1875,7 +1875,7 @@ void LLPostponedNotification::onAvatarNameCache(const LLUUID& agent_id, // from PE merge - we should figure out if this is the right thing to do if (name.empty()) { - llwarns << "Empty name received for Id: " << agent_id << llendl; + LL_WARNS() << "Empty name received for Id: " << agent_id << LL_ENDL; name = SYSTEM_FROM; } diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index f157d6a923..389d18a350 100755 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -391,7 +391,7 @@ LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLXMLNodePtr output_ panelp = LLRegisterPanelClass::instance().createPanelClass(class_attr); if (!panelp) { - llwarns << "Panel class \"" << class_attr << "\" not registered." << llendl; + LL_WARNS() << "Panel class \"" << class_attr << "\" not registered." << LL_ENDL; } } @@ -529,7 +529,7 @@ BOOL LLPanel::initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr outpu LLFastTimer timer(FTM_EXTERNAL_PANEL_LOAD); if (!LLUICtrlFactory::getLayeredXMLNode(xml_filename, referenced_xml)) { - llwarns << "Couldn't parse panel from: " << xml_filename << llendl; + LL_WARNS() << "Couldn't parse panel from: " << xml_filename << LL_ENDL; return FALSE; } @@ -599,11 +599,11 @@ std::string LLPanel::getString(const std::string& name, const LLStringUtil::form std::string err_str("Failed to find string " + name + " in panel " + getName()); //*TODO: Translate if(LLUI::sSettingGroups["config"]->getBOOL("QAMode")) { - llerrs << err_str << llendl; + LL_ERRS() << err_str << LL_ENDL; } else { - llwarns << err_str << llendl; + LL_WARNS() << err_str << LL_ENDL; } return LLStringUtil::null; } @@ -618,11 +618,11 @@ std::string LLPanel::getString(const std::string& name) const std::string err_str("Failed to find string " + name + " in panel " + getName()); //*TODO: Translate if(LLUI::sSettingGroups["config"]->getBOOL("QAMode")) { - llerrs << err_str << llendl; + LL_ERRS() << err_str << LL_ENDL; } else { - llwarns << err_str << llendl; + LL_WARNS() << err_str << LL_ENDL; } return LLStringUtil::null; } @@ -976,18 +976,18 @@ BOOL LLPanel::buildFromFile(const std::string& filename, const LLPanel::Params& if (!LLUICtrlFactory::getLayeredXMLNode(filename, root)) { - llwarns << "Couldn't parse panel from: " << filename << llendl; + LL_WARNS() << "Couldn't parse panel from: " << filename << LL_ENDL; return didPost; } // root must be called panel if( !root->hasName("panel" ) ) { - llwarns << "Root node should be named panel in : " << filename << llendl; + LL_WARNS() << "Root node should be named panel in : " << filename << LL_ENDL; return didPost; } - lldebugs << "Building panel " << filename << llendl; + LL_DEBUGS() << "Building panel " << filename << LL_ENDL; LLUICtrlFactory::instance().pushFileName(filename); { diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp index 95a7d09382..b53bb16d97 100755 --- a/indra/llui/llradiogroup.cpp +++ b/indra/llui/llradiogroup.cpp @@ -289,7 +289,7 @@ BOOL LLRadioGroup::handleMouseDown(S32 x, S32 y, MASK mask) void LLRadioGroup::onClickButton(LLUICtrl* ctrl) { - // llinfos << "LLRadioGroup::onClickButton" << llendl; + // LL_INFOS() << "LLRadioGroup::onClickButton" << LL_ENDL; LLRadioCtrl* clicked_radio = dynamic_cast<LLRadioCtrl*>(ctrl); if (!clicked_radio) return; @@ -319,7 +319,7 @@ void LLRadioGroup::onClickButton(LLUICtrl* ctrl) index++; } - llwarns << "LLRadioGroup::onClickButton - clicked button that isn't a child" << llendl; + LL_WARNS() << "LLRadioGroup::onClickButton - clicked button that isn't a child" << LL_ENDL; } void LLRadioGroup::setValue( const LLSD& value ) diff --git a/indra/llui/llresmgr.cpp b/indra/llui/llresmgr.cpp index 7488af2e05..6e924c1f19 100755 --- a/indra/llui/llresmgr.cpp +++ b/indra/llui/llresmgr.cpp @@ -315,7 +315,7 @@ LLLocale::LLLocale(const std::string& locale_string) } //else //{ - // llinfos << "Set locale to " << new_locale_string << llendl; + // LL_INFOS() << "Set locale to " << new_locale_string << LL_ENDL; //} } diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp index f92e8f41ea..76134144a0 100755 --- a/indra/llui/llscrollbar.cpp +++ b/indra/llui/llscrollbar.cpp @@ -381,7 +381,7 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask) } getWindow()->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << LL_ENDL; handled = TRUE; } else @@ -393,7 +393,7 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask) if( !handled ) { getWindow()->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL; handled = TRUE; } diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp index 93eea75952..e1d401d94a 100755 --- a/indra/llui/llscrollcontainer.cpp +++ b/indra/llui/llscrollcontainer.cpp @@ -643,7 +643,7 @@ void LLScrollContainer::scrollToShowRect(const LLRect& rect, const LLRect& const { if (!mScrolledView) { - llwarns << "LLScrollContainer::scrollToShowRect with no view!" << llendl; + LL_WARNS() << "LLScrollContainer::scrollToShowRect with no view!" << LL_ENDL; return; } diff --git a/indra/llui/llscrollingpanellist.cpp b/indra/llui/llscrollingpanellist.cpp index 9b65c2b79d..b6f2eb8ba2 100755 --- a/indra/llui/llscrollingpanellist.cpp +++ b/indra/llui/llscrollingpanellist.cpp @@ -111,7 +111,7 @@ void LLScrollingPanelList::removePanel( U32 panel_index ) { if ( mPanelList.empty() || panel_index >= mPanelList.size() ) { - llwarns << "Panel index " << panel_index << " is out of range!" << llendl; + LL_WARNS() << "Panel index " << panel_index << " is out of range!" << LL_ENDL; return; } else diff --git a/indra/llui/llscrolllistitem.cpp b/indra/llui/llscrolllistitem.cpp index 5a1e96ab03..87cd71c505 100755 --- a/indra/llui/llscrolllistitem.cpp +++ b/indra/llui/llscrolllistitem.cpp @@ -82,7 +82,7 @@ void LLScrollListItem::setColumn( S32 column, LLScrollListCell *cell ) } else { - llerrs << "LLScrollListItem::setColumn: bad column: " << column << llendl; + LL_ERRS() << "LLScrollListItem::setColumn: bad column: " << column << LL_ENDL; } } diff --git a/indra/llui/llslider.cpp b/indra/llui/llslider.cpp index ddddbe6f30..ebbb951ee6 100755 --- a/indra/llui/llslider.cpp +++ b/indra/llui/llslider.cpp @@ -188,12 +188,12 @@ BOOL LLSlider::handleHover(S32 x, S32 y, MASK mask) setValueAndCommit(t * (mMaxValue - mMinValue) + mMinValue ); } getWindow()->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << LL_ENDL; } else { getWindow()->setCursor(UI_CURSOR_ARROW); - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (inactive)" << LL_ENDL; } return TRUE; } diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp index 583ed1ed2e..62c5ecb8f1 100755 --- a/indra/llui/llsliderctrl.cpp +++ b/indra/llui/llsliderctrl.cpp @@ -403,7 +403,7 @@ void LLSliderCtrl::setPrecision(S32 precision) { if (precision < 0 || precision > 10) { - llerrs << "LLSliderCtrl::setPrecision - precision out of range" << llendl; + LL_ERRS() << "LLSliderCtrl::setPrecision - precision out of range" << LL_ENDL; return; } diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index 8a728df2e7..ebdbdf59c0 100755 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -384,7 +384,7 @@ void LLSpinCtrl::setPrecision(S32 precision) { if (precision < 0 || precision > 10) { - llerrs << "LLSpinCtrl::setPrecision - precision out of range" << llendl; + LL_ERRS() << "LLSpinCtrl::setPrecision - precision out of range" << LL_ENDL; return; } @@ -400,7 +400,7 @@ void LLSpinCtrl::setLabel(const LLStringExplicit& label) } else { - llwarns << "Attempting to set label on LLSpinCtrl constructed without one " << getName() << llendl; + LL_WARNS() << "Attempting to set label on LLSpinCtrl constructed without one " << getName() << LL_ENDL; } updateLabelColor(); } diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index 1af36c6fdb..900f81992c 100755 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -160,7 +160,8 @@ LLStatBar::LLStatBar(const Params& p) mOrientation(p.orientation), mAutoScaleMax(!p.bar_max.isProvided()), mAutoScaleMin(!p.bar_min.isProvided()), - mTickValue(p.tick_spacing) + mTickValue(p.tick_spacing), + mLastDisplayValue(0.f) { // tick value will be automatically calculated later if (!p.tick_spacing.isProvided() && p.bar_min.isProvided() && p.bar_max.isProvided()) @@ -219,323 +220,281 @@ BOOL LLStatBar::handleMouseDown(S32 x, S32 y, MASK mask) return TRUE; } -void LLStatBar::draw() +template<typename T> +S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const T& stat, const LLUnit<F32, LLUnits::Seconds> time_period) { - F32 current = 0, - min = 0, - max = 0, - mean = 0; + LLUnit<F32, LLUnits::Seconds> elapsed_time, + time_since_value_changed; + S32 num_rapid_changes = 0; + const LLUnit<F32, LLUnits::Seconds> RAPID_CHANGE_THRESHOLD = LLUnits::Seconds::fromValue(0.3f); - bool show_data = false; - - LLLocalClipRect _(getLocalRect()); - LLTrace::PeriodicRecording& frame_recording = LLTrace::get_frame_recording(); + F64 last_value = periodic_recording.getPrevRecording(1).getLastValue(stat); + for (S32 i = 2; i < periodic_recording.getNumRecordedPeriods(); i++) + { + LLTrace::Recording& recording = periodic_recording.getPrevRecording(i); + F64 cur_value = recording.getLastValue(stat); - S32 num_frames = mDisplayHistory ? mNumHistoryFrames : mNumShortHistoryFrames; + if (last_value != cur_value) + { + if (time_since_value_changed < RAPID_CHANGE_THRESHOLD) num_rapid_changes++; + time_since_value_changed = 0; + } + last_value = cur_value; - std::string unit_label; - if (mCountFloatp) - { - LLTrace::Recording& last_frame_recording = frame_recording.getLastRecording(); - unit_label = mUnitLabel.empty() ? mCountFloatp->getUnitLabel() : mUnitLabel; - unit_label += "/s"; - current = last_frame_recording.getPerSec(*mCountFloatp); - min = frame_recording.getPeriodMinPerSec(*mCountFloatp, num_frames); - max = frame_recording.getPeriodMaxPerSec(*mCountFloatp, num_frames); - mean = frame_recording.getPeriodMeanPerSec(*mCountFloatp, num_frames); - - // always show count-style data - show_data = true; + elapsed_time += recording.getDuration(); + if (elapsed_time > time_period) break; } - else if (mEventFloatp) + + return num_rapid_changes; +} + +S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const LLTrace::TraceType<LLTrace::CountAccumulator>& stat, const LLUnit<F32, LLUnits::Seconds> time_period) +{ + LLUnit<F32, LLUnits::Seconds> elapsed_time, + time_since_value_changed; + S32 num_rapid_changes = 0; + const LLUnit<F32, LLUnits::Seconds> RAPID_CHANGE_THRESHOLD = LLUnits::Seconds::fromValue(0.3f); + + F64 last_value = periodic_recording.getPrevRecording(1).getSum(stat); + for (S32 i = 1; i < periodic_recording.getNumRecordedPeriods(); i++) { - LLTrace::Recording& last_frame_recording = frame_recording.getLastRecording(); - unit_label = mUnitLabel.empty() ? mEventFloatp->getUnitLabel() : mUnitLabel; + LLTrace::Recording& recording = periodic_recording.getPrevRecording(i); + F64 cur_value = recording.getSum(stat); - // only show data if there is an event in the relevant time period - current = last_frame_recording.getMean(*mEventFloatp); - min = frame_recording.getPeriodMin(*mEventFloatp, num_frames); - max = frame_recording.getPeriodMax(*mEventFloatp, num_frames); - mean = frame_recording.getPeriodMean(*mEventFloatp, num_frames); + if (last_value != cur_value) + { + if (time_since_value_changed < RAPID_CHANGE_THRESHOLD) num_rapid_changes++; + time_since_value_changed = 0; + } + last_value = cur_value; - show_data = frame_recording.getSampleCount(*mEventFloatp, num_frames) != 0; + elapsed_time += recording.getDuration(); + if (elapsed_time > time_period) break; } - else if (mSampleFloatp) - { - LLTrace::Recording& last_frame_recording = frame_recording.getLastRecording(); - unit_label = mUnitLabel.empty() ? mSampleFloatp->getUnitLabel() : mUnitLabel; + return num_rapid_changes; +} - current = last_frame_recording.getMean(*mSampleFloatp); - min = frame_recording.getPeriodMin(*mSampleFloatp, num_frames); - max = frame_recording.getPeriodMax(*mSampleFloatp, num_frames); - mean = frame_recording.getPeriodMean(*mSampleFloatp, num_frames); +void LLStatBar::draw() +{ + LLLocalClipRect _(getLocalRect()); - // always show sample data if we've ever grabbed any samples - show_data = mSampleFloatp->getPrimaryAccumulator()->hasValue(); - } + LLTrace::PeriodicRecording& frame_recording = LLTrace::get_frame_recording(); + LLTrace::Recording& last_frame_recording = frame_recording.getLastRecording(); - S32 bar_top, bar_left, bar_right, bar_bottom; - if (mOrientation == HORIZONTAL) + std::string unit_label; + F32 current = 0, + min = 0, + max = 0, + mean = 0, + display_value = 0; + S32 num_frames = mDisplayHistory + ? mNumHistoryFrames + : mNumShortHistoryFrames; + S32 num_rapid_changes = 0; + + const S32 MAX_RAPID_CHANGES = 6; + const F32 MIN_VALUE_UPDATE_TIME = 1.f / 4.f; + const LLUnit<F32, LLUnits::Seconds> CHANGE_WINDOW = LLUnits::Seconds::fromValue(2.f); + + if (mCountFloatp) { - bar_top = llmax(5, getRect().getHeight() - 15); - bar_left = 0; - bar_right = getRect().getWidth() - 40; - bar_bottom = llmin(bar_top - 5, 0); + const LLTrace::TraceType<LLTrace::CountAccumulator>& count_stat = *mCountFloatp; + + unit_label = mUnitLabel.empty() ? (std::string(count_stat.getUnitLabel()) + "/s") : mUnitLabel; + current = last_frame_recording.getPerSec(count_stat); + min = frame_recording.getPeriodMinPerSec(count_stat, num_frames); + max = frame_recording.getPeriodMaxPerSec(count_stat, num_frames); + mean = frame_recording.getPeriodMeanPerSec(count_stat, num_frames); + num_rapid_changes = calc_num_rapid_changes(frame_recording, count_stat, CHANGE_WINDOW); } - else // VERTICAL + else if (mEventFloatp) { - bar_top = llmax(5, getRect().getHeight() - 15); - bar_left = 0; - bar_right = getRect().getWidth(); - bar_bottom = llmin(bar_top - 5, 20); - } - const S32 tick_length = 4; - const S32 tick_width = 1; + const LLTrace::TraceType<LLTrace::EventAccumulator>& event_stat = *mEventFloatp; - if ((mAutoScaleMax && max >= mCurMaxBar)|| (mAutoScaleMin && min <= mCurMinBar)) - { - F32 range_min = mAutoScaleMin ? llmin(mMinBar, min) : mMinBar; - F32 range_max = mAutoScaleMax ? llmax(mMaxBar, max) : mMaxBar; - F32 tick_value = 0.f; - calc_auto_scale_range(range_min, range_max, tick_value); - if (mAutoScaleMin) { mMinBar = range_min; } - if (mAutoScaleMax) { mMaxBar = range_max; } - if (mAutoScaleMin && mAutoScaleMax) - { - mTickValue = tick_value; - } - else - { - mTickValue = calc_tick_value(mMinBar, mMaxBar); - } + unit_label = mUnitLabel.empty() ? event_stat.getUnitLabel() : mUnitLabel; + + current = last_frame_recording.getLastValue(event_stat); + min = frame_recording.getPeriodMin(event_stat, num_frames); + max = frame_recording.getPeriodMax(event_stat, num_frames); + mean = frame_recording.getPeriodMean(event_stat, num_frames); + num_rapid_changes = calc_num_rapid_changes(frame_recording, event_stat, CHANGE_WINDOW); } + else if (mSampleFloatp) + { + const LLTrace::TraceType<LLTrace::SampleAccumulator>& sample_stat = *mSampleFloatp; - mCurMaxBar = LLSmoothInterpolation::lerp(mCurMaxBar, mMaxBar, 0.05f); - mCurMinBar = LLSmoothInterpolation::lerp(mCurMinBar, mMinBar, 0.05f); + unit_label = mUnitLabel.empty() ? sample_stat.getUnitLabel() : mUnitLabel; - F32 value_scale; - if (mCurMaxBar == mCurMinBar) - { - value_scale = 0.f; + current = last_frame_recording.getLastValue(sample_stat); + min = frame_recording.getPeriodMin(sample_stat, num_frames); + max = frame_recording.getPeriodMax(sample_stat, num_frames); + mean = frame_recording.getPeriodMean(sample_stat, num_frames); + num_rapid_changes = calc_num_rapid_changes(frame_recording, sample_stat, CHANGE_WINDOW); } - else + + if (mLastDisplayValueTimer.getElapsedTimeF32() > MIN_VALUE_UPDATE_TIME) { - value_scale = (mOrientation == HORIZONTAL) - ? (bar_top - bar_bottom)/(mCurMaxBar - mCurMinBar) - : (bar_right - bar_left)/(mCurMaxBar - mCurMinBar); + mLastDisplayValueTimer.reset(); + display_value = (num_rapid_changes > MAX_RAPID_CHANGES) + ? mean + : current; + mLastDisplayValue = display_value; } - - LLFontGL::getFontMonospace()->renderUTF8(mLabel, 0, 0, getRect().getHeight(), LLColor4(1.f, 1.f, 1.f, 1.f), - LLFontGL::LEFT, LLFontGL::TOP); - - S32 decimal_digits = mDecimalDigits; - if (is_approx_equal((F32)(S32)mean, mean)) + else { - decimal_digits = 0; + display_value = mLastDisplayValue; } - std::string value_str = show_data - ? llformat("%10.*f %s", decimal_digits, mean, unit_label.c_str()) - : "n/a"; - // Draw the current value. + LLRect bar_rect; if (mOrientation == HORIZONTAL) { - LLFontGL::getFontMonospace()->renderUTF8(value_str, 0, bar_right, getRect().getHeight(), - LLColor4(1.f, 1.f, 1.f, 0.5f), - LLFontGL::RIGHT, LLFontGL::TOP); + bar_rect.mTop = llmax(5, getRect().getHeight() - 15); + bar_rect.mLeft = 0; + bar_rect.mRight = getRect().getWidth() - 40; + bar_rect.mBottom = llmin(bar_rect.mTop - 5, 0); } - else + else // VERTICAL { - LLFontGL::getFontMonospace()->renderUTF8(value_str, 0, bar_right, getRect().getHeight(), - LLColor4(1.f, 1.f, 1.f, 0.5f), - LLFontGL::RIGHT, LLFontGL::TOP); + bar_rect.mTop = llmax(5, getRect().getHeight() - 15); + bar_rect.mLeft = 0; + bar_rect.mRight = getRect().getWidth(); + bar_rect.mBottom = llmin(bar_rect.mTop - 5, 20); } + mCurMaxBar = LLSmoothInterpolation::lerp(mCurMaxBar, mMaxBar, 0.05f); + mCurMinBar = LLSmoothInterpolation::lerp(mCurMinBar, mMinBar, 0.05f); + + drawLabelAndValue(display_value, unit_label, bar_rect); + if (mDisplayBar && (mCountFloatp || mEventFloatp || mSampleFloatp)) { // Draw the tick marks. LLGLSUIDefault gls_ui; gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - S32 last_tick = 0; - S32 last_label = 0; - const S32 MIN_TICK_SPACING = mOrientation == HORIZONTAL ? 20 : 30; - const S32 MIN_LABEL_SPACING = mOrientation == HORIZONTAL ? 30 : 60; - // start counting from actual min, not current, animating min, so that ticks don't float between numbers - // ensure ticks always hit 0 - if (mTickValue > 0.f) + + F32 value_scale; + if (mCurMaxBar == mCurMinBar) + { + value_scale = 0.f; + } + else { - F32 start = mCurMinBar < 0.f - ? llceil(-mCurMinBar / mTickValue) * -mTickValue - : 0.f; - for (F32 tick_value = start; ;tick_value += mTickValue) + value_scale = (mOrientation == HORIZONTAL) + ? (bar_rect.getHeight())/(mCurMaxBar - mCurMinBar) + : (bar_rect.getWidth())/(mCurMaxBar - mCurMinBar); + } + + drawTicks(min, max, value_scale, bar_rect); + + // draw background bar. + gl_rect_2d(bar_rect.mLeft, bar_rect.mTop, bar_rect.mRight, bar_rect.mBottom, LLColor4(0.f, 0.f, 0.f, 0.25f)); + + // draw values + if (!llisnan(display_value) && frame_recording.getNumRecordedPeriods() != 0) + { + // draw min and max + S32 begin = (S32) ((min - mCurMinBar) * value_scale); + + if (begin < 0) { - const S32 begin = llfloor((tick_value - mCurMinBar)*value_scale); - const S32 end = begin + tick_width; - if (begin - last_tick < MIN_TICK_SPACING) - { - continue; - } - last_tick = begin; + begin = 0; + } - S32 decimal_digits = mDecimalDigits; - if (is_approx_equal((F32)(S32)tick_value, tick_value)) - { - decimal_digits = 0; - } - std::string tick_string = llformat("%10.*f", decimal_digits, tick_value); + S32 end = (S32) ((max - mCurMinBar) * value_scale); + if (mOrientation == HORIZONTAL) + { + gl_rect_2d(bar_rect.mLeft, end, bar_rect.mRight, begin, LLColor4(1.f, 0.f, 0.f, 0.25f)); + } + else // VERTICAL + { + gl_rect_2d(begin, bar_rect.mTop, end, bar_rect.mBottom, LLColor4(1.f, 0.f, 0.f, 0.25f)); + } - if (mOrientation == HORIZONTAL) + F32 span = (mOrientation == HORIZONTAL) + ? (bar_rect.getWidth()) + : (bar_rect.getHeight()); + + if (mDisplayHistory && (mCountFloatp || mEventFloatp || mSampleFloatp)) + { + const S32 num_values = frame_recording.getNumRecordedPeriods() - 1; + F32 value = 0; + S32 i; + gGL.color4f( 1.f, 0.f, 0.f, 1.f ); + gGL.begin( LLRender::QUADS ); + const S32 max_frame = llmin(num_frames, num_values); + U32 num_samples = 0; + for (i = 1; i <= max_frame; i++) { - if (begin - last_label > MIN_LABEL_SPACING) + F32 offset = ((F32)i / (F32)num_frames) * span; + LLTrace::Recording& recording = frame_recording.getPrevRecording(i); + + if (mCountFloatp) { - gl_rect_2d(bar_left, end, bar_right - tick_length, begin, LLColor4(1.f, 1.f, 1.f, 0.25f)); - LLFontGL::getFontMonospace()->renderUTF8(tick_string, 0, bar_right, begin, - LLColor4(1.f, 1.f, 1.f, 0.5f), - LLFontGL::LEFT, LLFontGL::VCENTER); - last_label = begin; + value = recording.getPerSec(*mCountFloatp); + num_samples = recording.getSampleCount(*mCountFloatp); } - else + else if (mEventFloatp) { - gl_rect_2d(bar_left, end, bar_right - tick_length/2, begin, LLColor4(1.f, 1.f, 1.f, 0.1f)); + value = recording.getMean(*mEventFloatp); + num_samples = recording.getSampleCount(*mEventFloatp); } - } - else - { - if (begin - last_label > MIN_LABEL_SPACING) + else if (mSampleFloatp) + { + value = recording.getMean(*mSampleFloatp); + num_samples = recording.getSampleCount(*mSampleFloatp); + } + + if (!num_samples) continue; + + F32 begin = (value - mCurMinBar) * value_scale; + if (mOrientation == HORIZONTAL) { - gl_rect_2d(begin, bar_top, end, bar_bottom - tick_length, LLColor4(1.f, 1.f, 1.f, 0.25f)); - LLFontGL::getFontMonospace()->renderUTF8(tick_string, 0, begin - 1, bar_bottom - tick_length, - LLColor4(1.f, 1.f, 1.f, 0.5f), - LLFontGL::RIGHT, LLFontGL::TOP); - last_label = begin; + gGL.vertex2f((F32)bar_rect.mRight - offset, begin + 1); + gGL.vertex2f((F32)bar_rect.mRight - offset, begin); + gGL.vertex2f((F32)bar_rect.mRight - offset - 1, begin); + gGL.vertex2f((F32)bar_rect.mRight - offset - 1, begin + 1); } else { - gl_rect_2d(begin, bar_top, end, bar_bottom - tick_length/2, LLColor4(1.f, 1.f, 1.f, 0.1f)); + gGL.vertex2f(begin, (F32)bar_rect.mBottom + offset + 1); + gGL.vertex2f(begin, (F32)bar_rect.mBottom + offset); + gGL.vertex2f(begin + 1, (F32)bar_rect.mBottom + offset); + gGL.vertex2f(begin + 1, (F32)bar_rect.mBottom + offset + 1 ); } } - // always draw one tick value past end, so we can see part of the text, if possible - if (tick_value > mCurMaxBar) + gGL.end(); + } + else + { + S32 begin = (S32) ((current - mCurMinBar) * value_scale) - 1; + S32 end = (S32) ((current - mCurMinBar) * value_scale) + 1; + // draw current + if (mOrientation == HORIZONTAL) + { + gl_rect_2d(bar_rect.mLeft, end, bar_rect.mRight, begin, LLColor4(1.f, 0.f, 0.f, 1.f)); + } + else { - break; + gl_rect_2d(begin, bar_rect.mTop, end, bar_rect.mBottom, LLColor4(1.f, 0.f, 0.f, 1.f)); } } - } - - // draw background bar. - gl_rect_2d(bar_left, bar_top, bar_right, bar_bottom, LLColor4(0.f, 0.f, 0.f, 0.25f)); - - if (frame_recording.getNumRecordedPeriods() == 0) - { - // No data, don't draw anything... - return; - } - // draw min and max - S32 begin = (S32) ((min - mCurMinBar) * value_scale); - - if (begin < 0) - { - begin = 0; - } - - S32 end = (S32) ((max - mCurMinBar) * value_scale); - if (mOrientation == HORIZONTAL) - { - gl_rect_2d(bar_left, end, bar_right, begin, LLColor4(1.f, 0.f, 0.f, 0.25f)); - } - else // VERTICAL - { - gl_rect_2d(begin, bar_top, end, bar_bottom, LLColor4(1.f, 0.f, 0.f, 0.25f)); + // draw mean bar + { + const S32 begin = (S32) ((mean - mCurMinBar) * value_scale) - 1; + const S32 end = (S32) ((mean - mCurMinBar) * value_scale) + 1; + if (mOrientation == HORIZONTAL) + { + gl_rect_2d(bar_rect.mLeft - 2, begin, bar_rect.mRight + 2, end, LLColor4(0.f, 1.f, 0.f, 1.f)); + } + else + { + gl_rect_2d(begin, bar_rect.mTop + 2, end, bar_rect.mBottom - 2, LLColor4(0.f, 1.f, 0.f, 1.f)); + } + } } - - if (show_data) - { - F32 span = (mOrientation == HORIZONTAL) - ? (bar_right - bar_left) - : (bar_top - bar_bottom); - - if (mDisplayHistory && (mCountFloatp || mEventFloatp || mSampleFloatp)) - { - const S32 num_values = frame_recording.getNumRecordedPeriods() - 1; - F32 value = 0; - S32 i; - gGL.color4f( 1.f, 0.f, 0.f, 1.f ); - gGL.begin( LLRender::QUADS ); - const S32 max_frame = llmin(num_frames, num_values); - U32 num_samples = 0; - for (i = 1; i <= max_frame; i++) - { - F32 offset = ((F32)i / (F32)num_frames) * span; - LLTrace::Recording& recording = frame_recording.getPrevRecording(i); - - if (mCountFloatp) - { - value = recording.getPerSec(*mCountFloatp); - num_samples = recording.getSampleCount(*mCountFloatp); - } - else if (mEventFloatp) - { - value = recording.getMean(*mEventFloatp); - num_samples = recording.getSampleCount(*mEventFloatp); - } - else if (mSampleFloatp) - { - value = recording.getMean(*mSampleFloatp); - num_samples = recording.getSampleCount(*mSampleFloatp); - } - - if (!num_samples) continue; - - F32 begin = (value - mCurMinBar) * value_scale; - if (mOrientation == HORIZONTAL) - { - gGL.vertex2f((F32)bar_right - offset, begin + 1); - gGL.vertex2f((F32)bar_right - offset, begin); - gGL.vertex2f((F32)bar_right - offset - 1, begin); - gGL.vertex2f((F32)bar_right - offset - 1, begin + 1); - } - else - { - gGL.vertex2f(begin, (F32)bar_bottom + offset + 1); - gGL.vertex2f(begin, (F32)bar_bottom + offset); - gGL.vertex2f(begin + 1, (F32)bar_bottom + offset); - gGL.vertex2f(begin + 1, (F32)bar_bottom + offset + 1 ); - } - } - gGL.end(); - } - else - { - S32 begin = (S32) ((current - mCurMinBar) * value_scale) - 1; - S32 end = (S32) ((current - mCurMinBar) * value_scale) + 1; - // draw current - if (mOrientation == HORIZONTAL) - { - gl_rect_2d(bar_left, end, bar_right, begin, LLColor4(1.f, 0.f, 0.f, 1.f)); - } - else - { - gl_rect_2d(begin, bar_top, end, bar_bottom, LLColor4(1.f, 0.f, 0.f, 1.f)); - } - } - - // draw mean bar - { - const S32 begin = (S32) ((mean - mCurMinBar) * value_scale) - 1; - const S32 end = (S32) ((mean - mCurMinBar) * value_scale) + 1; - if (mOrientation == HORIZONTAL) - { - gl_rect_2d(bar_left - 2, begin, bar_right + 2, end, LLColor4(0.f, 1.f, 0.f, 1.f)); - } - else - { - gl_rect_2d(begin, bar_top + 2, end, bar_bottom - 2, LLColor4(0.f, 1.f, 0.f, 1.f)); - } - } - } } LLView::draw(); @@ -578,3 +537,124 @@ LLRect LLStatBar::getRequiredRect() return rect; } +void LLStatBar::drawLabelAndValue( F32 value, std::string &label, LLRect &bar_rect ) +{ + LLFontGL::getFontMonospace()->renderUTF8(mLabel, 0, 0, getRect().getHeight(), LLColor4(1.f, 1.f, 1.f, 1.f), + LLFontGL::LEFT, LLFontGL::TOP); + + S32 decimal_digits = mDecimalDigits; + if (is_approx_equal((F32)(S32)value, value)) + { + decimal_digits = 0; + } + std::string value_str = !llisnan(value) + ? llformat("%10.*f %s", decimal_digits, value, label.c_str()) + : "n/a"; + + // Draw the current value. + if (mOrientation == HORIZONTAL) + { + LLFontGL::getFontMonospace()->renderUTF8(value_str, 0, bar_rect.mRight, getRect().getHeight(), + LLColor4(1.f, 1.f, 1.f, 0.5f), + LLFontGL::RIGHT, LLFontGL::TOP); + } + else + { + LLFontGL::getFontMonospace()->renderUTF8(value_str, 0, bar_rect.mRight, getRect().getHeight(), + LLColor4(1.f, 1.f, 1.f, 0.5f), + LLFontGL::RIGHT, LLFontGL::TOP); + } +} + +void LLStatBar::drawTicks( F32 min, F32 max, F32 value_scale, LLRect &bar_rect ) +{ + if ((mAutoScaleMax && max >= mCurMaxBar)|| (mAutoScaleMin && min <= mCurMinBar)) + { + F32 range_min = mAutoScaleMin ? llmin(mMinBar, min) : mMinBar; + F32 range_max = mAutoScaleMax ? llmax(mMaxBar, max) : mMaxBar; + F32 tick_value = 0.f; + calc_auto_scale_range(range_min, range_max, tick_value); + if (mAutoScaleMin) { mMinBar = range_min; } + if (mAutoScaleMax) { mMaxBar = range_max; } + if (mAutoScaleMin && mAutoScaleMax) + { + mTickValue = tick_value; + } + else + { + mTickValue = calc_tick_value(mMinBar, mMaxBar); + } + } + + // start counting from actual min, not current, animating min, so that ticks don't float between numbers + // ensure ticks always hit 0 + S32 last_tick = 0; + S32 last_label = 0; + if (mTickValue > 0.f && value_scale > 0.f) + { + const S32 MIN_TICK_SPACING = mOrientation == HORIZONTAL ? 20 : 30; + const S32 MIN_LABEL_SPACING = mOrientation == HORIZONTAL ? 30 : 60; + const S32 TICK_LENGTH = 4; + const S32 TICK_WIDTH = 1; + + F32 start = mCurMinBar < 0.f + ? llceil(-mCurMinBar / mTickValue) * -mTickValue + : 0.f; + for (F32 tick_value = start; ;tick_value += mTickValue) + { + const S32 begin = llfloor((tick_value - mCurMinBar)*value_scale); + const S32 end = begin + TICK_WIDTH; + if (begin - last_tick < MIN_TICK_SPACING) + { + continue; + } + last_tick = begin; + + S32 decimal_digits = mDecimalDigits; + if (is_approx_equal((F32)(S32)tick_value, tick_value)) + { + decimal_digits = 0; + } + std::string tick_string = llformat("%10.*f", decimal_digits, tick_value); + + if (mOrientation == HORIZONTAL) + { + if (begin - last_label > MIN_LABEL_SPACING) + { + gl_rect_2d(bar_rect.mLeft, end, bar_rect.mRight - TICK_LENGTH, begin, LLColor4(1.f, 1.f, 1.f, 0.25f)); + LLFontGL::getFontMonospace()->renderUTF8(tick_string, 0, bar_rect.mRight, begin, + LLColor4(1.f, 1.f, 1.f, 0.5f), + LLFontGL::LEFT, LLFontGL::VCENTER); + last_label = begin; + } + else + { + gl_rect_2d(bar_rect.mLeft, end, bar_rect.mRight - TICK_LENGTH/2, begin, LLColor4(1.f, 1.f, 1.f, 0.1f)); + } + } + else + { + if (begin - last_label > MIN_LABEL_SPACING) + { + gl_rect_2d(begin, bar_rect.mTop, end, bar_rect.mBottom - TICK_LENGTH, LLColor4(1.f, 1.f, 1.f, 0.25f)); + LLFontGL::getFontMonospace()->renderUTF8(tick_string, 0, begin - 1, bar_rect.mBottom - TICK_LENGTH, + LLColor4(1.f, 1.f, 1.f, 0.5f), + LLFontGL::RIGHT, LLFontGL::TOP); + last_label = begin; + } + else + { + gl_rect_2d(begin, bar_rect.mTop, end, bar_rect.mBottom - TICK_LENGTH/2, LLColor4(1.f, 1.f, 1.f, 0.1f)); + } + } + // always draw one tick value past end, so we can see part of the text, if possible + if (tick_value > mCurMaxBar) + { + break; + } + } + } +} + + + diff --git a/indra/llui/llstatbar.h b/indra/llui/llstatbar.h index 5aed98fecf..dd4d9400a5 100755 --- a/indra/llui/llstatbar.h +++ b/indra/llui/llstatbar.h @@ -89,6 +89,9 @@ public: /*virtual*/ LLRect getRequiredRect(); // Return the height of this object, given the set options. private: + void drawLabelAndValue( F32 mean, std::string &unit_label, LLRect &bar_rect ); + void drawTicks( F32 min, F32 max, F32 value_scale, LLRect &bar_rect ); + F32 mMinBar, mMaxBar, mCurMaxBar, @@ -104,10 +107,12 @@ private: mAutoScaleMax, mAutoScaleMin; EOrientation mOrientation; + F32 mLastDisplayValue; + LLFrameTimer mLastDisplayValueTimer; - LLTrace::TraceType<LLTrace::CountAccumulator>* mCountFloatp; - LLTrace::TraceType<LLTrace::EventAccumulator>* mEventFloatp; - LLTrace::TraceType<LLTrace::SampleAccumulator>* mSampleFloatp; + const LLTrace::TraceType<LLTrace::CountAccumulator>* mCountFloatp; + const LLTrace::TraceType<LLTrace::EventAccumulator>* mEventFloatp; + const LLTrace::TraceType<LLTrace::SampleAccumulator>* mSampleFloatp; LLUIString mLabel; std::string mUnitLabel; diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 415da0b3d6..180120c0cb 100755 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -1572,7 +1572,7 @@ BOOL LLTabContainer::selectTabByName(const std::string& name) LLPanel* panel = getPanelByName(name); if (!panel) { - llwarns << "LLTabContainer::selectTabByName(" << name << ") failed" << llendl; + LL_WARNS() << "LLTabContainer::selectTabByName(" << name << ") failed" << LL_ENDL; return FALSE; } diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 7243931dbb..94cf93bd3c 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -687,7 +687,7 @@ void LLTextBase::drawText() seg_iter++; if (seg_iter == mSegments.end()) { - llwarns << "Ran off the segmentation end!" << llendl; + LL_WARNS() << "Ran off the segmentation end!" << LL_ENDL; return; } @@ -1487,7 +1487,7 @@ void LLTextBase::reflow() // use an even number of iterations to avoid user visible oscillation of the layout if(++reflow_count > 2) { - lldebugs << "Breaking out of reflow due to possible infinite loop in " << getName() << llendl; + LL_DEBUGS() << "Breaking out of reflow due to possible infinite loop in " << getName() << LL_ENDL; break; } @@ -2120,7 +2120,7 @@ void LLTextBase::setFont(const LLFontGL* font) void LLTextBase::needsReflow(S32 index) { - lldebugs << "reflow on object " << (void*)this << " index = " << mReflowIndex << ", new index = " << index << llendl; + LL_DEBUGS() << "reflow on object " << (void*)this << " index = " << mReflowIndex << ", new index = " << index << LL_ENDL; mReflowIndex = llmin(mReflowIndex, index); } @@ -3162,7 +3162,7 @@ void LLNormalTextSegment::setToolTip(const std::string& tooltip) // we cannot replace a keyword tooltip that's loaded from a file if (mToken) { - llwarns << "LLTextSegment::setToolTip: cannot replace keyword tooltip." << llendl; + LL_WARNS() << "LLTextSegment::setToolTip: cannot replace keyword tooltip." << LL_ENDL; return; } memDisclaim(mTooltip); @@ -3220,14 +3220,14 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin if(getLength() < segment_offset + mStart) { - llinfos << "getLength() < segment_offset + mStart\t getLength()\t" << getLength() << "\tsegment_offset:\t" - << segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << "\tmax_chars\t" << max_chars << llendl; + LL_INFOS() << "getLength() < segment_offset + mStart\t getLength()\t" << getLength() << "\tsegment_offset:\t" + << segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << "\tmax_chars\t" << max_chars << LL_ENDL; } if(offsetString.length() + 1 < max_chars) { - llinfos << "offsetString.length() + 1 < max_chars\t max_chars:\t" << max_chars << "\toffsetString.length():\t" << offsetString.length() << " getLength() : " - << getLength() << "\tsegment_offset:\t" << segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << llendl; + LL_INFOS() << "offsetString.length() + 1 < max_chars\t max_chars:\t" << max_chars << "\toffsetString.length():\t" << offsetString.length() << " getLength() : " + << getLength() << "\tsegment_offset:\t" << segment_offset << "\tmStart:\t" << mStart << "\tsegments\t" << mEditor.mSegments.size() << LL_ENDL; } S32 num_chars = mStyle->getFont()->maxDrawableChars(offsetString.c_str(), @@ -3257,13 +3257,13 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin void LLNormalTextSegment::dump() const { - llinfos << "Segment [" << + LL_INFOS() << "Segment [" << // mColor.mV[VX] << ", " << // mColor.mV[VY] << ", " << // mColor.mV[VZ] << "]\t[" << mStart << ", " << getEnd() << "]" << - llendl; + LL_ENDL; } /*virtual*/ diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index eb5a04d8e5..36431d3723 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -781,7 +781,7 @@ BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask) setCursorAtLocalPos( clamped_x, clamped_y, true ); mSelectionEnd = mCursorPos; } - LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << LL_ENDL; getWindow()->setCursor(UI_CURSOR_IBEAM); handled = TRUE; } @@ -2586,20 +2586,20 @@ BOOL LLTextEditor::importBuffer(const char* buffer, S32 length ) instream.getline(tbuf, MAX_STRING); if( 1 != sscanf(tbuf, "Linden text version %d", &version) ) { - llwarns << "Invalid Linden text file header " << llendl; + LL_WARNS() << "Invalid Linden text file header " << LL_ENDL; return FALSE; } if( 1 != version ) { - llwarns << "Invalid Linden text file version: " << version << llendl; + LL_WARNS() << "Invalid Linden text file version: " << version << LL_ENDL; return FALSE; } instream.getline(tbuf, MAX_STRING); if( 0 != sscanf(tbuf, "{") ) { - llwarns << "Invalid Linden text file format" << llendl; + LL_WARNS() << "Invalid Linden text file format" << LL_ENDL; return FALSE; } @@ -2607,13 +2607,13 @@ BOOL LLTextEditor::importBuffer(const char* buffer, S32 length ) instream.getline(tbuf, MAX_STRING); if( 1 != sscanf(tbuf, "Text length %d", &text_len) ) { - llwarns << "Invalid Linden text length field" << llendl; + LL_WARNS() << "Invalid Linden text length field" << LL_ENDL; return FALSE; } if( text_len > mMaxTextByteLength ) { - llwarns << "Invalid Linden text length: " << text_len << llendl; + LL_WARNS() << "Invalid Linden text length: " << text_len << LL_ENDL; return FALSE; } @@ -2622,21 +2622,21 @@ BOOL LLTextEditor::importBuffer(const char* buffer, S32 length ) char* text = new char[ text_len + 1]; if (text == NULL) { - llerrs << "Memory allocation failure." << llendl; + LL_ERRS() << "Memory allocation failure." << LL_ENDL; return FALSE; } instream.get(text, text_len + 1, '\0'); text[text_len] = '\0'; if( text_len != (S32)strlen(text) )/* Flawfinder: ignore */ { - llwarns << llformat("Invalid text length: %d != %d ",strlen(text),text_len) << llendl;/* Flawfinder: ignore */ + LL_WARNS() << llformat("Invalid text length: %d != %d ",strlen(text),text_len) << LL_ENDL;/* Flawfinder: ignore */ success = FALSE; } instream.getline(tbuf, MAX_STRING); if( success && (0 != sscanf(tbuf, "}")) ) { - llwarns << "Invalid Linden text file format: missing terminal }" << llendl; + LL_WARNS() << "Invalid Linden text file format: missing terminal }" << LL_ENDL; success = FALSE; } @@ -2699,7 +2699,7 @@ void LLTextEditor::resetPreedit() { if (hasSelection()) { - llwarns << "Preedit and selection!" << llendl; + LL_WARNS() << "Preedit and selection!" << LL_ENDL; deselect(); } @@ -2889,7 +2889,7 @@ void LLTextEditor::markAsPreedit(S32 position, S32 length) setCursorPos(position); if (hasPreeditString()) { - llwarns << "markAsPreedit invoked when hasPreeditString is true." << llendl; + LL_WARNS() << "markAsPreedit invoked when hasPreeditString is true." << LL_ENDL; } mPreeditWString = LLWString( getWText(), position, length ); if (length > 0) diff --git a/indra/llui/lltextparser.cpp b/indra/llui/lltextparser.cpp index 8a85f99e0c..0b36241da0 100755 --- a/indra/llui/lltextparser.cpp +++ b/indra/llui/lltextparser.cpp @@ -228,7 +228,7 @@ bool LLTextParser::saveToDisk(LLSD highlights) std::string filename=getFileName(); if (filename.empty()) { - llwarns << "LLTextParser::saveToDisk() no valid user directory." << llendl; + LL_WARNS() << "LLTextParser::saveToDisk() no valid user directory." << LL_ENDL; return FALSE; } llofstream file; diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp index f683758962..8d1017c1b4 100755 --- a/indra/llui/lltoolbar.cpp +++ b/indra/llui/lltoolbar.cpp @@ -157,7 +157,7 @@ void LLToolBar::createContextMenu() } else { - llwarns << "Unable to load toolbars context menu." << llendl; + LL_WARNS() << "Unable to load toolbars context menu." << LL_ENDL; } } @@ -1063,7 +1063,7 @@ BOOL LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, mDragRank = getRankFromPosition(x, y); // Don't DaD if we're dragging a command on itself mDragAndDropTarget = ((orig_rank != RANK_NONE) && ((mDragRank == orig_rank) || ((mDragRank-1) == orig_rank)) ? false : true); - //llinfos << "Merov debug : DaD, rank = " << mDragRank << ", dragged uui = " << inv_item->getUUID() << llendl; + //LL_INFOS() << "Merov debug : DaD, rank = " << mDragRank << ", dragged uui = " << inv_item->getUUID() << LL_ENDL; /* Do the following if you want to animate the button itself LLCommandId dragged_command(inv_item->getUUID()); removeCommand(dragged_command); diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index 782d26fccb..5e1f12996e 100755 --- a/indra/llui/lltooltip.cpp +++ b/indra/llui/lltooltip.cpp @@ -484,7 +484,7 @@ void LLToolTipMgr::show(const LLToolTip::Params& params) params_with_defaults.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLToolTip>()); if (!params_with_defaults.validateBlock()) { - llwarns << "Could not display tooltip!" << llendl; + LL_WARNS() << "Could not display tooltip!" << LL_ENDL; return; } diff --git a/indra/llui/lltrans.cpp b/indra/llui/lltrans.cpp index 5388069c24..5131f6b704 100755 --- a/indra/llui/lltrans.cpp +++ b/indra/llui/lltrans.cpp @@ -63,8 +63,8 @@ bool LLTrans::parseStrings(LLXMLNodePtr &root, const std::set<std::string>& defa std::string xml_filename = "(strings file)"; if (!root->hasName("strings")) { - llerrs << "Invalid root node name in " << xml_filename - << ": was " << root->getName() << ", expected \"strings\"" << llendl; + LL_ERRS() << "Invalid root node name in " << xml_filename + << ": was " << root->getName() << ", expected \"strings\"" << LL_ENDL; } StringTable string_table; @@ -73,7 +73,7 @@ bool LLTrans::parseStrings(LLXMLNodePtr &root, const std::set<std::string>& defa if (!string_table.validateBlock()) { - llerrs << "Problem reading strings: " << xml_filename << llendl; + LL_ERRS() << "Problem reading strings: " << xml_filename << LL_ENDL; return false; } @@ -107,8 +107,8 @@ bool LLTrans::parseLanguageStrings(LLXMLNodePtr &root) std::string xml_filename = "(language strings file)"; if (!root->hasName("strings")) { - llerrs << "Invalid root node name in " << xml_filename - << ": was " << root->getName() << ", expected \"strings\"" << llendl; + LL_ERRS() << "Invalid root node name in " << xml_filename + << ": was " << root->getName() << ", expected \"strings\"" << LL_ENDL; } StringTable string_table; @@ -117,7 +117,7 @@ bool LLTrans::parseLanguageStrings(LLXMLNodePtr &root) if (!string_table.validateBlock()) { - llerrs << "Problem reading strings: " << xml_filename << llendl; + LL_ERRS() << "Problem reading strings: " << xml_filename << LL_ENDL; return false; } diff --git a/indra/llui/lltransutil.cpp b/indra/llui/lltransutil.cpp index 80d079cbc8..220cee4c90 100755 --- a/indra/llui/lltransutil.cpp +++ b/indra/llui/lltransutil.cpp @@ -44,7 +44,7 @@ bool LLTransUtil::parseStrings(const std::string& xml_filename, const std::set<s bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root, LLDir::ALL_SKINS); if (!success) { - llerrs << "Couldn't load string table " << xml_filename << llendl; + LL_ERRS() << "Couldn't load string table " << xml_filename << LL_ENDL; return false; } @@ -59,7 +59,7 @@ bool LLTransUtil::parseLanguageStrings(const std::string& xml_filename) if (!success) { - llerrs << "Couldn't load localization table " << xml_filename << llendl; + LL_ERRS() << "Couldn't load localization table " << xml_filename << LL_ENDL; return false; } diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 0ddb149738..1f570edd88 100755 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -107,7 +107,7 @@ LLUUID find_ui_sound(const char * namep) LLUUID uuid = LLUUID(NULL); if (!LLUI::sSettingGroups["config"]->controlExists(name)) { - llwarns << "tried to make UI sound for unknown sound name: " << name << llendl; + LL_WARNS() << "tried to make UI sound for unknown sound name: " << name << LL_ENDL; } else { @@ -118,19 +118,19 @@ LLUUID find_ui_sound(const char * namep) { if (LLUI::sSettingGroups["config"]->getBOOL("UISndDebugSpamToggle")) { - llinfos << "UI sound name: " << name << " triggered but silent (null uuid)" << llendl; + LL_INFOS() << "UI sound name: " << name << " triggered but silent (null uuid)" << LL_ENDL; } } else { - llwarns << "UI sound named: " << name << " does not translate to a valid uuid" << llendl; + LL_WARNS() << "UI sound named: " << name << " does not translate to a valid uuid" << LL_ENDL; } } else if (LLUI::sAudioCallback != NULL) { if (LLUI::sSettingGroups["config"]->getBOOL("UISndDebugSpamToggle")) { - llinfos << "UI sound name: " << name << llendl; + LL_INFOS() << "UI sound name: " << name << LL_ENDL; } } } @@ -170,7 +170,7 @@ void LLUI::initClass(const settings_map_t& settings, (get_ptr_in_map(sSettingGroups, std::string("floater")) == NULL) || (get_ptr_in_map(sSettingGroups, std::string("ignores")) == NULL)) { - llerrs << "Failure to initialize configuration groups" << llendl; + LL_ERRS() << "Failure to initialize configuration groups" << LL_ENDL; } sAudioCallback = audio_callback; diff --git a/indra/llui/llui.h b/indra/llui/llui.h index f3ed3fcb49..f7426a703a 100755 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -171,7 +171,7 @@ public: { if (mMin > mMax) { - llwarns << "Bad interval range (" << mMin << ", " << mMax << ")" << llendl; + LL_WARNS() << "Bad interval range (" << mMin << ", " << mMax << ")" << LL_ENDL; // since max is usually the most dangerous one to ignore (buffer overflow, etc), prefer it // in the case of a malformed range mMin = mMax; @@ -410,7 +410,7 @@ private: static void initClass() { - llerrs << "No static initClass() method defined for " << typeid(T).name() << llendl; + LL_ERRS() << "No static initClass() method defined for " << typeid(T).name() << LL_ENDL; } }; @@ -425,7 +425,7 @@ private: static void destroyClass() { - llerrs << "No static destroyClass() method defined for " << typeid(T).name() << llendl; + LL_ERRS() << "No static destroyClass() method defined for " << typeid(T).name() << LL_ENDL; } }; diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp index ffeff15968..244f0c6f00 100755 --- a/indra/llui/lluicolortable.cpp +++ b/indra/llui/lluicolortable.cpp @@ -117,7 +117,7 @@ void LLUIColorTable::insertFromParams(const Params& p, string_color_map_t& table unresolved_refs.erase(iter->second); } - llwarns << warning + ending_ref << llendl; + LL_WARNS() << warning + ending_ref << LL_ENDL; break; } @@ -156,7 +156,7 @@ void LLUIColorTable::insertFromParams(const Params& p, string_color_map_t& table iter != visited_refs.end(); ++iter) { - llwarns << iter->first << " references a non-existent color" << llendl; + LL_WARNS() << iter->first << " references a non-existent color" << LL_ENDL; unresolved_refs.erase(iter->second); } @@ -293,13 +293,13 @@ bool LLUIColorTable::loadFromFilename(const std::string& filename, string_color_ if(!LLXMLNode::parseFile(filename, root, NULL)) { - llwarns << "Unable to parse color file " << filename << llendl; + LL_WARNS() << "Unable to parse color file " << filename << LL_ENDL; return false; } if(!root->hasName("colors")) { - llwarns << filename << " is not a valid color definition file" << llendl; + LL_WARNS() << filename << " is not a valid color definition file" << LL_ENDL; return false; } @@ -313,7 +313,7 @@ bool LLUIColorTable::loadFromFilename(const std::string& filename, string_color_ } else { - llwarns << filename << " failed to load" << llendl; + LL_WARNS() << filename << " failed to load" << LL_ENDL; return false; } diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index 08358484ef..abcd5da6c4 100755 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -212,7 +212,7 @@ LLUICtrl::~LLUICtrl() if( gFocusMgr.getTopCtrl() == this ) { - llwarns << "UI Control holding top ctrl deleted: " << getName() << ". Top view removed." << llendl; + LL_WARNS() << "UI Control holding top ctrl deleted: " << getName() << ". Top view removed." << LL_ENDL; gFocusMgr.removeTopCtrlWithoutCallback( this ); } @@ -258,7 +258,7 @@ LLUICtrl::commit_signal_t::slot_type LLUICtrl::initCommitCallback(const CommitCa } else if (!function_name.empty()) { - llwarns << "No callback found for: '" << function_name << "' in control: " << getName() << llendl; + LL_WARNS() << "No callback found for: '" << function_name << "' in control: " << getName() << LL_ENDL; } } return default_commit_handler; @@ -452,7 +452,7 @@ void LLUICtrl::setControlVariable(LLControlVariable* control) if (mControlVariable) { //RN: this will happen in practice, should we try to avoid it? - //llwarns << "setControlName called twice on same control!" << llendl; + //LL_WARNS() << "setControlName called twice on same control!" << LL_ENDL; mControlConnection.disconnect(); // disconnect current signal mControlVariable = NULL; } diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp index 60fee47ae0..291da2ce48 100755 --- a/indra/llui/lluictrlfactory.cpp +++ b/indra/llui/lluictrlfactory.cpp @@ -131,11 +131,11 @@ void LLUICtrlFactory::createChildren(LLView* viewp, LLXMLNodePtr node, const wid // for the child widget // You might need to add something like: // static ParentWidgetRegistry::Register<ChildWidgetType> register("child_widget_name"); - llwarns << child_name << " is not a valid child of " << node->getName()->mString << llendl; + LL_WARNS() << child_name << " is not a valid child of " << node->getName()->mString << LL_ENDL; } else { - llwarns << "Could not create widget named " << child_node->getName()->mString << llendl; + LL_WARNS() << "Could not create widget named " << child_node->getName()->mString << LL_ENDL; } } diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h index f2fe4334ee..87b3937417 100755 --- a/indra/llui/lluictrlfactory.h +++ b/indra/llui/lluictrlfactory.h @@ -171,7 +171,7 @@ public: if (!LLUICtrlFactory::getLayeredXMLNode(filename, root_node)) { - llwarns << "Couldn't parse XUI file: " << instance().getCurFileName() << llendl; + LL_WARNS() << "Couldn't parse XUI file: " << instance().getCurFileName() << LL_ENDL; goto fail; } @@ -182,7 +182,7 @@ public: // not of right type, so delete it if (!widget) { - llwarns << "Widget in " << filename << " was of type " << typeid(view).name() << " instead of expected type " << typeid(T).name() << llendl; + LL_WARNS() << "Widget in " << filename << " was of type " << typeid(view).name() << " instead of expected type " << typeid(T).name() << LL_ENDL; delete view; view = NULL; } @@ -225,7 +225,7 @@ private: if (!params.validateBlock()) { - llwarns << getInstance()->getCurFileName() << ": Invalid parameter block for " << typeid(T).name() << llendl; + LL_WARNS() << getInstance()->getCurFileName() << ": Invalid parameter block for " << typeid(T).name() << LL_ENDL; //return NULL; } diff --git a/indra/llui/llundo.cpp b/indra/llui/llundo.cpp index 06b0514223..7c4c183a30 100755 --- a/indra/llui/llundo.cpp +++ b/indra/llui/llundo.cpp @@ -51,7 +51,7 @@ LLUndoBuffer::LLUndoBuffer( LLUndoAction (*create_func()), S32 initial_count ) mActions[i] = create_func(); if (!mActions[i]) { - llerrs << "Unable to create action for undo buffer" << llendl; + LL_ERRS() << "Unable to create action for undo buffer" << LL_ENDL; } } } diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 99ee688888..bef9034e55 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -785,7 +785,7 @@ std::string LLUrlEntryParcel::getLabel(const std::string &url, const LLUrlLabelC if (path_parts < 3) // no parcel id { - llwarns << "Failed to parse url [" << url << "]" << llendl; + LL_WARNS() << "Failed to parse url [" << url << "]" << LL_ENDL; return url; } @@ -925,7 +925,7 @@ std::string LLUrlEntryRegion::getLabel(const std::string &url, const LLUrlLabelC if (path_parts < 3) // no region name { - llwarns << "Failed to parse url [" << url << "]" << llendl; + LL_WARNS() << "Failed to parse url [" << url << "]" << LL_ENDL; return url; } diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index daeb4d7939..ae62d72f73 100755 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -159,10 +159,10 @@ LLView::LLView(const LLView::Params& p) LLView::~LLView() { dirtyRect(); - //llinfos << "Deleting view " << mName << ":" << (void*) this << llendl; + //LL_INFOS() << "Deleting view " << mName << ":" << (void*) this << LL_ENDL; if (LLView::sIsDrawing) { - lldebugs << "Deleting view " << mName << " during UI draw() phase" << llendl; + LL_DEBUGS() << "Deleting view " << mName << " during UI draw() phase" << LL_ENDL; } // llassert(LLView::sIsDrawing == FALSE); @@ -170,7 +170,7 @@ LLView::~LLView() if( hasMouseCapture() ) { - //llwarns << "View holding mouse capture deleted: " << getName() << ". Mouse capture removed." << llendl; + //LL_WARNS() << "View holding mouse capture deleted: " << getName() << ". Mouse capture removed." << LL_ENDL; gFocusMgr.removeMouseCaptureWithoutCallback( this ); } @@ -300,7 +300,7 @@ bool LLView::addChild(LLView* child, S32 tab_group) } if (mParentView == child) { - llerrs << "Adding view " << child->getName() << " as child of itself" << llendl; + LL_ERRS() << "Adding view " << child->getName() << " as child of itself" << LL_ENDL; } // remove from current parent @@ -361,7 +361,7 @@ void LLView::removeChild(LLView* child) } else { - llwarns << "\"" << child->getName() << "\" is not a child of " << getName() << llendl; + LL_WARNS() << "\"" << child->getName() << "\" is not a child of " << getName() << LL_ENDL; } updateBoundingRect(); } @@ -687,12 +687,12 @@ BOOL LLView::handleHover(S32 x, S32 y, MASK mask) void LLView::onMouseEnter(S32 x, S32 y, MASK mask) { - //llinfos << "Mouse entered " << getName() << llendl; + //LL_INFOS() << "Mouse entered " << getName() << LL_ENDL; } void LLView::onMouseLeave(S32 x, S32 y, MASK mask) { - //llinfos << "Mouse left " << getName() << llendl; + //LL_INFOS() << "Mouse left " << getName() << LL_ENDL; } bool LLView::visibleAndContains(S32 local_x, S32 local_y) @@ -727,7 +727,7 @@ LLView* LLView::childrenHandleCharEvent(const std::string& desc, const METHOD& m { if (LLView::sDebugKeys) { - llinfos << desc << " handled by " << viewp->getName() << llendl; + LL_INFOS() << desc << " handled by " << viewp->getName() << LL_ENDL; } return viewp; } @@ -920,7 +920,7 @@ BOOL LLView::handleKey(KEY key, MASK mask, BOOL called_from_parent) handled = handleKeyHere( key, mask ); if (handled && LLView::sDebugKeys) { - llinfos << "Key handled by " << getName() << llendl; + LL_INFOS() << "Key handled by " << getName() << LL_ENDL; } } } @@ -957,7 +957,7 @@ BOOL LLView::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent) handled = handleUnicodeCharHere(uni_char); if (handled && LLView::sDebugKeys) { - llinfos << "Unicode key handled by " << getName() << llendl; + LL_INFOS() << "Unicode key handled by " << getName() << LL_ENDL; } } } @@ -1130,7 +1130,7 @@ void LLView::drawChildren() // Check for bogus rectangle if (!getRect().isValid()) { - llwarns << "Bogus rectangle for " << getName() << " with " << mRect << llendl; + LL_WARNS() << "Bogus rectangle for " << getName() << " with " << mRect << LL_ENDL; } } } @@ -2000,7 +2000,7 @@ LLView* LLView::findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESna } break; default: - llerrs << "Invalid snap edge" << llendl; + LL_ERRS() << "Invalid snap edge" << LL_ENDL; } } @@ -2102,7 +2102,7 @@ LLView* LLView::findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESna } break; default: - llerrs << "Invalid snap edge" << llendl; + LL_ERRS() << "Invalid snap edge" << LL_ENDL; } } } @@ -2429,7 +2429,7 @@ static S32 invert_vertical(S32 y, LLView* parent) } else { - llwarns << "Attempting to convert layout to top-left with no parent" << llendl; + LL_WARNS() << "Attempting to convert layout to top-left with no parent" << LL_ENDL; return y; } } diff --git a/indra/llui/llview.h b/indra/llui/llview.h index cd23ce7df1..e224233c3c 100755 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -709,7 +709,7 @@ template <class T> T* LLView::getChild(const std::string& name, BOOL recurse) co // did we find *something* with that name? if (child) { - llwarns << "Found child named \"" << name << "\" but of wrong type " << typeid(*child).name() << ", expecting " << typeid(T*).name() << llendl; + LL_WARNS() << "Found child named \"" << name << "\" but of wrong type " << typeid(*child).name() << ", expecting " << typeid(T*).name() << LL_ENDL; } result = getDefaultWidget<T>(name); if (!result) @@ -721,11 +721,11 @@ template <class T> T* LLView::getChild(const std::string& name, BOOL recurse) co // *NOTE: You cannot call mFoo = getChild<LLFoo>("bar") // in a floater or panel constructor. The widgets will not // be ready. Instead, put it in postBuild(). - llwarns << "Making dummy " << typeid(T).name() << " named \"" << name << "\" in " << getName() << llendl; + LL_WARNS() << "Making dummy " << typeid(T).name() << " named \"" << name << "\" in " << getName() << LL_ENDL; } else { - llwarns << "Failed to create dummy " << typeid(T).name() << llendl; + LL_WARNS() << "Failed to create dummy " << typeid(T).name() << LL_ENDL; return NULL; } diff --git a/indra/llui/llxuiparser.cpp b/indra/llui/llxuiparser.cpp index 4cbf84be73..6a1f937340 100755 --- a/indra/llui/llxuiparser.cpp +++ b/indra/llui/llxuiparser.cpp @@ -1313,7 +1313,7 @@ void LLXUIParser::parserWarning(const std::string& message) { #ifdef LL_WINDOWS // use Visual Studio friendly formatting of output message for easy access to originating xml - LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str())); + LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()) << LL_ENDL; #else Parser::parserWarning(message); #endif @@ -1322,8 +1322,8 @@ void LLXUIParser::parserWarning(const std::string& message) void LLXUIParser::parserError(const std::string& message) { #ifdef LL_WINDOWS - // use Visual Studio friendly formatting of output message for easy access to originating xml - LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str())); + // use Visual Studio friendly formatting of output message for easy access to originating xml + LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()) << LL_ENDL; #else Parser::parserError(message); #endif @@ -1641,7 +1641,7 @@ void LLSimpleXUIParser::parserWarning(const std::string& message) { #ifdef LL_WINDOWS // use Visual Studio friendly formatting of output message for easy access to originating xml - LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str())); + LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()) << LL_ENDL; #else Parser::parserWarning(message); #endif @@ -1651,7 +1651,7 @@ void LLSimpleXUIParser::parserError(const std::string& message) { #ifdef LL_WINDOWS // use Visual Studio friendly formatting of output message for easy access to originating xml - LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str())); + LL_INFOS() << llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()) << LL_ENDL; #else Parser::parserError(message); #endif |