Commit Graph

35814 Commits

Author SHA1 Message Date
Ulf Hermann
67aa365d41 Do emit CMake declarations for existing private headers
We need to make sure we don't emit CMake declarations for private
headers if those headers are absent. However, most of the time we have
private headers and should add them.

Task-number: QTBUG-37417
Change-Id: I639eb93d008de27928dedac540894af70c1883b9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-04-27 06:43:11 +00:00
Thiago Macieira
ff029a9ca8 tst_QString: remove old HP aCC workaround
Change-Id: I3840d727dee443318644fffd15291b1d77dca2fc
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-04-27 07:07:45 +00:00
Ulf Hermann
e0b5ff4ad5 QWidgetWindow: Immediately forward close events to QWindow
This way the platform window is destroyed in a timely manner, preventing
redundant close events from the window system.

Task-number: QTBUG-43344
Change-Id: Ifdfca59ceacef54405f1c227c493dc514a1b27ea
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-04-27 07:00:13 +00:00
Kari Oikarinen
e69b6d2dbc tst_Gestures: Use QTest::qWaitForWindowExposed()
Instead of a local wrapper for it.

Change-Id: I0708dfad44b3db0c7a13e75ba5b4193ab50ac315
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-27 06:20:48 +00:00
Thiago Macieira
2660aefdbc Remove hack that violates ODR
GCC with LTO sees through our hack:

qprintdialog_unix.cpp:212:7: warning: type ‘struct QPrintDialogPrivate’ violates the C++ One Definition Rule [-Wodr]
qabstractprintdialog.cpp:49:7: note: a different type is defined in another translation unit

This hack was there so that the QPrintDialog functions in
qabstractprintdialog.cpp could use the d pointer. So instead of hacking
around the issue, just use the class that this file has access to:
QAbstractPrintDialogPrivate.

Change-Id: I3840d727dee443318644fffd1528e2e8b814e983
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-04-26 20:04:36 +00:00
Thiago Macieira
26e3dfd4ab Improve padding hole issues in QAbstractPrintDialogPrivate
Placing a boolean between two pointers means we'll have a 7-byte padding
hole (64-bit). So move it to the bottom of the class, consuming the tail
padding that needs to be there anyway on 64-bit systems.

On 32-bit Unix systems, the better place would be at the top, as the
parent class (QDialogPrivate) has a 3-byte tail padding. But that's
fragile, as QDialogPrivate can change, doesn't apply to MSVC's ABI and
doesn't gain us anything on 64-bit.

Change-Id: I3840d727dee443318644fffd1528e4f05f4142bd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-04-26 16:15:30 +00:00
Tor Arne Vestbø
7c3053b301 qmake: Don't map Xcode SYMROOT to output directory
The output directory may be the same as the source directory in
the case of an in-source build, but Xcode treats the SYMROOT as
a build directory, and automatically excludes it from Time Machine
backups, which may result in not backing up sources.

Instead we map SYMROOT to an .xcode subdirectory of the output
directory, and then use CONFIGURATION_BUILD_DIR to make sure
the final build targets end up where they used to.

Task-number: QTBUG-52474
Change-Id: I3852ca9088e75ca62fca4c1217b5485175d9436f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2018-04-26 14:19:21 +00:00
Frederik Christiani
c127fc83ad Show high DPI custom cursor on macOS
Set the devicePixelRatio to 1 on the scaled down pixmap.
A scaled down version of the high DPI pixmap is added to the NSCursor in
addition to the high DPI one, but the devicePixelRatio must be set
correctly on the smaller of the two for macOS to pick the right image
to use on a high resolution display (retina).

This change also fixes the problem that only a high DPI custom cursor
with a hotspot in the upper left quadrant is applied by macOS. I suspect
that the NSCursor was discarded by macOS, because the hotspot was
outside the device independent bounds of the smaller scaled image.

Task-number: QTBUG-52211
Change-Id: I7e552e8f62f5255dd3786da44b2f619f6790c37a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-04-26 08:56:32 +00:00
Oswald Buddenhagen
4bab1b0d7c configure: don't emit empty GCC_MACHINE_DUMP to qdevice.pri
there is no point in doing that.

