Remove cache data when the user logs out
This commit is contained in:
parent
7fbfe3af15
commit
177dd6a5b0
3 changed files with 16 additions and 1 deletions
|
|
@ -83,7 +83,10 @@ Cache::Cache(const QString &userId)
|
|||
|
||||
txn.commit();
|
||||
|
||||
isMounted_ = true;
|
||||
isMounted_ = true;
|
||||
cacheDirectory_ = QString("%1/%2")
|
||||
.arg(QStandardPaths::writableLocation(QStandardPaths::CacheLocation))
|
||||
.arg(QString::fromUtf8(userId_.toUtf8().toHex()));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -194,6 +194,8 @@ ChatPage::logout()
|
|||
settings.remove("");
|
||||
settings.endGroup();
|
||||
|
||||
cache_->deleteData();
|
||||
|
||||
// Clear the environment.
|
||||
room_list_->clear();
|
||||
view_manager_->clearAll();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue