modernize C++: move from boost::bind to std::bind

This commit is contained in:
wmayer
2023-08-08 14:19:00 +02:00
committed by wwmayer
parent 7bb6f48dbd
commit 68d22d864b
64 changed files with 279 additions and 266 deletions

View File

@@ -78,7 +78,7 @@
using namespace TechDrawGui;
using namespace TechDraw;
namespace bp = boost::placeholders;
namespace sp = std::placeholders;
/* TRANSLATOR TechDrawGui::MDIViewPage */
@@ -116,7 +116,7 @@ MDIViewPage::MDIViewPage(ViewProviderPage* pageVp, Gui::Document* doc, QWidget*
//get informed by App side about deleted DocumentObjects
App::Document* appDoc = m_vpPage->getDocument()->getDocument();
auto bnd = boost::bind(&MDIViewPage::onDeleteObject, this, bp::_1);
auto bnd = std::bind(&MDIViewPage::onDeleteObject, this, sp::_1);
connectDeletedObject = appDoc->signalDeletedObject.connect(bnd);
}

View File

@@ -49,7 +49,7 @@
#include "ViewProviderPage.h"
using namespace TechDrawGui;
namespace bp = boost::placeholders;
namespace sp = std::placeholders;
PROPERTY_SOURCE(TechDrawGui::ViewProviderDrawingView, Gui::ViewProviderDocumentObject)
@@ -79,8 +79,8 @@ void ViewProviderDrawingView::attach(App::DocumentObject *pcFeat)
// Base::Console().Message("VPDV::attach(%s)\n", pcFeat->getNameInDocument());
ViewProviderDocumentObject::attach(pcFeat);
auto bnd = boost::bind(&ViewProviderDrawingView::onGuiRepaint, this, bp::_1);
auto bndProgressMessage = boost::bind(&ViewProviderDrawingView::onProgressMessage, this, bp::_1, bp::_2, bp::_3);
auto bnd = std::bind(&ViewProviderDrawingView::onGuiRepaint, this, sp::_1);
auto bndProgressMessage = std::bind(&ViewProviderDrawingView::onProgressMessage, this, sp::_1, sp::_2, sp::_3);
auto feature = getViewObject();
if (feature) {
const char* temp = feature->getNameInDocument();

View File

@@ -65,7 +65,7 @@
using namespace TechDrawGui;
using namespace TechDraw;
namespace bp = boost::placeholders;
namespace sp = std::placeholders;
#define _SHOWDRAWING 10
#define _TOGGLEUPDATE 11
@@ -114,7 +114,7 @@ void ViewProviderPage::attach(App::DocumentObject* pcFeat)
{
ViewProviderDocumentObject::attach(pcFeat);
auto bnd = boost::bind(&ViewProviderPage::onGuiRepaint, this, bp::_1);
auto bnd = std::bind(&ViewProviderPage::onGuiRepaint, this, sp::_1);
TechDraw::DrawPage* feature = dynamic_cast<TechDraw::DrawPage*>(pcFeat);
if (feature) {
connectGuiRepaint = feature->signalGuiPaint.connect(bnd);