Added it in the DM
Showing the changes to interface/src/Application.cpp (1 of 7 files). Show all
Unified · Split
| @@ -180,6 +180,9 @@ bool setupEssentials(int& argc, char** argv) { · 179 unmodified lines | ||
| 180 | 180 | auto lodManager = DependencyManager::set<LODManager>(); |
| 181 | 181 | auto jsConsole = DependencyManager::set<StandAloneJSConsole>(); |
| 182 | 182 | auto dialogsManager = DependencyManager::set<DialogsManager>(); |
| 183 | +#if defined(Q_OS_MAC) || defined(Q_OS_WIN) | |
| 184 | + auto speechRecognizer = DependencyManager::set<SpeechRecognizer>(); | |
| 185 | +#endif | |
| 183 | 186 | |
| 184 | 187 | return true; |
| 185 | 188 | } |
| @@ -3464,7 +3467,7 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEngine* scri · 3278 unmodified lines | ||
| 3464 | 3467 | scriptEngine->registerGlobalObject("Camera", &_myCamera); |
| 3465 | 3468 | |
| 3466 | 3469 | #if defined(Q_OS_MAC) || defined(Q_OS_WIN) |
| 3467 | − scriptEngine->registerGlobalObject("SpeechRecognizer", Menu::getInstance()->getSpeechRecognizer()); | |
| 3470 | + scriptEngine->registerGlobalObject("SpeechRecognizer", DependencyManager::get<SpeechRecognizer>().data()); | |
| 3468 | 3471 | #endif |
| 3469 | 3472 | |
| 3470 | 3473 | ClipboardScriptingInterface* clipboardScriptable = new ClipboardScriptingInterface(); |
| @@ -3787,7 +3790,10 @@ void Application::loadScriptURLDialog() { · 316 unmodified lines | ||
| 3787 | 3790 | } |
| 3788 | 3791 | } |
| 3789 | 3792 | |
| 3790 | − | |
| 3793 | +void Application::setScriptsLocation(const QString& scriptsLocation) { | |
| 3794 | + _scriptsLocation = scriptsLocation; | |
| 3795 | + emit scriptLocationChanged(scriptsLocation); | |
| 3796 | +} | |
| 3791 | 3797 | |
| 3792 | 3798 | void Application::toggleLogDialog() { |
| 3793 | 3799 | if (! _logDialog) { |