add more backported fixes
authormirabilos <tg@debian.org>
Thu, 30 Jul 2020 21:42:48 +0000 (23:42 +0200)
committermirabilos <mirabilos@evolvis.org>
Thu, 30 Jul 2020 21:42:48 +0000 (23:42 +0200)
debian/changelog
debian/patches/experiments/statusline-concert-transposing-pitch.diff
debian/patches/experiments/upstream-backend-fixes.diff
debian/patches/series
debian/patches/upstream/crash-del-hbox.diff [new file with mode: 0644]
debian/patches/upstream/crash-drag.diff [new file with mode: 0644]
debian/patches/upstream/crash-fontname.diff [new file with mode: 0644]
debian/patches/upstream/crash-triplet.diff [new file with mode: 0644]
debian/patches/upstream/fix-staffidx.diff [new file with mode: 0644]
debian/patches/upstream/pitch-Cb-B#.diff
debian/patches/upstream/pitch-ottava.diff [new file with mode: 0644]

index af72fdb..21608e0 100644 (file)
@@ -1,16 +1,22 @@
-musescore2 (2.3.2+dfsg3-10) UNRELEASED; urgency=medium
+musescore2 (2.3.2+dfsg3-9) unstable; urgency=medium
 
-  * Quieten another G++ warning that upstream should fix
+  * Quieten another G++ warning that’s upstream’s job
   * Fix SMuFL typo
   * Apply some upstream/backported patches:
     - Synthesiser: char vs signed char mismatch
+    - crash on drag/drop
+    - insertStaff: set idx, so spacer down works
+    - erasing a HBox crashed
+    - crash when changing a triplet’s rest’s duration
     - Pianoroll: don’t store redundant/default values in XML
     - ottava font too big
+    - fix pitch and accidental line used for ottavas
     - Preferences: radio buttons for sound in dialogue
     - bad octave for B♯ and C♭
+    - crash on selecting a font
     - Desktop file: StartupWMClass to allow icon grouping
 
- -- Thorsten Glaser <tg@mirbsd.de>  Thu, 30 Jul 2020 20:07:56 +0200
+ -- Thorsten Glaser <tg@mirbsd.de>  Thu, 30 Jul 2020 23:42:04 +0200
 
 musescore2 (2.3.2+dfsg3-8) wtf; urgency=low
 
index a1335f8..f398b60 100644 (file)
@@ -14,7 +14,7 @@ Forwarded: https://github.com/musescore/MuseScore/pull/5036
 
 --- a/libmscore/note.cpp
 +++ b/libmscore/note.cpp
-@@ -2652,6 +2652,13 @@ QString Note::accessibleInfoConst() cons
+@@ -2665,6 +2665,13 @@ QString Note::accessibleInfoConst() cons
              pitchName = chord()->noStem() ? tr("Beat Slash") : tr("Rhythm Slash");
        else if (staff()->isDrumStaff() && drumset)
              pitchName = qApp->translate("drumset", drumset->name(pitch()).toUtf8().constData());
index 7a82dcf..e9c3952 100644 (file)
@@ -26,7 +26,7 @@
              Sym::lnhash.insert(i, SymId(index++));
 --- a/libmscore/undo.cpp
 +++ b/libmscore/undo.cpp
