Skip to content

Commit fbe6949

Browse files
committed
Fix some more warnings manually
1 parent b817e93 commit fbe6949

71 files changed

Lines changed: 244 additions & 264 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

audio/exports/exportmp3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ bool MP3Exporter::loadLibrary(AskUser askuser)
138138
"the freely available LAME library. You must obtain %1 "
139139
"separately (for details check the handbook), and then locate the file for MuseScore.\n"
140140
"You only need to do this once.\n\n"
141-
"Would you like to locate %2 now?").arg(getLibraryName()).arg(getLibraryName()),
141+
"Would you like to locate %2 now?").arg(getLibraryName(), getLibraryName()),
142142
QMessageBox::Yes|QMessageBox::No, QMessageBox::NoButton);
143143
if (ret == QMessageBox::Yes && findLibrary()) {
144144
mLibraryLoaded = initLibrary(mLibPath);

audio/midi/event.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ void Event::write(XmlWriter& xml) const
311311
QString sex(_edata[1] ? "Minor" : "Major");
312312
QString keyName(keyTable[key]);
313313
xml.tag(QString("Key tick=\"%1\" key=\"%2\" sex=\"%3\"").arg(ontime()).arg(_edata[0]).arg(_edata[1]),
314-
QString("%1 %2").arg(keyName).arg(sex));
314+
QString("%1 %2").arg(keyName, sex));
315315
}
316316
break;
317317

audio/midi/fluid/fluid.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ QFileInfoList Fluid::sfFiles()
973973
QFileInfoList l;
974974

975975
QStringList pl = preferences.getString(PREF_APP_PATHS_MYSOUNDFONTS).split(";");
976-
pl.prepend(QFileInfo(QString("%1%2").arg(mscoreGlobalShare).arg("sound")).absoluteFilePath());
976+
pl.prepend(QFileInfo(QString("%1%2").arg(mscoreGlobalShare, "sound")).absoluteFilePath());
977977

978978
// append extensions directory
979979
QStringList extensionsDir = Ms::Extension::getDirectoriesByType(Ms::Extension::soundfontsDir);

