diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index 852d89e33..5a50b7b14 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -3054,14 +3054,14 @@ static QSvgNode *createSvgNode(QSvgNode *parent, width = parseLength(widthStr, type, handler); if (type != QSvgHandler::LT_PT) width = convertToPixels(width, true, type); - node->setWidth(int(width), type == QSvgHandler::LT_PERCENT); + node->setWidth(int(width)); } qreal height = 0; if (!heightStr.isEmpty()) { height = parseLength(heightStr, type, handler); if (type != QSvgHandler::LT_PT) height = convertToPixels(height, false, type); - node->setHeight(int(height), type == QSvgHandler::LT_PERCENT); + node->setHeight(int(height)); } QStringList viewBoxValues; diff --git a/src/svg/qsvgtinydocument.cpp b/src/svg/qsvgtinydocument.cpp index f30273735..07afb8eea 100644 --- a/src/svg/qsvgtinydocument.cpp +++ b/src/svg/qsvgtinydocument.cpp @@ -52,8 +52,6 @@ QT_BEGIN_NAMESPACE QSvgTinyDocument::QSvgTinyDocument() : QSvgStructureNode(0) - , m_widthPercent(false) - , m_heightPercent(false) , m_animated(false) , m_animationDuration(0) , m_fps(30) @@ -297,16 +295,14 @@ QSvgNode::Type QSvgTinyDocument::type() const return DOC; } -void QSvgTinyDocument::setWidth(int len, bool percent) +void QSvgTinyDocument::setWidth(int len) { m_size.setWidth(len); - m_widthPercent = percent; } -void QSvgTinyDocument::setHeight(int len, bool percent) +void QSvgTinyDocument::setHeight(int len) { m_size.setHeight(len); - m_heightPercent = percent; } void QSvgTinyDocument::setViewBox(const QRectF &rect) diff --git a/src/svg/qsvgtinydocument_p.h b/src/svg/qsvgtinydocument_p.h index 4f2fd1a52..f562b1b8b 100644 --- a/src/svg/qsvgtinydocument_p.h +++ b/src/svg/qsvgtinydocument_p.h @@ -75,12 +75,10 @@ public: Type type() const; QSize size() const; - void setWidth(int len, bool percent); - void setHeight(int len, bool percent); + void setWidth(int len); + void setHeight(int len); int width() const; int height() const; - bool widthPercent() const; - bool heightPercent() const; bool preserveAspectRatio() const; @@ -115,8 +113,6 @@ private: void mapSourceToTarget(QPainter *p, const QRectF &targetRect, const QRectF &sourceRect = QRectF()); QSize m_size; - bool m_widthPercent; - bool m_heightPercent; mutable QRectF m_viewBox; @@ -151,16 +147,6 @@ inline int QSvgTinyDocument::height() const return size().height(); } -inline bool QSvgTinyDocument::widthPercent() const -{ - return m_widthPercent; -} - -inline bool QSvgTinyDocument::heightPercent() const -{ - return m_heightPercent; -} - inline QRectF QSvgTinyDocument::viewBox() const { if (m_viewBox.isNull())