summaryrefslogtreecommitdiffstats
path: root/src/gui/image
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-04-101-4/+4
|\ | | | | | | | | | | | | | | Conflicts: mkspecs/win32-clang-msvc/qmake.conf src/gui/image/qpnghandler.cpp Change-Id: Ied79d02912ffb3a307a99483df7db08c7f9d0cd8
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-061-4/+4
| |\ | | | | | | | | | Change-Id: Iec860bb703f983b7438e67c695b9c454e72b3e0f
| | * png handler: initialize all the variables passed to png_get_IHDRAlbert Astals Cid2019-04-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | oss-fuzz found at least width is sometimes not initialized, and we're initializing almost all of them in most cases so be complete. the oss-fuzz instance was ==1==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x667c43 in operator!= /src/qtbase/src/corelib/tools/qsize.h:173:25 #1 0x667c43 in setup_qt /src/qtbase/src/gui/image/qpnghandler.cpp:403 Change-Id: Idb9aaf5ab85509d9c893beaf8d9118339ba46be7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Make the 64 bit raster backend an optional featureAllan Sandfeld Jensen2019-04-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Can be used to make smaller binaries, and possibly speed up ARGB32 rendering on some platforms. Change-Id: I7647b197ba7a6582187cc9736b7e0d752bd5bee5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Replace qMove with std::moveAllan Sandfeld Jensen2019-04-062-4/+4
| | | | | | | | | | | | | | | | | | Change-Id: I67df3ae6b5db0a158f86e75b99f422bd13853bc9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.13' into dev" into ↵Qt Forward Merge Bot2019-04-061-2/+4
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-061-2/+4
| |\| | | | | | | | | | | | | | Change-Id: Ib7c4fc52915b5e6c72b9aa262fb59f2a041dccd7
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-051-2/+4
| | |\| | | | | | | | | | | | | Change-Id: I010a6322d12e038fdce247a58dfb05e204c2ff3b
| | | * Doc: Update QImage::depth to indicate we support 64 bpp nowAndy Shaw2019-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Icbd4920ed03655cec483a402de9d0ae3378ff3ef Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | | * Update scanline documentationAllan Sandfeld Jensen2019-04-041-1/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: I019b102e99f99377b528ad5c8a4ccb2a7929f14f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | Replace Q_DECL_NOEXCEPT with noexcept in QtGuiAllan Sandfeld Jensen2019-04-059-26/+26
|/ / / | | | | | | | | | | | | Change-Id: I43803b88fea8083782d73ce157c466b022208740 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-032-9/+28
|\| | | | | | | | | | | Change-Id: I99a27f9a0402e1ccad45a2d062d784f8d9a08dd3
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-022-9/+28
| |\| | | | | | | | | | Change-Id: Ia5d893e57deb78bc32e2053a5a79543ff847fe32
| | * Forward physical parameters for derived QImagesAlexander Volkov2019-04-011-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | More specifically, for masks and rotated images. Add tests for it, also add tests that image metadata is forwarded for converted and copied images. Fixes: QTBUG-49259 Change-Id: I05d4a468b17f53a2625500b871c01b2c53b981a1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * Forward devicePixelRatio in QPixmap::mask()Alexander Volkov2019-04-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Also add a test checking that devicePixelRatio is forwarded to derivatives of QPixmap. Change-Id: Idb2b3f033ccc0fd49bf54b11f5dffbce5a19b006 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-03-312-45/+36
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/configure.json Change-Id: I93ac67f3bf4844bc7c691183e94bceb922b7b919
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-301-45/+21
| |\| | | | | | | | | | Change-Id: I9935bacae0d6ba532418fc3d28adbc7ca1463604
| | * Speculative fix for building on INTEGRITY with ARM NEONAllan Sandfeld Jensen2019-03-291-45/+21
| | | | | | | | | | | | | | | | | | | | | | | | Avoid using inline assembler Task-number: QTBUG-72716 Change-Id: I696efb5a787416eb4fc5ba3a250461aaa9a4afc2 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-03-261-0/+15
| |\| | | | | | | | | | Change-Id: I71cc71881fb638e207d83a8733bad8f267701c0f
| | * QPixmap: More safe failing if qApp is not a QGuiApplicationAlbert Astals Cid2019-03-221-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can happen that QDataStream is fed a QVariant that contains a QPixmap representation, that will make the application crash when trying to restore it This is specially important for cases in which applications expose dbus interfaces with QVariantMaps Change-Id: Ife4feaef30f30e7e27d88464bd6b2a247f743123 Reported-by: Fabian Vogt <fabian@ritter-vogt.de> Reviewed-by: Fabian Vogt <fabian@ritter-vogt.de> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-03-264-3/+23
|\| | | | | | | | | | | Change-Id: I38389a69411f4549fed432f1181dbe23398b34a2
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-211-1/+4
| |\| | | | | | | | | | Change-Id: Ie7f68dcd5650e0037b6c3313cc9ffdcd7c494fbe
| | * Handle device pixel ratio in QIconLoaderEngine::paint()Alexander Volkov2019-03-201-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | QIcon::paint() paints blurry icons on HighDPI screens. In particular, it is called by QCommonStyle to paint icons for CE_ItemViewItem's. Change-Id: Iffe6bd01a8756e617656195ef63fe13c968e0832 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-203-2/+19
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qplatformintegration.cpp src/gui/kernel/qplatformintegration.h src/plugins/platforms/wasm/qwasmintegration.cpp src/plugins/platforms/xcb/qxcbconnection_screens.cpp Change-Id: I15063d42e9a1e226d9d2d2d372f75141b84c5c1b
| | * Avoid creating wide images with negative bytesPerLineAllan Sandfeld Jensen2019-02-143-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QImage API can not handle images with more bytes per line than what an integer can hold. Fixes: QTBUG-73731 Fixes: QTBUG-73732 Change-Id: Ieed6fec7645661fd58d8d25335f806faaa1bb3e9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-161-0/+1
|\| | | | | | | | | | | Change-Id: Ief0a0b754c104d5348fee9ee15e967bd37c526f8
| * | 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>
* | | More nullptr usage in headersKevin Funk2019-03-143-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Diff generated by running clang-tidy's modernize-use-nullptr checker on the CMake-based Qt version. Skipping src/3rdparty, examples/, tests/ Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-092-6/+6
|\| | | | | | | | | | | Change-Id: I056b658ffe9390dfcbe2787e2bddc7f4e9b389dd
| * | Fix some qdoc warningsFriedemann Kleint2019-03-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | 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.13' into devQt Forward Merge Bot2019-02-2013-10/+40
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp Added tests/auto/testlib/selftests/expected_crashes_5.txt to work round the output of the crashes test (which exercises UB, see QTBUG-73903) being truncated on one test platform. Change-Id: I9cd3f2639b4e50c3c4513e14629a40bdca8f8273
| * | QtGui: compile with QT_DISABLE_DEPRECATED_BEFORE=0x050d00Christian Ehrlicher2019-02-1311-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-02-084-9/+15
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * 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>
| | * Prevent QPixmap::load from touching QPixmapCache in non-gui threadsJoni Poikelin2019-01-281-4/+6
| | | | | | | | | | | | | | | | | | Change-Id: Ied0fec48c81298743f694f317dd60e58d356f69a Fixes: QTBUG-72523 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * | Add deprecation exclusion around deprecated calls in deprecated codeFriedemann Kleint2019-02-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: io/qdir.cpp:1087:16: warning: ‘static void QResource::addSearchPath(const QString&)’ is deprecated: Use QDir::addSearchPath() instead [-Wdeprecated-declarations] io/qprocess.cpp:1178:34: warning: ‘void QProcess::finished(int)’ is deprecated: Use QProcess::finished(int, QProcess::ExitStatus) instead [-Wdeprecated-declarations] image/qpixmap.cpp:997:48: warning: ‘static QPixmap QPixmap::grabWidget(QObject*, const QRect&)’ is deprecated: Use QWidget::grab() instead [-Wdeprecated-declarations] text/qfont.cpp:2218:29: warning: ‘QString QFont::lastResortFamily() const’ is deprecated [-Wdeprecated-declarations] itemviews/qitemdelegate.cpp:1008:41: warning: ‘static QPixmap* QPixmapCache::find(const QString&)’ is deprecated: Use bool find(const QString &, QPixmap *) instead [-Wdeprecated-declarations] Change-Id: I51259edc175b1f55f61ded3af50ebfffd8c304a8 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | | Long live QColorSpace and friendsAllan Sandfeld Jensen2019-02-085-11/+213
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds QColorSpace and QColorTransform classes, and parsing of a common subset of ICC profiles found in images, and also parses the ICC profiles in PNG and JPEGs. For backwards compatibility no automatic color handling is done by this patch. [ChangeLog][QtGui] A QColorSpace class has been added, and color spaces are now parsed from PNG and JPEG images. No automatic color space conversion is done however, and applications must request it. Change-Id: Ic09935f84640a716467fa3a9ed1e73c02daf3675 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | QtGui: replace 0 with \nullptr in documentationChristian Ehrlicher2019-02-025-10/+10
| | | | | | | | | | | | | | | | | | Replace 0 with \nullptr in the documentation. As a drive-by also replace some 0 with nullptr in the corresponding code. Change-Id: Ieffbfffa76e3018257b667a3e8ad6e3b88486cde Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | QtGui/QPainter: mark obsolete functions as deprecatedChristian Ehrlicher2019-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark some long obsolete functions as deprecated so the can be removed with Qt6: - initFrom() - setMatrix()/matrix()/deviceMatrix()/resetMatrix() - setWorldMatrix()/worldMatrix()/combinedMatrix() - setMatrixEnabled()/matrixEnabled() - drawRoundRect() - setRedirected()/redirected()/restoreRedirected() Change-Id: I0daed72c0ef06c192309f02366a7201154e75ac9 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | QtGui: mark obsolete QPixmapCache::find() functions as deprecatedChristian Ehrlicher2019-02-023-7/+15
| | | | | | | | | | | | | | | | | | QPixmapCache::find(QString) and QPixmapCache::find(QString, QPixmap&) are deprecated since Qt4 times. Explicit mark them as deprecated so they can be removed with Qt6. Change-Id: Iaf185f69afe02203559a1c812fbb4a95c9049a1d Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | QtGui: mark some image functions as obsoleteChristian Ehrlicher2019-01-288-5/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark functions which were obsolete since Qt4 times as deprecated so they can be removed with Qt6: - QBitmap::transformed(QMatrix) - QImageIOHandler::name() - QImageWriter::setDescription() - QImageWriter::description() - QPixmap::fill() - QPixmap::grabWindow() - QPixmap::grabWidget() - QTransform::det() Change-Id: I8523065eb59a3242c4c4c195f31ae15c4dcbf8f7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-262-2/+2
|\| | | | | | | | | | | | | | | Conflicts: src/android/templates/AndroidManifest.xml tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Change-Id: I4c9679e3a8ebba118fbf4772301ff8fde60455b9
| * Merge remote-tracking branch 'origin/5.12.1' into 5.12Qt Forward Merge Bot2019-01-232-2/+2
| |\ | | | | | | | | | Change-Id: Icebd151eae0cf9d400319a42573290d1a911ce26
| | * bmp image handler: Reject invalid 0-dimension files earlyEirik Aavitsland2019-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid spending time on decoding attempt of invalid bmp files specifying height or width as 0. Change-Id: Ia6666088515eee54777f7154868fb7d07c6b4438 Done-with: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
| | * Merge remote-tracking branch 'origin/5.12' into 5.12.1Liang Qi2019-01-081-2/+5
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qtooltip.cpp Change-Id: Ic2f9a425359050eb56b3a4e5162cf5e3447058c8
| | * | Doc: Fix link in QImage::load() documentationTopi Reinio2019-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I9a3a059a860f5b21253ab0e7cdc616cbfc9a3885 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>