Commit Graph

50107 Commits

Author SHA1 Message Date
Zhang Hao
795ea19ca0 QLineEdit Cursor show white area
fix QLineEdit Cursor Rect and InputMask area overlapping,
the cursor rect area is white. when inputMask is set,we don't
need draw cursor.

Fixes: QTBUG-89578
Pick-to: 5.15 6.0
Change-Id: Ibec7f8f1f7331a12438fd821c2002903260da10a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-01-28 18:02:18 +08:00
Eirik Aavitsland
bfc09b8d8f Avoid overflow in text layout
Fixes oss-fuzz issue 29313.

Pick-to: 6.0 5.15
Change-Id: Idbabd162fa9e0dbce687981bdbcc75be37189a61
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2021-01-28 11:02:18 +01:00
Samuli Piippo
07c248a594 Remove blacklisting for b2qt tests that now pass
With the updated QEMU and toolchain, these tests now pass.

Change-Id: Icb74562a0e6422cd4564f63db991aa431e0e3119
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-01-28 09:27:14 +02:00
Samuli Piippo
d5a20467b8 tests: remove unnecessary skips for qemu
QEMU sysroots are now root owned.

Change-Id: Id829cb5debc449efee929ef83876e6ffbf78332c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-01-28 09:27:06 +02:00
Alexey Edelev
dac4d5a492 Clear non-relevant CMake compiler flags
Add internal function to cleanup compiler flags out of the
CMAKE_xxx_FLAGS_xxx variables. Use introduced interface to clear
the '/EHsc' flag for the MSVC compiler family. This adjusts the
CMake behavior to the qmake one.

Change the 'EXCEPTIONS' option handling in helper functions. Add
ability to add enabling and disabling exception flags. Previously
it was only possible to add disabling exception flags.

Fixes: QTBUG-89952
Change-Id: I60d47660a97ae9b5a1d1f4107d352c9e97890144
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-27 20:44:16 +01:00
Joerg Bornemann
71e3857f7c Fix output files of the *_header_check targets
Header files of a Qt module are usually found in subdirectories.
Avoid creating object file paths like "header_foo/bar.h.o".
When building with conan, the "header_foo" subdirectory was not created
for whatever reason.

Now, we make sure we have clean object file paths, e.g.
"header_check/foo/bar.h.o", and we create the directory upfront before
invoking the compiler.

Fixes: QTBUG-90529
Change-Id: Ifa5d6b97e07fc4e249c58cda5128439d60b14f5f
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
(cherry picked from commit 54980200c79b466a276a4d3054390e4b3162e9ed)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-01-27 17:08:14 +00:00
Mårten Nordheim
ed05ef7758 Fix static analysis warnings concerning QNetworkInformation
By marking undeclared and unused copy/move constructors as deleted.

Change-Id: Ie74b9cb015090dbb425b701a55eadb9d80ab0285
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-27 17:03:37 +01:00
Timur Pocheptsov
7687e2a429 Port QLocalServer to the new property system
Task-number: QTBUG-85520
Change-Id: Iee43a2e9e2d4847dad3b8be345d562af9aa3b690
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2021-01-27 16:54:46 +01:00
Timur Pocheptsov
061254ed12 QDnsLookup - port to the new property system
Read/write/notify properties, 3 out of 5 defined in this class.

Task-number: QTBUG-85520
Change-Id: Ic6c74f90a2fa3c71d71cf9a5d557f1b6fc489d35
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2021-01-27 16:54:38 +01:00
Fabian Kosmale
9b239b7fac Q_OBJECT_BINDABLE_PROPERTY_WITH_ARGS: Silence warnings properly
Same reason as for the version without args. Amends
1461df2ce4.

Change-Id: Ib9f0d8f27d858ff35134001c3cd7945b17668ae4
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2021-01-27 16:51:07 +01:00
Alex Trotsenko
821af41cf2 QProcess/Unix: simplify notifiers deactivation
To minimize code duplication, move the socket notifier deletion to the
closeChannel() function, where the pipe descriptor will be closed.

