Port to boost::signals2
This commit is contained in:
@@ -10,7 +10,6 @@ if (STANDALONE)
|
||||
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
|
||||
set(BOOST_REGEX_LIBRARY boost_regex-mt)
|
||||
set(BOOST_SIGNALS_LIBRARY boost_signals-mt)
|
||||
set(BOOST_SYSTEM_LIBRARY boost_system-mt)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(boost)
|
||||
@@ -39,21 +38,16 @@ else (STANDALONE)
|
||||
set(BOOST_REGEX_LIBRARY
|
||||
optimized libboost_regex-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION}
|
||||
debug libboost_regex-vc${MSVC_SUFFIX}-${BOOST_DEBUG_SUFFIX}-${BOOST_VERSION})
|
||||
set(BOOST_SIGNALS_LIBRARY
|
||||
optimized libboost_signals-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION}
|
||||
debug libboost_signals-vc${MSVC_SUFFIX}-${BOOST_DEBUG_SUFFIX}-${BOOST_VERSION})
|
||||
|
||||
elseif (DARWIN)
|
||||
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
|
||||
set(BOOST_REGEX_LIBRARY boost_regex-mt)
|
||||
set(BOOST_SIGNALS_LIBRARY boost_signals-mt)
|
||||
set(BOOST_SYSTEM_LIBRARY boost_system-mt)
|
||||
elseif (LINUX)
|
||||
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
|
||||
set(BOOST_REGEX_LIBRARY boost_regex-mt)
|
||||
set(BOOST_SIGNALS_LIBRARY boost_signals-mt)
|
||||
set(BOOST_SYSTEM_LIBRARY boost_system-mt)
|
||||
endif (WINDOWS)
|
||||
endif (STANDALONE)
|
||||
|
||||
@@ -734,7 +734,7 @@ void LLNotificationChannelBase::connectChanged(const LLStandardSignal::slot_type
|
||||
// only about new notifications
|
||||
for (LLNotificationSet::iterator it = mItems.begin(); it != mItems.end(); ++it)
|
||||
{
|
||||
slot.get_slot_function()(LLSD().with("sigtype", "load").with("id", (*it)->id()));
|
||||
slot(LLSD().with("sigtype", "load").with("id", (*it)->id()));
|
||||
}
|
||||
// and then connect the signal so that all future notifications will also be
|
||||
// forwarded.
|
||||
|
||||
@@ -91,8 +91,8 @@
|
||||
|
||||
#include <boost/utility.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/signal.hpp>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
|
||||
// we want to minimize external dependencies, but this one is important
|
||||
#include "llsd.h"
|
||||
@@ -112,7 +112,7 @@ typedef boost::shared_ptr<LLNotification> LLNotificationPtr;
|
||||
*****************************************************************************/
|
||||
|
||||
/**
|
||||
* A boost::signals Combiner that stops the first time a handler returns true
|
||||
* A boost::signals2 Combiner that stops the first time a handler returns true
|
||||
* We need this because we want to have our handlers return bool, so that
|
||||
* we have the option to cause a handler to stop further processing. The
|
||||
* default handler fails when the signal returns a value but has no slots.
|
||||
@@ -164,7 +164,7 @@ typedef boost::function<void (const LLSD&, const LLSD&)> LLNotificationResponder
|
||||
typedef LLFunctorRegistry<LLNotificationResponder> LLNotificationFunctorRegistry;
|
||||
typedef LLFunctorRegistration<LLNotificationResponder> LLNotificationFunctorRegistration;
|
||||
|
||||
typedef boost::signal<bool(const LLSD&), LLStopWhenHandled> LLStandardSignal;
|
||||
typedef boost::signals2::signal<bool(const LLSD&), LLStopWhenHandled> LLStandardSignal;
|
||||
|
||||
// context data that can be looked up via a notification's payload by the display logic
|
||||
// derive from this class to implement specific contexts
|
||||
@@ -700,7 +700,7 @@ typedef std::multimap<std::string, LLNotificationPtr> LLNotificationMap;
|
||||
// all of the built-in tests should attach to the "Visible" channel
|
||||
//
|
||||
class LLNotificationChannelBase :
|
||||
public boost::signals::trackable
|
||||
public boost::signals2::trackable
|
||||
{
|
||||
LOG_CLASS(LLNotificationChannelBase);
|
||||
public:
|
||||
|
||||
@@ -56,7 +56,7 @@ const BOOL BORDER_NO = FALSE;
|
||||
* With or without border,
|
||||
* Can contain LLUICtrls.
|
||||
*/
|
||||
class LLPanel : public LLUICtrl, public boost::signals::trackable
|
||||
class LLPanel : public LLUICtrl, public boost::signals2::trackable
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "llgl.h" // *TODO: break this dependency
|
||||
#include <stack>
|
||||
#include "lltexture.h"
|
||||
#include <boost/signal.hpp>
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
// LLUIFactory
|
||||
#include "llsd.h"
|
||||
@@ -605,7 +605,7 @@ public:
|
||||
class LLCallbackRegistry
|
||||
{
|
||||
public:
|
||||
typedef boost::signal<void()> callback_signal_t;
|
||||
typedef boost::signals2::signal<void()> callback_signal_t;
|
||||
|
||||
void registerCallback(const callback_signal_t::slot_type& slot)
|
||||
{
|
||||
|
||||
@@ -666,7 +666,7 @@ private:
|
||||
typedef std::map<std::string, LLView*> dummy_widget_map_t;
|
||||
mutable dummy_widget_map_t mDummyWidgets;
|
||||
|
||||
boost::signals::connection mControlConnection;
|
||||
boost::signals2::connection mControlConnection;
|
||||
|
||||
ECursorType mHoverCursor;
|
||||
|
||||
|
||||
@@ -38,6 +38,5 @@ add_library (llxml ${llxml_SOURCE_FILES})
|
||||
add_dependencies(llxml prepare)
|
||||
target_link_libraries(
|
||||
llxml
|
||||
${BOOST_SIGNALS_LIBRARY}
|
||||
${EXPAT_LIBRARIES}
|
||||
)
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#endif
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/signal.hpp>
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
#if LL_WINDOWS
|
||||
# if (_MSC_VER >= 1300 && _MSC_VER < 1400)
|
||||
@@ -95,7 +95,7 @@ typedef enum e_control_type
|
||||
class LLControlVariable : public LLRefCount
|
||||
{
|
||||
friend class LLControlGroup;
|
||||
typedef boost::signal<void(const LLSD&)> signal_t;
|
||||
typedef boost::signals2::signal<void(const LLSD&)> signal_t;
|
||||
|
||||
private:
|
||||
std::string mName;
|
||||
@@ -295,7 +295,7 @@ class LLCachedControl
|
||||
private:
|
||||
T mCachedValue;
|
||||
LLPointer<LLControlVariable> mControl;
|
||||
boost::signals::connection mConnection;
|
||||
boost::signals2::connection mConnection;
|
||||
LLControlGroup *mControlGroup;
|
||||
|
||||
public:
|
||||
|
||||
@@ -1438,7 +1438,6 @@ target_link_libraries(${VIEWER_BINARY_NAME}
|
||||
${BOOST_FILESYSTEM_LIBRARY}
|
||||
${BOOST_PROGRAM_OPTIONS_LIBRARY}
|
||||
${BOOST_REGEX_LIBRARY}
|
||||
${BOOST_SIGNALS_LIBRARY}
|
||||
${BOOST_SYSTEM_LIBRARY}
|
||||
${DBUSGLIB_LIBRARIES}
|
||||
${OPENGL_LIBRARIES}
|
||||
|
||||
@@ -1517,7 +1517,7 @@ BOOL LLFace::verify(const U32* indices_array) const
|
||||
// but present this info.
|
||||
// To clean up the log, the geometry could be cleared, or the
|
||||
// face could otherwise be marked for no ::verify.
|
||||
llinfos << "Face with no vertex buffer and " << mGeomCount << " mGeomCount" << llendl;
|
||||
//AIFIXME: llinfos << "Face with no vertex buffer and " << mGeomCount << " mGeomCount" << llendl;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "aithreadsafe.h"
|
||||
#include "llfasttimer.h"
|
||||
#include <boost/signal.hpp>
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
//!
|
||||
// A AIStateMachine is a base class that allows derived classes to
|
||||
@@ -194,12 +194,12 @@ class AIStateMachine {
|
||||
bool mAbortParent; //!< If true, abort parent on abort(). Otherwise continue as normal.
|
||||
// From outside a state machine:
|
||||
struct callback_type {
|
||||
typedef boost::signal<void (bool)> signal_type;
|
||||
typedef boost::signals2::signal<void (bool)> signal_type;
|
||||
callback_type(signal_type::slot_type const& slot) { connection = signal.connect(slot); }
|
||||
~callback_type() { connection.disconnect(); }
|
||||
void callback(bool success) const { signal(success); }
|
||||
private:
|
||||
boost::signals::connection connection;
|
||||
boost::signals2::connection connection;
|
||||
signal_type signal;
|
||||
};
|
||||
callback_type* mCallback; //!< Pointer to signal/connection, or NULL when not connected.
|
||||
|
||||
Reference in New Issue
Block a user