summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* test: Remove some QSKIP's from tst_QStyleSergio Ahumada2012-11-031-20/+23
| | | | | Change-Id: Ic277889a75871a8bf72ab2eb2b97e6deeed498e9 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Improve QByteDataBuffer::read() performance with partial readsAntti Harju2012-11-038-0/+416
| | | | | | | | | | | | | Add a read position variable to eliminate excessive memcpy'ing when reading a partial buffer. Specifically, fix performance issue of reading large files from QNetworkDiskCache in QtWebKit2. Task-number: QTBUG-27522 Change-Id: I21edc909bf9223971b2c3db5f1fa6b89c5b61c5f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Antti Harju <antti.harju@ixonos.com>
* Qt 5.0 QTreeView. Prevent manual moving of the first sectionThorbjørn Lund Martsum2012-11-023-2/+61
| | | | | | | | | | | | | | | | | | This prevents the user of moving the leftmost column. There will be no API to allow move of the tree-structure. It is very weird to do that, so it shouldn't be a problem. In case it is a big problem somewhere it can be hacked with: QTableView unused; unused.setVerticalHeader(tree->header()); tree->header()->setParent(tree); unused.setVerticalHeader(new QHeaderView(Qt::Horizontal)); Task-number: QTBUG-332 Change-Id: I3a251c8d0fd472ec0ad7edb20a7f3e00af7e0da8 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Mac: refactor scrollbar animationsJ-P Nurmi2012-11-023-16/+19
| | | | | | | | | Get rid of QWidget-centric QMacStyle::eventFilter() and implement the fade out animations for scrollbars using QNumberStyleAnimation-based QFadeOutAnimation. Change-Id: I2000fa50d46b153e981ceafc12a53932a196382e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Make it obvious that adding a QLayout to QSplitter is not supported.Mitch Curtis2012-11-021-1/+11
| | | | | | | | | | | | | | | It does not make sense to add a QLayout to a QSplitter, since the splitter manages its child widgets in the same manner as a QLayout. The result of doing so is that the child widgets inside that layout will lead to the splitter and the layout fighting to position the child widgets. QSplitter::addWidget should be used to add widgets directly to the splitter instead. Change-Id: I640b463cae8673f87354d28636bff4dd3cfb9679 Reviewed-by: Samu Voutilainen <samu.voutilainen@gmail.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix progressbar animation on macstyleJens Bache-Wiig2012-11-021-0/+7
| | | | | | | | The animation is not just supposed to run when indeterminate, but also while it is progressing. Change-Id: If176bd230c2f6f83781e01ea77526c24d54c8477 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Add implementations of QAIM::sibling in public APIs.Stephen Kelly2012-11-022-0/+22
| | | | | | Change-Id: I2248641f2ed8735c28bd9572470520995a4a5b62 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* speed up tst_QLocalSocket::readBufferOverflowJoerg Bornemann2012-11-021-0/+9
| | | | | | | | Ifdef out waitForBytesWritten on Windows. See comment in source. Change-Id: I7a2268d2634c2524cd8291c72dd9708e430e314e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* fix error handling bug in QWindowsPipeReaderJoerg Bornemann2012-11-021-1/+0
| | | | | | | | | | | | If ReadFile returns with an error then we must set our internal state accordingly. QWindowsPipeReader::readSequenceStarted must be set to false. If ReadFile fails, we're not within a read sequence. Also, we must handle the ERROR_BROKEN_PIPE error. Task-number: QTBUG-25342 Change-Id: Ic9247f170fa9cc47fa7e45d0f47ccfedac06a593 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* fix tst_QProcess::batFiles for shadow buildsJoerg Bornemann2012-11-021-2/+2
| | | | | Change-Id: If7a9c9aa6ba16b7744d8ef8a66b43e40f375b5e7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix the gregorian date <-> julian day calculations in QDateJon Severinsson2012-11-021-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code is just plain wrong for negative julian days. Replaced with plain math from The Calendar FAQ [1], which is correct for all julian days, provided you use mathematical integer division (round to negative infinity) rather than c++11 integer division (round to zero). [1] http://www.tondering.dk/claus/cal/julperiod.php While the conversion code works for up to around JD +/- (2^63/4), we only use an int for the year in the API, so this patch limits minJd() and maxJd() to 1 Jan (2^31) BC and 31 Dec (2^31-1) AD, respectively. Note that while the new conversion code looks like it would be more expensive than the old, gcc will in fact be able to optimize it to be slightly faster (probably because x86 hardware implements round to negative infinity, and so GCC manages to optimize floordiv to a single instruction, compared to the three instuctions needed for operator/). In the following test application, run with a release mode Qt and redirecting stderr to /dev/null, I measured an improvement from 6.81s +/- 0.08s to 6.26s +/- 0.16s user time over five runs on an otherwise idle x86_64 system. int main(int, char *[]) { int year, month, day; qint64 jd; for (qint64 i = Q_INT64_C(-1048576) ; i < Q_INT64_C(1048576); ++i) { QDate::fromJulianDay(i).getDate(&year, &month, &day); jd = QDate(year, month, day).toJulianDay(); qDebug() << jd << year << month << day; } } Change-Id: Ifd0dd01f0027f260401f7f9b4f1201d2b7a3b087 Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Introduced QWindow properties {min/max}imum{Width/Height}Samuel Rødal2012-11-021-0/+53
| | | | | | | These are useful when QWindow is exposed to QML. Change-Id: I7ec49ef365183e2c784605889e8ea22c2ef34781 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Improve QDateTime test coverage.Mitch Curtis2012-11-021-129/+262
| | | | | Change-Id: Ic521d9d2ffb1b8e3b14d9cebdeb3dc7a5e08580e Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Expose IAccessibleTable2 to non-conformant screen readersJan Arve Saether2012-11-021-1/+81
| | | | | | | This seems to be the established practice. Change-Id: I75a65d722a026ab0eb1805688743f46aba406e6c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* SSL certificate printing: Fix auto test for OpenSSL 1.0.1 version.Janne Anttila2012-11-022-8/+59
| | | | | | | | Different OpenSSL versions produce slightly different output when dumping a certificate. Change-Id: Ida98b24422302e287641be074d6740ca292cf203 Reviewed-by: Richard J. Moore <rich@kde.org>
* Compile fix for tst_qstylesheetstyle.cpphjk2012-11-011-1/+1
| | | | | | | There was a semicolon missing. Change-Id: Id2eb843604907acf952d7d238f80ba8a7010ccd1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Strip trailing whitespace in itemviews.Stephen Kelly2012-11-014-33/+33
| | | | | | | | | | | Using git ls-files -z | xargs -0 sed -i 's/ \+$//' in the relevant directories. Change-Id: I861ef9952fb32ed2db9ec8b67864ec7d0d61f0f2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix for leak in QFutureChristian Strømme2012-11-012-8/+65
| | | | | | | | | | | To avoid leaking when converting a QFuture<T> to a QFuture<void> we need to have a separate ref. counter for QFuture<T>. When the last QFuture<T> goes out of scope, we need to clean out the result data. Task-number: QTBUG-27224 Change-Id: I965a64a11fffbb191ab979cdd030a9aafd4436c2 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* move QSystemSemaphore autotest from qtscript to qtbaseOliver Wolff2012-11-015-0/+411
| | | | | | | | | | As the script dependency for that autotest is not really needed it should be moved to qtbase. Task-number: QTBUG-27705 Change-Id: I4ce0d34aca97cadd79b157b0f7c90c406bed4295 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add manual test for dialogs.Friedemann Kleint2012-10-315-1/+559
| | | | | | | | | Implemented for QFileDialog, currently. Task-number: QTBUG-27621 Change-Id: I0c9b7628aa92e3fbca6f737448a7c469893764f1 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* test: Remove QSKIP from tst_QSettings::dontReorderIniKeysNeedlessly()Sergio Ahumada2012-10-311-5/+3
| | | | | Change-Id: I7b804592398869278e9a0fec982c235c41f2c3d7 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* test: Moving tst_QMimeDatabase::inheritsPerformance() testSergio Ahumada2012-10-316-33/+97
| | | | | | | | | | tst_QMimeDatabase::inheritsPerformance() is not an unit test but a performance test, so moving it from 'tests/auto/corelib/mimetypes/qmimedatabase' to 'tests/benchmarks/corelib/mimetypes/qmimedatabase' Change-Id: I59e84f61559023659f101666683870f2ca1d2034 Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Use qt-project.org in tst_hostinfo - qt.nokia.com changed IP address.Janne Anttila2012-10-311-7/+7
| | | | | | | | | qt.nokia.com is also going to disapper in future, so I think it is better to use qt-project.org. Change-Id: Ice550fe657a33609472b8e4b8630d7649f9c9fb5 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Generate instances of types in the CMake tests.Stephen Kelly2012-10-314-84/+32
| | | | | | | | | | | | | | | | All modules currently have a test_modules CMake test. The new module_includes test has very similar requirements, and can obsolete the hand-maintained test_modules tests in all modules. After all test_modules have been removed in other repos, the module_includes test can be renamed to that name. The types chosen need to have a constructor which can be invoked with no arguments. QtConcurrent has no public classes which fit that description so it is still tested separately Change-Id: Id7929cd32b3112c293cbf5e6964cc894a697f9b1 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QNX: Use inotify on QNX systems that support itThomas McGuire2012-10-301-0/+5
| | | | | | | Change-Id: Ia9bf8d3c202b17746036e203268ef6229aaa900d Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Send leave to most recently entered window when modal dialog is shown.Miikka Heikkinen2012-10-301-4/+65
| | | | | | | | | | | | | | | If a modal dialog was shown as a response to button click, the button retained its hover highlight, because it didn't get leave event. Fixed by tracking the most recently entered window and sending a leave to it when modal dialog is shown that blocks it. Also modified tst_QGuiApplication::modalWindow() autotest to check for enters and leaves. Task-number: QTBUG-27644 Change-Id: I387647e18a762a39d523e3df31221b9583a39f9d Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Only use the user set page margins for custom paperAndy Shaw2012-10-301-0/+59
| | | | | | | | | | | | | | When the QPrinter is initalized then it will set up page margins based on the default paper size. If the paper size is changed to be a custom one then it should disregard the margins for the default paper size. If the page margins are set explicitly beforehand then it will use these page margins. Change-Id: Ic535c3a80b8b217dbd5eb5f4fb2cbc0ab1354563 Reviewed-by: Titta Heikkala <titta.heikkala@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* test: Remove QSKIP from tst_QByteArray::literals()Sergio Ahumada2012-10-301-4/+5
| | | | | Change-Id: I07b53cd12790d2161964dd09c5a69fe8aff7c90d Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* test: Remove QSKIP from ↵Sergio Ahumada2012-10-301-3/+5
| | | | | | | tst_QPainter::drawText_subPixelPositionsInRaster_qtbug5053() Change-Id: I1aa329323767a3e849beca8fe41e39dbe98de4ee Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* test: Remove QSKIP from tst_QListView::setCurrentIndexAfterAppendRowCrashSergio Ahumada2012-10-301-4/+5
| | | | | Change-Id: I8d48722b412895e43aa8a522354c5d67d83c19dd Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Check for both A and P when converting QDateTime to string.Mitch Curtis2012-10-301-2/+4
| | | | | | | | | | hasUnquotedAP currently only checks for an a or A, which is wrong according to both the toString documentation and the comments for hasUnquotedAP. Change-Id: I03015734b846fe761085cf8f8fca2b29210cff97 Reviewed-by: Jon Severinsson <jon@severinsson.net> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* QMap - improve QMap stl-map ctorThorbjørn Lund Martsum2012-10-292-0/+40
| | | | | | | | | | We can insert directly on the most left-most Node. We always enforce an insert here (unlike the insert call), but that is not a problem since the keys in a std::map are unique. Change-Id: Ib409b90ffc57a5a43dab4a4b08d34f6fdabd057f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QFontEngineMulti: Fix possible crash in stringToCMap()Konstantin Ritt2012-10-292-1/+35
| | | | | | | | | in case when the layout is partially initialized. We shouldn't access any data except of indices if GlyphIndicesOnly flag has been passed in. Change-Id: I264689b498e0f9de8b5c040d47dbae4f6ef391c4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Do the actual removal of the Soft Keys API and related codeJan Arve Saether2012-10-294-95/+18
| | | | | | | | | | | | | | | | | | | In addition to the actual removal of the softkeys API in QAction, this commit removes some enums related to the softkeys feature: Qt::WA_MergeSoftkeys Qt::WA_MergeSoftkeysRecursively It also removes some "zombie" enums: Qt::WindowSoftkeysVisibleHint = 0x40000000, Qt::WindowSoftkeysRespondHint = 0x80000000, (The only implementation that used these were removed when qapplication_s60.cpp and qwidget_s60.cpp were removed.) Change-Id: Ib6fc6d543def4757383d5f19256199d9d190c614 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Test: refactor tst_QProcessCaroline Chao2012-10-292-164/+142
| | | | | | | | | | | | Remove QSKIP and instead omit the whole tests when appropriate. Remove QSKIP from crashTest, crashTest2 and exitStatus on Windows, the tests are now passing. Add a guard in testForwarding to check if QT_NO_PROCESS is defined. Change-Id: Icba4d773315e3bf87764a381742168b51cf169c0 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Test: remove QSKIP in tst_QEventLoop::throwInExec()Caroline Chao2012-10-291-10/+10
| | | | | | | | | Instead omit the whole test when appropriate. Change-Id: I60c34b020f6e25e865bbe0182395d4fc6419f65e Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* test: Update task number for QAccesibilityLinux autotest.Sergio Ahumada2012-10-291-1/+1
| | | | | | | | | | Reference tasks with detailed information of failures rather than generic task for blacklisted tests. Task-number: QTBUG-27732 Change-Id: I0f0f500d255ea8748dd98d066deeaf1dfcdb7ec8 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* 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-272-1/+110
| | | | | | | | | | | | | | | | | | | | | 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>
* QMap - use hint on insert in QMap::toStdMapThorbjørn Lund Martsum2012-10-271-0/+12
| | | | | | | | | Giving the std-map a hint (normally) improves insert performance. There seems to be no reason not to provide this hint. Change-Id: I4344607ebf54574a3ae9666d87a41a3c14762361 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> 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>
* Fix syncing of visibility and enabled for menus on CocoaAndy Shaw2012-10-261-7/+67
| | | | | | | | | | | Fixed menu handling on Cocoa so if a menu is enabled/disabled or made visible or not then it will keep this in sync with the appropriate native menu entry. Change-Id: If269185fcf065fb1b2f60d6ef8c27c107eb4509f Reviewed-by: Pasi Matilainen <pasi.matilainen@digia.com> Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Andy Shaw <andy.shaw@digia.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>