This ends my series of patches fixing warnings throughout the codebase. Now, there are NO warnings except for unused parameters, tested on GCC 13.1.1 and Clang 16.0.2 with -Wall -Wextra.
Fixed dark mode crashing on Windows 8.1, 8 and 7, and removed a need for an export by moving in the function.
Any people looking at the Windows code and asking why I didn't use official version querying API's, those typically have some sort of unwanted behavior, plus checking exports to determine versions is shorter.
for FileSystem.cpp:
Instead of checking if Linux or FreeBSD, check if its not Windows and not OSX. Chances are other operating systems run a DE that adheres to the XDG Desktop standard (.desktop). The check isn't good enough anyways since alternative shells for Windows exist, it will never be an accurate check. In any case this function is unused.
WorldListPage.cpp:
Redo confusing switch statement plagued with fall throughs, now well defined.
LaunchController.cpp:
Remove cringe. Also fix warning and make the unimplemented case(s) more explicit.
VersionProxyModel.cpp:
Add fallthrough for warning suppression.
WorldListPage.cpp:
redo `mceditState`
TranslationsModel.cpp:
Move up definition of `column` variable to when it is needed, clear up switch cases
FlameInstanceCreationTask.cpp:
Fallthrough intentionally
SkinUpload.cpp:
Make `getVariant`
ResourcePack.cpp:
Add new values for 1.19.3+
meta/Index.cpp:
Make clear switch statement behavior
JavaWizardPage.cpp:
Fix case fallthrough
Yggdrasil.cpp:
Fix case fallthrough
AccountList.cpp:
Fix case fallthrough,
WinDarkmode.cpp:
Add an explanation and fix warnings due to FARPROC casts.
Signed-off-by: jdp_ <42700985+jdpatdiscord@users.noreply.github.com>
The mechanism that both pack updating and Modrinth overrides use utilize std::filesystem::copy, which with GCC's libstdc++ has a bug on Windows where `overwrite_existing` isn't obeyed. In addition, made it clear what `overrideFolder` does by renaming it and rewriting an error message.
Also needed to add a call to loop.exit() in FlameInstanceCreationTask so
that it would handle the failure of FileResolvingTask properly
Signed-off-by: Lenny McLennington <lenny@sneed.church>
This prevents custom names from being lost when updating, by only
changing the name if the old instance name constains the old version,
so that we can update it if the user whishes to.
Signed-off-by: flow <flowlnlnln@gmail.com>
This makes it harder for problems in the updating process to affect the
current instance. Network issues, for instance, will no longer put the
instance in an invalid state.
Still, a possible improvement to this would be passing that logic to
InstanceStaging instead, to be handled with the instance commiting
directly. However, as it is now, the code would become very spaguetti-y,
and given that the override operation in the commiting could also put
the instance into an invalid state, it seems to me that, in order to
fully error-proof this, we would need to do a copy operation on the
whole instance, in order to modify the copy, and only in the end
override everything an once with a rename. That also has the possibility
of corrupting the instance if done without super care, however, so I
think we may need to instead create an automatic backup system, with an
undo command of sorts, or something like that. This doesn't seem very
trivial though, so it'll probably need to wait until another PR. In the
meantime, the user is advised to always backup their instances before
doing this kind of action, as always.
What a long commit message o.O
Signed-off-by: flow <flowlnlnln@gmail.com>
These help us keep track of relevant metadata information about
overrides, so that we know what they are when we update a pack.
Signed-off-by: flow <flowlnlnln@gmail.com>
While working on pack updating, instance naming always gets in the way,
since we need both way of respecting the user's name choice, and a
standarized way of getting the original pack name / version.
This tries to circunvent such problems by abstracting away the naming
schema into it's own struct, holding both the original name / version,
and the user-defined name, so that everyone can be happy and world peace
can be achieved! (at least that's what i'd hope :c).
Signed-off-by: flow <flowlnlnln@gmail.com>
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>
Even though it was using a QMutableHashIterator, sometimes it didn't
work quite well, so this is a bit better.
Signed-off-by: flow <flowlnlnln@gmail.com>