summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Do not anchor an already-anchored regexpGiuseppe D'Angelo2020-01-171-1/+1
| | | | | | | | | | wildcardToRegularExpression() returns an anchored regexp, so it is pointless to anchor it again. Change-Id: If470179d63ae7ca2e7f137c0f403ec5bb5be8aaf Task-number: QTBUG-81396 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QResource: Add API to get the decompressed contentThiago Macieira2020-01-152-63/+158
| | | | | | | | | [ChangeLog][QtCore][QResource] Added uncompressedSize() and uncompressedData(), which will perform any required decompression on the data, prior to returning (unlike data() and size()). Change-Id: Ief874765cd7b43798de3fffd15aa053bc505dcb1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-159-24/+33
|\ | | | | | | Change-Id: I8dbcf23835d52d3aa7d018ed250814d60c68aa83
| * Doc: Correct non-link related qdoc compilation errorsNico Vertriest2020-01-145-6/+15
| | | | | | | | | | | | Task-number: QTBUG-79824 Change-Id: I94dc566c9fb11bc8c598c0d5c043b6f388ebdc80 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * Do fewer calendrical calculations in QDateTimeParser::setDigit()Edward Welbourne2020-01-141-15/+14
| | | | | | | | | | | | | | | | | | | | | | It was calling a QDate's year(), month() and day() methods, each of which repeats most of the same calendrical calculations; and the same results can be obtained from the calendar's partsFromDate() all in one go. This also reduces the number of local variables needed. Change-Id: I8f84e66a5f677f55cb2113c56ebbdf7c2517e828 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Doc: Don't document QTextStreamManipulatorPaul Wicking2020-01-131-1/+1
| | | | | | | | | | | | Fixes: QTBUG-81002 Change-Id: Ic7d0516a25a8a6e63e1a305ca87498948d41013c Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * ICC compile-fix for __builtin_add_overflow()'s parameter typeEdward Welbourne2020-01-131-1/+2
| | | | | | | | | | | | | | | | Based on Glen Johnson's patch, but rearranged to avoid repetition. Fixes: QTBUG-81248 Change-Id: I9c23ab233ebd5514bc05fd155999597ada7295ef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * qglobal.h: remove non-ASCII quotes from commentThiago Macieira2020-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | Because MSVC warns. Added by me on commit. c496fee2a5b65fd1b0672923293db058486e350e Fixes: QTBUG-81310 Change-Id: I596aec77785a4e4e84d5fffd15e93a8e367e035e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2020-01-134-21/+30
|\ \
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-134-21/+30
| |\| | | | | | | | | | Change-Id: I50f70a789ab1438b40d4408be72c090fa00b801f
| | * Wasm: Support event loop wakeup from secondary threadsMorten Johan Sørvig2020-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Minimal fix for the missing wakeup issue, in leu of a new event loop implementation. So far, emscripten_async_run_in_main_runtime_thread_ looks to be our option for scheduling calls on the main thread. This function is available on emsdk 1.38.22 and higher. Requires making from QEventDispatcherUNIX::wakeUp() non-final. The future event dispatcher implementation will not inherit QEventDispatcherUNIX, so this is a temporary change. Fixes: QTBUG-75793 Task-number: QTBUG-76007 Change-Id: Ie6f6ee6f7674206fc0673a4fe866ac614432ab65 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
| | * QRegularExpression: minor doc fixesGiuseppe D'Angelo2020-01-121-2/+2
| | | | | | | | | | | | | | | | | | | | | Amends d24a1d4323e73400ef4ecca99e03ff0f41c60389 Change-Id: I108f85b174e21ef71bf269fb9f6725972e76f107 Reviewed-by: David Faure <david.faure@kdab.com>
| | * QString::isLower/isUpper: redo the implementationGiuseppe D'Angelo2020-01-111-18/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use QStringIterator rather than indexed loops. This fixes handling of non-BMP code points (which may be lower or uppercase, see the test). Change also the semantics of the functions, adopting Unicode §3.13 definitions: a string is lowercase/uppercase if it's equal to its own toLower/toUpper folding. As a side effect, empty strings are now correctly reported to be lowercase AND uppercase. [ChangeLog][Important Behavior Changes] The semantics of QString::isLower() and QString::isUpper() have been changed to match the Unicode specification. Now lowercase (resp. uppercase) strings are allowed to contain any character; a string is considered lowercase (resp. uppercase) if it's equal to its own toLower() (resp. toUpper()) folding. Previously, a non-letter character would make the string not lowercase nor uppercase, and the mere presence of an uppercase (resp. lowercase) letter would make isLower() (resp. isUpper()) return false, even if the letter wouldn't change under case folding. As a consequence, now empty strings are lowercase and uppercase. [ChangeLog][QtCore][QString] Fixed a number of bugs of QString::isLower() and QString::isUpper(). Empty strings are now correctly reported to be lowercase (resp. uppercase), and strings containing code points outside the BMP are now correctly handled. Note that the behavior of these functions has also been changed. Change-Id: Iba1398279a072399a9f21295fe75f6e414f3f813 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QFileSystemWatcher/win: watch also for attribute changes of directoriesChristian Ehrlicher2020-01-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The windows filesystemwatcher did not watch for attribute changes for directories (e.g. hidden flag) so it was not in sync with other backends. Fix it by adding FILE_NOTIFY_CHANGE_ATTRIBUTES to the watch flags when watching a directory. [ChangeLog][QtCore][QFileSystemWatcher] Fixed a bug that caused QFSW not to watch for attribute changes on Windows. Now it will correctly report when files and directories become hidden or unhidden, for example. Fixes: QTBUG-80545 Change-Id: I31767a0da899963e3940b4f5b36d1d581e6aa57c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Enforce that char16_t / char32_t are 16/32 bitsGiuseppe D'Angelo2020-01-121-1/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | The standard makes them as big as int_least16_t / 32_t, i.e. big enough to hold UTF-16 / UTF-32 code units. We're relying on them to be *exactly* 16/32 bit instead. Drive by: move the check that a char is 8 bits before saying that some other type is not its expected sizeof() * 8. Change-Id: Idbf3d33331667d417702d9dde221905bcfc4d021 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QProcess: use FFD_USE_FORK when the class is not QProcess itselfThiago Macieira2020-01-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user derived from QProcess, it's likely to override the setupChildProcess() virtual. Unlike fork(), the system calls for enhenced functionality (FreeBSD pdfork() and Linux's clone()) won't call pthread_atfork() callbacks and the environment in the child process could be inconsistent. Qt's own code is safe, but we can't make the same statement about users' code. So we err on the safe side for correctness and run the old, less safe implementation (thread-unsafe, subject to hijacking of the signal handler, etc.). Change-Id: Ia2aa807ffa8a4c798425fffd15d9703bd03f6f09 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-01-098-72/+120
|\| | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp Change-Id: I4780b25665672692b086ee92092e506c814642f2
| * Eliminate QLocale's default_number_options global staticEdward Welbourne2020-01-091-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | It had create()'s default number options when passed to create, so wasn't useful then; and otherwise shadowed the value held by the cached private for the default locale. Noticed in the course of adding an analogous global for the system locale. Drive-by - eliminated a redundant language != C check. Change-Id: I5601dc09188804c11dede5be460bfdd12b8152ce Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Improve QLocale method documentationEdward Welbourne2020-01-091-5/+25
| | | | | | | | | | | | | | | | | | Add missing \sa lines, clarify what the exponential character is and mention that C is an exception to the "no number options set". Change-Id: I13ca483a07738908640408e0ca512de31586cec9 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Add advance warning of change of return types coming in Qt6Edward Welbourne2020-01-092-4/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QLocale methods that report the fragments used in making up numbers all return QChar. A note dating from before Qt5 times warned that we need to change these to return QString (since we might need a surrogate pair to represent the relevant characters). Give advance warning in the documentation that this shall happen at Qt 6. [ChangeLog][QtCore][QLocale] decimalPoint(), groupSeparator(), percent(), zeroDigit(), negativeSign(), positiveSign() and exponential() still return QChar but shall be changed to return QString in Qt 6. Callers are encouraged to switch to QString early, exploiting the QString(QChar) constructor. Task-number: QTBUG-81053 Change-Id: Ia802c7665676ecf13669c6a6f173f2e70eac578e Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * Change getMacLocaleName() to return a QStringEdward Welbourne2020-01-091-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | Returning a QByteArray required doing a toUtf8() to a QString on one of its paths, which was promptly undone by its caller using fromUTf8(), since a QString was needed anyway. Drive-by - remove spurious default for parameter in method definition. Change-Id: I45f553d74cd0ba9dab25c439ba8291c00b7ceb5b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QObject: Replace more 0 and NULL with nullptrAndre Hartmann2020-01-092-46/+46
| | | | | | | | | | | | | | | | ... in docs, comments, and warnings. Also adopt some occurrences around there and in the snippets. Change-Id: Icc0aa0868cadd8ec2270dda794bf83cd7ab84160 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
| * Resolve a build error for ICC 19Inho Lee2020-01-091-2/+2
| | | | | | | | | | | | | | This argument name makes an error with "line 302:Type t = Undefined;" Change-Id: I5488ff02ab7c9f9391c17361da5e2aac2727a6a0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * ucstrncmp: Fix UBSan report of array overflowingThiago Macieira2020-01-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The expression "a + offset + N" will eventually calculate an address past the end of a, since we are comparing to end. That's undefined behavior. Instead, calculate end - a and compare that to offset + N. This commit subtracts "a" from both sides of the inequalities and swaps the two sides to make them obey Qt coding style. Testing with GCC 9 (which is the only one I care about) shows the compiler generates the same code. Fixes: QTBUG-81218 Change-Id: Id84da383373844f3a4b0fffd15e7c1ab904daccd Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * GCC: revoke constexpr before 5.0Giuseppe D'Angelo2020-01-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | It's causing build failures on GCC 4.9 due to our code hitting https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57694 (at least since de82d239f814cf2a717bea0defeee3732384e271). Task-number: QTBUG-80997 Change-Id: I80a9d1fcbf26d8c0bf514ddc7bdb86eb7173360f Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | Deprecate QJsonDocument methods for converting to/from JSON binarySona Kurazyan2020-01-092-4/+13
| | | | | | | | | | | | | | | | | | Also remove the example code for deprecated methods and use CBOR instead where it makes sense. Task-number: QTBUG-81068 Change-Id: Iffb7a4b3d7b16a1e485fc05b3ab2e2468e9e0718 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-071-1/+1
|\| | | | | | | Change-Id: I6c81e3cb6272adc5c3de2513792bd48604ff4dd0
| * Fix some issues of a clang-cl developer buildFriedemann Kleint2020-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - qeasingcurve.cpp: Add a cast, fixing: qeasingcurve.cpp(1515,25): error: implicit conversion between pointer-to-function and pointer-to-object is a Microsoft extension [-Werror,-Wmicrosoft-cast] - Disable copy and move of QMainWindowLayoutSeparatorHelper, fixing: qbasictimer.h(59,5): note: 'QBasicTimer' has been explicitly marked deprecated here QT_DEPRECATED_X("copy-construction is unsupported; use move-construction instead") Task-number: QTBUG-63512 Change-Id: I4d12a29cb1dcd68da9f9316c9e42992f218e6045 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2020-01-065-23/+13
|\ \
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-065-23/+13
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qvariant.h Change-Id: I8f3873e74b9795ac889e7c7ec5de2619bca92160
| | * Note that zh's "Chinese" is in fact MandarinEdward Welbourne2020-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-63457 Change-Id: If1e36c3b2230d8c45311add26c976843eb5b3d36 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * QVariant: Prefer direct conversion to QVariant{List,Map,Hash}Fabian Kosmale2020-01-031-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a type has both a converter to QVariantList and to QSequentialIterableImpl registered, we would have chosen the QSequentialIterableImpl version. In the case of types like QJSValue, this is more costly. With this change we therefore uses the direct conversion if it has been registered. The same applies to QAssociativeIterableImpl and QVariantHash/QVariantMap. Change-Id: I9c0b5068efe4bfbc5e0598a200e6db59201e9974 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Fix some qdoc warningsFriedemann Kleint2020-01-024-14/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/corelib/tools/qhash.cpp:2596: (qdoc) warning: clang found diagnostics parsing \fn template <class Key, class T> template <class InputIterator> QMultiHash::QMultiHash(InputIterator begin, InputIterator end) error: 'QMultiHash' is not a class, namespace, or enumeration src/corelib/kernel/qobject.cpp:4593: (qdoc) warning: Undocumented parameter 'EXPORT_MACRO' in QObject::Q_NAMESPACE_EXPORT src/corelib/global/qfloat16.cpp:129: (qdoc) warning: Cannot tie this documentation to anything src/corelib/text/qlocale.qdoc:1204: (qdoc) warning: Overrides a previous doc src/corelib/text/qlocale.qdoc:1187: (qdoc) warning: (The previous doc is here) src/network/kernel/qhostinfo.cpp:597: (qdoc) warning: clang found diagnostics parsing \fn QHostInfo(QHostInfo &&other) src/printsupport/dialogs/qabstractprintdialog.cpp:346: (qdoc) warning: clang found diagnostics parsing \fn int QAbstractPrintDialog::exec(): error: out-of-line definition of 'exec' does not match any declaration in 'QAbstractPrintDialog' src/testlib/qsignalspy.qdoc:101: (qdoc) warning: clang found diagnostics parsing \fn QSignalSpy(const QObject *obj, const QMetaMethod &signal): error: expected unqualified-id src/testlib/doc/src/qttest-best-practices.qdoc:28: (qdoc) warning: Can't link to 'Q_VERIFY2()' src/widgets/kernel/qactiongroup.cpp:291: (qdoc) warning: Undocumented parameter 'b' in QActionGroup::setExclusive() src/widgets/kernel/qactiongroup.cpp:305: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text src/widgets/kernel/qshortcut.cpp:542: (qdoc) warning: No such parameter 'context' in QShortcut::QShortcut() src/widgets/widgets/qdatetimeedit.cpp:632: (qdoc) warning: No such parameter 'minimumTime' in QDateTimeEdit::setTimeRange() src/widgets/widgets/qdatetimeedit.cpp:632: (qdoc) warning: No such parameter 'maximumTime' in QDateTimeEdit::setTimeRange() src/widgets/widgets/qdatetimeedit.cpp:632: (qdoc) warning: No such parameter 'less' in QDateTimeEdit::setTimeRange() Change-Id: I9799b5135e84c4d811674b2d114ef27315bc12df Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | QRegularExpression: make escape-like functions work on QStringViewGiuseppe D'Angelo2020-01-062-13/+55
|/ / | | | | | | | | | | | | | | | | | | | | They don't store the strings. [ChangeLog][QtCore][QRegularExpression] The escape(), wildcardToRegularExpression() and anchoredPattern() functions now have overloads taking a QStringView parameter. Change-Id: Icc66ba1201ef1f1064d9565900439e78912b675c Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* | Fix some qdoc warningsFriedemann Kleint2020-01-036-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/corelib/serialization/qjsonvalue.cpp:174: (qdoc) warning: No such parameter 'n' in QJsonValue::QJsonValue() ... examples/widgets/doc/src/icons.qdoc:584: (qdoc) warning: Command '\snippet (//! [24])' failed at end of file 'widgets/icons/mainwindow.cpp' src/corelib/text/qbytearray.cpp:5177: (qdoc) warning: clang found diagnostics parsing \fn QByteArray::FromBase64Result::operator QByteArray() const error: out-of-line definition of 'operator QByteArray' does not match any declaration in 'QByteArray::FromBase64Result' src/corelib/serialization/qjsonarray.cpp:178: (qdoc) warning: Overrides a previous doc src/corelib/serialization/qjsonarray.cpp:140: (qdoc) warning: (The previous doc is here) src/corelib/serialization/qjsonobject.cpp:1016: (qdoc) warning: clang found diagnostics parsing \fn QJsonValueRef QJsonObject::iterator::operator[](int j) const error: out-of-line definition of 'operator[]' does not match any declaration in 'QJsonObject::iterator' src/corelib/serialization/qjsonobject.cpp:1267: (qdoc) warning: clang found diagnostics parsing \fn QJsonValue QJsonObject::const_iterator::operator[](int j) const error: out-of-line definition of 'operator[]' does not match any declaration in 'QJsonObject::const_iterator' src/corelib/tools/qhash.cpp:2641: (qdoc) warning: Overrides a previous doc src/corelib/tools/qhash.cpp:1492: (qdoc) warning: (The previous doc is here) src/corelib/tools/qhash.cpp:2659: (qdoc) warning: Can't link to 'unit()' src/corelib/text/qchar.cpp:274: (qdoc) warning: Undocumented enum item 'Script_Sundanese' in QChar::Script src/corelib/text/qchar.cpp:274: (qdoc) warning: No such enum item 'Script_Sundaneseo' in QChar::Script src/network/ssl/qsslsocket.cpp:1514: (qdoc) warning: Can't link to 'QSslConfiguration::addDefaultCaCertificate()' src/widgets/widgets/qtabwidget.cpp:581: (qdoc) warning: Undocumented parameter 'visible' in QTabWidget::setTabVisible() Change-Id: I05c2a4884873850b684fa94036cd90db1a6e7726 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix parameter of QJsonObject::const_iterator operator-(const_iterator)Friedemann Kleint2020-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It used to be "iterator", causing a qdoc warning: src/corelib/serialization/qjsonobject.cpp:1405: (qdoc) warning: clang found diagnostics parsing \fn int QJsonObject::const_iterator::operator-(const_iterator other) const error: out-of-line definition of 'operator-' does not match any declaration in 'QJsonObject::const_iterator' Add a small test. Change-Id: Id65effffa720ed1e0fb0ee6937dcc4298f3ef363 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QIdentityProxyModel: implement moveRows / moveColumnsGiuseppe D'Angelo2020-01-022-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | It makes sense for it (instead of triggering the QAbstractItemModel base class implementation, which doesn't do anything). Safe to override virtuals in this case -- code calling the old version could not do anything useful, so at least new code gets those functions properly implemented for free. Change-Id: Iefe1ff25e15d877435e93ab28289ad2579616f72 Task-number: QTBUG-48076 Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-023-37/+76
|\| | | | | | | Change-Id: I7b6e6c687d8d60b4a54e6b9dada025ef66c53d96
| * QLocale: Support Indian number formattingTuomas Heimonen2019-12-302-12/+36
| | | | | | | | | | | | | | | | | | | | | | When QLocale::Country is set to QLocale::India numbers are written so that after first three from the right and then after every second will be comma. E.g. 10000000 is written as 1,00,00,000 Task-number: QTBUG-24301 Change-Id: Ic06241c127b0af1824104f94f7e2ce6e2058a070 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
| * QRegularExpression: adjust the error codes matching PCRE2 10.34Giuseppe D'Angelo2019-12-281-25/+40
| | | | | | | | | | | | Change-Id: I78ecda1bdc784b8d7a69a4927dbe3b0f08c1d907 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* | cborstreamwriter: Fix developer-build with clangRobert Loehning2019-12-302-3/+3
| | | | | | | | | | | | | | Both functions are unused which results in a build error. Change-Id: If7e7a47cd62b91fbfc5bbf5330825bbb341a734b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-276-37/+44
|\| | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/platforms/xcb/qxcbscreen.cpp src/widgets/accessible/qaccessiblewidget.cpp Change-Id: Ib3138e61ba7981610940509a7ff02ba2dd281bf0
| * QRegularExpression: improve docs about porting from QRegExpGiuseppe D'Angelo2019-12-241-0/+32
| | | | | | | | | | Change-Id: Ie5d737188977b0e4dc1070c2d7329d0ecb6a9308 Reviewed-by: David Faure <david.faure@kdab.com>
| * Unbreak developer build with clang-clFriedemann Kleint2019-12-201-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the macro definitions for Q_DECL_UNUSED_MEMBER along with a definition for Q_DECL_UNUSED from the scope excluding icc and cl into a separate one for plain clang and cl since the attributes work with clang-cl as well. Remove the check introduced in 9782938045c33b37fe0bbb6cdf00e406cd3d837e since it is assumed that all clang versions have the attribute now. Fixes: include\QtCore/../../src/corelib/io/qloggingcategory.h(87,32): error: private field 'd' is not used [-Werror,-Wunused-private-field] Q_DECL_UNUSED_MEMBER void *d; // reserved for future use ^ include\QtCore/../../src/corelib/io/qloggingcategory.h(108,31): error: private field 'placeholder' is not used [-Werror,-Wunused-private-field] Q_DECL_UNUSED_MEMBER bool placeholder[4]; // reserved for future use Task-number: QTBUG-63512 Change-Id: I651771b085408443bb02e96698a980170fcaeb6d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Don't have a "see also qrand" from qrandAlbert Astals Cid2019-12-191-1/+1
| | | | | | | | | | | | | | I guess what we wanted there was qsrand Change-Id: I8e18e76ae65abf9de231d51faa61cc9142ea2b98 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Doc: Add since versionPaul Wicking2019-12-191-0/+2
| | | | | | | | | | | | | | | | | | | | for QCursor::swap and QOperatingSystemVersion::currentType. Fixes: QTBUG-80854 Fixes: QTBUG-80891 Change-Id: Ia256fa0d3ad4665f44b933f5a4a8d4ee87e9fc13 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * Doc: Add since Qt 5.8 info for QResource::lastModified()Leena Miettinen2019-12-181-0/+2
| | | | | | | | | | | | Fixes: QTBUG-80856 Change-Id: I2f2b562ad2b262c6dfa236a43589129186589ed7 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * Doc: remove documented macros which were removed in Qt5Christian Ehrlicher2019-12-171-30/+0
| | | | | | | | | | | | | | | | Remove documentation about QMIN, QMAX and QABS - they were removed during Qt4 -> 5 porting. Change-Id: I24e12e4f2bba635ff412e73dd1d0134bbab5247a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Introduce QString(View)::isValidUtf16Giuseppe D'Angelo2019-12-205-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QString(View)s can be built or manipulated in ways that make them contain/refer to improperly encoded UTF-16 data. Problem is, we don't have public APIs to check whether a string contains valid UTF-16. This knowledge is precious if the string is to be fed in algorithms, regular expressions, etc. that expect validated input (e.g. QRegularExpression can be faster if it can assume valid UTF-16, otherwise it has to employ extra checks). Add a function that does the validation. [ChangeLog][QtCore][QStringView] Added QStringView::isValidUtf16. [ChangeLog][QtCore][QString] Added QString::isValidUtf16. Change-Id: Idd699183f6ec08013046c76c6a5a7c524b6c6fbc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Windows QPA: Allow the native Windows virtual keyboard to be disabledAndre de la Rocha2019-12-172-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | This change provides a way to disable the automatic showing of the native Windows on-screen virtual keyboard when a text editing widget is selected on a system without a physical keyboard, by enabling the new AA_MSWindowsDisableVirtualKeyboard application attribute, allowing applications to use a custom virtual keyboard implementation. Fixes: QTBUG-76088 Change-Id: Id76f9673a2e4081e5325662f3e3b4b102d133b9a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>