Change-Id: If75ba1c955c706ae6e2b3d9f53f7a25e4aa32fa7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-01-27 17:28:44 +02:00
Assam Boudjelthia
4e60681c87 Make QJniObject and QJniEnvironment public API
As part of Qt 6 restructring for the extras modules, this change exposes
the Jni APIs which are very important for Android platform. This patch
adds the APIs QJniObject, QJniEnvironment, QJniExceptionCleaner based
from private QtCore and QtAndroidExtras.

The Jni interface is cross-platform which justifies the name, but
currently, this API is used mainly for Android, and the naming comes
generic without Android keyword to avoid any future limitation on
supporting other platforms.

[ChangeLog][QtCore] Add new QJniObject, QJniEnvironment and
QJniExceptionCleaner APIs.

Task-number: QTBUG-89482
Fixes: QTBUG-89633
Change-Id: I4382dd53a225375759b9d042f6035a4a9810572b
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2021-01-27 17:23:04 +02:00
Nico Vertriest
407ce5c0af Doc: Fix CI warnings qtbase
Change-Id: I4e5a2d3494b86008bde234447ef701ea2d6447f6
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2021-01-27 14:46:36 +00:00
Sona Kurazyan
3a5a404a53 Port QMovie to the new property system
Task-number: QTBUG-85520
Task-number: QTBUG-85521
Change-Id: Ib936020260cf01a5221b63fb1eb0ccb23f5553a3
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-27 15:16:20 +01:00
Sona Kurazyan
67ced4da5a QMovie: initialize the private members while declaring them
Change-Id: Ie9c1484c8ad3483da3d559e1703770cdf22cec5e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-27 15:16:16 +01:00
Allan Sandfeld Jensen
f0ab1c02d7 Optimize subpixel positioning
Dividing by (1/x) is the same as multiplying with x.

Change-Id: Ica854d1e012ad83437e32f12de0d3513a42ae6f8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-27 15:09:58 +01:00
Fabian Kosmale
0f4d512dc4 Q(Untyped)Bindable: add takeBinding method
We missed takeBinding as a supported operation on Q(Untyped)Bindable.
To avoid adding version checks to code dealing with QBindableInterface,
we simply synthesize takeBinding as a combination of binding to retrieve
the binding and setBinding with a default-constructed
QUntypedPropertyBinding.

Change-Id: I43803a0dfe210353d0235f0373d2257f75ffe534
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-27 15:01:56 +01:00
Fabian Kosmale
f07c6f52ac QBindable: add initial documentation
Change-Id: I43681093c8819289037c76bd9c05b88a6da8311b
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-27 15:01:54 +01:00
Allan Sandfeld Jensen
16b8d766ab Fix division by zero
Consider a zero we need to divide with illegal input.

Fixes oss-fuzz 29347

Pick-to: 5.15 6.0
Change-Id: I2aae1d765d2dd81c95d423038ef5cb878d4f8026
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2021-01-27 15:00:57 +01:00
Friedemann Kleint
5849619607 Stabilize tst_QListView::internalDragDropMove() on X11
The test was flaky in recent test runs on X11. Debugging
showed that the global position of the synthesized mouse
events was not correct due to the window not being mapped
properly. Use QTest::qWaitForWindowActive() instead of
QTest::qWaitForWindowExposed() to ensure that.

Task-number: QTBUG-90016
Pick-to: 5.15
Pick-to: 6.0
Change-Id: Ie1bc4157e6d0e807d8530f70dcbd27b5e2fc813c
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2021-01-27 14:00:57 +00:00
Edward Welbourne
3c9013b76a QTzTimeZonePrivate::init(): fix handling of empty ID
We were using the first abbreviation in the list, where the current
time's one is probably more apt.

We look up displayName() using ICU, when in use, but that abbreviatio
may be unknown to it. So ensure, when using abbreviation in place of
empty id, that we get the system zone for ICU, for use if we're asked
for the display name.

This is a follow up to b12d6c6a8a.

Pick-to: 6.0 5.15
Change-Id: I177db55de1ffbc763def8a0423642f2b3da74fa6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-01-27 15:00:57 +01:00
Edward Welbourne
b08368d99f Add qHypot() to qmath.h, exposing and extending std::hypot()
We have plenty of places where we add some squares and take a square
root; this may be done more accurately and faster by hypot().
Introduce QHypotHelper to handle hypot with more than 3 parameters,
and with 3 when the C++17 version is missing (which it never should
be). Include an overload taking arbitrarily many valus and ensure that
we can use qHypot() with qfloat16.  Illustrate with some example uses,
add some tests.

