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
920920 DependencyManager::set<Wallet>();
921921 DependencyManager::set<WalletScriptingInterface>();
922922 DependencyManager::set<TTSScriptingInterface>();
923+ DependencyManager::set<QmlCommerce>();
923924
924925 DependencyManager::set<FadeEffect>();
925926 DependencyManager::set<ResourceRequestObserver>();
@@ -1201,6 +1202,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 275 unmodified lines
12011202 connect(&domainHandler, SIGNAL(connectedToDomain(QUrl)), SLOT(updateWindowTitle()));
12021203 connect(&domainHandler, SIGNAL(disconnectedFromDomain()), SLOT(updateWindowTitle()));
12031204 connect(&domainHandler, &DomainHandler::disconnectedFromDomain, this, [this]() {
1205+ auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
1206+ if (tabletScriptingInterface) {
1207+ tabletScriptingInterface->setQmlTabletRoot(SYSTEM_TABLET, nullptr);
1208+ }
12041209 getOverlays().deleteOverlay(getTabletScreenID());
12051210 getOverlays().deleteOverlay(getTabletHomeButtonID());
12061211 getOverlays().deleteOverlay(getTabletFrameID());
@@ -2202,7 +2207,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 995 unmodified lines
22022207 || ((rightHandPose.valid || lastRightHandPose.valid) && (rightHandPose != lastRightHandPose));
22032208 lastLeftHandPose = leftHandPose;
22042209 lastRightHandPose = rightHandPose;
2205− properties["avatar_identity_requests_sent"] = DependencyManager::get<AvatarManager>()->getIdentityRequestsSent();
22062210
22072211 UserActivityLogger::getInstance().logAction("stats", properties);
22082212 });
@@ -2600,6 +2604,7 @@ void Application::cleanupBeforeQuit() { · 391 unmodified lines
26002604 DependencyManager::destroy<ContextOverlayInterface>(); // Must be destroyed before TabletScriptingInterface
26012605
26022606 // stop QML
2607+ DependencyManager::destroy<QmlCommerce>();
26032608 DependencyManager::destroy<TabletScriptingInterface>();
26042609 DependencyManager::destroy<ToolbarScriptingInterface>();
26052610 DependencyManager::destroy<OffscreenUi>();
@@ -2888,7 +2893,7 @@ void Application::initializeUi() { · 282 unmodified lines
28882893 Tooltip::registerType();
28892894 UpdateDialog::registerType();
28902895 QmlContextCallback commerceCallback = [](QQmlContext* context) {
2891− context->setContextProperty("Commerce", new QmlCommerce());
2896+ context->setContextProperty("Commerce", DependencyManager::get<QmlCommerce>().data());
28922897 };
28932898 OffscreenQmlSurface::addWhitelistContextHandler({
28942899 QUrl{ "hifi/commerce/checkout/Checkout.qml" },
@@ -2913,6 +2918,7 @@ void Application::initializeUi() { · 18 unmodified lines
29132918 QUrl{ "hifi/dialogs/security/SecurityImageChange.qml" },
29142919 QUrl{ "hifi/dialogs/security/SecurityImageModel.qml" },
29152920 QUrl{ "hifi/dialogs/security/SecurityImageSelection.qml" },
2921+ QUrl{ "hifi/tablet/TabletMenu.qml" },
29162922 }, commerceCallback);
29172923
29182924 QmlContextCallback marketplaceCallback = [](QQmlContext* context) {
@@ -6283,7 +6289,7 @@ void Application::update(float deltaTime) { · 3364 unmodified lines
62836289 // TODO: Fix this by modeling the way the secondary camera works on how the main camera works
62846290 // ie. Use a camera object stored in the game logic and informs the Engine on where the secondary
62856291 // camera should be.
6286− // updateSecondaryCameraViewFrustum();
6292+ updateSecondaryCameraViewFrustum();
62876293 }
62886294
62896295 quint64 now = usecTimestampNow();
@@ -8024,8 +8030,7 @@ void Application::openUrl(const QUrl& url) const { · 1734 unmodified lines
80248030 if (url.scheme() == URL_SCHEME_HIFI) {
80258031 DependencyManager::get<AddressManager>()->handleLookupString(url.toString());
80268032 } else if (url.scheme() == URL_SCHEME_HIFIAPP) {
8027− QmlCommerce commerce;
8028− commerce.openSystemApp(url.path());
8033+ DependencyManager::get<QmlCommerce>()->openSystemApp(url.path());
80298034 } else {
80308035 // address manager did not handle - ask QDesktopServices to handle
80318036 QDesktopServices::openUrl(url);