Showing the changes to interface/src/Application.cpp (1 of 55 files). Show all
Unified · Split
| @@ -142,6 +142,7 @@ · 141 unmodified lines | |||
| 142 | #include "ModelPackager.h" | 142 | #include "ModelPackager.h" |
| 143 | #include "networking/HFWebEngineProfile.h" | 143 | #include "networking/HFWebEngineProfile.h" |
| 144 | #include "networking/HFTabletWebEngineProfile.h" | 144 | #include "networking/HFTabletWebEngineProfile.h" |
| 145 | #include "networking/FileTypeProfile.h" | ||
| 145 | #include "scripting/TestScriptingInterface.h" | 146 | #include "scripting/TestScriptingInterface.h" |
| 146 | #include "scripting/AccountScriptingInterface.h" | 147 | #include "scripting/AccountScriptingInterface.h" |
| 147 | #include "scripting/AssetMappingsScriptingInterface.h" | 148 | #include "scripting/AssetMappingsScriptingInterface.h" |
| @@ -218,6 +219,7 @@ static const QString FST_EXTENSION = ".fst"; · 70 unmodified lines | |||
| 218 | static const QString FBX_EXTENSION = ".fbx"; | 219 | static const QString FBX_EXTENSION = ".fbx"; |
| 219 | static const QString OBJ_EXTENSION = ".obj"; | 220 | static const QString OBJ_EXTENSION = ".obj"; |
| 220 | static const QString AVA_JSON_EXTENSION = ".ava.json"; | 221 | static const QString AVA_JSON_EXTENSION = ".ava.json"; |
| 222 | static const QString WEB_VIEW_TAG = "noDownload=true"; | ||
| 221 | 223 | ||
| 222 | static const float MIRROR_FULLSCREEN_DISTANCE = 0.389f; | 224 | static const float MIRROR_FULLSCREEN_DISTANCE = 0.389f; |
| 223 | 225 | ||
| @@ -1934,6 +1936,7 @@ void Application::initializeUi() { · 1710 unmodified lines | |||
| 1934 | 1936 | ||
| 1935 | qmlRegisterType<HFWebEngineProfile>("HFWebEngineProfile", 1, 0, "HFWebEngineProfile"); | 1937 | qmlRegisterType<HFWebEngineProfile>("HFWebEngineProfile", 1, 0, "HFWebEngineProfile"); |
| 1936 | qmlRegisterType<HFTabletWebEngineProfile>("HFTabletWebEngineProfile", 1, 0, "HFTabletWebEngineProfile"); | 1938 | qmlRegisterType<HFTabletWebEngineProfile>("HFTabletWebEngineProfile", 1, 0, "HFTabletWebEngineProfile"); |
| 1939 | qmlRegisterType<FileTypeProfile>("FileTypeProfile", 1, 0, "FileTypeProfile"); | ||
| 1937 | 1940 | ||
| 1938 | auto offscreenUi = DependencyManager::get<OffscreenUi>(); | 1941 | auto offscreenUi = DependencyManager::get<OffscreenUi>(); |
| 1939 | offscreenUi->create(_glWidget->qglContext()); | 1942 | offscreenUi->create(_glWidget->qglContext()); |
| @@ -2010,6 +2013,7 @@ void Application::initializeUi() { · 70 unmodified lines | |||
| 2010 | rootContext->setContextProperty("SoundCache", DependencyManager::get<SoundCache>().data()); | 2013 | rootContext->setContextProperty("SoundCache", DependencyManager::get<SoundCache>().data()); |
| 2011 | 2014 | ||
| 2012 | rootContext->setContextProperty("Account", AccountScriptingInterface::getInstance()); | 2015 | rootContext->setContextProperty("Account", AccountScriptingInterface::getInstance()); |
| 2016 | rootContext->setContextProperty("Tablet", DependencyManager::get<TabletScriptingInterface>().data()); | ||
| 2013 | rootContext->setContextProperty("DialogsManager", _dialogsManagerScriptingInterface); | 2017 | rootContext->setContextProperty("DialogsManager", _dialogsManagerScriptingInterface); |
| 2014 | rootContext->setContextProperty("GlobalServices", GlobalServicesScriptingInterface::getInstance()); | 2018 | rootContext->setContextProperty("GlobalServices", GlobalServicesScriptingInterface::getInstance()); |
| 2015 | rootContext->setContextProperty("FaceTracker", DependencyManager::get<DdeFaceTracker>().data()); | 2019 | rootContext->setContextProperty("FaceTracker", DependencyManager::get<DdeFaceTracker>().data()); |
| @@ -5545,7 +5549,9 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEngine* scri · 3529 unmodified lines | |||
| 5545 | 5549 | ||
| 5546 | bool Application::canAcceptURL(const QString& urlString) const { | 5550 | bool Application::canAcceptURL(const QString& urlString) const { |
| 5547 | QUrl url(urlString); | 5551 | 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)) { | ||
| 5549 | return true; | 5555 | return true; |
| 5550 | } | 5556 | } |
| 5551 | QHashIterator<QString, AcceptURLMethod> i(_acceptedExtensions); | 5557 | QHashIterator<QString, AcceptURLMethod> i(_acceptedExtensions); |
| @@ -5653,7 +5659,9 @@ bool Application::askToLoadScript(const QString& scriptFilenameOrURL) { · 101 unmodified lines | |||
| 5653 | QUrl scriptURL { scriptFilenameOrURL }; | 5659 | QUrl scriptURL { scriptFilenameOrURL }; |
| 5654 | 5660 | ||
| 5655 | if (scriptURL.host().endsWith(MARKETPLACE_CDN_HOSTNAME)) { | 5661 | 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); | ||
| 5657 | } | 5665 | } |
| 5658 | 5666 | ||
| 5659 | QString message = "Would you like to run this script:\n" + shortName; | 5667 | QString message = "Would you like to run this script:\n" + shortName; |