summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Move methods using QRegExp in QString(List) over to QRegExpLars Knoll2020-05-141-0/+163
| | | | | | | | | | | | | | | | | | | | | | | | The prepares for the removal of those methods from QString and QStringList. The new methods in QRegExp are left as a porting help. Change-Id: Ieffa33a79caf53b83029e9b070c4eb5cadca1418 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Streamline the code in the conversion to and from utf8Lars Knoll2020-05-142-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move pre/and post condition handling out of the main loop to make that one as fast as possible. Remove special handling of a corner case when the input length is zero, where the utf8 decoder did something else than all other decoders. Change-Id: I94992767ea15405b38f7953adadaa6ff98b20b6f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Remove QTextCodec dependency in the old SAX parserLars Knoll2020-05-142-82/+0
| | | | | | | | | | | | | | | | | | | | | | | | Just so we can get this cleaned up as well and remove it from Qt Core. Change-Id: I2b5b821b039ce2c024ec3cb7338a1a9becdd2157 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Get rid of some QTextCodec leftoversLars Knoll2020-05-145-6/+0
| | | | | | | | | | | | | | | | | | | | | There's no real dependency to QTextCodec in those files anymore. Change-Id: Ifaf19ab554fd108fa26095db4e2bd4a3e9ea427f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Remove autotest for codecForHtmlLars Knoll2020-05-141-11/+0
| | | | | | | | | | | | | | | | | | | | | The test was rather bogus anyway... Change-Id: I81b4f87bb811b2894ce88b1fdbb3183fc7259057 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Remove QTextCodec dependency from testLars Knoll2020-05-141-5/+1
| | | | | | | | | | | | | | | Change-Id: Ie546065c3179d475df46b284ca7df502c4465b93 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Document the string converter classesLars Knoll2020-05-142-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document QStringConverter, QStringDecoder and QStringEncoder. In addition, do some touches to the API, renaming one enum value, add a flags argument to one constructor and make some members private. Change-Id: I8f99dc3d98fb8860cf6fa46301e34b7eb400511b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Get rid of QTextCodec in QTextStreamLars Knoll2020-05-145-261/+30
| | | | | | | | | | | | | | | | | | | | | | | | Use QStringConverter instead. Also change the default encoding of QTextStream to utf8. Change-Id: I30682e75fe0462d1a937539f773640c83a2d82e1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Start porting QTextStream away from QTextCodecLars Knoll2020-05-143-846/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a first step add setEncoding/encoding() methods that use the QStringConverter::Encoding enum, and port all uses of setCodec()/ codec() over to the new API. Internally QTextStream still uses QTextCodec, this will be ported over to QStringConverter in a follow-up change. Change-Id: Icd764cf47b449b57f4ebd010c2dad89e6717d6c0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add a method to determine the encoding for encoded HTML dataLars Knoll2020-05-141-0/+89
| | | | | | | | | | | | | | | | | | | | | This is a replacement for Qt::codecForHtml(). Change-Id: I31f03518fd9c70507cbd210a8bcf405b6a0106b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add QStringConverter::encodingForData()Lars Knoll2020-05-141-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | Add method that tries to determine the encoding of the data from an initial byte order mark. Change-Id: I348c51a3d4db9b434af53359b739a7e17acfc760 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add methods to convert between encoding and name to QStringConverterLars Knoll2020-05-141-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | Add static methods that allow converting between a name for an encoding and the Encoding enum. Change-Id: I12bc503cf757ea31d3ca8d5e1f1216efddcb16d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Construct a string converter by nameLars Knoll2020-05-141-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a constructor, that allows constructing a string converter by name. This is required in some cases and also makes it possible to (in the future) extend the API to 3rd party encodings. Also add a name() accessor. Change-Id: I606d6ce9405ee967f76197b803615e27c5b001cf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Get rid of QSettings::iniCodec()Lars Knoll2020-05-141-108/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always encodee INI files as utf-8 in Qt6. This is mostly backwards compatible, as old ini files would encode all non ascii characters. [ChangeLog][Important behavioral changes] QSettings will now always encode INI files as utf-8 (and the iniCodec/setIniCode methods are removed). This is a change from Qt 5 and earlier, where QSettings would by default escape all non ascii characters. The behavior is equivalent to what you got in Qt5 by setting a utf-8 iniCodec on the settings object. Settings files written in Qt 5 will still be readable in Qt 6 (unless an iniCodec different from utf-8 was used), but to read Qt6 based ini files in Qt 5 applications, setting the iniCodec to utf-8 is required. Change-Id: Ic7dffcca17779bd5e3dae50d42ce633170289f6c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Add some incremental testsLars Knoll2020-05-141-20/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | Feed the data one by one to the encoder or decoder to verify that the handling of incremental decoding is correct. Change-Id: I565e4f1872e00859026334f7662b6778772e159d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Clean up the Flag handling in QStringConverterLars Knoll2020-05-142-52/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IgnoreHeader was a rather badly defined enum, in addition the utf8 and utf16 codecs where handling BOMs somewhat different for stateless decoding. Fix this by introducing explicit flags for writing a bom when encoding and not skipping the initial bom when decoding. Source compatibility for QTextCodec is done with a couple of static constexpr variables. Change-Id: I0b2d94f84c937cec1e0494c16ef448c00382691d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Always write XML documents as UTF-8Lars Knoll2020-05-141-91/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove support for setting a codec different from UTF-8 for writing XML files. All XML readers today can handle UTF-8, and there is no reason anymore to write a file in a different encoding. Change-Id: If89fb2d2474a2b55644d9bed7473c11ad91033eb Reviewed-by: Simon Hausmann <hausmann@gmail.com>
* | | Start work on a new API to replace QTextCodecLars Knoll2020-05-147-1/+1609
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new QStringEncoder and QStringDecoder classes (with a common QStringConverter base class) are there to replace QTextCodec in Qt 6. It currently uses a trivial wrapper around the utf encoding functionality. Added some autotests, mostly copied from the text codec tests. Change-Id: Ib6eeee55fba918b9424be244cbda9dfd5096f7eb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QApplication: refactor delivery and propagation of wheel eventsVolker Hilsheimer2020-05-131-18/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle wheel grabbing via wheel_widget in a single place, and propagate events in the same way for all (spontaneous) events. Handle ScrollMomentum the same way as ScrollUpdate to allow partial sequences. Fix the incorrect ignoring of wheel events by default; like all other input events, they are now again accepted by default and ignored in the default event handler implementation of QWidget. This way, implementing the handle suffices to accept the event. Note that QWidget::wheelEvent doesn't need to be changed, as the event is ignored there today (an oversight of the change made in f253f4c3, perhaps). This also fixes changing of direction of a wheel event while the event sequence is grabbed by a widget. Change-Id: Ia0f03c14dede80322d690ca50d085898a0497dbe Fixes: QTBUG-67032 Task-number: QTBUG-79102 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Port qt_punycodeEncoder() to QStringViewMarc Mutz2020-05-131-1/+1
| | | | | | | | | | | | | | | Change-Id: I264e67bc08413f8a39e2d16c774bfd2c76c320ac Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QString: remove op+=(char) and op+=(QChar::SpecialCharacter)Marc Mutz2020-05-131-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The former messes in bad ways with the overload set (it, fatally, attracts char16_t, e.g.). The latter was probably added in response to ambiguities between (char) and (QChar). While it's harmless now, remove it, since it no longer pulls its weight. The no-ascii warning is now coming from QChar(char), so the protection isn't lost. [ChangeLog][QtCore][QString] The += operators taking char and QChar::SpecialCharacter have been removed as they cause adding a char16_t to QString to call the char overload, losing information. The append() function was not affected. Change-Id: I57116314bcc71c0d9476159513c0c10048239db3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Remove deprecated QDesktopServices APIsVolker Hilsheimer2020-05-131-37/+0
| | | | | | | | | | | | | | | Change-Id: Ic21ad2938b20c1aa3ae499a921c9cff92f615816 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QNetworkReply/http2: Add a contentEncoding testMårten Nordheim2020-05-134-0/+173
| | | | | | | | | | | | | | | | | | | | | | | | Will be useful when DecompressHelper gets taken into use for both. Task-number: QTBUG-83269 Change-Id: Iaf253219bed193025c2b82d6609f4dcc4de33df8 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Port qt_check_std3rules() to QStringViewMarc Mutz2020-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | | Also port its callees. These functions scream to the QStringView-ified... Change-Id: I13c95d65941eb8d02223306d80efd1437b4bd9b7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Port qt_urlRecode() to QStringViewMarc Mutz2020-05-121-6/+6
| | | | | | | | | | | | | | | | | | | | | It's about time :) Change-Id: I27e597516318382850d4c193fd5b66a35fb9c316 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Teach QDateTimeParser some common time-zone offset formatsAndrei Golubev2020-05-121-2/+129
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-83687 Fixes: QTBUG-83844 Pick-to: 5.15 Change-Id: Ia1c827017b93cf8277aa5a0266805d773d2d9818 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Sweep of int-ish → char-ish types near calls to QString::fromU*()Marc Mutz2020-05-128-140/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fromUtf16(ushort*) and fromUcs4(uint*) overloads are going to be deprecated. Use the newer fromUtf16(char16_t*) and fromUcs4(char32_t*) overloads. As a drive-by, use std::end()/std::size() where applicable. Change-Id: I5a93e38cae4a2e33d49c90d06c5f14f7cb7ce90c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Use QChar::fromUcs4() moreMarc Mutz2020-05-122-4/+4
| | | | | | | | | | | | | | | | | | Change-Id: I02be41de92d84145186de9ac5f5ea3541a941964 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | tst_QShortcut: avoid int -> QChar conversionsMarc Mutz2020-05-121-10/+10
| | | | | | | | | | | | | | | | | | | | | They're being made explicit/deprecated/removed. Change-Id: I2d849d85e51c58b1f837c6795f3d45371f773a92 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Rewrite Qt Testlib selftest to not rely on Qt Testlib itselfTor Arne Vestbø2020-05-118-713/+18572
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use the Catch2 testing framework to test Qt Testlib, which also opens up the possibility of using it for other internal testing once it's made available through the build system. The test now has a --rebase mode which will write out the actual results as new expected files. Once we add the required post-processing to the results to remove timestamps and other testrun-specific data we can remove the standalone python script generate_expected_output.py that today has to be kept in sync with the test itself. No attempt has been made to clean up the comparison-functions, but these could all benefit from moving their logic from the comparison to the sanitization step. This will both make the expected files more generic, and will reduce the diff once a failure occurs, since we're not seeing all the hunks that the comparison-functions ignored. Change-Id: I1769d42e7958d56d1ad5da958db0e8fe3a2a3c23 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Make qtbase compile without QT_CONFIG(timezone)Andrei Golubev2020-05-117-17/+105
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-83795 Pick-to: 5.15 Change-Id: I05eaaf57d87a9111d3609ebab81bc707f8af98f0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Correctly parse non BMP char refs in the sax parserLars Knoll2020-05-106-27/+15
| | | | | | | | | | | | | | | | | | | | | | | | Update the auto test accordingly, and at the same time remove all uses of QTextStream (as they aren't required). Change-Id: I71b7cf6a6b54ea59507f27d5d2d04cc5ae5885fc Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* | | QChar: add fromUcs{2,4}()Marc Mutz2020-05-091-7/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fromUcs2() named ctor is designed to replace all the non-char integral-type constructors of QChar which make it very hard to control the implicit QChar conversions, which have caused a few bugs in Qt itself. As a classical named contructor, it simply returns QChar. The fromUcs4() named "ctor", however, needs to expand surrogate pairs, and thus can't just return QChar. Instead, it returns a small struct that contains one or two char16_t's, can be iterated over and be implicitly converted to QStringView. To avoid bikeshedding the name (FromUcs4Result, of course :), it's defined inline and thus can't be named outside the function. This function replaces most uses of QChar::requiresSurrogates() in QtBase. [ChangeLog][QtCore][QChar] Added fromUcs2(), fromUcs4(). Change-Id: I803708c14001040f75cb599e33c24a3fb8d2579c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QGraphicsAnchorLayout: port to QHVContainer [4/4]: sweep Orientation -> ↵Marc Mutz2020-05-091-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt::Orientation This part of the patch changes all remaining occurrences of the local versions of Orientation to Qt::Orientation. Change-Id: Ic9ec19b8f069f614061f319abd30841e10cdd626 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | tst_stringview: remove dead codeMarc Mutz2020-05-081-54/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wchar_t hasn't been QStringView's storage_type for a very long time (at least since 5.10). And in Qt 6, we require char16_t support not only in the compiler, but also in the stdlib, so drop the guards and the alternative code paths. Change-Id: I99f28b575f61c16a2497840708beaa4b54a80f57 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | QSslSocket::setSslSonfiguration - set d.configuration properlyTimur Pocheptsov2020-05-081-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We end up with an absurd situation: QSslConfiguration conf; //we set CA certs so that on demand loading is disabled: conf.setCaCertificates({...}); QSslSocket s; s.setSslConfiguration(conf); Q_ASSERT(conf == s.sslConfiguration); // this assert fails. Pick-to: 5.15 Change-Id: I272bed145434082acc6ead95fe3640d222b21131 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | tst_qstringview: modernize functions in help namespaceMarc Mutz2020-05-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They don't work with std::span, since std::span has neither const_iterator nor cbegin()/cend(). To fix, perfectly forward the return type with decltype(auto) instead of mentioning T::const_iterator, and rely on the const-qualfication of the help::c{r,}{begin,end}() functions' arguments to select the correct T::{r,}{begin,end}() overload. Change-Id: I4992d4bd521d2dc0f9ea51ae70cde8286ae543a5 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | tst_qstringapisymmetry: test split() with char16_t sepsMarc Mutz2020-05-081-1/+5
| | | | | | | | | | | | | | | Change-Id: I6744291b88d5334764da78375899313ac771294b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | QTest::ignoreMessage(): interpret the message in UTF-8Edward Welbourne2020-05-081-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The message to ignore is given in source code, hence UTF-8; it was being ingested as local 8-bit, which lead to problems when a debug message wasn't 7-bit clean and the system's native encoding wasn't UTF-8. Modified QtTest's selftest to check encoding failure. Pick-to: 5.15 Change-Id: I898744a450115b6d2ee992f1d3b36d8efaeeff7e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Catch overflow in QDateTime::fromSecsSinceEpoch()Edward Welbourne2020-05-081-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's documented to be undefined if the number of seconds is outside the allowed range, but it doesn't hurt for that undefined behavior to happen to be that the result is invalid. Added a simple test. Change-Id: I20c3f680c7948b3904f213452272133be77e4d62 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Remove all locale-dependence from Q(Date|Time)+Edward Welbourne2020-05-081-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Important Behavior Changes][QDateTime] Removed all locale-dependence from QDate, QTime and QDateTime, including the Qt::DateFormat members that select the formats of the default and system locales and the toString(Qt::DateFormat, QCalendar) overload, which only used its calendar for these formats. All toString() methods now use, and all fromString() methods only recognize, the C locale's names for days and months. Use QLocale's methods if you need to take locale into account. Fixes: QTBUG-80441 Change-Id: I3a8968438741afb00f44262f79659c51e9b06c35 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Move a test of QLocale's methods out of tst_QDateTimeEdward Welbourne2020-05-082-81/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It clearly belonged in tst_QDate::toDateTime(), for which it adds a few more test-case and in which it inspires some further testing. The new testing of case-insensitivity doesn't work if the format contains stray non-format characters, so added a new data column to take care of that. Pick-to: 5.15 Change-Id: I73619be02091c97024a84cb963c7029e9fd0569a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Condition some date-time tests on feature textdateEdward Welbourne2020-05-081-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They use the Qt::TextDate format, so do depend on the feature. Rename one in the process; nothing in its test has anything to do with de_DE locale. Pick-to: 5.15 Change-Id: I2adae5c46e6009c13b433993ed2c3c761a500bfb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | rhi: vulkan: Fix calling finish() twice with some copy commands in-betweenLaszlo Agocs2020-05-071-19/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The native command buffer handle was not updated, so the subsequent finish() call attempted to record an invalid VkCommandBuffer. The problem was not present with offscreen frames, only when finish() is called with a swapchain-based frame active. Task-number: QTBUG-84066 Change-Id: I9c4cb701c3dbbc28f237d6ae1cbf65aafd1fa95f Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | | Remove QScreen::orientationUpdateMaskShawn Rutledge2020-05-074-22/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It simplifies the API and reduces surprise to have rotation working by default. On Android, the manifest specifies which orientations the application has been designed to support; on iOS, it is controlled via the UISupportedInterfaceOrientations property list key. In addition, QWindow::contentOrientation() is another way to give a hint to the window manager, or on iOS to directly control whether the window's rotation is locked or not. Task-number: QTBUG-35427 Task-number: QTBUG-38576 Task-number: QTBUG-44569 Task-number: QTBUG-51012 Task-number: QTBUG-83055 Change-Id: Ieed818497f686399db23813269af322bfdd237af Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Add more tests for QtConcurrent::filterReduced()Jarek Kobus2020-05-072-0/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test the case where reduce function of the form: V function(T &result, const U &intermediate) has T and U types different. Task-number: QTBUG-83802 Change-Id: Ic89396caba16e7e47ae3ec1527e31b8620f1b08c Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* | | Cleanup the qtconcurrentfilter testJarek Kobus2020-05-071-1402/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get rid of code repetition in concurrentfilter test. Move tests with initial value next to their original version. Join new lambda tests into a common functions testing all possible 16 combinations of functor / function / member / lambda, as they test in fact the same function. There is no need to distinguish lambda case over other cases. This helps in test readability and maintenance. Add missing tests for lambdas with a combination of initial value. Task-number: QTBUG-83802 Change-Id: I45930c1e18a9e4e561909f46a5cbbdf0ad7ba333 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* | | Handle disk full situations by skipping QFile::moveToTrash testVolker Hilsheimer2020-05-071-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If any of the temporary directories and files can't be created, skip the test. Otherwise, the cleanup routine would recursively delete "/". Change-Id: I51f908a468be8fd2ebd523ff7ce27a7c78d1b4e2 Fixes: QTBUG-83863 Pick-to: 5.15 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | QFile::moveToTrash: work with relative file paths on WindowsVolker Hilsheimer2020-05-071-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The system APIs expect an absolute "display name" of the file path, so make it absolute. The test was overly tolerant in accepting failure, as a QStorageInfo initialized with a file path that doesn't exist is invalid, and thus always different from the QStorageInfo of the home directory. Fix the test to compare only valid QStorageInfo objects, and postpone the check until the file we want to move has been created. [ChangeLog][QtCore][QFile] moveToTrash supports relative file paths on Windows Change-Id: I94c8cd40c60fde469e38f76a98f867f20c6a0b15 Fixes: QTBUG-84015 Pick-to: 5.15 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Port baselineserver from QRegExp to QRegularExpressionLars Knoll2020-05-063-4/+6
| | | | | | | | | | | | | | | Change-Id: I1e76345caa560c27ca75204e1b48a69ba2237ae4 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>