Using macros QT_WARNING_DISABLE_*.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-08-06 21:42:40 +03:00
parent 88be00fe42
commit c9cdd2cd8d
61 changed files with 266 additions and 522 deletions

View File

@ -36,6 +36,7 @@
#include "../ifc/exception/vexceptionwrongid.h"
#include "../vmisc/logging.h"
#include "../vmisc/vsysexits.h"
#include "../vmisc/diagnostic.h"
#include "../qmuparser/qmuparsererror.h"
#include <QDir>
@ -51,21 +52,13 @@
#include <QSpacerItem>
#include <QThread>
#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
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
QT_WARNING_DISABLE_INTEL(1418)
Q_LOGGING_CATEGORY(mApp, "m.application")
#if defined(Q_CC_CLANG)
#pragma clang diagnostic pop
#elif defined(Q_CC_INTEL)
#pragma warning( pop )
#endif
QT_WARNING_POP
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
# include "../vmisc/backport/qcommandlineparser.h"

View File

@ -62,21 +62,13 @@
#define DIALOG_MAX_FORMULA_HEIGHT 64
#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
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
QT_WARNING_DISABLE_INTEL(1418)
Q_LOGGING_CATEGORY(tMainWindow, "t.mainwindow")
#if defined(Q_CC_CLANG)
#pragma clang diagnostic pop
#elif defined(Q_CC_INTEL)
#pragma warning( pop )
#endif
QT_WARNING_POP
// We need this enum in case we will add or delete a column. And also make code more readable.
enum {ColumnName = 0, ColumnFullName, ColumnCalcValue, ColumnFormula, ColumnBaseValue, ColumnInSizes, ColumnInHeights};

View File

@ -53,21 +53,13 @@
#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
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
QT_WARNING_DISABLE_INTEL(1418)
Q_LOGGING_CATEGORY(vApp, "v.application")
#if defined(Q_CC_CLANG)
#pragma clang diagnostic pop
#elif defined(Q_CC_INTEL)
#pragma warning( pop )
#endif
QT_WARNING_POP
Q_DECL_CONSTEXPR auto DAYS_TO_KEEP_LOGS = 3;

View File

