For Coverity Scan.

--HG--
branch : develop
This commit is contained in:
dismine 2014-04-17 20:18:26 +03:00
parent ba1c9dd4a7
commit 8f281a31c2
18 changed files with 32 additions and 5 deletions

View File

@ -38,6 +38,7 @@
#include <QFileDialog> #include <QFileDialog>
#include <QDir> #include <QDir>
#include <QMessageBox> #include <QMessageBox>
#include <QCloseEvent>
DialogIncrements::DialogIncrements(VContainer *data, VPattern *doc, QWidget *parent) DialogIncrements::DialogIncrements(VContainer *data, VPattern *doc, QWidget *parent)
:DialogTool(data, parent), ui(new Ui::DialogIncrements), data(data), doc(doc), row(0), column(0), m(nullptr) :DialogTool(data, parent), ui(new Ui::DialogIncrements), data(data), doc(doc), row(0), column(0), m(nullptr)

View File

@ -29,6 +29,7 @@
#include "varc.h" #include "varc.h"
#include "vspline.h" #include "vspline.h"
#include "../exception/vexception.h" #include "../exception/vexception.h"
#include <QDebug>
class QRectF; class QRectF;

View File

@ -27,6 +27,7 @@
*************************************************************************/ *************************************************************************/
#include "vdetail.h" #include "vdetail.h"
#include <QDebug>
VDetail::VDetail() VDetail::VDetail()
:_id(0), nodes(QVector<VNodeDetail>()), name(QString()), mx(0), my(0), seamAllowance(true), closed(true), :_id(0), nodes(QVector<VNodeDetail>()), name(QString()), mx(0), my(0), seamAllowance(true), closed(true),

View File

@ -28,6 +28,7 @@
#include "vequidistant.h" #include "vequidistant.h"
#include "../widgets/vapplication.h" #include "../widgets/vapplication.h"
#include <QDebug>
QPainterPath VEquidistant::ContourPath(const quint32 &idDetail, const VContainer *data) const QPainterPath VEquidistant::ContourPath(const quint32 &idDetail, const VContainer *data) const
{ {

View File

@ -27,6 +27,7 @@
*************************************************************************/ *************************************************************************/
#include "vsplinepoint.h" #include "vsplinepoint.h"
#include <QDebug>
VSplinePoint::VSplinePoint() VSplinePoint::VSplinePoint()
:pSpline(VPointF()), angle1(0), angle2(180), kAsm1(1), kAsm2(1){} :pSpline(VPointF()), angle1(0), angle2(180), kAsm1(1), kAsm2(1){}

View File

@ -1440,6 +1440,12 @@ void MainWindow::LoadPattern(const QString &fileName)
Clear(); Clear();
return; return;
} }
catch(VException &e)
{
e.CriticalMessageBox(tr("Error parsing file."), this);
Clear();
return;
}
connect(comboBoxDraws, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), connect(comboBoxDraws, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &MainWindow::currentDrawChanged); this, &MainWindow::currentDrawChanged);
QString nameDraw = doc->GetNameActivDraw(); QString nameDraw = doc->GetNameActivDraw();

View File

@ -27,6 +27,7 @@
*************************************************************************/ *************************************************************************/
#include "vabstractspline.h" #include "vabstractspline.h"
#include <QKeyEvent>
const QString VAbstractSpline::TagName = QStringLiteral("spline"); const QString VAbstractSpline::TagName = QStringLiteral("spline");

View File

@ -29,6 +29,7 @@
#include "vtoolarc.h" #include "vtoolarc.h"
#include "../../container/calculator.h" #include "../../container/calculator.h"
#include "../../dialogs/tools/dialogarc.h" #include "../../dialogs/tools/dialogarc.h"
#include <QKeyEvent>
const QString VToolArc::TagName = QStringLiteral("arc"); const QString VToolArc::TagName = QStringLiteral("arc");
const QString VToolArc::ToolType = QStringLiteral("simple"); const QString VToolArc::ToolType = QStringLiteral("simple");

View File

@ -28,6 +28,7 @@
#include "vtoolline.h" #include "vtoolline.h"
#include "../../dialogs/tools/dialogline.h" #include "../../dialogs/tools/dialogline.h"
#include <QKeyEvent>
const QString VToolLine::TagName = QStringLiteral("line"); const QString VToolLine::TagName = QStringLiteral("line");

View File

@ -27,6 +27,7 @@
*************************************************************************/ *************************************************************************/
#include "vtoolpoint.h" #include "vtoolpoint.h"
#include <QKeyEvent>
const QString VToolPoint::TagName = QStringLiteral("point"); const QString VToolPoint::TagName = QStringLiteral("point");

View File

@ -27,6 +27,7 @@
*************************************************************************/ *************************************************************************/
#include "vabstracttool.h" #include "vabstracttool.h"
#include <QGraphicsView>
const QString VAbstractTool::AttrType = QStringLiteral("type"); const QString VAbstractTool::AttrType = QStringLiteral("type");
const QString VAbstractTool::AttrMx = QStringLiteral("mx"); const QString VAbstractTool::AttrMx = QStringLiteral("mx");

View File

