modernize C++: avoid bind

In many cases std::bind() is kept because the code is much simpler
This commit is contained in:
wmayer
2023-08-08 19:10:49 +02:00
committed by wwmayer
parent 292196a606
commit d150fa7164
80 changed files with 240 additions and 30 deletions

View File

@@ -87,7 +87,9 @@ void ViewProviderBalloon::setupContextMenu(QMenu* menu, QObject* receiver, const
Gui::ActionFunction* func = new Gui::ActionFunction(menu);
QAction* act = menu->addAction(QObject::tr("Edit %1").arg(QString::fromUtf8(getObject()->Label.getValue())));
act->setData(QVariant((int)ViewProvider::Default));
func->trigger(act, std::bind(&ViewProviderBalloon::startDefaultEditMode, this));
func->trigger(act, [this]() {
this->startDefaultEditMode();
});
ViewProviderDrawingView::setupContextMenu(menu, receiver, member);
}