kDebug / qDebug

This commit is contained in:
Luca Beltrame 2014-10-03 23:00:55 +02:00
parent 0269c6d1bd
commit a568beac2a
2 changed files with 13 additions and 13 deletions

View file

@ -24,7 +24,7 @@
#include <QDebug> #include <QDebug>
#include <qjson/parser.h> #include <qjson/parser.h>
#include <kdebug.h> #include <QDebug>
#include <QStack> #include <QStack>
// KDE // KDE
@ -87,7 +87,7 @@ void DanbooruService::getPostList(int page, QStringList tags, int limit)
KUrl danbooruUrl = requestUrl(m_url, POST_URL, m_username, KUrl danbooruUrl = requestUrl(m_url, POST_URL, m_username,
m_password, parameters, tags); m_password, parameters, tags);
kDebug() << "Final constructed post URL" << danbooruUrl.url(); //qDebug() << "Final constructed post URL" << danbooruUrl.url();
KIO::StoredTransferJob* job = KIO::storedGet(danbooruUrl, KIO::NoReload, KIO::StoredTransferJob* job = KIO::storedGet(danbooruUrl, KIO::NoReload,
KIO::HideProgressInfo); KIO::HideProgressInfo);
@ -112,7 +112,7 @@ void DanbooruService::getTagList(int limit, QString name)
KUrl danbooruUrl = requestUrl(m_url, TAG_URL, m_username, m_password, KUrl danbooruUrl = requestUrl(m_url, TAG_URL, m_username, m_password,
parameters); parameters);
kDebug() << "Final constructed tag URL" << danbooruUrl.url(); //qDebug() << "Final constructed tag URL" << danbooruUrl.url();
KIO::StoredTransferJob* job = KIO::storedGet(danbooruUrl, KIO::NoReload, KIO::StoredTransferJob* job = KIO::storedGet(danbooruUrl, KIO::NoReload,
KIO::HideProgressInfo); KIO::HideProgressInfo);
@ -134,7 +134,7 @@ void DanbooruService::getPool(int poolId, int page)
KUrl danbooruUrl = requestUrl(m_url, POOL_DATA_URL, m_username, KUrl danbooruUrl = requestUrl(m_url, POOL_DATA_URL, m_username,
m_password, parameters); m_password, parameters);
kDebug() << "Final constructed pool URL" << danbooruUrl.url(); //qDebug() << "Final constructed pool URL" << danbooruUrl.url();
KIO::StoredTransferJob* job = KIO::storedGet(danbooruUrl, KIO::NoReload, KIO::StoredTransferJob* job = KIO::storedGet(danbooruUrl, KIO::NoReload,
@ -165,7 +165,7 @@ void DanbooruService::getPoolList(int page)
m_password, map); m_password, map);
} }
kDebug() << "Final constructed pool list URL" << danbooruUrl.url(); //qDebug() << "Final constructed pool list URL" << danbooruUrl.url();
KIO::StoredTransferJob* job = KIO::storedGet(danbooruUrl, KIO::NoReload, KIO::StoredTransferJob* job = KIO::storedGet(danbooruUrl, KIO::NoReload,
KIO::HideProgressInfo); KIO::HideProgressInfo);
@ -206,7 +206,7 @@ void DanbooruService::getRelatedTags(const QStringList& tags,
KUrl danbooruUrl = requestUrl(m_url, RELATED_TAG_URL, m_username, KUrl danbooruUrl = requestUrl(m_url, RELATED_TAG_URL, m_username,
m_password, parameters, tags); m_password, parameters, tags);
kDebug() << "Final constructed related tag URL" << danbooruUrl.url(); //qDebug() << "Final constructed related tag URL" << danbooruUrl.url();
StoredTransferJob* job = KIO::storedGet( StoredTransferJob* job = KIO::storedGet(
danbooruUrl, KIO::NoReload, danbooruUrl, KIO::NoReload,
@ -287,7 +287,7 @@ const Ratings DanbooruService::maximumAllowedRating() const
void DanbooruService::processPostList(KJob* job) void DanbooruService::processPostList(KJob* job)
{ {
//kDebug() << "Got post data OK"; ////qDebug() << "Got post data OK";
if (job->error()) { if (job->error()) {
Q_EMIT(downloadError(job->errorString())); Q_EMIT(downloadError(job->errorString()));
@ -529,7 +529,7 @@ void DanbooruService::processPoolList(KJob* job)
Q_EMIT(poolDownloaded(pool)); Q_EMIT(poolDownloaded(pool));
} }
kDebug() << "Pool download finished!"; //qDebug() << "Pool download finished!";
Q_EMIT(poolDownloadFinished()); Q_EMIT(poolDownloadFinished());
} }
@ -569,17 +569,17 @@ void DanbooruService::downloadThumbnail(KJob* job)
post->setPixmap(pix); post->setPixmap(pix);
if (m_cache) { if (m_cache) {
kDebug() << "Inserting item in cache"; //qDebug() << "Inserting item in cache";
m_cache->insertPixmap(post->thumbnailUrl().url(), *pix); m_cache->insertPixmap(post->thumbnailUrl().url(), *pix);
} }
m_currentPosts--; // One less post to do m_currentPosts--; // One less post to do
kDebug() << "Current posts remaining" << m_currentPosts; //qDebug() << "Current posts remaining" << m_currentPosts;
Q_EMIT(postDownloaded(post)); Q_EMIT(postDownloaded(post));
if (m_currentPosts == 0) { if (m_currentPosts == 0) {
kDebug() << "Post download finished"; //qDebug() << "Post download finished";
Q_EMIT(postDownloadFinished()); Q_EMIT(postDownloadFinished());
} }

View file

@ -29,7 +29,7 @@
// KDE // KDE
#include <kdebug.h> #include <QDebug>
namespace Danbooru { namespace Danbooru {
@ -138,7 +138,7 @@ namespace Danbooru {
if (values.isEmpty()) { if (values.isEmpty()) {
*result = false; *result = false;
kWarning() << "No results found when parsing XML"; qWarning() << "No results found when parsing XML";
return QList<QVariant>(); return QList<QVariant>();
} }