@ -38,6 +38,7 @@
#include "../vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutsplinepath.h"
#include "../vtools/tools/drawTools/toolpoint/toolsinglepoint/toolcut/vtoolcutarc.h"
#include "../xml/vpattern.h"
#include "../vmisc/diagnostic.h"
//---------------------------------------------------------------------------------------------------------------------
/**
@ -196,10 +197,8 @@ void DialogHistory::FillTable()
}
//---------------------------------------------------------------------------------------------------------------------
#if defined(Q_CC_GNU)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-default"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wswitch-default")
/**
* @brief Record return description for record
* @param tool record data
@ -400,9 +399,7 @@ QString DialogHistory::Record(const VToolRecord &tool)
return tr("Can't create record.");
}
#if defined(Q_CC_GNU)
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
//---------------------------------------------------------------------------------------------------------------------
/**

View File

@ -83,21 +83,13 @@
#include <QDrag>
#endif //defined(Q_OS_MAC)
#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
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
QT_WARNING_DISABLE_INTEL(1418)
Q_LOGGING_CATEGORY(vMainWindow, "v.mainwindow")
#if defined(Q_CC_CLANG)
#pragma clang diagnostic pop
#elif defined(Q_CC_INTEL)
#pragma warning( pop )
#endif
QT_WARNING_POP
const QString autosavePrefix = QStringLiteral(".autosave");
@ -1730,10 +1722,8 @@ void MainWindow::MouseMove(const QPointF &scenePos)
}
//---------------------------------------------------------------------------------------------------------------------
#if defined(Q_CC_GNU)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-default"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wswitch-default")
/**
* @brief CancelTool cancel tool.
*/
@ -1889,9 +1879,7 @@ void MainWindow::CancelTool()
redoAction->setEnabled(qApp->getUndoStack()->canRedo());
}
#if defined(Q_CC_GNU)
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
//---------------------------------------------------------------------------------------------------------------------
/**
@ -3235,10 +3223,8 @@ void MainWindow::CreateMenus()
}
//---------------------------------------------------------------------------------------------------------------------
#if defined(Q_CC_GNU)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-default"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wswitch-default")
void MainWindow::LastUsedTool()
{
// This check helps to find missed tools in the switch
@ -3411,9 +3397,7 @@ void MainWindow::LastUsedTool()
}
}
#if defined(Q_CC_GNU)
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
//---------------------------------------------------------------------------------------------------------------------
void MainWindow::AddDocks()

View File

@ -757,10 +757,8 @@ void MainWindowsNoGUI::ObjFile(const QString &name, int i) const
}
//---------------------------------------------------------------------------------------------------------------------
#if defined(Q_CC_GNU)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-default"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wswitch-default")
void MainWindowsNoGUI::DxfFile(const QString &name, int i) const
{
@ -796,9 +794,7 @@ void MainWindowsNoGUI::DxfFile(const QString &name, int i) const
}
}
#if defined(Q_CC_GNU)
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
//---------------------------------------------------------------------------------------------------------------------
void MainWindowsNoGUI::PreparePaper(int index) const

View File

@ -3295,10 +3295,8 @@ void VPattern::ToolsCommonAttributes(const QDomElement &domElement, quint32 &id)
}
//---------------------------------------------------------------------------------------------------------------------
#if defined(Q_CC_GNU)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-default"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wswitch-default")
QRectF VPattern::ActiveDrawBoundingRect() const
{
@ -3430,9 +3428,7 @@ QRectF VPattern::ActiveDrawBoundingRect() const
return rec;
}
#if defined(Q_CC_GNU)
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
//---------------------------------------------------------------------------------------------------------------------
template <typename T>

View File

@ -36,13 +36,12 @@
#include "../ifc/ifcdef.h"
#include "../vmisc/def.h"
#include "../vmisc/logging.h"
#include "../vmisc/diagnostic.h"
Q_DECLARE_LOGGING_CATEGORY(vXML)
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
/**
* @brief The VDomDocument class represents a Valentina document (.val file).
@ -166,8 +165,6 @@ inline void VDomDocument::SetAttribute<MeasurementsType>(QDomElement &domElement
QStringLiteral("individual"));
}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VDOMDOCUMENT_H

View File

@ -84,10 +84,8 @@
#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wattributes"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wattributes")
#ifdef Q_CC_MSVC
#include <ciso646>
@ -99,9 +97,7 @@ inline QString NameRegExp()
return QStringLiteral("^([^0-9*/^+\\-=\\s()?%:;!.,`'\"]){1,1}([^*/^+\\-=\\s()?%:;!.,`'\"]){0,}$");
}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
static inline bool QmuFuzzyComparePossibleNulls(double p1, double p2) Q_REQUIRED_RESULT;
static inline bool QmuFuzzyComparePossibleNulls(double p1, double p2)

View File

@ -1026,25 +1026,17 @@ qreal QmuParserBase::ParseCmdCodeBulk(int nOffset, int nThreadID) const
continue;
case cmLAND:
--sidx;
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wfloat-equal")
Stack[sidx] = static_cast<bool>(Stack[sidx]) && static_cast<bool>(Stack[sidx+1]);
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
continue;
case cmLOR:
--sidx;
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wfloat-equal")
Stack[sidx] = static_cast<bool>(Stack[sidx]) || static_cast<bool>(Stack[sidx+1]);
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
continue;
case cmASSIGN:
// Bugfix for Bulkmode:

View File

