summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2020-08-24 13:11:07 -0400
committerOz Linden <oz@lindenlab.com>2020-08-24 13:11:07 -0400
commita9d271c5a26306486045293e9fe7941e3b72e370 (patch)
tree85b57b68b36ecce5f55643bc903c5b09526de5a9 /indra/llui
parent9834955be072aeac3f886de2eaf1e075000108c7 (diff)
parente8b31d03b4f6f0ffb981b4ea150743daf7b4a958 (diff)
SL-10297 merged 6.4.7
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/CMakeLists.txt2
-rw-r--r--indra/llui/llaccordionctrl.cpp2
-rw-r--r--indra/llui/llconsole.cpp4
-rw-r--r--indra/llui/lllayoutstack.cpp6
-rw-r--r--indra/llui/llnotifications.h34
-rw-r--r--indra/llui/llnotificationslistener.cpp8
-rw-r--r--indra/llui/llrngwriter.cpp7
-rw-r--r--indra/llui/lluictrlfactory.h14
-rw-r--r--indra/llui/llview.cpp5
9 files changed, 27 insertions, 55 deletions
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index 730e277dec..cce618487b 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -303,7 +303,7 @@ if(LL_TESTS)
set(test_libs llui llmessage llcorehttp llcommon
${HUNSPELL_LIBRARY}
${LLCOMMON_LIBRARIES}
- ${BOOST_COROUTINE_LIBRARY} ${BOOST_CONTEXT_LIBRARY} ${BOOST_SYSTEM_LIBRARY}
+ ${BOOST_FIBER_LIBRARY} ${BOOST_CONTEXT_LIBRARY} ${BOOST_SYSTEM_LIBRARY}
${WINDOWS_LIBRARIES})
if(NOT LINUX)
LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "${test_libs}")
diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp
index 623f570cef..edcbc3fbb7 100644
--- a/indra/llui/llaccordionctrl.cpp
+++ b/indra/llui/llaccordionctrl.cpp
@@ -338,7 +338,7 @@ void LLAccordionCtrl::addCollapsibleCtrl(LLView* view)
addChild(accordion_tab);
mAccordionTabs.push_back(accordion_tab);
- accordion_tab->setDropDownStateChangedCallback( boost::bind(&LLAccordionCtrl::onCollapseCtrlCloseOpen, this, mAccordionTabs.size() - 1) );
+ accordion_tab->setDropDownStateChangedCallback( boost::bind(&LLAccordionCtrl::onCollapseCtrlCloseOpen, this, (S16)(mAccordionTabs.size() - 1)) );
arrange();
}
diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp
index 5f50e46233..7817d99aef 100644
--- a/indra/llui/llconsole.cpp
+++ b/indra/llui/llconsole.cpp
@@ -369,9 +369,9 @@ LLConsole::Paragraph::Paragraph (LLWString str, const LLColor4 &color, F32 add_t
// static
void LLConsole::updateClass()
{
- for (instance_iter it = beginInstances(); it != endInstances(); ++it)
+ for (auto& con : instance_snapshot())
{
- it->update();
+ con.update();
}
}
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 4a464b3507..4aae1e374b 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -636,10 +636,10 @@ void LLLayoutStack::createResizeBar(LLLayoutPanel* panelp)
//static
void LLLayoutStack::updateClass()
{
- for (instance_iter it = beginInstances(); it != endInstances(); ++it)
+ for (auto& layout : instance_snapshot())
{
- it->updateLayout();
- it->mAnimatedThisFrame = false;
+ layout.updateLayout();
+ layout.mAnimatedThisFrame = false;
}
}
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index 62cf41256b..cac687f53d 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -746,42 +746,24 @@ public:
virtual ~LLNotificationChannelBase() {}
// you can also connect to a Channel, so you can be notified of
// changes to this channel
- template <typename LISTENER>
- LLBoundListener connectChanged(const LISTENER& slot)
+ LLBoundListener connectChanged(const LLEventListener& slot)
{
- // Examine slot to see if it binds an LLEventTrackable subclass, or a
- // boost::shared_ptr to something, or a boost::weak_ptr to something.
// Call this->connectChangedImpl() to actually connect it.
- return LLEventDetail::visit_and_connect(slot,
- boost::bind(&LLNotificationChannelBase::connectChangedImpl,
- this,
- _1));
+ return connectChangedImpl(slot);
}
- template <typename LISTENER>
- LLBoundListener connectAtFrontChanged(const LISTENER& slot)
+ LLBoundListener connectAtFrontChanged(const LLEventListener& slot)
{
- return LLEventDetail::visit_and_connect(slot,
- boost::bind(&LLNotificationChannelBase::connectAtFrontChangedImpl,
- this,
- _1));
+ return connectAtFrontChangedImpl(slot);
}
- template <typename LISTENER>
- LLBoundListener connectPassedFilter(const LISTENER& slot)
+ LLBoundListener connectPassedFilter(const LLEventListener& slot)
{
// see comments in connectChanged()
- return LLEventDetail::visit_and_connect(slot,
- boost::bind(&LLNotificationChannelBase::connectPassedFilterImpl,
- this,
- _1));
+ return connectPassedFilterImpl(slot);
}
- template <typename LISTENER>
- LLBoundListener connectFailedFilter(const LISTENER& slot)
+ LLBoundListener connectFailedFilter(const LLEventListener& slot)
{
// see comments in connectChanged()
- return LLEventDetail::visit_and_connect(slot,
- boost::bind(&LLNotificationChannelBase::connectFailedFilterImpl,
- this,
- _1));
+ return connectFailedFilterImpl(slot);
}
// use this when items change or to add a new one
diff --git a/indra/llui/llnotificationslistener.cpp b/indra/llui/llnotificationslistener.cpp
index be26416cbb..e73ba1fbe9 100644
--- a/indra/llui/llnotificationslistener.cpp
+++ b/indra/llui/llnotificationslistener.cpp
@@ -127,18 +127,16 @@ void LLNotificationsListener::listChannels(const LLSD& params) const
{
LLReqID reqID(params);
LLSD response(reqID.makeResponse());
- for (LLNotificationChannel::instance_iter cmi(LLNotificationChannel::beginInstances()),
- cmend(LLNotificationChannel::endInstances());
- cmi != cmend; ++cmi)
+ for (auto& cm : LLNotificationChannel::instance_snapshot())
{
LLSD channelInfo, parents;
- BOOST_FOREACH(const std::string& parent, cmi->getParents())
+ for (const std::string& parent : cm.getParents())
{
parents.append(parent);
}
channelInfo["parents"] = parents;
channelInfo["parent"] = parents.size()? parents[0] : "";
- response[cmi->getName()] = channelInfo;
+ response[cm.getName()] = channelInfo;
}
LLEventPumps::instance().obtain(params["reply"]).post(response);
}
diff --git a/indra/llui/llrngwriter.cpp b/indra/llui/llrngwriter.cpp
index e4a31d6a79..4bd1561425 100644
--- a/indra/llui/llrngwriter.cpp
+++ b/indra/llui/llrngwriter.cpp
@@ -29,14 +29,7 @@
#include "llrngwriter.h"
#include "lluicolor.h"
-#if LL_DARWIN
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdelete-incomplete"
#include "lluictrlfactory.h"
-#pragma clang diagnostic pop
-#else
-#include "lluictrlfactory.h"
-#endif
#include "boost/bind.hpp"
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index 03d946f1b7..135ed57a4f 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -37,6 +37,7 @@
#include "llheteromap.h"
class LLView;
+void deleteView(LLView*); // Inside LLView.cpp, avoid having to potentially delete an incomplete type here.
// lookup widget constructor funcs by widget name
template <typename DERIVED_TYPE>
@@ -160,8 +161,8 @@ public:
LLXMLNodePtr root_node;
if (!LLUICtrlFactory::getLayeredXMLNode(filename, root_node))
- {
- LL_WARNS() << "Couldn't parse XUI file: " << instance().getCurFileName() << LL_ENDL;
+ {
+ LL_WARNS() << "Couldn't parse XUI from path: " << instance().getCurFileName() << ", from filename: " << filename << LL_ENDL;
goto fail;
}
@@ -174,14 +175,7 @@ public:
{
LL_WARNS() << "Widget in " << filename << " was of type " << typeid(view).name() << " instead of expected type " << typeid(T).name() << LL_ENDL;
-#if LL_DARWIN
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdelete-incomplete"
- delete view;
-#pragma clang diagnostic pop
-#else
- delete view;
-#endif
+ deleteView(view);
view = NULL;
}
}
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 593c8b12fc..bd213d594a 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -86,6 +86,11 @@ template class LLView* LLView::getChild<class LLView>(
static LLDefaultChildRegistry::Register<LLView> r("view");
+void deleteView(LLView *aView)
+{
+ delete aView;
+}
+
namespace LLInitParam
{
void TypeValues<LLView::EOrientation>::declareValues()