summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* QHeaderView - rename many spans classes and variablesThorbjørn Lund Martsum2012-04-111-2/+2
| | | | | | | | | | | | | In (SHA) b800d8b94a7861ecf8853621f6556fca186fb5b7 the span model was replaced with a plain section model. The code however still has variables and classes called someting with spans which would be confusing for possible new readers of the code. This patch cleans up most of it. It only renames classes,functions and variables (and not any semantics or the public API). Change-Id: I6ceb068c7317223f0d8e37f8032197f518d0174c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* replace hardcoded values with a surrogate handling methodsKonstantin Ritt2012-04-111-10/+8
| | | | | | Change-Id: Iba079953c46a29404232d2dacbe0c90170097d51 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* fix digitValue() returned 0 instead of -1 for invalid ucs4 charactersKonstantin Ritt2012-04-111-0/+3
| | | | | | | | | Task-number: QTBUG-20318 Change-Id: I96c4c2b042bad478b7c704669e7ea0d574d3b22f Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Bump some Qt 5 to-do's to Qt 6.Jason McDonald2012-04-101-1/+1
| | | | | | | | | | Source-incompatible changes are no longer desirable for Qt 5, so these items must wait until at least Qt 6. Task-number: QTBUG-23524 Change-Id: I0b9ae5f6f3a792e0169a4b0d3aefbdcb744acd2f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Don't hardcode the default families in qfont_qpa.cppPierre Rossi2012-04-101-18/+42
| | | | | | | | | Since different platforms come with different fonts, we should probably leave it up to the platform to decide which family to use. Change-Id: I18bb81c0ce87cc7e9ac7f3abaeae1b41c0ce8410 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Blackberry OS implementation of QStandardPathsRafael Roquetto2012-04-101-1/+5
| | | | | | Change-Id: I31427b896ca691de7071da17af4863d16348df7b Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Don't ignore tst_QWindow on Mac OS XBradley T. Hughes2012-04-042-3/+6
| | | | | | | | QTBUG-23059 only affects 2 test functions, not the whole test. XFAIL the 2 failing tests. Change-Id: I87086a9ec573362625bc090038dfd7c79aeb9426 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Add tst_QWindow::windowModality()Bradley T. Hughes2012-04-041-0/+32
| | | | | | | | | This tests that we get the windowModalityChanged() signal as needed, but not unnecessarily either. Change-Id: I2232fa9d45c72e472b324b681859b4b0d574b467 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Don't require exact IMAP server version in autotestsShane2012-04-031-39/+7
| | | | | | | | | | The string from the server should begin with "* OK" and end with "\r\n" according to the IMAP specification. Still have a check for "server ready" as this does not change between cyrus versions. Change-Id: Ia01ed8aa054e5726bba8b411d30edc6205cc8465 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Convert Boolean value into integerHonglei Zhang2012-04-021-0/+61
| | | | | | | | | | | | | According to documentation, SQLite doesn't have a separate Boolean storage class. Instead, values are stored as integers 0(false) and 1(true). In QSqlQuery::bindValue(), if a boolean value is bound to a placeholder, it is converted to text true and false. This fix converts boolean value to integer 0 and 1. Task-number: QTBUG-23895 Change-Id: I4945971172f0b5e5819446700390033a1a4ce301 Reviewed-by: Michael Goddard <michael.goddard@nokia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix MSVC warnings in tests.Friedemann Kleint2012-04-0214-47/+69
| | | | | | | | | - Unused variables - conversion truncations - Overflow in expressions like '-1 + sizeof()' Change-Id: Ibbd18497951e9e7e9dccaf596cb4e864b69ec02c Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fix QTcpServer::listen() returning true when the port is in use on OS X.Robin Burchell2012-04-021-0/+22
| | | | | | | | | | | | | | | | | | | | Way back in the mists of time, someone added SO_REUSEPORT to socket binding, which was great, because otherwise it meant that multiple UDP sockets couldn't share the same port on OS X (as platforms with SO_REUSEPORT apparently don't support rebinding with SO_REUSEADDR). However: SO_REUSEPORT also means that *any* bind on a port will succeed, which is most definitely not wanted in the case of TCP sockets, so check the socket type before performing the actual bind. Also test that multiple listens don't take effect. Change-Id: I2f8d450bcfb8a7f3abd8918a4e789a850281dd13 Done-with: Thiago Macieira Done-with: Shane Kearns Task-number: QTBUG-6305 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Harfbuzz-thai - fix buffer overflow when setting item attributesJohn Tapsell2012-04-021-1/+23
| | | | | | | Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> Change-Id: I92de853b57e2e06211193a2b30ac7c308374c961 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix multicast join/leave when binding to QHostAddress::Any.Robin Burchell2012-04-021-0/+3
| | | | | | | | | | | | | | | | | | On OS X and Windows, this was not working, because the socket was being bound in v6 mode (due to ::Any being for dual mode), but the address passed was a v4 address, meaning it took the wrong codepath. Linux, strangely, apparently works anyway. This is fixable in OS X (by using the v6 join path when bound in v6/dual mode), but the same fix doesn't work on Windows, failing with WSAEADDRNOTAVAIL. Don't allow this behaviour, and provide a sane error message telling the user what to do instead. Done-with: Shane Kearns Task-number: QTBUG-25047 Change-Id: Iaf5bbee82e13ac92e11b60c558f5af9ce26f474b Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Added some convenience API for platform input contextsPekka Vuorela2012-04-012-1/+28
| | | | | | | | | | | | | QPlatformInputContext now gets notified on changed focus and has inputMethodAccepted() telling whether current focus object accepts input method events. Also adapted IBus plugin to use this. Key event filtering for focused objects without input method support got fixed by the change. Change-Id: I6910aa6af2459d752a5763f0ae88fa8c34e5b165 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Testability for password mask delayPekka Vuorela2012-04-012-4/+14
| | | | | | | | Unit test to override mask delay value so running it is not dependent on platform style hint. Change-Id: Ic5cc12d32cf97e64729b3af54250bdc05c0c95ad Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* QNetworkAccessFtpBackend: remove entry from QNetworkAccessCacheMartin Petersson2012-04-011-0/+32
| | | | | | | | | | | When FTP login fails we fail to remove the entry from the cache. This is because the cache key is created from the url with the userInfo. So this needs to be set again to match the key used when inserted. Task-number: QTBUG-11824 Change-Id: Ib3fd2d737581653ae59c56d0810d42e2d8dc2176 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix inputMask accessor of QLineControl.Friedemann Kleint2012-03-311-4/+4
| | | | | | | | Do not append blank character if it is the default. Task-number: QTBUG-20834 Change-Id: I17f6ac4058f295f25ff49f33c41bd9ee40b75811 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Windows: Make tst_qprinter significant again since the test is passingMiikka Heikkinen2012-03-311-1/+0
| | | | | | | The commit b188221fee0eaacec115b514185a0508ef655897 fixed the test. Change-Id: I630ede91ad6050b6a22d2b65947dd341ce7d9aa9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Enable Windows font tests..Friedemann Kleint2012-03-313-5/+0
| | | | | | | | | | | | | Application fonts have been added in 4f1820e3a77b3fdda32a1b935502b187e73059cf Task-number: QTBUG-24193 Task-number: QTBUG-24195 Task-number: QTBUG-24196 Change-Id: I45d0bbb183562b7355e07ce7fa93b0046dfd4665 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Add payload to QSqlDriver notification with PSQL implementation.Matt Newell2012-03-311-4/+6
| | | | | | | | | | | | | | | | | | | Postgres async notifications can contain a payload parameter that is currently discarded. This patch provides the QSqlDriver api change necessary to deliver a payload with each emitted notification by adding a QVariant parameter to the notification signal. It also provides the implementation for the qsqlpsql driver. The qsql_ibase driver has been updated to reflect the change to the notification signal signature. The eventNotificationPSQL test in the qsqldatabase test has been expanded to test proper payload sending and receiving. All tests/auto/sql/kernel tests have been run with sqllite and postgres with no regressions. Task-number: QTBUG-13500 Change-Id: I9137f6acc8cfca93f45791ca930e0287d93d5d0d Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Expand QtSql tests covering boundValues and boundValueNameMatt Newell2012-03-311-12/+75
| | | | | | | | Tests added that cover boundValues with positional binding, and boundValueName. Change-Id: I2962d76607b716d19d3e0be958109be2f032f2d9 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix postgres notification support in the QPSQLDriver.Matt Newell2012-03-301-6/+5
| | | | | | | | | | | | | | | | | | | | | This patch fixes a critical bug in the qsqlpsql driver where notifications aren't delivered when received. Any blocking libpq function(specifically PQexec) will read all the incoming data from the socket, including any pending notifications. This would cause the socket notifier to never be fired for incoming notifications that are already queued inside libpq. The qsqldriver test case was skipping the postgres notification test because of this bug, now its enabled and passing. In order to fix this bug I made a wrapper function for PQexec in QPSQLDriverPrivate that calls _q_handleNotification via QMetaObject::callMethod QueuedConnection in order to deliver pending notifications when control returns to the event loop. I also added a flag to ensure only one call is made each time the event loop is entered. Change-Id: I19f5297094ae7ae46bfb0717e4fca744d69f7b92 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Fix crash when an invalid filter is setHonglei Zhang2012-03-301-0/+23
| | | | | | | | | | | | | QSqlTableModel::headerData() generates a crash if an invalid filter is set. QSqlQueryModel::indexInQuery() should check the index value before applied to d->colOffsets[]. QSqlQueryModel::initRecordAndPrimaryIndex() is updated to sync the size of rec and colOffsets. Task-number: QTBUG-23879 Change-Id: Ic9f88bb288592aa6fb3c1415cc818632dadaab56 Reviewed-by: Michael Goddard <michael.goddard@nokia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Allow named bind values to be used multiple times per queryMatt Newell2012-03-301-4/+18
| | | | | | | | | | | Prepared queries should be able to use a name parameter more than once. Currently this will result in undefined behavior and crashes. This patch fixes the bug and implements the needed test case. Task-number: QTBUG-6420 Change-Id: I07d6537e432a9b2781e9ef3d9f597bceb054527e Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
* Properly detach when the modified object is a sub objectLars Knoll2012-03-291-0/+25
| | | | | | | | | | | The clone() method didn't detach if we had enough memory allocated, but didn't consider that the object being modified is not the root object of the binary blob. Change-Id: I9a479ae1c873b7fe9cff7e13c539e7a41961bf68 Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com> Reviewed-by: abcd <amos.choy@nokia.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Fix a crash in QFactoryLoaderJonas Rabbe2012-03-2912-0/+476
| | | | | | | | | | | | | | The change in plugin loading has meant that different plugins in the same plugin folder will not be handled properly when loaded with different instances of QFactoryLoader. A solution is to only unload compatability plugins from QFactoryLoader::update() since they are the only plugins that are actually loaded in that method. This auto test shows the error on the current version of QFactoryLoader and passes with the fix described above. Change-Id: I12001525d51bb631d6742c5965357598322f247c Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Use "qt-project.org" instead of "trolltech" in the resource systemhjk2012-03-283-26/+26
| | | | | | | Task-number: QTBUG-23272 Change-Id: Idcdb9620910577b3c0fc9a792a0446665bd2eab6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove comment about QVariantList and QVariantMap.Stephen Kelly2012-03-281-2/+0
| | | | | | | | | | They predate Qt 4.5, but it looks like the comments are indicating that QVariantList and QVariantMap types will use the basic template, but that is not the case. Instead they will use the compare specializations for QList<T> and QMap<T> respectively. Change-Id: Iebf7e9b8aaa8a699ea720090fbf641dfecde0ff7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QCoreApplication::applicationName() default to argv[0]David Faure2012-03-282-11/+6
| | | | | | | | | | | | This makes it more useful in all the Qt apps that don't set it, given that it's used internally by QTemporaryFile, QTemporaryDir, QStandardPaths, QDBus, QAccessibleApplication, etc. Qt4 compatibility in the deprecated QDesktopServices is preserved, no fallback there. Change-Id: I584463507cf917a3720793c6bd45d07c60f8356c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Protect QAbstractTextDocumentLayout::anchorAt() from preeditPekka Vuorela2012-03-271-0/+32
| | | | | | | | | | Previously the method didn't take into account that hitTest() returns visual index, i.e. containing the preedit, and thus was easily hitting assertion. Need to compensate for that before checking for actual link. Change-Id: I119e7f91088b4db9d347a3da338f6df915ce9719 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix some compiler warnings in tests.Friedemann Kleint2012-03-278-14/+20
| | | | | | | | - Unused variables - Deprecated conversion from const char * to char *. Change-Id: Iea0b9c4613ea74cead6d95ba12ad1028f531cbff Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Reverted use of tentative commit use in QWidget editorsPekka Vuorela2012-03-276-50/+89
| | | | | | | | | Feature to be reimplemented simplified. Cases when input method needs to be reset with possibility to commit use QInputMethod::commit() again. Change-Id: Ibfe7aecc0799e7a76c7ac4f5d860971cfe6e97ca Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Fix IAccessible2 for Windows, enable MSAA/IAccessible for MinGW.Jan-Arve Saether2012-03-272-0/+113
| | | | | | | | | | | | | | | Commit 5e9089135bfe7db7d7a43c9ee4d4c24ab8f6458d had some problems: * It left out the cast to IServiceProvider in the refactoring of QueryInterface. This broke IAccessible2. * It also failed to enable the codepath for MinGW inside wrap(), which effectively caused MSAA for MinGW to be disabled. It also adds an autotest to the bridge (finally). It is simple, but it should help avoiding committing stuff that completely breaks the bridge. Change-Id: I459d89c3bdb93e54ddea85872b50fc1dba0fe4a0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QJsonParseError improvementsAlexei Rousskikh2012-03-271-7/+7
| | | | | | | | - added human-readable error message - improved enum value names Change-Id: I86d4bb419f9581f85d61b6e090048f1943017f9e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Uncomment disabled code in QSettings autotest.Jason McDonald2012-03-271-6/+3
| | | | | | | | | The code in question was already commented out before the test was added to the Qt repository in 2006. After changing the code to use QFile::rename() for portability, the test appears to pass. Change-Id: I52a8578a47da419cabf5826b633cc4f2ac2c5218 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Mark tst_qdialog as insignificant on mac.Rohan McGovern2012-03-271-0/+1
| | | | | | | | | This autotest gives different results on consecutive runs, and is therefore insignificant for the purpose of detecting regressions. Task-number: QTBUG-24977 Change-Id: I5c4dfd663ce5df6b60ae47a29d332c06e3c0585f Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
* Cocoa: don't show window when calling raise()Bradley T. Hughes2012-03-261-3/+0
| | | | | | | | | | | Calling raise() on a hidden window should not show it. The setVisible() function will ensure that the window is raised (since we use orderFront or makeKeyAndOrderFront). This fixes the failing tst_QDockWidget::task169808_setFloating() test as well. Task-number: QTBUG-24774 Change-Id: If34472ebbcd615c10654efafd54c84c03d10bc8c Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix measurement system for the UKLars Knoll2012-03-261-0/+17
| | | | | | | | THe UK still uses the Imperial system at least for distances and many other things. Change-Id: I99379de35620114328ad6a7fc9b226a46692bedd Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Password editor mask delay stylable by platform pluginPekka Vuorela2012-03-261-6/+4
| | | | | | | | | Replaced hard coding as QT_GUI_PASSWORD_ECHO_DELAY with a style hint. Change-Id: I0b78ebad723dbe19d9b9496583203e31545874e2 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Test mouse events more thoroughly in QWindow autotestLaszlo Agocs2012-03-261-5/+118
| | | | | | | | | | Apparently there are still issues here and there (e.g. in declarative) with properly recognizing more complex event sequences (like triple clicks). The behavior of qtbase is correct but we need a test case that makes sure the functionality will not regress. Change-Id: I08c558fcfdde0dd06e194b4f0affc6f6896573bf Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix QGuiApplication::keyboardModifiers()Bradley T. Hughes2012-03-261-0/+75
| | | | | | | | | Make sure that the keybaord modifiers are maintained properly when handling window system events. Change-Id: Ie75cbe5eb509c29e3d2291694f2de509fbf3098a Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fixed qthreadstorage unittest to work from install directoryKurt Korbatits2012-03-261-0/+4
| | | | | | | - Added install of crashonexit sub program Change-Id: I2cc3043d5c1b879665930552487b4fe54407fd25 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Work around what apparently is a GCC 4.6.0 bugThiago Macieira2012-03-251-1/+1
| | | | | | | | The QFlags::operator int() isn't being called, so GCC complains that this isn't an integer expression. Change-Id: I537d06fd4a52ecbcddf0ef67807b298c42d3e911 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Improve accessibility test to handle more text events.Frederik Gladhorn2012-03-251-9/+36
| | | | | Change-Id: I67ece6c9bb755e84c786b32e8e3396eaf634fda1 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Restore Qt4 compat in QDesktopServices::DataLocationDavid Faure2012-03-241-2/+33
| | | | | | | "/data/" was appended to the base directory. Change-Id: I220f2ce74c36b795bc49c7c84106feb0709d1547 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QPrinterInfo: remove a test that is too earlyThiago Macieira2012-03-241-1/+1
| | | | | | | | If we want to have any chance of getting the missing printers reported, we cannot check the size beforehand. Change-Id: I450897fe53c04aeb1a4b217bd0c1f548c455a428 Reviewed-by: John Layt <jlayt@kde.org>
* Fix compilation of tst_QSqlThread: no need to use QBasicAtomicInt hereThiago Macieira2012-03-241-1/+1
| | | | | | Change-Id: Ib474fe62501ee1ee5e3d7008c3b561f8db79265c Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make sure windows send accessibility activated updates.Frederik Gladhorn2012-03-241-4/+44
| | | | | | | | Both QWindow and QWidgetWindow should update with the active state signal. Change-Id: I0219f803aa0fb109765f0faa0aedb120c2a439f0 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Added QAccessibleGroupBoxFrederik Gladhorn2012-03-241-0/+67
| | | | | | | | | | | | | | | Added a new accessible interface for QGroupBox, as QAccessibleDisplay is not good enough when the QGroupBox is checkable. AccessibleFactory was modified to return a QAccessibleGroupBox when the accessible interface of a QGroupBox is requested. Created tst_QAccessibility::groupBoxTest Port to Qt5 of the patch by José Millán Soto <fid@gpul.org> Change-Id: I6c23dcf5562b3ea269b04102e78463b65827188a Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com> (cherry picked from commit c03ceb203c65d9e3485fad848bfc0c4b6ee3e9aa)