- menu->addAction(icon::get("edit-copy"), tr("Copy Link Address"),
- &_actionProxy, SLOT(copyLinkToClipboard()))->setData(QVariant::fromValue<void *>(this));
+ auto action = new Action{icon::get("edit-copy"), tr("Copy Link Address"), menu, &_actionProxy, SLOT(copyLinkToClipboard())};
+ action->setData(QVariant::fromValue<void *>(this));
+ menu->addAction(action);