summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2020-08-11 01:34:13 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2020-08-11 01:34:13 +0300
commit9406b757a36d409e93a0ccde0a1fea289a3e6118 (patch)
treebac8ea172ccf40ea836d1b750d73e5d2cc5e11e4 /indra/llui
parentf554fe2ca74ddf275e47cdce8537e04ab40f9f95 (diff)
parent2e66c406d1767f26f968452e9ca5f5c0afa513b2 (diff)
Merge branch 'DRTVWR-501-maint' into DRTVWR-503-maint
# Conflicts: # indra/cmake/DirectX.cmake # indra/newview/llviewerparcelmedia.cpp # indra/newview/viewer_manifest.py
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.h10
-rw-r--r--indra/llui/llview.cpp5
9 files changed, 25 insertions, 53 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 962b8e9bb5..61a119800e 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 f740f14e4d..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>
@@ -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 d81e2cd494..e3a6a98a9f 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()