summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* QStackedLayout: Fix crash when focus widget is destroyed in hide()Jan Arve Saether2013-02-191-0/+88
| | | | | | | | | | We also have to make sure that when moving back to a page that has a focusWidget(), the focus should go to the focusWidget() Task-number: QTBUG-18242 Change-Id: Ibfa7d6361c1a456480b2f1584a88ef4c4f405709 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Clean whitespaceJan Arve Saether2013-02-191-5/+5
| | | | | Change-Id: Iec1950a0f4053cd71633162f0cb50efc9d4d493f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* moc: Error out when detecting unterminated macro usageTor Arne Vestbø2013-02-192-0/+72
| | | | | | | | | Exhausting the symbol list while looking for the final right parenthesis means it is missing. Task-number: QTBUG-29308 Change-Id: Iccf5897b0f5eb719699fd12d6c8e4a16ff189d9b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Cocoa: Add QMdiSubWindow size grip back.Morten Johan Sørvig2013-02-191-12/+0
| | | | | | | | | | Change all Q_WS_MAC -> Q_OS_MAC in qmdisubwindow.cpp Remove QEXPECT_FAIL from tst_qmdisubwindow.cpp. Task-number: QTBUG-29434, QTBUG-25297 Change-Id: I299b87ab994e2d5ba93d5bbae48de0df1ac1c9d6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QSqlResult: fix parsing of bound SQL statementsIsrael Lins2013-02-152-0/+39
| | | | | | | | | | | | Parsing for bound SQL parameters now handles identifier quoting using double quotes (") and square brackets ([]). The following has only 1 bound value but previously 2 were detected: SELECT 1 AS "A?b[?']]]de?ghi", ? Task-number: QTBUG-27159 Change-Id: Icfd02187e1126ff3b5ed11df8d4e599f574e61bf Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* QLocale: add autotest for tamil's AM/PM textEl Mehdi Fekari2013-02-151-0/+4
| | | | | | Change-Id: I67e572f16fcabd5833549286be20172e7f2a2337 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fixed crashes when using QImage in combination with QCoreApplication.Samuel Rødal2013-02-141-1/+1
| | | | | | | | | | | | As long as fonts weren't used we supported using QImage in combination with QCoreApplication in 4.x, and there's no reason we can't continue doing so. Task-number: QTBUG-29643 Change-Id: I2cf351d3c93f1c175bbf624e45024d39ab913111 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fixed mouse double click events not bubbling up to parent widgets.Samuel Rødal2013-02-141-0/+26
| | | | | | | | | | | | The bug was caused by changes b371f3f943703840d0dfbe30505018bcca06e260 and 3bb902495291c50a2f06e8e03a62a647db3e5cd4, which removed the event forwarding that QWidget::mouseDoubleClickEvent() used to do without making sure to call ignore() on the event like QWidget::mousePressEvent() does. Task-number: QTBUG-29680 Change-Id: I98af8052ad3dd1dea15d07a710aa9212ef5e4a68 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Only compile SSL tests when openssl is available.Frederik Gladhorn2013-02-131-7/+7
| | | | | Change-Id: I79fc705f30fb84e86bd7d674d90fbbe2d1a124ba Reviewed-by: Richard J. Moore <rich@kde.org>
* Remove QPointerBase bic check.Stephen Kelly2013-02-1322-110/+0
| | | | | | | | | QPointerBase is not public or exported and it is to be removed in Qt 5.1. Change-Id: I060c6b2ebcde8dedde85dc21404fc393150d452c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QLocale: add autotests for Japanese and Czech localesEl Mehdi Fekari2013-02-121-0/+7
| | | | | | Change-Id: Id4351ab49bfbdf91b65ccb5153c5d01f53acdf72 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix developer-build of qsslsocket_onDemandCertificates_member.Friedemann Kleint2013-02-121-4/+5
| | | | | | | Do not include qsslsocket_p.h unless SSL is present. Change-Id: I7e56b7758729907892d85f97d5a9d3ccaf7a3314 Reviewed-by: Peter Hartmann <phartmann@rim.com>
* Fixed QPixmapCache associating path with wrong QPixmap.Samuel Rødal2013-02-121-0/+15
| | | | | | | | | QPixmap::load() would not detach, so multiple paths could get associated with the same QPixmap, causing the wrong pixmap to be shown. Task-number: QTBUG-29639 Change-Id: I064dd6a9611b5996853bec9fb20b6224a0adcf62 Reviewed-by: aavit <eirik.aavitsland@digia.com>
* QSqlQuery tests: fix create table failuresMark Brand2013-02-121-7/+16
| | | | | Change-Id: Id20517cc68d03ac008650374fadd96cd6626d3fe Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* QSqlQuery tests: fix bool test for postgresqlMark Brand2013-02-121-4/+6
| | | | | Change-Id: I60634f89841cbc81058588e435c6482c6c0efed6 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* QSqlQuery tests: fix mysql problemsMark Brand2013-02-121-5/+14
| | | | | | Change-Id: I82f4e6c8801c7a936b80ad72c229f915e6d2a4de Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix QWindow::setFramePosition() to keep the size.Friedemann Kleint2013-02-111-1/+5
| | | | | Change-Id: I14551e0d0573c2e8d86d76eadab4df9f3c8ed5e4 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix module name format in displayed codeSze Howe Koh2013-02-112-2/+2
| | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation QtDBus -> Qt D-Bus QtMultimedia -> Qt Multimedia QtWidgets -> Qt Widgets Change-Id: I96a1523b37e294b10b203782074943c6ec55e34a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* fix QSqlTableModel:revert() for OnFieldChangeMark Brand2013-02-091-0/+79
| | | | | | | | | | | | revert() should operate in OnFieldChange edit strategy just as submit() does. The reason in Qt 4 for excluding OnFieldChange was that there was no opportunity to revert. The model was refreshed, causing all changes to be lost. In Qt 5 a failed edit remains in the cache until user action, which could be to revert. Change-Id: Ide021c4f83a53834b7ed81f2abfa3aa49317704d Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix loading of SSL certificate of DER files.BogDan Vatra2013-02-082-2/+48
| | | | | | | | | DER certificates should not be opened as text files, so we only pass the QIODevice::Text flag when the format is QSsl::Pem. Change-Id: I4bad98023c397b967d5beeec0aaa6c414e06fd9c Reviewed-by: Richard J. Moore <rich@kde.org>
* Do not crash if the child index is out of range.Jan Arve Saether2013-02-061-0/+5
| | | | | | | Task-number: QTBUG-29077 Change-Id: I934101cdc121e9ef99de2e9eeaef154dd4cae0d8 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fixed crash in image reader when reading certain BMP files.Samuel Rødal2013-02-063-0/+2
| | | | | | | | | | | | | | | If the high bit in a mask is set, for instance if the mask is 0xff000000, and we shift it to the right by 24 positions, since the mask was not declared as unsigned we ended up with a mask value of 0xffffffff. We then add 1 to this value and divide by the result, causing a division by zero crash. The masks need to be declared unsigned to prevent sign bit extension when shifting right. Task-number: QTBUG-29194 Change-Id: I79260344cebfbdd3ea86416a9c734dca76517999 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* QSqlTableModel: support refreshing inserted rows with auto columnsMark Brand2013-02-061-0/+68
| | | | | | | | | | | | | | | | | | Previously, selectRow() did not work after INSERTing a new row into a table with an automatically populated column. It did not work because the model did not know the primary values for the new row. Newly inserted rows were therefore not refreshed in OnFieldChange and OnRowChange edit strategies. This change provides support for the typical simple case where a single column is populated by the database and can be retrieved with QSqlQuery::lastInsertId(). Task-Number: QTBUG-29102 Change-Id: Ibf0f0ac8661185bde57034ddf40c2178bece4778 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Lukas Geyer <lgeyer@gmx.at> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* QSqlTableModel::setData(): fix non-change detectionMark Brand2013-02-061-0/+73
| | | | | | | | | | | | | | | Commit 10ff9de91bedf93852f13a58287afd8831644759 introduced the optimization of ignoring non-changes, but it overshot the mark. It neglected to consider that QVariant's equality operator does not compare the null flag. It also failed to consider that setData() has a useful side effect of setting the generated flag in a column of a pending INSERT. This is important when the application actually wants a NULL to be inserted into the column. Task-number: QTBUG-29217 Change-Id: I1368f7acc21eebfeb5a8d23746fc38f6f30fd395 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* fix QSqlTableModel::headerData() for empty query with inserted rowMark Brand2013-02-061-0/+8
| | | | | | | | | | | | | | QSqlQueryModel::headerData() relied on virtual indexInQuery() to detect whether the requested column at row 0 mapped to an index in the query. This failed when row 0 was a pending insert managed by QSqlTableModel, and therefore not in the query. The only thing that matters here is the column. Task-number: QTBUG-29108 Change-Id: I3e0ae85ba223e444781ec8033386d394bb44f0e8 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* QSqlError test: Fix isValid()-check for constructed QSqlError.Marcel Krems2013-02-041-1/+1
| | | | | Change-Id: I4dc1f537226139ceca017cc36abadd2fba4ce35b Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* tests: Fix some more old references and links to NokiaSergio Ahumada2013-02-0115-154/+154
| | | | | | | Task-number: QTBUG-28156 Change-Id: Ifb768b167203c901c5e42ce58c9aaf3db2739320 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Clean up logical dpi for QImage.Morten Johan Sørvig2013-01-311-0/+22
| | | | | | | | | | | | | | | | | | | | | Revert to the pre highdpi-patch behaviour. Before, both physical and logical DPI would be based on the dpmx/dpmy variables, which could be changed with setDotsPerMeter(). The highdpi patch introduced separate ldpmx/ldpmy variables, which were not changed by setDotsPerMeter(). This broke when loading images: setDotsPerMeter would be called but the logical dpi would not change. Remove ldpmx/ldpmy. Keep scaling the physical dpi by the devicePixelRatio, which will be set to 1 by default. Task-number: QTBUG-29187 Change-Id: I0d6f5f3b8efae5fb1adc0a50b22a5da78324a282 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Doc: Fix references to Qt TestSze Howe Koh2013-01-303-6/+6
| | | | | | | | | | | | | | | | QtTestLib and QTestLib don't exist. The proper name is "QtTest" (code) or "Qt Test" (English) http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation http://lists.qt-project.org/pipermail/interest/2012-December/005221.html Files paths in qttestlib.qdocconf can't be changed easily however, as it breaks things. So, they're left as they are. Change-Id: Ifbc44ea858c453bedad8cd7723f847e67fc7a85a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* test: Add bic data for linux-gcc-amd64Sergio Ahumada2013-01-293-0/+24692
| | | | | | Task-number: QTQAINFRA-321 Change-Id: I449d51088d3e5bfc6f92f036d498a2ef6f7a46b2 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* QSslSocket tests: use qt-project.org as test server instd of codereviewPeter Hartmann2013-01-292-2/+2
| | | | | Change-Id: I1f3a860bf1ab24c30001059b7bcbb19fba7cbc1d Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Make the null pointer dereference a volatile oneThiago Macieira2013-01-291-1/+1
| | | | | | | | | | | | This is to ensure that the compiler won't optimise it out of existence. Clang says it will do it: testProcessCrash/main.cpp:50:5: warning: indirection of non-volatile null pointer will be deleted, not trap [-Wnull-dereference] *(char*)0 = 0; ^~~~~~~~~ Change-Id: Iac7771046442f869e205e8789fffdd6443d58e67 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Forward-port tests on invalid port numbers from Qt 4Thiago Macieira2013-01-281-0/+8
| | | | | | | | | These tests were added to Qt 4 on commit a17fc85b51a6bdcfa33dcff183d2b7efd667fb92 Task-number: QTBUG-28985 Change-Id: I3cf595384f14272197dcfb85943213c8f8ddeba0 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix minor typos in docs, printed messages & commentsSze Howe Koh2013-01-288-9/+9
| | | | | | | Missing apostrophes Change-Id: I3ef5e9d494fb7a37f8e6075f24cd3a274e572c23 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Check existence of QProcess feature before using it on Qt autotests.Pasi Petäjäjärvi2013-01-2811-8/+49
| | | | | | | | VxWorks does not have QProcess support. Change-Id: I917b769f967e9d71ec5025aae788f3e237b07aeb Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> (cherry picked from commit 416e73a0fcaf31f7c32ba7dcd214b62e6060123c)
* Doc: Fix module name formatSze Howe Koh2013-01-258-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation QtCore -> Qt Core QtDBus -> Qt D-Bus QtDesigner -> Qt Designer QtGui -> Qt GUI QtImageFormats -> Qt Image Formats QtNetwork -> Qt Network QtPrintSupport -> Qt Print Support QtScript -> Qt Script QtSql -> Qt SQL QtSvg -> Qt SVG QtTest -> Qt Test QtWebKit -> Qt WebKit QtWidgets -> Qt Widgets QtXml -> Qt XML QtConcurrent -> Qt Concurrent (partial) QtQuick -> Qt Quick (partial) Also, distinguish between "module" and "library" Change-Id: Icb8aa695ae60b0e45920b0c8fce4dc763a12b0cd Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fixed checking HOME variable return value using isEmpty()Pasi Petäjäjärvi2013-01-251-0/+8
| | | | | | | | | | | Return value of the QFile::decodeName(qgetenv("HOME")); is never null if HOME environment variable is not set. So need to check the return value using isEmpty() instead. Task-number: QTBUG-28912 Change-Id: Ic57b1978d63e99b056cde35ca8cb9d2a07ff8ce8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Stabilize tst_qabstractsliderFrederik Gladhorn2013-01-241-3/+3
| | | | | | | | | | When simulating hight load, this test failed 4 times out of 80 runs on my machine. With this patch I could no longer reproduce the failure. Change-Id: I42748de0200b9094c8facf0e33f3794002ec1d01 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Make sure QGraphicsItem notifies changes to focusScopeItem.Andreas Aardal Hanssen2013-01-241-0/+57
| | | | | | | | | | | | | | | | | | A glitch in QGraphicsItem's logic made it update the focusScopeItem pointer, but fail to notify the change to QDeclarativeItem through the d_ptr->focusScopeItemChange() virtual function, hindering QDeclarativeItem from emitting focusChanged() correctly for focus scopes that do not have focus. Two lines were moved, and a comment updated to reflect the reason why the "return" is needed at this point. It's clear that the calls to focusScopeItemChange() are unrelated to the return. Task-number: QTBUG-29260 Change-Id: I12ba9161b16d34c3689401a92c86d2047989f7bd Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* QSslConfiguration: toggle on demand loading of root certs properlyPeter Hartmann2013-01-233-4/+69
| | | | | | | | | | | | | | | make sure we keep track of when we can load root certs and when we cannot (we cannot when the developer set the certs explicitly). This is implemented the same way for QSslSocket already, and needs to be duplicated because we have 2 methods for setting CA certificates: one in QSslSocket and one in QSslConfiguration. In addition, adapt the auto test which checks whether setting a default QSslConfiguration works: There is no way to set on demand loading through the API, so it should be enabled by default. Task-number: QTBUG-29103 Change-Id: I5146128aaa385dfcc0ad1e0ef81a92d9350ec5f2 Reviewed-by: Richard J. Moore <rich@kde.org>
* Add autotests for Indonisian and Catalan localesMehdi Fekari2013-01-231-0/+12
| | | | | Change-Id: Idbf14ee6f0cd83acfdc407408794aac7ad91c054 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Disable only accessibility bridge without dbus on linuxFrederik Gladhorn2013-01-231-1/+1
| | | | | | | | | | | | Keeping accessibility and only disabling the bridge will enable more builds to work. Warning about disabling accessibility disabled is needed because in QStyle it is used to discover semantics about widgets (if a toolbutton is in a toolbar). Change-Id: Iae4e6ab63479743bdd70cba4b1954ec7cf3f88e9 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility Linux: Make dbus registration asyncFrederik Gladhorn2013-01-221-22/+8
| | | | | | Change-Id: I74043be04f4ee17089353304fdc007a7f22cdea0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Make hierarchy of actions in menubars more consistent.Jan Arve Saether2013-01-211-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is an assumption that the interface returned from iface->parent() would have iface as one of its children (thus, parent->indexOfChild(iface) should always return an integer != -1, indicating that it is a child. This is a good assumption, otherwise an hierarchy would be presented differently depending on how it is traversed. However, a QMenu created like this: QMenu *menu = new QMenu("weird parent", mainWindow); mainWindow->menuBar()->addMenu(menu); will have a different ancestor sequence than a menu created like this: mainWindow->menuBar()->addMenu("ok parent"); This is because it will walk up the QObject hierarchy. This patch tries to deal with that by looking at which widgets the action of the menu is associated with before determining which should be the accessible parent. Change-Id: I00dad8a94463f772d7b1f5d66fdb36b2e8d3aea2 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Accessibility: Test for do not crash if the column count is 0Jan Arve Saether2013-01-211-1/+6
| | | | | | | | | This tests the fix submitted in bb5e11b56dd2f5fe2957f151a38 Task-number: QTBUG-28611 Change-Id: I7b15aa6b46be3607bd7079294d8e7d18bd507d1c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* QNetworkReply auto test: also test uploading data via HTTPSPeter Hartmann2013-01-181-0/+216
| | | | | | | ... and not only HTTP. Change-Id: I1190e07fdacd9bdfb218c8932e0e5e2c0c6fc6ab Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix a crash when minimizing a QQuickWindow.Friedemann Kleint2013-01-182-5/+0
| | | | | | | | | | Send empty expose event and flush queue when minimizing. Task-number: QTBUG-28439 Task-number: QTBUG-26424 Change-Id: I2e921a86660f946ced7af735cdf197fb666e2934 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181124-1126/+1126
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QDateTime auto test: stabilize currentDateTimeUtc2 testPeter Hartmann2013-01-171-1/+1
| | | | | | | ... by trying more often to get dates close enough to each other. Change-Id: I370f7cd61bbb84fbb77ea96ff9fd82c1a6f1f76a Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* tst_bic: Add linux-gcc-ia32 bic data for QtXmlSergio Ahumada2013-01-162-0/+3844
| | | | | Change-Id: I43670f41f41f465e5684362de64c355b68a1dbf7 Reviewed-by: Janne Anttila <janne.anttila@digia.com>