summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/qandroidplatformintegration.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Android: Early spring QPA cleanupBogDan Vatra2015-03-231-8/+4
| | | | | | | | | | - Move m_eglDisplay to private section - needsBasicRenderloopWorkaround is needed only locally so, make it a static function - remove unused member variables. Change-Id: I3e845301ec66a322621c7d9e6fac257320a40f77 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Android: Use nullptr instead of Q_NULLPTRBogDan Vatra2015-03-201-3/+3
| | | | | | | | | | | Android QPA is built only for Android using Android toolchains which we know for sure that it supports C++11/14. Actually C++11 is enabled by default on Android, so there is no need to use more a macro instead of the real thing. Change-Id: I14a720f08320b2e4557f4f1c859454ced19340a6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Android: Make sure applicationState is set correctlyBogDan Vatra2015-03-051-0/+5
| | | | | | | | | | The Activity onResume function is always called before the application gets initialized and we let the applicationState set to the default value which is AppicationInactive. Change-Id: Ifc3c7e3dfc51f2b821f8ca87f8b711f485b6a6f8 Reviewed-by: Peter Rustler <peter.rustler@basyskom.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-6/+6
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Fix crash when Android Style is set more than once.BogDan Vatra2014-12-151-1/+4
| | | | | | | | Load again JSON document is it was freed. Task-number: QTBUG-43111 Change-Id: I22f1de221371b49fec8b3d66ad5f0bd2af9656fe Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Set Android palette and fonts in QPA plugin.BogDan Vatra2014-11-141-4/+18
| | | | | | Task-number: QTBUG-40621 Change-Id: Ibe069d4f93ac317e4f1b9ef5fc6bc3edcfac8685 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Don't use QStringLiteral in comparisonsMarc Mutz2014-10-091-3/+3
| | | | | | | | | | | | | | For QLatin1String, operator== is overloaded, so comparing to a latin-1 (C) string literal is efficient, since strlen() is comparatively fast. OTOH, QStringLiteral, when not using RVO, litters the code with QString dtor calls, which are not inline. Worse, absent lambdas, it even allocates memory. So, just compare using QLatin1String instead. Change-Id: I7af3bf3a67c55dae33ffaf9922d004fa168a3f9c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-231-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The isAlwaysAskOption was removed in 38621713150b663355ebeb799a5a50d8e39a3c38 so manually removed code in src/plugins/bearer/connman/qconnmanengine.cpp Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qcollator_macx.cpp src/corelib/tools/qstring.cpp src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow_p.h src/gui/text/qtextengine.cpp src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h src/plugins/platforms/android/qandroidinputcontext.cpp src/plugins/platforms/xcb/qglxintegration.cpp src/plugins/platforms/xcb/qglxintegration.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp src/testlib/qtestlog.cpp src/widgets/dialogs/qfiledialog.cpp src/widgets/kernel/qwindowcontainer.cpp tests/auto/corelib/tools/qcollator/tst_qcollator.cpp tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp Change-Id: Ic5d4187f682257a17509f6cd28d2836c6cfe2fc8
| * Resize correctly on orientation change.Paul Olav Tvete2014-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | Make sure that the screen geometry is updated before the available geometry, since Qt uses available geometry change as the trigger for updating the application. Task-number: QTBUG-39965 Change-Id: Icb660f2de739367cf1fa99ddfe600f37eb6174eb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Support QOpenGLWidget and QQuickWidget on AndroidLaszlo Agocs2014-08-251-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It gets somewhat complicated due to the fact that a RasterGLSurface window (i.e. any widget window since 5.3) may behave either like an OpenGLSurface or a RasterSurface, and the expected behavior may change on each backingstore sync. This does not fit designs where the platform window implementation is separated and there is different behavior for raster and GL windows. Therefore QAndroidPlatformOpenGLWindow is now made capable of behaving like the raster one, based on a flag communicated from the widget stack via QWindowPrivate (since the plugin knows nothing about widgets). This means that widget windows that do not have renderToTexture children (QOpenGLWidget, QQuickWidget) will go through the raster path, while the ones that have will behave like an OpenGL window with the actual rendering happening in QPlatformBackingStore::composeAndFlush(). The surface type is RasterGLSurface in both cases nonetheless. Task-number: QTBUG-37907 Change-Id: I6f9261fc0fd993afcda7f30d379c5410069033d3 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Android: Really suspend apps that are put in the backgroundBogDan Vatra2014-07-311-3/+2
|/ | | | | | | | | | | | | | | | | | | The main event loop will be paused when an application is suspended, this is also the normal behavior of any Android application. When an application is suspended on Android all its Gl surfaces are destroyed and can't be used to render anymore. So, we need to pause the main event loop in order to pause all the timers which might trigger drawings. The event loop is resumed immediately after the application is foreground. AndroidManifest.xml contains more info about how to disable this behavior and what might happen if you do it. [ChangeLog][Android][Important Behavior Changes] The main event loop is now stopped when the app is suspended Task-number: QTBUG-36274 Change-Id: I4c0ba5df9d95f348bca67ea5c76865d6d20775e4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Report something sensible for screen geometryEskil Abrahamsen Blomfeldt2014-06-131-3/+14
| | | | | | | | | | | | | | | | | | | We can't get the actual screen geometry on Android, but in Qt 5.3.0 we would always return the screen geometry minus the size of the status bar. After the available geometry was initialized to 0x0 instead of this arbitrary value, some applications that depended on this as a constant value would break if they collected the information before the window surface had been initialized and they forgot to listen to QScreen::geometryChanged(). To reduce the risk of regressions, this patch makes sure we return the same thing as before for the screen geometry and that this is not linked directly to the available screen geometry. Task-number: QTBUG-39464 Change-Id: Ie63337b3b10d2eb5130e4fece6c5b144e8230164 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: Support offscreen surfaces on pbuffersEskil Abrahamsen Blomfeldt2014-06-041-0/+14
| | | | | | | | This is pretty much the same thing that eglfs does. Task-number: QTBUG-38960 Change-Id: Ibf310ca8e3a4e31e5310ab3a3d3e851eae31a4ad Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Android: eglBindAPI() won't return on certain devices.Christian Strømme2014-03-291-3/+3
| | | | | | | | | | On some devices eglBindAPI() will block forever if called before eglInitialize(). Task-number: QTBUG-37635 Change-Id: Id27f37e3efcd2ff16e97e1f3381ac3ae8ae0ef33 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Android: registerTouchDevice at startupBogDan Vatra2014-03-271-0/+33
| | | | | | | | | | I'd like to keep registerTouchDevice from androidjniinput.cpp, touchEnd as a backup for buggy Android devices that are not setting Configurations.touchscreen field correctly. Task-number: QTBUG-36007 Change-Id: Ib8f107474baa278b2d82d9ca14913512dfff01c2 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Android: use fbo read back workaround with specific GPUs.Yoann Lopes2014-03-271-2/+2
| | | | | | | | | | | | | Namely, the Mali 400 and the Adreno 200. We used to enable this workaround only for the Samsung Galaxy Tab 3, which has a Mali 400. The same problem was confirmed with the Samsung Galaxy Note N7000 (Mali 400) and the ZTE Blade (Adreno 200). Task-number: QTBUG-33951 Task-number: QTBUG-34984 Change-Id: Ic624962986f718285b98ab4ca48e22f9aa110753 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Android: Re-enable threaded renderingEskil Abrahamsen Blomfeldt2014-03-201-1/+2
| | | | | | | | | | | | | | | In Qt 5.2.x, the platform plugin inherited from the EGLFS platform plugin, so calling the super class implementation of hasCapability() would return true for ThreadedOpenGL. Since this link was removed in Qt 5.3, we would return false for all devices, giving us a large performance regression. Task-number: QTBUG-37586 Change-Id: I27758649ee9c0921902787b93be943751c839eb8 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Alessandro Portale <alessandro.portale@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Sort include headersBogDan Vatra2014-02-211-7/+6
| | | | | Change-Id: I453a40d57a7c3d6062c23f6772de1b8330f61067 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Add Foreign Window supportChristian Strømme2014-02-141-1/+5
| | | | | Change-Id: Ie41edd3f17214805673311a375191cd93d2378f6 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-071-13/+34
| | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformintegration.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/android/qandroidplatformopenglcontext.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/sql/doc/src/sql-driver.qdoc src/widgets/widgets/qtoolbararealayout.cpp Change-Id: Ifd7e58760c3cb6bd8a7d1dd32ef83b7ec190d41e
* Sort include headersBogDan Vatra2014-01-311-8/+7
| | | | | Change-Id: Ib987ee7c6e2cfcabd725fde4399c968a11dc0868 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Support multiple native surfaces on Android.BogDan Vatra2014-01-171-0/+286
Support for multiple native surfaces is needed by applications that need to mix raster windows with GL windows. Rework the raster and opengl implementation, get rid of eglfs and fbconvenience dependencies. Create a single android platform plugin. [ChangeLog][Android] Rework the raster and opengl implementation. [ChangeLog][Android] Create a single android platform plugin. Task-number: QTBUG-34650 Change-Id: I9b1ab51554823329dda8cfbf8fef27c38f917c7b Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>