From 68d22d864b801231c83c0ef961073ac5f8764aa4 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 8 Aug 2023 14:19:00 +0200 Subject: [PATCH] modernize C++: move from boost::bind to std::bind --- src/App/DocumentObserverPython.cpp | 11 +++-- src/App/GroupExtension.cpp | 6 +-- src/App/Link.cpp | 6 +-- src/App/MergeDocuments.cpp | 6 +-- src/App/PropertyExpressionEngine.cpp | 10 ++-- src/App/PropertyLinks.cpp | 10 ++-- src/Gui/Action.cpp | 4 +- src/Gui/AutoSaver.cpp | 10 ++-- src/Gui/Command.cpp | 4 +- src/Gui/CommandStd.cpp | 4 +- src/Gui/CommandView.cpp | 4 +- src/Gui/DAGView/DAGModel.cpp | 14 +++--- src/Gui/DAGView/DAGView.cpp | 6 +-- src/Gui/DlgDisplayPropertiesImp.cpp | 6 +-- src/Gui/Document.cpp | 48 +++++++++---------- src/Gui/DocumentModel.cpp | 26 +++++----- src/Gui/DocumentObserverPython.cpp | 6 +-- src/Gui/ExpressionBinding.cpp | 6 +-- src/Gui/GraphvizView.cpp | 8 ++-- src/Gui/MDIView.cpp | 4 +- src/Gui/MDIViewPyWrap.cpp | 2 +- src/Gui/ManualAlignment.cpp | 8 ++-- src/Gui/MergeDocuments.cpp | 6 +-- src/Gui/NotificationArea.cpp | 4 +- src/Gui/Placement.cpp | 4 +- src/Gui/PropertyView.cpp | 38 +++++++-------- src/Gui/Selection.cpp | 10 ++-- src/Gui/TaskElementColors.cpp | 10 ++-- src/Gui/TaskView/TaskAppearance.cpp | 6 +-- src/Gui/TaskView/TaskView.cpp | 10 ++-- src/Gui/TextDocumentEditorView.cpp | 4 +- src/Gui/Tree.cpp | 48 +++++++++---------- src/Gui/ViewProviderLink.cpp | 2 +- src/Gui/ViewProviderOriginGroupExtension.cpp | 6 +-- src/Gui/ViewProviderPythonFeature.cpp | 2 +- .../Fem/Gui/ViewProviderFemPostFunction.cpp | 4 +- src/Mod/Inspection/App/InspectionFeature.cpp | 4 +- src/Mod/MeshPart/Gui/CrossSections.cpp | 4 +- src/Mod/Part/App/PartFeature.cpp | 8 ++-- src/Mod/Part/Gui/CrossSections.cpp | 4 +- src/Mod/Part/Gui/DlgBooleanOperation.cpp | 10 ++-- src/Mod/Part/Gui/DlgFilletEdges.cpp | 6 +-- src/Mod/Part/Gui/TaskAttacher.cpp | 6 +-- src/Mod/Part/Gui/TaskDimension.cpp | 4 +- src/Mod/Part/Gui/TaskFaceColors.cpp | 14 +++--- src/Mod/PartDesign/App/ShapeBinder.cpp | 8 ++-- src/Mod/PartDesign/Gui/TaskHoleParameters.cpp | 4 +- .../Gui/TaskTransformedMessages.cpp | 4 +- src/Mod/PartDesign/Gui/ViewProviderBody.cpp | 6 +-- src/Mod/PartDesign/Gui/Workbench.cpp | 10 ++-- src/Mod/PartDesign/Gui/WorkflowManager.cpp | 8 ++-- .../ReverseEngineering/App/ApproxSurface.cpp | 4 +- src/Mod/Sketcher/App/SketchObject.cpp | 10 ++-- .../Sketcher/Gui/TaskSketcherConstraints.cpp | 8 ++-- src/Mod/Sketcher/Gui/TaskSketcherElements.cpp | 4 +- src/Mod/Sketcher/Gui/TaskSketcherMessages.cpp | 8 ++-- src/Mod/Sketcher/Gui/ViewProviderSketch.cpp | 8 ++-- src/Mod/Spreadsheet/App/PropertySheet.cpp | 12 ++--- src/Mod/Spreadsheet/Gui/SheetModel.cpp | 6 +-- src/Mod/Spreadsheet/Gui/SheetTableView.cpp | 2 +- src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp | 6 +-- src/Mod/TechDraw/Gui/MDIViewPage.cpp | 4 +- .../TechDraw/Gui/ViewProviderDrawingView.cpp | 6 +-- src/Mod/TechDraw/Gui/ViewProviderPage.cpp | 4 +- 64 files changed, 279 insertions(+), 266 deletions(-) diff --git a/src/App/DocumentObserverPython.cpp b/src/App/DocumentObserverPython.cpp index 09a0c65036..7435694dd5 100644 --- a/src/App/DocumentObserverPython.cpp +++ b/src/App/DocumentObserverPython.cpp @@ -22,6 +22,9 @@ #include "PreCompiled.h" +#ifndef _PreComp_ +#include +#endif #include #include "Application.h" @@ -32,7 +35,7 @@ using namespace App; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; std::vector DocumentObserverPython::_instances; @@ -62,7 +65,7 @@ DocumentObserverPython::DocumentObserverPython(const Py::Object& obj) : inst(obj FC_PY_GetCallable(obj.ptr(), "slot" #_name1, py##_name1.py);\ if (!py##_name1.py.isNone())\ py##_name1.slot = App::GetApplication().signal##_name2.connect(\ - boost::bind(&DocumentObserverPython::slot##_name1, this));\ + std::bind(&DocumentObserverPython::slot##_name1, this));\ }\ while(0); @@ -71,7 +74,7 @@ DocumentObserverPython::DocumentObserverPython(const Py::Object& obj) : inst(obj FC_PY_GetCallable(obj.ptr(), "slot" #_name1, py##_name1.py);\ if (!py##_name1.py.isNone())\ py##_name1.slot = App::GetApplication().signal##_name2.connect(\ - boost::bind(&DocumentObserverPython::slot##_name1, this, bp::_1));\ + std::bind(&DocumentObserverPython::slot##_name1, this, sp::_1));\ }\ while(0); @@ -79,7 +82,7 @@ DocumentObserverPython::DocumentObserverPython(const Py::Object& obj) : inst(obj FC_PY_GetCallable(obj.ptr(), "slot" #_name1, py##_name1.py);\ if (!py##_name1.py.isNone())\ py##_name1.slot = App::GetApplication().signal##_name2.connect(\ - boost::bind(&DocumentObserverPython::slot##_name1, this, bp::_1, bp::_2));\ + std::bind(&DocumentObserverPython::slot##_name1, this, sp::_1, sp::_2));\ }\ while(0); diff --git a/src/App/GroupExtension.cpp b/src/App/GroupExtension.cpp index fb9ab4b1a6..a93521ed79 100644 --- a/src/App/GroupExtension.cpp +++ b/src/App/GroupExtension.cpp @@ -31,7 +31,7 @@ using namespace App; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; EXTENSION_PROPERTY_SOURCE(App::GroupExtension, App::DocumentObjectExtension) @@ -352,8 +352,8 @@ void GroupExtension::extensionOnChanged(const Property* p) { _Conns.clear(); for(auto obj : Group.getValue()) { if(obj && obj->getNameInDocument()) { - _Conns[obj] = obj->signalChanged.connect(boost::bind( - &GroupExtension::slotChildChanged,this,bp::_1, bp::_2)); + _Conns[obj] = obj->signalChanged.connect(std::bind( + &GroupExtension::slotChildChanged,this,sp::_1, sp::_2)); } } } diff --git a/src/App/Link.cpp b/src/App/Link.cpp index de27dcaf41..b426cc5a55 100644 --- a/src/App/Link.cpp +++ b/src/App/Link.cpp @@ -47,7 +47,7 @@ FC_LOG_LEVEL_INIT("App::Link", true,true) using namespace App; using namespace Base; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; using CharRange = boost::iterator_range; @@ -1540,7 +1540,7 @@ void LinkBaseExtension::updateGroup() { FC_LOG("new group connection " << getExtendedObject()->getFullName() << " -> " << group->getFullName()); conn = group->signalChanged.connect( - boost::bind(&LinkBaseExtension::slotChangedPlainGroup,this,bp::_1,bp::_2)); + std::bind(&LinkBaseExtension::slotChangedPlainGroup,this,sp::_1,sp::_2)); } std::size_t count = children.size(); ext->getAllChildren(children,childSet); @@ -1554,7 +1554,7 @@ void LinkBaseExtension::updateGroup() { FC_LOG("new group connection " << getExtendedObject()->getFullName() << " -> " << child->getFullName()); conn = child->signalChanged.connect( - boost::bind(&LinkBaseExtension::slotChangedPlainGroup,this,bp::_1,bp::_2)); + std::bind(&LinkBaseExtension::slotChangedPlainGroup,this,sp::_1,sp::_2)); } } } diff --git a/src/App/MergeDocuments.cpp b/src/App/MergeDocuments.cpp index 177d8996e0..fd36262042 100644 --- a/src/App/MergeDocuments.cpp +++ b/src/App/MergeDocuments.cpp @@ -34,7 +34,7 @@ using namespace App; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; namespace App { @@ -74,9 +74,9 @@ private: MergeDocuments::MergeDocuments(App::Document* doc) : guiup(false), verbose(true), stream(nullptr), appdoc(doc) { connectExport = doc->signalExportObjects.connect - (boost::bind(&MergeDocuments::exportObject, this, bp::_1, bp::_2)); + (std::bind(&MergeDocuments::exportObject, this, sp::_1, sp::_2)); connectImport = doc->signalImportObjects.connect - (boost::bind(&MergeDocuments::importObject, this, bp::_1, bp::_2)); + (std::bind(&MergeDocuments::importObject, this, sp::_1, sp::_2)); QCoreApplication* app = QCoreApplication::instance(); if (app && app->inherits("QApplication")) { diff --git a/src/App/PropertyExpressionEngine.cpp b/src/App/PropertyExpressionEngine.cpp index fa8d0fec63..00e85db73c 100644 --- a/src/App/PropertyExpressionEngine.cpp +++ b/src/App/PropertyExpressionEngine.cpp @@ -39,7 +39,7 @@ FC_LOG_LEVEL_INIT("App", true); using namespace App; using namespace Base; using namespace boost; -using namespace boost::placeholders; +namespace sp = std::placeholders; TYPESYSTEM_SOURCE_ABSTRACT(App::PropertyExpressionContainer , App::PropertyXLinkContainer) @@ -182,11 +182,11 @@ void PropertyExpressionEngine::hasSetValue() auto &propDeps = pimpl->propMap[key]; if(propDeps.empty()) { if(!propName.empty()) - pimpl->conns.emplace_back(obj->signalChanged.connect(boost::bind( - &PropertyExpressionEngine::slotChangedProperty,this,_1,_2))); + pimpl->conns.emplace_back(obj->signalChanged.connect(std::bind( + &PropertyExpressionEngine::slotChangedProperty,this,sp::_1,sp::_2))); else - pimpl->conns.emplace_back(obj->signalChanged.connect(boost::bind( - &PropertyExpressionEngine::slotChangedObject,this,_1,_2))); + pimpl->conns.emplace_back(obj->signalChanged.connect(std::bind( + &PropertyExpressionEngine::slotChangedObject,this,sp::_1,sp::_2))); } propDeps.push_back(e.first); } diff --git a/src/App/PropertyLinks.cpp b/src/App/PropertyLinks.cpp index 028b7430ab..732850fefd 100644 --- a/src/App/PropertyLinks.cpp +++ b/src/App/PropertyLinks.cpp @@ -45,7 +45,7 @@ FC_LOG_LEVEL_INIT("PropertyLinks",true,true) using namespace App; using namespace Base; using namespace std; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; //************************************************************************** //************************************************************************** @@ -2662,13 +2662,13 @@ public: myPath = myPos->first.toUtf8().constData(); App::Application &app = App::GetApplication(); connFinishRestoreDocument = app.signalFinishRestoreDocument.connect( - boost::bind(&DocInfo::slotFinishRestoreDocument,this,bp::_1)); + std::bind(&DocInfo::slotFinishRestoreDocument,this,sp::_1)); connPendingReloadDocument = app.signalPendingReloadDocument.connect( - boost::bind(&DocInfo::slotFinishRestoreDocument,this,bp::_1)); + std::bind(&DocInfo::slotFinishRestoreDocument,this,sp::_1)); connDeleteDocument = app.signalDeleteDocument.connect( - boost::bind(&DocInfo::slotDeleteDocument,this,bp::_1)); + std::bind(&DocInfo::slotDeleteDocument,this,sp::_1)); connSaveDocument = app.signalSaveDocument.connect( - boost::bind(&DocInfo::slotSaveDocument,this,bp::_1)); + std::bind(&DocInfo::slotSaveDocument,this,sp::_1)); QString fullpath(getFullPath()); if(fullpath.isEmpty()) diff --git a/src/Gui/Action.cpp b/src/Gui/Action.cpp index 471ea224ac..de40974a19 100644 --- a/src/Gui/Action.cpp +++ b/src/Gui/Action.cpp @@ -66,7 +66,7 @@ using namespace Gui; using namespace Gui::Dialog; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; /** * Constructs an action called \a name with parent \a parent. It also stores a pointer @@ -644,7 +644,7 @@ WorkbenchGroup::WorkbenchGroup ( Command* pcCmd, QObject * parent ) { refreshWorkbenchList(); - Application::Instance->signalRefreshWorkbenches.connect(boost::bind(&WorkbenchGroup::refreshWorkbenchList, this)); + Application::Instance->signalRefreshWorkbenches.connect(std::bind(&WorkbenchGroup::refreshWorkbenchList, this)); connect(getMainWindow(), &MainWindow::workbenchActivated, this, &WorkbenchGroup::onWorkbenchActivated); diff --git a/src/Gui/AutoSaver.cpp b/src/Gui/AutoSaver.cpp index 78b6f795b9..44d7d2e341 100644 --- a/src/Gui/AutoSaver.cpp +++ b/src/Gui/AutoSaver.cpp @@ -50,15 +50,15 @@ FC_LOG_LEVEL_INIT("App",true,true) using namespace Gui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; AutoSaver* AutoSaver::self = nullptr; AutoSaver::AutoSaver(QObject* parent) : QObject(parent), timeout(900000), compressed(true) { - App::GetApplication().signalNewDocument.connect(boost::bind(&AutoSaver::slotCreateDocument, this, bp::_1)); - App::GetApplication().signalDeleteDocument.connect(boost::bind(&AutoSaver::slotDeleteDocument, this, bp::_1)); + App::GetApplication().signalNewDocument.connect(std::bind(&AutoSaver::slotCreateDocument, this, sp::_1)); + App::GetApplication().signalDeleteDocument.connect(std::bind(&AutoSaver::slotDeleteDocument, this, sp::_1)); } AutoSaver::~AutoSaver() @@ -244,9 +244,9 @@ void AutoSaver::timerEvent(QTimerEvent * event) AutoSaveProperty::AutoSaveProperty(const App::Document* doc) : timerId(-1) { documentNew = const_cast(doc)->signalNewObject.connect - (boost::bind(&AutoSaveProperty::slotNewObject, this, bp::_1)); + (std::bind(&AutoSaveProperty::slotNewObject, this, sp::_1)); documentMod = const_cast(doc)->signalChangedObject.connect - (boost::bind(&AutoSaveProperty::slotChangePropertyData, this, bp::_2)); + (std::bind(&AutoSaveProperty::slotChangePropertyData, this, sp::_2)); } AutoSaveProperty::~AutoSaveProperty() diff --git a/src/Gui/Command.cpp b/src/Gui/Command.cpp index 640708f76d..d5a80d0f1b 100644 --- a/src/Gui/Command.cpp +++ b/src/Gui/Command.cpp @@ -1264,7 +1264,7 @@ PythonCommand::PythonCommand(const char* name, PyObject * pcPyCommand, const cha auto& rcCmdMgr = Gui::Application::Instance->commandManager(); connPyCmdInitialized = rcCmdMgr.signalPyCmdInitialized.connect( - boost::bind(&PythonCommand::onActionInit, this)); + std::bind(&PythonCommand::onActionInit, this)); } PythonCommand::~PythonCommand() @@ -1495,7 +1495,7 @@ PythonGroupCommand::PythonGroupCommand(const char* name, PyObject * pcPyCommand) auto& rcCmdMgr = Gui::Application::Instance->commandManager(); connPyCmdInitialized = rcCmdMgr.signalPyCmdInitialized.connect( - boost::bind(&PythonGroupCommand::onActionInit, this)); + std::bind(&PythonGroupCommand::onActionInit, this)); } PythonGroupCommand::~PythonGroupCommand() diff --git a/src/Gui/CommandStd.cpp b/src/Gui/CommandStd.cpp index 2ff072f3ec..b046d6472f 100644 --- a/src/Gui/CommandStd.cpp +++ b/src/Gui/CommandStd.cpp @@ -56,7 +56,7 @@ using Base::Console; using Base::Sequencer; using namespace Gui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; //=========================================================================== @@ -876,7 +876,7 @@ StdCmdUserEditMode::StdCmdUserEditMode() sPixmap = "Std_UserEditModeDefault"; eType = ForEdit; - this->getGuiApplication()->signalUserEditModeChanged.connect(boost::bind(&StdCmdUserEditMode::updateIcon, this, bp::_1)); + this->getGuiApplication()->signalUserEditModeChanged.connect(std::bind(&StdCmdUserEditMode::updateIcon, this, sp::_1)); } Gui::Action * StdCmdUserEditMode::createAction() diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index 0d9af98dba..289643c746 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -86,7 +86,7 @@ using namespace Gui; using Gui::Dialog::DlgSettingsImageImp; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; namespace { // A helper class to open a transaction when changing properties of view providers. @@ -657,7 +657,7 @@ StdCmdDrawStyle::StdCmdDrawStyle() sPixmap = "DrawStyleAsIs"; eType = Alter3DView; - this->getGuiApplication()->signalActivateView.connect(boost::bind(&StdCmdDrawStyle::updateIcon, this, bp::_1)); + this->getGuiApplication()->signalActivateView.connect(std::bind(&StdCmdDrawStyle::updateIcon, this, sp::_1)); } Gui::Action * StdCmdDrawStyle::createAction() diff --git a/src/Gui/DAGView/DAGModel.cpp b/src/Gui/DAGView/DAGModel.cpp index 970f4fc10e..216b91639c 100644 --- a/src/Gui/DAGView/DAGModel.cpp +++ b/src/Gui/DAGView/DAGModel.cpp @@ -55,7 +55,7 @@ using namespace Gui; using namespace DAG; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; LineEdit::LineEdit(QWidget* parentIn): QLineEdit(parentIn) { @@ -137,11 +137,11 @@ Model::Model(QObject *parentIn, const Gui::Document &documentIn) : QGraphicsScen connect(this->editingFinishedAction, &QAction::triggered, this, &Model::editingFinishedSlot); - connectNewObject = documentIn.signalNewObject.connect(boost::bind(&Model::slotNewObject, this, bp::_1)); - connectDelObject = documentIn.signalDeletedObject.connect(boost::bind(&Model::slotDeleteObject, this, bp::_1)); - connectChgObject = documentIn.signalChangedObject.connect(boost::bind(&Model::slotChangeObject, this, bp::_1, bp::_2)); - connectEdtObject = documentIn.signalInEdit.connect(boost::bind(&Model::slotInEdit, this, bp::_1)); - connectResObject = documentIn.signalResetEdit.connect(boost::bind(&Model::slotResetEdit, this, bp::_1)); + connectNewObject = documentIn.signalNewObject.connect(std::bind(&Model::slotNewObject, this, sp::_1)); + connectDelObject = documentIn.signalDeletedObject.connect(std::bind(&Model::slotDeleteObject, this, sp::_1)); + connectChgObject = documentIn.signalChangedObject.connect(std::bind(&Model::slotChangeObject, this, sp::_1, sp::_2)); + connectEdtObject = documentIn.signalInEdit.connect(std::bind(&Model::slotInEdit, this, sp::_1)); + connectResObject = documentIn.signalResetEdit.connect(std::bind(&Model::slotResetEdit, this, sp::_1)); for (auto obj : documentIn.getDocument()->getObjects()) { auto vpd = Base::freecad_dynamic_cast(documentIn.getViewProvider(obj)); @@ -250,7 +250,7 @@ void Model::slotNewObject(const ViewProviderDocumentObject &VPDObjectIn) (*theGraph)[virginVertex].text->setFont(this->font()); (*theGraph)[virginVertex].connChangeIcon = const_cast(VPDObjectIn).signalChangeIcon.connect( - boost::bind(&Model::slotChangeIcon, this, boost::cref(VPDObjectIn), icon)); + std::bind(&Model::slotChangeIcon, this, boost::cref(VPDObjectIn), icon)); graphDirty = true; lastAddedVertex = Graph::null_vertex(); diff --git a/src/Gui/DAGView/DAGView.cpp b/src/Gui/DAGView/DAGView.cpp index 6cc21e13f5..6b1805b5ea 100644 --- a/src/Gui/DAGView/DAGView.cpp +++ b/src/Gui/DAGView/DAGView.cpp @@ -36,7 +36,7 @@ using namespace Gui; using namespace DAG; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; DAG::DockWindow::DockWindow(Gui::Document* gDocumentIn, QWidget* parent): Gui::DockWindow(gDocumentIn, parent) { @@ -50,8 +50,8 @@ View::View(QWidget* parentIn): QGraphicsView(parentIn) { this->setRenderHint(QPainter::Antialiasing, true); this->setRenderHint(QPainter::TextAntialiasing, true); - conActive = Application::Instance->signalActiveDocument.connect(boost::bind(&View::slotActiveDocument, this, bp::_1)); - conDelete = Application::Instance->signalDeleteDocument.connect(boost::bind(&View::slotDeleteDocument, this, bp::_1)); + conActive = Application::Instance->signalActiveDocument.connect(std::bind(&View::slotActiveDocument, this, sp::_1)); + conDelete = Application::Instance->signalDeleteDocument.connect(std::bind(&View::slotDeleteDocument, this, sp::_1)); //just update the dagview when the gui process is idle. connect(QAbstractEventDispatcher::instance(), &QAbstractEventDispatcher::awake, diff --git a/src/Gui/DlgDisplayPropertiesImp.cpp b/src/Gui/DlgDisplayPropertiesImp.cpp index 14f8874169..3f0d98e976 100644 --- a/src/Gui/DlgDisplayPropertiesImp.cpp +++ b/src/Gui/DlgDisplayPropertiesImp.cpp @@ -43,7 +43,7 @@ using namespace Gui::Dialog; using namespace std; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; /* TRANSLATOR Gui::Dialog::DlgDisplayPropertiesImp */ @@ -157,8 +157,8 @@ DlgDisplayPropertiesImp::DlgDisplayPropertiesImp(bool floating, QWidget* parent, Gui::Selection().Attach(this); d->connectChangedObject = - Gui::Application::Instance->signalChangedObject.connect(boost::bind - (&DlgDisplayPropertiesImp::slotChangedObject, this, bp::_1, bp::_2)); + Gui::Application::Instance->signalChangedObject.connect(std::bind + (&DlgDisplayPropertiesImp::slotChangedObject, this, sp::_1, sp::_2)); } /** diff --git a/src/Gui/Document.cpp b/src/Gui/Document.cpp index d90c609d50..387b24c963 100644 --- a/src/Gui/Document.cpp +++ b/src/Gui/Document.cpp @@ -70,7 +70,7 @@ FC_LOG_LEVEL_INIT("Gui", true, true) using namespace Gui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; namespace Gui { @@ -162,58 +162,58 @@ Document::Document(App::Document* pcDocument,Application * app) // Setup the connections d->connectNewObject = pcDocument->signalNewObject.connect - (boost::bind(&Gui::Document::slotNewObject, this, bp::_1)); + (std::bind(&Gui::Document::slotNewObject, this, sp::_1)); d->connectDelObject = pcDocument->signalDeletedObject.connect - (boost::bind(&Gui::Document::slotDeletedObject, this, bp::_1)); + (std::bind(&Gui::Document::slotDeletedObject, this, sp::_1)); d->connectCngObject = pcDocument->signalChangedObject.connect - (boost::bind(&Gui::Document::slotChangedObject, this, bp::_1, bp::_2)); + (std::bind(&Gui::Document::slotChangedObject, this, sp::_1, sp::_2)); d->connectRenObject = pcDocument->signalRelabelObject.connect - (boost::bind(&Gui::Document::slotRelabelObject, this, bp::_1)); + (std::bind(&Gui::Document::slotRelabelObject, this, sp::_1)); d->connectActObject = pcDocument->signalActivatedObject.connect - (boost::bind(&Gui::Document::slotActivatedObject, this, bp::_1)); + (std::bind(&Gui::Document::slotActivatedObject, this, sp::_1)); d->connectActObjectBlocker = boost::signals2::shared_connection_block (d->connectActObject, false); d->connectSaveDocument = pcDocument->signalSaveDocument.connect - (boost::bind(&Gui::Document::Save, this, bp::_1)); + (std::bind(&Gui::Document::Save, this, sp::_1)); d->connectRestDocument = pcDocument->signalRestoreDocument.connect - (boost::bind(&Gui::Document::Restore, this, bp::_1)); + (std::bind(&Gui::Document::Restore, this, sp::_1)); d->connectStartLoadDocument = App::GetApplication().signalStartRestoreDocument.connect - (boost::bind(&Gui::Document::slotStartRestoreDocument, this, bp::_1)); + (std::bind(&Gui::Document::slotStartRestoreDocument, this, sp::_1)); d->connectFinishLoadDocument = App::GetApplication().signalFinishRestoreDocument.connect - (boost::bind(&Gui::Document::slotFinishRestoreDocument, this, bp::_1)); + (std::bind(&Gui::Document::slotFinishRestoreDocument, this, sp::_1)); d->connectShowHidden = App::GetApplication().signalShowHidden.connect - (boost::bind(&Gui::Document::slotShowHidden, this, bp::_1)); + (std::bind(&Gui::Document::slotShowHidden, this, sp::_1)); d->connectChangePropertyEditor = pcDocument->signalChangePropertyEditor.connect - (boost::bind(&Gui::Document::slotChangePropertyEditor, this, bp::_1, bp::_2)); + (std::bind(&Gui::Document::slotChangePropertyEditor, this, sp::_1, sp::_2)); d->connectChangeDocument = d->_pcDocument->signalChanged.connect // use the same slot function - (boost::bind(&Gui::Document::slotChangePropertyEditor, this, bp::_1, bp::_2)); + (std::bind(&Gui::Document::slotChangePropertyEditor, this, sp::_1, sp::_2)); d->connectChangeDocumentBlocker = boost::signals2::shared_connection_block (d->connectChangeDocument, true); d->connectFinishRestoreObject = pcDocument->signalFinishRestoreObject.connect - (boost::bind(&Gui::Document::slotFinishRestoreObject, this, bp::_1)); + (std::bind(&Gui::Document::slotFinishRestoreObject, this, sp::_1)); d->connectExportObjects = pcDocument->signalExportViewObjects.connect - (boost::bind(&Gui::Document::exportObjects, this, bp::_1, bp::_2)); + (std::bind(&Gui::Document::exportObjects, this, sp::_1, sp::_2)); d->connectImportObjects = pcDocument->signalImportViewObjects.connect - (boost::bind(&Gui::Document::importObjects, this, bp::_1, bp::_2, bp::_3)); + (std::bind(&Gui::Document::importObjects, this, sp::_1, sp::_2, sp::_3)); d->connectFinishImportObjects = pcDocument->signalFinishImportObjects.connect - (boost::bind(&Gui::Document::slotFinishImportObjects, this, bp::_1)); + (std::bind(&Gui::Document::slotFinishImportObjects, this, sp::_1)); d->connectUndoDocument = pcDocument->signalUndo.connect - (boost::bind(&Gui::Document::slotUndoDocument, this, bp::_1)); + (std::bind(&Gui::Document::slotUndoDocument, this, sp::_1)); d->connectRedoDocument = pcDocument->signalRedo.connect - (boost::bind(&Gui::Document::slotRedoDocument, this, bp::_1)); + (std::bind(&Gui::Document::slotRedoDocument, this, sp::_1)); d->connectRecomputed = pcDocument->signalRecomputed.connect - (boost::bind(&Gui::Document::slotRecomputed, this, bp::_1)); + (std::bind(&Gui::Document::slotRecomputed, this, sp::_1)); d->connectSkipRecompute = pcDocument->signalSkipRecompute.connect - (boost::bind(&Gui::Document::slotSkipRecompute, this, bp::_1, bp::_2)); + (std::bind(&Gui::Document::slotSkipRecompute, this, sp::_1, sp::_2)); d->connectTouchedObject = pcDocument->signalTouchedObject.connect - (boost::bind(&Gui::Document::slotTouchedObject, this, bp::_1)); + (std::bind(&Gui::Document::slotTouchedObject, this, sp::_1)); d->connectTransactionAppend = pcDocument->signalTransactionAppend.connect - (boost::bind(&Gui::Document::slotTransactionAppend, this, bp::_1, bp::_2)); + (std::bind(&Gui::Document::slotTransactionAppend, this, sp::_1, sp::_2)); d->connectTransactionRemove = pcDocument->signalTransactionRemove.connect - (boost::bind(&Gui::Document::slotTransactionRemove, this, bp::_1, bp::_2)); + (std::bind(&Gui::Document::slotTransactionRemove, this, sp::_1, sp::_2)); // pointer to the python class // NOTE: As this Python object doesn't get returned to the interpreter we diff --git a/src/Gui/DocumentModel.cpp b/src/Gui/DocumentModel.cpp index 2f0eb72eb5..a70ea8e837 100644 --- a/src/Gui/DocumentModel.cpp +++ b/src/Gui/DocumentModel.cpp @@ -39,7 +39,7 @@ using namespace Gui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; namespace Gui { // forward declaration @@ -361,11 +361,11 @@ DocumentModel::DocumentModel(QObject* parent) } // Setup connections - Application::Instance->signalNewDocument.connect(boost::bind(&DocumentModel::slotNewDocument, this, bp::_1)); - Application::Instance->signalDeleteDocument.connect(boost::bind(&DocumentModel::slotDeleteDocument, this, bp::_1)); - Application::Instance->signalRenameDocument.connect(boost::bind(&DocumentModel::slotRenameDocument, this, bp::_1)); - Application::Instance->signalActiveDocument.connect(boost::bind(&DocumentModel::slotActiveDocument, this, bp::_1)); - Application::Instance->signalRelabelDocument.connect(boost::bind(&DocumentModel::slotRelabelDocument, this, bp::_1)); + Application::Instance->signalNewDocument.connect(std::bind(&DocumentModel::slotNewDocument, this, sp::_1)); + Application::Instance->signalDeleteDocument.connect(std::bind(&DocumentModel::slotDeleteDocument, this, sp::_1)); + Application::Instance->signalRenameDocument.connect(std::bind(&DocumentModel::slotRenameDocument, this, sp::_1)); + Application::Instance->signalActiveDocument.connect(std::bind(&DocumentModel::slotActiveDocument, this, sp::_1)); + Application::Instance->signalRelabelDocument.connect(std::bind(&DocumentModel::slotRelabelDocument, this, sp::_1)); } DocumentModel::~DocumentModel() @@ -375,13 +375,13 @@ DocumentModel::~DocumentModel() void DocumentModel::slotNewDocument(const Gui::Document& Doc) { - Doc.signalNewObject.connect(boost::bind(&DocumentModel::slotNewObject, this, bp::_1)); - Doc.signalDeletedObject.connect(boost::bind(&DocumentModel::slotDeleteObject, this, bp::_1)); - Doc.signalChangedObject.connect(boost::bind(&DocumentModel::slotChangeObject, this, bp::_1, bp::_2)); - Doc.signalRelabelObject.connect(boost::bind(&DocumentModel::slotRenameObject, this, bp::_1)); - Doc.signalActivatedObject.connect(boost::bind(&DocumentModel::slotActiveObject, this, bp::_1)); - Doc.signalInEdit.connect(boost::bind(&DocumentModel::slotInEdit, this, bp::_1)); - Doc.signalResetEdit.connect(boost::bind(&DocumentModel::slotResetEdit, this, bp::_1)); + Doc.signalNewObject.connect(std::bind(&DocumentModel::slotNewObject, this, sp::_1)); + Doc.signalDeletedObject.connect(std::bind(&DocumentModel::slotDeleteObject, this, sp::_1)); + Doc.signalChangedObject.connect(std::bind(&DocumentModel::slotChangeObject, this, sp::_1, sp::_2)); + Doc.signalRelabelObject.connect(std::bind(&DocumentModel::slotRenameObject, this, sp::_1)); + Doc.signalActivatedObject.connect(std::bind(&DocumentModel::slotActiveObject, this, sp::_1)); + Doc.signalInEdit.connect(std::bind(&DocumentModel::slotInEdit, this, sp::_1)); + Doc.signalResetEdit.connect(std::bind(&DocumentModel::slotResetEdit, this, sp::_1)); QModelIndex parent = createIndex(0,0,d->rootItem); int count_docs = d->rootItem->childCount(); diff --git a/src/Gui/DocumentObserverPython.cpp b/src/Gui/DocumentObserverPython.cpp index aa8677451f..a17d61fe23 100644 --- a/src/Gui/DocumentObserverPython.cpp +++ b/src/Gui/DocumentObserverPython.cpp @@ -32,7 +32,7 @@ using namespace Gui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; std::vector DocumentObserverPython::_instances; @@ -62,7 +62,7 @@ DocumentObserverPython::DocumentObserverPython(const Py::Object& obj) : inst(obj FC_PY_GetCallable(obj.ptr(), "slot" #_name1, py##_name1.py);\ if (!py##_name1.py.isNone())\ py##_name1.slot = Application::Instance->signal##_name2.connect(\ - boost::bind(&DocumentObserverPython::slot##_name1, this, bp::_1));\ + std::bind(&DocumentObserverPython::slot##_name1, this, sp::_1));\ }\ while(0); @@ -70,7 +70,7 @@ DocumentObserverPython::DocumentObserverPython(const Py::Object& obj) : inst(obj FC_PY_GetCallable(obj.ptr(), "slot" #_name1, py##_name1.py);\ if (!py##_name1.py.isNone())\ py##_name1.slot = Application::Instance->signal##_name2.connect(\ - boost::bind(&DocumentObserverPython::slot##_name1, this, bp::_1, bp::_2));\ + std::bind(&DocumentObserverPython::slot##_name1, this, sp::_1, sp::_2));\ }\ while(0); diff --git a/src/Gui/ExpressionBinding.cpp b/src/Gui/ExpressionBinding.cpp index b9d46d1206..e44fb94721 100644 --- a/src/Gui/ExpressionBinding.cpp +++ b/src/Gui/ExpressionBinding.cpp @@ -45,7 +45,7 @@ FC_LOG_LEVEL_INIT("Expression",true,true) using namespace Gui; using namespace App; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; ExpressionBinding::ExpressionBinding() : m_autoApply(false) @@ -111,9 +111,9 @@ void ExpressionBinding::bind(const App::ObjectIdentifier &_path) //connect to be informed about changes DocumentObject * docObj = path.getDocumentObject(); if (docObj) { - expressionchanged = docObj->ExpressionEngine.expressionChanged.connect(boost::bind(&ExpressionBinding::expressionChange, this, bp::_1)); + expressionchanged = docObj->ExpressionEngine.expressionChanged.connect(std::bind(&ExpressionBinding::expressionChange, this, sp::_1)); App::Document* doc = docObj->getDocument(); - objectdeleted = doc->signalDeletedObject.connect(boost::bind(&ExpressionBinding::objectDeleted, this, bp::_1)); + objectdeleted = doc->signalDeletedObject.connect(std::bind(&ExpressionBinding::objectDeleted, this, sp::_1)); } } diff --git a/src/Gui/GraphvizView.cpp b/src/Gui/GraphvizView.cpp index 055f8bcc7f..5098f2548c 100644 --- a/src/Gui/GraphvizView.cpp +++ b/src/Gui/GraphvizView.cpp @@ -49,7 +49,7 @@ using namespace Gui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; namespace Gui { @@ -254,9 +254,9 @@ GraphvizView::GraphvizView(App::Document & _doc, QWidget* parent) connect(thread, &GraphvizWorker::svgFileRead, this, &GraphvizView::svgFileRead); // Connect signal from document - recomputeConnection = _doc.signalRecomputed.connect(boost::bind(&GraphvizView::updateSvgItem, this, bp::_1)); - undoConnection = _doc.signalUndo.connect(boost::bind(&GraphvizView::updateSvgItem, this, bp::_1)); - redoConnection = _doc.signalRedo.connect(boost::bind(&GraphvizView::updateSvgItem, this, bp::_1)); + recomputeConnection = _doc.signalRecomputed.connect(std::bind(&GraphvizView::updateSvgItem, this, sp::_1)); + undoConnection = _doc.signalUndo.connect(std::bind(&GraphvizView::updateSvgItem, this, sp::_1)); + redoConnection = _doc.signalRedo.connect(std::bind(&GraphvizView::updateSvgItem, this, sp::_1)); updateSvgItem(_doc); } diff --git a/src/Gui/MDIView.cpp b/src/Gui/MDIView.cpp index d13bada7e7..ea109a9479 100644 --- a/src/Gui/MDIView.cpp +++ b/src/Gui/MDIView.cpp @@ -50,7 +50,7 @@ using namespace Gui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; TYPESYSTEM_SOURCE_ABSTRACT(Gui::MDIView,Gui::BaseView) @@ -68,7 +68,7 @@ MDIView::MDIView(Gui::Document* pcDocument,QWidget* parent, Qt::WindowFlags wfla if (pcDocument) { connectDelObject = pcDocument->signalDeletedObject.connect - (boost::bind(&ActiveObjectList::objectDeleted, &ActiveObjects, bp::_1)); + (std::bind(&ActiveObjectList::objectDeleted, &ActiveObjects, sp::_1)); assert(connectDelObject.connected()); } } diff --git a/src/Gui/MDIViewPyWrap.cpp b/src/Gui/MDIViewPyWrap.cpp index 653d7dddcd..faeed4973b 100644 --- a/src/Gui/MDIViewPyWrap.cpp +++ b/src/Gui/MDIViewPyWrap.cpp @@ -34,7 +34,7 @@ using namespace Gui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; namespace Gui { diff --git a/src/Gui/ManualAlignment.cpp b/src/Gui/ManualAlignment.cpp index cb2328e455..4aef42d8c0 100644 --- a/src/Gui/ManualAlignment.cpp +++ b/src/Gui/ManualAlignment.cpp @@ -62,7 +62,7 @@ using namespace Gui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; AlignmentGroup::AlignmentGroup() { @@ -656,7 +656,7 @@ ManualAlignment::ManualAlignment() { // connect with the application's signal for deletion of documents this->connectApplicationDeletedDocument = Gui::Application::Instance->signalDeleteDocument - .connect(boost::bind(&ManualAlignment::slotDeletedDocument, this, bp::_1)); + .connect(std::bind(&ManualAlignment::slotDeletedDocument, this, sp::_1)); // setup sensor connection d->sensorCam1 = new SoNodeSensor(Private::syncCameraCB, this); @@ -849,8 +849,8 @@ void ManualAlignment::startAlignment(Base::Type mousemodel) // Connect to the document's signal as we want to be notified when something happens if (this->connectDocumentDeletedObject.connected()) this->connectDocumentDeletedObject.disconnect(); - this->connectDocumentDeletedObject = myDocument->signalDeletedObject.connect(boost::bind - (&ManualAlignment::slotDeletedObject, this, bp::_1)); + this->connectDocumentDeletedObject = myDocument->signalDeletedObject.connect(std::bind + (&ManualAlignment::slotDeletedObject, this, sp::_1)); continueAlignment(); } diff --git a/src/Gui/MergeDocuments.cpp b/src/Gui/MergeDocuments.cpp index a376033f36..ad18cbe814 100644 --- a/src/Gui/MergeDocuments.cpp +++ b/src/Gui/MergeDocuments.cpp @@ -37,7 +37,7 @@ using namespace Gui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; namespace Gui { @@ -77,9 +77,9 @@ private: MergeDocuments::MergeDocuments(App::Document* doc) : stream(nullptr), appdoc(doc) { connectExport = doc->signalExportObjects.connect - (boost::bind(&MergeDocuments::exportObject, this, bp::_1, bp::_2)); + (std::bind(&MergeDocuments::exportObject, this, sp::_1, sp::_2)); connectImport = doc->signalImportObjects.connect - (boost::bind(&MergeDocuments::importObject, this, bp::_1, bp::_2)); + (std::bind(&MergeDocuments::importObject, this, sp::_1, sp::_2)); document = Gui::Application::Instance->getDocument(doc); } diff --git a/src/Gui/NotificationArea.cpp b/src/Gui/NotificationArea.cpp index a3206b0fa7..6c25839985 100644 --- a/src/Gui/NotificationArea.cpp +++ b/src/Gui/NotificationArea.cpp @@ -56,7 +56,7 @@ using namespace Gui; using Connection = boost::signals2::connection; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; class NotificationAreaObserver; @@ -829,7 +829,7 @@ NotificationArea::NotificationArea(QWidget* parent) // user initiated pImp->finishRestoreDocumentConnection = App::GetApplication().signalFinishRestoreDocument.connect( - boost::bind(&Gui::NotificationArea::slotRestoreFinished, this, bp::_1)); + std::bind(&Gui::NotificationArea::slotRestoreFinished, this, sp::_1)); // Initialisation of the timer to inhibit continuous updates of the notification system in case // clusters of messages arrive (so as to delay the actual notification until the whole cluster diff --git a/src/Gui/Placement.cpp b/src/Gui/Placement.cpp index b938027796..47ace46469 100644 --- a/src/Gui/Placement.cpp +++ b/src/Gui/Placement.cpp @@ -48,7 +48,7 @@ using namespace Gui::Dialog; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; namespace Gui { namespace Dialog { class find_placement @@ -394,7 +394,7 @@ void Placement::setupSignalMapper() void Placement::setupDocument() { connectAct = Application::Instance->signalActiveDocument.connect - (boost::bind(&Placement::slotActiveDocument, this, bp::_1)); + (std::bind(&Placement::slotActiveDocument, this, sp::_1)); App::Document* activeDoc = App::GetApplication().getActiveDocument(); if (activeDoc) { handler.appendDocument(activeDoc->getName()); diff --git a/src/Gui/PropertyView.cpp b/src/Gui/PropertyView.cpp index 3058e9f100..a31daf1ab5 100644 --- a/src/Gui/PropertyView.cpp +++ b/src/Gui/PropertyView.cpp @@ -49,7 +49,7 @@ using namespace std; using namespace Gui; using namespace Gui::DockWnd; using namespace Gui::PropertyEditor; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; static ParameterGrp::handle _GetParam() { static ParameterGrp::handle hGrp; @@ -102,40 +102,40 @@ PropertyView::PropertyView(QWidget *parent) connect(tabs, &QTabWidget::currentChanged, this, &PropertyView::tabChanged); this->connectPropData = - App::GetApplication().signalChangedObject.connect(boost::bind - (&PropertyView::slotChangePropertyData, this, bp::_2)); + App::GetApplication().signalChangedObject.connect(std::bind + (&PropertyView::slotChangePropertyData, this, sp::_2)); this->connectPropView = - Gui::Application::Instance->signalChangedObject.connect(boost::bind - (&PropertyView::slotChangePropertyView, this, bp::_1, bp::_2)); + Gui::Application::Instance->signalChangedObject.connect(std::bind + (&PropertyView::slotChangePropertyView, this, sp::_1, sp::_2)); this->connectPropAppend = - App::GetApplication().signalAppendDynamicProperty.connect(boost::bind - (&PropertyView::slotAppendDynamicProperty, this, bp::_1)); + App::GetApplication().signalAppendDynamicProperty.connect(std::bind + (&PropertyView::slotAppendDynamicProperty, this, sp::_1)); this->connectPropRemove = - App::GetApplication().signalRemoveDynamicProperty.connect(boost::bind - (&PropertyView::slotRemoveDynamicProperty, this, bp::_1)); + App::GetApplication().signalRemoveDynamicProperty.connect(std::bind + (&PropertyView::slotRemoveDynamicProperty, this, sp::_1)); this->connectPropChange = - App::GetApplication().signalChangePropertyEditor.connect(boost::bind - (&PropertyView::slotChangePropertyEditor, this, bp::_1, bp::_2)); + App::GetApplication().signalChangePropertyEditor.connect(std::bind + (&PropertyView::slotChangePropertyEditor, this, sp::_1, sp::_2)); this->connectUndoDocument = - App::GetApplication().signalUndoDocument.connect(boost::bind + App::GetApplication().signalUndoDocument.connect(std::bind (&PropertyView::slotRollback, this)); this->connectRedoDocument = - App::GetApplication().signalRedoDocument.connect(boost::bind + App::GetApplication().signalRedoDocument.connect(std::bind (&PropertyView::slotRollback, this)); this->connectActiveDoc = - Application::Instance->signalActiveDocument.connect(boost::bind - (&PropertyView::slotActiveDocument, this, bp::_1)); + Application::Instance->signalActiveDocument.connect(std::bind + (&PropertyView::slotActiveDocument, this, sp::_1)); this->connectDelDocument = Application::Instance->signalDeleteDocument.connect( - boost::bind(&PropertyView::slotDeleteDocument, this, bp::_1)); + std::bind(&PropertyView::slotDeleteDocument, this, sp::_1)); this->connectDelViewObject = Application::Instance->signalDeletedObject.connect( - boost::bind(&PropertyView::slotDeletedViewObject, this, bp::_1)); + std::bind(&PropertyView::slotDeletedViewObject, this, sp::_1)); this->connectDelObject = App::GetApplication().signalDeletedObject.connect( - boost::bind(&PropertyView::slotDeletedObject, this, bp::_1)); + std::bind(&PropertyView::slotDeletedObject, this, sp::_1)); this->connectChangedDocument = App::GetApplication().signalChangedDocument.connect( - boost::bind(&PropertyView::slotChangePropertyData, this, bp::_2)); + std::bind(&PropertyView::slotChangePropertyData, this, sp::_2)); } PropertyView::~PropertyView() diff --git a/src/Gui/Selection.cpp b/src/Gui/Selection.cpp index 20ee5c1834..550c420985 100644 --- a/src/Gui/Selection.cpp +++ b/src/Gui/Selection.cpp @@ -56,7 +56,7 @@ FC_LOG_LEVEL_INIT("Selection",false,true,true) using namespace Gui; using namespace std; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; SelectionGateFilterExternal::SelectionGateFilterExternal(const char *docName, const char *objName) { if(docName) { @@ -131,8 +131,8 @@ void SelectionObserver::attachSelection() auto &signal = newStyle ? Selection().signalSelectionChanged3 : oldStyle ? Selection().signalSelectionChanged2 : Selection().signalSelectionChanged ; - connectSelection = signal.connect(boost::bind - (&SelectionObserver::_onSelectionChanged, this, bp::_1)); + connectSelection = signal.connect(std::bind + (&SelectionObserver::_onSelectionChanged, this, sp::_1)); if (!filterDocName.empty()) { Selection().addSelectionGate( @@ -1613,8 +1613,8 @@ SelectionSingleton::SelectionSingleton() hz = 0; ActiveGate = nullptr; gateResolve = ResolveMode::OldStyleElement; - App::GetApplication().signalDeletedObject.connect(boost::bind(&Gui::SelectionSingleton::slotDeletedObject, this, bp::_1)); - signalSelectionChanged.connect(boost::bind(&Gui::SelectionSingleton::slotSelectionChanged, this, bp::_1)); + App::GetApplication().signalDeletedObject.connect(std::bind(&Gui::SelectionSingleton::slotDeletedObject, this, sp::_1)); + signalSelectionChanged.connect(std::bind(&Gui::SelectionSingleton::slotSelectionChanged, this, sp::_1)); } /** diff --git a/src/Gui/TaskElementColors.cpp b/src/Gui/TaskElementColors.cpp index 17b649e1b1..b3992bdf1b 100644 --- a/src/Gui/TaskElementColors.cpp +++ b/src/Gui/TaskElementColors.cpp @@ -47,7 +47,7 @@ FC_LOG_LEVEL_INIT("Gui", true, true) using namespace Gui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; class ElementColors::Private: public Gui::SelectionGate { @@ -332,10 +332,10 @@ ElementColors::ElementColors(ViewProviderDocumentObject* vp, bool noHide) Selection().addSelectionGate(d, ResolveMode::NoResolve); - d->connectDelDoc = Application::Instance->signalDeleteDocument.connect(boost::bind - (&ElementColors::slotDeleteDocument, this, bp::_1)); - d->connectDelObj = Application::Instance->signalDeletedObject.connect(boost::bind - (&ElementColors::slotDeleteObject, this, bp::_1)); + d->connectDelDoc = Application::Instance->signalDeleteDocument.connect(std::bind + (&ElementColors::slotDeleteDocument, this, sp::_1)); + d->connectDelObj = Application::Instance->signalDeletedObject.connect(std::bind + (&ElementColors::slotDeleteObject, this, sp::_1)); d->populate(); } diff --git a/src/Gui/TaskView/TaskAppearance.cpp b/src/Gui/TaskView/TaskAppearance.cpp index 695686ef54..b44944547d 100644 --- a/src/Gui/TaskView/TaskAppearance.cpp +++ b/src/Gui/TaskView/TaskAppearance.cpp @@ -35,7 +35,7 @@ using namespace Gui::TaskView; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; /* TRANSLATOR Gui::TaskView::TaskAppearance */ @@ -56,8 +56,8 @@ TaskAppearance::TaskAppearance(QWidget *parent) Gui::Selection().Attach(this); this->connectChangedObject = - Gui::Application::Instance->signalChangedObject.connect(boost::bind - (&TaskAppearance::slotChangedObject, this, bp::_1, bp::_2)); + Gui::Application::Instance->signalChangedObject.connect(std::bind + (&TaskAppearance::slotChangedObject, this, sp::_1, sp::_2)); } TaskAppearance::~TaskAppearance() diff --git a/src/Gui/TaskView/TaskView.cpp b/src/Gui/TaskView/TaskView.cpp index 50e951c22b..8395477a13 100644 --- a/src/Gui/TaskView/TaskView.cpp +++ b/src/Gui/TaskView/TaskView.cpp @@ -48,7 +48,7 @@ using namespace Gui::TaskView; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; //************************************************************************** @@ -295,16 +295,16 @@ TaskView::TaskView(QWidget *parent) connectApplicationActiveDocument = App::GetApplication().signalActiveDocument.connect - (boost::bind(&Gui::TaskView::TaskView::slotActiveDocument, this, bp::_1)); + (std::bind(&Gui::TaskView::TaskView::slotActiveDocument, this, sp::_1)); connectApplicationDeleteDocument = App::GetApplication().signalDeletedDocument.connect - (boost::bind(&Gui::TaskView::TaskView::slotDeletedDocument, this)); + (std::bind(&Gui::TaskView::TaskView::slotDeletedDocument, this)); connectApplicationUndoDocument = App::GetApplication().signalUndoDocument.connect - (boost::bind(&Gui::TaskView::TaskView::slotUndoDocument, this, bp::_1)); + (std::bind(&Gui::TaskView::TaskView::slotUndoDocument, this, sp::_1)); connectApplicationRedoDocument = App::GetApplication().signalRedoDocument.connect - (boost::bind(&Gui::TaskView::TaskView::slotRedoDocument, this, bp::_1)); + (std::bind(&Gui::TaskView::TaskView::slotRedoDocument, this, sp::_1)); } TaskView::~TaskView() diff --git a/src/Gui/TextDocumentEditorView.cpp b/src/Gui/TextDocumentEditorView.cpp index ed8ccd9e80..dcca85aa62 100644 --- a/src/Gui/TextDocumentEditorView.cpp +++ b/src/Gui/TextDocumentEditorView.cpp @@ -108,9 +108,9 @@ void TextDocumentEditorView::setupEditor() void TextDocumentEditorView::setupConnection() { textConnection = textDocument->connectText( - boost::bind(&TextDocumentEditorView::sourceChanged, this)); + std::bind(&TextDocumentEditorView::sourceChanged, this)); labelConnection = textDocument->connectLabel( - boost::bind(&TextDocumentEditorView::labelChanged, this)); + std::bind(&TextDocumentEditorView::labelChanged, this)); } void TextDocumentEditorView::sourceChanged() diff --git a/src/Gui/Tree.cpp b/src/Gui/Tree.cpp index 2145410172..cdbc4a5916 100644 --- a/src/Gui/Tree.cpp +++ b/src/Gui/Tree.cpp @@ -78,7 +78,7 @@ FC_LOG_LEVEL_INIT("Tree", false, true, true) #define TREE_TRACE(_msg) _TREE_PRINT(FC_LOGLEVEL_TRACE,Notify,_msg) using namespace Gui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; ///////////////////////////////////////////////////////////////////////////////// @@ -218,11 +218,11 @@ public: { // Setup connections connectIcon = viewObject->signalChangeIcon.connect( - boost::bind(&DocumentObjectData::slotChangeIcon, this)); + std::bind(&DocumentObjectData::slotChangeIcon, this)); connectTool = viewObject->signalChangeToolTip.connect( - boost::bind(&DocumentObjectData::slotChangeToolTip, this, bp::_1)); + std::bind(&DocumentObjectData::slotChangeToolTip, this, sp::_1)); connectStat = viewObject->signalChangeStatusTip.connect( - boost::bind(&DocumentObjectData::slotChangeStatusTip, this, bp::_1)); + std::bind(&DocumentObjectData::slotChangeStatusTip, this, sp::_1)); removeChildrenFromRoot = viewObject->canRemoveChildrenFromRoot(); itemHidden = !viewObject->showInTree(); @@ -463,18 +463,18 @@ TreeWidget::TreeWidget(const char* name, QWidget* parent) this, &TreeWidget::onSearchObjects); // Setup connections - connectNewDocument = Application::Instance->signalNewDocument.connect(boost::bind(&TreeWidget::slotNewDocument, this, bp::_1, bp::_2)); - connectDelDocument = Application::Instance->signalDeleteDocument.connect(boost::bind(&TreeWidget::slotDeleteDocument, this, bp::_1)); - connectRenDocument = Application::Instance->signalRenameDocument.connect(boost::bind(&TreeWidget::slotRenameDocument, this, bp::_1)); - connectActDocument = Application::Instance->signalActiveDocument.connect(boost::bind(&TreeWidget::slotActiveDocument, this, bp::_1)); - connectRelDocument = Application::Instance->signalRelabelDocument.connect(boost::bind(&TreeWidget::slotRelabelDocument, this, bp::_1)); - connectShowHidden = Application::Instance->signalShowHidden.connect(boost::bind(&TreeWidget::slotShowHidden, this, bp::_1)); + connectNewDocument = Application::Instance->signalNewDocument.connect(std::bind(&TreeWidget::slotNewDocument, this, sp::_1, sp::_2)); + connectDelDocument = Application::Instance->signalDeleteDocument.connect(std::bind(&TreeWidget::slotDeleteDocument, this, sp::_1)); + connectRenDocument = Application::Instance->signalRenameDocument.connect(std::bind(&TreeWidget::slotRenameDocument, this, sp::_1)); + connectActDocument = Application::Instance->signalActiveDocument.connect(std::bind(&TreeWidget::slotActiveDocument, this, sp::_1)); + connectRelDocument = Application::Instance->signalRelabelDocument.connect(std::bind(&TreeWidget::slotRelabelDocument, this, sp::_1)); + connectShowHidden = Application::Instance->signalShowHidden.connect(std::bind(&TreeWidget::slotShowHidden, this, sp::_1)); // Gui::Document::signalChangedObject informs the App::Document property // change, not view provider's own property, which is what the signal below // for connectChangedViewObj = Application::Instance->signalChangedObject.connect( - boost::bind(&TreeWidget::slotChangedViewObject, this, bp::_1, bp::_2)); + std::bind(&TreeWidget::slotChangedViewObject, this, sp::_1, sp::_2)); setupResizableColumn(this); this->header()->setStretchLastSection(false); @@ -2563,9 +2563,9 @@ void TreeWidget::onUpdateStatus() if (!docItem->connectChgObject.connected()) { docItem->connectChgObject = docItem->document()->signalChangedObject.connect( - boost::bind(&TreeWidget::slotChangeObject, this, bp::_1, bp::_2)); + std::bind(&TreeWidget::slotChangeObject, this, sp::_1, sp::_2)); docItem->connectTouchedObject = doc->signalTouchedObject.connect( - boost::bind(&TreeWidget::slotTouchedObject, this, bp::_1)); + std::bind(&TreeWidget::slotTouchedObject, this, sp::_1)); } if (doc->testStatus(App::Document::PartialDoc)) @@ -3215,26 +3215,26 @@ DocumentItem::DocumentItem(const Gui::Document* doc, QTreeWidgetItem* parent) : QTreeWidgetItem(parent, TreeWidget::DocumentType), pDocument(const_cast(doc)) { // Setup connections - connectNewObject = doc->signalNewObject.connect(boost::bind(&DocumentItem::slotNewObject, this, bp::_1)); + connectNewObject = doc->signalNewObject.connect(std::bind(&DocumentItem::slotNewObject, this, sp::_1)); connectDelObject = doc->signalDeletedObject.connect( - boost::bind(&TreeWidget::slotDeleteObject, getTree(), bp::_1)); + std::bind(&TreeWidget::slotDeleteObject, getTree(), sp::_1)); if (!App::GetApplication().isRestoring()) { connectChgObject = doc->signalChangedObject.connect( - boost::bind(&TreeWidget::slotChangeObject, getTree(), bp::_1, bp::_2)); + std::bind(&TreeWidget::slotChangeObject, getTree(), sp::_1, sp::_2)); connectTouchedObject = doc->getDocument()->signalTouchedObject.connect( - boost::bind(&TreeWidget::slotTouchedObject, getTree(), bp::_1)); + std::bind(&TreeWidget::slotTouchedObject, getTree(), sp::_1)); } - connectEdtObject = doc->signalInEdit.connect(boost::bind(&DocumentItem::slotInEdit, this, bp::_1)); - connectResObject = doc->signalResetEdit.connect(boost::bind(&DocumentItem::slotResetEdit, this, bp::_1)); + connectEdtObject = doc->signalInEdit.connect(std::bind(&DocumentItem::slotInEdit, this, sp::_1)); + connectResObject = doc->signalResetEdit.connect(std::bind(&DocumentItem::slotResetEdit, this, sp::_1)); connectHltObject = doc->signalHighlightObject.connect( - boost::bind(&DocumentItem::slotHighlightObject, this, bp::_1, bp::_2, bp::_3, bp::_4, bp::_5)); + std::bind(&DocumentItem::slotHighlightObject, this, sp::_1, sp::_2, sp::_3, sp::_4, sp::_5)); connectExpObject = doc->signalExpandObject.connect( - boost::bind(&DocumentItem::slotExpandObject, this, bp::_1, bp::_2, bp::_3, bp::_4)); - connectScrObject = doc->signalScrollToObject.connect(boost::bind(&DocumentItem::slotScrollToObject, this, bp::_1)); + std::bind(&DocumentItem::slotExpandObject, this, sp::_1, sp::_2, sp::_3, sp::_4)); + connectScrObject = doc->signalScrollToObject.connect(std::bind(&DocumentItem::slotScrollToObject, this, sp::_1)); auto adoc = doc->getDocument(); - connectRecomputed = adoc->signalRecomputed.connect(boost::bind(&DocumentItem::slotRecomputed, this, bp::_1, bp::_2)); + connectRecomputed = adoc->signalRecomputed.connect(std::bind(&DocumentItem::slotRecomputed, this, sp::_1, sp::_2)); connectRecomputedObj = adoc->signalRecomputedObject.connect( - boost::bind(&DocumentItem::slotRecomputedObject, this, bp::_1)); + std::bind(&DocumentItem::slotRecomputedObject, this, sp::_1)); setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable/*|Qt::ItemIsEditable*/); diff --git a/src/Gui/ViewProviderLink.cpp b/src/Gui/ViewProviderLink.cpp index fa462244b4..1d2edc14f3 100644 --- a/src/Gui/ViewProviderLink.cpp +++ b/src/Gui/ViewProviderLink.cpp @@ -195,7 +195,7 @@ public: { FC_LOG("new link to " << pcLinked->getObject()->getFullName()); connChangeIcon = vp->signalChangeIcon.connect( - boost::bind(&LinkInfo::slotChangeIcon,this)); + std::bind(&LinkInfo::slotChangeIcon,this)); vp->forceUpdate(true); sensor.setFunction(sensorCB); sensor.setData(this); diff --git a/src/Gui/ViewProviderOriginGroupExtension.cpp b/src/Gui/ViewProviderOriginGroupExtension.cpp index 3a59f02aa1..039a587efe 100644 --- a/src/Gui/ViewProviderOriginGroupExtension.cpp +++ b/src/Gui/ViewProviderOriginGroupExtension.cpp @@ -43,7 +43,7 @@ using namespace Gui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; EXTENSION_PROPERTY_SOURCE(Gui::ViewProviderOriginGroupExtension, Gui::ViewProviderGeoFeatureGroupExtension) @@ -98,10 +98,10 @@ void ViewProviderOriginGroupExtension::extensionAttach(App::DocumentObject *pcOb assert ( gdoc ); connectChangedObjectApp = adoc->signalChangedObject.connect ( - boost::bind ( &ViewProviderOriginGroupExtension::slotChangedObjectApp, this, bp::_1) ); + std::bind ( &ViewProviderOriginGroupExtension::slotChangedObjectApp, this, sp::_1) ); connectChangedObjectGui = gdoc->signalChangedObject.connect ( - boost::bind ( &ViewProviderOriginGroupExtension::slotChangedObjectGui, this, bp::_1) ); + std::bind ( &ViewProviderOriginGroupExtension::slotChangedObjectGui, this, sp::_1) ); } void ViewProviderOriginGroupExtension::extensionUpdateData( const App::Property* prop ) { diff --git a/src/Gui/ViewProviderPythonFeature.cpp b/src/Gui/ViewProviderPythonFeature.cpp index c58df52a1b..c59b51523c 100644 --- a/src/Gui/ViewProviderPythonFeature.cpp +++ b/src/Gui/ViewProviderPythonFeature.cpp @@ -50,7 +50,7 @@ FC_LOG_LEVEL_INIT("ViewProviderPythonFeature", true, true) using namespace Gui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; // ---------------------------------------------------------------------------- diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp index 2bf60b8a70..adc4f3a267 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp @@ -65,14 +65,14 @@ using namespace FemGui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; void FunctionWidget::setViewProvider(ViewProviderFemPostFunction* view) { m_view = view; m_object = static_cast(view->getObject()); m_connection = m_object->getDocument()->signalChangedObject.connect( - boost::bind(&FunctionWidget::onObjectsChanged, this, bp::_1, bp::_2)); + std::bind(&FunctionWidget::onObjectsChanged, this, sp::_1, sp::_2)); } void FunctionWidget::onObjectsChanged(const App::DocumentObject& obj, const App::Property& p) { diff --git a/src/Mod/Inspection/App/InspectionFeature.cpp b/src/Mod/Inspection/App/InspectionFeature.cpp index 8a45be6a75..8ef9e87f89 100644 --- a/src/Mod/Inspection/App/InspectionFeature.cpp +++ b/src/Mod/Inspection/App/InspectionFeature.cpp @@ -57,7 +57,7 @@ using namespace Inspection; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; InspectActualMesh::InspectActualMesh(const Mesh::MeshObject& rMesh) : _mesh(rMesh.getKernel()) { @@ -818,7 +818,7 @@ App::DocumentObjectExecReturn* Feature::execute() std::generate(index.begin(), index.end(), Base::iotaGen(0)); DistanceInspection check(this->SearchRadius.getValue(), actual, inspectNominal); QFuture future = QtConcurrent::mapped - (index, boost::bind(&DistanceInspection::mapped, &check, bp::_1)); + (index, std::bind(&DistanceInspection::mapped, &check, sp::_1)); //future.waitForFinished(); // blocks the GUI Base::FutureWatcherProgress progress("Inspecting...", actual->countPoints()); QFutureWatcher watcher; diff --git a/src/Mod/MeshPart/Gui/CrossSections.cpp b/src/Mod/MeshPart/Gui/CrossSections.cpp index 473f9514a7..4604798110 100644 --- a/src/Mod/MeshPart/Gui/CrossSections.cpp +++ b/src/Mod/MeshPart/Gui/CrossSections.cpp @@ -61,7 +61,7 @@ using namespace MeshPartGui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; namespace MeshPartGui { class ViewProviderCrossSections : public Gui::ViewProvider @@ -296,7 +296,7 @@ void CrossSections::apply() MeshCrossSection cs(kernel, grid, a, b, c, connectEdges, eps); QFuture< std::list > future = QtConcurrent::mapped - (d, boost::bind(&MeshCrossSection::section, &cs, bp::_1)); + (d, std::bind(&MeshCrossSection::section, &cs, sp::_1)); future.waitForFinished(); TopoDS_Compound comp; diff --git a/src/Mod/Part/App/PartFeature.cpp b/src/Mod/Part/App/PartFeature.cpp index fffa371a18..93a6bcdb5c 100644 --- a/src/Mod/Part/App/PartFeature.cpp +++ b/src/Mod/Part/App/PartFeature.cpp @@ -67,7 +67,7 @@ #include "TopoShapePy.h" using namespace Part; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; FC_LOG_LEVEL_INIT("Part",true,true) @@ -208,11 +208,11 @@ struct ShapeCache { return; inited = true; App::GetApplication().signalDeleteDocument.connect( - boost::bind(&ShapeCache::slotDeleteDocument, this, bp::_1)); + std::bind(&ShapeCache::slotDeleteDocument, this, sp::_1)); App::GetApplication().signalDeletedObject.connect( - boost::bind(&ShapeCache::slotClear, this, bp::_1)); + std::bind(&ShapeCache::slotClear, this, sp::_1)); App::GetApplication().signalChangedObject.connect( - boost::bind(&ShapeCache::slotChanged, this, bp::_1,bp::_2)); + std::bind(&ShapeCache::slotChanged, this, sp::_1,sp::_2)); } void slotDeleteDocument(const App::Document &doc) { diff --git a/src/Mod/Part/Gui/CrossSections.cpp b/src/Mod/Part/Gui/CrossSections.cpp index 371d2948d2..2e7430b057 100644 --- a/src/Mod/Part/Gui/CrossSections.cpp +++ b/src/Mod/Part/Gui/CrossSections.cpp @@ -57,7 +57,7 @@ using namespace PartGui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; #undef CS_FUTURE // multi-threading causes some problems namespace PartGui { @@ -243,7 +243,7 @@ void CrossSections::apply() for (std::vector::iterator it = obj.begin(); it != obj.end(); ++it) { Part::CrossSection cs(a,b,c,static_cast(*it)->Shape.getValue()); QFuture< std::list > future = QtConcurrent::mapped - (d, boost::bind(&Part::CrossSection::section, &cs, bp::_1)); + (d, std::bind(&Part::CrossSection::section, &cs, sp::_1)); future.waitForFinished(); QFuture< std::list >::const_iterator ft; TopoDS_Compound comp; diff --git a/src/Mod/Part/Gui/DlgBooleanOperation.cpp b/src/Mod/Part/Gui/DlgBooleanOperation.cpp index cca0f7128c..b8fa45892c 100644 --- a/src/Mod/Part/Gui/DlgBooleanOperation.cpp +++ b/src/Mod/Part/Gui/DlgBooleanOperation.cpp @@ -48,7 +48,7 @@ using namespace PartGui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; namespace PartGui { class BooleanOperationItem : public QTreeWidgetItem @@ -93,10 +93,10 @@ DlgBooleanOperation::DlgBooleanOperation(QWidget* parent) this, &DlgBooleanOperation::currentItemChanged); connect(ui->secondShape, &QTreeWidget::currentItemChanged, this, &DlgBooleanOperation::currentItemChanged); - this->connectNewObject = App::GetApplication().signalNewObject.connect(boost::bind - (&DlgBooleanOperation::slotCreatedObject, this, bp::_1)); - this->connectModObject = App::GetApplication().signalChangedObject.connect(boost::bind - (&DlgBooleanOperation::slotChangedObject, this, bp::_1, bp::_2)); + this->connectNewObject = App::GetApplication().signalNewObject.connect(std::bind + (&DlgBooleanOperation::slotCreatedObject, this, sp::_1)); + this->connectModObject = App::GetApplication().signalChangedObject.connect(std::bind + (&DlgBooleanOperation::slotChangedObject, this, sp::_1, sp::_2)); findShapes(); } diff --git a/src/Mod/Part/Gui/DlgFilletEdges.cpp b/src/Mod/Part/Gui/DlgFilletEdges.cpp index 6ddf486d9e..12a4f3184c 100644 --- a/src/Mod/Part/Gui/DlgFilletEdges.cpp +++ b/src/Mod/Part/Gui/DlgFilletEdges.cpp @@ -72,7 +72,7 @@ using namespace PartGui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; FilletRadiusDelegate::FilletRadiusDelegate(QObject *parent) : QItemDelegate(parent) { @@ -245,9 +245,9 @@ DlgFilletEdges::DlgFilletEdges(FilletType type, Part::FilletBase* fillet, QWidge d->fillet = fillet; d->connectApplicationDeletedObject = App::GetApplication().signalDeletedObject - .connect(boost::bind(&DlgFilletEdges::onDeleteObject, this, bp::_1)); + .connect(std::bind(&DlgFilletEdges::onDeleteObject, this, sp::_1)); d->connectApplicationDeletedDocument = App::GetApplication().signalDeleteDocument - .connect(boost::bind(&DlgFilletEdges::onDeleteDocument, this, bp::_1)); + .connect(std::bind(&DlgFilletEdges::onDeleteDocument, this, sp::_1)); // set tree view with three columns FilletRadiusModel* model = new FilletRadiusModel(this); connect(model, &FilletRadiusModel::toggleCheckState, diff --git a/src/Mod/Part/Gui/TaskAttacher.cpp b/src/Mod/Part/Gui/TaskAttacher.cpp index 27f74c185a..bd36c135db 100644 --- a/src/Mod/Part/Gui/TaskAttacher.cpp +++ b/src/Mod/Part/Gui/TaskAttacher.cpp @@ -55,7 +55,7 @@ using namespace PartGui; using namespace Gui; using namespace Attacher; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; /* TRANSLATOR PartDesignGui::TaskAttacher */ @@ -225,8 +225,8 @@ TaskAttacher::TaskAttacher(Gui::ViewProviderDocumentObject *ViewProvider, QWidge updatePreview(); // connect object deletion with slot - auto bnd1 = boost::bind(&TaskAttacher::objectDeleted, this, bp::_1); - auto bnd2 = boost::bind(&TaskAttacher::documentDeleted, this, bp::_1); + auto bnd1 = std::bind(&TaskAttacher::objectDeleted, this, sp::_1); + auto bnd2 = std::bind(&TaskAttacher::documentDeleted, this, sp::_1); Gui::Document* document = Gui::Application::Instance->getDocument(ViewProvider->getObject()->getDocument()); connectDelObject = document->signalDeletedObject.connect(bnd1); connectDelDocument = document->signalDeleteDocument.connect(bnd2); diff --git a/src/Mod/Part/Gui/TaskDimension.cpp b/src/Mod/Part/Gui/TaskDimension.cpp index cf3fee50d6..ba3dea3f93 100644 --- a/src/Mod/Part/Gui/TaskDimension.cpp +++ b/src/Mod/Part/Gui/TaskDimension.cpp @@ -79,7 +79,7 @@ #include "TaskDimension.h" -namespace bp = boost::placeholders; +namespace sp = std::placeholders; static bool _MeasureInfoInited; @@ -94,7 +94,7 @@ struct MeasureInfo { { if(!_MeasureInfoInited) { _MeasureInfoInited = true; - App::GetApplication().signalDeleteDocument.connect(boost::bind(slotDeleteDocument, bp::_1)); + App::GetApplication().signalDeleteDocument.connect(std::bind(slotDeleteDocument, sp::_1)); } } }; diff --git a/src/Mod/Part/Gui/TaskFaceColors.cpp b/src/Mod/Part/Gui/TaskFaceColors.cpp index dd191f7e8c..24d9f67a69 100644 --- a/src/Mod/Part/Gui/TaskFaceColors.cpp +++ b/src/Mod/Part/Gui/TaskFaceColors.cpp @@ -61,7 +61,7 @@ using namespace PartGui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; namespace PartGui { class FaceSelection : public Gui::SelectionFilterGate @@ -251,12 +251,12 @@ FaceColors::FaceColors(ViewProviderPartExt* vp, QWidget* parent) FaceSelection* gate = new FaceSelection(d->vp->getObject()); Gui::Selection().addSelectionGate(gate); - d->connectDelDoc = Gui::Application::Instance->signalDeleteDocument.connect(boost::bind - (&FaceColors::slotDeleteDocument, this, bp::_1)); - d->connectDelObj = Gui::Application::Instance->signalDeletedObject.connect(boost::bind - (&FaceColors::slotDeleteObject, this, bp::_1)); - d->connectUndoDoc = d->doc->signalUndoDocument.connect(boost::bind - (&FaceColors::slotUndoDocument, this, bp::_1)); + d->connectDelDoc = Gui::Application::Instance->signalDeleteDocument.connect(std::bind + (&FaceColors::slotDeleteDocument, this, sp::_1)); + d->connectDelObj = Gui::Application::Instance->signalDeletedObject.connect(std::bind + (&FaceColors::slotDeleteObject, this, sp::_1)); + d->connectUndoDoc = d->doc->signalUndoDocument.connect(std::bind + (&FaceColors::slotUndoDocument, this, sp::_1)); } FaceColors::~FaceColors() diff --git a/src/Mod/PartDesign/App/ShapeBinder.cpp b/src/Mod/PartDesign/App/ShapeBinder.cpp index 209b84f7cf..5129465c42 100644 --- a/src/Mod/PartDesign/App/ShapeBinder.cpp +++ b/src/Mod/PartDesign/App/ShapeBinder.cpp @@ -51,7 +51,7 @@ FC_LOG_LEVEL_INIT("PartDesign",true,true) #endif using namespace PartDesign; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; // ============================================================================ @@ -257,8 +257,8 @@ void ShapeBinder::onSettingDocument() { App::Document* document = getDocument(); if (document) { - this->connectDocumentChangedObject = document->signalChangedObject.connect(boost::bind - (&ShapeBinder::slotChangedObject, this, bp::_1, bp::_2)); + this->connectDocumentChangedObject = document->signalChangedObject.connect(std::bind + (&ShapeBinder::slotChangedObject, this, sp::_1, sp::_2)); } } @@ -835,7 +835,7 @@ void SubShapeBinder::onChanged(const App::Property* prop) { { contextDoc = Context.getValue()->getDocument(); connRecomputedObj = contextDoc->signalRecomputedObject.connect( - boost::bind(&SubShapeBinder::slotRecomputedObject, this, bp::_1)); + std::bind(&SubShapeBinder::slotRecomputedObject, this, sp::_1)); } } else if (!isRestoring()) { diff --git a/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp b/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp index c9d4fa60f2..d32093a208 100644 --- a/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp @@ -37,7 +37,7 @@ using namespace PartDesignGui; using namespace Gui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; /* TRANSLATOR PartDesignGui::TaskHoleParameters */ @@ -251,7 +251,7 @@ TaskHoleParameters::TaskHoleParameters(ViewProviderHole* HoleView, QWidget* pare ui->CustomThreadClearance->bind(pcHole->CustomThreadClearance); connectPropChanged = App::GetApplication().signalChangePropertyEditor.connect( - boost::bind(&TaskHoleParameters::changedObject, this, bp::_1, bp::_2)); + std::bind(&TaskHoleParameters::changedObject, this, sp::_1, sp::_2)); this->groupLayout()->addWidget(proxy); } diff --git a/src/Mod/PartDesign/Gui/TaskTransformedMessages.cpp b/src/Mod/PartDesign/Gui/TaskTransformedMessages.cpp index db5b6ebbe7..53ccd893ce 100644 --- a/src/Mod/PartDesign/Gui/TaskTransformedMessages.cpp +++ b/src/Mod/PartDesign/Gui/TaskTransformedMessages.cpp @@ -31,7 +31,7 @@ using namespace PartDesignGui; using namespace Gui::TaskView; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; TaskTransformedMessages::TaskTransformedMessages(ViewProviderTransformed *transformedView_) : TaskBox(Gui::BitmapFactory().pixmap("document-new"), tr("Transformed feature messages"), true, nullptr) @@ -49,7 +49,7 @@ TaskTransformedMessages::TaskTransformedMessages(ViewProviderTransformed *transf this->groupLayout()->addWidget(proxy); ui->labelTransformationStatus->setText(transformedView->getMessage()); - connectionDiagnosis = transformedView->signalDiagnosis.connect(boost::bind(&PartDesignGui::TaskTransformedMessages::slotDiagnosis, this, bp::_1)); + connectionDiagnosis = transformedView->signalDiagnosis.connect(std::bind(&PartDesignGui::TaskTransformedMessages::slotDiagnosis, this, sp::_1)); } TaskTransformedMessages::~TaskTransformedMessages() diff --git a/src/Mod/PartDesign/Gui/ViewProviderBody.cpp b/src/Mod/PartDesign/Gui/ViewProviderBody.cpp index 28171545a0..60a5d69b2c 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderBody.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderBody.cpp @@ -55,7 +55,7 @@ using namespace PartDesignGui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; const char* PartDesignGui::ViewProviderBody::BodyModeEnum[] = {"Through","Tip",nullptr}; @@ -92,10 +92,10 @@ void ViewProviderBody::attach(App::DocumentObject *pcFeat) assert ( gdoc ); connectChangedObjectApp = adoc->signalChangedObject.connect ( - boost::bind ( &ViewProviderBody::slotChangedObjectApp, this, bp::_1, bp::_2) ); + std::bind ( &ViewProviderBody::slotChangedObjectApp, this, sp::_1, sp::_2) ); connectChangedObjectGui = gdoc->signalChangedObject.connect ( - boost::bind ( &ViewProviderBody::slotChangedObjectGui, this, bp::_1, bp::_2) ); + std::bind ( &ViewProviderBody::slotChangedObjectGui, this, sp::_1, sp::_2) ); } // TODO on activating the body switch to the "Through" mode (2015-09-05, Fat-Zer) diff --git a/src/Mod/PartDesign/Gui/Workbench.cpp b/src/Mod/PartDesign/Gui/Workbench.cpp index 46f13bd72c..0782db76cf 100644 --- a/src/Mod/PartDesign/Gui/Workbench.cpp +++ b/src/Mod/PartDesign/Gui/Workbench.cpp @@ -37,7 +37,7 @@ #include "WorkflowManager.h" using namespace PartDesignGui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; #if 0 // needed for Qt's lupdate utility qApp->translate("Workbench", "&Sketch"); @@ -443,10 +443,10 @@ void Workbench::activated() Gui::Control().showTaskView(); // Let us be notified when a document is activated, so that we can update the ActivePartObject - activeDoc = Gui::Application::Instance->signalActiveDocument.connect(boost::bind(&Workbench::slotActiveDocument, this, bp::_1)); - createDoc = App::GetApplication().signalNewDocument.connect(boost::bind(&Workbench::slotNewDocument, this, bp::_1)); - finishDoc = App::GetApplication().signalFinishRestoreDocument.connect(boost::bind(&Workbench::slotFinishRestoreDocument, this, bp::_1)); - deleteDoc = App::GetApplication().signalDeleteDocument.connect(boost::bind(&Workbench::slotDeleteDocument, this, bp::_1)); + activeDoc = Gui::Application::Instance->signalActiveDocument.connect(std::bind(&Workbench::slotActiveDocument, this, sp::_1)); + createDoc = App::GetApplication().signalNewDocument.connect(std::bind(&Workbench::slotNewDocument, this, sp::_1)); + finishDoc = App::GetApplication().signalFinishRestoreDocument.connect(std::bind(&Workbench::slotFinishRestoreDocument, this, sp::_1)); + deleteDoc = App::GetApplication().signalDeleteDocument.connect(std::bind(&Workbench::slotDeleteDocument, this, sp::_1)); } void Workbench::deactivated() diff --git a/src/Mod/PartDesign/Gui/WorkflowManager.cpp b/src/Mod/PartDesign/Gui/WorkflowManager.cpp index 6277f5c8fa..e84032465e 100644 --- a/src/Mod/PartDesign/Gui/WorkflowManager.cpp +++ b/src/Mod/PartDesign/Gui/WorkflowManager.cpp @@ -38,7 +38,7 @@ using namespace PartDesignGui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; WorkflowManager * WorkflowManager::_instance = nullptr; @@ -49,11 +49,11 @@ WorkflowManager::WorkflowManager() { } connectNewDocument = App::GetApplication().signalNewDocument.connect( - boost::bind( &WorkflowManager::slotNewDocument, this, bp::_1 ) ); + std::bind( &WorkflowManager::slotNewDocument, this, sp::_1 ) ); connectFinishRestoreDocument = App::GetApplication().signalFinishRestoreDocument.connect( - boost::bind( &WorkflowManager::slotFinishRestoreDocument, this, bp::_1 ) ); + std::bind( &WorkflowManager::slotFinishRestoreDocument, this, sp::_1 ) ); connectDeleteDocument = App::GetApplication().signalDeleteDocument.connect( - boost::bind( &WorkflowManager::slotDeleteDocument, this, bp::_1 ) ); + std::bind( &WorkflowManager::slotDeleteDocument, this, sp::_1 ) ); } WorkflowManager::~WorkflowManager() { diff --git a/src/Mod/ReverseEngineering/App/ApproxSurface.cpp b/src/Mod/ReverseEngineering/App/ApproxSurface.cpp index 5e3188d97f..3f80b745ec 100644 --- a/src/Mod/ReverseEngineering/App/ApproxSurface.cpp +++ b/src/Mod/ReverseEngineering/App/ApproxSurface.cpp @@ -40,7 +40,7 @@ using namespace Reen; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; // SplineBasisfunction @@ -1092,7 +1092,7 @@ bool BSplineParameterCorrection::SolveWithSmoothing(double fWeight) std::generate(columns.begin(), columns.end(), Base::iotaGen(0)); ScalarProduct scalar(M); QFuture< std::vector > future = QtConcurrent::mapped - (columns, boost::bind(&ScalarProduct::multiply, &scalar, bp::_1)); + (columns, std::bind(&ScalarProduct::multiply, &scalar, sp::_1)); QFutureWatcher< std::vector > watcher; watcher.setFuture(future); watcher.waitForFinished(); diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 5fc7bdcbf4..ef44a1d3f2 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -89,9 +89,10 @@ #undef DEBUG // #define DEBUG +// clang-format off using namespace Sketcher; using namespace Base; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; FC_LOG_LEVEL_INIT("Sketch", true, true) @@ -152,12 +153,12 @@ SketchObject::SketchObject() noRecomputes = false; ExpressionEngine.setValidator( - boost::bind(&Sketcher::SketchObject::validateExpression, this, bp::_1, bp::_2)); + std::bind(&Sketcher::SketchObject::validateExpression, this, sp::_1, sp::_2)); constraintsRemovedConn = Constraints.signalConstraintsRemoved.connect( - boost::bind(&Sketcher::SketchObject::constraintsRemoved, this, bp::_1)); + std::bind(&Sketcher::SketchObject::constraintsRemoved, this, sp::_1)); constraintsRenamedConn = Constraints.signalConstraintsRenamed.connect( - boost::bind(&Sketcher::SketchObject::constraintsRenamed, this, bp::_1)); + std::bind(&Sketcher::SketchObject::constraintsRenamed, this, sp::_1)); analyser = new SketchAnalysis(this); @@ -9648,3 +9649,4 @@ PyObject* Sketcher::SketchObjectPython::getPyObject() // explicit template instantiation template class SketcherExport FeaturePythonT; }// namespace App +// clang-format on diff --git a/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp b/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp index cb5e1e31a7..c13a3705a7 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherConstraints.cpp @@ -56,9 +56,10 @@ #include "ui_TaskSketcherConstraints.h" +// clang-format off using namespace SketcherGui; using namespace Gui::TaskView; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; // Translation block for context menu: do not remove #if 0 @@ -944,7 +945,7 @@ TaskSketcherConstraints::TaskSketcherConstraints(ViewProviderSketch* sketchView) &TaskSketcherConstraints::onFilterListItemChanged); connectionConstraintsChanged = sketchView->signalConstraintsChanged.connect( - boost::bind(&SketcherGui::TaskSketcherConstraints::slotConstraintsChanged, this)); + std::bind(&SketcherGui::TaskSketcherConstraints::slotConstraintsChanged, this)); this->groupLayout()->addWidget(proxy); @@ -954,7 +955,7 @@ TaskSketcherConstraints::TaskSketcherConstraints(ViewProviderSketch* sketchView) Gui::Application* app = Gui::Application::Instance; changedSketchView = app->signalChangedObject.connect( - boost::bind(&TaskSketcherConstraints::onChangedSketchView, this, bp::_1, bp::_2)); + std::bind(&TaskSketcherConstraints::onChangedSketchView, this, sp::_1, sp::_2)); slotConstraintsChanged();// Populate constraints list // Initialize special filters @@ -1781,3 +1782,4 @@ void TaskSketcherConstraints::onFilterListItemChanged(QListWidgetItem* item) #include "moc_TaskSketcherConstraints.cpp" +// clang-format on diff --git a/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp b/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp index 3ce3667bd1..4f8c0fdf0b 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp @@ -53,6 +53,7 @@ #include "ViewProviderSketch.h" #include "ui_TaskSketcherElements.h" +// clang-format off using namespace SketcherGui; using namespace Gui::TaskView; @@ -1070,7 +1071,7 @@ void TaskSketcherElements::connectSignals() ui->filterButton, &QToolButton::clicked, ui->filterButton, &QToolButton::showMenu); connectionElementsChanged = sketchView->signalElementsChanged.connect( - boost::bind(&SketcherGui::TaskSketcherElements::slotElementsChanged, this)); + std::bind(&SketcherGui::TaskSketcherElements::slotElementsChanged, this)); } /* filter functions --------------------------------------------------- */ @@ -1823,3 +1824,4 @@ void TaskSketcherElements::onSettingsExtendedInformationChanged() #include "TaskSketcherElements.moc"// For Delegate as it is QOBJECT #include "moc_TaskSketcherElements.cpp" +// clang-format on diff --git a/src/Mod/Sketcher/Gui/TaskSketcherMessages.cpp b/src/Mod/Sketcher/Gui/TaskSketcherMessages.cpp index de341e89b3..e24a70afc1 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherMessages.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherMessages.cpp @@ -35,9 +35,10 @@ #include "ui_TaskSketcherMessages.h" +// clang-format off using namespace SketcherGui; using namespace Gui::TaskView; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; TaskSketcherMessages::TaskSketcherMessages(ViewProviderSketch* sketchView) : TaskBox(Gui::BitmapFactory().pixmap("document-new"), tr("Solver messages"), true, nullptr) @@ -51,8 +52,8 @@ TaskSketcherMessages::TaskSketcherMessages(ViewProviderSketch* sketchView) this->groupLayout()->addWidget(proxy); - connectionSetUp = sketchView->signalSetUp.connect(boost::bind( - &SketcherGui::TaskSketcherMessages::slotSetUp, this, bp::_1, bp::_2, bp::_3, bp::_4)); + connectionSetUp = sketchView->signalSetUp.connect(std::bind( + &SketcherGui::TaskSketcherMessages::slotSetUp, this, sp::_1, sp::_2, sp::_3, sp::_4)); ui->labelConstrainStatus->setOpenExternalLinks(false); @@ -187,3 +188,4 @@ void TaskSketcherMessages::onManualUpdateClicked(bool checked) } #include "moc_TaskSketcherMessages.cpp" +// clang-format on diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index d224179aa4..713a4a8bed 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -72,11 +72,12 @@ #include "Workbench.h" +// clang-format off FC_LOG_LEVEL_INIT("Sketch", true, true) using namespace SketcherGui; using namespace Sketcher; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; /************** ViewProviderSketch::ParameterObserver *********************/ @@ -3232,9 +3233,9 @@ bool ViewProviderSketch::setEdit(int ModNum) getSketchObject()->solve(true); connectUndoDocument = getDocument()->signalUndoDocument.connect( - boost::bind(&ViewProviderSketch::slotUndoDocument, this, bp::_1)); + std::bind(&ViewProviderSketch::slotUndoDocument, this, sp::_1)); connectRedoDocument = getDocument()->signalRedoDocument.connect( - boost::bind(&ViewProviderSketch::slotRedoDocument, this, bp::_1)); + std::bind(&ViewProviderSketch::slotRedoDocument, this, sp::_1)); // Enable solver initial solution update while dragging. getSketchObject()->setRecalculateInitialSolutionWhileMovingPoint( @@ -4137,3 +4138,4 @@ bool ViewProviderSketch::isInEditMode() const { return editCoinManager != nullptr; } +// clang-format on diff --git a/src/Mod/Spreadsheet/App/PropertySheet.cpp b/src/Mod/Spreadsheet/App/PropertySheet.cpp index 0bdb77ce99..0f25ab89ba 100644 --- a/src/Mod/Spreadsheet/App/PropertySheet.cpp +++ b/src/Mod/Spreadsheet/App/PropertySheet.cpp @@ -51,7 +51,7 @@ FC_LOG_LEVEL_INIT("Spreadsheet", true, true) using namespace App; using namespace Base; using namespace Spreadsheet; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; TYPESYSTEM_SOURCE(Spreadsheet::PropertySheet , App::PropertyExpressionContainer) @@ -849,7 +849,7 @@ void PropertySheet::insertRows(int row, int count) boost::copy( data | boost::adaptors::map_keys, std::back_inserter(keys)); /* Sort them */ - std::sort(keys.begin(), keys.end(), boost::bind(&PropertySheet::rowSortFunc, this, bp::_1, bp::_2)); + std::sort(keys.begin(), keys.end(), std::bind(&PropertySheet::rowSortFunc, this, sp::_1, sp::_2)); MoveCellsExpressionVisitor visitor(*this, CellAddress(row, CellAddress::MAX_COLUMNS), count, 0); @@ -919,7 +919,7 @@ void PropertySheet::removeRows(int row, int count) boost::copy(data | boost::adaptors::map_keys, std::back_inserter(keys)); /* Sort them */ - std::sort(keys.begin(), keys.end(), boost::bind(&PropertySheet::rowSortFunc, this, bp::_1, bp::_2)); + std::sort(keys.begin(), keys.end(), std::bind(&PropertySheet::rowSortFunc, this, sp::_1, sp::_2)); MoveCellsExpressionVisitor visitor(*this, CellAddress(row + count - 1, CellAddress::MAX_COLUMNS), -count, 0); @@ -1047,7 +1047,7 @@ void PropertySheet::removeColumns(int col, int count) boost::copy(data | boost::adaptors::map_keys, std::back_inserter(keys)); /* Sort them */ - std::sort(keys.begin(), keys.end(), boost::bind(&PropertySheet::colSortFunc, this, bp::_1, bp::_2)); + std::sort(keys.begin(), keys.end(), std::bind(&PropertySheet::colSortFunc, this, sp::_1, sp::_2)); MoveCellsExpressionVisitor visitor(*this, CellAddress(CellAddress::MAX_ROWS, col + count - 1), 0, -count); @@ -1414,8 +1414,8 @@ void PropertySheet::slotChangedObject(const App::DocumentObject &obj, const App: } void PropertySheet::onAddDep(App::DocumentObject *obj) { - depConnections[obj] = obj->signalChanged.connect(boost::bind( - &PropertySheet::slotChangedObject, this, bp::_1, bp::_2)); + depConnections[obj] = obj->signalChanged.connect(std::bind( + &PropertySheet::slotChangedObject, this, sp::_1, sp::_2)); } void PropertySheet::onRemoveDep(App::DocumentObject *obj) { diff --git a/src/Mod/Spreadsheet/Gui/SheetModel.cpp b/src/Mod/Spreadsheet/Gui/SheetModel.cpp index 86c18726c2..b791a18ca3 100644 --- a/src/Mod/Spreadsheet/Gui/SheetModel.cpp +++ b/src/Mod/Spreadsheet/Gui/SheetModel.cpp @@ -41,14 +41,14 @@ using namespace SpreadsheetGui; using namespace Spreadsheet; using namespace App; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; SheetModel::SheetModel(Sheet* _sheet, QObject* parent) : QAbstractTableModel(parent), sheet(_sheet) { cellUpdatedConnection = - sheet->cellUpdated.connect(bind(&SheetModel::cellUpdated, this, bp::_1)); + sheet->cellUpdated.connect(bind(&SheetModel::cellUpdated, this, sp::_1)); rangeUpdatedConnection = - sheet->rangeUpdated.connect(bind(&SheetModel::rangeUpdated, this, bp::_1)); + sheet->rangeUpdated.connect(bind(&SheetModel::rangeUpdated, this, sp::_1)); ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( "User parameter:BaseApp/Preferences/Mod/Spreadsheet"); diff --git a/src/Mod/Spreadsheet/Gui/SheetTableView.cpp b/src/Mod/Spreadsheet/Gui/SheetTableView.cpp index e7f588c898..e7583f68c9 100644 --- a/src/Mod/Spreadsheet/Gui/SheetTableView.cpp +++ b/src/Mod/Spreadsheet/Gui/SheetTableView.cpp @@ -55,7 +55,7 @@ using namespace SpreadsheetGui; using namespace Spreadsheet; using namespace App; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; void SheetViewHeader::mouseReleaseEvent(QMouseEvent *event) { diff --git a/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp b/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp index e84c46a4f2..875aa8c363 100644 --- a/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp +++ b/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp @@ -55,7 +55,7 @@ using namespace SpreadsheetGui; using namespace Spreadsheet; using namespace Gui; using namespace App; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; /* TRANSLATOR SpreadsheetGui::SheetView */ @@ -98,8 +98,8 @@ SheetView::SheetView(Gui::Document *pcDocument, App::DocumentObject *docObj, QWi connect(ui->cellAlias, &ExpressionLineEdit::editingFinished, this, [this]() {confirmAliasChanged(ui->cellAlias->text()); }); connect(ui->cellAlias, &LineEdit::textEdited, this, &SheetView::aliasChanged); - columnWidthChangedConnection = sheet->columnWidthChanged.connect(bind(&SheetView::resizeColumn, this, bp::_1, bp::_2)); - rowHeightChangedConnection = sheet->rowHeightChanged.connect(bind(&SheetView::resizeRow, this, bp::_1, bp::_2)); + columnWidthChangedConnection = sheet->columnWidthChanged.connect(bind(&SheetView::resizeColumn, this, sp::_1, sp::_2)); + rowHeightChangedConnection = sheet->rowHeightChanged.connect(bind(&SheetView::resizeRow, this, sp::_1, sp::_2)); connect( model, &QAbstractItemModel::dataChanged, this, &SheetView::modelUpdated); diff --git a/src/Mod/TechDraw/Gui/MDIViewPage.cpp b/src/Mod/TechDraw/Gui/MDIViewPage.cpp index 204fc3ac09..2ebd02b269 100644 --- a/src/Mod/TechDraw/Gui/MDIViewPage.cpp +++ b/src/Mod/TechDraw/Gui/MDIViewPage.cpp @@ -78,7 +78,7 @@ using namespace TechDrawGui; using namespace TechDraw; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; /* TRANSLATOR TechDrawGui::MDIViewPage */ @@ -116,7 +116,7 @@ MDIViewPage::MDIViewPage(ViewProviderPage* pageVp, Gui::Document* doc, QWidget* //get informed by App side about deleted DocumentObjects App::Document* appDoc = m_vpPage->getDocument()->getDocument(); - auto bnd = boost::bind(&MDIViewPage::onDeleteObject, this, bp::_1); + auto bnd = std::bind(&MDIViewPage::onDeleteObject, this, sp::_1); connectDeletedObject = appDoc->signalDeletedObject.connect(bnd); } diff --git a/src/Mod/TechDraw/Gui/ViewProviderDrawingView.cpp b/src/Mod/TechDraw/Gui/ViewProviderDrawingView.cpp index db8868d347..957a1457b3 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderDrawingView.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderDrawingView.cpp @@ -49,7 +49,7 @@ #include "ViewProviderPage.h" using namespace TechDrawGui; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; PROPERTY_SOURCE(TechDrawGui::ViewProviderDrawingView, Gui::ViewProviderDocumentObject) @@ -79,8 +79,8 @@ void ViewProviderDrawingView::attach(App::DocumentObject *pcFeat) // Base::Console().Message("VPDV::attach(%s)\n", pcFeat->getNameInDocument()); ViewProviderDocumentObject::attach(pcFeat); - auto bnd = boost::bind(&ViewProviderDrawingView::onGuiRepaint, this, bp::_1); - auto bndProgressMessage = boost::bind(&ViewProviderDrawingView::onProgressMessage, this, bp::_1, bp::_2, bp::_3); + auto bnd = std::bind(&ViewProviderDrawingView::onGuiRepaint, this, sp::_1); + auto bndProgressMessage = std::bind(&ViewProviderDrawingView::onProgressMessage, this, sp::_1, sp::_2, sp::_3); auto feature = getViewObject(); if (feature) { const char* temp = feature->getNameInDocument(); diff --git a/src/Mod/TechDraw/Gui/ViewProviderPage.cpp b/src/Mod/TechDraw/Gui/ViewProviderPage.cpp index f2eb236e1c..c413038b5c 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderPage.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderPage.cpp @@ -65,7 +65,7 @@ using namespace TechDrawGui; using namespace TechDraw; -namespace bp = boost::placeholders; +namespace sp = std::placeholders; #define _SHOWDRAWING 10 #define _TOGGLEUPDATE 11 @@ -114,7 +114,7 @@ void ViewProviderPage::attach(App::DocumentObject* pcFeat) { ViewProviderDocumentObject::attach(pcFeat); - auto bnd = boost::bind(&ViewProviderPage::onGuiRepaint, this, bp::_1); + auto bnd = std::bind(&ViewProviderPage::onGuiRepaint, this, sp::_1); TechDraw::DrawPage* feature = dynamic_cast(pcFeat); if (feature) { connectGuiRepaint = feature->signalGuiPaint.connect(bnd);