removed unused code

This commit is contained in:
SamGondelman 2016-07-05 13:26:25 -07:00 committed by Brad Davis
parent 9903e464d8
commit 716647037e
4 changed files with 0 additions and 89 deletions

View file

@ -51,8 +51,6 @@ WebWindowClass::WebWindowClass(const QString& title, const QString& url, int wid
layout->addWidget(_webView);
addEventBridgeToWindowObject();
_windowWidget = dialogWidget;
auto style = QStyleFactory::create("fusion");
@ -68,8 +66,6 @@ WebWindowClass::WebWindowClass(const QString& title, const QString& url, int wid
}
connect(this, &WebWindowClass::destroyed, _windowWidget, &QWidget::deleteLater);
//connect(_webView->page()->mainFrame(), &QWebFrame::javaScriptWindowObjectCleared,
// this, &WebWindowClass::addEventBridgeToWindowObject);
}
WebWindowClass::~WebWindowClass() {
@ -92,10 +88,6 @@ void WebWindowClass::hasClosed() {
emit closed();
}
void WebWindowClass::addEventBridgeToWindowObject() {
// _webView->page()->mainFrame()->addToJavaScriptWindowObject("EventBridge", _eventBridge);
}
void WebWindowClass::setVisible(bool visible) {
if (visible) {
QMetaObject::invokeMethod(_windowWidget, "showNormal", Qt::AutoConnection);

View file

@ -56,7 +56,6 @@ public slots:
void setURL(const QString& url);
void raise();
ScriptEventBridge* getEventBridge() const { return _eventBridge; }
void addEventBridgeToWindowObject();
void setTitle(const QString& title);
signals:

View file

@ -1,54 +0,0 @@
//
// DataWebPage.cpp
// interface/src/ui
//
// Created by Stephen Birarda on 2014-09-22.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <qnetworkrequest.h>
#include "Application.h"
#include <AddressManager.h>
#include <OAuthNetworkAccessManager.h>
#include "DataWebPage.h"
DataWebPage::DataWebPage(QObject* parent) : QWebEnginePage(parent)
{
// use an OAuthNetworkAccessManager instead of regular QNetworkAccessManager so our requests are authed
// setNetworkAccessManager(OAuthNetworkAccessManager::getInstance());
// give the page an empty stylesheet
// settings()->setUserStyleSheetUrl(QUrl());
}
//void DataWebPage::javaScriptConsoleMessage(const QString& message, int lineNumber, const QString& sourceID) {
// qDebug() << "JS console message at line" << lineNumber << "from" << sourceID << "-" << message;
//}
bool DataWebPage::acceptNavigationRequest(const QUrl & url, NavigationType type, bool isMainFrame) {
// Handle hifi:// links and links to files with particular extensions
QString urlString = url.toString();
if (qApp->canAcceptURL(urlString)) {
if (qApp->acceptURL(urlString)) {
return false; // we handled it, so QWebPage doesn't need to handle it
}
}
// Make hyperlinks with target="_blank" open in user's Web browser
if (type == NavigationTypeLinkClicked && !isMainFrame) {
qApp->openUrl(url);
return false; // We handled it.
}
return true;
}
//
//QString DataWebPage::userAgentForUrl(const QUrl& url) const {
// return HIGH_FIDELITY_USER_AGENT;
//}

View file

@ -1,26 +0,0 @@
//
// DataWebPage.h
// interface/src/ui
//
// Created by Stephen Birarda on 2014-09-22.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef hifi_DataWebPage_h
#define hifi_DataWebPage_h
#include <qwebenginepage.h>
class DataWebPage : public QWebEnginePage {
public:
DataWebPage(QObject* parent = 0);
protected:
//virtual void javaScriptConsoleMessage(const QString & message, int lineNumber, const QString & sourceID) override;
virtual bool acceptNavigationRequest(const QUrl & url, NavigationType type, bool isMainFrame) override;
//virtual QString userAgentForUrl(const QUrl& url) const override;
};
#endif // hifi_DataWebPage_h