[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdev-clang-tidy] /: Move actions to Analyzer category
From:       Kevin Funk <kfunk () kde ! org>
Date:       2016-11-30 23:00:32
Message-ID: E1cCDrc-0000U4-Rp () code ! kde ! org
[Download RAW message or body]

Git commit 9f7242e6782918ea4d37b21bc29524509dbfc261 by Kevin Funk.
Committed on 30/11/2016 at 23:00.
Pushed by kfunk into branch 'master'.

Move actions to Analyzer category

M  +1    -0    res/kdevclangtidy.json
M  +3    -3    res/kdevclangtidy.rc
M  +2    -2    src/plugin.cpp
M  +1    -1    tests/data/nihon_plugin.cpp
M  +1    -1    tests/data/plugin.cpp

https://commits.kde.org/kdev-clang-tidy/9f7242e6782918ea4d37b21bc29524509dbfc261

diff --git a/res/kdevclangtidy.json b/res/kdevclangtidy.json
index f092e6e..8122613 100644
--- a/res/kdevclangtidy.json
+++ b/res/kdevclangtidy.json
@@ -23,6 +23,7 @@
                 "Name[x-test]": "xxCarlos Niheltonxx"
             }
         ], 
+        "Category": "Analyzers",
         "Description": "clang-tidy provides an extensible framework for diagnosing \
and   fixing typical programming errors, like style violations, interface misuse, or \
bugs that   can be deduced via static analysis. \
                http://clang.llvm.org/extra/clang-tidy/", 
diff --git a/res/kdevclangtidy.rc b/res/kdevclangtidy.rc
index db61887..199c3b1 100644
--- a/res/kdevclangtidy.rc
+++ b/res/kdevclangtidy.rc
@@ -1,8 +1,8 @@
 <!DOCTYPE kpartgui>
-<gui name="ClangTidy" library="libclangtidyplugin" version="1">
+<gui name="ClangTidy" library="libclangtidyplugin" version="2">
 <MenuBar>
- <Menu name="run">
-   <text context="@title:menu">Run</text>
+ <Menu name="analyze">
+   <text context="@title:menu">Analyze</text>
      <Action name="clangtidy_file" group="run_operations"/>
      <Action name="clangtidy_all" group="run_operations"/>
  </Menu>
diff --git a/src/plugin.cpp b/src/plugin.cpp
index 450e399..13d229b 100644
--- a/src/plugin.cpp
+++ b/src/plugin.cpp
@@ -70,7 +70,7 @@ Plugin::Plugin(QObject* parent, const QVariantList& /*unused*/)
     QAction* act_checkfile;
     act_checkfile = actionCollection()->addAction("clangtidy_file", this, \
                SLOT(runClangtidyFile()));
     act_checkfile->setStatusTip(i18n("Launches clang-tidy for current file"));
-    act_checkfile->setText(i18n("clang-tidy"));
+    act_checkfile->setText(i18n("Clang-Tidy"));
 
     /*     TODO: Uncomment this only when discover a safe way to run clang-tidy on
     the whole project.
@@ -261,7 +261,7 @@ KDevelop::ContextMenuExtension \
                Plugin::contextMenuExtension(KDevelop::Context* c
         if (mime == QLatin1String("text/x-c++src") || mime == \
                QLatin1String("text/x-csrc")) {
             QAction* action = new QAction(QIcon::fromTheme("dialog-ok"), i18n("Check \
                unit with clang-tidy"), this);
             connect(action, SIGNAL(triggered(bool)), this, \
                SLOT(runClangtidyFile()));
-            extension.addAction(KDevelop::ContextMenuExtension::ExtensionGroup, \
action); +            \
extension.addAction(KDevelop::ContextMenuExtension::AnalyzeGroup, action);  }
     }
     return extension;
diff --git a/tests/data/nihon_plugin.cpp b/tests/data/nihon_plugin.cpp
index 991f2e8..74df83f 100644
--- a/tests/data/nihon_plugin.cpp
+++ b/tests/data/nihon_plugin.cpp
@@ -392,7 +392,7 @@ KDevelop::ContextMenuExtension \
Plugin::contextMenuExtension(KDevelop::Context* c  QAction* action
                 = new QAction(QIcon::fromTheme("document-new"), i18n("Check current \
                unit with clang-tidy"), this);
             connect(action, SIGNAL(triggered(bool)), this, \
                SLOT(runClangtidyFile()));
-            extension.addAction(KDevelop::ContextMenuExtension::ExtensionGroup, \
action); +            \
extension.addAction(KDevelop::ContextMenuExtension::AnalyzeGroup, action);  }
     }
     return extension;
diff --git a/tests/data/plugin.cpp b/tests/data/plugin.cpp
index 10d58b4..5cc8399 100644
--- a/tests/data/plugin.cpp
+++ b/tests/data/plugin.cpp
@@ -259,7 +259,7 @@ KDevelop::ContextMenuExtension \
Plugin::contextMenuExtension(KDevelop::Context* c  QAction* action
                 = new QAction(QIcon::fromTheme("document-new"), i18n("Check current \
                unit with clang-tidy"), this);
             connect(action, SIGNAL(triggered(bool)), this, \
                SLOT(runClangtidyFile()));
-            extension.addAction(KDevelop::ContextMenuExtension::ExtensionGroup, \
action); +            \
extension.addAction(KDevelop::ContextMenuExtension::AnalyzeGroup, action);  }
     }
     return extension;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic