Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
feat(login): generate a GUI error when auto login fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Kribylet authored and anthonybilinski committed Aug 27, 2019
1 parent e55e50d commit 7437743
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <QMutex>
#include <QMutexLocker>

#include <QtWidgets/QMessageBox>
#include <ctime>
#include <sodium.h>
#include <stdio.h>
Expand Down Expand Up @@ -343,6 +344,10 @@ int main(int argc, char* argv[])
Profile* profile = nullptr;
if (autoLogin && Profile::exists(profileName) && !Profile::isEncrypted(profileName)) {
profile = Profile::loadProfile(profileName);
if (!profile) {
QMessageBox::information(nullptr, QObject::tr("Error"),
QObject::tr("Failed to load profile automatically."));
}
}
if (profile) {
settings.updateProfileData(profile);
Expand Down

0 comments on commit 7437743

Please sign in to comment.