Commit Graph
11486 Commits
Author SHA1 Message Date
Trial97 4cc1feec1d rename: rsp to res
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-17 14:41:21 +03:00
Trial97 6d48b578c0 refactor(json): add helper functions for requireObject
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-17 14:41:21 +03:00
Trial97 03a699d572 refactor(json): chain Result instead of TRY macros
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-17 14:41:21 +03:00
Trial97 85e6469b10 refactor: modernize Result usage and clean up dead code
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-17 14:41:21 +03:00
Trial97 2af360d181 refactor: rename Exception.h to Result.h
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-17 14:41:21 +03:00
Trial97 608a65fa60 refactor: replace exception handling with std::expected
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-17 14:41:21 +03:00
Trial97 6acaf041e2 refactor(json): migrate requireArray to Result<T>
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-17 14:41:20 +03:00
Trial97 b22de56e3d refactor(json): migrate requireArray and callers from exceptions to Result<T>
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-17 14:40:34 +03:00
Trial97 edcf5ea1bc refactor: default Result<> to void value
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-17 14:40:34 +03:00
Trial97 a502e989da refactor(jsons): return Result from requireObject
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-17 14:40:34 +03:00
Trial97 e944d8edf9 refactor(meta): return Result from metadata parse
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-17 14:40:34 +03:00
Trial97 27afd57d3a refactor: migrate file exceptions to Result
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-17 14:40:34 +03:00
Trial97 cd65fd2952 refactor: replace McClient exceptions with Result
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-17 14:40:34 +03:00
Trial97 f96221fc41 feat: add Result and Error aliases
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-17 14:40:34 +03:00
Alexandru Ionut Tripon bcb6cf98bf fix(modplatform): search on context-menu edits (#6107) 2026-09-17 11:01:03 +00:00
Trial97 a93a40f63a refactor: remove duplicated search handlers
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-17 12:25:06 +03:00
Alexandru Ionut Tripon a220921017 Add confirm dialog for updating modpack (#6079) 2026-09-17 05:41:07 +00:00
Alexandru Ionut Tripon 22d7c97c27 feat: warn when changing mod version while running (#6106) 2026-09-17 05:19:13 +00:00
Trial97 a5c4d43305 refactor(modplatform): modernize modpack pages
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-16 22:57:59 +03:00
Trial97 04c08f096a fix(modplatform): search on context-menu edits
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-16 22:46:54 +03:00
Trial97 91349ee44d feat: warn when changing mod version while running
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-16 22:35:21 +03:00
Alexandru Ionut Tripon 719881f77f fix(UI): Set active window as parent for NetworkJobFailedDialog (#5598) 2026-09-16 05:26:39 +00:00
Alexandru Ionut Tripon 697e7ed20f Improve launcher folders UI (#6077) 2026-09-15 13:33:24 +00:00
Alexandru Ionut Tripon e4e1260f14 Fix/3782 stale suggested icon (#6084) 2026-09-15 09:54:01 +00:00
Alexandru Ionut Tripon eb92acd0a6 fix: don't show folders in mod list (#6086) 2026-09-15 09:47:19 +00:00
Alexandru Ionut Tripon 966d86d1f6 fix(logs): don't hold back text that only looks like a log4j event (#6080) 2026-09-15 08:47:00 +00:00
Alexandru Ionut Tripon 84d9dc1aa0 fix(logs): read log4j event timestamps as milliseconds (#6081) 2026-09-15 08:14:04 +00:00
TheKodeToad f77d3fac1c Improve launcher folders UI
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2026-09-14 16:19:47 +01:00
Alexandru Ionut Tripon df96e1c76f refactor(net): use std::expected for the sink interface (#6071) 2026-09-14 08:32:21 +00:00
Vishrut Sachan 1b11389fc0 refactor: remove unused mod folder handling code
Signed-off-by: Vishrut Sachan <vishrutsachan2004@gmail.com>
2026-09-14 12:18:03 +05:30
Octol1ttle e109b6de7e fix build
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2026-09-13 18:15:32 +05:00
Alexandru Ionut TriponandOctol1ttle ebca9f4254 Update launcher/net/Sink.h
Co-authored-by: Octol1ttle <l1ttleofficial@outlook.com>
Signed-off-by: Alexandru Ionut Tripon <alexandru.tripon97@gmail.com>
2026-09-13 15:54:12 +03:00
Vishrut Sachan 4f4ae61084 fix: don't show folders in mod list
Signed-off-by: Vishrut Sachan <vishrutsachan2004@gmail.com>
2026-09-13 15:15:39 +05:30
Alexandru Ionut Tripon 3c5a8d8d06 chore(nix): update lockfile (#6083) 2026-09-13 07:20:46 +00:00
nicyoong ca64d9615b Merge branch 'PrismLauncher:develop' into fix/3782-stale-suggested-icon 2026-09-13 09:18:55 +08:00
github-actions[bot] 9cf38cd71d chore(nix): update lockfile
Flake lock file updates:

• Updated input 'nixpkgs':
    'https://releases.nixos.org/nixos/unstable/nixos-26.11pre1068089.c043004d1c69/nixexprs.tar.xz?narHash=sha256-PRK1fSEiAcO29DkUoOlsVLGYRK3h1YKVr%2BqQJB0VcYQ%3D' (2026-09-05)
  → 'https://releases.nixos.org/nixos/unstable/nixos-26.11pre1072397.eaad089433ca/nixexprs.tar.xz?narHash=sha256-eQUZVehWLDBbpBR2rq6DnuRee1ULT6Y675RhsYDSjYI%3D' (2026-09-11)
2026-09-13 00:45:32 +00:00
Alexandru Ionut Tripon 4b35975964 fix: preserve Windows paths in quoted Java arguments (#6069) 2026-09-12 13:05:30 +00:00
Alexandru Ionut Tripon cb720a088d feat: add configurable world tools to instance toolbar (#6023) 2026-09-12 12:27:12 +00:00
umutcagand 6bc731da54 fix(logs): read log4j event timestamps as milliseconds
log4j's XMLLayout writes the event time in milliseconds since the epoch, but
parseAttributes() handed it to QDateTime::fromSecsSinceEpoch(). Every entry in
the Minecraft Log tab therefore carried an instant about 55000 years out, and
once rendered as HH:mm:ss it showed a clock time with no relation to when the
line was actually logged.

The launcher's own sample log shows it plainly: the first two events of
testdata/TestLogs/vanilla-1.21.5.xml.log are stamped 1745005148589 and
1745005150587, just under two seconds apart, which is also how far apart they
are in the plain text capture of the same startup sequence. Read as seconds
they land 33 minutes apart, in the year 57267.

The added test compares instants rather than rendered clock times, so it does
not depend on the time zone it runs in.

Assisted-by: Claude Code:claude-opus-5
Signed-off-by: umutcagand <237324081+c8dhjp4tyv-bit@users.noreply.github.com>
2026-09-12 10:11:48 +03:00
umutcagand 98f4f2e206 fix(logs): don't hold back text that only looks like a log4j event
Lines reach LogParser one at a time and log4j's XMLLayout never breaks the
`<log4j:Event` start tag across lines. isPotentialLog4JStart() nevertheless
accepted any prefix of that tag, so a line ending in `<` - an emoticon such as
`>w<`, a truncated generic, a stray bracket - got torn in two: the text before
the bracket was flushed as plain text and the `<` was stashed as partial data,
only to reappear glued to the front of the following line.

Require the whole `<log4j:Event` token, and require the element name to end
there: a prefix can never be completed by later input, and `<log4j:Eventually`
names a different element that would be swallowed just the same way. Events
spread over several lines still carry the complete name on their first line, so
they keep parsing as before - including the case where the attributes follow on
the next line. As a side effect this drops a toString().toLower() allocation
from a path that runs for every `<` in every log line.

Four of the new test rows fail on the old parser - the first two lose text from
the end of the line, the other two swallow the line that follows - and the rows
covering real events pass either way, so they also pin down that the check has
not become too strict. parseLines() now uses a local parser, as a row that
leaves partial data behind would otherwise leak it into the next one.

Fixes #5825

Assisted-by: Claude Code:claude-opus-5
Signed-off-by: umutcagand <237324081+c8dhjp4tyv-bit@users.noreply.github.com>
2026-09-12 10:11:10 +03:00
Nic a1949f1610 fix: preserve Windows paths in quoted Java arguments
splitArgs treated any backslash inside quotes as an escape character,
so a quoted Windows path such as -Dorg.lwjgl.glfw.libname="C:\Users\..."
lost its path separators before reaching the JVM, causing
java.nio.file.InvalidPathException at launch.

A backslash inside quotes now only escapes the matching quote or
another backslash, keeping escaped quotes functional while leaving
Windows path separators intact.

Signed-off-by: Nic <73386479+nicyoong@users.noreply.github.com>
2026-09-12 09:33:02 +08:00
Alexandru Ionut Tripon c5df040ac0 Fix a few issues with instance icon folder (#6075) 2026-09-11 21:36:14 +00:00
Alexandru Ionut Tripon 61c4b170bf Change FS::copy to add an option to copy empty directories and symlinked directories as such (#6011) 2026-09-11 21:35:56 +00:00
TheKodeToad 5d8dc0c2d2 Add confirm dialog for updating modpack
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
2026-09-11 22:26:17 +01:00
Trial97 bb27d2e13f refactor(net): use std::expected in sink interface
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-11 20:39:55 +03:00
Trial97 9e63d9f347 refactor(net): use expected in validator interface
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2026-09-11 17:29:57 +03:00
Alexandru Ionut Tripon 48ae890109 refactor(skins): fold task subclasses into request factories (#5937) 2026-09-11 13:16:05 +00:00
Nic 0165c48890 fix: reset suggested instance icon when switching sources
Selecting a modpack on a provider page suggests the pack logo as the
instance icon. When the user then switched to another page (e.g.
Custom) and created an instance there, the stale suggested icon was
still pending and got installed for the unrelated new instance.

setSuggestedIcon("default") now restores the user's chosen icon
(m_instIconKey) and clears the pending suggested icon, instead of
returning early and leaving both untouched.

Signed-off-by: Nic <73386479+nicyoong@users.noreply.github.com>
2026-09-11 20:16:44 +08:00
Alexandru Ionut Tripon a070ca7b28 refactor(screenshots): merge Imgur into ImgurAPI (#6020) 2026-09-11 12:13:38 +00:00
Alexandru Ionut Tripon f6db53b654 refactor: use RpcSink for log uploads (#6026) 2026-09-11 11:48:04 +00:00