コード例 #1
0
void QXmppStreamManagement::failedReceived(const QDomElement &element, QXmppStanza::Error::Condition &condition)
{
    QXmppStanza::Error error;
    error.parse(element);
    condition = error.condition();
    d->resumeEnabled = false;
    d->inboundCounter = false;
    d->outboundEnabled = false;
    /// TO-DO if resume failed the buffer has to be emptied notifying the packets that couldn't be acknoledged.
    d->resumming = false;
}
コード例 #2
0
ファイル: FrmGroupChat.cpp プロジェクト: anchowee/rabbitim
void CFrmGroupChat::slotError(const QXmppStanza::Error &error)
{
    LOG_MODEL_DEBUG("Group chat", "code:%d;type:%d;Condition:%d;error:%s", 
                    error.code(),
                    error.type(),
                    error.condition(),
                    qPrintable(error.text()));
    QString szMsg;
    switch(error.type())
    {
    case QXmppStanza::Error::Auth:
        szMsg = tr("Don't join room");
        break;
    default:
        szMsg = tr("Error code:") + QString::number(error.code())
                + tr("type:") + QString::number(error.type())
                + tr("condition:") + QString::number(error.condition())
                + tr("text:") + error.text();
    };
    QMessageBox::critical(this, tr("Error"), szMsg);
}