Showing the changes to interface/src/Application.cpp (1 of 205 files). Show all
Unified · Split
| @@ -270,7 +270,7 @@ class RenderEventHandler : public QObject { · 269 unmodified lines | ||
| 270 | 270 | public: |
| 271 | 271 | RenderEventHandler() { |
| 272 | 272 | // Transfer to a new thread |
| 273 | − moveToNewNamedThread(this, "RenderThread", [this](QThread* renderThread) { | |
| 273 | + moveToNewNamedThread(this, "RenderThread", [](QThread* renderThread) { | |
| 274 | 274 | hifi::qt::addBlockingForbiddenThread("Render", renderThread); |
| 275 | 275 | qApp->_lastTimeRendered.start(); |
| 276 | 276 | }, std::bind(&RenderEventHandler::initialize, this), QThread::HighestPriority); |
| @@ -964,7 +964,7 @@ Q_GUI_EXPORT void qt_gl_set_global_share_context(QOpenGLContext *context); · 687 unmodified lines | ||
| 964 | 964 | |
| 965 | 965 | Setting::Handle<int> sessionRunTime{ "sessionRunTime", 0 }; |
| 966 | 966 | |
| 967 | −const float DEFAULT_HMD_TABLET_SCALE_PERCENT = 70.0f; | |
| 967 | +const float DEFAULT_HMD_TABLET_SCALE_PERCENT = 60.0f; | |
| 968 | 968 | const float DEFAULT_DESKTOP_TABLET_SCALE_PERCENT = 75.0f; |
| 969 | 969 | const bool DEFAULT_DESKTOP_TABLET_BECOMES_TOOLBAR = true; |
| 970 | 970 | const bool DEFAULT_HMD_TABLET_BECOMES_TOOLBAR = false; |
| @@ -997,7 +997,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 26 unmodified lines | ||
| 997 | 997 | _enableProcessOctreeThread(true), |
| 998 | 998 | _lastNackTime(usecTimestampNow()), |
| 999 | 999 | _lastSendDownstreamAudioStats(usecTimestampNow()), |
| 1000 | − _aboutToQuit(false), | |
| 1001 | 1000 | _notifiedPacketVersionMismatchThisDomain(false), |
| 1002 | 1001 | _maxOctreePPS(maxOctreePacketsPerSecond.get()), |
| 1003 | 1002 | _lastFaceTrackerUpdate(0), |
| @@ -1237,7 +1236,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 233 unmodified lines | ||
| 1237 | 1236 | auto dialogsManager = DependencyManager::get<DialogsManager>(); |
| 1238 | 1237 | #if defined(Q_OS_ANDROID) |
| 1239 | 1238 | connect(accountManager.data(), &AccountManager::authRequired, this, []() { |
| 1240 | − AndroidHelper::instance().showLoginDialog(); | |
| 1239 | + auto addressManager = DependencyManager::get<AddressManager>(); | |
| 1240 | + AndroidHelper::instance().showLoginDialog(addressManager->currentAddress()); | |
| 1241 | 1241 | }); |
| 1242 | 1242 | #else |
| 1243 | 1243 | connect(accountManager.data(), &AccountManager::authRequired, dialogsManager.data(), &DialogsManager::showLoginDialog); |
| @@ -1692,21 +1692,21 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 448 unmodified lines | ||
| 1692 | 1692 | return DependencyManager::get<OffscreenUi>()->navigationFocused() ? 1 : 0; |
| 1693 | 1693 | }); |
| 1694 | 1694 | _applicationStateDevice->setInputVariant(STATE_PLATFORM_WINDOWS, []() -> float { |
| 1695 | −#if defined(Q_OS_WIN) | |
| 1695 | +#if defined(Q_OS_WIN) | |
| 1696 | 1696 | return 1; |
| 1697 | 1697 | #else |
| 1698 | 1698 | return 0; |
| 1699 | 1699 | #endif |
| 1700 | 1700 | }); |
| 1701 | 1701 | _applicationStateDevice->setInputVariant(STATE_PLATFORM_MAC, []() -> float { |
| 1702 | −#if defined(Q_OS_MAC) | |
| 1702 | +#if defined(Q_OS_MAC) | |
| 1703 | 1703 | return 1; |
| 1704 | 1704 | #else |
| 1705 | 1705 | return 0; |
| 1706 | 1706 | #endif |
| 1707 | 1707 | }); |
| 1708 | 1708 | _applicationStateDevice->setInputVariant(STATE_PLATFORM_ANDROID, []() -> float { |
| 1709 | −#if defined(Q_OS_ANDROID) | |
| 1709 | +#if defined(Q_OS_ANDROID) | |
| 1710 | 1710 | return 1; |
| 1711 | 1711 | #else |
| 1712 | 1712 | return 0; |
| @@ -1756,7 +1756,13 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 43 unmodified lines | ||
| 1756 | 1756 | // we can unlock the desktop repositioning code, since all the positions will be |
| 1757 | 1757 | // relative to the desktop size for this plugin |
| 1758 | 1758 | auto offscreenUi = DependencyManager::get<OffscreenUi>(); |
| 1759 | − offscreenUi->getDesktop()->setProperty("repositionLocked", false); | |
| 1759 | + connect(offscreenUi.data(), &OffscreenUi::desktopReady, []() { | |
| 1760 | + auto offscreenUi = DependencyManager::get<OffscreenUi>(); | |
| 1761 | + auto desktop = offscreenUi->getDesktop(); | |
| 1762 | + if (desktop) { | |
| 1763 | + desktop->setProperty("repositionLocked", false); | |
| 1764 | + } | |
| 1765 | + }); | |
| 1760 | 1766 | |
| 1761 | 1767 | // Make sure we don't time out during slow operations at startup |
| 1762 | 1768 | updateHeartbeat(); |
| @@ -2315,7 +2321,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 552 unmodified lines | ||
| 2315 | 2321 | QTimer* checkLoginTimer = new QTimer(this); |
| 2316 | 2322 | checkLoginTimer->setInterval(CHECK_LOGIN_TIMER); |
| 2317 | 2323 | checkLoginTimer->setSingleShot(true); |
| 2318 | − connect(checkLoginTimer, &QTimer::timeout, this, [this]() { | |
| 2324 | + connect(checkLoginTimer, &QTimer::timeout, this, []() { | |
| 2319 | 2325 | auto accountManager = DependencyManager::get<AccountManager>(); |
| 2320 | 2326 | auto dialogsManager = DependencyManager::get<DialogsManager>(); |
| 2321 | 2327 | if (!accountManager->isLoggedIn()) { |
| @@ -2889,9 +2895,10 @@ void Application::initializeUi() { · 567 unmodified lines | ||
| 2889 | 2895 | QUrl{ "hifi/commerce/common/CommerceLightbox.qml" }, |
| 2890 | 2896 | QUrl{ "hifi/commerce/common/EmulatedMarketplaceHeader.qml" }, |
| 2891 | 2897 | QUrl{ "hifi/commerce/common/FirstUseTutorial.qml" }, |
| 2892 | − QUrl{ "hifi/commerce/common/SortableListModel.qml" }, | |
| 2893 | 2898 | QUrl{ "hifi/commerce/common/sendAsset/SendAsset.qml" }, |
| 2899 | + QUrl{ "hifi/commerce/common/SortableListModel.qml" }, | |
| 2894 | 2900 | QUrl{ "hifi/commerce/inspectionCertificate/InspectionCertificate.qml" }, |
| 2901 | + QUrl{ "hifi/commerce/marketplaceItemTester/MarketplaceItemTester.qml"}, | |
| 2895 | 2902 | QUrl{ "hifi/commerce/purchases/PurchasedItem.qml" }, |
| 2896 | 2903 | QUrl{ "hifi/commerce/purchases/Purchases.qml" }, |
| 2897 | 2904 | QUrl{ "hifi/commerce/wallet/Help.qml" }, |
| @@ -3435,7 +3442,12 @@ void Application::handleSandboxStatus(QNetworkReply* reply) { · 537 unmodified lines | ||
| 3435 | 3442 | int urlIndex = arguments().indexOf(HIFI_URL_COMMAND_LINE_KEY); |
| 3436 | 3443 | QString addressLookupString; |
| 3437 | 3444 | if (urlIndex != -1) { |
| 3438 | − addressLookupString = arguments().value(urlIndex + 1); | |
| 3445 | + QUrl url(arguments().value(urlIndex + 1)); | |
| 3446 | + if (url.scheme() == URL_SCHEME_HIFIAPP) { | |
| 3447 | + Setting::Handle<QVariant>("startUpApp").set(url.path()); | |
| 3448 | + } else { | |
| 3449 | + addressLookupString = url.toString(); | |
| 3450 | + } | |
| 3439 | 3451 | } |
| 3440 | 3452 | |
| 3441 | 3453 | static const QString SENT_TO_PREVIOUS_LOCATION = "previous_location"; |
| @@ -4673,8 +4685,14 @@ void Application::idle() { · 1231 unmodified lines | ||
| 4673 | 4685 | |
| 4674 | 4686 | checkChangeCursor(); |
| 4675 | 4687 | |
| 4676 | − Stats::getInstance()->updateStats(); | |
| 4677 | − AnimStats::getInstance()->updateStats(); | |
| 4688 | + auto stats = Stats::getInstance(); | |
| 4689 | + if (stats) { | |
| 4690 | + stats->updateStats(); | |
| 4691 | + } | |
| 4692 | + auto animStats = AnimStats::getInstance(); | |
| 4693 | + if (animStats) { | |
| 4694 | + animStats->updateStats(); | |
| 4695 | + } | |
| 4678 | 4696 | |
| 4679 | 4697 | // Normally we check PipelineWarnings, but since idle will often take more than 10ms we only show these idle timing |
| 4680 | 4698 | // details if we're in ExtraDebugging mode. However, the ::update() and its subcomponents will show their timing |
| @@ -7683,6 +7701,9 @@ void Application::openUrl(const QUrl& url) const { · 3002 unmodified lines | ||
| 7683 | 7701 | if (!url.isEmpty()) { |
| 7684 | 7702 | if (url.scheme() == URL_SCHEME_HIFI) { |
| 7685 | 7703 | DependencyManager::get<AddressManager>()->handleLookupString(url.toString()); |
| 7704 | + } else if (url.scheme() == URL_SCHEME_HIFIAPP) { | |
| 7705 | + QmlCommerce commerce; | |
| 7706 | + commerce.openSystemApp(url.path()); | |
| 7686 | 7707 | } else { |
| 7687 | 7708 | // address manager did not handle - ask QDesktopServices to handle |
| 7688 | 7709 | QDesktopServices::openUrl(url); |