summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* MySQL: Fix test so it expects the right integer typeAndy Shaw2015-03-201-3/+3
| | | | | Change-Id: Idd90d7881c6458fac7602bf02dad0f794d3b98c9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* MySQL: Keep the precision of the field when formatting the valueAndy Shaw2015-03-201-10/+26
| | | | | Change-Id: I4ab08be5112167a617d6d1d109754f2404a9605f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Diaglib: Add gesture events to event filter.Friedemann Kleint2015-03-202-0/+7
| | | | | | | | Task-number: QTBUG-45134 Task-number: QTBUG-45120 Change-Id: I9b2420ec302dfff173fbc8e3173d6ef0fcf095e0 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Fix tst_largefile QCOMPARE value typesMarko Kangas2015-03-181-6/+6
| | | | | | | | | Added casting to QT_OFF_T type. Otherwise fails on some compilers. Change-Id: I4f1f0c558af7d182a4babf38a7f048b27b3db611 Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make sure remove() doesn't corrupt the json objectLars Knoll2015-03-181-0/+21
| | | | | | | | | When using non latin keys, remove() could cause corruption of the json object. Task-number: QTBUG-42270 Change-Id: I7305e57ebb78630a9bf68bc4f831a6d1646abb79 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix support for iso8859-16 when compiling with ICULars Knoll2015-03-181-0/+8
| | | | | | | | | ICU doesn't support iso8859-16, so we need to fall back to the Qt codec for this encoding. Task-number: QTBUG-45053 Change-Id: I9754cf098c906fe8a75363a3d090029543cd0e35 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix source incompatibility while connecting signals with forward declared ↵Olivier Goffart2015-03-181-1/+20
| | | | | | | | | | | | | | | | | | | arguments QObject::connect tries to determine if the arguments are registered metatypes. This used to work even for arguments that were forward declared. But now, the metatype system tries to call QtPrivate::IsQEnumHelper<T>::Value to know if it is registered. That fails on gcc if T is forward declared. Apparently gcc needs to know the full type of T to pass it in the ellipsis function, even within a sizeof expression. So change the ellipsis expression to a template one. Task-number: QTBUG-44496 Change-Id: I7fa07bd3cde470b134c2ec53b0d581333d16a6f1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove the tests for Ubuntu Oneiric (11.10)Thiago Macieira2015-03-177-17/+0
| | | | | | | | | | | | | | | | | | This system is no longer in the CI rotation and we haven't had reports of the same issues happening on later versions. Either the issues have since been fixed or they were never an issue in Qt in the first place. This commit has the additional benefit of getting rid of the following shell error when qmake was run: sh: line 0: [: =: unary operator expected as /etc/lsb-release hasn't contained DISTRIB_CODENAME for some time and proper quoting was never implemented (not even qtcpsocket.pro). Change-Id: Ia0aac2f09e9245339951ffff13c829e910ee64e9 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* iOS: Skip tests that don't make sense or don't work on the platformTor Arne Vestbø2015-03-161-1/+1
| | | | | | Change-Id: Id6777bdf430ad8a8e3b432caf5000bea8f7860b6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* QStateMachine: add objectName to objects to ease debugging.Erik Verbruggen2015-03-161-1/+9
| | | | | Change-Id: I3c495cc5bd04c0cac24d4abf827d6acfb35b8433 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QStateMachine: fix warnings in test.Erik Verbruggen2015-03-161-3/+2
| | | | | | | | - removed an unused field - initialized variable that might be used uninitialized. Change-Id: I7a7a063f025ecc32fa462dd8d5e2485c2ba52eb8 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Skip instead of entirely excluding tests with disabled featuresMarko Kangas2015-03-1616-55/+122
| | | | | | | | | | | | Properly QSKIP tests that use disabled QProcess and symlink features instead of excluding them silently by #ifdef. Other reason is that moc doesn't respect QT_NO_* defines in class definition which causes build issues on some platforms. Change-Id: I041020f7452f7d36c7ec8a5866a4ba5eb23d1f94 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Network tests: don't try to test against disabled network interfacesThiago Macieira2015-03-162-5/+8
| | | | | | | Other parts of tst_qudpsocket.cpp already did this check. Change-Id: Iee8cbc07c4434ce9b560ffff13ca545a03c9596a Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix build of tests on QNX.Rafael Roquetto2015-03-146-69/+101
| | | | | Change-Id: Ib28e42e3eb10e26555fe392c55534f715bee5f8b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* tst_QUrl: Add extra testcasesThiago Macieira2015-03-141-1/+10
| | | | | | | Task-number: QTBUG-44921 Task-number: QTBUG-44920 Change-Id: Iee8cbc07c4434ce9b560ffff13ca303803916c2d Reviewed-by: Richard J. Moore <rich@kde.org>
* Improve rounding in QCosmeticStrokerAllan Sandfeld Jensen2015-03-121-0/+45
| | | | | | | | | | | Fixes the drawn position of end points in drawLine. Based on a patch by Jørgen Lind, and modified so that it caused no test regressions. Task-number: QTBUG-38144 Change-Id: I24aa28480cc6ae09abf91d80378970565a29b254 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Cocoa: Correct mouse event forwarding for popupsMorten Johan Sørvig2015-03-122-0/+156
| | | | | | | | | | | | | | | | | | | | We need to track the active popup globally, having parent windows track child popups is not sufficient since there may be one or more intermediate windows in between the event receiving window and popup window. Add API to QOCocoaIntegration for tracking the global popup window and use it instead of the per-window tracking. Make sure to only close popups on clicks outside the popup only. Add code to QNSView::handleMouseEvent that redirects mouse events to the active popup. Add manual test. Change-Id: Ia3e3fd42d8fddf5c69f0c6879b333ca544521f61 Task-number: QTBUG-43464 Task-number: QTBUG-31937 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Track modifications of white space in QString::simplified().Friedemann Kleint2015-03-121-0/+2
| | | | | | | | | | The existing check fails to detect the case where white space characters other than the space character are replaced by space characters without the length actually changing and returns the original string. Task-number: QTBUG-44936 Change-Id: Ice6faa975f8b41f185c76f6d0d4ff81603e25eb3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QWindow::initialSize: Use showNormal() instead of show()v5.5.0-alpha1Tor Arne Vestbø2015-03-121-3/+3
| | | | | | | | | | | | | On some platforms show() may result in the window being shown full screen, depending on the defaultWindowState of the platform. If that's the case, the resulting window size does not follow the requested size (though the internal normal geometry should). We need to use showNormal, so that we guarantee that the window state is WindowNoState. Change-Id: Ied080eaca13d759501ea292b5e6b2df4e3b32426 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* CMake: Fix regression with quoted OPTIONS parameterAndré Klitzing2015-03-111-0/+3
| | | | | | | If a parameter contains quotes the check for "-binary" fails. Change-Id: I27148b590d85291a93f1992dfd277fb857bec6e2 Reviewed-by: Stephen Kelly <steveire@gmail.com>
* tst_QDateTime: remove silly test for timezone date too earlyThiago Macieira2015-03-111-7/+5
| | | | | | | | | | Let's not try to to compare our QTimeZone handling with the system one. Our handling goes beyond the range of the POSIX APIs, so that's a recipe for error. Change-Id: Iee8cbc07c4434ce9b560ffff13ca4a4f335bdbae Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* tst_QDateTime: Mark more Windows incorrect transitionsThiago Macieira2015-03-111-0/+12
| | | | | | | | | | | | | | The refactoring from a8c74ddcf78604c9038ba2a2bea81e445e4b3c58 commit exposed more issues in the Windows API. There were already quite a few QEXPECT_FAIL for this, so this isn't new. For example, localtime(1351386000) on the Central European Timezone should be "Sun Oct 28 02:00:00 CET 2012" (the second occurrence of 2 am), but the Windows API returns tm_isdst = 1 (i.e., still in the CEST timezone) and that's incorrect. Change-Id: I1bc63ac99b1d67b55d783f9606e5c59b24223b13 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Fix regression in time zone handlingFrederik Gladhorn2015-03-111-12/+0
| | | | | | | | | | | | In QtScript we use the msecs since epoch conversion (JS date is based on the concept). After a8c74ddcf78604c9038ba2a2bea81e445e4b3c58 the date conversion test in qtscript started to fail. Instead of relying on the code working by chance, simply update the date when setting it with setMSecsSinceEpoch. Task-number: QTBUG-44885 Change-Id: I9f95c9cdccea52e7d1f808f3cb9e18570ef0df13 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QAbstractButton: emit released on focus out or disableFrederik Gladhorn2015-03-101-0/+32
| | | | | | | | | | | | | When pressing a button with the mouse and then moving the focus away, the internal and visual state of the button would get updated, but the released signal would not be emitted. The same goes for disabling the button, although in 99% of the cases, disabling the button will also move the focus, so the first case already takes care of emitting the signal. Task-number: QTBUG-42775 Change-Id: Ib6ba8e0a75f0349b66d1e799b02bd8498db85022 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Remove cruftFrederik Gladhorn2015-03-091-18/+0
| | | | | Change-Id: I8e0bf5b9befb0e9639da15b07072d046c038ea85 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Fix building tests on QNXAllan Sandfeld Jensen2015-03-092-9/+4
| | | | | | | Use qmath and cmath methods instead of math.h methods. Change-Id: I86ee2465c999822bf00a7cefee1642c4c30590a6 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
* QStringAlgorithms::simplified_helper: add missing check for detachedThiago Macieira2015-03-071-0/+9
| | | | | | | | Otherwise, we modify shared strings that happened to be rvalues. Task-number: QTBUG-44706 Change-Id: Ia0aac2f09e9245339951ffff13c85bfc912f03d1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Fix race condition in QDateTime::timeZone() and other methodsThiago Macieira2015-03-071-0/+53
| | | | | | | | | | | | | | | | | | | | When timezone support for QDateTime was added, we decided it was a good idea to delay creating the QTimeZone object and checking that the time is valid in that timezone (including for local time) until the user requested that information. Unfortunately, QExplicitlySharedDataPointer returns a non-const T* in operator->(), which meant we were accidentally modifying the d pointer's contents in const methods, which in turn means those const methods were not thread-safe when operating on the same object. This commit changes the d pointer to QSharedDataPointer, which is safer in this regard and pointed out where the issues with constness were located. Since we can't lazily calculate QTimeZone anymore, we need to do it whenever the date, time or offset changes. Task-number: QTBUG-43703 Change-Id: Ic5d393bfd36e48a193fcffff13b9686ef4ef1454 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Introduce QQuaternion::rotationTo(vecFrom, vecTo)Konstantin Ritt2015-03-071-0/+60
| | | | | | | | | which returns the shortest arc quaternion to rotate vector from to the destination vector to. Change-Id: Ibd7a746789ecdfe6f7fe17e4ac9049f7ac46560d Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* [QQuaternion] Add a way to convert to/from orthonormal axesKonstantin Ritt2015-03-071-28/+95
| | | | | | | | It is just a convenience wrapper around convertion to/from the rotation matrix. Change-Id: I27511b43866827172960b0152f1c7b65da857f6f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add a QHostAddress::toIPv4Address overload taking a bool *okThiago Macieira2015-03-061-0/+48
| | | | | | | | | This allows one to check whether the conversion is successful without checking for the return result, as the value of 0 represents the valid IPv4 address 0.0.0.0. Change-Id: I637fe55583f2255c85b0d955e5886b61494e0c7c Reviewed-by: Richard J. Moore <rich@kde.org>
* QHostAddress: Revert auto-converting of IPv6 v4-mapped addresses to IPv4Thiago Macieira2015-03-061-0/+5
| | | | | | | | | | | | | | | | | | | In 85136496bc8517951dcc3e670d1a46d340819f0d, Shane made QHostAddress automatically convert any IPv6 address that was v4-mapped to IPv4 in QHostAddress. While that is an interesting trick, it prevents us from being specific about what we want. On some OS (like FreeBSD and OS X), the distinction is relevant, so keep it. Moreover, it was inconsistent: it might fail depending on how the QHostAddress was constructed and the order of comparison. [ChangeLog][Important Behavior Changes] QHostAddress will no longer convert IPv6 addresses of type "v4-mapped" to IPv4. To perform this conversion manually, construct another QHostAddress with the result of toIPv4Address(). Change-Id: I06afbc7018539804bb3044ef1fe6a49ac7a5f240 Reviewed-by: Richard J. Moore <rich@kde.org>
* Make QPersistentModelIndex an internal meta-typeGabriel de Dietrich2015-03-062-0/+17
| | | | | | | | | | | It was already a user meta-type, so it only gets promoted to internal. [ChangeLog][QtCore] QPersistentModel index becomes an built-in meta-type, including QVariant support. Change-Id: I63d733d1eb66aa61691e7afce27fe7372a83ac00 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Manual dialog test: Add a message box for printer errors.Friedemann Kleint2015-03-051-8/+41
| | | | | | Task-number: QTCREATORBUG-13742 Change-Id: I137854eee589cde7a6cf3b841b0b63311e031517 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Introduce QQuaternion::dotProduct()Konstantin Ritt2015-03-051-0/+55
| | | | | Change-Id: I14b9857ca0a43808b7d536fc258a6bb10f611211 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Make QCoreApplication::applicationName available after app destruction.David Faure2015-03-051-4/+9
| | | | | | | | | | | | | | | | Calling applicationName() in the destructor of a global static (e.g. via QLockFile) was working when calling setApplicationName explicitly but otherwise it would suddenly return an empty string. This led to inconsistencies, the application name switching from non-empty to empty at saving-on-destruction time. There was already a global static, used when setting the app name explicitly before construction. Use it now to store the app name in all cases (explicitly set, or fallback). Change-Id: I71d3a0c40158f8bfd022c385b198346a2594b1cb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add missing fetchAndXxx methods to atomic classes based on std::atomicThiago Macieira2015-03-0551-19/+111
| | | | | | | | And add tests for the GCC intrinsics and for std::atomic. Task-number: QTBUG-43794 Change-Id: Ic5d393bfd36e48a193fcffff13b9b2dbaee80469 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix bind+connect in both TCP and UDPThiago Macieira2015-03-042-13/+182
| | | | | | | | | | | | | | | | | This has been known to be broken for a while. Now it works: you can bind and you'll retain the port (and the file descriptor) for the connect call. Incidentally, in fixing the binding for more than one IP for the hostname (with event loop), this commit fixes the setSocketDescriptor XFAIL. [ChangeLog][QtNetwork] Fixed a bug that caused both QTcpSocket and QUdpSocket to close the socket and lose any bound ports before connecting. Now bind()/setSocketDescriptor() followed by connect() will retain the original file descriptor. Task-number: QTBUG-26538 Change-Id: I691caed7e8fd16a9cf687b5995afbf3006bf453a Reviewed-by: Richard J. Moore <rich@kde.org>
* Merge remote-tracking branch 'origin/5.4' into 5.5Oswald Buddenhagen2015-03-041-4/+4
|\ | | | | | | Change-Id: I556be99cc7ad3fc6f7177542b7444269616a7478
| * tst_QNetworkDiskCache: Stop using actual web serversThiago Macieira2015-03-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | www.example.com is a reserved domain (RFC 6761), but IANA is running a web server there. As for www.foo.com, that also exists, is a real website and is often content-filtered in corporations (it triggers a firewall warning for me -- "You attempted to visit a site that is in violation of Intel acceptable use guidelines"). So use a localhost instead, since we don't actually need to connect to the servers to do the work. And since we don't need to connect, I chose port 4 as it's extremely unlikely someone is running an HTTP server there (/etc/services lists it as unassigned). Change-Id: Ia0aac2f09e9245339951ffff13c82439c6d5f945 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Optimize fallback RGB888 to RGB32 conversionAllan Sandfeld Jensen2015-03-032-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | Improves the conversion from RGB888 to RGB32 on platforms without SIMD versions. This includes the fallback used on non-neon ARM devices. Besides image conversion the routine is also used for decoding JPEG. On x86 this version is within 0.7x of the speed of the SSSE3 version. Change-Id: Id131994d7c3c4f879d89e80f9d6c435bb5535ed7 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | QTabletEvent manual test: use built-in QDebug operatorShawn Rutledge2015-03-031-77/+11
| | | | | | | | | | | | | | | | There's no need to decode the event details here anymore, and anyway this had a bug: it always said the device is unknown. Change-Id: If99dddbe2136d95e818f4fe526f62650cbd7c1ca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | autotests: fix the build in case of QT_NO_WHEELEVENTShawn Rutledge2015-03-037-1/+34
| | | | | | | | | | | | | | Wheel event tests aren't possible if there's no wheel event. Change-Id: Ibe380c01fbf6cebfd2f43c6ecb52863134ea3c01 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Oswald Buddenhagen2015-03-026-13/+138
|\| | | | | | | Change-Id: I95b3a87c5068c6b8068b30a35655b4c2419e7f9e
| * Fix drawing of background for multipage QTextTable cellsJoni Poikelin2015-03-021-0/+115
| | | | | | | | | | | | Task-number: QTBUG-31330 Change-Id: I0103919ee2864b7cd8bed41e6d6fe4ac5b84142e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Revert "Update the DNS and name-resolver tests to the official zone"Thiago Macieira2015-03-013-7/+7
| | | | | | | | | | | | | | | | | | | | This reverts commit 24c52bd44b700725d4feec0d2e05a7e382e59c4e and makes the Qt unit tests requiring DNS zones to use the temporary test zone in macieira.org (Thiago's domain). Change-Id: Ia0aac2f09e9245339951ffff13c6d3752c83b773 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
| * Fix crash when converting format of QImage created from bufferEirik Aavitsland2015-02-261-0/+13
| | | | | | | | | | | | | | | | | | | | When doing format conversion, the optimized inplace codepath did not check if the image data was readonly, i.e. if the QImage had been created by the constructor taking an existing external buffer. Task-number: QTBUG-44610 Change-Id: I085ff8da427bc4ee392f548dffd2418b63148965 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Autotest: fix existence check after c8c68ec.David Faure2015-02-241-6/+3
| | | | | | | | | | | | | | | | | | The files were moved to a qrc resource, so the string is never empty, we need to use QFile::exists to make sure they exist. And the error message was wrong, pointing to current dir. Change-Id: I532bda9f6221fb5c69b779b8b48baac9ede90eba Reviewed-by: Rainer Keller <rainer.keller@theqtcompany.com>
* | Prevent static functions of Q[Gui]Application from crashing if there is no ↵Friedemann Kleint2015-02-272-0/+62
| | | | | | | | | | | | | | | | | | | | instance. Add tests. Task-number: QTBUG-44499 Change-Id: I160b089ad3f23ab71a87519e50f8a2ef5d2a4a6f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Use C++ <cmath> instead of <math.h> in math3d autotestsKonstantin Ritt2015-02-263-9/+10
| | | | | | | | | | Change-Id: I2e13ec190ec42ac7732ce9ed3ca5567f637beb1e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>