convert qDebug();abort() to qFatal() and if(cond) abort() to
Q_ASSERT(!cond), esp. for the benefit of Windows, where it is impossible
to set a breakpoint on the abort()
Also modernizing mscoreMessageHandler() and making it more informative
by adding file, line and function to the output.
Background: the MScore objects has two reference styles:
- _baseStyle, which is inited to the built-in default style (common to all MuseScore copies)
- _defaultStyle which is inited to the user-defined default style
They are equal in a default installation but become different as soon as the user chooses a custom default style in the Preferences.
Issues:
- score style are saved as delta from the user-default style for texts and for articulations and as delta from the built-in default for the rest
- when the score is read back from file, it is inited to the user-default style and styles are read as a delta from it.
This makes:
- different parts of the saved style inconsistent among themselves
- styles saved in the score non-portable across different MuseScore copies (with potentially different user-default styles)
Fix:
- all style parts are saved as delta from the built-in default (to be portable)
- score is inited to built-in default style before being read from file.
Note: it is expected that users with custom default styles notice style differences when reading scores saved with previous 2.0 commits, as they were saved as delta from their respective user default styles.
For now, the capo position is a ChordName style setting. In the
future, it can be enhanced to allow capo position to be changed
within a score, using something like TempoMap or TimeSigMap.
If capo position is non-zero, the chord to be played with capo
applied is shown in brackets after the standard chord.
Signed-off-by: lasconic <lasconic@gmail.com>
Recent changes to default style chordlist handling resulted in imported
scores never loading a chord list at all, causing them to render
incorrectly (no root or bass). This is a proposed fix for that specific
issue that also addresses other potential problems in chordlist handling
(honoring the distinction between a truly empty chordlist and one that
merely contains no chord id's but does contain sym & token definitions).