This prevents a bug in 3.0 whereby musescore would be killed if set text size to 0.
I also put in a Q_ASSERT into CharFormat::setFontSize() to ensure FontSize is positive real.
If editing Chinese or Japanese text, musescore previously did not tell the operating system where to position its InputMethod popup window, and would default in middle of the bottom edge of the scoreview (as is apparently the default for a QWidget).
This code implements inputMethodQuery, which is inheirited from QWidget, and returns a QRectF when receiving an ImCursorRectangle query if the scoreview is currently editing a text object. Will position the InputMethod just below the cursor, if it exists, or if not just below the text object's bounding rect.
Any operations dealing with Supplemental Unicode must operate on high & low surrogates simulatenously, since they belong together as a pair:
-Text::insert method has a new version of which takes two QChars as input (the high & low surrogates), and inserts them together before incrementing the cursor.
-TextBlock::fragment method now has return parameter ridx (relative QChar index) in addition to rcol (relative cursor position). For Basic Unicode TextFragments, ridx will be same as rcol, since each Basic Unicode char is one QChar. But for text that has Supplemental Unicode, ridx will be be different since each Supplemental Unicode char is two QChars.
-TextBlock::text method now includes any high surrogate QChars in the returned string. Previously, this method simply skipped over QChars that were high surrogates. When iterating over the TextFragment, only increments col when comming across a QChar that is not a high surrogate.
-Text::createLayout, Text::paste and Text::drop methods now uses the new Text::insert method to insert both high & low surrogates together. Previously, the cursor position would get messed up when each QChar was added seperately.
-TextBlock::remove(int start, int n) will now add both QChars of the surrogate pair to the return string.
Also was issue with adding text after a SMUFL symbol if the cursor mode was already in SMUFL. Fixed by making sure to append a new TextFragment regardless of state of cursor, and also making TextFragment::TextFragment(TextCursor* cursor, const QString& s) constructor set the type to CharFormatType::TEXT.
Previously TextBlock::remove() did not delete Supplementary Multilingual Plane Unicode chars correctly.
Added tests using deletePreviousChar() for SMP Unicode as well as regular BMP Unicode as well as for text that has mixed BMP, SMP, and SMUFL symbols.