Use Q_REQUIRED_RESULT where it make sense.
--HG-- branch : develop
This commit is contained in:
parent
be7277eeba
commit
70fd0be830
|
@ -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();
|
||||
};
|
||||
|
|
|
@ -55,7 +55,7 @@ private:
|
|||
QTableWidget *pathTable;
|
||||
QGroupBox *pathGroup;
|
||||
|
||||
QGroupBox *PathGroup();
|
||||
QGroupBox *PathGroup() Q_REQUIRED_RESULT;
|
||||
void InitTable();
|
||||
void RetranslateUi();
|
||||
};
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
};
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -55,7 +55,7 @@ private:
|
|||
QTableWidget *pathTable;
|
||||
QGroupBox *pathGroup;
|
||||
|
||||
QGroupBox *PathGroup();
|
||||
QGroupBox *PathGroup() Q_REQUIRED_RESULT;
|
||||
void InitTable();
|
||||
void RetranslateUi();
|
||||
};
|
||||
|
|
|
@ -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();
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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<VLayoutDetailData> d;
|
||||
|
|
|
@ -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<VLayoutDetail> &details);
|
||||
|
@ -74,8 +74,8 @@ public:
|
|||
|
||||
LayoutErrors State() const;
|
||||
|
||||
QList<QGraphicsItem *> GetPapersItems() const;
|
||||
QList<QList<QGraphicsItem *>> GetAllDetails() const;
|
||||
QList<QGraphicsItem *> GetPapersItems() const Q_REQUIRED_RESULT;
|
||||
QList<QList<QGraphicsItem *>> GetAllDetails() const Q_REQUIRED_RESULT;
|
||||
|
||||
bool GetRotate() const;
|
||||
void SetRotate(bool value);
|
||||
|
|
|
@ -73,8 +73,8 @@ public:
|
|||
|
||||
bool ArrangeDetail(const VLayoutDetail &detail, volatile bool &stop);
|
||||
int Count() const;
|
||||
QGraphicsRectItem *GetPaperItem(bool autoCrop) const;
|
||||
QList<QGraphicsItem *> GetItemDetails() const;
|
||||
QGraphicsRectItem *GetPaperItem(bool autoCrop) const Q_REQUIRED_RESULT;
|
||||
QList<QGraphicsItem *> GetItemDetails() const Q_REQUIRED_RESULT;
|
||||
|
||||
QVector<VLayoutDetail> GetDetails() const;
|
||||
void SetDetails(const QList<VLayoutDetail>& details);
|
||||
|
|
|
@ -606,6 +606,7 @@ QSharedPointer<QPrinter> 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))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
//!
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<QString, QString> &colors, const QString &color);
|
||||
|
||||
|
|
|
@ -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<QString, QIcon> &styles, const QString &style);
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -61,7 +61,8 @@ public:
|
|||
virtual void ShowVisualization(bool show) Q_DECL_OVERRIDE;
|
||||
|
||||
static VPointF *CutSplinePath(qreal length, const QSharedPointer<VAbstractCubicBezierPath> &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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user