Minor adjustments to tests

This commit is contained in:
Luca Beltrame 2019-05-25 21:53:52 +02:00
parent 15446c74ac
commit 3b28adb512
Signed by: einar
GPG key ID: 8DF631FD021DB0C5

View file

@ -25,7 +25,7 @@
namespace Danbooru {
DanbooruServiceTest::DanbooruServiceTest(QUrl boardUrl, Danbooru::ApiType type):
m_service(0),
m_service(nullptr),
m_label(new QLabel())
{
auto cache = new KImageCache("test-data", 48000000);
@ -39,12 +39,13 @@ DanbooruServiceTest::DanbooruServiceTest(QUrl boardUrl, Danbooru::ApiType type):
case Danbooru::Danbooru:
m_service = new DanbooruService(boardUrl);
break;
default:
qDebug() << "Not implemented";
};
qDebug() << m_service->apiType() << "type";
m_service->setParent(this);
m_service->setMaximumAllowedRating(Danbooru::Questionable);
m_service->setMaximumAllowedRating(Danbooru::Explicit);
m_service->setMaxPosts(2);
m_service->setImageCache(cache);
connect(m_service, &DanbooruServiceBase::postDownloaded, this, &DanbooruServiceTest::showPostData);