summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fix QIODevice warning when running rcc.Mitch Curtis2012-06-261-0/+44
| | | | | | | | | | | | | | | | | | When opening a QFile on stdout, for example, we must not call seek as it is a sequential device. This has been flagged as a warning since commit Ie3a96d3a and has resulted in spurious warnings being emitted. In the case of opening a QFile in Append mode, QIODevice::open already sets the position marker, so calling seek is redundant. This is also true for the file engine's open function (called through openExternalFile()), which also ensures the handle or descriptor is repositioned appropriately. Task-number: QTBUG-26104 Change-Id: I71040c399efe54e7538f54433368b432e959e08d Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Add missing subdirs (the new QUrl unit tests were not compiled and run)David Faure2012-06-262-0/+3
| | | | | | Change-Id: I1b39d92b8a14d5aeca957180858e1980a534894b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Factorize the cmake test infrastructure to be reusable.Stephen Kelly2012-06-261-50/+1
| | | | | | | | This makes it easy to add cmake module tests for all modules. Change-Id: I303bf7674ca6ae7a8544488f96e8e02afbaa6ff0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fixed inputMethodQuery() for Qt::ImHintsTasuku Suzuki2012-06-262-0/+41
| | | | | | | to return QWidget::inputMethodHints() Change-Id: I46735c553e0cb4689cd0c53a69d07ed61ba56bf6 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* QTBUG-26035: Remove positive sign from start of stringTarja Sundqvist2012-06-261-0/+18
| | | | | | | | | | | | Updated removeGroupSeparators(QLocalePrivate::CharBuff *num) so that it removes also positive sign ('+') at the start of the string. Auto test included. Task-number: QTBUG-26035 Change-Id: I8e0e071d6c682d9192a8c6bb2f282510e21b3c48 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* fix somewhat common edge case in $$shadowed()Oswald Buddenhagen2012-06-261-0/+1
| | | | | | | | | | | | if source and build dir are direct children of the common root and we are shadowing the top-level source dir, there is of course no trailing slash to match. Change-Id: I8a34a6a72d16cb21d77d056e037235af9b32a008 Reviewed-by: Davide Pesavento <davidepesa@gmail.com> Reviewed-by: Andreas Hartmetz <ahartmetz@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QSKIP test that is blocking unrelated changes in CIShane Kearns2012-06-251-2/+2
| | | | | | | | | The test looks vulnerable to misbehaviour if the working directory contains unexpected files and folders. As it's already skipped on Mac, skip on linux as well to unblock the CI. Change-Id: Id2e48ea455eb77e36c4f9d899885e101f674c0a3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make test work on Mac OS XHarald Fernengel2012-06-232-0/+2
| | | | | Change-Id: I0c2d9bc7500972144d44060f38bc7a5da65ed30f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't operate on bogus data, assert on preconditions insteadJoão Abecasis2012-06-231-8/+0
| | | | | | | | | | | | | | | | | | | | | | QVector::erase shouldn't try to make sense of iterators it doesn't own, so the validation being done here is bogus and dangerous. Instead, it's preferrable to assert, the user needs to ensure proper ownership. The case of erasing an empty sequence is not checked for preconditions to allow QVector v; v.erase(v.begin(), v.end()); , while being stricter on other uses. Autotests were using ill-formed calls to the single argument erase() function on an empty vector and were fixed. This function erases exactly one element, the one pointed to by abegin and require the element exist and be valid. Change-Id: I5f1a6d0d8da072eae0c73a3012620c4ce1065cf0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Skip 3 test methods if the test server isn't set up.David Faure2012-06-232-3/+8
| | | | | | | | This makes things easier for developers touching QtCore and running all QtCore unit tests. Change-Id: I7aa832a6a1be07d90cacad2eecb2364285ff3818 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Add a variable for the private includes for modules.Stephen Kelly2012-06-233-0/+71
| | | | | | | This is required to use QPA for example in 5.0. Change-Id: I44bfc6987d778370e55c05c591f63ff84c482d0a Reviewed-by: David Faure <faure@kde.org>
* Give the CMake unit tests more meaningful names.Stephen Kelly2012-06-2339-65/+74
| | | | | Change-Id: I0a54d32ec62ff6daf7672d0aabdeb038f4c7c78f Reviewed-by: David Faure <faure@kde.org>
* Forward-port change to QT4_ADD_RESOURCES macro for missing rcc files.Stephen Kelly2012-06-234-0/+75
| | | | | | | | Forward-port of commit 9ce67d30011db4528d3d0bbee36412e13cfb80cc in cmake.git. Change-Id: I2d6c14f68f1630fc0835b3103e5058f52c2d0d13 Reviewed-by: David Faure <faure@kde.org>
* tst_qgraphicsview hoverLeave regressedToby Tomkins2012-06-221-0/+3
| | | | | | | Task-number: QTBUG-26274 Change-Id: Ieafc6bf4a7fa5287985610a4dea57fbe6f3a9eba Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix qitemview and qdatetimeedit autotest builds for WinCE.Janne Anttila2012-06-212-0/+8
| | | | | | | | | Defined missing SPI_GETPLATFORMTYPE macro as it was done in for example in qwidget and qaccesiblity test cases. Change-Id: I33a1e0119848911fbc4830299fcc1854f5259e86 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Fix qdiriterator autotest build for WEC7.Janne Anttila2012-06-211-1/+1
| | | | | | Change-Id: I18b1bdd79905761eff7a5ddbe1c6538c33624a1f Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Fixed mouse grabbing preventing popups from being closed.Samuel Rødal2012-06-211-0/+47
| | | | | | | | | | | The pointer grabbing leads to fake Enter events being sent to the Qt::Popup window, preventing it from closing since QWidget::underMouse() returns true. We should only send Enter events if the mouse is actually inside the widget. Change-Id: I4ba3fb08943580f93ad4337ff0227becd647767e Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Handle fragmented responses on SOCKS5 control channelShane Kearns2012-06-211-19/+138
| | | | | | | | | | | | Server responses may arrive in more than one packet, though this is rare due to nagle algorithm. Also fixed IPv6 addresses being discarded from server responses, which was caught by the new autotest. Task-number: QTBUG-18564 Change-Id: I32d9e2978037fb3e1fff27b7e618b5da6d222f28 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Fix qfile autotest build for WEC7Janne Anttila2012-06-212-3/+5
| | | | | | Change-Id: I6c4b4c91ea841ccb91ad685510caaecaf51baced Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Record if a metatype is a smart pointer to a QObject derived.Stephen Kelly2012-06-201-14/+17
| | | | | | | | | | | | This allows QVariant/QMetaType software (such as QtDeclarative) to deal with smart pointers in a similar way to how they can deal with naked pointers (accessing properties etc). This also adds a requirement that T be fully defined when QSharedPointer<T> is inserted into a QVariant. Change-Id: I29e12b8a6aa5f4aadbd62f92b89bc238f64b5725 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Add some internal API for extracting a QSharedPointer<T> from QVariant.Stephen Kelly2012-06-202-0/+108
| | | | | | | | | | | | | The T must be derived from QObject, or it will fail to compile. This will allow scripting or other 'wrapping' and runtime environments like QtDeclarative to handle QSharedPointers to types derived from QObject properly. A QSharedPointer<T> can be inserted into a QVariant, and where T derives from QObject, a QSharedPointer<QObject> can be extracted from the QVariant, and its properties are then accessible. Change-Id: I68d6d89aceceb019267bd7301baa2047f9c09b90 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change *-clang mkspec globs to *-clang*Bradley T. Hughes2012-06-201-1/+1
| | | | | | | | Like with the numerous g++ mkspecs, we have mkspecs with suffixes, and these mkspecs should still match the clang globs. Change-Id: I9296408b5192bc72cc468d229a57923e3f5ab6f0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* fix tst_QWidget::getSetCheck on WindowsJoerg Bornemann2012-06-201-1/+1
| | | | | Change-Id: Ie11a7576f8e618e2fedb31bd8071abb44b9f9f57 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix unused parameter warnings in moc test.Mitch Curtis2012-06-201-3/+3
| | | | | Change-Id: I3467a8bf99464c2d3762a171b20508bb4b29ddb4 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Merge "Merge branch 'buildsystem'" into refs/staging/masterOswald Buddenhagen2012-06-2011-26/+66
|\
| * make use of $$[FOO/get] propertiesOswald Buddenhagen2012-06-191-2/+2
| | | | | | | | | | | | | | | | this cleans up a lot of hacks supporting the build of qt, including the last bits of $QTDIR. Change-Id: Id119886ed8097967dad6cf86ebd4e71d90c42841 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * add $$reverse() functionOswald Buddenhagen2012-06-191-0/+2
| | | | | | | | | | | | | | | | | | returns the list with the order of the elements reversed. one can easily implement this with existing functions, but this is way faster and more readable. Change-Id: I12d306eb9fe58fc332622274ea6b658192529491 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
| * add $$shell_quote() functionOswald Buddenhagen2012-06-191-0/+8
| | | | | | | | | | | | | | | | to be used in system() calls and when assembling EXTRA_COMPILER and INSTALLS .commands by hand. Change-Id: Id706cd56aa267a9fb4b14e3416692b4716fafa5b Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
| * add $$absolute_path() and $$relative_path()Oswald Buddenhagen2012-06-191-0/+5
| | | | | | | | | | | | | | just exposes QDir::fooFilePath() wrapped into QDir::cleanPath() Change-Id: I7a7644084825fd8092a9910ac20f695c4d9351f6 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
| * add $$native_path() functionOswald Buddenhagen2012-06-191-0/+2
| | | | | | | | | | | | | | more or less QDir::toNativeSeparators(QDir::cleanPath()) Change-Id: I52deee1e8086559eda5833b387a0cf64d21cbcd9 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
| * add $$clean_path() functionOswald Buddenhagen2012-06-191-0/+2
| | | | | | | | | | | | | | just QDir::cleanPath() Change-Id: I2d51e2385939d8926c00f296537ab7f6757d9a79 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
| * add $$format_number() functionOswald Buddenhagen2012-06-191-0/+14
| | | | | | | | | | Change-Id: I04266c1f5fb72af94073f3f508cee59085e365b6 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
| * add $$shadowed() functionOswald Buddenhagen2012-06-192-1/+3
| | | | | | | | | | | | | | | | | | return the build directory corresponding to a given source directory. this is the identity function if not shadow-building. if input lies outside the source directory, return empty value. Change-Id: I2d2a6b1112bd19989fe29cfe19a12d39a0d208c1 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
| * add $$val_escape() functionOswald Buddenhagen2012-06-191-0/+9
| | | | | | | | | | | | | | | | this quotes the elements of a variable in a way suitable for re-parsing as qmake code. Change-Id: I0e6ea2478c43b5aeff45f485a48ac8c86705dd4a Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
| * add mkpath() functionOswald Buddenhagen2012-06-191-0/+4
| | | | | | | | | | Change-Id: I8809b9ee4e85fbe8cec95641d659f237c5f51a26 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
| * add write_file() functionOswald Buddenhagen2012-06-191-1/+15
| | | | | | | | | | | | | | | | | | this dumps the contents of a variable into a file. each element of the variable is considered a line; line terminators are added. all missing directories are automatically created. Change-Id: Idafeb873cea64e6705c894b3ab0ef21df69e7170 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
| * remove some qmake -project boilerplate from project filesOswald Buddenhagen2012-06-198-23/+1
| | | | | | | | | | Change-Id: I5e6103db42b4fcca4ed4c2ffaec71e71e73d5b95 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* | Make QDateTime::fromString()/Time::fromString() adhere to ISO 8601.Mitch Curtis2012-06-202-20/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently QDateTime::fromString and QTime::fromString do not correctly handle fractional minutes and, in some cases, fractional seconds. In the case of reading fractional minutes, it has been decided to ignore invalid characters outside of the 5 character portion that we're interested in (see code comments in fromStringImpl() for info on why we read 5 digits). The motive is that there is a performance penalty for calling mid to get the portion of surplus string and also for converting to it to a float. This is also in line with what QDate does with surplus characters, for example. Task-number: QTBUG-14418 Task-number: QTBUG-25387 Change-Id: Ib742fe80686aff3c3770b995678cf838fb4e3bb4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Clean up QDateTime tests.Mitch Curtis2012-06-201-202/+115
| | | | | | | | | | | | | | | | Clean up and consolidate different tests in tst_qdatetime.cpp (that seem to be doing the same thing) into single tests. Change-Id: Ib6ceb1cb7fb4c6eca672495f96d9cfd907853c85 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add leading zeros to years below 1000 in QDate::toString().Mitch Curtis2012-06-201-14/+30
| | | | | | | | | | | | | | | | | | QDate::toString(Qt::ISODate) lacks prefixed 0's on years below 1000. The ISO 8601 standard dictates that this should be the case. Task-number: QTBUG-16476 Change-Id: I7e73152bba0f5894bcbaa3f4418732b74ce86bc5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add test for queued call of method with unregistered parameter typeKent Hansen2012-06-201-0/+15
| | | | | | | | | | | | | | | | | | Verify that this produces a warning containing the relevant typename. Change-Id: I046c02585e410a211e9175600b1027dda83bdd9c Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>