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

Potential fix for history issues, both dubslow/qTox#5 and dubslow/qTox#6

This commit is contained in:
Dubslow 2015-01-27 17:25:41 -06:00
parent 60e819baee
commit 0470b5a6af
No known key found for this signature in database
GPG Key ID: 3DB8E05315C220AA
2 changed files with 4 additions and 1 deletions

View File

@ -218,6 +218,7 @@ void Core::checkEncryptedHistory()
Widget::getInstance()->showWarningMsgBox(tr("Encrypted History"), tr("No encrypted history file found, or it was corrupted.\nHistory will be disabled!")); Widget::getInstance()->showWarningMsgBox(tr("Encrypted History"), tr("No encrypted history file found, or it was corrupted.\nHistory will be disabled!"));
Settings::getInstance().setEncryptLogs(false); Settings::getInstance().setEncryptLogs(false);
Settings::getInstance().setEnableLogging(false); Settings::getInstance().setEnableLogging(false);
HistoryKeeper::resetInstance();
return; return;
} }
@ -255,6 +256,7 @@ void Core::checkEncryptedHistory()
clearPassword(ptHistory); clearPassword(ptHistory);
Settings::getInstance().setEncryptLogs(false); Settings::getInstance().setEncryptLogs(false);
Settings::getInstance().setEnableLogging(false); Settings::getInstance().setEnableLogging(false);
HistoryKeeper::resetInstance();
return; return;
} }
else else

View File

@ -55,7 +55,7 @@ void PrivacyForm::onEnableLoggingUpdated()
{ {
Settings::getInstance().setEnableLogging(bodyUI->cbKeepHistory->isChecked()); Settings::getInstance().setEnableLogging(bodyUI->cbKeepHistory->isChecked());
bodyUI->cbEncryptHistory->setEnabled(bodyUI->cbKeepHistory->isChecked()); bodyUI->cbEncryptHistory->setEnabled(bodyUI->cbKeepHistory->isChecked());
HistoryKeeper::getInstance()->resetInstance(); HistoryKeeper::resetInstance();
Widget::getInstance()->clearAllReceipts(); Widget::getInstance()->clearAllReceipts();
} }
@ -166,6 +166,7 @@ void PrivacyForm::onEncryptLogsUpdated()
Settings::getInstance().setEncryptLogs(false); Settings::getInstance().setEncryptLogs(false);
bodyUI->cbEncryptHistory->setChecked(false); bodyUI->cbEncryptHistory->setChecked(false);
bodyUI->changeLogsPwButton->setEnabled(false); bodyUI->changeLogsPwButton->setEnabled(false);
HistoryKeeper::resetInstance();
} }
bool PrivacyForm::setToxPassword() bool PrivacyForm::setToxPassword()