From d355b4dce86692b302645b5587d0a380a5fece49 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 6 Apr 2017 15:50:15 +0300 Subject: [PATCH] Cppcheck warnings. --HG-- branch : develop --- .../valentina/dialogs/dialoglayoutsettings.h | 2 +- src/app/valentina/mainwindow.h | 4 +-- .../exception/vexceptionconversionerror.cpp | 12 +++++++ .../ifc/exception/vexceptionconversionerror.h | 1 + .../exception/vexceptionemptyparameter.cpp | 15 +++++++++ .../ifc/exception/vexceptionemptyparameter.h | 4 +-- .../ifc/exception/vexceptionobjecterror.cpp | 14 ++++++++ .../ifc/exception/vexceptionobjecterror.h | 3 +- src/libs/ifc/exception/vexceptionundo.h | 2 +- src/libs/ifc/exception/vexceptionwrongid.cpp | 14 ++++++++ src/libs/ifc/exception/vexceptionwrongid.h | 3 +- src/libs/qmuparser/qmuparserbase.cpp | 7 ++-- src/libs/qmuparser/qmuparserbase.h | 14 ++++---- src/libs/qmuparser/qmuparsercallback.cpp | 9 +++--- src/libs/qmuparser/qmuparsercallback.h | 2 +- src/libs/qmuparser/qmuparsererror.h | 2 +- src/libs/qmuparser/qmuparsertest.cpp | 12 +++---- src/libs/qmuparser/qmuparsertest.h | 4 +-- src/libs/vdxf/dxflib/dl_dxf.cpp | 8 ++--- src/libs/vdxf/dxflib/dl_dxf.h | 32 +++++++------------ src/libs/vdxf/dxflib/dl_entities.h | 23 +++++++++++++ src/libs/vgeometry/vcubicbezier_p.h | 2 +- src/libs/vgeometry/vspline.h | 2 +- src/libs/vlayout/vlayoutpiecepath.h | 2 +- src/libs/vmisc/qxtcsvmodel.cpp | 1 + src/libs/vpatterndb/variables/vmeasurement.h | 6 ++-- src/libs/vpatterndb/vcontainer.h | 2 +- src/libs/vpatterndb/vpiece.cpp | 1 + .../plugins/Vector3d/vvector3dproperty.h | 12 +++++++ .../plugins/vfilepropertyeditor.h | 8 ++--- .../plugins/vshortcutpropertyeditor.h | 2 +- .../dialogs/tools/piece/dialogseamallowance.h | 2 +- .../tools/drawTools/operation/vtoolrotation.h | 24 +++++++------- .../toolsinglepoint/vtoolpointofcontact.h | 6 ++-- .../vtoolpointofintersectionarcs.h | 6 ++-- src/libs/vtools/tools/vtoolseamallowance.h | 6 ++-- src/libs/vtools/undocommands/deletepiece.h | 2 +- src/libs/vtools/undocommands/movespline.h | 2 +- .../vtools/undocommands/savepieceoptions.h | 2 +- .../visualization/path/vistoolpiecepath.h | 2 +- src/libs/vwidgets/fancytabbar/fancytabbar.h | 4 +-- src/libs/vwidgets/fancytabbar/stylehelper.h | 2 +- src/libs/vwidgets/vmaingraphicsscene.h | 2 +- 43 files changed, 185 insertions(+), 100 deletions(-) diff --git a/src/app/valentina/dialogs/dialoglayoutsettings.h b/src/app/valentina/dialogs/dialoglayoutsettings.h index 289fb0cb1..39f46b950 100644 --- a/src/app/valentina/dialogs/dialoglayoutsettings.h +++ b/src/app/valentina/dialogs/dialoglayoutsettings.h @@ -93,7 +93,7 @@ public: bool SetIncrease(int increase); bool GetAutoCrop() const; - void SetAutoCrop(bool crop); + void SetAutoCrop(bool autoCrop); bool IsSaveLength() const; void SetSaveLength(bool save); diff --git a/src/app/valentina/mainwindow.h b/src/app/valentina/mainwindow.h index adc618c22..24e39da84 100644 --- a/src/app/valentina/mainwindow.h +++ b/src/app/valentina/mainwindow.h @@ -61,7 +61,7 @@ public: explicit MainWindow(QWidget *parent = nullptr); virtual ~MainWindow() Q_DECL_OVERRIDE; - bool LoadPattern(const QString &curFile, const QString &customMeasureFile = QString()); + bool LoadPattern(const QString &fileName, const QString &customMeasureFile = QString()); public slots: void ProcessCMD(); @@ -305,7 +305,7 @@ private: template void ApplyDetailsDialog(); - bool SavePattern(const QString &curFile, QString &error); + bool SavePattern(const QString &fileName, QString &error); void AutoSavePattern(); void setCurrentFile(const QString &fileName); diff --git a/src/libs/ifc/exception/vexceptionconversionerror.cpp b/src/libs/ifc/exception/vexceptionconversionerror.cpp index 6da231167..29103c4b7 100644 --- a/src/libs/ifc/exception/vexceptionconversionerror.cpp +++ b/src/libs/ifc/exception/vexceptionconversionerror.cpp @@ -53,6 +53,18 @@ VExceptionConversionError::VExceptionConversionError(const VExceptionConversionE :VException(e), str(e.String()) {} +//--------------------------------------------------------------------------------------------------------------------- +VExceptionConversionError &VExceptionConversionError::operator=(const VExceptionConversionError &e) +{ + if ( &e == this ) + { + return *this; + } + VException::operator=(e); + str = e.String(); + return *this; +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief ErrorMessage return main error message diff --git a/src/libs/ifc/exception/vexceptionconversionerror.h b/src/libs/ifc/exception/vexceptionconversionerror.h index 821e61314..d3d8c698a 100644 --- a/src/libs/ifc/exception/vexceptionconversionerror.h +++ b/src/libs/ifc/exception/vexceptionconversionerror.h @@ -43,6 +43,7 @@ class VExceptionConversionError : public VException public: VExceptionConversionError(const QString &error, const QString &str); VExceptionConversionError(const VExceptionConversionError &e); + VExceptionConversionError &operator=(const VExceptionConversionError &e); virtual ~VExceptionConversionError() V_NOEXCEPT_EXPR (true) Q_DECL_EQ_DEFAULT; virtual QString ErrorMessage() const Q_DECL_OVERRIDE; QString String() const; diff --git a/src/libs/ifc/exception/vexceptionemptyparameter.cpp b/src/libs/ifc/exception/vexceptionemptyparameter.cpp index 88384a378..bc8a6ee61 100644 --- a/src/libs/ifc/exception/vexceptionemptyparameter.cpp +++ b/src/libs/ifc/exception/vexceptionemptyparameter.cpp @@ -61,6 +61,21 @@ VExceptionEmptyParameter::VExceptionEmptyParameter(const VExceptionEmptyParamete :VException(e), name(e.Name()), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()) {} +//--------------------------------------------------------------------------------------------------------------------- +VExceptionEmptyParameter &VExceptionEmptyParameter::operator=(const VExceptionEmptyParameter &e) +{ + if ( &e == this ) + { + return *this; + } + VException::operator=(e); + name = e.Name(); + tagText = e.TagText(); + tagName = e.TagName(); + lineNumber = e.LineNumber(); + return *this; +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief ErrorMessage return main error message diff --git a/src/libs/ifc/exception/vexceptionemptyparameter.h b/src/libs/ifc/exception/vexceptionemptyparameter.h index 32c525ff9..b7beeef1f 100644 --- a/src/libs/ifc/exception/vexceptionemptyparameter.h +++ b/src/libs/ifc/exception/vexceptionemptyparameter.h @@ -44,9 +44,9 @@ class QDomElement; class VExceptionEmptyParameter : public VException { public: - VExceptionEmptyParameter(const QString &error, const QString &name, - const QDomElement &domElement); + VExceptionEmptyParameter(const QString &what, const QString &name, const QDomElement &domElement); VExceptionEmptyParameter(const VExceptionEmptyParameter &e); + VExceptionEmptyParameter &operator=(const VExceptionEmptyParameter &e); virtual ~VExceptionEmptyParameter() V_NOEXCEPT_EXPR (true) Q_DECL_EQ_DEFAULT; virtual QString ErrorMessage() const Q_DECL_OVERRIDE; virtual QString DetailedInformation() const Q_DECL_OVERRIDE; diff --git a/src/libs/ifc/exception/vexceptionobjecterror.cpp b/src/libs/ifc/exception/vexceptionobjecterror.cpp index e8e7bfe50..13442db36 100644 --- a/src/libs/ifc/exception/vexceptionobjecterror.cpp +++ b/src/libs/ifc/exception/vexceptionobjecterror.cpp @@ -58,6 +58,20 @@ VExceptionObjectError::VExceptionObjectError(const VExceptionObjectError &e) :VException(e), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()) {} +//--------------------------------------------------------------------------------------------------------------------- +VExceptionObjectError &VExceptionObjectError::operator=(const VExceptionObjectError &e) +{ + if ( &e == this ) + { + return *this; + } + VException::operator=(e); + tagText = e.TagText(); + tagName = e.TagName(); + lineNumber = e.LineNumber(); + return *this; +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief ErrorMessage return main error message diff --git a/src/libs/ifc/exception/vexceptionobjecterror.h b/src/libs/ifc/exception/vexceptionobjecterror.h index 84ce7aeeb..349ecddbd 100644 --- a/src/libs/ifc/exception/vexceptionobjecterror.h +++ b/src/libs/ifc/exception/vexceptionobjecterror.h @@ -44,8 +44,9 @@ class QDomElement; class VExceptionObjectError : public VException { public: - VExceptionObjectError(const QString &error, const QDomElement &domElement); + VExceptionObjectError(const QString &what, const QDomElement &domElement); VExceptionObjectError(const VExceptionObjectError &e); + VExceptionObjectError &operator=(const VExceptionObjectError &e); virtual ~VExceptionObjectError() V_NOEXCEPT_EXPR (true) Q_DECL_EQ_DEFAULT; virtual QString ErrorMessage() const Q_DECL_OVERRIDE; virtual QString DetailedInformation() const Q_DECL_OVERRIDE; diff --git a/src/libs/ifc/exception/vexceptionundo.h b/src/libs/ifc/exception/vexceptionundo.h index f5bcfea11..e13e6882a 100644 --- a/src/libs/ifc/exception/vexceptionundo.h +++ b/src/libs/ifc/exception/vexceptionundo.h @@ -38,7 +38,7 @@ class VExceptionUndo : public VException { public: - explicit VExceptionUndo(const QString &error); + explicit VExceptionUndo(const QString &what); VExceptionUndo(const VExceptionUndo &e); virtual ~VExceptionUndo() V_NOEXCEPT_EXPR (true) Q_DECL_EQ_DEFAULT; }; diff --git a/src/libs/ifc/exception/vexceptionwrongid.cpp b/src/libs/ifc/exception/vexceptionwrongid.cpp index 0ee637468..15bb2d105 100644 --- a/src/libs/ifc/exception/vexceptionwrongid.cpp +++ b/src/libs/ifc/exception/vexceptionwrongid.cpp @@ -58,6 +58,20 @@ VExceptionWrongId::VExceptionWrongId(const VExceptionWrongId &e) :VException(e), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()) {} +//--------------------------------------------------------------------------------------------------------------------- +VExceptionWrongId &VExceptionWrongId::operator=(const VExceptionWrongId &e) +{ + if ( &e == this ) + { + return *this; + } + VException::operator=(e); + tagText = e.TagText(); + tagName = e.TagName(); + lineNumber = e.LineNumber(); + return *this; +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief ErrorMessage return main error message diff --git a/src/libs/ifc/exception/vexceptionwrongid.h b/src/libs/ifc/exception/vexceptionwrongid.h index 1c35369ef..d0d33b90f 100644 --- a/src/libs/ifc/exception/vexceptionwrongid.h +++ b/src/libs/ifc/exception/vexceptionwrongid.h @@ -44,8 +44,9 @@ class QDomElement; class VExceptionWrongId : public VException { public: - VExceptionWrongId(const QString &error, const QDomElement &domElement); + VExceptionWrongId(const QString &what, const QDomElement &domElement); VExceptionWrongId(const VExceptionWrongId &e); + VExceptionWrongId &operator=(const VExceptionWrongId &e); virtual ~VExceptionWrongId() V_NOEXCEPT_EXPR (true) Q_DECL_EQ_DEFAULT; virtual QString ErrorMessage() const Q_DECL_OVERRIDE; virtual QString DetailedInformation() const Q_DECL_OVERRIDE; diff --git a/src/libs/qmuparser/qmuparserbase.cpp b/src/libs/qmuparser/qmuparserbase.cpp index abbbe3783..4b0d861dc 100644 --- a/src/libs/qmuparser/qmuparserbase.cpp +++ b/src/libs/qmuparser/qmuparserbase.cpp @@ -403,9 +403,8 @@ void QmuParserBase::CheckOprt(const QString &a_sName, const QmuParserCallback &a /** * @brief Check if a name contains invalid characters. * - * @throw ParserException if the name contains invalid charakters. + * @throw ParserException if the name contains invalid characters. */ -// cppcheck-suppress void QmuParserBase::CheckName(const QString &a_sName, const QString &a_szCharSet) const { std::wstring a_sNameStd = a_sName.toStdWString(); @@ -483,9 +482,9 @@ const QString &QmuParserBase::ValidInfixOprtChars() const * @brief Add a user defined operator. * @post Will reset the Parser to string parsing mode. */ -void QmuParserBase::DefinePostfixOprt(const QString &a_sName, fun_type1 a_pFun, bool a_bAllowOpt) +void QmuParserBase::DefinePostfixOprt(const QString &a_sFun, fun_type1 a_pFun, bool a_bAllowOpt) { - AddCallback(a_sName, QmuParserCallback(a_pFun, a_bAllowOpt, prPOSTFIX, cmOPRT_POSTFIX), m_PostOprtDef, + AddCallback(a_sFun, QmuParserCallback(a_pFun, a_bAllowOpt, prPOSTFIX, cmOPRT_POSTFIX), m_PostOprtDef, ValidOprtChars() ); } diff --git a/src/libs/qmuparser/qmuparserbase.h b/src/libs/qmuparser/qmuparserbase.h index f0bde876e..b749a456e 100644 --- a/src/libs/qmuparser/qmuparserbase.h +++ b/src/libs/qmuparser/qmuparserbase.h @@ -84,13 +84,13 @@ public: void EnableBuiltInOprt(bool a_bIsOn=true); bool HasBuiltInOprt() const; void AddValIdent(identfun_type a_pCallback); - void DefineOprt(const QString &a_strName, fun_type2 a_pFun, unsigned a_iPri=0, + void DefineOprt(const QString &a_sName, fun_type2 a_pFun, unsigned a_iPrec=0, EOprtAssociativity a_eAssociativity = oaLEFT, bool a_bAllowOpt = false); void DefineConst(const QString &a_sName, qreal a_fVal); - void DefineStrConst(const QString &a_sName, const QString &a_strVal); - void DefineVar(const QString &a_sName, qreal *a_fVar); - void DefinePostfixOprt(const QString &a_strFun, fun_type1 a_pOprt, bool a_bAllowOpt=true); - void DefineInfixOprt(const QString &a_strName, fun_type1 a_pOprt, int a_iPrec=prINFIX, + void DefineStrConst(const QString &a_strName, const QString &a_strVal); + void DefineVar(const QString &a_sName, qreal *a_pVar); + void DefinePostfixOprt(const QString &a_sFun, fun_type1 a_pFun, bool a_bAllowOpt=true); + void DefineInfixOprt(const QString &a_sName, fun_type1 a_pFun, int a_iPrec=prINFIX, bool a_bAllowOpt=true); // Clear user defined variables, constants or functions void ClearVar(); @@ -117,7 +117,7 @@ public: const QString& ValidInfixOprtChars() const; void SetArgSep(char_type cArgSep); QChar GetArgSep() const; - void Q_NORETURN Error(EErrorCodes a_iErrc, int a_iPos = -1, const QString &a_strTok = QString() ) const; + void Q_NORETURN Error(EErrorCodes a_iErrc, int a_iPos = -1, const QString &a_sTok = QString() ) const; template void DefineFun(const QString &a_strName, T a_pFun, bool a_bAllowOpt = true); @@ -269,7 +269,7 @@ private: qreal ParseCmdCode() const; qreal ParseCmdCodeBulk(int nOffset, int nThreadID) const; // cppcheck-suppress functionStatic - void CheckName(const QString &a_strName, const QString &a_CharSet) const; + void CheckName(const QString &a_sName, const QString &a_szCharSet) const; // cppcheck-suppress functionStatic void CheckOprt(const QString &a_sName, const QmuParserCallback &a_Callback, const QString &a_szCharSet) const; diff --git a/src/libs/qmuparser/qmuparsercallback.cpp b/src/libs/qmuparser/qmuparsercallback.cpp index 826ab03e9..b7a4639b9 100644 --- a/src/libs/qmuparser/qmuparsercallback.cpp +++ b/src/libs/qmuparser/qmuparsercallback.cpp @@ -72,8 +72,7 @@ QmuParserCallback::QmuParserCallback ( fun_type2 a_pFun, bool a_bAllowOpti ) #ifdef __GNUC__ __extension__ #endif -QmuParserCallback::QmuParserCallback ( fun_type2 a_pFun, bool a_bAllowOpti, int a_iPrec, - EOprtAssociativity a_eOprtAsct ) +QmuParserCallback::QmuParserCallback (fun_type2 a_pFun, bool a_bAllowOpti, int a_iPrec, EOprtAssociativity a_eOprtAsct) : m_pFun ( reinterpret_cast ( a_pFun ) ), m_iArgc ( 2 ), m_iPri ( a_iPrec ), m_eOprtAsct ( a_eOprtAsct ), m_iCode ( cmOPRT_BIN ), m_iType ( tpDBL ), m_bAllowOpti ( a_bAllowOpti ) {} @@ -306,9 +305,9 @@ QmuParserCallback::QmuParserCallback() * @brief Copy constructor. * @throw nothrow */ -QmuParserCallback::QmuParserCallback ( const QmuParserCallback &ref ) - : m_pFun ( ref.m_pFun ), m_iArgc ( ref.m_iArgc ), m_iPri ( ref.m_iPri ), m_eOprtAsct ( ref.m_eOprtAsct ), - m_iCode ( ref.m_iCode ), m_iType ( ref.m_iType ), m_bAllowOpti ( ref.m_bAllowOpti ) +QmuParserCallback::QmuParserCallback (const QmuParserCallback &a_Fun ) + : m_pFun ( a_Fun.m_pFun ), m_iArgc ( a_Fun.m_iArgc ), m_iPri ( a_Fun.m_iPri ), m_eOprtAsct ( a_Fun.m_eOprtAsct ), + m_iCode ( a_Fun.m_iCode ), m_iType ( a_Fun.m_iType ), m_bAllowOpti ( a_Fun.m_bAllowOpti ) {} //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/qmuparser/qmuparsercallback.h b/src/libs/qmuparser/qmuparsercallback.h index 8f55fe7e9..ad406e380 100644 --- a/src/libs/qmuparser/qmuparsercallback.h +++ b/src/libs/qmuparser/qmuparsercallback.h @@ -51,7 +51,7 @@ class QmuParserCallback public: QmuParserCallback(fun_type0 a_pFun, bool a_bAllowOpti); QmuParserCallback(fun_type1 a_pFun, bool a_bAllowOpti, int a_iPrec = -1, ECmdCode a_iCode=cmFUNC); - QmuParserCallback(fun_type2 a_pFun, bool a_bAllowOpti, int a_iPrec, EOprtAssociativity a_eAssociativity); + QmuParserCallback(fun_type2 a_pFun, bool a_bAllowOpti, int a_iPrec, EOprtAssociativity a_eOprtAsct); QmuParserCallback(fun_type2 a_pFun, bool a_bAllowOpti); QmuParserCallback(fun_type3 a_pFun, bool a_bAllowOpti); QmuParserCallback(fun_type4 a_pFun, bool a_bAllowOpti); diff --git a/src/libs/qmuparser/qmuparsererror.h b/src/libs/qmuparser/qmuparsererror.h index 460cda689..7c8c663bf 100644 --- a/src/libs/qmuparser/qmuparsererror.h +++ b/src/libs/qmuparser/qmuparsererror.h @@ -143,7 +143,7 @@ public: explicit QmuParserError ( const QString &sMsg ); QmuParserError ( EErrorCodes a_iErrc, const QString &sTok, const QString &sFormula = QString(), int a_iPos = -1 ); QmuParserError ( EErrorCodes a_iErrc, int a_iPos, const QString &sTok ); - QmuParserError ( const QString &a_szMsg, int a_iPos, const QString &sTok = QString() ); + QmuParserError ( const QString &szMsg, int iPos, const QString &sTok = QString() ); QmuParserError ( const QmuParserError &a_Obj ); QmuParserError& operator= ( const QmuParserError &a_Obj ); virtual ~QmuParserError() QMUP_NOEXCEPT_EXPR (true) Q_DECL_OVERRIDE {} diff --git a/src/libs/qmuparser/qmuparsertest.cpp b/src/libs/qmuparser/qmuparsertest.cpp index 9f2d928a1..6f00ed403 100644 --- a/src/libs/qmuparser/qmuparsertest.cpp +++ b/src/libs/qmuparser/qmuparsertest.cpp @@ -1218,8 +1218,8 @@ int QmuParserTester::ThrowTest ( const QString &a_str, int a_iErrc, bool a_bFail * * @return 1 in case of a failure, 0 otherwise. */ -int QmuParserTester::EqnTestWithVarChange ( const QString &a_str, double a_fVar1, double a_fRes1, double a_fVar2, - double a_fRes2 ) +int QmuParserTester::EqnTestWithVarChange (const QString &a_str, double a_fRes1, double a_fVar1, double a_fRes2, + double a_fVar2) { QmuParserTester::c_iCount++; qreal fVal[2] = { -999, -999 }; // should be equalinitially @@ -1233,19 +1233,19 @@ int QmuParserTester::EqnTestWithVarChange ( const QString &a_str, double a_fVar1 p.DefineVar ( "a", &var ); p.SetExpr ( a_str ); - var = a_fVar1; + var = a_fRes1; fVal[0] = p.Eval(); // cppcheck-suppress redundantAssignment - var = a_fVar2; //-V519 + var = a_fRes2; //-V519 fVal[1] = p.Eval(); - if ( fabs ( a_fRes1 - fVal[0] ) > 0.0000000001 ) + if ( fabs ( a_fVar1 - fVal[0] ) > 0.0000000001 ) { throw std::runtime_error ( "incorrect result (first pass)" ); } - if ( fabs ( a_fRes2 - fVal[1] ) > 0.0000000001 ) + if ( fabs ( a_fVar2 - fVal[1] ) > 0.0000000001 ) { throw std::runtime_error ( "incorrect result (second pass)" ); } diff --git a/src/libs/qmuparser/qmuparsertest.h b/src/libs/qmuparser/qmuparsertest.h index d50573f4f..28f77cab7 100644 --- a/src/libs/qmuparser/qmuparsertest.h +++ b/src/libs/qmuparser/qmuparsertest.h @@ -74,8 +74,8 @@ private: // Test Double Parser static int EqnTest ( const QString &a_str, double a_fRes, bool a_fPass ); - static int EqnTestWithVarChange ( const QString &a_str, double a_fRes1, double a_fVar1, double a_fRes2, - double a_fVar2 ); + static int EqnTestWithVarChange (const QString &a_str, double a_fRes1, double a_fVar1, double a_fRes2, + double a_fVar2); static int ThrowTest ( const QString &a_str, int a_iErrc, bool a_bFail = true ); // Test Bulkmode diff --git a/src/libs/vdxf/dxflib/dl_dxf.cpp b/src/libs/vdxf/dxflib/dl_dxf.cpp index d45799b45..4d3d0b428 100644 --- a/src/libs/vdxf/dxflib/dl_dxf.cpp +++ b/src/libs/vdxf/dxflib/dl_dxf.cpp @@ -236,7 +236,7 @@ bool DL_Dxf::readDxfGroups(std::stringstream& stream, * @param s Output\n * Pointer to character array that chopped line will be returned in. * @param size Size of \p s. (Including space for NULL.) - * @param fp Input\n + * @param stream Input\n * Handle of input file. * * @retval true if line could be read @@ -246,16 +246,16 @@ bool DL_Dxf::readDxfGroups(std::stringstream& stream, * @todo Is it a problem if line is blank (i.e., newline only)? * Then, when function returns, (s==NULL). */ -bool DL_Dxf::getStrippedLine(std::string& s, quint32 size, FILE *fp, bool stripSpace) +bool DL_Dxf::getStrippedLine(std::string& s, quint32 size, FILE *stream, bool stripSpace) { - if (!feof(fp)) + if (!feof(stream)) { // The whole line in the file. Includes space for NULL. char* wholeLine = new char[size]; // Only the useful part of the line char* line; - line = fgets(wholeLine, static_cast(size), fp); + line = fgets(wholeLine, static_cast(size), stream); if (line!=NULL && line[0] != '\0') // Evaluates to fgets() retval { diff --git a/src/libs/vdxf/dxflib/dl_dxf.h b/src/libs/vdxf/dxflib/dl_dxf.h index 9f5961902..4661bdc88 100644 --- a/src/libs/vdxf/dxflib/dl_dxf.h +++ b/src/libs/vdxf/dxflib/dl_dxf.h @@ -114,24 +114,17 @@ public: DL_Dxf(); ~DL_Dxf(); - bool in(const std::string& file, - DL_CreationInterface* creationInterface); - bool readDxfGroups(FILE* fp, - DL_CreationInterface* creationInterface); - static bool getStrippedLine(std::string& s, quint32 size, - FILE* stream, bool stripSpace = true); + bool in(const std::string& file, DL_CreationInterface* creationInterface); + bool readDxfGroups(FILE* fp, DL_CreationInterface* creationInterface); + static bool getStrippedLine(std::string& s, quint32 size, FILE* stream, bool stripSpace = true); - bool readDxfGroups(std::stringstream& stream, - DL_CreationInterface* creationInterface); - bool in(std::stringstream &stream, - DL_CreationInterface* creationInterface); - static bool getStrippedLine(std::string& s, quint32 size, - std::stringstream& stream, bool stripSpace = true); + bool readDxfGroups(std::stringstream& stream, DL_CreationInterface* creationInterface); + bool in(std::stringstream &stream, DL_CreationInterface* creationInterface); + static bool getStrippedLine(std::string& s, quint32 size, std::stringstream& stream, bool stripSpace = true); - static bool stripWhiteSpace(char** s, bool stripSpaces = true); + static bool stripWhiteSpace(char** s, bool stripSpace = true); - bool processDXFGroup(DL_CreationInterface* creationInterface, - int groupCode, const std::string& groupValue); + bool processDXFGroup(DL_CreationInterface* creationInterface, int groupCode, const std::string& groupValue); void addSetting(DL_CreationInterface* creationInterface); void addLayer(DL_CreationInterface* creationInterface); void addLinetype(DL_CreationInterface *creationInterface); @@ -203,8 +196,7 @@ public: //int stringToInt(const char* s, bool* ok=NULL); - DL_WriterA* out(const char* file, - DL_Codes::version version=DL_VERSION_2000); + DL_WriterA* out(const char* file, DL_Codes::version version=DL_VERSION_2000); void writeHeader(DL_WriterA& dw) const; @@ -414,16 +406,16 @@ public: return static_cast(strtol(str.c_str(), &p, 10)); } - int getInt16Value(int code, int def) + int getInt16Value(int code, int def) { - if (!hasValue(code)) + if (!hasValue(code)) { return def; } return toInt16(values[code]); } - static int toInt16(const std::string& str) + static int toInt16(const std::string& str) { char* p; return static_cast(strtol(str.c_str(), &p, 16)); diff --git a/src/libs/vdxf/dxflib/dl_entities.h b/src/libs/vdxf/dxflib/dl_entities.h index 2c18dd136..7d2e65aa6 100644 --- a/src/libs/vdxf/dxflib/dl_entities.h +++ b/src/libs/vdxf/dxflib/dl_entities.h @@ -860,6 +860,29 @@ struct DXFLIB_EXPORT DL_TextData { } + DL_TextData &operator=(const DL_TextData &d) + { + if ( &d == this ) + { + return *this; + } + ipx = d.ipx; + ipy = d.ipy; + ipz = d.ipz; + apx = d.apx; + apy = d.apy; + apz = d.apz; + height = d.height; + xScaleFactor = d.xScaleFactor; + textGenerationFlags = d.textGenerationFlags; + hJustification = d.hJustification; + vJustification = d.vJustification; + text = d.text; + style = d.style; + angle = d.angle; + return *this; + } + virtual ~DL_TextData() {} diff --git a/src/libs/vgeometry/vcubicbezier_p.h b/src/libs/vgeometry/vcubicbezier_p.h index 548b9ea21..9ca88a34c 100644 --- a/src/libs/vgeometry/vcubicbezier_p.h +++ b/src/libs/vgeometry/vcubicbezier_p.h @@ -44,7 +44,7 @@ class VCubicBezierData : public QSharedData { public: VCubicBezierData(); - VCubicBezierData(const VCubicBezierData &spline); + VCubicBezierData(const VCubicBezierData &curve); VCubicBezierData(const VPointF &p1, const VPointF &p2, const VPointF &p3, const VPointF &p4); virtual ~VCubicBezierData(); diff --git a/src/libs/vgeometry/vspline.h b/src/libs/vgeometry/vspline.h index f8ec8635e..9f3d91050 100644 --- a/src/libs/vgeometry/vspline.h +++ b/src/libs/vgeometry/vspline.h @@ -64,7 +64,7 @@ public: VSpline Flip(const QLineF &axis, const QString &prefix = QString()) const; VSpline Move(qreal length, qreal angle, const QString &prefix = QString()) const; virtual ~VSpline(); - VSpline &operator=(const VSpline &spl); + VSpline &operator=(const VSpline &spline); virtual VPointF GetP1 () const Q_DECL_OVERRIDE; void SetP1 (const VPointF &p); diff --git a/src/libs/vlayout/vlayoutpiecepath.h b/src/libs/vlayout/vlayoutpiecepath.h index b2d9da454..e4fa2665b 100644 --- a/src/libs/vlayout/vlayoutpiecepath.h +++ b/src/libs/vlayout/vlayoutpiecepath.h @@ -50,7 +50,7 @@ public: void SetPoints(const QVector &points); Qt::PenStyle PenStyle() const; - void SetPenStyle(const Qt::PenStyle &PenStyle); + void SetPenStyle(const Qt::PenStyle &penStyle); private: QSharedDataPointer d; diff --git a/src/libs/vmisc/qxtcsvmodel.cpp b/src/libs/vmisc/qxtcsvmodel.cpp index 230b86ef9..33573205a 100644 --- a/src/libs/vmisc/qxtcsvmodel.cpp +++ b/src/libs/vmisc/qxtcsvmodel.cpp @@ -590,6 +590,7 @@ static QString qxt_addCsvQuotes(QxtCsvModel::QuoteMode mode, QString field) Fields in the output file will be separated by \a separator. Set \a withHeader to true to output a row of headers at the top of the file. */ +// cppcheck-suppress funcArgNamesDifferent void QxtCsvModel::toCSV(QIODevice* dest, bool withHeader, QChar separator, QTextCodec* codec) const { const QxtCsvModelPrivate& d_ptr = qxt_d(); diff --git a/src/libs/vpatterndb/variables/vmeasurement.h b/src/libs/vpatterndb/variables/vmeasurement.h index c9d58aa11..aeaa6c24f 100644 --- a/src/libs/vpatterndb/variables/vmeasurement.h +++ b/src/libs/vpatterndb/variables/vmeasurement.h @@ -52,10 +52,10 @@ class VMeasurement :public VVariable public: VMeasurement(quint32 index, const QString &name, qreal baseSize, qreal baseHeight, const qreal &base, const qreal &ksize, const qreal &kheight, const QString &gui_text = QString(), - const QString &description = QString(), const QString &TagName = QString()); + const QString &description = QString(), const QString &tagName = QString()); VMeasurement(VContainer *data, quint32 index, const QString &name, const qreal &base, const QString &formula, bool ok, const QString &gui_text = QString(), const QString &description = QString(), - const QString &TagName = QString()); + const QString &tagName = QString()); VMeasurement(const VMeasurement &m); VMeasurement &operator=(const VMeasurement &m); virtual ~VMeasurement() Q_DECL_OVERRIDE; @@ -63,7 +63,7 @@ public: QString GetGuiText() const; QString TagName() const; - void setTagName(const QString &TagName); + void setTagName(const QString &tagName); QString GetFormula() const; diff --git a/src/libs/vpatterndb/vcontainer.h b/src/libs/vpatterndb/vcontainer.h index 4e6f02c32..a049cc58a 100644 --- a/src/libs/vpatterndb/vcontainer.h +++ b/src/libs/vpatterndb/vcontainer.h @@ -139,7 +139,7 @@ public: quint32 AddPiece(const VPiece &detail); quint32 AddPiecePath(const VPiecePath &path); void AddLine(const quint32 &firstPointId, const quint32 &secondPointId); - void AddArc(const QSharedPointer &arc, const quint32 &arcId, + void AddArc(const QSharedPointer &arc, const quint32 &id, const quint32 &parentId = NULL_ID); void AddSpline(const QSharedPointer &curve, quint32 id, quint32 parentId = NULL_ID); void AddCurveWithSegments(const QSharedPointer &curve, const quint32 &id, diff --git a/src/libs/vpatterndb/vpiece.cpp b/src/libs/vpatterndb/vpiece.cpp index e43c59ed9..cd30a3d8b 100644 --- a/src/libs/vpatterndb/vpiece.cpp +++ b/src/libs/vpatterndb/vpiece.cpp @@ -860,6 +860,7 @@ QVector VPiece::FilterRecords(QVector records) c { startIndex = i; filter = records.at(i); + // cppcheck-suppress unreadVariable foundFilter = true; } } diff --git a/src/libs/vpropertyexplorer/plugins/Vector3d/vvector3dproperty.h b/src/libs/vpropertyexplorer/plugins/Vector3d/vvector3dproperty.h index 50e3a09d7..fe5e3cb0b 100644 --- a/src/libs/vpropertyexplorer/plugins/Vector3d/vvector3dproperty.h +++ b/src/libs/vpropertyexplorer/plugins/Vector3d/vvector3dproperty.h @@ -47,6 +47,18 @@ public: :X(other.X), Y(other.Y), Z(other.Z) {} + Vector3D &operator=(const Vector3D &other) + { + if ( &other == this ) + { + return *this; + } + X = other.X; + Y = other.Y; + Z = other.Z; + return *this; + } + ~Vector3D() {} double X, Y, Z; diff --git a/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.h b/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.h index fc19366e0..caf7acf17 100644 --- a/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.h +++ b/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.h @@ -70,10 +70,10 @@ signals: public slots: //! Sets the current file, does not check if it is valid - //! \param getFile The new filepath the widget should show + //! \param value The new filepath the widget should show //! \param emit_signal If true, this will emit the dataChangedByUser()-signal (if file differs from the current //! file) - void setFile(const QString &getFile, bool emit_signal = false); + void setFile(const QString &value, bool emit_signal = false); //! Sets a filter for the file field //! \param dialog_filter The filter used for the File Dialog @@ -94,10 +94,10 @@ protected: virtual void dropEvent(QDropEvent* event) Q_DECL_OVERRIDE; //! This function checks the mime data, if it is compatible with the filters - virtual bool checkMimeData(const QMimeData* data, QString& getFile) const; + virtual bool checkMimeData(const QMimeData* data, QString& file) const; //! This checks, if a file is compatible with the filters - virtual bool checkFileFilter(const QString& getFile) const; + virtual bool checkFileFilter(const QString& file) const; QString CurrentFilePath; diff --git a/src/libs/vpropertyexplorer/plugins/vshortcutpropertyeditor.h b/src/libs/vpropertyexplorer/plugins/vshortcutpropertyeditor.h index 1b00828ea..68db3545e 100644 --- a/src/libs/vpropertyexplorer/plugins/vshortcutpropertyeditor.h +++ b/src/libs/vpropertyexplorer/plugins/vshortcutpropertyeditor.h @@ -47,7 +47,7 @@ public: virtual ~VShortcutEditWidget() Q_DECL_OVERRIDE; //! Needed for proper event handling - virtual bool eventFilter(QObject* obj, QEvent* evenvt) Q_DECL_OVERRIDE; + virtual bool eventFilter(QObject* obj, QEvent* event) Q_DECL_OVERRIDE; //! Returns the currently set shortcut QString getShortcutAsString() const; diff --git a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.h b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.h index 6e514a51f..de6a3fbf3 100644 --- a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.h +++ b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.h @@ -59,7 +59,7 @@ public: void EnableApply(bool enable); VPiece GetPiece() const; - void SetPiece(const VPiece &m_piece); + void SetPiece(const VPiece &piece); QString GetFormulaSAWidth() const; diff --git a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.h b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.h index 6fd08cfdf..9c67fd6a5 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.h +++ b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.h @@ -53,7 +53,7 @@ public: virtual void setDialog() Q_DECL_OVERRIDE; static VToolRotation* Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data); - static VToolRotation* Create(const quint32 _id, const quint32 &origin, QString &formulaAngle, const QString &suffix, + static VToolRotation* Create(const quint32 _id, const quint32 &origin, QString &angle, const QString &suffix, const QVector &source, const QVector &destination, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation); @@ -83,39 +83,39 @@ private: QString formulaAngle; VToolRotation(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 origPointId, - const QString &formulaAngle, const QString &suffix, const QVector &source, + const QString &angle, const QString &suffix, const QVector &source, const QVector &destination, const Source &typeCreation, QGraphicsItem *parent = nullptr); - static DestinationItem CreatePoint(quint32 idTool, quint32 idItem, const QPointF &origin, qreal formulaAngle, + static DestinationItem CreatePoint(quint32 idTool, quint32 idItem, const QPointF &origin, qreal angle, const QString &suffix, VContainer *data); template - static DestinationItem CreateItem(quint32 idTool, quint32 idItem, const QPointF &origin, qreal formulaAngle, + static DestinationItem CreateItem(quint32 idTool, quint32 idItem, const QPointF &origin, qreal angle, const QString &suffix, VContainer *data); template - static DestinationItem CreateArc(quint32 idTool, quint32 idItem, const QPointF &origin, qreal formulaAngle, + static DestinationItem CreateArc(quint32 idTool, quint32 idItem, const QPointF &origin, qreal angle, const QString &suffix, VContainer *data); template - static DestinationItem CreateCurve(quint32 idTool, quint32 idItem, const QPointF &origin, qreal formulaAngle, + static DestinationItem CreateCurve(quint32 idTool, quint32 idItem, const QPointF &origin, qreal angle, const QString &suffix, VContainer *data); template static DestinationItem CreateCurveWithSegments(quint32 idTool, quint32 idItem, const QPointF &origin, - qreal formulaAngle, const QString &suffix, VContainer *data); + qreal angle, const QString &suffix, VContainer *data); - static void UpdatePoint(quint32 idTool, quint32 idItem, const QPointF &origin, qreal formulaAngle, + static void UpdatePoint(quint32 idTool, quint32 idItem, const QPointF &origin, qreal angle, const QString &suffix, VContainer *data, quint32 id, qreal mx, qreal my); template - static void UpdateItem(quint32 idTool, quint32 idItem, const QPointF &origin, qreal formulaAngle, + static void UpdateItem(quint32 idTool, quint32 idItem, const QPointF &origin, qreal angle, const QString &suffix, VContainer *data, quint32 id); template - static void UpdateArc(quint32 idTool, quint32 idItem, const QPointF &origin, qreal formulaAngle, + static void UpdateArc(quint32 idTool, quint32 idItem, const QPointF &origin, qreal angle, const QString &suffix, VContainer *data, quint32 id); template - static void UpdateCurve(quint32 idTool, quint32 idItem, const QPointF &origin, qreal formulaAngle, + static void UpdateCurve(quint32 idTool, quint32 idItem, const QPointF &origin, qreal angle, const QString &suffix, VContainer *data, quint32 id); template - static void UpdateCurveWithSegments(quint32 idTool, quint32 idItem, const QPointF &origin, qreal formulaAngle, + static void UpdateCurveWithSegments(quint32 idTool, quint32 idItem, const QPointF &origin, qreal angle, const QString &suffix, VContainer *data, quint32 id); }; diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.h b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.h index aeedcf7d4..10e91efb1 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.h +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofcontact.h @@ -53,11 +53,11 @@ class VToolPointOfContact : public VToolSinglePoint Q_OBJECT public: virtual void setDialog() Q_DECL_OVERRIDE; - static QPointF FindPoint(const qreal &arcRadius, const QPointF ¢er, const QPointF &firstPoint, + static QPointF FindPoint(const qreal &radius, const QPointF ¢er, const QPointF &firstPoint, const QPointF &secondPoint); static VToolPointOfContact* Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data); - static VToolPointOfContact* Create(const quint32 _id, QString &arcRadius, const quint32 ¢er, + static VToolPointOfContact* Create(const quint32 _id, QString &radius, const quint32 ¢er, const quint32 &firstPointId, const quint32 &secondPointId, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, @@ -108,7 +108,7 @@ private: /** @brief secondPointId id second line point. */ quint32 secondPointId; - VToolPointOfContact(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &arcRadius, + VToolPointOfContact(VAbstractPattern *doc, VContainer *data, const quint32 &id, const QString &radius, const quint32 ¢er, const quint32 &firstPointId, const quint32 &secondPointId, const Source &typeCreation, QGraphicsItem * parent = nullptr); }; diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectionarcs.h b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectionarcs.h index 9fd0a4ea3..cc6801505 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectionarcs.h +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectionarcs.h @@ -53,11 +53,11 @@ public: static VToolPointOfIntersectionArcs *Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data); static VToolPointOfIntersectionArcs *Create(const quint32 _id, const QString &pointName, const quint32 &firstArcId, - const quint32 &secondArcId, CrossCirclesPoint crossPoint, + const quint32 &secondArcId, CrossCirclesPoint pType, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, const Source &typeCreation); - static QPointF FindPoint(const VArc *arc1, const VArc *arc2, const CrossCirclesPoint crossPoint); + static QPointF FindPoint(const VArc *arc1, const VArc *arc2, const CrossCirclesPoint pType); static const QString ToolType; virtual int type() const Q_DECL_OVERRIDE {return Type;} enum { Type = UserType + static_cast(Tool::PointOfIntersectionArcs) }; @@ -94,7 +94,7 @@ private: CrossCirclesPoint crossPoint; VToolPointOfIntersectionArcs(VAbstractPattern *doc, VContainer *data, const quint32 &id, const quint32 &firstArcId, - const quint32 &secondArcId, CrossCirclesPoint crossPoint, const Source &typeCreation, + const quint32 &secondArcId, CrossCirclesPoint pType, const Source &typeCreation, QGraphicsItem * parent = nullptr); }; diff --git a/src/libs/vtools/tools/vtoolseamallowance.h b/src/libs/vtools/tools/vtoolseamallowance.h index 1566dae63..21f4a76e0 100644 --- a/src/libs/vtools/tools/vtoolseamallowance.h +++ b/src/libs/vtools/tools/vtoolseamallowance.h @@ -47,11 +47,11 @@ class VToolSeamAllowance : public VAbstractTool, public QGraphicsPathItem public: virtual ~VToolSeamAllowance(); - static VToolSeamAllowance* Create(DialogTool *m_dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, + static VToolSeamAllowance* Create(DialogTool *dialog, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data); static VToolSeamAllowance* Create(quint32 id, VPiece newPiece, QString &width, VMainGraphicsScene *scene, VAbstractPattern *doc, VContainer *data, const Document &parse, - const Source &typeCreation, const QString &m_drawName = QString()); + const Source &typeCreation, const QString &drawName = QString()); static const quint8 pieceVersion; @@ -152,7 +152,7 @@ private: void SetDialog(); VToolSeamAllowance(VAbstractPattern *doc, VContainer *data, const quint32 &id, const Source &typeCreation, - VMainGraphicsScene *scene, const QString &m_drawName, QGraphicsItem * parent = nullptr); + VMainGraphicsScene *scene, const QString &drawName, QGraphicsItem * parent = nullptr); void UpdateExcludeState(); void RefreshGeometry(); diff --git a/src/libs/vtools/undocommands/deletepiece.h b/src/libs/vtools/undocommands/deletepiece.h index 7f5125e72..009f5311d 100644 --- a/src/libs/vtools/undocommands/deletepiece.h +++ b/src/libs/vtools/undocommands/deletepiece.h @@ -39,7 +39,7 @@ class DeletePiece : public VUndoCommand { Q_OBJECT public: - DeletePiece(VAbstractPattern *doc, quint32 id, const VPiece &m_detail, QUndoCommand *parent = nullptr); + DeletePiece(VAbstractPattern *doc, quint32 id, const VPiece &detail, QUndoCommand *parent = nullptr); virtual ~DeletePiece(); virtual void undo() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/undocommands/movespline.h b/src/libs/vtools/undocommands/movespline.h index 4b34e6344..1f1f25a87 100644 --- a/src/libs/vtools/undocommands/movespline.h +++ b/src/libs/vtools/undocommands/movespline.h @@ -44,7 +44,7 @@ class MoveSpline : public VUndoCommand { Q_OBJECT public: - MoveSpline(VAbstractPattern *doc, const VSpline *oldSpl, const VSpline &spl, const quint32 &id, + MoveSpline(VAbstractPattern *doc, const VSpline *oldSpl, const VSpline &newSpl, const quint32 &id, QUndoCommand *parent = nullptr); virtual ~MoveSpline() Q_DECL_OVERRIDE; virtual void undo() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/undocommands/savepieceoptions.h b/src/libs/vtools/undocommands/savepieceoptions.h index 7560af059..0f8abaa2a 100644 --- a/src/libs/vtools/undocommands/savepieceoptions.h +++ b/src/libs/vtools/undocommands/savepieceoptions.h @@ -37,7 +37,7 @@ class SavePieceOptions : public VUndoCommand { public: - SavePieceOptions(const VPiece &m_oldDet, const VPiece &m_newDet, VAbstractPattern *doc, quint32 id, + SavePieceOptions(const VPiece &oldDet, const VPiece &newDet, VAbstractPattern *doc, quint32 id, QUndoCommand *parent = nullptr); virtual ~SavePieceOptions(); diff --git a/src/libs/vtools/visualization/path/vistoolpiecepath.h b/src/libs/vtools/visualization/path/vistoolpiecepath.h index 17113e0a9..4d411ca8b 100644 --- a/src/libs/vtools/visualization/path/vistoolpiecepath.h +++ b/src/libs/vtools/visualization/path/vistoolpiecepath.h @@ -45,7 +45,7 @@ public: virtual ~VisToolPiecePath() Q_DECL_EQ_DEFAULT; virtual void RefreshGeometry() Q_DECL_OVERRIDE; - void SetPath(const VPiecePath &piece); + void SetPath(const VPiecePath &path); virtual int type() const Q_DECL_OVERRIDE {return Type;} enum { Type = UserType + static_cast(Vis::ToolPiecePath)}; diff --git a/src/libs/vwidgets/fancytabbar/fancytabbar.h b/src/libs/vwidgets/fancytabbar/fancytabbar.h index f0f5cdd13..c8c2bd2a9 100644 --- a/src/libs/vwidgets/fancytabbar/fancytabbar.h +++ b/src/libs/vwidgets/fancytabbar/fancytabbar.h @@ -110,8 +110,8 @@ private: QPoint GetCorner(const QRect& rect, const Corner corner) const; - QRect AdjustRect(const QRect& rect, const qint8 offsetOutside, const qint8 offsetInside, const qint8 offsetStart, - const qint8 offsetEnd) const; + QRect AdjustRect(const QRect& rect, const qint8 offsetOutside, const qint8 offsetInside, + const qint8 offsetBeginning, const qint8 offsetEnd) const; // Same with a point. + means towards Outside/End, - means towards Inside/Beginning QPoint AdjustPoint(const QPoint& point, const qint8 offsetInsideOutside, const qint8 offsetBeginningEnd) const; diff --git a/src/libs/vwidgets/fancytabbar/stylehelper.h b/src/libs/vwidgets/fancytabbar/stylehelper.h index ab22893cd..bb047e322 100644 --- a/src/libs/vwidgets/fancytabbar/stylehelper.h +++ b/src/libs/vwidgets/fancytabbar/stylehelper.h @@ -55,7 +55,7 @@ public: static QColor sidebarHighlight(); // Sets the base color and makes sure all top level widgets are updated - static void setBaseColor(const QColor &color); + static void setBaseColor(const QColor &newcolor); static void drawIconWithShadow(const QIcon &icon, const QRect &rect, QPainter *p, QIcon::Mode iconMode, int dipRadius = 3, const QColor &color = QColor(0, 0, 0, 130), const QPoint &dipOffset = QPoint(1, -2)); diff --git a/src/libs/vwidgets/vmaingraphicsscene.h b/src/libs/vwidgets/vmaingraphicsscene.h index 416525fcd..7a6b32e04 100644 --- a/src/libs/vwidgets/vmaingraphicsscene.h +++ b/src/libs/vwidgets/vmaingraphicsscene.h @@ -57,7 +57,7 @@ public: void setVerScrollBar(const qint32 &value); QTransform transform() const; void setTransform(const QTransform &transform); - void SetDisableTools(bool enabled, const QString &namePP); + void SetDisableTools(bool disable, const QString &namePP); QPointF getScenePos() const; QRectF VisibleItemsBoundingRect() const;