summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Fix some qdoc warningsFriedemann Kleint2019-03-152-2/+2
| | | | | | | | | | | | | | | | | | src/network/ssl/qsslsocket.cpp:1501: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCaCertificates()' src/network/ssl/qsslsocket.cpp:1482: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCaCertificates()' src/network/ssl/qsslsocket.cpp:1513: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCaCertificates()' src/network/ssl/qsslsocket.cpp:1119: (qdoc) warning: Can't link to 'QSslConfiguration::setDefaultCiphers()' src/network/ssl/qsslsocket.cpp:1119: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCiphers()' src/gui/opengl/qopengltexture.cpp:4137: (qdoc) warning: Can't link to 'setComparisonFunction()' src/widgets/dialogs/qfilesystemmodel.cpp:1215: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text src/widgets/graphicsview/qgraphicswidget.cpp:1229: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text src/widgets/graphicsview/qgraphicsscene.cpp:3313: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text src/gui/painting/qpaintengine_raster.cpp:3438: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text src/widgets/widgets/qtextedit.cpp:2544: (qdoc) warning: Overrides a previous doc src/widgets/widgets/qplaintextedit.cpp:2932: (qdoc) warning: (The previous doc is here) Change-Id: I0c68c59a87eb6a5d9e974f857af6aca0c6e0672d Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix qdoc errors in QIcon headerFriedemann Kleint2019-03-151-0/+1
| | | | | | | | | | | Add missing forward declaration, fixing: src/gui/image/qicon.h:93:16: error: unknown type name 'QPainter' This apparently only happens for qdoc. Change-Id: I39e78258f16628d477b629778241c4f5031820c4 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-151-1/+1
|\ | | | | | | Change-Id: I2bf3b4ceb79364330eae4cbf3cdee9a82d1be46d
| * QOpenGLContext: fix docs about sharingGiuseppe D'Angelo2019-03-131-1/+1
| | | | | | | | | | | | | | FBOs cannot be shared. Streamline the remainder of the sentence. Change-Id: I654b23f86f4ee4ea2ca8e71958464d9f55394297 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Doc: replace 0 with \nullptr in documentationChristian Ehrlicher2019-03-133-6/+7
| | | | | | | | | | | | | | Replace some more 0 with \nullptr. Change-Id: I2af91bf3712eef5161b11da0c44614bc039ade03 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Fix some qdoc warningsFriedemann Kleint2019-03-072-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/corelib/itemmodels/qtransposeproxymodel.cpp:166: (qdoc) warning: Unknown command '\details' src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp:102: (qdoc) warning: '\brief' statement does not end with a full stop. src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp:233: (qdoc) warning: Undocumented parameter 'index' in QConcatenateTablesProxyModel::flags() src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp:165: (qdoc) warning: Undocumented parameter 'proxyIndex' in QConcatenateTablesProxyModel::mapToSource() src/corelib/io/qresource.cpp:275: (qdoc) warning: Can't link to 'isCopressed()' src/corelib/io/qresource.cpp:555: (qdoc) warning: Can't link to 'compressionType()' src/network/ssl/qocspresponse.cpp:47: (qdoc) warning: '\brief' statement does not end with a full stop. src/network/ssl/qocspresponse.cpp:47: (qdoc) warning: Can't link to 'QSslSocket::ocspResponse()' src/gui/image/qimage.cpp:2247: (qdoc) warning: Undocumented parameter 'f' in QImage::convertTo() src/gui/image/qimage.cpp:2247: (qdoc) warning: No such parameter 'format' in QImage::convertTo() src/gui/text/qtextformat.cpp:1420: (qdoc) warning: Undocumented parameter 'styleName' in QTextCharFormat::setFontStyleName() src/gui/text/qtextformat.cpp:1420: (qdoc) warning: No such parameter 'style' in QTextCharFormat::setFontStyleName() src/widgets/dialogs/qdialog.cpp:151: (qdoc) warning: Unknown command '\p' src/widgets/dialogs/qdialog.cpp:167: (qdoc) warning: Unknown command '\p' src/widgets/dialogs/qdialog.cpp:167: (qdoc) warning: Unknown command '\p' src/widgets/dialogs/qdialog.cpp:168: (qdoc) warning: Unknown command '\p' Change-Id: Ide52b70f8e72d53767d489ce1a413cf4c2dce7df Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-03-063-25/+34
|\| | | | | | | | | | | | | Conflicts: src/network/access/http2/hpacktable_p.h Change-Id: Ie0c296667dfdebba84f4858056a1ac80c24ee7df
| * Fix generation of the Qt5::GLESv2 target on ARMAleix Pol2019-03-051-5/+18
| | | | | | | | | | | | | | | | | | | | | | Since 5.12.1 the library name provided is an absolute path. We need to take the case into account, otherwise it just fails to build if the target is used. Fixes QTBUG-72903 Change-Id: I96407e5fe1831487da77cbe7b24b64dae59b22ff Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
| * Don't split bezier curves that are already just a lineAllan Sandfeld Jensen2019-03-051-2/+3
| | | | | | | | | | | | | | | | | | Otherwise we can end up in an infinite loop of splitting the curve and then discarding the half of the new curve, etc. Fixes: QTBUG-74172 Change-Id: I1984b7fd33cd98f65866f1c57c6ab20114615803 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * Prefer BGRA uploading to swizzlingAllan Sandfeld Jensen2019-03-021-18/+13
| | | | | | | | | | | | | | | | The older BGRA extension is more likely to have stable driver support. Fixes: QTBUG-74150 Change-Id: If321b3024fbdeb9e199880744b9ee915b3b2bf6c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Fix typos in deprecation messages, noticed during code reviewEdward Welbourne2019-03-041-2/+2
| | | | | | | | | | | | | | | | | | Missing Q on the front of RegularExpression. Poor wording in QPixmap::fill() messages; and stray spaces at their starts. Task-number: QTBUG-73484 Change-Id: Ib953114c047afc37f0a903fcaaebfbc172079cbc Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-285-4/+32
|\| | | | | | | Change-Id: Icc9b061c56e969756f0351c936cdeb8063c86079
| * Fix determination of OpenGL include paths on macOS, take 2Joerg Bornemann2019-02-272-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sysrootification of OpenGL include paths must be done only once: at configure time. The resolved paths are stored since 521a8539 and must not be resolved again. Turn the makeSpec-type opengl library into a custom-type one, and do the sysrootification in the handler function. Fixes: QTBUG-73736 Change-Id: I2933144057d6f01d8bfc7bda2c2df56c57303459 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * QSyntaxHighlighter: Fix crash when parent is a nullptrDominik Haumann2019-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSyntaxHighlighter has the follwoing constructor taking a QObject QSyntaxHighlighter::QSyntaxHighlighter(QObject *parent) : QObject(*new QSyntaxHighlighterPrivate, parent) { if (parent->inherits("QTextEdit")) { // ... } } Typically, a 'parent' refers to the parent/child hierarchy in Qt and is allowed to be a nullptr. However, in this case, passing a nullptr will lead to a crash, as reported in https://bugs.kde.org/show_bug.cgi?id=404820 This patch makes the QSyntaxHighlighter constructor nullptr safe by checking if parent is a valid pointer. Change-Id: Ia4e9b46b94fd37e6ceb2cd0538594353fdc1e349 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Christoph Cullmann <cullmann@kde.org>
| * Clear only one device from g_pointIdMap when all points releasedShawn Rutledge2019-02-262-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | The new test tst_QTouchEvent::touchOnMultipleTouchscreens() needs the touchpoint IDs to be predictable, but another test currently has a QEXPECT_FAIL; without release events, g_pointIdMap continued to hold the touchpoints that were there when the test failed. So it's necessary to add QWindowSystemInterfacePrivate::clearPointIdMap() to be able to call it in the test cleanup function. Fixes: QTBUG-73830 Change-Id: Ia6a70d028be95cd2b6676db6363ec408c0b116bc Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | QTextureFileReader: add support for astc format filesEirik Aavitsland2019-02-274-3/+249
| | | | | | | | | | | | | | The standard astc encoder has its own file format. Change-Id: I9a2f7b1fa20ba344b79637bafb50ff2bd0596747 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-261-3/+1
|\| | | | | | | Change-Id: Id511850002d9274d17891c063376ac4b3ff939dd
| * Fix assert when drawing lines with extreme coordinatesEirik Aavitsland2019-02-251-3/+1
| | | | | | | | | | | | | | | | | | | | For extreme coordinates, the rasterizer's width parameter could become NaN, which compares false with everything and hence would trigger an assert. Fixes: QTBUG-56434 Change-Id: I27abae6ab0bc94ce042be86ea0587095cdb7d487 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix can not -> cannotRobert Loehning2019-02-255-7/+7
| | | | | | | | | | Change-Id: Ie9992f67ca59aff662a4be046ace08640e7c2714 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | QtGui/Network/OpenGl/Widgets/Xml: use \nullptr in documentationChristian Ehrlicher2019-02-2010-17/+21
| | | | | | | | | | | | | | Replace null and '\c nullptr' with \nullptr in the documentation. Change-Id: I58934eea06943309ba895833f1991629870ab45b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | qguiapplication: move long comment to JIRAGatis Paeglis2019-02-191-35/+2
| | | | | | | | | | | | | | ... where it can be commented on. Change-Id: I627c7562be3a650e08ec7e7e76839797f07d5b2e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | remove obscure commentGatis Paeglis2019-02-151-2/+0
| | | | | | | | | | | | Task-number: QTBUG-73826 Change-Id: I2d15ab726ae3be85220bf96aef673d0037738d97 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-153-12/+35
|\| | | | | | | Change-Id: I8cad26f17834dbc9f7151edc0f17786f9e32025d
| * Turn bcm_host library into makeSpec sourceJoerg Bornemann2019-02-141-1/+2
| | | | | | | | | | | | | | | | | | The bcm_host library couldn't be detected anymore. Let the makespec provide LIBDIR, INCDIR and LIBS for bcm_host to fix this. Change-Id: I4bc268504dc48edaf2884f1c14b745260fd9112c Fixes: QTBUG-73727 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * QBackingStore: Make QPlatformBackingStore creation lazyTor Arne Vestbø2019-02-131-10/+13
| | | | | | | | | | | | | | | | | | Some platform backing stores may require that the window has been created, so let's defer the platform backingstore creation until absolutely necessary. Change-Id: Ib93151c6473e3bbe77d994782d84289c2f63bcf2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * QTextDocument: Do respect white-space:nowrapKai Koehne2019-02-131-1/+2
| | | | | | | | | | | | | | | | | | | | Prevent automatic insertion of line-breaks in blocks formatted with 'white-space:nowrap'. This follows the example of white-space:pre. Fixes: QTBUG-54787 Change-Id: If26f6a54106a02fe0e388947f6368ae4e86acf63 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Don't allow backingstore flush to non-raster surfacesTor Arne Vestbø2019-02-121-0/+18
| | | | | | | | | | | | Change-Id: I8e85706727a8c5f7585e34e3864c8a9f48481b92 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | wasm: disable the eglfs platform pluginMorten Johan Sørvig2019-02-141-1/+1
| | | | | | | | | | | | | | | | Emscripten has EGL headers, but we have no use for the eglfs platform plugin on this platform. Change-Id: I50bab4d1ef0b45bb5dd10e5ea9aa3bf9282652a7 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | [Windows] Fixed regression when creating fallback fontsEskil Abrahamsen Blomfeldt2019-02-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 3ccdeb4b58b681bb3a0a43f926f81fd94f527680, we removed the specialized multi font engine on Windows, causing us to go through the same code path when loading fallbacks as on other platforms. When combined with 97f73e957756753b09a778daf2ee8f0ddb97f746, this caused an error, because the code in QFontEngineMulti::loadEngine() only overrode the families list, but not the singular family in the request. In the QRawFont test, this would cause the requested fallback font to correctly have "MS Shell Dlg2" as the only font in the families list, but the request.family would still be "QtBidiTestFont", the name of the main font. The singular family in the request was preferred by the windows font database when creating the LOGFONT. We would therefore load the latter for the fallback as well and since it still does not support the characters in question, we would continue searching. Fixes: QTBUG-72836 Change-Id: I1787b57febcf6030d5c5b09bc2ef2c9558f05beb Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Fix: "Missing emit keyword on signal call"Alessandro Portale2019-02-132-5/+5
| | | | | | | | | | | | | | [-Wclazy-incorrect-emit] Change-Id: I32cf5db522dcb14bbe5151914624979929eeb52e Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | QtGui: compile with QT_DISABLE_DEPRECATED_BEFORE=0x050d00Christian Ehrlicher2019-02-1313-1/+26
| | | | | | | | | | | | | | | | | | Don't call or implement functions which are not available when compiling with QT_DISABLE_DEPRECATED_BEFORE=0x050d00 Change-Id: I763a1c60d7cc080677736447dc358299d8f7ab04 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Add faster path for scaling QRegion with multiple regionsJoni Poikelin2019-02-131-2/+17
| | | | | | | | | | | | Fixes: QTBUG-72821 Change-Id: Ic4fa349087239337a77b0e280be551b46c75af71 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-122-36/+52
|\| | | | | | | Change-Id: Iad53d4f21263718b8ecf15fd2d1170d24c7b675d
| * Fix two smaller bugs in the BiDi engineLars Knoll2019-02-091-18/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove wrong code changing the Bido level of line separators. This lead to wrong ordering of the string in case the line separator was meant to be ignored and the string should be rendered in one line. Line breaks are anyways already reset to the paragraph level by the algorithm and reordering is done on a line by line basis, so this will work correctly when doing proper line breaking. Secondly fix a small bug found while testing the above change, where we wouldn't set the correct levels for boundary neutrals and explicit embedding chars because we did that processing before we were fully done with the BiDi algorithm. Change-Id: Id88f91cd58d2ab29be864aef34ca1727c1586611 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * Fix an assertion in the BiDi algorithmLars Knoll2019-02-091-14/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | The algorithm has been treating DirB inconsistently so far. initScriptAnalysisAndIsolatePairs was treating it differently than generateDireationalRuns leading to assertions. It wasn't visible in our test data, as DirB is in almost all cases the paragraph separator, where we split strings anyway. Change-Id: I7dc0e7bbcf30ee84d8781ea06097da023e371f05 Fixes: QTBUG-73238 Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * Fix QTextTable:insertRows() for tables with spanning cellsLars Knoll2019-02-091-4/+8
| | | | | | | | | | | | | | | | | | Don't resize the height of cells spanning several columns multiple times. Fixes: QTBUG-36713 Change-Id: I5eb45892f2008e6a4f85745b56efd04323e25673 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Fix some QPainter-related deprecation warningsFriedemann Kleint2019-02-085-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | text/qtextdocument.cpp:2666:48: warning: ‘QString QTextCharFormat::anchorName() const’ is deprecated: Use anchorNames() instead [-Wdeprecated-declarations] text/qtextdocumentfragment.cpp:545:87: warning: ‘QString QTextCharFormat::anchorName() const’ is deprecated: Use anchorNames() instead [-Wdeprecated-declarations] text/qtextdocumentfragment.cpp:546:68: warning: ‘QString QTextCharFormat::anchorName() const’ is deprecated: Use anchorNames() instead [-Wdeprecated-declarations] painting/qpainterpath.cpp:3321:34: warning: ‘void QPainterPath::addRoundRect(const QRectF&, int, int)’ is deprecated: Use addRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations] painting/qpainterpath.cpp:3342:48: warning: ‘void QPainterPath::addRoundRect(const QRectF&, int, int)’ is deprecated: Use addRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations] painting/qpainterpath.cpp:3366:47: warning: ‘void QPainterPath::addRoundRect(const QRectF&, int)’ is deprecated: Use addRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations] painting/qpainter.cpp:4233:49: warning: ‘void QPainter::drawRoundRect(const QRectF&, int, int)’ is deprecated: Use drawRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations] painting/qpainter.cpp:8349:27: warning: ‘void QPainter::setMatrixEnabled(bool)’ is deprecated: Use setWorldMatrixEnabled() instead [-Wdeprecated-declarations] painting/qpdf.cpp:1545:28: warning: ‘void QDataStream::unsetDevice()’ is deprecated: Use QDataStream::setDevice(nullptr) instead [-Wdeprecated-declarations] widgets/qtabbar.cpp:2096:17: warning: ‘void QPainter::initFrom(const QPaintDevice*)’ is deprecated: Use begin(QPaintDevice*) instead [-Wdeprecated-declarations] Change-Id: I76d98ea8146e7586d3763a5610781c7736d37204 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" into ↵Liang Qi2019-02-0842-272/+380
|\ \ | | | | | | | | | refs/staging/5.13
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-02-0842-272/+380
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/templates/AndroidManifest.xml src/network/ssl/qsslsocket_mac.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/corelib/kernel/qtimer/BLACKLIST tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp tests/auto/testlib/selftests/expected_blacklisted.lightxml tests/auto/testlib/selftests/expected_blacklisted.tap tests/auto/testlib/selftests/expected_blacklisted.teamcity tests/auto/testlib/selftests/expected_blacklisted.txt tests/auto/testlib/selftests/expected_blacklisted.xml tests/auto/testlib/selftests/expected_blacklisted.xunitxml tests/auto/testlib/selftests/expected_float.tap tests/auto/testlib/selftests/expected_float.teamcity tests/auto/testlib/selftests/expected_float.txt tests/auto/testlib/selftests/expected_float.xunitxml Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
| | * Include relevant example code in documentation of setUrlHandlerVolker Hilsheimer2019-02-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By only looking at the function prototype, it's tempting to assume that the handler needs to be registered with the usual SLOT macro. That is not the case. The code snippet is already included in the class description, but it doesn't hurt to repeat it here. Change-Id: If24fdca41a4bd976ebd1156c9e1106469388265c Fixes: QTBUG-50484 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| | * Doc: decrease confusion about HSV vs HSL in QColorEirik Aavitsland2019-02-051-29/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-qualified hue() and saturation() etc. refers to those values in the HSV, not HSL, color model. Make this more explicit in the documentation to avoid confusion. Task-number: QTBUG-73129 Change-Id: Ief337672966ac72d0d0c3606d8d68acf01ffe7ee Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| | * Fix QColor::toCmyk() for rgb(0, 0, 0)Eirik Aavitsland2019-02-051-17/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We translate all pure gray colors into cmyk having c,m,y=0 and only the k value expressing the darkness. But a fix introduced to avoid division by 0 caused rgb(0, 0, 0) to be an exception to this; it ended up being translated as c,m,y,k=1 instead. Fix by catching the potential div-by-0 situation earlier and directly set the orthodox cmyk translation: c,m,y=0,k=1. Fixes: QTBUG-73171 Change-Id: I3774eaf9d96e096ac5c47c55d28881bea2bd1309 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Painter path stroking: fix capping of beziers ending in tight turnsEirik Aavitsland2019-02-051-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some overly tight beziers where the start or end point and the next control point are closer than the pen width, the stroker's shifting algorithm will produce a start/end tangent pointing in the opposite direction from what is expected, for one of the sides. This would break the square and round capping logic. Fix by detecting the situation in the capping function and reversing the tangent when necessary. Change-Id: I48f4f017403d7b289b0483dd2b3a7ff1bbd0cf2a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Fix xbm image format handler: properly reject invalid filesEirik Aavitsland2019-02-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The read_xbm_header() function is used to check for valid file header, containing valid width and height values. But in case of an invalid file, the check could depend on uninitialized variables. Change-Id: I9f933ed6e38d86109e5b5a8d55fe763ab928d749 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Initialize bit_depthAlbert Astals Cid2019-01-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | ==12==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x6b90ea in setup_qt /src/qtbase/src/gui/image/qpnghandler.cpp:360:32 Change-Id: Idf04130e645dcf589dfb6260661be18a71b7bdc2 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * QPictureIO::read(): don't work on dangling pointerChristian Ehrlicher2019-01-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPictureIO::read() is using pictureFormat() when the format has to be guessed. pictureFormat() returns a QByteArray which was implicit casted into a char* and then pointed to uninitialized memory. Fix it by using a QByteArray instead a plain char*. Change-Id: If9ae286ed68134af597f0b0c779789e40f9efaed Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * png: initialize color_type to 0Albert Astals Cid2019-01-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes ==12==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x6b8179 in setup_qt /src/qtbase/src/gui/image/qpnghandler.cpp:247:9 on fuzzed file Change-Id: I772d536a0db91665dc16e94751ef507de1064376 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * Fix default font properties when using raw fonts for text layoutsEskil Abrahamsen Blomfeldt2019-01-291-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a QRawFont is set explicitly on the layout, we would get certain font properties from the QTextCharFormat instead. But when the properties had not been set on the QTextCharFormat, we would get the default values which were always 0/false, not the actual default values used in QFont. Instead, we calculate a QFont query based on the format and use the properties from this. This will give us the correct default values in the cases where they are not overridden. Change-Id: I53e5103739164c3d9eafaf76fcb4e8bda57bd12a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Fixups for GL_CONTEXT_LOST in QOpenGLExtensionMatcherDavid Edmundson2019-01-291-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | Fixes the rest of the places we use the pattern of emptying the OpenGL error stack to be able to handle GL_CONTEXT_LOST. Change-Id: Ic45024fc6df84d70d60c48831fa586f889af0c0b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Remove requirement to lock graphics buffer before getting total sizeTor Arne Vestbø2019-01-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPlatformGraphicsBuffer::byteCount() shouldn't need locking unless bytesPerLine() is implemented in a way that requires it, in which case the assert should be in the subclass. Change-Id: I0fdb04c0a3ab042408d6d17b2759509853573d16 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>