summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QVLA: make (last)IndexOf and contains function templatesGiuseppe D'Angelo2020-10-192-9/+15
| | | | | | | | | | | | Just like QList. [ChangeLog][QtCore][QVarLengthArray] The indexOf, lastIndexOf and contains methods now take an object of any datatype -- and not just the array's own value type. This allows for heterogenous lookup in QVarLengthArray objects. Change-Id: Ibc55191a140612a4e9be46b4d18457415ea3717f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add noexcept to d-ptr accessor functionsAllan Sandfeld Jensen2020-10-191-8/+9
| | | | | | | | | | In theory this could be source incompatible with Q_DECLARE_PRIVATE on a QSharedDataPointer, but that would both be a misuse, and all places where something like that could have been used in Qt, Q_DECLARE_PRIVATE is already manually inlined. Change-Id: I60bdde3a71646129cef84f31624d0432e7af91ab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QProperty: Add value() and setValue() to QBindableUlf Hermann2020-10-191-0/+14
| | | | | | | | This simplifies code that would otherwise need to use the setter and getter in addition to the bindable. Change-Id: Iec6510b4f578f5b223c63b3a0719257a0cf2463d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use valid glyph index for box font engineEskil Abrahamsen Blomfeldt2020-10-191-2/+2
| | | | | | | | | | | | | | | | | | Glyph index 0 is reserved for "glyph not found", which can confuse Harfbuzz. For QFontEngineBox we always return a valid glyph since it is the fallback font when no other fonts are available. Symptom of issue was that we could get to Q_UNREACHABLE for certain strings when Harfbuzz returned a glyph count of 0. [ChangeLog][QtGui] Fixed a potential crash when rendering text with an empty font database. Fixes: QTBUG-85016 Pick-to: 5.15 Change-Id: Iaf1d003cdff57320bf4327aa8e63dffd9d1da82c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Rename add_qt_gui_executable to qt_add_executableAlexandru Croitor2020-10-191-1/+8
| | | | | | | | | | | | | | | | | | Also adjust pro2cmake to use the new qt_add_executable name instead of add_qt_gui_executable. No compatibility functions provided this time, so we'll need to follow through all repos and regenerate all examples. Two reasons for not providing compaitibility functions: 1) We don't intend add_qt_gui_executable to be public API 2) A previous case with qtquickcontrols2 and qttools pointed out that making top-level builds work with cross-compatibility API is not simple. So just go ahead and regenerate everything. Task-number: QTBUG-87661 Change-Id: I2f228827b786ae03bf7e1bf3908ea02a8794ed52 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix QFontDialog::selectedFont() does not return actual selected fontZhang Yu2020-10-191-1/+1
| | | | | | | | | "QFontDialog::accepted" was emitted before setting "selectedFont" to current font. So when calling "QFontDialog::selectedFont()" in slot of signal "QFontDialog::accepted",it does not return actual selected font. Fixes: QTBUG-87483 Pick-to: 5.15 Change-Id: Ic9303e3df73ddd876fc78a0038f9379dbdf1853c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Revert "QRegularExpression: add move constructor(s)"Giuseppe D'Angelo2020-10-192-44/+0
| | | | | | | | | | | | The QRE classes are not ready for move construction. They would need to deal with the possibility of a null-dpointer, and they currently don't; this clashes with the policy of having moved-from classes in valid-but-unspecified state. This reverts commit 733ab10961a4d6539b4d42cf4768e9cb0b88c6a7. Change-Id: I36720dc9d0bf754a980eba373e37abf725cea174 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QRegularExpression: port to QESDPGiuseppe D'Angelo2020-10-192-5/+4
| | | | | | | | | | | | | For QRegularExpressionMatchIterator there is actually one code path that modifies the object itself. Avoid spurious calls to detach() in there by making the detach explicit, and streamline the rest of the code around it. QRegularExpressionMatch only has a const API so it "doesn't care", but port it for consistency. Change-Id: I26881b3af9ae75082dd39462115869b1a9ee1339 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add function to access QLockFile's file nameShantanu Tushar2020-10-182-0/+10
| | | | | | | | This is useful in cases like error handling when you need to print the name of the lock file. Change-Id: Ife4901ed53ae81d19e68cce7f1c173ef3745d56f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use std::void_t instead of the hand-rolled versionGiuseppe D'Angelo2020-10-181-10/+6
| | | | | Change-Id: Ibcf0e3d32f05b95f5f1996a071a50bc0eba1ae61 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix allocated memory of QByteArray returned by QIODevice::readLineKai Koehne2020-10-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | If the maxSize argument is 0 (the default), QIODevice::readLine will allocate a QByteArray with the size of the next chunk of data, which may be quite large. Before returning, it then resizes the byte array to the actual size that was read. But since change 6b884d2aa129, QByteArray::resize() does no longer shrink the capacity. This means that the returned QByteArray keeps it's maximum size as allocated memory. This can lead to excessive memory consumption, especially if the returned QByteArray's are stored for further processing in the client code. Fix this by explicitly calling QByteArray::squeeze() before returning. [ChangeLog][QtCore][QIODevice] Fixes a regression in Qt 5.15 causing QByteArray's that are returned by QIODevice::readLine() to consume large amounts of memory. Fixes: QTBUG-87010 Pick-to: 5.15 Change-Id: I1f95fc4098849e900680fc945238bfeda881022c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QRandomGenerator: optimize for the common use caseThiago Macieira2020-10-182-23/+29
| | | | | | | | | | | | | The most common uses of QRandomGenerator are getting 32- and 64-bit quantities, either through the generate() and generate64() functions or by ones that call those, like bounded() or generateDouble(). So optimize for those with the same entry point by returning one 64-bit value from the _fillRange() function. Further optimize by not requiring a buffer for those two cases, which required us to replace the (begin, end) parameters with (begin, count). Change-Id: I3eb349b832c14610895efffd16356859eecd5397 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Core: Make the metacontainer interfaces constexprUlf Hermann2020-10-181-33/+23
| | | | | Change-Id: Ib8e486a855673b191a9854e1c4d62614a2b87e72 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove QByteArrayList_indexOfGiuseppe D'Angelo2020-10-182-7/+0
| | | | | | | | | It was used as exported symbol for the implementation of QByteArrayList::indexOf. Since then, the implementation has been changed, and this code is unused. Change-Id: I468d05507b6b520cf5bfa4bc567a3d67c43b9a32 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QColorSpace: port to QESDPGiuseppe D'Angelo2020-10-185-61/+42
| | | | | | | | | | Replace the hand-rolled refcount management with QESDP. Since the class has a default-constructed / moved-from state where the d-pointer can be nullptr, add a in-class detach() that ensures a private object. Change-Id: Id81431fa60132dbc0eed45bb60b38d4f7d73833f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Make most of QMetaTypeInterface constexprUlf Hermann2020-10-189-70/+88
| | | | | | | | | | | | | | | | | | The only thing we need to modify at runtime is the typeId and that can be mutable. This way we can have a constexpr ctor for QMetaType which hopefully makes the importing and exporting of related symbols less fickle. On Windows we cannot make QMetaTypeForType constexpr as that leads to mysterious errors in other places. Until we figure out why that is, we just leave this class as non-constexpr. This reveals that qcoreapplication.h and qvariant.h are using QDebug without including it. We now get template instantiation errors. Include qdebug.h to avoid that. Change-Id: If1bf0437ada52459c59c6fa45bab3d22dfb0bc92 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Cbor: Export the datastream operators for QCborSimpleTypeUlf Hermann2020-10-181-2/+2
| | | | | | | | Otherwise they are not available to the tests. This is exposed by making the metatype interfaces constexpr. Change-Id: I1b3214f339985f2f8ffaf0640cf51e41e92198d0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* doc: Update and flesh out native interface docsTor Arne Vestbø2020-10-1810-450/+439
| | | | | | | | | The namespace and overviews are in the qtdoc repository. Docs for individual interfaces should live with their platform. Change-Id: Iba5fd7e9ebc4f1f634ec9dc3ec125ce88a1312ba Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QMutableEventPoint::detach: deref old privateFabian Kosmale2020-10-181-0/+2
| | | | | | | | | | After detaching, the current QMutableEventPoint obviously doesn't reference old QMutableEventPointPrivate anymore. Deref it, so that we do not leak memory. Change-Id: I3b59667603d41f452eead9a2db13e1d005f622ec Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* doc: Make QtGui docs depend on platform integration docsTor Arne Vestbø2020-10-171-1/+2
| | | | | Change-Id: I72cad7f399219d448d78763c50369f087e9d0cf7 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Consistenly deprecate QMultiMap insert, add moving unite overloadVolker Hilsheimer2020-10-172-20/+39
| | | | | Change-Id: I8d1d30f3962b0444c27591bf45b6b3c538172039 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* qcontainerinfo: make variable templates inlineFabian Kosmale2020-10-171-74/+74
| | | | | Change-Id: I09d51f0a04a6dc12915ba6ad0b77af074238988d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qtypeinfo.h: We only need a const reference for most operator<<Ulf Hermann2020-10-171-2/+2
| | | | | | | | | If we require a value, then we need a dtor, too. This is not always the case. For example QSessionManager has a private dtor, leading to failures. Change-Id: I3f715848ff5c63b2ea2773c17bced21e7a814ca9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* MinGW: Fix static direct2d plugin build using PCHCristian Adam2020-10-171-0/+6
| | | | | | | | | | | | | Ammends 27499d25fb6d5b12ee6f97f5a6bedcde53b2dcee The value used to create the PCHs for _WIN32_WINNT is 0x601, and qwindowspointerhandler.cpp requires for MinGW 0x603. Since the precompile header value cannot be undefined while compiling the source file, it's better not to use the PCH for this particular source file. Change-Id: I2dc10fa11f0a796c2d21d8880e32e911359f1602 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Generate qrc files at configure time and make them traceableCristian Adam2020-10-171-1/+4
| | | | | | | | | | | Having the qrc files at configure time allows qmlimportscanner to scan them when invoked with -qrcFiles argument. The traceability part is done via _qt_generated_qrc_files property. Task-number: QTBUG-85994 Change-Id: I75c252a987cd1c1f49ba73ec9d100edc73c23486 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Generalize the winmain/qtmain entry-point libraryTor Arne Vestbø2020-10-178-47/+46
| | | | | | | | | | The use-case is relevant for other platforms as well. Now that Qt has a module system we can also replace a lot of the hand crafted logic for linking with simpler constructs. Change-Id: Ib6853aaf81bfea79c31f2de741d65b4b56f23ef6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Inline the members for QRecursiveMutexLars Knoll2020-10-172-72/+36
| | | | | | | Avoid creating a a d pointer for recursive mutexes. Change-Id: I28af15a416ee17de346e2ea5b1442279d9d3e159 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* <chrono> should always be available with C++17Lars Knoll2020-10-171-6/+0
| | | | | Change-Id: Ia4868259bfa25e4b929a51de6de580df7277c282 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Split QMutex and QRecursiveMutexLars Knoll2020-10-177-244/+239
| | | | | | | | | | | | | | | | | | | | | | | These classes should not inherit from each other anymore in Qt 6. The reason is that this makes the 95% case of using a non-recursive mutex much slower than it has to be. This way, QMutex can now inline the fast path and be pretty much as fast as QBasicMutex is in Qt 5. They actually use the same code paths now. The main difference is that QMutex allows calling tryLock() with a timeout, which that is not allowed for QBasicMutex. [ChangeLog][QtCore][QMutex] QMutex does not support recursive locking anymore. Use QRecursiveMutex for that purpose. QRecursiveMutex does not inherit QMutex anymore in Qt 6. Change-Id: I10f9bab6269a9181a2e9f534fb72ce65bc76d989 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Refactor QMutexLocker to be able to handle recursive mutexesLars Knoll2020-10-178-52/+39
| | | | | | | | Since we're going to split QMutex and QRecursiveMutex into separate classes, make sure QMutexLocker is prepared for that. Change-Id: Id5e9a955d1db7c8ee663dd3811ad6448dad0aeae Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix the initial cursor state for the VNC pluginMagnaboscoL2020-10-171-1/+4
| | | | | | | | | Ensure that we show a cursor directly after a client connects. Fixes: QTBUG-85006 Pick-to: 5.15 Change-Id: Icb604beb1b0ca2e7efa42ac01c2aac0a3e002865 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Cleanup remaining QVariant::Type uses in Qt SqlLars Knoll2020-10-172-25/+27
| | | | | Change-Id: Ibcaa678cd9f9c957392a75b477fa6821f9a69127 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QWindowSystemInterface: Add tablet event overloads without timestampsFriedemann Kleint2020-10-172-0/+34
| | | | | | | | On some platforms, tablet events do not have a time stamp. Task-number: QTBUG-46412 Change-Id: I3cc820b1edaaf55511c000fefb805f5a3a7872a6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix Clang compiler warnings (-Wrange-loop-analysis)David Skoland2020-10-177-16/+16
| | | | | | | | | | | | | | | In a macOS environment, Clang throws a number of compiler warnings about loop variables when building qtbase. See task for more info about the environment. This changes a handful of loop variables, like QJsonValue references into QJsonValueRefs. Task-number: QTBUG-87216 Pick-to: 5.15 Change-Id: I26006efd7c75c2d56ebc7f7efb4c9bdcabe92e8b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Implement move and comparison operators for QEventPointVolker Hilsheimer2020-10-173-4/+76
| | | | | | | | QEventPoints are equal when all data values are equal, the refcount is ignored. Change-Id: I6ef70faf0b12129eaa22bfc1f0a45bab2422d421 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* sqlite: Upgrade to 3.33.0Andy Shaw2020-10-173-9937/+10673
| | | | | | | | | [ChangeLog][QtSQL][sqlite] Upgraded to v3.33.0 Pick-to: 5.15 Pick-to: 5.12 Change-Id: I379d8c62b449d4c6b04e5154c8c1a86761e5466e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QColorConstants: code tidiesGiuseppe D'Angelo2020-10-171-172/+167
| | | | | Change-Id: Ib4131a583529d2cd6a6d7d27513cca387cb1d722 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix compilation with optimization with g++-10.2Andreas Buhr2020-10-161-0/+3
| | | | | | | | | | | | | | When compiling in RelWithDebInfo configuration with g++-10.2, it complains: qtbase/src/gui/painting/qdatabuffer_p.h:71:36: error: argument 1 range [18446744065119617024, 18446744073709551612] exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=] This patch disables this warning in this place. Pick-to: 5.15 Change-Id: Id3154ce80a1921671031828aaa7144214adad5dd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Rename some public API functionsAlexandru Croitor2020-10-163-38/+31
| | | | | | | | | | | | | | | | | | | Some of them have a different (hopefully better) name now. Some are marked as Technical Preview. Some are renamed to be internal. Marking add_qt_gui_executable as TP with the intention to un-TP it after we rename it and change its behavior as discussed in the API review meeting. Additional changes to add_qt_gui_executable and qt6_add_resources have been filed as separate tasks that will be worked on separately. See comments on PS1 for details. Task-number: QTBUG-86827 Change-Id: I56a84a1943b0902bb807310dc620eb381824e8dd Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Fix qt_add_plugin to be a proper public API functionAlexandru Croitor2020-10-161-6/+1
| | | | | | | | | | | | | | | | | | | | When configuring an example like widgets/tools/plugandpaint/plugins/basictools outside of a Qt build, the configuration fails because it tries to call the internal function instead of the public one. This was needed some time ago to facilitate moving from qt_add_plugin to qt_internal_add_plugin, so some compatibility code was added. But we've now migrated to qt_internal_add_plugin across most repos, so we should remove the compatibility code to allow examples to configure successfully. Amends 6fbeef4c6b2323fc4b7856520c0f38f8139c9c54 Fixes: QTBUG-86858 Change-Id: Ib15f50351a8742c44d7a8be84be4e576cb48bddb Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Document (some) Qt6 changes for QtWidgetsVolker Hilsheimer2020-10-161-0/+47
| | | | | | Change-Id: I8185e7c4d46f77fa80ad351e1e73d53ca30201a6 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix warning, make sure temporary is moved into return valueVolker Hilsheimer2020-10-161-2/+2
| | | | | | | | Seen on clang 12; might be a compiler bug, but doesn't hurt either. Change-Id: I4aba8406c99951106e57fe9e61c688e649963cd6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Don't divide by zero when calculating number of itemsVolker Hilsheimer2020-10-161-1/+1
| | | | | | | | | | | | | | | Amends e74af68654c0eb127277c73e20bda409b83d157b. If the model has children, then row 0 should have a non-zero size, but it's not unthinkable that a delegate returns zero for size hint, so protect against that case. Task-number: QTBUG-87588 Pick-to: 5.15 Change-Id: Ia396f532d42ce5fad8757d629816c3cdc31d84ed Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org>
* QAbstractItemView: don't lose items if model only allows MoveActionVolker Hilsheimer2020-10-165-15/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a model only allows MoveAction, then calls in the view/widget subclasses' dropEvent implementation to set the event's drop action to CopyAction will fail. QAbstractItemView will then remove the item when QDrag::exec returns. Instead of abusing the event actions for this, store explicitly that the dropEvent implementation already moved the item. If the flag is set, don't remove the item. In QListView, which uses moveRow to move items in the dropEvent handler, handle the case that the model might not implement moveRows. In that case, or when dropping an item onto another item (to overwrite data), fall back to the default implementation of QAbstractItemView. Sadly, it is impossible to know whether a model doesn't implement moveRows, or whether the move failed for other reasons, so this requires a bit of extra special case handling. QListView in IconMode is particularly odd in that it moves the item in the view, but not in the model. This follows up on fd894fd68edf3d67975cda8eb9dda43646887b0d and fixes additional issues discovered during debugging. Extend the existing unit test; since drag'n'drop runs a modal, native event loop on most systems, it still only runs on the Xcb platform. Change-Id: I6c5377e2b097c8080001afe904d6d3e4aed33df4 Pick-to: 5.15 Fixes: QTBUG-87057 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Q(E)SDP(V2): fill the API gap left by take()Giuseppe D'Angelo2020-10-163-2/+57
| | | | | | | | | | | | | | | | | | | | | | | | take() returns a pointer to the shared data object *without* decrementing the reference counter. The primary use case is adopting the object from a Q(E)SDP into a different reference counting mechanism. This is fine, but if we support the "extraction" part, we shall also support the "adoption" part. Also, the API for the shared data pointer classes should match. Add an adopting tag type and suitable constructors to the shared data pointer classes, and add take() to the classes lacking it. Drive by, apply qExchange to take()'s implementation. [ChangeLog][QtCore][QAdoptSharedDataTag] New class. It is now possible to adopt pointers to shared data into a QExplicitlySharedDataPointer or a QSharedDataPointer object without incrementing the object's reference counter. Change-Id: I62b8b005c1bfbe2add58566206fca27634bb7e70 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMetaType: Silence float comparison warnings in QEqualityOperatorForTypeUlf Hermann2020-10-162-0/+6
| | | | | | | | We actually do want to invoke the original equality operator there. If that is unsafe, we cannot do much about it at this point. Change-Id: Iadb2eaba1156828d89022d282c41bda57b500b13 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix "variable set but unused" in qvariant.cppUlf Hermann2020-10-161-1/+1
| | | | | | | ... how did that pass the CI? Change-Id: I84baaf3632df0410d1fb25f24fd22f65daae13af Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add comparison operators to shared data pointersAllan Sandfeld Jensen2020-10-161-32/+28
| | | | | | | To avoid they are compared as bools, or ambiguously. Change-Id: I1495b3126a71c1379e72d4cf53b1a67590eb9f4b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove redundant duplicate of EnableForNonVoid in QFutureWatcherAndrei Golubev2020-10-161-7/+1
| | | | | | | | | qfuturewatcher.h includes qfuture.h, which includes EnableForNonVoid through qfuture_impl.h header. Thus, there is never a need to keep the same alias in QFutureWatcher as it always can use one from QFuture Change-Id: I293fd087aea1a21ef5bcfdf50cdefc176a9703d0 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Fix subtle SFINAE problem in QPromise::addResultAndrei Golubev2020-10-161-3/+1
| | | | | | | | | | | | | | Accidentally found out that we enable/disable QPromise::addResult based on type deduced from input argument, instead of using "value_type" of QPromise itself, which is wrong Simplified the checks to a single one - EnableIfSameOrConvertible<InputType, StoredType> as this is sufficient to account for both cases: QPromise<void> and QPromise<T> with input, convertible to T Change-Id: I657998c0e26241b0fc5e70988622984ece8871df Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>