Add ActionContainer::addSeparator(...)

Gets rid of a lot of code duplication.

Change-Id: I2ce38fb38a0b61cb821e0bdc7bcc9a7ccdf9da72
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Eike Ziller
2012-06-05 14:22:20 +02:00
committed by hjk
parent d90264d6c2
commit cdd44befff
34 changed files with 132 additions and 394 deletions

View File

@@ -206,15 +206,8 @@ void FindPlugin::setupMenu()
mfind->appendGroup(Constants::G_FIND_ACTIONS);
Core::Context globalcontext(Core::Constants::C_GLOBAL);
Core::Command *cmd;
QAction *separator;
separator = new QAction(this);
separator->setSeparator(true);
cmd = Core::ActionManager::registerAction(separator, "Find.Sep.Flags", globalcontext);
mfind->addAction(cmd, Constants::G_FIND_FLAGS);
separator = new QAction(this);
separator->setSeparator(true);
cmd = Core::ActionManager::registerAction(separator, "Find.Sep.Actions", globalcontext);
mfind->addAction(cmd, Constants::G_FIND_ACTIONS);
mfind->addSeparator(globalcontext, Constants::G_FIND_FLAGS);
mfind->addSeparator(globalcontext, Constants::G_FIND_ACTIONS);
Core::ActionContainer *mfindadvanced = Core::ActionManager::createMenu(Constants::M_FIND_ADVANCED);
mfindadvanced->menu()->setTitle(tr("Advanced Find"));