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

fix(profile): load settings before starting Core

This is a quick fix to load settings before Core is started. Ideally
this would not need to be inside the Profile, but at the moment the
decryption key is not available before starting Core.
This commit is contained in:
sudden6 2019-08-25 14:44:33 +02:00 committed by Anthony Bilinski
parent 2ce00afcbb
commit 0a30c1b1c0
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -105,6 +105,9 @@ Profile::Profile(QString name, const QString& password, bool isNewProfile,
, encrypted{this->passkey != nullptr} , encrypted{this->passkey != nullptr}
{ {
Settings& s = Settings::getInstance(); Settings& s = Settings::getInstance();
// Core settings are saved per profile, need to load them before starting Core
s.loadPersonal(name, this->passkey.get());
// TODO(kriby): Move/refactor core initialization to remove settings dependency // TODO(kriby): Move/refactor core initialization to remove settings dependency
// note to self: use slots/signals for this? // note to self: use slots/signals for this?
initCore(toxsave, s, isNewProfile); initCore(toxsave, s, isNewProfile);