[Pkg-owncloud-commits] [owncloud-client] 207/218: Shibboleth: Add our base user agent to WebKit
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat Oct 17 14:31:10 UTC 2015
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 983671c8cbe81491d76082b09088d215f4d3309d
Author: Markus Goetz <markus at woboq.com>
Date: Thu Oct 15 15:51:23 2015 +0200
Shibboleth: Add our base user agent to WebKit
For #3913
---
src/gui/creds/shibboleth/shibbolethwebview.cpp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/gui/creds/shibboleth/shibbolethwebview.cpp b/src/gui/creds/shibboleth/shibbolethwebview.cpp
index 41567de..601bddf 100644
--- a/src/gui/creds/shibboleth/shibbolethwebview.cpp
+++ b/src/gui/creds/shibboleth/shibbolethwebview.cpp
@@ -36,6 +36,14 @@ namespace {
namespace OCC
{
+class UserAgentWebPage : public QWebPage {
+ public:
+ UserAgentWebPage(QObject *parent) : QWebPage(parent) {}
+ QString userAgentForUrl(const QUrl &url ) const {
+ return QWebPage::userAgentForUrl(url) + " " + Utility::userAgentString();
+ }
+};
+
ShibbolethWebView::ShibbolethWebView(AccountPtr account, QWidget* parent)
: QWebView(parent)
, _account(account)
@@ -46,7 +54,7 @@ ShibbolethWebView::ShibbolethWebView(AccountPtr account, QWidget* parent)
setWindowFlags(Qt::Dialog);
setAttribute(Qt::WA_DeleteOnClose);
- QWebPage* page = new QWebPage(this);
+ QWebPage* page = new UserAgentWebPage(this);
connect(page, SIGNAL(loadStarted()),
this, SLOT(slotLoadStarted()));
connect(page, SIGNAL(loadFinished(bool)),
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list