Reduce message duplication in Beautifier plugin.

Change-Id: I5216dd2e62e32ed889a71ebcad3f89baf0e0ff1b
Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
Friedemann Kleint
2014-03-05 14:02:01 +01:00
parent c7e3794759
commit a6711015c1
8 changed files with 45 additions and 9 deletions

View File

@@ -69,7 +69,7 @@ bool ClangFormat::initialize()
Core::ActionContainer *menu = Core::ActionManager::createMenu(Constants::ClangFormat::MENU_ID);
menu->menu()->setTitle(QLatin1String("ClangFormat"));
m_formatFile = new QAction(tr("Format Current File"), this);
m_formatFile = new QAction(BeautifierPlugin::msgFormatCurrentFile(), this);
Core::Command *cmd
= Core::ActionManager::registerAction(m_formatFile,
Constants::ClangFormat::ACTION_FORMATFILE,
@@ -77,7 +77,7 @@ bool ClangFormat::initialize()
menu->addAction(cmd);
connect(m_formatFile, SIGNAL(triggered()), this, SLOT(formatFile()));
m_formatRange = new QAction(tr("Format Selected Text"), this);
m_formatRange = new QAction(BeautifierPlugin::msgFormatSelectedText(), this);
cmd = Core::ActionManager::registerAction(m_formatRange,
Constants::ClangFormat::ACTION_FORMATSELECTED,
Core::Context(Core::Constants::C_GLOBAL));