void ImageshackTalker::getGalleries() { if (m_job) { m_job->kill(); m_job = 0; } emit signalBusy(true); emit signalJobInProgress(3, 4, i18n("Getting galleries from server")); KUrl gUrl(m_galleryUrl); gUrl.addQueryItem("action", "gallery_list"); gUrl.addQueryItem("user", m_imageshack->username()); KIO::TransferJob* job = KIO::get(gUrl, KIO::NoReload, KIO::HideProgressInfo); connect(job, SIGNAL(data(KIO::Job*,QByteArray)), this, SLOT(data(KIO::Job*,QByteArray))); connect(job, SIGNAL(result(KJob*)), this, SLOT(slotResult(KJob*))); m_state = IMGHCK_GETGALLERIES; m_job = job; m_buffer.resize(0); }
void ImageshackTalker::getGalleries() { if (m_reply) { m_reply->abort(); m_reply = 0; } emit signalBusy(true); emit signalJobInProgress(3, 4, i18n("Getting galleries from server")); QUrl gUrl(m_galleryUrl); QUrlQuery q(gUrl); q.addQueryItem(QString::fromLatin1("action"), QString::fromLatin1("gallery_list")); q.addQueryItem(QString::fromLatin1("user"), m_imageshack->username()); gUrl.setQuery(q); m_reply = m_netMngr->get(QNetworkRequest(gUrl)); m_state = IMGHCK_GETGALLERIES; m_buffer.resize(0); }