summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Add runJavascript() to C++ APIKaloyan Chehlarski2025-12-0110-46/+67
| | | | | | | | | | | | | | | | | 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>
* Remove Q_SLOTS from backendsKaloyan Chehlarski2025-12-015-9/+2
| | | | | | | | | | All functions that used to be slots are called directly now, and keeping the Q_SLOTS around is unnecessary (and caused build failures on macOS) Task-number: QTBUG-131837 Change-Id: I75e59769bd0e570faba4226810e2513c6ac9e048 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Windows: Make updateWindowGeometry() call in initialize() syncKaloyan Chehlarski2025-12-011-3/+1
| | | | | | | | | This avoids a race condition in at least one test, where quickly creating and destroying WebView instances would trigger an ERROR_INVALID_STATE for the controller object. Change-Id: I10ca9a9fcee6e523b6c42dea1e184d976214ba85 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Clean up and rename QAbstractWebView and QAbstractWebViewSettingsMichal Klocek2025-12-0115-47/+43
| | | | | | | | These are really just private implementations. Task-number: QTBUG-131837 Change-Id: I0f70456ff78aa85a519e41d5b0e31b7086e8fc93 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Clean up and rename qabstractwebview_p.h to qwebview_p.hMichal Klocek2025-12-015-5/+5
| | | | | | | | 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-34/+39
| | | | | | | | | | | 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-9/+9
| | | | | | | This class just removes _p suffix and fixes include headers. Change-Id: I4cc819631f9f8f969264da99f0e32b8b56735704 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Add QQuickView as a backend view for qtwebengineMichal Klocek2025-12-012-22/+27
| | | | | | | | | | | | | | | | | | | | | | In case we want create to QWebView directly (so no QQuickWebView), webengine backend should create QQuickView (subclass of QQuickWindow) instead on QQuickWindow, which will take care of creating QQmlEngine to display the "WebView" quick item. Use LoadFromModule() call to create WebEngineView. Remove WebViewFactory workaround and run webview tests without QQuickWebView to test new setup. Note QWebEnginePrivate class most likely should be split up into to two classes to make it nicer and avoid branching in logic, so this should be revisited after c++ API merge. Change-Id: Id240efc794528cdbccd92751a370fef722b04703 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Cleanup QQuickWebView initializationMichal Klocek2025-11-286-8/+14
| | | | | | | | | | | | | | 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>
* Darwin: Protect against use after freeMichal Klocek2025-11-281-12/+31
| | | | | | | | | In case 'plugin' get destroyed, make sure late callbacks do not use deleted objects. Done-by: Kaloyan Chehlarski <kaloyan.chehlarski@qt.io> Change-Id: I347d3ba8b0d570491fe252a090150b5e3cac6292 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Emit signals only on public class (pimpl wise)Michal Klocek2025-11-285-77/+86
| | | | | | | | | | | | | | | | | | | | | | So far we emitted signals on qabstractwebview and then reemited it later from qwebview to quickwebview. Make emit directly from qwebview. Note this patch changes the expected progress to 100 for failed load. As this code was removed from QWebView::onLoadingChanged. if (loadRequest.m_status == QWebView::LoadFailedStatus) m_progress = 0; Note on windows plugin the loading progress is just boolean, moreover if it 'not loading' the load progress is 100, which would now give wrong value on first initialization (100), therefore add m_progress as workaround. Task-number: QTBUG-131837 Change-Id: I9cd003be3185ad956d35bbdbcf01a0349421a1d4 Reviewed-by: Moss Heim <moss.heim@qt.io>
* WASM: Replace Quick-exclusive geometry hooksKaloyan Chehlarski2025-11-282-42/+32
| | | | | | | | | | | | | | | | | | | | 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-276-4/+33
| | | | | | | | | | | | | | | | | | | | | 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>
* Pass the pointer to QWebView for private counterpartMichal Klocek2025-11-2715-25/+27
| | | | | | | | | QAbstarctWebView is going to be base class of pimpl for QWebView. Change-Id: I58636bc5017092e1b9360d05109a305d49899043 Reviewed-by: Kaloyan Chehlarski <kaloyan.chehlarski@qt.io> Reviewed-by: Moss Heim <moss.heim@qt.io>
* Android: Ensure loadHtml() adds a history entryKaloyan Chehlarski2025-11-201-1/+2
| | | | | | | | | This is necessary because subsequent calls to url() will otherwise return about:blank, even when the user has provided a baseUrl argument. Change-Id: I092ebd7f1b8a9b6b92eab184f8b5ae8fc9826fe5 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Windows: Do not set native window as visible by defaultKaloyan Chehlarski2025-11-071-1/+0
| | | | | | | | | | In cases where a WebView is created, but its window is not embedded anywhere, having setVisible(true) would cause the window to get shown in the center of the screen with way to close or hide it. Pick-to: 6.10 Change-Id: If82ee8bef07d0204e700d2a2e790625e57bfadde Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Darwin: Return user agent when no custom one is setKaloyan Chehlarski2025-10-301-1/+1
| | | | | | | | The plugin previously returned an empty string when no custom agent was set. Change-Id: Ibf6f6ba87e9535532e609e6a5764f632d5e7974d Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Cleanup. Rename getSettings() to settings() in private classesKaloyan Chehlarski2025-10-2810-10/+10
| | | | | | Task-number: QTBUG-131837 Change-Id: If86e9f707abcc0ef5916ea4c938fe59f6f270a7c Reviewed-by: Moss Heim <moss.heim@qt.io>
* Add url() virtual method to private classesKaloyan Chehlarski2025-10-279-1/+25
| | | | | | Task-number: QTBUG-131837 Change-Id: I28c33c9c688c4218a350524b254ca893a6dfd950 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Cleanup. Remove QWebViewInterface classMichal Klocek2025-10-231-0/+1
| | | | | | | | It is not used anywhere. Task-number: QTBUG-131837 Change-Id: Ic8993e608fc555f69fc8c05a8e9243ea33fa5ce6 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Remove WinRT plugin sourcesKaloyan Chehlarski2025-10-176-744/+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-0917-0/+17
| | | | | | | | | 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>
* Do not initialize webenginequickMichal Klocek2025-09-051-6/+1
| | | | | | | | | | | | | The WGL backend is gone, we use DX11, so no more opengl texture sharing setup. This is band-aid patch, docs will be updated later. (if other webview backends do not need initialize) Fixes: QTBUG-139717 Pick-to: 6.10 Change-Id: Id37bdc1e70c8b793959589bfced42096dbe4c939 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* WebView2: Block creation of new windows not controlled by QtKaloyan Chehlarski2025-09-032-0/+20
| | | | | | | | | | | | | By default, an unhandled NewWindowRequested event will trigger the creation of a window not controlled by us, and which can outive the spawning process. This is inconsistent with other backends, so handle the event and don't pass a window handle so the new window is never created in the first place. Fixes: QTBUG-139641 Pick-to: 6.10 Change-Id: I75ed8ae376be1695f0f75c7286fed7dd3c7b3670 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Minor. Run clang-format on qwebview2webviewMichal Klocek2025-07-241-101/+116
| | | | | | | | | | | File is badly formated, and clang-format sanity complains a lot on commits. Fix it. Make callbacks in separate lines so after formatting it looks better. Pick-to: 6.10 Change-Id: If884af0fbdf4e60155862a6ea00091d5fa63ccec Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add default user data folder for initializationMichal Klocek2025-07-211-1/+2
| | | | | | | | | Set the location which should be writable as user data folder. Fixes: QTBUG-138555 Pick-to: 6.10 Change-Id: Icaef9f732cd2d7c0d5b917dfefdf78347198d65c Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Handle non data base urls schemes in loadHtmlMichal Klocek2025-07-161-6/+9
| | | | | | | | | | | | | | | | | | | | | Skip percent encodig in case of setHtml call with baseUrl with non data scheme. See for reference: https://developer.android.com/reference/android/webkit/WebView# loadDataWithBaseURL(java.lang.String,%20java.lang.String, %20java.lang.String,%20java.lang.String,%20java.lang.String) Add test case to cover the issue, note this skips the webenigne backend as it requires qmlengine to function. This will be cleaned up in follow up patches. Note the base url setting is not supported on "webview2". Fixes: QTBUG-136082 Fixes: QTBUG-134723 Pick-to: 6.10 6.9 6.8 Change-Id: I6891ec9271fcf3ee78048a6b040d39b818087fa4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Make tests based on runtime plugin settingMichal Klocek2025-06-264-4/+16
| | | | | | | | | | | | | Do not rely on compile time flags, as we can run the test with backend selected during runtime. Introduce WebViewFactory to hide the fact that webview tests uses quick apis. This should be all clean up when c++ api are introduced. Pick-to: 6.10 Change-Id: Ib630e828e6277061b84c1fe528c2d497ba4d0b4e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Clean up window initialization for webview2Michal Klocek2025-06-262-31/+22
| | | | | | | | | | | | Avoid creating extra window when initializing webview2. Simplify initialization logic and postpone initialization to take place after construction of plugin instance. Pick-to: 6.10 Change-Id: Ia908e4f31ce27392d4b256ceb1191f9e7f01e5bd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Morteza Jamshidi <morteza.jamshidi@qt.io> Reviewed-by: Kaloyan Chehlarski <kaloyan.chehlarski@qt.io>
* Do not use assert within business logic for webview2 pluginMichal Klocek2025-06-261-42/+59
| | | | | | | | | | | Calling function inside assert statements means those function calls are going away (optimized out) when compiled in release mode, making some functionality broken. Pick-to: 6.10 Change-Id: If2d97c36a771bc89a0dcbbef9755122972a96871 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Morteza Jamshidi <morteza.jamshidi@qt.io>
* Add configure summaryMichal Klocek2025-06-261-6/+13
| | | | | | | | | Make configuration more verbose. Advertise also other backends. Pick-to: 6.10 Change-Id: I6bfac38d1e1f88c7850ced9410477ad0de071055 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Enable plugins by default on windows and linuxMichal Klocek2025-06-261-0/+1
| | | | | | | | | | Without plugins enabled you can not see pdfs in webenigne, which works fine with webview on mac. Enable it also on webenigne backend. Pick-to: 6.10 Change-Id: I2c252a6eb28d6685a1c4f8c60f0e1c9d9f83e108 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix webview2 async api call issuesMorteza Jamshidi2025-06-262-73/+80
| | | | | | | | | | | | | | | | | Qt webview tests expect the api calls to be synchronous, but some of webview2 api calls are async. This changes their behavior to be synchronous. other fixes: fixed stopEnabledAfterLoadStarted test to rely on webview being async. fixed some null pointer issues changed m_initData to class member Pick-to: 6.10 Task-number: QTBUG-75747 Change-Id: I979f1635cf049a90be3c8b134f61f5d6f594d971 Reviewed-by: Christian Strømme <christian.stromme@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Implement WebView2 windows plugin for qt webviewMorteza Jamshidi2025-05-306-1/+795
| | | | | | | | with this plugin qt webview uses webview2 in the backend for windows Task-number: QTBUG-75747 Change-Id: Iab91b95386be6b32c7acfb97f029ed49a6560745 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Make use of the new Window container classesChristian Strømme2025-03-1810-399/+62
| | | | | | | | | | | | | | | | | 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>
* macOS: Flip the switch and make the native back-end the defaultChristian Strømme2024-12-052-2/+11
| | | | | | | | | | | | | | | In practice this have been the case for anyone not installing QtWebEngine and the platform issue that we had, and that required special initialization set-up, hasn't been an issue and that code has been removed from 6.5 and newer (see: 5f15afaaf07586006b1731cadcb061fa23c71aef). With this change we'll use the native back-end by default on macOS. [ChangeLog][macOS] macOS will now use the native WebView backend by default, meaning QtWebEngine is no longer required on macOS. Change-Id: Iebcefddf93432c5184d495d286bdead679e423de Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Clean up unused url() web interfaceMichal Klocek2024-11-079-35/+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>
* Fix WebView.loadData* encoding on androidMichal Klocek2024-11-071-7/+6
| | | | | | | | | | | | | | | | | As referenced in android docs: https://developer.android.com/reference/android/webkit/WebView loaded HTML data has to be base64 encoded or use url encoding. To keep things aligned with webengine backend use percent encoding, however "base64" would also give correct result (unfortunately webengine assumes percent encoding). Fixes: QTBUG-129303 Pick-to: 6.8 Change-Id: Ided7ef12324d5b4854240700e5de7183069ad34a Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Fix all tests on android instead of blacklisting themMichal Klocek2024-11-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Fix handling of loadingChanged as this should come from WebViewClient observer. This fixes flaky tests, as they assumed 2 signals coming, but in reality 3 were emitted. In case 3rd did not come in time test would pass. Adjust the title test to match how it works on android. Fix load result logic, as error assumes no load success signal emitted and has to be one of * LoadStartedStatus, * LoadStoppedStatus, * LoadSucceededStatus, * LoadFailedStatus Fixes: QTBUG-102712 Fixes: QTBUG-108752 Pick-to: 6.8 Change-Id: Ie3c729fa854ad1e6270a8276c1f2428af6c2614e Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Fix namespace build on androidMichal Klocek2024-11-072-3/+3
| | | | | | | | | | | | | Deals with: * src/plugins/android/qandroidwebview_p.h:26:1: error: no template named 'JObject'; did you mean 'TestQTNamespace::QtJniTypes::JObject'? * src/plugins/android/qandroidwebview.cpp:313:1: error: reference to 'QtJniMethods' is ambiguous Pick-to: 6.8 Change-Id: I6c90b4c93ffac240708b3bdc6e4b22a3a3b41cfa Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Add support for NSArray and NSDictionary in Darwin WebView's fromJSValueTor Arne Vestbø2024-08-161-1/+25
| | | | | | | | | | | | | To not have to write NSArray and NSDictionary conversion from scratch we round-trip via JSON. One quirk of this approach is that NSDate is supported as a standalone result object, but not nested in an array or dictionary, as NSJSONSerialization doesn't support that. But at least this brings us some of the way for array and dictionary support. Fixes: QTBUG-70166 Pick-to: 6.8 6.7 6.5 Change-Id: Ied8a261e964c5adbadb503efb0bb7812ef911b83 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* windows: Fix freeze when loading Qt Web Engine pluginEskil Abrahamsen Blomfeldt2024-03-041-0/+2
| | | | | | | | | | | | | | | | | | The mechanism which initializes Qt Web Engine via the plugin loader does not work on some graphics drivers on Windows, which do not support initializing graphics in DllMain(). Since Qt Web Engine is always the backend on Windows, this patch makes Qt Web View depend on it directly and calls initialize from QtWebView::initialize() instead on that platform. [ChangeLog][Windows] Fixed a freeze on startup on Windows. As part of the solution for this, the Qt Web View library now depends directly on Qt Web Engine on Windows, instead of indirectly via the plugin library. Fixes: QTBUG-117882 Change-Id: Ia1b3e54145477f645bbb97856bdbbb68b58d2785 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Android: use convience wrapper to register nativesVolker Hilsheimer2023-11-161-6/+1
| | | | | Change-Id: Iacea0f1b0376e04a6d43f453f7103e0ee624b43c Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: modernize implementationVolker Hilsheimer2023-11-132-160/+124
| | | | | | | | | | | | | | | | | Declare used types, use modern variadic template APIs, and native method declarations to get rid of all hand-crafted signature strings. In the native methods, cast the id (that was previously created via reinterpret_cast from 'this', pointing to the private) back to the private pointer directly, and only maintain a set of privates to make sure that the id we get is still representing an alive private. Remove some dead (commented) code, and simplify JNI_OnLoad. Change-Id: Ie8711e5f072edde5781b33941aee4e37b8213ea2 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: make functions static if they don't need the objectVolker Hilsheimer2023-11-132-10/+12
| | | | | | | | | | | | | | | 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>
* CMake: Fix multi-arch iOS builds due to absolute framework pathsAlexandru Croitor2023-11-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | find_library(FWWebKit WebKit) stores the absolute path to the framework of one of the sysroots, into FWWebKit. When building with CMake 3.27 targeting multi-arch iOS, this results in the following flag being passed to the compiler, regardless of the architecture/sysroot: -F/Applications/Xcode14.app/Contents/Developer/Platforms/ iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk/ System/Library/Frameworks This causes warnings when building qdarwinwebview.mm regarding unsupported webkit features during the x86_64 simulator build. When combined with -Werror, it fails the build. Use qt_internal_find_apple_system_framework() instead of find_library(), to ensure we pass '-framework WebKit' instead of the absolute path to the framework. This avoids warnings and is cross-sysroot compatible. As a drive-by, also fix the lookup of the Foundation framework. It's called Foundation, not FoundationKit. Pick-to: 6.2 6.5 6.6 Task-number: QTBUG-118138 Change-Id: I4379f14d65a37470f08ae8e7f46e00b886eadaf1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Android: don't rely on implicit cast of declared QtJniTypes to jobjectVolker Hilsheimer2023-10-271-1/+1
| | | | | | | | | The operator jobject() should be removed from declared QtJniTypes in qtbase, as it's dangerous. Prepare for that by calling object(), which returns the wrapped jobject as well. Change-Id: I73c52a94f604568f0ba13a4fa32a0856c6cfd1fd Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Include what you need: <QPointer>Marc Mutz2023-10-132-0/+4
| | | | | | | | | | | | | | | | | | | | | | | All these TUs relied on transitive includes of qpointer.h, maybe to a large extent via qevent.h, though, given that qevent.h is more or less the only public QtBase header that includes qpointer.h, something else seems to be at play here. Said qevent.h actually needs QPointer in-name-only, so a forward declaration would suffice. Prepare for qevent.h dropping the include. The algorithm I used was: If the TU mentions 'passiveGrabbers', the name of the QEvent function that returns QPointers, and the TU doesn't have qpointer.h included explicitly, include it. That may produce False Positives, but better safe than sorry. Otherwise, in src/, add an include to all source and header files which mention QPointer. Exception: if foo.h of a foo.cpp already includes it, don't include again. Task-number: QTBUG-117670 Change-Id: I4f4f738e6dc46aec3e5772036cf2c94e6141c535 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* JNI: Explicilty convert QtJniType instances to jobject for variadic argumentsVolker Hilsheimer2023-09-211-1/+1
| | | | | | | | | | | | | | | | | When calling the (old and outdated) variadic argument overloads of callMethod (as opposed to the variadic template overloads), then we cannot pass complex types. That types declared via the Q_DECLARE_JNI_CLASS macro are trivial was an implementation detail that we shouldn't rely on as long as those types are not part of the public API. Cast explicitly to jobject so that we can make those types proper QJniObjects. Updating this code to use the new variadic template overloads is for a follow-up commit. Change-Id: I8bb2706f2cbe198f7fc4091a1f881c1198de4491 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Fix cookie comparison when removing cookiesChristian Strømme2023-06-141-1/+1
| | | | | | | | | Use isEqualToString to actually check the content of the NS strings. Task-number: QTBUG-114495 Pick-to: 6.6 6.5 6.5.2 Change-Id: Iadffee7e9b47286f347731639f094ae5cb748926 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>