History

Replace Application::getInstance() with qApp

Atlante45 committed 11 years ago

Commit cf3b33a1 parent 2c276bb37 files · +197 −181Browse files

Showing the changes to interface/src/ui/DataWebPage.cpp (1 of 37 files). Show all

Unified · Split

interface/src/ui/DataWebPage.cpp+3−3
@@ -34,15 +34,15 @@ void DataWebPage::javaScriptConsoleMessage(const QString& message, int lineNumbe · 33 unmodified lines
34bool DataWebPage::acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest& request, QWebPage::NavigationType type) {34bool DataWebPage::acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest& request, QWebPage::NavigationType type) {
35 // Handle hifi:// links and links to files with particular extensions35 // Handle hifi:// links and links to files with particular extensions
36 QString urlString = request.url().toString();36 QString urlString = request.url().toString();
37 if (Application::getInstance()->canAcceptURL(urlString)) {37 if (qApp->canAcceptURL(urlString)) {
38 if (Application::getInstance()->acceptURL(urlString)) {38 if (qApp->acceptURL(urlString)) {
39 return false; // we handled it, so QWebPage doesn't need to handle it39 return false; // we handled it, so QWebPage doesn't need to handle it
40 }40 }
41 }41 }
42 42
43 // Make hyperlinks with target="_blank" open in user's Web browser43 // Make hyperlinks with target="_blank" open in user's Web browser
44 if (type == QWebPage::NavigationTypeLinkClicked && frame == nullptr) {44 if (type == QWebPage::NavigationTypeLinkClicked && frame == nullptr) {
45 Application::getInstance()->openUrl(request.url());45 qApp->openUrl(request.url());
46 return false; // We handled it.46 return false; // We handled it.
47 }47 }
48 48