| 273 | } |
| 274 | |
| 275 | void ComicVineDialog::processClientResults(const QString &string) |
| 276 | { |
| 277 | ResponseParser p; |
| 278 | p.loadJSONResponse(string); |
| 279 | // QMessageBox::information(0,"Result", QString("Number of results : %1").arg(p.getNumResults())); |
| 280 | if (p.responseError()) { |
| 281 | QMessageBox::critical(0, tr("Error connecting to ComicVine"), p.errorDescription()); |
| 282 | goBack(); |
| 283 | } else { |
| 284 | |
| 285 | switch (mode) { |
| 286 | case ScraperMode::SingleComic: |
| 287 | case ScraperMode::SingleComicInList: |
| 288 | if (p.getNumResults() == 0) |
| 289 | showSearchSingleComic(currentVolumeSearchQuery.volume); |
| 290 | else if (status == ScraperStatus::SearchingVolume || status == ScraperStatus::SearchingExactVolume) |
| 291 | showSelectVolume(string); |
| 292 | else |
| 293 | showSelectComic(string); |
| 294 | break; |
| 295 | case ScraperMode::Volume: |
| 296 | if (p.getNumResults() == 0) |
| 297 | showSearchVolume(currentVolumeSearchQuery.volume); |
| 298 | else |
| 299 | showSelectVolume(string); |
| 300 | break; |
| 301 | } |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | void ComicVineDialog::showSeriesQuestion() |
| 306 | { |
nothing calls this directly
no test coverage detected