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

Use less ?-operators to improve maintainability #12

Open
topiasv opened this issue Nov 21, 2018 · 0 comments
Open

Use less ?-operators to improve maintainability #12

topiasv opened this issue Nov 21, 2018 · 0 comments
Labels
optimization work-in-progress Issue is being worked upon

Comments

@topiasv
Copy link

topiasv commented Nov 21, 2018

TenKey_Flick.qml and others make heavy use of the ?-operators that make the code difficult to maintain. Usually when the code relies too much on if-else kind of structures, it is doing something inefficiently. Moreover, the ?-operator can actually make it even harder to read than a regular if-else structure. I suggest we find a proper solution for this.

For the TenKey text label for instance we probably only need 3 or 4 different modes and they could be combined somehow more conveniently. Perhaps set up boolean values for each case that get updated when certain conditions are met. They could be hooked up with signals and slots if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimization work-in-progress Issue is being worked upon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant