added 'Add to...' context submenu and addToFavoritesAction

This commit is contained in:
Luis Ángel San Martín
2014-11-27 16:29:29 +01:00
parent b80c72f70d
commit 4ca873e058
5 changed files with 35 additions and 4 deletions

View File

@ -179,7 +179,14 @@ void GridComicsView::setViewActions(const QList<QAction *> &actions)
ctxt->setContextProperty("deleteComicsAction",actions[17]);
ctxt->setContextProperty("toggleFullScreenAction",actions[19]);
QAction * tmpAction = actions[19];
QMenu * menu = tmpAction->menu();
if(menu)
{
ctxt->setContextProperty("addToFavoritesAction",menu->actions().at(0));
}
ctxt->setContextProperty("toggleFullScreenAction",actions[21]);
}
else
QLOG_ERROR() << "setViewActions invoked with the wrong number of actions";