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
parent a3bbf5c41d
commit 8832234758
No known key found for this signature in database
GPG Key ID: 8267F9F7C2BF7E5E

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, QString(), settings);
if (!profile) {
QMessageBox::information(nullptr, QObject::tr("Error"),
QObject::tr("Failed to load profile automatically."));
}
}
if (profile) {
settings.updateProfileData(profile);