summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-151-1/+1
|\ | | | | | | | | | | | | | | Conflicts: tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/network/access/spdy/tst_spdy.cpp Change-Id: I3196c5f7b34f2ffc9ef1e690d02d5b9bb3270a74
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-131-1/+1
| |\ | | | | | | | | | Change-Id: I50f70a789ab1438b40d4408be72c090fa00b801f
| | * Wasm: Support event loop wakeup from secondary threadsMorten Johan Sørvig2020-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Minimal fix for the missing wakeup issue, in leu of a new event loop implementation. So far, emscripten_async_run_in_main_runtime_thread_ looks to be our option for scheduling calls on the main thread. This function is available on emsdk 1.38.22 and higher. Requires making from QEventDispatcherUNIX::wakeUp() non-final. The future event dispatcher implementation will not inherit QEventDispatcherUNIX, so this is a temporary change. Fixes: QTBUG-75793 Task-number: QTBUG-76007 Change-Id: Ie6f6ee6f7674206fc0673a4fe866ac614432ab65 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-131-32/+32
|\| | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: I4d3041fa291a918c774ffa5eb5c8792a0966451d
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-01-091-32/+32
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp Change-Id: I4780b25665672692b086ee92092e506c814642f2
| | * QObject: Replace more 0 and NULL with nullptrAndre Hartmann2020-01-091-38/+38
| | | | | | | | | | | | | | | | | | | | | | | | ... in docs, comments, and warnings. Also adopt some occurrences around there and in the snippets. Change-Id: Icc0aa0868cadd8ec2270dda794bf83cd7ab84160 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-01-072-9/+7
|\| | | | | | | | | | | Change-Id: Ia2ce994c42adc010c453edaeea57f672556958f6
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-062-9/+7
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qvariant.h Change-Id: I8f3873e74b9795ac889e7c7ec5de2619bca92160
| | * QVariant: Prefer direct conversion to QVariant{List,Map,Hash}Fabian Kosmale2020-01-031-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a type has both a converter to QVariantList and to QSequentialIterableImpl registered, we would have chosen the QSequentialIterableImpl version. In the case of types like QJSValue, this is more costly. With this change we therefore uses the direct conversion if it has been registered. The same applies to QAssociativeIterableImpl and QVariantHash/QVariantMap. Change-Id: I9c0b5068efe4bfbc5e0598a200e6db59201e9974 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Fix some qdoc warningsFriedemann Kleint2020-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/corelib/tools/qhash.cpp:2596: (qdoc) warning: clang found diagnostics parsing \fn template <class Key, class T> template <class InputIterator> QMultiHash::QMultiHash(InputIterator begin, InputIterator end) error: 'QMultiHash' is not a class, namespace, or enumeration src/corelib/kernel/qobject.cpp:4593: (qdoc) warning: Undocumented parameter 'EXPORT_MACRO' in QObject::Q_NAMESPACE_EXPORT src/corelib/global/qfloat16.cpp:129: (qdoc) warning: Cannot tie this documentation to anything src/corelib/text/qlocale.qdoc:1204: (qdoc) warning: Overrides a previous doc src/corelib/text/qlocale.qdoc:1187: (qdoc) warning: (The previous doc is here) src/network/kernel/qhostinfo.cpp:597: (qdoc) warning: clang found diagnostics parsing \fn QHostInfo(QHostInfo &&other) src/printsupport/dialogs/qabstractprintdialog.cpp:346: (qdoc) warning: clang found diagnostics parsing \fn int QAbstractPrintDialog::exec(): error: out-of-line definition of 'exec' does not match any declaration in 'QAbstractPrintDialog' src/testlib/qsignalspy.qdoc:101: (qdoc) warning: clang found diagnostics parsing \fn QSignalSpy(const QObject *obj, const QMetaMethod &signal): error: expected unqualified-id src/testlib/doc/src/qttest-best-practices.qdoc:28: (qdoc) warning: Can't link to 'Q_VERIFY2()' src/widgets/kernel/qactiongroup.cpp:291: (qdoc) warning: Undocumented parameter 'b' in QActionGroup::setExclusive() src/widgets/kernel/qactiongroup.cpp:305: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text src/widgets/kernel/qshortcut.cpp:542: (qdoc) warning: No such parameter 'context' in QShortcut::QShortcut() src/widgets/widgets/qdatetimeedit.cpp:632: (qdoc) warning: No such parameter 'minimumTime' in QDateTimeEdit::setTimeRange() src/widgets/widgets/qdatetimeedit.cpp:632: (qdoc) warning: No such parameter 'maximumTime' in QDateTimeEdit::setTimeRange() src/widgets/widgets/qdatetimeedit.cpp:632: (qdoc) warning: No such parameter 'less' in QDateTimeEdit::setTimeRange() Change-Id: I9799b5135e84c4d811674b2d114ef27315bc12df Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-01-045-32/+33
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvector.h Make QVector(DataPointer dd) public to be able to properly merge 5b4b437b30b320e2cd7c9a566999a39772e5d431 from 5.15 into dev. src/widgets/kernel/qapplication.cpp tests/auto/tools/moc/allmocs_baseline_in.json Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
| * | Get rid of the getter for QObjectPrivate::threadDataGiuseppe D'Angelo2019-12-171-1/+0
| | | | | | | | | | | | | | | | | | | | | The dependent changes have now landed. Change-Id: I502377ab5603d67ada9e5577de1abfccdfa0fa09 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Replace usages of QVariant::value by qvariant_castOlivier Goffart2019-12-152-4/+4
| | | | | | | | | | | | | | | | | | | | | This is done automatically with a clazy check Change-Id: I3b59511d3d36d416c8eda74858ead611d327b116 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Change some uses of QMap::insertMulti to QMultiMap::insertMårten Nordheim2019-12-122-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | By casting it, these are situations where we cannot change the type itself to QMultiMap. For QVariant it's a public define and for dbus it's the type of an argument to the function. Change-Id: I0f385dc857fce5de3e8254d18268fd84a6d7707c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Qt 6: Deprecate QHash::insertMultiLars Knoll2019-12-122-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QHash] insertMulti(), unite() and values(const Key &key) are now deprecated. Please use QMultiHash instead. Change-Id: Ic14907fd5fd38d585708e2dcf2c0200d221ebb25 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-123-23/+25
| |\| | | | | | | | | | Change-Id: I69238f23882deebeaad46e4fdcf899ab22cc2b8f
| | * QVariant: introduce ShouldDeleteVariantData flagFabian Kosmale2019-12-112-19/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This flag is used in QSequentialIterable and QAssociativeIterable to indicate that the data pointer in VariantData should be deleted after the variant has been constructed. The use case for this is https://codereview.qt-project.org/c/qt/qtdeclarative/+/284151, where we have a proxy iterator and cannot easily return a pointer to already owned data, as it is hard to manage its lifetime in the iterator. In contrast, it is clear that we can release the memory in the QSequentialIterable functions, as it has already been copied into the QVariant there. Change-Id: I2b33497d991cd4f752153e0ebda767b82e4bb851 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * Doc: remove the claim that zero timers execute after GUI eventsThiago Macieira2019-12-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This ties our hands on what we can do in our implementations. I don't care if you've depended on this in your code. It was wrong. Fixes: QTBUG-80600 Change-Id: I568dea4813b448fe9ba6fffd15de8865a27f0a35 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Remove a bunch of code maked for removalOlivier Goffart2019-12-142-12/+2
| | | | | | | | | | | | | | | Change-Id: I1bda415433b748a1b8408ef3b890a6de3e51b3ba Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-114-10/+10
|\| | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp Change-Id: I6b82507bf9a80a374c40393e72f4843f1557de89
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-104-10/+10
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/network/kernel/qnetworkinterface/BLACKLIST Change-Id: I1e8866c63b54bcd95fc2a044276ee15b7f60e79a
| | * Don't wrap feature detection macros with QT_HAS_FOO() variantsTor Arne Vestbø2019-12-104-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using wrappers for these macros is problematic when for example passing the -frewrite-includes flag to preprocess sources before shipping off to distcc or Icecream. It will also start producing warnings when compilers implement http://eel.is/c++draft/cpp.cond#7.sentence-2. See for example https://reviews.llvm.org/D49091 Both https://clang.llvm.org/docs/LanguageExtensions.html and the SD-6 document at https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations recommend defining '__has_foo(x) 0' as a fallback for compilers without the macros, so that's what we go for. Change-Id: I0298cd3b4a6ff6618821e34642a5ddd6728be767 Reviewed-by: Alex Richardson <arichardson.kde@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-0919-197/+250
|\| | | | | | | | | | | Change-Id: Ia24cc8b86def0d9d9c17d6775cc519e491b860b1
| * | QMetaType: add more static-less APIOlivier Goffart2019-12-072-2/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In prevision to Qt6 which is going to discourrage the use of the integer id, add some missing API to the staticless QMetaType API: - Add a way to construct a QMetaType from a type without calling qMetaTypeId: QMetaType::fromType<T>() - Add equality operators - Add a QMetaType::name() function - Add a default constructor (by adding a default parameter to the existing ctor) Change-Id: I95487c1c31bdf0d773717daa9d5452cbced30673 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Tidy nullptr usageAllan Sandfeld Jensen2019-12-0618-198/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Deprecate QVariant::operator< and related operatorsOlivier Goffart2019-12-052-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the operator does not have a total order, it is kind of pointless, and this is going to be removed in Qt6 Change-Id: I754be059726bf30993550a2d753f8b865f2d4a5f Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Use the QByteArray::DataPointer typedef instead of QByteArrayDataLars Knoll2019-12-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | The goal here is to move things over to QArrayDataPointer. This prepares for it. Change-Id: I32f54a47594274799600c618f7341c200ceaa306 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Enlarge QVariant's private to fit the new QString and QByteArrayThiago Macieira2019-12-081-1/+2
| | | | | | | | | | | | | | | Change-Id: I8baecd0a4db13200b34cdd7c8aebc2a1cc0a0c75 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Inline the size and data pointers in QByteArrayThiago Macieira2019-12-081-1/+1
| | | | | | | | | | | | | | | Change-Id: I82feeb2c9bd2900f421fc0c8d78698b1e83db043 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Change representation of string data in the meta objectLars Knoll2019-12-083-27/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't store our string data as QByteArrayLiterals anymore, but revert back to simply storing them as an array of char* and offsets into that array. This is required to be able to inline size and begin into QByteArray itself. Once that change is done, we can then avoid creating copies of the string data again. Change-Id: I362a54581caefdb1b3da4a7ab922d37e2e63dc02 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Add reference-count manipulation functions to QArrayData and hide refThiago Macieira2019-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The next change will stop using some values in the reference counter as settings from the data. Change-Id: I94df1fe643896373fac2f000fff55bc7708fc807 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Introduce QArrayData::allocatedCapacity() and use it instead of d->allocThiago Macieira2019-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In almost all cases, use d->allocatedCapacity() or d->constAllocatedCapacity() instead of d->alloc, since they do the same thing (right now). In the future, the functions will be changed. There is a separate const version because most const code should not need to know the allocation size -- only mutating code should need to know that There are a few cases where d->alloc was replaced with a better alternative, like d->size. The one case that remains in the code will be replaced by a different test when it's available. Change-Id: I48135469db4caf150f82df93fff42d2309b23719 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Replace QArrayData::capacityReserved with a full flags fieldThiago Macieira2019-12-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of stealing one bit from the alloc field, let's use a full 32-bit for the flags. The first flag to be in the field is the CapacityReserved (even though the allocate() function will store some others there, not relevant for now). This is done in preparation for the need for more flags necessary anyway. Change-Id: I4c997d14743495e0d4558a6fb0a6042eb3d4975d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Use Q_NAMESPACE for the Qt namespace, and remove the old moc hack to support itOlivier Goffart2019-12-064-191/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since I can't #include qobjectdefs from qnamespace because of circular dependency, move the Qt macro in the qtmetamacros.h header. Deprecate QObject::staticQtMetaObject since now one can just use Qt::staticMetaObject Change-Id: I11982aa17c2afa2067486b113f8052672f3695eb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-051-2/+2
|\| | | | | | | | | | | Change-Id: I9d63a4c4b229a831b5369f6ec74ac97ba6d6556a
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-041-2/+2
| |\| | | | | | | | | | Change-Id: Ia70e81943ef097941339f9ef9ace28592a2eb740
| | * Fix serializing QUuid with QDataStream with Qt 4 stream versionsJoni Poikelin2019-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-76103 Change-Id: Iac92c33539940f5f67d014db5240c6dc14bfb772 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Remove QVariant::operator< and related operatorOlivier Goffart2019-12-042-128/+0
| | | | | | | | | | | | | | | | | | | | | The operator does not have a total order Change-Id: Ifd263c3495aca08c8ccceb9949596c308a76a6c1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-301-0/+3
|\| | | | | | | | | | | Change-Id: Icbb60f8c1891ec2779575276495199ace9d3d6c3
| * | Silence MSVC build of Qt for PythonFriedemann Kleint2019-11-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enclose QAssociativeIterableImpl::advanceImpl within QT_WARNING_DISABLE_DEPRECATED, fixing numerous warnings: MSVC\14.23.28105\include\xutility(727): warning C4996: 'QHash<QString,QVariant>::const_iterator::operator --': was declared deprecated include\QtCore\../../src/corelib/tools/qhash.h(432): note: see declaration of 'QHash<QString,QVariant>::const_iterator::operator --' include\QtCore\../../src/corelib/kernel/qmetatype.h(1217): note: see reference to function template instantiation 'void std::advance<QHash<QString,QVariant>::const_iterator,int>(_InIt &,_Diff)' being compiled with [ _InIt=QHash<QString,QVariant>::const_iterator, _Diff=int ] include\QtCore\../../src/corelib/kernel/qmetatype.h(1253): note: see reference to function template instantiation 'void QtMetaTypePrivate::QAssociativeIterableImpl::advanceImpl<T>(void **,int)' being compiled with [T=QVariantHash] include\QtCore\../../src/corelib/kernel/qvariant.h(793): note: see reference to function template instantiation 'QtMetaTypePrivate::QAssociativeIterableImpl::QAssociativeIterableImpl<QVariantHash>(const T *)' being compiled with[T=QVariantHash] Amends dbb54805f63f9ed68d84fe090d608872f16170d2. Change-Id: Ieb875eaa943100ce1941cb1473b35892330c3889 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-2511-151/+171
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qhash.h src/gui/kernel/qevent.h src/widgets/kernel/qshortcut.cpp src/widgets/kernel/qshortcut.h Change-Id: If61c206ee43ad1d97f5b07f58ac93c4583ce5620
| * | wasm: add platform qsettingsLorn Potter2019-11-141-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the backend is async, the settings will not be ready to read/write instantly as on other platforms, but only be ready after the filesystem has been synced to the sandbox. This takes at least 250 to 500 ms. The QSettings status() or isWritable() can be used to discern when the settings are ready for use. This also fixes a crash in threaded wasm Task-number: QTBUG-70002 Fixes: QTBUG-63923 Fixes: QTBUG-79650 Change-Id: If24c6ada1b91b2a565ed6733da74972c3027f622 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | Make QObjectPrivate::threadData a proper atomicGiuseppe D'Angelo2019-11-1310-109/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QObjectPrivate::threadData used to be a QThreadData *, and was read and written from multiple threads without proper synchronization. As an example, it was read from QCoreApplication::postEvent and written from QObject::moveToThread, therefore causing UB. Port threadData to a proper atomic, removing the races. Fix all usage points. In general, QObject is documented to be simply reentrant, not thread-safe, and certain bits (e.g. timers, moveToThread) are not even reentrant. The reasoning therefore is that a given QObject's threadData is not supposed to be touched by multiple threads without some synchronization happening elsewhere, and therefore relaxed loads should be sufficient. As drive-by change: refactor QCoreApplication::postEvent. It was particularly subtle, because it had a loop using a volatile to cope with the possibility of the receiver object switching thread while we tried to lock its thread's event queue. However, volatile does not achieve any synchronization, so drop it, and refactor the algorithm using better locking primitives. Put this algorithm in a common place, and also reuse it from removePostedEvents, which was lacking any synchronization. Change-Id: Icc755f7eb418ff54b33db4bdd87fd8eaf4e82c7a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | QEventDispatcherWin32: unify input checks in {un}register...()Alex Trotsenko2019-11-131-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The event manager has a family of the functions for registering sockets notifiers, event notifiers, and timers. To ensure efficient debugging, it would be useful to have one approach regarding input parameters validation for the entire set of that functions. Based on registerSocketNotifier() implementation, this patch offers the same debugging principles for QWinEventNotifier and QTimer. Some debug messages have also been refined. Change-Id: I1418ef43c51f7b794462b5e9c8a849633e0c60f9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | QBasicTimer: release timer id on exitAlex Trotsenko2019-11-131-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases of inheritance, timer deletion can be triggered from the event dispatcher destructor where QThreadData::eventDispatcher is already nullptr. Despite the fact that the application is in shutdown phase, we should free the resource. Change-Id: I61ed1d817fd7638953f7d629823f19d4f6f1ee00 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Fix build without features.shortcutTasuku Suzuki2019-11-121-3/+0
| | | | | | | | | | | | | | | | | | Change-Id: I09a1e2e34df6ca1d779a7e36585f70a0d347cde5 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Fix up parts of the QList related docsLars Knoll2019-10-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Remove the class docs for QList and make it point to QVector. Adjust containers documentation and replace QList with QVector in there. Change-Id: I37f712d91b21ad78e017faf9d71cac66f64440b0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Fix all tst_qmetatype breakages after QList to QVector aliasingJędrzej Nowacki2019-10-302-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt6 QList is just a typedef to QVector. To keep Qt5 behavior compatibility we need to register aliases, otherwise some type name based operations would not work. The patch adds automatic registration of QList metatype alias for every QVector. The patch doesn't cover usage of already typedef'ed and aliased QList and QVector, but that should be quite esoteric, especially after introduction of automatic QList and QVector type registration. Change-Id: I84672dda2b159d94e76cdc6034861e7d7ef52533 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Make QList an alias to QVectorLars Knoll2019-10-303-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>