summaryrefslogtreecommitdiffstats
path: root/src/quick
Commit message (Collapse)AuthorAgeFilesLines
* Port Q_ENUMS to Q_ENUMAhmad Samir8 days1-1/+2
| | | | | | | | | | | Q_ENUM does what Q_ENUMS did plus declaring two friend functions, so the behavior should be the same. Q_ENUMS has been deprecated since at least Qt 6. Pick-to: 6.10 6.8 6.5 Change-Id: Ia431a7b70450ec958c55db0a672cb55a3dba2cc8 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Add runJavascript() to C++ APIKaloyan Chehlarski2025-12-012-39/+18
| | | | | | | | | | | | | | | | | The API follows what we have in WebEngine, with an optional std::function callback. No world ID argument is provided, however; most of the backends don't support the concept. The new function is not exposed to QML, since we cannot expose std::function arguments. Instead, the existing QML API is kept, and calls to it simply redirect to the C++ implementation. Also removes runJavaScriptPrivate() from QWebView, and its related implementation details in the plugins. Task-number: QTBUG-131837 Change-Id: Idc1e492916e17caa3f061c0b2738b3c735837cf8 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Clean up and rename qabstractwebview_p.h to qwebview_p.hMichal Klocek2025-12-011-1/+1
| | | | | | | | Prepare for proper private class for QWebView. Task-number: QTBUG-131837 Change-Id: I7303055370ff946cbc7be94ea54a4c57a57021ca Reviewed-by: Moss Heim <moss.heim@qt.io>
* Make QWebViewLoadRequest a public classKaloyan Chehlarski2025-12-014-15/+11
| | | | | | | | | | | Move LoadStatus enum from QWebView class to QWebLoadRequest class. Small adjustments to fix compile issues. Task-number: QTBUG-131837 Change-Id: I79b6a48b0426b177133502f75fb34af9d2120e46 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Rename qwebview_p.h qwebviewloadrequest_p.hMichal Klocek2025-12-015-6/+7
| | | | | | | This class just removes _p suffix and fixes include headers. Change-Id: I4cc819631f9f8f969264da99f0e32b8b56735704 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Make QWebViewSettings a public classKaloyan Chehlarski2025-12-011-0/+1
| | | | | | | | | Move QWebViewSettings out of qwebview_p.h and make it public. Task-number: QTBUG-131837 Change-Id: I233ec3a5a3a2cb2441f05292a4d8c246d26f9eed Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Cleanup QQuickWebView initializationMichal Klocek2025-11-281-1/+2
| | | | | | | | | | | | | | In case of QQuickWebview with web engine backend, we need to pass qt quick parent item. So far it was was done by setting parent for QWebView and then extracting it on web engine plugin backend's initialization. Add initialize() call instead. For time being use just QObject as parameter as it is only used by webengine to pass parent QQuickItem. Change-Id: I8d84313e93e2ad67ec1f008bee532f20b0d0a68e Reviewed-by: Moss Heim <moss.heim@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* WASM: Replace Quick-exclusive geometry hooksKaloyan Chehlarski2025-11-282-60/+1
| | | | | | | | | | | | | | | | | | | | The WASM backend relies on injecting an iframe into the generated webpage, and then using Qt Quick ItemChange events to pass down the correct geometry to the iframe's size. This meant that several non-plugin classes would have ugly Q_OS_WASM ifdefs, and that the WASM backend didn't work properly with C++. This change removes all of the existing geometry change code, and replaces it with a single JavaScript function that gets run when the iframe is created. The JavaScript code installs a ResizeObserver on the clientArea object (which represents the QWebView), and changes the iframe's dimensions as needed. Remove also obsolete now nativeWindowChanged(). Task-number: QTBUG-131837 Change-Id: I484a4b65406fa6b22ce969393d06e3c7b4dc3663 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Use QWebView as parent window in backendsMichal Klocek2025-11-271-3/+2
| | | | | | | | | | | | | | | | | | | | | Each backend besides QtWebEngine, provides native window to be set by setContainedWindow in QQuickWebView. The android backend will have QWebView as parent window, the same as darwin plugin. Wasm and Webview2 do not create native child window. Note the wasm in handled in follow up commit. Note we do note make use of qquickwindow for webengine in this commit, we barely just store the pointer, or create the window if plugin was created without the qquickwindow. Change-Id: Ie98dc0103e353c280ebcb7add3c66f43d3618314 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Make QWebView a QWindowMichal Klocek2025-11-271-5/+7
| | | | | | | | | | | | | We plan QWebView to become public c++ api, make it a QWindow not QAbstractWebView, which is going to base class of private implmentation. The fact that is now QWindow is used in follow up patches. Task-number: QTBUG-131837 Change-Id: I449f4b47462e09d31c716bbbc198a446f0f3b064 Reviewed-by: Moss Heim <moss.heim@qt.io> Reviewed-by: Kaloyan Chehlarski <kaloyan.chehlarski@qt.io>
* Cleanup. Rename getSettings() to settings() in private classesKaloyan Chehlarski2025-10-281-1/+1
| | | | | | Task-number: QTBUG-131837 Change-Id: If86e9f707abcc0ef5916ea4c938fe59f6f270a7c Reviewed-by: Moss Heim <moss.heim@qt.io>
* Remove WinRT plugin sourcesKaloyan Chehlarski2025-10-171-2/+0
| | | | | | | | The plugin has not been maintained or tested in years, and has now been replaced by the WebView2 plugin. Change-Id: I96147164ba99364d679ba3b64bfc51853c1972a6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* CRA mark src/Moss Heim2025-10-097-0/+7
| | | | | | | | | Some winrt plugin functions do data parsing but since this plugin is defunct, it is still marked with default security level. Fixes: QTBUG-135784 Change-Id: I99739cc762b1801fee65df7e08be17443cad157d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Make use of the new Window container classesChristian Strømme2025-03-185-348/+81
| | | | | | | | | | | | | | | | | With the new window container classes we no longer need our own implementation here in QtWebView, the new one is also much more powerful with better integration into the Qt scene(s). Also took the opportunity to get rid of the over complicated interfaces. Note: While wasm isn't officially supported, some support code was left to make sure it functions to a similar degree as before. Once wasm has better support for using the Window container the remaining code can be removed. Change-Id: If4af9a546bc230aa9fa69ba3fb6dfb8fcf1f0be6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Clean up unused url() web interfaceMichal Klocek2024-11-071-1/+1
| | | | | | | | | | | | | All the backends implement url(), however it is never used. The loadingChanged signal delivers url which is used later by qquickwebview. Make it less confusing and remove unused code paths. Note actually loadingChanged should be required interface. Change-Id: If410845a39b09c2ec4e8ffb177d334d807561860 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Doc: Replace \instantiates with \nativetypePaul Wicking2024-08-202-2/+2
| | | | | | | | | | | Since the implementation of the `\nativetype`-command in QDoc, the `\instantiates`-command is deprecated. Replace the use of the deprecated command in favor of its replacement. Pick-to: 6.8 Task-number: QTBUG-128216 Change-Id: If04145b753caff341fab9c2520434be3bec8180b Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* WebViewQuick: Fix QML moduleUlf Hermann2024-02-021-3/+4
| | | | | | | | | | | | The module depends on QtQuick because WebView is derived from QQuickItem. It should also forward its version to the QtWebEngine dependency (for consistency; it makes no functional difference) and it should not force pointless plugin loading. Pick-to: 6.7 6.6 6.5 Fixes: QTBUG-112346 Change-Id: I57656e1fa064fbe0b57ae9ea9e204770ff709a59 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Fix typo in WebViewSettings::javaScriptEnabled propertyAndreas Eliasson2023-11-231-1/+1
| | | | | | | Fixes: QTBUG-119356 Pick-to: 6.6 6.5 Change-Id: I934e15d7ef38cb8b01b07de60d10a345b8772024 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Doc: Add missing documentation for the settings APIChristian Strømme2022-11-241-0/+10
| | | | | | | This was missed when the API was added in be675d3721ff2eba Change-Id: I8c5eeb2233316b6ad850c2f285495c675e18f1d8 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Add settings API for QtWebViewChristian Strømme2022-10-275-1/+190
| | | | | | | | | | | | | 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>
* Fix assert when WebView is used in combination with QQuickWidgetChristian Strømme2022-10-271-0/+3
| | | | | | | | | | | | | | | Using the WebView with QQuickWidget is not really a use-case the WebView is well suited for, due to the native WebView being an overlay, however it should not crash or trigger an assert, so this change tries to avoid some of the caveats when mixing with QQuickWidget. For example, we cannot under any circumstances call winId() before the window the QQuickWidget lives under, is backed by a platform window. The native WebView is therefore not added before the platform window is created. Pick-to: 6.4 6.2 5.15 Fixes: QTBUG-46084 Change-Id: I815d37cdd0328b3a258ef60294b5ea282f41cfc6 Reviewed-by: Christian Strømme <christian.stromme@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 the missing header files to CMake source treeAlexey Edelev2022-08-011-0/+1
| | | | | | Task-number: QTBUG-103196 Change-Id: Ia5a157ae38995081b939a2b49083bf59d526b69a Reviewed-by: Alexandru Croitor <alexandru.croitor@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-107-266/+14
| | | | | | | | | | | 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>
* Make sure all private headers include at least one otherThiago Macieira2022-03-091-1/+1
| | | | | | | | | | See script in qtbase/util/includeprivate for the rules. Since these files are being touched anyway, I also ran the updatecopyright.pl script too. Change-Id: Ib056b47dde3341ef9a52ffff13ef677e471674b6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use up-to date LGPL license headerKai Köhne2022-02-146-66/+84
| | | | | | | | | | | | | 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 libraries that supposed to be in rpath to PUBLIC_LIBRARIESAlexey Edelev2022-01-191-1/+8
| | | | | | | Fixes: QTBUG-99372 Task-number: QTBUG-86533 Change-Id: I24b3d6a02374972536bac6bb6fc6af6167cc8c6d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add support functions to manage cookiesAgnieszka Jaworska2021-12-142-0/+59
| | | | | | | | | 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>
* Disconnect signals form base class of qquickviewcontrollerMichal Klocek2021-12-081-3/+7
| | | | | | | | | Prevent calling signals on derived class on destruction form base class. This is not safe and we guard for that now in qtcore. Pick-to: 6.2 Change-Id: I7147023ac2f5a3542403d3aa549588b22db58da5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add missing "We mean it" disclaimerKai Köhne2021-11-011-0/+11
| | | | | | | | Amends ecc5e01135c Pick-to: 6.2 Change-Id: I0e35c72b26e15b141b4efe7057eadd22a96289a8 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Doc: Fix documentation warnings for Qt WebViewTopi Reinio2021-09-171-1/+1
| | | | | | | | | | | | | * Comment out \instantiates link to a private class as we cannot link to it. * Move \qtcmakepackage to the correct place under \module. * Add missing documentation dependencies. Pick-to: 6.2 6.2.0 Fixes: QTBUG-96294 Change-Id: Ib114b6891e050559914049fd944397d34a70f5fa Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Use new qml cmake apis and new qml registrationMichal Klocek2021-07-198-0/+1128
Move quick sources to sepatrate qml module so new qml registration system can be used. This drops dependency of QWebView module on Quick. Pick-to: 6.2 Change-Id: I10adb5e898ae2ffe4a46f37d759983047ea89483 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>