Clang format fix.

This commit is contained in:
ivanvranjic 2019-09-24 19:36:12 +02:00
parent cfb4e31af9
commit 346bcdaf75

View File

@ -553,20 +553,20 @@ ComicDB ComicVineDialog::parseComicInfo(ComicDB &comic, const QString &json, int
comic.info.characters = characters; comic.info.characters = characters;
} }
if (!result.property("story_arc_credits").isNull()) { if (!result.property("story_arc_credits").isNull()) {
QPair<QString, QString> storyArcIdAndName = getFirstStoryArcIdAndName(result.property("story_arc_credits")); QPair<QString, QString> storyArcIdAndName = getFirstStoryArcIdAndName(result.property("story_arc_credits"));
QString storyArcId = storyArcIdAndName.first; QString storyArcId = storyArcIdAndName.first;
QString storyArcName = storyArcIdAndName.second; QString storyArcName = storyArcIdAndName.second;
if (!storyArcId.isNull()) { if (!storyArcId.isNull()) {
QString comicId = result.property("id").toString(); QString comicId = result.property("id").toString();
QPair<QString, QString> arcNumberAndArcCount = getArcNumberAndArcCount(storyArcId, comicId); QPair<QString, QString> arcNumberAndArcCount = getArcNumberAndArcCount(storyArcId, comicId);
if (!arcNumberAndArcCount.first.isNull()) { if (!arcNumberAndArcCount.first.isNull()) {
QString arcNumber = arcNumberAndArcCount.first; QString arcNumber = arcNumberAndArcCount.first;
QString arcCount = arcNumberAndArcCount.second; QString arcCount = arcNumberAndArcCount.second;
comic.info.storyArc = storyArcName; comic.info.storyArc = storyArcName;
comic.info.arcNumber = arcNumber; comic.info.arcNumber = arcNumber;
comic.info.arcCount = arcCount; comic.info.arcCount = arcCount;
@ -639,7 +639,7 @@ QPair<QString, QString> ComicVineDialog::getFirstStoryArcIdAndName(const QScript
{ {
QString story_arc_id = QString(); QString story_arc_id = QString();
QString story_arc_name = QString(); QString story_arc_name = QString();
QScriptValueIterator it(json_story_arcs); QScriptValueIterator it(json_story_arcs);
QScriptValue resultsValue; QScriptValue resultsValue;
while (it.hasNext()) { while (it.hasNext()) {
@ -654,7 +654,8 @@ QPair<QString, QString> ComicVineDialog::getFirstStoryArcIdAndName(const QScript
return qMakePair(story_arc_id, story_arc_name); return qMakePair(story_arc_id, story_arc_name);
} }
QPair<QString, QString> ComicVineDialog::getArcNumberAndArcCount(const QString &storyArcId, const QString &comicId) { QPair<QString, QString> ComicVineDialog::getArcNumberAndArcCount(const QString &storyArcId, const QString &comicId)
{
auto comicVineClient = new ComicVineClient; auto comicVineClient = new ComicVineClient;
bool error; bool error;
bool timeout; bool timeout;
@ -678,10 +679,10 @@ QPair<QString, QString> ComicVineDialog::getArcNumberAndArcCount(const QString &
if (!result.property("issues").isNull()) { if (!result.property("issues").isNull()) {
QScriptValue issues = result.property("issues"); QScriptValue issues = result.property("issues");
int arcNumber = 0; int arcNumber = 0;
int arcCount = 0; int arcCount = 0;
QScriptValueIterator it(issues); QScriptValueIterator it(issues);
QScriptValue resultsValue; QScriptValue resultsValue;
while (it.hasNext()) { while (it.hasNext()) {