| 98 | SelectComic::~SelectComic() { } |
| 99 | |
| 100 | void SelectComic::loadComicInfo(const QModelIndex &mi) |
| 101 | { |
| 102 | QString coverURL = model->getCoverURL(mi); |
| 103 | QString id = model->getComicId(mi); |
| 104 | |
| 105 | QString loadingStyle = "<font color='#AAAAAA'>%1</font>"; |
| 106 | cover->setText(loadingStyle.arg(tr("loading cover"))); |
| 107 | detailLabel->setAltText(loadingStyle.arg(tr("loading description"))); |
| 108 | |
| 109 | auto comicVineClient = new ComicVineClient; |
| 110 | connect(comicVineClient, &ComicVineClient::comicCover, this, &SelectComic::setCover); |
| 111 | connect(comicVineClient, &ComicVineClient::finished, comicVineClient, &QObject::deleteLater); |
| 112 | comicVineClient->getComicCover(coverURL); |
| 113 | |
| 114 | auto comicVineClient2 = new ComicVineClient; |
| 115 | connect(comicVineClient2, &ComicVineClient::comicDetail, this, &SelectComic::setDescription); |
| 116 | connect(comicVineClient2, &ComicVineClient::finished, comicVineClient2, &QObject::deleteLater); |
| 117 | comicVineClient2->getComicDetailAsync(id); |
| 118 | } |
| 119 | |
| 120 | void SelectComic::setCover(const QByteArray &data) |
| 121 | { |
nothing calls this directly
no test coverage detected