Commit Graph

53833 Commits

Author SHA1 Message Date
Ievgenii Meshcheriakov
7d7663cfc4 Use a HTTPS URL for the CLDR download link
FTP is insecure and is not supported by modern browsers anymore.

See also: https://mywiki.wooledge.org/FtpMustDie

Change-Id: Iad65d29912e79a4f3fadb9317bb5d9c5fe9b68d7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-11-05 19:32:23 +01:00
Luca Di Sera
ae0733c99b Doc: Remove broken homepage link for Vera fonts attribution
The attribution for the Vera Fonts project declares a page on the gnome
domain as the homepage of the fonts.

The page is not maintained anymore and was removed from the gnome
domain.

Hence, we remove the "Homepage" key from the Vera Fonts attribution as
no homepage seems to exists at the moment.

Task-number: QTBUG-96127
Pick-to: 6.2
Change-Id: If4801eb96ce5568c4c18ecea7807ad87e165ca2a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-11-05 18:02:09 +01:00
Volker Hilsheimer
02164b292f Don't use QCursor::pos in QTabBar and fix hover handling
Relying on QCursor::pos makes tests fragile and prevents multi-seat support.
Instead, record the mouse position in the already existing event handling,
and use that instead. Styles might use either WA_Hover or enable mouse
tracking for the widget to enable hover-effects, so we need to support both.
Fix the scenario where a newly inserted tab ends up under the mouse, which
was previously not handled correctly (only the case of removing a tab was).

Clean up the repaint management when the hovered tab changes; just call
update on the old rect, and then later update on the new rect; there's no
need to make a copy first, updates are posted and compressed.

Add a unit test that makes sure that we paint tabs that should be under the
mouse in the hovered state. Since not all styles enable hovering and/or
mouse tracking in all cases, use a style sheet for those styles that don't.

Change-Id: I7cdbb18e9e04b52651e273680fec87b50cb81e05
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2021-11-05 16:54:55 +01:00
Joerg Bornemann
c5409964b0 configure: Allow specifying arbitrary variable assignments
It's now possible to call configure with arbitrary variable assignments
"FOO=BAR" that get passed as "-DFOO=BAR" to CMake.  There is no error
anymore for unknown variables.  CMake already warns about those:
"Manually-specified variables were not used by the project: FOO".

[ChangeLog][configure] Users can directly assign CMake variables with
configure, for example "configure CMAKE_CXX_COMPILE=clang++-11".

Fixes: QTBUG-88210
Change-Id: Ib15e63a895df717919dd2b6623fa4d284209776f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-05 16:54:55 +01:00
Zhang Hao
7451fb36fd plaintextEdit draw text with clipRect should consider cusorWidth
If the width of the text to be drawn is equal to the width of
clipRect, the cursor will not be displayed.
So we need add cursorWidth to the clipRect when draw text.

