Fix the manual test
This commit is contained in:
parent
c6a936bde8
commit
dd7f10cb60
1 changed files with 3 additions and 4 deletions
|
@ -31,7 +31,7 @@ DanbooruServiceTest::DanbooruServiceTest(QUrl boardUrl, Danbooru::ApiType type):
|
||||||
auto cache = new KImageCache("test-data", 48000000);
|
auto cache = new KImageCache("test-data", 48000000);
|
||||||
cache->clear();
|
cache->clear();
|
||||||
cache->setPixmapCaching(true);
|
cache->setPixmapCaching(true);
|
||||||
|
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case Danbooru::MoeBooru:
|
case Danbooru::MoeBooru:
|
||||||
m_service = new MoebooruService(boardUrl);
|
m_service = new MoebooruService(boardUrl);
|
||||||
|
@ -41,13 +41,12 @@ DanbooruServiceTest::DanbooruServiceTest(QUrl boardUrl, Danbooru::ApiType type):
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
qDebug() << "Not implemented";
|
qDebug() << "Not implemented";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
m_service->setParent(this);
|
m_service->setParent(this);
|
||||||
m_service->setMaximumAllowedRating(Danbooru::Explicit);
|
m_service->setMaximumAllowedRating(Danbooru::Explicit);
|
||||||
m_service->setMaxPosts(2);
|
m_service->setMaxPosts(2);
|
||||||
m_service->setImageCache(cache);
|
|
||||||
connect(m_service, &DanbooruServiceBase::postDownloaded, this, &DanbooruServiceTest::showPostData);
|
connect(m_service, &DanbooruServiceBase::postDownloaded, this, &DanbooruServiceTest::showPostData);
|
||||||
connect(m_service, &DanbooruServiceBase::poolDownloaded, this, &DanbooruServiceTest::showPoolData);
|
connect(m_service, &DanbooruServiceBase::poolDownloaded, this, &DanbooruServiceTest::showPoolData);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue