Commit Graph

35509 Commits

Author SHA1 Message Date
Kari Oikarinen
810bc3fb19 tst_QLibrary: Ensure installation order of testdata libs
This test executable was not flaky in the normal sense that when run, it
sometimes passes and sometimes fails. Instead, in some builds it would fail
consistently and in some builds it would pass consistently.

The first test to fail was version(ok00, default to last version) which gives
"mylib" as the library name and -1 as the library version. The description
implies that QLibrary selects the biggest or last used version when given -1.
However, versions less than 0 are not used at all. Instead the loading uses only
the name to select the library. Change the description to match.

So why did the test sometimes pass, sometimes fail? The test uses two library
projects lib and lib2 which install two different major versions of libmylib.
That includes the symbolic links:

  libmylib.so -> libmylib.so.1.0.0*
  libmylib.so.1 -> libmylib.so.1.0.0*
  libmylib.so.1.0 -> libmylib.so.1.0.0*
  libmylib.so.1.0.0*
  libmylib.so -> libmylib.so.2.0.0*
  libmylib.so.2 -> libmylib.so.2.0.0*
  libmylib.so.2.0 -> libmylib.so.2.0.0*
  libmylib.so.2.0.0*

The key thing being that both set the libmylib.so symbolic link. In a
multithreaded installation it's undefined which happens to set the link last.
The test code expected libmylib.so to point to libmylib.so.2.0.0. Ensure that by
building and installing lib2 after lib.

Task-number: QTBUG-66722
Task-number: QTBUG-66216
Change-Id: Ic513c772902273049c28e43fc1d83d550aafcd23
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-03-02 07:20:04 +00:00
Thiago Macieira
4e02c8d5b8 JSON: remove braces from UUID text representations
[ChangeLog][QtCore][QJsonValue] fromVariant() conversion now converts
from QUrl and QUuid using special encoding forms to ensure best JSON
compatibility.

Change-Id: I56b444f9d6274221a3b7fffd150cdc5ca1f87ff1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-03-02 04:06:33 +00:00
Thiago Macieira
a2ffb35ac2 QJsonValue: use the fully-encoded form of a URL in fromVariant()
For compatibility with other parsers that may expect it to be so.

Change-Id: I56b444f9d6274221a3b7fffd150cd66390f98fd5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-03-02 04:06:24 +00:00
Qt Forward Merge Bot
afe2a79689 Merge "Merge remote-tracking branch 'origin/5.11' into dev" into refs/staging/dev 2018-03-02 00:00:35 +00:00
Qt Forward Merge Bot
6cf3428a43 Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I42ec9e6aafc203465cbeb88af70c7af26b7df8ed
2018-03-02 01:00:10 +01:00
Steve Mokris
aa1bc47942 Show the checkmark when rendering a QAction in a QMenu using QSS
Task-number: QTBUG-66380
Change-Id: If7376430cfa021cb6eca1cbbcea6b6d0e01802bf
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-03-01 23:58:05 +00:00
Herman van Hazendonk
1c2499cbf1 Add needsWorkaround for additional Adreno targets
Seems this issue is still there with Adreno 5xx and 6xx is suspected to
have it as well (no device to test though), so added both 5xx and 6xx
to cover these. Updated 30x to 3xx in order to cover Adreno 320 and 330
as per https://en.wikipedia.org/wiki/Adreno.

Amends 9ae028f507

Task-number: QTBUG-66702
Change-Id: I6ce3f6499d3ff9da884be45039e5f5e0990f7e1f
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-03-01 21:39:43 +00:00
Steve Mokris
529cb7217c When cloning QWheelEvent, also propagate the event's timestamp
Task-number: QTBUG-63681
Change-Id: I686ea831287ac9023a3364768b6345c1e8806439
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-03-01 20:51:13 +00:00
Gatis Paeglis
b3e91b66b9 qtestlib: fix support for pressing multiple mouse buttons
After a37785ec76 went in, it become
apparent that multi mouse button state handling in qtestlib is
non-existent, for details see QTBUG-64030 and QTBUG-63786. What
happened behind the scenes often was not what one would expect based
on the provided QTest::mouse* input sequence - events went missing,
incorrect events were generated, each subsequent test function
started with a state set from the function that run earlier. It is
easy to see how a minor change in one test could easily affect outcome
of other tests.

