summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-176-13/+34
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qlogging.cpp src/gui/painting/qtextureglyphcache_p.h src/gui/text/qfontengine.cpp src/widgets/widgets/qlineedit.cpp Change-Id: Ic8798538df466b7141caa8bbf1fb7605eb56be37
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-132-5/+10
| |\ | | | | | | | | | Change-Id: I5d2a4fa33b4aa22da39ac045e6b85ab940b8720b
| | * Fix warnings as errors on macOS with new Xcode 10.2.1Alexandru Croitor2019-07-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | A switch statement was comparing enum values of a different enum. Change-Id: I578f79b15b1007afaa64cd3a2a80d6a75d3bed77 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
| | * macOS: show QSystemTrayIcon message icons in notification popupsVolker Hilsheimer2019-07-111-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The icon provided was ignored, even though NSUserNotification provides the option to specify a contentImage. The message popping up will show that image on the right side of the notification; it will not repace the application icon on the left side. [ChangeLog][Widgets][QSystemTrayIcon] On macOS, show the icon passed into showMessage in the notification popup Change-Id: I8ecda7f893006e74a4f35f37ddc07063ebfe4e83 Fixes: QTBUG-76916 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-124-8/+24
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.pri Also required s/solid\.color/solidColor/ in a couple of places in: src/gui/painting/qpaintengine_raster.cpp Change-Id: I29937f63e9779deb6dac7ae77e2948d06ebc0319
| | * Windows QPA: Fix handling of mouse messages synthesized by the OSAndré de la Rocha2019-07-112-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old handler only marked mouse events associated with mouse messages synthesized by the OS with Qt::MouseEventSynthesizedBySystem when these messages resulted from touch screen, not tablet input. Quick seems to depend on this behavior. Fixes: QTBUG-76617 Change-Id: Ib863d73ae9325f9a19d8a175817fef4e82f7df0b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * xcb: fix thread synchronization issue in QXcbEventQueue::waitForNewEvents()Gatis Paeglis2019-07-081-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch amends 730cbad8824bcfcb7ab60371a6563cfb6dd5658d The issue was that the event reader thread (QXcbEventQueue::run()) can enqueue events sometime between GUI thread has last time peeked at the queue and before it has called waitForNewEvents() and hence started waiting for more events (via QWaitCondition). This scenario is even mentioned in the QWaitCondition documentation: "[..] if some of the threads are still in do_something() when the key is pressed, they won't be woken up (since they're not waiting on the condition variable) and so the task will not be performed for that key press. [..]" And if there are no more events on the X11 connection, the waitForNewEvents() in QXcbClipboard::waitForClipboardEvent() would timeout. Fixes: QTBUG-75319 Change-Id: I8990a2a0c00571dfc334fb57d616dee999042885 Reviewed-by: Igor Kushnir <igorkuo@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * Windows QPA: Fix blinking dot on Windows 7/8/8.1Andre de la Rocha2019-07-041-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A blinking white dot could appear on dark backgrounds on Windows 7/8/8.1. It was caused by a workaround added to trigger the on-screen keyboard on the Microsoft Surface. This change effectively restricts that workaround to Windows 10, where the blinking dot was not an issue. And anyway, impact over the Surface functionality should be minimal, as all models produced since 2015 only support Windows 10 (and it's unknown if the workaround was ever necessary for early models running Windows 8.1). Fixes: QTBUG-74492 Change-Id: Ic9b9c0f71f23b75212054c56a29796cf0efa109a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Windows QPA: Fix Wheel event coordinatesAndre de la Rocha2019-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases, the wheel event coordinates would be incorrect, as the local coordinates were being determined relative to one window and the event being sent to another window, possibly incorrect. Fixes: QTBUG-75820 Change-Id: I4c3c4c6c4688bd9232d67ce4052d24365f6aea3a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | QWasmEventTranslator: replace five QHash with constexpr C arraysMarc Mutz2019-07-162-41/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mapping is static, but a dynamic (even mutable) container was used. Fix by using C tables and liner scan, which will be just as fast or faster than a hash lookup, for the maximum of six entries of each table. Change-Id: I899d5b1428dc82cf58862f238595a266aef8279f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | | Eradicate Q_FOREACH in the WASM plugin and mark the plugin free of themMarc Mutz2019-07-152-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first one is trivially correct: it clearly doesn't modify the container under iteration. The second is a bit more subtle, because drawWindow() could be expected to call a paintEvent and this could theoretically lead to lowering, closing, or opening of a window. But this function just ends up blit()ting, so it doesn't call into user code. Change-Id: Id15e0102e9c8aa12516af27d771104e9993c48a1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | | QWasmFontDatabase: replace QStringList with a C array of stringsMarc Mutz2019-07-151-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The content is static, so a dynamic container is overkill. Use a C array. Don't make it static, as that creates more problems than is solves (static initialization). Change-Id: I07534c3336efbb6bbc19bfa1b8dad0c578d4e274 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-108-2/+15
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/time/qdatetime.cpp src/widgets/widgets/qcombobox.h Change-Id: Ib84352e8fe34aed2986a1c94e7346a46a71c803b
| * | Fix compilation with disabled deprecated APIsSona Kurazyan2019-07-086-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QImageIOHandler::name() has been deprecated since 5.13, but its overrides weren't. Enabled compilation of the overrides only when the QImageIOHandler::name() is compiled. Task-number: QTBUG-76491 Change-Id: I8fea0032427d25bb0de01be8920c723fc21f6b7a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * | xcb: reduce focus-in delayGatis Paeglis2019-07-052-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch amends fe63900dc9891dd355ca1f10d6c7e5fd1516f5d5 The previous value of 400ms was a random and seemingly harmless choice. It turns out that 400ms is a bit too long and interferes with x11 async behavior tweaks in the VirtualBox source code. The original aim of specifying a concrete delay was to fix the nondeterministic behavior of the pre-existing code and to avoid flickering on KWin caused by waiting too little. This patch changes 400ms -> 100ms, which seems to work better in practice. Fixes: QTBUG-76742 Change-Id: Ia8168216819ac41d0124622c9472a98a1877262f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Port some trivial cases from QMutex to QRecursiveMutexMarc Mutz2019-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | | In all of these cases, the effect of the change is local to one file. Change-Id: I3bda3aadee3b42e7797183c2330183390b92d1f2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Remove usages of QSysInfo's deprecated APIsSona Kurazyan2019-07-052-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced QOperatingSystemVersion::WindowsVersion, QSysInfo::windowsVersion(), QSysInfo::macVersion(), QSysInfo::MacintoshVersion with QOperatingSystemVersion::current(). - Added QOperatingSystemVersion::WindowsVista for convenience, as it is used in lots of places. Change-Id: If9c4ac496005b2e70b5c70be160747afa74b98c1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Do not access invalid QAccessibleInterfaceJan Arve Sæther2019-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | Noticed this when running Qt Creator against dev Change-Id: Ie75b2e0f2a77033ce0455d7ee3304193aa6e511c Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* | | QPainter: mark obsolete RenderHints as deprecatedChristian Ehrlicher2019-07-031-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RenderHint::HighQualityAntialiasing and NonCosmeticDefaultPen are obsolete since Qt5 but not marked as such. Therefore add Q_DECL_ENUMERATOR_DEPRECATED_X now so those two enumerations can be removed with Qt6. [ChangeLog][QtGui][QPainter] HighQualityAntialiasing and NonCosmeticDefaultPen are marked as deprecated and don't have an effect anymore Change-Id: Ib0c966a078a1d23d492d0255288e2066c50e87b6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Remove QWindowsDirect2DEventDispatcherJoerg Bornemann2019-07-022-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This class was introduced to modify the hook handling of QWindowsGuiEventDispatcher. As the hook handling code is removed now, we can remove QWindowsDirect2DEventDispatcher entirely. Change-Id: I56491a67f163784f43b1025225e536d386cead1d Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | QCoreWlanEngine: port away from Java-style iterators (and other fixes)Marc Mutz2019-07-022-49/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main goal of this patch was to port away from Java-style iterators, to make QtBase QT_NO_JAVA_STYLE_ITERATORS-clean. And this the patch achieves. But I couldn't resist a few drive-by fixes, too, to wit: - Use qDeleteAll() instead of while(!isEmpty()) delete takeFirst() - Use QMap::last() instead of iterating to the end, remembering the last-seen value - Use QMap::contains() instead of QMap::keys().contains() - Use qExchange() instead of copy+clear - Make some functions const (requires the mutex member to be marked as mutable, which is common for mutex members) I am almost certain that getSsidFromNetworkName() cannot work correctly. But this patch does not attempt to change the algorithm. Change-Id: Ifa04d7837bdc0837036c3a7a73f8c51f4e681f42 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Remove hook handling code from QEventDispatcherWin32Joerg Bornemann2019-07-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 6a7cea64 qt_GetMessageHook is effectively a no-op, and we can remove the complete hook handling code. Change-Id: I90383c0c09c2b0f1d715872de5f9519a879d9bae Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Fix build without feature.tabbarTasuku Suzuki2019-07-021-1/+9
| | | | | | | | | | | | | | | Change-Id: I0891f8f6054382407f5ce2fdb3ead0203d255945 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Fix build without feature.dockwidget and tabwidgetTasuku Suzuki2019-07-021-1/+6
| | | | | | | | | | | | | | | Change-Id: I621664f646475c1b5cfde47b7087c0c9f5ad8e4d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-013-3/+48
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket_openssl.cpp src/platformsupport/vkconvenience/qvkconvenience.cpp Change-Id: I97ce6ed185f7fdad8102cc58d3cfec0119fd7bb4
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-291-3/+27
| |\| | | | | | | | | | Change-Id: I4cb91777e7ae9f462fa219d5b9ebeb277fde49c3
| | * QAndroidInputContext: Generate a QInputMethodEvent in reset()Vova Mshanetskiy2019-06-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although QPlatformInputContext::reset() documentation says that reset() should not send any QInputMethodEvents, implementations on Windows, macOS and iOS do send a QInputMethodEvent which clears preedit text in their reimplementations of reset(). Text editing controls depend on that and may not clear preedit text if such event is not sent. Change-Id: I75ab73946cb06e93e5fc5e98e0cc503a7de5c2e0 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| | * QAndroidInputContext: Do not stop composing when user taps the cursorVova Mshanetskiy2019-06-281-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to tell the editor to stop composing if user taps so close to the cursor position that the cursor will not move anyway. If we do stop composing in such case, then since there will be no cursor position change notification, we will never start composing again (before the cursor is actually moved), and the current composing region will remain being displayed as normal text instead of being displayed as composing text. Change-Id: I4ebe6442e1ba8c365d6754c1a8487235d177c732 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| | * QAndroidInputContext: Consider preedit text in getCursorCapsMode()Vova Mshanetskiy2019-06-281-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes auto-capitalization in AnySoftKeyboard. It was typing the whole first word in a sentence in upper case. Change-Id: I605a1aee39d432a3474c0bf706445d354562285f Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-282-0/+21
| |\| | | | | | | | | | Change-Id: I912bd8851c390302414d3dfb3c8220df5a0d5630
| | * macOS: lower the splash screen when a modal dialog blocks itVolker Hilsheimer2019-06-261-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the usability issue of a modal dialog showing up behind a splash screen, not visible to the user, but blocking user input and the application startup sequence until discarded. [ChangeLog][QtWidgets][QSlashScreen] On macOS, lower the splash screen when a modal dialog is shown to make sure the user sees the dialog. Change-Id: Ibae768f76909d930cb25dcf5cee31edc5f15c29a Fixes: QTBUG-49576 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * Android: Use Android button layout for the DialogButtonBoxLayout hintAndy Shaw2019-06-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-70045 Change-Id: I9c51e9a769f510a6f14f6e9d78583caf3df15031 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-257-6/+42
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstorageinfo_unix.cpp src/network/ssl/qsslsocket_openssl.cpp Change-Id: Ibc9ce799bef62d60d616beaa9fbde8ebeadfbc20
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-2014-283/+587
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/gui/painting/qdrawhelper.cpp src/network/ssl/qsslsocket_openssl.cpp src/widgets/styles/qstylesheetstyle.cpp Change-Id: Ibe1cd40f46a823c9e5edbe0a3cd16be1e1686b17
* | | | Optimize some atomic countersMarc Mutz2019-06-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define the static QAtomic at file scope to avoid GCC's pessimisation with function-static QAtomic (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79561), and make sure the initial value is 0, so it ends up in BSS, not TEXT. In QRhi..., don't create a static instance of the wrapper class, use a file- static atomic, too. This turns the class into a glorified namespace. Change-Id: I707f628e2b434330028077223071716d5704ba32 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-06-2520-289/+629
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/gui/painting/qdrawhelper.cpp src/gui/text/qdistancefield.cpp src/gui/text/qdistancefield_p.h src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/android/qandroidinputcontext.cpp src/widgets/styles/qstylesheetstyle.cpp Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: Ia7daad21f077ea889898f17734ec46303e71fe6b
| * | | NSMenuItem/NSMenu - set the submenu properlyTimur Pocheptsov2019-06-214-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... in case the submenu is set from a slot, attached to the aboutToShow() signal. Normally, with a 'statically' pre-populated menu, we set 'submenu' property on a menu item from 'updateItem' callback in our menu delegate. After that, AppKit calls our delegate's willOpen call back and this is where we emit 'aboutToShow'. Unfortunately, if an application tries to create a nested menu 'dynamically' at this point, it never becomes 'submenu' of the item, since 'updateItem' was already handled at this point. We catch this case in QCocoaMenuItem and call setAttachedItem if needed. Fixes: QTBUG-76060 Change-Id: I676bf1d8529b9ddbfc90e4dff422b39668b7a5fa Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | | Use Xft DPI as basis for HiDPI scalingAllan Sandfeld Jensen2019-06-192-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GNOME indicates DPI modes by setting high DPI values in Xft.DPI, so we need to use the forced DPI setting instead of the real DPI, as basis for QPA pixel density. Change-Id: I6f25636383b16b89a3d5fe4c904afd079fe001aa Fixes: QTBUG-74836 Task-number: QTBUG-65424 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | macOS: Don't capture local Q_D in QMacStyleTor Arne Vestbø2019-06-191-1/+2
| | |/ | |/| | | | | | | | | | Change-Id: I01f14295e7e383b583931fc22e3d43151f7918b0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | macOS: Make QMacStyle::standardPalette() reflect the platform themeTor Arne Vestbø2019-06-191-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This palette isn't usually used, and the platform theme's palette is preferred, but if a client asks for the standard palette (e.g. as used in the styles example) we should try to report a palette that gives the system look. Change-Id: Ie5e58c890c13c716a9e9b5093b954a737e550dee Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | macOS: prevent duplicate backing store scalingMorten Johan Sørvig2019-06-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | m_requestedSize is already scaled by the QtGui scale factor (e.g. as set by QT_SCALE_FACTOR). Multiplying by QWindow::devicePixelRatio() then applies this factor again. Use QPlatformWindow::devicePixelRatio() instead, which returns the platform scale factor. Change-Id: I133e99d84f4718215fda9ef0cf81a113b51db2c7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | macOS: Invalidate window shadow after QNSWindowBackingStore resizeTor Arne Vestbø2019-06-183-10/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The window shadow rendered by AppKit is based on the shape/content of the NSWindow surface. If the backingstore is partially transparent, we need to invalidate the window shadow after each resize (and subsequent flush) of the backingstore. Change-Id: I451370af5a8c0c25faea26beb3faa2483a33a5cf Fixes: QTBUG-74560 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Windows: Use UUIDs instead of function pointer to mangle window classesTim Blechmann2019-06-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using the address of a function pointer, we name-mangle window classes by using an UUID. This fixes a real-world problem with multiple Qt instances where for some reasons the window function appears to be mapped to the same address. Change-Id: Id27e8d7aa17a4db9c14559224395f49d3ecd8d78 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | iOS Accessibility: implement accessibilityElements and check indexingFrederik Gladhorn2019-05-211-0/+8
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-70683 Change-Id: I122c67a5cee22363de5c8e45dc1c83e7760162fb Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | Cocoa: always send queued user input eventsMorten Johan Sørvig2019-03-212-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | User input events will be queued if processEvents() is called with the ExcludeUserInputEvents flag. User code then expect that the queued events will be sent when the corresponding exec() call returns. We were sending queued user input event at the beginning of processEvents(). However, the cocoa event dispatcher also has a mode where it makes a blocking call to [NSApp run], in which case processEvents() never returns during event processing. This means we don’t get to call the queued-event-sending code. Factor out the queued-event-sending code to a new sendQueuedUserInputEvents() function. Call it from postedEventsSourceCallback() to make sure the queue is emptied after the ExcludeUserInputEvents processEvents() call is done. Task-number: QTBUG-69687 Change-Id: I4ff554ef4d39a69356736c33a650886b56bfdb4c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | Fix crash when app is going to shutdown but conf manager is requestedVal Doroshchuk2019-06-121-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the app is finished and going to shutdown, qNetworkConfigurationManagerPrivate() returns nullptr. Change-Id: I01915021d8698802b3a1d0dee43203cd3d4aba74 Task-number: QTBUG-76090 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | QAndroidInputContext: Improve compatibility with virtual keyboardsVova Mshanetskiy2019-06-052-202/+430
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit improves QAndroidInputContext's conformance to Android's InputConnection interface and/or consistency of it's behavior with Android's native EditText control. * Composing region is now completely independent from cursor and selection, as required by InputConnection documentation. Also, Qt will now never clear composing region (i.e. call finishComposingText()) without receiving a command to do so from the keyboard. This is important for the following reasons: - Some keyboards misbehave if we change composing region without receiving a command from them. Notably, Samsung Keyboard does (QTBUG-68822). - Due to asynchronous nature of interaction between QAndroidInputContext and the keyboard, when user drags cursor handle quickly, the keyboard may call setComposingRegion() to mark a word, which is no longer under the cursor. This was causing text corruption (QTBUG-43156, QTBUG-59958). Also SwiftKey makes such calls when user presses Enter key (QTBUG-57819). - For similar reasons selecting a word with a double-tap could cause text corruption. The keyboard may call setComposingRegion() in response to the first tap after the second tap has been processed and the word has already been already selected. This is achieved by keeping track of start and end of composing region independently from the editor. Whenever possible (i.e. when there is no selection and the cursor is inside composing region), the composing text is represented as preedit text inside editor. And whenever that is imposible, the editor is told to commit, but QAndroidInputContext keeps information about composing region internally to be able to correctly interract with the keyboard. * deleteSurroundingText() has been re-written to work correctly when there are selection and/or composing region. Some keyboards (e.g Ginger Keyboard) do call deleteSurroundingText() when there is non-empty composing region. * All operations are now performed inside a batch edit (i.e. QAndroidInputContext now calls beginBatchEdit() and endBatchEdit() on itself) to ensure that an intermediate state is never reported to the keyboard, whenever an operation requires more than one QInputMethodEvent. BatchEditLock helper class was added to call begin/endBatchEdit() in RAII style. m_blockUpdateSelection has been removed because m_batchEditNestingLevel is now used instead of it. * Selection start and end positions are now reported to the keyboard so that start <= end. Some keyboards can not handle start > end. * getTextBefore/AfterCursor() now exclude selected text from their return values. While Android docs say "text before/after cursor", what they really mean is "text before/after selection" because "the cursor and the selection are one and the same thing". Some keyboards (e.g. Gboard) were behaving incorrectly when selected text was being returned. * getExtractedText() now tries to obtain and return the whole text from the editor. This is to fix compatibility with some buggy keyboards (e.g. Samsung Keyboard, Minuum) that ignore startOffset field and assume that selectionStart and selectionEnd are absolute values. Then they issue commands with wrong indexes in some cases. Fixes: QTBUG-43156 Fixes: QTBUG-59958 Fixes: QTBUG-57819 Fixes: QTBUG-68822 Change-Id: I7e71f3bcfbb2c32248d653a4197293db03579a79 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * | QAndroidInputContext: Don't allow clearing selection by dragging handlesVova Mshanetskiy2019-06-051-39/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Android's native text editing controls do not allow user to clear selection by dragging selection handles. Qt apps should behave in the same way. Change-Id: I9a7c3a2aafa484eed8ff2bbd46dd48c705195291 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * | QAndroidInputContext: Fix unneeded preedit commits when dragging handlesVova Mshanetskiy2019-06-051-11/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the cursor handle was dragged by only a few pixels, position of the cursor did not actually change, but finishComposingText() was called anyway. So the keyboard was thinking that nothing changed and a word is still being composed, but the app was thinking that there is no preedit string. This was resulting in invalid handling of following key presses. This commit essentially inlines QPlatformInputContext::setSelectionOnFocusObject() into QAndroidInputContext::handleLocationChanged(). This allows us to call finishComposingText() and to send a QInputMethodEvent only when position of the cursur actually changes. This also allows us to add a QInputMethodEvent::Cursor attribute into the event for consistency with QAndroidInputContext::longPress(). Change-Id: I2fc82f138f717991f34024cdf521236845dc0adf Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * | Track swap interval in QXcbWindowErik Kurzinger2019-06-133-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per GLX_EXT_swap_control, the GLX swap interval is specified on a per-drawable basis. However, QGLXContext only tracks it per-context using the m_swapInterval member. If a new drawable is made current to a context, it is still necessary to call glXSwapIntervalEXT to change the swap interval, even if it has been previously called for the same context with a different drawable. However, currently, QGLXContext::makeCurrent doesn't do this if its m_swapInterval field matches the new swap interval. This change removes m_swapInterval from QGLXContext, instead tracking it in QXcbWindow. This still avoids unnecessary calls to glXSwapIntervalEXT, while ensuring the swap interval is always set for new window drawables. Change-Id: Idc34101476c6af618059f6f3d8925dee743994a3 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>