summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
Commit message (Collapse)AuthorAgeFilesLines
* QMetaEnum: fix UBAnton Kudryavtsev2018-10-171-0/+10
| | | | | | | | | Check ptr before usage. Change-Id: Iac757a2e260b237d837318932cc0b5896c6e04c2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Improve support for QImages in QDataStream read transactionsEirik Aavitsland2018-10-151-17/+24
| | | | | | | | | | | | | | | | | | | | | | | QImage's operator>>(QDataStream&) did not set an error mode on the stream on read failures. That would break QDataStream transactions. Since the current QImage serialization cannot differentiate between truncated and corrupted data, we set the ReadPastEnd error as expected by the transaction system. Also specify the expected file format on decoding QImage from stream, to avoid all the format handlers' canRead() being invoked. This is necessary since some of them may call ungetChar(), which fails when the stream is in a transaction. Also add testing of this feature to the QDataStram transaction autotest. That required a slight rewrite of the fake sequential QIODevice subclass. The previous implementation had incorrect behavior of peek(), which is required by QImage decoders. Task-number: QTBUG-70875 Change-Id: If3f1ca7186ad1e6ca0e6e8ea81d2b2fbece6ea01 Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Support QCborMap::operator[] taking a string literalEdward Welbourne2018-10-081-0/+3
| | | | | | | | | | | | | | | | | Use a template on the size of the char[], as suggested by Ville Voutilainen. This resolves ambiguity about whether such look-ups should be done via QString or QCborValue (not that it would have made any difference). When we come to add mutating indexing of QCborValue, chained dereferences like map[i][j][k] need to stay in operator[] const throughout, to avoid detaching intermediates to create references into them due to using the mutating operator[] on the earlier dereference's return. So const-qualify the QCborValue operator[] const variants at the same time, to match those of QCborValue itself. Change-Id: Ib1652ae9440fe3767a653afa2856b74040210e07 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-10-081-0/+8
|\ | | | | | | | | | | | | Conflicts: src/corelib/tools/qtimezoneprivate.cpp Change-Id: Icbb5999d378711ce3786a4fe0aba176a45ac702c
| * QDateTimeParser: avoid using an invalid hour by defaultEdward Welbourne2018-10-021-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | When a time-zone does a spring-forward, skipping an hour (either to start DST or to move its standard time), there's an hour that doesn't exist on the day in question. That hour can be the first hour of the day, in which case using 0:0 as the default time is broken. So catch this case and use the first time that day that makes sense. Fixes: QTBUG-70823 Change-Id: I23dae9320a3cdd2c988841a7db1b111edb945730 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QSFPM: don't let setFilterRegExp(QString) overwrite CaseSensitivityDavid Faure2018-10-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression from commit 346c15102b, which creates a new QRegExp in setFilterRegExp, losing previously set case sensitivity property (i.e. when the code does proxy->setFilterCaseSensitivity(Qt::CaseInsensitive) before setFilterRegExp). Interestingly that commit ensured that setFilterFixedString would still preserve CaseSensitivity, but not setFilterRegExp(QString). Change-Id: I3d37d001ce6e86dd90e7e07431440a42607172f9 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-305-6/+17
|\| | | | | | | Change-Id: Iaa438d14357be1bf75bb645cb8d3245947c055b8
| * Fix QUrl::matches for when removing authority parts (other than host)Thiago Macieira2018-09-291-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QUrl::RemoveAuthority is RemoveUserInfo | RemovePort | 0x10, so the condition if (options & QUrl::RemoveAuthority) would match if any of the other bits for the username, password or port were set, which meant we would skip the host comparison. Ditto for username and RemovePassword. [ChangeLog][QtCore][QUrl] Fixed a bug that caused QUrl::matches to incorrectly compare two URLs with different hostnames or different usernames as equal, if certain QUrl::RemoveXxx options were passed. Change-Id: I015970a03b874898bba7fffd155856ab9d6cb1be Fixes: QTBUG-70774 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * QCommandLineParser: Ensure that an option text ends with a newlineAlexander Akulich2018-09-282-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change we inserted newline only if an option has a description and ended up with an arbitrary long line with all options. [ChangeLog][QtCore][QCommandLineParser] Fixed a bug that caused the help output to show two options or more in the same line if the options didn't have a description. Task-number: QTBUG-70174 Change-Id: Id54b9ae13ee596869e4dc14e09301aea19eed2f8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Modernize the "filesystemwatcher" featureLiang Qi2018-09-272-6/+3
| | | | | | | | | | | | Change-Id: If030b56ad97e047d89d442629262b4839df306d4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Fix QXmlStreamWriter xmlns attribute placementhjk2018-09-281-0/+32
| | | | | | | | | | | | | | | | | | Done-by: Eugenio Rustico Change-Id: Ibd6aa6cc8be9090a4fad4f96628086d8a498b8e0 Fixes: QTBUG-63434 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Re-enable thread autotestsAllan Sandfeld Jensen2018-09-251-1/+1
| | | | | | | | | | | | | | | | Replacing the qmake test with the one corelib/thread/thread.pri uses for those classes. Change-Id: Ie803190b821736c89b056ae51b7dfe92046189eb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Add tests for decoding too-short UTF-8 sequencesThiago Macieira2018-09-252-13/+32
| | | | | | | | | | | | | | | | | | | | | | | | We were handling this properly, but not testing them. I guess we weren't testing because the condition is a valid intermediate state, so hasFailure() is correct it returning false. Testing inspired by the bug reported in https://github.com/intel/tinycbor/issues/137 Change-Id: Ib47c56818178458a88b4fffd1554ecfdd0af637e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | tst_QCborValue: eliminate unused lambdaEdward Welbourne2018-09-251-1/+0
| | | | | | | | | | Change-Id: Icb8bd9bd170c8c22978c7d730a8c8b671705adfc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Extend blacklisting of tst_qparallelanimationgroup tests to macOS 10.13Tony Sarajärvi2018-09-241-0/+1
| | | | | | | | | | | | Task-number: QTBUG-61500 Change-Id: I46b10b6ecd7f1653bebd0ffd6f250f5c65cb8189 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Extend blacklisting of qtimeline::frameRate to macOS 10.13Tony Sarajärvi2018-09-241-0/+1
| | | | | | | | | | | | | | | | This is already blacklisted for macOS 10.12 and reproducing in 10.13. Task-number: QTBUG-61037 Change-Id: I464e42d0ae5ab24104250edc69a90454ba605eaa Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Clean up time-zone matching logic in tst_QLocale::macDefaultLocale()Edward Welbourne2018-09-111-18/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test was computing GMT with a suffix added to it for the offset; but when the offset is zero there's no need for it. Cleaned up the logic so that it only checks for a "padded to two digits with zero" if the number is single-digit (and use string arithmetic in preference to wantonly complex .arg()ing; and use simpler names). Since we don't try to check anything unless GMT does appear in the string (because the actual zone ID was used, instead of GMT with an offset), the case of zero offset has nothing more to check than that GMT was present, the precondition for checking anything. Task-number: QTBUG-70322 Change-Id: I0b8abe7e63d9d72fa9cf32f188b47a78a849044b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | moc: Fix compilation of text strings containing non-ASCIIThiago Macieira2018-09-103-1/+26
| | | | | | | | | | | | | | | | | | | | | | On platforms where char is signed, like x86, the following is an error (narrowing conversion): unsigned char x[] = { '\xc3' }; Change-Id: I495bc19409f348069f5bfffd15518f9ef4e43faf Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QSortFilterProxyModel: add test for inserting via a QComboBoxOlga Radko2018-09-062-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This new test double-checks the bugfix for QSortFilterProxyModel::insertRows in commit 70ba75519d. Previously, when using QComboBox on top of QSortFilterProxyModel and calling QComboBox::addItem with row==rowCount(), an empty item was inserted in one place, and then another item was modified (instead of the inserted empty one). This test checks that the above bugfix indeed fixes the behavior of QComboBox::addItem when used in this manner. Task-number: QTBUG-69158 Change-Id: Id01345e0525694a57250c656222d626e2267aa8e Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: David Faure <david.faure@kdab.com>
* | QStringList: add contains(QStringView) overloadAlbert Astals Cid2018-09-031-0/+9
| | | | | | | | | | Change-Id: I953e4ef3167011d0348ea482890e29478bd6f761 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add QString::compare(QStringView, CaseSensitivity)Albert Astals Cid2018-09-031-0/+5
| | | | | | | | | | | | | | | | There was a QStringView::compare(QString, CaseSensitivity) but it's good that the symmetric also exists Change-Id: Ic789f11d41eb8cfa393cb51c19bd1f89bb87d912 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Rename QTimer::connectTo() to QTimer::callOnTimeout()Sergio Martins2018-09-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some people suggested the later, so let's have a second look at it before it's too late. Although I was in favor of the former I'm now having second thoughts. connectTo() is meant to only be used in classes which have a clear dominant signal, but there are rare classes that have two (example: QAbstractButton::toggled, QAbstractButton::clicked). QAbstractButton::connectTo() would be ambiguous if we ever wanted to add these shorthand connects to QtWidgets Change-Id: I198ad3326d31dcf89b9c47a299124572ee7b11b3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Plugins: Save some architectural requirement flagsThiago Macieira2018-09-011-21/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...not just the debug flag. The information is saved outside of the CBOR map for two reasons: 1) removing the hack that depended on how QCborStreamWriter and TinyCBOR internally work, allowing for the extra parameter to be written directly. We wouldn't be able to use that hack anyway and would have needed a further, uglier hack to encode a byte whose value we don't know. 2) outside the map, this information can be parsed more quickly and then we can discard any plugins we shouldn't actually load. Since we're doing this for a flag, I decided to move the Qt version there too for reason #2. Change-Id: I61ecce6b1324410bbab4fffd153d4e5fc696d19e Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Plugins: store the metadata in CBOR instead of binary JSONThiago Macieira2018-09-012-8/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for Qt 6 deprecating the binary JSON format. Also reduces the size of the metadata a little: for the xcb platform plugin, it went down from 264 bytes to 138; for the jpeg image plugin, it went from 320 to 135. I've had to change the signature so older versions of Qt won't try to parse the CBOR data as Binary JSON. Unfortunately, before QJsonDocument could get a chance to reject it, qJsonFromRawLibraryMetaData() needed to allocate memory and that causes crashes with Qt < 5.11.2. Change-Id: Ieb48f7c0dd0e4e0fb35efffd153bee34e16ce347 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Remove codepaths and checks for unsupported Apple platformsTor Arne Vestbø2018-08-311-2/+1
| | | | | | | | | | | | | | We no longer support macOS 10.11, iOS/tvOS 10, or watchOS 3. Change-Id: Ide03d8fac06185ef4162ba75ee54a0adf6916905 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Update QMetaObjectBuilder::MetaObjectFlag enumBogDan Vatra2018-08-301-3/+1
| | | | | | | | | | | | | | | | | | Synced QMetaObjectBuilder::MetaObjectFlag with the MetaObjectFlags enum from qmetaobject_p.h. Also added a few comments for Qt 6. Change-Id: Ieccd5cf8d512a6bf7256b2f4db88d45662774536 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Allow registering constructor for a set of dynamic typesBogDan Vatra2018-08-302-1/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature is needed to register complex types (e.g. Q_GADGETS) at runtime, using a single constructor method and added type parameter. Without having the type id available to the Constructor it is impossible to specialize behavior, thus requiring separate constructors for each type. Generating these separate constructors at compile time is easy, but not at runtime. [ChangeLog][QMetaType] QMetaType can now register constructor for a set of dynamic types. Change-Id: I6071271d0e157864594dd07b4bc3a0abbeb15a44 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add missing dependencies for tst_qmacautoreleasepoolTor Arne Vestbø2018-08-291-0/+1
| | | | | | | | | | Change-Id: Idf94d419526f02e89608b1d105a0858bceabbba1 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | darwin: fix tst_qsettings depsOswald Buddenhagen2018-08-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | the test uses CoreFoundation api directly, so it must link it explicitly. amends 6c8f32388b. Change-Id: I76b7d8ab41d6a66138eb45bd0f067cfee8e96cb8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | tst_QLocale::formattedDataSize: add RussianShawn Rutledge2018-08-261-0/+31
| | | | | | | | | | | | | | | | | | The table and macros weren't extensible enough for non-Latin-based languages. Change-Id: I950f06de57aaf6bd0b24e0056e4acee2fb655f3d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-08-244-0/+33
|\| | | | | | | Change-Id: I5f1567c792992fc00f0256f39b76cfbe017e6a3a
| * Blacklist two tests on macOS that a planned CI change shall breakEdward Welbourne2018-08-242-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | We have #if-ery on Q_OS_DARWIN controlling an expectation of gettign "GMT+1" and "GMT+2" instead of "CET" and "CEST" in two tests; this turns out to not be a deficiency of macOS so much as of how we configure Coin's VMs. While we fix that, we need to ignore failures in these tests, so that we can pull the #if-ery out and clear the blacklist once the VMs are set up properly. Task-number: QTBUG-70149 Change-Id: If3577200cf980b3329161ab3eea7bd2e9d0124e0 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
| * Test for fractional part of Costa Rican currencyEdward Welbourne2018-08-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | CLDR up to somewhere between v29 (used by 5.9) and v31.0.1 (used by 5.10 and later) claimed Costa Ricans don't include fractions in their currency; now it claims they expec two digits. Apparently one of them does expect those digits, so this is the regression test I'll be cherry-picking back to LTS, to accompany the CLDR updates they need. Task-number: QTBUG-70093 Change-Id: I138772cc6013fa74de4f7c54b836cac83421eab2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * _q_interpolate<T> is unsafe with unsigned template argumentsLuca Beldi2018-08-221-0/+25
| | | | | | | | | | | | | | | | | | _q_interpolate<T> subtracts 2 arguments of type T, for unsigned types this can cause wrapping around Task-number: QTBUG-57925 Change-Id: Iffa59f413579a3d5de8cb728fe71443d8e8a04aa Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Revert "Fix time-zone tests on macOS >= 10.13, which now knows what CET is"Edward Welbourne2018-08-242-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fd38c97a6c5b7bfab39b5f814d68a02e4d197e70. Apparently our actual VMs for 10.13 don't get this right, although the ones used in testing did (prompting the fix this reverts). We probably have mis-configured VMs, but this is the quick-fix to get development moving again. Task-number: QTBUG-70149 Change-Id: Ib96755d8e21d9b226e22fc985f13f34fa04117b1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-08-222-0/+236
|\| | | | | | | | | | | | | | | | | Conflicts: src/gui/text/qtextengine.cpp tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.h Change-Id: Ib9f968edbb0f3387c89bc25e914321d0738bfadc
| * QSortFilterProxyModel inserting at bottom of source modelLuca Beldi2018-08-171-0/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, if you try to insert a row at the bottom of QSortFilterProxyModel the row will be inserted in the source model at position proxy->rowCount rather than at the bottom. This causes insert at apparently random positions in the source. [ChangeLog][QtCore][QSortFilterProxyModel] QSortFilterProxyModel::insertRows(row,count,parent) with row == QSortFilterProxyModel::rowCount will insert at the bottom of the source model rather than at the row QSortFilterProxyModel::rowCount of the source model Task-number: QTBUG-58499 Task-number: QTBUG-69158 Change-Id: Ie78416c8fbc429303b8c9c98375630e3e4d85f6d Reviewed-by: David Faure <david.faure@kdab.com>
* | MinGW: Exclude failing value of tst_QEasingCurve::setCustomType()Friedemann Kleint2018-08-211-0/+5
| | | | | | | | | | | | | | | | | | After updating MinGW toolchain from 5.3.0 to 7.30 test starts to fail. Task-number: QTBUG-69947 Change-Id: I850d854b27e1cb4e1dd2cb600e8e79bd18bff4a0 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Simo Fält <simo.falt@qt.io>
* | Extend blacklisting of qeventdispatcher to cover WinRTHeikki Halmet2018-08-211-0/+1
| | | | | | | | | | | | | | | | | | They have been blacklisted on windows and macOS previously. Now failing on WinRT as well. Task-number: QTBUG-69962 Change-Id: I30ca23005b082e820ee896fa36a8984a1536ad6b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | QMimeDatabase: Fix MIME detection issues with magics in MIME hierarchiesEike Ziller2018-08-205-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assume two MIME types A and B are registered, both with the same glob pattern, A being parent of B, A with some magic rule, and B with another magic rule. Given a file that matches the glob pattern and the magic rule of A, the resulting MIME type depended on the order of registration of A and B, because it would just check if some glob matching MIME type was also a subclass of the magic matching MIME type. The patch prefers the the MIME type that matches by magic if that matches by glob pattern as well (i.e. A in our example). The "recommended checking order" of the spec does handle that case. Task-number: QTBUG-44846 Change-Id: I2af43f6199faf9a42cd9c35d3a045441afbd6217 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* | Add support for QRegularExpression to QSortFilterProxyModelSamuel Gaist2018-08-1911-179/+420
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements the support for QRegularExpression in QSortFilterProxyModel. [ChangeLog][QtCore][QSFPM] QSortFilterProxyModel now supports QRegularExpression. Task-number: QTBUG-46810 Change-Id: If932d55f98f9b8bcf3a72c03ffd51da52cb50ad1 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: David Faure <david.faure@kdab.com>
* | Migrate QDir to use QRegularExpressionSamuel Gaist2018-08-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The match method still uses QRegExp. This patch updates the code to use QRegularExpression and translates the wildcard patterns to a suitable form for QRegularExpression. [ChangeLog][Core][QDir] QDir now uses QRegularExpression internally for wildcard matching. Note that QRegularExpression might not give the exact same result as QRegExp as its implementation follows strictly the glob patterns definition for wildcard expressions. Nevertheless, the tests for QDir return the same results as before. Change-Id: I095959443ac7362f7534e35454eff038061fca82 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | QRegularExpression: refactor wildcard translationSamuel Gaist2018-08-181-0/+19
| | | | | | | | | | | | | | | | | | | | | | This patch refactors the wildcardToRegularExpression method to generate a simpler regular expression. It also fixes some shortcomings of the previous implementation. Tests have been updated to ensure all cases are properly supported. Change-Id: I454e3fe8fe0bb663b2f319d6fa2fa8aec626c50d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | [macOS] Skip test that triggers a buffer overflow in CoreFoundationErik Verbruggen2018-08-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | Deep down in CoreFoundation, ICU is used, and this test triggers a heap-buffer-overflow with AddressSanitizer. Disable this test for macOS until Apple fixes it. Task-number: QTBUG-69875 Change-Id: I43e4a69708be8cde3bde87c57db21f5b717f96b8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-171-1/+18
|\| | | | | | | Change-Id: I8bb8227f9da982e7d5ebe5324fc27abd9ac0d4fc
| * QUrl: Make sure we do reject URLs for which IDNA nameprep failedThiago Macieira2018-08-161-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | qt_nameprep() already reset the string to its original length to indicate failure, but we didn't handle that in qt_ACE_do(). So make it have a return value whcih makes it easier to handle that case and do handle it. [ChangeLog][QtCore][QUrl] Fixed a bug that caused URLs whose hostnames contained unassigned or prohibited Unicode codepoints to report isValid() = true, despite clearing the hostname. Change-Id: I41e7b3bced5944239f41fffd1545b7274c4b419d Reviewed-by: David Faure <david.faure@kdab.com>
* | Modernize the "thread" featureUlf Hermann2018-08-175-28/+24
| | | | | | | | | | | | | | | | | | | | Add it to configure.json and replace all occurrences of QT_NO_THREAD with QT_CONFIG(thread). Add conditions for other features that depend on thread support. Remove conditions where we can use the QMutex and QThreadStorage stubs. Change-Id: I284e5d794fda9a4c6f4a1ab29e55aa686272a0eb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Refactor wildcard support in QRegularExpressionSamuel Gaist2018-08-161-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API originally proposed was flawed in the sense that the setter function would use a modified version of the parameter given which would have make it a black box for the user. This patch fixes that by removing that setter and providing a static method that will return the pattern suitably modified to be used by QRegularExpression the same way the escape method does. [ChangeLog][Core][QRegularExpression] Implemented support for wildcard patterns through a static method. Change-Id: I0054bcaffd7525dac569f54fa81f73b7e4544b2e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Avoid signed/unsigned warning in templateEdward Welbourne2018-08-161-1/+1
| | | | | | | | | | | | | | | | | | tst_QtEndian's transformRegion_template() was getting a signed/unsigned comparison warning when T was unsigned in a QCOMPARE(T-value, 0); so use T(0) instead. Change-Id: I78cb2ab96f79393def65ed2c020aa3039017ab92 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Rework tst_QLocale::emptyCtor() as a data-driven testEdward Welbourne2018-08-161-58/+88
| | | | | | | | | | | | | | | | | | That way, we'll get told all the cases that fail, rather than only the first. Provoked by investigation of failures that turned out to be caused by QTBUG-69875. Change-Id: I8fa2902cbbcb307cbe1fdec2e7d8d6b0c3eb998a Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>