void QTweetListGetMembers::parsingJsonFinished(const QVariant &json, bool ok, const QString &errorMsg) { if (ok) { QVariantMap respMap = json.toMap(); QVariant userList = respMap["users"]; QList<QTweetUser> users = QTweetConvert::variantToUserInfoList(userList); QString nextCursor = respMap["next_cursor_str"].toString(); QString prevCursor = respMap["previous_cursor_str"].toString(); emit parsedUsers(users, nextCursor, prevCursor); } else { qDebug() << "QTweetListGetMembers json parsing error: " << errorMsg; emit error(QTweetJsonError(errorMsg, json.toByteArray())); } }
void QTweetListSubscribers::parsingJsonFinished(const QVariant &json, bool ok, const QString &errorMsg) { if (ok) { QVariantMap respMap = json.toMap(); QVariant userList = respMap["users"]; QList<QTweetUser> users = QTweetConvert::variantToUserInfoList(userList); QString nextCursor = respMap["next_cursor_str"].toString(); QString prevCursor = respMap["previous_cursor_str"].toString(); emit parsedUsers(users, nextCursor, prevCursor); } else { qDebug() << "QTweetListSubscribers json parsing error: " << errorMsg; setLastErrorMessage(errorMsg); emit error(JsonParsingError, errorMsg); } }