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:
parent
a3bbf5c41d
commit
8832234758
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user