summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/image
Commit message (Collapse)AuthorAgeFilesLines
* Changed qimage unittest to work from installation.Kurt Korbatits2012-01-172-9/+5
| | | | | | | | | - Changed to use QFINDTESTDATA and TESTDATA Change-Id: I7aaf4d16b03373be0fef39fe05c0df0d947dc7e3 Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Changed qimagewriter unittest to work from install directory.Kurt Korbatits2012-01-172-17/+25
| | | | | | | | | | - Changed to use QFINDTESTDATA and TESTDATA - skip testing permissions if test run as root user Change-Id: I5b308789202b01bdd0d630af65775ae23bf0cc4c Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Remove execute permission from files that don't need it.Jason McDonald2012-01-101-0/+0
| | | | | Change-Id: Ib92875289cdd9831f35301c566fb567acc725bb6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-0512-12/+12
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Retire QTest::pixmapsAreEqual().Jason McDonald2011-12-201-5/+5
| | | | | | | | | | | | | QTest::pixmapsAreEqual() was left in the Qt4 API for compatibility with some old tests written for Qt3. QCOMPARE() is the preferred way to compare QPixmaps and provides superior diagnostic output when a comparison fails. This commit removes QTest::pixmapsAreEqual() from the testlib API and replaces the last few remaining calls with QCOMPARE. Change-Id: I051c0e7d3bda072855fcd262d82e8e540619233b Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix qimagereader, qmovie and qmake unittest to work in shadow build.Kurt Korbatits2011-12-154-21/+5
| | | | | | | Changed to use QFINDTESTDATA and TESTDATA. Change-Id: I8684bc191cf8ffb8b531456e32047d582ebc018c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QImageReader-test: Make more verbose, use QTemporaryDir.Friedemann Kleint2011-12-131-9/+46
| | | | | | | | | - Add some QVERIFY to check for isNull(). - Use QTemporaryDir to avoid spurious failures in the format extension-ignore test (cannot copy to '/tmp/black.jpg'). Change-Id: Ia57ea4daa6b8686d1111c9c27a47666265fa9781 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix failing unit tests.Sarah Smith2011-12-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The test that was failing was the readFromDevice one - where the extension is not known. Looks as though image detection is required in a positive way, that is it is not enough to say I think I can read this file, and then fail if the format is "corrupt", you must be certain that the file was intended to be that format. In the case of TGA the original format has no magic byte header, and no consistent way to check if it really is a TGA file. With 2.0 the footer was added at the end, so that can be checked for confirming the file is TGA. However rejecting files which do not have this means that old TGA files will not be read. On a quick survey TGA files that have been used in applications so far all seem to be 2.0 TrueVision, so for now, lets just reject earlier files and see how it goes. Also add reading the tga test file to the readFromDevice test. (cherry picked from commit 665bc3951709f0d726cb82501a5bca684f3347a5) Change-Id: I665bc3951709f0d726cb82501a5bca684f3347a5 Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
* QPixmap test: Re-enable tests of Windows bitmap/icon conversion.Friedemann Kleint2011-12-091-40/+48
| | | | | | | | | | - QPixmap::to/fromWinHICON/BITMAP() became free internal functions (see b8d330904b279de57d70caef70ab2d2a6770f0cc) - Improve QImage check function similar to 11732d133b6a1e367b43d6a2853b3e297eafbf9f Change-Id: I80ff066964ce6c339a6b9bfa5a0e10421dca162a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QPixmap test: Make lenientCompare() more verbose.Friedemann Kleint2011-12-081-19/+15
| | | | | | | | - Output cause of failure - Streamline code Change-Id: I597e8cf0178c2417ea55c2319398a48d839b4474 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove TESTED_CLASS/TESTED_FILES comments from tests.Jason McDonald2011-12-0610-29/+0
| | | | | | | | | These comments were mostly empty or inaccurate. Appropriate naming of tests and appropriate placement of tests within the directory tree provide more reliable indicators of what is being tested. Change-Id: Ib6bf373d9e79917e4ab1417ee5c1264a2c2d7027 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Don't set graphics system at start of test.Jason McDonald2011-12-051-8/+1
| | | | | | | | | | QApplication::setGraphicsSystem() is a no-op, and even if it wasn't it would be unwise to force a graphics system that isn't guaranteed to be included in the Qt build, without including any logic to skip the test if setting the graphics system failed. Change-Id: Id9a0a87586872088625de7840b5032d0c3cc48a1 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* qtbase tests: Fix some warningsFriedemann Kleint2011-11-211-1/+1
| | | | | | | | - Fix warnings about QAtomicPointer/Int usage - Fix some gcc 4.6 warnings about assigned/unused variables Change-Id: Ib4dbf9110f0dad93ad48e97278310f05fad3a82a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Don't rely on PlatformQuirks in qimagereader testJason McDonald2011-11-041-6/+3
| | | | | | | | | | | | | | The PlatformQuirks header is, by its author's own admission, based on "very bad assumptions", those being that only Meego has quirks. The assumption that only Meego has versions of libjpeg and libpng with rounding errors is not a good assumption. Change the test to be a little tolerant of rounding error regardless of the platform, at least until there's a reliable way to tell which libjpeg/libpng versions have rounding errors. Change-Id: Id2be5cc54739249b615bf3307ee1850c0a5c06b3 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove dead code from qpixmap autotestJason McDonald2011-10-311-6/+0
| | | | | | | | | The removed code was in #if 0 in the original commit of the test function and appears to be an earlier version that should have been discarded before the initial commit. Change-Id: I91f16aa7adcccb50f4f3a02062fb9d105d85000c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove Windows and X11 from src/widgets/platforms.Robin Burchell2011-10-281-10/+2
| | | | | | | | | | This is dead code, unused with QPA in place, so remove it to avoid confusion caused through grepping for class names existing in both old and new places. Mac code is left in place for now, as some of it is still in use. Change-Id: Ia82cd5bbabe71285ca997f79d8fd9c0504e32c28 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Tests: Remove Q_WS_QPA, qpa-sections from .profiles.Friedemann Kleint2011-10-271-7/+5
| | | | | | | | | | | | Compile without -qpa. - Make Q_WS_QPA-#ifdefed sections the default in the code - Replace some Q_WS_ by Q_OS_ - Add ### fixme for places that need checking - Remove qpa conditionals from .pro files. Change-Id: I6ea930afc0c236cc12a7b7e95f1b8a1c24b3a513 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* gui: eliminated usage of qttest_p4.prfRohan McGovern2011-10-2512-26/+36
| | | | | | | | | qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4. It enables various crufty undocumented magic, of dubious value. Stop using it, and explicitly enable the things from it which we want. Change-Id: I97046aa51f1b3fc100e2eb2fa115f1bf8ae6437d Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Remove SkipMode parameter from QSKIP calls.Jason McDonald2011-10-214-13/+13
| | | | | | | | | The previous commit removed SkipMode from the testlib APi. This commit removes the parameter from all calls to QSKIP. Task-number: QTBUG-21851, QTBUG-21652 Change-Id: I21c0ee6731c1bc6ac6d962590d9b31d7459dfbc5 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Prevent QPixmapCache potentially growing indefinitely.Samuel Rødal2011-10-031-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPixmapCache has until now refused to throw out shared pixmaps, i.e. ones that still have shallow copies lying around. This leads to problems when someone inserts two shallow copies using different keys, causing the cache itself containing multiple shallow copies and thus forever refusing to throw out those entries. It's rather easy for this to accidentally happen in a user application since QPixmap::load() or QPixmap(const QString &fileName, ...) automatically cache the pixmap in the QPixmapCache, thus if the user then calls QPixmapCache::insert() on the same pixmap or a shallow copy it is locked in the QPixmapCache forever. The only reason for not throwing out a pixmap that's shared would be to prevent re-loading a pixmap from file when a user has a direct reference to it in his application, but in that case the user is unlikely to re-load the pixmap from file in any case. Therefore it seems the best fix is to get rid of this limitation. Task-number: QTBUG-21359 Reviewed-by: John Brooks Reviewed-by: Olivier Goffart (cherry picked from commit 7ab0bed3a56d46c386e65abc381264c57137cb43) Change-Id: I46dce19227e19a25e0287cf7372177430da15a66 Reviewed-on: http://codereview.qt-project.org/4563 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Remove Symbian-specific code from tests.Jason McDonald2011-09-2915-603/+13
| | | | | | | | | Symbian is not a supported platform for Qt5, so this code is no longer required. Change-Id: I1172e6a42d518490e63e9599bf10579df08259aa Reviewed-on: http://codereview.qt-project.org/5657 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix include path.Frederik Gladhorn2011-09-151-1/+1
| | | | | | | | | | Reviewed-by: Gabi Change-Id: I99b08f8b41f483c92ae175630b812e4b299069b6 Reviewed-on: http://codereview.qt-project.org/4916 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Fixed tst_QIcon::task184901_badCache().Samuel Rødal2011-09-151-2/+0
| | | | | | | | | | | QIcon has not been moved to QtGui after all, re-introduce QtWidgets-dependent code path. Task-number: QTBUG-21402 Change-Id: I61c37babaeceadf7d53c10736bcc847758adaf1b Reviewed-on: http://codereview.qt-project.org/4775 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixed tst_qpixmap::grabWidget().Samuel Rødal2011-09-151-2/+0
| | | | | | | | | | | | prepareToRender() might call adjustSize() resulting in the widget's size changing, so we should make sure to call adjustSize() _before_ we decide on the required pixmap dimensions. Task-number: QTBUG-21402 Change-Id: Ie72b46bc8e8e22f848769f78187f47ae9f4e37d3 Reviewed-on: http://codereview.qt-project.org/4772 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Disabled tests for refactor->master integrationJo Asplin2011-09-132-0/+4
| | | | | | | | | | | | | | | | | | | | | | | This change disables failing tests to increase the likelihood that 'make check' terminates with a zero exit status. This is done to prevent the CI system from blocking further commits once qtbase#refactor is merged into qtbase#master. Failing tests are marked as insignificant (by putting 'CONFIG += insignificant_test' in the .pro file). Note: This is a temporary measure that needs to be cleaned up once the refactor->master integration is complete. Ideally all disabled tests need to be enabled and passing. All changes will be marked by the string QTBUG-21402 in a comment for easy location. Task-number: QTBUG-21402 Change-Id: Ic4400671671f6d9b75b106a6aa4755b20e74378d Reviewed-on: http://codereview.qt-project.org/4678 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Moved gui autotests into new directory structureJo Asplin2011-09-01257-0/+17256
Task-number: QTBUG-21133 Change-Id: I83b8f652935cf92151265ca2530a3cf81c31fdef Reviewed-on: http://codereview.qt.nokia.com/3996 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jo Asplin <jo.asplin@nokia.com>