summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
Commit message (Collapse)AuthorAgeFilesLines
* wasm: fix native timer update for the no-timer caseMorten Johan Sørvig2021-11-111-2/+10
| | | | | | | | | | | | | QTimerInfoList::timerWait() does not update the timespec out argument if there are no active timers, which caused the current code to calculate an arbitrary toWaitDuration. Instead use the timerWait() return value, and clear any native timers if there are no active Qt timers. Pick-to: 6.2 Change-Id: I7d5ec4c2930000bece6f6ea6c63e76f4df543b04 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: make timers work for the new event dispatcherMorten Johan Sørvig2021-11-111-3/+0
| | | | | | | | | | Don’t exit from the timer callback if there is no main thread event dispatcher, since it could be that the main thread event dispatcher is of the old event dispatcher type. Pick-to: 6.2 Change-Id: Ibb7a34a99e2001b52d2a985022f5baa7cd2152bf Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* qmetatype.cpp: provide missing initializer for const variableThiago Macieira2021-11-101-1/+1
| | | | | | | | qmetatype.cpp(1565): warning #854: const variable "metatypeHelper" requires an initializer -- class "struct <unnamed>" has no user-provided default constructor Change-Id: I2bbf422288924c198645fffd16a9b868ff7adcb9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Don't quit application if we're not in execTor Arne Vestbø2021-11-081-0/+3
| | | | | | | | | | | | | | | | The documentation states that the function will not have any effect before control enters the main event loop. Prior to 0c02f133f3daee1 this was incidentally true due to QCoreApplication::exit just setting quitNow to true and exiting all the event loops (which before exec were none), and exec() setting quitNow to false explicitly. But now that we plumb the quit down to the platform we can't rely on this incidental behavior, and need to check explicitly. Fixes: QTBUG-98088 Pick-to: 6.2 Change-Id: I54cece3630e39e4456abc3b372839c0b5c4c4713 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QCoreApplication: document the app's bindir is in libraryPaths()Thiago Macieira2021-11-051-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The QCoreApplicationPrivate::appendApplicationPathToLibraryPaths() function has been there since at least Qt 4.5.1, so the documentation for appendLibraryPaths() hasn't matched behavior for a minimum of 13 years. The documentation for libraryPaths() has mentioned this fact, though. Searching the application's bin dir is normal on Windows, as many application packages are a flat install with the .exe and all .dlls in one dir. I find it questionable to do so on Unix, though: any and all applications expecting to be installed by a Linux distribution would not install plugins to /usr/bin, whereas on macOS bundles have their own organization anyway. But I'm not prepared to change the behavior without more justification. I can think only of broken configurations (such what is described in QTBUG-97950 where a combination of bad decisions led to scanning all of /usr/bin) and running an executable that is stored in a world-writable directory. Task-number: QTBUG-97950 Pick-to: 6.2 Change-Id: Ice04365c72984d07a64dfffd16b440868373d7a5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: Move Q_OBJECT_COMPUTED_PROPERTY to QObjectComputedPropertyLuca Di Sera2021-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | `Q_OBJECT_COMPUTED_PROPERTY` is a macro that is used to declare a `QObjectComputedProperty`. The documentation for the macro was related to the `QObjectCompatProperty` documentation, which is internal. A link to `Q_OBJECT_COMPUTED_PROPERTY` appears in `QObjectComputedProperty`'s page, but fails to resolve as the required documentation page is internal. Furthermore, `QObjectCompatProperty` has a macro that is equivalent to `Q_OBJECT_COMPUTED_PROPERTY`, `Q_OBJECT_COMPAT_PROPERTY`, whose documentation is declared related to `QObjectCompatProperty`. It is hence assumed that relating the documentation for `Q_OBJECT_COMPUTED_PROPERTY` to `QObjectCompatProperty` was a typo, such that the documentation for the macro is now moved to be related to `QObjectComputedProperty`, resolving the linking issue in the process. Task-number: QTBUG-96127 Pick-to: 6.2 Change-Id: I2c1bfd6ba64f13e186c65701593047b64bf0c199 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
* Extract Header qbindingstorage.hMarc Mutz2021-11-042-62/+119
| | | | | | | | | | | | | | | QBindingStorage doesn't depend in-size on much else in qproperty.h, but is used in-size in qobject.h, thus requiring qobject.h to include qproperty.h. As a first step, move the class and the bits it actually depends on, to a separate header file, qbindingstorage.h, and, for now, just include that from qproperty.h. The end goal here is to make qobject.h independent of qproperty.h. Pick-to: 6.2 Change-Id: I44245a5e57473067e3106d1fd70bf2d744ce0a5f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* wasm: enable event dispatcher asyncify supportMorten Johan Sørvig2021-11-042-23/+9
| | | | | | | | | | | | | | | | | | | | | Misc. fixes, including: Fix a couple of typos in the JavaScript code. Also, macros- within-macros don’t work, (without resorting to preprocessor token pasting), so remove the debug output for now. Limit the exec() “simulateInfiniteLoop” workaround to top-level application exec() only. This way, asyncify can be used for nested QEventLoop::exec() calls. (Emscripten supports one level of suspend only, so we don’t want to use that for the top-level exec(), but instead use it for dialogs and such). Use the new QEventLoop::ProcessEventsFlag::ApplicationExec enum value to detect the exec() call type. Change-Id: Ic702bfc31faf2e9f84ac5d3ccf43d067c5c61bf0 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Add QEventLoop::ProcessEventsFlag::ApplicationExecMorten Johan Sørvig2021-11-033-2/+4
| | | | | | | | | | | | | | The wasm event dispatcher needs to differentiate between top-level QCoreApplication::exec() and QEventLoop::exec() calls. Add the “ApplicationExec” enum value. The value is undocumented, like EventLoopExec and DialogExec. Change-Id: I2924daee39ef85a3ea7e766e317b3071b5d7f541 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add warning about QCoreApplication deferred deleteMichal Klocek2021-11-011-0/+4
| | | | | | | | | | | | | | | In some bug reports we got code which does deleteLater() on QCoreApplication, however this is not going to work as the user may expect. In cases where an application uses Qt WebEngine, this leads to weird looking crashes on exit as webenginecontext is not destroyed. Pick-to: 6.2 5.15 Change-Id: I4d284f30b0c7cad15ba6da3d65cdf813c36ee036 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Inline QPropertyBindingDataPointerAndrei Golubev2021-11-012-11/+12
| | | | | | | | | | | | The only non-inline function of that class was observerCount() which would use two of the inline functions defined in the header file, so we can safely inline observerCount() and make the whole class contain only inline methods Consequently, inline class doesn't have to be exported in Windows Change-Id: I41d144d9a50420bbc0091992b36cc36ac2567704 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QMetaType: Avoid superfluous template instantiationsFabian Kosmale2021-10-292-11/+8
| | | | | | | | | | | | Apparently msvc still parses the template and generates code for it when it encounters an extern template declaration. Thus, instead of speeding up compilation, it gets slowed down significantly as the instantiation would happen in every compilation unit that (transitively) included qmetatype.h. Task-number: QTBUG-97601 Change-Id: Id5e934afb14ad8973df1b9197aef336b22220111 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Extend documentation for bindable propertiesIvan Solovev2021-10-291-4/+9
| | | | | | | | | | | | | Extend the general property system page with a section on how to use bindable properties. Add some cross-references to improve the user experience. Task-number: QTBUG-97656 Pick-to: 6.2 Change-Id: I2520cdc168e3a8a66ea387e4ab717f4e0f969424 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QObjectComputedProperty docs: move example to snippetIvan Solovev2021-10-261-36/+1
| | | | | | | | | | | This patch amends 89a4c8d40d2ee1b8794dd7fcf80d226c5c87ba6c. It moves the code sample into a separate snippet file, which allows us to use Q_OBJECT macro in it without complaints from moc. Task-number: QTBUG-97656 Pick-to: 6.2 Change-Id: I368d8dd8c00dbbebd8a6bf3788be796c8ca4bce8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Make QObjectComputedProperty documentation visibleIvan Solovev2021-10-251-2/+0
| | | | | | | | | | | QObjectComputedProperty belongs to public API. It's even referred in other documentation (for example, QBindable). It does not make sense to have its documentation marked as \internal. Task-number: QTBUG-97656 Pick-to: 6.2 Change-Id: I6ca81292cfafea873dd3577fb0e5ddb583969dc3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Fix qdoc warningsVenugopal Shivashankar2021-10-231-4/+4
| | | | | | | | | | | | | | | | | src/corelib/kernel/qmetatype.cpp:1605: (qdoc) warning: Command '\snippet (//! [[implicit]])' failed at end of file 'qmetatyp> src/corelib/kernel/qmetatype.cpp:1615: (qdoc) warning: Command '\snippet (//! [[member]])' failed at end of file 'qmetatype/> src/corelib/kernel/qmetatype.cpp:1626: (qdoc) warning: Command '\snippet (//! [[memberOk]])' failed at end of file 'qmetatyp> src/corelib/kernel/qmetatype.cpp:1639: (qdoc) warning: Command '\snippet (//! [[unaryfunc]])' failed at end of file 'qmetaty> src/corelib/text/qbytearraymatcher.cpp:233: (qdoc) warning: No such parameter 'view' in QByteArrayMatcher::indexIn() src/corelib/time/qdatetime.cpp:1854: (qdoc) warning: Can't link to 'QLocaleie:pmText()' src/corelib/thread/qsemaphore.cpp:494: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text src/corelib/thread/qsemaphore.cpp:505: (qdoc) warning: Undocumented parameter 'timeout' in QSemaphore::try_acquire_for() src/corelib/thread/qsemaphore.cpp:505: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text src/corelib/thread/qsemaphore.cpp:516: (qdoc) warning: Undocumented parameter 'tp' in QSemaphore::try_acquire_until() src/corelib/thread/qsemaphore.cpp:516: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text Change-Id: Ib612c69525ec7542f2ad3dd9a07e89f266718fd8 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Remove superfluous qfuture.h includes from qcoreapplication[_p].hJoerg Bornemann2021-10-223-6/+2
| | | | | | | | | | | | | | | | | This include is only needed on Android, and removing it improves build times slightly. Remove the include from qcoreapplication.h and guard the includes in qcoreapplication_platform.h properly for Android. Remove the include from qcoreapplication_p.h as well. This was a left-over from the app permissions API that was removed. Pick-to: 6.2 Task-number: QTBUG-97601 Change-Id: I131baebe3e08e93ad5420d40908c2dceab89554c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove unused qapplicationpermission.hJoerg Bornemann2021-10-223-81/+0
| | | | | | | | | The app permission API was removed, and this file is a left-over. This amends commit 72e5b36e2e4c79dc7995f0203968503266b4f2f5. Pick-to: 6.2 Change-Id: Ie1bf9465260594864464c4d4ee4dc99593c28cc1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Help the compiler avoid duplicate TLS lookupsUlf Hermann2021-10-201-2/+4
| | | | | | | | | Most compilers are clever enough to optimize this out. Yet, even with optimizations disabled, we don't want to do two TLS lookups here. Change-Id: I822954c7cec591084d6c27c916818dab7e000ea9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Optimize QObjectCompatProperty::notifyUlf Hermann2021-10-203-25/+44
| | | | | | | | Do the check for inBindingWrapper() last. Change-Id: I3d589c9fba524f465e35cd4cc0e65e3af376b419 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QObjectCompatProperty: Add support for custom gettersIevgenii Meshcheriakov2021-10-203-11/+31
| | | | | | | | | | Add additional template argument to QObjectCompatProperty to specify a custom getter. This may be useful for classes like QAbstractProxyModelPrivate the need to customize property getters. Task-number: QTBUG-89655 Change-Id: I34fe4bdebbbf1446aff60bd20a946454607f52d5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Compile Private API autotests for INTEGRITYTatiana Borisova2021-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | - GHS's __PRETTY_FUNCTION__ (used by QT as Q_FUNC_INFO) doesn't have spaces round the = operator when indicating the type of the template parameter. The compilation error: qt5/qtbase/src/corelib/kernel/qmetatype.h", line 2104: note #3316-D: cannot access position 53 in array of 49 elements constexpr const char *begin = func + prefix; ^ detected during: instantiation of "auto QtPrivate::typenameHelper<T>() [with T=void]" at line 2186 Task-number: QTBUG-97087 Pick-to: 6.2 Change-Id: I33e61f5d54a61944a5aecf07d149a8dee0ef1e5d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Disable copy and move for QPropertyObserverNodeProtectorUlf Hermann2021-10-191-1/+4
| | | | | | | It's not intended to be copied or moved and static analysis complains. Change-Id: I2ac2eccadb66ea572cf297f16af693b15553a1b9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Inline a few methods of QPropertyObserverPointerUlf Hermann2021-10-182-99/+111
| | | | | | | | This is necessary to optimize QObjectCompatProperty::notify in a second step. Change-Id: I89aaf51d39e04f17285f7db27f9b40d145fd846d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QProperty: Eliminate further unnecessary TLS operationsUlf Hermann2021-10-182-6/+13
| | | | | | | | | If we don't have a binding, we don't need to remove it. We can figure this out without TLS lookup. Pick-to: 6.2 Change-Id: I0cb20f2a68a119df7742631e307002e3813eac03 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QProperty: Don't needlessly calculate inBindingWrapper()Ulf Hermann2021-10-181-14/+14
| | | | | | | | | If there is no binding data, we don't need it. inBindingWrapper() involves a TLS lookup. Pick-to: 6.2 Change-Id: I829f314d708b80821e907124eef4aec758bbbc6a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Decouple quitOnLastWindowClosed from quitLockEnabledTor Arne Vestbø2021-10-182-13/+30
| | | | | | | | | | | | | | | | | | | In a512e210ac5b032c5fc2edf1ddf72e5a414485fda512e21 quitOnLastWindowClosed was changed to be implemented in terms of quitLockEnabled, but without any documentation to that end. Although the two features are similar (automatic quit under certain conditions), and interact, it doesn't make sense to overlap them until we actually expose them as a single property (automaticQuit e.g.) The logic for determining whether we can can quit automatically has been refactored to take both properties into account, on both a Core and Gui level. The call sites still need to check the individual properties to determine whether to activate automatic quit for that particular code path. Change-Id: I38c3e8cb30db373ea73dd45f150e5048c0db2f4d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QTimer: Add \note in documentationFan RuiJie2021-10-141-0/+2
| | | | | | | | | | Keeping the event loop busy with a zero-timer like that is bound to cause trouble and highly erratic behavior of the UI. Fixes: QTBUG-96869 Pick-to: 6.1 6.0 5.15 Change-Id: Idf02a7a7e0689c59e1223610a6525262ead56d8d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix \notes in QObjectIvan Tkachenko2021-10-131-3/+3
| | | | | | Pick-to: 5.15 6.2 Change-Id: Ic442f56d3fb0c3e073c3cd69f193829958550296 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QEventDispatcherWasm: Fix typo in debug messageJonas Kvinge2021-10-121-1/+1
| | | | | | Pick-to: 6.2 Change-Id: I183de5fd477b9529dd5272c88a196b9bebf4ab66 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* corelib: Fix typos in documentationJonas Kvinge2021-10-128-10/+10
| | | | | | Pick-to: 5.15 6.2 Change-Id: I64d63af708bc6ddaabd12450eb3089e5077f849e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* corelib: Fix typos in source code commentsJonas Kvinge2021-10-129-12/+12
| | | | | | Pick-to: 6.2 Change-Id: Ic78afb67143112468c6f84677ac88f27a74b53aa Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix compilation with -traceFabian Kosmale2021-10-071-1/+1
| | | | | | | | | Fixes: QTBUG-97241 Pick-to: 6.2 Change-Id: I877c6f0792ad2281ccfc73b7549dad7d6bd68995 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Return a plain QMetaObject* from toDynamicMetaObject()Ulf Hermann2021-10-072-2/+5
| | | | | | | | | | | | | | | | | | | The only place where we use it, we swiftly cast it to QMetaObject* anyway. Generating an object with virtual methods, only to then cast to its non-virtual base type is dangerous. Also, if we are required to return a QAbstractDynamicMetaObject from a method of QDynamicMetaObjectData, we cannot implement QDynamicMetaObjectData without also implementing QAbstractDynamicMetaObject. This indirectly forces us to copy metaobjects around as we cannot wrap an existing metaobject into a QDynamicMetaObjectData subclass. Copying metaobjects around makes QMetaObject::inherits() unusable because inherits() assumes identity is determined by identity of the pointer. Change-Id: Icbe697efa6fd66649eef3c91260c95cda62e3c90 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix __cpp_lib_hypot related error when building in macosAlexey Edelev2021-10-051-1/+1
| | | | | | | | | | | | | | | If __cpp_lib_hypot is undefined in macos you may observe the error: error: '__cpp_lib_hypot' is not defined, evaluates to 0 [-Werror,-Wundef] Adding the explicit check for definition suppresses the warning that is treated as an error. Change-Id: Ie4c185fefde2f5bab699d8fc79b6a170e64af393 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* QEventLoop: remove unnecessary bits of Qt 5 suggestionThiago Macieira2021-10-041-3/+1
| | | | | | Pick-to: 6.2 Change-Id: I2bbf422288924c198645fffd16a974803ab43b7f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove checks for features available in C++17Ievgenii Meshcheriakov2021-10-021-4/+0
| | | | | | | | | | This patch removes most of the checks that are made using C++20 __cpp_* macros for features available in C++17 and earlier. Library feature check macros (__cpp_lib_*) are unaffected. Change-Id: I557b2bd0d4ff09b13837555e9880eb28e0355f64 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* wasm: fix runOnMainThread()Morten Johan Sørvig2021-10-011-6/+10
| | | | | | | | | | | Calling emscripten_async_run_in_main_runtime_thread_() with a pointer to a static lambda was too clever, use an anonymous function as callback instead. Pick-to: 6.2 Task-number: QTBUG-94344 Change-Id: I2d8a8b0ffc2dd1d02018aa5902550216d00f641d Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* QWinRtFunctions::await() - introduce early exit conditionIvan Solovev2021-10-011-8/+19
| | | | | | | | | | | | | | | | | | The await() method waits for the result of async operation in a non-blocking way (triggering processEvent periodically). It means that during this wait some other things might happen, and there would be no reason to wait for the end of the operation execution. This patch implements an additional parameter - a function that specifies a condition for an early return. When this function returns true, the await() method returns with E_ABORT, which makes it possible to distinguish it from timer expiration. Task-number: QTBUG-96057 Pick-to: 6.2 5.15 Change-Id: Ide73d768b7cbb3a35be7160ce7555aeb2dca5235 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
* Doc: Use correct \relates targetPaul Wicking2021-10-011-2/+2
| | | | | | | | | | | \relates takes a class name as argument, but doesn't deal nicely with a templates full definition. Pick-to: 6.2 Task-number: QTBUG-97028 Change-Id: I7c608717c5d552bc553073534104dece01b8ff96 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Assume that <variant> header is always presentIevgenii Meshcheriakov2021-10-011-9/+0
| | | | | | | | | This header is a C++17 feature that is already used unconditionally in qtypeinfo.h. Change-Id: I26330d298e95102f3e94c0c69fc95c1025666eb4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove checks for C++ standard versions C++17 and belowIevgenii Meshcheriakov2021-10-012-4/+4
| | | | | | | | | | | Qt requires a compiler that support C++17 thus __cplusplus is always 201703L or higher. This patch removes checks for __cplusplus value that always succeed. Change-Id: I4b830683ecefab8f913d8b09604086d53209d2e3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* wasm: limit exec() workarounds to the main threadMorten Johan Sørvig2021-09-301-4/+6
| | | | | | | | | | This fixes a bug where calling exec() on a secondary thread would make the thread exit. Task-number: QTBUG-94344 Pick-to: 6.2 Change-Id: I259c7ebbd53271609af88aca141d88c282cbcd34 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* QMetaType: Expand and clean up converter/view function documentationFabian Kosmale2021-09-302-30/+17
| | | | | | | | | | | | | | This adds a few snippets to show how the functions can be used, and also removes workarounds for oldver versions of qdoc that weren't clang based - those workarounds also seem to have caused some bitrot. Remove documentation for an overload of registerMutableView that currently does not exist (for a member function with an ok parameter). Fixes: QTBUG-96963 Pick-to: 6.2 Change-Id: Ibc867d08bcacbc7add8c965df9864d6f339a5d54 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Convert all QT_VERSION checks to compare against QT_VERSION_CHECK()Edward Welbourne2021-09-231-3/+4
| | | | | | | The result is generally more readable. Change-Id: I507f67954ecd38516de1b7a6f8244c233ee45ddf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove fatuously true or false QT_VERSION checksEdward Welbourne2021-09-231-15/+1
| | | | | | | | | QT_VERSION is now at least QT_VERSION_CHECK(6, 3, 0), so remove all checks against Qt 6.0.0 or earlier. They are superfluous. Tidied up in some places in the process, particularly #include order. Change-Id: I2636b2fd13be5b976f5b043ef2f8cddc038a72a4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove redundant semi-colonsAllan Sandfeld Jensen2021-09-221-4/+4
| | | | | | | | Causes warnings with clang-cl Change-Id: I57395819debe07aecd045c5a8c747632e6c04fc1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVariant::Private: select storage in get at compile timeFabian Kosmale2021-09-211-1/+1
| | | | | Change-Id: I82b0a7ec28400dac64ea785ba6766ca488e615aa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVariant: write less haphazardly to dataFabian Kosmale2021-09-211-2/+2
| | | | | | | | While the data subobject is at the same position in memory as the QVariant::Private, using d.data actually activates the union member. Change-Id: Ie6879b588c8e830ae8b34cfcd8e9ddff8b60b3a6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QProperty: attempt to fix compilation with GCC 10Thiago Macieira2021-09-211-1/+1
| | | | | | | | | | | | Somehow it's not expanding properly in constexpr time. qproperty_p.h:554:30: error: \u2018(QItemSelectionModelPrivate::modelChanged != 0)\u2019 is not a constant expression if constexpr (Signal != nullptr) { ~~~~~~~^~~~~~~~~~ Fixes: QTBUG-96659 Change-Id: I3eb1bd30e0124f89a052fffd16a69d2eb4b45784 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>