Commit Graph

13 Commits

Author SHA1 Message Date
flow
6a18079953
refactor: generalize mod models and APIs to resources
Firstly, this abstract away behavior in the mod download models that can
also be applied to other types of resources into a superclass, allowing
other resource types to be implemented without so much code duplication.

For that, this also generalizes the APIs used (currently, ModrinthAPI
and FlameAPI) to be able to make requests to other types of resources.

It also does a general cleanup of both of those. In particular, this
makes use of std::optional instead of invalid values for errors and,
well, optional values :p

This is a squash of some commits that were becoming too interlaced
together to be cleanly separated.

Signed-off-by: flow <flowlnlnln@gmail.com>
2023-01-13 16:23:00 -03:00
flow
81fedbf03c
refactor(Tasks): remove 'm_total_size' from ConcurrentTask
We can use the queues directly instead.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-17 13:10:19 -03:00
flow
a091245793
fix: emit signals when aborting NetJob
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-10 09:10:16 -03:00
flow
7b6d269904
refactor: make NetJob inherit from ConcurrentTask as well!
Avoids lots of code duplication

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28 16:29:01 -03:00
Sefa Eyeoglu
3b4539de79
chore: update license headers
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-10 12:19:15 +02:00
Sefa Eyeoglu
c363423718
refactor: fix deprecation up to Qt 6
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-10 12:19:15 +02:00
Sefa Eyeoglu
984692dc62
refactor: fix deprecation up to Qt 5.15
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-10 12:17:52 +02:00
flow
0bce08d30f
chore: add polymc license headers to launcher/net files 2022-05-12 18:11:55 -03:00
flow
57d65177c8
fix: abort and fail logic in tasks
Also sets up correctly the status connections
2022-05-12 18:11:55 -03:00
flow
efa3fbff39
refactor: remove some superfluous signals
Since now we're inheriting from Task, some signals can be reused.
2022-05-12 18:11:55 -03:00
flow
8c8eabf7ac
refactor: organize a little more the code in launcher/net/
This also reduces some code duplication by using some Task logic in
NetAction.
2022-05-12 18:11:49 -03:00
Petr Mrázek
69213b1206 NOISSUE continue refactoring things to make tests pass 2021-11-21 23:21:12 +01:00
Petr Mrázek
20b9f2b42a NOISSUE Flatten gui and logic libraries into MultiMC 2021-07-25 19:50:44 +02:00