summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-06-14 01:38:07 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2019-06-14 01:38:07 -0400
commit616925ebbb8e916119f8dbee0c1f0cb97b14a68b (patch)
tree543883f92fced3a3cd92537d5dc6ec5d2a9e5a12 /src/mainwindow.cpp
parenta7757e8ba6f5d10feea9e58611bde4dcb911079b (diff)
moved api user account classes to their own files
api label in status bar: - now shows when not logged in - changed some of the colour thresholds to correspond to real throttling numbers make sure the api key is also cleared from the access manager when clearing from the settings removed unused bool m_ValidateAttempted in NXMAccessManager update the window title and status bar api label with correct values on startup, which fixes incorrect values when "restarting" MO after changing nexus settings
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index c255759b..5018479d 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -225,8 +225,17 @@ MainWindow::MainWindow(QSettings &initSettings
QWebEngineProfile::defaultProfile()->setHttpCacheMaximumSize(52428800);
QWebEngineProfile::defaultProfile()->setCachePath(m_OrganizerCore.settings().getCacheDirectory());
QWebEngineProfile::defaultProfile()->setPersistentStoragePath(m_OrganizerCore.settings().getCacheDirectory());
+
ui->setupUi(this);
- updateWindowTitle({});
+
+ {
+ auto* ni = NexusInterface::instance(&m_PluginContainer);
+
+ updateWindowTitle(ni->getAPIUserAccount());
+
+ m_statusBar.reset(new StatusBar(statusBar(), ui));
+ m_statusBar->setAPI(ni->getAPIStats(), ni->getAPIUserAccount());
+ }
languageChange(m_OrganizerCore.settings().language());
@@ -244,8 +253,6 @@ MainWindow::MainWindow(QSettings &initSettings
connect(ui->logList->model(), SIGNAL(dataChanged(QModelIndex,QModelIndex)),
ui->logList, SLOT(scrollToBottom()));
- m_statusBar.reset(new StatusBar(statusBar(), ui));
-
updateProblemsButton();
setupToolbar();