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

fix #285434 : Certain 2.x frame texts imported with no style #5767

Merged
merged 1 commit into from Apr 14, 2020

Conversation

AntonioBL
Copy link
Contributor

Resolves: https://musescore.org/en/node/285434
The readahead function was not working properly because of the interplay of functions seek() and readline(). When non-single-byte characters were present in at least one of the field, when using seek function inside a QIODevice, the readline function was starting reading at the wrong position: Some two-byte characters were counted as two single-byte characters and thus the reading was starting at an earlier position than expected. The presence of two consecutive Text elements could cause an early return because of the end tag of the first Text element, since the reading action for the second Text could start just before this end tag. By using a parallel XmlReader on the same QIODevice and retrieving with that the full xml content of the Text tag, the text style is now correctly retrieved.

  • 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

@anatoly-os anatoly-os merged commit aad1af4 into musescore:master Apr 14, 2020
@AntonioBL AntonioBL deleted the read206textstyle branch April 18, 2020 11:11
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.

None yet

3 participants