From 70fd0be830a8ff23d46afd6b08a063a867eb7200 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Wed, 23 Mar 2016 17:27:17 +0200 Subject: [PATCH] Use Q_REQUIRED_RESULT where it make sense. --HG-- branch : develop --- .../tape/dialogs/configpages/tapeconfigurationpage.h | 6 +++--- src/app/tape/dialogs/configpages/tapepathpage.h | 2 +- src/app/tape/dialogs/dialogmdatabase.h | 2 +- src/app/tape/tmainwindow.h | 2 +- src/app/valentina/core/vformulaproperty.h | 3 ++- .../valentina/dialogs/configpages/communitypage.h | 6 +++--- .../dialogs/configpages/configurationpage.h | 12 ++++++------ src/app/valentina/dialogs/configpages/pathpage.h | 2 +- src/app/valentina/dialogs/configpages/patternpage.h | 6 +++--- src/libs/ifc/exception/vexception.h | 2 +- src/libs/qmuparser/qmudef.h | 1 + src/libs/qmuparser/qmuparsercallback.h | 2 +- src/libs/qmuparser/qmuparsererror.h | 2 +- src/libs/vdxf/dxfdef.h | 1 + src/libs/vlayout/vlayoutdetail.h | 2 +- src/libs/vlayout/vlayoutgenerator.h | 6 +++--- src/libs/vlayout/vlayoutpaper.h | 4 ++-- src/libs/vmisc/def.h | 1 + src/libs/vpropertyexplorer/plugins/vemptyproperty.h | 3 ++- src/libs/vpropertyexplorer/plugins/venumproperty.h | 3 ++- src/libs/vpropertyexplorer/plugins/vfileproperty.h | 3 ++- .../vpropertyexplorer/plugins/vlinecolorproperty.h | 3 ++- .../vpropertyexplorer/plugins/vlinetypeproperty.h | 3 ++- src/libs/vpropertyexplorer/plugins/vnumberproperty.h | 3 ++- src/libs/vpropertyexplorer/plugins/vobjectproperty.h | 3 ++- src/libs/vpropertyexplorer/plugins/vpointfproperty.h | 3 ++- .../vpropertyexplorer/plugins/vshortcutproperty.h | 3 ++- src/libs/vpropertyexplorer/plugins/vstringproperty.h | 3 ++- src/libs/vpropertyexplorer/plugins/vwidgetproperty.h | 3 ++- src/libs/vpropertyexplorer/vproperty.h | 2 +- src/libs/vpropertyexplorer/vpropertymodel.h | 2 +- src/libs/vpropertyexplorer/vpropertyset.h | 2 +- .../vpropertyexplorer/vstandardpropertyfactory.h | 2 +- .../toolsinglepoint/toolcut/vtoolcutsplinepath.cpp | 4 ++-- .../toolsinglepoint/toolcut/vtoolcutsplinepath.h | 3 ++- 35 files changed, 63 insertions(+), 47 deletions(-) diff --git a/src/app/tape/dialogs/configpages/tapeconfigurationpage.h b/src/app/tape/dialogs/configpages/tapeconfigurationpage.h index 45e792433..b21760a67 100644 --- a/src/app/tape/dialogs/configpages/tapeconfigurationpage.h +++ b/src/app/tape/dialogs/configpages/tapeconfigurationpage.h @@ -86,9 +86,9 @@ private: QComboBox *defHeightCombo; QComboBox *defSizeCombo; - QGroupBox *LangGroup(); - QGroupBox *PMSystemGroup(); - QGroupBox *GradationGroup(); + QGroupBox *LangGroup() Q_REQUIRED_RESULT; + QGroupBox *PMSystemGroup() Q_REQUIRED_RESULT; + QGroupBox *GradationGroup() Q_REQUIRED_RESULT; void SetLabelComboBox(const QStringList &list); void RetranslateUi(); }; diff --git a/src/app/tape/dialogs/configpages/tapepathpage.h b/src/app/tape/dialogs/configpages/tapepathpage.h index 5d9930f21..d6a2b75fe 100644 --- a/src/app/tape/dialogs/configpages/tapepathpage.h +++ b/src/app/tape/dialogs/configpages/tapepathpage.h @@ -55,7 +55,7 @@ private: QTableWidget *pathTable; QGroupBox *pathGroup; - QGroupBox *PathGroup(); + QGroupBox *PathGroup() Q_REQUIRED_RESULT; void InitTable(); void RetranslateUi(); }; diff --git a/src/app/tape/dialogs/dialogmdatabase.h b/src/app/tape/dialogs/dialogmdatabase.h index c82ea6c5b..d933a2450 100644 --- a/src/app/tape/dialogs/dialogmdatabase.h +++ b/src/app/tape/dialogs/dialogmdatabase.h @@ -91,7 +91,7 @@ private: void InitGroup(QTreeWidgetItem **group, const QString &groupName, const QStringList &mList, const QStringList &list = QStringList()); - QTreeWidgetItem *AddGroup(const QString &text); + QTreeWidgetItem *AddGroup(const QString &text) Q_REQUIRED_RESULT; void AddMeasurement(QTreeWidgetItem *group, const QString &name, const QStringList &list); void ReadSettings(); diff --git a/src/app/tape/tmainwindow.h b/src/app/tape/tmainwindow.h index 49704b1c3..241ee05e3 100644 --- a/src/app/tape/tmainwindow.h +++ b/src/app/tape/tmainwindow.h @@ -178,7 +178,7 @@ private: QTableWidgetItem *AddCell(const QString &text, int row, int column, int aligment, bool ok = true); - QComboBox *SetGradationList(QLabel *label, const QStringList &list); + QComboBox *SetGradationList(QLabel *label, const QStringList &list) Q_REQUIRED_RESULT; void SetDefaultHeight(int value); void SetDefaultSize(int value); diff --git a/src/app/valentina/core/vformulaproperty.h b/src/app/valentina/core/vformulaproperty.h index 73eb251b7..e6c5dcf6f 100644 --- a/src/app/valentina/core/vformulaproperty.h +++ b/src/app/valentina/core/vformulaproperty.h @@ -67,7 +67,8 @@ public: //! \param container If a property is being passed here, no new VProperty is being created but instead it is tried //! to fill all the data into container. This can also be used when subclassing this function. //! \return Returns the newly created property (or container, if it was not NULL) - virtual VProperty* clone(bool include_children = true, VProperty* container = NULL) const Q_DECL_OVERRIDE; + virtual VProperty* clone(bool include_children = true, + VProperty* container = nullptr) const Q_DECL_OVERRIDE Q_REQUIRED_RESULT; //! Sets the value of the property virtual void setValue(const QVariant& value) Q_DECL_OVERRIDE; diff --git a/src/app/valentina/dialogs/configpages/communitypage.h b/src/app/valentina/dialogs/configpages/communitypage.h index 79b431bc7..bce521213 100644 --- a/src/app/valentina/dialogs/configpages/communitypage.h +++ b/src/app/valentina/dialogs/configpages/communitypage.h @@ -85,9 +85,9 @@ private: void ProxyCheckChanged(); void PasswordCheckChanged(); - QGroupBox *ServerGroup(); - QGroupBox *ProxyGroup(); - QGroupBox *UserGroup(); + QGroupBox *ServerGroup() Q_REQUIRED_RESULT; + QGroupBox *ProxyGroup() Q_REQUIRED_RESULT; + QGroupBox *UserGroup() Q_REQUIRED_RESULT; void RetranslateUi(); }; diff --git a/src/app/valentina/dialogs/configpages/configurationpage.h b/src/app/valentina/dialogs/configpages/configurationpage.h index 69cdc308f..fa3167a8e 100644 --- a/src/app/valentina/dialogs/configpages/configurationpage.h +++ b/src/app/valentina/dialogs/configpages/configurationpage.h @@ -90,12 +90,12 @@ private: QGroupBox *drawGroup; QGroupBox *toolBarGroup; - QGroupBox *SaveGroup(); - QGroupBox *LangGroup(); - QGroupBox *PMSystemGroup(); - QGroupBox *SendGroup(); - QGroupBox *DrawGroup(); - QGroupBox *ToolBarGroup(); + QGroupBox *SaveGroup() Q_REQUIRED_RESULT; + QGroupBox *LangGroup() Q_REQUIRED_RESULT; + QGroupBox *PMSystemGroup() Q_REQUIRED_RESULT; + QGroupBox *SendGroup() Q_REQUIRED_RESULT; + QGroupBox *DrawGroup() Q_REQUIRED_RESULT; + QGroupBox *ToolBarGroup() Q_REQUIRED_RESULT; void SetLabelComboBox(const QStringList &list); void RetranslateUi(); diff --git a/src/app/valentina/dialogs/configpages/pathpage.h b/src/app/valentina/dialogs/configpages/pathpage.h index f89be0add..9145a82aa 100644 --- a/src/app/valentina/dialogs/configpages/pathpage.h +++ b/src/app/valentina/dialogs/configpages/pathpage.h @@ -55,7 +55,7 @@ private: QTableWidget *pathTable; QGroupBox *pathGroup; - QGroupBox *PathGroup(); + QGroupBox *PathGroup() Q_REQUIRED_RESULT; void InitTable(); void RetranslateUi(); }; diff --git a/src/app/valentina/dialogs/configpages/patternpage.h b/src/app/valentina/dialogs/configpages/patternpage.h index 9aa2f49ae..da28f7e46 100644 --- a/src/app/valentina/dialogs/configpages/patternpage.h +++ b/src/app/valentina/dialogs/configpages/patternpage.h @@ -56,9 +56,9 @@ private: QGroupBox *undoGroup; QSpinBox *undoCount; QLabel *countStepsLabel; - QGroupBox *UserGroup(); - QGroupBox *GraphOutputGroup(); - QGroupBox *UndoGroup(); + QGroupBox *UserGroup() Q_REQUIRED_RESULT; + QGroupBox *GraphOutputGroup() Q_REQUIRED_RESULT; + QGroupBox *UndoGroup() Q_REQUIRED_RESULT; void RetranslateUi(); }; diff --git a/src/libs/ifc/exception/vexception.h b/src/libs/ifc/exception/vexception.h index 2dde2b6aa..c3fb3e056 100644 --- a/src/libs/ifc/exception/vexception.h +++ b/src/libs/ifc/exception/vexception.h @@ -48,7 +48,7 @@ public: Q_NORETURN virtual void raise() const Q_DECL_OVERRIDE; // cppcheck-suppress unusedFunction - virtual VException *clone() const Q_DECL_OVERRIDE; + virtual VException *clone() const Q_DECL_OVERRIDE Q_REQUIRED_RESULT; virtual QString ErrorMessage() const; virtual QString DetailedInformation() const; QString WhatUtf8() const V_NOEXCEPT_EXPR (true); diff --git a/src/libs/qmuparser/qmudef.h b/src/libs/qmuparser/qmudef.h index 97ab8f76b..6516326e0 100644 --- a/src/libs/qmuparser/qmudef.h +++ b/src/libs/qmuparser/qmudef.h @@ -42,6 +42,7 @@ inline QString NameRegExp() #pragma GCC diagnostic pop #endif +static inline bool QmuFuzzyComparePossibleNulls(double p1, double p2) Q_REQUIRED_RESULT; static inline bool QmuFuzzyComparePossibleNulls(double p1, double p2) { if(qFuzzyIsNull(p1)) diff --git a/src/libs/qmuparser/qmuparsercallback.h b/src/libs/qmuparser/qmuparsercallback.h index c959050ba..001a3ce9b 100644 --- a/src/libs/qmuparser/qmuparsercallback.h +++ b/src/libs/qmuparser/qmuparsercallback.h @@ -78,7 +78,7 @@ public: QmuParserCallback(const QmuParserCallback &a_Fun); QmuParserCallback &operator=(const QmuParserCallback &a_Fun); - QmuParserCallback* Clone() const; + QmuParserCallback* Clone() const Q_REQUIRED_RESULT; bool IsOptimizable() const; void* GetAddr() const; ECmdCode GetCode() const; diff --git a/src/libs/qmuparser/qmuparsererror.h b/src/libs/qmuparser/qmuparsererror.h index a9e473553..f0dfb1a38 100644 --- a/src/libs/qmuparser/qmuparsererror.h +++ b/src/libs/qmuparser/qmuparsererror.h @@ -150,7 +150,7 @@ public: const QString& GetToken() const; EErrorCodes GetCode() const; Q_NORETURN virtual void raise() const Q_DECL_OVERRIDE; - virtual QmuParserError *clone() const Q_DECL_OVERRIDE; + virtual QmuParserError *clone() const Q_DECL_OVERRIDE Q_REQUIRED_RESULT; private: QString m_sMsg; ///< The message string QString m_sExpr; ///< Formula string diff --git a/src/libs/vdxf/dxfdef.h b/src/libs/vdxf/dxfdef.h index 234db98d8..c62eb0f11 100644 --- a/src/libs/vdxf/dxfdef.h +++ b/src/libs/vdxf/dxfdef.h @@ -40,6 +40,7 @@ enum class VarMeasurement : unsigned char { English=0, Metric=1 }; //Default drawing units for AutoCAD DesignCenter blocks: enum class VarInsunits : unsigned char { Inches=1, Millimeters=4, Centimeters=5 }; +static inline bool DL_FuzzyComparePossibleNulls(double p1, double p2) Q_REQUIRED_RESULT; static inline bool DL_FuzzyComparePossibleNulls(double p1, double p2) { if(qFuzzyIsNull(p1)) diff --git a/src/libs/vlayout/vlayoutdetail.h b/src/libs/vlayout/vlayoutdetail.h index ebb15472c..b82bf7bb8 100644 --- a/src/libs/vlayout/vlayoutdetail.h +++ b/src/libs/vlayout/vlayoutdetail.h @@ -77,7 +77,7 @@ public: bool isNull() const; qint64 Square() const; QPainterPath ContourPath() const; - QGraphicsItem *GetItem() const; + QGraphicsItem *GetItem() const Q_REQUIRED_RESULT; private: QSharedDataPointer d; diff --git a/src/libs/vlayout/vlayoutgenerator.h b/src/libs/vlayout/vlayoutgenerator.h index b5261cc1d..e0fa20d82 100644 --- a/src/libs/vlayout/vlayoutgenerator.h +++ b/src/libs/vlayout/vlayoutgenerator.h @@ -50,7 +50,7 @@ class VLayoutGenerator :public QObject { Q_OBJECT public: - explicit VLayoutGenerator(QObject *parent = 0); + explicit VLayoutGenerator(QObject *parent = nullptr); virtual ~VLayoutGenerator() Q_DECL_OVERRIDE; void SetDetails(const QVector &details); @@ -74,8 +74,8 @@ public: LayoutErrors State() const; - QList GetPapersItems() const; - QList> GetAllDetails() const; + QList GetPapersItems() const Q_REQUIRED_RESULT; + QList> GetAllDetails() const Q_REQUIRED_RESULT; bool GetRotate() const; void SetRotate(bool value); diff --git a/src/libs/vlayout/vlayoutpaper.h b/src/libs/vlayout/vlayoutpaper.h index 42c956a10..1a51186d5 100644 --- a/src/libs/vlayout/vlayoutpaper.h +++ b/src/libs/vlayout/vlayoutpaper.h @@ -73,8 +73,8 @@ public: bool ArrangeDetail(const VLayoutDetail &detail, volatile bool &stop); int Count() const; - QGraphicsRectItem *GetPaperItem(bool autoCrop) const; - QList GetItemDetails() const; + QGraphicsRectItem *GetPaperItem(bool autoCrop) const Q_REQUIRED_RESULT; + QList GetItemDetails() const Q_REQUIRED_RESULT; QVector GetDetails() const; void SetDetails(const QList& details); diff --git a/src/libs/vmisc/def.h b/src/libs/vmisc/def.h index cdd2b5c4c..b3960019a 100644 --- a/src/libs/vmisc/def.h +++ b/src/libs/vmisc/def.h @@ -606,6 +606,7 @@ QSharedPointer DefaultPrinter(); QPixmap darkenPixmap(const QPixmap &pixmap); +static inline bool VFuzzyComparePossibleNulls(double p1, double p2) Q_REQUIRED_RESULT; static inline bool VFuzzyComparePossibleNulls(double p1, double p2) { if(qFuzzyIsNull(p1)) diff --git a/src/libs/vpropertyexplorer/plugins/vemptyproperty.h b/src/libs/vpropertyexplorer/plugins/vemptyproperty.h index 5f8c41803..c526c70c0 100644 --- a/src/libs/vpropertyexplorer/plugins/vemptyproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vemptyproperty.h @@ -61,7 +61,8 @@ public: //! \param container If a property is being passed here, no new VProperty is being created but instead it is tried //! to fill all the data into container. This can also be used when subclassing this function. //! \return Returns the newly created property (or container, if it was not NULL) - virtual VProperty* clone(bool include_children = true, VProperty* container = NULL) const Q_DECL_OVERRIDE; + virtual VProperty* clone(bool include_children = true, + VProperty* container = nullptr) const Q_DECL_OVERRIDE Q_REQUIRED_RESULT; protected: //! Protected constructor diff --git a/src/libs/vpropertyexplorer/plugins/venumproperty.h b/src/libs/vpropertyexplorer/plugins/venumproperty.h index 8e11375cc..4e7b12ad9 100644 --- a/src/libs/vpropertyexplorer/plugins/venumproperty.h +++ b/src/libs/vpropertyexplorer/plugins/venumproperty.h @@ -69,7 +69,8 @@ public: //! \param container If a property is being passed here, no new VProperty is being created but instead it is tried //! to fill all the data into container. This can also be used when subclassing this function. //! \return Returns the newly created property (or container, if it was not NULL) - virtual VProperty* clone(bool include_children = true, VProperty* container = nullptr) const Q_DECL_OVERRIDE; + virtual VProperty* clone(bool include_children = true, + VProperty* container = nullptr) const Q_DECL_OVERRIDE Q_REQUIRED_RESULT; //! Sets the settings. Available settings: //! diff --git a/src/libs/vpropertyexplorer/plugins/vfileproperty.h b/src/libs/vpropertyexplorer/plugins/vfileproperty.h index 5eb7681d9..244020e8c 100644 --- a/src/libs/vpropertyexplorer/plugins/vfileproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vfileproperty.h @@ -87,7 +87,8 @@ public: //! \param container If a property is being passed here, no new VProperty is being created but instead it is tried //! to fill all the data into container. This can also be used when subclassing this function. //! \return Returns the newly created property (or container, if it was not NULL) - virtual VProperty* clone(bool include_children = true, VProperty* container = nullptr) const Q_DECL_OVERRIDE; + virtual VProperty* clone(bool include_children = true, + VProperty* container = nullptr) const Q_DECL_OVERRIDE Q_REQUIRED_RESULT; //! Returns whether this is a file (false) or a directory (true) virtual bool isDirectory() const; diff --git a/src/libs/vpropertyexplorer/plugins/vlinecolorproperty.h b/src/libs/vpropertyexplorer/plugins/vlinecolorproperty.h index 017b60c86..654cc58df 100644 --- a/src/libs/vpropertyexplorer/plugins/vlinecolorproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vlinecolorproperty.h @@ -78,7 +78,8 @@ public: //! \param container If a property is being passed here, no new VProperty is being created but instead it is tried //! to fill all the data into container. This can also be used when subclassing this function. //! \return Returns the newly created property (or container, if it was not NULL) - virtual VProperty* clone(bool include_children = true, VProperty* container = nullptr) const Q_DECL_OVERRIDE; + virtual VProperty* clone(bool include_children = true, + VProperty* container = nullptr) const Q_DECL_OVERRIDE Q_REQUIRED_RESULT; static int IndexOfColor(const QMap &colors, const QString &color); diff --git a/src/libs/vpropertyexplorer/plugins/vlinetypeproperty.h b/src/libs/vpropertyexplorer/plugins/vlinetypeproperty.h index cb10616d0..50722e73f 100644 --- a/src/libs/vpropertyexplorer/plugins/vlinetypeproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vlinetypeproperty.h @@ -79,7 +79,8 @@ public: //! \param container If a property is being passed here, no new VProperty is being created but instead it is tried //! to fill all the data into container. This can also be used when subclassing this function. //! \return Returns the newly created property (or container, if it was not NULL) - virtual VProperty* clone(bool include_children = true, VProperty* container = nullptr) const Q_DECL_OVERRIDE; + virtual VProperty* clone(bool include_children = true, + VProperty* container = nullptr) const Q_DECL_OVERRIDE Q_REQUIRED_RESULT; static int IndexOfStyle(const QMap &styles, const QString &style); diff --git a/src/libs/vpropertyexplorer/plugins/vnumberproperty.h b/src/libs/vpropertyexplorer/plugins/vnumberproperty.h index 9c2a81762..e9ecc3209 100644 --- a/src/libs/vpropertyexplorer/plugins/vnumberproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vnumberproperty.h @@ -68,7 +68,8 @@ public: //! \param container If a property is being passed here, no new VProperty is being created but instead it is tried //! to fill all the data into container. This can also be used when subclassing this function. //! \return Returns the newly created property (or container, if it was not NULL) - virtual VProperty* clone(bool include_children = true, VProperty* container = NULL) const Q_DECL_OVERRIDE; + virtual VProperty* clone(bool include_children = true, + VProperty* container = nullptr) const Q_DECL_OVERRIDE Q_REQUIRED_RESULT; public slots: void valueChanged(int i); protected: diff --git a/src/libs/vpropertyexplorer/plugins/vobjectproperty.h b/src/libs/vpropertyexplorer/plugins/vobjectproperty.h index 50d3d1cfd..3a7bf4c0d 100644 --- a/src/libs/vpropertyexplorer/plugins/vobjectproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vobjectproperty.h @@ -74,7 +74,8 @@ public: //! \param container If a property is being passed here, no new VProperty is being created but instead it is tried //! to fill all the data into container. This can also be used when subclassing this function. //! \return Returns the newly created property (or container, if it was not NULL) - virtual VProperty* clone(bool include_children = true, VProperty* container = nullptr) const Q_DECL_OVERRIDE; + virtual VProperty* clone(bool include_children = true, + VProperty* container = nullptr) const Q_DECL_OVERRIDE Q_REQUIRED_RESULT; public slots: void currentIndexChanged(int index); diff --git a/src/libs/vpropertyexplorer/plugins/vpointfproperty.h b/src/libs/vpropertyexplorer/plugins/vpointfproperty.h index 4ca9b647e..7bcce1f0d 100644 --- a/src/libs/vpropertyexplorer/plugins/vpointfproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vpointfproperty.h @@ -59,7 +59,8 @@ public: //! \param container If a property is being passed here, no new VProperty is being created but instead it is tried //! to fill all the data into container. This can also be used when subclassing this function. //! \return Returns the newly created property (or container, if it was not NULL) - virtual VProperty* clone(bool include_children = true, VProperty* container = NULL) const Q_DECL_OVERRIDE; + virtual VProperty* clone(bool include_children = true, + VProperty* container = nullptr) const Q_DECL_OVERRIDE Q_REQUIRED_RESULT; //! Sets the value of the property virtual void setValue(const QVariant& value) Q_DECL_OVERRIDE; diff --git a/src/libs/vpropertyexplorer/plugins/vshortcutproperty.h b/src/libs/vpropertyexplorer/plugins/vshortcutproperty.h index 0f5a21b79..e785acfb4 100644 --- a/src/libs/vpropertyexplorer/plugins/vshortcutproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vshortcutproperty.h @@ -62,7 +62,8 @@ public: //! \param container If a property is being passed here, no new VProperty is being created but instead it is tried //! to fill all the data into container. This can also be used when subclassing this function. //! \return Returns the newly created property (or container, if it was not NULL) - virtual VProperty* clone(bool include_children = true, VProperty* container = NULL) const Q_DECL_OVERRIDE; + virtual VProperty* clone(bool include_children = true, + VProperty* container = nullptr) const Q_DECL_OVERRIDE Q_REQUIRED_RESULT; //! Sets the value of the property virtual void setValue(const QVariant& value) Q_DECL_OVERRIDE; diff --git a/src/libs/vpropertyexplorer/plugins/vstringproperty.h b/src/libs/vpropertyexplorer/plugins/vstringproperty.h index 70fba1b24..b10d03dc9 100644 --- a/src/libs/vpropertyexplorer/plugins/vstringproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vstringproperty.h @@ -68,7 +68,8 @@ public: //! \param container If a property is being passed here, no new VProperty is being created but instead it is tried //! to fill all the data into container. This can also be used when subclassing this function. //! \return Returns the newly created property (or container, if it was not NULL) - virtual VProperty* clone(bool include_children = true, VProperty* container = nullptr) const Q_DECL_OVERRIDE; + virtual VProperty* clone(bool include_children = true, + VProperty* container = nullptr) const Q_DECL_OVERRIDE Q_REQUIRED_RESULT; virtual void UpdateParent(const QVariant &value) Q_DECL_OVERRIDE; diff --git a/src/libs/vpropertyexplorer/plugins/vwidgetproperty.h b/src/libs/vpropertyexplorer/plugins/vwidgetproperty.h index e110dc44c..1e6943eba 100644 --- a/src/libs/vpropertyexplorer/plugins/vwidgetproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vwidgetproperty.h @@ -58,7 +58,8 @@ public: //! \param container If a property is being passed here, no new VProperty is being created but instead it is tried //! to fill all the data into container. This can also be used when subclassing this function. //! \return Returns the newly created property (or container, if it was not NULL) - virtual VProperty* clone(bool include_children = true, VProperty* container = nullptr) const Q_DECL_OVERRIDE; + virtual VProperty* clone(bool include_children = true, + VProperty* container = nullptr) const Q_DECL_OVERRIDE Q_REQUIRED_RESULT; }; } diff --git a/src/libs/vpropertyexplorer/vproperty.h b/src/libs/vpropertyexplorer/vproperty.h index 951ff3b12..9ac6cc8be 100644 --- a/src/libs/vpropertyexplorer/vproperty.h +++ b/src/libs/vpropertyexplorer/vproperty.h @@ -190,7 +190,7 @@ public: //! \param container If a property is being passed here, no new VProperty is being created but instead it is tried //! to fill all the data into container. This can also be used when subclassing this function. //! \return Returns the newly created property (or container, if it was not NULL) - virtual VProperty* clone(bool include_children = true, VProperty* container = nullptr) const; + virtual VProperty* clone(bool include_children = true, VProperty* container = nullptr) const Q_REQUIRED_RESULT; Property propertyType() const; void setPropertyType(const Property &type); diff --git a/src/libs/vpropertyexplorer/vpropertymodel.h b/src/libs/vpropertyexplorer/vpropertymodel.h index 98a3bf1c6..aebb5938f 100644 --- a/src/libs/vpropertyexplorer/vpropertymodel.h +++ b/src/libs/vpropertyexplorer/vpropertymodel.h @@ -58,7 +58,7 @@ class VPROPERTYEXPLORERSHARED_EXPORT VPropertyModel : public QAbstractItemModel { Q_OBJECT public: - explicit VPropertyModel(QObject * parent = 0); + explicit VPropertyModel(QObject * parent = nullptr); virtual ~VPropertyModel() Q_DECL_OVERRIDE; //! Adds the property to the model and attaches it to the parentid diff --git a/src/libs/vpropertyexplorer/vpropertyset.h b/src/libs/vpropertyexplorer/vpropertyset.h index 151a99338..0868a3916 100644 --- a/src/libs/vpropertyexplorer/vpropertyset.h +++ b/src/libs/vpropertyexplorer/vpropertyset.h @@ -113,7 +113,7 @@ public: int getRootPropertyCount() const; //! Clones the property set - VPropertySet* clone() const; + VPropertySet* clone() const Q_REQUIRED_RESULT; protected: //! Checks whether a property belongs to this set and returns the result diff --git a/src/libs/vpropertyexplorer/vstandardpropertyfactory.h b/src/libs/vpropertyexplorer/vstandardpropertyfactory.h index 4c4dd6261..1c07ccf2e 100644 --- a/src/libs/vpropertyexplorer/vstandardpropertyfactory.h +++ b/src/libs/vpropertyexplorer/vstandardpropertyfactory.h @@ -46,7 +46,7 @@ public: //! Creates a new property of a certain type and assigns a name and description (otionally) //! \param type The type of the property as string //! \return Returns the created property or NULL if it couldn't be be created - virtual VProperty* createProperty(const QString& type, const QString &name) Q_DECL_OVERRIDE; + virtual VProperty* createProperty(const QString& type, const QString &name) Q_DECL_OVERRIDE Q_REQUIRED_RESULT; }; } diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp index 6b333664e..d432dafe4 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.cpp @@ -94,8 +94,8 @@ VToolCutSplinePath* VToolCutSplinePath::Create(DialogTool *dialog, VMainGraphics QString formula = dialogTool->GetFormula(); const quint32 splinePathId = dialogTool->getSplinePathId(); const QString color = dialogTool->GetColor(); - VToolCutSplinePath* point = Create(0, pointName, formula, splinePathId, 5, 10, color, scene, doc, data, Document::FullParse, - Source::FromGui); + VToolCutSplinePath* point = Create(0, pointName, formula, splinePathId, 5, 10, color, scene, doc, data, + Document::FullParse, Source::FromGui); if (point != nullptr) { point->dialog=dialogTool; diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.h b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.h index a025849ca..fab09cf05 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.h +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.h @@ -61,7 +61,8 @@ public: virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE; static VPointF *CutSplinePath(qreal length, const QSharedPointer &splPath, - const QString &pName, VSplinePath **splPath1, VSplinePath **splPath2); + const QString &pName, VSplinePath **splPath1, + VSplinePath **splPath2) Q_REQUIRED_RESULT; protected: virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ) Q_DECL_OVERRIDE; virtual void SaveDialog(QDomElement &domElement) Q_DECL_OVERRIDE;