summaryrefslogtreecommitdiffstats
path: root/src/gui/image
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-191-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/windows/qwindowscontext.cpp src/plugins/platforms/windows/windows.pri src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/doc/src/widgets-and-layouts/gallery.qdoc Change-Id: I8d0834c77f350ea7540140c2c7f372814afc2d0f
| * Fix QImageReader::supportedSubTypes()Eirik Aavitsland2017-06-071-1/+1
| | | | | | | | | | | | | | | | | | Because of inverted test logic, this function would always return an empty list. Task-number: QTBUG-61048 Change-Id: If1529f2c567069ab4b672f309268b4edaf84c42f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-073-11/+6
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
| * Convert features.movie to QT_[REQUIRE_]CONFIGStephan Binner2017-05-293-11/+6
| | | | | | | | | | Change-Id: I838c7305d4649f953c5bb972f1aa51dbb078afe2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Optimize conversion from unpremultiplied to opaque formatsAllan Sandfeld Jensen2017-05-221-4/+23
| | | | | | | | | | | | | | | | | | Save unnecessary premultiply and unpremultiplication when converting from an unpremultiplied format like ARGB32 to any opaque format like RGB32 or RGB16. Change-Id: I73f58200ff5c62fb07910e6f2b1c29b7e254d327 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-073-5/+8
|\| | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
| * QIconLoaderEngine: Fix actualSize() for no-entryPalo Kisa2017-05-031-1/+4
| | | | | | | | | | | | | | | | | | Return an empty size if no suitable entry found to avoid mismatch with the returned pixmap()'s size (the QIconEngine::actualSize() returns the originally requested size). Change-Id: Ia278719a54392b62c5f9fc0529476baba5cd7df0 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Doc: Fix references to QIconEngineV2 and QIconEnginePluginV2Aaron Linville2017-04-281-3/+3
| | | | | | | | | | | | | | | | Fix a few lingering doc references to the old classes. Task-number: QTBUG-59815 Change-Id: Ia6b406485260c943b018422aaeb8e22ca4406e81 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * Fix typo in QRasterPlatformPixmap::metric()Laszlo Agocs2017-04-201-1/+1
| | | | | | | | | | | | Task-number: QTBUG-60132 Change-Id: I1f0ad7babf16800d3acdf579db6abd6854e1ed76 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | QtBase: use new QStaticByteArrayMatcher where applicableMarc Mutz2017-04-241-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even for compilers that don't yet support C++14 constexpr, this should improve performance of searches a lot, if, indeed, Boyer-Moore still is an optimization over linear searching at all in these days of hardware prefetchers and deep CPU pipelines, because the setup cost is only incurred once. As function-statics, we also don't care about startup ordering and cost. It's a pity that the platform that would benefit the most - Windows - doesn't have constexpr support, yet. Change-Id: I827df135854fd6fbd6546e248dc37ef0fbaf1792 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | xcb: Add experimental legacy support for native X11 paintingLouai Al-Khanji2017-04-211-2/+3
| | | | | | | | | | | | | | | | | | | | This commit revives the old native QPixmap and QPaintEngine implementations that were present in Qt4. The backing store supports regular raster windows in this commit. Support for render-to-texture widgets and OpenGL compositing will be added in a follow-up commit. Change-Id: I80a9c4f0c42a6f68f571dfee930d95000d5dd950 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-203-8/+8
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.h src/corelib/tools/qdatetime.h src/corelib/tools/qstring.h src/corelib/tools/qversionnumber.h src/plugins/platforms/android/qandroidplatformintegration.cpp tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp Change-Id: Iefd92a435e687a76cd593099e40d9a9620a1454d
| * Move Q_REQUIRED_RESULT to its correct positionThiago Macieira2017-04-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | That's before the return type or static, inline, constexpr or such keywords (if any). Perl Script: s/^(\s+)(.*) Q_REQUIRED_RESULT(;)?(\s*\/\/.*)?$/\1Q_REQUIRED_RESULT \2\3\4/ Change-Id: I7814054a102a407d876ffffd14b6a16182f159e2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * Doc: Fix link errorsNico Vertriest2017-04-191-1/+1
| | | | | | | | | | | | | | | | qimage.cpp:2127: warning: Can't link to 'isDetached()' qmatrix4x4.cpp:1933: warning: Can't link to 'operator()()' Change-Id: I93a2ead9650faf139040173f8d3b24cfa1e730ae Reviewed-by: Martin Smith <martin.smith@qt.io>
| * Fix PNGs saved from QImage transform of 8-bit imagesAllan Sandfeld Jensen2017-04-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | Fixes two separate errors. QImage::transform was incorrectly adding colors to the color-table of the returned image when the converted image would not be indexed, and qpnghandler was looking at non-empty color- table instead of color format. Task-number: QTBUG-43708 Change-Id: Ife14b6428ca65ac7d3a0b36a89a73e56d64586b4 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * Doc: add missing specs about parametersNico Vertriest2017-04-181-1/+1
| | | | | | | | | | | | | | | | | | qopengltexture.cpp:3476: warning: Undocumented parameter 'layerCount' in QOpenGLTexture::setCompressedData() and QOpenGLTexture::setData() qimage.cpp:2127: warning: Undocumented parameter 'format' in QImage::reinterpretAsFormat() Change-Id: I17feb2256a29f3bb722d2de3a83b390abff85a35 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QMovie: Add lastError and lastErrorString gettersRobin Burchell2017-04-142-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | QMovie has an error signal, but it is not possible for users to "catch" all errors, for instance, if they occur at construction time, and furthermore, it may not be convenient to add interception of the signal just to find out what the error was. [ChangeLog][QtGui][QMovie] Added lastError and lastErrorString accessors, as a convenience over connecting to the error() signal. Change-Id: I9c6ef70694c67986ecd30b5dc1b321c4dfa5c315 Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
* | QMovie: Make sure to pass on QImageReader errors when they occurRobin Burchell2017-04-141-3/+18
| | | | | | | | | | | | | | | | If a file cannot be opened for some reason (like running out of FDs), emit the error signal. Change-Id: I9586dda34b2f2cef73593c6dcb855b29d63c2dbc Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-073-5/+6
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/linux-icc/qmake.conf mkspecs/macx-icc/qmake.conf mkspecs/win32-icc/qmake.conf src/gui/painting/qgrayraster.c Change-Id: Ib08c45ea3215be05f986ecb3e1f4b37d209aa775
| * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-062-4/+4
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp src/platformsupport/fontdatabases/freetype/qfreetypefontdatabase.cpp src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp src/widgets/widgets/qtabbar.cpp Change-Id: Iaa9daee5f7a6490d56257a3824730a35751ceb05
| | * qbmphandler fix: use qint64 for caching QIODevice file positionHendrick Melo2017-04-042-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed the file position and offset types so they can properly handle files larger than the 32bit limit Task-number: QTBUG-59493 Change-Id: I00e1741c7682c4c79f35fef808fe1ea26e67c8b5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Hendrick Melo
| * | No divide by zero if all imageformat features are disabledStephan Binner2017-04-041-1/+2
| | | | | | | | | | | | | | | | | | Change-Id: Ib3e8a4b62ae627bc3dc8541767dafff4e493d2f8 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-281-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro tests/auto/corelib/tools/qchar/tst_qchar.cpp tests/auto/other/qaccessibility/accessiblewidgets.h Change-Id: I426696c40ab57d14dc295b8103152cede79f244c
| * | xbm image format: avoid uninitialized pixels for truncated dataEirik Aavitsland2017-03-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xbm bitmaps are conventionally accepted as valid even if there is not enough data to fill the declared bitmap size: both ImageMagick and GIMP do this. Qt did too, but the uncovered areas would be uninitialized, and thus contain random junk bits. This commit adds clearing of the full QImage data. Task-number: QTBUG-54169 Change-Id: I84150d54d07dbd546a4947e7ec332f83f2d7ca41 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | QImageReader: Pass up information about resource errors on openRobin Burchell2017-03-221-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a system runs out of FDs, there is no sense in trying to autodetect the format - as the real problem is the lack of FDs, not the non-existent file. Change-Id: I3302340859c3cc62995ac1b7b3c7b6e6326cb43e Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-202-7/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemengine_win.cpp src/gui/text/qdistancefield.cpp src/plugins/platforms/xcb/qxcbconnection.h Change-Id: I1be4a6f440ccb7599991159e3cb9de60990e4b1e
| * | Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Liang Qi2017-03-131-7/+0
| |\ \
| | * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-131-7/+0
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| | | * Don't call releaseKey a second time if the insertion failsAndy Shaw2017-03-071-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the insertion into the cache fails then it will delete the entry for us which already calls releaseKey(). So we should not call it a second time. Task-number: QTBUG-58259 Change-Id: I816c6f29ef97fe3a245f145c4faf1e0649f72dc5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | | xpm image format: Reject corrupt images with invalid header infoEirik Aavitsland2017-03-131-0/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | The xpm handler did not properly check that the information read from the file header was sane. Task-number: QTBUG-59211 Change-Id: I84099777a16b2b0c473d139f5fdec1d0cb5d515e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | QPixmap: move mask functions into QPlatformPixmapLouai Al-Khanji2017-03-173-69/+81
| | | | | | | | | | | | | | | | | | | | | | | | These used to be in QPixmapData in Qt4, allowing platforms to override mask handling. Useful when native 32-bit ARGB might not be available. Change-Id: I1fcb77222ee4bc4705a8b4c614c9d5c3938c47ba Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-143-30/+67
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/widgets/qpushbutton.cpp Change-Id: I615de00e6e64540c50f658d4d8ab3e002d701a81
| * | Gui: Replace LGPL21 with LGPL license headerKai Koehne2017-03-031-14/+20
| | | | | | | | | | | | | | | | | | | | | Also use canonical contact url. Change-Id: Ic0bf112998707844eb0c2853d7516b76f4d5afa8 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
| * | Fix grammar in QIcon docsMitch Curtis2017-03-021-2/+2
| | | | | | | | | | | | | | | Change-Id: I170662de5dde32a913acc5b681c2d2cefcb51a70 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * | ppm/pgm image formats: fix reading 16bit and limited rangeEirik Aavitsland2017-03-021-14/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The color values of ppm and pgm images can be either 8 or 16 bits. They can also be scaled to a smaller max value, and they can be expressed either binary or ascii. For some of these permutations, Qt's image handler lacked implementation or would decode the wrong color value. This commit fixes that. Task-number: QTBUG-18262 Task-number: QTBUG-35990 Change-Id: I7cf11c2366244f3a9b31c1a565a81e2658bc6a51 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-021-12/+22
|\| | | | | | | | | | | Change-Id: I84097f8e7b3b2128028bd7693c913d6968b82bfe
| * | QImageReader: remove some unneeded relocationsMarc Mutz2017-02-241-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace an array of pairs of pointers with an array of pairs of arrays. Remove the unused end marker. Add a static_assert to verify that the size of the array matches the constant all loops use. Also extract the common part of the mime-type name and append it when building a QByteArray from it. This is free, as both the new QStringBuilder expression as well as the old construction from a const char * incur one memory allocation each. Replace one indexed loop with ranged-for. Results on optimized GCC 6.1.1 Linux AMD64 builds: text -96B data -160B relocs -16 Change-Id: Ic23eb06bacbf70afb6f60e2fb8a140bdd3880aca Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-02-281-1/+1
|\| | | | | | | | | | | Change-Id: I7d84cfed0b2a122d334b8a920e6e4f18472d2f11
| * | QtGui: port the last remaining Q_FOREACH loops and add QT_NO_FOREACHMarc Mutz2017-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Port the last two remaining Q_FOREACH users in QtGui to C++11 range-for and mark the library as Q_FOREACH -free, using QT_NO_FOREACH. Change-Id: Ie6c5eea0af4227af6ef3dc0b4da2cf62e09d8b52 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | QImageWriter: Detect failure due to trying to write a QImage()Robin Burchell2017-02-272-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not a bug in QImageWriter, but caller code. We should be explicit about what the problem was so it can be fixed. [ChangeLog][QtGui][QImageWriter] Add QImageWriter::InvalidImageError to communicate invalid attempts to write a bad QImage (for instance, a null QImage). Change-Id: I0333b8263f1da1c672bed17dab48bfd6cafe41a2 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Export QIconLoaderEngine::entryForSize() for QQuickIconImageJ-P Nurmi2017-02-232-8/+9
|/ / | | | | | | | | | | | | | | | | Let QQuickIconImage re-use entryForSize() so it can easily choose the appropriate icon without re-inventing the wheel. Change-Id: I88c7e058113b2fb5a864578d8c66f99f61b4eac3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Use static initialization for QBasicAtomicsMarc Mutz2017-02-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | A default-constructed static QBasicAtomicInt at function scope will be dynamically initialized. It will still be zero-initialized, but at least GCC adds guard variables for such objects. When using aggregate initialization, the guard disappears. Amends 04d6495bf773a6bb0d4fa6980df22d3b81a605b0. Change-Id: Id9335cffdd43094cafb231fdde2523d013abe1d6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make some atomic counters zero-basedMarc Mutz2017-02-152-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A variable of static storage duration that is not zero-initialized takes up space in the DATA segment of the executable. By making the counters start at zero and adding the initial value afterwards, we move them over to the BSS segment, which does not take up space in the executable. Wrap atomics used across function boundaries into small functions, to avoid code duplication and to increase readability. Change-Id: Ida6ed316ecb8fe20da62a9577161349e14de5aed Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | qimage_conversions.cpp: keep shared copies of gray and alpha color tablesMarc Mutz2017-02-131-19/+20
| | | | | | | | | | | | | | | | | | | | Since QVector is implicitly shared, don't re-generate the same two color tables all over again, but create them once and keep them around in a Q_GLOBAL_STATIC. Change-Id: I9a8d32021d8cc327264f2818a23beaae67fe3ee8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-083-12/+16
|\| | | | | | | | | | | | | | | Conflicts: configure.json mkspecs/win32-icc/qmake.conf Change-Id: Ibf40546b024d644c7d9ed490bee15b82597f4d3f
| * Doc: link issue and qdoc error on parameterNico Vertriest2017-02-071-2/+2
| | | | | | | | | | | | | | | | - No such parameter 'image' in QImage::toCGImage() - Can't link to 'toNSImage() Change-Id: Ida559fb1211d1e196d9a9a50d97566124e82eb2f Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * PNG image handler: Avoid "invalid distance too far back" errorEirik Aavitsland2017-01-311-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For certain slightly miscoded png images, newer versions of libpng will trigger the mentioned zlib error and fail to read the image. This miscoding has until now been safely ignored by all png implementations, so such images exist in the wild, and users expect them to work. Since the cost of the workaround is only a missed opportunity of a tiny saving in memory usage during decoding, enable it. Task-number: QTBUG-58171 Change-Id: I820a9faef6d5b7af79c04404ebdceb48a096f29a Reviewed-by: André Klitzing <aklitzing@gmail.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Fix MIPS DSP configurationAllan Sandfeld Jensen2017-01-271-10/+8
| | | | | | | | | | | | | | | | | | The patch fixes a number of bugs in code, and removes dead logic clarifying that MIPS DSP, like ARM NEON, has no runtime detecton. Change-Id: If2f4eea68da5b2eaa80b8e9c8258206d8c1b7173 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QRasterPlatformPixmap::createPixmapForImage(): preserve DPRFriedemann Kleint2017-02-061-2/+0
| | | | | | | | | | | | | | | | | | | | Remove the line setting the DPR from the source; the image is moved. Task-number: QTBUG-58653 Task-number: QTBUG-58645 Change-Id: I2de94681459dba1d69dee06da44617fb9fa35bcc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'gerrit/dev' into HEADOswald Buddenhagen2017-02-013-18/+11
|\ \