summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
Commit message (Collapse)AuthorAgeFilesLines
* doc: Fix several minor qdoc warningsMartin Smith2018-01-201-0/+6
| | | | | | | | | | | The fixes included undocumented enum values, which are now marked as omitted, adding a test for Q_CLANG_QDOC for a couple windows enum values, adding \fn commands for a pair of member functions in QLocale, and a \fn command for an obsolete function in QSqlError. Change-Id: I12a8ea7287039096b9cfe7870d2ab213a3d78dcf Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* doc: Fix all remaining non-link qdoc warningsMartin Smith2018-01-202-2/+16
| | | | | | | | | | | The fixes included adding missing '!' characters to qdoc comment markers, correct misspelled words, adding documentation for an anonymous enum type, and replacing Q_QDOC with Q_CLANG_QDOC. There remain 12 qdoc link warnings in QtBase. Change-Id: I00447722e6e029f5aed273b3cd571cef33c119b4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add rvalue overload of insert/prepend to QVarLengthArray and QVectorAllan Sandfeld Jensen2018-01-202-11/+105
| | | | | | | | | | | | | | | | | Improves performance and STL compatibility by adding rvalue versions of prepend and insert. [ChangeLog][QtCore][QVarLengthArray] Added rvalue overloads of prepend and insert. [ChangeLog][QtCore][QVector] Added rvalue overloads of prepend and insert. [ChangeLog][QtCore][QVarLengthArray] Can now contain movable but non-copyable types, such as std::unique_ptr. Change-Id: I6c946acc5b67502c91c52ac5dea67cedb1af93a5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't try (Any,Any,Any) before a partially-specified localeEdward Welbourne2018-01-191-32/+36
| | | | | | | | | | | | | | | | | We unconditionally tried Any-ing out various tags of a locale without checking the remainer weren't Any, which would get us the C locale in some cases where we might have done better. So check some retained tag isn't Any before Any-ing out any tag. In the process, add a separate variable for the ID with likely tags filled in, to distinguish it from the supplied localeId (thereby somewhat clarifying what's afoot) and save duplicating the construction of this. Task-number: QTBUG-64940 Change-Id: Ibd9f1aba6862434cf00fbf77ba00288ac9a50a3b Reviewed-by: Jason Erb (Suitable Technologies) <erb@suitabletech.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* doc: Add missing return types to \fn commands, fix mis-specified onesMartin Smith2018-01-186-12/+12
| | | | | | | | | | | This update corrects several qdoc warnings about undocumented parameters, which are actually caused when the return type is not included in the \fn command, or when the return type is mis-specified (includes static, or lacks needed template parameters). Change-Id: Ic49139b88424e93609fbd01bc0836436d13a8f9a Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QRingBuffer: replace some checks with assertsAlex Trotsenko2018-01-102-31/+36
| | | | | | | | To avoid the silent exits and potentially dangerous output values, the caller must supply the correct parameters on input. Change-Id: Ia9c56940adbf4ad34605a002dfc5c86b32c4658c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Micro-optimize QRingBuffer::free()Alex Trotsenko2018-01-091-1/+1
| | | | | | | | | Change the condition to strong equal, as 'bytes' was checked against wrong value on the start of the function. Change-Id: I4ec4768b9fff3292af233417c4a5862d72d4eeac Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* doc: Move use of Q_CLANG_QDOC that caused compile-time assertMartin Smith2018-01-091-1/+3
| | | | | | | | It caused a compile-time assert in clang that should not have occurred. It is now moved passed the assert macro. Change-Id: I8311992617de7837ca4604fcc3e5afb17dcda65d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QStringBuilder: add support for QStringViewMarc Mutz2018-01-082-1/+15
| | | | | | | | | [ChangeLog][QtCore][QStringBuilder] Added support for QStringView. Change-Id: I5b6803397b107ef69d198a935b3ba4339ac95087 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QStringBuilder: add support for char16_t{,*,[]}Marc Mutz2018-01-082-1/+54
| | | | | | | | | | [ChangeLog][QtCore][QStringBuilder] Added support for char16_t characters and strings. Change-Id: Iee727f07226f2a326ae0df28d44930336cd8f71e Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QtCore: Raise minimum supported MSVC version to 2015Friedemann Kleint2018-01-088-16/+8
| | | | | | | | Remove code for older versions and streamline #ifdefs. Task-number: QTBUG-51673 Change-Id: I211703189ff12f827d94914093369736b6e65d4a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* doc: Correct remaining qdoc warnings in qchar.h and qchar.cppMartin Smith2018-01-062-1/+13
| | | | | | | | | Several enum values had to be given \value statements, and a member function only visible for Windows had to become visible to clang-qdoc. Change-Id: I47fbbcf9c5e4333abd13a041ce8fee2c13f9541d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Correct remaining qdoc warnings in QStringViewMartin Smith2018-01-052-11/+18
| | | | | | | | Added missing template clause to \fn commands required by clang-qdoc. Changed a few Q_QDOC macros to Q_CLANG_QDOC. Change-Id: I20e6855b13df6384b471fc2bb5de27b0e3b44d1b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Correct remaining qdoc warnings in qstring.cppMartin Smith2018-01-051-13/+17
| | | | | | | | | | | Added missing template clause to \fn commands required by clang-qdoc. Removed several obsolete \sa targets. Added a few missing return types to \fn commands. Also changed a } to ] in a \fn command in qrandom.cpp. Change-Id: I0f004a1e57507ff5fb035e822ca8b1baa7faad9b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Correct remaining qdoc warnings in qstack.cppMartin Smith2018-01-051-5/+5
| | | | | | | Added missing template clause to \fn commands required by clang-qdoc. Change-Id: Id2cb480a0780025276639c38f595cb21264bd8cb Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Correct remaining qdoc warnings in a few filesMartin Smith2018-01-053-6/+6
| | | | | | | | Added missing template clause to \fn commands required by clang-qdoc in qsharedpointer.cpp, qscopedpointer.cpp, and qstringbuilder.cpp. Change-Id: Ifca5b81db96e678a53e40080d351c69f14db604a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Correct remaining qdoc warnings in qscopedvaluerollback.cppMartin Smith2018-01-051-4/+4
| | | | | | | Added missing template clause to \fn commands required by clang-qdoc. Change-Id: Ia7bc899153cccedc28e5083d658f427d322acab7 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Correct remaining qdoc warnings in qbytearraymatcher.cppMartin Smith2018-01-041-6/+6
| | | | | | | clang required adding template clauses to a few \fn commands. Change-Id: I5877c7bebd6a8a7b2630addb656d32e6f2043cf1 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Correct remaining qdoc warnings in qqueue.cppMartin Smith2018-01-041-5/+5
| | | | | | | Added missing template clause to \fn commands required by clang-qdoc. Change-Id: I53fe0b2c862cb053119ceab543dacbc4b20466df Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Correct remaining qdoc warnings in qhash.cppMartin Smith2018-01-041-5/+17
| | | | | | | | Added template clause to several qHash() functions and created a \typedef comment for QHash::const_key_value_iterator. Change-Id: Id56191f69bf9f36e606101e46bf1dfa528d88e09 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Remove duplicate qdoc comments in qiterator.qdocMartin Smith2018-01-041-120/+0
| | | | | | | | | The incorrect ones had been removed already, but they reappeared after a branch merge, I think. This update removes the old ones again. Change-Id: Ief971819651fa3517f374d9f226c68bf7f015cb0 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Update Text segmentation and line break data to Unicode 10.0Lars Knoll2018-01-033-5664/+5797
| | | | | | | | Also adjusted the text segmentation and line break algorithms so that they can handle the new data, and pass the test suite. Change-Id: Ib727fd80003e34e96458d7a681996de3fa3691e7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Update most Unicode data to version 10.0Lars Knoll2018-01-033-5605/+6143
| | | | | | | | | | The text segmentation data is not being updated in this change, as it requires additional code changes. Updating those will come in a follow-up commit. Change-Id: I5d6b6bc96044e8dd0c25cf6f79756e7f68bf6e7c Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Update QString::isRightToLeft() to take directional hints into accountLars Knoll2018-01-034-3/+44
| | | | | | | | | | | | | | | | | | | | | | Make sure we properly handle both directional embeddings as well as directional isolates to determine the direction of the string. According to the latest version of the Unicode bidi algorithm, parts of the string contained inside an directional isolate is to be ignored when determining the paragraph direction. Embedding markers themselves are to be ignored as well, but not the characters inside an explicit directional embedding or override. This is also some required pre-work to get our BiDi algorithm updated to the latest version of the standard. Move the implementation to QStringView and implement the methods in QString and QStringRef through that implementation. Task-number: QTBUG-57743 Change-Id: I7f24e09198e22d6359c6534c9ae40a904e94c46e Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-0215-115/+148
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| * Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-12-304-26/+34
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/win32-g++/qmake.conf src/corelib/global/qglobal_p.h src/corelib/global/qoperatingsystemversion_p.h src/corelib/io/qfilesystemengine_win.cpp src/network/bearer/qbearerengine.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qfusionstyle.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
| | * QMap: fix another UB (invalid cast) relating to QMap's endThiago Macieira2017-12-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like in commit 75cdf654bcc192ba73a8834e507583a59140e7e4, we use the pointer value of the QMap header (which is of type QMapNodeBase) as a sentinel. It's never dereferenced. In that commit, the issue was calling end() directly; in here, it happens when iterating forward from any element, which means nextNode() can reach back to the header. However, using static_cast is wrong, so we use reinterpret_cast. Change-Id: I39332e0a867442d58082fffd15040317704a87ce Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Fix a bug in the generation of the Unicode joining property dataLars Knoll2017-12-132-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code that was supposed to initialize the joining property of characters to the correct defaults was actually applied after reading in the data from the Unicode file, and was in a couple of cases overwriting explicitly specified data in ArabicShaping.txt Task-number: QTBUG-63191 Change-Id: Ie35261039b2211a827322ca11afacd9555ccefc7 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| | * QString: fix documentation of NUL-termination of unicode(), data(), constData()Marc Mutz2017-12-131-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (or lack thereof). * `QString::utf16()` reallocates if `*this` has been constructed using `fromRawData()`. * `QString::data()` ensures a writable string, so will detach from raw data. * `QString::unicode()`, `constData()`, and `data() const` do not. They just return `QStringData::data()`, which may point to raw, non-NUL-terminated data. These functions can therefore not possibly have the same behavior, but were documented the same. Fix. Also drop the discussion of operator[](size()), as that, too, was not correct, and anyone who indexes with op[] beyond size() - 1 should not rely on proper behavior. [ChangeLog][QtCore][QString] QString::unicode(), constData() and `data() const` do not return a NUL-terminated string. This was true before, but the documentation claimed the opposite. Change-Id: I1437f57cd02bdf80264e8559608b46aa749c23a8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Merge remote-tracking branch 'origin/5.10.0' into 5.10Liang Qi2017-12-089-42/+47
| |\ \ | | | | | | | | | | | | Change-Id: I6dcf85067ec226136c207ea69ca9d66736c84db5
| | * | Improve readability of code that uses the Qt signed size typev5.10.0-rc2Simon Hausmann2017-11-287-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the container BoF session at the Qt Contributor Summit 2017 the name of the signed size type became a subject of discussion in the context of readability of code using this type and the intention of using it for all length, size and count properties throughout the entire framework in future versions of Qt. This change proposes qsizetype as new name for qssize_t to emphasize the readability of code over POSIX compatibility, the former being potentially more relevant than the latter to the majority of users of Qt. Change-Id: Idb99cb4a8782703c054fa463a9e5af23a918e7f3 Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: David Faure <david.faure@kdab.com>
| | * | Merge 5.10 into 5.10.0Oswald Buddenhagen2017-11-203-28/+3
| | |\ \ | | | | | | | | | | | | | | | Change-Id: Ibfbaa8ef89cf45b87a2c65f1da4a708e5464f259
| | * | | QDateTime: Move the deprecation marker to Qt 5.10Thiago Macieira2017-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit b6a61211280aa6ddd56f107a9795c9824b7702b0 went into dev at around the time of the 5.10 branching. We apparently got the side of it wrong. Change-Id: Ic632b4163d784b83951cfffd14f67bec63fbc795 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | | Special-case parsing of Zulu time-zone in date-timesEdward Welbourne2017-11-141-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When parsing a date-time's zone, a stray Z denotes UTC (a.k.a. Zulu time), despite not being a valid name for the zone. Clients parsing such date strings had to treat the Z as a literal, rather than a zone-ID, but then they got back a LocalTime instead of the UTC the string actually described. So teach QTimeZoneParser to handle this special case and adapt an existing test (that used a time ending in Z, but had to treat it as a local time) to check this works. [ChangeLog][QtCore][QDateTime] When parsing a time-zone, "Z" is now recognized as an alias for UTC. Change-Id: Ib6aa2d8ea2dc6b2da526b39aec74dbc007f90fd8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | | fixup oversight in QStringView::lengthHelperPointerEric Lemanissier2017-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | amends 3b61cd6ad738b8479bf216dcf736bb935e8812df Change-Id: I3afa008299b8fcccae8943e545b536a68b17bd1a Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-12-052-18/+19
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/ios/quiview.mm Change-Id: I88384c70047391c75d9ff166c8d9881ff6751dbf
| | * | | [doc] Document QString{,Ref}::split() behavior with empty 'sep'Marc Mutz2017-11-291-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We actually test for this already in tst_QString::split(). Change-Id: I35fe8f90900ea9c8e6251facdb3326b9226348d0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | | Fix aliasing problem in QVector::removeAll()Marc Mutz2017-11-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since removeAll() takes its argument by cref, if passing a reference to an element of the container to removeAll(), the element may be deleted (overwritten) by anyother value, leading to UB. Add a test that actually happens to fail for me without the patch, even though that might not be guaranteed (we may invoke UB). Change-Id: If8c795113aeb515f4a9bdf1e072395b932295667 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | | Fix qdoc warnings for 5.10Friedemann Kleint2017-12-042-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/corelib/global/qrandom.cpp:915: warning: Cannot find 'bounded(...)' in '\fn' qreal QRandomGenerator::bounded(qreal highest) src/corelib/tools/qstring.cpp:774: warning: Command '\snippet (//! [qCompareStrings-QSV-QSV])' failed at end of file 'qstring/main.cpp' src/corelib/tools/qstring.cpp:5281: warning: Cannot find 'qTrimmed(...)' in '\fn' QStringView qTrimmed(QStringView s) src/corelib/tools/qstring.cpp:5281: warning: Cannot find 'qTrimmed(...)' in '\fn' QLatin1String qTrimmed(QLatin1String s) src/corelib/global/qrandom.h:171: warning: No documentation for 'QRandomGenerator::System' src/corelib/global/qrandom.h:105: warning: No documentation for 'QRandomGenerator::bounded(double highest)' src/corelib/global/qrandom.h:84: warning: No documentation for 'QRandomGenerator::generate64()' src/corelib/global/qrandom.h:77: warning: No documentation for 'QRandomGenerator::generate()' src/corelib/global/qrandom.cpp:799: warning: No such parameter 'sseq' in QRandomGenerator::seed() src/corelib/global/qrandom.cpp:1096: warning: Can't link to 'operator()()' src/corelib/tools/qstring.cpp:8982: warning: Can't link to 'qStartsWith()' src/corelib/tools/qstring.cpp:9203: warning: Can't link to 'qTrimmed()' src/corelib/tools/qstring.cpp:4798: warning: Can't link to 'qConvertToLatin1()' src/corelib/tools/qstring.cpp:4825: warning: Can't link to 'qConvertToLocal8Bit()' src/corelib/tools/qstring.cpp:4928: warning: Can't link to 'qConvertToUcs4()' src/corelib/tools/qstring.cpp:4884: warning: Can't link to 'qConvertToUtf8()' Change-Id: I5c7c89b230d3d1de8a679c10833319a470a44e80 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | | Condition QDateTimeParser's time-zone parsing on QT_CONFIG(timezone)Edward Welbourne2017-11-303-13/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was missing some #if-ery it needed. Change-Id: Ibc12f4a9ee35acb64a39a1c7a15d2934b5710dc0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | | QRingBuffer: avoid reallocations of the dataAlex Trotsenko2017-12-302-109/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since its initial implementation, QRingBuffer had the following fragilities in the architecture: - it does not guarantee validity of the pointers, if new data will be appended. As an example, passing an address of the QRingBuffer chunk as a parameter to the WriteFileEx() function on Windows requires the stability of the pointer. So, we can't add new data to the QRingBuffer until the overlapped operation completed (related issues were fixed for QWindowsPipeWriter and QSerialPort in 5.6 branch by introducing an intermediate byte array); - inefficient reallocations in reserve(), if a shared chunk was inserted in the queue (we can get a reallocation in the place where we don't expect it: char *writePtr = buffers.last().data() + tail; <- line #133 ). Proposed solution is to avoid reallocation by allocating a new block instead. That was accomplished by introducing a QRingChunk class which operates on a fixed byte array and implements head/tail pointers strategy for each individual buffer in the queue. So, QRingBuffer is no longer dependent on QByteArray's internal shrink/growth algorithms. Change-Id: I05abab0ad78e22e4815a196037dfc6eff85325d1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | | Micro-optimize QRingBuffer::chop()Alex Trotsenko2017-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the condition to strong equal, as 'bytes' was checked against wrong value on the start of the function. Change-Id: Iebd785665ac7bd0941ba4ffd3f315b12efc6ce0b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | | Add template text to \fn commands in QScopedPointerMartin Smith2017-12-081-22/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The \fn commands were not recognized by clang-qdoc because the template stuff was missing from the \fn commands. This update adds the correct template text and parameters. Change-Id: If45465880933174f1481a8be292474be191cfd45 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | | | | Deduplicate a common check for legacy codesEdward Welbourne2017-12-081-25/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All of QLocalePrivate::codeToLanguage()'s legacy codes were two-letter, so duplicated a "third letter is 0" check; pulling it out in front of them all will get any three-letter code more promptly to the final fall-back, while saving the two-letter codes repetition of the check. Change-Id: I8ee81a526adaa7b24c11c1de7a1750d87deb5fb3 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | | | | QVector: drop QRegion friendship: it's not neededMarc Mutz2017-12-061-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I don't know when it ceased to be needed, but QRegion no longer does anything fancy with QVector. Change-Id: I1bdfefc84724c379fab76dada35575666144df12 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | | doc: Add missing template parameters to \fn commandsMartin Smith2017-12-062-151/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This update corrects many qdoc warnings in qsharedpointer.cpp and qshareddata.cpp caused by incomplete \fn commands. Template stuff was added to the \fn commands. Change-Id: Ic10bcf04477d5f3d5380aeb1e58050a88f03005a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | | | doc: Ensure clangqdoc sees declarationsMartin Smith2017-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This update corrects several uses of #ifdef macros that needed updating because qdoc now uses clang to parse header files. Change-Id: I285efa4629a1a5d5bcbfaf701eeafbd0e9f1e43e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | | | doc: Add class qualifiers to parameter typesMartin Smith2017-12-061-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change supplies several missing class qualifiers for parameter types and function return types. Change-Id: I569026e4da0948902fcc13557003d3748b85dd82 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | | | doc: Fix three "Cannot tie" errorsMartin Smith2017-12-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two of the three functions were for functions that should not be documented. The third was a function protected by #ifndef Q_OS_DARWIN, which required a test of Q_CLANG_QDOC in the header and cpp files. Change-Id: Id2ab3e4f2ea896dc628a622de2e80a19c18eb9fe Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | | | doc: Fix qdoc errors for \fn commands in algorithm functionsMartin Smith2017-12-021-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change updates the \fn commands in qalgorithms.qdoc. clangqdoc now parses these \fn commands and expects to see all the template stuff in the signatures. Change-Id: Id9492bf80eca494eb2b5b8d7364b8485ed1a047e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>