@ -29,6 +29,9 @@
#include "vtooldetail.h" #include "vtooldetail.h"
#include "nodeDetails/nodedetails.h" #include "nodeDetails/nodedetails.h"
#include "../geometry/vequidistant.h" #include "../geometry/vequidistant.h"
#include <QKeyEvent>
#include <QGraphicsSceneMouseEvent>
#include <QMenu>
const QString VToolDetail::TagName = QStringLiteral("detail"); const QString VToolDetail::TagName = QStringLiteral("detail");
const QString VToolDetail::TagNode = QStringLiteral("node"); const QString VToolDetail::TagNode = QStringLiteral("node");
@ -42,10 +45,10 @@ const QString VToolDetail::AttrNodeType = QStringLiteral("nodeType");
const QString VToolDetail::NodeTypeContour = QStringLiteral("Contour"); const QString VToolDetail::NodeTypeContour = QStringLiteral("Contour");
const QString VToolDetail::NodeTypeModeling = QStringLiteral("Modeling"); const QString VToolDetail::NodeTypeModeling = QStringLiteral("Modeling");
const QString VToolDetail::NodeArc = QStringLiteral("NodeArc"); const QString VToolDetail::NodeArc = QStringLiteral("NodeArc");
const QString VToolDetail::NodePoint = QStringLiteral("NodePoint"); const QString VToolDetail::NodePoint = QStringLiteral("NodePoint");
const QString VToolDetail::NodeSpline = QStringLiteral("NodeSpline"); const QString VToolDetail::NodeSpline = QStringLiteral("NodeSpline");
const QString VToolDetail::NodeSplinePath = QStringLiteral("NodeSplinePath"); const QString VToolDetail::NodeSplinePath = QStringLiteral("NodeSplinePath");
VToolDetail::VToolDetail(VPattern *doc, VContainer *data, const quint32 &id, const Valentina::Sources &typeCreation, VToolDetail::VToolDetail(VPattern *doc, VContainer *data, const quint32 &id, const Valentina::Sources &typeCreation,
VMainGraphicsScene *scene, QGraphicsItem *parent) VMainGraphicsScene *scene, QGraphicsItem *parent)

View File

@ -32,7 +32,7 @@
#include "vabstracttool.h" #include "vabstracttool.h"
#include <QGraphicsPathItem> #include <QGraphicsPathItem>
#include "../dialogs/tools/dialogdetail.h" #include "../dialogs/tools/dialogdetail.h"
#include "../dialogs/tools/dialogtool.h"
/** /**
* @brief The VToolDetail class for working with detail. * @brief The VToolDetail class for working with detail.
*/ */

View File

@ -26,6 +26,8 @@
** **
*************************************************************************/ *************************************************************************/
#include <QString>
extern const int MAJOR_VERSION = 0; extern const int MAJOR_VERSION = 0;
extern const int MINOR_VERSION = 2; extern const int MINOR_VERSION = 2;
extern const int DEBUG_VERSION = 2; extern const int DEBUG_VERSION = 2;

View File

@ -28,6 +28,8 @@
#include "vsimplearc.h" #include "vsimplearc.h"
#include "../widgets/vapplication.h" #include "../widgets/vapplication.h"
#include <QPen>
#include <QGraphicsSceneMouseEvent>
VSimpleArc::VSimpleArc(quint32 id, Qt::GlobalColor *currentColor, qreal *factor, QObject *parent) VSimpleArc::VSimpleArc(quint32 id, Qt::GlobalColor *currentColor, qreal *factor, QObject *parent)
:QObject(parent), QGraphicsPathItem(), id (id), factor(factor), currentColor(currentColor) :QObject(parent), QGraphicsPathItem(), id (id), factor(factor), currentColor(currentColor)

View File

@ -28,6 +28,7 @@
#include "vsimplespline.h" #include "vsimplespline.h"
#include "../widgets/vapplication.h" #include "../widgets/vapplication.h"
#include <QPen>
VSimpleSpline::VSimpleSpline(quint32 id, Qt::GlobalColor *currentColor, qreal *factor, QObject *parent) VSimpleSpline::VSimpleSpline(quint32 id, Qt::GlobalColor *currentColor, qreal *factor, QObject *parent)
:QObject(parent), QGraphicsPathItem(), id (id), factor(factor), currentColor(currentColor) :QObject(parent), QGraphicsPathItem(), id (id), factor(factor), currentColor(currentColor)

View File

@ -28,6 +28,7 @@
#include "vsimplesplinepath.h" #include "vsimplesplinepath.h"
#include "../widgets/vapplication.h" #include "../widgets/vapplication.h"
#include <QGraphicsSceneMouseEvent>
VSimpleSplinePath::VSimpleSplinePath(VPattern *doc, VContainer *data, quint32 id, qreal *factor) VSimpleSplinePath::VSimpleSplinePath(VPattern *doc, VContainer *data, quint32 id, qreal *factor)
:VAbstractTool(doc, data, id), factor(factor) :VAbstractTool(doc, data, id), factor(factor)

View File

@ -35,6 +35,8 @@
#include <QXmlSchema> #include <QXmlSchema>
#include <QXmlSchemaValidator> #include <QXmlSchemaValidator>
#include <QFile> #include <QFile>
#include <QFileInfo>
#include <QTemporaryFile>
//This class need for validation pattern file using XSD shema //This class need for validation pattern file using XSD shema
class MessageHandler : public QAbstractMessageHandler class MessageHandler : public QAbstractMessageHandler