Commit graph

314 commits

Author SHA1 Message Date
bff2dd2ef1 Update unit tests to use XML as well.
Danbooru and Konachan aren't passing just because the posts retrieved
aren't the same.
2015-08-27 19:36:49 +02:00
dc6236f00c Extend the QVariantMap parsing to Gelbooru data 2015-08-27 19:36:00 +02:00
0ee1d034c7 Account for difference between boards when parsing XML
Apparently there's nothing similar among these boards: Gelbooru and
Konachan use xml attributes, and Danbooru uses proper tags.

This is workarounded by adding a new parameter to parseDanbooruResult()
which takes into account the difference between the two calls.

Hopefully JSON isn't broken in Danbooru so I never have to use XML...
2015-08-27 19:29:55 +02:00
7eaa207852 Add files for testing Danbooru and Gelbooru posts 2015-08-27 00:18:40 +02:00
4c662ed7c1 Add support for parsing Danbooru (donmai.us) type posts
Also added unit test, passing.
2015-08-26 20:29:30 +02:00
7ec33e8e57 Add a function to include host names in URLs that don't have it
Because appparently the original Danbooru doesn't add them...
2015-08-26 20:28:56 +02:00
316c1fb1ae Update tests to make use of the new ApiType enum 2015-08-26 16:23:56 +02:00
d3da86ff28 Move ApiType to the Danbooru namespace to prevent circular includes
Adjust all signatures to match for this change
2015-08-26 16:23:25 +02:00
e806ab602f Add TODO 2015-08-26 00:32:05 +02:00
b763cfbff3 Simplify test loading 2015-08-26 00:31:10 +02:00
c2139d9c33 Move to data driven test, in anticipation for subsequent APIs 2015-08-26 00:23:39 +02:00
d840bf5319 Make the JSON readable 2015-08-26 00:23:26 +02:00
42ad3813d3 Even if they're not using QTest, group manual tests together 2015-08-25 16:57:09 +02:00
eef79c96a8 Only build tests if Qt5Test is found 2015-08-25 16:55:34 +02:00
86fb685877 This is not meant to be used as a test with make test 2015-08-25 16:55:12 +02:00
3fadd93cff Use QFINDTESTDATA, which can find files easily 2015-08-25 16:54:40 +02:00
842125bc0d Remove double debug 2015-08-25 16:49:52 +02:00
c9e79561ae Add proper tests to support Konachan posts
Danbooru posts are up next.
2015-08-25 16:49:15 +02:00
229e648d93 Stubs for testing pools, tags, and posts
We need those before implementing multiple API support, as responses
have different tags / values depending on the API.
2015-08-23 23:22:17 +02:00
e8b64a4ad9 Refactor the test application so that it is board URL agnostic 2015-08-23 23:08:45 +02:00
08402657a0 Add a limit option to the pool retrieval functions
To download less than the maximum (and ease testing)
2015-08-23 23:07:50 +02:00
c5b8fccc6f Build test application for Konachan API 2015-08-23 17:26:41 +02:00
7caa2d6956 Add missing (and needed) functions 2015-08-23 17:26:17 +02:00
9a3fd3819f Basic infrastructure for test tools to check that things are working 2015-08-23 15:31:18 +02:00
f088eb6948 Adapt build system to the newer files + libdanbooru version bump 2015-08-23 14:29:47 +02:00
5b25ad3e93 Merge branch 'master' into multiple_apis 2015-08-23 12:06:15 +02:00
2abc76e311 Make the file save dialog async
Too often I got hangs because of the nested event loop started by
exec(): therefore everything is moved to a QPointer-guarded QFileDialog
pointer which is then used asynchronously.
2015-08-23 12:04:52 +02:00
e998ad6882 Add missing methods to the Konachan API 2015-08-23 00:58:28 +02:00
f2ffeb8cc2 Re-enable debug for Konachan 2015-08-23 00:31:48 +02:00
ba79760a4b Merge branch 'master' into multiple_apis 2015-08-23 00:16:43 +02:00
bff3d33fc3 Don't detach and create temporary QLists when there's no need 2015-08-23 00:16:03 +02:00
22eeb0757d WIP: implementations of Konachan / yande.re posts 2015-08-23 00:15:23 +02:00
e3f8e5ff31 Add the right constructor for the service base class 2015-08-22 20:03:01 +02:00
08498f5ee2 WIP, Konachan API implementation 2015-08-22 20:02:17 +02:00
0c18e639a9 Implement all common methods 2015-08-22 18:21:50 +02:00
4547000491 Adjust virtual / non virtual for some methods 2015-08-22 18:21:28 +02:00
6fa8e1ae9e Document all APIs and reorganize methods for easier understanding 2015-08-22 17:58:43 +02:00
4c332d26b3 Revert "Remove files added by mistake in the wrong branch"
Those actually belong to this branch.

This reverts commit e6bb528074.
2015-08-22 16:37:42 +02:00
177e1d67ff Add a design document for multiple API support 2015-08-20 18:13:55 +02:00
b8cbb456ef libdanbooru is not a public library 2015-08-20 17:54:05 +02:00
bfe706968c Use the so-called "reverse DNS" notation for .desktop files 2015-08-20 17:41:43 +02:00
7cf61f60d4 Get rid of the syntax error 2015-08-12 16:13:12 +02:00
e6bb528074 Remove files added by mistake in the wrong branch 2015-08-11 22:39:26 +02:00
daf3e753d5 Use a static QFileDialog again
This allows setting the proper directory *without* pointing somewhere non-existent.
At the same time, the default is changed to the user's picture folder.
2015-08-11 22:38:23 +02:00
e764ba2c9d Merge branch 'master' into multiple_apis 2015-08-10 17:09:52 +02:00
b5153b00b1 Show a label when no posts are found 2015-08-10 12:42:17 +02:00
c740558ca4 Support pressing Return to search all posts
Add a placeholder text and a tool tip to clarify this.
2015-08-10 12:41:35 +02:00
4550f54f32 Return gracefully if posts are not found
This fixes the spinner going on forever when non-existent tags are added.
2015-08-10 12:40:55 +02:00
ef46a379a0 Fix typo in .desktop file 2015-05-31 17:07:05 +02:00
9b438c9edc Supported operations for various APIs 2015-05-31 17:06:02 +02:00