[ChangeLog][QtCore][QMath] Header <QMath> now provides qHypot(), an
implementation of std::hypot() taking arbitrarily many numeric values,
including support for qfloat16, while avoiding the overflow and
underflow problems that arise when naively taking the square root of a
sum of squares.

Change-Id: Ia4e3913fe83fc27d17d8e7f1a52f03ad445c1fed
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-01-27 15:00:57 +01:00
Edward Welbourne
ad16f79e5f Update public suffix list to today's latest
Fetched from the authoritative source, verified the content matches
that of the current master revision in the github repository.

Amend one cookie jar test to find the last group in the last chunk
correctly - each group arises from a non-empty hsah-table entry, but
the last few hash-table entries may be empty, in which case the last
group isn't just before the last index, it's earlier by the number of
empty hash table entries. In the process, amend this test and the
related test of the end of the first chunk to iterate all the entries
in the group (in the present version, as it happens, each end-group
has just one entry, but that may vary).

Task-number: QTBUG-90214
Pick-to: 6.0 5.15
Change-Id: I6da365a6ca558124f8275e392735071dc77e04bb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-01-27 15:00:57 +01:00
Edward Welbourne
05e67fbcab Update to CLDR v38.1, adding Yukon Standard Time
No change to QLocale's data, one addition to the Windows time-zone
data. What was formerly "Us Mountain Standard time / Canada" is now
Yukon Standard Time.

Fixes: QTBUG-89784
Pick-to: 6.0 5.15
Change-Id: I4c9a23620e74ea379be8a4c5ba0896d35fe9b594
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-01-27 15:00:57 +01:00
Sona Kurazyan
8f8405e046 Port QThreadPool to the new property system
Ported all properties, except activeThreadCount. Marking it dirty may
cause a re-evaluation of properties depending on it, which may reault in
a deadlock in case of trying to read activeThreadCount property which is
being marked as dirty.

Task-number: QTBUG-85520
Change-Id: Id073b0895c89a9e6b05b57ad520db994e550a1c9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-01-27 15:00:56 +01:00
Fabian Kosmale
6d3a886f09 QVariant benchmark: fix crashes
- Skip unused metatype id
- Do not construct a QVariant from an int, when we instead want to
  construct a QVariant for a given metatype (was: metatype id in Qt 5)

Pick-to: 6.0
Change-Id: I1ac19dec5549b424a9429f69999eaf8e96c022e2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-01-27 15:00:56 +01:00
Mårten Nordheim
d3735ff838 Fix schannel compilation issues
Amends 7cf8e5ada9

Change-Id: I6e188675ab53fd173bd75defe9d190a509f4adad
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-01-27 15:00:56 +01:00
Allan Sandfeld Jensen
05741b404a Protect against sign-change of size on 32bit
Since qsizetype is signed and the profileSize unsigned, it can turn
negative circumventing the test here.

Fixes oss-fuzz issue 29278.

Pick-to: 6.0 5.15
Change-Id: I1e211c78db6f4ff150613f52d8fc29807f0088ff
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-01-27 10:30:26 +01:00
Juha Vuolle
a543e8f42e Fix QT_TOOL_PATH_SETUP_COMMAND
Commit 18fc9e1bf8 introduced a
Windows-only QT_TOOL_PATH_SETUP_COMMAND to make it possible to
call the tool of a module while building the module itself.
The "set PATH=..." command in QT_TOOL_PATH_SETUP_COMMAND was flawed,
because it contained escaped double quotes which made the set command ineffective.

Fix this by removing the escaping of the double quotes.
This was uncovered when porting qtscxml to CMake.

Change-Id: I5909aa841e7895d6d0feb4037a935b805ccfdc99
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-27 11:30:26 +02:00
Timur Pocheptsov
dcbca2975f Q_GLOBAL_STATIC - deal with static code analysers
At least some of them don't like the fact we have classes with
non-trivial destructors but trivial move/copy constructors -
disable them explicitly, hopefully those analysers are smart
enough to stop complaining.

