Use C++11 for syntax
This commit is contained in:
parent
244b930185
commit
92af974894
2 changed files with 7 additions and 6 deletions
|
@ -325,7 +325,7 @@ namespace Danbooru {
|
|||
|
||||
m_currentPosts = postList.length();
|
||||
|
||||
Q_FOREACH(const QVariant& element, postList) {
|
||||
for (auto element: postList) {
|
||||
|
||||
QVariantMap map = element.toMap();
|
||||
|
||||
|
@ -405,6 +405,7 @@ namespace Danbooru {
|
|||
SLOT(downloadThumbnail(KJob*)));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -437,7 +438,7 @@ namespace Danbooru {
|
|||
return;
|
||||
}
|
||||
|
||||
Q_FOREACH(const QVariant& element, tagList) {
|
||||
for (auto element: tagList) {
|
||||
QVariantMap map = element.toMap();
|
||||
DanbooruTag* tag = new DanbooruTag(map);
|
||||
Q_EMIT(tagDownloaded(tag));
|
||||
|
@ -485,7 +486,7 @@ namespace Danbooru {
|
|||
continue;
|
||||
}
|
||||
|
||||
Q_FOREACH(const QVariant& tag, tags) {
|
||||
for (auto tag: tags) {
|
||||
// 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();
|
||||
|
@ -522,7 +523,7 @@ namespace Danbooru {
|
|||
return;
|
||||
}
|
||||
|
||||
Q_FOREACH(const QVariant& element, poolList) {
|
||||
for (auto element: poolList) {
|
||||
QVariantMap map = element.toMap();
|
||||
|
||||
DanbooruPool* pool = new DanbooruPool(map);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue