summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
...
* Add some comments to clarify meaning of observers in property systemAndreas Buhr2020-12-211-3/+3
| | | | | | | | | It took me quite a while to figure out that two objects with a similar type and a similar name which occur side by side have a quite different meaning. Add a comment for the next one. Change-Id: Idf4d63d8ed09ead2c3d82a798e6d7476024209bf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QProcess/Unix: speed up initialization of write notifierAlex Trotsenko2020-12-181-3/+2
| | | | | | | | By using new QSocketNotifier API, we can avoid unnecessarily enabling the notifier right before turning it off again. Change-Id: Ie0dea00251e9885653677c495dfc5abaaa4db1c7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Disallow construction of QPropertyBinding from a propertyFabian Kosmale2020-12-181-5/+1
| | | | | | | | | | | | | | | | | | | | | This would steal an existing binding from a property, which is most likely not the intended action. Alternatively, we could make it equivalent to Qt::makePropertyBinding(foo), but that conflates properties with bindings to it. On the other hand, this would avoid a potentially source-breaking change. [ChangeLog][Potentially Source Breaking Change] It was possible to create a QPropertyBinding from a property; this would steal any set binding from the property or create an invalid binding if none was set. Use makePropertyBinding if you want to to create a binding which depends on the property's value, or takeBinding if you want to repurpose the property's binding. Fixes: QTBUG-89507 Pick-to: 6.0 Change-Id: Icd2d3b9261b60f36948f2cea9c33ddbea36efbc1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QProperty add markdirtyFabian Kosmale2020-12-184-0/+76
| | | | | | | | | | | This adds functionality for marking properties (QProperty and related classes) manually as dirty. This facilliates the integration of bindable properties with non-binable properties and makes it possible for bindable properties to change due to external events. Fixes: QTBUG-89167 Change-Id: I256cf154d914149dacb6cadaba92b13c88c9d027 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QSocketNotifier: hone setSocket() APIAlex Trotsenko2020-12-172-9/+8
| | | | | | | | Remove a second argument to the setSocket(qintptr, bool) function as it makes the API harder to understand. Change-Id: Ib1852a4e9d96adde35bfbf0fe03b386d9ded395a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QProcess/Unix: do not create pipes for forwarded channelsAlex Trotsenko2020-12-171-13/+28
| | | | | | | | | | | | | | | | | | The child process inherits a standard handle of the main process in such cases: stdin - inputChannelMode == QProcess::ForwardedInputChannel, stdout - processChannelMode == QProcess::ForwardedChannels || processChannelMode == QProcess::ForwardedOutputChannel, stderr - processChannelMode == QProcess::ForwardedChannels || processChannelMode == QProcess::ForwardedErrorChannel || processChannelMode == QProcess::MergedChannels For these combinations we should not create pipes and notifiers as they would not be used. Change-Id: I8e3836e4d840a40b338c85c54645539ebcaab3f6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Q_OBJECT_BINDABLE_PROPERTY: Silence warnings properlyFabian Kosmale2020-12-171-5/+4
| | | | | | | | | For some reason, clang (and thus Qt Creator's code model) did still warn about the offsetof usage. Moving the warning pragmas one layer higher appears to fix the issue. Change-Id: I1ee1cfd690fdcce9105c65e508203a722fe63151 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* CMake: Fix 'static' conditionsJoerg Bornemann2020-12-171-2/+2
| | | | | | | | | The pro2cmake script doesn't handle static scopes correctly, and the generated "CONDITION static" must read "CONDITION NOT QT_BUILD_SHARED_LIBS". Change-Id: Ic5a5763e9fd5f5d04fb4c12227cbe85fac17b826 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Bindable property with initializationIvan Solovev2020-12-174-2/+87
| | | | | | | | | | Implement Q_OBJECT_BINDABLE_PROPERTY_WITH_ARGS and Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS macros. They allow to directly initialize the property member. Task-number: QTBUG-85520 Change-Id: I76541d6785bbbf27976b9f0b865fb45be1e9beee Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add sections about std containers and algorithmsOle-Morten Duesund2020-12-172-0/+72
| | | | | | | | | | | Add section comparing Qt containers and std containers. Add snippets showing use of std algorithms with Qt containers. Task-number: QTBUG-86584 Pick-to: 6.0 Change-Id: I1133a5214a5acd086c37658ca11ab205a19a489b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QCache: fix updating entries breaking the internal chainMårten Nordheim2020-12-161-4/+5
| | | | | | | | | | | | | | After f08492c6fd9818c7d80b1725355453e179b4d85b was merged this bug would manifest as an entry appearing twice in the chain when a updating an existing entry (insert with an existing key). This could sometimes result in crashes later as the list filled up and the list was used in trim() to remove various entries. Fixes: QTBUG-89176 Pick-to: 6.0 Change-Id: Ide80160fb4317dc0aefe79eec5dce7ec6813e790 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QProperty docs: update macro nameIvan Solovev2020-12-151-2/+3
| | | | | | | | | Use Q_OBJECT_BINDABLE_PROPERTY instead of non-existing ones Task-number: QTBUG-85520 Pick-to: 6.0 Change-Id: I47e3ff150f54176b42a478fd3ff639754d90e70a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QString: update documentationIvan Solovev2020-12-152-120/+215
| | | | | | | | | | | | | | The QString documentation is aligned with QList regarding common wording and ideas: - Extend general class description - Revise description of several methods - Fix examples to use qsizetype instead of int - Wrap descriptions at 80 characters Pick-to: 6.0 Task-number: QTBUG-87962 Change-Id: I7d5a7e829ce8b98a0a1a7fae6b7ae0dec4effbae Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Bump versionPaul Wicking2020-12-151-0/+1
| | | | | Change-Id: I33ea33c0ecfe42cd25cb9f3a37b7aad72717edd2 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* QProcess: remove unused memberAlex Trotsenko2020-12-152-2/+0
| | | | | Change-Id: I448a32b8ba11426c70d49f7f492b73e7799cc257 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Restore previous QDateTime behavior in DST gapAndreas Buhr2020-12-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Historic QDateTime behavior when being asked to create a QDateTime in the DST gap was to interpret the given date as if it was in the time before that gap, mapping it to a point in time after the gap. This has changed with a04411119ead3d4473e4f0ac4bceedc585977b2f . Since then, the given date is interpreted as if it was in the time after the gap, thus being mapped to a point in time before the gap. This patch restores the historic behavior. This was not caught by Coin because machines ran in timezone "Atlantic/Reykjavik" which does not have DST since 1967. This patch changes tests to always run in "Europe/Oslo". Driveby: Test function "findSpring" did some operations in local time, even though being asked to work in a specific time zone. Fixed that. Fixes: QTBUG-86960 Fixes: QTBUG-89208 Pick-to: 6.0 5.15 Change-Id: Iecce5898bf9711a10e7dfc0a25e4bbeaed1c8ade Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QObjectBindableProperty documentation into snippet fileFabian Kosmale2020-12-152-18/+71
| | | | | | | | | | | The \Q_OBJECT macro has been removed but using Q_OBJECT in the file would erroneously trigger automoc. Avoid the issue by moving the snippet into its own file. Task-number: QTBUG-89505 Pick-to: 6.0 Change-Id: I6630ff4bfcbf33eae348ac3d92aae1878dc573ea Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QUrl: improve parseIp6's use of QStringViewThiago Macieira2020-12-121-6/+4
| | | | | Change-Id: I55083c2909f64a1f8868fffd164f20a2fb8ff7f6 Reviewed-by: David Faure <david.faure@kdab.com>
* QUrl: update parseIp6 to use QStringView, as the comment requestedThiago Macieira2020-12-121-8/+6
| | | | | | Change-Id: I55083c2909f64a1f8868fffd164f2058f226fa61 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QStringView: add constBegin and constEndThiago Macieira2020-12-122-4/+23
| | | | | | Change-Id: I55083c2909f64a1f8868fffd164f21118a9d3ec5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QSocketNotifier: extend API to provide more flexible startupAlex Trotsenko2020-12-112-17/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | Technically, having a single constructor limits the use-cases for this class. We should take into account that: - an opened socket descriptor must be available at the moment of construction; - the constructor unconditionally enables the notifier (the possible solution notifier = new QSocketNotifier(...); notifier->setEnabled(false); is suboptimal due to heavy operations inside the event dispatcher); - for these reasons, QSocketNotifier most often cannot be a member of another class (we have an extra allocation and indirect access). This patch addresses this shortcoming by making it possible to set the socket descriptor at a later point: [ChangeLog][QtCore][QSocketNotifier] Added setSocket() and an additional constructor which requires no socket. Change-Id: I2eb2edf33ddafe99e528aac7d3774ade40795e7a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Assert validity in QStringIterator's unchecked methodsEdward Welbourne2020-12-111-6/+18
| | | | | | | | | | These methods should never be used on strings not known to be valid UTF-16. Their optimizations will produce undefined behavior otherwise. Change-Id: I03a95140dcbdd1f7189eea1be69289ce227331a5 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QList docs: lexicographical -> lexicalIvan Solovev2020-12-111-4/+4
| | | | | | | | | | | | | | | Lexicographical is not the right word for the comparison description. Other classes use the term "lexical", so QList is updated in that way too. The link to cppreference is left, because QList actually uses std::lexicographical_compare, so it's completely valid here. Pick-to: 6.0 Task-number: QTBUG-87962 Change-Id: I37bd3a92c5a3f857266e9c483d14e64eb90ce2c7 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix event() chaining in QSocketNotifierAlex Trotsenko2020-12-111-11/+15
| | | | | | | | | We should return the result of the call of the base implementation for all events that we did not handle. Also, QObject::event() does not actually activate any filters, so the comment was inaccurate as well. Change-Id: Iff6644b7b1621229f8351c83569ee72594e47197 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Add support of invoking QFuture continuations in a given contextSona Kurazyan2020-12-114-20/+242
| | | | | | | | | | | | Added overloads of .then()/.onFailed()/.onCanceled() which take a pointer of a context object, and invoke the continuations in the object's thread. Task-number: QTBUG-86794 Change-Id: I0f3cbb0500695673fc4087af5d4b96b416e3e1ce Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Check date validity in calendar methods taking a QDateEdward Welbourne2020-12-101-2/+2
| | | | | | | | | Previously neglected, in dateFromParts() and dayOfWeek(), which only make sense for valid dates. Pick-to: 6.0 5.15 Change-Id: I44879bb441dbf51b96c8fd4d45e8f07423e63047 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Regenerate projects using pro2cmake one last timeAlexandru Croitor2020-12-101-1/+1
| | | | | | | | | And fix up some wrong qmake project files Pick-to: 6.0 Change-Id: I66cb82aeb9c1419a74df1a650fa78a511ade7443 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Support deferred finalization for qt6_add_executable()Craig Scott2020-12-101-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some parts of qt6_add_executable() need to take into account certain target properties, but the target is created within the function. The caller doesn't get the opportunity to modify those properties before they are used. This change provides a way to defer those property-using steps until either the project explicitly calls a function to finalize the target or the end of the current directory scope is reached. Automatic deferral to end of scope is only supported for CMake 3.19+. With CMake 3.18 or earlier, deferring the finalization step has to be explicitly requested with the new MANUAL_FINALIZATION keyword. The caller is then responsible for also calling qt6_finalize_executable() later. When the keyword is given, automatic finalization is disabled even when using CMake 3.19+. Note that while this could be implemented without CMake 3.19 features, other work relating to qt6_import_qml_plugins() will require it so we may as well use this method now. Fixes: QTBUG-88840 Task-number: QTBUG-86669 Pick-to: 6.0 Change-Id: Ic3854672ba18cff5af2ffd7f63596aa3ac492f33 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Workaround bogus compiler warningFabian Kosmale2020-12-101-1/+10
| | | | | | | | | gcc 9.x (but not 10.x) issues a bogus warning when strlen is used on a string literal; disable the warning for those versions. Upstream bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91490 Change-Id: I7a2a4d0f6ddafcafcd9fcc62fc41ad5d78e61627 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QStringView: add some QRegularExpression-related overloadsGiuseppe D'Angelo2020-12-104-0/+176
| | | | | | | | | [ChangeLog][QtCore][QStringView] Added the indexOf(), contains(), lastIndexOf() and count() methods taking a QRegularExpression. Fixes: QTBUG-89050 Change-Id: Ic726754f67e06b3764302d2fad252e0378a77afc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QString::lastIndexOf: fix off-by-one for zero length matchesGiuseppe D'Angelo2020-12-101-2/+2
| | | | | | | | | | | Otherwise, it would report that lastIndexOf of an empty pattern in an empty string doesn't exist. Next commit adds extensive autotests; for now, disable a broken autotest (which already features a comment about why it's broken). Change-Id: I9a0e5c0142007f81f5cf93e356c8bd82f00066f7 Pick-to: 5.15 6.0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl: fix parsing of empty IPv6 addressesThiago Macieira2020-12-091-0/+6
| | | | | | | | There's an assertion. Found by Google fuzz scan of CBOR data. Pick-to: 6.0 5.15 Change-Id: I55083c2909f64a1f8868fffd164f1ff3af71605b Reviewed-by: David Faure <david.faure@kdab.com>
* QCborStreamReader: move helper function to the only place it's usedThiago Macieira2020-12-091-25/+17
| | | | | | | | Simplifies the code a little bit Pick-to: 5.15 6.0 Change-Id: I7b9b97ae9b32412abdc6fffd164545632be4590a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QStringConverter: add comments marking the BOM checks and emissionsThiago Macieira2020-12-091-0/+5
| | | | | | | | Because obscure cultural references never go out of style. https://twitter.com/steveklabnik/status/1327745325688365056?s=21 Change-Id: Idbe0d2174d4943d1865cfffd1647dd3a18af1801 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QDeadlineTimer in qlogging.cppThiago Macieira2020-12-091-3/+2
| | | | | | | No change, just shorter code. Change-Id: I25d85d86649448d5b2b3fffd1450f95b0ec66927 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QDeadlineTimer: optimize when std::chrono::steady_clock is the sameThiago Macieira2020-12-091-0/+28
| | | | | | Change-Id: Ib57b52598e2f452985e9fffd14583173716343b0 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Simplify the detection for the monotonic clock in qelapsedtimer_unix.cppThiago Macieira2020-12-091-35/+29
| | | | | | | | | | | | | Unlike the previous code, we now entrust the compiler to properly implement thread-safe statics for this code. That was the main reason why the old code was confusing, trying to determine if the clock IDs were positive or negative. Instead, simply make a call to clock_getres(CLOCK_MONOTONIC) and that will tell us if the monotonic clock is supported. Change-Id: I0031aa609e714ae983c3fffd1469522a68fa3b66 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QString: fix count(QRegularExpression)Giuseppe D'Angelo2020-12-091-3/+9
| | | | | | | | | | | | | | | | | There is an off by one in the implementation of count(): a match must be attempted even at the very end of the string, because a 0-length match can happen there. While at it, improve the documentation on the counter-intuitive behavior of count(), which doesn't merely count how many times a regexp matches into a string using ordinary global matching. [ChangeLog][QtCore][QString] Fixed a corner case when using QString::count(QRegularExpression), causing an empty in the last position not to be accounted for in the returned result. Change-Id: I064497839a96979abfbac2d0a96546ce160bbc46 Pick-to: 5.15 6.0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QProcess: remove outdated references to QProcessManagerAlex Trotsenko2020-12-092-3/+0
| | | | | | | No such thing exists since Qt 5.5. Change-Id: Ib3f83dbb1087db1880ef37438669430e0f076301 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QMetaObjectBuilder: use constexpr ifFabian Kosmale2020-12-091-37/+43
| | | | | Change-Id: I23319c263447714b280e9ba9da72162e19fe4e1b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QProcess/Unix: unify waiting in 'Starting' stateAlex Trotsenko2020-12-092-22/+11
| | | | | | | | | | | It makes no sense to poll the I/O pipes if we didn't get a start-up notification yet. And in fact, all waitFor...() functions except waitForReadyRead() did already explicitly wait for process startup completion. So fix that one up, and remove the handling of 'Starting' state from the I/O loops. Change-Id: Ibb7eb7c768bef3f9b6c54009c73b91775570102c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QProperty: Handle eager binding calling setBindingFabian Kosmale2020-12-092-0/+9
| | | | | | | | | | | | | | | | | When an eager binding triggers a setBinding call, we end up with a special kind of binding loop: setBinding() -> evaluate -> notifyObserver ^ | | / ---------------------------- We now catch set condition, and set the binding status to BindingLoop (with a distinct description). Task-number: QTBUG-87153 Task-number: QTBUG-87733 Pick-to: 6.0 Change-Id: I9f9915797d82eab820fc279baceaf89d7e5a3f4a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QProcess: migrate to QDeadlineTimerAlex Trotsenko2020-12-094-55/+41
| | | | | | | | | Replacing QElapsedTimer with QDeadlineTimer simplifies the code in waiting functions, which also improves readability. Change-Id: I56aedd356b547b6735ed0985dc81be706e292437 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QString: improve lastIndexOf(QRegularExpression) docsGiuseppe D'Angelo2020-12-091-0/+4
| | | | | | | | | | | Due to how regex matching works, lastIndexOf has to be implemented by matching from the string's beginning until the from position is reached. This might not be obvious for users, so document that. Task-number: QTBUG-89050 Pick-to: 5.15 6.0 Change-Id: I4b69ea753e7d417d980031926f1e01d77e58720d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* macOS: Add missing QT_MANGLE_NAMESPACEMorten Johan Sørvig2020-12-082-2/+2
| | | | | | | | | | | KeyValueObserver and RunLoopModeTracker were causing “Class is implemented in both...” messages when loading multiple namespaced Qt versions into the same process. Change-Id: Idbd2229c61cde6fba2c12b35d045390a371dee68 Fixes: QTBUG-89059 Pick-to: 6.0 5.15 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QList: update docsIvan Solovev2020-12-081-40/+48
| | | | | | | | | | | Update some wording to align with QString and QByteArray documentation Pick-to: 6.0 Task-number: QTBUG-87962 Change-Id: I8162769c1a5fc94fc8920ad0d4d91e95fe74825f Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Fix qdoc warning from incorrectly named method parameterVolker Hilsheimer2020-12-081-2/+2
| | | | | | | | | | | Amends 2eb7d6073d5132a8bf269f5c6fc9f89fde446ab5. Pick-to: 6.0 Task-number: QTBUG-87962 Change-Id: I55c9e8cf7db9e1e1644a76f29a9dc61b161ae551 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Fix MSVC warning C4267 in qstring.cppKai Koehne2020-12-081-2/+4
| | | | | | | | | | | | | | | | Fix warnings qstring.cpp(9650): warning C4267: 'argument': conversion from 'size_t' to 'uint', possible loss of data qstring.cpp(9654): warning C4267: 'argument': conversion from 'size_t' to 'uint', possible loss of data QDataStream::writeBytes expects an uint as second parameter, not size_t. This reverts parts of 744e55b85a96b37a, where the explicit cast to size_t was introduced. Pick-to: 6.0 Change-Id: I2750a6f48fc09730aa9fa21dcc31f82e33b48b8b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QSystemSemaphorePrivate: Fix a call to tr() to translate()Tuomas Vaarala2020-12-081-1/+1
| | | | | | | | | | Calling QCoreApplication::tr() without #if QT_CONFIG(translation) can cause the build to fail if configured without translation. Changing the call to QCoreApplication::translate() fixes that. Pick-to: 5.15 6.0 Change-Id: I48f0e1be14fc81360b8268620afc2f6c8f255819 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* CMake: Disable static plugin imports for non-executable targetsAlexandru Croitor2020-12-081-1/+8
| | | | | | | | | | | | | | There is no point in generating cpp files containing Q_IMPORT_PLUGIN() macro calls for non-executable targets like modules, plugins and object libraries in a static Qt build. It causes unnecessary compiling of 10+ files for each of those targets. In a static Qt build, plugin imports should only be done for executables, tools and applications. Pick-to: 6.0 Change-Id: Ied90ef2f6d77a61a093d393cfdf94c400284c4f0 Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>