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

@@ -85,10 +85,7 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+M") : tr("Ctrl+M")));
mbm->addAction(cmd);
QAction *sep = new QAction(this);
sep->setSeparator(true);
cmd = Core::ActionManager::registerAction(sep, Core::Id("Bookmarks.Sep.Toggle"), textcontext);
mbm->addAction(cmd);
mbm->addSeparator(textcontext);
//Previous
m_prevAction = new QAction(tr("Previous Bookmark"), this);
@@ -102,10 +99,7 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+.") : tr("Ctrl+.")));
mbm->addAction(cmd);
sep = new QAction(this);
sep->setSeparator(true);
cmd = Core::ActionManager::registerAction(sep, Core::Id("Bookmarks.Sep.DirNavigation"), globalcontext);
mbm->addAction(cmd);
mbm->addSeparator(globalcontext);
//Previous Doc
m_docPrevAction = new QAction(tr("Previous Bookmark in Document"), this);