summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* preserve HTML heading level in QTextBlockFormat; demonstrate in exampleShawn Rutledge2018-03-026-53/+149
| | | | | | | | | | | | | | | | | | When reading an HTML file with <H1> for example, we still set the font size as before (that's how it always was done), but now it remembers that it came from an H1 tag, so it writes <h1 ...><span font-size:xx-large ...> ... rather than <p ...><span ...> ... This will help with the upcoming Markdown format, where heading level is saved but the font is not. Now the style combobox in examples/widgets/richtext/textedit can set list item type, heading type or "standard" formatting, and also shows the current formatting of the line that has the cursor. It was always a shortcoming in this example that it only allowed setting the current line's block format but had no feedback to show the current format. Change-Id: I0a7849b74f23fea84d3375c487c3a6b9f43240c1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Qt Forward Merge Bot2018-03-0228-603/+595619
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-0228-603/+595619
| |\ | | | | | | | | | Change-Id: I42ec9e6aafc203465cbeb88af70c7af26b7df8ed
| | * qtestlib: fix support for pressing multiple mouse buttonsGatis Paeglis2018-03-016-29/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After a37785ec7638e7485112b87dd7e767881fecc114 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 a37785ec7638e7485112b87dd7e767881fecc114, 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>
| | * Fix QXcbScreen::format() when rgb-swap is neededAllan Sandfeld Jensen2018-03-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * ToolTip/Windows: Fix wrong size when font is modified by widget stylesheetFriedemann Kleint2018-03-012-12/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Windows QPA: Fix setting the separator property on native menusFriedemann Kleint2018-03-011-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Apply the setting in QWindowsMenuItem::setIsSeparator(). Task-number: QTBUG-66642 Change-Id: I023fe88bd85ad82cfb4a80418a892dcf21853ba5 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| | * tst_QAbstractItemView: Wrap qWaitForWindowActive in QVERIFYKari Oikarinen2018-03-011-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 d0dffdfc012574da4a75241097b667d09bb39ba2. Change-Id: I0c0b2bf11504730477158a5e1fb3018f359a6fb9 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | * tst_QLocalSocket: Fix not showing error output in processConnectionKari Oikarinen2018-03-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Find PCRE2 via pkgconfigR.J.V. Bertin2018-03-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * QHeaderView: Fix crash in layout about to changeThorbjørn Lund Martsum2018-03-012-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * windowsuiautomation: Lowercase windows header includesMartin Storsjö2018-03-012-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * QHeaderView: skip dividing by 1, rather pointlessDavid Faure2018-02-281-1/+1
| | | | | | | | | | | | | | | Change-Id: I9a63810475d1f17d65e91c1f4d805a7e564ba686 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| | * QMimeDatabase: fix regression in alias resolvingDavid Faure2018-02-282-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * syncqt: remove 'descend' parameter from findFiles()Oswald Buddenhagen2018-02-281-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * syncqt: fix fallback of -builddirOswald Buddenhagen2018-02-281-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Update the Unicode BiDi algorithm to be compliant with Unicode 10Lars Knoll2018-02-287-535/+595231
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Fix ligature handling in QTextLine::cursorToX()Lars Knoll2018-02-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Show the checkmark when rendering a QAction in a QMenu using QSSSteve Mokris2018-03-011-7/+30
|/ / | | | | | | | | | | Task-number: QTBUG-66380 Change-Id: If7376430cfa021cb6eca1cbbcea6b6d0e01802bf Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | When cloning QWheelEvent, also propagate the event's timestampSteve Mokris2018-03-012-0/+3
| | | | | | | | | | | | Task-number: QTBUG-63681 Change-Id: I686ea831287ac9023a3364768b6345c1e8806439 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | stylesheets cleanup to prepare for a bigger patchSergio Martins2018-02-288-72/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-02-288-6/+127
|\| | | | | | | Change-Id: Ib21e6b9030b4d5363f440d082ce3df28098d1b95
| * macOS: Warn the user when KVO-observing QCocoaNSWindowTor Arne Vestbø2018-02-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Doc: Add doc for QSKIPNico Vertriest2018-02-282-0/+113
| | | | | | | | | | Change-Id: Ib8cd1b4926652984b41b5a05bf4dbf3214f2856f Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * Silence a GCC 8 warning in qpainterVille Voutilainen2018-02-281-2/+2
| | | | | | | | | | | | | | | | 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>
| * Silence a GCC 8 warning in qoutlinemapperVille Voutilainen2018-02-281-1/+1
| | | | | | | | | | | | | | | | | | 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>
| * Silence a GCC 8 warning in qringbufferVille Voutilainen2018-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Blacklist tst_QWidget::saveRestoreGeometry on openSUSEKari Oikarinen2018-02-281-0/+2
| | | | | | | | | | | | | | | | | | | | 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>
| * tst_QLocalSocket: Fix flakiness of processConnectionKari Oikarinen2018-02-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-02-288-20/+33
|\| | | | | | | Change-Id: I1ce43c8a214a869c5c4ac4245bb92c88c6bc6999
| * Blacklist tst_QNetworkReply::ioHttpRedirectPolicySami Nurmenniemi2018-02-281-2/+2
| | | | | | | | | | | | | | | | Has been failing a lot lately Task-number: QTBUG-66247 Change-Id: Id940a573eb299379cacceb836890cbe0b3c896b7 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * QDate/Time,QTimeZone: Fix empty documentation section titlesFriedemann Kleint2018-02-272-5/+4
| | | | | | | | | | Change-Id: I674c4bb1805a7f7bc95512b07b0278446ebe7772 Reviewed-by: Martin Smith <martin.smith@qt.io>
| * Silence a GCC 8 warning in qxcbnativeinterfaceVille Voutilainen2018-02-271-7/+7
| | | | | | | | | | | | | | | | 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>
| * Silence a GCC 8 warning in evdevtabletVille Voutilainen2018-02-271-1/+1
| | | | | | | | | | | | | | | | 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>
| * Widen the blacklists for flaky udp testsVille Voutilainen2018-02-271-2/+2
| | | | | | | | | | | | | | | | 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>
| * Make qWaitForWindowActive more robustVille Voutilainen2018-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Windows QPA: Ensure a mouse release event is sent after DnDFriedemann Kleint2018-02-261-1/+15
| | | | | | | | | | | | | | | | | | | | 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>
* | Introduce QImage{Reader,Writer}::imageFormatsForMimeType()Alexander Volkov2018-02-276-2/+71
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-02-265-696/+447
|\| | | | | | | Change-Id: I5a919ac999c4c5a3ca2024b63a78c094a44a1191
| * Fix compile with sanitize address & undefinedBogDan Vatra2018-02-261-1/+5
| | | | | | | | | | | | | | | | | | | | | | 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>
| * Cocoa: Fix incorrect QSystemTrayIcon::geometry()Morten Johan Sørvig2018-02-261-3/+4
| | | | | | | | | | | | | | | | | | | | 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>
| * xcb: simplify handling of keymap updatesGatis Paeglis2018-02-253-43/+41
| | | | | | | | | | | | | | The old code was somewhat too scattered. Change-Id: Ib0445c66653f757ccac28778f34f4bcb5df49a70 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * xcb: cleanup TODOs for KeyboardLayoutChangeGatis Paeglis2018-02-252-18/+23
| | | | | | | | | | Change-Id: I5d2207fdb21cbabb04460faf73c35275bc76b7b0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * xcb: minor refactoring in QXcbKeyboard::checkForLatinLayout()Gatis Paeglis2018-02-251-6/+6
| | | | | | | | | | | | | | 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>
| * xcb: remove X11 deps from QXcbKeyboard::checkForLatinLayout/lookupLatinKeysym()Gatis Paeglis2018-02-251-4/+4
| | | | | | | | | | | | | | | | | | | | 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>
| * xcb: have a proper detection of key events originating from SendEventGatis Paeglis2018-02-252-47/+58
| | | | | | | | | | | | | | | | | | | | | | 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>
| * xcb: use keysym defs from xkbcommon, instead of X11 headersGatis Paeglis2018-02-251-590/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-02-2412-2280/+434
|\| | | | | | | Change-Id: Icddf8720dae2cf594e16bcddab4d1cafc9d094c0
| * xcb: minor cleanup in QXcbKeyboard::handleKeyEvent()v5.11.0-beta1Gatis Paeglis2018-02-241-15/+23
| | | | | | | | | | | | | | | | | | | | - Use smart pointer for handling xkb state. - Make it more clear (in the code and the comment) when a latin keysym is used. Change-Id: Iee8106c72177c22b1a8fe875027b1dda82196b36 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * xcb: refactor QXcbKeyboard::keysymToQtKey() and fix bugGatis Paeglis2018-02-243-61/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now also digits from other alphabets e.g ۲ (arabic two) are mapped to Qt::Key_* digit keys. Re-factored logic: - All known dead keys have direct mappings since 1d86e5f84abac6db0b7b1503a6f52c72b272a897. Don't special treat them in "unicode mapping" code path. - Removed the ISO8859-1 legacy logic, which is leftover from Qt4 where keysym to Qt decoding was done from raw data. In Qt5 we always get a utf8 string from xkb_state_key_get_utf8(). Furthermore, ISO8859-1 and utf8 encode ASCII exactly the same way. - Set Qt::KeypadModifier from key input handler methods. This logic does not belong in keysymToQtKey(). Note: KeyTbl[] and keysymToQtKey() have been duplicated in several places in Qt. That stuff will be cleaned up as part of QTBUG-65503. This change will make those cleanups easier. Task-number: QTBUG-58865 Task-number: QTBUG-65503 Change-Id: Iaf10205a26804f7fc03eb8a16a0879f1bd7bf332 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>