aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickimage
Commit message (Collapse)AuthorAgeFilesLines
* Remove blacklisting of several tests that are passingShawn Rutledge2019-02-101-4/+0
| | | | | | | | | | | | | ...based on statistics visible in Grafana. Task-number: QTBUG-41895 Task-number: QTBUG-38209 Task-number: QTBUG-65978 Task-number: QTBUG-36804 Task-number: QTBUG-45466 Task-number: QTBUG-29062 Change-Id: If62d2413ede234d33b411e0ecb4f93ec6e0f8062 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Scale up SVG images if source size is larger than original sizeAndy Shaw2018-03-151-0/+6
| | | | | | | | | | | | | | Since SVG images can be scaled up without any loss of quality then we should allow this to happen even though it is not done for other image formats. This restores the 5.9.x behavior for SVG images. Additionally the manual test is updated to showcase an embedded image inside a SVG one to indicate this is continuing to work as before too. Task-number: QTBUG-67019 Change-Id: Ia719899937f8146e8fab50aa85adf18e2f79aa98 Reviewed-by: Evangelos Foutras <evangelos@foutrelis.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix: Do not read texture files when backend is not openglEirik Aavitsland2018-03-013-3/+25
| | | | | | | | | | | | The software backend would assert for the compressed GL texture files. Autotests updated for this functionality. Moved tests of the optional texture-file support out of qmltest (where it did not belong) and into tst_qquickimage, side by side with the tests of the optional svg format. Change-Id: I98c407093ccebeb70ba5a93ff0882dbd0b8060d5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-25/+25
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Image: respect aspect ratio of an SVG when width or height is zeroAndy Shaw2018-02-211-0/+5
| | | | | | | | This amends f42f1366dcd4b070c69c9e7fe42a704ef23da14d Task-number: QTBUG-65789 Change-Id: I1db05259f0aeb3310bbaf5ea03be52cbd243d115 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.10' into 5.11" into ↵Simon Hausmann2018-02-151-2/+2
|\ | | | | | | refs/staging/5.11
| * Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-121-2/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/shapes/qquickshape.cpp src/imports/shapes/qquickshape_p_p.h src/qml/compiler/qqmlpropertycachecreator_p.h src/qml/jsruntime/qv4value_p.h src/quick/items/qquickloader_p.h tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp tools/qmlprofiler/qmlprofilerapplication.cpp Change-Id: Iafc66ae84bf78630ed72a986acb678e9d19e3a69
| | * Use the image handler to return a scaled size for the SVGAndy Shaw2018-01-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the SVG was made to be drawn at a small width and a large height then it would lead to blurring in the rendering of the SVG. By having the image handler deal with returning the image we want for the scaled size it will ensure this is rendered correctly since it is able to account for the ratio already inside the SVG image handler. Task-number: QTBUG-65789 Change-Id: Ib8627c0537679aab022e88a0eea73a21d8cbc564 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix: Make Image element support detection of suitable file extensionEirik Aavitsland2018-02-132-0/+8
|/ / | | | | | | | | | | | | | | | | | | | | | | If the source is a non-existent local file or resource, then instead of giving up directly, check if there exists a file/resource with the same name and a known supported image/texture file extension (suffix). [ChangeLog][QtQuick][Image] Support detection of suitable file extension Task-number: QTBUG-66127 Change-Id: I4c0edb639017e8707eed8e532ba55d29917751cb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | blacklist tst_qquickimage::nullPixmapPaint on QEMUShawn Rutledge2018-01-251-0/+4
| | | | | | | | | | | | Task-number: QTBUG-65978 Change-Id: I0b506a2a85566f560eb555c26b568b1dd81811b3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Enable tests for boot2qtSami Nurmenniemi2017-09-211-0/+12
|/ | | | | | | | | | | | | | Some tests needed fixing - Disabled tests too heavy for qemu - Skipped tests requiring OpenGL without support from the platform - Skipped tests requiring functionality on broken offscreen platform - Skipped tests that take too long on qemu + software renderer - Blacklisted tests for created bugs QTBUG-63049, QTBUG-63053 QTBUG-63055 and QTBUG-63057 Task-number: QTBUG-60268 Change-Id: I0346b0e436cf286d7d9cbc140acf324a4087cfb9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-07-281-2/+2
|\ | | | | | | Change-Id: I7d092cce33cb009d63e7b0df7c71183089dea53f
| * Fix test for highdpi systemsErik Verbruggen2017-07-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In this specific case, the original image is rendered at 212x300. If it is then scales (preserving aspect ratio) to 200x200, the width "should be" (212/300)*200 = 141.333.. Now when the backing store is not using highdpi, it will be rendered at 1x, so the width gets rounded to 141. However, if the backing store renders it at (say) 2x (so width 282.66..) it gets rounded to 283, which is then divided by 2, which makes 141.5. By rounding the width down, the result is always the same as on non-highdpi. Change-Id: I8c967edf60ddbe97496cfb3d561357887a177d3f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-301-1/+1
|\| | | | | | | | | | | | | | | Conflicts: src/qml/jit/qv4assembler.cpp src/qml/jit/qv4assembler_p.h Change-Id: Ibfe69610ccd1f275f181b2bd87feece4ba221e50
| * tst_qquickimage::mirror(): Ensure screenshots are in the correct formatFriedemann Kleint2017-03-291-1/+1
| | | | | | | | | | | | Task-number: QTBUG-59787 Change-Id: I9ef1e6e5284cadc37bdac342b02cf93655346d57 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | QQuickImage: take DPI into account for implicit and painted sizesMitch Curtis2017-02-241-0/+61
|/ | | | | | | | | | | As an example, an @2x image will report an implicit size that is twice as large as it should be when its fillMode is set to PreserveAspectFit. This commit adds code that was likely missed in 63fb30eb. Change-Id: I38cfdf3a429726639209c88dfb38eebb0b9ff162 Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Remove remnants of blackberry platform supportRobin Burchell2017-01-161-4/+0
| | | | | | | | The last remnants were removed from qtbase in 5.7 making this all dead code, so match here too. Change-Id: I10f3f1c614562f2a97ade7cdf5002065d6f79e07 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix imageSource and svg tests after change to how QtSvg interprets image sizeRobin Burchell2017-01-152-12/+6
| | | | | | | | | | | These tests were blacklisted after QtSvg/4bd5d6ced07d2d0e643a13e7cebb228c521d2046. in order to integrate qt5.git. Now, fix the tests to match the new behavior, and remove the blacklisting. Task-number: QTBUG-58082 Change-Id: I77abe995095ee52978c5957e49e1547b3af7708b Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Blacklist imageSource and svg testsRobin Burchell2017-01-131-0/+6
| | | | | | | | | | | | | QtSvg changed how the dimensions of an SVG are determined in 4bd5d6ced07d2d0e643a13e7cebb228c521d2046. These tests assume the old behavior at present, so blacklist the tests so qt5 integration can proceed. Task-number: QTBUG-58082 Change-Id: Ia579fbe6736932c081f9873d84bea4c01a975bad Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de> Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix some test failures with QT_NO_OPENGL buildsAndy Nichols2016-05-061-1/+4
| | | | | Change-Id: I4154084b4a0e0709ee8cb39a856a37a611e2d537 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-084-0/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change also fixes the build of two benchmarks, tst_affectors and tst_emission. Conflicts: src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro src/qml/qml/ftw/qhashfield_p.h tests/benchmarks/particles/affectors/tst_affectors.cpp tests/benchmarks/particles/emission/tst_emission.cpp tests/benchmarks/qml/pointers/pointers.pro tests/benchmarks/qml/pointers/tst_pointers.cpp tests/benchmarks/qml/qmltime/qmltime.pro tests/benchmarks/qml/qquickwindow/qquickwindow.pro Change-Id: I595309d1e183c18371cb9b07af6e4681059de3b2
| * Purge sRGB chunks from PNG in tests.Edward Welbourne2016-03-294-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | Subjects each *.png file that matched grep -law "sRGB" to: pngcrush -ow -brute -rem allb -reduce Various tools grumble about sRGB tables in PNG images; and our handling of them doesn't pay attention to these, so purging them makes the images smaller with no loss to the images. Change-Id: I9e4dc3aec97cd32bc8ac216fadeaf7669c49647c Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Updated license headersJani Heikkinen2016-01-203-51/+36
| | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I04760a0801837cfc516d1c7c02d4f503f6bb70b6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-071-1/+1
|\| | | | | | | Change-Id: Ica75a71062d0613e415f2433c5c22c2e251b37cd
| * Fix autotests for change in QtNetworkDaniel Molkentin2015-11-291-1/+1
| | | | | | | | | | | | | | See change 4efa50a5e37497bc3a3dd30f27db7d8100e3f6a5 in qtbase Change-Id: I00e5e529faed029bc3bc461a3b1807811d33c769 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Tests: Remove QT_DISABLE_DEPRECATED_BEFORE=0 for simple cases.Friedemann Kleint2015-09-021-1/+0
|/ | | | | | | Fix usage of API that is marked deprecated. Change-Id: Ia887437f99b9ce207891ca19bc49294acb7d629d Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* tests/quick: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-271-28/+28
| | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: Ib9f4c2486af23c47990be4b9e004b965de226dcc Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Tests: Replace Q[TRY]_VERIFY(v == true|false) by QVERIFY(v)|QVERIFY(!v).Friedemann Kleint2015-07-271-4/+4
| | | | | | | | Preparing the replacement of Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) for non-boolean types. Change-Id: I8a4e44a2b4e20a9c8b811799e3932c8ce1a2cbbb Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-04-282-38/+39
|\ | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I075e742da8396a268d97d3ab34bcd9e0c0cf001f
| * Merge remote-tracking branch 'origin/5.4' into 5.5Simon Hausmann2015-04-272-38/+39
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp Change-Id: I715b8a78b74cbe0dcaf599367fd6e08af4858e11
| | * Prospective fix for flakey "network" related QML testsv5.4.2Simon Hausmann2015-04-252-38/+39
| | | | | | | | | | | | | | | | | | | | | Replace hard-coded server ports with dynamically allocated ports. Change-Id: Iab8f9a88343a9f2c49af3cd700c954c13c3bf121 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | | Skip the remote image source test and fix blacklisting of the other testsSimon Hausmann2015-04-231-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | There's a deadlock in qdbus that we're hitting with remote tests. We should skip it and the other tests, but only on Linux. Task-number: QTBUG-45655 Change-Id: I4523fdaa2c8855c5029667fb0e32b99ec563af27 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Stabilize tst_qquickimage::noLoadingSimon Hausmann2015-04-151-2/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test loads an image from a remote source and it has a QSignalSpy installed for the progressChanged(qreal) signal on the QQuickImage. The test counts the number of times the signal is emitted and expects it to hit an exact value. That seems wrong when loading an image over the network, as we have no control over in what pieces the data arrives on our end. And as it turns out, the test occasionally fails in the CI system, which is also reproducible. To stabilize the test, we now expect at least two emissions of the signal when loading from the network (0% and 100%) but there may be more (0% 10% 80% 100% for example). In addition the reload case is simplified by resetting the spy and verifying that progressChanged was not emitted at all. Change-Id: Ib2e660651d40b92eff889ebe3baabb74d6e00fb4 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* / Update copyright headersJani Heikkinen2015-02-123-36/+28
|/ | | | | | | | | 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. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Update license headers and add new licensesJani Heikkinen2014-08-252-38/+22
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Downscale textures which exceed the GL texture limitGunnar Sletta2014-08-234-0/+77
| | | | | | | | | | This way they will at least render. [ChangeLog][QtQuick] Images exceeding GL_MAX_TEXTURE_SIZE will be downscaled to fit so they will still show. Change-Id: I169ecac768036812b8e14265ec1a0a8902655666 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Stabilize tst_qquickimageGunnar Sletta2014-07-311-19/+12
| | | | | | Change-Id: Ib2b3d18c583991959d342e8ca36eb10c299b68bf Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QQmlError::toString: improve handling of empty urls.David Faure2014-07-241-3/+3
| | | | | | | | | | | | "file::2:23: ..." is strange to read. Show "<Unknown File>:2:23: ..." instead, by treating empty urls (including "file:") as unknown, and by still showing line and column numbers in such a case. This change makes it possible for QUrl::fromLocalFile("") to return an empty url rather than "file:", which this module was relying upon in the tests. Change-Id: I91918090fd4e0aa9a25dbbb18893a0ce94140e21 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-102-1/+49
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/accessible/quick/quick.pro src/quick/items/qquickpincharea.cpp src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp src/quick/scenegraph/qsgthreadedrenderloop.cpp Manually adjusted for TestHTTPServer constructor change: tests/auto/quick/qquickimage/tst_qquickimage.cpp Change-Id: I5e58a7c08ea92d6fc5e3bce98571c54f7b2ce08f
| * QNX: Fix qquickimage mirror auto testBernd Weimer2014-04-241-1/+5
| | | | | | | | | | Change-Id: If43d9eb411dee374faa1f9d85325ba449242aec8 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| * Implement high-dpi "@2x" image handling.Morten Johan Sørvig2014-03-202-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make QQuickBaseImage::load() load "@2x" image files on high-dpi displays. Reload images on screen change in order to load the correct version depending on screen dpi. Modify QQuickImageBase::updatePaintNode() to work with @2x images. QQuickBaseImage::load() now looks at the target window's devicePixelRatio and checks for the presence of a "@2x" file on disk. If found the @2x version will be used. Unlike QPixmap, QQuickPixmap has no special knowledge of "@2x" files. They pixmap system will be asked to load "@2x" files and will cache them and report the (device) pixel size, like any other pixmap. Add auto-test and manual test. Task-number: QTBUG-32862, QTBUG-33069 Change-Id: I1f57a10075e499f6eee61df5421e1986521c6ab0 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* | TestHTTPServer: Make listening an explicit operation that reports failure.Robin Burchell2014-03-211-10/+10
|/ | | | | | | | | | Use this to print the error message when listening fails, and switch to always stack allocating TestHTTPServer instances for easier cleanup. Change-Id: I63b2bd38963b66611dc08a5c322615d91a91e675 Reviewed-by: John Brooks <john.brooks@dereferenced.net> Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Prefer to use normalised signal/slot signaturesSergio Ahumada2014-03-031-2/+2
| | | | | | Change-Id: I9856c110399c4b6b1ea6aba2d92392cecff04656 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* fix whitespaceOswald Buddenhagen2014-01-221-1/+1
| | | | | | | remove trailing spaces and expand tabs Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix some compiler warnings in tests and examples.Christian Kandeler2014-01-151-0/+1
| | | | | Change-Id: Ia739c995005635caf6fd0bd4e495ed8567350e83 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Fix crash when changing non-cached source of image during animationMichael Brasser2013-08-012-0/+73
| | | | | | | | | Ensure deferred deletions are handled while syncing, otherwise texture might be deleted after sync but before deferred deletion is processed. Task-number: QTBUG-32513 Change-Id: Id276f536a5722a36baae815b7b550b574eeeb483 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Merge "Merge branch 'dev' into stable" into refs/staging/stableSergio Ahumada2013-03-221-4/+2
|\
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-141-1/+1
| |\ | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/qml/debugger/qv8profilerservice/qv8profilerservice.pro Change-Id: I2fd99ed8bd03302b9bbf31e6f21990f6455c4f1c
| * | Autotests w CONFIG+=parallel_test don't depend on activation or focusShawn Rutledge2013-03-041-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the test does requestActivate() or relies on isFocusWindow(), the test cannot be parallel_test. Also, a lot of the tests don't actually need the window to be active, only exposed; and waiting only for exposed is likely to make them more stable. Change-Id: I0845b9b12ddf7f0c8906d9738a3e26d46ab98820 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | | Try to stabilize qquickimage and rendernode tests.Gunnar Sletta2013-03-202-2/+2
| |/ |/| | | | | | | | | | | | | | | Some of Our CI machines are running on tiny screens and recent changes in Qt have caused us to limit windows to the screen geometry (which is sensible). Change-Id: I29eb3b5c73a7ea650ac26494c25d204fb254dee3 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>