summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix access after delete in GTK2 dialog helpersJoerg Bornemann2016-01-051-0/+11
| | | | | | | | | | | | | | | Each QGtk2*DialogHelper class owns a QGtk2Dialog. It is possible that QGtk2Dialog's parent window is destroyed before QGtk2*DialogHelper. Then the QGtk2Dialog is destroyed, because of the QWindow parent/child relationship. Before destroying QGtk2*DialogHelper, QQuickPlatformFileDialog calls QGtk2*DialogHelper::hide, which will then operate on the already destroyed QGtk2Dialog. Break the parent/child relationship when QGtk2Dialog's parent is destroyed. Change-Id: Ie2bda234f759e7bf4d0642accd82fdc38e0379c2 Task-number: QTBUG-49203 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Don't detach QGradientStopsSérgio Martins2016-01-051-1/+1
| | | | | Change-Id: I1ae84d0ae825e9fb474d4fab45b0c475a3878b25 Reviewed-by: David Faure <david.faure@kdab.com>
* winrt: handle PrelaunchActivated property to pass certificationMaurice Kalinowski2016-01-051-0/+9
| | | | | | | | | | | | | | | | Windows 10 requires apps to handle the PrelaunchActivated property. This enables a faster startup by launching an app and immediately suspending it. This happens by the system and at the time the user launches the app no library loading or initialization is required. By default we opt-out of this and return early. The reason is that we cannot know the type of application written in Qt and whether it breaks the guidelines by using prelaunch. For further details check here: https://msdn.microsoft.com/en-us/library/windows/apps/mt593297.aspx Task-number: QTBUG-50292 Change-Id: I4d0b0b95a03f93b99211d042895404a88ea7cb9d Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* winrt: Added timeout to await functionOliver Wolff2016-01-051-8/+21
| | | | | | | | | | | | | | | | Instead of using a "custom wait function" in cases, where a timeout is needed (like in qhostinfo_winrt.cpp) we should have the timeout as part of our await function. By having one common place to handle this, we can avoid unnecessary warnings, that might be caused by custom functions. The current implementation in qhostinfo for example causes at least 1 "originate error" exception per call. Change-Id: I7b6cfdfd861af2b0d271465eecaefe4a93e3109b Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* Winrt: Show message when command line processing fails/usage should be shownOliver Wolff2016-01-051-2/+8
| | | | | Change-Id: If8f69906beb22f632ccbde92aab5caf914dcb31b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* winrt: Use "await" with its timeout for dns queriesOliver Wolff2016-01-051-17/+28
| | | | | | | | | | By using await instead of using a custom wait function we get rid of a lot of "function was called at an unexpected time" warnings and use the default way of waiting for an asynchronous function to complete. Change-Id: I6c5bf73ccf68a219b8f3facd3531873d7e8d4c67 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* winrt: Use winsock2 API for hostname resolution on WinRT/WinPhoneOliver Wolff2016-01-055-211/+13
| | | | | | | | | | | | | | | That API has been available for WinRT and Windows Phone for some time now. By using it to get the machine name and for hostname resolution we can get rid of some winrt-only code and use qhostinfo_win.cpp on WinRT and Windows phone as well. Additionally the required capability was added to tst_qhostinfo so that this auto test can be run without any manual editing. Change-Id: I63fa5521bf8cdb0c919bd5a0100ea977c865622a Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* WinRT: Add camera button events on Windows PhoneSamuel Nevala2016-01-053-2/+70
| | | | | | | | | | | | | | Windows Phone 8.1 provides access to the camera button and press/release events get passed as Key_CameraFocus and Key_Camera. Unfortunately a release does not provide what has been pressed before, hence this information needs to be cached when the press happens. Done-with: Maurice Kalinowski<maurice.kalinowski@theqtcompany.com> Task-number: QTBUG-39115 Change-Id: I6ce58a1f07a6bf7183b8d99a26e5cd7b0d32d6db Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* QMacPanGestureRecognizer - stop timer on 'reset'Timur Pocheptsov2016-01-051-0/+1
| | | | | | | | | | | | _panTimer has a target - for example, widget. 'reset' should stop this timer. The problem (quite subtle and difficult to reproduce) found in tst_QTouchEvent: widgets created/destoryed by different tests but we still can have a timer waiting for event dispatcher to 'processEvents', firing with now-invalid dangling pointer - 'target'. Change-Id: Iccaf3368a8ee6a0a2f60e9dcdf5d40fb7392ca21 Task-number: QTBUG-49844 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* QOpenGLTexture: fix target for compressed texturesMauro Persano2016-01-041-138/+70
| | | | | | | | | | | Trying to set data for a compressed cubemap texture face fails, because the code incorrectly tries to bind to a cubemap face target. This was already fixed for uncompressed textures. Instead of duplicating the code, moved the texture binding/unbinding code to a RAII class. Change-Id: I8f1cb7fc661b919200f85c3465d6e6e3c22d0871 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QWindowsTheme: Fix return type of helper dWordSystemParametersInfo().Friedemann Kleint2016-01-041-2/+2
| | | | | | | | QApplication::wheelScrollLines() was always 1 due it being a bool. Task-number: QTBUG-49561 Change-Id: I83e97da3507c31dfd024db7bf543c4e6a3b4a98b Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Fix QPainter::rotate() documentationMitch Curtis2016-01-041-1/+1
| | | | | Change-Id: I5d11f84181cad9be644e850c83459b47ec2f2f15 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Fix crash because of NULL screen in QXcbWindowBłażej Szczygieł2016-01-041-8/+6
| | | | | | Change-Id: If7bbe3ad1656dadcb098bcd3ece2e7b064eeb44d Task-number: QTBUG-50081 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Fix deadlock when setting environment variables.Samuel Nevala2016-01-041-15/+36
| | | | | | | | | | | | | | Qt uses QHash as the container for faking environment variables on Windows Runtime and CE. Environment variable manipulation functions are protected by mutex. Accessing the QT_HASH_SEED environment variable inside QHash can lead to situation where qputenv() call leads to qgetenv() call and that leads to a deadlock. Change the container from QHash to QVector to avoid deadlock. Task-number: QTBUG-49529 Change-Id: I550ead4ab12e7abebc044f52339063a44fcf0170 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* tst_qwindow::isExposed - fix failing test on OS XTimur Pocheptsov2016-01-041-9/+10
| | | | | Change-Id: Ice25c8ffaaa4662b679ee829dc0a38834e3258b7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* QNetworkReplyHttpImpl: convert another QDateTime::currentDateTime() to ↵Marc Mutz2016-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | currentDateTimeUtc() The latter is much faster as it doesn't have to deal with time zones. This change is safe because QNetworkHeadersPrivate::fromHttpDate(), used as the QDateTime source in other, nearby, code paths, also returns only UTC date-times. So not only is this change faster at the call site, it also avoids inconsistent-timespec comparisons down the line. Credits to Milian Wolff, from whose QtWS15 talk this advice is taken. Change-Id: I26d308a2763cc45d28bc96871e651f30b17a6b85 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Update PCRE to SVN r1622 (8.38 + patches)Giuseppe D'Angelo2016-01-049-157/+284
| | | | | | | | | | In preparation for the 5.6 release. Upstream changelog: http://vcs.pcre.org/pcre/code/trunk/ChangeLog?revision=1622&view=markup&pathrev=1622 Upstream changes: http://vcs.pcre.org/pcre/code/trunk/?pathrev=1622 Change-Id: I97fb23f6b42f4871f05daa726c2edfc691a16d8e Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QNativeSocketEngine: fix undefined variable on FreeBSDDmitry Shachnev2016-01-021-1/+1
| | | | | Change-Id: I192e20eef4db27fc19ec9a6e517ae5c8cb88897c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Suspend processing of some messages in the default busses by defaultThiago Macieira2016-01-025-7/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To retain a bit compatibility with applications developed in the last 9 years that expect that QDBusConnections won't process their events until the event loop runs, we now suspend the handling of incoming messages in the two default buses (and only in them) and resume when the event loop starts. This is required because the new threaded QtDBus would otherwise process incoming messages that the application didn't expect it to. For example, if the application first acquires names on the bus and only after that registers objects with QtDBus, there's a small window in which the name is acquired and visible to other applications, but no objects are registered yet. Calls to those objects may be received, would then be processed in the QDBusConnectionManager thread and fail. The work around is to disable the actual handling of method calls and signals in QDBusConnectionPrivate::handleMessage. Instead, those messages are queued until later. Due to the way that libdbus-1 works, outgoing method calls that are waiting for replies are not affected, since their processing does not happen in handleMessage(). [ChangeLog][Important Behavior Changes] QtDBus now uses threads to implement processing of incoming and outgoing messages. This solves a number of thread safety issues and fixes an architectural problem that would cause all processing to stop if a particular thread (usually the main thread) were blocked in any operation. On the flip side, application developers need to know that modifications to a QDBusConnection may be visible immediately on the connection, so they should be done in an order that won't allow for incomplete states to be observed (for example, first register all objects, then acquire service names). Change-Id: I39cc61d0d59846ab8c23ffff1423c6d555f6ee0a Reviewed-by: David Faure <david.faure@kdab.com>
* Add a default argument to QDBusPendingCallWatcher::finished signalThiago Macieira2016-01-021-1/+1
| | | | | | | | So we can do connect(&watcher, SIGNAL(finished()), receiver, SLOT(foo())); Change-Id: I39cc61d0d59846ab8c23ffff14241d33fecf2d53 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Remove unused member variable QDBusConnectionPrivate::timeoutsPendingAddThiago Macieira2016-01-021-2/+0
| | | | | | | | They're never pending, since we add them immediately since commit 186d8814407ccb3e221537d9797172c37127bc51. Change-Id: I39cc61d0d59846ab8c23ffff14241be6785ad5a0 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* QSocks5SocketEngine: Always try to connect in connectToHost unless already ↵Robin Burchell2015-12-301-6/+8
| | | | | | | | | | | | | | | | | | connecting. Otherwise, connectInternal becomes a no-op after an initial connection attempt has been made (making the socket effectively useless if that connection attempt fails). A workaround is to close() the socket, which worked by virtue of QAbstractSocket's close() disconnecting (which ultimately calls resetSocketLayer, and destroys the socket engine instance) - meaning that the next connection attempt would have a fresh socks instance to try out the connection with. Reported-by: Gabe Edwards <gabe.edwards@me.com> Change-Id: Iab1e84af6d4248fd75a6dfe5e79a3c73129aae0b Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix incorrect screen number reported by QDesktopWidgetBłażej Szczygieł2015-12-302-6/+31
| | | | | | | | | | | | | | Screens connected to separate graphics cards are detected as separate screens which don't have offset. This patch fixes obtaining the screen number by QWidget: it uses the screen assigned to the root widget. The patch also assigns a proper QScreen to each QDesktopWidget screen(). It also fixes closing a popup menu by clicking on another screen. Task-number: QTBUG-48545 Change-Id: I3d76261c0c067293d39949c4428b2d8dfd085dc7 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Cleanup memory owned by QTestTablePrivateFrank Meerkoetter2015-12-301-0/+5
| | | | | | | | | | Since 7a42c8c15c59ef5fe84e6f293f2c97d38b85599c QTestTablePrivate no longer cleans up the memory it holds in dataList. This will make tools such as valgrind/address-sanitizer generate a lot of noise about directly or indirectly leaked memory. Change-Id: Ic0900ecdd7b76cda9f5366f3950bccde2f1b244c Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Change a QList of pointers to QVectorThiago Macieira2015-12-291-1/+1
| | | | | | | | | | | QList of pointers is optimum, but QVector should provide the same performance (we aren't using the beginning-of-list feature that QList has and QVector doesn't). But since we're using QVector elsewhere, this should be better. Change-Id: I39cc61d0d59846ab8c23ffff14241c6715e2eb00 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QMimeDatabase: follow symlinks when checking for FIFO etc.David Faure2015-12-291-1/+2
| | | | | | | | | This was documented, but not what the code did. Task-number: QTBUG-48529 Change-Id: I4849778c61dcae13be27c62b24717693c0c07d78 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Add -fPIC to CXX flags only where necessaryKevin Funk2015-12-281-1/+22
| | | | | | | | | | | | | | Before this patch, Qt5Core_EXECUTABLE_COMPILE_FLAGS was populated with -fPIC unconditionally. This causes warnings on MSVC, since the compiler does not understand this flag. In fact, -fPIC is only required in case an older release of CMake is being used and the compiler is GCC 5.x (according to documentation), so let's really add it just in this case. Task-number: QTBUG-47942 Change-Id: I9d09b8b257a0647235d6d781ee5c023af34f8f88 Reviewed-by: Stephen Kelly <steveire@gmail.com>
* Default to OpenGLES when building with -opengl es2Allan Sandfeld Jensen2015-12-251-0/+4
| | | | | | | | | | Fixes the xcb_glx plugin to follow the -opengl configure option for default surface types. This makes it match closer to xcb_egl behavior and makes the default match QOpenGLContext::openGLModuleType. Change-Id: Iea3f8069fffefa46a32945eeeea1312566df129f Task-number: QTBUG-50015 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* xcb: Add Xinerama 3rd party source code for static buildBłażej Szczygieł2015-12-224-3/+1468
| | | | | Change-Id: I421d0bcf3fd6362ad6e95db5cfcdefd1a9ec096f Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* xcb: Add Xinerama supportBłażej Szczygieł2015-12-226-19/+75
| | | | | | | | | This patch makes possible to use Xinerama screens in XCB platform plugin. Task-number: QTBUG-48615 Change-Id: Ib4dbfcdfadc46d2875a2fc09e8b852181edfbed2 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Fix QJsonValue::fromVariant() if the variant contains a json objectLars Knoll2015-12-221-0/+12
| | | | | | | | | | | | | If the variant contains a known json type (value, array, object or document), simply unwrap those. In the case of the json document wrap the contained object/array into a QJsonValue. This should be the expected behavior, and makes more sense than returning a null QJsonValue. Task-number: QTBUG-41234 Change-Id: Id084fc11220d51aaf78b7694fd0ebef1411f5c51 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl: revert path-normalization in setPath().David Faure2015-12-221-2/+4
| | | | | | | | | | | | Path normalization should happen only when NormalizePathSegments is set. Use a less intrusive fix for the setPath("//path") issue that commit aba336c2b4ad8 was about. This allows fromLocalFile("/tmp/.") to keep the "/." at the end, which is useful for appending to the path later on (e.g. to get "/tmp/.hidden") Change-Id: Ibc3d4d3276c1d3aaee1774e21e24d01af38fa880 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QStandardPaths: warn if $XDG_RUNTIME_DIR doesn't existDavid Faure2015-12-221-8/+22
| | | | | | | | | | | | | If the environment variable is set, but points to a non-existing directory, the user would get a warning about chmod failing. Better be clear and warn about the fact that the directory itself doesn't exist. Also warn if $XDG_RUNTIME_DIR points to a file rather than a directory. Task-number: QTBUG-48771 Change-Id: If84e72d768528ea4b80260afbbc18709b7b738a8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Docu: fix documentation of QHostAddress() default constructor.David Faure2015-12-221-1/+1
| | | | | | | | | In Qt3 this would indeed be equivalent to QHostAddress("0.0.0.0"). But since Qt4, it creates an address of type Null, and QHostAddress()==QHostAddress("0.0.0.0") is no longer true. Change-Id: I28025421e77c861783c612c2225be345dad5615a Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* QHeaderView: Reset cached section sizes on font and style changeGabriel de Dietrich2015-12-211-3/+5
| | | | | | | | Change-Id: I7ce88b7e43249499343a9aae6acb806dd9c41f31 Task-number: QTBUG-33855 Task-number: QTBUG-37153 Task-number: QTBUG-50010 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QHeaderView and others: Fix font lookup nameGabriel de Dietrich2015-12-212-5/+4
| | | | | | | | | | | | | | It should the the actual class name, without any suffix. This also allows us to use the painter font when rendering CE_HeaderLabel and, as a consequence, change QHeaderView's font through the usual methods. Change-Id: I0b13ee349f5fa505be66a9c884c26885f5fc468f Task-number: QTBUG-33855 Task-number: QTBUG-37153 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Add DEPENDS option to qt5_wrap_cpp()Daniel Levin2015-12-211-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | Currently the moc rule does not support dependency scanning, so after successful moc file generation it will ignore implicit dependencies in the header file. Although this works in most typical scenarios, at least in one case incremental builds become broken: when using Q_PLUGIN_METADATA() with the FILE argument. If FILE refers to a JSON file and latter was updated, then the expected behavior is to regenerate the moc file. Since CMake add_custom_command() does not support late dependency setup, all dependencies should be explicitly listed in a DEPENDS section. This patch adds the DEPENDS multiarg option to qt5_wrap_cpp(), allowing to specify additional dependencies to the moc rule. Task-number: QTBUG-44009 Change-Id: I2052ce23d3cb0c87c6bd99fcb7e8a71a7be9a330 Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Daniel Levin <dendy.ua@gmail.com>
* qprocessordetection.h: Fix detection of 32-bit ARMv8Thiago Macieira2015-12-211-20/+27
| | | | | | | | | | | | | | This is more future-proof. It fixes the detection of 32-bit on ARMv8-A processors since it uses the __ARM_ARCH macro that GCC and Clang define. For MSVC, we use _M_ARM, which also contains the architecture version. MSVC does not currently support ARMv8 code, but when it does, this commit should make the support automatic. I don't know which compiler defines __TARGET_ARM_ARCH, but support it too. Change-Id: I8de47ed6c7be4847b99bffff141c8ede54a849eb Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Fix visibility of bundled zlib symbols with mingwJohn Brooks2015-12-211-7/+2
| | | | | | | | | | | | When QT_VISIBILITY_AVAILABLE is defined, the zlib header would use visibility("default") instead of Q_DECL_EXPORT, but Windows needs dllexport for these symbols to be available to QtGui/QtNetwork. In practice, Q_CORE_EXPORT always has the correct behavior for the zlib symbols. Change-Id: I7ab8080528e437260f822ac33e9e4334e2a0fdc8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Remove superfluous ReleaseSemaphore/WFSO callsJoerg Bornemann2015-12-212-13/+16
| | | | | | | | | Factor out the dispatching of IO results into a separate function. Do not increment the semaphore count in waitForAnyNotified just to decrement it again in _q_notified. Change-Id: I7d4a04b679bb152ab3a5025513f885aee276d086 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Fix broken permission to mode mappingFrank Meerkoetter2015-12-191-3/+3
| | | | | | | Fixes coverity CID154258. Change-Id: Ia958d24c533c4f0077abd363ee4c041cc2cdb6f0 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Windows: Restore window geometry after normal->maximized->fullscreen->normal.Friedemann Kleint2015-12-171-2/+2
| | | | | | | | | | | - Do not save geometry when going from maximized->fullscreen - Use SW_SHOWNA instead SW_SHOWNOACTIVATE as otherwise the maximized geometry is restored. - Add a test for Windows. Task-number: QTBUG-49709 Change-Id: Ic81e7398ee90d499a50b02192a45cb09276a2105 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Windows: Clear key recorder when application becomes inactive.Friedemann Kleint2015-12-171-0/+11
| | | | | | | | | When keys are pressed and the application becomes inactive before they are released, the stored state becomes inconsistent. Task-number: QTBUG-49930 Change-Id: Ide86b1d9052df060f30f7c02b81a4f2ae15d28e7 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Windows: fix fullscreen OpenGL window issues with an opt-in functionAndy Shaw2015-12-175-2/+58
| | | | | | | | | | | | | | | | | | | | | | | Windows automatically disables DWM for opengl windows that have the exact dimensions of the primary screen. This causes numerous issues, such as menus and popups not showing up, and alt+tab misbehavior. Adding a one pixel border via WS_BORDER solves all of these issues. This is done by a QWindowsWindowFunctions to make it opt-in as turning it on can cause an unwanted change in the look of the window so it is up to the user to decide if they want this. [ChangeLog][Platform Specific Changes][Windows] Add a function to QWindowsWindowFunctions to enable working around a limitation with showing other top level windows when showing a fullscreen OpenGL based window. Task-number: QTBUG-41309 Task-number: QTBUG-41883 Task-number: QTBUG-42410 Change-Id: I8c5c785f5024737cd034b2b703671632a8102700 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Use Q_CONSTRUCTOR_FUNCTION instead of doing the same manuallyAllan Sandfeld Jensen2015-12-172-23/+7
| | | | | | | | Use the macro we have that does exactly what we want without the boiler plate code. Change-Id: I25c67a71f83f91f50128c8a54033ee53ad28e88a Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* iOS: Clear focusObject if first responder is set to nullMarkus Goetz2015-12-171-1/+5
| | | | | | | | In certain cases we were still showing a cursor in a TextInput even though the keyboard was hidden programmatically. Change-Id: I48ebb6b8bc0382236b1ea5835e68eae48ece2b4f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Don't hide keyboard on "Done" button when focus object has changedMarkus Goetz2015-12-171-0/+8
| | | | | | | | | | If the focus object changed programmatically for example to the next input field in a window, we want to keep the keyboard open. This strangely only worked if the inputs had different IM hints because this made the keyboard appear again. Change-Id: I52e66bb7d2ff97ae7084173769d9b5c2d0c549b5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: notify application when edit menu is closedRichard Moe Gustavsen2015-12-171-0/+17
| | | | | | | | | The edit menu will also close if the user taps outside it, not only when selecting a menu item. But we never caught this case, which left QMenu to belive that it was still open. Change-Id: Iae071b4fc5fdc44d7d05b4dd767042907e337957 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: include marked text when reporting IM textInRange and endOfDocumentRichard Moe Gustavsen2015-12-171-2/+12
| | | | | | | | | | | | | | | | | | | | | [UITextInput textInRange] is sparsely documented, but it turns out that unconfirmed marked text should be seen as a part of the text document. This is different from Qt IM (ImSurroundingText), which handles marked text on the side. The reason we can assume this is that the range we are given as argument to textInRange exceeds the documents length when having marked text appended to the end, suggesting that it tries to read / verify the current marked text. In addition, keyboards like Japanese-Kana will not update and function correctly unless marked text is included. Note that the docs seems to imply that you cannot have marked text and text selection at the same time, unless the selection is contained within the marked text (using the dedicated selectedRange argument to setMarkedText). If this turns out to be incorrect, we might need to adjust the methods dealing with selection to also include marked text as well. Task-number: QTBUG-49946 Change-Id: Ifedd792ec66db435806f57fca157e1abbbf121a8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Android: Fix crash at exitBogDan Vatra2015-12-173-3/+25
| | | | | | | | | | | | | Delay the exit call until Java part finishes the execution. We must be sure all the threads are stopped (hanged), when we call exit, otherwise java thread will try to use static vars that are freed by the qt thread. We also need to call exit from Qt thread, otherwise Qt will complain about it. Change-Id: Ia1e7a4d7d56c39d38313f040aab618ec5a68dfb6 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>