Change-Id: I285711a2d21bff89661af928ba326ecd5b69823f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-27 10:30:26 +01:00
Fabian Kosmale
bf7b1a2aa8 QVariant: Do not destroy trivial types
perf indicates that we spend quite some time in ~QVariant in the
referenced task's benchmark. With this patch, we significantly reduce
the amount of work we do in the destructor for trivial types: Instead of
calling an out-of-line function, which does a few checks and then does
an indirect call through a function pointer to a do-nothing dtor before
freeing the memory, we now simply free the memory.

We achieve this by changing QMetaTypeInterface to leave the dtor
function pointer null if the type is trivially destructible. Then, in
QVariant we use the QMetaTypeInterface directly instead of going through
QMetaType.

Task-number: QTBUG-90560
Change-Id: Iaf87036710e1680323842e1ba703a5d3d0e5027a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-27 10:30:26 +01:00
Thiago Macieira
00b759a8d0 QJsonObject::take: add missing detach() call
We were modifying shared objects.

Pick-to: 6.0 5.15
Fixes: QTBUG-89625
Change-Id: Id6bc735b79cf4beb9454fffd165c56476a5dec04
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2021-01-27 05:11:39 +00:00
ChunLin Wang
6da6b6da44 Fix that the placeholdertext of QCombobox is not drawn
If the current index is invalid,a placeholdertext will be displayed.

Fixes: QTBUG-90595
Pick-to: 6.0 5.15.2
Change-Id: Id4c6b9c959242b96ee0944b8fc3131a9a2fdcccc
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2021-01-27 09:11:42 +08:00
Valery Volgutov
f7f618b312 evdevtouch: Fix normalizedPosition
Set the available virtual screen geometry. This geometry is needed for
QEventPoint::normalizedPosition calculation.

Pick-to: 6.0
Change-Id: I7e25488d62a5099c14b5c15fa2b4040ea32b9ecd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
2021-01-27 00:56:05 +00:00
Sona Kurazyan
ba62256c5a Port QStandardItemModel to the new property system
Task-number: QTBUG-85520
Task-number: QTBUG-85521
Change-Id: I2f9bbe8bc06838fcbadd446e111fb697120f550c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-26 21:48:00 +01:00
Ivan Solovev
709a0942aa QTimer: port to new property system
Task-number: QTBUG-85520
Change-Id: I1f92b86619f2ca186c505251b21463f396af0ac6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
2021-01-26 21:47:50 +01:00
Sona Kurazyan
519420641f Port QPauseAnimation to the new property system
Task-number: QTBUG-85520
Change-Id: I8c0ee86598f4c0f093f64b2891ee835a43964b84
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-26 21:47:47 +01:00
Andy Shaw
feb20459bd ibase: Fix the compilation and include it again so it can be detected
Change-Id: I38721155f090173862da8beab8cb04b2e015dcff
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2021-01-26 21:47:36 +01:00
Ivan Solovev
fe7cbf8fe6 QRegularExpression: add move constructor
- Add move constructors to QRegularExpression, QRegularExpressionMatch
  and QRegularExpressionMatchIterator.
- Update the documentation to explicitly state that only destructor
  and assignment operators can be called for a moved-from object

Task-number: QTBUG-86634
Change-Id: I06b4f54e300541033a9a18339c97338717a06da0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2021-01-26 17:20:01 +01:00
Alexey Edelev
114d5c045d Fix invalid Qt prefix version when looking for HostInfo module
In QtSetup.cmake the PROJECT_VERSION_MAJOR variable was used to
identify prefix of 'Qt<version>HostInfoConfig.cmake'.
Qt<version>HostInfo is not found, if project version differs
from qtbase version.

Move the 'INSTALL_CMAKE_NAMESPACE' and 'QT_CMAKE_EXPORT_NAMESPACE'
variables to 'QtBuildInternalsConfig.cmake'. In this case
variables will be exposed for a wider list of internal routines.

Use the 'INSTALL_CMAKE_NAMESPACE' variable as prefix to find
Qt<version>HostInfo module.

