summaryrefslogtreecommitdiffstats
path: root/src/plugins/android/qandroidwebview.cpp
diff options
context:
space:
mode:
authorChristian Strømme <[email protected]>2024-08-19 17:09:15 +0200
committerChristian Strømme <[email protected]>2025-03-18 16:24:29 +0100
commitc2852572317eb91ce4f6404e07f439d864659f6c (patch)
tree73bb82a80bee0526dcf45efe053c2c134503013d /src/plugins/android/qandroidwebview.cpp
parentceedf6b9acec5ab4334c9bb858468117503c2380 (diff)
Make use of the new Window container classes
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 <[email protected]>
Diffstat (limited to 'src/plugins/android/qandroidwebview.cpp')
-rw-r--r--src/plugins/android/qandroidwebview.cpp37
1 files changed, 2 insertions, 35 deletions
diff --git a/src/plugins/android/qandroidwebview.cpp b/src/plugins/android/qandroidwebview.cpp
index 50f2d36..6c5e385 100644
--- a/src/plugins/android/qandroidwebview.cpp
+++ b/src/plugins/android/qandroidwebview.cpp
@@ -37,7 +37,7 @@ bool QAndroidWebViewSettingsPrivate::localStorageEnabled() const
return m_viewController.callMethod<jboolean>("isLocalStorageEnabled");
}
-bool QAndroidWebViewSettingsPrivate::javascriptEnabled() const
+bool QAndroidWebViewSettingsPrivate::javaScriptEnabled() const
{
return m_viewController.callMethod<jboolean>("isJavaScriptEnabled");
}
@@ -57,7 +57,7 @@ void QAndroidWebViewSettingsPrivate::setLocalContentCanAccessFileUrls(bool enabl
m_viewController.callMethod<void>("setAllowFileAccessFromFileURLs", enabled);
}
-void QAndroidWebViewSettingsPrivate::setJavascriptEnabled(bool enabled)
+void QAndroidWebViewSettingsPrivate::setJavaScriptEnabled(bool enabled)
{
m_viewController.callMethod<void>("setJavaScriptEnabled", enabled);
}
@@ -170,19 +170,6 @@ QString QAndroidWebViewPrivate::title() const
return m_viewController.callMethod<QString>("getTitle");
}
-void QAndroidWebViewPrivate::setGeometry(const QRect &geometry)
-{
- if (m_window == 0)
- return;
-
- m_window->setGeometry(geometry);
-}
-
-void QAndroidWebViewPrivate::setVisibility(QWindow::Visibility visibility)
-{
- m_window->setVisibility(visibility);
-}
-
void QAndroidWebViewPrivate::runJavaScriptPrivate(const QString &script,
int callbackId)
{
@@ -226,11 +213,6 @@ void QAndroidWebViewPrivate::deleteAllCookies()
});
}
-void QAndroidWebViewPrivate::setVisible(bool visible)
-{
- m_window->setVisible(visible);
-}
-
int QAndroidWebViewPrivate::loadProgress() const
{
return m_viewController.callMethod<int>("getProgress");
@@ -241,26 +223,11 @@ bool QAndroidWebViewPrivate::isLoading() const
return m_viewController.callMethod<bool>("isLoading");
}
-void QAndroidWebViewPrivate::setParentView(QObject *view)
-{
- m_window->setParent(qobject_cast<QWindow *>(view));
-}
-
-QObject *QAndroidWebViewPrivate::parentView() const
-{
- return m_window->parent();
-}
-
void QAndroidWebViewPrivate::stop()
{
m_viewController.callMethod<void>("stopLoading");
}
-//void QAndroidWebViewPrivate::initialize()
-//{
-// // TODO:
-//}
-
void QAndroidWebViewPrivate::onApplicationStateChanged(Qt::ApplicationState state)
{
if (QtAndroidPrivate::androidSdkVersion() < 11)