History

Merge branch 'master' of https://github.com/highfidelity/hifi into ambient-bis

samcake committed 9 years ago

Commit 16e6f092 parents e7fb18b 5893b0b55 files · +1806 −439Browse files

Showing the changes to interface/src/Application.cpp (1 of 55 files). Show all

Unified · Split

interface/src/Application.cpp+10−2
@@ -142,6 +142,7 @@ · 141 unmodified lines
142142 #include "ModelPackager.h"
143143 #include "networking/HFWebEngineProfile.h"
144144 #include "networking/HFTabletWebEngineProfile.h"
145+#include "networking/FileTypeProfile.h"
145146 #include "scripting/TestScriptingInterface.h"
146147 #include "scripting/AccountScriptingInterface.h"
147148 #include "scripting/AssetMappingsScriptingInterface.h"
@@ -218,6 +219,7 @@ static const QString FST_EXTENSION = ".fst"; · 70 unmodified lines
218219 static const QString FBX_EXTENSION = ".fbx";
219220 static const QString OBJ_EXTENSION = ".obj";
220221 static const QString AVA_JSON_EXTENSION = ".ava.json";
222+static const QString WEB_VIEW_TAG = "noDownload=true";
221223
222224 static const float MIRROR_FULLSCREEN_DISTANCE = 0.389f;
223225
@@ -1934,6 +1936,7 @@ void Application::initializeUi() { · 1710 unmodified lines
19341936
19351937 qmlRegisterType<HFWebEngineProfile>("HFWebEngineProfile", 1, 0, "HFWebEngineProfile");
19361938 qmlRegisterType<HFTabletWebEngineProfile>("HFTabletWebEngineProfile", 1, 0, "HFTabletWebEngineProfile");
1939+ qmlRegisterType<FileTypeProfile>("FileTypeProfile", 1, 0, "FileTypeProfile");
19371940
19381941 auto offscreenUi = DependencyManager::get<OffscreenUi>();
19391942 offscreenUi->create(_glWidget->qglContext());
@@ -2010,6 +2013,7 @@ void Application::initializeUi() { · 70 unmodified lines
20102013 rootContext->setContextProperty("SoundCache", DependencyManager::get<SoundCache>().data());
20112014
20122015 rootContext->setContextProperty("Account", AccountScriptingInterface::getInstance());
2016+ rootContext->setContextProperty("Tablet", DependencyManager::get<TabletScriptingInterface>().data());
20132017 rootContext->setContextProperty("DialogsManager", _dialogsManagerScriptingInterface);
20142018 rootContext->setContextProperty("GlobalServices", GlobalServicesScriptingInterface::getInstance());
20152019 rootContext->setContextProperty("FaceTracker", DependencyManager::get<DdeFaceTracker>().data());
@@ -5545,7 +5549,9 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEngine* scri · 3529 unmodified lines
55455549
55465550 bool Application::canAcceptURL(const QString& urlString) const {
55475551 QUrl url(urlString);
5548− if (urlString.startsWith(HIFI_URL_SCHEME)) {
5552+ if (url.query().contains(WEB_VIEW_TAG)) {
5553+ return false;
5554+ } else if (urlString.startsWith(HIFI_URL_SCHEME)) {
55495555 return true;
55505556 }
55515557 QHashIterator<QString, AcceptURLMethod> i(_acceptedExtensions);
@@ -5653,7 +5659,9 @@ bool Application::askToLoadScript(const QString& scriptFilenameOrURL) { · 101 unmodified lines
56535659 QUrl scriptURL { scriptFilenameOrURL };
56545660
56555661 if (scriptURL.host().endsWith(MARKETPLACE_CDN_HOSTNAME)) {
5656− shortName = shortName.mid(shortName.lastIndexOf('/') + 1);
5662+ int startIndex = shortName.lastIndexOf('/') + 1;
5663+ int endIndex = shortName.lastIndexOf('?');
5664+ shortName = shortName.mid(startIndex, endIndex - startIndex);
56575665 }
56585666
56595667 QString message = "Would you like to run this script:\n" + shortName;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t