summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android
Commit message (Collapse)AuthorAgeFilesLines
* Fix Android Style plugin.BogDan Vatra2013-09-104-4/+84
| | | | | | | | Task-number: QTBUG-29565 Change-Id: Iedb861962e3638bcbdf9d9a72a47bebc63b425b9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Fix unused variable/argument warningsEskil Abrahamsen Blomfeldt2013-09-092-14/+2
| | | | | | | There were a bunch of these in Android specific code. Change-Id: Icf6cda40302171810c1b559f9d442fba6444a3a5 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-021-1/+0
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-271-1/+0
| |\ | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/doc/src/addressbook-fr.qdoc Change-Id: Id1196e8e0c6445f1616c3f29234c974d809f8e48
| | * Android: Remove EGL_BAD_SURFACE warning on suspensionEskil Abrahamsen Blomfeldt2013-08-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When suspending the app we would destroy the surface twice, causing libEGL to output a warning on the second attempt. We would also destroy the surface before all references were released which is not 100% nice. We don't need to call the super class implementation at all, since we are managing the EGL surface ourselves. Change-Id: Ie1ab2ea8561d0018b5f16ac8cdf3296313a0a92c Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* | | Android: added ApplicationState capability.Yoann Lopes2013-08-286-0/+44
|/ / | | | | | | | | | | | | | | | | | | | | | | The application state is tied to the QtActivity lifecycle. Mapping of states between Android and Qt is as follows: onResume --> ApplicationActive onPause --> ApplicationInactive onStop --> ApplicationSuspended Change-Id: Iefef08d6c7a7fde28fba1f4886882458cda6a0c0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* | Accessibility for AndroidFrederik Gladhorn2013-08-228-1/+458
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables both modes for TalkBack, explore-by-touch and the normal swiping mode. It is partially inspired by the BarGraphView example of the Google/Android Eyes-Free project. Note that for any accessibility to work you'll need a device with api level 16 at least. Using reflection we should be able to dynamically pick up the classes if we have the high enough api level. Change-Id: I11b93bead451483782a1711434d45c8f9a35996f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-142-0/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-xcode/Info.plist.app mkspecs/macx-xcode/Info.plist.lib qmake/doc/qmake.qdocconf src/corelib/global/qglobal.h tests/auto/other/exceptionsafety/exceptionsafety.pro tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
| * Add workaround for GL on Android emulatorEskil Abrahamsen Blomfeldt2013-07-292-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | On the Android Emulator, the shaders will be compiled by a desktop GL driver, since the GL driver in the emulator is just a thin wrapper. The GL driver does not necessarily support the precision qualifiers, which can cause applications to break. We detect this at runtime in the platform plugin and set a workaround flag to Task-number: QTBUG-32557 Change-Id: Ied00cfe8e804d1f7862697dd379a14f3bed3d980 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Android: Fix crash when setting WA_NativeWindowEskil Abrahamsen Blomfeldt2013-07-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | We don't support native widgets in Android, so we can get into a mess when people set this widget attribute, since the FB compositor will assume that all widgets have their own backing store. This adds a capability flag to the QPlatformIntegration which allows the plugin to disable the WA_NativeWindow feature. Task-number: QTBUG-32685 Change-Id: Ic200487da4a297f71ab594cf7c90d1e1d53bacd3 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Bump QPA-API-version.Friedemann Kleint2013-07-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | Changes f5dbc876378ae58a7bdfe1e9664fc81caca18dfb (Use QUrl in QFileDialog API) and c96a6ab627100452864eb4d8da973300401c1bfa (Pass argc, argv to platform plugin) introduced changes to the plugin API. Task-number: QTBUG-29396 Change-Id: I46ee22d16f045b69f141dc6c982017586efef662 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Merge branch 'stable' into devSergio Ahumada2013-07-112-0/+12
|\| | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
| * Android: Fix initial window size for raster backendPaul Olav Tvete2013-06-262-0/+12
| | | | | | | | | | | | | | | | | | | | | | We forgot to set the ShowIsFullScreen property for the raster engine case. OpenGL windows already did the right thing, since the GL backend is based on eglFS. The iOS backend also has this logic. Task-number: QTBUG-31984 Change-Id: I1cf5df32d79f441768126f00632107a7971eb5ad Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Key mappings for more remote-control keysAllan Sandfeld Jensen2013-07-051-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | We are missing a few key mappings to have support for remote control keys supported by Android and DirectFB. This patch adds the four color keys Red/Green/Yellow/Blue and ChannelUp and ChannelDown. Change-Id: I4d859c28e0d61c5362f1212ba1e577a47de86ec1 Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Implement system locale for AndroidEskil Abrahamsen Blomfeldt2013-07-045-2/+256
|/ | | | | | | | | | | | | On Android, we would default to C locale always. We need a connection to Java in order to get the locale, so this has to be done in the platform plugin rather than the QtCore library. It's enough to instantiate the QSystemLocale subclass, since this will automatically register itself as the current system locale. Task-number: QTBUG-31651 Change-Id: I76f3e30f7dff90e8101cb560cee2b96c9300d9af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android Mute and FastForward keys mapped wrongAllan Sandfeld Jensen2013-06-171-4/+7
| | | | | | | | | | | | | | KEYCODE_MEDIA_FAST_FORWARD is mapped to Qt::Key_Forward, which undoes Back. I believe the best match in Qt would be Qt::Key_AudioForward which is also mapped by XCB from XF86XK_AudioForward /* fast-forward audio track */ KEYCODE_MUTE is mapped to Qt::Key_Volume_Mute, but the mute button is for muting the microphone, the volume mute is called KEYCODE_VOLUME_MUTE. Change-Id: Id0b78c9bde78faef1f5d31019693e6c466941d70 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Disable long press on AndroidPaul Olav Tvete2013-06-101-0/+4
| | | | | | | | | | | | | | | | Remove the mapping from press-and-hold to right-mouse-button press. This logic was implemented in the android plugin, and there was no way to disable it for applications that needed to handle long presses in a different way. Add an environment variable to enable the mapping for those who really need it, but do not advertise it. (We want to add a proper API for this in 5.2) Task-number: QTBUG-31644 Change-Id: Ia5ae75d6147485b73c78b7c3fa88d11af5d84c06 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Never show EGLFS mouse cursor in Qt for Android platform pluginEskil Abrahamsen Blomfeldt2013-05-201-0/+7
| | | | | | | | | | | | | The hack to use the environment variable for turning off the mouse cursor is broken when running against Ministro, because Ministro does not pass the environment on. A better solution is to make it possible to turn the cursor in the EGLFS plugin off in the hooks instead. Task-number: QTBUG-30553 Change-Id: Id09b48c350d2c95de9bb174f7480cf0cd2bf8145 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Android: don't crash on exitPaul Olav Tvete2013-04-302-27/+21
| | | | | | | | | | | We have to call DetachCurrentThread() for each time we call AttachCurrentThread(). Fortunately we have this convenience class that we prepared earlier. Task-number: QTBUG-30847 Change-Id: I5ffb94b336d3787a3bae197bab22b91770d58848 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: fix crash on exitPaul Olav Tvete2013-04-261-1/+0
| | | | | | | | QTouchDevice is already automatically deleted at shutdown. Task-number: QTBUG-30847 Change-Id: Id6a407083efed849a34ccb1caa315204fc5a5891 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Don't crash when displaying multiple top-levelsEskil Abrahamsen Blomfeldt2013-04-187-33/+108
| | | | | | | | | | | | | | | | | | | | | | While the raster platform plugin supports multiple top level windows, this is not supported on the GL plugin, so if you use GL or QtQuick2 in your app and use several top levels, the app would crash with an error message. A problem is that the top-level SurfaceView is a special overlay View and does not support being stacked in a layout. So instead, we let all windows share the same GL surface and draw on top of each other. This works fine for simple use cases. We implement a new platform capability to make sure no top level windows (even combobox popups and dialogs) get non-fullscreen geometries. That has never worked properly with the eglfs plugin. Task-number: QTBUG-30473 Change-Id: Ia1438019638fc739cc93ffe79b46b81631254df2 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Remove code for Android API level < 9Eskil Abrahamsen Blomfeldt2013-04-151-35/+2
| | | | | | | | We don't support API levels < 9, so we can simplify this code a little. Change-Id: I9823d4c5a44d265e03dec0ceedeeb3c34a1e1eab Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: set logicalDpi based on DisplayMetrics.scaledDensityPaul Olav Tvete2013-04-055-2/+24
| | | | | | | | | | | | | | The mathematically correct way would be to set logicalDPi to 160*scaledDensity, but then a 12 pt font would be gigantic. On iOS, we use a factor of 72 to be compatible with the native APIs, but that means that a 12 pt font is very small. A factor of 100 means that desktop apps look reasonable by default. Task-number: QTBUG-29674 Change-Id: I607f110150fb95685a6980b92f6f92f2b489f959 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Don't show '&' character in menusPaul Olav Tvete2013-04-041-6/+23
| | | | | | | | | Strip out shortcut indicator before showing the text. Task-number: QTBUG-30507 Change-Id: I8fa2ef8a2052f4c43d14b3babfd5aca0a08e29d5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Inform android input method when cursor is movedPaul Olav Tvete2013-03-222-0/+11
| | | | | | | | | | Google Japanese Input Beta keeps track of the cursor position, and bails out if the cursor is not where it thinks it should be. We have to tell the IM every time we move the cursor, not only when we are composing. Change-Id: I9cdb28f81c76e76d3b0125d08bf0595616ca443f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Remove QtWidgets dependency from Android platform pluginEskil Abrahamsen Blomfeldt2013-03-222-25/+4
| | | | | | | | | | | The setFullScreen() function was never called from anywhere, so it was just removed. The update() loop for top level widgets has been replaced by a loop sending expose events to top level windows. Task-number: QTBUG-29313 Change-Id: Ic31a05ad3a0693f1d3f61457cee9d78f6b334b4d Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fix multi-touch input on AndroidEskil Abrahamsen Blomfeldt2013-03-125-3/+35
| | | | | | | | | The touch events were collected but then thrown away because of a missing port of he handleTouchEvent() function call. Task-number: QTBUG-29126 Change-Id: I02f7380945be04a36da14a89f2f3ff9429b17cbc Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Introducing the Qt Android portPaul Olav Tvete2013-03-0544-0/+5837
Based on the Necessitas project by Bogdan Vatra. Contributors to the Qt5 project: BogDan Vatra <bogdan@kde.org> Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> hjk <hjk121@nokiamail.com> Oswald Buddenhagen <oswald.buddenhagen@digia.com> Paul Olav Tvete <paul.tvete@digia.com> Robin Burchell <robin+qt@viroteck.net> Samuel Rødal <samuel.rodal@digia.com> Yoann Lopes <yoann.lopes@digia.com> The full history of the Qt5 port can be found in refs/old-heads/android, SHA-1 249ca9ca2c7d876b91b31df9434dde47f9065d0d Change-Id: Iff1a7b2dbb707c986f2639e65e39ed8f22430120 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>