summaryrefslogtreecommitdiffstats
path: root/src/gui/image
Commit message (Collapse)AuthorAgeFilesLines
* Missing entry in QImage inplace_converter_mapAllan Sandfeld Jensen2013-11-151-0/+3
| | | | | | | | | The inplace_converter_map never had an entry for ARGB4444_Premultiplied this leads to the possibility of accessing outside of the array, and means the RGBA8888 formats are misplaced. Change-Id: Ida0d94912b53a7730b8fb5f6ccc31e7879ea3d27 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Improve documentation of QImageIOPluginAlex Merry2013-11-051-13/+27
| | | | | | | | | | Expanded the documentation to describe what the code in QImageReader and QImageWriter actually expects from these plugins. Change-Id: I04bb0cbf56d57a56ed246e723e533d73440a4d3a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Make error messages a bit better.Stephen Kelly2013-11-051-1/+1
| | | | | | Change-Id: I83b5852abfbb3437c03516bc4b36eff385ddb983 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Doc: Fix broken linksSze Howe Koh2013-11-051-1/+1
| | | | | | | | Task-number: QTBUG-33360 Change-Id: Ic944cb2f575c35ebad64852ef5fc44a50ac03571 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Assert in QImage conversion from rgba8888pm -> rgba8888Allan Sandfeld Jensen2013-10-311-1/+1
| | | | | | | Fix typo in assert. Change-Id: I7dc056957b31a869eabe2e45feb99ae4fccb2d97 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* QImageWriter: add a forgotten #ifndef QT_NO_IMAGEFORMAT_BPMMarc Mutz2013-10-251-0/+2
| | | | | | | The equivalent code in qimagereader.cpp has this, so add here, too. Change-Id: I0313727f009db5cb00ee9ce0540ba2674da49ccd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-0811-94/+94
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Add docs for rvalue references and move constructorsGeir Vattekar2013-09-274-0/+41
| | | | | | | | | These members were introduced in 4.8, but left undocumented. Because we consider undocumented API to be internal, the members are \since 5.2. Change-Id: I52e2840a8cfaa7f59f410b3e2a06c0942ea06539 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix WinCE/MSVC2008 build errors related to std::lower_bound patches.Sérgio Martins2013-09-251-0/+5
| | | | | | | See QTBUG-33473 for more information about this compiler bug. Change-Id: I13b945350fdc38165c1515f0cdd75a53cf37cd6c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix truncation and conversion warnings on MSVC2010.Mitch Curtis2013-09-251-2/+2
| | | | | Change-Id: I44845e13b97753333a7c80a80ead0b352b8906b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove some qBinaryFind usages from QtGuiGiuseppe D'Angelo2013-09-231-2/+4
| | | | | | | | This is done per the mailing list discussion at http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I9cbb1790f94e7726e127b9ad1bd5a58c433055a8 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Remove a Borland-related inclusionGiuseppe D'Angelo2013-09-231-5/+0
| | | | | | | There are no calls to qSort in the file any more. Change-Id: Ifd65b543941ab90d6a1ed4e318d925bdbf3f454e Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Merge "Merge branch 'stable' into dev" into refs/staging/devSergio Ahumada2013-09-211-7/+17
|\
| * Merge branch 'stable' into devSergio Ahumada2013-09-211-7/+17
| |\ | | | | | | | | | Change-Id: I37d85631ab1165ab91457d8880c4da907a9df73b
| | * PNG: properly handle 1bpp greyscale images with alphaGiuseppe D'Angelo2013-09-181-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PNG allows 1bpp greyscale images (PNG_COLOR_TYPE_GRAY) to have an alpha key; so even in this case we need to inquiry if the image has a transparency, and if so modify the color table of the monochrome image accordingly. Task-number: QTBUG-33503 Change-Id: Iab07c8f95ac8865269c48816e222645cdcb6bbc1 Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com> Reviewed-by: aavit <eirik.aavitsland@digia.com>
| | * Add missing initialization before requesting png data for scaled readSamuel Gaist2013-09-181-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize all values read to sensible default in case reading them fails in read_image_scaled. It has already been done for a normal image read Task-number: QTBUG-32674 Change-Id: I19dccad7ef342f1b1bba6b513c04d3661d128a54 Reviewed-by: aavit <eirik.aavitsland@digia.com>
* | | Fix some doc errors.Frederik Gladhorn2013-09-214-4/+4
|/ / | | | | | | | | | | | | Change-Id: Ib874d7e9671d9cee75fe41f4dac5d0de7b09245e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | WinRT: Basic global supportAndrew Knight2013-09-201-1/+1
| | | | | | | | | | | | | | | | Various global changes, primarily preprocessor flow, to support the WinRT platform. Change-Id: I3fa9cf91d5fb24019362e88fcf205e31b4f810b5 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* | Merge branch 'stable' into devSergio Ahumada2013-09-131-23/+6
|\| | | | | | | | | | | | | | | Conflicts: src/concurrent/qtconcurrentmedian.h src/corelib/itemmodels/qabstractitemmodel.cpp Change-Id: Iac46a90bbb2958cef7670031a4b59c3becd8538a
| * Compilation fix for libjpeg release 9aavit2013-09-111-23/+6
| | | | | | | | | | | | | | | | | | | | | | | | In the latest libjpeg version, the "boolean" type is changed so that true and false no longer can be used instead of TRUE and FALSE. Also, purge some ancient code remains meant to support a now defunct OS´s idea about the boolean type. Task-number: QTBUG-33166 Change-Id: Iebbdf300cfdc22775954de65f985358424ed2b49 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-071-8/+8
|\| | | | | | | Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
| * Initialize variables to fix valgrind warning in pnghandler.Friedemann Kleint2013-08-301-8/+8
| | | | | | | | | | | | | | | | | | Conditional jump or move depends on uninitialised value(s) ==7986== at 0x5B838E8: QPngHandlerPrivate::readPngImage(QImage*) (qpnghandler.cpp:617) Change-Id: Ie739ca1665ce600426e2816a6229145d814125cb Reviewed-by: aavit <eirik.aavitsland@digia.com>
* | Remove deprecated QtAlgorithms calls from QtGuiGiuseppe D'Angelo2013-09-053-5/+11
| | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I324ddf6129fe8884ecea97ef47abb7c071dfb34c Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | qimagereader: fix build on iOSRichard Moe Gustavsen2013-09-051-1/+1
| | | | | | | | | | Change-Id: Ia928e449ecec49988e0af69da0a7aded5bf36871 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | Fix qt_pixmapToWinHICON() not to return invalid HICON for null pixmapsJ-P Nurmi2013-09-041-0/+3
| | | | | | | | | | | | Change-Id: Ieda923bf27514a3daa8a5de7836511ab32346260 Reviewed-by: Ivan Vizir <define-true-false@yandex.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-141-1/+17
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-xcode/Info.plist.app mkspecs/macx-xcode/Info.plist.lib qmake/doc/qmake.qdocconf src/corelib/global/qglobal.h tests/auto/other/exceptionsafety/exceptionsafety.pro tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
| * Add offset reading support in pnghandlerSamuel Gaist2013-08-071-1/+17
| | | | | | | | | | | | | | | | | | This patch adds the offset reading that matches the offset writing in writeImage Task-number: QTBUG-32674 Change-Id: I264ba41163e59638d7219e0a8913f9d455830883 Reviewed-by: aavit <eirik.aavitsland@digia.com>
* | Support RGBA image formatAllan Sandfeld Jensen2013-07-236-34/+669
| | | | | | | | | | | | | | | | | | Support the byte-ordered RGBA format which is used by OpenGL, and many endian neutral byte formats. Task-number: QTBUG-32201 Change-Id: I77cffb4c30c69545fa96ded2f537b2ebd9351acb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* | Merge branch 'stable' into devSergio Ahumada2013-07-112-3/+3
|\| | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
| * QIcon: Avoid fetching twice the same pixmapGabriel de Dietrich2013-07-011-1/+1
| | | | | | | | | | | | | | | | | | Looks like something went through the reviewer's eyes. This commit amends 6ec9b34cbb5fa6b1214cc6551002f46f732ba72f. Change-Id: I59a05361b1cbdf4e5177821d958766ffe3218f16 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * Fix build when QIMAGEREADER_DEBUG is enabled in qimagereader.cppKeonil Jeong2013-07-011-2/+2
| | | | | | | | | | | | | | | | | | If QIMAGEREADER_DEBUG is enabled in qimagereader.cpp, the build fails. There are wrong variables in qimagereader.cpp:314,395 Change-Id: I22498c49fbfecb3799dc5cabf374486bb715ded7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-204-14/+14
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp tools/configure/configureapp.cpp Change-Id: I3092bd3276af14304b7ab3ae1e1cc05d11cdede0
| * Remove use of 'register' from Qt.Stephen Kelly2013-06-174-14/+14
| | | | | | | | | | | | | | | | | | | | It is deprecated and clang is starting to warn about it. Patch mostly generated by clang itself, with some careful grep and sed for the platform-specific parts. Change-Id: I8058e6db0f1b41b33a9e8f17a712739159982450 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-05-231-11/+4
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qdatastream.cpp src/corelib/io/qdatastream.h src/corelib/json/qjsonwriter.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbkeyboard.cpp Change-Id: I46fef1455f5a9f2ce1ec394a3c65881093c51b62
| * Doc: remove references to toWinHBitmap and fromWinHBitmapNico Vertriest2013-05-131-11/+4
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-30738 Change-Id: I5a33493b37488b3ac4f5a499e5c5aa22e4e277f4 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-04-292-4/+10
|\| | | | | | | Change-Id: I2a54058b64ac69c78b4120fdaf09b96e025a4c6c
| * Fixed crashes relating to SVG icons.Samuel Rødal2013-04-242-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Creating a second QFactoryLoader for the same plugins seems to trigger an unload of the plugins loaded by the first factory loader. The QIconEngine created by the SVG icon plugin thus gets an invalid virtual table pointer, which causes a crash when attempting to call any virtual function in the QIconEngine (pixmap(), the virtual destructor, etc). Reusing a single QFactoryLoader instead fixes the crash. Task-number: QTBUG-30496 Change-Id: I80c5fa8b52ab9b0db68499f8c37fad14a1ac4f3c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-04-266-8/+21
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-04-226-8/+21
| |\| | | | | | | | | | Change-Id: I059725e3b7d7ffd5a16a0931e6c17200917172b5
| | * Actually set devicePixelRatio on copy.Morten Johan Sørvig2013-04-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Followup to 7b9d4531 - the second part refactors to call setDevicePixelRatio but the call itself was left out. Change-Id: I3e36452603fe1d7d53fa1a74d87169efea1c2e78 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| | * Make qtbase compile with QT_NO_IMAGEFORMATPLUGINTasuku Suzuki2013-04-152-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | qfeatures.h re-generated from qfeatures.txt because QT_NO_IMAGEFORMATPLUGIN was missing Change-Id: I1c9291529ec07f83f99c9cd08340cbfebda609b6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| | * Add devicePixelRatio metric to QPaintDevice.Morten Johan Sørvig2013-04-154-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously QPainter computed the devicePixelRatio based on the physical and logical dpi, and expected that the ratio between them would be either 1x or 2x. This was problematic for paint devices like printers where the physical dpi can be much higher than the logical dpi, and also for QScreen where the physical dpi would have to be defined as a multiple of the logical dpi. Add QPaintDevice::PdmDevicePixelRatio and QPaintDevice:: devicePixelRatio() getter and implement it for the QPaintDevice subclasses. Use it when calculating the highdpi scale transform in qpainter.cpp and when scaling the clip rect in qwidget.cpp. Remove physical dpi scaling for QImage, QPixmap and QOpenGLPaintDevice, reverting to the old behavior. Change-Id: I6c97510613196d4536ff39d08e9750b8782283d4 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | | Make sure QIconLoader is always initializedKevin Ottens2013-04-222-8/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is necessary to properly initialize the icon loader in all case. Otherwise some calls might give wrong results if a platform theme plugin is involved. For instance, we might miss the actual theme name reported by the platform theme, eg it's what happen with QStyle::standardPixmap if no one created a QIcon before its first call. Also clean up the accesses to the global static and have only QIconLoader::instance() use it. All other call go through the static method. This way only instance() needs to call ensureInitialized(), definitely safer and looks cleaner to me. Change-Id: Id3ea6816edd5a65586004f69464960abc3602cf8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QIcon: Added a move constructor.Keith Gardner2013-04-081-0/+4
| | | | | | | | | | Change-Id: Idedb935352bf8a0cd7d4293f7b8530d5b9b17616 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QImage: Added a move constructor.Keith Gardner2013-04-081-0/+5
|/ | | | | | | [QTBUG-30517] Change-Id: I173de783ef8113ab10fb553cc82ef60904a15400 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix missing devicePixelRatio propagation on copy.Morten Johan Sørvig2013-03-292-3/+6
| | | | | Change-Id: I0cb541fe8a92b7a7c159e0a6e5036baf43185a93 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Load "@2x" images on high-dpi "retina" systems.Morten Johan Sørvig2013-03-281-0/+11
| | | | | | | | | Check for the existence of a "@2x" file when adding an image to QIcon. For example, adding "foo.png" will also add "foo@2x.png" if that file exists. Change-Id: If32a3446cf56ca0828de17f6a361091e4c874f26 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Make QIcon generate high-dpi pixmaps.Morten Johan Sørvig2013-03-233-7/+117
| | | | | | | | | | | | | | | | | | | | | | QIcon::pixmap() can now return pixmaps that are larger than the requested size, This is a behavior change that may require updating existing application code, and is enabled by setting Qt::AA_UseHighDPIIamges. Add new pixmap() and actualSize() overloads that take a window pointer. For 100% correctness you want to target pixmap generation to a specific window, in case the system has a mix of normal and high-dpi displays. (The non-window versions uses QGuiApplication:: devicePixelRatio(), which returns the ratio for the "best" display on the system.) actualSize now returns the size in device-independent pixels - not the pixmap pixel size. This matches its intended use case which is layout calculations. Change-Id: I2eefc4ed4aa48b036a7019446694e56213070efa Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Merge branch 'dev' into stableOswald Buddenhagen2013-03-2024-101/+154
|\ | | | | | | | | | | | | | | | | | | | | | | This starts Qt 5.1 release cycle Conflicts: src/gui/text/qfontdatabase.cpp src/gui/text/qharfbuzz_copy_p.h src/widgets/kernel/qapplication.cpp src/widgets/kernel/qcoreapplication.cpp Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
| * Make sure that we #include qconfig.h before testing for features.Thiago Macieira2013-03-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | This is mandatory in public headers (qiodevice.h, qopengl*, etc.), but it's a good idea even in private headers, in case someone includes that header first somewhere. In particular, all platformsupport API is private. Change-Id: If287baa5d9ed14e93c1666efa0e6332c4c1cd9a4 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>