Commit Graph

38405 Commits

Author SHA1 Message Date
Christian Ehrlicher
e8b3d35a18 QTableView: fix selection with rows and cells in ExtendedSelection mode
QTableView stored the current row/column selection start in an own
variable instead using currentSelectionStartIndex. This leads to an
inconsistent behavior when the selection is done with a click on the
header and then in a cell (and the other way round)

Fixes: QTBUG-92561
Change-Id: I4c8bda3a938de451b6eff2819141e86a6870fbef
Pick-to: 6.1 6.2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-07-12 08:19:16 +00:00
Volker Hilsheimer
e71a5d5cc3 macOS: Don't make frameless tool windows miniaturizable
Amends 556fbbea6e, which breaks
translucency of frameless tool windows. Possibly a bug in macOS, a
window being made miniaturizable should not have side effects on
background or translucency.

Pick-to: 6.2 6.1 5.15
Fixes: QTBUG-95042
Task-number: QTBUG-65637
Change-Id: I651196e3cf8a9c59b250e5f1b4064cc4ded02372
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-07-12 10:14:09 +02:00
Marc Mutz
d52bb250c3 QNonContiguousByteDevice: ++explicit
Change-Id: I5d40a12704789eff10db9b1fb34f4e375651f1f0
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-07-10 16:07:37 +02:00
Oliver Eftevaag
a7894855f2 Fix QTextFormat::FullWidthSelection for right-to-left text layouts
Using the QTextFormat::FullWidthSelection property to select a line
would previously not take into account right-to-left text layouts.

With this patch, the whole line should now be drawn correctly for both
left-to-right, and right-to-left layouts.

Pick-to: 6.2 6.1 5.15
Fixes: QTBUG-91125
Change-Id: Ide7b340cd7b4060e7c00e55e0011a86ffdfb5eb4
Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-07-10 13:27:46 +02:00
Timur Pocheptsov
408656c6f9 Diffie-Hellman parameters: remove useless 'fix'
The workaround I had implemented based on alpha version of OpenSSL v3
and what developers (OpenSSL) said about DH back then is not going to work
in the end - they do remove all DH (struct and related functions) stuff
if you set a proper OPENSSL_API_COMPAT level. A proper re-write is required
to support OpenSSL v3, but then there is no reason to keep dead useless
code.

Pick-to: 6.2
Task-number: QTBUG-94596
Change-Id: Iae092dd08148521649a684879d30e190736e1abe
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-07-09 19:53:55 +02:00
Timur Pocheptsov
3186ca3e39 Dont's use DTLS_MAX_VERSION when setting SSL_CTX
It was fixed quite some time ago for TLS counterpart (TLS_MAX_VERSION),
but somehow the similar fix was missing for DTLS. OpenSSL v3 deprecated
those constants and they can be compiled out by OPENSSL_API_COMPAT.

Pick-to: 6.2
Task-number: QTBUG-94596
Change-Id: Ia0246170a003db900c430b2fbfc177caf05a395a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-09 19:53:54 +02:00
Marc Mutz
711ff56a64 QUuid: remove Windows-only pre-C++11 constructor implementation
Amends bd62dc1391.

Change-Id: Iba10e7d70e7bd9d7c6068632dd2f429a52945463
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-09 17:09:41 +00:00
Marc Mutz
12f72db185 QColorTrcLut: don't inherit from QEnableSharedFromThis
None of the member functions use sharedFromThis().

Change-Id: I4d1fc0c3c18830df231833ce0ef631e1bb1fc27e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2021-07-09 19:09:41 +02:00
Volker Hilsheimer
637d5dd6b1 macOS: fix drawing of pushbuttons of non-standard size
Cocoa renders the bevel of a push button always in the default height of
32 pixels. We handled the case that the button is larger than that by
switching to "squared" mode, but buttons that are smaller than that got
rendered incorrectly, with the bevel being clipped.

