Commit Graph

4837 Commits

Author SHA1 Message Date
flow
256f8094f5
refactor: make Resource Pack model inherit from ResourceFolderModel
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:47:11 -03:00
flow
1e2f0ab308
refactor: move more tied logic to model and move logic to the resources
This moves the QSortFilterProxyModel to the resource model files,
acessible via a factory method, and moves the sorting and filtering to
the objects themselves, decoupling the code a bit.

This also adds a basic implementation of methods in the
ResourceFolderModel, simplifying the process of constructing a new model
from it.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:47:08 -03:00
flow
af2cf2734d
refactor: move things around in the mod model
Makes the method order in the cpp file the same as in the header file.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:46:33 -03:00
flow
ec62d8e973
refactor: move general code from mod model to its own model
This aims to continue decoupling other types of resources (e.g. resource
packs, shader packs, etc) from mods, so that we don't have to
continuously watch our backs for changes to one of them affecting the
others.

To do so, this creates a more general list model for resources, based on
the mods one, that allows you to extend it with functionality for other
resources.

I had to do some template and preprocessor stuff to get around the
QObject limitation of not allowing templated classes, so that's sadge :c

On the other hand, I tried cleaning up most general-purpose code in the
mod model, and added some documentation, because it looks nice :D

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:45:01 -03:00
flow
3225f514f6
refactor: move general info from Mod to Resource
This allows us to create other resources that are not Mods, but can
still share a significant portion of code.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:41:59 -03:00
flow
2d63c86022
feat: make Task a QRunnable
This makes it possible to run a task in another thread.

I added a variable to toggle debug prints because they seem to trigger
an assertion on Qt internals when the task in on another thread. Of
course, this isn't awesome, but can wait until we improve our logging.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:41:59 -03:00
flow
2dcff83be7
Merge pull request #1035 from Scrumplex/fix-coremods
Make Coremods / Mods seperation more clear
2022-08-20 10:15:50 -03:00
Sefa Eyeoglu
afb9ebcd99
fix: distinguish Coremods
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-08-20 12:53:13 +02:00
Sefa Eyeoglu
92d7e44525
Merge pull request #878 from flowln/lazy_settings 2022-08-20 12:50:56 +02:00
Sefa Eyeoglu
a517f442ea
Merge pull request #1023 from flowln/better_shared_ptr 2022-08-20 12:50:50 +02:00
Sefa Eyeoglu
311758233b
Merge pull request #1044 from flowln/better_orphan_fix 2022-08-20 12:50:43 +02:00
Sefa Eyeoglu
6e086eb808
Merge pull request #992 from Scrumplex/refactor-version 2022-08-20 12:50:25 +02:00
Sefa Eyeoglu
7e8644430c
Merge pull request #1007 from Gingeh/disable-update-button 2022-08-20 12:50:19 +02:00
Sefa Eyeoglu
70a8f6743a
Merge pull request #919 from kumquat-ir/download-all-blocked 2022-08-20 12:50:01 +02:00
dada513
69eafd0e11
Merge pull request #1058 from DioEgizio/fix-update-org.polymc.PolyMC.metainfo.xml.in 2022-08-19 20:34:11 +02:00
DioEgizio
6b6a095b91 fix(COPYING): fix COPYING.md by adding some missing copyright notices
Signed-off-by: DioEgizio <83089242+DioEgizio@users.noreply.github.com>
2022-08-19 18:42:26 +02:00
Sefa Eyeoglu
d5a2185030
Merge pull request #1068 from TayouVR/improvedWindowsJavaCheck 2022-08-19 14:26:36 +02:00
Tayou
26f31e9288
use qEnvironmentVariable instead of qgetenv in JavaUtils
Signed-off-by: Tayou <tayou@gmx.net>
2022-08-18 23:59:35 +02:00
Sefa Eyeoglu
e654e66839
Merge pull request #1049 from flowln/waiting_for_news_-_- 2022-08-18 22:53:41 +02:00
Tayou
bb4861cf0d check for java installs in PATH on windows
this should find java installs from scoop as well as any other installer, that registers java in the PATH environment variable.

Signed-off-by: Tayou <tayou@gmx.net>
2022-08-18 18:24:32 +02:00
Sefa Eyeoglu
01505910f4
refactor: move classpath definition into NewLaunch itself
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-08-18 18:14:01 +02:00
Sefa Eyeoglu
ab766a0598
Merge pull request #968 from magneticflux-/utf8-logging
Decode process lines as UTF-8
2022-08-18 10:44:01 +02:00
DioEgizio
51c664a678
fix: update org.polymc.PolyMC.metainfo.xml.in to not make flatpak break next release
Signed-off-by: DioEgizio <83089242+DioEgizio@users.noreply.github.com>
2022-08-15 20:34:56 +02:00
Mitchell Skaggs
3c4b45c9e7
Use C locale codec for decoding
This should correctly decode multi-byte non-UTF-8 text, such as Windows-936 (Simplified Chinese)

Signed-off-by: Mitchell Skaggs <skaggsm333@gmail.com>
2022-08-13 10:39:05 -05:00
flow
93507a263b
fix: hide 'More news...' button if the news aren't loaded yet
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-12 17:41:11 -03:00
Sefa Eyeoglu
1175461030
refactor: switch to new versioning scheme
The new versioning system is based on the versioning system used by the
GNOME Foundation for the GNOME desktop.

