diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp index bb278f8275..7ab201cef9 100644 --- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp +++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp @@ -76,10 +76,10 @@ #ifndef WIN32 #include -#include +#include #else #include -#include +#include //#include #endif diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 734894c1d5..b7f1072afb 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -122,7 +122,7 @@ #include #include -#include +#include #include #include #include @@ -131,6 +131,7 @@ using namespace App; using namespace std; using namespace boost; using namespace boost::program_options; +namespace bp = boost::placeholders; // scriptings (scripts are built-in but can be overridden by command line option) @@ -413,26 +414,26 @@ Document* Application::newDocument(const char * Name, const char * UserName, boo // connect the signals to the application for the new document - _pActiveDoc->signalBeforeChange.connect(boost::bind(&App::Application::slotBeforeChangeDocument, this, _1, _2)); - _pActiveDoc->signalChanged.connect(boost::bind(&App::Application::slotChangedDocument, this, _1, _2)); - _pActiveDoc->signalNewObject.connect(boost::bind(&App::Application::slotNewObject, this, _1)); - _pActiveDoc->signalDeletedObject.connect(boost::bind(&App::Application::slotDeletedObject, this, _1)); - _pActiveDoc->signalBeforeChangeObject.connect(boost::bind(&App::Application::slotBeforeChangeObject, this, _1, _2)); - _pActiveDoc->signalChangedObject.connect(boost::bind(&App::Application::slotChangedObject, this, _1, _2)); - _pActiveDoc->signalRelabelObject.connect(boost::bind(&App::Application::slotRelabelObject, this, _1)); - _pActiveDoc->signalActivatedObject.connect(boost::bind(&App::Application::slotActivatedObject, this, _1)); - _pActiveDoc->signalUndo.connect(boost::bind(&App::Application::slotUndoDocument, this, _1)); - _pActiveDoc->signalRedo.connect(boost::bind(&App::Application::slotRedoDocument, this, _1)); - _pActiveDoc->signalRecomputedObject.connect(boost::bind(&App::Application::slotRecomputedObject, this, _1)); - _pActiveDoc->signalRecomputed.connect(boost::bind(&App::Application::slotRecomputed, this, _1)); - _pActiveDoc->signalBeforeRecompute.connect(boost::bind(&App::Application::slotBeforeRecompute, this, _1)); - _pActiveDoc->signalOpenTransaction.connect(boost::bind(&App::Application::slotOpenTransaction, this, _1, _2)); - _pActiveDoc->signalCommitTransaction.connect(boost::bind(&App::Application::slotCommitTransaction, this, _1)); - _pActiveDoc->signalAbortTransaction.connect(boost::bind(&App::Application::slotAbortTransaction, this, _1)); - _pActiveDoc->signalStartSave.connect(boost::bind(&App::Application::slotStartSaveDocument, this, _1, _2)); - _pActiveDoc->signalFinishSave.connect(boost::bind(&App::Application::slotFinishSaveDocument, this, _1, _2)); + _pActiveDoc->signalBeforeChange.connect(boost::bind(&App::Application::slotBeforeChangeDocument, this, bp::_1, bp::_2)); + _pActiveDoc->signalChanged.connect(boost::bind(&App::Application::slotChangedDocument, this, bp::_1, bp::_2)); + _pActiveDoc->signalNewObject.connect(boost::bind(&App::Application::slotNewObject, this, bp::_1)); + _pActiveDoc->signalDeletedObject.connect(boost::bind(&App::Application::slotDeletedObject, this, bp::_1)); + _pActiveDoc->signalBeforeChangeObject.connect(boost::bind(&App::Application::slotBeforeChangeObject, this, bp::_1, bp::_2)); + _pActiveDoc->signalChangedObject.connect(boost::bind(&App::Application::slotChangedObject, this, bp::_1, bp::_2)); + _pActiveDoc->signalRelabelObject.connect(boost::bind(&App::Application::slotRelabelObject, this, bp::_1)); + _pActiveDoc->signalActivatedObject.connect(boost::bind(&App::Application::slotActivatedObject, this, bp::_1)); + _pActiveDoc->signalUndo.connect(boost::bind(&App::Application::slotUndoDocument, this, bp::_1)); + _pActiveDoc->signalRedo.connect(boost::bind(&App::Application::slotRedoDocument, this, bp::_1)); + _pActiveDoc->signalRecomputedObject.connect(boost::bind(&App::Application::slotRecomputedObject, this, bp::_1)); + _pActiveDoc->signalRecomputed.connect(boost::bind(&App::Application::slotRecomputed, this, bp::_1)); + _pActiveDoc->signalBeforeRecompute.connect(boost::bind(&App::Application::slotBeforeRecompute, this, bp::_1)); + _pActiveDoc->signalOpenTransaction.connect(boost::bind(&App::Application::slotOpenTransaction, this, bp::_1, bp::_2)); + _pActiveDoc->signalCommitTransaction.connect(boost::bind(&App::Application::slotCommitTransaction, this, bp::_1)); + _pActiveDoc->signalAbortTransaction.connect(boost::bind(&App::Application::slotAbortTransaction, this, bp::_1)); + _pActiveDoc->signalStartSave.connect(boost::bind(&App::Application::slotStartSaveDocument, this, bp::_1, bp::_2)); + _pActiveDoc->signalFinishSave.connect(boost::bind(&App::Application::slotFinishSaveDocument, this, bp::_1, bp::_2)); _pActiveDoc->signalChangePropertyEditor.connect( - boost::bind(&App::Application::slotChangePropertyEditor, this, _1, _2)); + boost::bind(&App::Application::slotChangePropertyEditor, this, bp::_1, bp::_2)); // make sure that the active document is set in case no GUI is up { diff --git a/src/App/Document.cpp b/src/App/Document.cpp index 7245308c08..e3a6ae1eee 100644 --- a/src/App/Document.cpp +++ b/src/App/Document.cpp @@ -82,7 +82,7 @@ recompute path. Also, it enables more complicated dependencies beyond trees. #include #endif //USE_OLD_DAG -#include +#include #include #include #include diff --git a/src/App/DocumentObject.cpp b/src/App/DocumentObject.cpp index a3e88e9f35..ed51e299c2 100644 --- a/src/App/DocumentObject.cpp +++ b/src/App/DocumentObject.cpp @@ -42,7 +42,7 @@ #include "DocumentObjectExtension.h" #include "GeoFeatureGroupExtension.h" #include -#include +#include FC_LOG_LEVEL_INIT("App",true,true) diff --git a/src/App/DocumentObserver.cpp b/src/App/DocumentObserver.cpp index 299527d838..02769abcb3 100644 --- a/src/App/DocumentObserver.cpp +++ b/src/App/DocumentObserver.cpp @@ -27,7 +27,7 @@ # include #endif -#include +#include #include #include "Application.h" @@ -38,6 +38,7 @@ #include "GeoFeature.h" using namespace App; +namespace bp = boost::placeholders; DocumentT::DocumentT() @@ -400,7 +401,7 @@ public: Private(App::Document* doc) : _document(doc) { if (doc) { connectApplicationDeletedDocument = App::GetApplication().signalDeleteDocument.connect(boost::bind - (&Private::deletedDocument, this, _1)); + (&Private::deletedDocument, this, bp::_1)); } } @@ -478,12 +479,12 @@ public: if (obj) { indocument = true; connectApplicationDeletedDocument = App::GetApplication().signalDeleteDocument.connect(boost::bind - (&Private::deletedDocument, this, _1)); + (&Private::deletedDocument, this, bp::_1)); App::Document* doc = obj->getDocument(); connectDocumentCreatedObject = doc->signalNewObject.connect(boost::bind - (&Private::createdObject, this, _1)); + (&Private::createdObject, this, bp::_1)); connectDocumentDeletedObject = doc->signalDeletedObject.connect(boost::bind - (&Private::deletedObject, this, _1)); + (&Private::deletedObject, this, bp::_1)); } } App::DocumentObject* get() const noexcept { @@ -550,18 +551,18 @@ bool DocumentObjectWeakPtrT::operator!= (const DocumentObjectWeakPtrT& p) const DocumentObserver::DocumentObserver() : _document(nullptr) { this->connectApplicationCreatedDocument = App::GetApplication().signalNewDocument.connect(boost::bind - (&DocumentObserver::slotCreatedDocument, this, _1)); + (&DocumentObserver::slotCreatedDocument, this, bp::_1)); this->connectApplicationDeletedDocument = App::GetApplication().signalDeleteDocument.connect(boost::bind - (&DocumentObserver::slotDeletedDocument, this, _1)); + (&DocumentObserver::slotDeletedDocument, this, bp::_1)); } DocumentObserver::DocumentObserver(Document* doc) : _document(nullptr) { // Connect to application and given document this->connectApplicationCreatedDocument = App::GetApplication().signalNewDocument.connect(boost::bind - (&DocumentObserver::slotCreatedDocument, this, _1)); + (&DocumentObserver::slotCreatedDocument, this, bp::_1)); this->connectApplicationDeletedDocument = App::GetApplication().signalDeleteDocument.connect(boost::bind - (&DocumentObserver::slotDeletedDocument, this, _1)); + (&DocumentObserver::slotDeletedDocument, this, bp::_1)); attachDocument(doc); } @@ -585,15 +586,15 @@ void DocumentObserver::attachDocument(Document* doc) _document = doc; this->connectDocumentCreatedObject = _document->signalNewObject.connect(boost::bind - (&DocumentObserver::slotCreatedObject, this, _1)); + (&DocumentObserver::slotCreatedObject, this, bp::_1)); this->connectDocumentDeletedObject = _document->signalDeletedObject.connect(boost::bind - (&DocumentObserver::slotDeletedObject, this, _1)); + (&DocumentObserver::slotDeletedObject, this, bp::_1)); this->connectDocumentChangedObject = _document->signalChangedObject.connect(boost::bind - (&DocumentObserver::slotChangedObject, this, _1, _2)); + (&DocumentObserver::slotChangedObject, this, bp::_1, bp::_2)); this->connectDocumentRecomputedObject = _document->signalRecomputedObject.connect(boost::bind - (&DocumentObserver::slotRecomputedObject, this, _1)); + (&DocumentObserver::slotRecomputedObject, this, bp::_1)); this->connectDocumentRecomputed = _document->signalRecomputed.connect(boost::bind - (&DocumentObserver::slotRecomputedDocument, this, _1)); + (&DocumentObserver::slotRecomputedDocument, this, bp::_1)); } } diff --git a/src/App/DocumentObserverPython.cpp b/src/App/DocumentObserverPython.cpp index 40b74d447f..a4baa273e2 100644 --- a/src/App/DocumentObserverPython.cpp +++ b/src/App/DocumentObserverPython.cpp @@ -34,6 +34,7 @@ #include using namespace App; +namespace bp = boost::placeholders; std::vector DocumentObserverPython::_instances; @@ -72,7 +73,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, _1));\ + boost::bind(&DocumentObserverPython::slot##_name1, this, bp::_1));\ }\ while(0); @@ -80,7 +81,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, _1, _2));\ + boost::bind(&DocumentObserverPython::slot##_name1, this, bp::_1, bp::_2));\ }\ while(0); diff --git a/src/App/DocumentObserverPython.h b/src/App/DocumentObserverPython.h index b6e36b92cb..9b94bb5b82 100644 --- a/src/App/DocumentObserverPython.h +++ b/src/App/DocumentObserverPython.h @@ -27,7 +27,7 @@ #include #include -#include +#include #include diff --git a/src/App/GroupExtension.cpp b/src/App/GroupExtension.cpp index b83dc5aaf5..8c88060924 100644 --- a/src/App/GroupExtension.cpp +++ b/src/App/GroupExtension.cpp @@ -24,7 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +# include #endif #include "DocumentObjectGroup.h" @@ -37,6 +37,7 @@ #include using namespace App; +namespace bp = boost::placeholders; EXTENSION_PROPERTY_SOURCE(App::GroupExtension, App::DocumentObjectExtension) @@ -362,7 +363,7 @@ void GroupExtension::extensionOnChanged(const Property* p) { for(auto obj : Group.getValue()) { if(obj && obj->getNameInDocument()) { _Conns[obj] = obj->signalChanged.connect(boost::bind( - &GroupExtension::slotChildChanged,this,_1,_2)); + &GroupExtension::slotChildChanged,this,bp::_1, bp::_2)); } } } diff --git a/src/App/Link.cpp b/src/App/Link.cpp index 41f519dab1..03514c6516 100644 --- a/src/App/Link.cpp +++ b/src/App/Link.cpp @@ -23,7 +23,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +# include #endif #include @@ -47,6 +47,7 @@ FC_LOG_LEVEL_INIT("App::Link", true,true) using namespace App; using namespace Base; +namespace bp = boost::placeholders; EXTENSION_PROPERTY_SOURCE(App::LinkBaseExtension, App::DocumentObjectExtension) @@ -820,7 +821,7 @@ void LinkBaseExtension::updateGroup() { FC_LOG("new group connection " << getExtendedObject()->getFullName() << " -> " << group->getFullName()); conn = group->signalChanged.connect( - boost::bind(&LinkBaseExtension::slotChangedPlainGroup,this,_1,_2)); + boost::bind(&LinkBaseExtension::slotChangedPlainGroup,this,bp::_1,bp::_2)); } std::size_t count = children.size(); ext->getAllChildren(children,childSet); @@ -834,7 +835,7 @@ void LinkBaseExtension::updateGroup() { FC_LOG("new group connection " << getExtendedObject()->getFullName() << " -> " << child->getFullName()); conn = child->signalChanged.connect( - boost::bind(&LinkBaseExtension::slotChangedPlainGroup,this,_1,_2)); + boost::bind(&LinkBaseExtension::slotChangedPlainGroup,this,bp::_1,bp::_2)); } } } diff --git a/src/App/MergeDocuments.cpp b/src/App/MergeDocuments.cpp index 101c46d2b2..1893383e8e 100644 --- a/src/App/MergeDocuments.cpp +++ b/src/App/MergeDocuments.cpp @@ -23,7 +23,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ # include -# include +# include #endif #include @@ -36,6 +36,7 @@ #include using namespace App; +namespace bp = boost::placeholders; namespace App { @@ -127,9 +128,9 @@ private: MergeDocuments::MergeDocuments(App::Document* doc) : guiup(false), verbose(true), stream(0), appdoc(doc) { connectExport = doc->signalExportObjects.connect - (boost::bind(&MergeDocuments::exportObject, this, _1, _2)); + (boost::bind(&MergeDocuments::exportObject, this, bp::_1, bp::_2)); connectImport = doc->signalImportObjects.connect - (boost::bind(&MergeDocuments::importObject, this, _1, _2)); + (boost::bind(&MergeDocuments::importObject, this, bp::_1, bp::_2)); QCoreApplication* app = QCoreApplication::instance(); if (app && app->inherits("QApplication")) { diff --git a/src/App/PreCompiled.h b/src/App/PreCompiled.h index f0df5df04b..4a2596c297 100644 --- a/src/App/PreCompiled.h +++ b/src/App/PreCompiled.h @@ -79,7 +79,7 @@ // Boost #include -#include +#include #include #include diff --git a/src/App/PropertyExpressionEngine.cpp b/src/App/PropertyExpressionEngine.cpp index caf11ebad8..b380624599 100644 --- a/src/App/PropertyExpressionEngine.cpp +++ b/src/App/PropertyExpressionEngine.cpp @@ -34,7 +34,7 @@ #include "PropertyStandard.h" #include "PropertyUnits.h" #include -#include +#include #include #include diff --git a/src/App/PropertyLinks.cpp b/src/App/PropertyLinks.cpp index 9bf02712b7..6cb8ae1371 100644 --- a/src/App/PropertyLinks.cpp +++ b/src/App/PropertyLinks.cpp @@ -33,7 +33,7 @@ #include #include -#include +#include /// Here the FreeCAD includes sorted by Base,App,Gui...... #include @@ -55,6 +55,7 @@ FC_LOG_LEVEL_INIT("PropertyLinks",true,true) using namespace App; using namespace Base; using namespace std; +namespace bp = boost::placeholders; //************************************************************************** //************************************************************************** @@ -2573,11 +2574,11 @@ public: myPath = myPos->first.toUtf8().constData(); App::Application &app = App::GetApplication(); connFinishRestoreDocument = app.signalFinishRestoreDocument.connect( - boost::bind(&DocInfo::slotFinishRestoreDocument,this,_1)); + boost::bind(&DocInfo::slotFinishRestoreDocument,this,bp::_1)); connDeleteDocument = app.signalDeleteDocument.connect( - boost::bind(&DocInfo::slotDeleteDocument,this,_1)); + boost::bind(&DocInfo::slotDeleteDocument,this,bp::_1)); connSaveDocument = app.signalSaveDocument.connect( - boost::bind(&DocInfo::slotSaveDocument,this,_1)); + boost::bind(&DocInfo::slotSaveDocument,this,bp::_1)); QString fullpath(getFullPath()); if(fullpath.isEmpty()) diff --git a/src/Gui/Action.cpp b/src/Gui/Action.cpp index 8ec6691451..a75bf5df68 100644 --- a/src/Gui/Action.cpp +++ b/src/Gui/Action.cpp @@ -25,7 +25,7 @@ #ifndef _PreComp_ # include -# include +# include # include # include # include @@ -55,6 +55,7 @@ using namespace Gui; using namespace Gui::Dialog; +namespace bp = boost::placeholders; /** * Constructs an action called \a name with parent \a parent. It also stores a pointer @@ -522,9 +523,9 @@ WorkbenchGroup::WorkbenchGroup ( Command* pcCmd, QObject * parent ) action->setData(QVariant(i)); // set the index } - Application::Instance->signalActivateWorkbench.connect(boost::bind(&WorkbenchGroup::slotActivateWorkbench, this, _1)); - Application::Instance->signalAddWorkbench.connect(boost::bind(&WorkbenchGroup::slotAddWorkbench, this, _1)); - Application::Instance->signalRemoveWorkbench.connect(boost::bind(&WorkbenchGroup::slotRemoveWorkbench, this, _1)); + Application::Instance->signalActivateWorkbench.connect(boost::bind(&WorkbenchGroup::slotActivateWorkbench, this, bp::_1)); + Application::Instance->signalAddWorkbench.connect(boost::bind(&WorkbenchGroup::slotAddWorkbench, this, bp::_1)); + Application::Instance->signalRemoveWorkbench.connect(boost::bind(&WorkbenchGroup::slotRemoveWorkbench, this, bp::_1)); } WorkbenchGroup::~WorkbenchGroup() diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index e98facc16a..121127d5ad 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -26,7 +26,7 @@ #ifndef _PreComp_ # include "InventorAll.h" # include -# include +# include # include # include # include @@ -137,6 +137,7 @@ using namespace Gui; using namespace Gui::DockWnd; using namespace std; +namespace bp = boost::placeholders; Application* Application::Instance = 0L; @@ -294,12 +295,12 @@ Application::Application(bool GUIenabled) { //App::GetApplication().Attach(this); if (GUIenabled) { - App::GetApplication().signalNewDocument.connect(boost::bind(&Gui::Application::slotNewDocument, this, _1, _2)); - App::GetApplication().signalDeleteDocument.connect(boost::bind(&Gui::Application::slotDeleteDocument, this, _1)); - App::GetApplication().signalRenameDocument.connect(boost::bind(&Gui::Application::slotRenameDocument, this, _1)); - App::GetApplication().signalActiveDocument.connect(boost::bind(&Gui::Application::slotActiveDocument, this, _1)); - App::GetApplication().signalRelabelDocument.connect(boost::bind(&Gui::Application::slotRelabelDocument, this, _1)); - App::GetApplication().signalShowHidden.connect(boost::bind(&Gui::Application::slotShowHidden, this, _1)); + App::GetApplication().signalNewDocument.connect(boost::bind(&Gui::Application::slotNewDocument, this, bp::_1, bp::_2)); + App::GetApplication().signalDeleteDocument.connect(boost::bind(&Gui::Application::slotDeleteDocument, this, bp::_1)); + App::GetApplication().signalRenameDocument.connect(boost::bind(&Gui::Application::slotRenameDocument, this, bp::_1)); + App::GetApplication().signalActiveDocument.connect(boost::bind(&Gui::Application::slotActiveDocument, this, bp::_1)); + App::GetApplication().signalRelabelDocument.connect(boost::bind(&Gui::Application::slotRelabelDocument, this, bp::_1)); + App::GetApplication().signalShowHidden.connect(boost::bind(&Gui::Application::slotShowHidden, this, bp::_1)); // install the last active language @@ -717,13 +718,13 @@ void Application::slotNewDocument(const App::Document& Doc, bool isMainDoc) d->documents[&Doc] = pDoc; // connect the signals to the application for the new document - pDoc->signalNewObject.connect(boost::bind(&Gui::Application::slotNewObject, this, _1)); - pDoc->signalDeletedObject.connect(boost::bind(&Gui::Application::slotDeletedObject, this, _1)); - pDoc->signalChangedObject.connect(boost::bind(&Gui::Application::slotChangedObject, this, _1, _2)); - pDoc->signalRelabelObject.connect(boost::bind(&Gui::Application::slotRelabelObject, this, _1)); - pDoc->signalActivatedObject.connect(boost::bind(&Gui::Application::slotActivatedObject, this, _1)); - pDoc->signalInEdit.connect(boost::bind(&Gui::Application::slotInEdit, this, _1)); - pDoc->signalResetEdit.connect(boost::bind(&Gui::Application::slotResetEdit, this, _1)); + pDoc->signalNewObject.connect(boost::bind(&Gui::Application::slotNewObject, this, bp::_1)); + pDoc->signalDeletedObject.connect(boost::bind(&Gui::Application::slotDeletedObject, this, bp::_1)); + pDoc->signalChangedObject.connect(boost::bind(&Gui::Application::slotChangedObject, this, bp::_1, bp::_2)); + pDoc->signalRelabelObject.connect(boost::bind(&Gui::Application::slotRelabelObject, this, bp::_1)); + pDoc->signalActivatedObject.connect(boost::bind(&Gui::Application::slotActivatedObject, this, bp::_1)); + pDoc->signalInEdit.connect(boost::bind(&Gui::Application::slotInEdit, this, bp::_1)); + pDoc->signalResetEdit.connect(boost::bind(&Gui::Application::slotResetEdit, this, bp::_1)); signalNewDocument(*pDoc, isMainDoc); if(isMainDoc) diff --git a/src/Gui/AutoSaver.cpp b/src/Gui/AutoSaver.cpp index 9343d9cd35..ac93acb54e 100644 --- a/src/Gui/AutoSaver.cpp +++ b/src/Gui/AutoSaver.cpp @@ -30,7 +30,7 @@ # include # include # include -# include +# include # include #endif @@ -53,14 +53,15 @@ FC_LOG_LEVEL_INIT("App",true,true) using namespace Gui; +namespace bp = boost::placeholders; AutoSaver* AutoSaver::self = 0; AutoSaver::AutoSaver(QObject* parent) : QObject(parent), timeout(900000), compressed(true) { - App::GetApplication().signalNewDocument.connect(boost::bind(&AutoSaver::slotCreateDocument, this, _1)); - App::GetApplication().signalDeleteDocument.connect(boost::bind(&AutoSaver::slotDeleteDocument, this, _1)); + App::GetApplication().signalNewDocument.connect(boost::bind(&AutoSaver::slotCreateDocument, this, bp::_1)); + App::GetApplication().signalDeleteDocument.connect(boost::bind(&AutoSaver::slotDeleteDocument, this, bp::_1)); } AutoSaver::~AutoSaver() @@ -242,9 +243,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, _1)); + (boost::bind(&AutoSaveProperty::slotNewObject, this, bp::_1)); documentMod = const_cast(doc)->signalChangedObject.connect - (boost::bind(&AutoSaveProperty::slotChangePropertyData, this, _2)); + (boost::bind(&AutoSaveProperty::slotChangePropertyData, this, bp::_2)); } AutoSaveProperty::~AutoSaveProperty() diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index 037299271a..b9327c41fb 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -39,7 +39,7 @@ # include # include # include -# include +# include #endif #include "Command.h" @@ -93,6 +93,7 @@ using namespace Gui; using Gui::Dialog::DlgSettingsImageImp; +namespace bp = boost::placeholders; //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -585,7 +586,7 @@ StdCmdDrawStyle::StdCmdDrawStyle() sPixmap = "DrawStyleAsIs"; eType = Alter3DView; - this->getGuiApplication()->signalActivateView.connect(boost::bind(&StdCmdDrawStyle::updateIcon, this, _1)); + this->getGuiApplication()->signalActivateView.connect(boost::bind(&StdCmdDrawStyle::updateIcon, this, bp::_1)); } Gui::Action * StdCmdDrawStyle::createAction(void) diff --git a/src/Gui/DAGView/DAGModel.cpp b/src/Gui/DAGView/DAGModel.cpp index e4bb87c1a5..88376d1b7e 100644 --- a/src/Gui/DAGView/DAGModel.cpp +++ b/src/Gui/DAGView/DAGModel.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -#include +#include #include #include @@ -64,6 +64,7 @@ using namespace Gui; using namespace DAG; +namespace bp = boost::placeholders; LineEdit::LineEdit(QWidget* parentIn): QLineEdit(parentIn) { @@ -145,11 +146,11 @@ Model::Model(QObject *parentIn, const Gui::Document &documentIn) : QGraphicsScen connect(this->editingFinishedAction, SIGNAL(triggered()), this, SLOT(editingFinishedSlot())); - connectNewObject = documentIn.signalNewObject.connect(boost::bind(&Model::slotNewObject, this, _1)); - connectDelObject = documentIn.signalDeletedObject.connect(boost::bind(&Model::slotDeleteObject, this, _1)); - connectChgObject = documentIn.signalChangedObject.connect(boost::bind(&Model::slotChangeObject, this, _1, _2)); - connectEdtObject = documentIn.signalInEdit.connect(boost::bind(&Model::slotInEdit, this, _1)); - connectResObject = documentIn.signalResetEdit.connect(boost::bind(&Model::slotResetEdit, this, _1)); + 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)); for (auto obj : documentIn.getDocument()->getObjects()) { auto vpd = Base::freecad_dynamic_cast(documentIn.getViewProvider(obj)); diff --git a/src/Gui/DAGView/DAGView.cpp b/src/Gui/DAGView/DAGView.cpp index e0f11e0bfd..2c73d99d97 100644 --- a/src/Gui/DAGView/DAGView.cpp +++ b/src/Gui/DAGView/DAGView.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -#include +#include #include #include #endif @@ -42,6 +42,7 @@ using namespace Gui; using namespace DAG; +namespace bp = boost::placeholders; DAG::DockWindow::DockWindow(Gui::Document* gDocumentIn, QWidget* parent): Gui::DockWindow(gDocumentIn, parent) { @@ -55,8 +56,8 @@ View::View(QWidget* parentIn): QGraphicsView(parentIn) { this->setRenderHint(QPainter::Antialiasing, true); this->setRenderHint(QPainter::TextAntialiasing, true); - Application::Instance->signalActiveDocument.connect(boost::bind(&View::slotActiveDocument, this, _1)); - Application::Instance->signalDeleteDocument.connect(boost::bind(&View::slotDeleteDocument, this, _1)); + Application::Instance->signalActiveDocument.connect(boost::bind(&View::slotActiveDocument, this, bp::_1)); + Application::Instance->signalDeleteDocument.connect(boost::bind(&View::slotDeleteDocument, this, bp::_1)); //just update the dagview when the gui process is idle. connect(QAbstractEventDispatcher::instance(), SIGNAL(awake()), this, SLOT(awakeSlot())); @@ -64,8 +65,8 @@ View::View(QWidget* parentIn): QGraphicsView(parentIn) View::~View() { - Application::Instance->signalActiveDocument.disconnect(boost::bind(&View::slotActiveDocument, this, _1)); - Application::Instance->signalDeleteDocument.disconnect(boost::bind(&View::slotDeleteDocument, this, _1)); + Application::Instance->signalActiveDocument.disconnect(boost::bind(&View::slotActiveDocument, this, bp::_1)); + Application::Instance->signalDeleteDocument.disconnect(boost::bind(&View::slotDeleteDocument, this, bp::_1)); } void View::slotActiveDocument(const Document &documentIn) diff --git a/src/Gui/DlgDisplayPropertiesImp.cpp b/src/Gui/DlgDisplayPropertiesImp.cpp index 151f653714..d5961b35a3 100644 --- a/src/Gui/DlgDisplayPropertiesImp.cpp +++ b/src/Gui/DlgDisplayPropertiesImp.cpp @@ -24,7 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ # include -# include +# include # include # include #endif @@ -51,6 +51,7 @@ using namespace Gui::Dialog; using namespace std; +namespace bp = boost::placeholders; /* TRANSLATOR Gui::Dialog::DlgDisplayPropertiesImp */ @@ -111,7 +112,7 @@ DlgDisplayPropertiesImp::DlgDisplayPropertiesImp(bool floating, QWidget* parent, d->connectChangedObject = Gui::Application::Instance->signalChangedObject.connect(boost::bind - (&DlgDisplayPropertiesImp::slotChangedObject, this, _1, _2)); + (&DlgDisplayPropertiesImp::slotChangedObject, this, bp::_1, bp::_2)); } /** diff --git a/src/Gui/Document.cpp b/src/Gui/Document.cpp index f5b6d87679..b36b184557 100644 --- a/src/Gui/Document.cpp +++ b/src/Gui/Document.cpp @@ -33,7 +33,7 @@ # include # include # include -# include +# include # include # include #endif @@ -75,6 +75,7 @@ FC_LOG_LEVEL_INIT("Gui",true,true) using namespace Gui; +namespace bp = boost::placeholders; namespace Gui { @@ -165,54 +166,54 @@ Document::Document(App::Document* pcDocument,Application * app) // Setup the connections d->connectNewObject = pcDocument->signalNewObject.connect - (boost::bind(&Gui::Document::slotNewObject, this, _1)); + (boost::bind(&Gui::Document::slotNewObject, this, bp::_1)); d->connectDelObject = pcDocument->signalDeletedObject.connect - (boost::bind(&Gui::Document::slotDeletedObject, this, _1)); + (boost::bind(&Gui::Document::slotDeletedObject, this, bp::_1)); d->connectCngObject = pcDocument->signalChangedObject.connect - (boost::bind(&Gui::Document::slotChangedObject, this, _1, _2)); + (boost::bind(&Gui::Document::slotChangedObject, this, bp::_1, bp::_2)); d->connectRenObject = pcDocument->signalRelabelObject.connect - (boost::bind(&Gui::Document::slotRelabelObject, this, _1)); + (boost::bind(&Gui::Document::slotRelabelObject, this, bp::_1)); d->connectActObject = pcDocument->signalActivatedObject.connect - (boost::bind(&Gui::Document::slotActivatedObject, this, _1)); + (boost::bind(&Gui::Document::slotActivatedObject, this, bp::_1)); d->connectActObjectBlocker = boost::signals2::shared_connection_block (d->connectActObject, false); d->connectSaveDocument = pcDocument->signalSaveDocument.connect - (boost::bind(&Gui::Document::Save, this, _1)); + (boost::bind(&Gui::Document::Save, this, bp::_1)); d->connectRestDocument = pcDocument->signalRestoreDocument.connect - (boost::bind(&Gui::Document::Restore, this, _1)); + (boost::bind(&Gui::Document::Restore, this, bp::_1)); d->connectStartLoadDocument = App::GetApplication().signalStartRestoreDocument.connect - (boost::bind(&Gui::Document::slotStartRestoreDocument, this, _1)); + (boost::bind(&Gui::Document::slotStartRestoreDocument, this, bp::_1)); d->connectFinishLoadDocument = App::GetApplication().signalFinishRestoreDocument.connect - (boost::bind(&Gui::Document::slotFinishRestoreDocument, this, _1)); + (boost::bind(&Gui::Document::slotFinishRestoreDocument, this, bp::_1)); d->connectShowHidden = App::GetApplication().signalShowHidden.connect - (boost::bind(&Gui::Document::slotShowHidden, this, _1)); + (boost::bind(&Gui::Document::slotShowHidden, this, bp::_1)); d->connectChangePropertyEditor = pcDocument->signalChangePropertyEditor.connect - (boost::bind(&Gui::Document::slotChangePropertyEditor, this, _1, _2)); + (boost::bind(&Gui::Document::slotChangePropertyEditor, this, bp::_1, bp::_2)); d->connectFinishRestoreObject = pcDocument->signalFinishRestoreObject.connect - (boost::bind(&Gui::Document::slotFinishRestoreObject, this, _1)); + (boost::bind(&Gui::Document::slotFinishRestoreObject, this, bp::_1)); d->connectExportObjects = pcDocument->signalExportViewObjects.connect - (boost::bind(&Gui::Document::exportObjects, this, _1, _2)); + (boost::bind(&Gui::Document::exportObjects, this, bp::_1, bp::_2)); d->connectImportObjects = pcDocument->signalImportViewObjects.connect - (boost::bind(&Gui::Document::importObjects, this, _1, _2, _3)); + (boost::bind(&Gui::Document::importObjects, this, bp::_1, bp::_2, bp::_3)); d->connectFinishImportObjects = pcDocument->signalFinishImportObjects.connect - (boost::bind(&Gui::Document::slotFinishImportObjects, this, _1)); + (boost::bind(&Gui::Document::slotFinishImportObjects, this, bp::_1)); d->connectUndoDocument = pcDocument->signalUndo.connect - (boost::bind(&Gui::Document::slotUndoDocument, this, _1)); + (boost::bind(&Gui::Document::slotUndoDocument, this, bp::_1)); d->connectRedoDocument = pcDocument->signalRedo.connect - (boost::bind(&Gui::Document::slotRedoDocument, this, _1)); + (boost::bind(&Gui::Document::slotRedoDocument, this, bp::_1)); d->connectRecomputed = pcDocument->signalRecomputed.connect - (boost::bind(&Gui::Document::slotRecomputed, this, _1)); + (boost::bind(&Gui::Document::slotRecomputed, this, bp::_1)); d->connectSkipRecompute = pcDocument->signalSkipRecompute.connect - (boost::bind(&Gui::Document::slotSkipRecompute, this, _1, _2)); + (boost::bind(&Gui::Document::slotSkipRecompute, this, bp::_1, bp::_2)); d->connectTouchedObject = pcDocument->signalTouchedObject.connect - (boost::bind(&Gui::Document::slotTouchedObject, this, _1)); + (boost::bind(&Gui::Document::slotTouchedObject, this, bp::_1)); d->connectTransactionAppend = pcDocument->signalTransactionAppend.connect - (boost::bind(&Gui::Document::slotTransactionAppend, this, _1, _2)); + (boost::bind(&Gui::Document::slotTransactionAppend, this, bp::_1, bp::_2)); d->connectTransactionRemove = pcDocument->signalTransactionRemove.connect - (boost::bind(&Gui::Document::slotTransactionRemove, this, _1, _2)); + (boost::bind(&Gui::Document::slotTransactionRemove, this, bp::_1, bp::_2)); // pointer to the python class // NOTE: As this Python object doesn't get returned to the interpreter we // mustn't increment it (Werner Jan-12-2006) diff --git a/src/Gui/DocumentModel.cpp b/src/Gui/DocumentModel.cpp index 15bd9f4120..cc8c89b247 100644 --- a/src/Gui/DocumentModel.cpp +++ b/src/Gui/DocumentModel.cpp @@ -27,7 +27,7 @@ # include # include # include -# include +# include #endif #include @@ -42,6 +42,7 @@ #include using namespace Gui; +namespace bp = boost::placeholders; namespace Gui { // forward declaration @@ -367,11 +368,11 @@ DocumentModel::DocumentModel(QObject* parent) } // Setup connections - Application::Instance->signalNewDocument.connect(boost::bind(&DocumentModel::slotNewDocument, this, _1)); - Application::Instance->signalDeleteDocument.connect(boost::bind(&DocumentModel::slotDeleteDocument, this, _1)); - Application::Instance->signalRenameDocument.connect(boost::bind(&DocumentModel::slotRenameDocument, this, _1)); - Application::Instance->signalActiveDocument.connect(boost::bind(&DocumentModel::slotActiveDocument, this, _1)); - Application::Instance->signalRelabelDocument.connect(boost::bind(&DocumentModel::slotRelabelDocument, this, _1)); + 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)); } DocumentModel::~DocumentModel() @@ -381,13 +382,13 @@ DocumentModel::~DocumentModel() void DocumentModel::slotNewDocument(const Gui::Document& Doc) { - Doc.signalNewObject.connect(boost::bind(&DocumentModel::slotNewObject, this, _1)); - Doc.signalDeletedObject.connect(boost::bind(&DocumentModel::slotDeleteObject, this, _1)); - Doc.signalChangedObject.connect(boost::bind(&DocumentModel::slotChangeObject, this, _1, _2)); - Doc.signalRelabelObject.connect(boost::bind(&DocumentModel::slotRenameObject, this, _1)); - Doc.signalActivatedObject.connect(boost::bind(&DocumentModel::slotActiveObject, this, _1)); - Doc.signalInEdit.connect(boost::bind(&DocumentModel::slotInEdit, this, _1)); - Doc.signalResetEdit.connect(boost::bind(&DocumentModel::slotResetEdit, this, _1)); + 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)); QModelIndex parent = createIndex(0,0,d->rootItem); int count_docs = d->rootItem->childCount(); diff --git a/src/Gui/DocumentObserver.cpp b/src/Gui/DocumentObserver.cpp index 2267c5dc95..dc26658b09 100644 --- a/src/Gui/DocumentObserver.cpp +++ b/src/Gui/DocumentObserver.cpp @@ -25,10 +25,9 @@ #ifndef _PreComp_ # include +# include #endif -#include - #include "Application.h" #include "Document.h" #include "ViewProviderDocumentObject.h" @@ -36,6 +35,7 @@ #include using namespace Gui; +namespace bp = boost::placeholders; DocumentT::DocumentT() @@ -204,7 +204,7 @@ public: Private(Gui::Document* doc) : _document(doc) { if (doc) { connectApplicationDeletedDocument = doc->signalDeleteDocument.connect(boost::bind - (&Private::deletedDocument, this, _1)); + (&Private::deletedDocument, this, bp::_1)); } } @@ -255,11 +255,11 @@ public: indocument = true; Gui::Document* doc = obj->getDocument(); connectApplicationDeletedDocument = doc->signalDeleteDocument.connect(boost::bind - (&Private::deletedDocument, this, _1)); + (&Private::deletedDocument, this, bp::_1)); connectDocumentCreatedObject = doc->signalNewObject.connect(boost::bind - (&Private::createdObject, this, _1)); + (&Private::createdObject, this, bp::_1)); connectDocumentDeletedObject = doc->signalDeletedObject.connect(boost::bind - (&Private::deletedObject, this, _1)); + (&Private::deletedObject, this, bp::_1)); } } void deletedDocument(const Gui::Document& doc) { @@ -346,25 +346,25 @@ void DocumentObserver::attachDocument(Document* doc) return; this->connectDocumentCreatedObject = doc->signalNewObject.connect(boost::bind - (&DocumentObserver::slotCreatedObject, this, _1)); + (&DocumentObserver::slotCreatedObject, this, bp::_1)); this->connectDocumentDeletedObject = doc->signalDeletedObject.connect(boost::bind - (&DocumentObserver::slotDeletedObject, this, _1)); + (&DocumentObserver::slotDeletedObject, this, bp::_1)); this->connectDocumentChangedObject = doc->signalChangedObject.connect(boost::bind - (&DocumentObserver::slotChangedObject, this, _1, _2)); + (&DocumentObserver::slotChangedObject, this, bp::_1, bp::_2)); this->connectDocumentRelabelObject = doc->signalRelabelObject.connect(boost::bind - (&DocumentObserver::slotRelabelObject, this, _1)); + (&DocumentObserver::slotRelabelObject, this, bp::_1)); this->connectDocumentActivateObject = doc->signalActivatedObject.connect(boost::bind - (&DocumentObserver::slotActivatedObject, this, _1)); + (&DocumentObserver::slotActivatedObject, this, bp::_1)); this->connectDocumentEditObject = doc->signalInEdit.connect(boost::bind - (&DocumentObserver::slotEnterEditObject, this, _1)); + (&DocumentObserver::slotEnterEditObject, this, bp::_1)); this->connectDocumentResetObject = doc->signalResetEdit.connect(boost::bind - (&DocumentObserver::slotResetEditObject, this, _1)); + (&DocumentObserver::slotResetEditObject, this, bp::_1)); this->connectDocumentUndo = doc->signalUndoDocument.connect(boost::bind - (&DocumentObserver::slotUndoDocument, this, _1)); + (&DocumentObserver::slotUndoDocument, this, bp::_1)); this->connectDocumentRedo = doc->signalRedoDocument.connect(boost::bind - (&DocumentObserver::slotRedoDocument, this, _1)); + (&DocumentObserver::slotRedoDocument, this, bp::_1)); this->connectDocumentDelete = doc->signalDeleteDocument.connect(boost::bind - (&DocumentObserver::slotDeleteDocument, this, _1)); + (&DocumentObserver::slotDeleteDocument, this, bp::_1)); } void DocumentObserver::detachDocument() diff --git a/src/Gui/DocumentObserverPython.cpp b/src/Gui/DocumentObserverPython.cpp index ab59d9882e..913e0deb1d 100644 --- a/src/Gui/DocumentObserverPython.cpp +++ b/src/Gui/DocumentObserverPython.cpp @@ -35,6 +35,7 @@ #include using namespace Gui; +namespace bp = boost::placeholders; std::vector DocumentObserverPython::_instances; @@ -64,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 = Application::Instance->signal##_name2.connect(\ - boost::bind(&DocumentObserverPython::slot##_name1, this, _1));\ + boost::bind(&DocumentObserverPython::slot##_name1, this, bp::_1));\ }\ while(0); @@ -72,7 +73,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, _1, _2));\ + boost::bind(&DocumentObserverPython::slot##_name1, this, bp::_1, bp::_2));\ }\ while(0); diff --git a/src/Gui/DocumentObserverPython.h b/src/Gui/DocumentObserverPython.h index 0f18696fc4..bd3aa5b51d 100644 --- a/src/Gui/DocumentObserverPython.h +++ b/src/Gui/DocumentObserverPython.h @@ -27,7 +27,7 @@ #include #include -#include +#include namespace Gui { diff --git a/src/Gui/ExpressionBinding.cpp b/src/Gui/ExpressionBinding.cpp index be47e2b77e..c96e9b4463 100644 --- a/src/Gui/ExpressionBinding.cpp +++ b/src/Gui/ExpressionBinding.cpp @@ -34,12 +34,13 @@ #include #include #include -#include +#include FC_LOG_LEVEL_INIT("Expression",true,true) using namespace Gui; using namespace App; +namespace bp = boost::placeholders; ExpressionBinding::ExpressionBinding() : iconLabel(0) @@ -99,7 +100,7 @@ void ExpressionBinding::bind(const App::ObjectIdentifier &_path) //connect to be informed about changes DocumentObject * docObj = path.getDocumentObject(); - connection = docObj->ExpressionEngine.expressionChanged.connect(boost::bind(&ExpressionBinding::expressionChange, this, _1)); + connection = docObj->ExpressionEngine.expressionChanged.connect(boost::bind(&ExpressionBinding::expressionChange, this, bp::_1)); } void ExpressionBinding::bind(const Property &prop) diff --git a/src/Gui/GraphvizView.cpp b/src/Gui/GraphvizView.cpp index afffc62449..62e69ef852 100644 --- a/src/Gui/GraphvizView.cpp +++ b/src/Gui/GraphvizView.cpp @@ -37,7 +37,7 @@ # include # include # include -# include +# include #endif #include "GraphicsViewZoom.h" #include "FileDialog.h" @@ -50,6 +50,7 @@ #include using namespace Gui; +namespace bp = boost::placeholders; namespace Gui { @@ -187,9 +188,9 @@ GraphvizView::GraphvizView(App::Document & _doc, QWidget* parent) connect(thread, SIGNAL(svgFileRead(const QByteArray &)), this, SLOT(svgFileRead(const QByteArray &))); // Connect signal from document - recomputeConnection = _doc.signalRecomputed.connect(boost::bind(&GraphvizView::updateSvgItem, this, _1)); - undoConnection = _doc.signalUndo.connect(boost::bind(&GraphvizView::updateSvgItem, this, _1)); - redoConnection = _doc.signalRedo.connect(boost::bind(&GraphvizView::updateSvgItem, this, _1)); + 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)); updateSvgItem(_doc); } diff --git a/src/Gui/MDIView.cpp b/src/Gui/MDIView.cpp index a010b95da7..60b7b43b13 100644 --- a/src/Gui/MDIView.cpp +++ b/src/Gui/MDIView.cpp @@ -25,7 +25,7 @@ #ifndef _PreComp_ # include -# include +# include # include # include # include @@ -44,6 +44,7 @@ #include "ViewProviderDocumentObject.h" using namespace Gui; +namespace bp = boost::placeholders; TYPESYSTEM_SOURCE_ABSTRACT(Gui::MDIView,Gui::BaseView) @@ -61,7 +62,7 @@ MDIView::MDIView(Gui::Document* pcDocument,QWidget* parent, Qt::WindowFlags wfla if (pcDocument) { connectDelObject = pcDocument->signalDeletedObject.connect - (boost::bind(&ActiveObjectList::objectDeleted, &ActiveObjects, _1)); + (boost::bind(&ActiveObjectList::objectDeleted, &ActiveObjects, bp::_1)); assert(connectDelObject.connected()); } } diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index 3812d552f4..bf89926d0b 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -53,8 +53,6 @@ # include #endif -#include - // FreeCAD Base header #include #include diff --git a/src/Gui/ManualAlignment.cpp b/src/Gui/ManualAlignment.cpp index ccb0f2d8c2..2deb44e8c3 100644 --- a/src/Gui/ManualAlignment.cpp +++ b/src/Gui/ManualAlignment.cpp @@ -47,9 +47,9 @@ # include # include # include +# include #endif -#include #include #include @@ -70,6 +70,7 @@ using namespace Gui; +namespace bp = boost::placeholders; AlignmentGroup::AlignmentGroup() { @@ -668,7 +669,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, _1)); + .connect(boost::bind(&ManualAlignment::slotDeletedDocument, this, bp::_1)); // setup sensor connection d->sensorCam1 = new SoNodeSensor(Private::syncCameraCB, this); @@ -862,7 +863,7 @@ void ManualAlignment::startAlignment(Base::Type mousemodel) if (this->connectDocumentDeletedObject.connected()) this->connectDocumentDeletedObject.disconnect(); this->connectDocumentDeletedObject = myDocument->signalDeletedObject.connect(boost::bind - (&ManualAlignment::slotDeletedObject, this, _1)); + (&ManualAlignment::slotDeletedObject, this, bp::_1)); continueAlignment(); } diff --git a/src/Gui/MergeDocuments.cpp b/src/Gui/MergeDocuments.cpp index a32687b604..e79a171bdb 100644 --- a/src/Gui/MergeDocuments.cpp +++ b/src/Gui/MergeDocuments.cpp @@ -23,7 +23,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ # include -# include +# include #endif #include "MergeDocuments.h" #include @@ -36,6 +36,7 @@ #include using namespace Gui; +namespace bp = boost::placeholders; namespace Gui { @@ -122,9 +123,9 @@ private: MergeDocuments::MergeDocuments(App::Document* doc) : stream(0), appdoc(doc) { connectExport = doc->signalExportObjects.connect - (boost::bind(&MergeDocuments::exportObject, this, _1, _2)); + (boost::bind(&MergeDocuments::exportObject, this, bp::_1, bp::_2)); connectImport = doc->signalImportObjects.connect - (boost::bind(&MergeDocuments::importObject, this, _1, _2)); + (boost::bind(&MergeDocuments::importObject, this, bp::_1, bp::_2)); document = Gui::Application::Instance->getDocument(doc); } diff --git a/src/Gui/Placement.cpp b/src/Gui/Placement.cpp index 6880ff9249..27af9afc0a 100644 --- a/src/Gui/Placement.cpp +++ b/src/Gui/Placement.cpp @@ -22,11 +22,14 @@ #include "PreCompiled.h" +#ifndef _PreComp_ #include #include #include #include #include +#include +#endif #include "Placement.h" #include "ui_Placement.h" @@ -45,6 +48,7 @@ #include using namespace Gui::Dialog; +namespace bp = boost::placeholders; namespace Gui { namespace Dialog { class find_placement @@ -118,7 +122,7 @@ Placement::Placement(QWidget* parent, Qt::WindowFlags fl) connect(signalMapper, SIGNAL(mapped(int)), this, SLOT(onPlacementChanged(int))); connectAct = Application::Instance->signalActiveDocument.connect - (boost::bind(&Placement::slotActiveDocument, this, _1)); + (boost::bind(&Placement::slotActiveDocument, this, bp::_1)); App::Document* activeDoc = App::GetApplication().getActiveDocument(); if (activeDoc) documents.insert(activeDoc->getName()); diff --git a/src/Gui/Placement.h b/src/Gui/Placement.h index 87be33bb88..fb5a6b0075 100644 --- a/src/Gui/Placement.h +++ b/src/Gui/Placement.h @@ -30,7 +30,6 @@ #include #include -#include class QSignalMapper; diff --git a/src/Gui/PreCompiled.h b/src/Gui/PreCompiled.h index c6d67c0c47..b759199162 100644 --- a/src/Gui/PreCompiled.h +++ b/src/Gui/PreCompiled.h @@ -78,7 +78,7 @@ // Boost #include -#include +#include #include #include #include diff --git a/src/Gui/ProjectView.cpp b/src/Gui/ProjectView.cpp index 316d0acf71..857cf24f59 100644 --- a/src/Gui/ProjectView.cpp +++ b/src/Gui/ProjectView.cpp @@ -24,7 +24,6 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include # include # include # include diff --git a/src/Gui/PropertyView.cpp b/src/Gui/PropertyView.cpp index ac338f12ae..6a5804747b 100644 --- a/src/Gui/PropertyView.cpp +++ b/src/Gui/PropertyView.cpp @@ -27,9 +27,9 @@ # include # include # include +# include #endif -#include /// Here the FreeCAD includes sorted by Base,App,Gui...... #include @@ -57,6 +57,7 @@ using namespace std; using namespace Gui; using namespace Gui::DockWnd; using namespace Gui::PropertyEditor; +namespace bp = boost::placeholders; static ParameterGrp::handle _GetParam() { static ParameterGrp::handle hGrp; @@ -111,19 +112,19 @@ PropertyView::PropertyView(QWidget *parent) this->connectPropData = App::GetApplication().signalChangedObject.connect(boost::bind - (&PropertyView::slotChangePropertyData, this, _1, _2)); + (&PropertyView::slotChangePropertyData, this, bp::_1, bp::_2)); this->connectPropView = Gui::Application::Instance->signalChangedObject.connect(boost::bind - (&PropertyView::slotChangePropertyView, this, _1, _2)); + (&PropertyView::slotChangePropertyView, this, bp::_1, bp::_2)); this->connectPropAppend = App::GetApplication().signalAppendDynamicProperty.connect(boost::bind - (&PropertyView::slotAppendDynamicProperty, this, _1)); + (&PropertyView::slotAppendDynamicProperty, this, bp::_1)); this->connectPropRemove = App::GetApplication().signalRemoveDynamicProperty.connect(boost::bind - (&PropertyView::slotRemoveDynamicProperty, this, _1)); + (&PropertyView::slotRemoveDynamicProperty, this, bp::_1)); this->connectPropChange = App::GetApplication().signalChangePropertyEditor.connect(boost::bind - (&PropertyView::slotChangePropertyEditor, this, _1, _2)); + (&PropertyView::slotChangePropertyEditor, this, bp::_1, bp::_2)); this->connectUndoDocument = App::GetApplication().signalUndoDocument.connect(boost::bind (&PropertyView::slotRollback, this)); @@ -132,16 +133,16 @@ PropertyView::PropertyView(QWidget *parent) (&PropertyView::slotRollback, this)); this->connectActiveDoc = Application::Instance->signalActiveDocument.connect(boost::bind - (&PropertyView::slotActiveDocument, this, _1)); + (&PropertyView::slotActiveDocument, this, bp::_1)); this->connectDelDocument = Application::Instance->signalDeleteDocument.connect( - boost::bind(&PropertyView::slotDeleteDocument, this, _1)); + boost::bind(&PropertyView::slotDeleteDocument, this, bp::_1)); this->connectDelViewObject = Application::Instance->signalDeletedObject.connect( - boost::bind(&PropertyView::slotDeletedViewObject, this, _1)); + boost::bind(&PropertyView::slotDeletedViewObject, this, bp::_1)); this->connectDelObject = App::GetApplication().signalDeletedObject.connect( - boost::bind(&PropertyView::slotDeletedObject, this, _1)); + boost::bind(&PropertyView::slotDeletedObject, this, bp::_1)); } PropertyView::~PropertyView() diff --git a/src/Gui/Selection.cpp b/src/Gui/Selection.cpp index 752ff07667..df7e42f2a8 100644 --- a/src/Gui/Selection.cpp +++ b/src/Gui/Selection.cpp @@ -26,7 +26,7 @@ #ifndef _PreComp_ # include # include -# include +# include # include # include # include @@ -60,6 +60,7 @@ FC_LOG_LEVEL_INIT("Selection",false,true,true) using namespace Gui; using namespace std; +namespace bp = boost::placeholders; SelectionGateFilterExternal::SelectionGateFilterExternal(const char *docName, const char *objName) { if(docName) { @@ -134,7 +135,7 @@ void SelectionObserver::attachSelection() resolve?Selection().signalSelectionChanged2: Selection().signalSelectionChanged); connectSelection = signal.connect(boost::bind - (&SelectionObserver::_onSelectionChanged, this, _1)); + (&SelectionObserver::_onSelectionChanged, this, bp::_1)); if(filterDocName.size()) Selection().addSelectionGate( new SelectionGateFilterExternal(filterDocName.c_str(),filterObjName.c_str())); @@ -1761,8 +1762,8 @@ SelectionSingleton::SelectionSingleton() hz = 0; ActiveGate = 0; gateResolve = 1; - App::GetApplication().signalDeletedObject.connect(boost::bind(&Gui::SelectionSingleton::slotDeletedObject, this, _1)); - signalSelectionChanged.connect(boost::bind(&Gui::SelectionSingleton::slotSelectionChanged, this, _1)); + App::GetApplication().signalDeletedObject.connect(boost::bind(&Gui::SelectionSingleton::slotDeletedObject, this, bp::_1)); + signalSelectionChanged.connect(boost::bind(&Gui::SelectionSingleton::slotSelectionChanged, this, bp::_1)); } /** diff --git a/src/Gui/TaskElementColors.cpp b/src/Gui/TaskElementColors.cpp index b61b60724b..0beb88c469 100644 --- a/src/Gui/TaskElementColors.cpp +++ b/src/Gui/TaskElementColors.cpp @@ -28,7 +28,7 @@ #include -#include +#include #include #include "ui_TaskElementColors.h" @@ -52,6 +52,7 @@ FC_LOG_LEVEL_INIT("Gui",true,true) using namespace Gui; +namespace bp = boost::placeholders; class ElementColors::Private: public Gui::SelectionGate { @@ -323,9 +324,9 @@ ElementColors::ElementColors(ViewProviderDocumentObject* vp, bool noHide) Selection().addSelectionGate(d,0); d->connectDelDoc = Application::Instance->signalDeleteDocument.connect(boost::bind - (&ElementColors::slotDeleteDocument, this, _1)); + (&ElementColors::slotDeleteDocument, this, bp::_1)); d->connectDelObj = Application::Instance->signalDeletedObject.connect(boost::bind - (&ElementColors::slotDeleteObject, this, _1)); + (&ElementColors::slotDeleteObject, this, bp::_1)); d->populate(); } diff --git a/src/Gui/TaskView/TaskAppearance.cpp b/src/Gui/TaskView/TaskAppearance.cpp index 976f707132..450df1f566 100644 --- a/src/Gui/TaskView/TaskAppearance.cpp +++ b/src/Gui/TaskView/TaskAppearance.cpp @@ -25,7 +25,7 @@ #ifndef _PreComp_ # include -# include +# include #endif #include "ui_TaskAppearance.h" @@ -38,6 +38,7 @@ #include using namespace Gui::TaskView; +namespace bp = boost::placeholders; /* TRANSLATOR Gui::TaskView::TaskAppearance */ @@ -57,7 +58,7 @@ TaskAppearance::TaskAppearance(QWidget *parent) this->connectChangedObject = Gui::Application::Instance->signalChangedObject.connect(boost::bind - (&TaskAppearance::slotChangedObject, this, _1, _2)); + (&TaskAppearance::slotChangedObject, this, bp::_1, bp::_2)); } TaskAppearance::~TaskAppearance() diff --git a/src/Gui/TaskView/TaskSelectLinkProperty.cpp b/src/Gui/TaskView/TaskSelectLinkProperty.cpp index 62722df247..8d2faae0e3 100644 --- a/src/Gui/TaskView/TaskSelectLinkProperty.cpp +++ b/src/Gui/TaskView/TaskSelectLinkProperty.cpp @@ -25,7 +25,6 @@ #ifndef _PreComp_ # include -# include #endif #include "ui_TaskSelectLinkProperty.h" diff --git a/src/Gui/TaskView/TaskView.cpp b/src/Gui/TaskView/TaskView.cpp index 8d9904bdf4..fd500d4c94 100644 --- a/src/Gui/TaskView/TaskView.cpp +++ b/src/Gui/TaskView/TaskView.cpp @@ -24,7 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +# include # include # include # include @@ -53,6 +53,7 @@ #endif using namespace Gui::TaskView; +namespace bp = boost::placeholders; //************************************************************************** //************************************************************************** @@ -398,16 +399,16 @@ TaskView::TaskView(QWidget *parent) connectApplicationActiveDocument = App::GetApplication().signalActiveDocument.connect - (boost::bind(&Gui::TaskView::TaskView::slotActiveDocument, this, _1)); + (boost::bind(&Gui::TaskView::TaskView::slotActiveDocument, this, bp::_1)); connectApplicationDeleteDocument = App::GetApplication().signalDeletedDocument.connect (boost::bind(&Gui::TaskView::TaskView::slotDeletedDocument, this)); connectApplicationUndoDocument = App::GetApplication().signalUndoDocument.connect - (boost::bind(&Gui::TaskView::TaskView::slotUndoDocument, this, _1)); + (boost::bind(&Gui::TaskView::TaskView::slotUndoDocument, this, bp::_1)); connectApplicationRedoDocument = App::GetApplication().signalRedoDocument.connect - (boost::bind(&Gui::TaskView::TaskView::slotRedoDocument, this, _1)); + (boost::bind(&Gui::TaskView::TaskView::slotRedoDocument, this, bp::_1)); } TaskView::~TaskView() diff --git a/src/Gui/TextDocumentEditorView.cpp b/src/Gui/TextDocumentEditorView.cpp index 43fbb2980d..63d9b7d76c 100644 --- a/src/Gui/TextDocumentEditorView.cpp +++ b/src/Gui/TextDocumentEditorView.cpp @@ -30,11 +30,11 @@ # include # include # include +# include +# include +# include #endif -#include -#include -#include #include #include diff --git a/src/Gui/Tree.cpp b/src/Gui/Tree.cpp index f82b597f38..88e2c8b672 100644 --- a/src/Gui/Tree.cpp +++ b/src/Gui/Tree.cpp @@ -24,7 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +# include # include # include # include @@ -78,6 +78,7 @@ FC_LOG_LEVEL_INIT("Tree",false,true,true) #define TREE_TRACE(_msg) _TREE_PRINT(FC_LOGLEVEL_TRACE,NotifyLog,_msg) using namespace Gui; +namespace bp = boost::placeholders; ///////////////////////////////////////////////////////////////////////////////// @@ -262,9 +263,9 @@ public: connectIcon = viewObject->signalChangeIcon.connect( boost::bind(&DocumentObjectData::slotChangeIcon, this)); connectTool = viewObject->signalChangeToolTip.connect( - boost::bind(&DocumentObjectData::slotChangeToolTip, this, _1)); + boost::bind(&DocumentObjectData::slotChangeToolTip, this, bp::_1)); connectStat = viewObject->signalChangeStatusTip.connect( - boost::bind(&DocumentObjectData::slotChangeStatusTip, this, _1)); + boost::bind(&DocumentObjectData::slotChangeStatusTip, this, bp::_1)); removeChildrenFromRoot = viewObject->canRemoveChildrenFromRoot(); itemHidden = !viewObject->showInTree(); @@ -487,18 +488,18 @@ TreeWidget::TreeWidget(const char *name, QWidget* parent) this, SLOT(onSearchObjects())); // Setup connections - connectNewDocument = Application::Instance->signalNewDocument.connect(boost::bind(&TreeWidget::slotNewDocument, this, _1, _2)); - connectDelDocument = Application::Instance->signalDeleteDocument.connect(boost::bind(&TreeWidget::slotDeleteDocument, this, _1)); - connectRenDocument = Application::Instance->signalRenameDocument.connect(boost::bind(&TreeWidget::slotRenameDocument, this, _1)); - connectActDocument = Application::Instance->signalActiveDocument.connect(boost::bind(&TreeWidget::slotActiveDocument, this, _1)); - connectRelDocument = Application::Instance->signalRelabelDocument.connect(boost::bind(&TreeWidget::slotRelabelDocument, this, _1)); - connectShowHidden = Application::Instance->signalShowHidden.connect(boost::bind(&TreeWidget::slotShowHidden, this, _1)); + 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)); // 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, _1,_2)); + boost::bind(&TreeWidget::slotChangedViewObject, this, bp::_1, bp::_2)); // make sure to show a horizontal scrollbar if needed #if QT_VERSION >= 0x050000 @@ -2393,9 +2394,9 @@ void TreeWidget::onUpdateStatus(void) if(!docItem->connectChgObject.connected()) { docItem->connectChgObject = docItem->document()->signalChangedObject.connect( - boost::bind(&TreeWidget::slotChangeObject, this, _1, _2)); + boost::bind(&TreeWidget::slotChangeObject, this, bp::_1, bp::_2)); docItem->connectTouchedObject = doc->signalTouchedObject.connect( - boost::bind(&TreeWidget::slotTouchedObject, this, _1)); + boost::bind(&TreeWidget::slotTouchedObject, this, bp::_1)); } if(doc->testStatus(App::Document::PartialDoc)) @@ -2973,26 +2974,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, _1)); + connectNewObject = doc->signalNewObject.connect(boost::bind(&DocumentItem::slotNewObject, this, bp::_1)); connectDelObject = doc->signalDeletedObject.connect( - boost::bind(&TreeWidget::slotDeleteObject, getTree(), _1)); + boost::bind(&TreeWidget::slotDeleteObject, getTree(), bp::_1)); if(!App::GetApplication().isRestoring()) { connectChgObject = doc->signalChangedObject.connect( - boost::bind(&TreeWidget::slotChangeObject, getTree(), _1, _2)); + boost::bind(&TreeWidget::slotChangeObject, getTree(), bp::_1, bp::_2)); connectTouchedObject = doc->getDocument()->signalTouchedObject.connect( - boost::bind(&TreeWidget::slotTouchedObject, getTree(), _1)); + boost::bind(&TreeWidget::slotTouchedObject, getTree(), bp::_1)); } - connectEdtObject = doc->signalInEdit.connect(boost::bind(&DocumentItem::slotInEdit, this, _1)); - connectResObject = doc->signalResetEdit.connect(boost::bind(&DocumentItem::slotResetEdit, this, _1)); + connectEdtObject = doc->signalInEdit.connect(boost::bind(&DocumentItem::slotInEdit, this, bp::_1)); + connectResObject = doc->signalResetEdit.connect(boost::bind(&DocumentItem::slotResetEdit, this, bp::_1)); connectHltObject = doc->signalHighlightObject.connect( - boost::bind(&DocumentItem::slotHighlightObject, this, _1,_2,_3,_4,_5)); + boost::bind(&DocumentItem::slotHighlightObject, this, bp::_1, bp::_2, bp::_3, bp::_4, bp::_5)); connectExpObject = doc->signalExpandObject.connect( - boost::bind(&DocumentItem::slotExpandObject, this, _1,_2,_3,_4)); - connectScrObject = doc->signalScrollToObject.connect(boost::bind(&DocumentItem::slotScrollToObject, this, _1)); + boost::bind(&DocumentItem::slotExpandObject, this, bp::_1, bp::_2, bp::_3, bp::_4)); + connectScrObject = doc->signalScrollToObject.connect(boost::bind(&DocumentItem::slotScrollToObject, this, bp::_1)); auto adoc = doc->getDocument(); - connectRecomputed = adoc->signalRecomputed.connect(boost::bind(&DocumentItem::slotRecomputed, this, _1, _2)); + connectRecomputed = adoc->signalRecomputed.connect(boost::bind(&DocumentItem::slotRecomputed, this, bp::_1, bp::_2)); connectRecomputedObj = adoc->signalRecomputedObject.connect( - boost::bind(&DocumentItem::slotRecomputedObject, this, _1)); + boost::bind(&DocumentItem::slotRecomputedObject, this, bp::_1)); setFlags(Qt::ItemIsEnabled|Qt::ItemIsSelectable/*|Qt::ItemIsEditable*/); diff --git a/src/Gui/ViewProvider.cpp b/src/Gui/ViewProvider.cpp index 76a1927eda..cb0a039685 100644 --- a/src/Gui/ViewProvider.cpp +++ b/src/Gui/ViewProvider.cpp @@ -38,6 +38,7 @@ # include # include # include +# include #endif /// Here the FreeCAD includes sorted by Base,App,Gui...... @@ -61,7 +62,6 @@ #include "ViewProviderLink.h" #include "ViewParams.h" -#include FC_LOG_LEVEL_INIT("ViewProvider",true,true) diff --git a/src/Gui/ViewProviderLink.cpp b/src/Gui/ViewProviderLink.cpp index 1ae75cb20f..e5f437ff51 100644 --- a/src/Gui/ViewProviderLink.cpp +++ b/src/Gui/ViewProviderLink.cpp @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/Gui/ViewProviderOrigin.cpp b/src/Gui/ViewProviderOrigin.cpp index 8800e7432f..37ea28864e 100644 --- a/src/Gui/ViewProviderOrigin.cpp +++ b/src/Gui/ViewProviderOrigin.cpp @@ -29,7 +29,6 @@ # include # include # include -# include #endif diff --git a/src/Gui/ViewProviderOriginGroup.cpp b/src/Gui/ViewProviderOriginGroup.cpp index 3825cb0a8f..bb8a959698 100644 --- a/src/Gui/ViewProviderOriginGroup.cpp +++ b/src/Gui/ViewProviderOriginGroup.cpp @@ -23,9 +23,6 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include #endif #include diff --git a/src/Gui/ViewProviderOriginGroupExtension.cpp b/src/Gui/ViewProviderOriginGroupExtension.cpp index 450360fddc..9955fca052 100644 --- a/src/Gui/ViewProviderOriginGroupExtension.cpp +++ b/src/Gui/ViewProviderOriginGroupExtension.cpp @@ -25,6 +25,9 @@ #include "PreCompiled.h" #ifndef _PreComp_ +#include +#include +#include #endif #include "ViewProviderOriginGroupExtension.h" @@ -39,11 +42,10 @@ #include #include #include -#include -#include -#include using namespace Gui; +namespace bp = boost::placeholders; + EXTENSION_PROPERTY_SOURCE(Gui::ViewProviderOriginGroupExtension, Gui::ViewProviderGeoFeatureGroupExtension) @@ -97,10 +99,10 @@ void ViewProviderOriginGroupExtension::extensionAttach(App::DocumentObject *pcOb assert ( gdoc ); connectChangedObjectApp = adoc->signalChangedObject.connect ( - boost::bind ( &ViewProviderOriginGroupExtension::slotChangedObjectApp, this, _1) ); + boost::bind ( &ViewProviderOriginGroupExtension::slotChangedObjectApp, this, bp::_1) ); connectChangedObjectGui = gdoc->signalChangedObject.connect ( - boost::bind ( &ViewProviderOriginGroupExtension::slotChangedObjectGui, this, _1) ); + boost::bind ( &ViewProviderOriginGroupExtension::slotChangedObjectGui, this, bp::_1) ); } void ViewProviderOriginGroupExtension::extensionUpdateData( const App::Property* prop ) { diff --git a/src/Gui/ViewProviderPart.cpp b/src/Gui/ViewProviderPart.cpp index eab01ae21c..2790e8b460 100644 --- a/src/Gui/ViewProviderPart.cpp +++ b/src/Gui/ViewProviderPart.cpp @@ -27,7 +27,7 @@ # include # include # include -# include +# include #endif #include diff --git a/src/Gui/ViewProviderPythonFeature.cpp b/src/Gui/ViewProviderPythonFeature.cpp index c5ea875ddc..4e1cbca261 100644 --- a/src/Gui/ViewProviderPythonFeature.cpp +++ b/src/Gui/ViewProviderPythonFeature.cpp @@ -30,7 +30,7 @@ # include # include # include -# include +# include # include # include # include @@ -71,6 +71,7 @@ FC_LOG_LEVEL_INIT("ViewProviderPythonFeature",true,true) using namespace Gui; +namespace bp = boost::placeholders; // #0003564: Python objects: updateData calls to proxy instance that should have been deleted // See https://forum.freecadweb.org/viewtopic.php?f=22&t=30429&p=252429#p252429 @@ -274,11 +275,11 @@ void ViewProviderPythonFeatureObserver::slotDeleteObject(const Gui::ViewProvider ViewProviderPythonFeatureObserver::ViewProviderPythonFeatureObserver() { Gui::Application::Instance->signalDeletedObject.connect(boost::bind - (&ViewProviderPythonFeatureObserver::slotDeleteObject, this, _1)); + (&ViewProviderPythonFeatureObserver::slotDeleteObject, this, bp::_1)); Gui::Application::Instance->signalNewObject.connect(boost::bind - (&ViewProviderPythonFeatureObserver::slotAppendObject, this, _1)); + (&ViewProviderPythonFeatureObserver::slotAppendObject, this, bp::_1)); Gui::Application::Instance->signalDeleteDocument.connect(boost::bind - (&ViewProviderPythonFeatureObserver::slotDeleteDocument, this, _1)); + (&ViewProviderPythonFeatureObserver::slotDeleteDocument, this, bp::_1)); } ViewProviderPythonFeatureObserver::~ViewProviderPythonFeatureObserver() diff --git a/src/Gui/ViewProviderTextDocument.cpp b/src/Gui/ViewProviderTextDocument.cpp index 989f82882c..db592a5372 100644 --- a/src/Gui/ViewProviderTextDocument.cpp +++ b/src/Gui/ViewProviderTextDocument.cpp @@ -26,7 +26,7 @@ #ifndef _PreComp_ # include # include -# include +# include #endif #include diff --git a/src/Mod/Assembly/App/opendcm/core/imp/clustergraph_imp.hpp b/src/Mod/Assembly/App/opendcm/core/imp/clustergraph_imp.hpp index 6cf0e0b369..a785a39a63 100644 --- a/src/Mod/Assembly/App/opendcm/core/imp/clustergraph_imp.hpp +++ b/src/Mod/Assembly/App/opendcm/core/imp/clustergraph_imp.hpp @@ -27,7 +27,9 @@ #include #include -#include +#include + +namespace bp = boost::placeholders; namespace dcm { @@ -686,7 +688,7 @@ void ClusterGraph::downstreamRemo re.push_back(* (it.first)); }; - std::for_each(re.begin(), re.end(), boost::bind(&ClusterGraph::simpleRemoveEdge, this, _1)); + std::for_each(re.begin(), re.end(), boost::bind(&ClusterGraph::simpleRemoveEdge, this, bp::_1)); //if we have the real vertex here and not only a containing cluster we can delete it if(!isCluster(res.first)) { @@ -751,7 +753,7 @@ template void ClusterGraph::removeEdge(LocalEdge id, Functor& f) { std::vector& vec = fusion::at_c<1> ((*this) [id]); - std::for_each(vec.begin(), vec.end(), boost::bind (boost::ref(apply_remove_prediacte (f, -1)), _1)); + std::for_each(vec.begin(), vec.end(), boost::bind (boost::ref(apply_remove_prediacte (f, -1)), bp::_1)); boost::remove_edge(id, *this); }; diff --git a/src/Mod/Assembly/App/opendcm/module3d/imp/module_imp.hpp b/src/Mod/Assembly/App/opendcm/module3d/imp/module_imp.hpp index 983b3ab090..ac93f0a884 100644 --- a/src/Mod/Assembly/App/opendcm/module3d/imp/module_imp.hpp +++ b/src/Mod/Assembly/App/opendcm/module3d/imp/module_imp.hpp @@ -22,10 +22,11 @@ #include "../module.hpp" -#include +#include #include "constraint3d_imp.hpp" #include "geometry3d_imp.hpp" +namespace bp = boost::placeholders; namespace dcm { @@ -112,7 +113,7 @@ void Module3D::type::inheriter_base::removeGeometry3D(Geom g) g->template emitSignal(g); //remove the vertex from graph and emit all edges that get removed with the functor - boost::function functor = boost::bind(&inheriter_base::apply_edge_remove, this, _1); + boost::function functor = boost::bind(&inheriter_base::apply_edge_remove, this, bp::_1); m_this->m_cluster->removeVertex(v, functor); m_this->erase(g); }; diff --git a/src/Mod/Assembly/App/opendcm/moduleShape3d/generator.hpp b/src/Mod/Assembly/App/opendcm/moduleShape3d/generator.hpp index 38eb3b8d31..100bce8f89 100644 --- a/src/Mod/Assembly/App/opendcm/moduleShape3d/generator.hpp +++ b/src/Mod/Assembly/App/opendcm/moduleShape3d/generator.hpp @@ -28,7 +28,8 @@ #include "defines.hpp" #include -#include +#include +namespace bp = boost::placeholders; namespace dcm { @@ -159,7 +160,7 @@ struct segment3D { base::append(g1); g1->template linkTo(base::m_shape,0); g1->template setProperty(line); - g1->template connectSignal(boost::bind(&base::Shape3D::recalc, base::m_shape, _1)); + g1->template connectSignal(boost::bind(&base::Shape3D::recalc, base::m_shape, bp::_1)); //we have a segment, lets link the two points to it boost::shared_ptr g2 = base::m_system->createGeometry3D(); @@ -205,7 +206,7 @@ struct segment3D { base::append(g3); g3->template linkTo(base::m_shape,0); g3->template setProperty(line); - g3->template connectSignal(boost::bind(&base::Shape3D::recalc, base::m_shape, _1)); + g3->template connectSignal(boost::bind(&base::Shape3D::recalc, base::m_shape, bp::_1)); //link the points to our new segment g1->template linkTo(base::m_shape, 0); diff --git a/src/Mod/Assembly/Gui/TaskAssemblyConstraints.cpp b/src/Mod/Assembly/Gui/TaskAssemblyConstraints.cpp index 38f575c947..41648451c0 100644 --- a/src/Mod/Assembly/Gui/TaskAssemblyConstraints.cpp +++ b/src/Mod/Assembly/Gui/TaskAssemblyConstraints.cpp @@ -42,7 +42,6 @@ #include #include #include -#include using namespace AssemblyGui; using namespace Gui::TaskView; diff --git a/src/Mod/Assembly/Gui/Workbench.cpp b/src/Mod/Assembly/Gui/Workbench.cpp index b93dc6f6d4..c751ae1ebe 100644 --- a/src/Mod/Assembly/Gui/Workbench.cpp +++ b/src/Mod/Assembly/Gui/Workbench.cpp @@ -25,7 +25,7 @@ #ifndef _PreComp_ # include -# include +# include #endif @@ -39,7 +39,7 @@ #include "Workbench.h" using namespace AssemblyGui; - +namespace bp = boost::placeholders; @@ -202,10 +202,10 @@ void Workbench::activated() //} // Let us be notified when a document is activated, so that we can update the ActivePartObject - Gui::Application::Instance->signalActiveDocument.connect(boost::bind(&Workbench::slotActiveDocument, this, _1)); - App::GetApplication().signalNewDocument.connect(boost::bind(&Workbench::slotNewDocument, this, _1)); - App::GetApplication().signalFinishRestoreDocument.connect(boost::bind(&Workbench::slotFinishRestoreDocument, this, _1)); - App::GetApplication().signalDeleteDocument.connect(boost::bind(&Workbench::slotDeleteDocument, this, _1)); + Gui::Application::Instance->signalActiveDocument.connect(boost::bind(&Workbench::slotActiveDocument, this, bp::_1)); + App::GetApplication().signalNewDocument.connect(boost::bind(&Workbench::slotNewDocument, this, bp::_1)); + App::GetApplication().signalFinishRestoreDocument.connect(boost::bind(&Workbench::slotFinishRestoreDocument, this, bp::_1)); + App::GetApplication().signalDeleteDocument.connect(boost::bind(&Workbench::slotDeleteDocument, this, bp::_1)); Gui::Control().showModelView(); @@ -216,10 +216,10 @@ void Workbench::deactivated() Gui::Command::doCommand(Gui::Command::Doc,"AssemblyGui.setActiveAssembly(None)"); // Disconnect all document signals... - Gui::Application::Instance->signalActiveDocument.disconnect(boost::bind(&Workbench::slotActiveDocument, this, _1)); - App::GetApplication().signalNewDocument.disconnect(boost::bind(&Workbench::slotNewDocument, this, _1)); - App::GetApplication().signalFinishRestoreDocument.disconnect(boost::bind(&Workbench::slotFinishRestoreDocument, this, _1)); - App::GetApplication().signalDeleteDocument.disconnect(boost::bind(&Workbench::slotDeleteDocument, this, _1)); + Gui::Application::Instance->signalActiveDocument.disconnect(boost::bind(&Workbench::slotActiveDocument, this, bp::_1)); + App::GetApplication().signalNewDocument.disconnect(boost::bind(&Workbench::slotNewDocument, this, bp::_1)); + App::GetApplication().signalFinishRestoreDocument.disconnect(boost::bind(&Workbench::slotFinishRestoreDocument, this, bp::_1)); + App::GetApplication().signalDeleteDocument.disconnect(boost::bind(&Workbench::slotDeleteDocument, this, bp::_1)); Gui::Workbench::deactivated(); removeTaskWatcher(); diff --git a/src/Mod/Drawing/Gui/TaskOrthoViews.cpp b/src/Mod/Drawing/Gui/TaskOrthoViews.cpp index 3b5776c0a7..9859f16ab9 100644 --- a/src/Mod/Drawing/Gui/TaskOrthoViews.cpp +++ b/src/Mod/Drawing/Gui/TaskOrthoViews.cpp @@ -37,12 +37,13 @@ #include #include -#include +#include using namespace Gui; using namespace DrawingGui; using namespace std; +namespace bp = boost::placeholders; #ifndef PI @@ -304,9 +305,9 @@ OrthoViews::OrthoViews(App::Document* doc, const char * pagename, const char * p num_gaps_x = num_gaps_y = 0; this->connectDocumentDeletedObject = doc->signalDeletedObject.connect(boost::bind - (&OrthoViews::slotDeletedObject, this, _1)); + (&OrthoViews::slotDeletedObject, this, bp::_1)); this->connectApplicationDeletedDocument = App::GetApplication().signalDeleteDocument.connect(boost::bind - (&OrthoViews::slotDeletedDocument, this, _1)); + (&OrthoViews::slotDeletedDocument, this, bp::_1)); } OrthoViews::~OrthoViews() diff --git a/src/Mod/Fem/Gui/PreCompiled.h b/src/Mod/Fem/Gui/PreCompiled.h index 077b4b357d..c683bfb3e7 100644 --- a/src/Mod/Fem/Gui/PreCompiled.h +++ b/src/Mod/Fem/Gui/PreCompiled.h @@ -69,7 +69,7 @@ #include // boost -#include +#include #include #ifdef FC_OS_WIN32 diff --git a/src/Mod/Fem/Gui/ViewProviderAnalysis.cpp b/src/Mod/Fem/Gui/ViewProviderAnalysis.cpp index d51b707750..cacaf49a55 100644 --- a/src/Mod/Fem/Gui/ViewProviderAnalysis.cpp +++ b/src/Mod/Fem/Gui/ViewProviderAnalysis.cpp @@ -25,7 +25,7 @@ #ifndef _PreComp_ # include -# include +# include # include # include #endif diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp index 7bded0611b..d507a22ca7 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp @@ -47,7 +47,7 @@ # include -# include +# include # include #endif @@ -69,12 +69,13 @@ #include "ui_SphereWidget.h" using namespace FemGui; +namespace bp = boost::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, _1, _2)); + m_connection = m_object->getDocument()->signalChangedObject.connect(boost::bind(&FunctionWidget::onObjectsChanged, this, bp::_1, bp::_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 d4adbcebe6..1319f875d5 100644 --- a/src/Mod/Inspection/App/InspectionFeature.cpp +++ b/src/Mod/Inspection/App/InspectionFeature.cpp @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include @@ -59,6 +59,7 @@ using namespace Inspection; +namespace bp = boost::placeholders; InspectActualMesh::InspectActualMesh(const Mesh::MeshObject& rMesh) : _mesh(rMesh.getKernel()) { @@ -786,7 +787,7 @@ App::DocumentObjectExecReturn* Feature::execute(void) 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, _1)); + (index, boost::bind(&DistanceInspection::mapped, &check, bp::_1)); //future.waitForFinished(); // blocks the GUI Base::FutureWatcherProgress progress("Inspecting...", actual->countPoints()); QFutureWatcher watcher; diff --git a/src/Mod/Mesh/App/Core/Curvature.cpp b/src/Mod/Mesh/App/Core/Curvature.cpp index a517bd5edf..20d374a867 100644 --- a/src/Mod/Mesh/App/Core/Curvature.cpp +++ b/src/Mod/Mesh/App/Core/Curvature.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include //#define OPTIMIZE_CURVATURE #ifdef OPTIMIZE_CURVATURE @@ -48,6 +48,7 @@ #include using namespace MeshCore; +namespace bp = boost::placeholders; MeshCurvature::MeshCurvature(const MeshKernel& kernel) : myKernel(kernel), myMinPoints(20), myRadius(0.5f) @@ -79,7 +80,7 @@ void MeshCurvature::ComputePerFace(bool parallel) } else { QFuture future = QtConcurrent::mapped - (mySegment, boost::bind(&FacetCurvature::Compute, &face, _1)); + (mySegment, boost::bind(&FacetCurvature::Compute, &face, bp::_1)); QFutureWatcher watcher; watcher.setFuture(future); watcher.waitForFinished(); diff --git a/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp b/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp index 79a6e02041..1d1e984d1a 100644 --- a/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp +++ b/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp @@ -31,8 +31,6 @@ #include "ui_DlgEvaluateMesh.h" #include "DlgEvaluateSettings.h" -#include - #include #include #include diff --git a/src/Mod/Mesh/Gui/MeshEditor.cpp b/src/Mod/Mesh/Gui/MeshEditor.cpp index 30cc2295fb..26eb872a5d 100644 --- a/src/Mod/Mesh/Gui/MeshEditor.cpp +++ b/src/Mod/Mesh/Gui/MeshEditor.cpp @@ -45,7 +45,7 @@ # include # include # include -# include +# include #endif #include "MeshEditor.h" @@ -61,6 +61,7 @@ #include using namespace MeshGui; +namespace bp = boost::placeholders; PROPERTY_SOURCE(MeshGui::ViewProviderFace, Gui::ViewProviderDocumentObject) @@ -477,7 +478,7 @@ void MeshFillHole::startEditing(MeshGui::ViewProviderMesh* vp) viewer->addEventCallback(SoEvent::getClassTypeId(), MeshFillHole::fileHoleCallback, this); myConnection = App::GetApplication().signalChangedObject.connect( - boost::bind(&MeshFillHole::slotChangedObject, this, _1, _2)); + boost::bind(&MeshFillHole::slotChangedObject, this, bp::_1, bp::_2)); Gui::coinRemoveAllChildren(myBoundariesRoot); myBoundariesRoot->addChild(viewer->getHeadlight()); diff --git a/src/Mod/Mesh/Gui/ViewProvider.cpp b/src/Mod/Mesh/Gui/ViewProvider.cpp index 2ca8829ec7..311eeb6063 100644 --- a/src/Mod/Mesh/Gui/ViewProvider.cpp +++ b/src/Mod/Mesh/Gui/ViewProvider.cpp @@ -57,7 +57,7 @@ #include #include #include -#include +#include /// Here the FreeCAD includes sorted by Base,App,Gui...... #include @@ -100,7 +100,6 @@ #include #include #include -#include #include "ViewProvider.h" #include "SoFCIndexedFaceSet.h" @@ -108,6 +107,7 @@ using namespace MeshGui; +namespace bp = boost::placeholders; using Mesh::Feature; using MeshCore::MeshKernel; @@ -739,13 +739,13 @@ void ViewProviderMesh::setupContextMenu(QMenu* menu, QObject* receiver, const ch act->setCheckable(true); act->setChecked(pcMatBinding->value.getValue() == SoMaterialBinding::PER_FACE && highlightMode == "Component"); - func->toggle(act, boost::bind(&ViewProviderMesh::setHighlightedComponents, this, _1)); + func->toggle(act, boost::bind(&ViewProviderMesh::setHighlightedComponents, this, bp::_1)); QAction* seg = menu->addAction(QObject::tr("Display segments")); seg->setCheckable(true); seg->setChecked(pcMatBinding->value.getValue() == SoMaterialBinding::PER_FACE && highlightMode == "Segment"); - func->toggle(seg, boost::bind(&ViewProviderMesh::setHighlightedSegments, this, _1)); + func->toggle(seg, boost::bind(&ViewProviderMesh::setHighlightedSegments, this, bp::_1)); } bool ViewProviderMesh::setEdit(int ModNum) @@ -1383,7 +1383,7 @@ std::vector ViewProviderMesh::getVisibleFacets(const SbViewportRe Vertex v(kernel, grid, Base::convertTo(pos)); QFuture future = QtConcurrent::mapped - (points, boost::bind(&Vertex::visible, &v, _1)); + (points, boost::bind(&Vertex::visible, &v, bp::_1)); QFutureWatcher watcher; watcher.setFuture(future); watcher.waitForFinished(); diff --git a/src/Mod/MeshPart/Gui/CrossSections.cpp b/src/Mod/MeshPart/Gui/CrossSections.cpp index 9399cac146..bd23f4331d 100644 --- a/src/Mod/MeshPart/Gui/CrossSections.cpp +++ b/src/Mod/MeshPart/Gui/CrossSections.cpp @@ -36,7 +36,7 @@ # include # include # include -# include +# include # include # include # include @@ -63,6 +63,7 @@ #include using namespace MeshPartGui; +namespace bp = boost::placeholders; namespace MeshPartGui { class ViewProviderCrossSections : public Gui::ViewProvider @@ -274,7 +275,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, _1)); + (d, boost::bind(&MeshCrossSection::section, &cs, bp::_1)); future.waitForFinished(); TopoDS_Compound comp; diff --git a/src/Mod/Part/App/PartFeature.cpp b/src/Mod/Part/App/PartFeature.cpp index 85b5469e58..da61465961 100644 --- a/src/Mod/Part/App/PartFeature.cpp +++ b/src/Mod/Part/App/PartFeature.cpp @@ -53,7 +53,7 @@ #endif #include -#include +#include #include #include #include @@ -74,6 +74,7 @@ #include "TopoShapePy.h" using namespace Part; +namespace bp = boost::placeholders; FC_LOG_LEVEL_INIT("Part",true,true) @@ -222,11 +223,11 @@ struct ShapeCache { return; inited = true; App::GetApplication().signalDeleteDocument.connect( - boost::bind(&ShapeCache::slotDeleteDocument, this, _1)); + boost::bind(&ShapeCache::slotDeleteDocument, this, bp::_1)); App::GetApplication().signalDeletedObject.connect( - boost::bind(&ShapeCache::slotClear, this, _1)); + boost::bind(&ShapeCache::slotClear, this, bp::_1)); App::GetApplication().signalChangedObject.connect( - boost::bind(&ShapeCache::slotChanged, this, _1,_2)); + boost::bind(&ShapeCache::slotChanged, this, bp::_1,bp::_2)); } void slotDeleteDocument(const App::Document &doc) { diff --git a/src/Mod/Part/App/PreCompiled.h b/src/Mod/Part/App/PreCompiled.h index 1097bbb0da..19169f1141 100644 --- a/src/Mod/Part/App/PreCompiled.h +++ b/src/Mod/Part/App/PreCompiled.h @@ -77,7 +77,7 @@ // Boost #include -#include +#include #include #include diff --git a/src/Mod/Part/Gui/CrossSections.cpp b/src/Mod/Part/Gui/CrossSections.cpp index b28d86995c..b4fff085f5 100644 --- a/src/Mod/Part/Gui/CrossSections.cpp +++ b/src/Mod/Part/Gui/CrossSections.cpp @@ -36,7 +36,7 @@ # include # include # include -# include +# include # include # include # include @@ -61,6 +61,7 @@ #include using namespace PartGui; +namespace bp = boost::placeholders; #undef CS_FUTURE // multi-threading causes some problems namespace PartGui { @@ -218,7 +219,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, _1)); + (d, boost::bind(&Part::CrossSection::section, &cs, bp::_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 9df2d38994..edd3cd06b8 100644 --- a/src/Mod/Part/Gui/DlgBooleanOperation.cpp +++ b/src/Mod/Part/Gui/DlgBooleanOperation.cpp @@ -27,7 +27,7 @@ # include # include # include -# include +# include #endif #include "DlgBooleanOperation.h" @@ -47,6 +47,7 @@ #include using namespace PartGui; +namespace bp = boost::placeholders; namespace PartGui { class BooleanOperationItem : public QTreeWidgetItem @@ -89,9 +90,9 @@ DlgBooleanOperation::DlgBooleanOperation(QWidget* parent) connect(ui->secondShape, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), this, SLOT(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*))); this->connectNewObject = App::GetApplication().signalNewObject.connect(boost::bind - (&DlgBooleanOperation::slotCreatedObject, this, _1)); + (&DlgBooleanOperation::slotCreatedObject, this, bp::_1)); this->connectModObject = App::GetApplication().signalChangedObject.connect(boost::bind - (&DlgBooleanOperation::slotChangedObject, this, _1, _2)); + (&DlgBooleanOperation::slotChangedObject, this, bp::_1, bp::_2)); findShapes(); } diff --git a/src/Mod/Part/Gui/DlgFilletEdges.cpp b/src/Mod/Part/Gui/DlgFilletEdges.cpp index 766d798d18..3749cbcdec 100644 --- a/src/Mod/Part/Gui/DlgFilletEdges.cpp +++ b/src/Mod/Part/Gui/DlgFilletEdges.cpp @@ -43,7 +43,7 @@ # include # include # include -# include +# include # include # include # include @@ -75,6 +75,7 @@ #include using namespace PartGui; +namespace bp = boost::placeholders; FilletRadiusDelegate::FilletRadiusDelegate(QObject *parent) : QItemDelegate(parent) { @@ -245,9 +246,9 @@ DlgFilletEdges::DlgFilletEdges(FilletType type, Part::FilletBase* fillet, QWidge d->fillet = fillet; d->connectApplicationDeletedObject = App::GetApplication().signalDeletedObject - .connect(boost::bind(&DlgFilletEdges::onDeleteObject, this, _1)); + .connect(boost::bind(&DlgFilletEdges::onDeleteObject, this, bp::_1)); d->connectApplicationDeletedDocument = App::GetApplication().signalDeleteDocument - .connect(boost::bind(&DlgFilletEdges::onDeleteDocument, this, _1)); + .connect(boost::bind(&DlgFilletEdges::onDeleteDocument, this, bp::_1)); // set tree view with three columns QStandardItemModel* model = new FilletRadiusModel(this); connect(model, SIGNAL(toggleCheckState(const QModelIndex&)), diff --git a/src/Mod/Part/Gui/Mirroring.cpp b/src/Mod/Part/Gui/Mirroring.cpp index 535507cbf9..94beb847b2 100644 --- a/src/Mod/Part/Gui/Mirroring.cpp +++ b/src/Mod/Part/Gui/Mirroring.cpp @@ -28,7 +28,6 @@ # include # include # include -# include # include # include # include diff --git a/src/Mod/Part/Gui/PreCompiled.h b/src/Mod/Part/Gui/PreCompiled.h index ab8630aa2f..aae042adb1 100644 --- a/src/Mod/Part/Gui/PreCompiled.h +++ b/src/Mod/Part/Gui/PreCompiled.h @@ -176,7 +176,7 @@ // Boost #include -#include +#include // Qt Toolkit #ifndef __Qt4All__ diff --git a/src/Mod/Part/Gui/TaskAttacher.cpp b/src/Mod/Part/Gui/TaskAttacher.cpp index 3e06235eca..256c68f4df 100644 --- a/src/Mod/Part/Gui/TaskAttacher.cpp +++ b/src/Mod/Part/Gui/TaskAttacher.cpp @@ -31,7 +31,7 @@ # include # include # include -# include +# include #endif #include @@ -62,6 +62,7 @@ using namespace PartGui; using namespace Gui; using namespace Attacher; +namespace bp = boost::placeholders; /* TRANSLATOR PartDesignGui::TaskAttacher */ @@ -217,8 +218,8 @@ TaskAttacher::TaskAttacher(Gui::ViewProviderDocumentObject *ViewProvider, QWidge updatePreview(); // connect object deletion with slot - auto bnd1 = boost::bind(&TaskAttacher::objectDeleted, this, _1); - auto bnd2 = boost::bind(&TaskAttacher::documentDeleted, this, _1); + auto bnd1 = boost::bind(&TaskAttacher::objectDeleted, this, bp::_1); + auto bnd2 = boost::bind(&TaskAttacher::documentDeleted, this, bp::_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 33fb96f02d..28852f4043 100644 --- a/src/Mod/Part/Gui/TaskDimension.cpp +++ b/src/Mod/Part/Gui/TaskDimension.cpp @@ -27,7 +27,7 @@ # include # include # include -# include +# include # include # include @@ -79,6 +79,8 @@ #include "TaskDimension.h" +namespace bp = boost::placeholders; + static bool _MeasureInfoInited; static void slotDeleteDocument(const App::Document &doc); @@ -92,7 +94,7 @@ struct MeasureInfo { { if(!_MeasureInfoInited) { _MeasureInfoInited = true; - App::GetApplication().signalDeleteDocument.connect(boost::bind(slotDeleteDocument, _1)); + App::GetApplication().signalDeleteDocument.connect(boost::bind(slotDeleteDocument, bp::_1)); } } }; diff --git a/src/Mod/Part/Gui/TaskFaceColors.cpp b/src/Mod/Part/Gui/TaskFaceColors.cpp index 5629beab81..1549e3ba22 100644 --- a/src/Mod/Part/Gui/TaskFaceColors.cpp +++ b/src/Mod/Part/Gui/TaskFaceColors.cpp @@ -44,7 +44,7 @@ # include # include # include -# include +# include #endif #include "ui_TaskFaceColors.h" @@ -68,6 +68,7 @@ using namespace PartGui; +namespace bp = boost::placeholders; namespace PartGui { class FaceSelection : public Gui::SelectionFilterGate @@ -274,11 +275,11 @@ FaceColors::FaceColors(ViewProviderPartExt* vp, QWidget* parent) Gui::Selection().addSelectionGate(gate); d->connectDelDoc = Gui::Application::Instance->signalDeleteDocument.connect(boost::bind - (&FaceColors::slotDeleteDocument, this, _1)); + (&FaceColors::slotDeleteDocument, this, bp::_1)); d->connectDelObj = Gui::Application::Instance->signalDeletedObject.connect(boost::bind - (&FaceColors::slotDeleteObject, this, _1)); + (&FaceColors::slotDeleteObject, this, bp::_1)); d->connectUndoDoc = d->doc->signalUndoDocument.connect(boost::bind - (&FaceColors::slotUndoDocument, this, _1)); + (&FaceColors::slotUndoDocument, this, bp::_1)); } FaceColors::~FaceColors() diff --git a/src/Mod/Part/Gui/ViewProviderSpline.cpp b/src/Mod/Part/Gui/ViewProviderSpline.cpp index 916af374ad..8e1373a78e 100644 --- a/src/Mod/Part/Gui/ViewProviderSpline.cpp +++ b/src/Mod/Part/Gui/ViewProviderSpline.cpp @@ -45,7 +45,7 @@ # include # include # include -# include +# include #endif #include @@ -56,6 +56,7 @@ using namespace PartGui; +namespace bp = boost::placeholders; PROPERTY_SOURCE(PartGui::ViewProviderSpline, PartGui::ViewProviderPartExt) @@ -79,7 +80,7 @@ void ViewProviderSpline::setupContextMenu(QMenu* menu, QObject* receiver, const QAction* act = menu->addAction(QObject::tr("Show control points")); act->setCheckable(true); act->setChecked(ControlPoints.getValue()); - func->toggle(act, boost::bind(&ViewProviderSpline::toggleControlPoints, this, _1)); + func->toggle(act, boost::bind(&ViewProviderSpline::toggleControlPoints, this, bp::_1)); } void ViewProviderSpline::toggleControlPoints(bool on) diff --git a/src/Mod/PartDesign/App/Body.cpp b/src/Mod/PartDesign/App/Body.cpp index 448f558546..d29e5b90d6 100644 --- a/src/Mod/PartDesign/App/Body.cpp +++ b/src/Mod/PartDesign/App/Body.cpp @@ -24,7 +24,6 @@ #include "PreCompiled.h" #ifndef _PreComp_ -#include #endif #include diff --git a/src/Mod/PartDesign/App/ShapeBinder.cpp b/src/Mod/PartDesign/App/ShapeBinder.cpp index 1fec0b1c89..8c925a860a 100644 --- a/src/Mod/PartDesign/App/ShapeBinder.cpp +++ b/src/Mod/PartDesign/App/ShapeBinder.cpp @@ -24,7 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ # include -# include +# include # include # include # include @@ -51,6 +51,7 @@ FC_LOG_LEVEL_INIT("PartDesign",true,true) #endif using namespace PartDesign; +namespace bp = boost::placeholders; // ============================================================================ @@ -229,7 +230,7 @@ void ShapeBinder::onSettingDocument() App::Document* document = getDocument(); if (document) { this->connectDocumentChangedObject = document->signalChangedObject.connect(boost::bind - (&ShapeBinder::slotChangedObject, this, _1, _2)); + (&ShapeBinder::slotChangedObject, this, bp::_1, bp::_2)); } } @@ -608,7 +609,7 @@ void SubShapeBinder::onChanged(const App::Property *prop) { { contextDoc = Context.getValue()->getDocument(); connRecomputedObj = contextDoc->signalRecomputedObject.connect( - boost::bind(&SubShapeBinder::slotRecomputedObject, this, _1)); + boost::bind(&SubShapeBinder::slotRecomputedObject, this, bp::_1)); } }else if(!isRestoring()) { if(prop == &Support) { diff --git a/src/Mod/PartDesign/Gui/PreCompiled.h b/src/Mod/PartDesign/Gui/PreCompiled.h index 9604a6a95a..65a4997693 100644 --- a/src/Mod/PartDesign/Gui/PreCompiled.h +++ b/src/Mod/PartDesign/Gui/PreCompiled.h @@ -62,7 +62,7 @@ #include // Boost -#include +#include // OCC #include diff --git a/src/Mod/PartDesign/Gui/TaskDatumParameters.cpp b/src/Mod/PartDesign/Gui/TaskDatumParameters.cpp index aa8c4868cc..f127a03252 100644 --- a/src/Mod/PartDesign/Gui/TaskDatumParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskDatumParameters.cpp @@ -31,7 +31,6 @@ # include # include # include -# include #endif #include diff --git a/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp b/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp index 4a41cf28b6..ed68b24aff 100644 --- a/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp @@ -25,7 +25,7 @@ #ifndef _PreComp_ # include -# include +# include #endif #include "ui_TaskHoleParameters.h" @@ -43,6 +43,7 @@ using namespace PartDesignGui; using namespace Gui; +namespace bp = boost::placeholders; /* TRANSLATOR PartDesignGui::TaskHoleParameters */ @@ -118,7 +119,7 @@ TaskHoleParameters::TaskHoleParameters(ViewProviderHole *HoleView, QWidget *pare ui->TaperedAngle->bind(pcHole->TaperedAngle); connectPropChanged = App::GetApplication().signalChangePropertyEditor.connect( - boost::bind(&TaskHoleParameters::changedObject, this, _1, _2)); + boost::bind(&TaskHoleParameters::changedObject, this, bp::_1, bp::_2)); this->groupLayout()->addWidget(proxy); } diff --git a/src/Mod/PartDesign/Gui/TaskHoleParameters.h b/src/Mod/PartDesign/Gui/TaskHoleParameters.h index 447197c2b9..62d062f342 100644 --- a/src/Mod/PartDesign/Gui/TaskHoleParameters.h +++ b/src/Mod/PartDesign/Gui/TaskHoleParameters.h @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include "TaskSketchBasedParameters.h" #include "ViewProviderHole.h" diff --git a/src/Mod/PartDesign/Gui/TaskPrimitiveParameters.cpp b/src/Mod/PartDesign/Gui/TaskPrimitiveParameters.cpp index 65a08a489a..671d0a76c5 100644 --- a/src/Mod/PartDesign/Gui/TaskPrimitiveParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskPrimitiveParameters.cpp @@ -29,8 +29,6 @@ # include # include # include -# include -# include #endif #include "TaskPrimitiveParameters.h" diff --git a/src/Mod/PartDesign/Gui/TaskTransformedMessages.cpp b/src/Mod/PartDesign/Gui/TaskTransformedMessages.cpp index 7eb917bfd9..de2f6587e0 100644 --- a/src/Mod/PartDesign/Gui/TaskTransformedMessages.cpp +++ b/src/Mod/PartDesign/Gui/TaskTransformedMessages.cpp @@ -24,7 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +# include #endif #include "ui_TaskTransformedMessages.h" @@ -37,6 +37,7 @@ using namespace PartDesignGui; using namespace Gui::TaskView; +namespace bp = boost::placeholders; TaskTransformedMessages::TaskTransformedMessages(ViewProviderTransformed *transformedView_) : TaskBox(Gui::BitmapFactory().pixmap("document-new"),tr("Transformed feature messages"),true, 0), @@ -54,7 +55,7 @@ TaskTransformedMessages::TaskTransformedMessages(ViewProviderTransformed *transf this->groupLayout()->addWidget(proxy); ui->labelTransformationStatus->setText(transformedView->getMessage()); - connectionDiagnosis = transformedView->signalDiagnosis.connect(boost::bind(&PartDesignGui::TaskTransformedMessages::slotDiagnosis, this,_1)); + connectionDiagnosis = transformedView->signalDiagnosis.connect(boost::bind(&PartDesignGui::TaskTransformedMessages::slotDiagnosis, this, bp::_1)); } TaskTransformedMessages::~TaskTransformedMessages() diff --git a/src/Mod/PartDesign/Gui/ViewProviderBody.cpp b/src/Mod/PartDesign/Gui/ViewProviderBody.cpp index 92dd603ed7..96618725b7 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderBody.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderBody.cpp @@ -24,7 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +# include # include # include # include @@ -60,6 +60,7 @@ #include using namespace PartDesignGui; +namespace bp = boost::placeholders; const char* PartDesignGui::ViewProviderBody::BodyModeEnum[] = {"Through","Tip",NULL}; @@ -96,10 +97,10 @@ void ViewProviderBody::attach(App::DocumentObject *pcFeat) assert ( gdoc ); connectChangedObjectApp = adoc->signalChangedObject.connect ( - boost::bind ( &ViewProviderBody::slotChangedObjectApp, this, _1, _2) ); + boost::bind ( &ViewProviderBody::slotChangedObjectApp, this, bp::_1, bp::_2) ); connectChangedObjectGui = gdoc->signalChangedObject.connect ( - boost::bind ( &ViewProviderBody::slotChangedObjectGui, this, _1, _2) ); + boost::bind ( &ViewProviderBody::slotChangedObjectGui, this, bp::_1, bp::_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 b8489d36fe..b65243eb64 100644 --- a/src/Mod/PartDesign/Gui/Workbench.cpp +++ b/src/Mod/PartDesign/Gui/Workbench.cpp @@ -24,7 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +# include # include #endif @@ -46,6 +46,7 @@ #include "WorkflowManager.h" using namespace PartDesignGui; +namespace bp = boost::placeholders; #if 0 // needed for Qt's lupdate utility qApp->translate("Workbench", "Part Design"); @@ -433,22 +434,22 @@ void Workbench::activated() Gui::Control().showTaskView(); // Let us be notified when a document is activated, so that we can update the ActivePartObject - Gui::Application::Instance->signalActiveDocument.connect(boost::bind(&Workbench::slotActiveDocument, this, _1)); - App::GetApplication().signalNewDocument.connect(boost::bind(&Workbench::slotNewDocument, this, _1)); - App::GetApplication().signalFinishRestoreDocument.connect(boost::bind(&Workbench::slotFinishRestoreDocument, this, _1)); - App::GetApplication().signalDeleteDocument.connect(boost::bind(&Workbench::slotDeleteDocument, this, _1)); + Gui::Application::Instance->signalActiveDocument.connect(boost::bind(&Workbench::slotActiveDocument, this, bp::_1)); + App::GetApplication().signalNewDocument.connect(boost::bind(&Workbench::slotNewDocument, this, bp::_1)); + App::GetApplication().signalFinishRestoreDocument.connect(boost::bind(&Workbench::slotFinishRestoreDocument, this, bp::_1)); + App::GetApplication().signalDeleteDocument.connect(boost::bind(&Workbench::slotDeleteDocument, this, bp::_1)); // Watch out for objects being added to the active document, so that we can add them to the body - //App::GetApplication().signalNewObject.connect(boost::bind(&Workbench::slotNewObject, this, _1)); + //App::GetApplication().signalNewObject.connect(boost::bind(&Workbench::slotNewObject, this, bp::_1)); } void Workbench::deactivated() { // Let us be notified when a document is activated, so that we can update the ActivePartObject - Gui::Application::Instance->signalActiveDocument.disconnect(boost::bind(&Workbench::slotActiveDocument, this, _1)); - App::GetApplication().signalNewDocument.disconnect(boost::bind(&Workbench::slotNewDocument, this, _1)); - App::GetApplication().signalFinishRestoreDocument.disconnect(boost::bind(&Workbench::slotFinishRestoreDocument, this, _1)); - App::GetApplication().signalDeleteDocument.disconnect(boost::bind(&Workbench::slotDeleteDocument, this, _1)); - //App::GetApplication().signalNewObject.disconnect(boost::bind(&Workbench::slotNewObject, this, _1)); + Gui::Application::Instance->signalActiveDocument.disconnect(boost::bind(&Workbench::slotActiveDocument, this, bp::_1)); + App::GetApplication().signalNewDocument.disconnect(boost::bind(&Workbench::slotNewDocument, this, bp::_1)); + App::GetApplication().signalFinishRestoreDocument.disconnect(boost::bind(&Workbench::slotFinishRestoreDocument, this, bp::_1)); + App::GetApplication().signalDeleteDocument.disconnect(boost::bind(&Workbench::slotDeleteDocument, this, bp::_1)); + //App::GetApplication().signalNewObject.disconnect(boost::bind(&Workbench::slotNewObject, this, bp::_1)); removeTaskWatcher(); // reset the active Body diff --git a/src/Mod/PartDesign/Gui/WorkflowManager.cpp b/src/Mod/PartDesign/Gui/WorkflowManager.cpp index b769510858..47bff55e68 100644 --- a/src/Mod/PartDesign/Gui/WorkflowManager.cpp +++ b/src/Mod/PartDesign/Gui/WorkflowManager.cpp @@ -26,7 +26,7 @@ # include # include # include -# include +# include # include # include #endif @@ -43,6 +43,7 @@ using namespace PartDesignGui; +namespace bp = boost::placeholders; WorkflowManager * WorkflowManager::_instance = nullptr; @@ -55,11 +56,11 @@ WorkflowManager::WorkflowManager() { } connectNewDocument = App::GetApplication().signalNewDocument.connect( - boost::bind( &WorkflowManager::slotNewDocument, this, _1 ) ); + boost::bind( &WorkflowManager::slotNewDocument, this, bp::_1 ) ); connectFinishRestoreDocument = App::GetApplication().signalFinishRestoreDocument.connect( - boost::bind( &WorkflowManager::slotFinishRestoreDocument, this, _1 ) ); + boost::bind( &WorkflowManager::slotFinishRestoreDocument, this, bp::_1 ) ); connectDeleteDocument = App::GetApplication().signalDeleteDocument.connect( - boost::bind( &WorkflowManager::slotDeleteDocument, this, _1 ) ); + boost::bind( &WorkflowManager::slotDeleteDocument, this, bp::_1 ) ); } WorkflowManager::~WorkflowManager() { diff --git a/src/Mod/Path/App/Area.cpp b/src/Mod/Path/App/Area.cpp index 8101ef21b0..436a5f044c 100644 --- a/src/Mod/Path/App/Area.cpp +++ b/src/Mod/Path/App/Area.cpp @@ -21,6 +21,9 @@ ****************************************************************************/ #include "PreCompiled.h" +// From Boost 1.75 on the geometry component requires C++14 +#define BOOST_GEOMETRY_DISABLE_DEPRECATED_03_WARNING + #ifndef _PreComp_ # include # include diff --git a/src/Mod/Path/libarea/PythonStuff.cpp b/src/Mod/Path/libarea/PythonStuff.cpp index f9fb200376..7f58e8eead 100644 --- a/src/Mod/Path/libarea/PythonStuff.cpp +++ b/src/Mod/Path/libarea/PythonStuff.cpp @@ -30,8 +30,10 @@ #pragma implementation #endif -#include -#include +#define BOOST_BIND_GLOBAL_PLACEHOLDERS + +//#include +//#include #include #include #include diff --git a/src/Mod/ReverseEngineering/App/ApproxSurface.cpp b/src/Mod/ReverseEngineering/App/ApproxSurface.cpp index f8654163a2..7173b334fd 100644 --- a/src/Mod/ReverseEngineering/App/ApproxSurface.cpp +++ b/src/Mod/ReverseEngineering/App/ApproxSurface.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include @@ -40,6 +40,7 @@ #include "ApproxSurface.h" using namespace Reen; +namespace bp = boost::placeholders; // SplineBasisfunction @@ -1090,7 +1091,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, _1)); + (columns, boost::bind(&ScalarProduct::multiply, &scalar, bp::_1)); QFutureWatcher< std::vector > watcher; watcher.setFuture(future); watcher.waitForFinished(); diff --git a/src/Mod/Sandbox/App/DocumentProtector.h b/src/Mod/Sandbox/App/DocumentProtector.h index 603b92932a..f44aebdb52 100644 --- a/src/Mod/Sandbox/App/DocumentProtector.h +++ b/src/Mod/Sandbox/App/DocumentProtector.h @@ -25,7 +25,6 @@ #define SANDBOX_DOCUMENTPROTECTOR_H #include -#include #include namespace App { diff --git a/src/Mod/Sandbox/Gui/Command.cpp b/src/Mod/Sandbox/Gui/Command.cpp index 67db11a1e3..81158c70b2 100644 --- a/src/Mod/Sandbox/Gui/Command.cpp +++ b/src/Mod/Sandbox/Gui/Command.cpp @@ -56,7 +56,7 @@ # if BOOST_VERSION >= 104100 # include # endif -# include +# include # include #endif @@ -81,6 +81,8 @@ #include "GLGraphicsView.h" #include "TaskPanelView.h" +namespace bp = boost::placeholders; + DEF_STD_CMD(CmdSandboxDocumentThread); CmdSandboxDocumentThread::CmdSandboxDocumentThread() @@ -829,7 +831,7 @@ void CmdSandboxMeshTestJob::activated(int) Base::Console().Message("Mesh test (step %d)...\n",iteration++); MeshTestJob meshJob; QFuture mesh_future = QtConcurrent::mapped - (mesh_groups, boost::bind(&MeshTestJob::run, &meshJob, _1)); + (mesh_groups, boost::bind(&MeshTestJob::run, &meshJob, bp::_1)); // keep it responsive during computation QFutureWatcher mesh_watcher; diff --git a/src/Mod/Sandbox/Gui/TaskPanelView.cpp b/src/Mod/Sandbox/Gui/TaskPanelView.cpp index 92f709608d..ad2e78b1ad 100644 --- a/src/Mod/Sandbox/Gui/TaskPanelView.cpp +++ b/src/Mod/Sandbox/Gui/TaskPanelView.cpp @@ -25,7 +25,7 @@ /// Here the FreeCAD includes sorted by Base,App,Gui...... -#include +#include #include #include #include @@ -55,6 +55,7 @@ using namespace SandboxGui; +namespace bp = boost::placeholders; #if defined(QSINT_ACTIONPANEL) @@ -557,27 +558,27 @@ TaskPanelView::TaskPanelView(QWidget *parent) QAction* defaultAction = new QAction(this); connect(ui->rbDefaultScheme, SIGNAL(toggled(bool)), defaultAction, SIGNAL(toggled(bool))); - func->toggle(defaultAction, boost::bind(&TaskPanelView::on_rbDefaultScheme_toggled, this, _1)); + func->toggle(defaultAction, boost::bind(&TaskPanelView::on_rbDefaultScheme_toggled, this, bp::_1)); QAction* xpBlueAction = new QAction(this); connect(ui->rbXPBlueScheme, SIGNAL(toggled(bool)), xpBlueAction, SIGNAL(toggled(bool))); - func->toggle(xpBlueAction, boost::bind(&TaskPanelView::on_rbXPBlueScheme_toggled, this, _1)); + func->toggle(xpBlueAction, boost::bind(&TaskPanelView::on_rbXPBlueScheme_toggled, this, bp::_1)); QAction* xpBlue2Action = new QAction(this); connect(ui->rbXPBlue2Scheme, SIGNAL(toggled(bool)), xpBlue2Action, SIGNAL(toggled(bool))); - func->toggle(xpBlue2Action, boost::bind(&TaskPanelView::on_rbXPBlue2Scheme_toggled, this, _1)); + func->toggle(xpBlue2Action, boost::bind(&TaskPanelView::on_rbXPBlue2Scheme_toggled, this, bp::_1)); QAction* vistaAction = new QAction(this); connect(ui->rbVistaScheme, SIGNAL(toggled(bool)), vistaAction, SIGNAL(toggled(bool))); - func->toggle(vistaAction, boost::bind(&TaskPanelView::on_rbVistaScheme_toggled, this, _1)); + func->toggle(vistaAction, boost::bind(&TaskPanelView::on_rbVistaScheme_toggled, this, bp::_1)); QAction* macAction = new QAction(this); connect(ui->rbMacScheme, SIGNAL(toggled(bool)), macAction, SIGNAL(toggled(bool))); - func->toggle(macAction, boost::bind(&TaskPanelView::on_rbMacScheme_toggled, this, _1)); + func->toggle(macAction, boost::bind(&TaskPanelView::on_rbMacScheme_toggled, this, bp::_1)); QAction* androidAction = new QAction(this); connect(ui->rbAndroidScheme, SIGNAL(toggled(bool)), androidAction, SIGNAL(toggled(bool))); - func->toggle(androidAction, boost::bind(&TaskPanelView::on_rbAndroidScheme_toggled, this, _1)); + func->toggle(androidAction, boost::bind(&TaskPanelView::on_rbAndroidScheme_toggled, this, bp::_1)); } #else setWindowTitle(QLatin1String("Task View")); diff --git a/src/Mod/Sketcher/App/PreCompiled.h b/src/Mod/Sketcher/App/PreCompiled.h index 4ead9d89c1..db682910cd 100644 --- a/src/Mod/Sketcher/App/PreCompiled.h +++ b/src/Mod/Sketcher/App/PreCompiled.h @@ -59,7 +59,7 @@ #include // Boost -#include +#include #include // Opencascade diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 8cab499cc8..64a5fae757 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -58,7 +58,7 @@ # include # include # include -# include +# include //# include #endif @@ -88,6 +88,7 @@ using namespace Sketcher; using namespace Base; +namespace bp = boost::placeholders; FC_LOG_LEVEL_INIT("Sketch",true,true) @@ -134,10 +135,10 @@ SketchObject::SketchObject() noRecomputes=false; - ExpressionEngine.setValidator(boost::bind(&Sketcher::SketchObject::validateExpression, this, _1, _2)); + ExpressionEngine.setValidator(boost::bind(&Sketcher::SketchObject::validateExpression, this, bp::_1, bp::_2)); - constraintsRemovedConn = Constraints.signalConstraintsRemoved.connect(boost::bind(&Sketcher::SketchObject::constraintsRemoved, this, _1)); - constraintsRenamedConn = Constraints.signalConstraintsRenamed.connect(boost::bind(&Sketcher::SketchObject::constraintsRenamed, this, _1)); + constraintsRemovedConn = Constraints.signalConstraintsRemoved.connect(boost::bind(&Sketcher::SketchObject::constraintsRemoved, this, bp::_1)); + constraintsRenamedConn = Constraints.signalConstraintsRenamed.connect(boost::bind(&Sketcher::SketchObject::constraintsRenamed, this, bp::_1)); analyser = new SketchAnalysis(this); } diff --git a/src/Mod/Sketcher/Gui/PreCompiled.h b/src/Mod/Sketcher/Gui/PreCompiled.h index 19de7b0c2e..d8ec53b102 100644 --- a/src/Mod/Sketcher/Gui/PreCompiled.h +++ b/src/Mod/Sketcher/Gui/PreCompiled.h @@ -67,7 +67,7 @@ // Boost #include -#include +#include #include #ifdef FC_OS_WIN32 diff --git a/src/Mod/Sketcher/Gui/TaskDlgEditSketch.cpp b/src/Mod/Sketcher/Gui/TaskDlgEditSketch.cpp index 06d0cb3c99..c61cbf241e 100644 --- a/src/Mod/Sketcher/Gui/TaskDlgEditSketch.cpp +++ b/src/Mod/Sketcher/Gui/TaskDlgEditSketch.cpp @@ -24,7 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +# include #endif #include "TaskDlgEditSketch.h" @@ -32,6 +32,7 @@ #include using namespace SketcherGui; +namespace bp = boost::placeholders; //************************************************************************** @@ -75,9 +76,9 @@ TaskDlgEditSketch::TaskDlgEditSketch(ViewProviderSketch *sketchView) App::Document* document = sketchView->getObject()->getDocument(); connectUndoDocument = - document->signalUndo.connect(boost::bind(&TaskDlgEditSketch::slotUndoDocument, this, _1)); + document->signalUndo.connect(boost::bind(&TaskDlgEditSketch::slotUndoDocument, this, bp::_1)); connectRedoDocument = - document->signalRedo.connect(boost::bind(&TaskDlgEditSketch::slotRedoDocument, this, _1)); + document->signalRedo.connect(boost::bind(&TaskDlgEditSketch::slotRedoDocument, this, bp::_1)); } TaskDlgEditSketch::~TaskDlgEditSketch() diff --git a/src/Mod/Sketcher/Gui/TaskSketcherConstrains.cpp b/src/Mod/Sketcher/Gui/TaskSketcherConstrains.cpp index f376e4ad2d..521d8be7ea 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherConstrains.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherConstrains.cpp @@ -33,7 +33,7 @@ # include # include # include -# include +# include #endif #include "TaskSketcherConstrains.h" diff --git a/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp b/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp index 1a43878cab..8833277958 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp @@ -31,7 +31,7 @@ # include # include # include -# include +# include #endif #include "TaskSketcherElements.h" diff --git a/src/Mod/Sketcher/Gui/TaskSketcherGeneral.cpp b/src/Mod/Sketcher/Gui/TaskSketcherGeneral.cpp index e8bf2a629d..771e6f795e 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherGeneral.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherGeneral.cpp @@ -24,7 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -#include +#include #endif #include "ui_TaskSketcherGeneral.h" @@ -43,6 +43,7 @@ using namespace SketcherGui; using namespace Gui::TaskView; +namespace bp = boost::placeholders; SketcherGeneralWidget::SketcherGeneralWidget(QWidget *parent) : QWidget(parent), ui(new Ui_TaskSketcherGeneral) @@ -250,7 +251,7 @@ TaskSketcherGeneral::TaskSketcherGeneral(ViewProviderSketch *sketchView) Gui::Application* app = Gui::Application::Instance; changedSketchView = app->signalChangedObject.connect(boost::bind - (&TaskSketcherGeneral::onChangedSketchView, this, _1, _2)); + (&TaskSketcherGeneral::onChangedSketchView, this, bp::_1, bp::_2)); } TaskSketcherGeneral::~TaskSketcherGeneral() diff --git a/src/Mod/Sketcher/Gui/TaskSketcherMessages.cpp b/src/Mod/Sketcher/Gui/TaskSketcherMessages.cpp index 6ef662acee..2aef84760e 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherMessages.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherMessages.cpp @@ -24,7 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +# include #endif #include "ui_TaskSketcherMessages.h" @@ -45,6 +45,7 @@ using namespace SketcherGui; using namespace Gui::TaskView; +namespace bp = boost::placeholders; TaskSketcherMessages::TaskSketcherMessages(ViewProviderSketch *sketchView) : TaskBox(Gui::BitmapFactory().pixmap("document-new"),tr("Solver messages"),true, 0) @@ -58,8 +59,8 @@ TaskSketcherMessages::TaskSketcherMessages(ViewProviderSketch *sketchView) this->groupLayout()->addWidget(proxy); - connectionSetUp = sketchView->signalSetUp.connect(boost::bind(&SketcherGui::TaskSketcherMessages::slotSetUp, this,_1)); - connectionSolved = sketchView->signalSolved.connect(boost::bind(&SketcherGui::TaskSketcherMessages::slotSolved, this,_1)); + connectionSetUp = sketchView->signalSetUp.connect(boost::bind(&SketcherGui::TaskSketcherMessages::slotSetUp, this, bp::_1)); + connectionSolved = sketchView->signalSolved.connect(boost::bind(&SketcherGui::TaskSketcherMessages::slotSolved, this, bp::_1)); ui->labelConstrainStatus->setOpenExternalLinks(false); diff --git a/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.cpp b/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.cpp index ef6a30c60c..cf6769a11a 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.cpp @@ -24,7 +24,6 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include # include #endif diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index 5ddc2052cb..dccd9f0f04 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -71,7 +71,7 @@ # include # include -# include +# include # include #endif @@ -138,6 +138,7 @@ FC_LOG_LEVEL_INIT("Sketch",true,true) using namespace SketcherGui; using namespace Sketcher; +namespace bp = boost::placeholders; SbColor ViewProviderSketch::VertexColor (1.0f,0.149f,0.0f); // #FF2600 -> (255, 38, 0) SbColor ViewProviderSketch::CurveColor (1.0f,1.0f,1.0f); // #FFFFFF -> (255,255,255) @@ -5775,9 +5776,9 @@ bool ViewProviderSketch::setEdit(int ModNum) draw(false,true); connectUndoDocument = getDocument() - ->signalUndoDocument.connect(boost::bind(&ViewProviderSketch::slotUndoDocument, this, _1)); + ->signalUndoDocument.connect(boost::bind(&ViewProviderSketch::slotUndoDocument, this, bp::_1)); connectRedoDocument = getDocument() - ->signalRedoDocument.connect(boost::bind(&ViewProviderSketch::slotRedoDocument, this, _1)); + ->signalRedoDocument.connect(boost::bind(&ViewProviderSketch::slotRedoDocument, this, bp::_1)); // Enable solver initial solution update while dragging. ParameterGrp::handle hGrp2 = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher"); diff --git a/src/Mod/Spreadsheet/App/PropertySheet.cpp b/src/Mod/Spreadsheet/App/PropertySheet.cpp index a9a7afdd2d..debed472d2 100644 --- a/src/Mod/Spreadsheet/App/PropertySheet.cpp +++ b/src/Mod/Spreadsheet/App/PropertySheet.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include @@ -49,6 +49,7 @@ FC_LOG_LEVEL_INIT("Spreadsheet", true, true) using namespace App; using namespace Base; using namespace Spreadsheet; +namespace bp = boost::placeholders; TYPESYSTEM_SOURCE(Spreadsheet::PropertySheet , App::PropertyExpressionContainer) @@ -682,7 +683,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, _1, _2)); + std::sort(keys.begin(), keys.end(), boost::bind(&PropertySheet::rowSortFunc, this, bp::_1, bp::_2)); MoveCellsExpressionVisitor visitor(*this, CellAddress(row, CellAddress::MAX_COLUMNS), count, 0); @@ -733,7 +734,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, _1, _2)); + std::sort(keys.begin(), keys.end(), boost::bind(&PropertySheet::rowSortFunc, this, bp::_1, bp::_2)); MoveCellsExpressionVisitor visitor(*this, CellAddress(row + count - 1, CellAddress::MAX_COLUMNS), -count, 0); @@ -825,7 +826,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, _1, _2)); + std::sort(keys.begin(), keys.end(), boost::bind(&PropertySheet::colSortFunc, this, bp::_1, bp::_2)); MoveCellsExpressionVisitor visitor(*this, CellAddress(CellAddress::MAX_ROWS, col + count - 1), 0, -count); @@ -1129,7 +1130,7 @@ 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, _1, _2)); + &PropertySheet::slotChangedObject, this, bp::_1, bp::_2)); } void PropertySheet::onRemoveDep(App::DocumentObject *obj) { diff --git a/src/Mod/Spreadsheet/App/Sheet.cpp b/src/Mod/Spreadsheet/App/Sheet.cpp index cc254ed9b2..648db5096a 100644 --- a/src/Mod/Spreadsheet/App/Sheet.cpp +++ b/src/Mod/Spreadsheet/App/Sheet.cpp @@ -53,7 +53,6 @@ #include #include #include -#include #include FC_LOG_LEVEL_INIT("Spreadsheet",true,true) diff --git a/src/Mod/Spreadsheet/Gui/SheetModel.cpp b/src/Mod/Spreadsheet/Gui/SheetModel.cpp index a95b430cdd..8f3d9ad7a7 100644 --- a/src/Mod/Spreadsheet/Gui/SheetModel.cpp +++ b/src/Mod/Spreadsheet/Gui/SheetModel.cpp @@ -38,17 +38,18 @@ #include #include #include -#include +#include using namespace SpreadsheetGui; using namespace Spreadsheet; using namespace App; +namespace bp = boost::placeholders; SheetModel::SheetModel(Sheet *_sheet, QObject *parent) : QAbstractTableModel(parent) , sheet(_sheet) { - cellUpdatedConnection = sheet->cellUpdated.connect(bind(&SheetModel::cellUpdated, this, _1)); + cellUpdatedConnection = sheet->cellUpdated.connect(bind(&SheetModel::cellUpdated, this, bp::_1)); ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Spreadsheet"); aliasBgColor = QColor(Base::Tools::fromStdString(hGrp->GetASCII("AliasedCellBackgroundColor", "#feff9e"))); diff --git a/src/Mod/Spreadsheet/Gui/SheetTableView.cpp b/src/Mod/Spreadsheet/Gui/SheetTableView.cpp index 8285e1520e..081ca51500 100644 --- a/src/Mod/Spreadsheet/Gui/SheetTableView.cpp +++ b/src/Mod/Spreadsheet/Gui/SheetTableView.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include "../App/Utils.h" #include "../App/Cell.h" #include @@ -46,6 +46,7 @@ using namespace SpreadsheetGui; using namespace Spreadsheet; using namespace App; +namespace bp = boost::placeholders; void SheetViewHeader::mouseReleaseEvent(QMouseEvent *event) { @@ -279,7 +280,7 @@ void SheetTableView::updateCellSpan(CellAddress address) void SheetTableView::setSheet(Sheet * _sheet) { sheet = _sheet; - cellSpanChangedConnection = sheet->cellSpanChanged.connect(bind(&SheetTableView::updateCellSpan, this, _1)); + cellSpanChangedConnection = sheet->cellSpanChanged.connect(bind(&SheetTableView::updateCellSpan, this, bp::_1)); // Update row and column spans std::vector usedCells = sheet->getUsedCells(); diff --git a/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp b/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp index ab9adac3e0..139b11eca5 100644 --- a/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp +++ b/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include "qtcolorpicker.h" #include @@ -59,6 +59,7 @@ using namespace SpreadsheetGui; using namespace Spreadsheet; using namespace Gui; using namespace App; +namespace bp = boost::placeholders; /* TRANSLATOR SpreadsheetGui::SheetView */ @@ -99,8 +100,8 @@ SheetView::SheetView(Gui::Document *pcDocument, App::DocumentObject *docObj, QWi connect(ui->cellContent, SIGNAL(returnPressed()), this, SLOT( editingFinished() )); connect(ui->cellAlias, SIGNAL(returnPressed()), this, SLOT( editingFinished() )); - columnWidthChangedConnection = sheet->columnWidthChanged.connect(bind(&SheetView::resizeColumn, this, _1, _2)); - rowHeightChangedConnection = sheet->rowHeightChanged.connect(bind(&SheetView::resizeRow, this, _1, _2)); + columnWidthChangedConnection = sheet->columnWidthChanged.connect(bind(&SheetView::resizeColumn, this, bp::_1, bp::_2)); + rowHeightChangedConnection = sheet->rowHeightChanged.connect(bind(&SheetView::resizeRow, this, bp::_1, bp::_2)); connect( model, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), this, SLOT(modelUpdated(const QModelIndex &, const QModelIndex &))); diff --git a/src/Mod/TechDraw/Gui/MDIViewPage.cpp b/src/Mod/TechDraw/Gui/MDIViewPage.cpp index 21eff10d6e..6ec5b77130 100644 --- a/src/Mod/TechDraw/Gui/MDIViewPage.cpp +++ b/src/Mod/TechDraw/Gui/MDIViewPage.cpp @@ -40,7 +40,7 @@ #include #include #include - #include + #include #endif // #ifndef _PreComp_ @@ -109,6 +109,7 @@ using namespace TechDrawGui; +namespace bp = boost::placeholders; /* TRANSLATOR TechDrawGui::MDIViewPage */ @@ -163,7 +164,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, _1); + auto bnd = boost::bind(&MDIViewPage::onDeleteObject, this, bp::_1); connectDeletedObject = appDoc->signalDeletedObject.connect(bnd); } diff --git a/src/Mod/TechDraw/Gui/ViewProviderDrawingView.cpp b/src/Mod/TechDraw/Gui/ViewProviderDrawingView.cpp index 2235daf354..a0f6f5a4d2 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderDrawingView.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderDrawingView.cpp @@ -27,7 +27,7 @@ #ifndef _PreComp_ #include #include -#include +#include #endif @@ -56,6 +56,7 @@ #include "ViewProviderDrawingView.h" using namespace TechDrawGui; +namespace bp = boost::placeholders; PROPERTY_SOURCE(TechDrawGui::ViewProviderDrawingView, Gui::ViewProviderDocumentObject) @@ -82,7 +83,7 @@ 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, _1); + auto bnd = boost::bind(&ViewProviderDrawingView::onGuiRepaint, this, bp::_1); auto feature = getViewObject(); if (feature != nullptr) { connectGuiRepaint = feature->signalGuiPaint.connect(bnd); diff --git a/src/Mod/TechDraw/Gui/ViewProviderPage.cpp b/src/Mod/TechDraw/Gui/ViewProviderPage.cpp index a10527be3b..f463d58096 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderPage.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderPage.cpp @@ -30,11 +30,11 @@ # include # include # include -#include -#include -#include -#include -#include +# include +# include +# include +# include +# include #endif @@ -73,6 +73,7 @@ using namespace TechDrawGui; using namespace TechDraw; +namespace bp = boost::placeholders; #define _SHOWDRAWING 10 #define _TOGGLEUPDATE 11 @@ -107,7 +108,7 @@ void ViewProviderPage::attach(App::DocumentObject *pcFeat) { ViewProviderDocumentObject::attach(pcFeat); - auto bnd = boost::bind(&ViewProviderPage::onGuiRepaint, this, _1); + auto bnd = boost::bind(&ViewProviderPage::onGuiRepaint, this, bp::_1); auto feature = getDrawPage(); if (feature != nullptr) { connectGuiRepaint = feature->signalGuiPaint.connect(bnd);