GCC warnings.

This commit is contained in:
Roman Telezhynskyi 2021-09-25 17:18:33 +03:00
parent f711f8aac1
commit b861d6a28e
59 changed files with 214 additions and 201 deletions

View File

@ -130,13 +130,16 @@ void FvUpdater::showUpdaterWindowUpdatedWithCurrentUpdateProposal()
// Create a new window
m_updaterWindow = new FvUpdateWindow(VAbstractValApplication::VApp()->getMainWindow());
m_updaterWindow->UpdateWindowWithCurrentProposedUpdate();
m_updaterWindow->exec();
if (m_updaterWindow != nullptr)
{
m_updaterWindow->exec();
}
}
//---------------------------------------------------------------------------------------------------------------------
void FvUpdater::hideUpdaterWindow()
{
if (m_updaterWindow)
if (m_updaterWindow != nullptr)
{
m_updaterWindow->close();
}
@ -352,7 +355,7 @@ void FvUpdater::startDownloadFeed(const QUrl &url)
//---------------------------------------------------------------------------------------------------------------------
void FvUpdater::cancelDownloadFeed()
{
if (m_reply)
if (m_reply != nullptr)
{
m_httpRequestAborted = true;
m_reply->abort();

View File

@ -38,6 +38,7 @@
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
/**
* @brief The VException class parent for all exception. Could be use for abstract exception

View File

@ -38,6 +38,10 @@
#include "vdomdocument.h"
#include "../vmisc/projectversion.h"
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
class VAbstractConverter :public VDomDocument
{
Q_DECLARE_TR_FUNCTIONS(VAbstractConverter)
@ -85,4 +89,6 @@ private:
void ReserveFile() const;
};
QT_WARNING_POP
#endif // VABSTRACTCONVERTER_H

View File

@ -113,56 +113,6 @@ QMUPARSERSHARED_EXPORT QString NameRegExp();
QT_WARNING_POP
#ifndef QMU_ATTRIBUTE_UNUSED
# if defined(Q_CC_GNU) || defined(Q_CC_CLANG)
# define QMU_ATTRIBUTE_UNUSED [[gnu::unused]]
#elif defined(Q_CC_MSVC)
# define QMU_ATTRIBUTE_UNUSED __declspec(unused)
# else
# define QMU_ATTRIBUTE_UNUSED
# endif
#endif
// Example of use
//class Base
//{
// virtual ~Base()
// {
// }
// virtual int a(float f)
// {
// }
// virtual void b(double)
// {
// }
//};
//QMU_MARK_NONFINAL_CLASS(Base)
//QMU_ATTRIBUTE_UNUSED(Base, int, a(float))
//QMU_ATTRIBUTE_UNUSED(Base, void, b(double)
#ifndef QMU_MARK_NONFINAL_CLASS
#define QMU_MARK_NONFINAL_CLASS(base) \
namespace qmu_void_namespace_for_class_##base \
{ \
struct QMU_ATTRIBUTE_UNUSED temp_marker final : base \
{ \
}; \
}
#endif
#ifndef QMU_MARK_NONFINAL_METHOD
#define QMU_MARK_NONFINAL_METHOD(base, return_type, method) \
namespace qmu_void_namespace_for_class_##base##_methos_##method \
{ \
struct QMU_ATTRIBUTE_UNUSED temp_marker final : base \
{ \
inline return_type QMU_ATTRIBUTE_UNUSED method override {} \
}; \
}
#endif
Q_REQUIRED_RESULT static inline bool QmuFuzzyComparePossibleNulls(double p1, double p2);
static inline bool QmuFuzzyComparePossibleNulls(double p1, double p2)
{

View File

@ -37,6 +37,9 @@
namespace qmu
{
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
/** @brief Mathematical expressions parser.
*
* Standard implementation of the mathematical expressions parser.
@ -99,7 +102,7 @@ namespace qmu
static qreal Max(const qreal*, int); // maximum
};
QMU_MARK_NONFINAL_CLASS(QmuParser)
QT_WARNING_POP
//---------------------------------------------------------------------------------------------------------------------
/**

View File

@ -52,6 +52,10 @@ namespace qmu
* @brief This file contains the class definition of the qmuparser engine.
*/
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
/**
* @brief Mathematical expressions parser (base parser engine).
* @author (C) 2013 Ingo Berg
@ -279,6 +283,8 @@ private:
void StackDump(const QStack<token_type > &a_stVal, const QStack<token_type > &a_stOprt) const;
};
QT_WARNING_POP
//---------------------------------------------------------------------------------------------------------------------
/**
* @fn void qmu::QmuParserBase::DefineFun(const string_type &a_strName, fun_type0 a_pFun,

View File

@ -33,6 +33,9 @@
namespace qmu
{
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
class QMUPARSERSHARED_EXPORT QmuTokenParser : public QmuFormulaBase
{
public:
@ -50,7 +53,7 @@ private:
QmuTokenParser();
};
QMU_MARK_NONFINAL_CLASS(QmuTokenParser)
QT_WARNING_POP
} // namespace qmu

View File

@ -19,6 +19,10 @@
#include "drw_objects.h"
#include "drw_header.h"
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
/**
* Abstract class (interface) for comunicate dxfReader with the application.
* Inherit your class which takes care of the entities in the
@ -187,4 +191,6 @@ public:
virtual void writeAppId() { }
};
QT_WARNING_POP
#endif

View File

@ -45,6 +45,7 @@ class VSplinePoint;
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
class VAbstractCubicBezierPath : public VAbstractBezier
{

View File

@ -47,6 +47,10 @@ typedef QPair<QLineF, QLineF> DirectionArrow;
class QPainterPath;
class VAbstractCurveData;
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
class VAbstractCurve :public VGObject
{
public:
@ -117,6 +121,8 @@ private:
static QVector<QPointF> ToEnd(const QVector<QPointF> &points, const QPointF &end, bool *ok = nullptr);
};
QT_WARNING_POP
Q_DECLARE_TYPEINFO(VAbstractCurve, Q_MOVABLE_TYPE);
#endif // VABSTRACTCURVE_H

View File

@ -38,7 +38,7 @@ QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor")
class VCubicBezierPathData : public QSharedData
class VCubicBezierPathData final : public QSharedData
{
public:

View File

@ -45,6 +45,10 @@ class QRectF;
class VGObjectData;
class QTransform;
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
/**
* @brief The VGObject class keep information graphical objects.
*/
@ -120,6 +124,8 @@ private:
static int PointInCircle (const QPointF &p, const QPointF &center, qreal radius);
};
QT_WARNING_POP
Q_DECLARE_TYPEINFO(VGObject, Q_MOVABLE_TYPE);
#endif // VGOBJECT_H

View File

@ -44,6 +44,7 @@ class VPointFData;
QT_WARNING_PUSH
QT_WARNING_DISABLE_INTEL(2304)
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
/**
* @brief The VPointF class keep data of point.
@ -97,7 +98,6 @@ private:
Q_DECLARE_METATYPE(VPointF)
Q_DECLARE_TYPEINFO(VPointF, Q_MOVABLE_TYPE);
V_MARK_NONFINAL_CLASS(VPointF)
QT_WARNING_POP

View File

@ -48,7 +48,7 @@ class VSplineData;
/**
* @brief VSpline class that implements the spline.
*/
class VSpline :public VAbstractCubicBezier
class VSpline final :public VAbstractCubicBezier
{
public:
VSpline();

View File

@ -50,7 +50,7 @@ class VSplinePathData;
/**
* @brief The VSplinePath class keep information about splinePath.
*/
class VSplinePath :public VAbstractCubicBezierPath
class VSplinePath final :public VAbstractCubicBezierPath
{
Q_DECLARE_TR_FUNCTIONS(VSplinePath)
public:

View File

@ -39,13 +39,13 @@
class VBestSquareData;
class VBestSquare
class VBestSquare final
{
public:
VBestSquare();
VBestSquare(QSizeF sheetSize, bool saveLength, bool isPortrait);
VBestSquare(const VBestSquare &res);
virtual ~VBestSquare();
~VBestSquare();
VBestSquare &operator=(const VBestSquare &res);
#ifdef Q_COMPILER_RVALUE_REFS

View File

@ -56,6 +56,10 @@ class VPieceLabelData;
class VAbstractPattern;
class VPatternLabelData;
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
class VLayoutPiece :public VAbstractPiece
{
Q_DECLARE_TR_FUNCTIONS(VLayoutPiece)
@ -218,6 +222,8 @@ private:
int EdgeByPoint(const QVector<QPointF> &path, const QPointF &p1) const;
};
QT_WARNING_POP
Q_DECLARE_TYPEINFO(VLayoutPiece, Q_MOVABLE_TYPE);
#endif // VLAYOUTDETAIL_H

View File

@ -72,9 +72,9 @@ public:
VPosition(const VPosition&) = default;
VPosition& operator=(const VPosition&) = default;
VPosition& operator=(VPosition&&) = default;
virtual ~VPosition()= default;
~VPosition()= default;
virtual void run();
void run();
VBestSquare getBestResult() const;

View File

@ -354,56 +354,6 @@ if (!(cond)) \
#endif // defined(__cplusplus)
#endif // QT_VERSION < QT_VERSION_CHECK(5, 8, 0)
#ifndef V_ATTRIBUTE_UNUSED
# if defined(Q_CC_GNU) || defined(Q_CC_CLANG)
# define V_ATTRIBUTE_UNUSED [[gnu::unused]]
#elif defined(Q_CC_MSVC)
# define V_ATTRIBUTE_UNUSED __declspec(unused)
# else
# define V_ATTRIBUTE_UNUSED
# endif
#endif
// Example of use
//class Base
//{
// virtual ~Base()
// {
// }
// virtual int a(float f)
// {
// }
// virtual void b(double)
// {
// }
//};
//V_MARK_NONFINAL_CLASS(Base)
//V_ATTRIBUTE_UNUSED(Base, int, a(float))
//V_ATTRIBUTE_UNUSED(Base, void, b(double)
#ifndef V_MARK_NONFINAL_CLASS
#define V_MARK_NONFINAL_CLASS(base) \
namespace v_void_namespace_for_class_##base \
{ \
struct V_ATTRIBUTE_UNUSED temp_marker final : base \
{ \
}; \
}
#endif
#ifndef V_MARK_NONFINAL_METHOD
#define V_MARK_NONFINAL_METHOD(base, return_type, method) \
namespace v_void_namespace_for_class_##base##_methos_##method \
{ \
struct V_ATTRIBUTE_UNUSED temp_marker final : base \
{ \
inline return_type V_ATTRIBUTE_UNUSED method override {} \
}; \
}
#endif
bool IsOptionSet(int argc, char *argv[], const char *option);
void InitHighDpiScaling(int argc, char *argv[]);
@ -726,6 +676,10 @@ Q_DECLARE_TYPEINFO(CustomSARecord, Q_MOVABLE_TYPE);
#define QXT_D(PUB) PUB##Private& d = qxt_d()
#define QXT_P(PUB) PUB& p = qxt_p()
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
template <typename PUB>
class QxtPrivate
{
@ -762,6 +716,8 @@ private:
PUB* qxt_p_ptr;
};
QT_WARNING_POP
template <typename PUB, typename PVT>
class QxtPrivateInterface
{

View File

@ -51,6 +51,7 @@ class VCommonSettings;
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
class VAbstractApplication : public QApplication
{

View File

@ -57,7 +57,7 @@ class VInternalVariable;
* result = cal->EvalFormula(data->PlainVariables(), formula);
* }
*/
class Calculator:public qmu::QmuFormulaBase
class Calculator final : public qmu::QmuFormulaBase
{
public:
Calculator();

View File

@ -39,7 +39,7 @@
class VArc;
class VEllipticalArc;
class VArcRadius :public VCurveVariable
class VArcRadius final :public VCurveVariable
{
public:
VArcRadius();

View File

@ -91,14 +91,17 @@ bool VCurveVariable::Filter(quint32 id)
return false;
}
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wnull-dereference")
if (d->parentId != NULL_ID)//Do not check if value zero
{// Not all curves have parents. Only those who was created after cutting the parent curve.
return d->id == id || d->parentId == id;
}
else
{
return d->id == id;
}
return d->id == id;
QT_WARNING_POP
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -38,6 +38,10 @@
class VInternalVariableData;
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
class VInternalVariable
{
public:
@ -73,6 +77,8 @@ private:
QSharedDataPointer<VInternalVariableData> d;
};
QT_WARNING_POP
Q_DECLARE_TYPEINFO(VInternalVariable, Q_MOVABLE_TYPE);
#endif // VINTERNALVARIABLE_H

View File

@ -39,7 +39,7 @@
class VLineAngleData;
class VPointF;
class VLineAngle :public VInternalVariable
class VLineAngle final :public VInternalVariable
{
public:
VLineAngle();

View File

@ -41,7 +41,7 @@
class VLengthLineData;
class VPointF;
class VLengthLine :public VInternalVariable
class VLengthLine final :public VInternalVariable
{
public:
VLengthLine();

View File

@ -47,7 +47,7 @@ class VMeasurementData;
/**
* @brief The VMeasurement class keep data row of multisize table
*/
class VMeasurement :public VVariable
class VMeasurement final :public VVariable
{
public:
VMeasurement(quint32 index, const QString &name, qreal baseA, qreal baseB, qreal baseC, qreal base);

View File

@ -70,6 +70,9 @@ Q_DECLARE_METATYPE(QPE::Vector3D) // todo
*/
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
class VPROPERTYEXPLORERSHARED_EXPORT QVector3DProperty : public VProperty
{
Q_OBJECT
@ -113,7 +116,7 @@ private:
Q_DISABLE_COPY(QVector3DProperty)
};
VPE_MARK_NONFINAL_CLASS(QVector3DProperty)
QT_WARNING_POP
}

View File

@ -36,6 +36,9 @@
namespace VPE
{
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
//! The VBoolProperty can take two states: True or False.
class VPROPERTYEXPLORERSHARED_EXPORT VBoolProperty : public VProperty
{
@ -80,7 +83,7 @@ private:
Q_DISABLE_COPY(VBoolProperty)
};
VPE_MARK_NONFINAL_CLASS(VBoolProperty)
QT_WARNING_POP
}

View File

@ -37,6 +37,9 @@
namespace VPE
{
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
class VPROPERTYEXPLORERSHARED_EXPORT VColorProperty : public VProperty
{
Q_OBJECT
@ -74,7 +77,7 @@ private:
Q_DISABLE_COPY(VColorProperty)
};
VPE_MARK_NONFINAL_CLASS(VColorProperty)
QT_WARNING_POP
}

View File

@ -41,6 +41,9 @@ class VPropertyPrivate;
namespace VPE
{
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
class VPROPERTYEXPLORERSHARED_EXPORT VEmptyProperty : public VProperty
{
Q_OBJECT
@ -87,7 +90,7 @@ private:
Q_DISABLE_COPY(VEmptyProperty)
};
VPE_MARK_NONFINAL_CLASS(VEmptyProperty)
QT_WARNING_POP
}

View File

@ -37,6 +37,10 @@
namespace VPE
{
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
class VPROPERTYEXPLORERSHARED_EXPORT VEnumProperty : public VProperty
{
Q_OBJECT
@ -104,7 +108,7 @@ private:
Q_DISABLE_COPY(VEnumProperty)
};
VPE_MARK_NONFINAL_CLASS(VEnumProperty)
QT_WARNING_POP
}

View File

@ -38,6 +38,10 @@
namespace VPE
{
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
class VPROPERTYEXPLORERSHARED_EXPORT VFileProperty : public VProperty
{
Q_OBJECT
@ -108,7 +112,7 @@ private:
Q_DISABLE_COPY(VFileProperty)
};
VPE_MARK_NONFINAL_CLASS(VFileProperty)
QT_WARNING_POP
}

View File

@ -37,6 +37,8 @@
namespace VPE
{
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
class VPROPERTYEXPLORERSHARED_EXPORT VFileEditWidget : public QWidget
{
@ -113,7 +115,7 @@ private:
Q_DISABLE_COPY(VFileEditWidget)
};
VPE_MARK_NONFINAL_CLASS(VFileEditWidget)
QT_WARNING_POP
}

View File

@ -38,6 +38,8 @@
namespace VPE
{
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
//! Class for holding an integer property
class VPROPERTYEXPLORERSHARED_EXPORT VIntegerProperty : public VProperty
@ -146,7 +148,7 @@ private:
Q_DISABLE_COPY(VDoubleProperty)
};
VPE_MARK_NONFINAL_CLASS(VDoubleProperty)
QT_WARNING_POP
}

View File

@ -36,6 +36,9 @@
namespace VPE
{
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
//! This property can be used to handle key shortcuts
class VPROPERTYEXPLORERSHARED_EXPORT VShortcutProperty : public VProperty
{
@ -81,7 +84,7 @@ private:
Q_DISABLE_COPY(VShortcutProperty)
};
VPE_MARK_NONFINAL_CLASS(VShortcutProperty)
QT_WARNING_POP
}

View File

@ -36,6 +36,9 @@
namespace VPE
{
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
//! Class for holding a text property
class VPROPERTYEXPLORERSHARED_EXPORT VTextProperty : public VProperty
{
@ -86,7 +89,7 @@ private:
Q_DISABLE_COPY(VTextProperty)
};
VPE_MARK_NONFINAL_CLASS(VTextProperty)
QT_WARNING_POP
}

View File

@ -38,6 +38,9 @@ namespace VPE
// todo: this way, this class doesn't really make sense. What we have to do is pass a widget factory instead of the
// actual widget!
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
//! This property holds a QWidget and displays it, if the view supports that. If not, it will behave like an empty
//! property
class VPROPERTYEXPLORERSHARED_EXPORT VWidgetProperty: public VEmptyProperty
@ -67,7 +70,7 @@ public:
VProperty* container = nullptr) const override;
};
VPE_MARK_NONFINAL_CLASS(VWidgetProperty)
QT_WARNING_POP
}

View File

@ -58,6 +58,10 @@ public:
class VPropertyPrivate;
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
class VPROPERTYEXPLORERSHARED_EXPORT VProperty : public QObject
{
Q_OBJECT
@ -226,7 +230,7 @@ private:
Q_DISABLE_COPY(VProperty)
};
VPE_MARK_NONFINAL_CLASS(VProperty)
QT_WARNING_POP
}

View File

@ -30,6 +30,10 @@
namespace VPE
{
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
class VPropertyPrivate
{
public:
@ -86,6 +90,8 @@ private:
Q_DISABLE_COPY(VPropertyPrivate)
};
QT_WARNING_POP
}
#endif // VPROPERTY_P_H

View File

@ -29,54 +29,4 @@
# define VPROPERTYEXPLORERSHARED_EXPORT Q_DECL_IMPORT
#endif
#ifndef VPE_ATTRIBUTE_UNUSED
# if defined(Q_CC_GNU) || defined(Q_CC_CLANG)
# define VPE_ATTRIBUTE_UNUSED [[gnu::unused]]
#elif defined(Q_CC_MSVC)
# define VPE_ATTRIBUTE_UNUSED __declspec(unused)
# else
# define VPE_ATTRIBUTE_UNUSED
# endif
#endif
// Example of use
//class Base
//{
// virtual ~Base()
// {
// }
// virtual int a(float f)
// {
// }
// virtual void b(double)
// {
// }
//};
//VPE_MARK_NONFINAL_CLASS(Base)
//VPE_ATTRIBUTE_UNUSED(Base, int, a(float))
//VPE_ATTRIBUTE_UNUSED(Base, void, b(double)
#ifndef VPE_MARK_NONFINAL_CLASS
#define VPE_MARK_NONFINAL_CLASS(base) \
namespace vpe_void_namespace_for_class_##base \
{ \
struct VPE_ATTRIBUTE_UNUSED temp_marker final : base \
{ \
}; \
}
#endif
#ifndef VPE_MARK_NONFINAL_METHOD
#define VPE_MARK_NONFINAL_METHOD(base, return_type, method) \
namespace vpe_void_namespace_for_class_##base##_methos_##method \
{ \
struct VPE_ATTRIBUTE_UNUSED temp_marker final : base \
{ \
inline return_type VPE_ATTRIBUTE_UNUSED method override {} \
}; \
}
#endif
#endif // VPROPERTYEXPLORER_GLOBAL_H

View File

@ -36,6 +36,10 @@ namespace VPE
class VPropertyModel;
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
//! This class populates a form layout with the properties in a model
class VPROPERTYEXPLORERSHARED_EXPORT VPropertyFormView : public VPropertyFormWidget
{
@ -103,7 +107,7 @@ private:
Q_DISABLE_COPY(VPropertyFormView)
};
VPE_MARK_NONFINAL_CLASS(VPropertyFormView)
QT_WARNING_POP
} // Namespace VPE

View File

@ -41,6 +41,10 @@ namespace VPE
class VPropertyModelPrivate;
class VPropertySet;
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
//! \brief This is the base model for managing all the properties
//! and passing them to the view.
//!
@ -169,7 +173,7 @@ private:
Q_DISABLE_COPY(VPropertyModel)
};
VPE_MARK_NONFINAL_CLASS(VPropertyModel)
QT_WARNING_POP
}

View File

@ -38,6 +38,10 @@ namespace VPE
// Forward declaration
class VPropertySetPrivate;
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
// todo: better description
//! \brief VPropertySet is a simple class for managing a set of properties.
//! If you don't need all the Model-functionality, chose this class
@ -138,7 +142,7 @@ private:
Q_DISABLE_COPY(VPropertySet)
};
VPE_MARK_NONFINAL_CLASS(VPropertySet)
QT_WARNING_POP
}

