From 7ef1964a526b27ed41d136c5427a4b9160c83b2b Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Fri, 13 Mar 2015 11:52:02 -0700 Subject: [PATCH] Add user agent for WebWindow --- interface/src/scripting/WebWindowClass.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/interface/src/scripting/WebWindowClass.cpp b/interface/src/scripting/WebWindowClass.cpp index 36f0139a6d..6f44497117 100644 --- a/interface/src/scripting/WebWindowClass.cpp +++ b/interface/src/scripting/WebWindowClass.cpp @@ -34,6 +34,16 @@ void ScriptEventBridge::emitScriptEvent(const QString& data) { } +class InterfaceWebPage : public QWebPage { +public: + InterfaceWebPage(QWidget* parent = nullptr) : QWebPage(parent) { } +protected: + virtual QString userAgentForUrl(const QUrl & url) const { + return "HighFidelityInterface/1.0"; + } +}; + + WebWindowClass::WebWindowClass(const QString& title, const QString& url, int width, int height, bool isToolWindow) : QObject(NULL), _eventBridge(new ScriptEventBridge(this)),