From 5bdf2670e2b2f580cc8e9a1404aa4a9da0d04bf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Mon, 6 Feb 2017 18:27:18 +0100 Subject: [PATCH] More cppcheck warnings --- config/configValue.hh | 2 +- config/dynamicValue.hh | 2 +- parser/context.hh | 2 +- parser/input.hh | 4 ++-- parser/output.hh | 2 +- scene/button.hh | 2 +- scene/elementArea.hh | 2 +- scene/functionDisplay.hh | 2 +- scene/graphicsView.hh | 2 +- scene/sceneTools.hh | 2 +- scene/text.hh | 2 +- scene/wayfind.hh | 4 ++-- types/objectId/TreeModel.hh | 2 +- 13 files changed, 15 insertions(+), 15 deletions(-) diff --git a/config/configValue.hh b/config/configValue.hh index c95bb02..65c4698 100644 --- a/config/configValue.hh +++ b/config/configValue.hh @@ -77,7 +77,7 @@ class ConfigValue : public QObject { public: /// Constructor - ConfigValue (ElementInput *_input); + explicit ConfigValue (ElementInput *_input); /// Destructor ~ConfigValue (); diff --git a/config/dynamicValue.hh b/config/dynamicValue.hh index 1d70771..7c340ab 100644 --- a/config/dynamicValue.hh +++ b/config/dynamicValue.hh @@ -76,7 +76,7 @@ class DynamicValue : public QObject { public: /// Constructor - DynamicValue (Input *_input); + explicit DynamicValue (Input *_input); /// Destructor ~DynamicValue (); diff --git a/parser/context.hh b/parser/context.hh index ce73bfc..8f4cfa8 100644 --- a/parser/context.hh +++ b/parser/context.hh @@ -77,7 +77,7 @@ class Context { public: /// Constructor - Context (QScriptEngine *_engine); + explicit Context (QScriptEngine *_engine); /// Destructor ~Context (); diff --git a/parser/input.hh b/parser/input.hh index 92ae29a..02d283b 100644 --- a/parser/input.hh +++ b/parser/input.hh @@ -76,7 +76,7 @@ class Input : public InOut { }; /// Constructor - Input (Element *_f); + explicit Input (Element *_f); /// Current state unsigned int state (); @@ -96,4 +96,4 @@ class Input : public InOut { } //============================================================================= -#endif \ No newline at end of file +#endif diff --git a/parser/output.hh b/parser/output.hh index da1c97b..4d4e97f 100644 --- a/parser/output.hh +++ b/parser/output.hh @@ -68,7 +68,7 @@ class Output : public InOut { public: /// Constructor - Output (Element *_f); + explicit Output (Element *_f); friend class Context; }; diff --git a/scene/button.hh b/scene/button.hh index ba064a8..ba961a9 100644 --- a/scene/button.hh +++ b/scene/button.hh @@ -77,7 +77,7 @@ class Button : public Text public: /// Constructor - Button (QGraphicsItem *_parent = 0); + explicit Button (QGraphicsItem *_parent = 0); Button (const QString &_text, QGraphicsItem *_parent = 0); /// Destructor diff --git a/scene/elementArea.hh b/scene/elementArea.hh index 1210d66..b3ae4d0 100644 --- a/scene/elementArea.hh +++ b/scene/elementArea.hh @@ -73,7 +73,7 @@ class ElementArea : public QObject, public QGraphicsItem public: /// Constructor - ElementArea (GraphicsScene *_scene); + explicit ElementArea (GraphicsScene *_scene); /// Destructor ~ElementArea (); diff --git a/scene/functionDisplay.hh b/scene/functionDisplay.hh index 4cef1c3..c07d2f0 100644 --- a/scene/functionDisplay.hh +++ b/scene/functionDisplay.hh @@ -75,7 +75,7 @@ class FunctionDisplay : public QGraphicsWidget public: /// Constructor - FunctionDisplay (GraphicsScene *_scene); + explicit FunctionDisplay (GraphicsScene *_scene); /// Destructor ~FunctionDisplay (); diff --git a/scene/graphicsView.hh b/scene/graphicsView.hh index 55ba09d..04bd38c 100644 --- a/scene/graphicsView.hh +++ b/scene/graphicsView.hh @@ -70,7 +70,7 @@ class GraphicsView : public QGraphicsView public: /// Constructor - GraphicsView(QWidget* _parent = NULL); + explicit GraphicsView(QWidget* _parent = NULL); signals: /// Inform the scene about size changes diff --git a/scene/sceneTools.hh b/scene/sceneTools.hh index d9a919c..870a798 100644 --- a/scene/sceneTools.hh +++ b/scene/sceneTools.hh @@ -77,7 +77,7 @@ class SceneTools : public QGraphicsWidget public: /// Constructor - SceneTools (GraphicsScene *_scene); + explicit SceneTools (GraphicsScene *_scene); /// Destructor ~SceneTools (); diff --git a/scene/text.hh b/scene/text.hh index 6b275c1..8ba162e 100644 --- a/scene/text.hh +++ b/scene/text.hh @@ -78,7 +78,7 @@ class Text : public QObject, public QGraphicsSimpleTextItem, public QGraphicsLay public: /// Constructor - Text (QGraphicsItem *_parent = 0); + explicit Text (QGraphicsItem *_parent = 0); Text (const QString &_text, QGraphicsItem *_parent = 0); /// Destrucotr diff --git a/scene/wayfind.hh b/scene/wayfind.hh index 7d6fbdf..e9ebff0 100644 --- a/scene/wayfind.hh +++ b/scene/wayfind.hh @@ -71,7 +71,7 @@ class WayFind { public: /// Constructor - WayFind (GraphicsScene *_scene); + explicit WayFind (GraphicsScene *_scene); /// Destructor ~WayFind (); @@ -91,7 +91,7 @@ class WayFind { Horizontal }; - Node (unsigned int _counter); + explicit Node (unsigned int _counter); ~Node (); public: diff --git a/types/objectId/TreeModel.hh b/types/objectId/TreeModel.hh index 183eb68..99a52a0 100644 --- a/types/objectId/TreeModel.hh +++ b/types/objectId/TreeModel.hh @@ -67,7 +67,7 @@ class TreeModel : public QAbstractItemModel public: /// Constructor - TreeModel(QObject *_parent = 0); + explicit TreeModel(QObject *_parent = 0); /// Destructor ~TreeModel(); -- GitLab