Browse Source

refactor(profile): small style corrections

pull/5194/head
sudden6 7 years ago
parent
commit
8e5598572a
No known key found for this signature in database
GPG Key ID: 279509B499E032B9
  1. 7
      src/persistence/profile.cpp

7
src/persistence/profile.cpp

@ -552,7 +552,7 @@ void Profile::onRequestSent(const ToxPk& friendPk, const QString& message) @@ -552,7 +552,7 @@ void Profile::onRequestSent(const ToxPk& friendPk, const QString& message)
*/
void Profile::saveAvatar(const ToxPk& owner, const QByteArray& avatar)
{
bool needEncrypt = encrypted && !avatar.isEmpty();
const bool needEncrypt = encrypted && !avatar.isEmpty();
const QByteArray& pic = needEncrypt ? passkey->encrypt(avatar) : avatar;
QString path = avatarPath(owner);
@ -756,10 +756,9 @@ void Profile::restartCore() @@ -756,10 +756,9 @@ void Profile::restartCore()
// TODO(sudden6): there's a potential race condition between unlocking the core loop
// and killing the core
const QByteArray& savedata = core->getToxSaveData();
// save to disk just in case
bool saved = saveToxSave(savedata);
if (saved) {
// save to disk just in case
if (saveToxSave(savedata)) {
qDebug() << "Restarting Core";
initCore(savedata, Settings::getInstance());
core->start();

Loading…
Cancel
Save