History

Add user agent for WebWindow

Ryan Huffman committed 11 years ago

Commit 7ef19641 parent 93cdb3a1 file · +10 −0Browse files

Showing the changes to interface/src/scripting/WebWindowClass.cpp (1 of 1 file). Show all

Unified · Split

interface/src/scripting/WebWindowClass.cpp+10−0
@@ -34,6 +34,16 @@ void ScriptEventBridge::emitScriptEvent(const QString& data) { · 33 unmodified lines
34}34}
35 35
36 36
37class InterfaceWebPage : public QWebPage {
38public:
39 InterfaceWebPage(QWidget* parent = nullptr) : QWebPage(parent) { }
40protected:
41 virtual QString userAgentForUrl(const QUrl & url) const {
42 return "HighFidelityInterface/1.0";
43 }
44};
45
46
37WebWindowClass::WebWindowClass(const QString& title, const QString& url, int width, int height, bool isToolWindow)47WebWindowClass::WebWindowClass(const QString& title, const QString& url, int width, int height, bool isToolWindow)
38 : QObject(NULL),48 : QObject(NULL),
39 _eventBridge(new ScriptEventBridge(this)),49 _eventBridge(new ScriptEventBridge(this)),