With a37785ec76, Qt platform plugins
are now responsible for sending explicit mouse button type and state
information; qtestlib should take full responsibility now as well.
But using the new API from a37785ec7 alone in qtestlib is not sufficient.
We need to reset mouse state between each new test function run (we do
this at function scope as that fits with the current qtestlib API user
expectations). This patch implements the necessary reseting logic.

Updated tst_qwindow.cpp::generatedMouseMove() to use QTest::mouse* APIs.
That test requires pressing multiple buttons, it was not possible with
QTest::mouse* APIs before this patch.

Added an auto test for multiple mouse button pressing/release in
tests/auto/testlib/selftests/mouse/. And few other tests which are
currently QSKIP-ed, but should be considered when re-designing qtestlib
APIs.

Task-number: QTBUG-64030
Change-Id: I39fdcbc73a467a7463ce2aed622bf22484095635
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-03-01 19:41:10 +00:00
Allan Sandfeld Jensen
635b5115c4 Fix QXcbScreen::format() when rgb-swap is needed
QXcbScreen::format() was producing console warning and returning invalid
format if rgb-swap was necessary. Let it match possibly reversed formats
since the backing-store will swizzle it anyway.

Change-Id: I6a53cb8ceda029e9d708d25ad635832f1163ffe7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-03-01 10:15:05 +00:00
Friedemann Kleint
daa39f8499 ToolTip/Windows: Fix wrong size when font is modified by widget stylesheet
Factor out a function to calculate the size and update the size when a
style sheet parent is set.

Task-number: QTBUG-64550
Change-Id: I3afe997085eae3cd48b7fe0a4c98582a8f572260
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2018-03-01 09:56:14 +00:00
Friedemann Kleint
9f77854d28 Windows QPA: Fix setting the separator property on native menus
Apply the setting in QWindowsMenuItem::setIsSeparator().

Task-number: QTBUG-66642
Change-Id: I023fe88bd85ad82cfb4a80418a892dcf21853ba5
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2018-03-01 09:55:58 +00:00
Kari Oikarinen
233046d39c tst_QAbstractItemView: Wrap qWaitForWindowActive in QVERIFY
Return value of qWaitForWindowActive should be checked as it is marked
Q_REQUIRED_RESULT.

One of the calls was failing, so remove it and wait for the next condition
instead.

Amends d0dffdfc01.

Change-Id: I0c0b2bf11504730477158a5e1fb3018f359a6fb9
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-03-01 09:38:19 +00:00
Kari Oikarinen
1875db1849 tst_QLocalSocket: Fix not showing error output in processConnection
The stdout of the processes used in the test was dumped if there was an error,
but the processes write their error messages to stderr.

Use MergedChannels process channel mode to dump both output streams.

Change-Id: I1645fd31c394da0871ee6ae36d37ca9a04d86052
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-03-01 09:37:58 +00:00
R.J.V. Bertin
cb2a6f6a9f Find PCRE2 via pkgconfig
This avoids issues when using dependencies installed in a custom or
dedicated $prefix, when PCRE2 is configured to install its headers
in their own directory under instead of directly in $prefix/include.

Task-number: QTBUG-66355
Change-Id: Ia99464820600282d61237e5bcff38101d2c9684b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-01 09:08:48 +00:00
Thorbjørn Lund Martsum
e8425f9e52 QHeaderView: Fix crash in layout about to change
Before there was a risk looking up e.g index -1 if there
were no visible sections in layoutAboutToChange.

Change-Id: Ic911e4292e8e8c4892fef1c0f34cf7dccaad2bac
Task-number: QTBUG-65478
Reviewed-by: David Faure <david.faure@kdab.com>
2018-03-01 05:26:12 +00:00
Martin Storsjö
db6d14318d windowsuiautomation: Lowercase windows header includes
This fixes cross compilation with mingw from a case
sensitive filesystem.

Change-Id: I0f5ba708b7138cae325ff564559d3e40eba4e714
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-03-01 01:51:29 +00:00
David Faure
8a678c3464 QHeaderView: skip dividing by 1, rather pointless
Change-Id: I9a63810475d1f17d65e91c1f4d805a7e564ba686
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2018-02-28 22:20:51 +00:00
David Faure
f2eb7b0204 QMimeDatabase: fix regression in alias resolving
The refactoring to support multiple providers broke alias resolving
(e.g. "text/directory" would be an invalid mimetype, instead of being
resolved to "text/vcard"). The unittest didn't catch it because most of
it was running with a single mime directory (and therefore a single provider,
in the new model). Fixed by re-running a number of test methods once we
have a second mime directory.

