summaryrefslogtreecommitdiffstats
path: root/src/gui/image
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Generalize image file name @2x suffix handling to higher scale factorsEirik Aavitsland2019-06-141-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | @3x is in use on iOS already, so extend the handling in QImageReader to all single-digit factors, like QIcon does. Fixes: QTBUG-76273 Change-Id: Ic9442731c0549dbe8f797e1ddb1a09d8447e8441 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | Port from QAtomic::load() to loadRelaxed()Giuseppe D'Angelo2019-06-204-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Semi-automated, just needed ~20 manual fixes: $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} + $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} + It can be easily improved (e.g. for store check that there are no commas after the opening parens). The most common offender is QLibrary::load, and some code using std::atomic directly. Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Convert uses of QTime as a timer to QElapsedTimerEdward Welbourne2019-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2297f61efa5adf9ea5194c7f3ff68574cbcf452c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Remove a few usages of deprecated APIShawn Rutledge2019-06-131-1/+2
| | | | | | | | | | | | | | | | | | Change-Id: I94bad0b8d3891c6b4a55178836cfff2a4312e330 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-05-132-3/+3
|\ \ \ | | |/ | |/| | | | | | | | | | | | | Conflicts: src/corelib/tools/qstring.cpp Change-Id: I81dbf90fc936c9bf08197baefa071117bddb1c63
| * | Doc: replace even more null/0/nullptr with \nullptr macroChristian Ehrlicher2019-05-082-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Try to replace all wordings like '.. to 0' with '.. to \nullptr'. Also checked for 'null pointer' and similar. Change-Id: I73341f59ba51e0798e816a8b1a532c7c7374b74a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Compile with Qt 6Lars Knoll2019-05-021-0/+2
| | | | | | | | | | | | | | | Change-Id: Ie45f4dc6d44723c8992872e6c4c2e30d7257ca0c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Prefix textstream operators with Qt::Lars Knoll2019-05-023-7/+7
| | | | | | | | | | | | | | | | | | | | | As the non prefixed variants are deprecated Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Remove handling of missing =delete and =default supportAllan Sandfeld Jensen2019-05-021-1/+1
| | | | | | | | | | | | | | | Change-Id: I006dfd0b7cfa3bda5e5ab01bcefa851f031dfe0e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Remove handling of missing Q_COMPILER_RVALUE_REFSAllan Sandfeld Jensen2019-05-015-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | Remove remaining handling of missing support for rvalue refs. Change-Id: I78bab8bccfeeb9c76f464f345874364a37e4840a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QRegExp include cleanupSamuel Gaist2019-04-193-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRegExp includes can be found in several files where there's not even a use of the class. This patch aims to avoid needless includes as well as follow the "include only what you use" moto. This patch removes a QRegExp include from the QStringList header which means that there is likely going to be code breaking since QStringList is used in many places and would get QRegExp in. [ChangeLog][Potentially Source-Incompatible Changes] qstringlist.h no longer includes qregexp.h. Change-Id: I32847532f16e419d4cb735ddc11a26551127e923 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | 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>