Пример #1
0
XmppClient::XmppClient() :
    _xmppClient(),
    _xmppMUCManager()
{
    AccountManager& accountManager = AccountManager::getInstance();
    connect(&accountManager, SIGNAL(profileChanged()), this, SLOT(connectToServer()));
    connect(&accountManager, SIGNAL(logoutComplete()), this, SLOT(disconnectFromServer()));
}
Пример #2
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());
}
Пример #3
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();
    
    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());
}