Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI/UX tweaks and quality of life - remastered #1517

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

xslendix
Copy link
Contributor

@xslendix xslendix commented Nov 25, 2022

Since Zeke is now gone, I think it's safe to say, work on PR #1103 has seized
development. As such, I have decided to take this into my own hands. Drop your
ideas in the comments on what you think I should change about the UI/UX in
order to make it more friendly to beginners.

@xslendix xslendix force-pushed the zeke_is_gone_long_live_polymc branch from 2f27cb9 to 7d88553 Compare November 25, 2022 16:50
@the-unbot
Copy link

Screenshots?

@xslendix
Copy link
Contributor Author

Screenshots?

Here you go

@xslendix xslendix force-pushed the zeke_is_gone_long_live_polymc branch from e730e52 to 4ff3b8a Compare November 25, 2022 23:22
@xslendix xslendix marked this pull request as ready for review December 6, 2022 10:57
@PolyMC PolyMC deleted a comment Jun 7, 2024
@xslendix
Copy link
Contributor Author

@LennyMcLennington What do you want changed?

Copy link

@Sneedplex Sneedplex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Member

@LennyMcLennington LennyMcLennington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loader needs to be an enum

@xslendix
Copy link
Contributor Author

@LennyMcLennington if I make it an enum, I would need it to have a function that returns a string constant based on the value, do you have a preferred way of implementing that or just hardcode everything in that said function?

@Sneedplex
Copy link

@LennyMcLennington if I make it an enum, I would need it to have a function that returns a string constant based on the value, do you have a preferred way of implementing that or just hardcode everything in that said function?

just use a QMap<LoaderType, QString>

@xslendix
Copy link
Contributor Author

@Sneedplex That's a very bad idea for a couple of reasons:

  1. The data is mutable
  2. It adds CPU strain because of hashing
  3. It uses more memory than needed

I was going to make an enum of values, where I can then have a function where you pass in the value and returns a char const *.

@Sneedplex
Copy link

Sneedplex commented Nov 15, 2024

  1. const exists for a reason
  2. if your CPU can't handle a single enum hash then it might be over for you
  3. oh no a whole 100 bytes

@AutumnalModding

This comment was marked as off-topic.

@xslendix
Copy link
Contributor Author

xslendix commented Nov 16, 2024

@Sneedplex @AutumnalModding This is how software turns to shit, people like you. No wonder modern software takes years to open for example, you just don't give a shit at all. It would be much faster to just return a fucking address and doing a simple comparison on the enum value. Or make a static constant array, and use the enum value as an index. You just add complexity.

@crueter
Copy link
Contributor

crueter commented Nov 16, 2024

It's 100 bytes of memory and a picosecond of computation time. If you're that concerned about micro-optimizations then you wouldn't be using Qt, create your own shitty CLI launcher in x86 assembly.

@LennyMcLennington
Copy link
Member

LennyMcLennington commented Nov 16, 2024

@crueter @xslendix @Sneedplex Instead of whining or speculating I have prepared some example code for you:

switch https://godbolt.org/z/z1bTW5v98
array https://godbolt.org/z/oMdreervn
map https://godbolt.org/z/qedP1h74v
unordered_map https://godbolt.org/z/TYn3hYd8Y

Honestly, I don't care which approach you take or if you take a completely different approach, I just want it to not have arbitrary strings floating around in random parts of the code.

I've arranged them in order of my personal preference of how I would probably do it from a balance of code readability/maintainability and performance. But I really don't care because they all solve my nitpick.

@LennyMcLennington
Copy link
Member

LennyMcLennington commented Nov 16, 2024

Also please try not to use Qt containers when a standard one suffices, except when the Qt container provides some additional functionality that you require over the standard one. Qt already has excellent support for the standard containers, I don't want any new code written to use Qt specific containers unless it's actually a hard requirement.

@LennyMcLennington
Copy link
Member

Also I just had the thought that since we're on C++17 now we could also use std::optional instead of throwing ig.

@Sneedplex
Copy link

Sneedplex commented Nov 16, 2024

these old PRs are so irritating because none of them build properly thanks to the QList<>::iterator change that I cba to fix every time

@xslendix xslendix marked this pull request as draft November 16, 2024 15:16
@LennyMcLennington
Copy link
Member

LennyMcLennington commented Nov 16, 2024

these old PRs are so irritating because none of them build properly thanks to the QList<>::iterator change that I cba to fix every time

@Sneedplex can't you just rebase it and then force push?

@Sneedplex
Copy link

these old PRs are so irritating because none of them build properly thanks to the QList<>::iterator change that I cba to fix every time

@Sneedplex can't you just rebase it?

Yeah but I don't want to push when I've rebased the entirety of develop onto the branch and it's annoying to go back.

@Sneedplex
Copy link

@xslendix i need to push a quick fix turn on maintainer edits again.

@LennyMcLennington
Copy link
Member

Yeah but I don't want to push when I've rebased the entirety of develop onto the branch and it's annoying to go back.

@Sneedplex if you want to rebase the PR onto develop and force push that's fine.

@xslendix xslendix force-pushed the zeke_is_gone_long_live_polymc branch from 260e6fa to 4ff3b8a Compare November 16, 2024 15:51
Copy link
Member

@LennyMcLennington LennyMcLennington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer if you only formatted code that you modified, so that I don't have to look through an entire page of whitespace diffs just to figure out what you changed.

@LennyMcLennington

This comment was marked as resolved.

@AutumnalModding

This comment was marked as resolved.

@xslendix xslendix force-pushed the zeke_is_gone_long_live_polymc branch from 958293e to d9c3907 Compare November 17, 2024 11:46
Signed-off-by: xSlendiX <slendi@socopon.com>
Signed-off-by: xSlendiX <slendi@socopon.com>
Signed-off-by: xSlendiX <slendi@socopon.com>
Signed-off-by: xSlendiX <slendi@socopon.com>
Signed-off-by: xSlendiX <slendi@socopon.com>
Signed-off-by: xSlendiX <slendi@socopon.com>
This patch adds a new column to ModFolderModel which tells the user
which loader the mod was made for. Currently, it cannot tell whether or
not a mod can be loaded with multiple loaders due to limitations in the
way we parse Mod files.

Signed-off-by: xSlendiX <slendi@socopon.com>
Signed-off-by: Slendi <slendi@socopon.com>
@xslendix xslendix force-pushed the zeke_is_gone_long_live_polymc branch from d9c3907 to 56f1e76 Compare November 17, 2024 12:22
@xslendix xslendix marked this pull request as ready for review November 19, 2024 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy