From 520ebdbacb3b0d823126d82306107808287425a3 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 23 Jan 2018 22:23:06 -0800 Subject: MSVC: Don't set a DLL base address for 64-bit The linker complains: LINK : warning LNK4281: undesirable base address 0x67000000 for x64 image; set base address above 4GB for best ASLR optimization And it's not really required anymore, as the recommended /DYNAMICBASE is the default. Change-Id: I56b444f9d6274221a3b7fffd150caab1beecfd43 Reviewed-by: Friedemann Kleint --- src/svg/svg.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/svg/svg.pro b/src/svg/svg.pro index f9e43b0..b6f17a7 100644 --- a/src/svg/svg.pro +++ b/src/svg/svg.pro @@ -3,7 +3,7 @@ QT = core-private gui-private qtHaveModule(widgets): QT += widgets-private DEFINES += QT_NO_USING_NAMESPACE -win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x66000000 +msvc:equals(QT_ARCH, i386): QMAKE_LFLAGS += /BASE:0x66000000 solaris-cc*:QMAKE_CXXFLAGS_RELEASE -= -O2 QMAKE_DOCS = $$PWD/doc/qtsvg.qdocconf -- cgit v1.2.1 From a2156af9ed6bc3e57f715dfe6784a2249ee5fa35 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 2 Feb 2018 15:12:17 +0100 Subject: Bump version Change-Id: If833630769eed7bdb4a09c92bbd5ec58bfd3a29f --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 24222fd..fea5194 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -3,4 +3,4 @@ load(qt_build_config) CONFIG += warning_clean DEFINES += QT_NO_FOREACH -MODULE_VERSION = 5.9.4 +MODULE_VERSION = 5.9.5 -- cgit v1.2.1 From af35137016f082c3fa15e61414f3c78c73ac322f Mon Sep 17 00:00:00 2001 From: Antti Kokko Date: Wed, 31 Jan 2018 08:39:55 +0200 Subject: Add changes file for Qt 5.10.1 Change-Id: Ie7f6640d389672c478a11fd9266a427c07d2b4bb Reviewed-by: Andy Shaw --- dist/changes-5.10.1 | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 dist/changes-5.10.1 diff --git a/dist/changes-5.10.1 b/dist/changes-5.10.1 new file mode 100644 index 0000000..695c4e3 --- /dev/null +++ b/dist/changes-5.10.1 @@ -0,0 +1,26 @@ +Qt 5.10.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.10.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.10 series is binary compatible with the 5.9.x series. +Applications compiled for 5.9 will continue to run with 5.10. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +This release contains all fixes included in the Qt 5.9.4 release. + +**************************************************************************** +* Qt 5.10.1 Changes * +**************************************************************************** + + - This release contains only minor code improvements. -- cgit v1.2.1 From 44d824109d1311a50a232875193cbb93e7908d99 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Tue, 13 Feb 2018 15:52:54 +0100 Subject: Fix typos Change-Id: I14e42b9f55f80e7f2098ba9fcb3c9c47a81446ab Reviewed-by: Leena Miettinen --- tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp index fd1b350..87d24c7 100644 --- a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp +++ b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp @@ -1235,7 +1235,7 @@ void tst_QSvgRenderer::testStopOffsetOpacity() void tst_QSvgRenderer::testUseElement() { static const char *svgs[] = { - //Use refering to non group node (1) + //Use referring to non group node (1) "" " " " " @@ -1256,7 +1256,7 @@ void tst_QSvgRenderer::testUseElement() " " " " "", - //Use refering to non group node (2) + //Use referring to non group node (2) "" " " " " @@ -1277,7 +1277,7 @@ void tst_QSvgRenderer::testUseElement() " " " " "", - //Use refering to group node + //Use referring to group node "" " " " " -- cgit v1.2.1 From 967536c12d8a8684899117aafd63faf8d831b656 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 27 Feb 2018 09:12:14 +0100 Subject: Fix warning when encountering font-size="none" Extend existing enum by "none" and extract a function to return the specification so that "none" can be cleanly handled. Task-number: QTBUG-66646 Change-Id: If4ec1056c6f0fa407f76b747634bb898e75a5474 Reviewed-by: Eirik Aavitsland --- src/svg/qsvghandler.cpp | 78 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 51 insertions(+), 27 deletions(-) diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index 6c0e742..0862b05 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -1288,6 +1288,49 @@ static void parsePen(QSvgNode *node, } } +enum FontSizeSpec { XXSmall, XSmall, Small, Medium, Large, XLarge, XXLarge, + FontSizeNone, FontSizeValue }; + +static const qreal sizeTable[] = +{ qreal(6.9), qreal(8.3), qreal(10.0), qreal(12.0), qreal(14.4), qreal(17.3), qreal(20.7) }; + +Q_STATIC_ASSERT(sizeof(sizeTable)/sizeof(sizeTable[0]) == FontSizeNone); + +static FontSizeSpec fontSizeSpec(const QStringRef &spec) +{ + switch (spec.at(0).unicode()) { + case 'x': + if (spec == QLatin1String("xx-small")) + return XXSmall; + if (spec == QLatin1String("x-small")) + return XSmall; + if (spec == QLatin1String("x-large")) + return XLarge; + if (spec == QLatin1String("xx-large")) + return XXLarge; + break; + case 's': + if (spec == QLatin1String("small")) + return Small; + break; + case 'm': + if (spec == QLatin1String("medium")) + return Medium; + break; + case 'l': + if (spec == QLatin1String("large")) + return Large; + break; + case 'n': + if (spec == QLatin1String("none")) + return FontSizeNone; + break; + default: + break; + } + return FontSizeValue; +} + static void parseFont(QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *handler) @@ -1311,38 +1354,19 @@ static void parseFont(QSvgNode *node, if (!attributes.fontSize.isEmpty() && attributes.fontSize != QT_INHERIT) { // TODO: Support relative sizes 'larger' and 'smaller'. - QSvgHandler::LengthType dummy; // should always be pixel size - qreal size = 0; - static const qreal sizeTable[] = { qreal(6.9), qreal(8.3), qreal(10.0), qreal(12.0), qreal(14.4), qreal(17.3), qreal(20.7) }; - enum AbsFontSize { XXSmall, XSmall, Small, Medium, Large, XLarge, XXLarge }; - switch (attributes.fontSize.at(0).unicode()) { - case 'x': - if (attributes.fontSize == QLatin1String("xx-small")) - size = sizeTable[XXSmall]; - else if (attributes.fontSize == QLatin1String("x-small")) - size = sizeTable[XSmall]; - else if (attributes.fontSize == QLatin1String("x-large")) - size = sizeTable[XLarge]; - else if (attributes.fontSize == QLatin1String("xx-large")) - size = sizeTable[XXLarge]; + const FontSizeSpec spec = fontSizeSpec(attributes.fontSize); + switch (spec) { + case FontSizeNone: break; - case 's': - if (attributes.fontSize == QLatin1String("small")) - size = sizeTable[Small]; - break; - case 'm': - if (attributes.fontSize == QLatin1String("medium")) - size = sizeTable[Medium]; - break; - case 'l': - if (attributes.fontSize == QLatin1String("large")) - size = sizeTable[Large]; + case FontSizeValue: { + QSvgHandler::LengthType dummy; // should always be pixel size + fontStyle->setSize(parseLength(attributes.fontSize.toString(), dummy, handler)); + } break; default: - size = parseLength(attributes.fontSize.toString(), dummy, handler); + fontStyle->setSize(sizeTable[spec]); break; } - fontStyle->setSize(size); } if (!attributes.fontStyle.isEmpty() && attributes.fontStyle != QT_INHERIT) { -- cgit v1.2.1 From d4addd30de02c1afd5f93cbc2319bd3bdaed9588 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 27 Feb 2018 09:33:23 +0100 Subject: QSvgHandler: Change some usages of QString to QStringRef QString allocation can be avoided in some places after the introduction of QStringRef::toInt()/toDouble(). Change-Id: Ib400f49df04847f85aeea0190215f864f71223bd Reviewed-by: Eirik Aavitsland --- src/svg/qsvghandler.cpp | 111 +++++++++++++++++++++++------------------------- 1 file changed, 54 insertions(+), 57 deletions(-) diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index 0862b05..6d2e279 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -896,10 +896,11 @@ static bool constructColor(const QStringRef &colorStr, const QStringRef &opacity return true; } -static qreal parseLength(const QString &str, QSvgHandler::LengthType &type, +template // QString/QStringRef +static qreal parseLength(const String &str, QSvgHandler::LengthType &type, QSvgHandler *handler, bool *ok = NULL) { - QString numStr = str.trimmed(); + String numStr = str.trimmed(); if (numStr.endsWith(QLatin1Char('%'))) { numStr.chop(1); @@ -931,7 +932,7 @@ static qreal parseLength(const QString &str, QSvgHandler::LengthType &type, return len; } -static inline qreal convertToNumber(const QString &str, QSvgHandler *handler, bool *ok = NULL) +static inline qreal convertToNumber(const QStringRef &str, QSvgHandler *handler, bool *ok = NULL) { QSvgHandler::LengthType type; qreal num = parseLength(str, type, handler, ok); @@ -1226,7 +1227,7 @@ static void parsePen(QSvgNode *node, //stroke-width handling if (!attributes.strokeWidth.isEmpty() && attributes.strokeWidth != QT_INHERIT) { QSvgHandler::LengthType lt; - prop->setWidth(parseLength(attributes.strokeWidth.toString(), lt, handler)); + prop->setWidth(parseLength(attributes.strokeWidth, lt, handler)); } //stroke-dasharray @@ -1360,7 +1361,7 @@ static void parseFont(QSvgNode *node, break; case FontSizeValue: { QSvgHandler::LengthType dummy; // should always be pixel size - fontStyle->setSize(parseLength(attributes.fontSize.toString(), dummy, handler)); + fontStyle->setSize(parseLength(attributes.fontSize, dummy, handler)); } break; default: @@ -1381,7 +1382,7 @@ static void parseFont(QSvgNode *node, if (!attributes.fontWeight.isEmpty() && attributes.fontWeight != QT_INHERIT) { bool ok = false; - int weightNum = attributes.fontWeight.toString().toInt(&ok); + const int weightNum = attributes.fontWeight.toInt(&ok); if (ok) { fontStyle->setWeight(weightNum); } else { @@ -2124,7 +2125,7 @@ static void parseOpacity(QSvgNode *node, if (attributes.opacity.isEmpty()) return; - const QString value = attributes.opacity.toString().trimmed(); + const QStringRef value = attributes.opacity.trimmed(); bool ok = false; qreal op = value.toDouble(&ok); @@ -2534,9 +2535,9 @@ static QSvgNode *createCircleNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *) { - QString cx = attributes.value(QLatin1String("cx")).toString(); - QString cy = attributes.value(QLatin1String("cy")).toString(); - QString r = attributes.value(QLatin1String("r")).toString(); + const QStringRef cx = attributes.value(QLatin1String("cx")); + const QStringRef cy = attributes.value(QLatin1String("cy")); + const QStringRef r = attributes.value(QLatin1String("r")); qreal ncx = toDouble(cx); qreal ncy = toDouble(cy); qreal nr = toDouble(r); @@ -2575,10 +2576,10 @@ static QSvgNode *createEllipseNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *) { - QString cx = attributes.value(QLatin1String("cx")).toString(); - QString cy = attributes.value(QLatin1String("cy")).toString(); - QString rx = attributes.value(QLatin1String("rx")).toString(); - QString ry = attributes.value(QLatin1String("ry")).toString(); + const QStringRef cx = attributes.value(QLatin1String("cx")); + const QStringRef cy = attributes.value(QLatin1String("cy")); + const QStringRef rx = attributes.value(QLatin1String("rx")); + const QStringRef ry = attributes.value(QLatin1String("ry")); qreal ncx = toDouble(cx); qreal ncy = toDouble(cy); qreal nrx = toDouble(rx); @@ -2593,7 +2594,7 @@ static QSvgStyleProperty *createFontNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *) { - QString hax = attributes.value(QLatin1String("horiz-adv-x")).toString(); + const QStringRef hax = attributes.value(QLatin1String("horiz-adv-x")); QString myId = someId(attributes); qreal horizAdvX = toDouble(hax); @@ -2626,7 +2627,7 @@ static bool parseFontFaceNode(QSvgStyleProperty *parent, QSvgFontStyle *style = static_cast(parent); QSvgFont *font = style->svgFont(); QString name = attributes.value(QLatin1String("font-family")).toString(); - QString unitsPerEmStr = attributes.value(QLatin1String("units-per-em")).toString(); + const QStringRef unitsPerEmStr = attributes.value(QLatin1String("units-per-em")); qreal unitsPerEm = toDouble(unitsPerEmStr); if (!unitsPerEm) @@ -2732,11 +2733,11 @@ static QSvgNode *createImageNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler) { - QString x = attributes.value(QLatin1String("x")).toString(); - QString y = attributes.value(QLatin1String("y")).toString(); - QString width = attributes.value(QLatin1String("width")).toString(); - QString height = attributes.value(QLatin1String("height")).toString(); - QString filename = attributes.value(QLatin1String("xlink:href")).toString(); + const QStringRef x = attributes.value(QLatin1String("x")); + const QStringRef y = attributes.value(QLatin1String("y")); + const QStringRef width = attributes.value(QLatin1String("width")); + const QStringRef height = attributes.value(QLatin1String("height")); + QStringRef filename = attributes.value(QLatin1String("xlink:href")); qreal nx = toDouble(x); qreal ny = toDouble(y); QSvgHandler::LengthType type; @@ -2761,14 +2762,14 @@ static QSvgNode *createImageNode(QSvgNode *parent, int idx = filename.lastIndexOf(QLatin1String("base64,")); if (idx != -1) { idx += 7; - QString dataStr = filename.mid(idx); + QStringRef dataStr = filename.mid(idx); QByteArray data = QByteArray::fromBase64(dataStr.toLatin1()); image = QImage::fromData(data); } else { qCDebug(lcSvgHandler) << "QSvgHandler::createImageNode: Unrecognized inline image format!"; } } else - image = QImage(filename); + image = QImage(filename.toString()); if (image.isNull()) { qDebug()<<"couldn't create image from "<(parent); - QString offsetStr = attrs.offset.toString(); QStringRef colorStr = attrs.stopColor; QColor color; bool ok = true; - qreal offset = convertToNumber(offsetStr, handler, &ok); + qreal offset = convertToNumber(attrs.offset, handler, &ok); if (!ok) offset = 0.0; QString black = QString::fromLatin1("#000000"); @@ -3202,12 +3202,9 @@ static bool parseStyleNode(QSvgNode *parent, Q_UNUSED(attributes) Q_UNUSED(handler) #else - QString type = attributes.value(QLatin1String("type")).toString(); - type = type.toLower(); - - if (type == QLatin1String("text/css")) { + const QStringRef type = attributes.value(QLatin1String("type")); + if (type.compare(QLatin1String("text/css"), Qt::CaseInsensitive) == 0) handler->setInStyle(true); - } #endif return true; @@ -3220,8 +3217,8 @@ static QSvgNode *createSvgNode(QSvgNode *parent, Q_UNUSED(parent); Q_UNUSED(attributes); QSvgTinyDocument *node = new QSvgTinyDocument(); - QString widthStr = attributes.value(QLatin1String("width")).toString(); - QString heightStr = attributes.value(QLatin1String("height")).toString(); + const QStringRef widthStr = attributes.value(QLatin1String("width")); + const QStringRef heightStr = attributes.value(QLatin1String("height")); QString viewBoxStr = attributes.value(QLatin1String("viewBox")).toString(); QSvgHandler::LengthType type = QSvgHandler::LT_PX; // FIXME: is the default correct? @@ -3297,8 +3294,8 @@ static QSvgNode *createTextNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler) { - QString x = attributes.value(QLatin1String("x")).toString(); - QString y = attributes.value(QLatin1String("y")).toString(); + const QStringRef x = attributes.value(QLatin1String("x")); + const QStringRef y = attributes.value(QLatin1String("y")); //### editable and rotate not handled QSvgHandler::LengthType type; qreal nx = parseLength(x, type, handler); @@ -3315,8 +3312,8 @@ static QSvgNode *createTextAreaNode(QSvgNode *parent, QSvgText *node = static_cast(createTextNode(parent, attributes, handler)); if (node) { QSvgHandler::LengthType type; - qreal width = parseLength(attributes.value(QLatin1String("width")).toString(), type, handler); - qreal height = parseLength(attributes.value(QLatin1String("height")).toString(), type, handler); + qreal width = parseLength(attributes.value(QLatin1String("width")), type, handler); + qreal height = parseLength(attributes.value(QLatin1String("height")), type, handler); node->setTextArea(QSizeF(width, height)); } return node; @@ -3342,8 +3339,8 @@ static QSvgNode *createUseNode(QSvgNode *parent, QSvgHandler *handler) { QString linkId = attributes.value(QLatin1String("xlink:href")).toString().remove(0, 1); - QString xStr = attributes.value(QLatin1String("x")).toString(); - QString yStr = attributes.value(QLatin1String("y")).toString(); + const QStringRef xStr = attributes.value(QLatin1String("x")); + const QStringRef yStr = attributes.value(QLatin1String("y")); QSvgStructureNode *group = 0; if (linkId.isEmpty()) -- cgit v1.2.1