diff options
author | Miroslav Šulc <fordfrog@gentoo.org> | 2020-01-04 15:58:14 +0100 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2020-01-04 15:58:31 +0100 |
commit | cbcd81d0463012d030b33ed6adc50ec87e5f0c03 (patch) | |
tree | 06c11e25fa4559bc8e7d1f32c26b8dd6e7ecdbf3 /media-sound/musescore | |
parent | sci-libs/indilib: 1.8.3 version bump (diff) | |
download | gentoo-cbcd81d0463012d030b33ed6adc50ec87e5f0c03.tar.gz gentoo-cbcd81d0463012d030b33ed6adc50ec87e5f0c03.tar.bz2 gentoo-cbcd81d0463012d030b33ed6adc50ec87e5f0c03.zip |
media-sound/musescore: fixed compilation against qt 5.14
Closes: https://bugs.gentoo.org/703706
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'media-sound/musescore')
-rw-r--r-- | media-sound/musescore/files/5583.patch | 212 | ||||
-rw-r--r-- | media-sound/musescore/musescore-3.3.3.ebuild | 3 | ||||
-rw-r--r-- | media-sound/musescore/musescore-3.3.4.ebuild | 3 | ||||
-rw-r--r-- | media-sound/musescore/musescore-9999.ebuild | 3 |
4 files changed, 218 insertions, 3 deletions
diff --git a/media-sound/musescore/files/5583.patch b/media-sound/musescore/files/5583.patch new file mode 100644 index 000000000000..da4d0c52d041 --- /dev/null +++ b/media-sound/musescore/files/5583.patch @@ -0,0 +1,212 @@ +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/musescore-3.3.3.ebuild b/media-sound/musescore/musescore-3.3.3.ebuild index cd4bca0639e6..e0e03cdcb56f 100644 --- a/media-sound/musescore/musescore-3.3.3.ebuild +++ b/media-sound/musescore/musescore-3.3.3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -54,6 +54,7 @@ RDEPEND="${DEPEND}" PATCHES=( "${FILESDIR}/${PN}-3.0.1-man-pages.patch" + "${FILESDIR}/5583.patch" ) S="${WORKDIR}/MuseScore-${PV}" diff --git a/media-sound/musescore/musescore-3.3.4.ebuild b/media-sound/musescore/musescore-3.3.4.ebuild index cd4bca0639e6..e0e03cdcb56f 100644 --- a/media-sound/musescore/musescore-3.3.4.ebuild +++ b/media-sound/musescore/musescore-3.3.4.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -54,6 +54,7 @@ RDEPEND="${DEPEND}" PATCHES=( "${FILESDIR}/${PN}-3.0.1-man-pages.patch" + "${FILESDIR}/5583.patch" ) S="${WORKDIR}/MuseScore-${PV}" diff --git a/media-sound/musescore/musescore-9999.ebuild b/media-sound/musescore/musescore-9999.ebuild index 6b06e3b852c2..cbaf17ea641c 100644 --- a/media-sound/musescore/musescore-9999.ebuild +++ b/media-sound/musescore/musescore-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -54,6 +54,7 @@ RDEPEND="${DEPEND}" PATCHES=( "${FILESDIR}/${PN}-3.0.1-man-pages.patch" + "${FILESDIR}/5583.patch" ) src_unpack() { |