From cf2c39a123e3660dd29bc27ba1808c69a2f91a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Fri, 24 May 2019 13:17:38 +0200 Subject: [PATCH] Silence some cppcheck warnings --- scene/button.hh | 10 +++++----- scene/elementInput.hh | 6 +++--- scene/elementOutput.hh | 6 +++--- types/any.hh | 2 +- types/bool.hh | 2 +- types/boolWidget.hh | 6 +++--- types/filename.hh | 2 +- types/filenameWidget.hh | 6 +++--- types/matrix4x4.hh | 2 +- types/matrix4x4Widget.hh | 6 +++--- types/numWidget.hh | 6 +++--- types/number.hh | 2 +- types/objectId/objectId.hh | 2 +- types/objectId/objectIdWidget.hh | 6 +++--- types/selection.hh | 2 +- types/selectionWidget.hh | 6 +++--- types/string.hh | 2 +- types/stringWidget.hh | 6 +++--- types/vec3d.hh | 2 +- types/vec3dWidget.hh | 6 +++--- types/vec4d.hh | 2 +- types/vec4dWidget.hh | 6 +++--- 22 files changed, 48 insertions(+), 48 deletions(-) diff --git a/scene/button.hh b/scene/button.hh index 79b1d19..82b887b 100644 --- a/scene/button.hh +++ b/scene/button.hh @@ -78,19 +78,19 @@ class Button : public Text ~Button (); /// Bounding rectangle - QRectF boundingRect () const; + QRectF boundingRect () const override; /// Sets the geometry - void setGeometry (const QRectF &_rect); + void setGeometry (const QRectF &_rect) override; /// Button glow painting - void paint (QPainter *_painter, const QStyleOptionGraphicsItem *_option, QWidget *_widget = 0); + void paint (QPainter *_painter, const QStyleOptionGraphicsItem *_option, QWidget *_widget = 0) override; /// Sets the background brush - void setBackgroundBrush (QBrush _brush); + void setBackgroundBrush (QBrush _brush) override; /// Sets the background pen - void setBackgroundPen (QPen _pen); + void setBackgroundPen (QPen _pen) override; signals: /// emmited if the button gets pressed diff --git a/scene/elementInput.hh b/scene/elementInput.hh index 4217d71..3a25ca7 100644 --- a/scene/elementInput.hh +++ b/scene/elementInput.hh @@ -75,7 +75,7 @@ class ElementInput : public ElementInOut { ~ElementInput (); /// Type (=Input) - Type type () const { return TypeInput; }; + Type type () const override { return TypeInput; }; /// Sets the valid flag (needed during code generation) void setValid (bool _value) { valid_ = _value; }; @@ -90,10 +90,10 @@ class ElementInput : public ElementInOut { QString value () const { return value_; }; /// Add connection - void addConnection (Connection *_conn); + void addConnection (Connection *_conn) override; /// Remove connection - void removeConnection (Connection *_conn); + void removeConnection (Connection *_conn) override; /// "Set" flag to mark input as set by user void set (bool _set); diff --git a/scene/elementOutput.hh b/scene/elementOutput.hh index aaa41c2..751141c 100644 --- a/scene/elementOutput.hh +++ b/scene/elementOutput.hh @@ -68,13 +68,13 @@ class ElementOutput : public ElementInOut { ~ElementOutput (); /// Type (=Output) - Type type () const { return TypeOutput; }; + Type type () const override { return TypeOutput; } ; /// Add connection - void addConnection (Connection *_conn); + void addConnection (Connection *_conn) override; /// Remove connection - void removeConnection (Connection *_conn); + void removeConnection (Connection *_conn) override; }; //============================================================================= diff --git a/types/any.hh b/types/any.hh index 01bf7d3..f517a15 100644 --- a/types/any.hh +++ b/types/any.hh @@ -62,7 +62,7 @@ class TypeAny : public Type { TypeAny (); /// Can this type be converted to the given type? - bool canConvertTo (QString _type); + bool canConvertTo (QString _type) override; }; //============================================================================= diff --git a/types/bool.hh b/types/bool.hh index 8e5e4a1..de1c7a3 100644 --- a/types/bool.hh +++ b/types/bool.hh @@ -62,7 +62,7 @@ class TypeBool : public Type { TypeBool (); /// Has configuration widget - bool hasWidget (); + bool hasWidget () override; /// Returns configuration widget TypeWidget *widget (QMap _hints, QString _typeName, QWidget *_parent = NULL); diff --git a/types/boolWidget.hh b/types/boolWidget.hh index c62a449..400daff 100644 --- a/types/boolWidget.hh +++ b/types/boolWidget.hh @@ -70,13 +70,13 @@ class BoolWidget : public TypeWidget { ~BoolWidget (); /// Convert current value to string - QString toValue (); + QString toValue () override; /// Read value from string - void fromValue (QString _from); + void fromValue (QString _from) override; /// Reset to default - void toDefault (); + void toDefault () override; private: diff --git a/types/filename.hh b/types/filename.hh index eca820f..cb94776 100644 --- a/types/filename.hh +++ b/types/filename.hh @@ -62,7 +62,7 @@ class TypeFilename : public Type { TypeFilename (); /// Has configuration widget - bool hasWidget (); + bool hasWidget () override; /// Returns configuration widget TypeWidget *widget (QMap _hints, QString _typeName, QWidget *_parent = NULL); diff --git a/types/filenameWidget.hh b/types/filenameWidget.hh index 4936ecf..d187cf8 100644 --- a/types/filenameWidget.hh +++ b/types/filenameWidget.hh @@ -73,13 +73,13 @@ class FilenameWidget : public TypeWidget { ~FilenameWidget (); /// Convert current value to string - QString toValue (); + QString toValue () override; /// Read value from string - void fromValue (QString _from); + void fromValue (QString _from) override; /// Reset to default - void toDefault (); + void toDefault () override; private slots: diff --git a/types/matrix4x4.hh b/types/matrix4x4.hh index 0f98b91..f5cbdac 100644 --- a/types/matrix4x4.hh +++ b/types/matrix4x4.hh @@ -62,7 +62,7 @@ class TypeMatrix4x4 : public Type { TypeMatrix4x4 (); /// Has configuration widget - bool hasWidget (); + bool hasWidget () override; /// Returns configuration widget TypeWidget *widget (QMap _hints, QString _typeName, QWidget *_parent = NULL); diff --git a/types/matrix4x4Widget.hh b/types/matrix4x4Widget.hh index 350592c..ef3c3b9 100644 --- a/types/matrix4x4Widget.hh +++ b/types/matrix4x4Widget.hh @@ -69,13 +69,13 @@ class Matrix4x4Widget : public TypeWidget { ~Matrix4x4Widget (); /// Convert current value to string - QString toValue (); + QString toValue () override; /// Read value from string - void fromValue (QString _from); + void fromValue (QString _from) override; /// Reset to default - void toDefault (); + void toDefault () override; private slots: void editingFinished (); diff --git a/types/numWidget.hh b/types/numWidget.hh index b7f0066..eb9ebc6 100644 --- a/types/numWidget.hh +++ b/types/numWidget.hh @@ -71,13 +71,13 @@ class NumWidget : public TypeWidget { ~NumWidget (); /// Convert current value to string - QString toValue (); + QString toValue () override; /// Read value from string - void fromValue (QString _from); + void fromValue (QString _from) override; /// Reset to default - void toDefault (); + void toDefault () override; private slots: diff --git a/types/number.hh b/types/number.hh index 4b22065..3653502 100644 --- a/types/number.hh +++ b/types/number.hh @@ -62,7 +62,7 @@ class TypeNumber : public Type { TypeNumber (); /// Has configuration widget - bool hasWidget (); + bool hasWidget () override; /// Returns configuration widget TypeWidget *widget (QMap _hints, QString _typeName, QWidget *_parent = NULL); diff --git a/types/objectId/objectId.hh b/types/objectId/objectId.hh index 9e748e2..92829fa 100644 --- a/types/objectId/objectId.hh +++ b/types/objectId/objectId.hh @@ -62,7 +62,7 @@ class TypeObjectId : public Type { TypeObjectId (); /// Has configuration widget - bool hasWidget (); + bool hasWidget () override; /// Returns configuration widget TypeWidget *widget (QMap _hints, QString _typeName, QWidget *_parent = NULL); diff --git a/types/objectId/objectIdWidget.hh b/types/objectId/objectIdWidget.hh index a24507d..69927c9 100644 --- a/types/objectId/objectIdWidget.hh +++ b/types/objectId/objectIdWidget.hh @@ -71,13 +71,13 @@ class ObjectIdWidget : public TypeWidget { ~ObjectIdWidget (); /// Convert current value to string - QString toValue (); + QString toValue () override; /// Read value from string - void fromValue (QString _from); + void fromValue (QString _from) override; /// Reset to default - void toDefault (); + void toDefault () override; private slots: void showPickDialog (); diff --git a/types/selection.hh b/types/selection.hh index 4df427d..f0d1b6a 100644 --- a/types/selection.hh +++ b/types/selection.hh @@ -62,7 +62,7 @@ class TypeSelection : public Type { TypeSelection (); /// Has configuration widget - bool hasWidget (); + bool hasWidget () override; /// Returns configuration widget TypeWidget *widget (QMap _hints, QString _typeName, QWidget *_parent = NULL); diff --git a/types/selectionWidget.hh b/types/selectionWidget.hh index 1f7f925..9650e3b 100644 --- a/types/selectionWidget.hh +++ b/types/selectionWidget.hh @@ -74,13 +74,13 @@ class SelectionWidget : public TypeWidget { ~SelectionWidget (); /// Convert current value to string - QString toValue (); + QString toValue () override; /// Read value from string - void fromValue (QString _from); + void fromValue (QString _from) override; /// Reset to default - void toDefault (); + void toDefault () override; private: QVector > names_; diff --git a/types/string.hh b/types/string.hh index 0d53ec0..d788d63 100644 --- a/types/string.hh +++ b/types/string.hh @@ -62,7 +62,7 @@ class TypeString : public Type { TypeString (); /// Has configuration widget - bool hasWidget (); + bool hasWidget () override; /// Returns configuration widget TypeWidget *widget (QMap _hints, QString _typeName, QWidget *_parent = NULL); diff --git a/types/stringWidget.hh b/types/stringWidget.hh index 743dc2c..1037056 100644 --- a/types/stringWidget.hh +++ b/types/stringWidget.hh @@ -71,13 +71,13 @@ class StringWidget : public TypeWidget { ~StringWidget (); /// Convert current value to string - QString toValue (); + QString toValue () override; /// Read value from string - void fromValue (QString _from); + void fromValue (QString _from) override; /// Reset to default - void toDefault (); + void toDefault () override; private: QString default_; diff --git a/types/vec3d.hh b/types/vec3d.hh index 2d84f8f..9e2b30d 100644 --- a/types/vec3d.hh +++ b/types/vec3d.hh @@ -62,7 +62,7 @@ class TypeVec3D : public Type { TypeVec3D (); /// Has configuration widget - bool hasWidget (); + bool hasWidget () override; /// Returns configuration widget TypeWidget *widget (QMap _hints, QString _typeName, QWidget *_parent = NULL); diff --git a/types/vec3dWidget.hh b/types/vec3dWidget.hh index 04d7d08..73f7f73 100644 --- a/types/vec3dWidget.hh +++ b/types/vec3dWidget.hh @@ -69,13 +69,13 @@ class Vec3DWidget : public TypeWidget { ~Vec3DWidget (); /// Convert current value to string - QString toValue (); + QString toValue () override; /// Read value from string - void fromValue (QString _from); + void fromValue (QString _from) override; /// Reset to default - void toDefault (); + void toDefault () override; private slots: void editingFinished (); diff --git a/types/vec4d.hh b/types/vec4d.hh index 3c5167d..48e3104 100644 --- a/types/vec4d.hh +++ b/types/vec4d.hh @@ -61,7 +61,7 @@ class TypeVec4D : public Type { TypeVec4D (); /// Has configuration widget - bool hasWidget (); + bool hasWidget () override; /// Returns configuration widget TypeWidget *widget (QMap _hints, QString _typeName, QWidget *_parent = NULL); diff --git a/types/vec4dWidget.hh b/types/vec4dWidget.hh index 9e863ca..665a071 100644 --- a/types/vec4dWidget.hh +++ b/types/vec4dWidget.hh @@ -68,13 +68,13 @@ class Vec4DWidget : public TypeWidget { ~Vec4DWidget (); /// Convert current value to string - QString toValue (); + QString toValue () override; /// Read value from string - void fromValue (QString _from); + void fromValue (QString _from) override; /// Reset to default - void toDefault (); + void toDefault () override; private slots: void editingFinished (); -- 2.22.0