summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Improve QDate, QTime, QDateTime auto tests.Mitch Curtis2012-07-063-47/+114
| | | | | | | | Add more test data, merging operator!= tests in with operator== to take advantage of added data. Change-Id: If0426a3d01b8800cb7363385dbf3bcb21af5ed8f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qudpsocket: Interface fix for Windows XpMartin Petersson2012-07-061-0/+6
| | | | | | | | On Windows Xp we can not connect to the pseudo interfaces used for Teredo, so do not add these to the tests. Change-Id: I4e20c880fa2d18f266ffcef2f640d8b2e6d0cd21 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* tst_QTcpServer::linkLocal fix for Windows XpMartin Petersson2012-07-051-0/+3
| | | | | | | | Do not try to connect to the Terdo Tunneling Pseudo-Interface as this will fail for Windows Xp. Change-Id: I6dcd8369ba1e8642224cd4ac53f4032ed46d050d Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* QHeaderView - adding an auto test with saveState and restoreStateThorbjørn Lund Martsum2012-07-051-0/+22
| | | | | | | | This test is nice to have regardless though the main reason for it is a refactor of hiddenSections in QHeaderView. Change-Id: Id41a1d5edda2ef75bf432a78cdb3e952303eae92 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QHeaderView - resizeSection improvementThorbjørn Lund Martsum2012-07-052-0/+113
| | | | | | | | | | | | | | | | | This patch improves the manual resizeSection a bit. Before we didn't consider that the program could maybe resize other sections when the user was resizing one section. The main issue with that is that setOffset is so smart that it helps moving the mouse cursor - however it really shouldn't do if the program is trying to change something too. Maybe this won't solve all (possible) problems at once - but it is a fixed needed just to make something work - trying to make anything work without this fix is horrible.... Change-Id: I3cefa375a9b8ee4c1ef1e08ba0900025c671e4c6 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Replace insignificant test with QEXPECT_FAIL.Toby Tomkins2012-07-052-2/+3
| | | | | | | Task-number: QTBUG-26430 Change-Id: I647388701b7e6a71bb011f7714ff3b96c833a837 Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
* QHeaderView - prevent negative default+minimum section sizesThorbjørn Lund Martsum2012-07-041-6/+4
| | | | | | | | | In 96f1fe8855082017fbbecccdab1eb11fd8c1f870 we agreed that sections with negative sizes did not make sense. Of the same reason default section sizes and minimum section sizes should be not negative. Change-Id: I6a770e7f510d8e2bb90bfd8f38b4fa0566fc137b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Uppercase the CONFIG for verbatim mode.Stephen Kelly2012-07-041-1/+1
| | | | | Change-Id: Iec883e0218af80fc329d866affb2b95db72c54d3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Add a Q_PROPERTY for the sourceModel of a proxy model.Stephen Kelly2012-07-041-0/+10
| | | | | | | | | | | Now that Q_PROPERTY with a QObject derived type is more powerful. This property can be used in QML so that wrappers for proxy models do not need to be created, such as in the example at https://codereview.qt-project.org/#change,13007 Change-Id: I6ba676549d2135585d429a28e214fef0b2a6b1f9 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* tst_qwidget: remove QEXPECT_FAIL for QTBUG-8911Joerg Bornemann2012-07-041-3/+0
| | | | | | | | QTBUG-8911 has been fixed some time ago. Change-Id: I19dae0571b1829f6b3b797f7e0ec5c24a4241db8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Replace insignificant test with QEXPECT_FAIL.Toby Tomkins2012-07-042-2/+1
| | | | | | | Task-number: QTBUG-26403 Change-Id: Id933665a35be056f2b2a6fa2152f324810a7f057 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Avoid load(testcase) for installing test helper appsRohan McGovern2012-07-0410-25/+18
| | | | | | | | | | | | Make test projects declare TEST_HELPER_INSTALLS rather than calling a function exported by testcase.prf. load(testcase) may be unsafe, as testcase.prf should be processed after default_post.prf. Fixes silent disabling of various autotests. Change-Id: I56b35ffd653a637ad5ab18d64dd1a1edadfac59f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
* Revert "Allow moc to handle symbols that have been redefined."Matthew Vogt2012-07-041-152/+0
| | | | | | | | | | | | This reverts commit 5bb1408927b4eb5a03e8ab9f7cbc68f80d8a3962. The temporary measure used to support redefinition of QtDeclarative class names during the transition period is no longer required. Task-number: QTBUG-24517 Change-Id: Ib90f08fcdfb02e004e594ac72b698eaa0325d98d Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix QWidget/widgetAt() test.Friedemann Kleint2012-07-031-6/+8
| | | | | | | | Prevent a crash by giving the widget some time to show up. Task-number: QTBUG-22326 Change-Id: Idaa23b21121e7c4f7098e8d51efd313bcc467e9a Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Remove Unicode escape sequence, which MSVC does not support.Friedemann Kleint2012-07-031-15/+1
| | | | | | | | Task-number: QTBUG-25924 Change-Id: I352bb5c674d90891df4103849bf5b5ac5778a2ee Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Platform-plugin support for QSystemTrayIcon.Christoph Schleifenbaum2012-07-031-5/+5
| | | | | | | | | | | | | | | | | | | | | Implement QPlatformSystemTrayIcon providing QPA-plugin-support for system tray icons. Make QSystemTrayIcon use this as new backend. Ported over qsystemtrayicon_mac.mm to qcocoasystemtrayicon.mm to provide Cocoa support for the new interface. It had to be changed to match the interface, especially for icon and menu handling. This interface is made to not use QStyle or QMenu which are related classes of QSystemTrayIcon. It's therefore not introducing QtWidget dependency into the platform plugin. Task-number: QTBUG-20978 Change-Id: I0d0a73835698b3b4f97219d4f5bbcfa2af57dbe2 Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix focus handling when the application has QAxWidgets.Miikka Heikkinen2012-07-033-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Removed old defunct platform specific code from QWidget::isActiveWindow() and added call to QPlatformWindow::isActive() instead. This is done because the embedded native windows inside QAxWidgets can have focus but are not part of the parent application's Qt window hierarchy, so native methods are required to determine if they are part of the active window or not. QWidgetPrivate::setFocus_sys() was implemented to activate the window of the focused widget if the focus was elsewhere. This is required because embedded native windows can steal the focus from the main application window. Focus event handling in Windows platform adaptation plugin was fixed to correctly identify the active window in cases where the are embedded native widgets that can have focus. Also fixed three test cases that were affected by these changes. Task-number: QTBUG-25852 Task-number: QTBUG-23699 Change-Id: I817e0ce4317e88955bb49b034eacd630a876ccf0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* tst_QTcpServer::clientServerLoop fix for Windows XpMartin Petersson2012-07-031-1/+1
| | | | | | | | When we do not have dual stack the listen on QHostAddress::Any will result in a serverAddress that is AnyIPv4. Change-Id: I3c2c21c9412cd46a57e3ed7ce1c1bd2ef42d4bd9 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Add QChar::SoftHyphen enum valueKonstantin Ritt2012-07-031-2/+2
| | | | | | | | | Just like for the QChar::ByteOrderMark, `ch == QChar::SoftHyphen` is much more readable than `ch == 0x00ad // (soft-hyphen)`, etc. Change-Id: I9c85f14cfd979037d35103c3259a435fd729b869 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* removed ancient left-over test from tst_qwidgetJoerg Bornemann2012-07-031-50/+0
| | | | | | | | | | | The part of tst_qwidget::reparent() that "makes sense only on Windows" is antiquated at least since the introduction of alien widgets. It basically tests if QWidget::winId() returns a valid window handle (has been replaced with winHandleOf here in the meantime). This is always successful, because winId() creates a valid window handle. Change-Id: I52c370e26fd9b34861bd4d52c12dded243382d43 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* tst_QWidget::gdiPainting fixedJoerg Bornemann2012-07-031-1/+2
| | | | | | | | We cannot use QWidget::grab for widgets that have WA_PaintOnScreen set. QScreen::grabWindow copies the real screen contents for us. Change-Id: If1f6233ec48bcb2b941ea683c56ce71a39642e67 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fixed warnings in qnetworkreply unit testKurt Korbatits2012-07-031-0/+2
| | | | | | | | | On windows without ssl there was a disconnect on sslError signal that was not wrapped in ifdef. Change-Id: I9b1327adfa853d4dc8f1d8a0120f8f0ed7c13e9e Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Add erase operation to QArrayDataOpsJoão Abecasis2012-07-032-0/+79
| | | | | Change-Id: I37d3ac465f5beddb5038e22e9cda32acb16c78fc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSslCertificate::fromPath fix wildcard handlingMartin Petersson2012-07-031-0/+4
| | | | | | | | | | | | | | The reqExp used to handle wildcards in the path was broken. So we always searched the working directory and not the specified path. Autotest where passing because of a hack used for Windows paths where we removed the first two chars in the path string. This fix will not use nativeSeparators thus removing the Windows hack and fix the regExp to match wildcard chars. Task-number: QTBUG-23573 Change-Id: I56fadbb67f25b8ce9c0f17cb6232e0bdb9148b1c Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix capitalization with newline bugYann Bodson2012-07-031-0/+23
| | | | | | | | | We only want to change the capitalization if the QScriptAnalysis flag was Lowercase, Uppercase or SmallCaps. Task-number: QTBUG-17485 Change-Id: Icbecb09b06a9153866ae81d592b3f6779c2dafb5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Move the macros for invoking ctest to a shared location.Stephen Kelly2012-07-031-42/+2
| | | | | | | | | They are still internal, but all Qt5 modules will be able to use them then. Change-Id: I42ab656115b0976ca959293dfd664ec071f35dbf Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add constexpr template specializations for built in metatypes.Stephen Kelly2012-07-031-0/+41
| | | | | | | | | This will make it possible (in Qt 6) to remove the enums listing metatype ids. As it is constexpr, it can be used in switch statements just like enums, as enum values, and as template specialization values. Change-Id: I51293674c403714e34cb8a8b8953522fc97a740a Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Mark qgl autotest as significant for WindowsKalle Juhani Lehtonen2012-07-031-1/+0
| | | | | | | | | | After Mesa 3D OpenGL library deployment to Windows 7 machines the test starts passing. Task-number: QTBUG-25293 Change-Id: I228cd683359f3932670bfa6ec8c4f32e2b40144b Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Change qglfunctions autotest to insignificant on WindowsKalle Juhani Lehtonen2012-07-021-0/+2
| | | | | | | | | | | | | Previously the test was skipped, because no OpenGL context was found. After Mesa 3D OpenGL library distribution for Windows 7 machines, OpenGL context is found, but the test crashes with exit code: 0xC0000409 (STATUS_STACK_BUFFER_OVERRUN) Marking the test insignificant until the issue is resolved. Task-number: QTBUG-26390 Change-Id: I996bbc3399704b541f5baa4832cf39b77b715c1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Implement QVariant conversions for QObject derived pointer metatypes.Stephen Kelly2012-07-011-0/+13
| | | | | | | canConvert() and convert() use the metaobject to convert such types. Change-Id: Ic05e74c5c2423b4b9682b88adc856a16dcba4cff Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Store the QMetaObject with the QMetaType.Stephen Kelly2012-07-014-0/+97
| | | | | | | | This will allow conversion between pointers to compatible QObject derived types. Change-Id: I19e08934571fb3f1b91e594892214041fe5f6a11 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Flag consistently failing tests as expected fail tests.Toby Tomkins2012-06-302-2/+2
| | | | | | | | | Task-number: QTBUG-26372 Task-number: QTBUG-26371 Task-number: QTBUG-20984 Change-Id: I7ae558243c366769cd6c587e77f862558e8053a1 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QAbstractProxyModel autotest doesn't need widgetsGiuseppe D'Angelo2012-06-291-1/+1
| | | | | | | After the QStandardItemModel move to QtGui. Change-Id: I2be82d89518ff97cf164026ee8b13a41f9c93d4a Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Move QStandardItem/QStandardItemModel to QtGuiGiuseppe D'Angelo2012-06-2912-6/+9
| | | | | | | | | | | The dependencies on QFont, QBrush, QIcon are all in QtGui, so there's little sense to still have these classes in QtWidgets. This also copies and pastes a version of QWidgetItemData as QStandardItemData inside qstandarditemmodel_p.h. Change-Id: Ibafc5a30748e7ce0b54753309ae6dc4a797fc20e Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Merge branch 'buildsystem' (second round)Oswald Buddenhagen2012-06-293-26/+26
|\ | | | | | | | | | | | | | | | | refactoring and cleanup. fixes x-builds between different os families. Conflicts: mkspecs/features/qt.prf Change-Id: I0205e6f07f77c9b015cf055dd87a471883949a91
| * do not unnecessarily mess with CONFIGOswald Buddenhagen2012-06-273-26/+26
| | | | | | | | | | | | | | it could/would bite us later Change-Id: I73f989e7603c6e5b7b85fc4ee4ad2557c1b02d80 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Fixed several unit tests to work in shadow buildsKurt Korbatits2012-06-299-11/+9
| | | | | | | | | | | | | | | | - qlogging, qthreadstorage, qnetworkreply, qapplication, qfile, qprocess Added app_bundle and debug_and_release_target to CONFIG Change-Id: I6212902c449520dc016da9590149a423069cc38c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* | Make QCalendarWidget use its locale's firstDayOfWeek.Mitch Curtis2012-06-281-0/+38
| | | | | | | | | | | | | | | | | | | | | | QCalendarWidget currently uses Qt::Sunday as the default first day of the week. It has been suggested that a better user experience would see the calendar's locale be used instead. Task-number: QTBUG-19811 Change-Id: I4441bf9ffd52213ef622a4a7f498530b7cc9e110 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* | Call QObject::disconnectNotify() when receiver is destroyedKent Hansen2012-06-282-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store the signal index in QObjectPrivate::Connection, thereby making it available in "implicit" disconnect contexts (i.e., receiver deletion). This change does not cause the size of QObjectPrivate::Connection to grow (still 40 bytes on 32-bit Linux, 72 bytes on 64-bit Mac). Valgrinding the new benchmark indicates that the percentage of the time spent in the QObject destructor increased from 7.8% to 8.4% on ia32, for that particular stress test; the increase is the combined cost of calling metaObject(), QMetaObjectPrivate::signal(), and disconnectNotify() for one connection. In practice, the measured wallclock time increased by about 3ms for a 500ms run (which repeatedly constructs, connects, and destroys an object). Task-number: QTBUG-4844 Change-Id: I1beb01c753f31542fc0acb62edb4c6d165fcc5b4 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* | Fixed qsslsocket_onDemandCertificates_{static,member}Rohan McGovern2012-06-282-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test had been XFAILing since August 2011, but recently started to XPASS, possibly due to changes in the SSL setup on the tested host (qt.nokia.com). Removed QEXPECT_FAIL and replaced qt.nokia.com with codereview.qt-project.org as a host expected to have working SSL. (If SSL on the latter were broken, it would immediately be detected by any attempts at git over HTTPS.) SSL setup can be verified as working by: openssl s_client -CApath /etc/ssl/certs \ -connect codereview.qt-project.org:443 </dev/null Task-number: QTBUG-20983 Change-Id: I9b4146da6545ab4115d6308044b1d242dd52b7f9 Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
* | Remove the extra warnings and -Werror from tst_qmimetypeThiago Macieira2012-06-271-2/+0
| | | | | | | | | | | | | | Those belong in headersclean and nowhere else. Change-Id: Ib7078ef3071266e4c03e3580068f978a9418cbf1 Reviewed-by: David Faure <faure@kde.org>
* | Add QGuiApplication::setApplicationDisplayName.David Faure2012-06-271-0/+13
|/ | | | | | | This is for use in window titles. Change-Id: I0070a08abd379ae2edcfab4413c182bd9e840678 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Implement RFC6265 test suiteShane Kearns2012-06-272-0/+2056
| | | | | | | | | | | | | Tests against the test data from the IETF working group https://github.com/abarth/http-state The test data is in the parser.json file, imported from that repository and with one patch applied to make the ordering0001 test case data match the raw files which are used by their python test server. Task-number: QTBUG-18920 Change-Id: I17c1a8d92aef2850907f009667c6574e4c8d0cdb Reviewed-by: Richard J. Moore <rich@kde.org>
* Use RFC6265 rules for cookie path & path matchingShane Kearns2012-06-271-13/+25
| | | | | | | | | | | | | | | Url encoding of paths is no longer used. This matches the current release behaviour of Firefox, Chrome and MSIE browsers. RFC6265 does not allow this type of encoding. This fixes remaining path test cases in the IETF test suite. Currently the path0027 test is passed by Firefox but failed by Chrome and MSIE, so there is a potential compatibility issue. However it is a corner case with a malformed cookie. Task-number: QTBUG-15794 Change-Id: I9b02bb5adc32d614f512d314d06f2c60894aa2b0 Reviewed-by: Richard J. Moore <rich@kde.org>
* QNetworkCookie: Use RFC6265 rules for parsing Set-CookieShane Kearns2012-06-271-3/+9
| | | | | | | | | | | | | | The ';' separator takes priority even inside a quoted string. Quotation marks have no special meaning, they are not parsed and regenerated anymore. This means it is not possible to include the ';' character inside a cookie value. Other characters are returned transparently, including [",\] Task-number: QTBUG-15794 Task-number: QTBUG-26002 Task-number: QTBUG-11641 Change-Id: I4eefef5c6ac7753d5a21c226169e264578521fe9 Reviewed-by: Richard J. Moore <rich@kde.org>
* qget test - fix null pointer dereferenceShane Kearns2012-06-271-1/+1
| | | | | | | If the server sends a redirect with no body, the file is null Change-Id: I49fd1d8a4cdd404497ebef4c7f3b478960776896 Reviewed-by: Richard J. Moore <rich@kde.org>
* Change invalid test case (two cookies separated by ,)Shane Kearns2012-06-271-2/+9
| | | | | | | | Two cookies in a single Set-Cookie header are no longer allowed. Check that this header is parsed according to RFC6265 rules instead Change-Id: Ice48bbe78a9886208f7d1186cf1d8c37f46f1252 Reviewed-by: Richard J. Moore <rich@kde.org>
* QNetworkRequest autotest: adapt to new cookie parsing (re. commas)Peter Hartmann2012-06-271-1/+1
| | | | | | | | | | | | | | Cookies cannot be separated by commas anymore, but are separated by new lines. See "Remove support for multiple cookies in one Set-Cookie header to follow RFC6265." Reviewed-by: Martin Petersson Task-number: QTBUG-21456 (cherry-picked from 5d809703aa2d2a08ae7e9610fd42025b081d3d0c) Change-Id: If7d1b4e58399a5d678495af6ff280409ba220e86 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Remove support for multiple cookies in one Set-Cookie header to follow RFC6265.Jocelyn Turcotte2012-06-271-39/+15
| | | | | | | | | | | | This also allows cookie values to contain commas to increase compatibility like most popular browsers do even though the RFC still reserves them for future uses. Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Task-number: QTBUG-21456 (cherry-picked from 8ba781b01e900148fec2e9d26485369b3295487f) Change-Id: Ib09ab2411dddf7f99de1c0c31680428b7412fc7e Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* tst_qtextscriptengine: make it compilable under MSVC2010Debao Zhang2012-06-261-2/+6
| | | | | | | | | | Source files which contain UTF-8 literals can not be compiled by MSVC with Chinese/Japanese locale. Change-Id: I5daa2e45c5e1ceb86da91e72288c24018c49c0f6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>