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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This fixes qdoc warnings introduced by 67d5f79fe6.
Change-Id: I4b199e6243d9a7706befe4bc9549c78c11026d9e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
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>
We need to take into account the presence of a possible ',_debug' suffix.
Change-Id: I5655394b78723bbc6cc32e56849acc2366d288e2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
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>
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>
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>
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>
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>
Wrap current example code snippet in std::function as a work-around,
as suggested in comment to QTBUG-61145 (see history tab) with the same
issue.
Task-number: QTBUG-67603
Change-Id: I6875b31d8e983e234b88384c7d76917ac144f953
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
the 'info' variable was re-used too early. make a new one 'infoargs'
instead.
Task-number: QTBUG-67286
Change-Id: I77881ecbfce338d653358c5e5edac84e1c0c7de3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
In iOS 9.0, the original application:openURL function was deprecated
and replaced with a newer one. As iOS 9.0 is no longer supported we can
safely switch to the new one. This is also required to prevent a crash
when the LSSupportsOpeningDocumentsInPlace and UIFileSharingEnabled keys
are set to true in the Info.plist file.
Change-Id: I59a7ee82e3ddb2777ef78e28b964ef8666c629af
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This brings back Qt 4 behavior. The difference is that we only
ignore modifier-only key events, as it's done natively.
Task-number: QTBUG-49462
Change-Id: I02f2313e1164ba185336d80ac5cc16ce6d883b79
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
It use to be yellowish in the past, but modern versions
of macOS show it light gray.
Change-Id: I8cca5cbb37c73a6dfc79e633a746b9a7d7bced05
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Because we use toggle NSButton for selected tabs, the inactive
appearance doesn't follow what NSSegmentedControl would have
shown. Therefore, we fall back to our good old habits, i.e.,
render on a pixmap and do some pixel transformations.
Change-Id: I838a2f23abee5846219ba67328c79fa8cc359a9b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Change QMacStylePrivate::drawNSViewInRect() signature
to remove all the unused parameters.
Reuse recent tab direction functions where appropriate.
Includes the infamous outter -> outer fix.
Change-Id: I8f92d79d8a6c3b5903bfbb13293afb6f72a5340b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The idea was probably to ignore it since macOS already provides
accessibility for a menu item in its native system menu. However, a Qt
Quick Controls2 Menu will instead show a non-native menu, which should
not be ignored.
Task-number: QTBUG-63522
Change-Id: Ib5ae16ad991ebd7a18fa73b8f576f20b1c14d4c8
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
In order to be able to build and test a testcase on an iOS device it
needs to be a bundle. So the app_bundle config should only be removed if
the testcase_no_bundle is set. This is already done by testcase.prf.
Task-number: QTBUG-45211
Change-Id: I4f16ea832ccff2a5db5fed0050fa0344b4ac9ad6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
When rotating the device when the application is in the background iOS will
ask the root view controller to layout its views when then foregrounding the
application, but at that point the application state is still in the suspended
state, meaning we block any view resizing or rendering.
To ensure the views are resized correctly, we trigger a manual layout after
the application comes out of the suspended state.
Task-number: QTBUG-67719
Change-Id: I1ef0a4133d4b94edaac7b0f3cb4e49e367eb76d4
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The watchOS and tvOS platforms also define __IPHONE_OS_VERSION_MIN_REQUIRED
for compatibility, so we need account for that in the ordering of the ifdefs.
Task-number: QTBUG-67534
Change-Id: Id86e684137550533470370ef29c3563d677d5865
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
With Cocoa it is possible to have a parentless QMenuBar so that the same
one can be used for multiple windows. Therefore if the top level window
is the QMenuBar when checking for the context then we can let it carry
on as if the top level window is the same as the active window.
Task-number: QTBUG-45453
Change-Id: Ifacf2111d5f9973afe8af30c6338918f130e51a4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
It would be tedious to bump them every year, but we don't want
people to copy completely outdated year numbers either ...
Also consistently use https:// in contact address.
Change-Id: I9654417a3037fc18c6b9a0551c4883f5fc960084
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
Commit 71404b0be1 added new header templates and LICENSE.GPL2,
LICENSE.GPL3, LICENSE.GPL3-EXCEPT, LICENSE.LGPL3 files already in 2016.
So it's finally time to remove some of the old licnse files.
LICENSE.LGPLv21 and LGPL_EXCEPTION.txt is not referenced anywhere
anymore. LICENSE.GPLv3 is referenced only in LICENSE.LGPLv3.
We unfortunately still have to keep LICENSE.LPGLv3 because it is up
to this day used in the standard header templates, but we can just
change the reference in there to LICENSE.GPL3.
Change-Id: Ia88b4de8a395757a39ca63d474b2214e3b1063fb
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
The drive has to be defined for every Windows configuration (also
including winrt).
Change-Id: I94a3131b8aec20cda97dc78f55b1d87aa10240e4
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>