mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
musescore: fix build with Qt 5.14
fix deskbar link
This commit is contained in:
@@ -9,7 +9,7 @@ CHECKSUM_SHA256="d6e58c942efd4e9b6567705c81b77287acfe0baa99033b3fb96605698bb9b5a
|
||||
SOURCE_DIR="MuseScore-$portVersion"
|
||||
PATCHES="musescore-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 ?x86_64"
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="!x86"
|
||||
|
||||
PROVIDES="
|
||||
@@ -76,8 +76,5 @@ INSTALL()
|
||||
make install PREFIX=$appsDir/MuseScore UPDATE_CACHE=FALSE BUILD_PULSEAUDIO=OFF \
|
||||
BUILD_JACK=OFF BUILD_PORTAUDIO=OFF BUILD_WEBENGINE=OFF \
|
||||
USE_SYSTEM_FREETYPE=ON DOWNLOAD_SOUNDFONT=OFF BUILD_ALSA=OFF
|
||||
rm -rf $appsDir/MuseScore/share/icons $appsDir/MuseScore/share/applications/mscore.desktop
|
||||
mv $appsDir/MuseScore/share $appsDir/MuseScore/data
|
||||
ln -s $binDir/mscore $appsDir/MuseScore
|
||||
addAppDeskbarSymlink $appsDir/Musescore
|
||||
addAppDeskbarSymlink "$appsDir"/MuseScore/bin/musescore MuseScore
|
||||
}
|
||||
|
||||
@@ -51,3 +51,247 @@ index 8033b35..b87b241 100644
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
From 36e8607973af8f9d51ca6d9b68848ce9eeb20b40 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 31 Dec 2019 17:39:34 +0100
|
||||
Subject: 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.
|
||||
|
||||
diff --git a/mscore/preferences.h b/mscore/preferences.h
|
||||
index 0a78d00..6d832e2 100644
|
||||
--- a/mscore/preferences.h
|
||||
+++ b/mscore/preferences.h
|
||||
@@ -372,21 +372,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;
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
From 45c5b814952297cbb19e2de1f90cf99e76dbcf35 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 31 Dec 2019 17:42:04 +0100
|
||||
Subject: fix warnings: replace QString::null, with QString()
|
||||
|
||||
|
||||
diff --git a/mscore/capella.cpp b/mscore/capella.cpp
|
||||
index 7144414..6243c8c 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 a5d8894..8091a83 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 fa7bacd..8d81fe9 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 a358c32..d3c0f19 100644
|
||||
--- a/mscore/musescore.cpp
|
||||
+++ b/mscore/musescore.cpp
|
||||
@@ -4007,7 +4007,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;
|
||||
}
|
||||
|
||||
@@ -6798,7 +6798,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;
|
||||
}
|
||||
@@ -6831,7 +6831,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;
|
||||
}
|
||||
@@ -6843,7 +6843,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;
|
||||
}
|
||||
@@ -6868,7 +6868,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;
|
||||
@@ -7025,7 +7025,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 6980bd6..10ae19c 100644
|
||||
--- a/mscore/musescore.h
|
||||
+++ b/mscore/musescore.h
|
||||
@@ -135,7 +135,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 36220d1..5875112 100644
|
||||
--- a/mscore/network/loginmanager.cpp
|
||||
+++ b/mscore/network/loginmanager.cpp
|
||||
@@ -793,7 +793,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());
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
From ac81b91a5fe4c6447eb04aec599d29037a033e83 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 31 Dec 2019 17:48:10 +0100
|
||||
Subject: replace QList::swap with QList::swapItemsAt
|
||||
|
||||
|
||||
diff --git a/fluid/fluidgui.cpp b/fluid/fluidgui.cpp
|
||||
index 9baabb9..644051d 100644
|
||||
--- a/fluid/fluidgui.cpp
|
||||
+++ b/fluid/fluidgui.cpp
|
||||
@@ -158,7 +158,7 @@ void FluidGui::moveSoundfontInTheList(int currentIdx, int targetIdx)
|
||||
for (auto sfName : sfonts)
|
||||
fluid()->removeSoundFont(sfName);
|
||||
|
||||
- sfonts.swap(currentIdx, targetIdx);
|
||||
+ sfonts.swapItemsAt(currentIdx, targetIdx);
|
||||
fluid()->loadSoundFonts(sfonts);
|
||||
sfonts = fluid()->soundFonts();
|
||||
soundFonts->clear();
|
||||
diff --git a/zerberus/zerberusgui.cpp b/zerberus/zerberusgui.cpp
|
||||
index 7340efc..2eb0ad6 100644
|
||||
--- a/zerberus/zerberusgui.cpp
|
||||
+++ b/zerberus/zerberusgui.cpp
|
||||
@@ -121,7 +121,7 @@ ZerberusGui::ZerberusGui(Ms::Synthesizer* s)
|
||||
void ZerberusGui::moveSoundfontInTheList(int currentIdx, int targetIdx)
|
||||
{
|
||||
QStringList sfonts = zerberus()->soundFonts();
|
||||
- sfonts.swap(currentIdx, targetIdx);
|
||||
+ sfonts.swapItemsAt(currentIdx, targetIdx);
|
||||
zerberus()->removeSoundFonts(zerberus()->soundFonts());
|
||||
|
||||
loadSoundFontsAsync(sfonts);
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user