summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* test: Remove QSKIP from tst_QSettings::fileName()Sergio Ahumada2012-10-241-4/+5
| | | | | Change-Id: I24ed2d182faff989f62f192246ebf95ca492c10d Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* test: Remove QSKIP from tst_QClipboard::copy_exit_paste()Sergio Ahumada2012-10-241-5/+7
| | | | | Change-Id: Ib64680dbd966940c56ab089ff1b7727b237fdaee Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* test: Rename test case name TestQtJson -> tst_QtJsonSergio Ahumada2012-10-241-58/+58
| | | | | | | | | | | | | | This allows us to follow test naming convention which should start with "tst_" Before: TestQtJson::initTestCase() After: tst_QtJson::initTestCase() Change-Id: Id83ccc324776399184c3665565eb8d045bfee2e2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* test: Fix tst_QDir.equalityOperator()Sergio Ahumada2012-10-241-1/+1
| | | | | | | | On Fedora 17 /sbin/ is a symlink now, so this test fails there. Using /usr/ instead. Change-Id: Ie35902fc093101191bdbf33324e20835d1da1528 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Return invalid datetime when calling addMSecs with invalid QDateTime.Mitch Curtis2012-10-241-22/+34
| | | | | | | | | This is in line with what QTime::addMSecs and QDate::addDays do, for example. Change-Id: I902112486727f74f669a97bde6c42028e0838f8d Reviewed-by: Jon Severinsson <jon@severinsson.net> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Improve QTime test coverage.Mitch Curtis2012-10-241-0/+11
| | | | | | | Change-Id: If47de3dc047ac4f8a4a1498cf225e03bbbf4110e Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Jon Severinsson <jon@severinsson.net>
* Improve QDate test coverage.Mitch Curtis2012-10-241-33/+64
| | | | | | | | | | | | Some statements could not be tested, such as default cases of switches where all possible cases are already handled and some statements where the system locale is used. I also removed some statements that would never be reached and hence will never be able to be covered by tests. Change-Id: I8ea3071f66d942d986e65708732af6751d36b5e3 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Output leading zeroes for yyyy date formats in QLocale::toString().Mitch Curtis2012-10-241-0/+4
| | | | | | | | | | Converting the date 1 January 0001 to a string in the format "dd MMMM yyyy" currently results in the string "01 January 1", but it should be "01 January 0001". Task-number: QTBUG-27287 Change-Id: Ia025da7343d1c36aaee34c47c6db551a6e89595f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Stabilize tst_qfontdialog test case.Miikka Heikkinen2012-10-231-6/+19
| | | | | | | | | | | | | The delayed quit signal used as failsafe to ensure exit from event loops interfere with later test if the test case works normally, as closing the last toplevel window will also exit the event loop. Fixed by stopping the quit timer if nested application exec loop is exited. Change-Id: If87655f1f28f50e27a64f3430c9f65bb3ab7dd70 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com>
* Fix QRegExpValidator::validate docs about the pos parameterGiuseppe D'Angelo2012-10-221-2/+9
| | | | | | | | | | | | | | | | | | | The code sets it to input.length() iff the regexp doesn't match the string, while the docs say it's *always* set. Therefore, make the docs match what the code does and add a simple test to enforce it. We're not changing the code to match the docs because 1) it's better to stay conservative (we don't want to break existing behaviour); 2) this behaviour mimics what the int/double validators do (they don't move pos at all). Change-Id: I958074558de6b0fc5944101c6535fc7e00442ae9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Remove Cleanlooks and PlastiqueJens Bache-Wiig2012-10-2214-106/+61
| | | | | | | | | We have a new style Fusion that will replace these styles. They will be moved to a separate module rather than included in platforms that do not need them. Change-Id: I51ebbcad5406e99130e5b12e62ba624d1489088c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Make QPen default to 1-width non-cosmetic.Samuel Rødal2012-10-229-33/+109
| | | | | | | | | | | Use the Qt4CompatiblePainting render hint when painting with QPainter to treat default constructed QPens as cosmetic still. The NonCosmeticDefaultPen render hint gets documented as obsolete, since it was in any case not respected by the raster nor OpenGL paint engine. Change-Id: I04d910e9700baf7f13a8aac07a3633014bb9283e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix integer overflow in QSpinBox.Stephen Kelly2012-10-221-0/+31
| | | | | Change-Id: Ic204d42fbdffc44576f7e76132bc53621e836299 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* normalise signal/slot signatures [QtGui tests]Marc Mutz2012-10-226-64/+64
| | | | | Change-Id: I42e11de9ef1d8a04b2a8e200afb84f2245f3361a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Revert removal of commented out tests in tst_qdatetime.cpp.Mitch Curtis2012-10-221-0/+7
| | | | | | | | | | | | Two lines were commented out but were removed with Ib6ceb1cb7fb4c6eca672495f96d9cfd907853c85. They have been replaced as expected fails. Task-number: QTBUG-22833 Change-Id: Ib154a31bffcdc8e43c6ad236df193e99334652c6 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* normalise signal/slot signatures [QtCore tests]Marc Mutz2012-10-2218-240/+240
| | | | | | | | | | Normalise all signal/slot signatures in tests/*/corelib, except in tst_QObject, where they might be test data. Change-Id: Id4e101f285b1676bb583b0afae06d235e599e24b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Remove the QThread::terminated() signalSze Howe Koh2012-10-191-2/+2
| | | | | | | | | | | | | | | | | The signal is removed from the API; all references to it are removed from documentation; the unit test that checks for its emission is modified to listen for QThread::finished() instead. The QThreadPrivate::terminated flag is also removed, as it served no purpose other than to trigger the emission of QThread::terminated() As discussed at http://lists.qt-project.org/pipermail/development/2012-October/007216.html the signal is not guaranteed to be emitted after every termination, rendering it useless. Change-Id: I7b0c45d7889da0d33875545331606f2208ee56fc Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QFont: Don't invalidate engine unless request has been changedKonstantin Ritt2012-10-192-0/+44
| | | | | | | | | | This makes QFont do a "light" detach when the font attributes data has been changed. The new test clearly shows that the engine is now shared between two font instances after changing the kerning attribute. Change-Id: I59db822f459f02d111686dba7101b98e361fada9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* detach() safely in QVector::erase(), and update callers to not detach.Andreas Hartmetz2012-10-191-13/+104
| | | | | | | | | | | | | | | | remove() can use non-detaching iterators internally before calling erase(), which hasn't been exploited so far, so that the detach() in erase() never actually detached. When using erase() from outside, you can't do it legally without calling begin() or end() that detach() before erase() is called. Now remove() doesn't detach anymore, and detaching in erase() works. With new tests that fail after changing only the erase() callers and pass again after fixing erase(). Change-Id: I47c0a9e362dce8628ec566f5437d951755de96c8 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* normalise signal/slot signatures [QtSql tests]Marc Mutz2012-10-193-12/+12
| | | | | Change-Id: I06573bc2ad58378dd835565cd07d711bfc760411 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Test: remove QSKIP from tst_QStringList::initializeList()Caroline Chao2012-10-191-4/+6
| | | | | | | | Instead omit the whole test when Q_COMPILER_INITIALIZER_LISTS is not defined. Change-Id: I34017484a027b95a2677e1c4cb9231fa2aeb5680 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Test: remove QSKIP in tst_QLocale::emptyCtorCaroline Chao2012-10-191-7/+7
| | | | | | | Instead omit the whole test when appropriate. Change-Id: Iebd569676cc7b2f8fe4a1d272107e092410d397b Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Make QContiguousCache with zero capacity not crashThiago Macieira2012-10-191-0/+21
| | | | | | | | | | | | | | These containers don't make sense and will just result in no action being taken (all items added will simply be discarded), but it shouldn't crash due to a division by zero. Update the documentation to explain the fact. Task-number: QTBUG-27339 Change-Id: Ib9acf5c0a9a826e6853e7beaf5e56511fde98dc6 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Ian Walters <ian@walters.id.au> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Test: remove QSKIP from tst_QDateTime::fromString_LOCALE_ILDATECaroline Chao2012-10-191-4/+5
| | | | | | | Instead omit the whole test when Q_OS_WIN is not defined. Change-Id: I311538ce839353d4d5e83edfd12c68968fe61215 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Change the default major version of QGLFormat to 2.Jason Barron2012-10-191-1/+1
| | | | | | | | | | | | | | | This is being changed because: - The OpenGL paint engine in Qt only supports GL2 - QML2 only supports GL2 - QSurfaceFormat has a default value of 2 Applications that want to use GL1 on a QGLWidget will have to explicitly request this format using QGLFormat::setVersion. Task-number: QTBUG-27589 Change-Id: Ieb283ef7d6e15a29ec28ce7e4363dbf477decaa7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* tst_qlocalsocket: get rid of QtScript dependencyJoerg Bornemann2012-10-199-384/+197
| | | | | | | | | | | | | | | Removing the lackey executable that needs QtScript to be built. This was a qscript bastard that was able to run a client and a server script. It's replaced by a C++ version with the same functionality. Nice side effect: the two second wait per test row could be removed. The client executable is now waiting for the server to be created. Task-number: QTBUG-24142 Change-Id: I135b75abf6620d3b0af50dc226ea8c81c2bf4149 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* test: Moving tst_QProcess::echoTest_performance()Sergio Ahumada2012-10-1910-53/+120
| | | | | | | | | tst_QProcess::echoTest_performance() is not an unit test but a performance test, so moving it from 'tests/auto/corelib/io/qprocess' to 'tests/benchmarks/corelib/io/qprocess' Change-Id: I796788534eafc5ca3b8d86c0ec46998285fd4b8f Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fixed inconsistent QPainter fill rules for aliased painting.Samuel Rødal2012-10-191-4/+9
| | | | | | | | | | | | | | | | | | | | | | Qt 5 is the time to get rid of all the old inconsistencies in the raster paint engine caused by trying to preserve the old X11 based coordinate system where (0, 0) is in the center of the top-left pixel instead of the upper left corner of said pixel. However, this was only adhered for line drawing and path / rect filling, and not for image or pixmap drawing and not at all when doing antialiased painting. By defining the antialiased coordinate system as being the right one and letting the aliased fill rules follow from that we finally end up with some consistent behavior that doesn't lead to surprises and workarounds in application code. It is still possible for applications to get the old behavior by setting the QPainter::Qt4CompatiblePainting render hint. This should make porting easier for the few cases where an application relies on the aliased fill rules we used to have in Qt 4. Task-number: QTBUG-27500 Change-Id: If86b95e77d838ec83033d64af86632b9a73c74a9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make sure uints remain uints when editing in itemviews.Stephen Kelly2012-10-192-0/+80
| | | | | | Task-number: QTBUG-22974 Change-Id: I07428862c4dffc629f868f3010f663eb655922d0 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Correct accessibility index handling in QListViewJosé Millán Soto2012-10-191-4/+4
| | | | | | | | QListView::currentChanged and QListView::selectionChanged changed to use 0-based indexes instead of 1-based indexes. Change-Id: Ie618970c9a37ec76156dbfab2e86685c3c8f374c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* normalise signal/slot signatures [QtNetwork tests]Marc Mutz2012-10-1910-64/+64
| | | | | Change-Id: I2491cfe421a811d00759224da03580b3dcc2a091 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* normalise signal/slot signatures [QtDBus tests]Marc Mutz2012-10-195-8/+8
| | | | | Change-Id: I4a0441d37e455dce28072ee3650b2062bec65759 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* normalise signal/slot signatures [QtWidgets tests]Marc Mutz2012-10-1938-159/+159
| | | | | Change-Id: Iffab60f0911a55e4be09faeb29df0bae1ea2eb19 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Modified vertical alignments of simple widgets on OSXTero Ahola2012-10-1813-10/+620
| | | | | | | | | | | | | Adding QCheckBox, QComboBox, QLineEdit etc. into an HBox layout or grid layout makes the layout look like a snake's trail. Fixed the positioning of these widgets to make the layouts visually more appealing. Updated qmacstyle auto-test accordingly. Task-number: QTBUG-13635 Ammended-by: Gabriel de Dietrich Change-Id: I89461f9aad68ea8488070ed06257b9b8e7f493c5 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Use the right properties when checking the frame's marginsAndy Shaw2012-10-181-0/+19
| | | | | | | | | Changed it to check the Frame*Margin property instead of the Block*Margin property as this was incorrect for a QTextFrameFormat. Task-number: QTBUG-22173 Change-Id: I2c3066165fb592ed034874b1180593822859f933 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* add a .qmake.conf file which load()s qt_build_configOswald Buddenhagen2012-10-181-0/+1
| | | | | | | | | | | | | | that way we don't have to auto-generate code for that in the configures. note that we now load qt_build_config.prf instead of just qmodule.pri, which means that exceptions_off is set everywhere. we forcibly re-enable them for testcases to minimize the deviation from default 3rd party usage. testlib selftests are not qt testcases, so the one that needs exceptions needs to enable them explicitly. Change-Id: I1b9360bb11f2e80c92a2b63a7c45991ad17fda1b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Bring back Mac dependent code in QBoxLayout, QGridLayoutGabriel de Dietrich2012-10-181-1/+2
| | | | | | | | | We also made an accessibility auto-test more stable, so that it would not be influenced by this patch. Task-number: QTCREATORBUG-7966 Change-Id: I6ce4e2361c8847aee5dd1cf5664c29cd2d83e38d Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Test: remove QSKIP in tst_qarraydataCaroline Chao2012-10-181-10/+11
| | | | | | | Instead omit the whole tests when appropriate. Change-Id: Id4ec171528d4b4d6849b2478ac4f4a2332789b55 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Test: remove QSKIP from tst_QTextStream::stillOpenWhenAtEndCaroline Chao2012-10-181-3/+5
| | | | | | | Instead omit the whole test when Q_OS_WINCE is defined. Change-Id: Ifd09048687db95913f39a64cffb42a743af8fa81 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix compile with -no-widgetsRohan McGovern2012-10-181-0/+2
| | | | | | | | | | | | Remove more unnecessary references to QtWidgets in accessibility implementation. Disable accessibility tests (which rely on QtWidgets) when QtWidgets is not available. Change-Id: I57315537779d31af1245d42d1b4c49174016da54 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Test: remove QSKIP in tst_QDataStream::stream_QIconCaroline Chao2012-10-181-5/+5
| | | | | | | Instead omit the whole test when Q_OS_WINCE is defined. Change-Id: Ic69accb138121d2b39f068cef181da13b18e46ee Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Test: remove QSKIP in tst_fileCaroline Chao2012-10-181-7/+10
| | | | | | | Instead omit the whole tests when appropriate. Change-Id: I5eae127a497e290c5e4ba1a81a8f325c300471c1 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Test: remove QSKIP in tst_QDir::dotAndDotDotCaroline Chao2012-10-181-4/+5
| | | | | | | Instead omit the omit the whole test when Q_OS_WINCE is defined. Change-Id: I8c0f12c63bbc4567edb3a8626ab060d5ce38f3cd Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* normalise signal/slot signatures [QtOpenGL tests]Marc Mutz2012-10-181-1/+1
| | | | | | Change-Id: Ie8a56873013ad2408d792e371a7d3e2ecf1f9c2c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Test: remove QSKIP and remove whole test cases instead.Caroline Chao2012-10-171-9/+8
| | | | | Change-Id: I8b625d20a2cf9215cbfdb96cd252bf1c81bba522 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Test: remove QSKIP in tst_QDBusMarshall::receiveUnknownTypeCaroline Chao2012-10-171-4/+5
| | | | | | | | Omit the whole test and relative types if DBUS_TYPE_UNIX_FD is not defined since the test is not relevant in that case (D-Bus library too old). Change-Id: I167622f485c0f34d64984c4fa96be974e54f56bc Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Test: remove QSKIP from tst_qtconcurrentCaroline Chao2012-10-171-8/+10
| | | | | | | Instead omit the whole tests when appropriate. Change-Id: I3a22d010b658e54d7d234b786173c62977a50c7d Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Test: remove QSKIP in tst_QSharedPointer::lambdaCustomDeleterCaroline Chao2012-10-161-4/+5
| | | | | | | | Instead omit the whole test when Q_COMPILER_LAMBDA is not defined since the test is not relevant in that case. Change-Id: I541da96a881fa0c9be38ae5c0f86df047dd8fc6b Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Test: remove QSKIP from tst_QThread::stressTestCaroline Chao2012-10-161-3/+6
| | | | | | | Instead omit the whole test when Q_OS_WINCE is defined. Change-Id: Id6f4e65c994115b8bab45f9fbf21dd255d204ea6 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Test: remove QSKIP from tst_QSocketNotifier::posixSocketsCaroline Chao2012-10-161-4/+5
| | | | | | | Instead omit the whole test when Q_OS_UNIX is not defined. Change-Id: If0ee3345c25f6b1baa38845edfd08ec26a45d6f2 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>