Fix this by always rendering buttons in "squared" mode when the height
of the widget is not the same as the standard. Adjust the default height
for "mini" push buttons based on visual testing. Make the equivalent
adjustment to the focus frame logic and general positioning so that
buttons and frames are centered compared to other controls.

As a drive-by, get rid of expensive QObject::inherits calls, and replace
with qobject_cast. The headers for all the relevant widget types are
already included.

Fixes: QTBUG-85972
Pick-to: 6.2
Change-Id: I4ad66fac2313fbee385c1eadcc243f69c9cace70
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-07-09 17:03:39 +02:00
Andreas Buhr
cd0528143e add todo comment for Qt 7
Task-number: QTBUG-94546
Change-Id: I86a40dcb2b6e33140c31acc450bcd47fa6ff3f2d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-09 16:06:44 +02:00
Marc Mutz
f5bcfb8f57 Fix C++20 compilation of androiddeployqt
u8 literals changed type from const char[] to const char8_t[] in C++20
and Qt APIs that don't use QUtf8StringView aren't prepared for it. Use
a classical char literal for the time being.

Amends 857be50b2e.

Pick-to: 6.2
Change-Id: I7f194befc08ab50cdef321d8900ee3553599a19e
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
2021-07-09 13:35:54 +00:00
Ivan Solovev
74d6c36eb7 QMap::erase - extend docs to specify iterator limitations
Task-number: QTBUG-91736
Pick-to: 6.2 6.1
Change-Id: I4a226e0bbcde91f3149db9a0697981169ec25276
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-07-09 14:45:28 +02:00
Alexandru Croitor
51ae235080 CMake: Use correct MSVC runtime library for Qt object libraries
If Qt was configured with -static-runtime which implies MultiThreaded
-MT flag, the plugin initializer object libraries were still compiled
with the default -MD flag.

When an application linked to Qt, that caused linking to fail with
mismatched symbol errors between the application symbols and the
plugin initializer object library symbols.

Make sure to set the MSVC_RUNTIME_LIBRARY property on both plugin
initializer and resource object libraries, depending on the value of
QT_FEATURE_static_runtime.

We did set the property for resources added by
qt_internal_add_resource, but not for the resource created by
the public qt6_add_resources counterpart.

Pick-to: 6.2
Fixes: QTBUG-95043
Change-Id: Ia543cd0241db94a12080be2655ad420fe9ad3f24
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-07-09 12:44:35 +02:00
Volker Hilsheimer
d2e88b8094 Fix auto completion in QFileDialog on Windows
Amends c0b3c06a7d.

The QCompleter used by QFileDialog uses starts-with matching of
the path parts, for all parts of the path. It uses the EditRole of the
underlying model for the data to match.

The path parts used for a path on Windows are "C:", "Users", "etc...",
and then finally whatever input has been typed so far. If we try to
match that against a starts-with rule against "Local Disk (C:)", then it
will fail and the completer will never have anything to show.

So, for the EditRole, return just the volume drive letter as we did before
c0b3c06a7d, not the volume name. Neither
can be edited anyway. This happens to then match the native file dialog
behavior, which doesn't complete "L" to "Local Disk (C:)" if the Computer
contents (ie. volumes) are shown.

Augment the QCompleter test case to cover that scenario (it already has
everything set up for this particular combination, even though we are
actually testing QFileSystemModel returning the correct data).

Fixes: QTBUG-94799
Task-number: QTBUG-78043
Pick-to: 5.15 6.2 6.1
Change-Id: I14844d91601e9b16dc07cff2ca48713acb7cdd09
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2021-07-09 00:48:44 +02:00
Thiago Macieira
8731192106 Fix qt_error_string() and QSystemError::string's lack of i18n
There are four messages that we, for some reason I don't understand,
have our own text for instead of using strerror(). But even though they
were marked for extraction, they weren't translated.

