Showing the changes to interface/src/scripting/WebWindowClass.cpp (1 of 3 files). Show all
Unified · Split
| @@ -18,9 +18,10 @@ · 17 unmodified lines | ||
| 18 | 18 | #include <QListWidget> |
| 19 | 19 | |
| 20 | 20 | #include "Application.h" |
| 21 | +#include "ui/DataWebPage.h" | |
| 21 | 22 | #include "MainWindow.h" |
| 22 | −#include "WindowScriptingInterface.h" | |
| 23 | 23 | #include "WebWindowClass.h" |
| 24 | +#include "WindowScriptingInterface.h" | |
| 24 | 25 | |
| 25 | 26 | ScriptEventBridge::ScriptEventBridge(QObject* parent) : QObject(parent) { |
| 26 | 27 | } |
| @@ -33,17 +34,6 @@ void ScriptEventBridge::emitScriptEvent(const QString& data) { · 6 unmodified lines | ||
| 33 | 34 | emit scriptEventReceived(data); |
| 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 | − | |
| 47 | 37 | WebWindowClass::WebWindowClass(const QString& title, const QString& url, int width, int height, bool isToolWindow) |
| 48 | 38 | : QObject(NULL), |
| 49 | 39 | _eventBridge(new ScriptEventBridge(this)), |
| @@ -71,7 +61,7 @@ WebWindowClass::WebWindowClass(const QString& title, const QString& url, int wid · 21 unmodified lines | ||
| 71 | 61 | addEventBridgeToWindowObject(); |
| 72 | 62 | } |
| 73 | 63 | |
| 74 | − _webView->setPage(new InterfaceWebPage()); | |
| 64 | + _webView->setPage(new DataWebPage()); | |
| 75 | 65 | _webView->setUrl(url); |
| 76 | 66 | |
| 77 | 67 | |