summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Use printf style qDebug5.6Kai Koehne2017-10-103-6/+5
| | | | | | | | | | | This generates more compact code. It also fixes a build issue with some disabled features on macOS. Task-number: QTBUG-63440 Change-Id: Ice800bdfef09dd83310d40cadd37c15c846ca3e1 Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io> (cherry picked from commit 3bcd4c3506c9352874f1403aba22e36108a867a2)
* qquickwebviewcontroller: don't remove listener from wrong parentRichard Moe Gustavsen2016-10-211-2/+2
| | | | | | | | | | | | | | | | | | | | QQuickViewChangeListener::itemParentChanged is called for parent changes done to any of the items we listen to up the parent chain. But as it stood, we would always remove the change listener from m_item->parentItem(), even if the changed item was higher up in the hierarchy. We would therefore wrongly miss any later changes done to m_item->parentItem(). A bug from this could be seen when pushing an item containing a webview to a stackview, since then, several parent changes would occur. [ChangeLog][General] Fixed missing geometry update bug when a webview changed anchestor (e.g. when pushing it onto a StackView). Task-number: QTBUG-54128 Change-Id: Iff00a0029dd713306db7e39db8c92672a6b379c7 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Fix initialization of the WebView itemChristian Strømme2016-09-082-77/+58
| | | | | | | | | | Don't delay initialization until we're inserted into the scene, as this will cause every property change/function call that happens before that to be dropped. Task-number: QTBUG-53839 Change-Id: I1a2f9066c7b172e14095d7513f343e34812f7d1a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix QQuickViewChangeListenerJ-P Nurmi2016-08-231-4/+4
| | | | | | | | | | | QQuickViewChangeListener wasn't cleaning up its ancestor listeners properly. QQuickItemChangeListener::itemChildRemoved() is too late for removing listeners of the _ancestors_ of the child that just got removed. Task-number: QTBUG-55127 Change-Id: I004a5dd0b49fa36baabf951ee41d8a9ccdef4da8 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Make sure JNI_OnLoad is not called more than onceBogDan Vatra2016-07-201-0/+5
| | | | | | | | | | | | | Since Android 5.0 Google introduce a nasty bug[1] which calls JNI_OnLoad more than once. Basically every time when a library is loaded JNI_OnLoad is called if found, but it calls *again* JNI_OnLoad of its .so dependencies! [1] Workaround https://code.google.com/p/android/issues/detail?id=215069 Change-Id: I87b50b67d7c63a32b3fae067a78780a17b058acb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* winrt: Take device pixel ratio into accountMaurice Kalinowski2016-06-101-2/+3
| | | | | | | | | | When resizing, the device pixel ratio needs to be taken into account. Otherwise the area for Xaml viewer will be misplaced and/or wrongly scaled. Change-Id: Id2dd34c2dd29f5582a9f3536e6394c7e49eddf94 Task-number: QTBUG-53405 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* 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>
* Doc: Copy info about initializing WebView to type overviewLeena Miettinen2016-05-262-1/+5
| | | | | | | | Enable automatic linking to Qt GUI module. Task-number: QTBUG-53560 Change-Id: Id22a4a42c038dcbda939b170f9f7c0ae93d6b18b Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Doc: Remove repository name from examplesinstallpathTopi Reinio2016-05-121-1/+1
| | | | | | | | Examples in binary packages now directly match the install path. Change-Id: Ie631ed16dc0e7b3f30940a0f2c0749a90a51c027 Task-number: QTBUG-52953 Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* Fix geometry updates in the view controller.Christian Strømme2016-04-154-31/+38
| | | | | | | | Move the common, and QtQuick specific code, into the view controller to make the behavior more consistent across all platforms. Change-Id: I89cc383fb92ee6755e8fba9baf48e3e756d04cca Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Android: Don't call setClipBounds on the WebViewChristian Strømme2016-04-151-44/+1
| | | | | | | | | | | | When High DPI mode is enabled, with a scale different then 1, the values we get are not in the same scale as setClipBounds expects. While it is possible to convert the values to native pixel first, it's probably better if we just disable this functionality on Android, that is, until a better cross-platform solution can be found. Task-number: QTBUG-51198 Change-Id: Ia3e3e3911b9ba24d83e49afa6bec61696b93073a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6.0' into 5.6Frederik Gladhorn2016-03-172-2/+3
|\ | | | | | | Change-Id: I7abf6d60ff1738d669f6761b20af380cbf2b4140
| * Bump qml import version.v5.6.0Christian Strømme2016-02-262-2/+3
| | | | | | | | | | Change-Id: Iad7e39cf5a986909bc0e5dcb9a82143b2e9ed260 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | don't over-expose private dependenciesOswald Buddenhagen2016-03-102-6/+7
| | | | | | | | | | Change-Id: I595eac8877100f35289d42f875ffc6e506774b4f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | remove redundant load(qt_build_config)Oswald Buddenhagen2016-03-101-2/+0
| | | | | | | | | | | | | | .qmake.conf already does that. Change-Id: I88dd34c05f6326f733d23a0a66bdea5853d5beb1 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Add a proper backend for WebEngineChristian Strømme2016-03-048-71/+384
| | | | | | | | | | | | | | | | | | | | | | | | | | This removes the need for the awkward type re-registering and renaming that was done in the Qml plugin, to support QtWebEngine. Among other issues, the main motivation for this change is to unify the implementations, and make it possible to run the auto tests that interfaces directly with the QQuickWebView class. Having an actual backend for Qt WebEngine means we can get rid of the, non-functional, default implementation as well. Change-Id: Ia93611ed2755c92207ca86ba3890ac4c2c4d72e9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Make it possible to put a WebView inside a QQuickWidget on iOSChristian Strømme2016-03-031-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | When setting the parent view of the WebvView we need to use the real window, and not the off-screen window provided by QQuickWidget. This change also improves the logic for setting the geometry, as extra care is needed to make sure the view is position correctly inside the scene when using a QQuickWidget. Task-number: QTBUG-48221 Change-Id: I476cac926df6c862cc3602b21e97003cc254726c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | Removing warning about missing override.Christian Strømme2016-03-021-1/+1
| | | | | | | | | | | | | | Caught by -Winconsistent-missing-override Change-Id: I96203ea1bd0c9396bc361e0df4e507d1f12f02f4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Doc: Add note about qrc support.Christian Strømme2016-03-021-0/+4
| | | | | | | | | | | | | | | | | | Loading content through the Qt Resource System is not supported by us or the different backends, so we should document it as a limitation. Task-number: QTBUG-49698 Change-Id: Ibe237987682894957cb34778389fc4ffb3facdb2 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* | winrt: Emit the titleChanged() signal when appropriateAndy Shaw2016-02-181-0/+1
| | | | | | | | | | Change-Id: Iafc4f49a0e7a5aee6aef0622142271000b8f82e8 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* | Fix warning in release modeMaurice Kalinowski2016-02-181-0/+1
|/ | | | | Change-Id: Iab424566018aaeac1f26d3802f79c1d7b83bad06 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Add missing begin/end namepace macrosv5.6.0-rc1Christian Strømme2016-01-202-0/+6
| | | | | Change-Id: Ia656aacc021fc063a1ed87acc02cccba1cc9edf7 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Doc: Bump QML module import version no.Venugopal Shivashankar2015-12-291-2/+2
| | | | | Change-Id: Ia692190470423d8db82fd6c27f4c9ad06223c438 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Android: Explicitly tear-down the Native WebView.v5.6.0-beta1Christian Strømme2015-12-092-1/+16
| | | | | | | | | | | | | | 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-042-0/+23
| | | | | | | | | | | | | | | | 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>
* Doc: Highlight Qt WebView's suitability for mobile platformsTopi Reinio2015-12-011-4/+6
| | | | | Change-Id: Idf832c54278c27f1658913fa1956fcb5fdbe39dc Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Fix compiler warningMaurice Kalinowski2015-11-241-1/+1
| | | | | | | Was wrongly identified as closing comment by MSVC2015. Change-Id: If2b89c9ace7b8a950852765e55a73fd154f945a9 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* winrt: Fix geometry for QWebView.Samuel Nevala2015-11-041-8/+16
| | | | | | | | | Respect statusbar size when setting webviews geometry. Change-Id: Ifae03d2a673930a97ce1726cb50dd19ef6a1f7bb Task-Id: QTBUG-48842 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* Doc: Fix multiple documentation issuesTopi Reinio2015-10-283-26/+51
| | | | | | | | | | | | - Document WebView.loadingChanged() signal - Use QT_VERSION everywhere in .qdocconf - Fix QDoc warnings, linking issues - Mark read-only QML properties as \readonly - Minor language edits Change-Id: Ieb9625d81aaee73a236222b85a496ee5783b644e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Doc: Make documentation for QtWebView::initialize() visible.Topi Reinio2015-10-284-6/+63
| | | | | | | | | | Document the QtWebView module, add the Q_WEBVIEW_EXPORT macro to .qdocconf, edit the help project sections and link to the C++ module documentation from the overview. Change-Id: I3deb34e8067278915610e24a15baf52e365629fb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Doc: Update examplesinstallpath to include the repository nameTopi Reinio2015-10-211-1/+1
| | | | | | | | | | | | The examplesinstallpath variable in .qdocconf files defines the path under QT_INSTALL_EXAMPLES where examples are found. To match the way examples are packaged in Qt 5.6, prefix the install path with the repository name. Task-number: QTBUG-48736 Change-Id: Ifbd5d702aa0c5cdad100bcbc88515e3e5c3c0eed Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* Use Qt WebEngine by default on OS X.Christian Strømme2015-09-244-4/+5
| | | | | | | | | | This change reverts back to using Qt WebEngine as a backend on OS X, as there are still challenges that needs to be solved when using the native WebView implementation, e.g., make it possible to use it without disabling batched rendering. Change-Id: I9cc95233990055d59480ad4d47ebf3da4ebb07f1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Fix registration of QML types.Christian Strømme2015-09-172-5/+5
| | | | | | | | | | Registration of the WebView item should be done with qmlRegisterType and not qmlRegisterRevision, as the later is not intended for classes that are publicly exported and will therefore not be inserted into the .qmltypes file. Change-Id: I9ce3b9551b93243a139527e730466ae4aafd73b0 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Add missing header in qtwebviewfunctions.v5.6.0-alpha1Christian Strømme2015-08-281-0/+4
| | | | | | | | We need to include the header for QByteArray, as it's required when calling qputenv(). Change-Id: I245d769b050525719dc6db202a6724ce887ba4a7 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Don't produce a build error on platforms with no WebView backends.Christian Strømme2015-08-281-2/+6
| | | | | Change-Id: I8fc55d1c4e82e9a635107b8adc40c143f405eb93 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Fixed bugs in license headerJani Heikkinen2015-08-251-9/+9
| | | | | | | | | Two files were using old LGPL license headers and that's why license header tests were failed. Changed those files to use LGPLv3 header template Change-Id: I95bd010087b83c6aa174d53e7c2378bdd9e57c70 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Add support for Windows RuntimeAndrew Knight2015-08-254-1/+778
| | | | | | | | Now that WinRT uses XAML-based windows, it can support creating native WebView controls. Change-Id: I04361956eba9de5b5d41fcc6b57a9772b49f6a2b Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Add initialize functionChristian Strømme2015-08-106-2/+138
| | | | | | | | | | | | | | | | | | The initialization function will set-up any platform specific requirements needed to display the WebView correctly. Initially we tried to avoid this, as it's not a very nice approach, and it was only needed when QtWebEngine back-end was the used (see: QtWebEngine::initialize()). Since we now require special set-up for OS X as well, it has become unreasonable to expect that the user should implement this logic in their application and that it's more convenient if we provide a uniform solution to make the WebView work on all platforms. The implication of this change, is that we now actually expose a C++ API and will therefore need to export the module again (making it a non-internal module). Change-Id: I87678db7cd50b25465bcf623c008f04a4cffd7df Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Mark all private headers as private.Christian Strømme2015-08-039-8/+52
| | | | | | | | Since these classes won't be part of the public API any time soon, it's better that we just make them as private. Change-Id: Id3c1aeb0ad537a1630a04f669a2d4feb09d8b2e1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Replace usage of slots with Q_SLOTS.Christian Strømme2015-08-031-1/+1
| | | | | | | Replaces the last slots keyword in the code with Q_SLOTS. Change-Id: I1da5abc612eb00cbc56c9e483c555460c7021880 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* iOS: Enable zooming of web content.Christian Strømme2015-06-241-1/+1
| | | | | | | | We need to set scalesPageToFit to enable user zooming. Task-number: QTBUG-46211 Change-Id: Ibf114a6571fb7cf57564b8f22e044efc5ff32381 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Fix typo in QQuickViewControllerChristian Strømme2015-06-221-6/+6
| | | | | | | Changed liseners -> listeners Change-Id: I8d06866fe13a48280cda80f1f0b7757dc9a3b0cb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Fix item listenerChristian Strømme2015-06-221-1/+5
| | | | | | | | Remove the listener from the old parents when a new parent is set or when the controller item is destroyed. Change-Id: If4cf2bf1d2a209514f9f37028e5210335f418dc7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@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>
* Add revison to the loading propertyChristian Strømme2015-06-221-1/+1
| | | | | Change-Id: I494097e6cf61ab46abc113422a5c250b529b4a3d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Reset progress to 0 when loading fails.Christian Strømme2015-06-221-0/+3
| | | | | Change-Id: Id046571bd3e115904491465f8693338b40a336ac Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Initialize the progress value to 0 on creation.Christian Strømme2015-06-222-4/+5
| | | | | Change-Id: Iabddc9c1016626807a1860c76f0ebbc3170a7b7a 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>
* Fix crash on destruction of QWebView instances.v5.5.0Christian Strømme2015-06-035-10/+13
| | | | | | | | | | | The QWebView and QWebViewPrivate class are now in the object tree and will therefore be delete once their parent is destroyed. This change removes the QScopedPointers that used to manage the lifetime of the webview instances. Task-number: QTBUG-46286 Change-Id: I2d7f12b317770113e5b35c14b60df7442aa3e68e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>