From 467ffbd132c6cbc17bcb79cea2f154be19f58659 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 20 Oct 2015 17:32:01 +0300 Subject: [PATCH] ICC warnings. --HG-- branch : develop --- common.pri | 35 +++++++++++++++++++ src/app/tape/dialogs/dialogmdatabase.h | 2 +- src/app/tape/mapplication.cpp | 9 +++-- src/app/tape/tape.pro | 7 ++++ src/app/tape/tmainwindow.cpp | 9 +++-- src/app/valentina/core/vapplication.cpp | 14 ++++++++ src/app/valentina/core/vcmdexport.h | 2 +- .../valentina/dialogs/dialoglayoutprogress.h | 2 +- .../valentina/dialogs/dialoglayoutsettings.h | 2 +- .../dialogs/dialogpatternproperties.h | 2 +- .../valentina/dialogs/dialogpatternxmledit.h | 4 +-- src/app/valentina/dialogs/dialogsavelayout.h | 2 +- src/app/valentina/mainwindow.cpp | 14 ++++++++ src/app/valentina/valentina.pro | 10 +++++- src/libs/ifc/exception/vexception.cpp | 2 +- src/libs/ifc/ifc.pro | 11 ++++++ src/libs/qmuparser/qmuparser.pro | 5 +++ src/libs/qmuparser/qmuparserbytecode.cpp | 9 +++++ src/libs/vdxf/dxflib/dl_entities.h | 5 ++- src/libs/vdxf/dxflib/dl_writer_ascii.h | 2 +- src/libs/vdxf/vdxf.pro | 5 +++ src/libs/vdxf/vdxfengine.cpp | 9 +++-- src/libs/vformat/vformat.pro | 5 +++ src/libs/vgeometry/vabstractcurve.h | 3 +- src/libs/vgeometry/vgeometry.pro | 5 +++ src/libs/vgeometry/vgobject.h | 2 +- src/libs/vgeometry/vpointf.h | 9 +++++ src/libs/vgeometry/vsplinepath.h | 2 +- src/libs/vlayout/vlayout.pro | 6 ++++ src/libs/vmisc/vlockguard.h | 11 +++++- src/libs/vmisc/vmisc.pro | 5 +++ src/libs/vobj/vobj.pro | 5 +++ src/libs/vobj/vobjengine.cpp | 25 ++++++++----- src/libs/vobj/vobjengine.h | 4 +-- src/libs/vobj/vobjpaintdevice.cpp | 3 +- src/libs/vobj/vobjpaintdevice.h | 3 +- src/libs/vpatterndb/vcontainer.cpp | 9 +++-- src/libs/vpatterndb/vpatterndb.pro | 5 +++ .../plugins/vfilepropertyeditor.h | 2 +- .../plugins/vwidgetproperty.h | 2 +- .../vpropertyexplorer/vpropertyexplorer.pro | 5 +++ src/libs/vpropertyexplorer/vpropertymodel.h | 2 +- src/libs/vpropertyexplorer/vpropertyset.h | 2 +- .../vpropertyexplorer/vpropertytreeview.h | 4 +-- .../toolsinglepoint/vtoolsinglepoint.cpp | 9 +++-- src/libs/vtools/tools/vdatatool.h | 2 +- src/libs/vtools/visualization/visline.h | 2 +- src/libs/vtools/visualization/vispath.h | 2 +- .../vtools/visualization/vistoolalongline.h | 2 +- src/libs/vtools/visualization/vistoolarc.h | 2 +- .../visualization/vistoolarcwithlength.h | 2 +- .../vtools/visualization/vistoolbisector.h | 2 +- .../visualization/vistoolcurveintersectaxis.h | 2 +- src/libs/vtools/visualization/vistoolcutarc.h | 2 +- .../vtools/visualization/vistoolcutspline.h | 2 +- .../visualization/vistoolcutsplinepath.h | 2 +- .../vtools/visualization/vistoolendline.h | 2 +- src/libs/vtools/visualization/vistoolheight.h | 2 +- src/libs/vtools/visualization/vistoolline.h | 2 +- .../visualization/vistoollineintersect.h | 2 +- .../visualization/vistoollineintersectaxis.h | 2 +- src/libs/vtools/visualization/vistoolnormal.h | 2 +- .../vistoolpointfromarcandtangent.h | 2 +- .../vistoolpointfromcircleandtangent.h | 2 +- .../visualization/vistoolpointofcontact.h | 2 +- .../vistoolpointofintersection.h | 2 +- .../vistoolpointofintersectionarcs.h | 2 +- .../vistoolpointofintersectioncircles.h | 2 +- .../visualization/vistoolshoulderpoint.h | 2 +- src/libs/vtools/visualization/vistoolspline.h | 2 +- .../vtools/visualization/vistoolsplinepath.h | 2 +- .../vtools/visualization/vistooltriangle.h | 2 +- .../vtools/visualization/vistooltruedarts.h | 2 +- src/libs/vtools/vtools.pro | 6 ++++ src/libs/vwidgets/vgraphicssimpletextitem.h | 2 +- src/libs/vwidgets/vmaingraphicsscene.h | 2 +- src/libs/vwidgets/vwidgets.pro | 5 +++ src/test/ParserTest/ParserTest.pro | 4 +++ src/test/ValentinaTest/ValentinaTest.pro | 7 ++++ 79 files changed, 294 insertions(+), 78 deletions(-) diff --git a/common.pri b/common.pri index 70407853d..95b1147a1 100644 --- a/common.pri +++ b/common.pri @@ -125,6 +125,9 @@ ISYSTEM += \ -isystem "$$[QT_INSTALL_HEADERS]/QtGui" \ -isystem "$$[QT_INSTALL_HEADERS]/QtXmlPatterns" \ -isystem "$$[QT_INSTALL_HEADERS]/QtCore" \ + -isystem "$$[QT_INSTALL_HEADERS]/QtPrintSupport" \ + -isystem "$$[QT_INSTALL_HEADERS]/QtSvg" \ + -isystem "$$[QT_INSTALL_HEADERS]/QtNetwork" \ -isystem "$$[QT_INSTALL_HEADERS]/QtTest" } else { ISYSTEM += \ @@ -138,6 +141,12 @@ ISYSTEM += \ -isystem "$$[QT_INSTALL_LIBS]/QtXmlPatterns.framework/Versions/5/Headers/" \ -isystem "$$[QT_INSTALL_LIBS]/QtCore.framework/Headers/" \ -isystem "$$[QT_INSTALL_LIBS]/QtCore.framework/Versions/5/Headers/" \ + -isystem "$$[QT_INSTALL_LIBS]/QtPrintSupport.framework/Headers/" \ + -isystem "$$[QT_INSTALL_LIBS]/QtPrintSupport.framework/Versions/5/Headers/" \ + -isystem "$$[QT_INSTALL_LIBS]/QtSvg.framework/Headers/" \ + -isystem "$$[QT_INSTALL_LIBS]/QtSvg.framework/Versions/5/Headers/" \ + -isystem "$$[QT_INSTALL_LIBS]/QtNetwork.framework/Headers/" \ + -isystem "$$[QT_INSTALL_LIBS]/QtNetwork.framework/Versions/5/Headers/" \ -isystem "$$[QT_INSTALL_LIBS]/QtTest.framework/Headers/" \ -isystem "$$[QT_INSTALL_LIBS]/QtTest.framework/Versions/5/Headers/" } @@ -563,6 +572,32 @@ CLANG_DEBUG_CXXFLAGS += \ -Wzero-length-array \ -Qunused-arguments \ -fcolor-diagnostics + +ICC_DEBUG_CXXFLAGS += \ + $$ISYSTEM \ # Ignore warnings Qt headers. + -Wcomment \ + #-Weffc++ \ # Disabled, produce to many "false positive" warning + -Wextra-tokens \ + -Wformat \ + #-Winline \ + -Wmain \ + -Wmissing-declarations \ + -Wmissing-prototypes \ + -Wnon-virtual-dtor \ + -Wp64 \ + -Wpointer-arith \ + -Wremarks \ + -Wreturn-type \ + -Wsign-compare \ + -Wstrict-aliasing \ + -Wstrict-prototypes \ + -Wtrigraphs \ + -Wuninitialized \ + -Wunknown-pragmas \ + -Wunused-variable \ + -pedantic \ + -Wno-pch-messages \ + -wd1418,2012,2015 #disable warnings. Syntax example -wd1572,873,2259,2261 } else { # Don't use additional GCC and Clang keys on Windows system. # Can't find way mark ignore Qt header on Windows. diff --git a/src/app/tape/dialogs/dialogmdatabase.h b/src/app/tape/dialogs/dialogmdatabase.h index c2b0bfd79..aa7ca6c86 100644 --- a/src/app/tape/dialogs/dialogmdatabase.h +++ b/src/app/tape/dialogs/dialogmdatabase.h @@ -43,7 +43,7 @@ class DialogMDataBase : public QDialog Q_OBJECT public: - DialogMDataBase(const QStringList &list, QWidget *parent = 0); + explicit DialogMDataBase(const QStringList &list, QWidget *parent = 0); explicit DialogMDataBase(QWidget *parent = 0); virtual ~DialogMDataBase() Q_DECL_OVERRIDE; diff --git a/src/app/tape/mapplication.cpp b/src/app/tape/mapplication.cpp index ba0e81df3..65a2bb8e9 100644 --- a/src/app/tape/mapplication.cpp +++ b/src/app/tape/mapplication.cpp @@ -51,15 +51,20 @@ #include #include -#ifdef Q_CC_CLANG +#if defined(Q_CC_CLANG) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wmissing-prototypes" +#elif defined(Q_CC_INTEL) + #pragma warning( push ) + #pragma warning( disable: 1418 ) #endif Q_LOGGING_CATEGORY(mApp, "m.application") -#ifdef Q_CC_CLANG +#if defined(Q_CC_CLANG) #pragma clang diagnostic pop +#elif defined(Q_CC_INTEL) + #pragma warning( pop ) #endif #if QT_VERSION < QT_VERSION_CHECK(5, 2, 0) diff --git a/src/app/tape/tape.pro b/src/app/tape/tape.pro index b5a17091b..95d7eba82 100644 --- a/src/app/tape/tape.pro +++ b/src/app/tape/tape.pro @@ -106,6 +106,13 @@ CONFIG(debug, debug|release){ -Wundefined-reinterpret-cast \ -Wmissing-prototypes # rcc folder } + *-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${UI_DIR}" \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + -isystem "$${OUT_PWD}/$${RCC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + } } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index 16b91b983..61fef33c6 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -53,15 +53,20 @@ #define DIALOG_MAX_FORMULA_HEIGHT 64 -#ifdef Q_CC_CLANG +#if defined(Q_CC_CLANG) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wmissing-prototypes" +#elif defined(Q_CC_INTEL) + #pragma warning( push ) + #pragma warning( disable: 1418 ) #endif Q_LOGGING_CATEGORY(tMainWindow, "t.mainwindow") -#ifdef Q_CC_CLANG +#if defined(Q_CC_CLANG) #pragma clang diagnostic pop +#elif defined(Q_CC_INTEL) + #pragma warning( pop ) #endif // We need this enum in case we will add or delete a column. And also make code more readable. diff --git a/src/app/valentina/core/vapplication.cpp b/src/app/valentina/core/vapplication.cpp index f5acfc504..d9f76bdfb 100644 --- a/src/app/valentina/core/vapplication.cpp +++ b/src/app/valentina/core/vapplication.cpp @@ -52,8 +52,22 @@ #include #include +#if defined(Q_CC_CLANG) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wmissing-prototypes" +#elif defined(Q_CC_INTEL) + #pragma warning( push ) + #pragma warning( disable: 1418 ) +#endif + Q_LOGGING_CATEGORY(vApp, "v.application") +#if defined(Q_CC_CLANG) + #pragma clang diagnostic pop +#elif defined(Q_CC_INTEL) + #pragma warning( pop ) +#endif + constexpr auto DAYS_TO_KEEP_LOGS = 3; //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/valentina/core/vcmdexport.h b/src/app/valentina/core/vcmdexport.h index f7fdfcc8d..7baa66011 100644 --- a/src/app/valentina/core/vcmdexport.h +++ b/src/app/valentina/core/vcmdexport.h @@ -62,7 +62,7 @@ public: protected: - explicit VCommandLine(); + VCommandLine(); //@brief returns DialogLayoutSettings::PaperSizeTemplate DialogLayoutSettings::PaperSizeTemplate OptPaperSize() const; diff --git a/src/app/valentina/dialogs/dialoglayoutprogress.h b/src/app/valentina/dialogs/dialoglayoutprogress.h index 376392879..4ece9abe7 100644 --- a/src/app/valentina/dialogs/dialoglayoutprogress.h +++ b/src/app/valentina/dialogs/dialoglayoutprogress.h @@ -43,7 +43,7 @@ class DialogLayoutProgress : public QDialog Q_OBJECT public: - DialogLayoutProgress(int count, QWidget *parent = 0); + explicit DialogLayoutProgress(int count, QWidget *parent = 0); ~DialogLayoutProgress(); signals: diff --git a/src/app/valentina/dialogs/dialoglayoutsettings.h b/src/app/valentina/dialogs/dialoglayoutsettings.h index bb5106fff..c2b8b8d3d 100644 --- a/src/app/valentina/dialogs/dialoglayoutsettings.h +++ b/src/app/valentina/dialogs/dialoglayoutsettings.h @@ -49,7 +49,7 @@ class DialogLayoutSettings : public QDialog public: enum class PaperSizeTemplate : char { A0 = 0, A1, A2, A3, A4, Letter, Legal, Roll24in, Roll30in, Roll36in, Roll42in, Roll44in}; - DialogLayoutSettings(VLayoutGenerator *generator, QWidget *parent = nullptr, bool disableSettings = false); + explicit DialogLayoutSettings(VLayoutGenerator *generator, QWidget *parent = nullptr, bool disableSettings = false); ~DialogLayoutSettings(); int GetPaperHeight() const; diff --git a/src/app/valentina/dialogs/dialogpatternproperties.h b/src/app/valentina/dialogs/dialogpatternproperties.h index d66264221..fe25722ec 100644 --- a/src/app/valentina/dialogs/dialogpatternproperties.h +++ b/src/app/valentina/dialogs/dialogpatternproperties.h @@ -45,7 +45,7 @@ class DialogPatternProperties : public QDialog { Q_OBJECT public: - DialogPatternProperties(VPattern *doc, QWidget *parent = nullptr); + explicit DialogPatternProperties(VPattern *doc, QWidget *parent = nullptr); virtual ~DialogPatternProperties() Q_DECL_OVERRIDE; signals: void UpdateGradation(); diff --git a/src/app/valentina/dialogs/dialogpatternxmledit.h b/src/app/valentina/dialogs/dialogpatternxmledit.h index 204eff6df..6613e242f 100644 --- a/src/app/valentina/dialogs/dialogpatternxmledit.h +++ b/src/app/valentina/dialogs/dialogpatternxmledit.h @@ -51,9 +51,9 @@ public: * @param nodetype : node type (node, attribute, root) * @param source : the source dom node */ - explicit VXMLTreeElement (QString name, short int nodetype, QDomNode source, bool editor); + VXMLTreeElement (QString name, short int nodetype, QDomNode source, bool editor); - explicit VXMLTreeElement (QString name, int nodetype); + VXMLTreeElement (QString name, int nodetype); ~VXMLTreeElement (); static const short int TypeNode; diff --git a/src/app/valentina/dialogs/dialogsavelayout.h b/src/app/valentina/dialogs/dialogsavelayout.h index 61e64bd0c..bd82d196b 100644 --- a/src/app/valentina/dialogs/dialogsavelayout.h +++ b/src/app/valentina/dialogs/dialogsavelayout.h @@ -84,7 +84,7 @@ class DialogSaveLayout : public QDialog Q_OBJECT public: - DialogSaveLayout(int count, const QString &fileName = QString(), + explicit DialogSaveLayout(int count, const QString &fileName = QString(), QWidget *parent = 0); ~DialogSaveLayout(); diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 5f62847cf..381b3a54a 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -66,8 +66,22 @@ #include #include +#if defined(Q_CC_CLANG) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wmissing-prototypes" +#elif defined(Q_CC_INTEL) + #pragma warning( push ) + #pragma warning( disable: 1418 ) +#endif + Q_LOGGING_CATEGORY(vMainWindow, "v.mainwindow") +#if defined(Q_CC_CLANG) + #pragma clang diagnostic pop +#elif defined(Q_CC_INTEL) + #pragma warning( pop ) +#endif + //--------------------------------------------------------------------------------------------------------------------- /** * @brief MainWindow constructor. diff --git a/src/app/valentina/valentina.pro b/src/app/valentina/valentina.pro index 689f66a9a..17a867114 100644 --- a/src/app/valentina/valentina.pro +++ b/src/app/valentina/valentina.pro @@ -105,7 +105,15 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS -= \ -Wmissing-prototypes \ -Wundefined-reinterpret-cast - } + } + *-icc-*{ + QMAKE_CXXFLAGS+= \ + -isystem "$${OUT_PWD}/$${UI_DIR}" \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + -isystem "$${OUT_PWD}/$${RCC_DIR}" \ + -isystem "$${OUT_PWD}/../../libs/vtools/$${UI_DIR}" \ # For VTools UI files + $$ICC_DEBUG_CXXFLAGS + } } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. diff --git a/src/libs/ifc/exception/vexception.cpp b/src/libs/ifc/exception/vexception.cpp index 64c019c44..02887f2b8 100644 --- a/src/libs/ifc/exception/vexception.cpp +++ b/src/libs/ifc/exception/vexception.cpp @@ -35,7 +35,7 @@ #include #include -Q_LOGGING_CATEGORY(vExcep, "v.excep") +//Q_LOGGING_CATEGORY(vExcep, "v.excep") //Commented because don't use now //--------------------------------------------------------------------------------------------------------------------- /** diff --git a/src/libs/ifc/ifc.pro b/src/libs/ifc/ifc.pro index 2de44c6ac..566ea8504 100644 --- a/src/libs/ifc/ifc.pro +++ b/src/libs/ifc/ifc.pro @@ -43,6 +43,9 @@ MOC_DIR = moc # objecs files OBJECTS_DIR = obj +# Directory for files created rcc +RCC_DIR = rcc + # Resource files. This files will be included in binary. RESOURCES += \ schema.qrc # Schemas for validation xml files. @@ -61,6 +64,7 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += \ # Key -isystem disable checking errors in system headers. -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + -isystem "$${OUT_PWD}/$${RCC_DIR}" \ $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. noAddressSanitizer{ # For enable run qmake with CONFIG+=noAddressSanitizer @@ -77,6 +81,7 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += \ # Key -isystem disable checking errors in system headers. -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + -isystem "$${OUT_PWD}/$${RCC_DIR}" \ $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. # -isystem key works only for headers. In some cases it's not enough. But we can't delete these warnings and @@ -85,6 +90,12 @@ CONFIG(debug, debug|release){ -Wmissing-prototypes \ -Wundefined-reinterpret-cast } + *-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + -isystem "$${OUT_PWD}/$${RCC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + } } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. diff --git a/src/libs/qmuparser/qmuparser.pro b/src/libs/qmuparser/qmuparser.pro index 644e7b70a..0d6dfe669 100644 --- a/src/libs/qmuparser/qmuparser.pro +++ b/src/libs/qmuparser/qmuparser.pro @@ -91,6 +91,11 @@ CONFIG(debug, debug|release){ -isystem "$${OUT_PWD}/$${MOC_DIR}" \ $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. } + *-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + } } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. diff --git a/src/libs/qmuparser/qmuparserbytecode.cpp b/src/libs/qmuparser/qmuparserbytecode.cpp index 29e525a62..ff10024e0 100644 --- a/src/libs/qmuparser/qmuparserbytecode.cpp +++ b/src/libs/qmuparser/qmuparserbytecode.cpp @@ -203,6 +203,11 @@ void QmuParserByteCode::ConstantFolding(ECmdCode a_Oprt) } // switch opcode } +#if defined (Q_CC_INTEL) +#pragma warning( push ) +#pragma warning( disable: 1195 ) +#endif + //--------------------------------------------------------------------------------------------------------------------- /** * @brief Add an operator identifier to bytecode. @@ -363,6 +368,10 @@ void QmuParserByteCode::AddOp(ECmdCode a_Oprt) } } +#if defined(Q_CC_INTEL) +#pragma warning( pop ) +#endif + //--------------------------------------------------------------------------------------------------------------------- void QmuParserByteCode::AddIfElse(ECmdCode a_Oprt) { diff --git a/src/libs/vdxf/dxflib/dl_entities.h b/src/libs/vdxf/dxflib/dl_entities.h index f8c8ca271..a024d46f0 100644 --- a/src/libs/vdxf/dxflib/dl_entities.h +++ b/src/libs/vdxf/dxflib/dl_entities.h @@ -210,7 +210,7 @@ struct DXFLIB_EXPORT DL_PointData * Constructor. * Parameters: see member variables. */ - DL_PointData(double px=0.0, double py=0.0, double pz=0.0) + explicit DL_PointData(double px=0.0, double py=0.0, double pz=0.0) : x(px), y(py), z(pz) { } @@ -420,8 +420,7 @@ struct DXFLIB_EXPORT DL_VertexData * Constructor. * Parameters: see member variables. */ - DL_VertexData(double px=0.0, double py=0.0, double pz=0.0, - double pBulge=0.0) + explicit DL_VertexData(double px=0.0, double py=0.0, double pz=0.0, double pBulge=0.0) : x(px), y(py), z(pz), bulge(pBulge) { } diff --git a/src/libs/vdxf/dxflib/dl_writer_ascii.h b/src/libs/vdxf/dxflib/dl_writer_ascii.h index b6141d9a9..0c87a21d3 100644 --- a/src/libs/vdxf/dxflib/dl_writer_ascii.h +++ b/src/libs/vdxf/dxflib/dl_writer_ascii.h @@ -52,7 +52,7 @@ public: * @todo What if \c fname is NULL? Or \c fname can't be opened for * another reason? */ - DL_WriterA(const char* fname, DL_Codes::version version=DL_VERSION_2000) + explicit DL_WriterA(const char* fname, DL_Codes::version version=DL_VERSION_2000) : DL_Writer(version), m_ofile(fname) {} virtual ~DL_WriterA() {} diff --git a/src/libs/vdxf/vdxf.pro b/src/libs/vdxf/vdxf.pro index eb47d6039..5072670b3 100644 --- a/src/libs/vdxf/vdxf.pro +++ b/src/libs/vdxf/vdxf.pro @@ -69,6 +69,11 @@ CONFIG(debug, debug|release){ -isystem "$${OUT_PWD}/$${MOC_DIR}" \ $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. } + *-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + } } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. diff --git a/src/libs/vdxf/vdxfengine.cpp b/src/libs/vdxf/vdxfengine.cpp index 00a6b10b4..b8bdd0e4a 100644 --- a/src/libs/vdxf/vdxfengine.cpp +++ b/src/libs/vdxf/vdxfengine.cpp @@ -39,9 +39,12 @@ //--------------------------------------------------------------------------------------------------------------------- static inline QPaintEngine::PaintEngineFeatures svgEngineFeatures() { -#ifdef Q_CC_CLANG +#if defined(Q_CC_CLANG) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wsign-conversion" +#elif defined (Q_CC_INTEL) +#pragma warning( push ) +#pragma warning( disable: 68 ) #endif return QPaintEngine::PaintEngineFeatures( @@ -51,8 +54,10 @@ static inline QPaintEngine::PaintEngineFeatures svgEngineFeatures() & ~QPaintEngine::ConicalGradientFill & ~QPaintEngine::PorterDuff); -#ifdef Q_CC_CLANG +#if defined(Q_CC_CLANG) #pragma clang diagnostic pop +#elif defined(Q_CC_INTEL) +#pragma warning( pop ) #endif } diff --git a/src/libs/vformat/vformat.pro b/src/libs/vformat/vformat.pro index 0030a384f..d5d6b2197 100644 --- a/src/libs/vformat/vformat.pro +++ b/src/libs/vformat/vformat.pro @@ -75,6 +75,11 @@ CONFIG(debug, debug|release){ -isystem "$${OUT_PWD}/$${MOC_DIR}" \ $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. } + *-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + } } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. diff --git a/src/libs/vgeometry/vabstractcurve.h b/src/libs/vgeometry/vabstractcurve.h index d6082041d..ea44f5f7b 100644 --- a/src/libs/vgeometry/vabstractcurve.h +++ b/src/libs/vgeometry/vabstractcurve.h @@ -41,7 +41,8 @@ class QLineF; class VAbstractCurve :public VGObject { public: - VAbstractCurve(const GOType &type, const quint32 &idObject = NULL_ID, const Draw &mode = Draw::Calculation); + explicit VAbstractCurve(const GOType &type, const quint32 &idObject = NULL_ID, + const Draw &mode = Draw::Calculation); explicit VAbstractCurve(const VAbstractCurve &curve); VAbstractCurve& operator= (const VAbstractCurve &curve); diff --git a/src/libs/vgeometry/vgeometry.pro b/src/libs/vgeometry/vgeometry.pro index 22d2d6815..95d49a205 100644 --- a/src/libs/vgeometry/vgeometry.pro +++ b/src/libs/vgeometry/vgeometry.pro @@ -69,6 +69,11 @@ CONFIG(debug, debug|release){ -isystem "$${OUT_PWD}/$${MOC_DIR}" \ $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. } + *-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + } } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. diff --git a/src/libs/vgeometry/vgobject.h b/src/libs/vgeometry/vgobject.h index 679cd54a2..0a0d0ffdd 100644 --- a/src/libs/vgeometry/vgobject.h +++ b/src/libs/vgeometry/vgobject.h @@ -47,7 +47,7 @@ class VGObject { public: VGObject(); - VGObject(const GOType &type, const quint32 &idObject = 0, const Draw &mode = Draw::Calculation); + explicit VGObject(const GOType &type, const quint32 &idObject = 0, const Draw &mode = Draw::Calculation); VGObject(const VGObject &obj); VGObject& operator= (const VGObject &obj); virtual ~VGObject(); diff --git a/src/libs/vgeometry/vpointf.h b/src/libs/vgeometry/vpointf.h index da141fa0d..b253f14c5 100644 --- a/src/libs/vgeometry/vpointf.h +++ b/src/libs/vgeometry/vpointf.h @@ -35,6 +35,11 @@ class QPointF; class QString; class VPointFData; +#if defined (Q_CC_INTEL) +#pragma warning(push) +#pragma warning(disable : 2304) +#endif + /** * @brief The VPointF class keep data of point. */ @@ -64,4 +69,8 @@ private: QSharedDataPointer d; }; +#if defined(Q_CC_INTEL) +#pragma warning(pop) +#endif + #endif // VPOINTF_H diff --git a/src/libs/vgeometry/vsplinepath.h b/src/libs/vgeometry/vsplinepath.h index 69a1f85a4..7a5f5addf 100644 --- a/src/libs/vgeometry/vsplinepath.h +++ b/src/libs/vgeometry/vsplinepath.h @@ -51,7 +51,7 @@ public: * @param idObject parent id. * @param mode mode creation spline path. */ - VSplinePath(qreal kCurve = 1, quint32 idObject = 0, Draw mode = Draw::Calculation); + explicit VSplinePath(qreal kCurve = 1, quint32 idObject = 0, Draw mode = Draw::Calculation); /** * @brief VSplinePath copy constructor. * @param splPath spline path. diff --git a/src/libs/vlayout/vlayout.pro b/src/libs/vlayout/vlayout.pro index 0230abb59..3a5af515a 100644 --- a/src/libs/vlayout/vlayout.pro +++ b/src/libs/vlayout/vlayout.pro @@ -82,6 +82,12 @@ CONFIG(debug, debug|release){ -Wundefined-reinterpret-cast \ -Wmissing-prototypes # rcc folder } + *-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + -isystem "$${OUT_PWD}/$${RCC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + } } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. diff --git a/src/libs/vmisc/vlockguard.h b/src/libs/vmisc/vlockguard.h index 4f1e84630..d25db7b77 100644 --- a/src/libs/vmisc/vlockguard.h +++ b/src/libs/vmisc/vlockguard.h @@ -53,7 +53,7 @@ template class VLockGuard { public: - VLockGuard(const QString& lockName, int stale = 0, int timeout = 0); + explicit VLockGuard(const QString& lockName, int stale = 0, int timeout = 0); template VLockGuard(const QString& lockName, Alloc a, int stale = 0, int timeout=0); @@ -173,6 +173,11 @@ bool VLockGuard::TryLock(const QString &lockName, int stale, int timeou template using VLockGuardPtr = std::shared_ptr>; +#if defined (Q_CC_INTEL) +#pragma warning( push ) +#pragma warning( disable: 1418 ) +#endif + template void VlpCreateLock(VLockGuardPtr& r, const QString& lockName, int stale = 0, int timeout = 0) { @@ -191,4 +196,8 @@ void VlpCreateLock(VLockGuardPtr& r, const QString& lockName, Alloc a, r.reset(new VLockGuard(lockName, a, d, stale, timeout)); } +#if defined(Q_CC_INTEL) +#pragma warning( pop ) +#endif + #endif // VLOCKGUARD_H diff --git a/src/libs/vmisc/vmisc.pro b/src/libs/vmisc/vmisc.pro index 3688aa6cd..5ffcd5cef 100644 --- a/src/libs/vmisc/vmisc.pro +++ b/src/libs/vmisc/vmisc.pro @@ -82,6 +82,11 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS -= \ -Wmissing-prototypes } + *-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + } } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. diff --git a/src/libs/vobj/vobj.pro b/src/libs/vobj/vobj.pro index 4f9d5d4f0..73ba1f377 100644 --- a/src/libs/vobj/vobj.pro +++ b/src/libs/vobj/vobj.pro @@ -69,6 +69,11 @@ CONFIG(debug, debug|release){ -isystem "$${OUT_PWD}/$${MOC_DIR}" \ $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. } + *-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + } } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. diff --git a/src/libs/vobj/vobjengine.cpp b/src/libs/vobj/vobjengine.cpp index aa182b1ef..5a049283a 100644 --- a/src/libs/vobj/vobjengine.cpp +++ b/src/libs/vobj/vobjengine.cpp @@ -40,9 +40,13 @@ //--------------------------------------------------------------------------------------------------------------------- static inline QPaintEngine::PaintEngineFeatures svgEngineFeatures() { -#ifdef Q_CC_CLANG +#if defined(Q_CC_CLANG) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wsign-conversion" +#elif defined (Q_CC_INTEL) +#pragma warning( push ) +#pragma warning( disable: 68 ) +#pragma warning( disable: 2022 ) #endif return QPaintEngine::PaintEngineFeatures( @@ -52,14 +56,14 @@ static inline QPaintEngine::PaintEngineFeatures svgEngineFeatures() & ~QPaintEngine::ConicalGradientFill & ~QPaintEngine::PorterDuff); -#ifdef Q_CC_CLANG +#if defined(Q_CC_CLANG) #pragma clang diagnostic pop #endif } //--------------------------------------------------------------------------------------------------------------------- VObjEngine::VObjEngine() - :QPaintEngine(svgEngineFeatures()), stream(nullptr), globalPointsCount(0), outputDevice(nullptr), planeCount(0), + :QPaintEngine(svgEngineFeatures()), stream(), globalPointsCount(0), outputDevice(), planeCount(0), size(), resolution(96), matrix() { for (int i=0; i < MAX_POINTS; i++) @@ -69,17 +73,20 @@ VObjEngine::VObjEngine() } } +#if defined(Q_CC_INTEL) +#pragma warning( pop ) +#endif + //--------------------------------------------------------------------------------------------------------------------- VObjEngine::~VObjEngine() { - outputDevice = nullptr; } //--------------------------------------------------------------------------------------------------------------------- bool VObjEngine::begin(QPaintDevice *pdev) { Q_UNUSED(pdev) - if (outputDevice == nullptr) + if (outputDevice.isNull()) { qWarning("VObjEngine::begin(), no output device"); return false; @@ -106,7 +113,7 @@ bool VObjEngine::begin(QPaintDevice *pdev) return false; } - stream = new QTextStream(outputDevice); + stream = QSharedPointer(new QTextStream(outputDevice.data())); *stream << "# Valentina OBJ File" << endl; *stream << "# www.valentina-project.org/" << endl; return true; @@ -115,7 +122,7 @@ bool VObjEngine::begin(QPaintDevice *pdev) //--------------------------------------------------------------------------------------------------------------------- bool VObjEngine::end() { - delete stream; + stream.reset(); return true; } @@ -278,14 +285,14 @@ void VObjEngine::setSize(const QSize &value) //--------------------------------------------------------------------------------------------------------------------- QIODevice *VObjEngine::getOutputDevice() const { - return outputDevice; + return outputDevice.data(); } //--------------------------------------------------------------------------------------------------------------------- void VObjEngine::setOutputDevice(QIODevice *value) { Q_ASSERT(!isActive()); - outputDevice = value; + outputDevice.reset(value); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vobj/vobjengine.h b/src/libs/vobj/vobjengine.h index 040d27c67..3a2b4fab2 100644 --- a/src/libs/vobj/vobjengine.h +++ b/src/libs/vobj/vobjengine.h @@ -64,9 +64,9 @@ public: private: Q_DISABLE_COPY(VObjEngine) - QTextStream *stream; + QSharedPointer stream; unsigned int globalPointsCount; - QIODevice *outputDevice; + QSharedPointer outputDevice; del_point2d_t points[MAX_POINTS]; unsigned int planeCount; QSize size; diff --git a/src/libs/vobj/vobjpaintdevice.cpp b/src/libs/vobj/vobjpaintdevice.cpp index 078227152..c5a3cb915 100644 --- a/src/libs/vobj/vobjpaintdevice.cpp +++ b/src/libs/vobj/vobjpaintdevice.cpp @@ -45,14 +45,13 @@ VObjPaintDevice::~VObjPaintDevice() { delete engine->getOutputDevice(); } - delete engine; } //--------------------------------------------------------------------------------------------------------------------- // cppcheck-suppress unusedFunction QPaintEngine *VObjPaintDevice::paintEngine() const { - return engine; + return engine.data(); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vobj/vobjpaintdevice.h b/src/libs/vobj/vobjpaintdevice.h index d57e0676a..a3a95a347 100644 --- a/src/libs/vobj/vobjpaintdevice.h +++ b/src/libs/vobj/vobjpaintdevice.h @@ -31,6 +31,7 @@ #include #include +#include class VObjEngine; class QIODevice; @@ -58,7 +59,7 @@ protected: virtual int metric(PaintDeviceMetric metric) const Q_DECL_OVERRIDE; private: Q_DISABLE_COPY(VObjPaintDevice) - VObjEngine *engine; + QSharedPointer engine; QString fileName; uint owns_iodevice; }; diff --git a/src/libs/vpatterndb/vcontainer.cpp b/src/libs/vpatterndb/vcontainer.cpp index 1fdc01c28..de50374e1 100644 --- a/src/libs/vpatterndb/vcontainer.cpp +++ b/src/libs/vpatterndb/vcontainer.cpp @@ -37,15 +37,20 @@ #include #include -#ifdef Q_CC_CLANG +#if defined(Q_CC_CLANG) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wmissing-prototypes" +#elif defined(Q_CC_INTEL) + #pragma warning( push ) + #pragma warning( disable: 1418 ) #endif Q_LOGGING_CATEGORY(vCon, "v.container") -#ifdef Q_CC_CLANG +#if defined(Q_CC_CLANG) #pragma clang diagnostic pop +#elif defined(Q_CC_INTEL) + #pragma warning( pop ) #endif quint32 VContainer::_id = NULL_ID; diff --git a/src/libs/vpatterndb/vpatterndb.pro b/src/libs/vpatterndb/vpatterndb.pro index 77f5bfaf9..30a742b9a 100644 --- a/src/libs/vpatterndb/vpatterndb.pro +++ b/src/libs/vpatterndb/vpatterndb.pro @@ -72,6 +72,11 @@ CONFIG(debug, debug|release){ -isystem "$${OUT_PWD}/$${MOC_DIR}" \ $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. } + *-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + } } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. diff --git a/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.h b/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.h index 24c920948..a6fcbf9b4 100644 --- a/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.h +++ b/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.h @@ -37,7 +37,7 @@ class VPROPERTYEXPLORERSHARED_EXPORT VFileEditWidget : public QWidget Q_OBJECT public: - VFileEditWidget(QWidget* parent, bool is_directory = false); + explicit VFileEditWidget(QWidget* parent, bool is_directory = false); virtual ~VFileEditWidget() Q_DECL_OVERRIDE; diff --git a/src/libs/vpropertyexplorer/plugins/vwidgetproperty.h b/src/libs/vpropertyexplorer/plugins/vwidgetproperty.h index 104602d7e..e110dc44c 100644 --- a/src/libs/vpropertyexplorer/plugins/vwidgetproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vwidgetproperty.h @@ -39,7 +39,7 @@ class VPROPERTYEXPLORERSHARED_EXPORT VWidgetProperty : public VEmptyProperty { public: //! Constructor - VWidgetProperty(const QString &name, QWidget* widget = nullptr); + explicit VWidgetProperty(const QString &name, QWidget* widget = nullptr); //! The destructor virtual ~VWidgetProperty() Q_DECL_OVERRIDE; diff --git a/src/libs/vpropertyexplorer/vpropertyexplorer.pro b/src/libs/vpropertyexplorer/vpropertyexplorer.pro index 4d6a1b77b..7606dda1c 100644 --- a/src/libs/vpropertyexplorer/vpropertyexplorer.pro +++ b/src/libs/vpropertyexplorer/vpropertyexplorer.pro @@ -100,6 +100,11 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS -= \ -Wundefined-reinterpret-cast } + *-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + } } else { *-g++{ QMAKE_CXXFLAGS += $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details. diff --git a/src/libs/vpropertyexplorer/vpropertymodel.h b/src/libs/vpropertyexplorer/vpropertymodel.h index 95ee61154..98a3bf1c6 100644 --- a/src/libs/vpropertyexplorer/vpropertymodel.h +++ b/src/libs/vpropertyexplorer/vpropertymodel.h @@ -154,7 +154,7 @@ protected: virtual QModelIndex getIndexFromProperty(VProperty* property, int column = 0) const; //! Protected constructor passing the private object - VPropertyModel(VPropertyModelPrivate* d, QObject* parent = 0); + explicit VPropertyModel(VPropertyModelPrivate* d, QObject* parent = 0); //! The model data VPropertyModelPrivate* d_ptr; diff --git a/src/libs/vpropertyexplorer/vpropertyset.h b/src/libs/vpropertyexplorer/vpropertyset.h index d3559c7d7..151a99338 100644 --- a/src/libs/vpropertyexplorer/vpropertyset.h +++ b/src/libs/vpropertyexplorer/vpropertyset.h @@ -45,7 +45,7 @@ class VPROPERTYEXPLORERSHARED_EXPORT VPropertySet { public: //! Default constructor, creating an empty property set - explicit VPropertySet(); + VPropertySet(); //! Destructor virtual ~VPropertySet(); diff --git a/src/libs/vpropertyexplorer/vpropertytreeview.h b/src/libs/vpropertyexplorer/vpropertytreeview.h index 757910f57..bc6e21a5a 100644 --- a/src/libs/vpropertyexplorer/vpropertytreeview.h +++ b/src/libs/vpropertyexplorer/vpropertytreeview.h @@ -41,7 +41,7 @@ public: //! The destructor, taking a model and setting it to the tree view //! \param model The model to set as model for this tree view - VPropertyTreeView(VPropertyModel* model, QWidget *parent = 0); + explicit VPropertyTreeView(VPropertyModel* model, QWidget *parent = 0); //! Destructor virtual ~VPropertyTreeView() Q_DECL_OVERRIDE; @@ -55,7 +55,7 @@ protected: virtual void init(); //! protected constructor - explicit VPropertyTreeView(VPropertyTreeViewPrivate* d, bool init_, QWidget *parent = 0); + VPropertyTreeView(VPropertyTreeViewPrivate* d, bool init_, QWidget *parent = 0); //! The protected data VPropertyTreeViewPrivate* d_ptr; diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolsinglepoint.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolsinglepoint.cpp index 7cf485c7d..1a5eda380 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolsinglepoint.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolsinglepoint.cpp @@ -34,15 +34,20 @@ #include -#ifdef Q_CC_CLANG +#if defined(Q_CC_CLANG) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wmissing-prototypes" +#elif defined(Q_CC_INTEL) + #pragma warning( push ) + #pragma warning( disable: 1418 ) #endif Q_LOGGING_CATEGORY(vToolSinglePoint, "v.toolSinglePoint") -#ifdef Q_CC_CLANG +#if defined(Q_CC_CLANG) #pragma clang diagnostic pop +#elif defined(Q_CC_INTEL) + #pragma warning( pop ) #endif //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vtools/tools/vdatatool.h b/src/libs/vtools/tools/vdatatool.h index 00848a07e..a4d9f02aa 100644 --- a/src/libs/vtools/tools/vdatatool.h +++ b/src/libs/vtools/tools/vdatatool.h @@ -44,7 +44,7 @@ class VDataTool : public QObject { Q_OBJECT public: - VDataTool(VContainer *data, QObject *parent = nullptr); + explicit VDataTool(VContainer *data, QObject *parent = nullptr); virtual ~VDataTool() Q_DECL_OVERRIDE; VDataTool &operator= (const VDataTool &tool); VContainer getData() const; diff --git a/src/libs/vtools/visualization/visline.h b/src/libs/vtools/visualization/visline.h index 81dcfd80a..fcfed96c0 100644 --- a/src/libs/vtools/visualization/visline.h +++ b/src/libs/vtools/visualization/visline.h @@ -39,7 +39,7 @@ class VisLine: public Visualization, public QGraphicsLineItem { Q_OBJECT public: - VisLine(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisLine(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisLine() Q_DECL_OVERRIDE; virtual int type() const Q_DECL_OVERRIDE {return Type;} diff --git a/src/libs/vtools/visualization/vispath.h b/src/libs/vtools/visualization/vispath.h index 4d625cdd9..106155629 100644 --- a/src/libs/vtools/visualization/vispath.h +++ b/src/libs/vtools/visualization/vispath.h @@ -36,7 +36,7 @@ class VisPath : public Visualization, public QGraphicsPathItem { Q_OBJECT public: - VisPath(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisPath(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisPath() Q_DECL_OVERRIDE; virtual int type() const Q_DECL_OVERRIDE {return Type;} diff --git a/src/libs/vtools/visualization/vistoolalongline.h b/src/libs/vtools/visualization/vistoolalongline.h index 6c0caf4eb..2cf6466d1 100644 --- a/src/libs/vtools/visualization/vistoolalongline.h +++ b/src/libs/vtools/visualization/vistoolalongline.h @@ -37,7 +37,7 @@ class VisToolAlongLine :public VisLine { Q_OBJECT public: - VisToolAlongLine(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolAlongLine(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolAlongLine() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolarc.h b/src/libs/vtools/visualization/vistoolarc.h index 6539b4320..3b542ce1b 100644 --- a/src/libs/vtools/visualization/vistoolarc.h +++ b/src/libs/vtools/visualization/vistoolarc.h @@ -35,7 +35,7 @@ class VisToolArc : public VisPath { Q_OBJECT public: - VisToolArc(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolArc(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolArc() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolarcwithlength.h b/src/libs/vtools/visualization/vistoolarcwithlength.h index 7b405f888..c86431d7d 100644 --- a/src/libs/vtools/visualization/vistoolarcwithlength.h +++ b/src/libs/vtools/visualization/vistoolarcwithlength.h @@ -35,7 +35,7 @@ class VisToolArcWithLength : public VisPath { Q_OBJECT public: - VisToolArcWithLength(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolArcWithLength(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolArcWithLength() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolbisector.h b/src/libs/vtools/visualization/vistoolbisector.h index 0c55efeb2..0549566cc 100644 --- a/src/libs/vtools/visualization/vistoolbisector.h +++ b/src/libs/vtools/visualization/vistoolbisector.h @@ -35,7 +35,7 @@ class VisToolBisector :public VisLine { Q_OBJECT public: - VisToolBisector(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolBisector(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolBisector() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolcurveintersectaxis.h b/src/libs/vtools/visualization/vistoolcurveintersectaxis.h index 9b02a2fce..f90d885a0 100644 --- a/src/libs/vtools/visualization/vistoolcurveintersectaxis.h +++ b/src/libs/vtools/visualization/vistoolcurveintersectaxis.h @@ -37,7 +37,7 @@ class VisToolCurveIntersectAxis : public VisLine { Q_OBJECT public: - VisToolCurveIntersectAxis(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolCurveIntersectAxis(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolCurveIntersectAxis() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolcutarc.h b/src/libs/vtools/visualization/vistoolcutarc.h index 574e16a96..070366a4d 100644 --- a/src/libs/vtools/visualization/vistoolcutarc.h +++ b/src/libs/vtools/visualization/vistoolcutarc.h @@ -35,7 +35,7 @@ class VisToolCutArc : public VisPath { Q_OBJECT public: - VisToolCutArc(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolCutArc(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolCutArc() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolcutspline.h b/src/libs/vtools/visualization/vistoolcutspline.h index 7721b8d2b..6fee48562 100644 --- a/src/libs/vtools/visualization/vistoolcutspline.h +++ b/src/libs/vtools/visualization/vistoolcutspline.h @@ -35,7 +35,7 @@ class VisToolCutSpline : public VisPath { Q_OBJECT public: - VisToolCutSpline(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolCutSpline(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolCutSpline() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolcutsplinepath.h b/src/libs/vtools/visualization/vistoolcutsplinepath.h index ceb770dd0..4010a42ce 100644 --- a/src/libs/vtools/visualization/vistoolcutsplinepath.h +++ b/src/libs/vtools/visualization/vistoolcutsplinepath.h @@ -35,7 +35,7 @@ class VisToolCutSplinePath : public VisPath { Q_OBJECT public: - VisToolCutSplinePath(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolCutSplinePath(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolCutSplinePath() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolendline.h b/src/libs/vtools/visualization/vistoolendline.h index 181618a12..ad4b0f58d 100644 --- a/src/libs/vtools/visualization/vistoolendline.h +++ b/src/libs/vtools/visualization/vistoolendline.h @@ -37,7 +37,7 @@ class VisToolEndLine : public VisLine { Q_OBJECT public: - VisToolEndLine(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolEndLine(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolEndLine() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolheight.h b/src/libs/vtools/visualization/vistoolheight.h index 6941b78e0..173748295 100644 --- a/src/libs/vtools/visualization/vistoolheight.h +++ b/src/libs/vtools/visualization/vistoolheight.h @@ -35,7 +35,7 @@ class VisToolHeight : public VisLine { Q_OBJECT public: - VisToolHeight(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolHeight(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolHeight() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolline.h b/src/libs/vtools/visualization/vistoolline.h index 049fbe1ae..a35ead45e 100644 --- a/src/libs/vtools/visualization/vistoolline.h +++ b/src/libs/vtools/visualization/vistoolline.h @@ -35,7 +35,7 @@ class VisToolLine : public VisLine { Q_OBJECT public: - VisToolLine(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolLine(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolLine() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoollineintersect.h b/src/libs/vtools/visualization/vistoollineintersect.h index af60a13e6..cab06ec15 100644 --- a/src/libs/vtools/visualization/vistoollineintersect.h +++ b/src/libs/vtools/visualization/vistoollineintersect.h @@ -35,7 +35,7 @@ class VisToolLineIntersect :public VisLine { Q_OBJECT public: - VisToolLineIntersect(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolLineIntersect(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolLineIntersect() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoollineintersectaxis.h b/src/libs/vtools/visualization/vistoollineintersectaxis.h index e527afcbd..b55cec534 100644 --- a/src/libs/vtools/visualization/vistoollineintersectaxis.h +++ b/src/libs/vtools/visualization/vistoollineintersectaxis.h @@ -37,7 +37,7 @@ class VisToolLineIntersectAxis : public VisLine { Q_OBJECT public: - VisToolLineIntersectAxis(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolLineIntersectAxis(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolLineIntersectAxis() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolnormal.h b/src/libs/vtools/visualization/vistoolnormal.h index dca366e25..5fdf27677 100644 --- a/src/libs/vtools/visualization/vistoolnormal.h +++ b/src/libs/vtools/visualization/vistoolnormal.h @@ -35,7 +35,7 @@ class VisToolNormal : public VisLine { Q_OBJECT public: - VisToolNormal(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolNormal(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolNormal() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolpointfromarcandtangent.h b/src/libs/vtools/visualization/vistoolpointfromarcandtangent.h index 370cb98ea..a6678712c 100644 --- a/src/libs/vtools/visualization/vistoolpointfromarcandtangent.h +++ b/src/libs/vtools/visualization/vistoolpointfromarcandtangent.h @@ -36,7 +36,7 @@ class VisToolPointFromArcAndTangent : public VisLine { Q_OBJECT public: - VisToolPointFromArcAndTangent(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolPointFromArcAndTangent(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolPointFromArcAndTangent() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolpointfromcircleandtangent.h b/src/libs/vtools/visualization/vistoolpointfromcircleandtangent.h index b7408584a..63aecf094 100644 --- a/src/libs/vtools/visualization/vistoolpointfromcircleandtangent.h +++ b/src/libs/vtools/visualization/vistoolpointfromcircleandtangent.h @@ -36,7 +36,7 @@ class VisToolPointFromCircleAndTangent : public VisLine { Q_OBJECT public: - VisToolPointFromCircleAndTangent(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolPointFromCircleAndTangent(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolPointFromCircleAndTangent() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolpointofcontact.h b/src/libs/vtools/visualization/vistoolpointofcontact.h index 2e666d0cc..1b46343d9 100644 --- a/src/libs/vtools/visualization/vistoolpointofcontact.h +++ b/src/libs/vtools/visualization/vistoolpointofcontact.h @@ -35,7 +35,7 @@ class VisToolPointOfContact : public VisLine { Q_OBJECT public: - VisToolPointOfContact(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolPointOfContact(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolPointOfContact() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolpointofintersection.h b/src/libs/vtools/visualization/vistoolpointofintersection.h index 6d3f43fd2..7a2ff8809 100644 --- a/src/libs/vtools/visualization/vistoolpointofintersection.h +++ b/src/libs/vtools/visualization/vistoolpointofintersection.h @@ -35,7 +35,7 @@ class VisToolPointOfIntersection : public VisLine { Q_OBJECT public: - VisToolPointOfIntersection(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolPointOfIntersection(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolPointOfIntersection() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolpointofintersectionarcs.h b/src/libs/vtools/visualization/vistoolpointofintersectionarcs.h index a57ead23a..7acbd6437 100644 --- a/src/libs/vtools/visualization/vistoolpointofintersectionarcs.h +++ b/src/libs/vtools/visualization/vistoolpointofintersectionarcs.h @@ -36,7 +36,7 @@ class VisToolPointOfIntersectionArcs : public VisLine { Q_OBJECT public: - VisToolPointOfIntersectionArcs(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolPointOfIntersectionArcs(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolPointOfIntersectionArcs() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolpointofintersectioncircles.h b/src/libs/vtools/visualization/vistoolpointofintersectioncircles.h index 8662ac54a..46a72da98 100644 --- a/src/libs/vtools/visualization/vistoolpointofintersectioncircles.h +++ b/src/libs/vtools/visualization/vistoolpointofintersectioncircles.h @@ -36,7 +36,7 @@ class VisToolPointOfIntersectionCircles : public VisLine { Q_OBJECT public: - VisToolPointOfIntersectionCircles(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolPointOfIntersectionCircles(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolPointOfIntersectionCircles() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolshoulderpoint.h b/src/libs/vtools/visualization/vistoolshoulderpoint.h index 2f55fd328..3d3655375 100644 --- a/src/libs/vtools/visualization/vistoolshoulderpoint.h +++ b/src/libs/vtools/visualization/vistoolshoulderpoint.h @@ -35,7 +35,7 @@ class VisToolShoulderPoint : public VisLine { Q_OBJECT public: - VisToolShoulderPoint(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolShoulderPoint(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolShoulderPoint() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolspline.h b/src/libs/vtools/visualization/vistoolspline.h index 1a008417d..4255f5fa6 100644 --- a/src/libs/vtools/visualization/vistoolspline.h +++ b/src/libs/vtools/visualization/vistoolspline.h @@ -35,7 +35,7 @@ class VisToolSpline : public VisPath { Q_OBJECT public: - VisToolSpline(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolSpline(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolSpline() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistoolsplinepath.h b/src/libs/vtools/visualization/vistoolsplinepath.h index ce07a6c7e..050db9936 100644 --- a/src/libs/vtools/visualization/vistoolsplinepath.h +++ b/src/libs/vtools/visualization/vistoolsplinepath.h @@ -38,7 +38,7 @@ class VisToolSplinePath : public VisPath { Q_OBJECT public: - VisToolSplinePath(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolSplinePath(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolSplinePath() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistooltriangle.h b/src/libs/vtools/visualization/vistooltriangle.h index 30f5b16a1..a97d891a2 100644 --- a/src/libs/vtools/visualization/vistooltriangle.h +++ b/src/libs/vtools/visualization/vistooltriangle.h @@ -35,7 +35,7 @@ class VisToolTriangle : public VisLine { Q_OBJECT public: - VisToolTriangle(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolTriangle(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolTriangle() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/visualization/vistooltruedarts.h b/src/libs/vtools/visualization/vistooltruedarts.h index 4fabae765..4eaaba3da 100644 --- a/src/libs/vtools/visualization/vistooltruedarts.h +++ b/src/libs/vtools/visualization/vistooltruedarts.h @@ -35,7 +35,7 @@ class VisToolTrueDarts :public VisLine { Q_OBJECT public: - VisToolTrueDarts(const VContainer *data, QGraphicsItem *parent = 0); + explicit VisToolTrueDarts(const VContainer *data, QGraphicsItem *parent = 0); virtual ~VisToolTrueDarts() Q_DECL_OVERRIDE; virtual void RefreshGeometry() Q_DECL_OVERRIDE; diff --git a/src/libs/vtools/vtools.pro b/src/libs/vtools/vtools.pro index 2e7878d5e..9c7937300 100644 --- a/src/libs/vtools/vtools.pro +++ b/src/libs/vtools/vtools.pro @@ -86,6 +86,12 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS -= \ -Wundefined-reinterpret-cast } + *-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${UI_DIR}" \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + } } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. diff --git a/src/libs/vwidgets/vgraphicssimpletextitem.h b/src/libs/vwidgets/vgraphicssimpletextitem.h index 9605d6fbb..8968b65db 100644 --- a/src/libs/vwidgets/vgraphicssimpletextitem.h +++ b/src/libs/vwidgets/vgraphicssimpletextitem.h @@ -41,7 +41,7 @@ class VGraphicsSimpleTextItem : public QObject, public QGraphicsSimpleTextItem Q_OBJECT public: explicit VGraphicsSimpleTextItem(QGraphicsItem *parent = nullptr); - VGraphicsSimpleTextItem( const QString & text, QGraphicsItem *parent = nullptr ); + explicit VGraphicsSimpleTextItem( const QString & text, QGraphicsItem *parent = nullptr ); virtual ~VGraphicsSimpleTextItem() Q_DECL_OVERRIDE; qint32 FontSize()const; diff --git a/src/libs/vwidgets/vmaingraphicsscene.h b/src/libs/vwidgets/vmaingraphicsscene.h index ac8c83609..903465414 100644 --- a/src/libs/vwidgets/vmaingraphicsscene.h +++ b/src/libs/vwidgets/vmaingraphicsscene.h @@ -40,7 +40,7 @@ class VMainGraphicsScene : public QGraphicsScene Q_OBJECT public: VMainGraphicsScene(); - VMainGraphicsScene(const QRectF & sceneRect, QObject * parent = nullptr); + explicit VMainGraphicsScene(const QRectF & sceneRect, QObject * parent = nullptr); qint32 getHorScrollBar() const; void setHorScrollBar(const qint32 &value); qint32 getVerScrollBar() const; diff --git a/src/libs/vwidgets/vwidgets.pro b/src/libs/vwidgets/vwidgets.pro index 2b6eb1795..1f1210fc8 100644 --- a/src/libs/vwidgets/vwidgets.pro +++ b/src/libs/vwidgets/vwidgets.pro @@ -76,6 +76,11 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS -= \ -Wundefined-reinterpret-cast } + *-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + } } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. diff --git a/src/test/ParserTest/ParserTest.pro b/src/test/ParserTest/ParserTest.pro index 3cf5a820a..afb6d57b9 100644 --- a/src/test/ParserTest/ParserTest.pro +++ b/src/test/ParserTest/ParserTest.pro @@ -73,6 +73,10 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS -= \ -Wmissing-prototypes } + *-icc-*{ + QMAKE_CXXFLAGS += \ + $$ICC_DEBUG_CXXFLAGS + } } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details. diff --git a/src/test/ValentinaTest/ValentinaTest.pro b/src/test/ValentinaTest/ValentinaTest.pro index 4cd8d70ed..5df9fa8f0 100644 --- a/src/test/ValentinaTest/ValentinaTest.pro +++ b/src/test/ValentinaTest/ValentinaTest.pro @@ -103,6 +103,13 @@ CONFIG(debug, debug|release){ $$CLANG_DEBUG_CXXFLAGS \ # See common.pri for more details. -Wno-gnu-zero-variadic-macro-arguments\ # See macros QSKIP } + *-icc-*{ + QMAKE_CXXFLAGS += \ + -isystem "$${OUT_PWD}/$${UI_DIR}" \ + -isystem "$${OUT_PWD}/$${MOC_DIR}" \ + -isystem "$${OUT_PWD}/$${RCC_DIR}" \ + $$ICC_DEBUG_CXXFLAGS + } } else { *-g++{ QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details.