diff options
Diffstat (limited to 'src/svg')
-rw-r--r-- | src/svg/doc/snippets/doc_src_qtsvg.cpp | 16 | ||||
-rw-r--r-- | src/svg/doc/snippets/doc_src_qtsvg.pro | 16 | ||||
-rw-r--r-- | src/svg/doc/snippets/src_svg_qgraphicssvgitem.cpp | 16 | ||||
-rw-r--r-- | src/svg/doc/src/qtsvg-index.qdoc | 10 | ||||
-rw-r--r-- | src/svg/doc/src/qtsvg.qdoc | 10 | ||||
-rw-r--r-- | src/svg/doc/src/svgrendering.qdoc | 10 | ||||
-rw-r--r-- | src/svg/qgraphicssvgitem.cpp | 4 | ||||
-rw-r--r-- | src/svg/qsvggenerator.cpp | 7 | ||||
-rw-r--r-- | src/svg/qsvggraphics.cpp | 1 | ||||
-rw-r--r-- | src/svg/qsvghandler.cpp | 10 | ||||
-rw-r--r-- | src/svg/qsvgrenderer.cpp | 2 |
11 files changed, 60 insertions, 42 deletions
diff --git a/src/svg/doc/snippets/doc_src_qtsvg.cpp b/src/svg/doc/snippets/doc_src_qtsvg.cpp index 22b2b38..dc754c3 100644 --- a/src/svg/doc/snippets/doc_src_qtsvg.cpp +++ b/src/svg/doc/snippets/doc_src_qtsvg.cpp @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/src/svg/doc/snippets/doc_src_qtsvg.pro b/src/svg/doc/snippets/doc_src_qtsvg.pro index b9e8d4b..0c9aeed 100644 --- a/src/svg/doc/snippets/doc_src_qtsvg.pro +++ b/src/svg/doc/snippets/doc_src_qtsvg.pro @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/src/svg/doc/snippets/src_svg_qgraphicssvgitem.cpp b/src/svg/doc/snippets/src_svg_qgraphicssvgitem.cpp index e08862c..60018b6 100644 --- a/src/svg/doc/snippets/src_svg_qgraphicssvgitem.cpp +++ b/src/svg/doc/snippets/src_svg_qgraphicssvgitem.cpp @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/src/svg/doc/src/qtsvg-index.qdoc b/src/svg/doc/src/qtsvg-index.qdoc index 73a319b..b559d27 100644 --- a/src/svg/doc/src/qtsvg-index.qdoc +++ b/src/svg/doc/src/qtsvg-index.qdoc @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt SVG module. ** @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/svg/doc/src/qtsvg.qdoc b/src/svg/doc/src/qtsvg.qdoc index 58a467b..c607bd0 100644 --- a/src/svg/doc/src/qtsvg.qdoc +++ b/src/svg/doc/src/qtsvg.qdoc @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt SVG module. ** @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/svg/doc/src/svgrendering.qdoc b/src/svg/doc/src/svgrendering.qdoc index 8429ab4..48a8d14 100644 --- a/src/svg/doc/src/svgrendering.qdoc +++ b/src/svg/doc/src/svgrendering.qdoc @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt SVG module. ** @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/svg/qgraphicssvgitem.cpp b/src/svg/qgraphicssvgitem.cpp index f6b7c74..fe6e92e 100644 --- a/src/svg/qgraphicssvgitem.cpp +++ b/src/svg/qgraphicssvgitem.cpp @@ -123,9 +123,7 @@ public: \snippet src_svg_qgraphicssvgitem.cpp 0 - Size of the item can be set via the \l{QRectF::setSize()} - {setSize()} method of the \l{QGraphicsSvgItem::boundingRect()} - {bounding rectangle} or via direct manipulation of the items + Size of the item can be set via direct manipulation of the items transformation matrix. By default the SVG rendering is cached using QGraphicsItem::DeviceCoordinateCache diff --git a/src/svg/qsvggenerator.cpp b/src/svg/qsvggenerator.cpp index 3f4e545..8b9a9bd 100644 --- a/src/svg/qsvggenerator.cpp +++ b/src/svg/qsvggenerator.cpp @@ -228,9 +228,9 @@ public: QTextStream str(&d_func()->defs, QIODevice::Append); str << "<mask id=\"" << maskId << "\" x=\"0\" y=\"0\" width=\"8\" height=\"8\" " << "stroke=\"none\" fill=\"#ffffff\" patternUnits=\"userSpaceOnUse\" >" << endl; - for (QRect r : reg.rects()) { + const auto &rects = reg.rects(); + for (const QRect &r : rects) str << rct.arg(r.x()).arg(r.y()).arg(r.width()).arg(r.height()) << endl; - } str << QStringLiteral("</mask>") << endl << endl; d_func()->savedPatternMasks.append(maskId); } @@ -856,8 +856,9 @@ int QSvgGenerator::metric(QPaintDevice::PaintDeviceMetric metric) const case QPaintDevice::PdmPhysicalDpiY: return d->engine->resolution(); case QPaintDevice::PdmDevicePixelRatio: - case QPaintDevice::PdmDevicePixelRatioScaled: return 1; + case QPaintDevice::PdmDevicePixelRatioScaled: + return 1 * QPaintDevice::devicePixelRatioFScale(); default: qWarning("QSvgGenerator::metric(), unhandled metric %d\n", metric); break; diff --git a/src/svg/qsvggraphics.cpp b/src/svg/qsvggraphics.cpp index 387136f..b1047eb 100644 --- a/src/svg/qsvggraphics.cpp +++ b/src/svg/qsvggraphics.cpp @@ -316,7 +316,6 @@ void QSvgText::draw(QPainter *p, QSvgExtraStates &states) bool appendSpace = false; QVector<QString> paragraphs; - QStack<QTextCharFormat> formats; QVector<QVector<QTextLayout::FormatRange> > formatRanges(1); paragraphs.push_back(QString()); diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index d49a4ab..f6b4320 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -2308,7 +2308,6 @@ static bool parseAnimateColorNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler) { - QString typeStr = attributes.value(QLatin1String("type")).toString(); QStringRef fromStr = attributes.value(QLatin1String("from")); QStringRef toStr = attributes.value(QLatin1String("to")); QString valuesStr = attributes.value(QLatin1String("values")).toString(); @@ -2393,7 +2392,6 @@ static bool parseAnimateTransformNode(QSvgNode *parent, QString values = attributes.value(QLatin1String("values")).toString(); QString beginStr = attributes.value(QLatin1String("begin")).toString(); QString durStr = attributes.value(QLatin1String("dur")).toString(); - QString targetStr = attributes.value(QLatin1String("attributeName")).toString(); QString repeatStr = attributes.value(QLatin1String("repeatCount")).toString(); QString fillStr = attributes.value(QLatin1String("fill")).toString(); QString fromStr = attributes.value(QLatin1String("from")).toString(); @@ -3197,14 +3195,6 @@ static QSvgNode *createSvgNode(QSvgNode *parent, { Q_UNUSED(parent); Q_UNUSED(attributes); - QString baseProfile = attributes.value(QLatin1String("baseProfile")).toString(); -#if 0 - if (baseProfile.isEmpty() && baseProfile != QLatin1String("tiny")) { - qCWarning(lcSvgHandler, "Profile is %s while we only support tiny!", - qPrintable(baseProfile)); - } -#endif - QSvgTinyDocument *node = new QSvgTinyDocument(); QString widthStr = attributes.value(QLatin1String("width")).toString(); QString heightStr = attributes.value(QLatin1String("height")).toString(); diff --git a/src/svg/qsvgrenderer.cpp b/src/svg/qsvgrenderer.cpp index bd0e6e3..d4ad373 100644 --- a/src/svg/qsvgrenderer.cpp +++ b/src/svg/qsvgrenderer.cpp @@ -304,7 +304,7 @@ int QSvgRenderer::animationDuration() const */ void QSvgRendererPrivate::callRepaintNeeded(QSvgRenderer *const q) { - q->repaintNeeded(); + emit q->repaintNeeded(); } template<typename TInputType> |