summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android
Commit message (Collapse)AuthorAgeFilesLines
* Android: Don't recurse into directories inside the assets when iteratingAndy Shaw2020-02-271-20/+5
| | | | | | | | | When iterating, it should only return what is in the specified path and not the contents of the sub-directories inside the given path in addition. Change-Id: Iad56f075c22fdf1c633582e37444e26520c24a73 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Android: Fix native fileDialog not waiting for user selectionAssam Boudjelthia2020-02-102-0/+5
| | | | | | | | | Add an event loop to wait for user file selection in native fileDialog Task-number: QTBUG-77214 Change-Id: I3d97d6c3f46cf2a8ed0ee6f98e555e8d62e12cc3 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Android: Fix native open fileDialog crash on AndroidAssam Boudjelthia2020-02-051-0/+1
| | | | | | | | Unregister the ActivityResultListener() after the result is handled. Fixes: QTBUG-78912 Change-Id: Ia2b45eca002e854492c409c70a3876fa8ce98de1 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Fix AndroidAbstractFileEngineBogDan Vatra2020-02-051-1/+4
| | | | | | | | | | "" it's the root folder of the assets, setting m_fileName = "" will make AndroidAbstractFileEngine::setFileName to fail and it will not set the proper flags. Fixes: QTBUG-81535 Change-Id: I0653f83b55ee790c8edf188889ccb30ef54584c0 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Merge remote-tracking branch 'origin/5.14.1' into 5.14Liang Qi2020-01-281-1/+1
|\ | | | | | | | | | | | | | | Conflicts: mkspecs/features/create_cmake.prf Done-With: Artem Pisarenko <artem.k.pisarenko@gmail.com> Change-Id: I2ecb9fdca06fe687be8ab3457a58dd81e5e81c4c
| * Release the local ref immediatelyBogDan Vatra2020-01-221-1/+1
| | | | | | | | | | | | | | | | | | The local refs are released by the JVM when we exit the function, but if we need tons of local refs, JVM will not be happy. Fixes: QTBUG-81077 Change-Id: Ic38a5be1a563cb9c2465f9f902ff6ae6c61e698b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Android: JNI_OnLoad return JNI_VERSION_1_6 instead of JNI_VERSION_1_4Assam Boudjelthia2020-01-241-2/+2
|/ | | | | | | | | Update instance of old code using JNI_VERSION_1_4 to make the code consistent. Change-Id: I779696738caa3b844f4adf33104b4328dba748a5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Initialize all variablesBogDan Vatra2019-12-031-2/+3
| | | | | | | | Set m_isFolder = false also in "close" method Fixes: QTBUG-80468 Change-Id: I5449692d61d4d340e83bdca337b86e054e8bf561 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix assets iteratorBogDan Vatra2019-11-291-14/+56
| | | | | | | | | | | | | | | | - start from index -1 each time when we iterate. Each time when we add a FolderIterator to the stack we MUST reset the index (-1) otherwise it will continue from it's last position. To fix it we are cloning the FolderIterator to set the index to -1. The index must be -1 in order to set it to 0 when we first call next() method. - introduce "fileType" static method for a more reliable also much faster file type lookup. The old version of checking if a file exists, is a folder or a file was buggy that's why it skipped some file randomly. Fixes: QTBUG-80178 Change-Id: I4b28e4616399b1bff35d792b55ded1bf19b62dd9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-243-19/+0
|\ | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstandardpaths_unix.cpp src/corelib/tools/qsharedpointer_impl.h tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp Change-Id: Iae95c5778dc091058f16f6db76f04a0178a9e809
| * Revert "Release left button before showing the popup context menu"Eskil Abrahamsen Blomfeldt2019-10-213-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts commit 5e8b16f0e4247cc978b08480450526cfa3b25029. Releasing the mouse button synthetically made it impossible to use tap and hold gestures. When investigating, it seems that other changes have fixed the original issue that 5e8b16f0e4247cc978b08480450526cfa3b25029 was meant to address, so this is no longer needed. [ChangeLog][Android] Fixed regression that made it impossible for an application to use the tap-and-hold gesture. Fixes: QTBUG-72408 Change-Id: I53f687d047a4ad0fdf3c8c96a00ed1b11d09f047 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | Android: Do not extract QML assets dataBogDan Vatra2019-10-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead to extract the assets QML file, we create a .rcc bundle file which is register by android qpa plugin before the it invokes the main function. Thsi way we avoid extracting the QML files from assets as they can be accessed directly from resources. [ChangeLog][Android] Instead of bundling QML resources in assets and extracting them on first start, Qt now creates an .rcc file and register it before invoking the main function. Change-Id: Icb2fda79d82c5af102cc9a0276ff26bb0d1599e8 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Android: rework assets supportBogDan Vatra2019-10-024-192/+184
| | | | | | | | | | | | | | The new version fix QDirIterators and it lists all the files and dirs. Change-Id: I5a30eedb61ab2397a84365d00f308cda0c194de2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-301-3/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qrandom.cpp src/corelib/io/qfileinfo.cpp src/corelib/kernel/qeventdispatcher_win.cpp src/corelib/kernel/qeventdispatcher_win_p.h src/gui/text/qfontdatabase.cpp src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm src/plugins/platforms/windows/qwindowsglcontext.cpp src/testlib/qtestcase.cpp Done-With: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-With: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4893212471aa24be804c989a581810e2f714545c
| * Move DialogButtonBoxLayout case to be before MouseDoubleClickDistanceAndy Shaw2019-09-241-3/+2
| | | | | | | | | | | | | | | | | | This amends 9be66cb282dee1ce4380602a2f3caf5abfd144cf so that the DialogButtonBoxLayout case is moved to be before the MouseDoubleClickDistance one in case the fallthrough is triggered. Change-Id: I843dad6b55ccffe6b6c275cd75587f04659e512f Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | Avoid unused parameter 'grab' warningsLiang Qi2019-09-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Android (5220042 based on r346389c) clang version 8.0.7: src/plugins/platforms/android/qandroidplatformwindow.h:68:35: error: unused parameter 'grab' [-Werror,-Wunused-parameter] bool setMouseGrabEnabled(bool grab) override { return false; } ^ src/plugins/platforms/android/qandroidplatformwindow.h:69:38: error: unused parameter 'grab' [-Werror,-Wunused-parameter] bool setKeyboardGrabEnabled(bool grab) override { return false; } ^ Change-Id: I4d8a18d5e3bfbc13c05b47f0cdfe10370673e359 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | Android: Fix loading of pluginsBogDan Vatra2019-09-223-7/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In 5bb178c479a247720fbc3fbb7f06a32b725193ac, the Android platform plugin was moved from platforms/android to platforms/. The unforeseen consequence of this was that the plugin loader for plugins/platforms would now find it, whereas before it would be ignored. It would therefore be detected as the appropriate plugin, but since it was intended to be loaded as a static plugin, loading it dynamically would fail. Instead of fixing the static plugin loading, we remove this hack. Fixes: QTBUG-78440 Change-Id: Idcb6c075fdebaf67644f32a59d7aaf0d1c0bbe20 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Android: Fix cmake generatorBogDan Vatra2019-09-071-4/+0
| | | | | | | | | | | | Fixes: QTBUG-29859 Change-Id: Id0b5f9ab8b4866483361ba9f15cf51dc0d2627d0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Update Dpi and scale factor computationMorten Johan Sørvig2019-08-232-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove pixelScale() in favor of logicalBaseDpi(). Compute scale factor based on logical DPI and logical base DPI, or optionally based on the physical DPI. Add policies for running the scale factor and adjusting the logical DPI reported to the application. The policies are set via environment variables: QT_SCALE_FACTOR_ROUNDING_POLICY=Round|Ceil|Floor|RoundPreferFloor|PassThrough QT_DPI_ADJUSTMENT_POLICY=AdjustDpi|DontAdjustDpi|AdjustUpOnly QT_USE_PHYSICAL_DPI=0|1 Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io> Task-number: QTBUG-53022 Change-Id: I4846f223186df665eb0a9c827eaef0a96d1f458f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Android: Fix env vars parsingBogDan Vatra2019-08-191-3/+3
| | | | | | | | | | | | | | env var values might contain '=' char, so we can't use split. Change-Id: Iedf3ea46a847acaaf02f51bc80586a519fe7a310 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-08-135-12/+88
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/win32-clang-msvc/qmake.conf src/corelib/tools/qlist.h src/gui/painting/qcompositionfunctions.cpp src/gui/painting/qtriangulator_p.h src/gui/text/qfontengine_p.h src/network/kernel/qhostinfo_p.h src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io> Change-Id: Ib8a0308cf77224c4fbdcf56778fdac4a43e37798
| * Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-08-125-12/+88
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/arch/write_info.pri Repair architecture config test for the WASM_OBJECT_FILES=1 build mode configure.pri tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp Done-With: Jörg Bornemann <joerg.bornemann@qt.io> Change-Id: I9e12088356eb5bc65b53211cd7a8e330cccd1bb4
| | * Android: Fix QMenu on 64 bitEskil Abrahamsen Blomfeldt2019-08-085-12/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The platform menu tags in Qt are actually the pointers, so they are 64-bit values when the build is 64 bit. Since menu IDs in Android are 32-bit ints, we cannot cast back and forth like we do. To fix this, we add a separate hash of menu IDs to allow mapping between Java and C++. For easier book-keeping, we add the hashes to the menu bar and menu classes, so that we can easily recycle old menu IDs when they are no longer in use. Note that overriding the tag on the menus by calling setTag() will not work, since Qt Widgets will later override it again by setting it back to the menu's pointer. [ChangeLog][Android] Fixed an issue where menus would not work on 64 bit builds. Task-number: QTBUG-76036 Change-Id: Icaa1d235d4166331669139251656ea0159e85195 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@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>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-012-3/+29
|\| | | | | | | | | | | | | | | | | | | | | | | 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-281-0/+2
| |\| | | | | | | | | | Change-Id: I912bd8851c390302414d3dfb3c8220df5a0d5630
| | * 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-202-244/+501
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-252-244/+501
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | 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>
* | | Port from QAtomic::load() to loadRelaxed()Giuseppe D'Angelo2019-06-203-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Semi-automated, just needed ~20 manual fixes: $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} + $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} + It can be easily improved (e.g. for store check that there are no commas after the opening parens). The most common offender is QLibrary::load, and some code using std::atomic directly. Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devFriedemann Kleint2019-05-271-30/+49
|\ \ \ | | |/ | |/| | | | Change-Id: Ia279fc4a8226626041c772902a07b2f90f37b53b
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Friedemann Kleint2019-05-271-30/+49
| |\| | | | | | | | | | Change-Id: Iaf6bd52972b562b9c91d9e93a988d26b0eb9d3b4
| | * QAndroidInputContext: Fix getTextBefore/AfterCursor() in mid. of preeditVova Mshanetskiy2019-05-081-30/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getTextBeforeCursor() and getTextAfterCursor() were not properly handling the case when the cursor is in the middle of preedit string (just as TODO comments inside these functions were saying). This was causing problems with Gboard when the user focuses a text editor by tapping in the middle of a word. Fixes: QTBUG-58063 Change-Id: I4a580a74d79965816557bfb342337975348d1c45 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | * QAndroidInputContext: Fix most "Input method out of sync" warningsVova Mshanetskiy2019-05-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to Android docs start == end in a call to setComposingRegion() means finish composing. But this case was not being handled properly: m_composingText was being assigned an empty string, but m_composingTextStart was being assigned the value of start, which is never -1. There is one other possible cause of "Input method out of sync" warnings, but it is tightly coupled with another bug, so it will be fixed by a separate commit. Change-Id: Ie475df84f330453ce4fc623e8b631b435d7d0042 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-05-151-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qfloat16.cpp src/corelib/global/qfloat16.h src/plugins/platforms/windows/qwindowswindow.cpp Change-Id: I0938aaa6a9771f55e48c95ed29f6f5291431b947
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-121-1/+1
| |\| | | | | | | | | | Change-Id: I0c00ffe0eabebc919f22d6faa4bf958b288e8fd9
| | * QAndroidInputContext: Fix start value of Cursor attribute in longPress()Vova Mshanetskiy2019-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The value of start for a QInputMethodEvent::Cursor attribute must be specified relative to the start of preedit string, but longPress() was specifying it relative to start of surrounding text. This was causing QQuickTextInput to return wrong values of cursor and anchor rectangles. And this was causing invalid positioning of cursor selection handles after a long press. Change-Id: Ief67e86dd90b09ebf2ba191a2b0311ff803afdd9 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-05-071-4/+22
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp src/corelib/kernel/qvariant.h src/corelib/tools/qlist.h Done-With: Milian Wolff <milian.wolff@kdab.com> Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io> Change-Id: I6803f7239aa137a51a7467fab7cc7a01302a848d
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-061-4/+22
| |\| | | | | | | | | | Change-Id: Iaad9509712c848ed42ada2c25065162a6fc5a930
| | * Android: Fix deleting of new lines when using backspaceAndy Shaw2019-05-031-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With some keyboards (ASOP, SwiftKey) it was not deleting any new lines when using backspace. So this ensures that it is correctly deleting at these points. Tested with the Samsung, Gboard and SwiftKey keyboards. Fixes: QTBUG-74824 Fixes: QTBUG-57798 Change-Id: Id2e4f96c18c3fec0e7f444b55dd3db2653625fd0 Done-with: Vova Mshanetskiy <vovams163@gmail.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Prefix textstream operators with Qt::Lars Knoll2019-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | As the non prefixed variants are deprecated Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Avoid debug messages for not implemented "grab" methodsMartin Koller2019-04-141-0/+3
|/ / | | | | | | | | Change-Id: Ie32b5d261854703fa17bb844cf8354709b031a4c Reviewed-by: BogDan Vatra <bogdan@kdab.com>