summaryrefslogtreecommitdiffstats
path: root/src/plugins/imageformats
Commit message (Collapse)AuthorAgeFilesLines
* Modernize setAlphaChannel(), and deprecated alphaChannel()Allan Sandfeld Jensen2020-01-051-2/+0
| | | | | | | | | | | | The two methods have been marked obsolete for a very long time, setAlphaChannel() is still convenient though, so this patch modernizes it and removes obsolete from the API, while marking QImage::alphaChannel() as deprecated. They don't work as getter and setter anyway, since setAlphaChannel() actually does an alpha composition. Change-Id: I634d6463f78c42bb9c5fa3df17500ec01bfcac33 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix unneeded use of QImage invertPixels and createAlphaMaskAllan Sandfeld Jensen2019-12-191-9/+2
| | | | | | | | The result of createAlphaMask was mostly overwritten and then inverted, we can write the right values directly instead. Change-Id: I3cdddcc74218a4058bddd20178733688607c8a01 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Tidy nullptr usageAllan Sandfeld Jensen2019-12-062-10/+10
| | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Deprecate constructing QFlags from a pointerAllan Sandfeld Jensen2019-11-203-5/+5
| | | | | | | | | This was used to support QFlags f = 0 initialization, but with 0 used as a pointer literal now considered bad form, it had been changed many places to QFlags f = nullptr, which is meaningless and confusing. Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* JPEG image handler: remove undefined behavior from setjmp/longjmpGiuseppe D'Angelo2019-10-111-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The JPEG writing code features a setjmp/longjmp pair to deal with error handling. In doing so, it creates UB by touching local objects after the setjmp and then after the corresponding longjmp. The rules on what we can do are quite strict: objects that are 1) local to the function calling setjmp; 2) not qualified with volatile; 3) written into after the setjmp; have indeterminate state after the corresponding longjmp call (man 3 longjmp, C 2x draft N2346 §7.13.2.1.2). Not making any assumptions on any compiler used: let's just say that using them in any way is UB. Luckily, no compiler exploits this (yet), and the code works just fine. But we know the drill -- never play this game against compilers, because you will lose. So: we have a couple of those objects around in the writing routine (cinfo, row_pointer), that violate the rules above. Unfortunately we can't simply mark them as volatile: libjpeg's API expects them not to be volatile. Casting volatileness away and then touching an object in any way is undefined behavior out of the bat (C 2x draft N2346 §6.7.3.7, C++ [dcl.type.cv]). Given the code needs to do 3), and we can't work around 2), then work around 1): define them to be non-local to the function doing the setjmp. Introduce a small helper that declares such objects and then calls the function doing the actual work, with the setjmp/longjmp. An overall alternative would be of course stop using setjmp/longjmp, but libjpeg's API doesn't really seem to allow this -- when the library calls user's error handler, that error handler is expected not to return to the library (so a longjmp or an exit/abort are mandatory). Side note: all the code using libjpeg I've researched to debug this has this very same strange issue: * GDK-pixbuf's [1] * ImageMagick's [2] * and even libjpeg's [3] and libjpeg-turbo's [4] own examples. [1] https://github.com/GNOME/gdk-pixbuf/blob/master/gdk-pixbuf/io-jpeg.c#L581 [2] https://github.com/ImageMagick/ImageMagick/blob/master/coders/jpeg.c#L2338 [3] https://www.ijg.org/ [4] https://github.com/libjpeg-turbo/libjpeg-turbo/blob/master/example.txt#L331 Change-Id: I34a810db468f73423478cd3ac71b888f4b11cb28 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* JPEG image handler: drop a use of "volatile"Giuseppe D'Angelo2019-10-111-2/+1
| | | | | | | | | | | | The reading code protects a local variable with volatile. In this case the only possible reason to apply volatile seems to be protecting the variable across the subsequent setjmp/longjmp. However, the variable is never accessed after the longjmp (the function returns). So, drop the volatile. Change-Id: Ibecb11a9edcc6027b2fd52b555287ad53375a5d0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Support writing color space profile in JPEGAllan Sandfeld Jensen2019-08-201-2/+27
| | | | | | | | That way the image formats with color space supports all have both read and write support. Change-Id: Ib52ebd56192c4a8a0897a6afc7c4a26020319270 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-106-1/+12
|\ | | | | | | | | | | | | | | Conflicts: src/corelib/time/qdatetime.cpp src/widgets/widgets/qcombobox.h Change-Id: Ib84352e8fe34aed2986a1c94e7346a46a71c803b
| * Fix compilation with disabled deprecated APIsSona Kurazyan2019-07-086-1/+12
| | | | | | | | | | | | | | | | | | | | | | The QImageIOHandler::name() has been deprecated since 5.13, but its overrides weren't. Enabled compilation of the overrides only when the QImageIOHandler::name() is compiled. Task-number: QTBUG-76491 Change-Id: I8fea0032427d25bb0de01be8920c723fc21f6b7a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-271-10/+14
|\| | | | | | | Change-Id: I1c9449ab064deed1367a7e5dbedfcb489f28140e
| * Fix artifacts when reading certain 32 bit ico filesEirik Aavitsland2019-04-251-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Images in an ico file contains transparency information stored as a 1 bit mask. However, when the depth is 32 bit, it means there is an alpha channel present, and the mask should be ignored. The Qt ico handler failed to do that. This has gone unnoticed, since the mask in such images is typically set to all 0s, and so makes no difference to the result. But ico files exist that contain junk mask data, so fix the reader to ignore it properly. Fixes: QTBUG-75214 Change-Id: I1b4456d71689ec783076a582f2fb215e7dc56e62 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Long live QColorSpace and friendsAllan Sandfeld Jensen2019-02-081-1/+13
|/ | | | | | | | | | | | | | | | | | 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>
* Fix build using Windows SDK 10.0.17763Thiago Macieira2018-12-071-6/+5
| | | | | | | | | | | | | c:\qt\qt5\qtbase\src\3rdparty\libjpeg\src\jmorecfg.h(242): error C2371: 'boolean': redefinition; different basic types c:\program files (x86)\windows kits\10\include\10.0.17763.0\shared\rpcndr.h(193): note: see declaration of 'boolean' Instead of trying to guess if a certain header has been #included and whether that header does typedef something to boolean, let's just use the preprocessor to hide, like some people do for X11/Xlib.h's Bool (see qmetatype.h where we refused). Change-Id: I05b8d7ba19004af99f3cfffd15693a87e175f05d Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* ico image handler: check for out of range image sizeEirik Aavitsland2018-12-031-0/+2
| | | | | | | | Make the decoder fail early to avoid spending time and memory on attempting to decode a corrupt image file. Change-Id: I598db817c387867a449040f5be5427c8b8746483 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-11-091-2/+2
|\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf qmake/Makefile.unix src/gui/text/qtextdocument.cpp src/gui/text/qtextdocument.h Change-Id: Iba26da0ecbf2aa4ff4b956391cfb373f977f88c9
| * Fix memory copy in QGIFFormat::disposePrevious()Andrew Smolko2018-11-061-2/+2
| | | | | | | | | | | | | | | | Fix invalid destination address in memcpy operation when RestoreImage disposal method is used. Task-number: QTBUG-71599 Change-Id: Ib74a044c0e45250ff708268c463f831ee54933e6 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-071-1/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/doc/src/objectmodel/signalsandslots.qdoc src/plugins/platforms/cocoa/qcocoamenuloader.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp tests/auto/gui/image/qimage/tst_qimage.cpp Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I9bd24ee9b00d4f26c8f344ce3970aa6e93935ff5
| * Check for QImage allocation failure in qgifhandlerEirik Aavitsland2018-08-061-1/+6
| | | | | | | | | | | | | | | | Since image files easily can be (or corrupt files claim to be) huge, it is worth checking for out of memory situations. Change-Id: I635a3ec6852288079fdec4e14cf7e776fe59e9e0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-07-021-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_dragging.mm src/plugins/platforms/ios/qiosinputcontext.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/tools/androiddeployqt/main.cpp Was moved from qttools into qtbase in 5.11. So re-apply 32398e4d here. tests/auto/corelib/global/qlogging/test/test.pro tests/auto/corelib/global/qlogging/tst_qlogging.cpp tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp tests/auto/corelib/thread/qthreadstorage/test/test.pro tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qapplication/test/test.pro Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Done-with: Oliver Wolff <oliver.wolff@qt.io> Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
| * Fix ico.json to avoid returning an empty mimetypeDavid Faure2018-06-221-1/+1
| | | | | | | | | | | | | | | | | | QImageWriter::supportedMimeTypes() had an empty mimetype name in the list because the mimetype for the key "cur" was missing in this json file. Change-Id: I4eae4275cb04c4d640dbcac76cd9dc99baa4f0a7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | QImage/Jpeg: decode/encode comment attributes as utf-8Christian Ehrlicher2018-03-181-3/+3
|/ | | | | | | | | | Although not defined, the jpeg comment field 'content' is treated as utf-8 nowadys. At least exiftool and exiv2 (tested via gwenview) are expecting utf-8 here. So we should do the same. Task-number: QTBUG-44709 Change-Id: If84dafac3e337c7993f09cd59792e721977c9adb Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Remove references to obsolete platformsJake Petroules2017-11-051-3/+0
| | | | | | | | | | | | | | ultrix and reliant have not seen a release since 1995. dgux not since 2001. bsdi not since 2003. irix not since 2006. osf not since 2010. dynix... unclear, but no later than 2002. symbian needs no mention. All considered obsolete, all gone. sco and unixware are effectively obsolete. Remove them until someone expresses a real need. Change-Id: Ia3d9d370016adce9213ae5ad0ef965ef8de2a3ff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Allow QImage with more than 2GByte of image dataAllan Sandfeld Jensen2017-07-081-2/+2
| | | | | | | | | | | | Changes internal data-size and pointer calculations to qssize_t. Adds new sizeInBytes() accessor to read byte size, and marks the old one deprecated. Task-number: QTBUG-50912 Change-Id: Idf0c2010542b0ec1c9abef8afd02d6db07f43e6d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move endian integers to qendian_p.hAllan Sandfeld Jensen2017-06-212-96/+33
| | | | | | | | | | The endian integers have more use than just in QJson, and is already used separately by QtDeclarative. This patch moves q_littleendian out of qjson_p.h and matches it with a corresponding q_bigendian, and puts it to use in simplifying endian handling in the ico image handler. Change-Id: I975bb701a089256db8ced3cb53b4bd62cdfb02dd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace Q_DECL_OVERRIDE with override in imageformatsJesus Fernandez2017-04-076-33/+33
| | | | | | Change-Id: I7280cdf674b2a202f9ef7ff2bb9b6732e09a5a76 Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8.0Liang Qi2016-12-081-10/+21
|\ | | | | | | Change-Id: I576187a9905802c177ae483e6c29d0f55cf7034d
* | Modularize configure.json/.priLars Knoll2016-09-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Move the different parts of configure.json/.pri into the libraries where they belong. Gui is not yet fully modularized, and contains many things related to the different QPA plugins. Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Change-Id: I6659bb29354ed1f36b95b8c69e7fce58f642053f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-08-291-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cf53aa21bf0f8fbd13c0ce2d33ddf7bc63d0d76a and 3aaa5d6b32130d3eeac872a59a5a44bfb20dfd4a were reverted because of reconstruction in 5.7. defineTest(qtConfTest_checkCompiler) in configure.pri is smart enough to cover the case in a9474d1260a8c8cc9eae14f2984098919d9684e5. DirectWrite: Fix advances being scaled to 0 Since 131eee5cd, the stretch of a font can be 0, meaning "whatever the font provides". In combination with ec7fee96, this would cause advances in the DirectWrite engine to be scaled to 0, causing the QRawFont test to fail. Conflicts: configure mkspecs/features/uikit/device_destinations.sh mkspecs/features/uikit/xcodebuild.mk src/corelib/global/qglobal.cpp src/corelib/global/qnamespace.qdoc src/plugins/platforms/cocoa/qcocoamenuitem.h src/plugins/platforms/windows/qwindowsservices.cpp src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp src/widgets/kernel/qapplication.cpp tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp Change-Id: I4656d8133da7ee9fcc84ad3f1c7950f924432d1e
* | Use qtConfig throughout in qtbaseLars Knoll2016-08-192-4/+4
| | | | | | | | | | | | | | | | | | | | | | Use the new qtConfig macro in all pro/pri files. This required adding some feature entries, and adding {private,public}Feature to every referenced already existing entry. Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | employ QMAKE_USE: LIBS += -lfooOswald Buddenhagen2016-08-191-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | this switches all instances of LIBS[_PRIVATE] += -lfoo where a config tests exists for foo. this removes some code duplication between tests and project files (in case of conditionals), and ensures that the projects always actually use the libraries configure has found. Change-Id: Ia7e80c8db5f329290c7f1a4e03a8bf78882a687e Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Make the ICO image format a configurable featureLars Knoll2016-08-181-1/+1
| | | | | | | | | | | | | | | | ... including a [-no]-ico command line option. Change-Id: I3cb13d2be72b512f72f8dcdb9de72e7a99e36e47 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Factor out qt_getImageText() and qt_getImageTextFromDescription()Anton Kudryavtsev2016-07-142-23/+4
| | | | | | | | | | | | | | ... and re-use them in QImageReader, QJpegHandler, QPngHandler. Change-Id: Iec89e47205f3c420e1e7eb4a2d3c1fbfe887fd8c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-231-5/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/wince80colibri-armv7-msvc2012/qmake.conf qmake/generators/win32/msvc_vcproj.cpp src/corelib/global/qnamespace.h src/corelib/global/qnamespace.qdoc src/corelib/io/qfsfileengine_win.cpp src/corelib/tools/tools.pri src/network/ssl/qsslconfiguration_p.h src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp src/plugins/platforms/windows/windows.pri src/src.pro src/tools/bootstrap/bootstrap.pro src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/dialogs/qfilesystemmodel.cpp tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt Change-Id: I4d2ac78f0dcc97f008186bbbc769c6fe588ab0e5
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-5/+5
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp src/network/access/qnetworkaccessmanager.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h src/widgets/widgets/qlineedit_p.cpp src/widgets/widgets/qlineedit_p.h src/winmain/winmain.pro tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp tools/configure/configureapp.cpp Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
| | * ICO image format: fix regression in writing when size >= 256Eirik Aavitsland2016-05-131-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit c6c9304, the earlier size limit of 128 was raised to the format's defined maximum of 256. But the required special storage of this size in the image structures was not implemented. Hence, attempting to store such big icons would result in invalid image files. Fix the size storing details, and add some autotests of ico format writing since that was practically uncovered. Task-number: QTBUG-53259 Change-Id: I00e17a04e90c32dcf1124ba5adaf53728fb74dc7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Always build JPEG and GIF support as pluginsLars Knoll2016-04-078-16/+2570
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our handling of plugins when Qt is build statically is nowadays good enough, so we don't need to build the JPEG and GIF support directly into Qt for static builds. Let's simply always build them as plugins. Also simplify the logic in configure, and get rid of the no-gif, no-jpeg and no-png config variables. [ChangelLog][Build system] JPEG and GIF image support is now always built as a plugin. Removed -imageformat-[jpeg|gif] arguments to configure. Change-Id: Ic01559ff406c966807b3be8761252e8802adcdf7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-113-12/+12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define and undef in src/corelib/tools/qsimd_p.h. This change is also squashed with "Fall back to c++11 standard compiler flag for host builds" which is done by Peter Seiderer. Conflicts: mkspecs/features/default_post.prf src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch src/3rdparty/sqlite/sqlite3.c src/corelib/tools/qsimd_p.h src/gui/kernel/qevent.cpp src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface_p.h src/plugins/bearer/blackberry/blackberry.pro src/plugins/platforms/cocoa/qcocoasystemsettings.mm src/plugins/platformthemes/gtk2/gtk2.pro src/plugins/styles/bb10style/bb10style.pro src/sql/drivers/sqlite2/qsql_sqlite2.cpp tools/configure/configureapp.cpp Task-number: QTBUG-51644 Done-with: Peter Seiderer <ps.report@gmx.net> Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-03-073-12/+12
| | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: Icbce502dcbcb4d4b4d922c42679f44e2cc930bf3 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-158-112/+160
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Fix maximum size of .ico files in ICOReader::write()Serge Lysenko2015-09-241-4/+6
| | | | | | | | | | According to MSDN, a maximum icon size is 256 pixels. http://blogs.msdn.com/b/oldnewthing/archive/2010/10/18/10077133.aspx Change-Id: Id87c89a20c9cba6ef041b49f93f84c5e9c3eb79f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
* Implement the QImageIOHandler::ImageFormat option for ico files.Serge Lysenko2015-09-231-4/+22
| | | | | | | | We need a method to check image format of .ico with QImageReader loader. That is very useful to filter out low resolution icons. Change-Id: I2dfe3aa49cbc1e05836be846ae3da30786b98ff4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Fix QImageReader::size() to return correct size for .ico files.Serge Lysenko2015-09-171-13/+8
| | | | | | | | | | | | | | According to MSDN, the zero value of ICONDIRENTRY bHeight and bWidth fields mean a maximum icon size 256 pixels. So QtIcoHandler::option() should return 256 instead of 0 pixels for such icons. Also there is fixed wrong seek offset at the second call on this method. http://blogs.msdn.com/b/oldnewthing/archive/2010/10/18/10077133.aspx Task-number: QTBUG-48103 Change-Id: I99f0c9720fd58889045b0c73c51498f2065b0b91 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-08-062-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/global/qt-cpp-defines.qdocconf src/3rdparty/forkfd/forkfd.c src/corelib/codecs/qtextcodec.cpp src/corelib/kernel/qmetatype.cpp src/corelib/tools/qset.qdoc src/gui/accessible/qaccessible.cpp src/gui/image/qpixmapcache.cpp src/opengl/qgl.cpp src/tools/qdoc/generator.cpp src/widgets/kernel/qwidget.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
| * fix build with no built-in image handlersOswald Buddenhagen2015-08-032-0/+2
| | | | | | | | | | | | | | | | | | | | the handlers' .pri files added $$PWD to INCLUDEPATH to make the files self-contained when used externally, but this polluted the include path of the gui module itself, thus hiding incorrect use of QPA includes. Task-number: QTBUG-47400 Change-Id: I576469a71e8ded0b409d62687999c0fa884613f9 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Replace #ifdefs with qmake feature checks.Ulf Hermann2015-06-226-24/+0
| | | | | | | | | | | | | | | | This prevents the building of dysfunctional plugins that don't define a loader function, or won't compile at all. Change-Id: Ib62edb8db4a8917effa05292cb702bb4022f552c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | QtIcoHandler: don't hold images in QListMarc Mutz2015-06-221-7/+9
|/ | | | | | | | | | | | | QImage is larger than a void*, so holding them in a QList is needlessly inefficient. Worse, the code could come to depend on the fragile property of (inefficient) QLists that references to elements therein never are invalidated. Also added a reserve() call. Change-Id: I36388f2efbc6ca025f123c30bc7f1dd312bf4ab2 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-03-311-1/+1
|\ | | | | | | | | | | | | | | | | Conflicts: mkspecs/android-g++/qmake.conf qmake/generators/unix/unixmake2.cpp src/gui/image/qimage_conversions.cpp Change-Id: Ib76264b8c2d29a0228438ec02bd97d4b97545be0
| * Fixes crash in bmp and ico image decodingEirik Aavitsland2015-03-131-1/+1
| | | | | | | | | | | | | | | | Fuzzing test revealed that for certain malformed bmp and ico files, the handler would segfault. Change-Id: I19d45145f31e7f808f7f6a1a1610270ea4159cbe Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | QPA plugins: Fix const correctness in old style castsThiago Macieira2015-03-091-1/+1
| | | | | | | | | | | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c946899b4ba15b Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Update copyright headersJani Heikkinen2015-02-118-56/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>