From 533a60c35e65c1d8ec78efcc888aeb6654a3821c Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 18 Sep 2014 10:34:17 -0700 Subject: [PATCH] make sure OAuthWebViewHandler is ready before the NodeList is --- interface/src/Application.cpp | 9 ++++----- interface/src/ui/OAuthWebViewHandler.cpp | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 44fc8d7cec..a20a6553d4 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -219,6 +219,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : if (portStr) { listenPort = atoi(portStr); } + + // call the OAuthWebviewHandler static getter so that its instance lives in our thread + // make sure it is ready before the NodeList might need it + OAuthWebViewHandler::getInstance(); // start the nodeThread so its event loop is running _nodeThread->start(); @@ -418,11 +422,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : connect(_window, &MainWindow::windowGeometryChanged, _runningScriptsWidget, &RunningScriptsWidget::setBoundary); - // call the OAuthWebviewHandler static getter so that its instance lives in our thread - OAuthWebViewHandler::getInstance(); - // make sure the High Fidelity root CA is in our list of trusted certs - OAuthWebViewHandler::addHighFidelityRootCAToSSLConfig(); - _trayIcon->show(); #ifdef HAVE_RTMIDI diff --git a/interface/src/ui/OAuthWebViewHandler.cpp b/interface/src/ui/OAuthWebViewHandler.cpp index a1dbfe9e0b..4cc5af07a6 100644 --- a/interface/src/ui/OAuthWebViewHandler.cpp +++ b/interface/src/ui/OAuthWebViewHandler.cpp @@ -27,7 +27,7 @@ OAuthWebViewHandler::OAuthWebViewHandler() : _webViewRedisplayTimer(), _lastAuthorizationURL() { - + addHighFidelityRootCAToSSLConfig(); } const char HIGH_FIDELITY_CA[] = "-----BEGIN CERTIFICATE-----\n"