View File

@ -310,13 +310,16 @@ void DialogArc::SetRadius(const QString &value)
*/
void DialogArc::ChosenObject(quint32 id, const SceneObject &type)
{
if (prepare == false)// After first choose we ignore all objects
if (not prepare)// After first choose we ignore all objects
{
if (type == SceneObject::Point)
{
if (SetObject(id, ui->comboBoxBasePoint, QString()))
{
vis->VisualMode(id);
if (vis != nullptr)
{
vis->VisualMode(id);
}
prepare = true;
this->setModal(true);
this->show();

View File

@ -296,7 +296,10 @@ void DialogArcWithLength::ChosenObject(quint32 id, const SceneObject &type)
{
if (SetObject(id, ui->comboBoxCenter, QString()))
{
vis->VisualMode(id);
if (vis != nullptr)
{
vis->VisualMode(id);
}
prepare = true;
this->setModal(true);
this->show();

View File

@ -170,7 +170,10 @@ void DialogCutArc::ChosenObject(quint32 id, const SceneObject &type)
{
if (SetObject(id, ui->comboBoxArc, QString()))
{
vis->VisualMode(id);
if (vis != nullptr)
{
vis->VisualMode(id);
}
prepare = true;
this->setModal(true);
this->show();

View File

@ -178,7 +178,10 @@ void DialogCutSpline::ChosenObject(quint32 id, const SceneObject &type)
{
if (SetObject(id, ui->comboBoxSpline, QString()))
{
vis->VisualMode(id);
if (vis != nullptr)
{
vis->VisualMode(id);
}
prepare = true;
this->setModal(true);
this->show();

View File

@ -178,7 +178,10 @@ void DialogCutSplinePath::ChosenObject(quint32 id, const SceneObject &type)
{
if (SetObject(id, ui->comboBoxSplinePath, QString()))
{
vis->VisualMode(id);
if (vis != nullptr)
{
vis->VisualMode(id);
}
prepare = true;
this->setModal(true);
this->show();

View File

@ -559,7 +559,10 @@ void DialogEllipticalArc::ChosenObject(quint32 id, const SceneObject &type)
{
if (SetObject(id, ui->comboBoxBasePoint, QString()))
{
vis->VisualMode(id);
if (vis != nullptr)
{
vis->VisualMode(id);
}
prepare = true;
this->setModal(true);
this->show();

View File

@ -214,7 +214,10 @@ void DialogEndLine::ChosenObject(quint32 id, const SceneObject &type)
{
if (SetObject(id, ui->comboBoxBasePoint, QString()))
{
vis->VisualMode(id);
if (vis != nullptr)
{
vis->VisualMode(id);
}
VAbstractMainWindow *window =
qobject_cast<VAbstractMainWindow *>(VAbstractValApplication::VApp()->getMainWindow());
SCASSERT(window != nullptr)

View File

@ -189,7 +189,10 @@ void DialogLine::ChosenObject(quint32 id, const SceneObject &type)
if (SetObject(id, ui->comboBoxFirstPoint, tr("Select second point")))
{
number++;
vis->VisualMode(id);
if (vis != nullptr)
{
vis->VisualMode(id);
}
}
break;
case 1:

View File

@ -70,6 +70,10 @@ class VAbstractTool;
enum class FillComboBox : qint8 { Whole, NoChildren};
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
/**
* @brief The DialogTool class parent for all dialog of tools.
*/
@ -232,10 +236,10 @@ private:
template <typename GObject>
void FillCombo(QComboBox *box, GOType gType, FillComboBox rule = FillComboBox::Whole,
const quint32 &ch1 = NULL_ID, const quint32 &ch2 = NULL_ID) const;
};
QT_WARNING_POP
//---------------------------------------------------------------------------------------------------------------------
template <typename T>
QVector<T> DialogTool::GetListInternals(const QListWidget *list) const

View File

@ -94,7 +94,10 @@ void DialogDuplicateDetail::ChosenObject(quint32 id, const SceneObject &type)
}
emit ToolTip(tr("Click to place duplicate"));
vis->VisualMode(id);
if (vis != nullptr)
{
vis->VisualMode(id);
}
prepare = true;
}
}

View File

@ -131,7 +131,10 @@ void DialogPin::ChosenObject(quint32 id, const SceneObject &type)
{
if (SetObject(id, ui->comboBoxPoint, QString()))
{
vis->VisualMode(id);
if (vis != nullptr)
{
vis->VisualMode(id);
}
CheckPoint();
prepare = true;
this->setModal(true);

View File

@ -255,7 +255,10 @@ void DialogPlaceLabel::ChosenObject(quint32 id, const SceneObject &type)
{
if (SetObject(id, ui->comboBoxPoint, QString()))
{
vis->VisualMode(id);
if (vis != nullptr)
{
vis->VisualMode(id);
}
CheckPoint();
prepare = true;

View File

@ -51,6 +51,10 @@ class VInternalVariable;
enum class Mode : qint8 {Creation, Show};
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
class Visualization : public QObject
{
Q_OBJECT
@ -120,6 +124,8 @@ private:
Q_DISABLE_COPY(Visualization)
};
QT_WARNING_POP
//---------------------------------------------------------------------------------------------------------------------
template <typename Item>
inline void Visualization::AddItem(Item *item)

View File

@ -39,6 +39,7 @@ struct VFinalMeasurement;
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
class VAbstractMainWindow : public QMainWindow
{

View File

@ -36,6 +36,7 @@
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wsuggest-final-types")
QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
class VCurvePathItem : public QGraphicsPathItem
{