We are dropping the "major version" as defined by SemVer and move to a
version number with a most and least significant number.

The most significant number must be incremented, if there are new
features or significant changes since last major release.

Otherwise, the least significant number must be incremented, if there
are only minor changes since the last release. New features or
significant changes mustn't be introduced by a bump of the least
significant number.

If a minor change would introduce small user-facing changes (like a
message-box or slight UI changes), it could still be classified as a
minor change.
At the end of the day, a human shall decide, if a change is minor or
significant, as there is no clear line that would separate a "minor" and
a "significant" change in a GUI-application.

Definitions:

feature: New user-facing functionality
significant change: Something that changes user-facing behavior
minor change: Something that fixes unexpected behavior

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-08-12 14:22:24 +02:00
flow
2f5e55bea0
fix: only remove orphaned metadata on first opening
This avoids deleting the metadata while one is updating their mods.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-11 13:11:56 -03:00
timoreo
c375e7b4df
Merge pull request #897 from jamierocks/atl-updating-initial 2022-08-11 08:50:05 +02:00
timoreo
5d188c69ed
Merge pull request #1039 from budak7273/fix-world-safety-nag-title-text 2022-08-11 07:33:13 +02:00
timoreo
6bff7751d0
Merge pull request #909 from txtsd/markdownlint 2022-08-11 07:33:04 +02:00
timoreo
1a5986abe0
Merge pull request #920 from flowln/metacache_fix 2022-08-11 07:32:43 +02:00
Robb
cebac3c10e
Make new title strings translatable
Signed-off-by: Robb <computerguy440+gh@gmail.com>
2022-08-10 12:07:24 -05:00
timoreo
a5da3db966
Merge pull request #1018 from Scrumplex/fix-infinite-auth-loop 2022-08-10 18:14:26 +02:00
Robb
cd30f75173
fix: Make world safety nag title text match the action being performed instead of always saying 'Copy World'
Signed-off-by: Robb <computerguy440+gh@gmail.com>
2022-08-09 16:01:21 -05:00
Mitchell Skaggs
94df4ceb36
Fix use of Qt 5.14 enum
Signed-off-by: Mitchell Skaggs <skaggsm333@gmail.com>
2022-08-09 00:17:53 -05:00
Mitchell Skaggs
a14476c5fb
Replace local 8-bit decoding with UTF-8 decoding
Handles incomplete byte sequences using `QTextDecoder`

Signed-off-by: Mitchell Skaggs <skaggsm333@gmail.com>
2022-08-08 23:54:01 -05:00
Sefa Eyeoglu
d82bb29919
fix: don't apply GameMode/MangoHud, if they aren't supported
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-08-08 21:19:46 +02:00
Sefa Eyeoglu
33af0c6a7c
refactor: don't include mangohud's library path
This could cause issues on some environments. Users should just put
MangoHud libs into global LD_LIBRARY_PATH, just like with any other
library

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-08-08 21:16:37 +02:00
Sefa Eyeoglu
68f3f98bc3
feat: detect GameMode and MangoHud's presence
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-08-08 21:16:37 +02:00
Sefa Eyeoglu
f873cd5b1a
refactor: store current capabilities
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-08-08 21:16:37 +02:00
txtsd
fa8df286d9
chore(ci): Add markdownlint config to ignored paths
Signed-off-by: txtsd <thexerothermicsclerodermoid@gmail.com>
2022-08-06 13:00:57 +05:30
txtsd
76aa0c434a
feat(markdown): Add markdownlint config
Signed-off-by: txtsd <thexerothermicsclerodermoid@gmail.com>
2022-08-06 13:00:57 +05:30
txtsd
78dc0cfdf3
chore(markdown): MD001 Heading levels should only increment by one level at a time
Signed-off-by: txtsd <thexerothermicsclerodermoid@gmail.com>
2022-08-06 13:00:57 +05:30
txtsd
9654728bfb
chore(markdown): Align inline HTML correctly
Signed-off-by: txtsd <thexerothermicsclerodermoid@gmail.com>
2022-08-06 13:00:57 +05:30
txtsd
123d1864f4
chore(markdown): MD037 Spaces inside emphasis markers
Signed-off-by: txtsd <thexerothermicsclerodermoid@gmail.com>
2022-08-06 13:00:57 +05:30
txtsd
96a91e988d
chore(markdown): MD010 Hard tabs
Signed-off-by: txtsd <thexerothermicsclerodermoid@gmail.com>
2022-08-06 13:00:56 +05:30
txtsd
19ecb1701e
chore(markdown): MD031 Fenced code blocks should be surrounded by blank lines
Signed-off-by: txtsd <thexerothermicsclerodermoid@gmail.com>
2022-08-06 13:00:56 +05:30
txtsd
8085b2728d
chore(markdown): MD032 Lists should be surrounded by blank lines
Signed-off-by: txtsd <thexerothermicsclerodermoid@gmail.com>
2022-08-06 13:00:56 +05:30
txtsd
56cad31a36
chore(markdown): MD034 Bare URL used
Signed-off-by: txtsd <thexerothermicsclerodermoid@gmail.com>
2022-08-06 13:00:46 +05:30
txtsd
3275bc4e93
chore(markdown): MD009 Trailing spaces
Signed-off-by: txtsd <thexerothermicsclerodermoid@gmail.com>
2022-08-06 12:57:30 +05:30