summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-2114-58/+152
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qsysinfo.h src/corelib/kernel/qcoreapplication_win.cpp src/gui/text/qdistancefield.cpp src/gui/text/qdistancefield_p.h src/plugins/platforms/windows/qwindowsglcontext.cpp src/plugins/platforms/windows/qwindowsglcontext.h Change-Id: Ib3500acc2b28553bde06758cd9a2e19eb7fe2978
| * Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-06-2013-71/+163
| |\
| | * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-2013-71/+163
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And blacklisted a few tests in tst_QUdpSocket. Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtNative.java src/corelib/global/qglobal.cpp src/corelib/global/qsystemdetection.h src/corelib/io/qfileselector.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp tests/auto/network/socket/qudpsocket/BLACKLIST Task-number: QTBUG-54205 Change-Id: I11dd1c90186eb1b847d45be87a26041f61d89ef6
| | | * Remove overload tag from QByteArray QIODevice::readAll()Simon Hausmann2016-06-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does not seem to be a function that is overloaded. Change-Id: Icf8942dfb1e78a2ddb38cbd1c49657f745a61989 Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Correct a type mismatch in the QNX PPS codeJames McDonnell2016-06-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a problem when building for 64-bit where the two types no longer match. Change-Id: I8c31915caf81a60d635c79816a3a2d5d36742ff9 Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Fixed developer build for MinGWOliver Wolff2016-06-152-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 0 must not be used as a null pointer constant Change-Id: I082d0e99c105fb02980b9cf390e7f6e4c9ad0869 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Update for the newest Darwin-family operating systems.Jake Petroules2016-06-154-17/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Adapt to the OS X => macOS rename in Q_OS_ macros/docs, qmake scopes, file selectors, etc. - Add new QSysInfo values and MAC_OS_X / __MAC_ / __IPHONE_ values for macOS 10.12 and iOS 9.1 through 10.0. - Update prettyProductName with new macOS "Sierra" codename. Change-Id: Id976530beeafa01b648ebaa16f4a8f0613fcaf75 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Fix cast warnings when pthread_t is smaller than a pointerJames McDonnell2016-06-131-16/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Push conversions from pthread_t to Qt::HANDLE and back into functions. The casts that were being used didn't work for the unusual 64-bit pointer/32-bit int combination that QNX is using for 7.0. HANDLE ends up as a 64-bit pointer and pthread_t ends up as a 32-bit integer. g++ considers the precision loss when converting from the 64-bit pointer to the 32-bit integer an error. Better to have the casts hidden in functions so it's easier to adjust them for unusual combinations such as this. Change-Id: Ia156b26224a0f7edc1c31e3d1ee8b21191381698 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * winrt: Fix potential crash in QCoreApplicationMaurice Kalinowski2016-06-131-26/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GetModuleFileName exists for Windows 10 and upwards, hence use the generic version from the win32 mkspec. This allows to create a QCoreApplication object with nullptr argv, as the application filename is identified via the binary itself and not via arguments. A couple of auto-tests use this method to create multiple application objects during runtime. Unfortunately we cannot apply this for msvc2013, even though MSDN states the GetModuleFileName exists, it fails to compile for Windows Phone 8.1. Change-Id: I2b8b988107487ef3785462f8ca40b0a6e0623e32 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | | * winrt: Close IAsyncInfo manually in case of errorMaurice Kalinowski2016-06-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case QEventDispatcherWinRT::runOnXamlThread returns an error the runtime sets the status of IAsyncInfo to Error. At the point when the IAsyncInfo destructor is invoked, an unhandled exception is thrown indicating the error has not been handled, causing any application to just crash deep inside the Windows platform libraries. Hence, in case runOnXamlThread returns non-S_OK we have to manually invoke Close() of the IAsyncInfo to tell the system we have taken care of everything. Change-Id: I3ac1e2ec2726f42e44f4f9a92191e454711120dd Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | | * Move __cpp_constexpr check inside Q_COMPILER_CONSTEXPR checkJames McDonnell2016-06-131-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Q_COMPILER_CONSTEXPR can be undefined (or not defined at all) to indicate that constexpr should not be used regardless of the compiler's ability to support it. This is done for QNX because some C library floating point functions used in the Dinkumware C++ library aren't constexpr functions; i.e., the library doesn't have proper constexpr support even though the compiler does. (cherry picked from commit d87242968fc56ba09243f642ce70a85084619de0) Change-Id: If0bdeb2180710dd9ccd97d79fa91cf9ff42f7990 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Fix warning when compiling x86 with SSE2 but no AVX2Thiago Macieira2016-06-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qstring.cpp:595:13: error: unused variable ‘nullmask’ [-Werror=unused-variable] Change-Id: I1cc7601489634e96833cfffd1456474a529a79ed Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * | | Add "-softfloat" to archdetect.cpp and clarify what to use whenThiago Macieira2016-06-191-0/+5
| |/ / | | | | | | | | | | | | | | | Change-Id: I1cc7601489634e96833cfffd14563e033c85ff6d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Fix warning about non-void function not returning anythingThiago Macieira2016-06-171-3/+1
| | | | | | | | | | | | | | | | | | | | | Found by ICC 17 Beta on Windows. Change-Id: Ib57b52598e2f452985e9fffd1458b6990b70837a Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | Fix MSVC warning about casting to pointer of different sizeThiago Macieira2016-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | qdatetime.cpp(2834): warning C4312: 'reinterpret_cast': conversion from 'int' to 'QDateTimePrivate *' of greater size Change-Id: Ib57b52598e2f452985e9fffd1458fe3ba3fcfb48 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Fix documentation of some QSysInfo functions.Jake Petroules2016-06-171-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | Qt 5.8 no longer supports Windows CE, or versions of Windows where the marketing version is not an orderable version number. Change-Id: I8fab7d9b0d466f891e872b6c3fdf9d98ffe6ebc1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Forward declarations for platform specific types should also be done with Q_QDOCOlivier Goffart2016-06-173-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The clang based qdoc need to be able to parse properly anything that is in #ifdef Q_QDOC The #if for the forward declararion now match the one in which it is used. Change-Id: Ia6cf84dd07a979b4e7aa8da764d9fb2fce74baa1 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-1713-83/+72
|\| | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp Change-Id: If899cda251b4dc8b8a7c6764520e88ab719737cd
| * | Merge "Merge remote-tracking branch 'origin/5.7.0' into 5.7" into ↵Liang Qi2016-06-1610-77/+60
| |\ \ | | | | | | | | | | | | refs/staging/5.7
| | * \ Merge remote-tracking branch 'origin/5.7.0' into 5.7Liang Qi2016-06-1610-77/+60
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qsimd_p.h Change-Id: I7c6bfc5873d97ad7f51a540dd9c18b9359dde59f
| | | * | Move the Q_DECL_UNUSED attribute elsewhere to satisfy ICC 17Thiago Macieira2016-06-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't like the attribute there. I think it's a compiler bug, but I can't be sure because the part of the standard dealing with the placement of attributes and where they apply is very complex. Exercise left for the reader to determine if ICC is correct or not to reject it there. Change-Id: I87e17314d8b24ae983b1fffd1454bde826b7bcf4 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | | * | Use void instead of uchar in the endian-swapping function parametersv5.7.0-rc1Thiago Macieira2016-05-266-39/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to pass pointers to storage that is not an array of uchar, which it hardly ever is. Change-Id: Ifea6e497f11a461db432ffff14490d2c2df21906 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | | * | Merge remote-tracking branch 'origin/5.6.1' into 5.7.0Liang Qi2016-05-269-82/+55
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qsimd_p.h src/network/socket/qnativesocketengine_winrt.cpp Change-Id: I2765b671664c2a84839b2f88ba724fdf0c1fa7c6
| | | * | | Check for CRC32 properlyLaszlo Agocs2016-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just being on ARMv8 does not mean CRC32 (and arm_acle.h) is available. Task-number: QTBUG-53629 Change-Id: I104f643f2d59620e1f4d1ef814a1de71bb484e7b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * | | Revert "QMutexPool: avoid QVarLengthArray of QAtomicPointers"Thiago Macieira2016-05-242-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4579d966af2e5d4ba229f13312eeb2f921406038. This causes a miscompilation with ICC 16 on Windows (MSVC 2015 ABI): the vector created by new[] with () in: mutexes(new QAtomicPointer<QMutex>[size]()), // (): zero-initialize does not actually zero-initialize (see disassembly in the bug report). This is definitely a compiler bug. Since we plan on removing QMutexPool in Qt 5.8 anyway, let's just revert the patch. Task-number: QTBUG-53360 Change-Id: I06bae9392f534e45b3f1ffff144e823b747e7962 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * | | | | QArrayDataOps: silence Clang warning about memmoveThiago Macieira2016-06-161-3/+5
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same as 9224255f13952e5b4092208c8cae1a31ab5c6a19: some Qt types are polymorphic and are marked as movable, so Clang complains. qarraydataops.h:608:27: error: destination for this 'memmove' call is a pointer to class containing a dynamic class 'QPixmap'; vtable pointer will be overwritten [-Werror,-Wdynamic-class-memaccess] qarraydataops.h:608:61: error: source of this 'memmove' call is a pointer to class containing a dynamic class 'QPixmap'; vtable pointer will be moved [-Werror,-Wdynamic-class-memaccess] Change-Id: Ib57b52598e2f452985e9fffd145861e025b81550 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | | QReadWriteLock: initialize member var currentWriterDavid Faure2016-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by valgrind's memcheck. Change-Id: I68f7c9279033e76d82f511b9d095548b4ef45723 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | | | QDataStream: do not lose error status while reading containersAlex Trotsenko2016-06-151-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, the code: ds >> s >> hash; could set the stream status to ReadPastEnd, while deserialization of the string is failed with ReadCorruptData status. Proposed solution is to restore a previously latched error status unconditionally in accordance with QDataStream::setStatus() docs. Change-Id: Id3a7dccf709b02e5b018efb48d7647ee48fe5124 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | | darwin: Add Foundation conversion functions for QSize/QSizeFTor Arne Vestbø2016-06-142-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fromCGPoint function was left out for QSize, as the foundation type is using CGFloats internally. Clients should use an explicit QSizeF::toSize() when potentially throwing away precision. Change-Id: I12d43ae0881f09ad8d79f2caaa000c3983f4ef30 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | | | darwin: Add Foundation conversion functions for QPoint/QPointFTor Arne Vestbø2016-06-142-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fromCGPoint function was left out for QPoint, as the foundation type is using CGFloats internally. Clients should use an explicit QPointF::toPoint() when potentially throwing away precision. Change-Id: I12a37e8f81c86b7ada56066cc18ee29709cc21e3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-1346-732/+545
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-107-22/+26
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-ios-clang/features/default_pre.prf mkspecs/macx-ios-clang/features/sdk.prf mkspecs/unsupported/freebsd-g++46/qplatformdefs.h src/widgets/styles/qgtkstyle.cpp tests/auto/corelib/io/qdiriterator/qdiriterator.pro tests/auto/corelib/io/qfileinfo/qfileinfo.pro Change-Id: Ia943555d1e59234a66f7dc65bdfda838e40001b5
| | * | | Mention extension in QFileInfo's suffix-related documentationMitch Curtis2016-06-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it easier for users to find out how to get a file's extension when browsing docs. Change-Id: I08a1b620dea5432462133324824fae85754b9a09 Task-number: QTBUG-53380 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| | * | | Add support for 8bit encodings not ASCII compatible in QXMLStreamWriter.Luca Bellonda2016-06-081-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a 8 bit encoding to write a file, a test discovers if the encoding is really ASCII compatible by examining a letter and one of the XML reserved characters. EBCDIC, in the current base, was not well handled. [ChangeLog][QtCore][QXmlStreamWriter] Fixed a bug that prevented the generation of valid XML files when using encoding with 8 bit per character but not ASCII compatible. QXMLStreamWriter generated XML markup using always ASCII in this case. Change-Id: I9c86a122dd91b2290d50c358638442f99777d4ae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | QDebug: fix streaming of QCharsMarc Mutz2016-06-081-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 9ef3ff30 introduced a new function, putUcs4(), to output QChar, char16_t, char32_t as a, possibly escaped, character literal, but got the order of stream modifiers wrong. Instead of applying the field width to the 'ucs' streaming, it applied it to the prefix '\u'. The same problem exists for the pad char, leading to the result '00\ue4' for a QChar containing ä (LATIN SMALL LETTER A WITH DIAERESIS) Fix by reordering the elements streamed so that the prefixes come last. Added a test. Change-Id: I6eaa0586501b9e780aaa3bb5dcec0e5c2f86a219 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | Optimize QJsonObject::operator==Marc Mutz2016-06-082-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code iterated through one QJsonObject and looked up the key in the other, comparing the values. It had linearithmic complexity, and created one QString 'key' per element. Since the entries in a QJsonObject are lexicographically ordered, we can, however, just walk through the two objects in lock-step and compare corresponding entries (at the same index) with each other. Doing so saves O(N) QString creations and QJsonObject::value() calls, and makes operator== linear in the number of elements. Change-Id: Ib46ee0c1008b7f114454e282b6bd2bfcdbe59e2a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | | Fix QVariantAnimation documentationAlejandro Exojo2016-06-082-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 5.0, this class is not abstract. Only the documentation of updateCurrentValue was updated at that time. Fix the class reference and the mentions of the class being abstract in the Animation Framework overview. Change-Id: I8ef9accb0b870dc8eb75bfc74361c7f2ad8d1d8b Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * | | | Plug padding holes in QHostAddressPrivateThiago Macieira2016-06-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On ABIs where quint64 is aligned on 8-byte boundaries (such 32-bit Windows and all 64-bit systems), there was a padding hole of 4 bytes between QHostAddressPrivate::a and the anonymous union. If we move the member to after the union, there is no hole anymore. That operation causes the tail padding to grow from 3 to 7 bytes. Since we also don't need full 32 bits for the protocol, we can shrink the structure by 8 bytes on those architectures and by 4 bytes on 32-bit Unix systems. Change-Id: I461e9fc7199748faa187ffff1415d6601a7bd777 Reviewed-by: hjk <hjk@theqtcompany.com>
| * | | | Replace qAllocMore with a pair of more useful functionsThiago Macieira2016-06-095-57/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | x86: Fix build with BMI but no LZCNT extensionsThiago Macieira2016-06-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GCC builtins for clzs and ctzs are enabled when the x86 extension for LZCNT and TZCNT are enabled. The use of only __BMI__ in commit f5f47987ce369aa3f7553e6c0da509461a1ddf1a was incorrect. But GCC needs both BMI and LZCNT enabled to enable this builtin. Change-Id: I1cc7601489634e96833cfffd145647e9fc9f2f51 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | | | QString: remove unnecessary copy in replace()Anton Kudryavtsev2016-06-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a copy is needed, replace_helper() takes care of that for us. Change-Id: I9e5c89cb70b2902c96062a9edaf77fedda6ddb2c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | | | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-0628-199/+324
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf config.tests/unix/nis/nis.cpp mkspecs/unsupported/freebsd-g++/qplatformdefs.h src/corelib/tools/qdatetime.cpp src/corelib/tools/qsimd.cpp src/corelib/tools/qsimd_p.h src/network/access/access.pri src/network/access/qnetworkreplynsurlconnectionimpl.mm src/network/access/qnetworkreplynsurlconnectionimpl_p.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/printsupport/windows/qwindowsprintdevice.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp tests/auto/network/access/qnetworkreply/BLACKLIST tests/auto/widgets/widgets/qopenglwidget/BLACKLIST Change-Id: I4b32055bbf922392ef0264fd403405416fffee57
| | * | | Merge remote-tracking branch 'origin/5.6.1' into 5.6Liang Qi2016-06-029-99/+55
| | |\ \ \ | | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This merge also blacklists a flaky tst_QGL::clipTest test on OpenSUSE 13.1. Conflicts: src/network/socket/qnativesocketengine_winrt.cpp tests/auto/opengl/qgl/BLACKLIST Task-number: QTBUG-53133 Change-Id: I14b431aa5a189b7dd1d3e2dfff767d15df20fde3
| | | * | Replace qUnaligned{Load,Store} with the existing q{To,From}Unalignedv5.6.1-1v5.6.1Thiago Macieira2016-05-259-99/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the Q_ALWAYS_INLINE and forcing of __builtin_memcpy to the existing functions. Change-Id: Icaa7fb2a490246bda156ffff143c137e520eea79 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| | * | | QJsonValue: fix use-after-free in assignment operatorMarc Mutz2016-06-011-19/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assignment operator of a String QJsonValue that holds the only remaining reference to the QString::Data block was freeing the block before obtaining its own reference, leading to a use-after-free in the case where *this was passed as 'other' (self-assignment). Fixed by reformulating the assignment operator in terms of the copy ctor, using the copy-swap idiom, with the twist that QJsonValue doesn't, yet, have a swap member function, so we use three per-member qSwap()s. Change-Id: I3c5ccc4d9f32c7593af3fc6a0edbf12b7feb1391 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| | * | | Compile fix: add OpenBSD define for ffsll usageRalf Nolden2016-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On OpenBSD, ffsll needs to be defined to compile. This is the same change as in commit 725a9c27021bef1ac3828a4eafc013a2f50e6f22 for NetBSD. Change-Id: I3060caa10950a9419084a12de8c88a2f98b34d07 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | Merge BSD implementations of QLockFilePrivate::processNameByPid()Ralf Nolden2016-06-012-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, several solutions for the implementations of processNameByPid() on BSD systems existed: - one for FreeBSD using libutil through kinfo_getproc() using sysctl() implicitly - one for GNU/kFreeBSD using sysctl() explicitly added in commit a8f4fa217daa1b6f7b13cc48c1e5ee8d2d76b008 OpenBSD and NetBSD also had different approaches in their ports patches using kvm() and sysctl(). The code unifies this for all BSDs using sysctl(). Change-Id: Iced9ef01e5966d8688f464f51024a7ed562e26a3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
| | * | | Fix emission of QProcess:errorOccurredJoerg Bornemann2016-05-301-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consistently use setErrorAndEmit to emit errorOccurred and the deprecated error signal. Change-Id: I8bc7634a72d4d13f74bbf76547de08271dfcbb59 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| | * | | QWindowsPipeWriter: Discard queued signals in stop()Aleksei Timofeyev2016-05-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The _q_queueBytesWritten signal may be already queued from the event loop at the time when stop() is called. We do not want to emit signals once stopped, so reset all respective state variables. Change-Id: I343e1702955e0bbc1d11930d19e75dab6e129b4c Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * | | Add Interix OS system detection definesRalf Nolden2016-05-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NetBSD (pkgsrc) ports are building qt on Interix as well, where the necessary defines are missing for in qsystemdetection.h. Patch for adding them provided by NetBSD ports maintainer Kamil Rytarowski <n54@gmx.com> Change-Id: I769c47f623317efda3130a7061307e84d3350fac Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>