Change-Id: Ie09edeed340ea87eddb38980b0df7ed777ec6280
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-04-25 18:53:33 +00:00
Oswald Buddenhagen
75587c8030 qmake: fix look-up of relative files from .depend_command in shadow builds
the dependency paths are fixified against the output directory, so we
must resolve them accordingly.

Change-Id: Id92750aad358153bd2db5daca3194c54eda58dbb
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-04-25 18:52:49 +00:00
Oswald Buddenhagen
395a19f032 improve documentation, mostly of the QT_TR*_NOOP macros
Change-Id: I65ccddec84a01945a6aee2a859d4f92ea830785b
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Mateusz Starzycki <mstarzycki@gmail.com>
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-04-25 17:17:04 +00:00
Oswald Buddenhagen
b55176df08 syncqt: prune references to @ignore_for_master_contents
this variable hasn't been used in any syncqt.profile for many years, and
if it would, it would cause quite some side effects.

Change-Id: Ia936eff8f6a2a801fc644eee991821165d51dc1f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-04-25 17:16:55 +00:00
Paul Olav Tvete
3d863ae798 Fix build with -no-feature-graphicsview
Change-Id: Idddd353695d2a24ed90c29f557abfedf11d82fbc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-04-25 14:04:09 +00:00
Kari Oikarinen
0cb940b1d3 tests/auto/widgets/widgets: Avoid unconditional qWait()s
Task-number: QTBUG-63992
Change-Id: I7b0c259800082284ddae4e25d139ad3adc858467
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-25 11:55:34 +00:00
Kai Koehne
7917305aa5 Doc: Show more examples on how to have multiple logging rules
Task-number: QTBUG-66050
Change-Id: I6872cd64f9b27b9849e4166af7aa6414c372cd5e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-04-25 11:02:53 +00:00
Thiago Macieira
8863b8f24f QSysInfo: Correct the \since for {machine,boot}UniqueId()
The code was written before 5.10 was released, but took long to be
merged.

Change-Id: If90a92b041d3442fa0a4fffd15286fe079b058e1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-04-25 10:28:57 +00:00
Oswald Buddenhagen
e46f9d68d8 syncqt: fix CamelCase aliases for injected headers
don't put them into GENERATED_HEADER_FILES, as they obviously cannot be
found in a pre-synced source dir. instead, let the injection code itself
add them to INJECTED_HEADER_FILES.

Task-number: QTBUG-67813
Change-Id: Id2a7c565b14fcba8aba9d1dd8b1dd39c586d0d91
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2018-04-25 10:28:31 +00:00
Oswald Buddenhagen
967bb3f0d8 syncqt: don't write INJECTED_*HEADERS
these are actually redundant with INJECTIONS.

Change-Id: I0a71930401e00d30c9898b4d958de5e89c496d18
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2018-04-25 10:28:22 +00:00
Nico Vertriest
b1bbce2609 Doc: Update doc for Dir View Example
Task-number: QTBUG-60635
Change-Id: I4a23f4866c76b9f5c29653ca30e44c3b844a9aa8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-04-25 09:02:02 +00:00
Nico Vertriest
5155942a0d Doc: Update Gradients Example
modify to latest syntax for connect statements

Task-number: QTBUG-60635
Change-Id: Ie0f8f6bdbd5aec7379f7572e978adf65b9a96bdc
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-04-25 09:01:47 +00:00
Friedemann Kleint
1b1fd81a81 Windows QPA: Add missing calls to keyboard initialization
Add calls to changeKeyboard() to the QWindowsKeyMapper constructor
and the handling of WM_INPUTLANGCHANGE so that the locale is
correctly initialized and changes are processed.

Change-Id: Ia30d8c6434ca85165e4882240ae16f9a75dcf4ff
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-04-25 07:42:55 +00:00
Friedemann Kleint
f7980f4eda Windows QPA: Fix handling of VK_DECIMAL/VK_SEPARATOR
Remove the hardcoded mapping from the key table for fallback keys
since the keys are locale-dependent.

