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

[MU4] Fix #311986: handle duplicate voltas #6904

Merged

Conversation

jeetee
Copy link
Contributor

@jeetee jeetee commented Nov 21, 2020

Resolves: https://musescore.org/en/node/311986

Cherry pick of PR #6810 from 3.x to master

  • I signed CLA
  • I made sure the code in the PR follows the coding rules
  • I made sure the code compiles on my machine
  • I made sure there are no unnecessary changes in the code
  • I made sure the title of the PR reflects the core meaning of the issue you are solving
  • I made sure the commit message(s) contain a description and answer the question "Why do those changes fix that particular issue?" or "Why are those changes really necessary as improvements?"
  • I made sure the commit message title starts with "fix #424242:" if there is a related issue
  • I created the test (mtest, vtest, script test) to verify the changes I made

@vpereverzev
Copy link
Member

https://github.com/musescore/MuseScore/pull/6904/checks?check_run_id=1436848735
code style check failure, should be easy to fix

@jeetee
Copy link
Contributor Author

jeetee commented Nov 22, 2020

I don't have uncrustify locally, and QtCreator seemed happy. Especially those multiline function arguments is what it does by default when using the Qt codestyle.
Do we have a style file for QtCreator as we did for 3.x ?

I'll apply those changes but FWIW I'm rather against the requirement to place the pointer indicator concatenated with the type name (being fully aware that this is somewhat a "holy war" point for many). My arguments against it are:

  1. A T* itself isn't a type, the '*' itself is the type
  2. It breaks style as soon as const comes into play, something that is very important to convey code intent
  3. It completely break style when volatile comes into play (admittedly, as we're not doing hardware interfacing as much, this is probably a moot worry in the MS codebase).
  4. (I might be biased here because of this) Coding safety standards such as the Barr standard call for the space to be there as a lexical safety rule.
    Note that this only applies to the pointer type, not to the reference indicator, which should be concatenated.

@jeetee jeetee force-pushed the mu4-311986-handle-duplicate-voltas branch from 52a82f5 to b0b4e76 Compare November 22, 2020 22:53
Fixed initial voltas having the same start crash
Also handles overlapping voltas by splitting them into non-overlapping voltas with cross-section repeatlists
@jeetee jeetee force-pushed the mu4-311986-handle-duplicate-voltas branch from b0b4e76 to 135ccb5 Compare November 22, 2020 23:05
@jeetee
Copy link
Contributor Author

jeetee commented Nov 22, 2020

@vpereverzev ready

@igorkorsukov igorkorsukov merged commit ef4f173 into musescore:master Nov 23, 2020
@jeetee jeetee deleted the mu4-311986-handle-duplicate-voltas branch November 23, 2020 12:19
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.

3 participants