@ -24,16 +24,15 @@
#include "qmuparserdef.h"
#include "qmuparsertoken.h"
#include "qmudef.h"
/**
* @file
* @brief Definition of the parser bytecode class.
*/
#ifdef Q_CC_CLANG
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnested-anon-types"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wnested-anon-types")
namespace qmu
{
struct SToken
@ -69,9 +68,7 @@ struct SToken
};
};
#ifdef Q_CC_CLANG
#pragma clang diagnostic pop
#endif
QT_WARNING_POP
/**
* @brief Bytecode implementation of the Math Parser.

View File

@ -1392,14 +1392,10 @@ int QmuParserTester::EqnTest ( const QString &a_str, double a_fRes, bool a_fPass
// The tests equations never result in infinity, if they do thats a bug.
// reference:
// http://sourceforge.net/projects/muparser/forums/forum/462843/topic/5037825
#if defined(Q_CC_MSVC)
#pragma warning(push)
#pragma warning(disable:4127)
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_MSVC(4127)
if (std::numeric_limits<qreal>::has_infinity)
#if defined(Q_CC_MSVC)
#pragma warning(pop)
#endif
QT_WARNING_POP
{
bCloseEnough &= (not QmuFuzzyComparePossibleNulls( fabs ( fVal[i] ),
std::numeric_limits<qreal>::infinity()) );

View File

@ -31,6 +31,7 @@
#define DXF_CODES_H
#include "dl_global.h"
#include "../vmisc/diagnostic.h"
#if defined(Q_CC_MSVC)
#if (_MSC_VER > 1000)
@ -50,9 +51,7 @@
#ifdef _WIN32
#undef M_PI
#define M_PI 3.14159265358979323846
#if defined(Q_CC_MSVC)
#pragma warning(disable : 4800)
#endif // Q_CC_MSVC
QT_WARNING_DISABLE_MSVC(4800)
#endif
#ifndef M_PI

View File

@ -27,6 +27,7 @@
#include "dl_global.h"
#include "../dxfdef.h"
#include "../vmisc/diagnostic.h"
#include <string>
#include <vector>
@ -809,11 +810,8 @@ struct DXFLIB_EXPORT DL_MTextData
double angle;
};
#ifdef Q_CC_CLANG
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wweak-vtables"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wweak-vtables")
/**
* Text Data.
@ -945,9 +943,7 @@ struct DXFLIB_EXPORT DL_AttributeData : public DL_TextData
std::string tag;
};
#ifdef Q_CC_CLANG
#pragma clang diagnostic pop
#endif
QT_WARNING_POP
/**
* Generic Dimension Data.

View File

@ -39,13 +39,9 @@
//---------------------------------------------------------------------------------------------------------------------
static inline QPaintEngine::PaintEngineFeatures svgEngineFeatures()
{
#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
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wsign-conversion")
QT_WARNING_DISABLE_INTEL(68)
return QPaintEngine::PaintEngineFeatures(
QPaintEngine::AllFeatures
@ -54,11 +50,7 @@ static inline QPaintEngine::PaintEngineFeatures svgEngineFeatures()
& ~QPaintEngine::ConicalGradientFill
& ~QPaintEngine::PorterDuff);
#if defined(Q_CC_CLANG)
#pragma clang diagnostic pop
#elif defined(Q_CC_INTEL)
#pragma warning( pop )
#endif
QT_WARNING_POP
}
//---------------------------------------------------------------------------------------------------------------------
@ -566,10 +558,8 @@ void VDxfEngine::setInsunits(const VarInsunits &var)
}
//---------------------------------------------------------------------------------------------------------------------
#if defined(Q_CC_GNU)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-default"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wswitch-default")
double VDxfEngine::FromPixel(double pix, const VarInsunits &unit) const
{
@ -585,6 +575,4 @@ double VDxfEngine::FromPixel(double pix, const VarInsunits &unit) const
return 0;
}
#if defined(Q_CC_GNU)
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP

View File

@ -32,12 +32,11 @@
#include <QSharedData>
#include "vgeometrydef.h"
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/diagnostic.h"
#include "vpointf.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VAbstractArcData : public QSharedData
{
@ -145,4 +144,6 @@ VAbstractArcData::VAbstractArcData(const VAbstractArcData &arc)
VAbstractArcData::~VAbstractArcData()
{}
QT_WARNING_POP
#endif // VABSTRACTARCDATA_H

View File

@ -32,11 +32,10 @@
#include <QSharedData>
#include "../ifc/ifcdef.h"
#include "../vmisc/diagnostic.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VAbstractCurveData : public QSharedData
{
@ -64,8 +63,6 @@ private:
VAbstractCurveData::~VAbstractCurveData()
{}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VABSTRACTCURVE_P_H

View File

@ -32,11 +32,10 @@
#include <QSharedData>
#include "vgeometrydef.h"
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/diagnostic.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VArcData : public QSharedData
{
@ -86,8 +85,6 @@ VArcData::VArcData(const VArcData &arc)
VArcData::~VArcData()
{}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VARC_P_H

View File

@ -35,11 +35,10 @@
#include "vpointf.h"
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/diagnostic.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VCubicBezierData : public QSharedData
{
@ -98,8 +97,6 @@ VCubicBezierData::~VCubicBezierData()
{
}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VCUBICBEZIER_P_H

View File

@ -32,11 +32,10 @@
#include <QSharedData>
#include "vpointf.h"
#include "../vmisc/diagnostic.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VCubicBezierPathData : public QSharedData
{
@ -63,8 +62,6 @@ private:
VCubicBezierPathData::~VCubicBezierPathData()
{}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VCUBICBEZIERPATH_P_H

View File

@ -3,12 +3,11 @@
#include <QSharedData>
#include "../vmisc/vabstractapplication.h"
#include "../vmisc/diagnostic.h"
#include "vpointf.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VEllipticalArcData : public QSharedData
{
@ -78,9 +77,7 @@ VEllipticalArcData::VEllipticalArcData(const VEllipticalArcData &arc)
VEllipticalArcData::~VEllipticalArcData()
{}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VELLIPTICALARC_P

View File

@ -32,11 +32,10 @@
#include <QSharedData>
#include "vgeometrydef.h"
#include "../ifc/ifcdef.h"
#include "../vmisc/diagnostic.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VGObjectData : public QSharedData
{
@ -77,8 +76,6 @@ private:
VGObjectData::~VGObjectData()
{}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VGOBJECT_P_H

View File

@ -33,14 +33,14 @@
#include <QMetaType>
#include "../vmisc/diagnostic.h"
class QPointF;
class QString;
class VPointFData;
#if defined (Q_CC_INTEL)
#pragma warning(push)
#pragma warning(disable : 2304)
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_INTEL(2304)
/**
* @brief The VPointF class keep data of point.
@ -78,8 +78,6 @@ private:
Q_DECLARE_METATYPE(VPointF)
Q_DECLARE_TYPEINFO(VPointF, Q_MOVABLE_TYPE);
#if defined(Q_CC_INTEL)
#pragma warning(pop)
#endif
QT_WARNING_POP
#endif // VPOINTF_H

View File

@ -31,12 +31,11 @@
#include <QSharedData>
#include "vgeometrydef.h"
#include "../vmisc/diagnostic.h"
#include <QPointF>
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VPointFData : public QSharedData
{
@ -83,8 +82,6 @@ private:
VPointFData::~VPointFData()
{}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VPOINTF_P_H

View File

@ -36,10 +36,8 @@
#include "vpointf.h"
#include "../vmisc/vabstractapplication.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VSplineData : public QSharedData
{
@ -209,8 +207,6 @@ qreal VSplineData::GetL(const QPointF &p1, const QPointF &p4, qreal kCurve)
return kCurve * radius * 4 / 3 * qTan( angle * M_PI_4 / 180.0 );
}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VSPLINE_P_H

View File

@ -32,10 +32,8 @@
#include <QSharedData>
#include "vsplinepoint.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VSplinePathData : public QSharedData
{
@ -64,8 +62,6 @@ private:
VSplinePathData::~VSplinePathData()
{}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VSPLINEPATH_P_H

View File

@ -35,10 +35,8 @@
#include "vpointf.h"
#include "../vmisc/def.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VFSplinePointData : public QSharedData
{
@ -178,8 +176,6 @@ private:
VSplinePointData::~VSplinePointData()
{}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VSPLINEPOINT_P_H

View File

@ -32,10 +32,10 @@
#include <QSharedData>
#include <QString>
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
#include "../vmisc/diagnostic.h"
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VAbstractDetailData : public QSharedData
{
@ -68,8 +68,6 @@ private:
VAbstractDetailData &operator=(const VAbstractDetailData &) Q_DECL_EQ_DELETE;
};
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VABSTRACTDETAIL_P_H

View File

@ -34,21 +34,13 @@
#include <climits>
#include <QRectF>
#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
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
QT_WARNING_DISABLE_INTEL(1418)
Q_LOGGING_CATEGORY(lBank, "layout.bank")
#if defined(Q_CC_CLANG)
#pragma clang diagnostic pop
#elif defined(Q_CC_INTEL)
#pragma warning( pop )
#endif
QT_WARNING_POP
// An annoying char define, from the Windows team in <rpcndr.h>
// #define small char

View File

@ -32,10 +32,10 @@
#include <QSharedData>
#include <QPointF>
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
#include "../vmisc/diagnostic.h"
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VContourData : public QSharedData
{
@ -70,8 +70,6 @@ private:
VContourData &operator=(const VContourData &) Q_DECL_EQ_DELETE;
};
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VCONTOUR_P_H

View File

@ -38,11 +38,8 @@
#include "../vpatterndb/vpatterninfogeometry.h"
#include "vtextmanager.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VLayoutDetailData : public QSharedData
{
@ -100,8 +97,6 @@ private:
VLayoutDetailData &operator=(const VLayoutDetailData &) Q_DECL_EQ_DELETE;
};
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VLAYOUTDETAIL_P_H

View File

@ -36,10 +36,8 @@
#include "vlayoutdetail.h"
#include "vcontour.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VLayoutPaperData : public QSharedData
{
@ -79,8 +77,6 @@ private:
VLayoutPaperData &operator=(const VLayoutPaperData &) Q_DECL_EQ_DELETE;
};
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VLAYOUTPAPER_P_H

View File

@ -25,10 +25,10 @@
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
#include "../vmisc/diagnostic.h"
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class QCommandLineOptionPrivate : public QSharedData
{
@ -52,9 +52,7 @@ public:
QStringList defaultValues;
};
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
/*!
\since 5.2

View File

@ -26,10 +26,10 @@
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
#include "../vmisc/diagnostic.h"
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class QCommandLineOptionPrivate;
@ -71,9 +71,7 @@ private:
QSharedDataPointer<QCommandLineOptionPrivate> d;
};
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
Q_DECLARE_SHARED(QCommandLineOption)

View File

@ -29,12 +29,12 @@
#if QT_VERSION < QT_VERSION_CHECK(5, 2, 0)
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#pragma GCC diagnostic ignored "-Wswitch-default"
#pragma GCC diagnostic ignored "-Wsuggest-attribute=noreturn"
#endif
#include "../vmisc/diagnostic.h"
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
QT_WARNING_DISABLE_GCC("-Wswitch-default")
QT_WARNING_DISABLE_GCC("-Wsuggest-attribute=noreturn")
typedef QHash<QString, int> NameHash_t;
@ -891,9 +891,6 @@ QString QCommandLineParserPrivate::helpText() const
return text;
}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif //QT_VERSION < QT_VERSION_CHECK(5, 2, 0)

View File

@ -29,10 +29,10 @@
class QCommandLineParserPrivate;
class QCoreApplication;
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
#include "../vmisc/diagnostic.h"
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class QCommandLineParser
{
@ -83,9 +83,7 @@ private:
QCommandLineParserPrivate * const d;
};
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif //QT_VERSION < QT_VERSION_CHECK(5, 2, 0)

View File

@ -39,6 +39,8 @@
#include <QTextStream>
#include <QDebug>
#include "../vmisc/diagnostic.h"
class QxtCsvModelPrivate : public QxtPrivate<QxtCsvModel>
{
public:
@ -52,10 +54,8 @@ public:
QxtCsvModel::QuoteMode quoteMode;
};
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
/*!
Creates an empty QxtCsvModel with parent \a parent.
@ -98,9 +98,7 @@ QxtCsvModel::QxtCsvModel(const QString &filename, QObject *parent, bool withHead
setSource(&src, withHeader, separator);
}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
QxtCsvModel::~QxtCsvModel()
{}

View File

@ -34,6 +34,8 @@
#include <stdint.h>
#include <memory>
#include "../vmisc/diagnostic.h"
#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)
#include <QFileInfo>
#include <QLockFile>
@ -195,10 +197,8 @@ bool VLockGuard<Guarded>::TryLock(const QString &lockName, int stale, int timeou
//use pointer and function below to persistent things like class-member, because lock is taken by constructor
//helper functions allow to write shorter creating and setting new lock-pointer
#if defined (Q_CC_INTEL)
#pragma warning( push )
#pragma warning( disable: 1418 )
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_INTEL(1418)
template <typename Guarded>
void VlpCreateLock(std::shared_ptr<VLockGuard<Guarded>>& r, const QString& lockName, int stale = 0, int timeout = 0)
@ -220,8 +220,6 @@ void VlpCreateLock(std::shared_ptr<VLockGuard<Guarded>>& r, const QString& lockN
r.reset(new VLockGuard<Guarded>(lockName, a, d, stale, timeout));
}
#if defined(Q_CC_INTEL)
#pragma warning( pop )
#endif
QT_WARNING_POP
#endif // VLOCKGUARD_H

View File

@ -25,12 +25,11 @@
#include <QtGlobal>
#include "delaunay.h"
#include "../vmisc/diagnostic.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wcast-qual"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wold-style-cast")
QT_WARNING_DISABLE_GCC("-Wcast-qual")
#if PREDICATE == EXACT_PREDICATE
extern void exactinit();
@ -1083,6 +1082,4 @@ void delaunay2d_release(delaunay2d_t *del) {
free(del);
}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP

View File

@ -27,6 +27,7 @@
*************************************************************************/
#include "vobjengine.h"
#include "../vmisc/diagnostic.h"
#include <QTextStream>
#include <QDebug>
@ -44,14 +45,10 @@
//---------------------------------------------------------------------------------------------------------------------
static inline QPaintEngine::PaintEngineFeatures svgEngineFeatures()
{
#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
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wsign-conversion")
QT_WARNING_DISABLE_INTEL(68)
QT_WARNING_DISABLE_INTEL(2022)
return QPaintEngine::PaintEngineFeatures(
QPaintEngine::AllFeatures
@ -60,9 +57,7 @@ static inline QPaintEngine::PaintEngineFeatures svgEngineFeatures()
& ~QPaintEngine::ConicalGradientFill
& ~QPaintEngine::PorterDuff);
#if defined(Q_CC_CLANG)
#pragma clang diagnostic pop
#endif
QT_WARNING_POP
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -31,10 +31,10 @@
#include <QSharedData>
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
#include "../vmisc/diagnostic.h"
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VArcRadiusData : public QSharedData
{
@ -63,8 +63,6 @@ private:
VArcRadiusData::~VArcRadiusData()
{}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VARCRADIUSDATA_H

View File

@ -32,11 +32,10 @@
#include <QSharedData>
#include "../ifc/ifcdef.h"
#include "../vmisc/diagnostic.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VCurveVariableData : public QSharedData
{
@ -66,8 +65,6 @@ private:
VCurveVariableData::~VCurveVariableData()
{}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VCURVELENGTH_P_H

View File

@ -33,11 +33,10 @@
#include "../ifc/ifcdef.h"
#include "../vcontainer.h"
#include "../vmisc/diagnostic.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VIncrementData : public QSharedData
{
@ -70,8 +69,6 @@ private:
VIncrementData::~VIncrementData()
{}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VINCREMENT_P_H

View File

@ -31,11 +31,10 @@
#include <QSharedData>
#include "../vmisc/def.h"
#include "../vmisc/diagnostic.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VInternalVariableData : public QSharedData
{
@ -65,8 +64,6 @@ private:
VInternalVariableData::~VInternalVariableData()
{}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VINTERNALVARIABLE_P_H

View File

@ -32,11 +32,10 @@
#include <QSharedData>
#include "../ifc/ifcdef.h"
#include "../vmisc/diagnostic.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VLineAngleData : public QSharedData
{
@ -66,8 +65,6 @@ private:
VLineAngleData::~VLineAngleData()
{}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VLINEANGLE_P_H

View File

@ -32,11 +32,10 @@
#include <QSharedData>
#include "../ifc/ifcdef.h"
#include "../vmisc/diagnostic.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VLengthLineData : public QSharedData
{
@ -67,8 +66,6 @@ private:
VLengthLineData::~VLengthLineData()
{}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VLINELENGTH_P_H

View File

@ -32,11 +32,10 @@
#include <QSharedData>
#include "../vcontainer.h"
#include "../vmisc/diagnostic.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VMeasurementData : public QSharedData
{
@ -73,8 +72,6 @@ private:
VMeasurementData::~VMeasurementData()
{}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VMEASUREMENT_P_H

View File

@ -31,10 +31,10 @@
#include <QSharedData>
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
#include "../vmisc/diagnostic.h"
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VVariableData : public QSharedData
{
@ -83,8 +83,6 @@ private:
VVariableData::~VVariableData()
{}
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VVARIABLE_P_H

View File

@ -37,21 +37,13 @@
#include <QtAlgorithms>
#include <QDebug>
#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
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
QT_WARNING_DISABLE_INTEL(1418)
Q_LOGGING_CATEGORY(vCon, "v.container")
#if defined(Q_CC_CLANG)
#pragma clang diagnostic pop
#elif defined(Q_CC_INTEL)
#pragma warning( pop )
#endif
QT_WARNING_POP
quint32 VContainer::_id = NULL_ID;
qreal VContainer::_size = 50;

View File

@ -35,6 +35,7 @@
#include "../ifc/exception/vexceptionbadid.h"
#include "../vgeometry/vabstractcurve.h"
#include "../vgeometry/vabstractcubicbezierpath.h"
#include "../vmisc/diagnostic.h"
#include "vtranslatevars.h"
#include <QCoreApplication>
@ -42,13 +43,9 @@
#include <QSet>
#include <QSharedPointer>
#if defined(Q_CC_INTEL)
#pragma warning( push )
#pragma warning( disable: 2021 )
#elif defined(Q_CC_GNU)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
QT_WARNING_DISABLE_INTEL(2021)
class VContainerData : public QSharedData //-V690
{
@ -88,11 +85,7 @@ private:
VContainerData &operator=(const VContainerData &) Q_DECL_EQ_DELETE;
};
#if defined(Q_CC_INTEL)
#pragma warning( pop )
#elif defined(Q_CC_GNU)
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
/**
* @brief The VContainer class container of all variables.

View File

@ -34,11 +34,10 @@
#include "vpatternpiecedata.h"
#include "vpatterninfogeometry.h"
#include "../ifc/ifcdef.h"
#include "../vmisc/diagnostic.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VDetailData : public QSharedData
{
@ -81,8 +80,6 @@ private:
VDetailData &operator=(const VDetailData &) Q_DECL_EQ_DELETE;
};
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VDETAIL_P_H

View File

@ -31,11 +31,10 @@
#include <QSharedData>
#include "../ifc/ifcdef.h"
#include "../vmisc/diagnostic.h"
#ifdef Q_CC_GNU
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")
class VNodeDetailData : public QSharedData
{
@ -84,8 +83,6 @@ private:
VNodeDetailData &operator=(const VNodeDetailData &) Q_DECL_EQ_DELETE;
};
#ifdef Q_CC_GNU
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
#endif // VNODEDETAIL_P_H

View File

@ -22,6 +22,7 @@
#define VABSTRACTPROPERTYFACTORY_H
#include "vpropertyexplorer_global.h"
#include "../vmisc/diagnostic.h"
#include <QObject>
namespace VPE
@ -29,10 +30,8 @@ namespace VPE
class VProperty;
#ifdef Q_CC_CLANG
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wweak-vtables"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wweak-vtables")
class VPROPERTYEXPLORERSHARED_EXPORT VAbstractPropertyFactory
{
@ -47,9 +46,7 @@ public:
virtual VProperty* createProperty(const QString& type, const QString &name) = 0;
};
#ifdef Q_CC_CLANG
#pragma clang diagnostic pop
#endif
QT_WARNING_POP
}

View File

@ -24,6 +24,7 @@
// ONLY INCLUDE THIS IN .CPP FILES
#include "vpropertyformwidget_p.h"
#include "../vmisc/diagnostic.h"
namespace VPE
{
@ -31,10 +32,8 @@ namespace VPE
class VPropertyModel;
class VPropertySet;
#ifdef Q_CC_CLANG
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wweak-vtables"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wweak-vtables")
class VPropertyFormViewPrivate : public VPropertyFormWidgetPrivate
{
@ -72,9 +71,7 @@ private:
Q_DISABLE_COPY(VPropertyFormViewPrivate)
};
#ifdef Q_CC_CLANG
#pragma clang diagnostic pop
#endif
QT_WARNING_POP
}

View File

@ -25,14 +25,13 @@
#include <QList>
#include "vproperty.h"
#include "../vmisc/diagnostic.h"
namespace VPE
{
#ifdef Q_CC_CLANG
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wweak-vtables"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wweak-vtables")
class VPropertyFormWidgetPrivate
{
@ -71,9 +70,7 @@ public:
virtual ~VPropertyFormWidgetPrivate() {}
};
#ifdef Q_CC_CLANG
#pragma clang diagnostic pop
#endif
QT_WARNING_POP
}

View File

@ -24,6 +24,7 @@
// ONLY INCLUDE THIS IN .CPP FILES
#include "vproperty_p.h"
#include "../vmisc/diagnostic.h"
#include <QPointer>
#include <QWidget>
@ -31,10 +32,8 @@
namespace VPE
{
#ifdef Q_CC_CLANG
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wweak-vtables"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wweak-vtables")
class VWidgetPropertyPrivate : public VPropertyPrivate
{
@ -60,9 +59,7 @@ public:
}
};
#ifdef Q_CC_CLANG
#pragma clang diagnostic pop
#endif
QT_WARNING_POP
}

View File

@ -68,10 +68,8 @@ VToolRotation::VToolRotation(VAbstractPattern *doc, VContainer *data, quint32 id
// This check helps to find missed objects in the switch
Q_STATIC_ASSERT_X(static_cast<int>(GOType::Unknown) == 7, "Not all objects were handled.");
#if defined(Q_CC_GNU)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-default"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wswitch-default")
switch(static_cast<GOType>(obj->getType()))
{
case GOType::Point:
@ -124,9 +122,7 @@ VToolRotation::VToolRotation(VAbstractPattern *doc, VContainer *data, quint32 id
case GOType::Unknown:
break;
}
#if defined(Q_CC_GNU)
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
}
ToolCreation(typeCreation);
@ -198,10 +194,8 @@ VToolRotation *VToolRotation::Create(const quint32 _id, const quint32 &origin, Q
// This check helps to find missed objects in the switch
Q_STATIC_ASSERT_X(static_cast<int>(GOType::Unknown) == 7, "Not all objects were handled.");
#if defined(Q_CC_GNU)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-default"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wswitch-default")
switch(static_cast<GOType>(obj->getType()))
{
case GOType::Point:
@ -229,9 +223,7 @@ VToolRotation *VToolRotation::Create(const quint32 _id, const quint32 &origin, Q
case GOType::Unknown:
break;
}
#if defined(Q_CC_GNU)
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
}
}
else
@ -244,10 +236,8 @@ VToolRotation *VToolRotation::Create(const quint32 _id, const quint32 &origin, Q
// This check helps to find missed objects in the switch
Q_STATIC_ASSERT_X(static_cast<int>(GOType::Unknown) == 7, "Not all objects were handled.");
#if defined(Q_CC_GNU)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-default"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wswitch-default")
switch(static_cast<GOType>(obj->getType()))
{
case GOType::Point:
@ -276,9 +266,7 @@ VToolRotation *VToolRotation::Create(const quint32 _id, const quint32 &origin, Q
case GOType::Unknown:
break;
}
#if defined(Q_CC_GNU)
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
}
if (parse != Document::FullParse)
{

View File

@ -299,10 +299,8 @@ void VToolCurveIntersectAxis::SetVisualization()
}
//---------------------------------------------------------------------------------------------------------------------
#if defined(Q_CC_GNU)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-default"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wswitch-default")
void VToolCurveIntersectAxis::InitSegments(const GOType &curveType, qreal segLength, const VPointF *p, quint32 curveId,
VContainer *data)
{
@ -444,6 +442,4 @@ void VToolCurveIntersectAxis::InitSegments(const GOType &curveType, qreal segLen
}
}
#if defined(Q_CC_GNU)
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP

View File

@ -34,21 +34,13 @@
#include <QKeyEvent>
#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
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
QT_WARNING_DISABLE_INTEL(1418)
Q_LOGGING_CATEGORY(vToolSinglePoint, "v.toolSinglePoint")
#if defined(Q_CC_CLANG)
#pragma clang diagnostic pop
#elif defined(Q_CC_INTEL)
#pragma warning( pop )
#endif
QT_WARNING_POP
//---------------------------------------------------------------------------------------------------------------------
/**

View File

@ -49,21 +49,13 @@ const QString VToolUnionDetails::AttrNodeType = QStringLiteral("nodeType");
const QString VToolUnionDetails::NodeTypeContour = QStringLiteral("Contour");
const QString VToolUnionDetails::NodeTypeModeling = QStringLiteral("Modeling");
#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
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
QT_WARNING_DISABLE_INTEL(1418)
Q_LOGGING_CATEGORY(vToolUnion, "v.toolUnion")
#if defined(Q_CC_CLANG)
#pragma clang diagnostic pop
#elif defined(Q_CC_INTEL)
#pragma warning( pop )
#endif
QT_WARNING_POP
//---------------------------------------------------------------------------------------------------------------------
/**

View File

@ -63,10 +63,8 @@ VisToolRotation::~VisToolRotation()
}
//---------------------------------------------------------------------------------------------------------------------
#if defined(Q_CC_GNU)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wswitch-default"
#endif
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wswitch-default")
void VisToolRotation::RefreshGeometry()
{
@ -178,9 +176,7 @@ void VisToolRotation::RefreshGeometry()
}
}
#if defined(Q_CC_GNU)
#pragma GCC diagnostic pop
#endif
QT_WARNING_POP
//---------------------------------------------------------------------------------------------------------------------
void VisToolRotation::SetObjects(QVector<quint32> objects)