Task-number: QTBUG-57992
Change-Id: I016ab5f7f7e8abfd30f6416d2e7597db7deecb9b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-04-25 07:42:43 +00:00
Allan Sandfeld Jensen
18db0b49c6 Don't crash on <br> following a <table>
A <br> has a new-line but no text, so be able to handle no lines.

Task-number: QTBUG-60853
Change-Id: I3d4dbd529114bbe8afe760c3622b52446202ec7c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-04-25 07:08:50 +00:00
Kari Oikarinen
73031ebb99 tests/auto/widgets/{effects,styles}: Avoid unconditional qWait()s
Task-number: QTBUG-63992
Change-Id: I1af537bae705d4627880c5ae50669b1ef72562f2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-04-25 05:47:01 +00:00
Johan Klokkhammer Helsing
8ac0e6592b Skip flaky tst_QWindow::childWindowPositioning on Wayland
Sometimes causes protocol errors (i.e. termination) on Wayland with xdg-shell
v6.

Task-number: QTBUG-67648
Change-Id: I6c855affb145590f47a425d233c5fd6b7e1e8914
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
2018-04-25 04:51:34 +00:00
André Klitzing
8c57663ed2 Fix documentation of setBackendConfigurationOption
Introduced by mistake in f55c73ede2

Change-Id: Ieac8fc0a6bb536e5ef3770a22785fe41d4033ee9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-04-25 04:18:48 +00:00
Morten Johan Sørvig
0f6a6b2bff Cocoa: Don’t starve the event loop on requestUpdate()
Some of our examples, and perhaps also some applications,
call requestUpdate() immediately after producing a
frame. This can cause Cocoa to immediately start
(trying to) draw a new frame without processing e.g.
input events.

This should (and will) be handled by rate limiting
updates with CVDisplayLink. In the mean time fall back
to using the base class QPlatformWindow implementation,
which is implemented using a timer, which will allow
for input event processing.

Change-Id: Ic2541f344b2f4018d785404a06274959a7bad2df
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2018-04-24 19:48:50 +00:00
Gabriel de Dietrich
c7eb2c173e QCocoaFontDialogHelper: Fix NSFontManager delegate warning
According to Apple's documentation, there's no delegate
in NSFontManager. We set its target instead. The action
is changeFont: by default.

Change-Id: I8c01bfa97c78dd8097f38c27353748d13f51489f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-04-24 19:46:14 +00:00
Gabriel de Dietrich
a4e6117c53 Style sheets: detect and use font set on QHeaderViews
We also ask the parent style to draw the header label
instead of the base style which is more likely to respect
other text related parameters.

Change-Id: I6dd658fa4d016a76d7c450478dc42f07e4b807c4
Task-number: QTBUG-33855
Task-number: QTBUG-37153
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-04-24 18:27:34 +00:00
Allan Sandfeld Jensen
e413874467 Fix division by zero in radial gradiants with NEON
The NEON implementation uses rsqrt and thus can not be taken on 0, so
replace the minimum with something close to zero instead of zero.

