aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppcheck/cppcheckoptions.h
diff options
context:
space:
mode:
authorSergey Morozov <dev@gres.biz>2019-11-03 23:00:16 +0300
committerSergey Morozov <dev@gres.biz>2019-12-04 18:15:41 +0000
commit0aa95576c282b59fa05a23d1f40da0d270547ae7 (patch)
treea7dceb2dc9ae5f989a8a35a418c88e95b2cf4eb0 /src/plugins/cppcheck/cppcheckoptions.h
parent07490e76de2ee74df342849978ecafee18c53527 (diff)
Cppcheck: Add ability to manually run cppcheck
Run cppcheck on selected files from current project via "Analyze"->"Cppcheck...." Show results in a separate view in the same manner as ClangTools plugin. Fixes: QTCREATORBUG-21673 Change-Id: Ibcaf4057a387a990f1da59025f15ba58f996953f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'src/plugins/cppcheck/cppcheckoptions.h')
-rw-r--r--src/plugins/cppcheck/cppcheckoptions.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/plugins/cppcheck/cppcheckoptions.h b/src/plugins/cppcheck/cppcheckoptions.h
index 0791b950e0c..50959609e04 100644
--- a/src/plugins/cppcheck/cppcheckoptions.h
+++ b/src/plugins/cppcheck/cppcheckoptions.h
@@ -27,7 +27,16 @@
#include <coreplugin/dialogs/ioptionspage.h>
+#include <QCoreApplication>
#include <QPointer>
+#include <QWidget>
+
+class QLineEdit;
+class QCheckBox;
+
+namespace Utils {
+class PathChooser;
+}
namespace Cppcheck {
namespace Internal {
@@ -58,6 +67,32 @@ public:
bool guessArguments = true;
};
+class OptionsWidget final : public QWidget
+{
+ Q_DECLARE_TR_FUNCTIONS(CppcheckOptionsPage)
+public:
+ explicit OptionsWidget(QWidget *parent = nullptr);
+ void load(const CppcheckOptions &options);
+ void save(CppcheckOptions &options) const;
+
+private:
+ Utils::PathChooser *m_binary = nullptr;
+ QLineEdit *m_customArguments = nullptr;
+ QLineEdit *m_ignorePatterns = nullptr;
+ QCheckBox *m_warning = nullptr;
+ QCheckBox *m_style = nullptr;
+ QCheckBox *m_performance = nullptr;
+ QCheckBox *m_portability = nullptr;
+ QCheckBox *m_information = nullptr;
+ QCheckBox *m_unusedFunction = nullptr;
+ QCheckBox *m_missingInclude = nullptr;
+ QCheckBox *m_inconclusive = nullptr;
+ QCheckBox *m_forceDefines = nullptr;
+ QCheckBox *m_showOutput = nullptr;
+ QCheckBox *m_addIncludePaths = nullptr;
+ QCheckBox *m_guessArguments = nullptr;
+};
+
class CppcheckOptionsPage final : public Core::IOptionsPage
{
Q_OBJECT