summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Android: Add missing overrideAlexander Volkov2016-11-291-17/+17
| | | | | Change-Id: I70b802517d8f7d129ffb71dc3e92cb2458a55acc Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Updated license headersJani Heikkinen2016-01-151-13/+19
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Libraries: Fix single-character string literals.Friedemann Kleint2015-10-131-4/+4
| | | | | | | Use character literals where applicable. Change-Id: I8e198774c2247c1cc1d852a41b59b301199b7878 Reviewed-by: Marc Mutz <marc.mutz@kdab.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>
* Android: Don't open assets files in read/write modeEskil Abrahamsen Blomfeldt2015-01-281-3/+1
| | | | | | | | | | | | | | | | | We would return true when opening assets in read/write mode despite the fact that the files are not writable. The logic now matches that of the qrc file engine. This also adds a unit test for Android-specific issues. [ChangeLog][Android][Important Behavior Changes] Opening assets with QIODevice::ReadWrite now returns false to correctly indicate that the files are not writable. Change-Id: I019cc27861fc9b000dc13c5e0a38c0fc09a08671 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-291-18/+10
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/image/qimage.cpp src/gui/image/qppmhandler.cpp src/gui/kernel/qguiapplication.cpp src/gui/painting/qpaintengine_raster.cpp Change-Id: I7c1a8e7ebdfd7f7ae767fdb932823498a7660765
| * 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>
* | Android: use qEnvironmentVariableIntValue()Marc Mutz2014-09-121-1/+1
|/ | | | | | | | It doesn't allocate memory, so cannot throw and is a lot faster than qgetenv(). Change-Id: I6d79852613228658f9093a272edf9b434e60286c Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Fix namespace usageChristian Strømme2014-06-301-0/+4
| | | | | | | This change makes it possible to set a Qt namespace for Android builds. Change-Id: I79f4ae8200223f36f97e2849aae49e45b8850d23 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* REG: Android: Fix freeze when accessing assetsEskil Abrahamsen Blomfeldt2014-03-211-1/+0
| | | | | | | | | | | Change 287fa94fe2f93e2857a4c15f69435c4ea14de82e created a freeze in the assets file engine because it will try locking the mutex twice. Since prepopulateCache() is only called from create(), we don't need to lock it recursively. Task-number: QTBUG-37661 Change-Id: I00d0fed132a86c1be5603484eb6ee05454da9ef0 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Fix another "QApplication not on main() thread" crashEskil Abrahamsen Blomfeldt2014-03-151-2/+9
| | | | | | | | | | | | | | The assets file engine is created before main() is called, thus prepopulate was called before main(). In this function, we created a QDataStream which internally created a QBuffer which inherits from QObject. This caused the main thread pointer to be initialized early, and the old "QApplication is not on the main() thread" warning and crash returned. The fix is to prepopulate the first time the file engine is used instead. Task-number: QTBUG-37444 Change-Id: I2c6e5f1a8ca88b5dc7d8e145fffeb7587dc0e623 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Support pregenerated cache in assets file engineEskil Abrahamsen Blomfeldt2014-02-261-24/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides a way for androiddeployqt to pregenerate the entry list cache for the assets file engine, greatly improving performance the first time a directory is read. If the file is not present, the cache will operate as before. Some numbers from testing on Samsung Galaxy 2, doing QDir::entryList() on a directory inside the assets folder: 10 files -------- Before: 280 ms for first read, 5 ms for subsequent reads After: 2 ms for reading pregenerated cache 5 ms for first read 5 ms for subsequent reads 2000 files ---------- Before: 1000 ms for first read, 150 ms for subsequent reads After: 5 ms for reading pregenerated cache 150 ms for first read 150 ms for subsequent reads 4000 files ---------- Before: 3000 ms for first read 300 ms for subsequent reads After: 8 ms for reading pregenerated cache 300 ms for first read 300 ms for subsequent reads [ChangeLog][Android] Speed up first time directory listing in assets by using pregenerated entry list. Task-number: QTBUG-33704 Change-Id: I3973a1d823b8b38e88a2cc7843326cbe885f8bc2 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Android: Don't skip first file in assets entry listEskil Abrahamsen Blomfeldt2014-01-301-0/+1
| | | | | | | | | | | | | | | We're using AAssetDir_getNextFileName() to verify that the directory exists and has content, and this moves the current file pointer to the second file in the dir, so we need to reset the pointer before iterating to populate the entry list. [ChangeLog][Android] Fixed QDir::entryList() for assets scheme to no longer skip the first file in the directory. Task-number: QTBUG-36528 Change-Id: I9938c669658330b0e11d6fbe3df8c6566fd79f5f Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Support multiple native surfaces on Android.BogDan Vatra2014-01-171-0/+309
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>