summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Merge remote-tracking branch 'origin/5.13' into dev" into ↵Liang Qi2019-03-159-45/+64
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-149-45/+64
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qcollator_win.cpp Change-Id: I6d806d7c58b2057ebde3ad915bb5551f34b700e5
| | * Doc: replace 0 with \nullptr in documentationChristian Ehrlicher2019-03-133-12/+12
| | | | | | | | | | | | | | | | | | | | | Replace some more 0 with \nullptr. Change-Id: I2af91bf3712eef5161b11da0c44614bc039ade03 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * Doc: Unify terminology for '\0'-terminated stringsChristian Ehrlicher2019-03-132-24/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation for QByteArray and QString is using different notations for '\0'-terminated strings. Unify them by using '\0'-terminated everywhere. Change-Id: Ia26ec5c50635bebba1b54b7fe227ff0bcca4f2ad Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
| | * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-113-3/+3
| | |\ | | | | | | | | | | | | Change-Id: Iecdf00ca61d819bde532daa42f093860ec4a499e
| | | * Fix Coverity warning about mixing enumsThiago Macieira2019-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity says: >>> CID 190310: Incorrect expression (MIXED_ENUMS) >>> Mixing enum types "CborType" and "QCborStreamReader::Type" for "type_". Change-Id: Ifbadc62ac2d04a9a8952fffd1589e6e304fc7703 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * Fix a couple of small doc things in relation to QScopeGuardAndy Shaw2019-03-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6e61a18697b95d9e3f534d1d71ebf32fdff4a04f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-091-6/+28
| | |\| | | | | | | | | | | | | Change-Id: Ica3f89ace33585ad7854417a328156f5a68e2a00
| | | * Handle error from MS-Win API in QCollator::compare()Edward Welbourne2019-03-061-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CompreString(Ex|) can fail, e.g. if it doesn't like the flags given. Report such failure and treat compared values as equal rather than whichever is first being less. Fixes: QTBUG-74209 Change-Id: If8fa962f9e14ee43cc423a09a67bc58259a24794 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
* | | | More nullptr usage in headersKevin Funk2019-03-1442-85/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Diff generated by running clang-tidy's modernize-use-nullptr checker on the CMake-based Qt version. Skipping src/3rdparty, examples/, tests/ Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | QStringMatcher: add QStringView supportAnton Kudryavtsev2019-03-142-10/+41
|/ / / | | | | | | | | | | | | | | | | | | While touching the code, deduplicate some methods. Change-Id: I28f469f0e9ae000a34466b0ecc604b5f3bd09e63 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Avoid copying QByteArray created via fromRawData in toDoubleVolker Hilsheimer2019-03-091-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qt_asciiToDouble accepts a length parameter, so we can just pass that through. No need for explicitly null-terminating, which is where the copy of the data would be made. Change-Id: I4e7921541f03295a2fae6171b35157084ff3ed8c Fixes: QTBUG-65748 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-098-27/+48
|\| | | | | | | | | | | Change-Id: I056b658ffe9390dfcbe2787e2bddc7f4e9b389dd
| * | Fix some qdoc warningsFriedemann Kleint2019-03-073-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/corelib/itemmodels/qtransposeproxymodel.cpp:166: (qdoc) warning: Unknown command '\details' src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp:102: (qdoc) warning: '\brief' statement does not end with a full stop. src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp:233: (qdoc) warning: Undocumented parameter 'index' in QConcatenateTablesProxyModel::flags() src/corelib/itemmodels/qconcatenatetablesproxymodel.cpp:165: (qdoc) warning: Undocumented parameter 'proxyIndex' in QConcatenateTablesProxyModel::mapToSource() src/corelib/io/qresource.cpp:275: (qdoc) warning: Can't link to 'isCopressed()' src/corelib/io/qresource.cpp:555: (qdoc) warning: Can't link to 'compressionType()' src/network/ssl/qocspresponse.cpp:47: (qdoc) warning: '\brief' statement does not end with a full stop. src/network/ssl/qocspresponse.cpp:47: (qdoc) warning: Can't link to 'QSslSocket::ocspResponse()' src/gui/image/qimage.cpp:2247: (qdoc) warning: Undocumented parameter 'f' in QImage::convertTo() src/gui/image/qimage.cpp:2247: (qdoc) warning: No such parameter 'format' in QImage::convertTo() src/gui/text/qtextformat.cpp:1420: (qdoc) warning: Undocumented parameter 'styleName' in QTextCharFormat::setFontStyleName() src/gui/text/qtextformat.cpp:1420: (qdoc) warning: No such parameter 'style' in QTextCharFormat::setFontStyleName() src/widgets/dialogs/qdialog.cpp:151: (qdoc) warning: Unknown command '\p' src/widgets/dialogs/qdialog.cpp:167: (qdoc) warning: Unknown command '\p' src/widgets/dialogs/qdialog.cpp:167: (qdoc) warning: Unknown command '\p' src/widgets/dialogs/qdialog.cpp:168: (qdoc) warning: Unknown command '\p' Change-Id: Ide52b70f8e72d53767d489ce1a413cf4c2dce7df Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-03-064-18/+38
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/http2/hpacktable_p.h Change-Id: Ie0c296667dfdebba84f4858056a1ac80c24ee7df
| | * testlib: Prevent Apple test logger from stomping on other loggersTor Arne Vestbø2019-03-052-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were potentially adding the Apple test logger multiple times, and we didn't consider whether the existing loggers were logging to file or not when circumventing them. We now don't use the Apple logger if it would touch stderr and some other logger is using stdout. In the case of no explicit logger being specified on the command line, we allow the Apple logger to take priority over the default plain test logger. Change-Id: I31bbec4f4b3ab84ba9a2be35e8e5db08fee071a7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Handle the situation where QTemporaryFile::open() failsAndy Shaw2019-03-051-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | If open() fails then we should make sure we do not try to write to it and just return 0 in that case. Change-Id: I2980b65766b322efed6708fb10cc27567174dc37 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * nothread: add exit function to QThread stubLorn Potter2019-03-041-0/+10
| | | | | | | | | | | | | | | | | | | | | This allows QtDeclarative examples to build. Change-Id: Icd20304f76f8ba15c94eaf01b9fcd7b151b16146 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | Fix typos in deprecation messages, noticed during code reviewEdward Welbourne2019-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Missing Q on the front of RegularExpression. Poor wording in QPixmap::fill() messages; and stray spaces at their starts. Task-number: QTBUG-73484 Change-Id: Ib953114c047afc37f0a903fcaaebfbc172079cbc Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Clean up the QCollator code and commentsEdward Welbourne2019-03-084-51/+69
| | | | | | | | | | | | | | | | | | | | | | | | Broke over-long lines. Reflowed documentation, refined a phrasing, corrected some out of date details and typos. Change-Id: Ic3835bb198bd062f85b3c466b56dc9636d4d3fe4 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Report status codes in warnings about API failuresEdward Welbourne2019-03-081-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | Also reuse the status variable, since the value saved in the one previously declared int was an OSStatus, too. Change-Id: I8e8fe308ae71df51e8057d89bc76cab0c6bbedb2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Extend QCollator to support QStringViewEdward Welbourne2019-03-086-76/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables some simplification of the existing implementations. Refined wording of the documentation in the process. [ChangeLog][QtCore][QCollator] Added support for QStringView. Change-Id: Idffaae8d109173d47c7be076828f4b58dc334957 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add QStringView::toWCharArray() to match QStringEdward Welbourne2019-03-084-7/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QCollator needs it to add support for QStringView. In any case, it extends the mirror of QString's API. Naturally, we can reimplement QString's version using it. Change-Id: I5a23a3f2a98c7d59597b5e935542a93764b5e350 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | | QLineF: mark angle(const QLineF&) as deprecatedChristian Ehrlicher2019-03-052-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | QLineF::angle(const QLineF&) was deprecated during Qt4 times but not decorated with QT_DEPRECATED_X. Add this so it can be removed with Qt6 Change-Id: I8950b646cc5fa8206e47bdd16647d17d615f6c6a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Simplify toStdWStringGiuseppe D'Angelo2019-03-051-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In C++17: just use std::basic_string::data(). In C++11: dereferencing begin() on an empty string is undefined behavior on all compilers, not just MSVC, so remove that workaround. Instead of the reference-dereference combo, use std::basic_string::front(). Change-Id: I3229597e000311ce71e4083dca6667bb56d8f8e3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QString: mark obsolete functions as deprecatedChristian Ehrlicher2019-03-042-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark obsolete functions in QString as deprecated so they can be removed with Qt6: - QString::sprintf() - QString::vsprintf() Change-Id: I9b7748db95291c34b95ff3ad3e3aabc8215aeaae Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | | Fix warnings when compiling with QT_NO_XMLSTREAMJędrzej Nowacki2019-03-042-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Some of function arguments were unused. Change-Id: I29e8e4acbed87836044cac4f0b7ac59168181f5a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-017-13637/+13675
|\| | | | | | | | | | | Change-Id: Icec0aa703d8a13efa9f1634a1a353eb9d63685c8
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-284-12/+15
| |\| | | | | | | | | | Change-Id: Icc9b061c56e969756f0351c936cdeb8063c86079
| | * Doc: update the note about nested deleteLater()Thiago Macieira2019-02-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you enter a nested event loop, cause a deleteLater(), exit that event loop, then enter a new one, the nesting count will be the same so those are legitimate targets for deletion. Task-number: QTBUG-73432 Change-Id: Id98140e1c2f0426cabbefffd157f975b5e291ccd Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Use qEnvironmentVariable for QT_PLUGIN_PATHSThiago Macieira2019-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | | This is required for non-ANSI paths on Windows. Change-Id: Id98140e1c2f0426cabbefffd157c4065c3bdfd40 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Make the QEventDispatcherWin32Private::interrupt flag atomicThiago Macieira2019-02-272-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not entirely sure that this solves the problem reported in the bug report, but here's the theory: the loop 633 while (!d->interrupt) { ... 710 } has few calls that recurse back, so the compiler optimizer can assume that the variable remains unchanged (not interrupted) in most of the branches. Additionally, it can assume the variable did not change from there to 712 // still nothing - wait for message or signalled objects 713 canWait = (!retVal 714 && !d->interrupt 715 && (flags & QEventLoop::WaitForMoreEvents)); Which causes canWait to be true, despite having been interrupted by another thread. Changing to an atomic does not force the reloading of the variable (strictly speaking, would need volatile, but all atomic implementations do reload now), but it solves the problem of data race, which was UB. The equivalent variable in the Unix event dispatcher is atomic (commit 49d7e71f77f899c05e4b5187e8834dfcbddf4505 from 2013). I've reordered the bool members so they're all together and reduce the amount of padding in this class. Fixes: QTBUG-72438 Change-Id: I4ac1156702324f0fb814fffd156f290df94dc4c7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Properly deprecate assorted enum membersEdward Welbourne2019-02-271-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the first uses of Q_DECL_ENUMERATOR_DEPRECATED. Prompted by API change review for 5.13, comment by Christian Ehrlicher. Task-number: QTBUG-73484 Change-Id: Ic106048cec18960a91f88eb12650abab6abf0e97 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
| * | Update the DNS public suffix list from publicsuffix.orgEdward Welbourne2019-02-272-13620/+13653
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regular update in preparation for 5.13, adding tests for additions since 5.9.4/5.10.1/5.11.0's update 7e946030 (the last to record its upstream version sha1). Corrected the license header: it's now published under MPL 2.0 (not 1.1); and our secondary licensing of it is as LGPL3. Deferred full header over-haul until we've worked one out in detail. [ChangeLog][Third-Party Code] Updated DNS public suffix list Task-number: QTBUG-72623 Change-Id: Iabdbbbfd79624830396c2a6fe0a73389bd6ce5b7 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | | Fix crash in QTest's signal dumperMårten Nordheim2019-02-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | It Q_ASSERTs that argv is not a nullptr, so it would fail when an unconnected signal with 0 arguments was emitted. Change-Id: I5dd810fbeea5b6b511eff4705efdaa6a55739604 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-02-2712-12/+14
|\| | | | | | | | | | | Change-Id: I14eaabe98845445a9ea5266872cc1797786cfe04
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-262-1/+3
| |\| | | | | | | | | | Change-Id: Id511850002d9274d17891c063376ac4b3ff939dd
| | * Make the qfloat16tables.cpp depend on the executable, not the commandThiago Macieira2019-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtPrepareTool could return a more complex command-line in the variable, for some reason. So declare the dependency on the actual executable only. Change-Id: Id061f35c088044b69a15fffd1583504f25936a7a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * Fix build for size with gccKirill Burtsev2019-02-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fixes the error: variable 'isDifferent' set but not used Change-Id: Ibd60b17126057da64a41d325b7ef548316f27c4b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Fix can not -> cannotRobert Loehning2019-02-2510-11/+11
| | | | | | | | | | | | | | | Change-Id: Ie9992f67ca59aff662a4be046ace08640e7c2714 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Add conversion to and from long and ulongVolker Hilsheimer2019-02-233-0/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements conversion parity with QString, which can convert to and from long and unsigned long. The implementation simply forwards to existing long long overloads or uses the existing helpers, so just as for the conversion to/from int or short, no additional test cases were added. Change-Id: I37ef06d9ce4d80d98bd72720353996bac723e09c Fixes: QTBUG-782 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 783953f09dcfe9c58dc991394535ba07dabe2560) Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Bump versionKari Oikarinen2019-02-252-2/+4
| | | | | | | | | | | | Change-Id: I5561df4b90b02d88bb2fc7b52d74487e71efce7d
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-02-223-11/+25
|\| | | | | | | | | | | Change-Id: I4b56ce8c76729d9fc60995564299f8f27336fcde
| * | Update and expand public suffix list's attribution informationEdward Welbourne2019-02-221-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Say where the git repo is, for finding commit IDs, but make clear that the download should come from the public site. Revised Description to the closest match to it I could find on the current web-site (on the home page). Mention where the script to convert the data live. Task-number: QTBUG-72623 Change-Id: Ie5f7b2b0c21cdf1c24e311c13866cb1bb02e6973 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-221-8/+14
| |\| | | | | | | | | | Change-Id: I9e7cb1b131b7b216aad8ed1b1536669fd1557c21
| | * QProcess: Fix crash when calling closeWriteChannel on WindowsJoerg Bornemann2019-02-211-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We must deleteLater the pipe writer in closeChannel, because if you call closeWriteChannel() from a slot that is connected to a signal emitted from QWindowsPipeWriter, we'd operate on a deleted object. For consistency, we're calling QWindowsPipeWriter::stop before deleteLater and deduplicate the code. Fixes: QTBUG-73778 Change-Id: I61d3dedf57e9fd02517a108d13ffc85e006330f6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-211-1/+7
| |\| | | | | | | | | | Change-Id: I830beea26863323ab78a5d4b093f7763d77ad3da
| | * Document that type information is lost when reading QSettings from INIMitch Curtis2019-02-201-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is quite an important detail for an otherwise useful format. We should make the user aware that they currently have a tradeoff: - Either you can store settings in one place on all platforms that your application targets and have to manually manage conversion from strings, or - Use native formats which can be hard to find and edit, but retain type information. Change-Id: Ic648524c9ebff25246d7cdefb7628ff5ddf84964 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | | qtlite: Add a new option -no-pcreMikhail Svetkin2019-02-221-7/+12
| | | | | | | | | | | | | | | | | | | | | pcre only used by QRegularExpression. Change-Id: I704bdb46ed8956f875e1f5fcc0fa2e06122fd87e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QObject: count declarative receivers also if there are no C++ onesUlf Hermann2019-02-221-3/+3
| | | | | | | | | | | | | | | | | | Change-Id: If998cdd5eeb8a3ae85cd540cc9c1fd0c051e1d4b Fixes: QTBUG-73753 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>