History

Merge branch 'master' into 20263

David Rowe committed 11 years ago

Commit 95efe982 parents ebe8007 89967fb109 files · +681 −487Browse files

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

Unified · Split

interface/src/Menu.cpp+8−8
@@ -475,7 +475,7 @@ Menu::Menu() : · 474 unmodified lines
475475 addCheckableActionToQMenuAndActionHash(timingMenu, MenuOption::PipelineWarnings);
476476 addCheckableActionToQMenuAndActionHash(timingMenu, MenuOption::SuppressShortTimings);
477477
478− Audio::SharedPointer audioIO = DependencyManager::get<Audio>();
478+ auto audioIO = DependencyManager::get<Audio>();
479479 QMenu* audioDebugMenu = developerMenu->addMenu("Audio");
480480 addCheckableActionToQMenuAndActionHash(audioDebugMenu, MenuOption::AudioNoiseReduction,
481481 0,
@@ -524,7 +524,7 @@ Menu::Menu() : · 42 unmodified lines
524524 audioSourceGroup->addAction(sine440);
525525 }
526526
527− AudioScope::SharedPointer scope = DependencyManager::get<AudioScope>();
527+ auto scope = DependencyManager::get<AudioScope>();
528528
529529 QMenu* audioScopeMenu = audioDebugMenu->addMenu("Audio Scope");
530530 addCheckableActionToQMenuAndActionHash(audioScopeMenu, MenuOption::AudioScope,
@@ -562,7 +562,7 @@ Menu::Menu() : · 31 unmodified lines
562562 audioScopeFramesGroup->addAction(fiftyFrames);
563563 }
564564
565− AudioIOStatsRenderer::SharedPointer statsRenderer = DependencyManager::get<AudioIOStatsRenderer>();
565+ auto statsRenderer = DependencyManager::get<AudioIOStatsRenderer>();
566566 addCheckableActionToQMenuAndActionHash(audioDebugMenu, MenuOption::AudioStats,
567567 Qt::CTRL | Qt::SHIFT | Qt::Key_A,
568568 false,
@@ -600,7 +600,7 @@ void Menu::loadSettings(QSettings* settings) { · 31 unmodified lines
600600 _receivedAudioStreamSettings._windowSecondsForDesiredReduction = settings->value("windowSecondsForDesiredReduction", DEFAULT_WINDOW_SECONDS_FOR_DESIRED_REDUCTION).toInt();
601601 _receivedAudioStreamSettings._repetitionWithFade = settings->value("repetitionWithFade", DEFAULT_REPETITION_WITH_FADE).toBool();
602602
603− QSharedPointer<Audio> audio = DependencyManager::get<Audio>();
603+ auto audio = DependencyManager::get<Audio>();
604604 audio->setOutputStarveDetectionEnabled(settings->value("audioOutputStarveDetectionEnabled", DEFAULT_AUDIO_OUTPUT_STARVE_DETECTION_ENABLED).toBool());
605605 audio->setOutputStarveDetectionThreshold(settings->value("audioOutputStarveDetectionThreshold", DEFAULT_AUDIO_OUTPUT_STARVE_DETECTION_THRESHOLD).toInt());
606606 audio->setOutputStarveDetectionPeriod(settings->value("audioOutputStarveDetectionPeriod", DEFAULT_AUDIO_OUTPUT_STARVE_DETECTION_PERIOD).toInt());
@@ -634,7 +634,7 @@ void Menu::loadSettings(QSettings* settings) { · 27 unmodified lines
634634 Application::getInstance()->updateWindowTitle();
635635
636636 // notify that a settings has changed
637− connect(&NodeList::getInstance()->getDomainHandler(), &DomainHandler::hostnameChanged, this, &Menu::bumpSettings);
637+ connect(&DependencyManager::get<NodeList>()->getDomainHandler(), &DomainHandler::hostnameChanged, this, &Menu::bumpSettings);
638638
639639 // MyAvatar caches some menu options, so we have to update them whenever we load settings.
640640 // TODO: cache more settings in MyAvatar that are checked with very high frequency.
@@ -665,7 +665,7 @@ void Menu::saveSettings(QSettings* settings) { · 24 unmodified lines
665665 settings->setValue("windowSecondsForDesiredReduction", _receivedAudioStreamSettings._windowSecondsForDesiredReduction);
666666 settings->setValue("repetitionWithFade", _receivedAudioStreamSettings._repetitionWithFade);
667667
668− QSharedPointer<Audio> audio = DependencyManager::get<Audio>();
668+ auto audio = DependencyManager::get<Audio>();
669669 settings->setValue("audioOutputStarveDetectionEnabled", audio->getOutputStarveDetectionEnabled());
670670 settings->setValue("audioOutputStarveDetectionThreshold", audio->getOutputStarveDetectionThreshold());
671671 settings->setValue("audioOutputStarveDetectionPeriod", audio->getOutputStarveDetectionPeriod());
@@ -916,7 +916,7 @@ void Menu::bumpSettings() { · 244 unmodified lines
916916
917917 void sendFakeEnterEvent() {
918918 QPoint lastCursorPosition = QCursor::pos();
919− GLCanvas::SharedPointer glCanvas = DependencyManager::get<GLCanvas>();
919+ auto glCanvas = DependencyManager::get<GLCanvas>();
920920
921921 QPoint windowPosition = glCanvas->mapFromGlobal(lastCursorPosition);
922922 QEnterEvent enterEvent = QEnterEvent(windowPosition, windowPosition, lastCursorPosition);
@@ -1183,7 +1183,7 @@ void Menu::nameLocation() { · 260 unmodified lines
11831183 return;
11841184 }
11851185
1186− DomainHandler& domainHandler = NodeList::getInstance()->getDomainHandler();
1186+ DomainHandler& domainHandler = DependencyManager::get<NodeList>()->getDomainHandler();
11871187 if (domainHandler.getUUID().isNull()) {
11881188 const QString UNREGISTERED_DOMAIN_MESSAGE = "This domain is not registered with High Fidelity."
11891189 "\n\nYou cannot create a global location in an unregistered domain.";