summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/image
Commit message (Collapse)AuthorAgeFilesLines
* QPixmap don't assume QPlatformScreen::format is opaqueJohan Klokkhammer Helsing2018-03-191-14/+0
| | | | | | | | | | | | | | | | | | | QRasterPlatformPixmap::systemOpaqueFormat returned QPlatformScreen::format without checking that the format was actually opaque. This caused several QPixmap tests to fail on Wayland because Wayland compositors don't communicate the native format of the screen, just a list of supported pixel formats, so we just return ARGB32_premultiplied in QWaylandScreen::format(). Rename the method systemOpaqueFormat to systemNativeFormat since that's how it's used most of the time. And do a conversion when we actually care whether the format is opaque or not. Task-number: QTBUG-51748 Change-Id: I47dc1c3f185fb802016ca361206d47d02e8d3cf1 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Skip failing tests in tst_QPixmap on WaylandJohan Klokkhammer Helsing2018-03-121-0/+14
| | | | | | Task-number: QTBUG-66846 Change-Id: I61bd3e59e51fd1d988a30b6454a6a90650a3069b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-151-0/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/corelib.pro src/corelib/global/qrandom.cpp src/network/access/qhttpnetworkrequest_p.h src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/cocoa/qcocoansmenu.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/offscreen/qoffscreenintegration.h src/widgets/kernel/qaction.cpp src/widgets/widgets.pro Done-with: Andy Shaw <andy.shaw@qt.io> Change-Id: Ib01547cf4184023f19858ccf0ce7fb824fed2a8d
| * Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into ↵Liang Qi2018-01-243-3/+3
| |\ | | | | | | | | | refs/staging/5.10
| | * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-243-3/+3
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qrandom.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: Icc10543a1f2db5d640d01796bfec70a63517a6b2
| * | | Fix a crash when QMovie::speed is set to 0Val Doroshchuk2018-01-241-0/+10
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Setting speed to 0 means the current frame will continue to be shown, the finished signal is not emitted, and state remains QMovie::Running. Task-number: QTBUG-65758 Change-Id: I681d902e3211c5899b21043e5177b7c73d5d3fb5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-143-3/+3
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/animation/qvariantanimation.cpp src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/corelib/io/qprocess_win.cpp src/corelib/json/qjsonarray.cpp src/corelib/tools/qsimd_p.h src/corelib/tools/qtimezoneprivate_p.h src/corelib/xml/qxmlstream_p.h src/gui/kernel/qsimpledrag.cpp src/gui/kernel/qsimpledrag_p.h src/plugins/generic/generic.pro src/plugins/platforms/cocoa/qcocoamenu.mm src/widgets/styles/qmacstyle_mac.mm tests/auto/concurrent/qtconcurrentmap/BLACKLIST tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qmessagebox/BLACKLIST Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
| * | Support for Q_OS_ANDROID_EMBEDDED and android-embedded build flagsOtto Ryynänen2018-01-203-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Embedded Android build (Boot to Qt Android injection) is defined by having both Q_OS_ANDROID and Q_OS_ANDROID_EMBEDDED flags defined, as well as having Qt config android-embedded. This commit enables the possibility to build embedded Android builds. (i.e. Qt build for Android baselayer only, without JNI) Change-Id: I8406e959fdf1c8d9efebbbe53f1a391fa25f336a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Introduce QIcon::fallbackSearchPaths()Alexander Volkov2018-01-154-1/+13
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... that will be used if an icon can't be found in the current theme. The Icon Theme Specification https://standards.freedesktop.org/icon-theme-spec/latest/ar01s05.html states that unthemed icons must be searched in the base directories, i.e. /usr/share/icons, ... But in practice unthemed icons are installed into /usr/share/pixmaps and this dir is not used as a base dir for icon themes. So it's better to explicitly specify fallback dirs to avoid needless access to the filesystem. Also some KDE application install their own unthemed icons (into /usr/share/<appname>/pics), that can't be found by QIconLoader. With this change it would be possible for them to specify dirs with unthemed icons and thus be displayed correctly in non-KDE environments. [ChangeLog][QtGui][QIcon] Added fallbackSearchPaths() that will be used to find icons missing in the current icon theme. Change-Id: I0dc55ba958b29356a3b0a2123d6b8faa24d4c91e Task-number: QTBUG-33123 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Improve readability of code that uses the Qt signed size typev5.10.0-rc2Simon Hausmann2017-11-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the container BoF session at the Qt Contributor Summit 2017 the name of the signed size type became a subject of discussion in the context of readability of code using this type and the intention of using it for all length, size and count properties throughout the entire framework in future versions of Qt. This change proposes qsizetype as new name for qssize_t to emphasize the readability of code over POSIX compatibility, the former being potentially more relevant than the latter to the majority of users of Qt. Change-Id: Idb99cb4a8782703c054fa463a9e5af23a918e7f3 Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: David Faure <david.faure@kdab.com>
* | Change almost all other uses of qrand() to QRandomGeneratorThiago Macieira2017-11-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vast majority is actually switched to QRandomGenerator::bounded(), which gives a mostly uniform distribution over the [0, bound) range. There are very few floating point cases left, as many of those that did use floating point did not need to, after all. (I did leave some that were too ugly for me to understand) This commit also found a couple of calls to rand() instead of qrand(). This commit does not include changes to SSL code that continues to use qrand() (job for someone else): src/network/ssl/qsslkey_qt.cpp src/network/ssl/qsslsocket_mac.cpp tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-201-0/+13
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/util/qcompleter.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmdisubwindow.cpp Change-Id: If0e96981af07ce36ac68f2e69211bc2120f93973
| * Fix convertToFormat with color-tablesAllan Sandfeld Jensen2017-09-141-0/+13
| | | | | | | | | | | | | | | | | | The function was only well defined from RGB32 and ARGB32PM formats, this patch fixes it so it behaves well from all formats. Task-number: QTBUG-63163 Change-Id: Id892531d9aaf997b707b430196c1166493792a2a Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devThiago Macieira2017-08-081-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qwidget.cpp This merge also extends the expected output of the pairdiagnostics teamcity output (added in dev in commit c608ffc56ab37f9a9d5b9c34543126adb89e2b08) after the recent addition of the flowId attribute to the teamcity output (commit 8f036562119dd35ce51dc9230304d893b906bd37 in 5.9). Change-Id: I3868166e5efc45538544fffd14d8aba438f9173c
| * tst_QImageReader: Fix the size of the SVG imagesFriedemann Kleint2017-08-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The image appears to be 128x128. Fixes test failures FAIL! : tst_QImageReader::readFromResources(rect.svg) Compared values are not the same Actual (image.size()): QSize(128x128) Expected (size) : QSize(105x137) .\tst_qimagereader.cpp(1493) : failure location FAIL! : tst_QImageReader::readFromResources(rect.svgz) Compared values are not the same Actual (image.size()): QSize(128x128) Expected (size) : QSize(105x137) which likely do not show in the CI since the qtsvg module is not available when checking only qtbase. Change-Id: I84ebdde6f2251f56a00f16a54bd20d0c2b23638e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Fix deprecation warningsAllan Sandfeld Jensen2017-07-111-4/+4
| | | | | | | | | | | | | | Switch to QImage::sizeInBytes for huge QImage support. Change-Id: I0145f204dd2db6670e199c320fff9064b4a97ef4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Allow QImage with more than 2GByte of image dataAllan Sandfeld Jensen2017-07-082-5/+32
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-061-2/+1
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I43531e087bb810889d5c1fbfcdffb29b78804839
| * Fix BMP ImageFormat for semi-transparent filesAllan Sandfeld Jensen2017-07-031-2/+1
| | | | | | | | | | | | | | | | | | Reads the v4 and v5 info-header together with the rest of the info- headers, and use that to report the correct image format before decoding. Change-Id: I69e2bcc54367b7f14820815ae2ae1fa2d8d5dc8c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | qt_findAtNxFile(): account for .9 (9-patch image) extensionsMitch Curtis2017-06-244-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently a file with a .9.png extension will only have its @2x variant found if it follows this format: foo.9@2x.png Since ".9" should be considered part of the file suffix, it should ideally be able to look like this and still be picked up: foo@2x.9.png This patch makes qt_findAtNxFile() account for .9.* extensions. This is needed for the image-based style support in Qt Quick Controls 2, which uses 9-patch images. qmlbench benchmark results using benchmarks\auto\creation\quick.image\delegates_image.qml with QT_SCALE_FACTOR=2 show no difference in performance after this patch is applied. [ChangeLog][QtGui] High DPI variants of 9-patch images can now be loaded using the following syntax: "foo@2x.9.png" Change-Id: I6d1384113bef21b4fe85a104ee6b16869c93b077 Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-193-4/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | 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 tst_QImageReader::imageFormatBeforeReadAllan Sandfeld Jensen2017-06-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | The test was never loading images from a valid path, and thus never had any fullfill the base option which meant nothing was tested. Making it work revealed that the Format option on BMP formats doesn't predict semi-transparent files. Change-Id: I7035a0f63ebfbce940ce7a17a6142cf177480798 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * Fix tst_QIcon for configurations with builtin_testdataOliver Wolff2017-06-132-2/+2
| | | | | | | | | | Change-Id: Ibf9fcf7d3a8d58c9c488637a45985593950defaf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * winrt: Fix tst_QImageReaderOliver Wolff2017-06-131-1/+1
| | | | | | | | | | Change-Id: I3a7db49329d8f1677c17267f5878d5144ad37823 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-071-0/+1
|\| | | | | | | | | | | | | | | 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-0/+1
| | | | | | | | | | | | | | | | | | 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>
* | tests/auto/gui: use new QTest::addRow() moreMarc Mutz2017-04-241-42/+43
| | | | | | | | | | | | | | | | | | | | | | | | ... for calculated test data names. In tst_qimage.cpp, use QLatin1String instead of QString for image format pretty-printing, to avoid needless memory allocation and, more importantly in the context of this patch, to make the result usable with addRow(), which does not support %ls. Change-Id: Ib1953aee2da235ae912917a450491ac8be69ca3a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-201-0/+14
|\| | | | | | | | | | | | | | | | | | | | | | | 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
| * Fix PNGs saved from QImage transform of 8-bit imagesAllan Sandfeld Jensen2017-04-191-0/+14
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-202-2/+13
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemengine_win.cpp src/gui/text/qdistancefield.cpp src/plugins/platforms/xcb/qxcbconnection.h Change-Id: I1be4a6f440ccb7599991159e3cb9de60990e4b1e
| * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-132-2/+13
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Properly use the "process" featureUlf Hermann2017-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace all QT_NO_PROCESS with QT_CONFIG(process), define it in qconfig-bootstrapped.h, add QT_REQUIRE_CONFIG(process) to the qprocess headers, exclude the sources from compilation when switched off, guard header inclusions in places where compilation without QProcess seems supported, drop some unused includes, and fix some tests that were apparently designed to work with QT_NO_PROCESS but failed to. Change-Id: Ieceea2504dea6fdf43b81c7c6b65c547b01b9714 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-141-0/+76
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/widgets/qpushbutton.cpp Change-Id: I615de00e6e64540c50f658d4d8ab3e002d701a81
| * | ppm/pgm image formats: fix reading 16bit and limited rangeEirik Aavitsland2017-03-021-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | QImageWriter: Detect failure due to trying to write a QImage()Robin Burchell2017-02-271-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-02-101-0/+14
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmainwindowlayout_p.h Change-Id: Id406a67606b885052ed405b0fbc8eea7d9d03224
| * | QRasterPlatformPixmap::createPixmapForImage(): preserve DPRFriedemann Kleint2017-02-061-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Tests: Fix Clang warnings about various unused variablesFriedemann Kleint2017-02-051-10/+0
|/ / | | | | | | | | | | | | | | | | | | tst_qpainter.cpp:400:26: warning: unused variable 'maskSource_data' [-Wunused-const-variable] tst_qpainter.cpp:422:26: warning: unused variable 'maskResult_data' [-Wunused-const-variable] tst_qfuture.cpp:1203:11: warning: unused variable 'resultCount' [-Wunused-const-variable] tst_qvarlengtharray.cpp:33:11: warning: unused variable 'N' [-Wunused-const-variable] Change-Id: Ic8891603089a877a5c69701c63c2c6fd20fa6a22 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Merge remote-tracking branch 'gerrit/dev' into HEADOswald Buddenhagen2017-02-011-0/+28
|\ \
| * | Use QImage::reinterpretAsFormat in QPixmapAllan Sandfeld Jensen2017-01-261-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new QImage method instead of operating on private API. At the same time the code is improved to ensure the QImage is detached. Change-Id: Ia015c0bb18d7bc62da38397594730254843e5a0d Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Implement support for Scale directory key according to Icon Theme specMitch Curtis2017-02-018-0/+233
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt already supports high DPI icons using the “@nx” approach, where the device pixel ratio that the image was designed for is in the file name. However, our implementation of the freedekstop.org Icon Theme specification did not support the Scale directory key: https://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#directory_layout This meant that users creating icons via QIcon::fromTheme() did not get high DPI support. This patch fixes that. [ChangeLog][QtGui][QIcon] Implemented support for Scale directory key according to Icon Theme Spec. Icons created via QIcon::fromTheme() now have high DPI support by specifying the Scale in the appropriate entry of the relevant index.theme file. Task-number: QTBUG-49820 Change-Id: If442fbc551034166d88defe607109de1c6ca1d28 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Introduce QImage::reinterpretAsFormatAllan Sandfeld Jensen2017-01-181-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | QImage::reinterpretAsFormat can be used to change the format of an image without converting the data, to correct wrong formats or narrow the format to an opaque one if found to be opaque. [ChangeLog][QtGui][QImage] A new method reinterpretAsFormat is has been added to change the format of a QImage without converting the data. Change-Id: I5e15bc5a1c474a35d3921b06299008ab2effd945 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | tst_QImageWriter: clean upMarc Mutz2017-01-061-43/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - port Q_FOREACH to C++11 range-for - port uses of inefficient QLists to QVector or C arrays - port uses of dynamic containers with static content, to constexpr C arrays - fix algorithmic mistakes: * use adjacent_find with greater<> to emulate C++11 std::is_sorted instead of sorting the range and comparing it with the original (and not even using stable_sort to do this). * use std::unique == end() to detect absence of duplicates instead of poplulating a QSet and comparing its size with that of the original range. * use a simple QCOMPARE instead of populating a QSet with statically- known content, removing known options to be able to check that the remaining options are unknown Fixes errors pointed out by my tree's static checks. Change-Id: I935dbc21d56b55889d96aaf6ec179624c6ce9047 Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-165-3/+14
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure configure.pri examples/widgets/painting/fontsampler/mainwindow.cpp examples/widgets/painting/fontsampler/mainwindow.h mkspecs/features/moc.prf src/corelib/global/qglobal.h src/gui/text/qtextdocument.cpp Change-Id: Ica65512e00871695190a14ccea5c275b0165f787
| * Merge remote-tracking branch 'origin/5.7' into 5.8.0Liang Qi2016-12-085-3/+14
| |\ | | | | | | | | | Change-Id: I576187a9905802c177ae483e6c29d0f55cf7034d
| | * Merge remote-tracking branch 'origin/5.7.1' into 5.7Liang Qi2016-12-075-3/+14
| | |\ | | | | | | | | | | | | Change-Id: Ic2cdbd0c826bd63f545479495fa095ec666ddd5a
| | | * Fix the JPEG EXIF reader to deal with some broken/corrupt filesv5.7.1Thiago Macieira2016-12-015-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We parse the EXIF header in order to get the proper orientation, so let's be a bit more careful in what we accept. This patch adds better handling for reading past the end of the stream, plus it limits the number of IFDs read (to avoid processing too much data) and deals with a pathological case of the EXIF file format: EXIF (due to its TIFF origins) permits the offset to the next IFD to be backwards in the file, which means it could result in a loop or pointing to plain corrupt data. We disallow any backwards pointers, since it seems that's what other decoders do (libexif, for example). Change-Id: Iaeecaffe26af4535b416fffd1489332db92e3888 (cherry picked from 5.6 commit 02150649f95b8f46f826e6e002be3fa0b6d009bc) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | | Cleanup memrotate functionsAllan Sandfeld Jensen2016-12-081-29/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Throw out unused code and simply format table to only care about bpp and use it consistently for all bpp. Also makes QImage use the 180 degree memrotate, and fixes the tiled packed qt_memrotate270 so it can be put to use. Change-Id: If4ef1666fca960ce8e4ce32d85dc5f347b6986f4 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-161-7/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/common/linux-android.conf src/gui/opengl/qopengl.h src/network/socket/qnativesocketengine_winrt.cpp src/network/socket/qnativesocketengine_winrt_p.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/eglfs/api/qeglfsintegration.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp sync.profile Change-Id: If70aaf2c49df91157b864cf0d7d9513546c9bec4