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
3434 }
3535
3636
37+class InterfaceWebPage : public QWebPage {
38+public:
39+ InterfaceWebPage(QWidget* parent = nullptr) : QWebPage(parent) { }
40+protected:
41+ virtual QString userAgentForUrl(const QUrl & url) const {
42+ return "HighFidelityInterface/1.0";
43+ }
44+};
45+
46+
3747 WebWindowClass::WebWindowClass(const QString& title, const QString& url, int width, int height, bool isToolWindow)
3848 : QObject(NULL),
3949 _eventBridge(new ScriptEventBridge(this)),