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 #181811 validate instrument text name after editing #3078

Merged
merged 1 commit into from
Mar 20, 2017

Conversation

ericfont
Copy link
Contributor

I've tested this and verified that the validateText(s) I inserted here properly changes an '&' into an 'amp;'

@@ -73,6 +73,11 @@ void InstrumentName::endEdit()

QString s = plainText();

if (!validateText(s)) {
qWarning("The instrument name is invalid.");
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe qWarning("Invalid instrument name: <%s>", s.toUtf8().data());?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure...let me repush.

@ericfont
Copy link
Contributor Author

I've sucessfully saved as mscz after inserting the '&' and I've verified that I can open the file again and I see the & displayed as instrument text.

@Jojo-Schmitz
Copy link
Contributor

should go to master and 2.1

@ericfont
Copy link
Contributor Author

@Jojo-Schmitz I just saw your message on IRC: does it fix flat ?

But I didn't test that yet...I have already switched my code base back to master...I will have to swap back in an hour or so to test what you suggested...

@Jojo-Schmitz
Copy link
Contributor

It should fix that too, along with bold, italic etc.

@ericfont
Copy link
Contributor Author

Yeah, I would expect validateText would do all sorts of such fixups.

@lasconic
Copy link
Contributor

Clicking on an instrument name causes a crash for me in master. So I don't manage to test this PR. I guess it can't harm...

@ericfont
Copy link
Contributor Author

@lasconic yes. as you might recall there were a few different crashes I discovered with clicking on instrument names, which is a seperate issue I have no idea how to fix. But this PR is still needed and will do no harm.

@lasconic lasconic merged commit c351a0e into musescore:master Mar 20, 2017
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