Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all
Unified · Split
| @@ -170,6 +170,7 @@ · 169 unmodified lines | |||
| 170 | #if defined(Q_OS_MAC) || defined(Q_OS_WIN) | 170 | #if defined(Q_OS_MAC) || defined(Q_OS_WIN) |
| 171 | #include "SpeechRecognizer.h" | 171 | #include "SpeechRecognizer.h" |
| 172 | #endif | 172 | #endif |
| 173 | #include "ui/ResourceImageItem.h" | ||
| 173 | #include "ui/AddressBarDialog.h" | 174 | #include "ui/AddressBarDialog.h" |
| 174 | #include "ui/AvatarInputs.h" | 175 | #include "ui/AvatarInputs.h" |
| 175 | #include "ui/DialogsManager.h" | 176 | #include "ui/DialogsManager.h" |
| @@ -214,7 +215,7 @@ static QTimer pingTimer; · 38 unmodified lines | |||
| 214 | 215 | ||
| 215 | static const int MAX_CONCURRENT_RESOURCE_DOWNLOADS = 16; | 216 | static const int MAX_CONCURRENT_RESOURCE_DOWNLOADS = 16; |
| 216 | 217 | ||
| 217 | // For processing on QThreadPool, we target a number of threads after reserving some | 218 | // For processing on QThreadPool, we target a number of threads after reserving some |
| 218 | // based on how many are being consumed by the application and the display plugin. However, | 219 | // based on how many are being consumed by the application and the display plugin. However, |
| 219 | // we will never drop below the 'min' value | 220 | // we will never drop below the 'min' value |
| 220 | static const int MIN_PROCESSING_THREAD_POOL_SIZE = 1; | 221 | static const int MIN_PROCESSING_THREAD_POOL_SIZE = 1; |
| @@ -1247,7 +1248,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1026 unmodified lines | |||
| 1247 | // Add periodic checks to send user activity data | 1248 | // Add periodic checks to send user activity data |
| 1248 | static int CHECK_NEARBY_AVATARS_INTERVAL_MS = 10000; | 1249 | static int CHECK_NEARBY_AVATARS_INTERVAL_MS = 10000; |
| 1249 | static int NEARBY_AVATAR_RADIUS_METERS = 10; | 1250 | static int NEARBY_AVATAR_RADIUS_METERS = 10; |
| 1250 | 1251 | ||
| 1251 | // setup the stats interval depending on if the 1s faster hearbeat was requested | 1252 | // setup the stats interval depending on if the 1s faster hearbeat was requested |
| 1252 | static const QString FAST_STATS_ARG = "--fast-heartbeat"; | 1253 | static const QString FAST_STATS_ARG = "--fast-heartbeat"; |
| 1253 | static int SEND_STATS_INTERVAL_MS = arguments().indexOf(FAST_STATS_ARG) != -1 ? 1000 : 10000; | 1254 | static int SEND_STATS_INTERVAL_MS = arguments().indexOf(FAST_STATS_ARG) != -1 ? 1000 : 10000; |
| @@ -1397,10 +1398,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 143 unmodified lines | |||
| 1397 | 1398 | ||
| 1398 | _autoSwitchDisplayModeSupportedHMDPlugin = nullptr; | 1399 | _autoSwitchDisplayModeSupportedHMDPlugin = nullptr; |
| 1399 | foreach(DisplayPluginPointer displayPlugin, PluginManager::getInstance()->getDisplayPlugins()) { | 1400 | foreach(DisplayPluginPointer displayPlugin, PluginManager::getInstance()->getDisplayPlugins()) { |
| 1400 | if (displayPlugin->isHmd() && | 1401 | if (displayPlugin->isHmd() && |
| 1401 | displayPlugin->getSupportsAutoSwitch()) { | 1402 | displayPlugin->getSupportsAutoSwitch()) { |
| 1402 | _autoSwitchDisplayModeSupportedHMDPlugin = displayPlugin; | 1403 | _autoSwitchDisplayModeSupportedHMDPlugin = displayPlugin; |
| 1403 | _autoSwitchDisplayModeSupportedHMDPluginName = | 1404 | _autoSwitchDisplayModeSupportedHMDPluginName = |
| 1404 | _autoSwitchDisplayModeSupportedHMDPlugin->getName(); | 1405 | _autoSwitchDisplayModeSupportedHMDPlugin->getName(); |
| 1405 | _previousHMDWornStatus = | 1406 | _previousHMDWornStatus = |
| 1406 | _autoSwitchDisplayModeSupportedHMDPlugin->isDisplayVisible(); | 1407 | _autoSwitchDisplayModeSupportedHMDPlugin->isDisplayVisible(); |
| @@ -1653,7 +1654,7 @@ void Application::aboutToQuit() { · 246 unmodified lines | |||
| 1653 | } | 1654 | } |
| 1654 | 1655 | ||
| 1655 | getActiveDisplayPlugin()->deactivate(); | 1656 | getActiveDisplayPlugin()->deactivate(); |
| 1656 | if (_autoSwitchDisplayModeSupportedHMDPlugin | 1657 | if (_autoSwitchDisplayModeSupportedHMDPlugin |
| 1657 | && _autoSwitchDisplayModeSupportedHMDPlugin->isSessionActive()) { | 1658 | && _autoSwitchDisplayModeSupportedHMDPlugin->isSessionActive()) { |
| 1658 | _autoSwitchDisplayModeSupportedHMDPlugin->endSession(); | 1659 | _autoSwitchDisplayModeSupportedHMDPlugin->endSession(); |
| 1659 | } | 1660 | } |
| @@ -1918,6 +1919,7 @@ void Application::initializeUi() { · 258 unmodified lines | |||
| 1918 | LoginDialog::registerType(); | 1919 | LoginDialog::registerType(); |
| 1919 | Tooltip::registerType(); | 1920 | Tooltip::registerType(); |
| 1920 | UpdateDialog::registerType(); | 1921 | UpdateDialog::registerType(); |
| 1922 | qmlRegisterType<ResourceImageItem>("Hifi", 1, 0, "ResourceImageItem"); | ||
| 1921 | qmlRegisterType<Preference>("Hifi", 1, 0, "Preference"); | 1923 | qmlRegisterType<Preference>("Hifi", 1, 0, "Preference"); |
| 1922 | 1924 | ||
| 1923 | auto offscreenUi = DependencyManager::get<OffscreenUi>(); | 1925 | auto offscreenUi = DependencyManager::get<OffscreenUi>(); |
| @@ -5231,7 +5233,7 @@ void Application::clearDomainOctreeDetails() { · 3307 unmodified lines | |||
| 5231 | skyStage->setBackgroundMode(model::SunSkyStage::SKY_DEFAULT); | 5233 | skyStage->setBackgroundMode(model::SunSkyStage::SKY_DEFAULT); |
| 5232 | 5234 | ||
| 5233 | _recentlyClearedDomain = true; | 5235 | _recentlyClearedDomain = true; |
| 5234 | 5236 | ||
| 5235 | DependencyManager::get<AnimationCache>()->clearUnusedResources(); | 5237 | DependencyManager::get<AnimationCache>()->clearUnusedResources(); |
| 5236 | DependencyManager::get<ModelCache>()->clearUnusedResources(); | 5238 | DependencyManager::get<ModelCache>()->clearUnusedResources(); |
| 5237 | DependencyManager::get<SoundCache>()->clearUnusedResources(); | 5239 | DependencyManager::get<SoundCache>()->clearUnusedResources(); |
| @@ -5793,7 +5795,7 @@ bool Application::displayAvatarAttachmentConfirmationDialog(const QString& name) · 555 unmodified lines | |||
| 5793 | } | 5795 | } |
| 5794 | } | 5796 | } |
| 5795 | 5797 | ||
| 5796 | void Application::toggleRunningScriptsWidget() const { | 5798 | void Application::toggleRunningScriptsWidget() const { |
| 5797 | auto scriptEngines = DependencyManager::get<ScriptEngines>(); | 5799 | auto scriptEngines = DependencyManager::get<ScriptEngines>(); |
| 5798 | bool scriptsRunning = !scriptEngines->getRunningScripts().isEmpty(); | 5800 | bool scriptsRunning = !scriptEngines->getRunningScripts().isEmpty(); |
| 5799 | auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>(); | 5801 | auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>(); |
| @@ -5892,7 +5894,7 @@ void Application::showDialog(const QString& desktopURL, const QString& tabletURL · 92 unmodified lines | |||
| 5892 | if (!hmd->getShouldShowTablet() && !isHMDMode()) { | 5894 | if (!hmd->getShouldShowTablet() && !isHMDMode()) { |
| 5893 | hmd->openTablet(); | 5895 | hmd->openTablet(); |
| 5894 | } | 5896 | } |
| 5895 | 5897 | ||
| 5896 | } | 5898 | } |
| 5897 | } | 5899 | } |
| 5898 | 5900 | ||