Cleanup: use pointer-to-member-function in addAction() calls

Since requiring Qt >= 5.9.1, we can use the pointer-to-member-function
overloads of addAction (introduced in Qt 5.6). This has the advantage
of compile-time checking of the signal/slot parameters.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-10-14 20:57:13 +02:00 committed by Dirk Hohndel
parent 39c36af808
commit fdfcbd0315
5 changed files with 33 additions and 33 deletions

View file

@ -63,7 +63,7 @@ void DiveHandler::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
// don't allow removing the last point
if (plannerModel->rowCount() > 1) {
m.addSeparator();
m.addAction(gettextFromC::tr("Remove this point"), this, SLOT(selfRemove()));
m.addAction(gettextFromC::tr("Remove this point"), this, &DiveHandler::selfRemove);
m.exec(event->screenPos());
}
}