]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
Shibboleth: Show the inspector if OWNCLOUD_SHIBBOLETH_DEBUG is set
authorOlivier Goffart <ogoffart@woboq.com>
Tue, 17 May 2016 10:28:07 +0000 (12:28 +0200)
committerOlivier Goffart <ogoffart@woboq.com>
Tue, 17 May 2016 10:29:20 +0000 (12:29 +0200)
Help to debug https://github.com/owncloud/enterprise/issues/1265

src/gui/creds/shibboleth/shibbolethwebview.cpp

index 601bddf20d55b992a9f521fae29557ef9e40a8ad..f98a2c3061eb7813fa8bca9b46df813be65ce4ec 100644 (file)
@@ -38,7 +38,12 @@ namespace OCC
 
 class UserAgentWebPage : public QWebPage {
  public:
-    UserAgentWebPage(QObject *parent) : QWebPage(parent) {}
+    UserAgentWebPage(QObject *parent) : QWebPage(parent)
+    {
+        if (!qgetenv("OWNCLOUD_SHIBBOLETH_DEBUG").isEmpty()) {
+            settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
+        }
+    }
     QString userAgentForUrl(const QUrl &url ) const {
         return QWebPage::userAgentForUrl(url) + " " + Utility::userAgentString();
     }