void GoogleRecaptchaPlugin::downloadCaptchaImage(const QString &challenge) { m_challenge = challenge; QUrl url("http://www.google.com/recaptcha/api/image?c=" + challenge); QNetworkRequest request(url); QNetworkReply *reply = networkAccessManager()->get(request); connect(reply, SIGNAL(finished()), this, SLOT(onCaptchaImageDownloaded())); connect(this, SIGNAL(currentOperationCanceled()), reply, SLOT(deleteLater())); }
void SolveMediaRecaptchaPlugin::downloadCaptchaImage(const QString &challenge) { m_challenge = challenge; QUrl url(CAPTCHA_IMAGE_URL + challenge); QNetworkRequest request(url); QNetworkReply *reply = networkAccessManager()->get(request); connect(reply, SIGNAL(finished()), this, SLOT(onCaptchaImageDownloaded())); connect(this, SIGNAL(currentOperationCanceled()), reply, SLOT(deleteLater())); }