mirror of
https://github.com/overte-org/overte.git
synced 2025-04-18 00:26:33 +02:00
Merge pull request #3450 from birarda/master
handle hifi urls emitted from DataWebDialog in Application
This commit is contained in:
commit
a5ea0479c1
1 changed files with 8 additions and 0 deletions
|
@ -15,6 +15,8 @@
|
|||
#include <LimitedNodeList.h>
|
||||
#include <OAuthNetworkAccessManager.h>
|
||||
|
||||
#include "Application.h"
|
||||
|
||||
#include "DataWebDialog.h"
|
||||
|
||||
DataWebDialog::DataWebDialog() {
|
||||
|
@ -23,6 +25,12 @@ DataWebDialog::DataWebDialog() {
|
|||
|
||||
// use an OAuthNetworkAccessManager instead of regular QNetworkAccessManager so our requests are authed
|
||||
page()->setNetworkAccessManager(OAuthNetworkAccessManager::getInstance());
|
||||
|
||||
// have the page delegate 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) {
|
||||
|
|
Loading…
Reference in a new issue