|
|
@ -38,6 +38,7 @@ |
|
|
|
#include <QMutex> |
|
|
|
#include <QMutex> |
|
|
|
#include <QMutexLocker> |
|
|
|
#include <QMutexLocker> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <QtWidgets/QMessageBox> |
|
|
|
#include <ctime> |
|
|
|
#include <ctime> |
|
|
|
#include <sodium.h> |
|
|
|
#include <sodium.h> |
|
|
|
#include <stdio.h> |
|
|
|
#include <stdio.h> |
|
|
@ -340,8 +341,15 @@ int main(int argc, char* argv[]) |
|
|
|
// Autologin
|
|
|
|
// Autologin
|
|
|
|
// TODO (kriby): Shift responsibility of linking views to model objects from nexus
|
|
|
|
// TODO (kriby): Shift responsibility of linking views to model objects from nexus
|
|
|
|
// Further: generate view instances separately (loginScreen, mainGUI, audio)
|
|
|
|
// Further: generate view instances separately (loginScreen, mainGUI, audio)
|
|
|
|
|
|
|
|
Profile* profile = nullptr; |
|
|
|
if (autoLogin && Profile::exists(profileName) && !Profile::isEncrypted(profileName)) { |
|
|
|
if (autoLogin && Profile::exists(profileName) && !Profile::isEncrypted(profileName)) { |
|
|
|
Profile* profile = Profile::loadProfile(profileName, QString(), settings); |
|
|
|
profile = Profile::loadProfile(profileName, QString(), settings); |
|
|
|
|
|
|
|
if (!profile) { |
|
|
|
|
|
|
|
QMessageBox::information(nullptr, QObject::tr("Error"), |
|
|
|
|
|
|
|
QObject::tr("Failed to load profile automatically.")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (profile) { |
|
|
|
settings.updateProfileData(profile); |
|
|
|
settings.updateProfileData(profile); |
|
|
|
nexus.bootstrapWithProfile(profile); |
|
|
|
nexus.bootstrapWithProfile(profile); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|