Fixes: QTBUG-95039
Pick-to: 6.2
Change-Id: I266f1bf9a4d84db39086fffd168f8c6dfe9c2cf4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-07-08 12:10:49 -07:00
Ivan Solovev
a8bcf68a5e Fix QMultiHash::keys(const T&) overload
The method was never tested, but it failed to compile after
QMultiHash was introduced as a separate class in 6.0.
This patch fixes it and adds some unit-tests to cover the case.

Task-number: QTBUG-91736
Pick-to: 6.2 6.1
Change-Id: I5dd989d4775efc6a9bb13c5ed1d892e499d95dc2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-08 20:12:14 +02:00
Cristian Maureira-Fredes
15592ec4f7 corelib: update debug_script to python 3
This script was written for Python 2, which is deprecated now.

Change-Id: I534c93922776254a4c822ac60c6fd77ca7cb9760
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-07-08 18:51:00 +02:00
Andreas Buhr
857be50b2e Let androiddeployqt write a dependency file
Let androiddeployqt write a dependency file so that
the build system knows when to re-run it.

Fixes: QTBUG-94567
Change-Id: I5985d707f257b22789013a74f0a6f7c4de6e5e88
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-07-08 17:30:20 +02:00
Alex Trotsenko
1a57a4974b QLocalSocket/Win: reimplement skipData() function
The base implementation discards the data by reading into a dummy
buffer, which is slower than necessary.

Change-Id: Iabf0c4a25746af6cac5b61d7bda66d89501c808c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-07-08 16:14:11 +03:00
Ivan Solovev
82499f8147 QMultiHash::find - prevent detaching shared null
Do not detach when find(key, value) is called on an empty QMultiHash.

As a drive-by: fix return value for QMultiHash::remove() in case of
empty QMultiHash.

Task-number: QTBUG-91736
Pick-to: 6.2 6.1
Change-Id: I1e32f359e7ee9ce8403dae79d02e0b88a20ec4a5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-07-08 14:41:14 +02:00
Marc Mutz
ebee8a1336 QDBusMarshaller: fix -Wformat-overflow
Says GCC:

