Exemple #1
0
	void VkCaptchaDialog::done (int r)
	{
		QDialog::done (r);

		if (r == DialogCode::Rejected)
			emit gotCaptcha (Cid_, {});
		else
			emit gotCaptcha (Cid_, Ui_->Text_->text ());

		deleteLater ();
	}
Exemple #2
0
void VkAccount::handleCaptcha (const QString& cid, const QUrl& url)
{
    if (IsRequestingCaptcha_)
    {
        Conn_->HandleCaptcha (cid, {});
        return;
    }

    auto dia = new CaptchaDialog (url, cid, CoreProxy_->GetNetworkAccessManager ());
    connect (dia,
             SIGNAL (gotCaptcha (QString, QString)),
             this,
             SLOT (handleCaptchaEntered (QString, QString)));
    dia->show ();

    IsRequestingCaptcha_ = true;
}