Showing the changes to interface/src/scripting/WebWindowClass.cpp (1 of 1 file). Show all
Unified · Split
| @@ -34,6 +34,16 @@ void ScriptEventBridge::emitScriptEvent(const QString& data) { · 33 unmodified lines | |||
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | 36 | ||
| 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 | |||
| 37 | WebWindowClass::WebWindowClass(const QString& title, const QString& url, int width, int height, bool isToolWindow) | 47 | WebWindowClass::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)), |