mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 16:14:35 +02:00
handle hifi urls emitted from DataWebDialog
This commit is contained in:
parent
929e463e40
commit
7e7c4bd580
1 changed files with 8 additions and 0 deletions
|
@ -15,6 +15,8 @@
|
||||||
#include <LimitedNodeList.h>
|
#include <LimitedNodeList.h>
|
||||||
#include <OAuthNetworkAccessManager.h>
|
#include <OAuthNetworkAccessManager.h>
|
||||||
|
|
||||||
|
#include "Application.h"
|
||||||
|
|
||||||
#include "DataWebDialog.h"
|
#include "DataWebDialog.h"
|
||||||
|
|
||||||
DataWebDialog::DataWebDialog() {
|
DataWebDialog::DataWebDialog() {
|
||||||
|
@ -23,6 +25,12 @@ DataWebDialog::DataWebDialog() {
|
||||||
|
|
||||||
// use an OAuthNetworkAccessManager instead of regular QNetworkAccessManager so our requests are authed
|
// use an OAuthNetworkAccessManager instead of regular QNetworkAccessManager so our requests are authed
|
||||||
page()->setNetworkAccessManager(OAuthNetworkAccessManager::getInstance());
|
page()->setNetworkAccessManager(OAuthNetworkAccessManager::getInstance());
|
||||||
|
|
||||||
|
// have the page delete external links so they can be captured by the Application in case they are a hifi link
|
||||||
|
page()->setLinkDelegationPolicy(QWebPage::DelegateExternalLinks);
|
||||||
|
|
||||||
|
// have the Application handle external links
|
||||||
|
connect(this, &QWebView::linkClicked, Application::getInstance(), &Application::openUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
DataWebDialog* DataWebDialog::dialogForPath(const QString& path) {
|
DataWebDialog* DataWebDialog::dialogForPath(const QString& path) {
|
||||||
|
|
Loading…
Reference in a new issue