-@@ -1685,7 +1685,7 @@ RemoveElement::RemoveElement(Element* e)
+@@ -1686,7 +1686,7 @@ RemoveElement::RemoveElement(Element* e)
  void RemoveElement::cleanup(bool undo)
        {
        if (undo) {
index 12ee61c..3842f29 100644 (file)
@@ -15,10 +15,16 @@ upstream/note-accessibleInfo-const.diff
 upstream/file-dialogues.diff
 upstream/update-AppData.diff
 upstream/synth-glitches.diff
+upstream/crash-drag.diff
+upstream/fix-staffidx.diff
+upstream/crash-del-hbox.diff
+upstream/crash-triplet.diff
 upstream/save-no-redundant.diff
 upstream/ottava-size.diff
+upstream/pitch-ottava.diff
 upstream/prefs-radio.diff
 upstream/pitch-Cb-B#.diff
+upstream/crash-fontname.diff
 upstream/wmclass.diff
 debian-specific/fixup-AppData.diff
 experiments/upstream-backend-fixes.diff
diff --git a/debian/patches/upstream/crash-del-hbox.diff b/debian/patches/upstream/crash-del-hbox.diff
new file mode 100644 (file)
index 0000000..f0da722
--- /dev/null
@@ -0,0 +1,20 @@
+Origin: upstream, commit:24e239ed74770e24d2981883d5d435302735567a
+Author: Dmitri Ovodok <dmitrio95@yandex.ru>
+Description: Fix a crash on removing HBox from a score
+
+--- a/libmscore/box.cpp
++++ b/libmscore/box.cpp
+@@ -467,9 +467,12 @@ void HBox::layout()
+             setPos(x, y);
+             bbox().setRect(0.0, 0.0, w, h);
+             }
+-      else {
++      else if (system()) {
+             bbox().setRect(0.0, 0.0, point(boxWidth()), system()->height());
+             }
++      else {
++            bbox().setRect(0.0, 0.0, 50, 50);
++            }
+       Box::layout();
+       adjustReadPos();
+       }
diff --git a/debian/patches/upstream/crash-drag.diff b/debian/patches/upstream/crash-drag.diff
new file mode 100644 (file)
index 0000000..28ea377
--- /dev/null
@@ -0,0 +1,31 @@
+Origin: upstream, commit:484cd7e81e378f0fedf26ecd0a4d6cd5b77d3c61
+Author: MarcSabatella <marc@outsideshore.com>
+Description: fix #297152: crash on Ctrl+Shift+drag on Linux (under ChromeOS)
+ Resolves: https://musescore.org/en/node/297152
+ .
+ This might be unique to Linux apps on ChromeOS,
+ or it might apply to other Debian "stretch systems",
+ but apparently passing in a null or 1x1 pixmap to a QDrag
+ causes it to crash on exec().
+ This PR fixes the problem by making the pixmap 2x2.
+ It also allocates it statically to be sure there is no issue
+ with it coming off the stack.
+ I also replaced the deprecated QDrag::start() call with QDrag::exec(),
+ which we already do when dragging *from* the palette.
+ This is recommended as per Qt guidelines.
+
+--- a/mscore/scoreview.cpp
++++ b/mscore/scoreview.cpp
+@@ -4842,8 +4842,10 @@ void ScoreView::cloneElement(Element* e)
+             e = static_cast<SpannerSegment*>(e)->spanner();
+       mimeData->setData(mimeSymbolFormat, e->mimeData(QPointF()));
+       drag->setMimeData(mimeData);
+-      drag->setPixmap(QPixmap());
+-      drag->start(Qt::CopyAction);
++      static QPixmap pixmap = QPixmap(2, 2);    // null or 1x1 crashes on Linux under ChromeOS?!
++      pixmap.fill(Qt::white);
++      drag->setPixmap(pixmap);
++      drag->exec(Qt::CopyAction);
+       }
+ //---------------------------------------------------------
diff --git a/debian/patches/upstream/crash-fontname.diff b/debian/patches/upstream/crash-fontname.diff
new file mode 100644 (file)
index 0000000..4fb4b5b
--- /dev/null
@@ -0,0 +1,50 @@
+Origin: backport, commit:443ead70ac77c655095a67bfc0978145fda0c5de
+Author: Matt McClinch <mattmcclinch@gmail.com>
+Description: Fix #303619: MuseScore crashing when entering font name
+ Resolves: https://musescore.org/en/node/303619.
+ .
+ Passing an empty string to QWidget::setStyleSheet() causes the widget's
+ current style sheet to be removed, thus causing the widget's style to be
+ inherited from its parent. This creates a problem in QComboBox::showPopup(),
+ where it becomes possible that a pointer to a QStyle object could used after
+ the object itself has been destroyed. A style sheet of " " can be used to
+ override any previous style sheet without invalidating the current QStyle
+ object.
+
+--- a/mscore/inspector/inspectorBase.cpp
++++ b/mscore/inspector/inspectorBase.cpp
+@@ -278,8 +278,8 @@ void InspectorBase::checkDifferentValues
+                   }
+             QColor c(preferences.globalStyle == MuseScoreStyleType::DARK ? Qt::yellow : Qt::blue);
+-            // ii.w->setStyleSheet(valuesAreDifferent ? QString("* { color: %1 }").arg(MScore::selectColor[0].name()) : "");
+-            ii.w->setStyleSheet(valuesAreDifferent ? QString("* { color: %1 }").arg(c.name()) : "");
++            // ii.w->setStyleSheet(valuesAreDifferent ? QString("* { color: %1 }").arg(MScore::selectColor[0].name()) : " ");
++            ii.w->setStyleSheet(valuesAreDifferent ? QString("* { color: %1 }").arg(c.name()) : " ");
+             }
+       //deal with reset if only one element, or if values are the same
+@@ -293,12 +293,12 @@ void InspectorBase::checkDifferentValues
+                   reset = false;
+                   }
+             else if (styledValue == PropertyStyle::UNSTYLED) {
+-                  ii.w->setStyleSheet("");
++                  ii.w->setStyleSheet(" ");
+                   reset = true;
+                   }
+             else {
+                   reset = !isDefault(ii);
+-                  ii.w->setStyleSheet("");
++                  ii.w->setStyleSheet(" ");
+                   }
+             if (ii.r)
+                   ii.r->setEnabled(reset);
+@@ -306,7 +306,7 @@ void InspectorBase::checkDifferentValues
+       else {
+             if (ii.r)
+                   ii.r->setEnabled(true);
+-            ii.w->setStyleSheet("");
++            ii.w->setStyleSheet(" ");
+             }
+       }
diff --git a/debian/patches/upstream/crash-triplet.diff b/debian/patches/upstream/crash-triplet.diff
new file mode 100644 (file)
index 0000000..9ef1828
--- /dev/null
@@ -0,0 +1,17 @@
+Origin: backport, commit:f654f707997610f7de96eeaeadda1ad296034630
+Author: Rory McLeod <mcleodnw@gmail.com>
+Description: fix #285040 crash when changing a triplet's rest's duration
+ - Prevent a null pointer deref when searching a linked tuplet.
+
+--- a/libmscore/undo.cpp
++++ b/libmscore/undo.cpp
+@@ -1419,7 +1419,8 @@ void Score::undoAddCR(ChordRest* cr, Mea
+                               if (nt == 0)
+                                     qDebug("linked tuplet not found");
+                               }
+-                        newcr->setTuplet(nt);
++                        if (nt)
++                              newcr->setTuplet(nt);
+                         }
+                   }
+             undo(new AddElement(newcr));
diff --git a/debian/patches/upstream/fix-staffidx.diff b/debian/patches/upstream/fix-staffidx.diff
new file mode 100644 (file)
index 0000000..936d63e
--- /dev/null
@@ -0,0 +1,26 @@
+Origin: upstream, commit:1d56d5564bf3079055dbc8fcbd23469045c292b4
+Author: MarcSabatella <marc@outsideshore.com>
+Description: fix #281253: staff spacer down ignored on bottom of page
+ Resolves: https://musescore.org/en/node/281253
+ .
+ A staff spacer on the bottom system of a page does not work correctly:
+ we are looking foir a spacer on the *first* staff rather than the *last*.
+ So a spacer on the last staff is ignored, and one on the first is used
+ when it shouldn't be.
+ .
+ The code to calculate the amount of spacer required below the last
+ system of a page relies on System::lastVisibleSysStaff(),
+ which is return the correct SysStaff, but we are then attempting
+ to access the idx member, which has never been set up and is always 0.
+ Fix is to initialize idx when setting up the list of staves.
+
+--- a/libmscore/system.cpp
++++ b/libmscore/system.cpp
+@@ -114,6 +114,7 @@ System::~System()
+ SysStaff* System::insertStaff(int idx)
+       {
+       SysStaff* staff = new SysStaff;
++      staff->idx = idx;
+       if (idx) {
+             // HACK: guess position
+             staff->rbb().setY(_staves[idx-1]->y() + 6 * spatium());
index cf8d9d6..e83b20e 100644 (file)
@@ -14,8 +14,8 @@ Description: fix #290987: B# and Cb octave change
  QString Note::tpcUserName(bool explicitAccidental) const
        {
        QString pitchName = tpc2name(tpc(), NoteSpellingType::STANDARD, NoteCaseType::AUTO, explicitAccidental);
--      QString octaveName = QString::number((epitch() / 12) - 1);
-+      QString octaveName = QString::number(((epitch() - int(tpc2alter(tpc()))) / 12) - 1);
+-      QString octaveName = QString::number(((epitch() + ottaveCapoFret()) / 12) - 1);
++      QString octaveName = QString::number(((epitch() + ottaveCapoFret() - int(tpc2alter(tpc()))) / 12) - 1);
        return pitchName + (explicitAccidental ? " " : "") + octaveName;
        }
  
diff --git a/debian/patches/upstream/pitch-ottava.diff b/debian/patches/upstream/pitch-ottava.diff
new file mode 100644 (file)
index 0000000..e901640
--- /dev/null
@@ -0,0 +1,80 @@
+Origin: backport, commit:66be5a18fa40a6358b0a78723adcd42f15176fcc
+Author: Niek van den Berg <njvdberg@xs4all.nl>
+Description: fix #293593 - Issues with ottavas
+ Corrects first problem: Status doesn't display the pitch of note that have an
+ ottave line. This is solved in Note::tpcUserName().
+ .
+ Solves the second problem in issue 293593: Accidentals do apply if 8va sign is added.
+ This is solved in Note::updateAccidental(). All calculations are based on the
+ effective pitch of the a note rather than the actual pitch. The solution now
+ takes to ottava signs into account by using the actual pitch.
+ .
+ For easily find out whether an ottava is applied, a new method ottavaCapoFret()
+ is added which returns the pitch offset by an ottava (or capo fret). To prevent
+ code dublication, ppitch() also use this new ottavaCapoFret() method.
+
+--- a/libmscore/note.cpp
++++ b/libmscore/note.cpp
+@@ -415,7 +415,7 @@ int Note::tpc() const
+ QString Note::tpcUserName(bool explicitAccidental) const
+       {
+       QString pitchName = tpc2name(tpc(), NoteSpellingType::STANDARD, NoteCaseType::AUTO, explicitAccidental);
+-      QString octaveName = QString::number((epitch() / 12) - 1);
++      QString octaveName = QString::number(((epitch() + ottaveCapoFret()) / 12) - 1);
+       return pitchName + (explicitAccidental ? " " : "") + octaveName;
+       }
+@@ -1923,11 +1923,12 @@ void Note::updateAccidental(AccidentalSt
+             AccidentalVal accVal = tpc2alter(tpc());
+             bool error = false;
+-            AccidentalVal relLineAccVal = as->accidentalVal(relLine, error);
++            int eRelLine = absStep(tpc(), epitch()+ottaveCapoFret());
++            AccidentalVal relLineAccVal = as->accidentalVal(eRelLine, error);
+             if (error)
+                   return;
+-            if ((accVal != relLineAccVal) || hidden() || as->tieContext(relLine)) {
+-                  as->setAccidentalVal(relLine, accVal, _tieBack != 0);
++            if ((accVal != relLineAccVal) || hidden() || as->tieContext(eRelLine)) {
++                  as->setAccidentalVal(eRelLine, accVal, _tieBack != 0);
+                   acci = Accidental::value2subtype(accVal);
+                   // if previous tied note has same tpc, don't show accidental
+                   if (_tieBack && _tieBack->startNote()->tpc1() == tpc1())
+@@ -2175,6 +2176,18 @@ void Note::setHeadGroup(NoteHead::Group
+       }
+ //---------------------------------------------------------
++//   ottaveCapoFret
++//    offset added by Ottava's and Capo Fret.
++//---------------------------------------------------------
++
++int Note::ottaveCapoFret() const
++      {
++      Chord* ch = chord();
++
++      return staff()->pitchOffset(ch->segment()->tick());
++      }
++
++//---------------------------------------------------------
+ //   ppitch
+ //    playback pitch
+ //---------------------------------------------------------
+@@ -2192,7 +2205,7 @@ int Note::ppitch() const
+                         return div.pitch;
+                   }
+             }
+-      return _pitch + staff()->pitchOffset(ch->segment()->tick());
++      return _pitch + ottaveCapoFret();
+       }
+--- a/libmscore/note.h
++++ b/libmscore/note.h
+@@ -296,6 +296,7 @@ class Note : public Element {
+       void undoSetPitch(int val);
+       void setPitch(int pitch, int tpc1, int tpc2);
+       int pitch() const                   { return _pitch;    }
++      int ottaveCapoFret() const;
+       int ppitch() const;           ///< playback pitch
+       int epitch() const;           ///< effective pitch
+       qreal tuning() const                { return _tuning;   }