ICC warnings.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-10-20 17:32:01 +03:00
parent 2be2c00521
commit 467ffbd132
79 changed files with 294 additions and 78 deletions

View File

@ -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.

View File

@ -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;

View File

@ -51,15 +51,20 @@
#include <QSpacerItem>
#include <QThread>
#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)

View File

@ -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.

View File

@ -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.

View File

@ -52,8 +52,22 @@
#include <QtXmlPatterns>
#include <QIcon>
#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;
//---------------------------------------------------------------------------------------------------------------------

View File

@ -62,7 +62,7 @@ public:
protected:
explicit VCommandLine();
VCommandLine();
//@brief returns DialogLayoutSettings::PaperSizeTemplate
DialogLayoutSettings::PaperSizeTemplate OptPaperSize() const;

View File

@ -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:

View File

@ -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;

View File

@ -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();

View File

@ -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;

View File

@ -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();

View File

@ -66,8 +66,22 @@
#include <chrono>
#include <thread>
#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.

View File

@ -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.

View File

@ -35,7 +35,7 @@
#include <QSpacerItem>
#include <QApplication>
Q_LOGGING_CATEGORY(vExcep, "v.excep")
//Q_LOGGING_CATEGORY(vExcep, "v.excep") //Commented because don't use now
//---------------------------------------------------------------------------------------------------------------------
/**

View File

@ -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.

View File

@ -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.

View File

@ -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)
{

View File

@ -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)
{
}

View File

@ -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() {}

View File

@ -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.

View File

@ -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
}

View File

@ -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.

View File

@ -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);

View File

@ -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.

View File

@ -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();

View File

@ -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<VPointFData> d;
};
#if defined(Q_CC_INTEL)
#pragma warning(pop)
#endif
#endif // VPOINTF_H

View File

@ -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.

View File

@ -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.

View File

@ -53,7 +53,7 @@ template <typename Guarded>
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 <typename Alloc>
VLockGuard(const QString& lockName, Alloc a, int stale = 0, int timeout=0);
@ -173,6 +173,11 @@ bool VLockGuard<Guarded>::TryLock(const QString &lockName, int stale, int timeou
template <typename Guarded>
using VLockGuardPtr = std::shared_ptr<VLockGuard<Guarded>>;
#if defined (Q_CC_INTEL)
#pragma warning( push )
#pragma warning( disable: 1418 )
#endif
template <typename Guarded>
void VlpCreateLock(VLockGuardPtr<Guarded>& r, const QString& lockName, int stale = 0, int timeout = 0)
{
@ -191,4 +196,8 @@ void VlpCreateLock(VLockGuardPtr<Guarded>& r, const QString& lockName, Alloc a,
r.reset(new VLockGuard<Guarded>(lockName, a, d, stale, timeout));
}
#if defined(Q_CC_INTEL)
#pragma warning( pop )
#endif
#endif // VLOCKGUARD_H

View File

@ -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.

View File

@ -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.

View File

@ -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<QTextStream>(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);
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -64,9 +64,9 @@ public:
private:
Q_DISABLE_COPY(VObjEngine)
QTextStream *stream;
QSharedPointer<QTextStream> stream;
unsigned int globalPointsCount;
QIODevice *outputDevice;
QSharedPointer<QIODevice> outputDevice;
del_point2d_t points[MAX_POINTS];
unsigned int planeCount;
QSize size;

View File

@ -45,14 +45,13 @@ VObjPaintDevice::~VObjPaintDevice()
{
delete engine->getOutputDevice();
}
delete engine;
}
//---------------------------------------------------------------------------------------------------------------------
// cppcheck-suppress unusedFunction
QPaintEngine *VObjPaintDevice::paintEngine() const
{
return engine;
return engine.data();
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -31,6 +31,7 @@
#include <QPaintDevice>
#include <QString>
#include <QSharedPointer>
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<VObjEngine> engine;
QString fileName;
uint owns_iodevice;
};

View File

@ -37,15 +37,20 @@
#include <QtAlgorithms>
#include <QDebug>
#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;

View File

@ -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.

View File

@ -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;

View File

@ -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;

View File

@ -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.

View File

@ -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;

View File

@ -45,7 +45,7 @@ class VPROPERTYEXPLORERSHARED_EXPORT VPropertySet
{
public:
//! Default constructor, creating an empty property set
explicit VPropertySet();
VPropertySet();
//! Destructor
virtual ~VPropertySet();

View File

@ -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;

View File

@ -34,15 +34,20 @@
#include <QKeyEvent>
#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
//---------------------------------------------------------------------------------------------------------------------

View File

@ -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;

View File

@ -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;}

View File

@ -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;}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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.

View File

@ -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;

View File

@ -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;

View File

@ -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.

View File

@ -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.

View File

@ -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.