summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* moc: support mapping pointers to member functions to indexesOlivier Goffart2011-11-141-0/+22
| | | | | | | | | | | | | This change adds QMetaObject::IndexOfMethod as a parameter to the qt_static_metacall function. It lets the moc generated code return the index of a signal or slot given its pointer to member function This is required to support the new connection syntax Change-Id: I39198c6699b5aa3599d3d282f7ac79b1e3684d33 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Deprecate QSslCertificate::isValid() replace with isBlacklisted()Richard Moore2011-11-141-4/+4
| | | | | | | | | | | Currently isValid wrongly gives the impression it checks a certificate for validity - it doesn't. It merely checks if the certificate dates are valid and if the certificate is blacklisted. Since it's already easy for users to check the dates, let's just give them access to the ability to check for blacklisting. Change-Id: I25be3bde6a01063034702a9574b28469bf4882cd Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Added base 10 to be used with QIntValidator.Mikko Knuutila2011-11-141-0/+9
| | | | | | | | | | | | Fixes an error in QIntValidator, which occurred because locale.toInt() was missing a parameter for base value and this led it to presume wrongly that a base 8 is in use. Task-number: QTBUG-21602 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> (cherry picked from commit ee3f763f3642d1a098e6293fbc586b34a3e6e8be) Change-Id: Iee3f763f3642d1a098e6293fbc586b34a3e6e8be
* Fixed wrong QGroupBox check stateMarkku Heikkila2011-11-141-0/+23
| | | | | | | | | | Handle mouserelease only if mouse is pressed in QGroupBox. Task-number: QTBUG-19170 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> (cherry picked from commit df819cfe17f6dfd089096063524932fc4975804f) Change-Id: Idf819cfe17f6dfd089096063524932fc4975804f
* Cleanup corelib autotestsJason McDonald2011-11-1421-93/+11
| | | | | | | | | | | | | Remove various disabled and/or non-helpful debugging code. Any test diagnostics that are useful should be part of the regular test output, as the CI system cannot switch on commented-out code when there is a test failure. Diagnostics should also be informative -- simply printing the value of a variable with no other information about what is being printed (or why it is being printed) is not informative. Change-Id: I21a6c2121be86001bb57e80f426507b6e619ee9e Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove commented code from qfuture test.Jason McDonald2011-11-141-20/+0
| | | | | | | | | | The removed code was already commented out when first added in November 2007 and is nowhere near compiling. If there was anything of value here, anyone who is able to find it is free to re-add a version that actually works. Change-Id: I4a7127a272254224f6a1e65fbd2a01000a4d2be9 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Re-enabled tst_qpluginloaderJo Asplin2011-11-111-2/+0
| | | | | | | | This test is passing in CI. Task-number: QTBUG-21402 Change-Id: I356476e458cac1cd434959fdf801011a607c9233 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Fix warning in tst_qobjectOlivier Goffart2011-11-111-2/+0
| | | | | | | signal4 is not used in that function Change-Id: I69f39a4639bfae067c411fd1166fc36ca3febbc5 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Add Qt's debug/release mode to the lancelot autotests' client infoaavit2011-11-112-0/+5
| | | | | Change-Id: I146c035c241475e9851d11abfd3f50676c8e8bca Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Add API to clear the current index. Symmetric with clearing selection.Stephen Kelly2011-11-111-0/+32
| | | | | Change-Id: I08070f4fdf26898d5b6edd5259f011f9b3c75512 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make this API virtual to make selection proxying possible.Stephen Kelly2011-11-111-0/+9
| | | | | Change-Id: Ie93c8b38c59d347026a68eae03687d9017b3d048 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QByteArray autotest: Check for defines inside of slotOliver Wolff2011-11-111-4/+8
| | | | | | | | | | | Instead of creating slots depending on certain defines, these defines should be checked inside the slots. Moc may not be aware of all defines (e.g. compiler specific ones) and thus (not) create slots according to the condition given. Change-Id: I50495444b8f468ec131e6a0937e18803a8077758 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Added QTBUG-22296 to QEXPECT_FAILsJo Asplin2011-11-111-5/+5
| | | | | Change-Id: I6c619cea64a14d957077813256c7d4f7ff6a4220 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Repaint QProgressBar when minimum or maximum changedTero Ahola2011-11-111-0/+39
| | | | | | | | | | | | | | The implementation of QProgressBar::setMinimum and setMaximum did not repaint the widget. This caused the widget to be shown incorrectly in case you call setMinimum or setMaximum but not setValue. Task-number: QTBUG-22121 (cherry picked from commit b1998f4f59c3b10700963b2d13a17a0cc77ef665) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Change-Id: I331d37ab4451d9e096cdf91a9e0a0286bc3cdffb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Adding test for custom bezier easing curvesThomas Hartmann2011-11-111-0/+222
| | | | | | | I added unit tests _fast_cbrt() taken from qeasingcurve.cpp Change-Id: Id3afd26efac92f594d6358dc2e11f94e8c524da2 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Cleanup corelib autotestsJason McDonald2011-11-112-8/+6
| | | | | | | Use QVERIFY2 to provide better test diagnostics. Change-Id: I128004f4ee133ceed4d8f373bbbe4a0eee431ebf Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Use qWarning() to output warnings.Jason McDonald2011-11-111-2/+2
| | | | | Change-Id: I366f70f27de0329749e5dcbdcbec8d56bffb4255 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Cleanup corelib autotestsJason McDonald2011-11-11126-709/+435
| | | | | | | | | | | | | Tidy the autotest .pro files. Most autotest .pro files should look like this: CONFIG += testcase TARGET = tst_something QT = core testlib SOURCES = tst_something.cpp Change-Id: I877c2194e9fa9dd13478d117895e1e255a948ad7 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix parsing of #if defined expressionOlivier Goffart2011-11-111-1/+22
| | | | | | | | | We only need to match the closing parentheses if there was an opening one This has caused mis-parsing of tst_qbytearray.cpp Change-Id: I9d52916e3ed8549c5ddd968092451fef7389a952 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Update V8Aaron Kennedy2011-11-104-2/+105
| | | | | Change-Id: Ic239ef1e55bed06260e4a04cc2199f64c2d30059 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* QWidget text editors to commit text on their own on losing focusPekka Vuorela2011-11-101-0/+7
| | | | | Change-Id: I3b907661e8a24a6dbdaabf607c5c528b1b471c98 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Implement partial tentativeCommit support in QTextEditPekka Vuorela2011-11-101-0/+20
| | | | | | | Available on plain text for now, html support still pending. Change-Id: I0818b97874e80c8c1b33a9127aa7bb3330a8761d Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Re-enabled passing tests in tst_qabstractprintdialogJo Asplin2011-11-102-2/+1
| | | | | | | | | | | To increase the effective test coverage, this patch re-enables the tst_qabstractprintdialog test case as such, and instead disables only the test functions that are currently failing in CI. Task-number: QTBUG-22453 Change-Id: Ic09a03ed405bf6f85917410a7a86e17f2fe22cba Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Re-enabled passing tests in tst_exceptionsafety_objectsJo Asplin2011-11-102-2/+3
| | | | | | | | | | | To increase the effective test coverage, this patch re-enables the tst_exceptionsafety_objects test case as such, and instead disables only the test functions that are currently failing in CI. Task-number: QTBUG-22453 Change-Id: If1fbf59c9d941453b9fd7feb43c59e27e087ce50 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Cleanup corelib autotestsJason McDonald2011-11-1030-3815/+3790
| | | | | | | Remove literal tabs. Change-Id: I210a0259773cceb20d35ebc80b889e3ebb88b540 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove redundant #defineJason McDonald2011-11-101-7/+4
| | | | | Change-Id: I27a47653d2c41741f39ee1fea6a1fed063279994 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Removed obsolete host.pro from qtbaseJo Asplin2011-11-092-6/+0
| | | | | | | | Note that the uiloader test has been moved from qtbase to qttools (see QTBUG-19453). Change-Id: I326fa0da435701eeaad7026160e3203a27cb3666 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Deleted qtipc autotest from qtbaseJo Asplin2011-11-0928-2886/+0
| | | | | | | | | | The qtipc autotest needs to live in qtscript due to dependencies to that module. This commit is the first of two steps to move qtipc. The second step is a commit in qtscript that adds qtipc there (with a proper reference to the first commit, i.e. this one). Change-Id: I233ee459be76fd1938868c05232ce732cfc913a8 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fixed typo: private-tests -> private_testsJo Asplin2011-11-091-1/+1
| | | | | Change-Id: I8bc53061a6b7a8605290dca0d90e67d7660b4c33 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Re-enabled passing tests in tst_qopenglJo Asplin2011-11-092-2/+8
| | | | | | | | | | | To increase the effective test coverage, this patch re-enables the tst_qopengl test case as such, and instead disables only the test functions that are currently failing in CI. Task-number: QTBUG-22453 Change-Id: Ifa9ccab81efb1577767465c150fc64a9d9e3f8e0 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Add QPolygonF to metatype system.Jędrzej Nowacki2011-11-091-1/+1
| | | | | | | | That was strange that QPolygon was know to QMetaType class but QPolygonF not. Change-Id: I67bb99644b8b1d0fe1aec730619d8048cb78219b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make usage of internal QVariant space.Jędrzej Nowacki2011-11-092-10/+30
| | | | | | | | | | | | | | | | | | | | | | Each QVariant instance has internal storage which may be used for well-know basic types. This patch changes the behavior by delegating type dependent operation to QMetaType class which knows more types than QVariant itself. The patch significantly reduce amount of code in QVariant implementation. There are few side effects of this patch: - better performance: * for Core types when using Gui (QGuiVariant is able to construct Core types) * for small custom types (QVariant::Private::Data is used for all types that has size small enough) - comparing two QVariants can give different result for small custom types (binary comparison instead of pointer comparison) Change-Id: Ic17fa500d6a882110bfba896fd456c8e6c7a63a9 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Refactor QMetaType types.Jędrzej Nowacki2011-11-091-75/+112
| | | | | | | | | | | | | | | | QMetaType::Type enum is the main source of type ids. Currently there are many tasks that can be replaced by a smart macro that can iterate over all types. The patch introduces series of FOR_EACH_ macros that may be used for code generation. As the first step the macro was used for Q_DECLARE_BUILTIN_METATYPE to make sure that no type was forgotten. Second step was to use created macros in autotest to improve tests coverage. Change-Id: I34e9ad7bacf02b44b028bc1aad20b1241aacebd3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove redundant copies of QTRY_COMPARE.Jason McDonald2011-11-092-28/+0
| | | | | | | | QTRY_COMPARE is now part of qtestlib, so there's no need for copies of it. Change-Id: Ied4e7d3b30c1cf16ddcbf8655e4d976e74c2bd8a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QGlobal: Define a default message handlerAurindam Jana2011-11-081-0/+12
| | | | | | | | | | | | | Currently, qInstallMsgHandler() does not return the handle to the default message handler. This patch defines a default message handler. This is returned by qInstallMsgHandler() when called for the first time. A call to qInstallMsgHandler(0) will restore the default message handler as was the case previously. Change-Id: I42f06654d45fb0e633f3c6d912fc8f05c23249aa Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNAM: Fix authentication cache when the password is in the URLOlivier Goffart2011-11-081-5/+83
| | | | | | | | | | | | | | | Two problems: - The signal cacheCredidentials was not connected in the synchronous case while it must be connected. (Regression when the threaded http was merged) - We cannot cache the credidentials when we proceed the url because at that point, we do not know the realm (this basically reverts 9bc5a32b875b812c3a706034c8c27614f86bd138) Task-number: QTBUG-18411 Change-Id: I8ea11fa23db4314c3f17ed06d2d7f9ee934ccdba Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Add Q_DECLARE_PRIVATE equivalent for QDir, to be able to subclass itDavid Faure2011-11-081-3/+0
| | | | | | | | Apply the same solution to QFileInfo (no public detach(), but a non-inline d_func instead). Change-Id: I31c4c759f44a0649b97f7884b078b174c9c00f22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Completed change to eliminate v8.proJo Asplin2011-11-081-1/+1
| | | | | | | | The initial change to eliminate v8.pro was incomplete - see 803b7d651cc5593ef4512d707c9d05c64478b7d6. Change-Id: Ia2c996d247f8b19380363f3e0409d38d3b839fdb Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Moved utf8/ and deleted corelib.proJo Asplin2011-11-085-6/+3
| | | | | | | | This change moves utf8/ into corelib, thus allowing corelib.pro to be deleted. Change-Id: Ib1b4e0930ac0e116d9bbc242a6dfb63ae5785d19 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Re-enabled tst_qdialogJo Asplin2011-11-081-2/+0
| | | | | | | | | | | | | | Commit 0fd8514a57ec8c6bd824e3c30a559988c53b95c8 ensured that the showAsTool test function is now properly QSKIP'ed for platforms where it is always known to fail. This change re-enables the test case as a whole so that the passing test function may actually catch real Qt bugs again (without being ignored by CI). Task-number: QTBUG-22453 Change-Id: Icfe56558f8c0f4b50dbbc21d9748df6d81fea4fe Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Deleted QWS testsJo Asplin2011-11-0817-1373/+1
| | | | | | | QWS is not supported for Qt 5, so the QWS tests are deleted. Change-Id: I08837fbd879915bbca9f821fad3551450eb3a1c6 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* QPainterPath: Fix copy constructor again.Charles Yin2011-11-081-0/+4
| | | | | | | | | | | | The previous fix a05270f435483937e76d18fa6e512dc0394507d1 is not correct, QPainterPathPrivate(other) should be QPainterPathPrivate(), as there is only a default ctor for QPainterPathPrivate and ref is initialized there, use copy ctor just copies the ref value which makes all detach() calls broken. Add an unit test for this as well. Change-Id: I658f0a977664d5ec523af3f8a48c1a866eda6ab0 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Cleanup corelib autotestsJason McDonald2011-11-0774-1398/+62
| | | | | | | Remove redundant empty constructors, destructors and test functions. Change-Id: Idb51368895e67ec3fc0345a9a5d33d77730c051b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Moved qobjectperformance into other/Jo Asplin2011-11-076-9/+2
| | | | | | | | | | | | | | | The qobjectperformance test is a kind of performance test that asserts that the time it takes to emit a signal to a certain number of receivers does not exceed a certain time. other/ currently seems to be a sensible place for such a test. Alternatively, it could have been put next to corelib/kernel/qobject/. Change-Id: I5c9461b62984f5806d1f6940123d30ef9f9f5a37 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Refer to v8 directly as a subdirectory.Jo Asplin2011-11-072-4/+1
| | | | | | | | v8 may be specified directly as a subdirectory in tests/auto/auto.pro instead of indirecly referring to v8.pro. Change-Id: I95d8c788fa67958372795519036cd8aec835b324 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Re-enabled passing tests in tst_qmenuJo Asplin2011-11-072-2/+2
| | | | | | | | | | | To increase the effective test coverage, this patch re-enables the tst_qmenu test case as such, and instead disables only the test functions that are currently failing in CI. Task-number: QTBUG-22453 Change-Id: I62cc1a2a9b0206595808deafb5fc137888ec97b3 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Re-enabled passing tests in tst_qinputcontextJo Asplin2011-11-072-2/+3
| | | | | | | | | | | To increase the effective test coverage, this patch re-enables the tst_qinputcontext test case as such, and instead disables only the test functions that are currently failing in CI. Task-number: QTBUG-22453 Change-Id: Ib1d4946ab29e67e0e72f4f9c6a7bf39b65d0f6be Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Re-enabled passing tests in tst_qprinterJo Asplin2011-11-072-1/+5
| | | | | | | | | | | To increase the effective test coverage, this patch re-enables the tst_qprinter test case as such, and instead disables only the test functions that are currently failing in CI. Task-number: QTBUG-22453 Change-Id: I74cc30dc26b8b83852b3516f8def995eab19cf0f Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* SSL certificate extensions: add unit testsRichard Moore2011-11-061-0/+89
| | | | | | | | Added tests for each of the supported extensions, and also for the handling of unknown ones. Change-Id: I29e0a5c1a411f41c2a554293662a33b56f205c00 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Support tentative commit string with input method.Pekka Vuorela2011-11-051-0/+26
| | | | | | | | | Tentative commit string allows input method to notify editor what is expected to be committed in the place of preedit. This commit adds such support in QLineEdit. Change-Id: If855619bc6843652db0d6254f7e7063bb8ad0936 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>