From eed0f1503d2b2bf03d1ad823c72f7d279a1b41f6 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Fri, 14 Jun 2019 02:05:06 -0400 Subject: re-added the api label tooltip comments --- src/mainwindow.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 250bc1d7..205ab7cc 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -227,13 +227,30 @@ MainWindow::MainWindow(QSettings &initSettings QWebEngineProfile::defaultProfile()->setPersistentStoragePath(m_OrganizerCore.settings().getCacheDirectory()); ui->setupUi(this); + m_statusBar.reset(new StatusBar(statusBar(), ui)); { auto* ni = NexusInterface::instance(&m_PluginContainer); + // there are two ways to get here: + // 1) the user just started MO, and + // 2) the user has changed some setting that required a restart + // + // "restarting" MO doesn't actually re-execute the binary, it just basically + // executes most of main() again, so a bunch of things are actually not + // reset + // + // one of these things is the api status, which will have fired its events + // long before the execution gets here because stuff is still cached and no + // real request to nexus is actually done + // + // therefore, when the user starts MO normally, the user account and stats + // will be empty (which is fine) and populated later on when the api key + // check has finished + // + // in the rare case where the user restarts MO through the settings, this + // will correctly pick up the previous values updateWindowTitle(ni->getAPIUserAccount()); - - m_statusBar.reset(new StatusBar(statusBar(), ui)); m_statusBar->setAPI(ni->getAPIStats(), ni->getAPIUserAccount()); } -- cgit v1.3.1