diff --git a/src/libdanbooru/danbooruservice.cpp b/src/libdanbooru/danbooruservice.cpp index 2bea123..a890003 100644 --- a/src/libdanbooru/danbooruservice.cpp +++ b/src/libdanbooru/danbooruservice.cpp @@ -24,6 +24,7 @@ #include #include +#include // KDE @@ -84,7 +85,7 @@ namespace Danbooru { KUrl danbooruUrl = requestUrl(m_url, POST_URL, m_username, m_password, parameters, tags); - qDebug() << "Final constructed URL" << danbooruUrl.url(); + kDebug() << "Final constructed post URL" << danbooruUrl.url(); KIO::StoredTransferJob* job = KIO::storedGet(danbooruUrl, KIO::NoReload, KIO::HideProgressInfo); @@ -109,7 +110,7 @@ namespace Danbooru { KUrl danbooruUrl = requestUrl(m_url, TAG_URL, m_username, m_password, parameters); - qDebug() << "Final constructed URL" << danbooruUrl.url(); + kDebug() << "Final constructed tag URL" << danbooruUrl.url(); KIO::StoredTransferJob* job = KIO::storedGet(danbooruUrl, KIO::NoReload, KIO::HideProgressInfo); @@ -131,7 +132,7 @@ namespace Danbooru { KUrl danbooruUrl = requestUrl(m_url, POOL_DATA_URL, m_username, m_password, parameters); - qDebug() << "Final constructed URL" << danbooruUrl.url(); + kDebug() << "Final constructed pool URL" << danbooruUrl.url(); KIO::StoredTransferJob* job = KIO::storedGet(danbooruUrl, KIO::NoReload, @@ -162,7 +163,7 @@ namespace Danbooru { m_password, map); } - qDebug() << "Final constructed URL" << danbooruUrl.url(); + kDebug() << "Final constructed pool list URL" << danbooruUrl.url(); KIO::StoredTransferJob* job = KIO::storedGet(danbooruUrl, KIO::NoReload, KIO::HideProgressInfo); @@ -178,8 +179,6 @@ namespace Danbooru { Danbooru::TagType tagType) { - qDebug() << "We start with these" << tags; - QString type; switch(tagType) { case Danbooru::General: @@ -205,7 +204,7 @@ namespace Danbooru { KUrl danbooruUrl = requestUrl(m_url, RELATED_TAG_URL, m_username, m_password, parameters, tags ); - qDebug() << "Final constructed URL" << danbooruUrl.url(); + kDebug() << "Final constructed related tag URL" << danbooruUrl.url(); StoredTransferJob* job = KIO::storedGet( danbooruUrl, KIO::NoReload, @@ -286,7 +285,7 @@ namespace Danbooru { void DanbooruService::processPostList(KJob* job) { - qDebug() << "Got post data OK"; + //kDebug() << "Got post data OK"; if (job->error()) { Q_EMIT(downloadError(job->errorString())); @@ -302,7 +301,7 @@ namespace Danbooru { QByteArray data = jobResult->data(); - qDebug() << jobResult->mimetype(); + kDebug() << jobResult->mimetype(); bool ok; @@ -332,13 +331,9 @@ namespace Danbooru { DanbooruPost* post = new DanbooruPost(map); - // qDebug() << "Got rating" << post->rating(); - // First check, for rating if (post->rating() > m_maxRating) { - // qDebug() << "Skipping " << post->fileUrl(); - // qDebug() << "Rating was " << post->rating(); m_currentPosts--; delete post; continue; @@ -363,7 +358,6 @@ namespace Danbooru { bool result; if (m_cache) { - qDebug() << "Checking cache"; result = m_cache->findPixmap(post->thumbnailUrl().url(), pix); } else { @@ -372,8 +366,7 @@ namespace Danbooru { if (result) { - qDebug() << "Cache hit"; - post->setPixmap(pix); + post->setPixmap(pix); Q_EMIT(postDownloaded(post)); m_currentPosts--; @@ -418,7 +411,6 @@ namespace Danbooru { void DanbooruService::processTagList(KJob* job) { - qDebug() << "Got tag data OK"; if (job->error()) { Q_EMIT(downloadError(job->errorString())); @@ -455,8 +447,6 @@ namespace Danbooru { void DanbooruService::processRelatedTagList(KJob* job) { - qDebug() << "Got related tag data OK"; - if (job->error()) { Q_EMIT(downloadError(job->errorString())); return; @@ -508,7 +498,6 @@ namespace Danbooru { void DanbooruService::processPoolList(KJob* job) { - qDebug() << "Got pool data OK"; if (job->error()) { Q_EMIT(downloadError(job->errorString())); @@ -540,7 +529,7 @@ namespace Danbooru { Q_EMIT(poolDownloaded(pool)); } - qDebug() << "Pool download finished!"; + kDebug() << "Pool download finished!"; Q_EMIT(poolDownloadFinished()); } @@ -580,17 +569,17 @@ namespace Danbooru { post->setPixmap(pix); if (m_cache) { - qDebug() << "Inserting item"; + kDebug() << "Inserting item in cache"; m_cache->insertPixmap(post->thumbnailUrl().url(), *pix); } m_currentPosts--; // One less post to do - qDebug() << "Current posts remaining" << m_currentPosts; + kDebug() << "Current posts remaining" << m_currentPosts; Q_EMIT(postDownloaded(post)); if (m_currentPosts == 0) { - qDebug() << "Post download finished"; + kDebug() << "Post download finished"; Q_EMIT(postDownloadFinished()); }