From 601975a6fd01115c448a65d8e442a543014f66fb Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Mon, 1 Apr 2013 10:28:43 +0200 Subject: [PATCH] Some comments --- src/libdanbooru/danbooruservice.cpp | 12 +++++------- src/libdanbooru/utils.cpp | 5 +++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/libdanbooru/danbooruservice.cpp b/src/libdanbooru/danbooruservice.cpp index 3b444af..9fbfede 100644 --- a/src/libdanbooru/danbooruservice.cpp +++ b/src/libdanbooru/danbooruservice.cpp @@ -351,10 +351,7 @@ namespace Danbooru { temp = temp.intersect(post->tags()); if (!temp.isEmpty()) { - // Blacklisted tags are present, do not use this post - // qDebug() << "Skipping " << post->fileUrl(); - // qDebug() << "Blacklisted tags " << overlap; m_currentPosts--; delete post; continue; @@ -453,7 +450,7 @@ namespace Danbooru { // fetch all tags in batch, so this is done one by one. for (iter=tagList.constBegin(); iter!=tagList.constEnd(); ++iter) { - + QList tags = iter.value().toList(); if (tags.isEmpty()) { @@ -461,8 +458,10 @@ namespace Danbooru { } Q_FOREACH(const QVariant& tag, tags) { - QString interest = tag.toList()[0].toString(); - getTagList(1, interest); + // We get the first element in the list, the second is + // the ID which is useless (no API methods in Danbooru) + QString tagName = tag.toList()[0].toString(); + getTagList(1, tagName); } } @@ -555,4 +554,3 @@ namespace Danbooru { } } // namespace Danbooru - diff --git a/src/libdanbooru/utils.cpp b/src/libdanbooru/utils.cpp index e9a7a2e..0b38549 100644 --- a/src/libdanbooru/utils.cpp +++ b/src/libdanbooru/utils.cpp @@ -21,6 +21,9 @@ */ #include "utils.h" + +// Qt + #include #include #include @@ -54,8 +57,6 @@ namespace Danbooru { } - qDebug() << "First step URL" << danbooruUrl.url(); - // Now, let's add tags should we have them if (!tags.isEmpty()) {