summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Provide operators for QMargins.Friedemann Kleint2013-01-071-0/+44
| | | | | | | | | | Provide addition/subtraction for QMargins as well as multiplication and division for int/qreal similar to QPoint. Add unary minus. Change-Id: If4eb831cfd610b34b5ca361619b1636031811d0a Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Add API dealing with QMargins to QRect.Friedemann Kleint2013-01-071-0/+21
| | | | | | | | | | - Addition of a QMargin to a QRect. - Removal of a QMargin from a QRect. - Remove implementation from Windows platform plugin. Change-Id: Iae54bc13e94a7ece48853b1d3f3de2bfc154d2dd Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Improve QRegularExpression autotestsGiuseppe D'Angelo2013-01-071-0/+9
| | | | | | | | | Check that the regular expression, the match type and the match options returned by QRegularExpression/QRegularExpressionIterator are the same ones passed to match / globalMatch. Change-Id: Ibd282379bb60b53d614b1d56a7e08b3d6c236da6 Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Automatically register method types in QSignalSpy.Stephen Kelly2013-01-071-0/+36
| | | | | Change-Id: I3655291dca6dbd3d8d09ee835b85983caa911b64 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Introduce QRegularExpressionValidatorGiuseppe D'Angelo2013-01-074-0/+126
| | | | | | | | QRegularExpression counterpart for QRegExpValidator. Change-Id: Ib391e73dd49e32aeb9b48e6f2217b67a17a83a11 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Merge branch 'stable' into devFrederik Gladhorn2013-01-04197-535/+951
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/painting/shared/shared.pri src/corelib/tools/qharfbuzz_p.h src/corelib/tools/qunicodetools.cpp src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp Change-Id: Ibc9860abf570e5ce8b052fb88feb73ec35e64bd3
| * test: Change trolltech.com:443 to qt-project.org:443Sergio Ahumada2013-01-031-1/+1
| | | | | | | | | | | | | | | | trolltech.com seems to be shut down already Change-Id: Ic90ce01aeb51b6f154b9bbf4762c365a398c9e3d Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| * Speed up and fix QByteArray::setNum()hjk2012-12-301-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | Going through QLocale and QString is not really needed. This also makes the result of the conversion of negative numbers in bases other than 10 independent of the architecture and implements the documented behavior of treating them as unsigned types. Change-Id: Ibc231dc5241deb5cbadd9796484a8b5f79c29410 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Add test for QByteArray::setNumhjk2012-12-281-0/+27
| | | | | | | | | | | | Change-Id: I66f3954433bf50fb23fdaeef804838d993e965b5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Fix QMutex::tryLock with negative valuesThiago Macieira2012-12-231-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | The Linux futex implementation had a Q_ASSERT for positive values, but the documentation says that negative values should be interpreted as infinite (equal to lock()). Test that too. Change-Id: I2f96a502d672732781e88e49797756ca9a809121 Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * QUrl::fromUserInput: fix for urls without a host.David Faure2012-12-231-0/+4
| | | | | | | | | | | | | | | | | | | | QUrl::fromUserInput("http://") was invalid, which doesn't make sense since QUrl("http://") is valid. Same for "smb:" which is actually even more a valid URL from a user's point of view. Change-Id: I371ac393d61b49499edf5adbbc2a90b426fe9e5d Reviewed-by: Marco Martin <mart@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fix QSqlQuery test in relation to PSQL supportAndy Shaw2012-12-222-14/+28
| | | | | | | | | | | | | | | | | | Some things needed to be corrected for testing with PSQL, this was checked against the the PostgreSQL documentation to confirm that the exepected behaviour is correct. Change-Id: I45a6b343e9eb920fcae2a62910ecc956abcac0f0 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
| * Make sure that the strict parser is also operating on setXxxThiago Macieira2012-12-211-0/+78
| | | | | | | | | | | | | | | | | | | | | | These cases weren't handled before. The validateComponent function is copied from QUrlPrivate::parse, with the added modification that it now needs to check the gen-delims for the userinfo. Change-Id: I055167b977199fa86b56a3a7259a7445585129c6 Reviewed-by: David Faure (KDE) <faure@kde.org>
| * add and use qtHaveModule() functionOswald Buddenhagen2012-12-2128-32/+32
| | | | | | | | | | | | | | | | | | | | | | this is much more elegant than the so far propagated !isEmpty(QT.foo.name). also replace feature-specific tests (no-gui and no-widgets) and the obsolete contains(QT_CONFIG, foo) syntax. Change-Id: Ia4b3c8febcabf9eeca67b1f9173a523820b1038b Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Fix some typosSergio Ahumada2012-12-212-2/+2
| | | | | | | | | | Change-Id: I4e8d9bd8ea66ec810e4f1fbfd8ddbf25c4b3d980 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| * Tests: stabilize tst_QAbstractScrollArea::setScrollBars2()J-P Nurmi2012-12-201-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | Use QWidget::isVisibleTo(parent) instead of isVisible(), just like QAbstractScrollArea::replaceScrollBar() does. This removes the need of using QCoreApplication::processEvents() to deliver the actual hide event just for testing if the scrollbar was requested to be hidden as it should. Change-Id: Ie9a816e7b871d280a4b3d9d76adb10601915bd56 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
| * tst_QDBusXmlParser: more reliable solution for setting the seedDavid Faure2012-12-201-2/+8
| | | | | | | | | | | | | | | | | | As recommended by Giuseppe, don't rely on the env var, but use the internal but exported seed atomic int. This way, the compiler will detect breakages, rather than runtime. Change-Id: Iec2bc88c53532d3463d2dc5c73631fc9bc34747b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fixes: out of bounds memory access in QImage autotestaavit2012-12-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | A pointer to the data of one qimage is used, with an offset, in a copy. In the mono case, that could lead to overflow: the last row would of the copy would stretch 1 byte beyond the end of the allocated area. Fix by reducing the height of the copy, so that it keeps within the allocated memory. Task-number: QTBUG-28322 Change-Id: I09abfc83f738f8af000fc50f8c94f63dba3a6cfe Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * QUrl auto tests: make sure setAuthority is consistent with setHostPeter Hartmann2012-12-201-0/+24
| | | | | | | | | | | | | | ... with respect to empty and null strings. Change-Id: Ic107d5bcc8b659497a567b75a7244caceba5a715 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QUrl auto tests: ensure toEncoded() and toString() match wrt. empty authPeter Hartmann2012-12-201-0/+6
| | | | | | | | | | | | | | Task-number: QTBUG-8701 Change-Id: I55780a910a0d0996488475f5ce49a240f6223df0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * tst_qaccessibility: Fix warnings about window geometry on Windows.Friedemann Kleint2012-12-191-0/+22
| | | | | | | | | | | | | | | | | | Make windows frameless so that size constraints for decorated windows do not interfere. Task-number: QTBUG-28696 Change-Id: Ic4410d8a6e8166bdfe013ed2362173f8e02d4b29 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| * Change ftp.qt.nokia.com -> ftp.qt-project.orgSergio Ahumada2012-12-182-23/+23
| | | | | | | | | | | | Task-number: QTBUG-28156 Change-Id: I0060144f0336791933205355b125251ccba73b3e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QMdiArea: Increase minimum size for Windows 8/Large fonts.Friedemann Kleint2012-12-181-2/+2
| | | | | | | | | | | | | | Task-number: QTBUG-28611 Change-Id: I115a5fa6726ac99c2bbff4ec65d3f8856b2530df Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
| * Fix QStyle-test for Windows Aero / 8.Friedemann Kleint2012-12-181-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | Increase tolerance on Windows for the Aero style. Set small top level widgets frameless to avoid warnings about minimum size of decorated windows on Windows. Task-number: QTBUG-28611 Change-Id: Ia4aec0cf0763da9955577054cb8cf81337fac134 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * tst_qstyle: Fix compiler warning about unused variables.Friedemann Kleint2012-12-171-2/+2
| | | | | | | | | | Change-Id: Ida6a45be577cc1e21a2ba2b45f57b1e96c944fb2 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
| * Use frameless widgets in tst_qgridlayout.Friedemann Kleint2012-12-171-1/+29
| | | | | | | | | | | | | | | | Avoid failures caused by minimum window widths on Windows Areo/8. Task-number: QTBUG-28611 Change-Id: I9affcce84ab804a45fa1a12fb93ad0136e6ae877 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
| * Delete the QSlotObject when disconnect()ingGiuseppe D'Angelo2012-12-171-8/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When disconnect()ing through a QMetaObject::Connection, if the QObjectPrivate::Connection contains a slot object, deref it, so that it will be destroyed before the next run of cleanConnectionList. Previously, a copy of the functor passed to connect() was kept until QObjectPrivate::cleanConnectionLists was called (by adding a new signal, or the sender was destroyed), even after a successful call to disconnect(). That is, we were keeping that copy allocated without any good reason. Change-Id: Ie6074ea797df1611cb995dec07c5b5a742360833 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Reset the QMetaObject::Connection dptr when disconnect()ingGiuseppe D'Angelo2012-12-171-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | The QObjectPrivate::Connection refcount was not decreased when disconnect()ing, therefore it was kept alive by the owning QMetaObject::Connection object. This removes a leak in case the QMetaObject::Connection survives the sender object, after a successful disconnect(). Change-Id: Ie2ea59b269a0e589ae23c1457df7533be77c0797 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Remove useless QVERIFY(true)Giuseppe D'Angelo2012-12-171-2/+0
| | | | | | | | | | | | | | | | More QVERIFY()s were added in the meanwhile to the test function, so we can drop this one. Change-Id: If6f137f45ba606b61d6a7004556a667ed316b61f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * remove obsolete DEPENDPATH assignmentsOswald Buddenhagen2012-12-171-1/+0
| | | | | | | | | | | | | | | | qmake now add CONFIG+=depend_includepath by default, making manual DEPENDPATH setup unnecessary. Change-Id: Ie57cf05c369e21b5b9e099b6ce9be4f75da1508f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * remove some unnecessary CONFIG additionsOswald Buddenhagen2012-12-178-9/+3
| | | | | | | | | | | | | | | | qt is already added by spec_pre.prf, warn_on and depend_includepath by default_pre.prf. Change-Id: Ic00e0ba496d698ed9659c476f2ca99fc0f86a093 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * Fix possible crash in tst_QThread::quitLock() testPeter Kümmel2012-12-171-7/+9
| | | | | | | | | | | | | | | | Don't read member variable of deleted Job object. Change-Id: I71a6565c4932427e9cbab744c2e472b62ea98ca2 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fix focusproxy-relayed crash in QGraphicsItem destructor.Andreas Aardal Hanssen2012-12-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes tst_qgraphicsitem::tst_focusProxyDeletion not crash. valgrind reported the error when running tst_qgraphicsitem. The crash was very real; when deleting an item that has another item as a focus proxy, the proxy still had a reference to the deleted item's focusProxy pointer. I'm not a huge fan of whitebox testing but thought this crash justifies a modification of the test to make it fail, instead of just passing silently with a warning only given by valgrind and friends. FTR the reason the test doesn't crash hard is that the memory is freed but not reused within the scope of the test. So the access to the pointer d_ptr->focusProxy succeeds, it just accesses memory that might as well have been reclaimed. But this is quite undefined... Task-number: QTBUG-28321 Change-Id: I2624631f5e5c2a8aa8bd4efe1fc128eba6c61f56 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| * Call QAccessible::updateAccessibility when caret moves in QTextEditJosé Millán Soto2012-12-161-0/+2
| | | | | | | | | | Change-Id: I3b9e5d8e67b4928558b642a4d23aa60ae9dfde60 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * Remove the timestamp info in genarated filesLiang Qi2012-12-15102-206/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | For moc, rcc and uic, then it's friendly for tools like ccache. ccache is using md5 to check file modification, but the different timestamp info will cause different md5 for same meaningful contents, it will disabled ccache. Updated the autotest for uic and rcc. Task-number: QTBUG-26589 Change-Id: I9f1dcf6cd826ad9603af6e183757bcd748c32bd1 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Fixed invalid memory read in SSSE3 image blending code.Samuel Rødal2012-12-141-0/+20
| | | | | | | | | | | | | | | | | | | | We need to do bounds comparison on the actual offset we're going to use with _mm_load_si128 to read 16 bytes from memory (even though we won't use the trailing bytes in the end). Task-number: QTBUG-28324 Change-Id: Id0d6094da796ca67338d8ad225fa6b2f309bbe6e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * SQL: Fix autotests for MinGWKai Koehne2012-12-142-0/+4
| | | | | | | | | | | | Change-Id: Ib05a120db16f65d9833663445c028971d4de3d29 Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Remove MSVC2012-optimization for the QMetaType-test.Friedemann Kleint2012-12-141-2/+7
| | | | | | | | | | | | | | | | | | As otherwise compilation takes hours. Task-number: QTBUG-28611 Change-Id: I0ad73bf6ea4d7d4594e902c101bf52969daca341 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
| * Add missing uuid lib for qaccessibility testJonathan Liu2012-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | IID_IAccessible requires linking with the uuid lib. Change-Id: Ic34d5c9bdb6168df7d2447c8aebf1bc519e5f7cd Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| * tst_QDBusXmlParser: make XML attribute order deterministicDavid Faure2012-12-141-0/+7
| | | | | | | | | | | | | | | | Avoid QHash randomization so that the order of the XML attributes is stable This was causing intermittent failures. Change-Id: I4cc0dba4b0c2ec36601f3b06fb17ff80005cc9fb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Fix empty window title regression, add application display name to window titleDavid Faure2012-12-141-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This increases consistency a lot: all windows and dialogs from a Qt application will show the app display name in the caption, on Windows and X11. This helps identifying which app a dialog belongs to, which is especially useful when the dialog is very generic and shows up unexpectedly. For compatibility reasons, the app name is added to the caption only if setApplicationDisplayName() was called -- or if the caption would be completely empty. The standard Qt4 case (setWindowTitle + no display name) is unchanged. Change-Id: Ib284c62c1f4c0bc923e5bc2d10247d95e9aa76c1 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
| * Mark QAbstractTextDocumentLayout test as insignificantEskil Abrahamsen Blomfeldt2012-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | This test fails on some setups and a pending critical change causes the existing bug to trigger in CI. To avoid blocking other changes because of this bug, it's been marked as insignificant until such a time when it can be fixed. Change-Id: Ide41f7b1c76209f9c05f95f996b2364d5dea5e67 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| * Added missing detach() to QJsonObject::take()Denis Dzyubenko2012-12-131-1/+16
| | | | | | | | | | | | | | | | | | We also need to detach() the taken value in case the compaction triggers and modifies the underlaying data. Change-Id: Idcdeba4236b8e208d107d41be2decbdfc5721300 Reviewed-by: Bjørn Erik Nilsen <post@bjoernen.com> Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
| * Mark QGlyphRun and QStaticText tests as insignificant on LinuxEskil Abrahamsen Blomfeldt2012-12-132-0/+3
| | | | | | | | | | | | | | | | | | | | These tests have been failing on certain setups for a while, but some new critical changes causes the failure to trigger on the CI system as well. We mark them as insignificant until they can be fixed. Change-Id: I467e7030c55d6f23515275b4062c17068d2b688c Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| * QMenu: Do not set snapToMouse if a caused-widget exists.Friedemann Kleint2012-12-121-4/+37
| | | | | | | | | | | | | | | | | | | | | | | | When clicking at the bottom-right corner of a menu in a menu bar, it appears at the wrong position. Add test and stabilize RTL-tests by making sure the layout direction is cleared should they fail. Task-number: QTBUG-28031 Task-number: QTBUG-2596 Change-Id: Ibc5ae916388753908e9f3ee98e8859faaa0c8723 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Accessible: Improve value interfacev5.0.0-rc2Frederik Gladhorn2012-12-121-0/+3
| | | | | | | | | | | | | | | | | | The stepSize property was missing in Qt 4 and is a sensible addition to the value interface. Change-Id: I7571800d50ee7e4194c09c4db40300809a1ce45a Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * test: Skip tst_QMdiArea::nativeSubWindows() on Windows/ANGLE.Friedemann Kleint2012-12-121-1/+4
| | | | | | | | | | | | | | | | Task-number: QTBUG-28545 Change-Id: Ifa698b9efe38654c8f8fbcc184db5d176df7ba47 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| * centralize headersclean testOswald Buddenhagen2012-12-114-166/+2
| | | | | | | | | | | | | | | | | | so other modules can actually re-use the code without referencing qtbase sources. Change-Id: Id66f07b476e539273dd32455e7642a17d7e5d0ef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * don't use testlib for headersclean testOswald Buddenhagen2012-12-113-68/+11
| | | | | | | | | | | | | | | | | | this is a compile-only test, and it's not even marked as a testcase in the autotest system. Change-Id: I9b48ddad3c8e3e953d0e6fcfa010bab73289bc6f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * Generate the introspection string during parsingKevin Ottens2012-12-112-29/+72
| | | | | | | | | | | | | | | | | | | | | | Commit 0696071316b3dacb8d1ca15a269e4f4215642b9d moved away from QDom but also lost the ability to fill the introspection field of the created QDBusIntrospection::Interface instances. This commit now generate the string again as we proceed with the QXmlStreamReader based parsing. Task-number: QTBUG-26668 Change-Id: I8f406e1f4e9d3e667a8557db69da36cac369ba4f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>