summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
Commit message (Collapse)AuthorAgeFilesLines
...
* Moved tests into integrationtests/ and widgets/Jo Asplin2011-10-202-7/+5
| | | | | | | Task-number: QTBUG-19013 Change-Id: Ibb776f5967c0645ce6d22ef7afdc40657c575461 Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
* Fix tst_qsocketnotifierShane Kearns2011-10-201-44/+1
| | | | | | | | | Removed the bogusFds test, as it is only run on symbian in 4.8 Forward ported the posixSockets fix from 4.8 Task-number: QTBUG-20892 Change-Id: I8a8c67e12eae402724bbb07fe37e7ea1770aaeee Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Update keyToValue and keysToValue in QMetaEnumLiang Qi2011-10-191-18/+53
| | | | | | | | | | Add a ok return value for whether found or not. Task-number: QTBUG-21672 Reviewed-by: Olivier Goffart Change-Id: Ic0ea7455dccf1ac91705bcc1479444eb4091ded3 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Liang Qi <liang.qi@nokia.com>
* Introduce Q_STATIC_ASSERTJędrzej Nowacki2011-10-191-0/+68
| | | | | | | | | Example of message of failed assert (gcc 4.6, file tst_qglobal.cpp:300): tst_qglobal.cpp:300:92: error: invalid application of ‘sizeof’ to incomplete type ‘QStaticAssertFailure<false>’ Change-Id: Ic1798094f718eaad388d754034115aafbbb6bd5e Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Provide API for "placement new" construction of meta-typesKent Hansen2011-10-191-0/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By making it possible to specify the place in memory where a type should be constructed, any meta-type can be allocated on the stack, for example. In the QML/JS QObject binding, this makes it possible to call slots and access properties from JavaScript without having to perform any mallocs (e.g. due to QVariant creation) in the C++ <--> JS value conversion, in the best case. In addition to QMetaType::construct() and QMetaType::destruct(), this change introduces QMetaType::typeSize(), which returns the size of a type in bytes. This can be used to prepare a suitable buffer for constructing a type using construct(). Benchmarks indicate that in-place construction is 2-5x faster than normal construction for core and GUI types on linux-g++. Note that there is already a QMetaType::construct() function in Qt 4, which has been renamed to QMetaType::create() in Qt 5. In order to avoid existing usages of construct() in user code to call the Qt 5 construct() (when they really meant to call create()), the third argument ("copy") of construct() is made mandatory. Hence, calls to QMetaType::construct() written for Qt 4 will cause a compile error when compiled with Qt 5, and the user must adapt his code. Task-number: QTBUG-12574 Change-Id: I836f06f6ee1c1c3edbd199a03424c78c942bdd3e Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Remove DEPENDS_ON from qtestlib API.Jason McDonald2011-10-197-89/+0
| | | | | | | | | | The DEPENDS_ON macro didn't do anything and has misled many users to think that they can write test functions that depend on other test functions. Task-number: QTBUG-21851 Change-Id: Ibe65b2d5d88bb81b6a0ebbe0b220f7d409a1446c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Move QTRY_VERIFY/QTRY_COMPARE into testlib.Jason McDonald2011-10-196-12/+0
| | | | | | | | These functions have lived in tests/shared/util.h for a long time, but they really belong in qtestlib. Change-Id: I60d569d002dea220b51563931d8b7aa77a20b98b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Prefer QSKIP to QTEST_NOOP_MAIN.Jason McDonald2011-10-191-35/+19
| | | | | | | | | | | | | There is no way for a .pro file to know if QProcess is in the Qt build, so the QProcess autotest cannot be omitted from the build if QProcess is not available. Because of this limitation, the test was using QTEST_NOOP_MAIN when QProcess was not available, making the test appear to pass. This commit changes QTEST_NOOP_MAIN to QSKIP, so that the user receives a clear indication that the test isn't testing anything when QProcess is not available. Change-Id: I79f667b17ff98dfc47eb61fb977365abef8883fb Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Prefer QSKIP to QTEST_NOOP_MAIN.Jason McDonald2011-10-182-16/+26
| | | | | | | | | Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear indication that these tests aren't testing anything when the required defines are not defined. Change-Id: I8508f50c6264fafa836090c5d6ffa6ce02dda102 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Don't build empty qwineventnotifier test.Jason McDonald2011-10-172-8/+3
| | | | | | | | This test is only useful on Windows, so avoid building it elsewhere rather than building an empty test. Change-Id: I01d91266bcb2dd242e02e70741ad5b81a13c33f0 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Improve the QMetaType::create() autotest coverageKent Hansen2011-10-141-5/+280
| | | | | | | | | | It only tested creating a copy of QSize. This change adds testing of all core types, both copy and non-copy creation. Change-Id: If2b8fb45718c4a976dd8b883b332878f7fb0da6f Reviewed-on: http://codereview.qt-project.org/6343 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Small re-factor of QVariant autotest.Jędrzej Nowacki2011-10-141-46/+50
| | | | | | | | | Enrich playWithVaraint template by a macro that returns correct line number in case of failure. Change-Id: I7684169852481a6905b71e4420135e7e3f298b12 Reviewed-on: http://codereview.qt-project.org/6570 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Exclude qtconcurrent tests via .pro files.Jason McDonald2011-10-1213-127/+10
| | | | | | | | | | | If Qt is built without QtConcurrent, the relevant autotests should be excluded from the build, rather than building empty tests that appear to pass and thus produce confusing test results. Change-Id: I43bafcb0ffa42e8981bec4e27bf6a23a28d86df9 Reviewed-on: http://codereview.qt-project.org/6395 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Rename QMetaType::construct() to create()Kent Hansen2011-10-112-14/+14
| | | | | | | | | | | | | | | | | | | | | create() is symmetric with destroy(). Also rename the internal methods and fields to be consistent (qDeleteHelper already had the "right" name, though!). This change will allow us to use construct() and destruct() for something else: Placement new-style allocation (QTBUG-12574). The old construct() is still kept for now, until the other repositories have been updated to use create(). Change-Id: Iceb184af6cffcb0a634359cfc3516c718ba0c2f5 Reviewed-on: http://codereview.qt-project.org/6342 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fail test in preference to calling qFatal.Jason McDonald2011-10-071-4/+2
| | | | | | | | | Calling qFatal may result in test output not being well-formed. Change-Id: Ia16bade4d3311485c6ba4dd23d5624d18b192b71 Reviewed-on: http://codereview.qt-project.org/6190 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Avoid using QSKIP in lieu of compile-time checksJason McDonald2011-10-076-26/+26
| | | | | | | | | | | | | | | | QSKIP is intended to be used to skip test functions that are found at run-time to be inapplicable or unsafe. If a test function can be determined to be inapplicable at compile-time, the entire test function should be omitted instead of replacing the body of the test function with a QSKIP, which only serves to slow down test runs and to inflate test run-rates with empty, inapplicable tests. Task-number: QTQAINFRA-278 Change-Id: I95feba3edbfa092c0ef4d85bb8c6877bd6be698e Reviewed-on: http://codereview.qt-project.org/6128 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove obsolete test functions.Jason McDonald2011-10-071-205/+0
| | | | | | | | | | Commit 2cbeb6c08cb7c79d6126f75c2cbc470679d671e1 made these test functions obsolete. Change-Id: I89a379d7228584a83e9d7674060081f4201f561c Reviewed-on: http://codereview.qt-project.org/6113 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* fix QChar::isSpace() to handle codepoint U+0085Konstantin Ritt2011-10-061-1/+11
| | | | | | | | | | | according to the Unicode specs, code point U+0085 should be treated like a white space character (an exceptional Cc one) Change-Id: Ib17ae0c4d3cdafe667cafa38b645138ef24c238c Merge-request: 32 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-on: http://codereview.qt-project.org/6158 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Merge fixes for QDir::operator==Shane Kearns2011-10-061-1/+21
| | | | | | | | | | | | | | | | | | There were two fixes in 4.8 which each fixed a part of the problem. Comparing canonical paths is more correct, but is only possible where both directories exist. If neither directory exists, then compare absolute paths instead. Changed a regression test, because /tmp is a symbolic link on MacOS. I.E. "/tmp/.." is canonically "/private" and not "/" as expected. Task-Number: QTBUG-20495 Reviewed-By: joao (cherry-picked from ad35d25e78c8252a72108a4ba931934047c4707e) Change-Id: Ia4986e8337f0e512e1a3398a5a4dd36e62680b9c Reviewed-on: http://codereview.qt-project.org/5813 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix QDir::operator==(const QDir &) constJoão Abecasis2011-10-061-0/+6
| | | | | | | | | | | | | | | | | | | We can't rely on absolute paths when comparing directories for equality as these don't take into account symbolic links and may also bypass ../ and ./ simplification. Instead, canonical paths must be computed and can then be compared according to the case sensitivity rules for the platform or file engine, as is done in QFileInfo. Task-number: QTBUG-20495 Reviewed-by: Prasanth Ullattil (cherry-picked from dcee6e1371d899eb79717b8e3f3eec08b765db82) Change-Id: Ib5f2a6ee11311c55782ea5dd0e9c3b45f9231686 Reviewed-on: http://codereview.qt-project.org/5812 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Removed disabled test data in QDir autotest.Jason McDonald2011-10-061-19/+0
| | | | | | | | | | | | The unprintablenames test was designed to prevent an old failure in QDir from returning, but the test can't be run reliably on some file-systems and certainly isn't going to achieve its goal when it's commented out. Change-Id: Ib4cb965d59c291ab2436130b87e865ac21b9b483 Reviewed-on: http://codereview.qt-project.org/5956 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add missing Q_OBJECT macro to GoToStateTransitionKent Hansen2011-10-051-0/+19
| | | | | | | | | | | The missing macro caused qFindChild() to return any QAbstractTransition. Task-number: QTBUG-21813 Change-Id: I80507aa86c8c32d7fa59a1b5ae551043f5f90315 Reviewed-on: http://codereview.qt-project.org/6044 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Avoid using QSKIP in lieu of compile-time checksJason McDonald2011-10-0529-418/+441
| | | | | | | | | | | | | | | | QSKIP is intended to be used to skip test functions that are found at run-time to be inapplicable or unsafe. If a test function can be determined to be inapplicable at compile-time, the entire test function should be omitted instead of replacing the body of the test function with a QSKIP, which only serves to slow down test runs and to inflate test run-rates with empty, inapplicable tests. Task-number: QTQAINFRA-278 Change-Id: Ib2025339422749cf216e87ac414a3056250bf8f9 Reviewed-on: http://codereview.qt-project.org/5942 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Don't crash by modifying read-only shared_nullBradley T. Hughes2011-10-044-0/+56
| | | | | | | | | | | | | | | | | | | Functions that modify the d-pointer must detach or otherwise take measures to not modify the const, read-only shared_null. The setSharable(bool) function takes care to detach when setting sharable to false, but should avoid setting the sharable data member unless d is not the shared null. Similarly, QMap<Key, T>::setInsertInOrder() needs to detach if it is shared with the shared_null (the logic has been updated to be the same as setSharable()). Change-Id: Ida5cb9818b86695f1b9f0264418b955c56424898 Reviewed-on: http://codereview.qt-project.org/5929 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Added bug ref in insignificant_test commentJo Asplin2011-10-031-1/+1
| | | | | | | | | Task-number: QTBUG-21814 Change-Id: I56907f2a1fb5555d338b6f1f695b741e1590e5d2 Reviewed-on: http://codereview.qt-project.org/5936 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
* Make all uses of QBasicAtomicInt and Pointer use load() and store()Thiago Macieira2011-10-037-54/+54
| | | | | | | | | | | | | | Most of these changes are search-and-replace of d->ref ==, d->ref != and d->ref =. The QBasicAtomicPointer in QObjectPrivate::Connection didn't need to be basic, so I made it QAtomicPointer. Change-Id: Ie3271abd1728af599f9ab17c6f4868e475f17bb6 Reviewed-on: http://codereview.qt-project.org/5030 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Tests: Fix compilation on Windows.Friedemann Kleint2011-10-039-25/+25
| | | | | | | | | Replace Q_WS_... by Q_OS_... in corelib tests. Change-Id: I14c41dca1ec490b3c49ba2c24e60def14c6de9da Reviewed-on: http://codereview.qt-project.org/5778 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* test: Re-enabled `tst_qtranslator' test that is now passing on LinuxSergio Ahumada2011-10-031-2/+0
| | | | | | | | | | This test was fixed by db3418c10b7831db0e6c567ccf49c34698cad1ab Task-number: QTBUG-21125 Change-Id: I1bc549353f16c0df2b6c33533298b302fcc4d4ed Reviewed-on: http://codereview.qt-project.org/5877 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Rename Qt::escape to QString::toHtmlEscaped, add compat methodDavid Faure2011-09-291-0/+22
| | | | | | | | | Merge-request: 56 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Change-Id: I46bbb2df10968e88b5eb5ef8dae182a651b622b8 Reviewed-on: http://codereview.qt-project.org/5793 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Remove Symbian-specific code from tests.Jason McDonald2011-09-2993-1692/+208
| | | | | | | | | Symbian is not a supported platform for Qt5, so this code is no longer required. Change-Id: I1172e6a42d518490e63e9599bf10579df08259aa Reviewed-on: http://codereview.qt-project.org/5657 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QTemporaryFile: Test what happens if current dir isn't writable.David Faure2011-09-281-0/+17
| | | | | | | | | | | No surprises, QTemporaryFile("tempXXXXXX") fails. But that is consistent with QFile::open, and it's documented, so ok. Change-Id: I04c805a242aeda8327d25be238da6120b3c90f5a Merge-request: 57 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-on: http://codereview.qt-project.org/5714 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* QTemporaryFile: use QCoreApplication::applicationName() as base filenameDavid Faure2011-09-281-1/+3
| | | | | | | | | | Merge-request: 57 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Change-Id: I2a29b2ba925ea92a5299272b80164658775e9c0e Reviewed-on: http://codereview.qt-project.org/5713 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Make qtbase build with Qt-in-namespace againKent Hansen2011-09-281-3/+3
| | | | | | | Change-Id: I5faa8690a05d6ec352fc69c0b69848539f2ed216 Reviewed-on: http://codereview.qt-project.org/5460 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Mark QtConcurrentFilter Autotest as insignificant, because it fails rarelyHolger Ihrig2011-09-281-0/+1
| | | | | | | | | Task-number: QTBUG-20688 Change-Id: I17b0016c66d3a6ada873f698a97bfcdaf60838f3 Reviewed-on: http://codereview.qt-project.org/5593 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
* Re-enabled test that was marked insignificant and passesHolger Ihrig2011-09-263-3/+1
| | | | | | | | | | | Added comment why QVariant Autotest is marked insignificant Task-number: QTBUG-21424 Change-Id: I5b911bd36e376ad529342055180ff9c5de19de67 Reviewed-on: http://codereview.qt-project.org/5399 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix QString and QByteArray reserve() and squeeze()Bradley T. Hughes2011-09-232-0/+16
| | | | | | | | | | | | | | | | | These functions should not take care not to unconditionally set the capacityReserved private member, since the d may be referencing the const shared_null or shared_empty which live in read-only memory. The squeeze() methods check for ref > 1 instead of ref != 1 to prevent detaching from the shared_null/shared_empty unnecessarily; the shared_null/shared_empty ref count is -1, meaning squeeze() will never detach from it. Change-Id: Id3f1725a6f08b3a462343640a47bbe78f08ca7e7 Rubberstamped-by: Lars Knoll Reviewed-on: http://codereview.qt-project.org/5454 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* This test passes fine.Lars Knoll2011-09-201-1/+0
| | | | | | | | Task-number: QTBUG-21402 Change-Id: Ied00dd2302b08d75e44c102f6025123b41657ca6 Reviewed-on: http://codereview.qt-project.org/5001 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Move handling of -qmljsdebugger argument to QCoreApplicationKai Koehne2011-09-191-0/+8
| | | | | | | | | | | | Move handling of -qmljsdebugger= argument from QApplication to QCoreApplication. It makes sense to allow debugging also for applications based on QCoreApplication (which we intend to support in QtDeclarative). Change-Id: I5a03a4510fc166cea5aad146da673ee0e7cd5d36 Reviewed-on: http://codereview.qt-project.org/5121 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Fix autotest gui/widgets dependenciesKent Hansen2011-09-194-2/+4
| | | | | | | | | | | | | | | | | This is in preparation of removing testlib's dependency on QtGui and QtWidgets. Autotests that need QtWidgets api must explicitly include it (since the types are no longer provided by the QtGui master header). Autotests that don't need QtGui or QtWidgets api shouldn't link against those libraries. Change-Id: I2808289068514fcac582808828ad4634e2631733 Reviewed-on: http://codereview.qt-project.org/5093 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix the test caseLars Knoll2011-09-172-2/+3
| | | | | | | | | | | | | If the MKSPEC we get is an absolute path, we should pass that one on to qmake. Otherwise it'll try to find the mkspec in the install location. This fails as 'make check' is being run before installation. Task-number: QTBUG-21402 Change-Id: Ie872546f2ee7c5d737e50a1779637e393538ccc2 Reviewed-on: http://codereview.qt-project.org/4999 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Wrap calls to Sequence::push_backJoão Abecasis2011-09-171-5/+0
| | | | | | | | | | | | | | | | | | | | | | | In C++11 push_back is overloaded to support rvalue-references, void std::vector<T>::push_back(const T &); void std::vector<T>::push_back(T &&); so attempting to get the address for push_back is ambiguous. Instead of hardcoding the function signature, the better and more general solution is to allow the compiler to do the required overload resolution itself, also allowing for implicit conversions to take place. Task-number: QTBUG-18996 Done-with: Liang Qi Reviewed-by: Olivier Goffart (cherry picked from commit ca34cc75294e0d2a8bc491a2c679fe8a69cd0408) Change-Id: Id271118e489f888905e491dd4cfc3d2db7697552 Reviewed-on: http://codereview.qt-project.org/4642 Reviewed-by: Liang Qi <liang.qi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Boost performance of QChar::isSpaceKent Hansen2011-09-151-0/+21
| | | | | | | | | | | | | | | | | | | | | Make it inline; add fast checks for typical spaces; add fallback function that uses the fastcall calling convention. On ia32, this change makes isSpace ~340x faster for ascii spaces, ~170x faster for non-space ascii characters, and ~1.3x faster for non-ascii characters. Note that this change is NOT binary compatible. Also add an autotest with expected results from before the optimization, to ensure that the behavior is the same. Change-Id: I9438d0ad3c9ba2e80560c4bee7eed05115265798 Reviewed-on: http://codereview.qt-project.org/4905 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Boost performance of QChar::isLetterOrNumberKent Hansen2011-09-151-0/+24
| | | | | | | | | | | | | | | | | | | | | | Make it inline; add fast checks for ascii letters and digits; add fallback function that uses the fastcall calling convention. On ia32, this change makes isLetterOrNumber ~120x faster for ascii letters and digits, ~150x faster for non-letter/digit ascii characters, and ~1.3x faster for non-ascii characters. Note that this change is NOT binary compatible. Also add an autotest with expected results from before the optimization, to ensure that the behavior is the same. Change-Id: Ia4e13692f4dd79f6aa0b96da29449e0487971b0e Reviewed-on: http://codereview.qt-project.org/4904 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Boost performance of QChar::isLetterKent Hansen2011-09-151-0/+29
| | | | | | | | | | | | | | | | | | | | | Make it inline; add fast checks for ascii letters; add fallback function that uses the fastcall calling convention. On ia32, this change makes isLetter ~370x faster for ascii letters, ~250x faster for non-letter ascii characters, and ~1.5x faster for non-ascii characters. Note that this change is NOT binary compatible. Also add an autotest with expected results from before the optimization, to ensure that the behavior is the same. Change-Id: I06f8d3d43114537cee5567e670898cef6494c20a Reviewed-on: http://codereview.qt-project.org/4903 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Boost performance of QChar::isDigitKent Hansen2011-09-151-0/+21
| | | | | | | | | | | | | | | | | | | | | | Make it inline; add fast checks for ascii digits; add fallback function that uses the fastcall calling convention. On ia32, this change makes isDigit ~370x faster for ascii digit characters, ~250x faster for non-digit ascii characters, and ~1.5x faster for non-ascii characters. Note that this change is NOT binary compatible. Also add an autotest with expected results from before the optimization, to ensure that the behavior is the same. Change-Id: I718fadecda3f591d6f4c22374d8e476f4724fd83 Reviewed-on: http://codereview.qt-project.org/4902 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Merge branch 'refactor'Gunnar Sletta2011-09-131-13/+0
| | | | | | | | | | | | | | | | Conflicts: mkspecs/qws/linux-lsb-g++/qmake.conf src/gui/image/qpixmap_mac.cpp src/gui/painting/qpaintengine_x11.cpp src/gui/painting/qtessellator.cpp src/gui/text/qfontengine_qws.cpp src/gui/text/qfontengine_x11.cpp src/gui/widgets/qlinecontrol.cpp src/opengl/qgl.h src/opengl/qgl_x11egl.cpp src/plugins/plugins.pro Change-Id: If52dcd55cd55f2983a756c2f843967702b60a310
* Disabled tests for refactor->master integrationJo Asplin2011-09-133-0/+5
| | | | | | | | | | | | | | | | | | | | | | | This change disables failing tests to increase the likelihood that 'make check' terminates with a zero exit status. This is done to prevent the CI system from blocking further commits once qtbase#refactor is merged into qtbase#master. Failing tests are marked as insignificant (by putting 'CONFIG += insignificant_test' in the .pro file). Note: This is a temporary measure that needs to be cleaned up once the refactor->master integration is complete. Ideally all disabled tests need to be enabled and passing. All changes will be marked by the string QTBUG-21402 in a comment for easy location. Task-number: QTBUG-21402 Change-Id: Ic4400671671f6d9b75b106a6aa4755b20e74378d Reviewed-on: http://codereview.qt-project.org/4678 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Merge branch 'master' into refactorGunnar Sletta2011-09-121-6/+9
| | | | | | | | | | | | | Conflicts: src/3rdparty/v8 src/gui/text/qfont_qpa.cpp src/gui/widgets/qlinecontrol.cpp src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.cpp tests/auto/gui.pro tests/auto/network.pro tests/auto/qstring/tst_qstring.cpp Change-Id: Id118c172645303ccf06a207050d5bf1462ff57fe
* Merge remote branch 'gerrit/master' into HEADSamuel Rødal2011-09-064-9/+66
| | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe src/corelib/global/qglobal.h src/gui/kernel/qplatformnativeinterface_qpa.h src/gui/widgets/qlinecontrol.cpp src/gui/widgets/qmenu_mac.mm src/gui/widgets/qmenu_p.h src/gui/widgets/qmenubar.cpp src/gui/widgets/qmenubar_p.h src/gui/widgets/widgets.pri src/plugins/platforms/wayland/qwaylandnativeinterface.cpp src/plugins/platforms/wayland/qwaylandnativeinterface.h src/src.pro tests/auto/qdir/tst_qdir.cpp tests/auto/qfileinfo/tst_qfileinfo.cpp tests/auto/qsslsocket/tst_qsslsocket.cpp tests/auto/qstring/tst_qstring.cpp Change-Id: I64cf2cefa532ba87a92f632e3595ce6914183e9b
* Moving relevant tests to corelib/xmlHolger Ihrig2011-09-014058-1/+204120
| | | | | | | | | | Task-number: QTBUG-21066 Change-Id: I2fb68c35c7abc830ba426b0aab892332b0ca00fb Reviewed-on: http://codereview.qt.nokia.com/3734 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>