redo it in multiple smaller patches
[alioth/musescore.git] / debian / patches / experiments / note-accessibleInfo-const.diff
1 Description: Add Note::accessibleInfoConst()
2 Author: mirabilos <m@mirbsd.org>
3 Forwarded: no
4 Justification: when forwarding it’ll be better to make them all const
5
6 --- a/libmscore/note.cpp
7 +++ b/libmscore/note.cpp
8 @@ -2642,7 +2642,7 @@ void Note::setScore(Score* s)
9  //   accessibleInfo
10  //---------------------------------------------------------
11  
12 -QString Note::accessibleInfo()
13 +QString Note::accessibleInfoConst() const
14        {
15        QString duration = chord()->durationUserName();
16        QString voice = tr("Voice: %1").arg(QString::number(track() % VOICES + 1));
17 @@ -2664,6 +2664,11 @@ QString Note::accessibleInfo()
18        return tr("%1; Pitch: %2; Duration: %3%4").arg(noteTypeUserName()).arg(pitchName).arg(duration).arg((chord()->isGrace() ? "" : QString("; %1").arg(voice)));
19        }
20  
21 +QString Note::accessibleInfo()
22 +      {
23 +      return this->accessibleInfoConst();
24 +      }
25 +
26  //---------------------------------------------------------
27  //   screenReaderInfo
28  //---------------------------------------------------------
29 --- a/libmscore/note.h
30 +++ b/libmscore/note.h
31 @@ -464,6 +464,8 @@ class Note : public Element {
32        virtual QString accessibleInfo() override;
33        virtual QString screenReaderInfo() override;
34        virtual QString accessibleExtraInfo() override;
35 +      // for the synthesiser
36 +      QString accessibleInfoConst() const;
37        };
38  
39  // extern const SymId noteHeads[2][int(NoteHead::Group::HEAD_GROUPS)][int(NoteHead::Type::HEAD_TYPES)];