Task-number: QTBUG-59961
Change-Id: Ia39e45be675b056c1e22900495ce9ba4e8b70e5f
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-04-24 18:16:54 +00:00
Gabriel de Dietrich
143cf9e467 QCocoaWindow: Fix handleMouseEvent() compilation warning
qtbase/src/plugins/platforms/cocoa/qcocoawindow.mm:408:53: warning:
      'handleMouseEvent<QWindowSystemInterface::DefaultDelivery>' is deprecated [-Wdeprecated-declarations]
                            QWindowSystemInterface::handleMouseEvent(window(), window()->mapFromGlobal(localPoint.toPoint()), localPoint,

Change-Id: Ifbf8c46e31a1de2089ce0e16cec087fdd9adb64e
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-04-24 17:42:53 +00:00
Thiago Macieira
309dacedac Atomics: remove requirement for alignment equality with plain types
This was originally added so that you could replace a T with
QAtomicInteger<T> in the same class and still keep ABI. However, for
legacy reasons, on 32-bit x86, types larger than 4 bytes keep an old
1990s alignment of only 4 bytes, but modern std::atomic<T> for those 8-
byte types enforces an alignment of 8 bytes. Therefore, the requirement
to keep alignment is not possible to guarantee.

In other words: you may not replace T with QAtomicInteger<T> or
std::atomic<T> and assume no ABI breakages in all platforms.

This is a requirement to implement atomicity. An 8-byte type aligned to
only a 4-byte boundary could cross a 16-byte boundary or, worse, cross a
cacheline boundary. Crossing the 16-byte boundary could be bad on some
processors, but crossing the cacheline boundary (addresses ending in
0x3C, 0x7C, 0xCC and 0xFC, or 4 out of 64 possible addresses or 6.25%)
is always bad: the CPUs cannot guarantee an atomic load or store
operation.

See also <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71660>.

Task-number: QTBUG-67858
Change-Id: If90a92b041d3442fa0a4fffd15283e4615474582
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-04-24 17:36:42 +00:00
Kari Oikarinen
15ada2b917 tests/auto/widgets/kernel: Avoid unconditional qWait()s
Task-number: QTBUG-63992
Change-Id: Icb32b516002c3bb2841c8e7a29624e54cfcbbcac
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-24 05:01:57 +00:00
Lars Knoll
c579f49e2a Fix QML integration of widgets
We need to mark the object as deleted before destroying
it's declarative data, otherwise all sorts of bad things
can happen.

This fixes the qwidgetsinqml autotest in qtdeclarative.

Change-Id: I05a645ebe1ca7a50c8927e3dbd9ebb5aaf369a71
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
(cherry picked from commit 3e91625b58)
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-04-23 13:46:55 +00:00
Martin Smith
b458cb312c doc: Make both qEnvironmentVariable() functions visible in the docs
There had been a fake declaration for qEnvironmentVariable() in qglobal.h
thaqt was only visible to QDoc. It was removed in favor of documenting
both the actual declarations of qEnvironmentVariable(), one with a 2nd
parameter for passing a defualt value and one without that parameter.
But the one without the default value parameter was marked internal, so
it didn't appear in the docs.

When both functions were documented with a shared comment, a bug in
QDoc was revealed, because these functions are global, while the shared
comment functionality had only been implemented for class member functions.
Now the shared comment functionality has been implemented for global
functions, so these two functions are now documented with a shared
comment. We can, of course, reintroduce the #ifdef QCLANG_QDOC trick, if
that is pre3ferred.

Change-Id: I41d85def5daa3215a995d7697d064dfae37e8b2a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-04-23 13:28:51 +00:00
Friedemann Kleint
994e0e4c36 Windows QPA: Fix Korean IME removing words when using CTRL shortcuts
Ignore the WM_IME_ENDCOMPOSITION message in that case.

Done-with: Tobias Koenig <tobias.koenig@kdab.com>
Task-number: QTBUG-58300
Change-Id: I9506754a149905222a324b85634964fce398d3ac
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-04-23 12:57:43 +00:00
Kari Oikarinen
12559058b0 tst_QFile: Don't expect Windows HANDLE equality in nativeHandleLeaks()
That check is flaky on Windows. It doesn't seem to be testing Qt functionality.
I also don't see CreateFile2() documentation mentioning any guarantees that
opening the same file twice would give the same HANDLE each time.

Change-Id: Ica2e60571ae9fc39bf822803a2a9dd6add8323d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-04-23 12:45:32 +00:00
Kai Koehne
7b87bdff1a Doc: Mark local functions in qlogging.cpp as internal
This fixes qdoc warnings introduced by 67d5f79fe6.

Change-Id: I4b199e6243d9a7706befe4bc9549c78c11026d9e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-04-23 06:27:57 +00:00
Kai Koehne
a69a3594e2 Doc: Advocate use of std::initializer_list constructor in Q[String]List
We're relying on C++11 since a while, so lets not advertise creating
lists of strings with operator<<() anymore.

Change-Id: I14a3442ff852ac2c106d90c63504eb9ebb737609
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-04-23 06:27:40 +00:00
Peng Wu
e555c03a42 Style sheets: Include margin while calculating QHeaderview section size
Align with QCommonstyle QHeaderview section size calculation.

Change-Id: I4c11e1881f48850ace3bdbb3c96f999cc298c91e
Task-number: QTBUG-56457
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2018-04-22 19:30:20 +00:00
Tor Arne Vestbø
070aec28e6 qmake: Fix prl lookup for suffixed frameworks on Apple platforms
We need to take into account the presence of a possible ',_debug' suffix.

Change-Id: I5655394b78723bbc6cc32e56849acc2366d288e2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-04-22 17:10:23 +00:00
Mårten Nordheim
2fe80ed203 QSslSocket: Call transmit when encrypted on WinRT
Once connection is established the socket emits 'connected', and then
you can start writing. But it will end up in the write-buffer and won't
get sent until 'transmit' is called. Some code (e.g. QWebSocket) relies
on QSslSocket transmitting once it's encrypted. This is done in the
OpenSSL backend but was not done in the WinRT backend.

Task-number: QTBUG-56558
Change-Id: I8cf5d3257f3597a4bb80f35369490a3816506a34
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-04-21 12:16:16 +00:00
Andre Hartmann
9aced25ab5 QByteArray: Use nullptr for "Safe and portable C string functions"
Change the documentation to use nullptr and modify the related code
also while at it.

Change-Id: I6264a254828159cda54e90393835ea04e131350b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-04-21 06:07:31 +00:00
Andre Hartmann
bca1d8c382 QByteArray: Add a note regarding overlapping pointers to qstr(n)cpy
Stated e.g. in http://en.cppreference.com/w/c/string/byte/strcpy

Change-Id: I42fd5a5fa6a63b67a7105aa56e93e3d3f2193cf7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-04-21 06:04:22 +00:00
Friedemann Kleint
a38c46ad85 Windows QPA: Fix ambiguous shortcut overload warnings for ALT-keys
Use the match with the least modifiers (prefer Shift+9 over
Alt + Shift + 9) resulting in more missing modifiers.

Task-number: QTBUG-67200
Change-Id: I90463c0dfaadda29dcd24a08ba35c91fac8bd04c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-04-20 21:37:39 +00:00
Friedemann Kleint
a0a22037cd Windows QPA: Fix duplicate/missing native events
Add utility functions to QWindowsContext input messages sent to
native event filters (event dispatcher and window system interface).

Do not send input and similar events to the event dispatcher since
QEventDispatcherWin32::processEvents() also sends them.

Note though that QEventDispatcherWin32 does not receive all windows
messages.

In QWindowsKeyMapper, send the WM_CHAR/WM_IMECHAR events from
where the messages are removed.

Task-number: QTBUG-67095
Change-Id: I5f61294fcb3aee7e0eacd840a2010d128cd02a5d
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-04-20 21:37:27 +00:00
Anton Kudryavtsev
ab6cc41968 QTabWidget: clarify ownership after insertTab() and addTab()
Change-Id: I7cd3aa5c092c99bbafd09c4bea7c6824d0b6740a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-04-20 10:40:37 +00:00
Mirko Vogt
a8f73a1624 configure: mention -libudev in help output
amends 684a1559f.

Change-Id: I25fd5f096e99937382048e2eb763715b9578a8fb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-04-20 10:38:03 +00:00
Oswald Buddenhagen
cf204590ea Merge 5.11 into 5.11.0
Change-Id: I11c61dc1259ed66d871ecab2666085ccf37a9342
2018-04-20 12:21:57 +02:00
Andy Shaw
7c532891e0 Send ShortcutOverride event when receiving a non-spontaneous key press
When a key press is received which is not spontaneous then it needs to
be manually sent as a shortcut override event to ensure that any
matching shortcut is triggered first. This enables emulation/playback
of recorded events to still have the same effect.

[ChangeLog][QtWidgets] Sending a key press event with sendEvent() now
sends a ShortCutOverride event first to the widget to trigger any
shortcuts set first.

Task-number: QTBUG-48325
Change-Id: Iafcc2cdb1773bffe89edaeb0abc44cd5a51088e6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-04-20 10:18:49 +00:00