From d6c68a4df8d126ad58a75c301c195be51018f694 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 27 Jan 2017 17:41:08 +0200 Subject: [PATCH] MSVC warning. --HG-- branch : develop --- src/app/valentina/xml/vpattern.cpp | 8 ++++---- .../tools/drawTools/operation/vabstractoperation.cpp | 11 +++++------ .../tools/drawTools/operation/vabstractoperation.h | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index e52cb70c6..44e9d964e 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -2749,7 +2749,7 @@ void VPattern::ParseToolRotation(VMainGraphicsScene *scene, QDomElement &domElem QVector source; QVector destination; - VAbstractOperation::ExtractData(this, domElement, source, destination); + VAbstractOperation::ExtractData(domElement, source, destination); VToolRotation::Create(id, center, a, suffix, source, destination, scene, this, data, parse, Source::FromFile); //Rewrite attribute formula. Need for situation when we have wrong formula. @@ -2791,7 +2791,7 @@ void VPattern::ParseToolFlippingByLine(VMainGraphicsScene *scene, QDomElement &d QVector source; QVector destination; - VAbstractOperation::ExtractData(this, domElement, source, destination); + VAbstractOperation::ExtractData(domElement, source, destination); VToolFlippingByLine::Create(id, p1, p2, suffix, source, destination, scene, this, data, parse, Source::FromFile); @@ -2821,7 +2821,7 @@ void VPattern::ParseToolFlippingByAxis(VMainGraphicsScene *scene, QDomElement &d QVector source; QVector destination; - VAbstractOperation::ExtractData(this, domElement, source, destination); + VAbstractOperation::ExtractData(domElement, source, destination); VToolFlippingByAxis::Create(id, origin, axisType, suffix, source, destination, scene, this, data, parse, Source::FromFile); @@ -2853,7 +2853,7 @@ void VPattern::ParseToolMove(VMainGraphicsScene *scene, QDomElement &domElement, QVector source; QVector destination; - VAbstractOperation::ExtractData(this, domElement, source, destination); + VAbstractOperation::ExtractData(domElement, source, destination); VToolMove::Create(id, a, len, suffix, source, destination, scene, this, data, parse, Source::FromFile); //Rewrite attribute formula. Need for situation when we have wrong formula. diff --git a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp index 4b9e80d3d..cb6ed67f8 100644 --- a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp @@ -96,10 +96,9 @@ void VAbstractOperation::paint(QPainter *painter, const QStyleOptionGraphicsItem } //--------------------------------------------------------------------------------------------------------------------- -void VAbstractOperation::ExtractData(VAbstractPattern *doc, const QDomElement &domElement, QVector &source, +void VAbstractOperation::ExtractData(const QDomElement &domElement, QVector &source, QVector &destination) { - SCASSERT(doc != nullptr) const QDomNodeList nodeList = domElement.childNodes(); for (qint32 i = 0; i < nodeList.size(); ++i) { @@ -113,7 +112,7 @@ void VAbstractOperation::ExtractData(VAbstractPattern *doc, const QDomElement &d const QDomElement element = srcList.at(j).toElement(); if (not element.isNull()) { - source.append(doc->GetParametrUInt(element, AttrIdObject, NULL_ID_STR)); + source.append(VDomDocument::GetParametrUInt(element, AttrIdObject, NULL_ID_STR)); } } } @@ -128,9 +127,9 @@ void VAbstractOperation::ExtractData(VAbstractPattern *doc, const QDomElement &d if (not element.isNull()) { DestinationItem d; - d.id = doc->GetParametrUInt(element, AttrIdObject, NULL_ID_STR); - d.mx = qApp->toPixel(doc->GetParametrDouble(element, AttrMx, QString::number(INT_MAX))); - d.my = qApp->toPixel(doc->GetParametrDouble(element, AttrMy, QString::number(INT_MAX))); + d.id = VDomDocument::GetParametrUInt(element, AttrIdObject, NULL_ID_STR); + d.mx = qApp->toPixel(VDomDocument::GetParametrDouble(element, AttrMx, QString::number(INT_MAX))); + d.my = qApp->toPixel(VDomDocument::GetParametrDouble(element, AttrMy, QString::number(INT_MAX))); destination.append(d); } } diff --git a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h index 40c85247a..fc4e49892 100644 --- a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h +++ b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h @@ -84,7 +84,7 @@ public: virtual void GroupVisibility(quint32 object, bool visible) Q_DECL_OVERRIDE; virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE; - static void ExtractData(VAbstractPattern *doc, const QDomElement &domElement, QVector &source, + static void ExtractData(const QDomElement &domElement, QVector &source, QVector &destination); public slots: virtual void FullUpdateFromFile() Q_DECL_OVERRIDE;