summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Update tests/manual/windowmodality to test native dialogsBradley T. Hughes2012-03-304-99/+601
| | | | | | | | | Window- and ApplicationModal native dialogs need to send WindowBlocked and WindowUnblocked events as well. This will let us test that they work properly. Change-Id: Iaa4ddb79bb0872f9ab1e61336a5decb262472283 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* 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>
* Remove modal child widget buttons from tests/manual/windowmodalityBradley T. Hughes2012-03-293-129/+39
| | | | | | | | This functionality does not work anymore. Modality is tied to top-level windows, not to any arbirtrary QWidget. Change-Id: Ie7545cbcfbf4021850b215f014bb0f7274971327 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>
* windowmodality test: Allow exec() with ApplicationModal dialogsBradley T. Hughes2012-03-283-145/+181
| | | | | | | | Add a checkbox to the main window and dialog .ui files to allow exec()ing ApplicationModal dialogs. Change-Id: I4d8a4be136d0f6b688938a8020a6ebcc69a9dfe8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>
* Don't use the pri depends line for link dependencies.Stephen Kelly2012-03-283-4/+8
| | | | | | | | | That is not what depends is for. Change-Id: Iabf93e890f009bd6c8fcc18dde1891bf20a493f1 Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.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>
* Add manual test for window modalityBradley T. Hughes2012-03-274-0/+468
| | | | | | | | | This test allows us to recreate any modal scenario. Multiple top-level windows with any depth of window and application modal dialogs is possible. Change-Id: Ieef2c557d2f9ad2d2b2d2b598e9415f4c1e2dcb5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QHttpNetworkConnection test: avoid integer divide by zero exception.Martin Petersson2012-03-271-1/+1
| | | | | | | The speed calculation caused a dived by zero exception. Change-Id: I83281c8e66b9c18e7d282920901ccac1e9444a68 Reviewed-by: Shane Kearns <shane.kearns@accenture.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)
* API cleanup: remove CoordinateType enumJan-Arve Saether2012-03-241-4/+5
| | | | | | | | The bridge can do the mapping to and from screen position. This is now done in the windows bridge. Change-Id: I5ca5df0fbeeb58202539f55a0f62717fb1685092 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Implement QSystemTrayIcon for X11.Friedemann Kleint2012-03-231-2/+5
| | | | | | | Reimplement using a QWidget. Use X Change-Id: I7f8326598fb7210d59bc1d682cdada4526d5b6dd Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove #if 0 sections from QRegExp autotestGiuseppe D'Angelo2012-03-231-3/+3
| | | | | | | | | | Use QEXPECT_FAIL instead (QRegExp is bugged w.r.t. the specific test data). Task-number: QTBUG-22466 Change-Id: Id5af01fa0d5c0536845fd4db19d4264498a8675b Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fixed QLineEdit to emit selectionChangedPekka Vuorela2012-03-231-4/+17
| | | | | | | Was not emitted when removed by input method event. Change-Id: Ia2c0dcb09d42826188d4612f4c1705a41874a31d Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Fix QPrinter test in WindowsMiikka Heikkinen2012-03-231-11/+30
| | | | | | | | | | | | | | | | | | | | | | | | Fixed Q_WS_WIN flagging to Q_OS_WIN in QPrinter API and related implementation to make API match the documentation and Qt 4.8. Also Removed the unused internal HDC related functions from the API, that were previously behind Q_WS_WIN flag. Some of the properties tested are documented to be valid for native print engine only in X11 environment, so skipped testing those in non-xcb environments. Copy collation is also apparently not supported in Windows native print engine, though this seems to be undocumented, so skipped that only in Windows. At least one of the test blocks in tst_QPrinter::valuePreservation() failed due to default printer not getting set properly, so fixed that, too. Task-number: QTBUG-24191 Task-number: QTBUG-22927 Change-Id: I44a5e3d647a1279fcc7f1e99de6881f9be330246 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* More UTF8 fix of raster autotestaavit2012-03-221-2/+1
| | | | | | | This completes 6c98fd2, for systems where default codec is not UTF8. Change-Id: I94795785d5d172558c40c06bd3ef4ffaba1624c5 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Allow autobound UDP sockets to send to IPv4 and IPv6Shane Kearns2012-03-221-0/+79
| | | | | | | | | | | | | | | | When writeDatagram is called without first binding the UDP socket, then bind it as QHostAddress::Any. This allows the same socket to be used to sent to both IPv4 and IPv6 destination addresses. Allowing the OS to autobind the socket inside sendTo() may result in a single protocol socket. Task-number: QTBUG-5275 Change-Id: I2b76507e8a8a38369c6eafb61ce4191d1d6cc930 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Significantly speed up insertion into QJsonObject/ArrayLars Knoll2012-03-221-0/+28
| | | | | | | | | | | | The code was only allocating memory for the next insertion leading to a reallocation of the whole data for every single insertion. The code now reserves some space and uses a decent growth strategy to avoid repeated reallocs. Change-Id: I48b0feab71ba8ca73e7037f8460080f198b2f009 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Make tst_qmovie work in shadow buildsThiago Macieira2012-03-221-2/+2
| | | | | Change-Id: I8fe4b5e98ce2fb1ac8420bf568f5c9c973165fbf Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix QSysInfo::WindowsVersion checking (QSysInfo::WV_NT_based is a mask)Joerg Bornemann2012-03-221-2/+2
| | | | | | | | Manual merge of the original fix 1ef309e9 in the Qt 4.8 repo. Task-number: QTBUG-20480 Change-Id: Id08500c2dd16965af3942e65cff1f4afa24180b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>