コード例 #1
0
void AccountManager::logout() {
    // a logout means we want to delete the DataServerAccountInfo we currently have for this URL, in-memory and in file
    _accountInfo = DataServerAccountInfo();

    // remove this account from the account settings file
    removeAccountFromFile();

    emit logoutComplete();
    // the username has changed to blank
    emit usernameChanged(QString());
}
コード例 #2
0
ファイル: AccountManager.cpp プロジェクト: joegilley/hifi
void AccountManager::logout() {
    // a logout means we want to delete the DataServerAccountInfo we currently have for this URL, in-memory and in file
    _accountInfo = DataServerAccountInfo();
    
    emit balanceChanged(0);
    connect(&_accountInfo, &DataServerAccountInfo::balanceChanged, this, &AccountManager::accountInfoBalanceChanged);
    
    QSettings settings;
    settings.beginGroup(ACCOUNTS_GROUP);
    
    QString keyURLString(_authURL.toString().replace("//", DOUBLE_SLASH_SUBSTITUTE));
    settings.remove(keyURLString);
    
    qDebug() << "Removed account info for" << _authURL << "from in-memory accounts and .ini file";
    
    emit logoutComplete();
    // the username has changed to blank
    emit usernameChanged(QString());
}