예제 #1
0
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()));
}
예제 #2
0
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()));
}