Change-Id: Ib5da89ba79c11ed41813b2aff4bc71c30afcde7d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-28 22:17:58 +00:00
Sergio Martins
2b540ac741 stylesheets cleanup to prepare for a bigger patch
No behavior was changed, just cleanup so the upcoming feature
can land safely, with an elegant diff.

- Removed all naked qobject_casts<QStyleSheetStyle*>(), replaced
them with qt_styleSheet() (which does the same, for now).

- Removed a bunch of #ifdefed'out "metal hack" code. The code is disabled
and enough time has passed without nobody needing it.

- Removed a few "extra ? extra->style" by assigning it to a variable first.

- Misc

Change-Id: Ia45c38b06e2b5d2426635f730b4cb42c7ac1251d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2018-02-28 19:42:22 +00:00
Qt Forward Merge Bot
699a263b29 Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: Ib21e6b9030b4d5363f440d082ce3df28098d1b95
2018-02-28 20:38:47 +01:00
Oswald Buddenhagen
592b0a37f5 syncqt: remove 'descend' parameter from findFiles()
that parameter is never set, and if it was, it wouldn't work: the
recursively found files were not qualified with the subdirectory.

Change-Id: I24a3f74de3545c19bcd175c24ad1daf2af77a720
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-02-28 18:15:56 +00:00
Oswald Buddenhagen
3a32ad7859 syncqt: fix fallback of -builddir
it needs to fall back to -outdir if only the latter is specified, as
otherwise funny things will happen.

this didn't affect the calls in qt_module_headers.prf (both options
used) and the unix configure script (neither option used), but it
affected configure.bat, and possible callers outside qt's build system,
which apparently includes our packaging scripts.

amends ede6c44756.

Task-number: QTBUG-66626
Change-Id: I08633033c04152616545501490c9b3fb939cab6c
Reviewed-by: Lionel CHAZALLON <longchair@hotmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-02-28 18:15:49 +00:00
Lars Knoll
7f504283ef Update the Unicode BiDi algorithm to be compliant with Unicode 10
The UBA in Qt was out of date, implementing the spec from pre
Unicode 6.3 days. It missed handling of directional isolates and
paired brackets.

This adds a completely new implementation of the UBA, that is
compliant with Unicode 10.

Added the test data from Unicode 10 to the qcomplextext auto
test and ensure that we pass the test suite.

Task-number: QTBUG-57743
Change-Id: Ie2d957bc9775d82f0a51d1c78dc6bd154f22847c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-02-28 17:11:43 +00:00
Lars Knoll
4804d42ab8 Fix ligature handling in QTextLine::cursorToX()
If the script item is rtl, we need to subtract the offset inside the
ligature again, as the full width of the ligature would have already
been added in the loop before.

Change-Id: I544ac6fa19484b35335767e1ba1befc3dfa07693
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-02-28 17:11:37 +00:00
Tor Arne Vestbø
5d365b96b9 macOS: Warn the user when KVO-observing QCocoaNSWindow
We recreate the window of our QNSView in various situation such as changing
the styleMask, which results in either a new QNSwindow or QNSpanel being
set as the window of the view. KVO-observing the window property of the
view will fail we then have a new window instance, and will crash when
trying to remove the observer from the new window.

Unfortunately catching the NSRangeException that happens when removing
an observer from a 'switched' window is not possible, so the user is
left with:

  Terminating app due to uncaught exception 'NSRangeException', reason:
    Cannot remove an observer <Foo 0xabc> for the key path "bar"
    from <QNSPanel 0xdef> because it is not registered as an observer.

Change-Id: Ib2adbb99f19303a054fb1eb65e959aecd32b1162
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-02-28 17:06:41 +00:00
Nico Vertriest
df3da2c1d1 Doc: Add doc for QSKIP
Change-Id: Ib8cd1b4926652984b41b5a05bf4dbf3214f2856f
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-02-28 12:51:37 +00:00
Qt Forward Merge Bot
96ffe48add Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I1ce43c8a214a869c5c4ac4245bb92c88c6bc6999
2018-02-28 10:32:56 +01:00
Ville Voutilainen
71cdc95006 Silence a GCC 8 warning in qpainter
qtbase/src/gui/painting/qpainter.cpp:5625:68: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct QFixed’; use assignment or value-initialization instead [-Werror=class-memaccess]
         memset(advances.data(), 0, advances.size() * sizeof(QFixed));

