Base: Remove Boost-based signals and switch to FastSignals.
This commit is contained in:
@@ -84,7 +84,7 @@ endif()
|
||||
|
||||
list(APPEND FreeCADBase_LIBS ${QtCore_LIBRARIES})
|
||||
|
||||
list(APPEND FreeCADBase_LIBS fmt::fmt)
|
||||
list(APPEND FreeCADBase_LIBS libfastsignals fmt::fmt)
|
||||
|
||||
if (BUILD_DYNAMIC_LINK_PYTHON)
|
||||
list(APPEND FreeCADBase_LIBS ${Python3_LIBRARIES})
|
||||
|
||||
@@ -51,7 +51,7 @@ using PyObject = struct _object;
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <boost/signals2.hpp>
|
||||
#include <fastsignals/signal.h>
|
||||
#include <xercesc/util/XercesDefs.hpp>
|
||||
|
||||
#include "Handle.h"
|
||||
@@ -565,7 +565,7 @@ public:
|
||||
* - Group removal: both 'name' and 'value' are empty
|
||||
* - Group rename: 'name' is the new name, and 'value' is the old name
|
||||
*/
|
||||
boost::signals2::signal<
|
||||
fastsignals::signal<
|
||||
void(ParameterGrp* /*param*/, ParamType /*type*/, const char* /*name*/, const char* /*value*/)>
|
||||
signalParamChanged;
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
public:
|
||||
// NOLINTBEGIN
|
||||
Py::Object callable;
|
||||
boost::signals2::scoped_connection conn;
|
||||
fastsignals::scoped_connection conn;
|
||||
ParameterGrp* _target = nullptr; // no reference counted, do not access
|
||||
// NOLINTEND
|
||||
|
||||
|
||||
@@ -29,22 +29,13 @@
|
||||
#ifndef FC_GLOBAL_H
|
||||
# include <FCGlobal.h>
|
||||
#endif
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <numbers>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/signals2/shared_connection_block.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace signals2
|
||||
{
|
||||
class connection;
|
||||
}
|
||||
} // namespace boost
|
||||
|
||||
#include <fastsignals/signal.h>
|
||||
|
||||
class QString;
|
||||
|
||||
@@ -332,12 +323,10 @@ private:
|
||||
|
||||
class ConnectionBlocker
|
||||
{
|
||||
using Connection = boost::signals2::connection;
|
||||
using ConnectionBlock = boost::signals2::shared_connection_block;
|
||||
ConnectionBlock blocker;
|
||||
fastsignals::shared_connection_block blocker;
|
||||
|
||||
public:
|
||||
ConnectionBlocker(Connection& c)
|
||||
ConnectionBlocker(fastsignals::advanced_connection& c)
|
||||
: blocker(c)
|
||||
{}
|
||||
~ConnectionBlocker() = default;
|
||||
|
||||
Reference in New Issue
Block a user