History

Merge branch 'master' of https://github.com/highfidelity/hifi into QmlMarketplace

Roxanne Skelly committed 7 years ago

Commit cfaf01b2 parents c1ff51a 66d5b16192 files · +1252 −2883Browse files

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

Unified · Split

interface/src/Application.cpp+10−5
@@ -920,6 +920,7 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) { · 919 unmodified lines
920 DependencyManager::set<Wallet>();920 DependencyManager::set<Wallet>();
921 DependencyManager::set<WalletScriptingInterface>();921 DependencyManager::set<WalletScriptingInterface>();
922 DependencyManager::set<TTSScriptingInterface>();922 DependencyManager::set<TTSScriptingInterface>();
923 DependencyManager::set<QmlCommerce>();
923 924
924 DependencyManager::set<FadeEffect>();925 DependencyManager::set<FadeEffect>();
925 DependencyManager::set<ResourceRequestObserver>();926 DependencyManager::set<ResourceRequestObserver>();
@@ -1201,6 +1202,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 275 unmodified lines
1201 connect(&domainHandler, SIGNAL(connectedToDomain(QUrl)), SLOT(updateWindowTitle()));1202 connect(&domainHandler, SIGNAL(connectedToDomain(QUrl)), SLOT(updateWindowTitle()));
1202 connect(&domainHandler, SIGNAL(disconnectedFromDomain()), SLOT(updateWindowTitle()));1203 connect(&domainHandler, SIGNAL(disconnectedFromDomain()), SLOT(updateWindowTitle()));
1203 connect(&domainHandler, &DomainHandler::disconnectedFromDomain, this, [this]() {1204 connect(&domainHandler, &DomainHandler::disconnectedFromDomain, this, [this]() {
1205 auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
1206 if (tabletScriptingInterface) {
1207 tabletScriptingInterface->setQmlTabletRoot(SYSTEM_TABLET, nullptr);
1208 }
1204 getOverlays().deleteOverlay(getTabletScreenID());1209 getOverlays().deleteOverlay(getTabletScreenID());
1205 getOverlays().deleteOverlay(getTabletHomeButtonID());1210 getOverlays().deleteOverlay(getTabletHomeButtonID());
1206 getOverlays().deleteOverlay(getTabletFrameID());1211 getOverlays().deleteOverlay(getTabletFrameID());
@@ -2202,7 +2207,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 995 unmodified lines
2202 || ((rightHandPose.valid || lastRightHandPose.valid) && (rightHandPose != lastRightHandPose));2207 || ((rightHandPose.valid || lastRightHandPose.valid) && (rightHandPose != lastRightHandPose));
2203 lastLeftHandPose = leftHandPose;2208 lastLeftHandPose = leftHandPose;
2204 lastRightHandPose = rightHandPose;2209 lastRightHandPose = rightHandPose;
2205 properties["avatar_identity_requests_sent"] = DependencyManager::get<AvatarManager>()->getIdentityRequestsSent();
2206 2210
2207 UserActivityLogger::getInstance().logAction("stats", properties);2211 UserActivityLogger::getInstance().logAction("stats", properties);
2208 });2212 });
@@ -2600,6 +2604,7 @@ void Application::cleanupBeforeQuit() { · 391 unmodified lines
2600 DependencyManager::destroy<ContextOverlayInterface>(); // Must be destroyed before TabletScriptingInterface2604 DependencyManager::destroy<ContextOverlayInterface>(); // Must be destroyed before TabletScriptingInterface
2601 2605
2602 // stop QML2606 // stop QML
2607 DependencyManager::destroy<QmlCommerce>();
2603 DependencyManager::destroy<TabletScriptingInterface>();2608 DependencyManager::destroy<TabletScriptingInterface>();
2604 DependencyManager::destroy<ToolbarScriptingInterface>();2609 DependencyManager::destroy<ToolbarScriptingInterface>();
2605 DependencyManager::destroy<OffscreenUi>();2610 DependencyManager::destroy<OffscreenUi>();
@@ -2888,7 +2893,7 @@ void Application::initializeUi() { · 282 unmodified lines
2888 Tooltip::registerType();2893 Tooltip::registerType();
2889 UpdateDialog::registerType();2894 UpdateDialog::registerType();
2890 QmlContextCallback commerceCallback = [](QQmlContext* context) {2895 QmlContextCallback commerceCallback = [](QQmlContext* context) {
2891 context->setContextProperty("Commerce", new QmlCommerce());2896 context->setContextProperty("Commerce", DependencyManager::get<QmlCommerce>().data());
2892 };2897 };
2893 OffscreenQmlSurface::addWhitelistContextHandler({2898 OffscreenQmlSurface::addWhitelistContextHandler({
2894 QUrl{ "hifi/commerce/checkout/Checkout.qml" },2899 QUrl{ "hifi/commerce/checkout/Checkout.qml" },
@@ -2913,6 +2918,7 @@ void Application::initializeUi() { · 18 unmodified lines
2913 QUrl{ "hifi/dialogs/security/SecurityImageChange.qml" },2918 QUrl{ "hifi/dialogs/security/SecurityImageChange.qml" },
2914 QUrl{ "hifi/dialogs/security/SecurityImageModel.qml" },2919 QUrl{ "hifi/dialogs/security/SecurityImageModel.qml" },
2915 QUrl{ "hifi/dialogs/security/SecurityImageSelection.qml" },2920 QUrl{ "hifi/dialogs/security/SecurityImageSelection.qml" },
2921 QUrl{ "hifi/tablet/TabletMenu.qml" },
2916 }, commerceCallback);2922 }, commerceCallback);
2917 2923
2918 QmlContextCallback marketplaceCallback = [](QQmlContext* context) {2924 QmlContextCallback marketplaceCallback = [](QQmlContext* context) {
@@ -6283,7 +6289,7 @@ void Application::update(float deltaTime) { · 3364 unmodified lines
6283 // TODO: Fix this by modeling the way the secondary camera works on how the main camera works6289 // TODO: Fix this by modeling the way the secondary camera works on how the main camera works
6284 // ie. Use a camera object stored in the game logic and informs the Engine on where the secondary6290 // ie. Use a camera object stored in the game logic and informs the Engine on where the secondary
6285 // camera should be.6291 // camera should be.
6286 // updateSecondaryCameraViewFrustum();6292 updateSecondaryCameraViewFrustum();
6287 }6293 }
6288 6294
6289 quint64 now = usecTimestampNow();6295 quint64 now = usecTimestampNow();
@@ -8024,8 +8030,7 @@ void Application::openUrl(const QUrl& url) const { · 1734 unmodified lines
8024 if (url.scheme() == URL_SCHEME_HIFI) {8030 if (url.scheme() == URL_SCHEME_HIFI) {
8025 DependencyManager::get<AddressManager>()->handleLookupString(url.toString());8031 DependencyManager::get<AddressManager>()->handleLookupString(url.toString());
8026 } else if (url.scheme() == URL_SCHEME_HIFIAPP) {8032 } else if (url.scheme() == URL_SCHEME_HIFIAPP) {
8027 QmlCommerce commerce;8033 DependencyManager::get<QmlCommerce>()->openSystemApp(url.path());
8028 commerce.openSystemApp(url.path());
8029 } else {8034 } else {
8030 // address manager did not handle - ask QDesktopServices to handle8035 // address manager did not handle - ask QDesktopServices to handle
8031 QDesktopServices::openUrl(url);8036 QDesktopServices::openUrl(url);