summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fixed QInputMethod API to use isVisible() instead of visible().Samuel Rødal2012-03-221-7/+7
| | | | | | | | Deprecate the old API for now as not to break existing usages. Change-Id: I7abbbbe8a34951282537a9d74cded03743f44df7 Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* FocusAboutToChange event to be send before focus changesPekka Vuorela2012-03-222-21/+77
| | | | | | | | | | | | | | Focus change happen as: FocusAboutToChange event -> focus change -> FocusOut event -> FocusIn event. Input method need to have focus when calling commit(). Notification on focus about to be lost allows QWindow implementations to commit in time. Also changes QWidget documentation to match code reality. Change-Id: I17a8a374a33dd700909f79e370b42348869261a6 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Make comment() work in the C locale too.David Faure2012-03-221-1/+1
| | | | | | | | | The parser makes the default language en_US, and no mimetype xml says <comment xml:lang="C">, so use the en_US string for the C locale, rather than returning an empty string. Change-Id: Iad7c142e8078abe357773249416e7ce9b3e29a92 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Return all expected paths in QStandardPaths::standardLocationsDavid Faure2012-03-221-31/+77
| | | | | | | | ApplicationsLocation and DataLocation were returning only the local path, rather than system paths + local path. Change-Id: I653d14e5bbe1e08c5fa1ecd5a6106336d1cd0369 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Cocoa: fix setting color with alpha channel value for color dialogTeemu Katajisto2012-03-221-3/+0
| | | | | | | | | | | Make sure that if ShowAlphaChannel option is set then also setShowsAlpha needs to be set for the panel before setting the current color, otherwise alpha channel value is omitted. Task-number: QTBUG-24320 Change-Id: Ifb3822711af8ffd0cf6cb4c8aab2b0020d296663 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fixed path in qobject unittestKurt Korbatits2012-03-221-1/+1
| | | | | | | - Fixed path was failing to find sub program. Change-Id: I86f1a6941e244c9bc25ad0441cc7a441607560b7 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Added extra tests to json benchmarkKurt Korbatits2012-03-221-0/+32
| | | | | | | | | | - Added toByteArray() and fromByteArray() benchmark tests. Performance tests to measure QVariantMap to bytearray and bytearray to QVariantMap. Use case: Interprocess communications via local socket Change-Id: If5e94ff870890b2ebb665f3cc38f5c33b34547f4 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix directories never being unwatched after deletion on Windows.Robin Burchell2012-03-211-0/+27
| | | | | | | | | | | | | | | This causes all sorts of problems, but is also blocking the introduction of new, more detailed signals, because the backend never correctly identified the removal. The object handle appears to be woken up before the directory is actually deleted, thus causing QFileInfo::exists() to return true, and not doing the removal dance. This behaviour isn't exactly documented (as far as I was able to find out), but also seems to happen consistently, and Chromium also contains a comment noting a similar issue. Task-number: QTBUG-2331 Change-Id: Icfb6219b78e688852d7863a666a0ffc31bb4d573 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>