summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qbytearray.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QtCore: Raise minimum supported MSVC version to 2015Friedemann Kleint2018-01-081-2/+2
| | | | | | | | Remove code for older versions and streamline #ifdefs. Task-number: QTBUG-51673 Change-Id: I211703189ff12f827d94914093369736b6e65d4a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix some qdoc warningsFriedemann Kleint2017-08-021-8/+7
| | | | | | | | | | qtbase/src/corelib/io/qfsfileengine.cpp:926: warning: Overrides a previous doc qtbase/src/corelib/io/qfsfileengine.cpp:527: warning: (The previous doc is here) qtbase/src/corelib/tools/qbytearray.cpp:689: warning: Cannot tie this documentation to anything Change-Id: Ie7009f565a11a01859ccd0488ddeebe1b953305d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.9' into devGabriel de Dietrich2017-07-131-12/+12
|\ | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmainwindowlayout.cpp Change-Id: I306b4f5ad11bceb336c9091241b468d455fe6bb6
| * Doc: Improve documentation about append, prependKai Koehne2017-07-131-12/+12
| | | | | | | | | | | | | | | | | | The references to the this pointer look somewhat alien in the documentation, because it isn't part of the signature. Rather make the relationship explicit. Change-Id: I6de516e165ea6e9c4ee2898836e9490fbaf4545c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-041-0/+4
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/util/util.pri tests/auto/corelib/thread/qthread/qthread.pro tests/auto/corelib/thread/qthread/tst_qthread.cpp Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
| * Doc: Add note about fromPercentEncoding's behavior on invalid inputMårten Nordheim2017-06-291-0/+4
| | | | | | | | | | | | | | | | | | Add a note saying that invalid input to QByteArray::fromPercentEncoding and QUrl::fromPercentEncoding will produce invalid output, and provide an example. Change-Id: Icc68f59c23cf199640b646cd4a6ca8e4808a3f71 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-071-0/+22
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
| * QStringLiteral/QByteArrayLiteral: fix/add documentationGiuseppe D'Angelo2017-06-011-0/+22
| | | | | | | | | | | | | | | | | | Various editorial fixes. Also, in 5.9 QStringLiteral does not fall back to fromUtf8 any longer, but guarantees a compile-time construction. Change-Id: Ida4698cf8e32a6e3de97b2c16b997fc9630c9db9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Docs: Fix some warningsFriedemann Kleint2017-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/src/corelib/tools/qbytearray.cpp:3043: warning: Can't link to '.' qtbase/src/corelib/tools/qstring.cpp:4522: warning: Can't link to '.' qtbase/src/corelib/tools/qstring.cpp:10331: warning: Can't link to '.' qtbase/src/network/access/qhstspolicy.cpp:105: warning: Undocumented parameter 'flags' in QHstsPolicy::QHstsPolicy() qtbase/src/network/access/qhstspolicy.cpp:105: warning: No such parameter 'includeSubDomains' in QHstsPolicy::QHstsPolicy() qtbase/src/network/access/qnetworkaccessmanager.cpp:732: warning: Undocumented parameter 'knownHosts' in QNetworkAccessManager::addStrictTransportSecurityHosts() qtbase/src/network/access/qnetworkreply.cpp:307: warning: Can't link to 'QNetworkRequest::UserVerifiedRedirectsPolicy' qtbase/src/gui/painting/qpagedpaintdevice.cpp:246: warning: No such enum item 'PdfFormat_1_4' in QPagedPaintDevice::PdfVersion qtbase/src/gui/painting/qpagedpaintdevice.cpp:246: warning: Undocumented enum item 'PdfVersion_1_4' in QPagedPaintDevice::PdfVersion qtbase/src/gui/painting/qpagedpaintdevice.cpp:246: warning: Undocumented enum item 'PdfVersion_A1b' in QPagedPaintDevice::PdfVersion qtbase/src/gui/painting/qpagedpaintdevice.cpp:246: warning: No such enum item 'PdfFormat_A1b' in QPagedPaintDevice::PdfVersion qtbase/src/widgets/kernel/qopenglwidget.cpp:1076: warning: Undocumented parameter 'texFormat' in QOpenGLWidget::setTextureFormat() qtbase/src/corelib/tools/qversionnumber.cpp:460: warning: Command '\snippet (//! [3-latin1-1])' failed at end of file 'qversionnumber/main.cpp' Change-Id: Icc163dd8d94cee7e0858040bf8241a3c1f1d221d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | QByteArray, QString, QStringRef: Add chopped()Marc Mutz2017-04-181-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have two functions to get a substring without doing some calculations involving size(): - mid(p): mid(p, size() - p) - right(n) : mid(size() - n, n) (left does not involve size(), so isn't in that set). What was missing was a name for - f(n): mid(0, size() - n) As an action, it's called chop(), so call the transformation version chopped(). I made chopped(n), n < 0 or n > size(), undefined, because QString(Ref) ::left() is broken[1], while the QByteArray implementation is not. This is the only way to get consistent behavior among the three classes. I's also the correct thing to do. [1] instead of returning the empty string for negative indexes, it returns the whole string. [ChangeLog][QtCore][QString/QStringRef/QByteArray] Added chopped(n), a const version of chop(n). Change-Id: I6c2c5b16e0060fa924ced5860f21f2d0f23bd023 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
* | Array-backed containers: add shrink_to_fit for STL compatibilityGiuseppe D'Angelo2017-04-121-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Side note: QHash has squeeze(), but there's no shrink_to_fit on std::unordered_map. [ChangeLog][QtCore][QByteArray] Added shrink_to_fit(). [ChangeLog][QtCore][QString] Added shrink_to_fit(). [ChangeLog][QtCore][QVarLengthArray] Added shrink_to_fit(). [ChangeLog][QtCore][QVector] Added shrink_to_fit(). Change-Id: Ifd7d28c9bed70727be6308f0191a188201784f61 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Add front()/back() to QString, QStringRef, QByteArray and QLatin1StringMarc Mutz2017-04-071-0/+60
|/ | | | | | | | | | | These STL-compatibility functions are present on our generic containers, but not on the string classes. [ChangeLog][QtCore][QString/QStringRef/QByteArray/QLatin1String] Added front() and back() for STL compatibility. Change-Id: I536019396b319abd1e2daf9c64ebab4e7a35b334 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Extend qChecksum calculationLars Schmertmann2016-12-251-4/+36
| | | | | | | | | | | | | | ISO 14443-3 is for nfc communication and uses 2 different checksums. The existing one is from ISO 3309 and the other one is from ITU-V.41. Both are needed to implement an own transport layer defined in ISO 14443-4 to allow nfc commands with a length above 250 byte independent from the smartphone. This change will avoid code duplication in QNearFieldTarget. The private function qNfcChecksum is a copy of qChecksum. Change-Id: I790ffec8e2ea46f88b2db6f48b64fdcb140e7b70 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QByteArray: Overload toHex() with separator characterAndre Hartmann2016-12-241-4/+33
| | | | | | | | | | | | | The separator character is inserted in the resulting array after every byte and is useful for MAC address output like 01:23:45:ab:cd:ef, Hash fingerprints, or low level data debug output. [ChangeLog][QtCore][QByteArray] Added toHex() overload to insert a separator character between the hex bytes. Change-Id: Ibe436094badc02f3ade7751aa8b5d690599941d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-09-151-3/+4
|\ | | | | | | | | | | | | | | | | Conflicts: configure.json mkspecs/macx-tvos-clang/qmake.conf mkspecs/macx-watchos-clang/qmake.conf Change-Id: Iaf32339ace59dff9ed344972472744c55d75025c
| * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-051-3/+4
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_common.prf src/plugins/platforms/windows/qwindowsdialoghelpers.cpp Change-Id: I03b92b6b89ecc5a8db7c95f04ebb92ed198098a8
| | * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-051-3/+4
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/testlib/selftests/generate_expected_output.py Change-Id: If856162abf9a24ae2c9946d336a7d1da03520fa7
| | | * qstrncpy: don't call strncpy_s with invalid parametersMarc Mutz2016-09-031-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to https://msdn.microsoft.com/en-us/library/5dae5d43.aspx, strncpy_s' second argument must not be 0: > If strDest or strSource is NULL, *or numberOfElements is 0*, the > invalid parameter handler is invoked. Move the existing check for len > 0 up to protect the strncpy_s call, too. Change-Id: I70d339ea60d4b76f3038b2e4e4756f6590a9bd31 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | QByteArray: Clean up qUncompressThiago Macieira2016-09-071-36/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qUncompress has code to deal with OOM situations without crashing. This code is highly convoluted. It achieves that by realloc()ing QByteArray's buffer. Instead, let's operate on QByteArray::Data and use RAII to manage the lifetime of the buffer. Change-Id: I1cc7601489634e96833cfffd145688433b76f447 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | | Add QArrayData::reallocateUnaligned for QString and QByteArrayThiago Macieira2016-09-071-12/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function reallocates a QArrayData block with realloc() but, as the name says, it's only valid for types that do not increase the alignment requirements. I don't think it's worth doing this for types that do increase the alignment requirements, since we don't know the alignment of the pointer returned by realloc(). If the new pointer modulo the alignment is different from the old pointer modulo the alignment, we'd have to memmove data around, which would be quite inefficient (realloc might have memcpy'ed already and this memmove would copy data to nearby). This function is intended to be used especially in QString and QByteArray, which were already using realloc() on pointers created by QArrayData::allocate. Change-Id: I45b61247db2e84797ad794c1049c47a09c1fb29a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-131-10/+102
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config_help.txt configure mkspecs/features/uikit/sdk.prf src/corelib/global/qhooks.cpp src/corelib/io/qfilesystemwatcher.cpp src/corelib/io/qlockfile_unix.cpp src/corelib/tools/qalgorithms.h src/gui/kernel/qwindowsysteminterface.h src/gui/text/qtextdocument_p.cpp src/network/access/access.pri src/network/access/qnetworkaccessmanager.cpp src/network/access/qnetworkreplynsurlconnectionimpl.mm src/src.pro src/testlib/qtestcase.cpp src/widgets/kernel/qwidgetbackingstore_p.h src/widgets/styles/qwindowscestyle.cpp src/widgets/styles/qwindowsmobilestyle.cpp tests/auto/corelib/io/qdiriterator/qdiriterator.pro tests/auto/corelib/io/qfileinfo/qfileinfo.pro tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp tools/configure/configureapp.cpp Change-Id: Ibf7fb9c8cf263a810ade82f821345d0725c57c67
| * | Replace qAllocMore with a pair of more useful functionsThiago Macieira2016-06-091-10/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first is "exact", not "more": qCalculateBlockSize. It ensures that there's no overflow in multiplying, adding the header size or when converting back to an int. The second is the replacement for qAllocMore: it calculates the block size like the first, but increases the block size to accommodate future appends. The number of elements that fit in the block is also returned. Task-number: QTBUG-41230 Change-Id: I52dd43c12685407bb9a6ffff13f5da09f816e667 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | darwin: Move conversion function documentation to function definitionTor Arne Vestbø2016-05-031-85/+0
|/ / | | | | | | | | | | | | It's easier to maintain the function and the docs when they live together. Change-Id: I1e047b4ac1eb61a36849188da560dd899e05509f Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Updated license headersJani Heikkinen2016-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2015-12-081-2/+2
|\| | | | | | | Change-Id: I2532c7f7db5e6cc3ef09753d886279816dd662b2
| * Doc: corrected statement about QByteArray::clearNico Vertriest2015-12-031-2/+2
| | | | | | | | | | | | Task-number: QTBUG-45096 Change-Id: I30a49044690c2f0ef5bf6ee80712e1395c60ac77 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | Add flags to omit/reject padding in scientific notation exponentsUlf Hermann2015-11-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The EcmaScript format for printing doubles in exponent form differs from Qt's format only in this aspect. EcmaScript explicitly prohibits leading zeroes in exponents. It is thus worthwhile to add those flags in order to be able to generate and parse doubles in compliance with EcmaScript. [ChangeLog][QtCore][QLocale] Additional flags in QLocale::NumberOption allow generating and parsing doubles in EcmaScript compliant format. Change-Id: Ia7b82c2e67bb8b80bd890014ff5cd4563faf2a03 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Replace qdtoa and qstrtod implementation by a 3rdparty libraryUlf Hermann2015-11-021-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also fixes the underlying cause of QTBUG-44039 and QTBUG-43885. You can choose between system, qt, and no libdouble-conversion support. If you choose "no", snprintf_l and sscanf_l will be used. By default, system double conversion is used if the system provides a double-conversion library. Otherwise the bundled libdouble-conversion is built. sscanf_l and snprintf_l are not used by default as the planned "shortest" conversion mode to produce the shortest possible string will give less precise results when implemented with snprintf_l. Change-Id: I8ca08a0fca5c54cf7009e48e771385614f6aa031 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-141-2/+2
|\| | | | | | | | | | | | | | | | | Conflicts: tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro Change-Id: Ia93ce500349d96a2fbf0b4a37b73f088cc505c6e
| * Fix sign-extensionThiago Macieira2015-09-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If data[0] were > 128 (that is, if the full size, encoded in big endian were > 2 GB), the result of the OR chain would be a negative int (due to C integer promotion rules). We're shifting into the sign bit, which is either implementation-defined behavior or, worse, undefined behavior. This negative number is then sign-extended to ulong (64-bit on 64-bit platforms), which then becomes a big number. This code was probably written with only 32-bit in mind, where there would be no size extension (sign or otherwise). This isn't too bad because there's a size check for the max size of QByteArray a few lines below, but we can fix it, so let's do it. Found by Coverity, CID 22530. Change-Id: I42e7ef1a481840699a8dffff1407ea6c22e1a0ec Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-09-251-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/io.pri src/corelib/io/qdatastream.cpp src/corelib/io/qdatastream.h src/network/socket/qabstractsocket.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h src/widgets/styles/qgtkstyle.cpp tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro tests/auto/dbus/qdbusconnection/qdbusconnection.pro tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp Change-Id: I347549a024eb5bfa986699e0a11f96cc55c797a7
| * Fix qdoc warning by documenting function argumentLouai Al-Khanji2015-08-251-2/+2
| | | | | | | | | | Change-Id: I3d80af0b1226fbe601619420dbb35106bb3d4eec Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | QByteArray: Add append/prepend/insert overloadKevin Funk2015-08-271-0/+46
|/ | | | | | | | | | Use-case is fast insertion of copies of a character, avoiding any temporary heap allocations Change-Id: Ie5517d88429fbd4c58dbe5729de7c468d5d9a279 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Sérgio Martins <sergio.martins@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-08-061-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/global/qt-cpp-defines.qdocconf src/3rdparty/forkfd/forkfd.c src/corelib/codecs/qtextcodec.cpp src/corelib/kernel/qmetatype.cpp src/corelib/tools/qset.qdoc src/gui/accessible/qaccessible.cpp src/gui/image/qpixmapcache.cpp src/opengl/qgl.cpp src/tools/qdoc/generator.cpp src/widgets/kernel/qwidget.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
| * QtCore: Fix const correctness in old style castsThiago Macieira2015-07-201-4/+4
| | | | | | | | | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c8d4b2920a11fb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QByteArray: document {const_,}{reverse_,}iteratorMarc Mutz2015-07-181-2/+24
| | | | | | | | | | | | | | | | | | The reverse_ ones were missing, and the non-reverse ones were marked \internal. But why should they not be documented? Change-Id: I5ffbfc1def8dcac3f4a771883152ffbcca3d745d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QByteArray: add {const_,reverse_iterator}, {c,}r{begin,end}()Marc Mutz2015-07-071-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | Had to mark {,c,const}{begin,end}() inline, since they are, and mingw complains about inconsistent dllimport attributes. [ChangeLog][QtCore][QByteArray] Added rbegin(), crbegin(), rend(), crend(), and reverse_iterator and const_reverse_iterator typedefs. Task-number: QTBUG-25919 Change-Id: Id5aefb52635f029305135afcd99db0b036a7af82 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Unify QByteArray::MaxSize and MaxAllocSizeUlf Hermann2015-06-161-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have established the maximum size qAllocMore can deal with in commit 880986be2357a1f80827d038d770dc2f80300201 and we should use it. The maximum size for byte arrays is reduced by one byte as with the previous code we could make qAllocMore produce ((1 << 31) - extra) by passing (1 << 30). That is not a problem for qAllocMore itself (as long as extra > 0) but it's hard to verify that no related code casts the total sum back to signed int, which would overflow to -1. To make the compiler inline access to the maximum size, a private enum MaxByteArraySize is provided, which can be used in internal code. This fixes the merge of commits 880986be2357a1f80827d038d770dc2f80300201 and c70658d301e274c3aaa1fb6cebe2a5e56db12779 Change-Id: Idb04856f7c2e53ef383063e7555d3083020ff2b7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Check the maximum size of a QByteArray more preciselyAlex Trotsenko2015-05-111-3/+4
|/ | | | | | | | | Also document that the QByteArrray::MaxSize takes a trailing '\0' into account. Change-Id: I89e9a0d1a80a49b33efbac16ff7aa2a98f0e5670 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QByteArray: begin()/end() are not \internalMarc Mutz2015-04-071-8/+26
| | | | | | | Docs copied from corresponding QString functions. Change-Id: Ia2b0f0521780246d82003a1fda539c132823b294 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/xml/htmlinfo/simpleexample.html examples/xml/rsslisting/rsslisting.cpp qmake/generators/win32/msbuild_objectmodel.cpp src/3rdparty/harfbuzz-ng/src/hb-private.hh src/corelib/global/qlogging.cpp src/corelib/io/qstorageinfo_unix.cpp src/corelib/thread/qwaitcondition_unix.cpp src/gui/kernel/qguiapplication.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp src/testlib/doc/src/qt-webpages.qdoc tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
| * Fix links in plural words.Florian Bruhin2015-02-161-2/+2
| | | | | | | | | | | | | | | | In some documents, "{QObject}s" was used which didn't show up as link. This is fixed by using "\l{QObject}s" instead. Change-Id: I90dbd543790842b242a11f3f94a32d4273ebb38d Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* | Centralize use of __attribute__((noinline))Marc Mutz2015-01-291-6/+2
| | | | | | | | | | | | | | | | | | | | There are currently only two users, but I have patches in the pipeline which mark some other function noinline, so proavtively centralize the ifdef'ery involved. Change-Id: I1f02351fdc903d4e026089e12b8a976ed6a8d603 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QtCore: add some more Q_DECL_NOTHROWMarc Mutz2015-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | QtCore now builds with no -Wnoexcept warnings (that doesn't mean there aren't tons of functions that should be marked noexcept, just that all conditionally noexcept functions aren't noexcept(false) just because of a forgotten noexcept elsewhere). Change-Id: I10dacb6b9c9d41d3595fe2f306356d62d3d91c76 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-211-1/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| * Doc: Fix typosSze Howe Koh2015-01-191-1/+1
| | | | | | | | | | Change-Id: I29d5576902a5d1ea25558e980081952d9157f7f0 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| * fix error when cross-compiling with --system-zlibAshish Kulkarni2015-01-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is broken since 1f461ac45bfa8887261510a95fb33a346d68eaba, where Z_PREFIX was defined to namespace the bundled zlib symbols. The bundled zlib is used by bootstrap.pro when cross-compiling which uses the namespaced symbols. This breaks linking of rcc when --system-zlib is used, as it will try to link to compress2 instead of z_compress2. To fix this, the aliases are pulled in via zconf.h and the bundled zlib is prepended to the INCLUDEPATH (i.e. before the system zlib). Change-Id: Iec76cbdead40f888e2ac6a887ec8f3b7bc7db501 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-12-291-1/+10
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/kernel/qplatformsystemtrayicon.cpp src/gui/kernel/qplatformsystemtrayicon.h src/plugins/platforms/xcb/xcb-plugin.pro Change-Id: I00355d3908b678af8a61c38f9e814a63df808c79