From kde-commits Wed Nov 30 23:00:32 2016 From: Kevin Funk Date: Wed, 30 Nov 2016 23:00:32 +0000 To: kde-commits Subject: [kdev-clang-tidy] /: Move actions to Analyzer category Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=148054684230708 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/9f7242e6782918ea4d37b21bc29524509db= fc261 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 di= agnosing 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 @@ - + - - Run + + Analyze 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& /*unu= sed*/) QAction* act_checkfile; act_checkfile =3D 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::contextMenuExten= sion(KDevelop::Context* c if (mime =3D=3D QLatin1String("text/x-c++src") || mime =3D=3D QLat= in1String("text/x-csrc")) { QAction* action =3D new QAction(QIcon::fromTheme("dialog-ok"),= i18n("Check unit with clang-tidy"), this); connect(action, SIGNAL(triggered(bool)), this, SLOT(runClangti= dyFile())); - extension.addAction(KDevelop::ContextMenuExtension::ExtensionG= roup, action); + extension.addAction(KDevelop::ContextMenuExtension::AnalyzeGro= up, 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::contextMenuExten= sion(KDevelop::Context* c QAction* action =3D new QAction(QIcon::fromTheme("document-new"), i18n("Ch= eck current unit with clang-tidy"), this); connect(action, SIGNAL(triggered(bool)), this, SLOT(runClangti= dyFile())); - extension.addAction(KDevelop::ContextMenuExtension::ExtensionG= roup, action); + extension.addAction(KDevelop::ContextMenuExtension::AnalyzeGro= up, 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::contextMenuExten= sion(KDevelop::Context* c QAction* action =3D new QAction(QIcon::fromTheme("document-new"), i18n("Ch= eck current unit with clang-tidy"), this); connect(action, SIGNAL(triggered(bool)), this, SLOT(runClangti= dyFile())); - extension.addAction(KDevelop::ContextMenuExtension::ExtensionG= roup, action); + extension.addAction(KDevelop::ContextMenuExtension::AnalyzeGro= up, action); } } return extension;