summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge 5.4 into 5.4.1Oswald Buddenhagen2015-01-1640-85/+685
|\ | | | | | | Change-Id: I78d848c0bb396584a205a8066d253f2bcac8da56
| * Diaglib/Event filter: Output application state on focus events.Friedemann Kleint2015-01-161-4/+70
| | | | | | | | | | | | | | | | | | Output the current active/modal/popup windows when receiving FocusAboutToChange or FocusIn events. Task-number: QTBUG-42731 Change-Id: Ia88e9a9b41f7c80fb7a2a048b06da56d989ff18a Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * Correction on bound values in case of repeated QSqlQuery::execBatchEric Lemanissier2015-01-161-0/+30
| | | | | | | | | | | | | | | | | | | | | | Until now, QSqlQuery::execBatch did not call resetBindCount, which lead the next call to QSqlQuery::addBindValue to start at non zero index. This is problematic in case of a prepared query which is called several times. Task-number: QTBUG-43874 Change-Id: I1a0f46e39b74d9538009967fd98a269e05aac6f2 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * Android: Fix QLayout testsEskil Abrahamsen Blomfeldt2015-01-163-0/+14
| | | | | | | | | | | | | | | | | | | | This test requires test data to be available and the testRetainSizeWhenHidden test assumes that a widget will be sized based on its sizeHint(), which does not work on platforms where show() implies showMaximized(). Change-Id: I9bf372d8c0ea94845ae08481ec555fe25dcfebc0 Reviewed-by: BogDan Vatra <bogdan@kde.org>
| * Android: Fix QDirModel testsEskil Abrahamsen Blomfeldt2015-01-163-3/+48
| | | | | | | | | | | | | | | | | | | | This test needs to have a test environment available on the regular file system, so we create this when initializing the test. In addition we QEXPECT_FAIL one of the tests which seems to expose a legitimate bug. A bug report has been created for this. Change-Id: I7c90aea78a067815cb647a51db5d91a652a9fc1c Reviewed-by: BogDan Vatra <bogdan@kde.org>
| * Android: Fix QSideBar testEskil Abrahamsen Blomfeldt2015-01-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | On Android, the HOME and TMPDIR environment variables both point to the application sandbox, whereas the QSideBar test assumed they were different. We work around this simply by creating a new directory and using this as the test dir in place of the home directory. Change-Id: I67e01926b901ddf237b05aff116d30b6c7885535 Reviewed-by: BogDan Vatra <bogdan@kde.org>
| * Android: Skip QProcess_and_GuiEventLoop testEskil Abrahamsen Blomfeldt2015-01-161-0/+4
| | | | | | | | | | | | | | | | This requires building a command line tool and running it using QProcess, which is not a supported deployment option on Android. Change-Id: I795374bf809a8e4d8634a55f5ebf1699ee9745d1 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
| * Fix QRawFont test when used with bundled FreeTypeEskil Abrahamsen Blomfeldt2015-01-161-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The auto-hinter in the FreeType version bundled in Qt gives slightly different advances on some glyphs. As noted in the removed code, this was already observed on Windows and QNX, and recently also on Android. I'm sure it could also happen on platforms using the system library if the system library was the same version as the one bundled in Qt. Instead of expect-failing the test, we simply accept both the observed results as valid. Note that we need to accept 9 as a result for the default hinting preference on all platforms, not just Windows, since the default hinting preference in FreeType can be a system setting. Change-Id: I3cc0f33f0f66dd64419770b37c10dee457706b5e Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Android: Fix QImageReader testEskil Abrahamsen Blomfeldt2015-01-162-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | The files for the test have to be included in a qrc to be available on Android. Most of the image files are already in a qrc, but a couple were missing. We add this in a separate qrc to avoid interfering with the tests on other platforms. Change-Id: Ibb24f5015a1aba4d5622e14f7aae80bc18611ec4 Reviewed-by: BogDan Vatra <bogdan@kde.org>
| * Autotest: Find all autotests due to changed naming conventionsRainer Keller2015-01-161-27/+14
| | | | | | | | | | | | | | | | | | The algorithm searches for all executables in search path starting with "tst_". Tests are not named like the folder they are contained in anymore. Change-Id: I360f293e43e30292fe0ae6230fd3ec7abf3d632d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| * Benchmarks: Build gui benchmarks only when gui module availableRainer Keller2015-01-161-1/+1
| | | | | | | | | | Change-Id: I57fc2f09a4e31e379c256dfe3f5d7546cdcf2b4b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
| * Fix compilation with older MSVC: use qIsNan instead of isnanThiago Macieira2015-01-151-2/+2
| | | | | | | | | | | | | | | | | | isnan is C99 and POSIX.1, which the older MSVC do not support. Use the Qt equivalent. Change-Id: Ic5d393bfd36e48a193fcffff13b8679cb83d12db Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * Android: XFAIL a few tests in QDnsLookupEskil Abrahamsen Blomfeldt2015-01-121-0/+18
| | | | | | | | | | | | | | | | | | Some of these tests are verifying things that are not supported on Android, so we XFAIL these cases when we see the appropriate error message. Change-Id: I8245266f061c902515bb12251521159a8e19bfb7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fix memory leaks with QDBusServerThiago Macieira2015-01-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Two serious mistakes: - we need to call dbus_server_free_data_slot as many times as we call dbus_server_allocate_data_slot - we need to delete the d pointer... The changes to the unit tests are simply to cause the used peer connections to be removed so they don't show up in valgrind. Change-Id: I9fd1ada5503db9ba481806c09116874ee81f450d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * QScreen manual test: use sizeHint; don't override QLineEdit text colorShawn Rutledge2015-01-093-4/+9
| | | | | | | | | | | | | | | | The window size was too small on high-DPI screens. Save the default text color instead of setting it to black. Change-Id: I78b50624110be0cb1d077d3782d421eb323f4fb0 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
| * Skip incompatible QTextLayout tests when dpi-scaling is usedEskil Abrahamsen Blomfeldt2015-01-091-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On e.g. Android, the tabs will be scaled by DPI. This breaks the logic in the QTextLayout tests for tabs. It's not possible to just scale the expected sizes either, since the whole text layout will be affected by font sizes and scaling, and it's difficult to predict where characters will land on different platforms and resolutions. To avoid breaking this test on other platforms, we just skip them when we know they will break. Since the code tested is cross-platform, this will hopefully not have any significant impact on our coverage. Change-Id: I65d6c33c9c6724665983a17f99eadcf1baedcc20 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
| * Android: Fix QDataStream testEskil Abrahamsen Blomfeldt2015-01-092-0/+10
| | | | | | | | | | | | | | | | Include test data on Android. Change-Id: Ic0890495c0bf8d2e38595585226a03073b043d57 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
| * Android: Fix QTextBoundaryFinder testEskil Abrahamsen Blomfeldt2015-01-092-0/+13
| | | | | | | | | | | | | | Include test data on Android. Change-Id: I35c17618d84822df126fe3462a00d3d49b1377c8 Reviewed-by: BogDan Vatra <bogdan@kde.org>
| * Android: Fix qpixmap test.BogDan Vatra2015-01-081-3/+25
| | | | | | | | | | | | | | Add all test data to resources. Change-Id: I31b0dbb7546a15151f64523c86bf8eb687ff9ec0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| * Android: Fix qimage test.BogDan Vatra2015-01-082-0/+24
| | | | | | | | | | | | | | We must add all test data to resources. Change-Id: I1b18415cd53a27bd23e51ac6b738d3ed94162ac9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| * Android: Fix some QStyle testsEskil Abrahamsen Blomfeldt2015-01-082-0/+25
| | | | | | | | | | | | | | | | | | This adds the testdata to a qrc to make them available on Android. There are still some failures which might be actual errors, and which will be addressed separately. Change-Id: I1bdcfb2c6676134ca52388d49a1b2d25cf2813f9 Reviewed-by: BogDan Vatra <bogdan@kde.org>
| * Make sure widget is polished before checking its fontEskil Abrahamsen Blomfeldt2015-01-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | QWidget is polished when show() is called, so unless you do this first, QWidget::font() will return a default constructed QFont, and not necessarily the default specified in the platform theme. Comparing this to QPainter::font() later, which has been resolved against the platform theme font, and not the default constructed font, you can get a mismatch and a false test failure. This happened on Android. Change-Id: I41ef5b10879bbd4bb8ef8d52ecaccf5e8e894075 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Android: Fix QTemporaryFile testsEskil Abrahamsen Blomfeldt2015-01-083-9/+48
| | | | | | | | | | | | | | | | | | | | | | Fixed a few instances of files that should be deployed to the file system. The way we do this on Android is via qrc. We also need a special case for the resources/test.txt, because QFINDTESTDATA will find this in qrc, but that's not the one we are looking for. Change-Id: I7097e8b7795b3a8fd483adad090208f295478412 Reviewed-by: BogDan Vatra <bogdan@kde.org>
| * Android: Fix QPainter autotestEskil Abrahamsen Blomfeldt2015-01-082-0/+191
| | | | | | | | | | | | | | | | | | The testdata needs to be in a qrc to be available on Android. Note that a single test will still fail. Since this requires a platform-independent fix, it will be committed separately. Change-Id: Ib2438a3298d81d77b7f4f240ef045aa0500d8382 Reviewed-by: BogDan Vatra <bogdan@kde.org>
| * Android: Fix qimagewriter test.BogDan Vatra2015-01-083-13/+35
| | | | | | | | | | | | | | We must add all test data to resources. Write output data into a writable location. Change-Id: I5a1c212f6108abf2a82288a2c84cfb31eda5e101 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Swallow wheel events while a popup widget is open.Friedemann Kleint2015-01-121-4/+7
|/ | | | | | | | | | | Wheel events should not cause a popup widget parented on a scrollable widget to be closed or moved to correctly reflect the system behavior on OS X and Windows. Task-number: QTBUG-42731 Task-number: QTBUG-40656 Change-Id: I4ef75aa8331390309c251316ac76db2cf9ec51f7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QVersionNumber: test more version numbersMarc Mutz2015-01-081-0/+60
| | | | | | | | | | | QVersionNumber will gain a small-version-number optimization, which stores sequences of less than 4 (32bit) or 8 (64bit) 8-bit signed segments inside the class instead of a QVector. Make sure the tests cover those cases, too. Change-Id: If1d875c75d284908756b305f767a7218cab5226f Reviewed-by: Keith Gardner <kreios4004@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Autotest: don't leak a socket every call to QtNetworkSettings::hasIPv6Thiago Macieira2015-01-081-0/+1
| | | | | Change-Id: I87e31945052233cee17460ee6f59c02ec416b27b Reviewed-by: Richard J. Moore <rich@kde.org>
* Prevent buffer overrun when getting the glyph imagesAndy Shaw2015-01-071-1/+16
| | | | | | | | | | The change 35bc3dc45aacaf36a8bdfccc7627136cc2e5b185 moved some padding out of QTextureGlyphCache into the font engines directly, however this was not done for the DirectWrite font engine so it caused a buffer overrun. Task-number: QTBUG-41782 Change-Id: I4e643159036f06c5edd8a742dc6694d517a47826 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Make QtDBus unit tests compile with runtime dbus-1 tooThiago Macieira2015-01-067-51/+93
| | | | | | | | | | | | | There's a change in Qt 5.4.0 that makes Qt compile with its own set of D-Bus headers, which means QT_CFLAGS_DBUS may be empty. Thus, we can't compile or link if we're using the actual libdbus-1 API to build the test. This commit makes these unit tests use the same dynamic loading mechanism. Change-Id: I56b2a7320086ef88793f6552cb54ca6224010451 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Allow the QtDBus type benchmark to run without libdbus-1 foundThiago Macieira2015-01-061-1/+2
| | | | | | Change-Id: I1086e6cd6534dc96311e981cc9c73f501c1128ac Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Make QDBusConnection and QDBusServer return an error on default objectsThiago Macieira2015-01-061-4/+4
| | | | | | | | | | The error of "Not connected". This incidentally solves a crash when QDBusServer().lastError() is called but libdbus-1 couldn't be found. Change-Id: Id93f447d00c0aa6660d4528c4bbce5998d9186a8 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Autotest: fix a race condition in verifying a peer D-Bus connectedThiago Macieira2015-01-066-14/+52
| | | | | | | | | | | | | | | On the unit test side, everything is sequential: we first ask for the connection, verify that it is connected, then ask the remote side via the session bus if it is connected. Unfortunately, the remote site may handle things in a different order: it may handle the incoming function call to "isConnected" before doing accept(2) on the listening socket. So, instead, make the local side block until the connection is received on the other side. On the remote, we don't block, instead we use the feature of delayed replies. Change-Id: Ie386938b8b39dd94a9d7e5913668125fb4a3c7da Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Android: Fix QCryptographicHash testEskil Abrahamsen Blomfeldt2015-01-062-0/+11
| | | | | | | Include test data in qrc when building on Android. Change-Id: I611ca24fe8764eb709b6ce27e814840ea919d4f1 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Fix QCommandLineParser testEskil Abrahamsen Blomfeldt2015-01-061-0/+9
| | | | | | | | | Skip the tests that require building and deploying an external command line application, since that's not how we do things on Android, and it's really not very relevant for that platform. Change-Id: I2c1985687e25fb0cf124b1d57c8ba60e37d2ff96 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Fix QCollator testEskil Abrahamsen Blomfeldt2015-01-061-0/+5
| | | | | | | | On Android the POSIX implementation of QCollator is used, and this does not support setting other locales than the default. Change-Id: I25d23949341fc555e8be4f6836ae68cc8813cc46 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Fix QChar testEskil Abrahamsen Blomfeldt2015-01-062-0/+10
| | | | | | | Include test data in qrc when building on Android. Change-Id: Id80623324788dac21bd5ddbeef8108f54d6bc8f7 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Fix QByteArray testEskil Abrahamsen Blomfeldt2015-01-062-0/+10
| | | | | | | Include test data in qrc so it can be found on Android. Change-Id: Iaca8422120f1ef842aafeb0cc209cb9fdd70f05f Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Fix QTranslator testsEskil Abrahamsen Blomfeldt2015-01-063-1/+30
| | | | | | | | Bundle test data in qrc on Android. Extract it, as the tests expect to find it in the file system. Change-Id: I251eca3c23141a608b1cbac5ee0b7164c068f9b4 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Check XML output and optionally stop on fail.BogDan Vatra2015-01-061-0/+41
| | | | | | | | The failures will be printed in red color. Use -f param to stop on fail. Change-Id: Ife58f9264a9ac859d739842c6d1359acde807ce7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* JPEG: Fix reading of EXIF orientation.Friedemann Kleint2015-01-062-9/+24
| | | | | | | | | | | The orientation is unsigned short, read it as such. In JPEG-files created by Ricoh/Pentax cameras, the data is saved in Motorola format. Reading the wrong data size will produce invalid values when converting the byte order. Change-Id: I8f7c5dc5bfc10c02e090d3654aaefa047229a962 Task-number: QTBUG-43563 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Don't bind to QHostAddress::Any if we want to do IPv4 multicast opsThiago Macieira2015-01-051-3/+3
| | | | | | | | Linux gracefully allows us to do that and treat the v6 socket as if it were v4. Other OS (notably OS X) aren't so forgiving. Change-Id: I13dd3274be2a4b13e8b1eef93cbc2dd17b648f96 Reviewed-by: Richard J. Moore <rich@kde.org>
* tst_QLockFile: simulate a crash betterMarc Mutz2015-01-041-4/+4
| | | | | | | | | | | Instead of leaking the QLockFile instance, which causes leak-checkers to emit false positives, simply call exit(), which doesn't run the destructors, yet doesn't lead to leak-checker warnings. Change-Id: Ia61010671e5218ae412e2bcf873e66255a2c5a99 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Autotest: Forward stderr of the sub-processesThiago Macieira2015-01-025-1/+4
| | | | | | | So we can get the output when running with QDBUS_DEBUG=1. Change-Id: I6a6b8e0d82727c522914fb90a7ce594c86307d8f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Autotest: Be nicer when asking the sub-processes to exitThiago Macieira2015-01-028-17/+32
| | | | | | | | | | Instead of killing them outright (and note that terminate() doesn't work on Windows), ask them nicely to exit on their own. This way, if we run them in valgrind, valgrind gets a chance to print the leak check output and summary. Change-Id: Ib6cc8d4560ff0bf255f94980eb220e97592c00f0 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Added ROUND test for PostgreSQLIsrael Lins2014-12-301-13/+17
| | | | | | | The ROUND function for PostgreSQL only accept NUMERIC field as argument Change-Id: I0c3753bfe4167cd47158e21b407cca8771816104 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* [QDateTime] ISO Time zone designators can be [+-]HHIsrael Lins2014-12-301-0/+8
| | | | | | | | | Added support on QDateTime::fromString to read correctly dates on ISO format with Time zone designators at format [+-]HH Change-Id: Ied5c3b7950aee3d0879af0e05398081395c18df5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Added timezone support for datetime fields in PSQLJulien Blanc2014-12-302-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds correct timezone support in PSQL plugin. Prior to this patch, no timezone support was provided, so only the following case worked : * using local time in both client application and postgresql server * datetime were using second precision This patch tries to take care that postgresql has two different datatypes for date time, respectively : * timestamp with time zone * timestamp without time zone Both are internally stored as UTC values, but are not parsed the same. * timestamp with time zone assumes that there is a time zone information and will parse date time accordingly, and then, convert into UTC before storing them * timestamp without time zone assumes that there is no time zone information and will silently ignore any, unless the datetime is explicitly specified as having a time zone, in case it will convert it into UTC before storing it Both are retrieved as local time values, with the following difference * timestamp with time zone includes the timezone information (2014-02-12 10:20:12+0100 for example) * timestamp without time zone does not include it The patch does the following : * parse the date retrieved by postgresql server using QDateTime functions, which work correctly * always convert the date to UTC before giving it to postgresql * force time zone so that timezone information is taken into account by postgresql * also adds the milliseconds when storing QDateTime values The following configurations are tested to work : * client and server using same timezone, timestamp with or without tz * client and server using different timezone, timestamp with tz The following configuration will *not* work : * client and server using different timezones, timestamp without tz Because data will be converted to local time by the postgresql server, so when returned it will be different from what had been serialized. Prior to this patch, it gave the illusion to work because since TZ information was lost, time was stored as local time from postgresql. Lots of inconsistencies occurred, though, in case client tz changes... I don't expect this to be an issue since having different TZ in server and client and *not* handling this is a broken setup anyway. Almost based on changes proposed by julien.blanc@nmc-company.fr [ChangeLog][QtSql] Added timezone support for datetime fields in PSQL Task-number: QTBUG-36211 Change-Id: I5650a5ef60cb3f14f0ab619825612831c7e90c12 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* tst_QUdpSocket: Fix inverted logic in getting a non-"any" addressThiago Macieira2014-12-281-23/+18
| | | | | | | | We want to use "localhost" if the server's address is "any", as some OS can't send datagrams to "any" (e.g., OS X and FreeBSD). Change-Id: I1004bc2282e7f930cdb7ed394aa9f4b5a1cfcf82 Reviewed-by: Richard J. Moore <rich@kde.org>
* Don't hardcode port numbers in tst_QUdpSocket wherever possibleThiago Macieira2014-12-281-10/+15
| | | | | | | | On my Mac Mini, port 5000 is in use, which means the broadcasting test fails. Change-Id: Ifb0883263e277f388342430349ea7315d42f324a Reviewed-by: Richard J. Moore <rich@kde.org>