Fixes: QTBUG-94028
Pick-to: 5.15
Change-Id: I8686953f13c04d224327cf0f865ded7241d80ccd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-11-05 15:31:23 +00:00
Luca Di Sera
09a68dfa94 Doc: Move Q_OBJECT_COMPUTED_PROPERTY to QObjectComputedProperty
`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>
2021-11-05 15:31:23 +00:00
Alexey Edelev
45ce3c6fb9 Make sure that all MODULE_LIBRARY targets are built before deploying to Android
Users may add the implicit runtime depedencies to the MODULE_LIBRARY
targets, that are created using standard CMake API. When iterating a
project tree we collect all module libraries and add them as
dependencies to the qt_internal_plugins meta target. All the
${target}_make_apk targets depend on this meta target, so we can
be sure that plugins are built and present on the file system before
running androiddeployqt.

Task-number: QTBUG-94714
Task-number: QTBUG-88841
Change-Id: I4fa7f0772d23897f19db59c6e4ad38646bd3aed6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-05 15:56:07 +01:00
Alexey Edelev
067a23f2c6 Make sure that all plugin targets are built before deploying to Android
We need to make sure that all plugin targets are built and present
on the file system before running androiddeployqt. This especially
important when building executables that depend on qml modules that are
built in the project tree. This adds meta target that collects all
the plugin targets as dependencies and adds this meta target as the
dependency for the custom target that executes androiddeployqt.

TODO: We should also take into account MODULE libraries that were
added using the CMake add_library call, but since qt6_finalize_project
is not a part of 6.2 API, this will be added in follow up commit.

Pick-to: 6.2
Task-number: QTBUG-94714
Task-number: QTBUG-88841
Change-Id: I4b4596eb8ed364dbe80e2cfb0ce31cec32e7c03f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-05 14:52:26 +01:00
Joerg Bornemann
2c070b6f4d Fix EntryPointMinGW32Target.cmake to be found in top-level build
This amends commit 67dadc7e34.

We need to copy EntryPointMinGW32Target.cmake to the build dir.  The
variable config_install_dir contains path relative to the install
prefix, and the copy command needs one relative to the build dir (or an
absolute one).

Pick-to: 6.2
Fixes: QTBUG-97919
Change-Id: I4e3d735edfb69e27c248191b892422cef572258e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-05 14:52:26 +01:00
Volker Hilsheimer
e5ebc28764 QAIV: Reset double-click flag in mousePressEvent
Amends 17c1ebf8bf, which introduced logic
that recognizes double clicks to avoid duplicate clicked() emits. If a
slot connected to doubleClicked opens a dialog, then the release-event
will not be seen by the item view, leaving the flag incorrectly set and
preventing the next clicked signal.

Fixes: QTBUG-97853
Pick-to: 6.2 5.15
Change-Id: Iced83e8c66a763672f522265435dc52a745227e4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2021-11-05 14:52:25 +01:00
Volker Hilsheimer
c04b5e0c8c Tidy up QPixmapCache to prevent potential segfault
Following reports of segfaults in long-running programs leading to
QPixmapCache corruption, clean up some code smells:

* check pointers before dereferencing

We did this in some places, and a default constructed or moved-from key
could have a nullptr KeyData, so check everywhere.

* don't trunctate qsizetype to int

Still plenty of int APIs left, but no need for ints in internal code.

* don't underflow maxCost to -1 if totalCost was 0
* use ranged-for to iterate over list of keys
* guard any public function that might create the cache with the thread-
test

This avoids that the cache ends up living in the wrong thread.

* don't use reinterpret_cast when static_cast is enough (which is always
from void*)

Since the crash is not reproducible so far, and the reports indicate
that it can only be observed when the program has run for a long time,
there is no test case included. However, this removes some code smells
that might be responsible for data corruption.

Pick-to: 6.2
Task-number: QTBUG-97903
Task-number: QTBUG-91445
Task-number: QTCREATORBUG-26473
Change-Id: Ibdd8963d7dd44caab1468ecc6f81ace761719c69
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-11-05 14:09:39 +01:00
Marc Mutz
faa854ffeb QByteArrayList: fix narrowing in join() implementations [2/2]
We forgot to adjust the interface and implementation of join() to the
int → qsizetype change in Qt 6.

This part of the two-part patch fixes things in a non-forwards-BC way,
so it can't be picked into released versions. The forwards-BC part is
in the first patch of the series.

We can't just replace the int seplen with qsizetype, because qsizetype
is an alias to int on 32-bit platforms. So, pass the separator by
QByteArrayView.

[ChangeLog][QtCore][QByteArrayList] Fixed a bug when calling join()
with separators of length > INTMAX.

Change-Id: I2ccc61de1c8901ac5504aea1ebd895d12dbcb064
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-11-05 09:06:22 +01:00
Marc Mutz
0b768e3c43 Include qproperty.h where needed
Don't rely on transitive include from qobject.h, which will go away.

Change-Id: I99dd97ff4fb1d0632d040daab0bffa2d7b85d3ae
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-11-04 21:45:02 +01:00
Kai Köhne
879e42cba8 Suppress rc.exe default output
Hide output like

  Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
  Copyright (C) Microsoft Corporation.  All rights reserved.

when building the auto-generated .rc files.

Pick-to: 6.2
Fixes: QTBUG-97729
Change-Id: Id0c32c8015ec2ac0b47b3add52d5c0f8a7a1c203
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-04 18:29:57 +01:00
Thiago Macieira
c0a8cfe167 QFactoryLoader: remove the porting hack to complete the port to CBOR
Change-Id: I3eb1bd30e0124f89a052fffd16a6f632c62bcef5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-11-04 10:20:09 -07:00
Thiago Macieira
bcbc36b8bf CMake/qconfig.cpp: use raw strings so we support any input
Change-Id: I2bbf422288924c198645fffd16aa04379315e69e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-11-04 10:20:09 -07:00
Thiago Macieira
0ab3c5c250 QPluginLoader/ELF: fix Clang ASan builds
Clang aligns the object at 32-byte boundaries even though we
specifically asked for alignof(void*), so tell it not to sanitize the
address of the plugin object. Tested with Clang 12 and 13.

GCC seems not to be affected, even when ASan is enabled.

If this doesn't work, we may need to accept reading a note that is
improperly aligned. I don't think the output will be actually a correct
note because the intra-note alignment will be wrong (I carefully chose
the ELF note name so it would not require alignment, but that's only
valid up to 8-byte alignments).

Fixes: QTBUG-97941
Change-Id: Ice04365c72984d07a64dfffd16b422fe074d8a70
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-11-04 18:20:09 +01:00
Tor Arne Vestbø
9f559699cc coin: Add Sccache feature
Allows us to remove redundant information in the platform configs.

Pick-to: 6.2 5.15
Change-Id: Id0c09ce6f22f3bd52ef426c14a1b2806559b2321
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-04 18:01:39 +01:00
Marc Mutz
b4c7d6b8d4 Extract Header qbindingstorage.h
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>
2021-11-04 16:11:36 +00:00
Marc Mutz
404a7c0094 QDataStream: remove pointless guard around std::pair operators
The code is already in 'ifndef QT_NO_DATASTREAM'. Well, the condition
is a bit more complicated, which makes this nested guard even more
wrong.

Amends 55150f0f0b.

Change-Id: I1c8f35ebc0355185244c8bf098d000b7c5c543d5
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-11-04 17:11:36 +01:00
Marc Mutz
c1c15abc8d QByteArrayList: fix narrowing in join() implementations [1/2]
We forgot to adjust the interface and implementation of join() to the
int → qsizetype change in Qt 6.

This part of the two-part patch fixes things in a forwards-BC way, to
allow picking into released versions. The forwards-BC break is in the
second patch of the series.

[ChangeLog][QtCore][QByteArrayList] Fixed a bug when calling join() on
lists with more than INTMAX elements.

Pick-to: 6.2
Change-Id: I26976864e77169ff0db7c672d1d42d88dbfcc437
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-11-04 16:11:35 +00:00
Marc Mutz
5d19219eeb QNI NetworkManager: Extract Method primaryConnectionDevicePath()
Avoids duplication of complex code (RB tree lookup).

Change-Id: I70ac7095b05ee56cdf7c86dd1d1a7c9c3232c9d4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-11-04 12:02:47 +01:00
Mårten Nordheim
4a3996e98b QNI NetworkManager: Small refactorings and correctness fix
Extract and reuse a lambda for initialization and slot object.
Pass a QDBusObjectPath parameter by const-ref.
Avoid implicit ascii-to-utf16 string conversion.

Change-Id: I591ae6e58e010ccabcf9012db866949492e0191d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2021-11-04 12:02:44 +01:00
Mårten Nordheim
33df48f957 QNI: networkmanager support for the isMetered API
Task-number: QTBUG-91024
Change-Id: I25ac05adbcbfa92a98fe1e9db9ac931e5c340fcd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-11-04 11:02:40 +00:00
Mårten Nordheim
58b37f5908 QNI manual test: Remove unnecessary capturing and wrapping
No need to capture anything by reference, it's a leftover from when
the MainWindow was changed from inside the lambda.

And no need to wrap the argument to QLatin1String.arg() with QStringView
explicitly. This change is made just for brevity and consistency.

Change-Id: Ib8c163bcf5932d35a9d43dd8ce124588c539d5a4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2021-11-04 12:02:34 +01:00
Mårten Nordheim
83ddf49bc7 QNI: Android support for isMetered
Task-number: QTBUG-91024
Change-Id: I7a8fdcddc25fdb60390b424a888d0311afd8cef3
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-11-04 11:02:29 +00:00
Mårten Nordheim
bd52c1bba6 QNI: Add API to check if connection is metered
This may be a useful factor in deciding whether or not you should
perform communications over the network which are not purely essential.
For example, if you have a logging mechanism you can delay uploading
them until you are no longer on a metered network.

Task-number: QTBUG-91024
Change-Id: I19d32f031a3893512dc440914133678004987fb1
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-11-04 12:02:25 +01:00
Lorn Potter
2148e1f0e6 wasm: increase default initial memory
Some apps may need more initial memory when linking, emscripten will
fail with:
wasm-ld: error: initial memory too small

This increases the default initial memory form 16MB to 20MB.

Larger apps might still get this error, in which case
QT_WASM_INITIAL_MEMORY can be set.

Pick-to: 6.2
Fixes: QTBUG-97457
Change-Id: Icdc56c41fb3a3852a9a83f7a3dc15820e83e1148
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2021-11-04 17:26:49 +10:00
Morten Johan Sørvig
873edc0f15 wasm: add asyncify manual test
Add simple QtCore-based test case which spins
a nested event loop.

Change-Id: Ia3a4ef76d561d0554faffcac8d36ae5dda2c6c53
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2021-11-04 09:23:15 +02:00
Morten Johan Sørvig
6d039a5e76 wasm: enable event dispatcher asyncify support
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>
2021-11-04 09:23:11 +02:00
Tor Arne Vestbø
63feecfc11 macOS: Bump max supported SDK version to 12
Pick-to: 6.2 5.15
Change-Id: Ib4980719fe372abfb2566fe4e82db29226a7fcfa
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-11-04 05:06:04 +01:00
Tor Arne Vestbø
34f9da730f iOS: Hide UIWindow before restoring mirror mode
Doing it the opposite way, by associating the new screen first, will
result in the external screen not going back to mirroring the main
display.

Pick-to: 6.2 5.15
Change-Id: I63970380fc4f0902af5032043809a9c1b1f9f95b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-11-04 05:06:03 +01:00
Tor Arne Vestbø
36852d78bf iOS: Defer restoring screen mirroring until next runloop pass
Associating the UIWindow with a different screen will trigger layout
of the child views of the window, including the view that we're in
the process of removing, which doesn't have a platform window anymore.

Instead of protecting every possible code path in the view code
with checks for a platform window we defer the restoring of
mirror mode until after the view has been removed.

Pick-to: 6.2 5.15
Task-number: QTBUG-94530
Change-Id: I8c66106cafa67e06721e621c019b2d10acf02326
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-11-04 05:06:03 +01:00
Tor Arne Vestbø
f2d1502429 iOS: Don't try to initialize a11y for views that have no platform window
The window may have been destroyed, but the UIView may still be
be referenced and kept alive by the a11y subsystem.

Pick-to: 6.2 5.15
Task-number: QTBUG-94530
Change-Id: I24f1c9d45e80c1bb4c92536e7f91533a94fd077f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-11-04 05:06:03 +01:00
Yuhang Zhao
9568362bfe QOperatingSystemVersion: Add support for Win10 sub-versions
Windows 10 has many sub-versions such as 1809/1903/1909/etc,
currently Qt6 can only detect if the application is running
on Win10 or not, which I think is not accurate enough.
Different Win10 version may introduce different features
and bugs, the developers will have to know the exact version.
Only give a general Win10 as an answer is not ideal. I think
Qt should add variables for these sub-versions.

Change-Id: I772d25a528ee2f8a4afba314d701142a06c718f9
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-11-04 12:06:03 +08:00
Tang Haixiang
c4856a9075 Use QScopedPointer to manage memory
Although the QBackingStore constructor takes a QWindow* as a parameter,
it does not inherit QObject and doesn't become a QObject child of the
QWindow. Use QScopedPointer to avoid memory leaks.

Pick-to: 6.2
Change-Id: Ib065163a9149d002f8220a0257bd78549062c595
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-11-04 01:03:44 +00:00
Marc Mutz
f5fbad669d QByteArrayList: add join(QByteArrayView)
Since QByteArray/QByteArrayView don't overload nicely, we need to make
the existing QByteArray overload a Q_WEAK_OVERLOAD (= a template) as a
tie breaker. This automatically prefers the QByteArrayView version
over the QByteArray overload, transparently optimizing existing users
passing char string literals to avoid the implicit creation of a
QByteArray just for passing the separator.

None of our modules exports a subclass of QByteArrayList, so turning
join(QByteArray) into a function template should be ok.

[ChangeLog][QtCore][QByteArrayList] Added join(QByteArrayView)
overload.

Change-Id: I090671d9b94c30b63a986f17e966d124c22b5c54
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-11-04 01:16:16 +01:00
Timur Pocheptsov
122f7d7adc qnsview_mouse, scrollWheel: do not assume zero deltas on Ending phase
It's somewhat difficult to reproduce, but having a mac with a trackpad
and a huge scrollview (meaning I have to scroll fast and a lot), I am
able from time to time to trigger an assert on the line:
Q_ASSERT(pixelDelta.isNull() && angleDelta.isNull())

In all such cases, I can see that deltas are not zero, but equal
to the ones that the next event (momentumPhase == Begin) has.

The code is based on Tor Arne's patch.

Pick-to: 6.2 5.15
Fixes: QTBUG-97945
Change-Id: I874c776b265d3950cc2b6c1d8054363b3d0d1fde
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-11-03 23:56:01 +01:00
Giuseppe D'Angelo
efc1cd5799 PCRE2: upgrade to 10.39
New upstream release.

[ChangeLog][Third-Party Code] PCRE2 has been updated to version 10.39.

Change-Id: Ic8db3035bad41a8cdb0d735e593e71124b5df9d2
Pick-to: 5.15 6.2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-11-03 22:54:37 +01:00
Thiago Macieira
74e1ab1adf qlibrary.cpp: avoid the +12 constant in too many places
Pick-to: 6.2
Change-Id: I2bbf422288924c198645fffd16a9a5f99bf9499e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-11-03 14:54:37 -07:00
Thiago Macieira
2c2c6de85a qlibraryinfo.cpp: use qOffsetStringArray for qtConfEntries
Beats a manual array with too wide strings. I thought even to simply
replace this with a switch (loc)... it's not like this is
performance-critical code, given it uses QString.

Change-Id: I2bbf422288924c198645fffd16a977778ff8d52d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-11-03 14:54:37 -07:00
Iikka Eklund
95cc652e1a Conan: Fix build_type usage in the build recipe
Currently e.g. -debug-and-release builds are "broken" as it only
produces release binaries on Windows. There are other inconsistencies
also how the recipe deals with various release and debug related options
and how those map the Conan's 'build_type'.

Pick-to: 6.2 6.2.1
Change-Id: I47fa4c1592eefa1b5a1f144691ee33675753e5fb
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-11-04 00:12:15 +03:00
Alexey Edelev
63acb0d9fe Move qt_finalize_framework_headers_copy to the scope finalizer
The qt_finalize_framework_headers_copy function uses the module
QT_COPIED_FRAMEWORK_HEADERS property to generate the dependency list
for the ${target}_framework_headers target. In a common case elements
can be added to the QT_COPIED_FRAMEWORK_HEADERS property after the
qt_internal_add_module command call, that's why we need to make sure
that qt_finalize_framework_headers_copy is called after collecting all
headers assigned to the module.

Pick-to: 6.2
Change-Id: I2878fa6b8d4b11677c3f48345bf6e239221074c2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-03 21:02:44 +01:00
Mårten Nordheim
2d39509d4a QNI: Clarify Feature enum entries' documentation
Saying properties are not available depending on feature support
is misleading. It is available even if not supported, it's just not useful.

Pick-to: 6.2
Change-Id: I6325c50867bb873258c70280adb8d75125db2096
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-11-03 20:07:32 +01:00
Mitch Curtis
762a3d73f5 Make QPlatformTheme a gadget
So that we can wrap it and expose that wrapper to QML.

Also, make the ThemeHints enum available with Q_ENUM.

Change-Id: I920e7cc29c45c81c3a381b14ddb077f259f66b6c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-11-03 20:41:30 +02:00
Mitch Curtis
3aa1a7fad1 Add ShowDirectoriesFirst platform theme hint
This allows Qt Quick Dialogs to accurately check how it should show
files and directories.

Change-Id: I0f5102553ff9a0484b3714ba176f7e5e668fd05c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-11-03 20:41:30 +02:00
Volker Hilsheimer
9151ab44bc Release mouse buttons after double click
Otherwise, the button state maintained by Qt when using the offscreen
plugin is not reset, breaking following tests.

Pick-to: 6.2
Task-number: QTBUG-97964
Change-Id: Ib37fd038e214863e1e316dc3d41e9d28c157b1f8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
2021-11-03 18:11:08 +00:00
Tor Arne Vestbø
0babdac537 Fix version number when warning about Apple platform SDK mismatch
Pick-to: 6.2 5.15
Change-Id: I9b9cda0c6bb9ad527dbf4b4268c1b572aa04d164
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-11-03 17:12:47 +01:00
Topi Reinio
51becc4c66 CMake: QtDocsHelpers: Rename generate_qdocs_args variable
To be consistent with prepare_qdoc_args.

Pick-to: 6.2
Change-Id: Ibd40d6c26f6f6fa49ea78b6476f396153b7c4ee5
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-11-03 16:47:18 +02:00
Topi Reinio
f6bb68c548 Doc: Add styling for note/warning/important admonitions
The offline CSS already had some related rules, but at some point
QDoc lost the ability to produce the required markup. It has now
been reintroduced.

Pick-to: 6.2 5.15
Task-number: QTBUG-97448
Change-Id: I5165cd01f3653dfb35854ca6b8040e8daa434347
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-11-03 16:47:18 +02:00