diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-04-12 03:41:30 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-04-12 03:41:30 +0100 |
commit | 623ee73d661e5ed8475cb264511f683407d87365 (patch) | |
tree | 993eb27c93ec7a2d2d19550300d888fc1fed9e69 /media-sound/musescore/files | |
parent | ceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff) |
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'media-sound/musescore/files')
-rw-r--r-- | media-sound/musescore/files/5583.patch | 212 | ||||
-rw-r--r-- | media-sound/musescore/files/musescore-9999-lambda-capture-this.patch | 13 |
2 files changed, 13 insertions, 212 deletions
diff --git a/media-sound/musescore/files/5583.patch b/media-sound/musescore/files/5583.patch deleted file mode 100644 index da4d0c52d041..000000000000 --- a/media-sound/musescore/files/5583.patch +++ /dev/null @@ -1,212 +0,0 @@ -From 09d138946aad53962ce23298093747f0ce52304f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= <jerome.duval@gmail.com> -Date: Tue, 31 Dec 2019 17:39:34 +0100 -Subject: [PATCH 1/2] Specializes template routines. - -Qt 5.14 introduces serialisation/deserialisation for enum classes, -this results in ambiguous templates between qdatastream.h and preferences.h. -we specialize everything to workaround this. ---- - mscore/preferences.h | 41 ++++++++++++++++++++++++++++++++++++----- - 1 file changed, 36 insertions(+), 5 deletions(-) - -diff --git a/mscore/preferences.h b/mscore/preferences.h -index bef3df8536..8c3ac9b0ed 100644 ---- a/mscore/preferences.h -+++ b/mscore/preferences.h -@@ -233,21 +233,52 @@ extern Preferences preferences; - - // Stream operators for enum classes - // enum classes don't play well with QSettings without custom serialization --template<typename T, typename std::enable_if<std::is_enum<T>::value>::type* = nullptr> --inline QDataStream &operator<<(QDataStream &out, const T &val) -+inline QDataStream& -+operator<<(QDataStream &out, const Ms::MuseScoreStyleType &val) - { - return out << static_cast<int>(val); - } - --template<typename T, typename std::enable_if<std::is_enum<T>::value>::type* = nullptr> --inline QDataStream &operator>>(QDataStream &in, T &val) -+inline QDataStream& -+operator>>(QDataStream &in, Ms::MuseScoreStyleType &val) - { - int tmp; - in >> tmp; -- val = static_cast<T>(tmp); -+ val = static_cast<Ms::MuseScoreStyleType>(tmp); - return in; - } - -+inline QDataStream& -+operator<<(QDataStream &out, const Ms::SessionStart &val) -+{ -+ return out << static_cast<int>(val); -+} -+ -+inline QDataStream& -+operator>>(QDataStream &in, Ms::SessionStart &val) -+{ -+ int tmp; -+ in >> tmp; -+ val = static_cast<Ms::SessionStart>(tmp); -+ return in; -+} -+ -+inline QDataStream& -+operator<<(QDataStream &out, const Ms::MusicxmlExportBreaks &val) -+{ -+ return out << static_cast<int>(val); -+} -+ -+inline QDataStream& -+operator>>(QDataStream &in, Ms::MusicxmlExportBreaks &val) -+{ -+ int tmp; -+ in >> tmp; -+ val = static_cast<Ms::MusicxmlExportBreaks>(tmp); -+ return in; -+} -+ -+ - class PreferenceVisitor { - public: - virtual void visit(QString key, IntPreference*) = 0; - -From 6b759bb5ee7b83fd8a82429e4cdb74279c5d33b6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= <jerome.duval@gmail.com> -Date: Tue, 31 Dec 2019 17:42:04 +0100 -Subject: [PATCH 2/2] fix warnings: replace QString::null, with QString() - ---- - mscore/capella.cpp | 2 +- - mscore/importmidi/importmidi.cpp | 2 +- - mscore/instrdialog.cpp | 2 +- - mscore/musescore.cpp | 12 ++++++------ - mscore/musescore.h | 2 +- - mscore/network/loginmanager.cpp | 2 +- - 6 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/mscore/capella.cpp b/mscore/capella.cpp -index 7144414e32..6243c8cca6 100644 ---- a/mscore/capella.cpp -+++ b/mscore/capella.cpp -@@ -2708,7 +2708,7 @@ Score::FileError importCapella(MasterScore* score, const QString& name) - QMessageBox::warning(0, - QWidget::tr("Import Capella"), - QWidget::tr("Load failed: %1").arg(cf.error(errNo)), -- QString::null, QWidget::tr("Quit"), QString::null, 0, 1); -+ QString(), QWidget::tr("Quit"), QString(), 0, 1); - } - fp.close(); - // avoid another error message box -diff --git a/mscore/importmidi/importmidi.cpp b/mscore/importmidi/importmidi.cpp -index a5d8894686..8091a83369 100644 ---- a/mscore/importmidi/importmidi.cpp -+++ b/mscore/importmidi/importmidi.cpp -@@ -1200,7 +1200,7 @@ Score::FileError importMidi(MasterScore *score, const QString &name) - QMessageBox::warning(0, - QWidget::tr("Load MIDI"), - QWidget::tr("Load failed: %1").arg(errorText), -- QString::null, QWidget::tr("Quit"), QString::null, 0, 1); -+ QString(), QWidget::tr("Quit"), QString(), 0, 1); - } - fp.close(); - qDebug("importMidi: bad file format"); -diff --git a/mscore/instrdialog.cpp b/mscore/instrdialog.cpp -index fa7bacd622..8d81fe9e20 100644 ---- a/mscore/instrdialog.cpp -+++ b/mscore/instrdialog.cpp -@@ -138,7 +138,7 @@ void InstrumentsDialog::on_loadButton_clicked() - QMessageBox::warning(0, - QWidget::tr("Load Style Failed"), - QString(strerror(errno)), -- QString::null, QWidget::tr("Quit"), QString::null, 0, 1); -+ QString(), QWidget::tr("Quit"), QString(), 0, 1); - return; - } - instrumentsWidget->buildTemplateList(); -diff --git a/mscore/musescore.cpp b/mscore/musescore.cpp -index dd4a4b95ca..07cb596abe 100644 ---- a/mscore/musescore.cpp -+++ b/mscore/musescore.cpp -@@ -4013,7 +4013,7 @@ bool MuseScore::readLanguages(const QString& path) - QMessageBox::warning(0, - QWidget::tr("Load Languages Failed:"), - error, -- QString::null, QWidget::tr("Quit"), QString::null, 0, 1); -+ QString(), QWidget::tr("Quit"), QString(), 0, 1); - return false; - } - -@@ -6753,7 +6753,7 @@ bool MuseScore::saveMp3(Score* score, const QString& name) - QMessageBox::warning(0, - tr("Encoding Error"), - tr("Unable to open target file for writing"), -- QString::null, QString::null); -+ QString(), QString()); - } - return false; - } -@@ -6792,7 +6792,7 @@ bool MuseScore::saveMp3(Score* score, QIODevice* device, bool& wasCanceled) - QMessageBox::warning(0, - tr("Error Opening LAME library"), - tr("Could not open MP3 encoding library!"), -- QString::null, QString::null); -+ QString(), QString()); - qDebug("Could not open MP3 encoding library!"); - return false; - } -@@ -6804,7 +6804,7 @@ bool MuseScore::saveMp3(Score* score, QIODevice* device, bool& wasCanceled) - QMessageBox::warning(0, - tr("Error Opening LAME library"), - tr("Not a valid or supported MP3 encoding library!"), -- QString::null, QString::null); -+ QString(), QString()); - qDebug("Not a valid or supported MP3 encoding library!"); - return false; - } -@@ -6829,7 +6829,7 @@ bool MuseScore::saveMp3(Score* score, QIODevice* device, bool& wasCanceled) - if (!MScore::noGui) { - QMessageBox::warning(0, tr("Encoding Error"), - tr("Unable to initialize MP3 stream"), -- QString::null, QString::null); -+ QString(), QString()); - } - qDebug("Unable to initialize MP3 stream"); - MScore::sampleRate = oldSampleRate; -@@ -6996,7 +6996,7 @@ bool MuseScore::saveMp3(Score* score, QIODevice* device, bool& wasCanceled) - QMessageBox::warning(0, - tr("Encoding Error"), - tr("Error %1 returned from MP3 encoder").arg(bytes), -- QString::null, QString::null); -+ QString(), QString()); - break; - } - else -diff --git a/mscore/musescore.h b/mscore/musescore.h -index 434072a12f..d8089a345c 100644 ---- a/mscore/musescore.h -+++ b/mscore/musescore.h -@@ -142,7 +142,7 @@ struct LanguageItem { - LanguageItem(const QString k, const QString n) { - key = k; - name = n; -- handbook = QString::null; -+ handbook = QString(); - } - LanguageItem(const QString k, const QString n, const QString h) { - key = k; -diff --git a/mscore/network/loginmanager.cpp b/mscore/network/loginmanager.cpp -index 7bcfd892e0..4abf7e3e4e 100644 ---- a/mscore/network/loginmanager.cpp -+++ b/mscore/network/loginmanager.cpp -@@ -680,7 +680,7 @@ void LoginManager::mediaUploadFinished() - QMessageBox::warning(0, - tr("Upload Error"), - tr("Sorry, MuseScore couldn't upload the audio file. Error %1").arg(e), -- QString::null, QString::null); -+ QString(), QString()); - } - } - diff --git a/media-sound/musescore/files/musescore-9999-lambda-capture-this.patch b/media-sound/musescore/files/musescore-9999-lambda-capture-this.patch new file mode 100644 index 000000000000..c0bb7083324d --- /dev/null +++ b/media-sound/musescore/files/musescore-9999-lambda-capture-this.patch @@ -0,0 +1,13 @@ +diff --git a/mscore/scoreview.cpp b/mscore/scoreview.cpp +index 9804e1f32..83e0c0e47 100644 +--- a/mscore/scoreview.cpp ++++ b/mscore/scoreview.cpp +@@ -2405,7 +2405,7 @@ void ScoreView::cmd(const char* s) + cv->updateGrips(); + }}, + #ifdef OMR +- {{"show-omr"}, [](ScoreView* cv, const QByteArray&) { ++ {{"show-omr"}, [&](ScoreView* cv, const QByteArray&) { + if (cv->score()->masterScore()->omr()) + showOmr(!_score->masterScore()->showOmr()); + }}, |