Re-enable debug for Konachan

This commit is contained in:
Luca Beltrame 2015-08-23 00:31:48 +02:00
parent ba79760a4b
commit f2ffeb8cc2

View file

@ -22,6 +22,7 @@
#include "danboorupool.h"
#include "danboorutag.h"
#include "utils.h"
#include "libdanbooru_debug.h"
// KF5
@ -72,7 +73,7 @@ void KonachanDanbooruService::getPostList() {
QUrl danbooruUrl = requestUrl(m_url, postUri(), m_username,
m_password, parameters, m_tags);
// qCDebug(LIBDANBOORU) << "Final constructed post URL" << danbooruUrl;
qCDebug(LIBDANBOORU) << "Final constructed post URL" << danbooruUrl;
KIO::StoredTransferJob *job = KIO::storedGet(danbooruUrl, KIO::NoReload,
KIO::HideProgressInfo);
@ -87,7 +88,7 @@ void KonachanDanbooruService::getPostList() {
void KonachanDanbooruService::processPostList(KJob *job)
{
// qCDebug(LIBDANBOORU) << "Got post data OK";
qCDebug(LIBDANBOORU) << "Got post data OK";
if (job->error()) {
Q_EMIT(downloadError(job->errorString()));
@ -123,7 +124,7 @@ void KonachanDanbooruService::processPostList(KJob *job)
// How many posts do we have to fetch?
if (postList.isEmpty()) {
// qCDebug(LIBDANBOORU) << "No posts found";
qCDebug(LIBDANBOORU) << "No posts found";
Q_EMIT(postDownloadFinished());
return;
}
@ -145,7 +146,7 @@ void KonachanDanbooruService::processPostList(KJob *job)
QPixmap pix;
// qCDebug(LIBDANBOORU) << "About to donwload images";
qCDebug(LIBDANBOORU) << "About to donwload images";
if (m_cache && m_cache->findPixmap(post->thumbnailUrl().url(), &pix)) {
@ -199,12 +200,12 @@ void KonachanDanbooruService::processPostList(KJob *job)
m_postsToFetch--; // One less post to do
//qCDebug(LIBDANBOORU) << "Current posts remaining" << m_currentPosts;
qCDebug(LIBDANBOORU) << "Current posts remaining: " << m_postsToFetch;
Q_EMIT(postDownloaded(post));
if (m_postsToFetch == 0)
{
// qCDebug(LIBDANBOORU) << "Post download finished";
qCDebug(LIBDANBOORU) << "Post download finished";
Q_EMIT(postDownloadFinished());
}