Change-Id: I563b1b0c5dfaf381a9521bc9a4dc3197f0f38d11
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-28 07:18:35 +00:00
Ville Voutilainen
ea1137ff5e Silence a GCC 8 warning in qoutlinemapper
qtbase/src/gui/painting/qoutlinemapper.cpp: In member function ‘QT_FT_Outline* QOutlineMapper::convertPath(const QVectorPath&)’:
qtbase/src/gui/painting/qoutlinemapper.cpp:182:76: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘class QPointF’ from an array of ‘const qreal’ {aka ‘const double’} [-Werror=class-memaccess]
             memcpy(m_elements.data(), path.points(), count* sizeof(QPointF));

Change-Id: Ieca99f0262c57e58adbcf48ac923ae11bd428b00
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-28 07:18:24 +00:00
Ville Voutilainen
d62d51c7e6 Silence a GCC 8 warning in qringbuffer
qtbase/src/corelib/tools/qvector.h:782:16: error: ‘void* memmove(void*, const void*, size_t)’ writing to an object of type ‘class QRingChunk’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
         memmove(b + 1, b, (d->size - offset) * sizeof(T));
         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../../include/QtCore/5.11.0/QtCore/private/qringbuffer_p.h:1,

Change-Id: I6583241223fe3fc76c0b792779993a34aa9485fe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-28 07:18:14 +00:00
Kari Oikarinen
d5af78230d Blacklist tst_QWidget::saveRestoreGeometry on openSUSE
Has been flaky in CI.

Task-number: QTBUG-66708
Task-number: QTBUG-66216
Change-Id: I69878574a98139681100c1424d5bbf46cc4a87b8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2018-02-28 07:07:58 +00:00
Kari Oikarinen
b55a32cd4b tst_QLocalSocket: Fix flakiness of processConnection
The test's client processes are prepared for the server not being ready when
they try to connect and handle QLocalSocket::ServerNotFoundError by waiting and
trying again.

However, on Ubuntu 16.04 and 17.10 and possibly other systems, sometimes the
error returned by qt_safe_connect inside QLocalSocket is ECONNREFUSED instead of
ENOENT. This has caused flaky failures in CI, so wait and try again in the case
of QLocalSocket::ConnectionRefusedError also.

Task-number: QTBUG-66679
Task-number: QTBUG-66216
Change-Id: I61e3d5b052d84c5ba9d1746f2c71db37cedbf925
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-02-28 07:06:43 +00:00
Sami Nurmenniemi
eba652a99f Blacklist tst_QNetworkReply::ioHttpRedirectPolicy
Has been failing a lot lately

Task-number: QTBUG-66247
Change-Id: Id940a573eb299379cacceb836890cbe0b3c896b7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-02-28 06:51:08 +00:00
Friedemann Kleint
a8aa3dc5c7 QDate/Time,QTimeZone: Fix empty documentation section titles
Change-Id: I674c4bb1805a7f7bc95512b07b0278446ebe7772
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-02-27 15:18:17 +00:00
Ville Voutilainen
1b72d3e645 Silence a GCC 8 warning in qxcbnativeinterface
qtbase/src/plugins/platforms/xcb/qxcbnativeinterface.cpp:309:65: error: cast between incompatible function types from ‘void (*)(const char*)’ to ‘QPlatformNativeInterface::NativeResourceForIntegrationFunction’ {aka ‘void* (*)()’} [-Werror=cast-function-type]
         return NativeResourceForIntegrationFunction(setStartupId);

Change-Id: I83409b3a6cc67ccb4c9e91e592e6a01bb6ce45ea
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-02-27 14:57:14 +00:00
Ville Voutilainen
7eac2e7350 Silence a GCC 8 warning in evdevtablet
qtbase/src/platformsupport/input/evdevtablet/qevdevtablethandler.cpp:85:36: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct QEvdevTabletData::<unnamed>’; use assignment or value-initialization instead [-Werror=class-memaccess]
     memset(&state, 0, sizeof(state));

Change-Id: I3b18ffa7fdf9c7aa1bd4977f12858fd1f176c020
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-02-27 14:57:04 +00:00
Alexander Volkov
37217c57fa Introduce QImage{Reader,Writer}::imageFormatsForMimeType()
It can be used if, for example, you get an image MIME type
from the user, and you want to find the appropriate format
for loading or saving this image.

