aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/beautifier/artisticstyle/artisticstyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/beautifier/artisticstyle/artisticstyle.cpp')
-rw-r--r--src/plugins/beautifier/artisticstyle/artisticstyle.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/beautifier/artisticstyle/artisticstyle.cpp b/src/plugins/beautifier/artisticstyle/artisticstyle.cpp
index eac8d98f51..a8851b43cc 100644
--- a/src/plugins/beautifier/artisticstyle/artisticstyle.cpp
+++ b/src/plugins/beautifier/artisticstyle/artisticstyle.cpp
@@ -40,13 +40,16 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/idocument.h>
-#include <cppeditor/cppeditorconstants.h>
+
#include <projectexplorer/project.h>
#include <projectexplorer/projectnodes.h>
#include <projectexplorer/projecttree.h>
+
#include <texteditor/formattexteditor.h>
+
#include <utils/fileutils.h>
#include <utils/hostosinfo.h>
+#include <utils/stringutils.h>
#include <QAction>
#include <QMenu>
@@ -55,16 +58,14 @@ using namespace TextEditor;
namespace Beautifier {
namespace Internal {
-namespace ArtisticStyle {
ArtisticStyle::ArtisticStyle()
{
- Core::ActionContainer *menu = Core::ActionManager::createMenu(Constants::ArtisticStyle::MENU_ID);
+ Core::ActionContainer *menu = Core::ActionManager::createMenu("ArtisticStyle.Menu");
menu->menu()->setTitle(tr("&Artistic Style"));
m_formatFile = new QAction(BeautifierPlugin::msgFormatCurrentFile(), this);
- menu->addAction(Core::ActionManager::registerAction(m_formatFile,
- Constants::ArtisticStyle::ACTION_FORMATFILE));
+ menu->addAction(Core::ActionManager::registerAction(m_formatFile, "ArtisticStyle.FormatFile"));
connect(m_formatFile, &QAction::triggered, this, &ArtisticStyle::formatFile);
Core::ActionManager::actionContainer(Constants::MENU_ID)->addMenu(menu);
@@ -75,7 +76,7 @@ ArtisticStyle::ArtisticStyle()
QString ArtisticStyle::id() const
{
- return QLatin1String(Constants::ArtisticStyle::DISPLAY_NAME);
+ return QLatin1String(Constants::ARTISTICSTYLE_DISPLAY_NAME);
}
void ArtisticStyle::updateActions(Core::IEditor *editor)
@@ -88,7 +89,7 @@ void ArtisticStyle::formatFile()
const QString cfgFileName = configurationFile();
if (cfgFileName.isEmpty()) {
BeautifierPlugin::showError(BeautifierPlugin::msgCannotGetConfigurationFile(
- tr(Constants::ArtisticStyle::DISPLAY_NAME)));
+ tr(Constants::ARTISTICSTYLE_DISPLAY_NAME)));
} else {
formatCurrentFile(command(cfgFileName));
}
@@ -163,6 +164,5 @@ Command ArtisticStyle::command(const QString &cfgFile) const
return command;
}
-} // namespace ArtisticStyle
} // namespace Internal
} // namespace Beautifier