Fixes: QTBUG-90345
Change-Id: Ic595d1c5beb74f34e69b58e18590a3afc2f346f7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-26 17:16:04 +01:00
Bastien Bouclet
b69b04c479 QIcon: Use the @nx pixmaps in the paint method
Make use of the device pixel ratio in the QIcon paint method so the @nx
hi-dpi pixmaps are selected when appropriate when painting to a
QPainter.

Pick-to: 6.0
Fixes: QTBUG-90042
Change-Id: I53995a2285ef879e3c4fddb9f8da702e256a260f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-01-26 15:33:08 +00:00
Alexey Edelev
127a1ada32 Change XCB::XFIXES condition in library mapping
Replace condition of XCB::XFIXES from the 'XCB_XFIXES_FOUND' variable
to 'TARGET XCB::XFIXES'.

Fixes: QTBUG-89979
Change-Id: I77b8b4046dc6852ecb209d942ee94d864a35c378
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-26 16:18:24 +01:00
Alexey Edelev
e3e1fc4820 Add upstream version of FindPostgreSQL.cmake
Add CMake upstream(3.20.0) version of FindPostgreSQL.cmake, to avoid
server-related headers lookup.
Avoid using the Qt version of the PostgreSQL module, if it's
older than the CMake's one.

Fixes: QTBUG-89639
Change-Id: I71a0c3508000901969933aea8a08d1ad431db711
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-26 16:05:05 +01:00
Fabian Kosmale
293b7fab55 Workaround MinGW not handling error suppression macro correctly
Fixes: QTBUG-90353
Change-Id: I9270f4107f3f7083d28228f2426b34bc1e198112
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-26 15:55:21 +01:00
Volodymyr Samokhatko
976f28e7bb Fix populating selection clipboard with keyboard
Task-number: QTBUG-59879
Pick-to: 6.0 5.15
Change-Id: I6948919fc90995c60a34b5bd6b4a225c1a59fd9b
Reviewed-by: Liang Qi <liang.qi@qt.io>
2021-01-26 12:28:49 +00:00
Andy Nichols
3509fc3a1f Android: Fix deprecated QVariant usage
Change-Id: Ib14bbba726d1da352933ed418931d69443720946
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-26 13:28:35 +01:00
Mårten Nordheim
6cd5448404 Don't forward-declare non-Qt things with QT_FORWARD_DECLARE_*
As it breaks in namespace builds

Change-Id: I1a278330eeea6b2b89c8a57c0df828dff94ebf7a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-01-26 13:28:35 +01:00
Tor Arne Vestbø
c4c0c54ba1 Clean up QCocoaFileDialogHelper
- Remove indirections via helper functions that did nothing but
   redirect.
 - Remove unneeded checks of !m_helper in delegate. The helper is
   always valid for a delegate.
 - Use m_ prefix for member variables, as in the rest of Qt.
 - Implement init: as per modern Objective-C recommendations.
 - Remove respondsToSelector checks that were not needed.
 - Use modern Objective-C property syntax.
 - Fix code style issues/formatting.
 - Remove unused functions.
 - Reorder and remove unused includes.
 - Class-initialize member variables.

Change-Id: Iedc084b67bb496b2ef13001a0e6aa46d4574eb57
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-01-26 13:28:35 +01:00
Tor Arne Vestbø
d7c07578bc macOS: Don't restrict non-modal file dialogs to open-dialogs only
None of the APIs used for non-modal operation require NSOpenPanel.

Pick-to: 6.0 5.15
Change-Id: I7ea49a8dad6e724a8a0d4321ea443d4cdcc5a6b1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2021-01-26 13:28:35 +01:00
Tor Arne Vestbø
fce391fefb macOS: Show system tray icon on mouse button press, not release
This was a regression from 395e2d9bc4.

The system behavior is to show the menu on press, so we follow that.

This is also documented at:

 https://doc.qt.io/qt-5/qsystemtrayicon.html#ActivationReason-enum

Fixes: QTBUG-86518
Pick-to: 6.0 5.15
Change-Id: Ia4dc5356bf0377a9d55f238caf5bf1becd95648d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-26 13:28:35 +01:00