qdbusmarshaller.cpp: In member function ‘QDBusMarshaller* QDBusMarshaller::beginMap(QMetaType, QMetaType)’:
qdbusmarshaller.cpp:286:17: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
  286 |         qWarning("QDBusMarshaller: type `%s' (%d) is not registered with D-BUS. "
      |                 ^

Fix by manual checking. It's a False Positive, because
QString::asprintf() can handle nullptr strings just find, but let's
make GCC happy.

Since the code snippet appears multiple times, even though GCC only
warns about one of them, take this opportunity to factor the code out
into a cold helper function.

Change-Id: I1d642f2465f34b670b179646185cba05cb16e573
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-07-08 01:49:26 +02:00
Marc Mutz
28fbed2f5c QCryptographicHash: share more code between switch cases
Now that calling hashLengthInternal() is cheap, use it to factor
common code in switch statements. For sha3, that would have been
possible before, too. Reason for duplicating the case bodies is
unclear.

Change-Id: I281617546e0b3e701315eee2f10df8d26ada92ae
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-07-08 01:49:26 +02:00
Marc Mutz
e9fffbaf81 Use QCryptographicHash::hash() more widely
... instead of the "usual" rule of three: ctor, addData(), result().

Not only does it generate less code in the caller, it's now also
faster.

Change-Id: I67c7eeb01f527b90e80a08f60c1c7f2ec1e49dd4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-07-07 23:49:26 +00:00
Marc Mutz
bd62dc1391 QUuid: clean up pre C++11 constructors
All compilers Qt 6 supports support C++11 Uniform Initialization now.

Change-Id: I1ddcc506347db1770c535047ebe2547ff33d843e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-08 01:49:26 +02:00
Marc Mutz
e54faee178 QTest: remove unneeded cast in toPrettyUnicode()
char16_t, as returned from QStringView::utf16(), is guaranteed to be
unsigned, so there's no need to reinterpret_cast to ushort.

Change-Id: I7432dd26b4814c61fe70cc33ed307097ef46ce4e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-07 19:32:52 +02:00
Alex Trotsenko
43d8e81e56 QLocalSocket/Win: fix typo in function name
Amends b3fbfcd373.

Change-Id: If6557f851324cdbb89af6c89e7b792a777d2dedd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-07-07 18:07:15 +03:00
Fabian Kosmale
fd30881989 QProperty: Downgrade assert in noSelfDependencies to warning
We call evaluateRecursive_inline in setBinding, which in turns runs the
noSelfDependecies check. However, creating a binding resuting in a
binding loop must not crash, but instead result in the binding entering
an error state. To prevent a crash caused by the assert in debug builds
of Qt, we replace the assert with a warning for now.
A better approach in the future would be to ensure that we only run the
check in cases where we are sure that a self-dependency is really a
fatal error.

Pick-to: 6.2
Change-Id: I58158864ed81fa907132a4e7d6667c9b529e7e64
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
2021-07-07 17:07:15 +02:00
Topi Reinio
8ade7d3a3e Doc: Fix documentation warnings for QRgbaFloat
Pick-to: 6.2
Change-Id: I0c11edd184c7536ef91498d191a4a8684083f48a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2021-07-07 15:14:57 +02:00
Marc Mutz
cbf07134a7 QTest: there's no toString(QImage)
... so don't try to call it.

The call resolves to a fall-back implementation of toString() that
just returns nullptr, so we might as well pass nullptr directly, like
three lines above, and not confuse readers of the code.

Change-Id: I85d196aae7a0317050cfe16b206252df3fdffa2d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2021-07-07 15:07:55 +02:00
Joerg Bornemann
434ada8dcb CMake: Don't give plugins PUBLIC usage requirements
The pro2cmake.py conversion script faithfully reproduced the .pro files
for the plugins, which specified the libraries as public. But in CMake,
the implications of this are that public usage requirements should then
be propagated to consumers. We don't expect any consumers, since a
plugin is created as a MODULE library in CMake, so for Windows we don't
even have an import library to link with. The only exception to this is
for static builds where plugins are created as STATIC libraries
instead, but only in certain controlled situations do we then link to
plugins. Even then, usage requirements are not expected to propagate to
the consumers, so these relationships should always be specified as
private.

Pick-to: 6.2
Task-number: QTBUG-90819
Change-Id: Ibc7c2bcd3b6a9dc77df40c4c0c22ff254a80f33d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-07-07 09:41:37 +02:00
Giuseppe D'Angelo
6b14ea1ba4 qSwap: make it constexpr
C++20 gave us constexpr std::swap, but it makes no sense for qSwap
not to be constexpr anyways.

[ChangeLog][QtCore][QtGlobal] qSwap is now constexpr.

Change-Id: I13f3cbf2870adf5770c62dc00e15004978fc85d9
Pick-to: 6.2
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2021-07-07 01:13:53 +00:00
Volker Hilsheimer
0e6b31019f Fix placement of placeholder text in QLineEdits with action icons
After dc794f7622, side widgets only got
space if they were not fading out, but the logic was not correctly
accounting for side widgets that never fade, such as buttons added via
QLineEdit::addAction.

Fix this to give visible widgets space, unless they are fading out. That
was the intent of the original change. Rename the variable to make its
purpose clearer, and reset it at the end of the fade-out animation.

Add a much-needed test that relies on private APIs to verify that the
effective margins are calculated correctly.

Fixes: QTBUG-94824
Pick-to: 6.2 6.1 5.15
Change-Id: If2ee6be52be9e4f9be1e91f72f27681ce27def6d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-06 23:09:51 +02:00
Marc Mutz
713fad1c58 QCryptographicHash: don't allocate a Private in hash()
Just create it on the stack, we know the lifetime.

Reduces memory allocations in static hash() from 2 to 1.

Change-Id: Ie0e22b023331da9a6f39c80b4cd1a5c016f63a87
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-07-06 21:35:51 +02:00
Marc Mutz
dd06439f5e QCryptographicHash: move salient API to Private class
This is in preparation of an optimization in hash().

Change-Id: I2883dd6e9285f71bc7fed699a8a04645d621d4f5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-07-06 21:35:51 +02:00
Marc Mutz
ff77930c25 QJsonValue: add rvalue overloads for QJsonArray and QJsonObject ctors
These can be noexcept. Requires to add rvalue overloads for
QCborMap::fromJsonObject() and QCborArray::fromJsonArray(), too.

[ChangeLog][QtCore][QJsonValue] Added constructors taking
rvalue QJsonArray and rvalue QJsonObject.

[ChangeLog][QtCore][QCborMap] Added rvalue overload of
fromJsonObject().

[ChangeLog][QtCore][QCborArray] Added rvalue overload of
fromJsonArray().

Change-Id: I523c9a41166ea932fba4dd204072bd39d2192d2e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-07-06 19:35:50 +00:00
Nicolas Fella
56455304ff Fix QStringEncoder code example
Make sure the right variable is used

Pick-to: 6.2
Change-Id: Iec6d8392b320b704423ecbd4434270883fa9fd96
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-07-06 18:30:26 +02:00
Volker Hilsheimer
eaa48136a3 macOS 10.15: Fix focus frame for combo boxes
Amends df31696321 to take care
of macOS 10.15 specifically, where the focus ring is a pixel
too high and leaves a gap that's visible on high-dpi displays.

On macOS 10.14 and before, and for editable comboboxes, the focus
frame is correct.

Fixes: QTBUG-94069
Pick-to: 6.2 6.1 5.15
Change-Id: I278aa30036808c06f8e71385d4797315e46d8f1d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-07-06 17:49:31 +02:00
Marc Mutz
81411003a4 QCryptographicHash: extract a constexpr hashLengthInternal
...and use it internally.

Exported symbols are LD_PRELOADable, so the compiler might not
constant-fold calls to them. Besides, it's a requirement for a
follow-up change.

Change-Id: I437f46d7d42ed0a6921dee3027a471e2aa52baa1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-06 15:34:07 +00:00
Marc Mutz
bd6d706b69 QCryptographicHash: make Private::method const
It never changes, making it const might improve code-gen.

Change-Id: Ife8723e27ae9cf6cfcca48d58d46307003123354
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-07-06 17:34:07 +02:00
Alex Trotsenko
b3fbfcd373 QLocalSocket: reimplement readLineData() function
The base implementation reads data using repeated calls to getChar(),
which is quite slow.

Change-Id: Ie46624df63791b2cdd3c8a28fe3327427d942505
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-07-06 17:52:58 +03:00
Friedemann Kleint
4afcac9b7b configure: Add summary for xcb-sm (X11 Session Management)
Pick-to: 6.2 6.1
Task-number: QTBUG-95004
Change-Id: Idf1d47558427b35a7a325379884672553c99edc6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-07-06 16:52:58 +02:00
Marc Mutz
de18b3ff37 QCryptographicHash: port addData() to QByteArrayView
Incl. the static hash() function. Remove the QByteArray versions from
the API, but not the ABI.

Adapt some callers.

[ChangeLog][QtCore][QCryptographicHash] Replaced QByteArray with
QByteArrayView in addData() and static hash() functions.

Change-Id: Ia0e9bf726276305e05894d323d76a29e985f39eb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-07-06 16:30:52 +02:00
Liang Qi
85831bcfe6 opengl: fix a typo in QOpenGLPaintDevice::dotsPerMeterY()
Fixes: QTBUG-95005
Pick-to: 6.2 6.1 5.15 5.12
Change-Id: I88ab9b757a5cfee520e07ac6280e31f9211342f0
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2021-07-06 15:56:09 +02:00
Alex Trotsenko
03272e601c Clarify readLine() behavior on sequential devices
QIODevice::readLine() can also return partial lines, which was not
properly documented. Add an autotest for QLocalSocket to illustrate
and test this behavior.

Pick-to: 6.2
Change-Id: Ia2c1c438cc68d2672d34881e11fdf7837232f3b4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-07-06 14:50:55 +03:00
Marc Mutz
35453446a5 QCryptographicHash: don't present the same data over and over again
Need to decrement 'remaining' (check), but also increment data (meep).

Testing is a bit complicated, as most algorithms are just too slow to
fit into the 5min QTestLib timeout.  Picked the fast ones and Sha512
(which completes here in < 17s, with threads), at least.

Amends e12577b563.

[ChangeLog][QtCore][QCryptographicHash] Fixed a bug where presenting
more than 4GiB in a single addData() call would calculate the wrong
result().

Pick-to: 6.1 6.2
Change-Id: Ic72916ebc33ba087d58225af6d8240e46e41f434
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-07-06 01:17:26 +02:00
Volker Hilsheimer
6832789bbd macOS: fix separator actions not showing in menus
Amends a3f3af8a8f, which resulted in the
last visible separator always getting hidden.

Don't abuse QCocoaMenuItem::visible property to store whether the native
NSMenuItem is shown, only store whether it should be shown.

Rename the local variables to simplify the logic.

Fixes: QTBUG-94802
Pick-to: 5.15 6.2 6.1
Change-Id: I56e8c99a2a46d8cbdf75c4ad6cb714961f28a6a3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-05 23:34:09 +02:00
Shawn Rutledge
f5b76be1e4 Show positions in QDebug operator<<(dbg, QHoverEvent*)
In Qt 6, QHoverEvent is a QSinglePointEvent and carries more information
than it did in Qt 5.

Task-number: QTBUG-94971
Change-Id: I55b271e8741081ed9074f687b08f4111142a1bf0
Pick-to: 6.2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-07-05 18:55:53 +02:00
Volker Hilsheimer
c4f1b0f7c4 Repolish child widgets when parent style sheet changes
If a child widget that is affected by the parent's style sheet is
polished (because it's been shown explicitly, for instance by a layout),
then it must be repolished when the parent's style sheet changes, even
if the parent itself has not been polished yet.

Since the style sheet is set on the parent widget, we must repolish the
parent (which will repolish the entire widget tree), not just the
individual children and grand children.

Fixes: QTBUG-76945
Task-number: QTBUG-39427
Task-number: QTBUG-18958
Change-Id: I7bca9ee1badc07202fa05dc97f440f4ca6c9517d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2021-07-05 17:36:04 +02:00
Volker Hilsheimer
550e511ec8 Add high-resolution pixmaps for macOS dock widget title icons
The macOS style falls back to the QCommonStyle for those, and that
style loads the macstyle pixmaps. Weird, but cleaning that up is
for another commit.

Fixes: QTBUG-38776
Pick-to: 6.1 6.2 5.15
Change-Id: Ie1fe721387e64cb91ee5fc528667a63e6ddd6eed
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2021-07-05 17:36:04 +02:00
Alexandru Croitor
785df61231 CMake: Fix qt6_extract_metatypes to work with VS Generators
CMake has an optimization where it skips creation of a
${target}_autogen target and instead uses PRE_BUILD events for
AUTOMOC. That breaks qt6_extract_metatypes which expects the
autogen target to always exist.

Disable the optimization by generating a dummy header file and
adding it as a source to the target.

Pick-to: 6.2
Fixes: QTBUG-94944
Change-Id: Ic3d923cc6d3a149fea8c5c7b111576b64d19f608
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-05 13:02:05 +02:00