summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix qfile:invalidFile() test.Friedemann Kleint2012-10-291-4/+33
| | | | | | | | | | The test expects 'fail:invalid' to be an invalid file, which it no longer is on Windows 7. It also assumes that f: is an invalid drive. Fix by picking a drive that does not exist. Task-number: QTBUG-27306 Change-Id: I9d9b36c50fc31d2561d3c4eec66f65d96084f0d7 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Implement QAccessibleLineEdit::characterRect()Jan-Arve Saether2012-10-281-0/+16
| | | | | | | | | | | | It was probably not implemented because it needed to access private APIs. However, accessing those from this a11y plugin is unproblematic. Forward-ported from Qt 4.8 with change d2fb64d52fc6ec229d775f829a9a0cb3d251aad3 (and then slightly improved) Change-Id: Ifa2d48c152fd75fc1fff49a05369787a7db3b902 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Clean up index handling in itemviews accessibility.Frederik Gladhorn2012-10-271-17/+45
| | | | | Change-Id: Icc017c7df9cb0dc4bf17e5168c1e3acda6af7523 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Make table test use smart pointers for interfaces.Frederik Gladhorn2012-10-271-28/+18
| | | | | Change-Id: I9669da2ef398f12c4d6d584e7032dea13b148a81 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* QMap 5.0 - keep track of leftmost node (BIC)Thorbjørn Lund Martsum2012-10-271-1/+93
| | | | | | | | | | | | | | | | | | | | | This suggestion keeps track of the most left node. The point is that constBegin() becomes a lot faster. That speeds up iteration a bit, and makes it O(1) to get the first element. The penalty in insert and remove is very small. On large trees it seems to be less than 1%. It should be noticed that constBegin() is a very common hint on my planned change to 5.1, and this opperation will without this patch cost 2 x log N. One when the user calls the hint with begin - and one where it is compared with begin. Other std::maps has a very fast begin(). E.g http://www.cplusplus.com/reference/stl/map/begin/ (begin with constant time) Change-Id: I221f6755aa8bd16a5189771c5bc8ae56c8ee0fb4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* test: Remove dead code from tst_QPixmapSergio Ahumada2012-10-271-6/+1
| | | | | | Change-Id: I1945a0f431364f47a43cf7f600ad38fdba5f4a08 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* test: Don't fail if the network test server is not set upSergio Ahumada2012-10-261-1/+2
| | | | | | | Leftover from 704a4e4747b2c42e262d9b4bd440ff365ab92a35 Change-Id: I437da91be31259a748303bd7cf20ff0c8bcf53b4 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* QComboBox: new signal currentTextChangedMark Brand2012-10-261-0/+55
| | | | | | | | | | | Adds NOTIFY to currentText property. Test included. Change-Id: I3e92b585ad6697891d61537c82f6ab9e8beb1a00 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QComboBox: fix use in QDataWidgetMapper/QItemDelegateMark Brand2012-10-262-2/+56
| | | | | | | | | | | | | | | | | | | | | | | QItemDelegate and QDataWidgetMapper use the WRITE method on the USER property to set a value in a widget. This did not work for QComboBox whose USER property currentText lacked a WRITE method. This change adds the missing setter and flags it as the WRITE method. The setter setCurrentText() simply calls setEditText() if the combo box is editable. Otherwise, if there is a matching text in the list, currentIndex is set to the corresponding index. Test included. Follow-up to 816c5540179362500dfc175b77f05abf3ef25233 which restored currentText as the USER property. Task-number: QTBUG-26501 Change-Id: I5f2f999e60b09728ca03ead4e28fe36d1f3ee189 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add a CMake macro to test module includesStephen Kelly2012-10-261-0/+23
| | | | | | | | | | | | | | | | | The variations of includes which should work are tested. For example, in the case of testing the QtCore module and QObject include, the following includes are generated and compiled: #include <QObject> #include <QtCore/QObject> #include <QtCore> #include <QtCore/QtCore> As the private include directories are not available to the compiler, this also tests that private headers are not included from public ones. Change-Id: Id03d0fe290c9691e0f7515015892991d1701ab72 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Adjust autotest files for raster engine to new default penaavit2012-10-267-141/+209
| | | | | | | | | Fix those test scripts that assumed cosmetic default pen, and improve testing coverage of cosmetic vs non-cosmetic pens in general. Ref. I04d910e9700baf7f13a8aac07a3633014bb9283e Change-Id: I2bb3525c21a8e9c8dd1f16e7dcd225195df43c1b Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix a crash in QFileDialog when selecting an invalid name filter.Friedemann Kleint2012-10-261-1/+46
| | | | | | | | | | | When nameDetailsVisible is set to false and an invalid/empty string is passed to selectNameFilter(), the regexp used to strip the filter off the suffixes returns empty and a crash occurs. Change-Id: I926ea49514ff25a103977d8121fca1cf83d647f5 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Properly check for widget's visibility in doublespinbox autotestOliver Wolff2012-10-261-2/+2
| | | | | Change-Id: If9e08ab5c84090729537e2a060257564c62fda9a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* correct spelling in commentMark Brand2012-10-251-1/+1
| | | | | Change-Id: I6ffa96ac9cda0701c99f839804f400a167fcf9a7 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* test: Remove QSKIP from tst_QFileDialog2Sergio Ahumada2012-10-251-3/+7
| | | | | | | | In task227930_correctNavigationKeyboardBehavior() Task-number: QTBUG-23602 Change-Id: I07f40dbc3840c232e09ff1327f00e3fd9c16c22f Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* test: Remove tst_QPixmap::grabWindow() functionSergio Ahumada2012-10-251-31/+0
| | | | | | | | | QPixmap::grabWindow() was deprecated by 41914453d38d01b9b69e16ccee69444d1a304bf7 Task-number: QTBUG-20863 Change-Id: I7e675c124cd96cf1815b65e57f3fba19e5065066 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Test: remove QSKIP from tst_qstringCaroline Chao2012-10-251-40/+36
| | | | | | | | | | | | | | | | | Instead omit the whole tests when appropriate. In particular: - When Q_CC_HPACC is defined the tests fromStdString and toStdString are crashing. Omit the tests in this configuration since the compiler is not supported. - Clean the localeAwareCompare() by removing the code where Q_OS_WIN is defined but not Q_OS_WINCE. System and user locale cannot be set on Q_OS_WIN other than Win CE and some code could never be reached. Change-Id: I72ae3246bf8c2a73d14cce45dde14bcb8001d8b3 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix qmake's pro file cache to interact correctly with write_fileSimon Hausmann2012-10-252-0/+26
| | | | | | | | | When writing a file with write_file() we have to inform the pro file parser cache to discard the file if it's existant in the cache, to ensure that calling include() after write_file() always works. Change-Id: I7d09269a57de55ca30b0e11dd40770de9f919f64 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Core/kernel: Make some signals private.Stephen Kelly2012-10-252-5/+6
| | | | | | | | | | | | | | | | | | | | | | There are more opportunities in QtCore and the rest of Qt to make signals private instead of public. This is a test-dart to see if there is any reason not to do this. It would be nice to make QObject::destroyed private, but as it has a default argument it would be source incompatible to anyone connecting to the SIGNAL(destroyed()) instead of SIGNAL(destroyed(QObject*)). Currently the function-pointer-based connect syntax does not accept a functor (or lambda) with a different number of arguments than the signal. Olivier says a fix for that might come in 5.1, but for now the qfiledialog2 test is changed to not use that anymore. Also, the function pointer for a private signal can not be assigned to a local variable, so the qmetamethod test is changed to not do so anymore. Change-Id: Iaf776b822f9ba364f2c184df0c6b23811da56e44 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Implement viewOptions logic in QTableViewPrivate.Stephen Kelly2012-10-251-0/+12
| | | | | | | | | | | This is similar to the patch 05aa8c6c12509cce87d1a3811c5ea1dd83fa0898 which was applied to QListView. Task-number: QTBUG-26548 Change-Id: I38ff07230673a93a32b01a7f1951d0378d94185b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add missing test for the Qt5PrintSupport module.Stephen Kelly2012-10-252-0/+4
| | | | | Change-Id: Ic3860cc13fbb37a1d3ae63ad100b7d722a987272 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix: don't override the new non-cosmetic default pen in qwidgetaavit2012-10-251-2/+2
| | | | | | | | | | | | | As QWidget initializes any painter created in paintevent handler to have the pen color of the palette's foreground, setting it to 0 width, i.e. cosmetic, it negated the effect of the recent change to default 1-width non-cosmetic, ref. I04d910e9700baf7f13a8aac07a3633014bb9283e This caused scaled painting with default pen on QImage and QWidget to yield different results. Change-Id: I930b64bf7c0a8c84b9ea3edb49adc813370fed0e Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* test: Don't fail if the network test server is not set upSergio Ahumada2012-10-256-6/+12
| | | | | | | | Not having access to a network test server is not a failure per se but rather an enviromental condition not met at run-time. Change-Id: Ie7d10ca5fbf2df45fb1fd1ac19718c9fae855c03 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* fix flakiness of tst_qlocalsocket::processConnectionJoerg Bornemann2012-10-251-14/+20
| | | | | | | | | QSystemSemaphore is persistent after a crash and we'd have to toggle the Open/Create flag. Waiting for the server being available by trying to connect is much more reliable. Change-Id: I510814cef189b43658911f8ade3cf831ae6c7e58 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Unmark tst_qgroupbox as a parallel testRohan McGovern2012-10-241-1/+0
| | | | | | | | Judging from recent failures in the call to QTest::qWaitForWindowActive in this test, the test may not be parallel-safe as previously thought. Change-Id: I0a05eafd9086207ea3fc73f611bf834b657d5b8a Reviewed-by: Toby Tomkins <tjtomkins@gmail.com>
* 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-225-54/+54
| | | | | 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-2217-237/+237
| | | | | | | | | | 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>