summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-043-4/+3
|\| | | | | | | | | | | Change-Id: I4134c0c6b6c9911950f58b3b5c86e789d28a185b
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Ulf Hermann2019-12-032-0/+2
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/serialization/qcborvalue.cpp Change-Id: I675a3029955c96e81a33ed9d98b72b55b6784b52
| | * Silence intel compiler warning about float comparisonOlivier Goffart2019-11-282-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Add the equivalent intel warning macro in public header where there was already the macro for -Wfloat-equal Change-Id: I8f20400f0b95c8f3857fa7a0a33464c8c34d5c0e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Workaround warning in QHash::uniteAlbert Astals Cid2019-12-021-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The warning pragmas don't work in gcc due to the fact this is a template. I've been told that unite() will disappear but meanwhile i think it's better if we simply don't give a warning that people can't protect themselves against Change-Id: I358e629be86e0e675ef3e49a7fbc4f7f65ae97f6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-254-21/+241
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qhash.h src/gui/kernel/qevent.h src/widgets/kernel/qshortcut.cpp src/widgets/kernel/qshortcut.h Change-Id: If61c206ee43ad1d97f5b07f58ac93c4583ce5620
| * | RDRAND test: also disable if RDRAND produced only three samplesThiago Macieira2019-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | | It's unlikely, since we do 64-bit RDRAND on 64-bit machines. Change-Id: I8d95fbaf90e842b9b44dfffd15cd684a98a7ff50 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | Avoid erroneous creation of QScopedValueRollback objectsSimon Hausmann2019-11-081-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark the class as [[nodiscard]] to ensure that instances are given names and do not destruct (roll back) immediately. This avoids accidental code like this: QScopedValueRollback<Foo>(bar, baz); which rolls back instantly, when it should be QScopedValueRollback<Foo> blah(bar, baz); which rolls back at the end of the scope. Change-Id: I00269fe325b804078bd0a9d5058c941af7ba5597 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-081-1/+1
| |\| | | | | | | | | | Change-Id: I963b5f48b5d6f3500ca379fbd7f1a4290b570175
| | * Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-11-061-1/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/features/mac/default_post.prf src/corelib/tools/qsimd_p.h src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm util/qfloat16-tables/gen_qfloat16_tables.cpp Change-Id: If48fa8a3bc3c983706b609a6d3822cb67c1352a4
| | | * Merge remote-tracking branch 'origin/5.13.2' into 5.13Qt Forward Merge Bot2019-10-301-1/+1
| | | |\ | | | | | | | | | | | | | | | Change-Id: Ieb5afc87086758119bcfc8efbe355f5c0a93fc04
| | | | * Fix build: disable the HWRNG in bootstrapped modeThiago Macieira2019-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qmake build fails: qrandom.o: in function `QRandomGenerator::SystemGenerator::generate(unsigned int*, unsigned int*)': /home/tjmaciei/src/qt/qt5/qtbase/src/corelib/global/qrandom.cpp:333: undefined reference to `qRandomCpu(void*, long long)' Fixes: QTBUG-78937 Change-Id: Ib5d667bf77a740c28d2efffd15cb4236f765917c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | | | Deprecate reverse iteration on QHashLars Knoll2019-11-051-18/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std::unordered_map only supports forward iteration for good reasons. Align our API with this by deprecating reverse iteration and the operator+/-() for iterators. [ChangeLog][QtCore][QHash] Reverse iteration over QHash is now deprecated. [ChangeLog][Potentially Binary-Incompatible Changes] QHash's iterator category was changed from bidirectional iterator to forward iterator. This may cause trouble if a library uses the iterator category to alter functionality through tag dispatching. This only applies when compiling the library or application with QT_DISABLE_DEPRECATED_BEFORE=0x050F00 and the other with a lower value. Change-Id: I0fb6d017cabdef1bc508e62f76dc2fa73cd3652d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | | Get rid of QT_STRICT_ITERATORSLars Knoll2019-11-044-54/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The concept was a nice idea to avoid accidental detach() calls in implicitly shared containers, but it conflicts with a C++11 compatible API for them, with signatures for modifying methods taking a const_iterator as argument and returning an iterator (e.g. iterator erase(const_iterator)). Change-Id: Ia33124bedbd260774a0a66f49aedd84e19c9971b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | Get rid of unsharable containersLars Knoll2019-10-3010-135/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The support for unsharable containers has been deprecated since Qt 5.3.0, so let's finally remove support for them. Change-Id: I9be31f55208ae4750e8020b10b6e4ad7e8fb3e0e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | Ensure QListIterator gets defined inside the qtnamespaceLars Knoll2019-10-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I9078893d530836396453c8cc0d2870d77989f076 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | Make QList an alias to QVectorLars Knoll2019-10-304-3166/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is almost 100% source compatible with Qt 5. Exceptions are * Stability of references for large or non movable types * taking a PMF for types that are now overloaded with r-value references in QVector * The missing prepend optimization in QVector (that is still planned to come for Qt 6) Change-Id: I96d44553304dd623def9c70d6fea8fa2fb0373b0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | Move QListSpecialMethods over to QVectorLars Knoll2019-10-302-28/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend QVector with special methods for QByteArray and QString, just as QList had them in Qt 5. This also means that QStringList and QByteArrayList are now implemented through a QVector, not a QList anymore. QListIterator<QString> is now slightly source incompatible as QStringList is a QVector, but that will be fixed in a follow-up change when QList<QString> will start mapping to a QVector. Change-Id: I7cfb8a72d4d95b347bbd386892f244b7203b41c2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | Replace Q_ALIGNOF usage in qtbase with C++11 alignof keywordVolker Hilsheimer2019-10-295-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The macro is not documented, so not part of the public Qt API. It is made obsolete by the alignof keyword in C++11. Remove the usage of the macro across qtbase, in particular the workarounds for compilers that didn't support alignof, and that will not be supported in Qt 6. The macro definition is left in place, no need to break existing code. Task-number: QTBUG-76414 Change-Id: I1cfedcd4dd748128696cdfb546d97aae4f98c3da Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-273-0/+26
|\| | | | | | | | | | | | | | | | | | | Change-Id: I182a639748760393f9e6b0724259201588aeaae3
| * | | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-263-0/+26
| |\| | | | | | | | | | | | | | | | | | Change-Id: I208a36bf1c88c8291baaa5ca8fe8e838bc9d7aea
| | * | | QSet: Document to/from QVector transformation techniquesSamuel Gaist2019-10-243-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2a2ff6332bd6e8ed3d4ba7b4765da0a94a06f133 Fixes: QTBUG-71067 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-261-31/+20
|\| | | | | | | | | | | | | | | | | | | Change-Id: I379794a01cbf6fb39d94b24cc8c90b1971a212b9
| * | | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-251-31/+20
| |\| | | | | | | | | | | | | | | | | | Change-Id: Iebedaa967a263854f18cd403ce007d7965f26d2b
| | * | | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-241-31/+20
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstandardpaths_unix.cpp src/corelib/tools/qsharedpointer_impl.h tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp Change-Id: Iae95c5778dc091058f16f6db76f04a0178a9e809
| | | * | Q{Shared,Weak}Pointer: Reduce overload sets in implicit conversionsMilian Wolff2019-10-111-31/+20
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only allow implicit conversions when the types involved are compatible. That means, only allow construction and copy assignment when the type X* is convertible to type T*. This is done using SFINAE and the std::is_convertible type trait, which makes the previous QSHAREDPOINTER_VERIFY_AUTO_CAST obsolete. This patch fixes compilation when a function is overloaded with Q{Shared,Weak}Pointer of different, incompatible types. Previously, this resulted in a compilation error due to an ambiguous overload. Change-Id: I069d22f3582e69842f14284d4f27827326597ca2 Fixes: QTBUG-75222 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-141-0/+12
|\| | | | | | | | | | | | | | | Change-Id: I129dd579f92cb2592a38ca043472b45cb926ae12
| * | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-131-0/+12
| |\| | | | | | | | | | | | | | Change-Id: I9953c1ca16862184c2373027e946c482ce8e6f0e
| | * | Fix QEasingCurve possible imprecision at endpointsEirik Aavitsland2019-10-111-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both the spline curves and (most of) the predefines curves are defined as having start value 0.0 and end value 1.0. The spline and In/OutBack functions would sometimes not produce that result precisely, so code could not reliably depend on expressions like (easedValue < 1.0) becoming false. Fix by explicitly handling endpoints. Fixes: QTBUG-76781 Fixes: QTBUG-72630 Change-Id: I21be43af469a76c090154bffef8406a9baf2d0b1 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-125-74/+132
|\| | | | | | | | | | | | | | | Change-Id: I6ad865b2c26003f4508da9b3f8e075a951ff8ef7
| * | | Fix infinite recursion caused by the RDSEED featureThiago Macieira2019-10-111-40/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We made qRandomCpu() call qCpuHasFeature(), which needs to test that RDRND works and does so by calling qRandomCpu(). So disentangle that by making sure we don't recurse. And by making sure that we fill the buffer with RDRND data, not with RDSEED. Fixes: QTBUG-79162 Change-Id: Ib5d667bf77a740c28d2efffd15cc583a9afcb97a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Deprecate reverse iteration on QSetLars Knoll2019-10-102-29/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std::unordered_set only supports forward iteration for good reasons. Align our API with this by deprecating reverse iteration and the operator+/-() for iterators. [ChangeLog][QtCore][QSet] Reverse iteration over QSet is now deprecated. Change-Id: Ia6e3346a6474c454c63010d855850ae4ff12e1a4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * | | Deprecate calling QList::insert/removeAt with out of bounds indexLars Knoll2019-10-102-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users should not call any QList API with indices that are out of bounds. Deprecate this behavior and make sure users get warnings in debug mode and assertions if they disable deprecated functionality. [ChangeLog][Important Behavior Changes] Calling QList::insert() or removeAt() with an out of bounds index is deprecated and will not be supported in Qt 6 anymore. Change-Id: I97adecc2e2aabd36ea2cc69e0895d625f78b32a0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-101-1/+35
|\| | | | | | | | | | | | | | | Change-Id: Iab9b3a7d004a2e4b4de816f4a2d7ed2fb936d3ae
| * | | QRandom: add support for RDSEEDThiago Macieira2019-10-091-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Intel whitepaer[1] recommends using the RDSEED over RDRAND whenever present. libstdc++ from GCC 10 will also use it in std::random_device. [ChangeLog][QtCore][QRandomGenerator] The system() random generator will now use the RDSEED instruction on x86 processors whenever available as the first source of random data. It will fall back to RDRAND and then to the system functions, in that order. [1] https://software.intel.com/en-us/articles/intel-digital-random-number-generator-drng-software-implementation-guide Change-Id: I907a43cd9a714da288a2fffd15bab176e54e1975 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-062-1/+2
|\| | | | | | | | | | | | | | | Change-Id: Ife31dad3c8dc43c5ff4d266e6d646230c5d20a50
| * | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-052-1/+2
| |\| | | | | | | | | | | | | | Change-Id: I554a2762890391b3b6013c8b82211a8386a4ced8
| | * | docs: Mark QPair and QLatin1Char as reentrantKavindra Palaraja2019-10-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I7d37eb13809a6fa4d1c2c74fd8aea35bdf235996 Fixes: QTBUG-78552 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | * | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-041-1/+1
| | |\| | | | | | | | | | | | | Change-Id: I31c1c469c00016f1bd21ecfab39794df372e56f2
| | | * QList: make cast from ptrdiff_t to int explicitEdward Welbourne2019-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends ffc2d5722317fcab86865b11491d7bf7fef3e16d. Fixes: QTBUG-78235 Change-Id: Ie91d8d71c92bb62e3268847407b7b252c382d700 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-023-1/+87
|\| | | | | | | | | | | | | | | Change-Id: Ideaa64d583746f1ce8265997131fb1ce3a9acbcf
| * | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-013-1/+87
| |\| | | | | | | | | | | | | | Change-Id: I77ba01f09b3dbcaf13cb265a70d9da661c32a61f
| | * | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-303-1/+87
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qrandom.cpp src/corelib/io/qfileinfo.cpp src/corelib/kernel/qeventdispatcher_win.cpp src/corelib/kernel/qeventdispatcher_win_p.h src/gui/text/qfontdatabase.cpp src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm src/plugins/platforms/windows/qwindowsglcontext.cpp src/testlib/qtestcase.cpp Done-With: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-With: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4893212471aa24be804c989a581810e2f714545c
| | | * QVarLengthArray: Avoid int vs. size_t warnings in operator=Laszlo Agocs2019-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I879b62c55e4211d3e4e1a18f6699f26e3f5de1f8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Fix QRandomGenerator initialization on AMD CPUsDmitry Kazakov2019-09-262-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some AMD CPUs (e.g. AMD A4-6250J and AMD Ryzen 3000-series) have a failing random generation instruction, which always returns 0xffffffff, even when generation was "successful". This code checks if hardware random generator generates four consecutive equal numbers. If it does, then we probably have a failing one and should disable it completely. Change-Id: I38c87920ca2e8cce4143afbff5e453ce3845d11a Fixes: QTBUG-69423 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * QRegexp: Fix MSVC2019 warning about fallthrough not being followed by a case ↵Friedemann Kleint2019-09-031-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | label Move fallthrough down, fixing: tools\qregexp.cpp(3014): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label tools\qregexp.cpp(3054): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label tools\qregexp.cpp(3100): warning C4468: 'fallthrough': attribute must be followed by a case label or a default label Change-Id: If25ddec5dc1d4929a3383729aabad89f5879e316 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
| | | * Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-08-271-2/+2
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qdrawhelper.cpp src/gui/painting/qdrawhelper_p.h src/gui/painting/qdrawhelper_sse2.cpp src/gui/painting/qdrawhelper_x86_p.h Change-Id: I83256bb38ab3a705776e353bc0629315b6c59a0f
| | | | * Fix assertion on passing nullptr QLatin1Strings to qt_compare_stringsMarc Mutz2019-08-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qstrnicmp() has an assertion that the lhs string is not nullptr. Fix by moving the length check back to the front, regardless of cs's value. Amends cad7100fda1b27ba56c4d9efc6bceba62859dfbc. Change-Id: I31f808936c8dc6fbb10a70a59923746ef3e675e9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | | Merge remote-tracking branch 'origin/wip/qt6' into devSimon Hausmann2019-09-183-42/+0
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qpicture.cpp Change-Id: Iecf79f96f54dc23bd703e6c4c634f909b796d7b3
| * | | | Merge remote-tracking branch 'origin/dev' into wip/qt6Alexandru Croitor2019-09-0415-22/+125
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Change-Id: I54741635460bb2d8f3fd0be535ee1968d6c442bb
| * | | | | Get rid of the deprecated QSet::to/fromList methodsLars Knoll2019-08-121-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first step towards removing/deprecating QList in Qt 6. Change-Id: I043151d25a1dc17fc748fb1b4686c4b6c9c5e90b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>