From 9f8848e8337925c9bfa4076823fdde2b1513e992 Mon Sep 17 00:00:00 2001 From: Zach Pomerantz Date: Fri, 25 Mar 2016 15:07:14 -0700 Subject: [PATCH] Log on first login --- interface/src/main.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/interface/src/main.cpp b/interface/src/main.cpp index 074afa16ea..e67f95e2e3 100644 --- a/interface/src/main.cpp +++ b/interface/src/main.cpp @@ -144,9 +144,19 @@ int main(int argc, const char* argv[]) { Application app(argc, const_cast(argv), startupTime); // If we failed the OpenGLVersion check, log it. - // This needed to wait until the Application ctor for credentials. if (override) { - UserActivityLogger::getInstance().insufficientGLVersion(glVersion); + auto& accountManager = AccountManager::getInstance(); + if (accountManager.isLoggedIn()) { + UserActivityLogger::getInstance().insufficientGLVersion(glVersion); + } else { + QObject::connect(&AccountManager::getInstance(), &AccountManager::loginComplete, [glVersion](){ + static bool loggedInsufficientGL = false; + if (!loggedInsufficientGL) { + UserActivityLogger::getInstance().insufficientGLVersion(glVersion); + loggedInsufficientGL = true; + } + }); + } } // Setup local server