Task-number: QTBUG-49714
Change-Id: Iae5a7e9d658d6c3d1cd750a8bbc279f1812f99df
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-02-27 12:49:40 +00:00
Ville Voutilainen
00f89d61b9 Widen the blacklists for flaky udp tests
Task-number: QTBUG-66216
Change-Id: I52688bf41ef12b2ec67887b1a5d26f89d4556d5b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
2018-02-27 11:44:17 +00:00
Ville Voutilainen
2eec3272c7 Make qWaitForWindowActive more robust
Based on the information we got from Unity developers, we need
to check for window's frame geometry to be set, not just window's
position to be set. On various window managers, a window is
'ready' once the frame geometry is set. This fixes autotest
flakiness of tests that use qWaitForWindowActive.

Task-number: QTBUG-66216
Change-Id: Icb664e7b802b474919f3b058c00681574522ccbe
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-27 08:53:09 +00:00
Friedemann Kleint
1f6bd8bfb2 Windows QPA: Ensure a mouse release event is sent after DnD
Windows does not send a mouse release by itself, which can
leave Quick controls believing the mouse is still pressed.
Synthesize an event.

Task-number: QTBUG-66447
Change-Id: Ia865edddc0c77a1b42b9ad2c38323379e74b6704
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2018-02-26 20:35:02 +00:00
Qt Forward Merge Bot
32da9ae389 Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I5a919ac999c4c5a3ca2024b63a78c094a44a1191
2018-02-26 20:55:01 +01:00
BogDan Vatra
b2d2b655e5 Fix compile with sanitize address & undefined
On Debian 9, the sanitize library exports only dlopen symbol, but
it doesn't export the other ones.
We need to check all dl symbols that we use, otherwise "-ldl" will
not be added to the libs list.

Task-number: QTBUG-64864
Change-Id: I3e62b82985348c40b8b61302ba589d5564598e18
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-02-26 08:58:34 +00:00
Morten Johan Sørvig
8bb33c2509 Cocoa: Fix incorrect QSystemTrayIcon::geometry()
The coordinate conversion was wrong. Use
QCocoaScreen::mapFromNative() instead.

Task-number: QTBUG-53184
Change-Id: I50f18d68ba5d7e1cb5046523a608bfa2e076d7ea
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-02-26 07:00:29 +00:00
Gatis Paeglis
669070c404 xcb: simplify handling of keymap updates
The old code was somewhat too scattered.

Change-Id: Ib0445c66653f757ccac28778f34f4bcb5df49a70
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-02-25 13:18:41 +00:00
Gatis Paeglis
1a341d8333 xcb: cleanup TODOs for KeyboardLayoutChange
Change-Id: I5d2207fdb21cbabb04460faf73c35275bc76b7b0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-02-25 13:18:34 +00:00
Gatis Paeglis
50865aeeef xcb: minor refactoring in QXcbKeyboard::checkForLatinLayout()
We don't need xkb state APIs to check for keys on first level.

Change-Id: I728e6bfe09bce127ad8eae78ecee7cefd620f52e
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-02-25 13:18:27 +00:00
Gatis Paeglis
6c88dc0c16 xcb: remove X11 deps from QXcbKeyboard::checkForLatinLayout/lookupLatinKeysym()
This will allow us to reuse these functions on systems that
do not rely on X11, but use libxkbcommon for handling keyboard
input.

Task-number: QTBUG-65503
Change-Id: I78034238771be96fbb38e8187801fefbee1a5fed
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-02-25 09:50:07 +00:00
Gatis Paeglis
7c01c759ae xcb: have a proper detection of key events originating from SendEvent
This is a more correct fix for QTBUG-48795. The original fix
was unnecessarily using non-XKB code path for updating state
for all incoming key events. This would result in losing some
valuable bits from xkb state.

Task-number: QTBUG-48795
Change-Id: Ic4fb28b2d834272f1db2cbf5888cafb209707847
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-02-25 09:49:58 +00:00
Gatis Paeglis
1219fc26a0 xcb: use keysym defs from xkbcommon, instead of X11 headers
xkbcommon-keysyms.h is generated from X11 header files, so it
contains all the same values.

Removed all of #ifndef XK_* as those keysyms are present in
xkbcommon-keysyms.h (checked the header from 0.4.1, the minimal
required version). The same for XF86XK_* defines.

This will allow to reuse some of this code on platforms that
don't depend on X11, for details see QTBUG-65503.

Task-number: QTBUG-65503
Change-Id: I68083e11cea1f29d775a6ed46503a06b04b9a05c
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-02-25 09:49:49 +00:00