diff options
Diffstat (limited to 'src/webengine')
-rw-r--r-- | src/webengine/api/qquickwebenginehistory.cpp | 10 | ||||
-rw-r--r-- | src/webengine/api/qquickwebenginesingleton.cpp | 2 | ||||
-rw-r--r-- | src/webengine/doc/src/qtwebengine-overview.qdoc | 9 | ||||
-rw-r--r-- | src/webengine/ui_delegates_manager.cpp | 5 |
4 files changed, 20 insertions, 6 deletions
diff --git a/src/webengine/api/qquickwebenginehistory.cpp b/src/webengine/api/qquickwebenginehistory.cpp index d790093a4..050833b28 100644 --- a/src/webengine/api/qquickwebenginehistory.cpp +++ b/src/webengine/api/qquickwebenginehistory.cpp @@ -54,7 +54,7 @@ QQuickWebEngineHistoryListModelPrivate::~QQuickWebEngineHistoryListModelPrivate( int QQuickWebEngineHistoryListModelPrivate::count() const { if (!adapter()) - return -1; + return 0; return adapter()->navigationEntryCount(); } @@ -65,6 +65,8 @@ int QQuickWebEngineHistoryListModelPrivate::index(int index) const int QQuickWebEngineHistoryListModelPrivate::offsetForIndex(int index) const { + if (!adapter()) + return index; return index - adapter()->currentNavigationEntryIndex(); } @@ -81,7 +83,7 @@ QQuickWebEngineBackHistoryListModelPrivate::QQuickWebEngineBackHistoryListModelP int QQuickWebEngineBackHistoryListModelPrivate::count() const { if (!adapter()) - return -1; + return 0; return adapter()->currentNavigationEntryIndex(); } @@ -104,12 +106,14 @@ QQuickWebEngineForwardHistoryListModelPrivate::QQuickWebEngineForwardHistoryList int QQuickWebEngineForwardHistoryListModelPrivate::count() const { if (!adapter()) - return -1; + return 0; return adapter()->navigationEntryCount() - adapter()->currentNavigationEntryIndex() - 1; } int QQuickWebEngineForwardHistoryListModelPrivate::index(int i) const { + if (!adapter()) + return i + 1; return adapter()->currentNavigationEntryIndex() + i + 1; } diff --git a/src/webengine/api/qquickwebenginesingleton.cpp b/src/webengine/api/qquickwebenginesingleton.cpp index b7a8c3b69..f0f5969c2 100644 --- a/src/webengine/api/qquickwebenginesingleton.cpp +++ b/src/webengine/api/qquickwebenginesingleton.cpp @@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE \code Component.onCompleted: { - WebEngine.settings.javaScriptEnabled = true; + WebEngine.settings.pluginsEnabled = true; } \endcode */ diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc index ca60fedc2..e0c1110b3 100644 --- a/src/webengine/doc/src/qtwebengine-overview.qdoc +++ b/src/webengine/doc/src/qtwebengine-overview.qdoc @@ -138,6 +138,15 @@ handled by using the WebEngineView::certificateError QML method or by reimplementing the QWebEnginePage::certificateError function. + \section1 Proxy Support + + If QNetworkProxy::applicationProxy is set, it will also be used for Qt WebEngine. Otherwise, + Qt WebEngine automatically picks up the proxy configuration from OS X and Windows. On Linux, + it acknowledges settings from KDE and Gnome. + + If a proxy requires authentication, QWebEnginePage::proxyAuthenticationRequired is emitted. + For Qt Quick, a dialog is shown. + \section1 Using WebEngine Core Qt WebEngine Core provides an API shared by Qt WebEngine and Qt WebEngine Widgets for handling diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp index b9162f9b9..2d75b2383 100644 --- a/src/webengine/ui_delegates_manager.cpp +++ b/src/webengine/ui_delegates_manager.cpp @@ -382,8 +382,9 @@ void UIDelegatesManager::showDialog(QSharedPointer<AuthenticationDialogControlle introMessage = tr("Connect to proxy \"%1\" using:"); introMessage = introMessage.arg(dialogController->host().toHtmlEscaped()); } else { - introMessage = tr("Enter username and password for \"%1\" at %2"); - introMessage = introMessage.arg(dialogController->realm()).arg(dialogController->url().toString().toHtmlEscaped()); + const QUrl url = dialogController->url(); + introMessage = tr("Enter username and password for \"%1\" at %2://%3"); + introMessage = introMessage.arg(dialogController->realm(), url.scheme(), url.host()); } QQmlProperty textProp(authenticationDialog, QStringLiteral("text")); textProp.write(introMessage); |