1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

feat(login): generate a GUI error when auto login fails

This commit is contained in:
jenli669 2019-08-12 23:07:34 +02:00 committed by Anthony Bilinski
parent e55e50d510
commit 74377430ce
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -38,6 +38,7 @@
#include <QMutex>
#include <QMutexLocker>
#include <QtWidgets/QMessageBox>
#include <ctime>
#include <sodium.h>
#include <stdio.h>
@ -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);