audio/midi/zerberus/instrument.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ Sample::~Sample()
4343
Sample* ZInstrument::readSample(const QString& s, MQZipReader* uz)
4444
{
4545
if (uz) {
46-
QVector<MQZipReader::FileInfo> fi = uz->fileInfoList();
47-
4846
buf = uz->fileData(s);
4947
if (buf.isEmpty()) {
5048
printf("Sample::read: cannot read sample data <%s>\n", qPrintable(s));

awl/aslider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Awl {
2727
//---------------------------------------------------------
2828

2929
AbstractSlider::AbstractSlider(QWidget* parent)
30-
: QWidget(parent), _scaleColor(Qt::darkGray), _scaleValueColor(QColor("#2456aa"))
30+
: QWidget(parent), _scaleColor(Qt::darkGray), _scaleValueColor(QColor(0x2456aa))
3131
{
3232
__id = 0;
3333
_value = 0.5;

awl/styledslider.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void StyledSlider::mousePressEvent(QMouseEvent* e)
8585
draggingMouse = true;
8686
mouseDownPos = e->pos();
8787
mouseDownVal = _value;
88-
emit(sliderPressed());
88+
emit sliderPressed();
8989
}
9090

9191
//---------------------------------------------------------
@@ -219,7 +219,7 @@ void StyledSlider::setValue(double v)
219219

220220
_value = v;
221221
update();
222-
emit(valueChanged(v));
222+
emit valueChanged(v);
223223
}
224224

225225
//---------------------------------------------------------
@@ -232,7 +232,7 @@ void StyledSlider::setMinValue(double v)
232232
return;
233233
_minValue = v;
234234
update();
235-
emit(minValueChanged(v));
235+
emit minValueChanged(v);
236236
}
237237

238238
//---------------------------------------------------------
@@ -245,7 +245,7 @@ void StyledSlider::setMaxValue(double v)
245245
return;
246246
_maxValue = v;
247247
update();
248-
emit(maxValueChanged(v));
248+
emit maxValueChanged(v);
249249
}
250250

251251
//---------------------------------------------------------

importexport/bb/bb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ bool BBFile::read(const QString& name)
382382
Score::FileError importBB(MasterScore* score, const QString& name)
383383
{
384384
BBFile bb;
385-
if(!QFileInfo(name).exists())
385+
if(!QFileInfo::exists(name))
386386
return Score::FileError::FILE_NOT_FOUND;
387387
if (!bb.read(name)) {
388388
qDebug("Cannot open file <%s>", qPrintable(name));

importexport/guitarpro/importgtp-gp6.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ void GuitarPro6::readChord(QDomNode* diagram, int track)
403403

404404
// get the identifier to set as the domain in the map
405405
int id = diagram->attributes().namedItem("id").toAttr().value().toInt();
406-
auto name = diagram->attributes().namedItem("name").toAttr().value();
406+
//TODO-ws auto name = diagram->attributes().namedItem("name").toAttr().value();
407407

408408
//TODO-ws fretDiagram->setChordName(name);
409409
QDomNode diagramNode = diagram->firstChild();
@@ -2363,7 +2363,6 @@ void GuitarPro6::readMasterBars(GPPartInfo* partInfo)
23632363
volta->setTick(measure->tick());
23642364
volta->setTick2(measure->tick() + measure->ticks());
23652365

2366-
QList<int> endings;
23672366
const char* c = endNumbers.toUtf8().constData();
23682367
while (c && *c)
23692368
{

importexport/musedata/musedata.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ void MuseData::convert()
740740

741741
Score::FileError importMuseData(MasterScore* score, const QString& name)
742742
{
743-
if(!QFileInfo(name).exists())
743+
if(!QFileInfo::exists(name))
744744
return Score::FileError::FILE_NOT_FOUND;
745745
MuseData md(score);
746746
if (!md.read(name))

importexport/musicxml/exportxml.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,7 +1587,7 @@ static void ending(XmlWriter& xml, Volta* v, bool left)
15871587
return;
15881588
}
15891589
}
1590-
QString voltaXml = QString("ending number=\"%1\" type=\"%2\"").arg(number).arg(type);
1590+
QString voltaXml = QString("ending number=\"%1\" type=\"%2\"").arg(number, type);
15911591
voltaXml += positioningAttributes(v, left);
15921592
xml.tagE(voltaXml);
15931593
}
@@ -3299,8 +3299,6 @@ void ExportMusicXml::chord(Chord* chord, int staff, const std::vector<Lyrics*>*
32993299
#endif
33003300

33013301
for (Note* note : nl) {
3302-
QString val;
3303-
33043302
_attr.doAttr(_xml, false);
33053303
QString noteTag = QString("note");
33063304

@@ -3775,7 +3773,7 @@ static bool findMetronome(const QList<TextFragment>& list,
37753773
if (words.length() > pos2 + len2) {
37763774
QString s1 = words.mid(0, pos1); // string to the left of metronome
37773775
QString s2 = words.mid(pos1, len1); // first note
3778-
QString s3 = words.mid(pos2, len2); // equals sign
3776+
//QString s3 = words.mid(pos2, len2); // equals sign
37793777
QString s4 = words.mid(pos2 + len2); // string to the right of equals sign
37803778
/*
37813779
qDebug("found note and equals: '%s'%s'%s'%s'",
@@ -4279,7 +4277,7 @@ void ExportMusicXml::ottava(Ottava const* const ot, int staff, const Fraction& t
42794277
qDebug("ottava subtype %d not understood", int(st));
42804278
}
42814279
if (sz && tp)
4282-
octaveShiftXml = QString("octave-shift type=\"%1\" size=\"%2\" number=\"%3\"").arg(tp).arg(sz).arg(n + 1);
4280+
octaveShiftXml = QString("octave-shift type=\"%1\" size=\"%2\" number=\"%3\"").arg(tp, sz).arg(n + 1);
42834281
}
42844282
else {
42854283
if (st == OttavaType::OTTAVA_8VA || st == OttavaType::OTTAVA_8VB)

0 commit comments

Comments
 (0)