summaryrefslogtreecommitdiffstats
path: root/src/jar
Commit message (Collapse)AuthorAgeFilesLines
* Android: make internal Java code for QtAndroidWebView privateAssam Boudjelthia5 days1-33/+33
| | | | | | | | | | | This Java code is mainly an internal implementation detail for the Qt for Android plugin, and isn't meant to be public in the first place. Pick-to: 6.8 Task-number: QTBUG-126371 Change-Id: I614ff6841bc0de5ecb0922d6610d7079a3afba1f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Android: make functions static if they don't need the objectVolker Hilsheimer2023-11-131-10/+10
| | | | | | | | | | | | | | | This prevents threading issues when calling object functions in a lambda run on the android main thread, when the QJniObject was instantiated on the Qt main thread. As a drive-by, store the id as a 64bit value on the C++ side. jlong is always a 64bit type, even on 32bit Android systems, so we can't use quintptr without truncating data. Change-Id: I96d983eb9b2e99338768d30f7000ec9e75d3fea6 Reviewed-by: Christian Strømme <christian.stromme@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Adjust Android-related installation directoriesFab Stz2023-01-161-1/+3
| | | | | | | | | | Use the correct plugins directory when generating dependenciencies. Install android jars to INSTALL_DATADIR. Pick-to: 6.5 Task-number: QTBUG-106533 Change-Id: Ifc74a554236d798945dfb21ea65a775e9d752015 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add settings API for QtWebViewChristian Strømme2022-10-271-0/+134
| | | | | | | | | | | | | Adds API and implementation for changing the settings of the WebView. [ChangeLog][General] Added settings API to make it possible to modify some of the WebView's built-in functionality. Task-number: QTBUG-97487 Task-number: QTBUG-98549 Change-Id: Ia121175ec08c96f56fd2148b02dccbc963fff244 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-231-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: I824b873d98c922af8a4a290dcd797a2135d1147f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-071-0/+3
| | | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: Iff8b50e402d070ba5fa2562fef50b7d7d3743cb4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-101-38/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I0f719de9e6e1fd4a7c50a247831e5a768e08df14 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Fix crash due to missing native functions for the cookie APIsChristian Strømme2022-05-091-19/+66
| | | | | | | | | | | The cookie API that was added in 317e13cb2d97 missed the registration and implementation for the native java functions needed for notifying when a cookie got added/removed. Fixes: QTBUG-102801 Pick-to: 6.3 Change-Id: I7594f75abba17b6ff1843d5349af085f90aae9b1 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Enable local storage by defaultChristian Strømme2022-03-161-0/+5
| | | | | | | | | | Enable local storage by default, same as QtWebEngine and iOS. Fixes: QTBUG-75723 Pick-to: 6.3 6.2 5.15 Change-Id: I42f04e53b5014ef107dec61535f8c102f2d5dd27 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Tero Alamäki <tero.alamaki@qt.io>
* Use up-to date LGPL license headerKai Köhne2022-02-141-11/+14
| | | | | | | | | | | | | Remove usages of outdated LGPL3 header that references LICENSES.LGPLv3 instead of LICENSES.LGPL3. Use BSD instead in the examples, updated LGPL otherwise. Also remove the now unreferenced LICENSE.LGPLv3, LICENSE.GPLv2 files, and instead the newly referenced files instead. Pick-to: 6.2 6.3 Change-Id: I01e1325ee2c7a147e095c08b370b88ded9a8daff Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Add support functions to manage cookiesAgnieszka Jaworska2021-12-141-0/+43
| | | | | | | | | Setting and deleting cookies, changes for android, darwin and webengine plugins Pick-to: 6.3 Task-number: QTBUG-96204 Change-Id: I4f79d34384e490b70a1e9f89196dd113733d5fe1 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Remove qmake filesMichal Klocek2021-06-171-13/+0
| | | | | | Pick-to: 6.2 Change-Id: I04c6f3f6bdfadcddac6d79440d6e292241bc50cd Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Add cmake buildMichal Klocek2021-06-021-0/+12
| | | | | | | | | Update dependencies to latest shas. Fix compilation issues. Task-number: QTBUG-88620 Change-Id: I0c82431e6ffd142302cce12e6ee74d2139e1e42f Reviewed-by: Christian Strømme <christian.stromme@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Android: rename Android's package name for Qt 6Assam Boudjelthia2021-02-122-3/+3
| | | | | | | | | | Rename Android package name org.qtproject.qt5.android to org.qtproject.qt.android to avoid inconsistency with Qt 6 name. Also, we include the major version number in the jar target. Task-number: QTBUG-86969 Change-Id: If887ac62ff480986f70434e5ab898d0bb9f19606 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Implement QtAndroidWebViewController.getUserAgentPaolo Angelelli2019-10-311-6/+31
| | | | | | | | | | | | | | | | Commit 0a8a69d51042b95649dbdf471acb3c96228f372e introduced the httpUserAgent property, with implementations for apple, winrt, webengine and android. However, the android implementation is missing a piece of implementation. Additionally, use semaphores to make sure that, on return, the setter has completed setting the user agent, and therefore the emitted signal is fired with the correct value. Task-number: QTBUG-68746 Change-Id: Ic8f2a398297c8cd7d87ef4946ef26399167aeba9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Add QtWebView::WebView::httpUserAgent propertyArmin Felder2019-05-151-0/+14
| | | | | | | | | The httpUserAgent property allows to get and set the User Agent. Task-number: QTBUG-68746 Change-Id: I12fb5da00b14ecba53e71c532f2c8401f8f2a009 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Android: remove support for local/debug deploymentJake Petroules2017-09-064-18/+12
| | | | | | | | | | | | | | This removes the pre-dexed JAR files activated by the absence of the bundled_jar_file CONFIG option, as versions of Android >= 5 no longer support this deployment mechanism. Now, the "bundled" JARs simply become normal JARs containing class files, and are neither activated by a bundled_jar_file CONFIG entry nor do they have a -bundled suffix in the file's base name. Task-number: QTBUG-62995 Change-Id: I36111210bc0e4684044b173d1d0ef66d342ed13f Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Android: add support for various url schemes.Vincas Dargis2016-06-031-0/+22
| | | | | | | | | | | | | | | Android WebView does not handle schemes by default, such as mailto:, geo:, and others, but will instead show an "ERR_UNKNOWN_URL_SCHEME" error. This patch fixes it by starting ACTION_VIEW Intent for specified scheme, meanwhile showing the same "ERR_UNKNOWN_URL_SCHEME" error page for invalid cases as before. [ChangeLog][Android] Added support for various url schemes. Taks-number: QTBUG-53736 Change-Id: Ib569ec1598f76f823b2293446ea4e513764ef1fa Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Android: Explicitly tear-down the Native WebView.v5.6.0-beta1Christian Strømme2015-12-091-0/+10
| | | | | | | | | | | | | | The WebView will continue to evaluate JavaScript even after we've released all handles to the WebView, to avoid this we'll call destroy() when we release the WebView on our side. On Android 6.0 there's issued a warning when destroy is called, but this is not fatal and seems to be a know issue on their side. Alternatively, if it turns out that calling destroy() causes problems in the future, it's possible to stop JS evaluation by disabling it through the WebSettings interface. Task-number: QTBUG-49664 Change-Id: Ic98d24d58525397ad06ecbc4476cd5613b6663ab Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Android: Fix WebView access to geolocation data.Vincas Dargis2015-12-041-0/+21
| | | | | | | | | | | | | | | | Webapps dependent on geolocation fails even if ACCESS_FINE_LOCATION permission is set by developer for the package itself. This fix implements implicit user prompt to allow access to geolocation data if ACCESS_FINE_LOCATION permission is set. From now on, QtWebView adds ACCESS_FINE_LOCATION by default to make it work out of the box. Packages built without ACCESS_FINE_LOCATION (if developer removes it manally) will not (naturally) get access to device location as before this fix, nor there will be Android security exceptions. Task-number: QTBUG-49566 Change-Id: I476aef28e59f238a571ed77984b9cd294a9bbd25 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Android: Make sure we send a load request update when we start loading.Christian Strømme2015-06-221-0/+3
| | | | | | | | | We should always send the the starting request update, so we always transition from starting and go to finished or error even if the url is invalid or can't be reached. Change-Id: I4e917b95bf34e44bd8986bdccd2fb2f5aa183414 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Android: Fix load request state tracking.Christian Strømme2015-06-221-15/+22
| | | | | | | Fixes problems were isLoading() would return the wrong value. Change-Id: I0e0876551f9dcbd41523731dd51dce806680c10e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Android: Add protection against deadlocking and/or triggering ANR.Christian Strømme2015-06-151-4/+11
| | | | | | | | | | | | | We block the Android UI thread when we call into the native WebView which means it's possible to deadlock or cause the "Application Not Responding" handler to be activated, e.g., if the WebView or UI thread is unable to process the request quickly enough. This change makes sure we never block the UI thread for longer then 250ms. Anything beyond 200ms is and we can be certain the UI thread is overloaded or we're blocking both the Qt thread and the Android thread. Change-Id: I237674091e4d5db80209b5295f75b61e886f3db4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devChristian Strømme2015-02-151-8/+8
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/webview/qquickviewcontroller.cpp src/webview/qquickviewcontroller_p.h src/webview/qwebview_ios.mm src/webview/qwebview_ios_p.h src/webview/qwebview_p_p.h src/webview/qwindowcontrolleritem_ios.mm Change-Id: I0454a007bf8297064045d5d193e74a08c9703f12
| * Fix license headersChristian Strømme2015-02-151-6/+6
| | | | | | | | | | | | | | | | | | | | This is an amendment to caae412c72266359d7fe5e17046e14d3c7879c1e where the copyright and license headers where first updated. This change updates the headers, also for the examples, based on the new templates in qtbase (83a5694dc21b8220bb0e5c85f24a53361b2fd478). Change-Id: Ie377e886ff823f60c8409296c7646b0ccfe81f3b Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
| * Update license headers and add new licenses.Christian Strømme2015-02-101-2/+2
| | | | | | | | | | | | | | | | Changed the copyright and contact details in the license headers and added the missing LICENSE.* files (.FDL, GPLv2 and LGPLv3). Change-Id: I836098231f97032b30f5eed431b313d17057e0fa Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Add loadRequest item and necessary classes to enable status reporting.Christian Strømme2015-02-101-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to listen and check the load status through the loadingChanges signal. The new loadRequest type contains information about the load status (started, succeeded or failed) for a specific url and an error string if available. [ChangeLog][WebView] Improved status reporting through a new loadRequest item. Task-number: QTBUG-43767 Change-Id: I65ffb91524b2e0d57875d6728b0558087d91cc0f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Android: Fix isLoading() and progress tracking.Christian Strømme2015-02-101-15/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are no good ways to know if a WebView is loading or not. onPageStarted() is called for each frame, so it might be called multiple times while onPageFinished() is only called for the main frame, that is, resources and other frames might still be loading. To make it worse load status is handled in a different client then the progress, so to make sure we report progress and finished in the right order we need to sync them up and let the last call be responsible for reporting the loading succeeded status. Change-Id: Ibcf858bfa026c5b280c70b338801be9a1475b376 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Add runJavaScript() on Android and iOS.Christian Strømme2015-02-091-0/+35
| | | | | | | | | | | | | | | | | | This is a rough implementation on both Android and iOS and both comes with certain limitations. On Android we require API level 19 or higher and on iOS the runJavaScript function is not asynchronous. Change-Id: Ia19782505e5e30d5517a4d627565e5432cc27bfa Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Refactor QWebView code.Christian Strømme2015-02-091-0/+53
|/ | | | | | | | | | | | | | | | | | | | In an attempt to make the code more future proof, this patch tries to improve the abstraction between the native WebViews/View controllers and the public APIs. This should make it easier to add new platforms and alternative public interfaces, e.g., a Window/Widget API. It should also make it easier to implement a plugin system if needed. In addition the following changes were done: - reload() implementation in the android controller. - reload() calls the native reload function on both Android and iOS. - loadProgress() calls the native getProgress() directly on Android. - isLoading() calls loading() on the UIWebView (iOS) - runJavaScript() will now only pass the script and an id to the platform implementation to avoid creating a strong coupling to QJSValue. Change-Id: I3cbd81c7fd8d93bacf9134be32ad061d1f9e1183 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Android: don't show the zoom controls by default.Christian Strømme2014-10-301-7/+13
| | | | | | | | | | | We don't have any APIs for toggling the visibility of the zoom controls in Qt and the support on different platforms might vary, so we should just hide the controls by default. On devices with API level less then 11 the controls will still be visible, as there is no way to disable them. Note that this does _not_ mean we are disable zooming. Change-Id: Ie49c4bc4e8441b6b1bdc0a0db0d728d8934a14eb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Android: Call onResume() and onPause() when the application is paused.Christian Strømme2014-09-051-0/+36
| | | | | | | | | To avoid unnecessary resource usage we should call onPause() and onResume() on the WebView when the application state changes to avoid unnecessary resource usage. Change-Id: I31bf37f8b13e8f9da65a7a6c616c536456c5bea2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Don't use URLUtil.guessUrl()Christian Strømme2014-09-021-2/+1
| | | | | | | The string should be past unmodified to the back-end. Change-Id: I03a95953a5c872b47b888fbd689e714eeaa85d26 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Long live Qt Web View!Eskil Abrahamsen Blomfeldt2014-08-205-0/+272