Skip to content

Commit

Permalink
qDebug instead of qWarning
Browse files Browse the repository at this point in the history
  • Loading branch information
Eism committed May 4, 2022
1 parent d609407 commit f3ffed7
Show file tree
Hide file tree
Showing 24 changed files with 77 additions and 77 deletions.
2 changes: 1 addition & 1 deletion audio/midi/zerberus/filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ void ZFilter::update()
break;
}
default:
qWarning() << "fil_type is not implemented: " << (int)sampleZone->fil_type;
qDebug() << "fil_type is not implemented: " << (int)sampleZone->fil_type;
}

if (firstRun) {
Expand Down
4 changes: 2 additions & 2 deletions libmscore/chord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1715,7 +1715,7 @@ static void updatePercussionNotes(Chord* c, const Drumset* drumset)
int pitch = note->pitch();
if (!drumset->isValid(pitch)) {
note->setLine(0);
qWarning("unmapped drum note %d", pitch);
qDebug("unmapped drum note %d", pitch);
}
else if (!note->fixed()) {
note->undoChangeProperty(Pid::HEAD_GROUP, int(drumset->noteHead(pitch)));
Expand Down Expand Up @@ -1783,7 +1783,7 @@ void Chord::cmdUpdateNotes(AccidentalState* as)
const Instrument* instrument = part()->instrument(this->tick());
const Drumset* drumset = instrument->drumset();
if (!drumset)
qWarning("no drumset");
qDebug("no drumset");
updatePercussionNotes(this, drumset);
}

Expand Down
6 changes: 3 additions & 3 deletions libmscore/connector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ ConnectorInfo* ConnectorInfo::findFirst()
while (i->_prev) {
i = i->_prev;
if (i == this) {
qWarning("ConnectorInfo::findFirst: circular connector %p", this);
qDebug("ConnectorInfo::findFirst: circular connector %p", this);
return nullptr;
}
}
Expand All @@ -203,7 +203,7 @@ ConnectorInfo* ConnectorInfo::findLast()
while (i->_next) {
i = i->_next;
if (i == this) {
qWarning("ConnectorInfo::findLast: circular connector %p", this);
qDebug("ConnectorInfo::findLast: circular connector %p", this);
return nullptr;
}
}
Expand Down Expand Up @@ -365,7 +365,7 @@ bool ConnectorInfoReader::read()
if (tag == name)
_connector = Element::name2Element(tag, _connectorReceiver->score());
else
qWarning("ConnectorInfoReader::read: element tag (%s) does not match connector type (%s). Is the file corrupted?", tag.toLatin1().constData(), name.toLatin1().constData());
qDebug("ConnectorInfoReader::read: element tag (%s) does not match connector type (%s). Is the file corrupted?", tag.toLatin1().constData(), name.toLatin1().constData());

if (!_connector) {
e.unknown();
Expand Down
10 changes: 5 additions & 5 deletions libmscore/edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3885,7 +3885,7 @@ void Score::undoChangeKeySig(Staff* ostaff, const Fraction& tick, KeySigEvent ke
Measure* measure = score->tick2measure(tick);
KeySigEvent currentKeySigEvent = staff->keySigEvent(tick);
if (!measure) {
qWarning("measure for tick %d not found!", tick.ticks());
qDebug("measure for tick %d not found!", tick.ticks());
continue;
}
Segment* s = measure->undoGetSegment(SegmentType::KeySig, tick);
Expand Down Expand Up @@ -4001,7 +4001,7 @@ void Score::undoChangeClef(Staff* ostaff, Element* e, ClefType ct, bool forInstr
Measure* measure = score->tick2measure(tick);

if (!measure) {
qWarning("measure for tick %d not found!", tick.ticks());
qDebug("measure for tick %d not found!", tick.ticks());
continue;
}

Expand Down Expand Up @@ -4710,7 +4710,7 @@ void Score::undoAddElement(Element* element)
}
Segment* seg = m->findSegment(st, tick);
if (seg == 0) {
qWarning("undoAddSegment: segment not found");
qDebug("undoAddSegment: segment not found");
break;
}
Articulation* na = toArticulation(ne);
Expand All @@ -4737,7 +4737,7 @@ void Score::undoAddElement(Element* element)
Measure* m = score->tick2measure(tick);
Segment* seg = m->findSegment(SegmentType::ChordRest, tick);
if (seg == 0) {
qWarning("undoAddSegment: segment not found");
qDebug("undoAddSegment: segment not found");
break;
}
ne->setTrack(ntrack);
Expand Down Expand Up @@ -4960,7 +4960,7 @@ void Score::undoAddElement(Element* element)
undo(new AddElement(nbreath));
}
else
qWarning("undoAddElement: unhandled: <%s>", element->name());
qDebug("undoAddElement: unhandled: <%s>", element->name());
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions libmscore/element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ void Element::writeProperties(XmlWriter& xml) const
if (!s) {
s = score()->staff(xml.curTrack() / VOICES);
if (!s)
qWarning("Element::writeProperties: linked element's staff not found (%s)", name());
qDebug("Element::writeProperties: linked element's staff not found (%s)", name());
}
Location loc = Location::positionForElement(this);
if (me == this) {
Expand All @@ -613,7 +613,7 @@ void Element::writeProperties(XmlWriter& xml) const
xml.tag("score", "same");
}
else {
qWarning("Element::writeProperties: linked elements belong to different scores but none of them is master score: (%s lid=%d)", name(), _links->lid());
qDebug("Element::writeProperties: linked elements belong to different scores but none of them is master score: (%s lid=%d)", name(), _links->lid());
}
}
Location mainLoc = Location::positionForElement(me);
Expand Down Expand Up @@ -679,7 +679,7 @@ bool Element::readProperties(XmlReader& e)
if (!s) {
s = score()->staff(e.track() / VOICES);
if (!s) {
qWarning("Element::readProperties: linked element's staff not found (%s)", name());
qDebug("Element::readProperties: linked element's staff not found (%s)", name());
e.skipCurrentElement();
return true;
}
Expand Down Expand Up @@ -725,10 +725,10 @@ bool Element::readProperties(XmlReader& e)
if (linked->type() == type())
linkTo(linked);
else
qWarning("Element::readProperties: linked elements have different types: %s, %s. Input file corrupted?", name(), linked->name());
qDebug("Element::readProperties: linked elements have different types: %s, %s. Input file corrupted?", name(), linked->name());
}
if (!_links)
qWarning("Element::readProperties: could not link %s at staff %d", name(), mainLoc.staff() + 1);
qDebug("Element::readProperties: could not link %s at staff %d", name(), mainLoc.staff() + 1);
}
}
else if (tag == "lid") {
Expand Down
10 changes: 5 additions & 5 deletions libmscore/fret.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ void FretDiagram::add(Element* e)
_harmony->setPropertyFlags(Pid::ALIGN, PropertyFlags::UNSTYLED);
}
else {
qWarning("FretDiagram: cannot add <%s>\n", e->name());
qDebug("FretDiagram: cannot add <%s>\n", e->name());
}
}

Expand All @@ -1210,7 +1210,7 @@ void FretDiagram::remove(Element* e)
if (e == _harmony)
_harmony = 0;
else
qWarning("FretDiagram: cannot remove <%s>\n", e->name());
qDebug("FretDiagram: cannot remove <%s>\n", e->name());
}

//---------------------------------------------------------
Expand All @@ -1236,7 +1236,7 @@ Element* FretDiagram::drop(EditData& data)
score()->undoAddElement(h);
}
else {
qWarning("FretDiagram: cannot drop <%s>\n", e->name());
qDebug("FretDiagram: cannot drop <%s>\n", e->name());
delete e;
e = 0;
}
Expand Down Expand Up @@ -1584,7 +1584,7 @@ FretMarkerType FretItem::nameToMarkerType(QString n)
if (i.name == n)
return i.mtype;
}
qWarning("Unrecognised marker name!");
qDebug("Unrecognised marker name!");
return FretMarkerType::NONE; // default
}

Expand Down Expand Up @@ -1619,7 +1619,7 @@ FretDotType FretItem::nameToDotType(QString n)
if (i.name == n)
return i.dtype;
}
qWarning("Unrecognised dot name!");
qDebug("Unrecognised dot name!");
return FretDotType::NORMAL; // default
}

Expand Down
2 changes: 1 addition & 1 deletion libmscore/harmony.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2126,7 +2126,7 @@ Element* Harmony::drop(EditData& data)
e = 0; // cannot select
}
else {
qWarning("Harmony: cannot drop <%s>\n", e->name());
qDebug("Harmony: cannot drop <%s>\n", e->name());
delete e;
e = 0;
}
Expand Down
6 changes: 3 additions & 3 deletions libmscore/location.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void Location::fillPositionForElement(const Element* e, bool absfrac)
{
Q_ASSERT(isAbsolute());
if (!e) {
qWarning("Location::fillPositionForElement: element is nullptr");
qDebug("Location::fillPositionForElement: element is nullptr");
return;
}
if (track() == absDefaults.track())
Expand All @@ -154,7 +154,7 @@ void Location::fillForElement(const Element* e, bool absfrac)
{
Q_ASSERT(isAbsolute());
if (!e) {
qWarning("Location::fillForElement: element is nullptr");
qDebug("Location::fillForElement: element is nullptr");
return;
}

Expand Down Expand Up @@ -212,7 +212,7 @@ int Location::measure(const Element* e)
const Measure* m = toMeasure(e->findMeasure());
if (m)
return m->measureIndex();
qWarning("Location::measure: cannot find element's measure (%s)", e->name());
qDebug("Location::measure: cannot find element's measure (%s)", e->name());
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion libmscore/midimapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void MasterScore::rebuildExcerptsMidiMapping()
for (Part* p : ex->partScore()->parts()) {
const Part* masterPart = p->masterPart();
if (!masterPart->score()->isMaster()) {
qWarning() << "rebuildExcerptsMidiMapping: no part in master score is linked with " << p->partName();
qDebug() << "rebuildExcerptsMidiMapping: no part in master score is linked with " << p->partName();
continue;
}
Q_ASSERT(p->instruments()->size() == masterPart->instruments()->size());
Expand Down
2 changes: 1 addition & 1 deletion libmscore/range.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ static bool checkRest(Fraction& rest, Measure*& m, const Fraction& d)
rest = m->ticks();
}
else {
qWarning("premature end of measure list, rest %d/%d", d.numerator(), d.denominator());
qDebug("premature end of measure list, rest %d/%d", d.numerator(), d.denominator());
return false;
}
}
Expand Down
6 changes: 3 additions & 3 deletions libmscore/rendermidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ void MidiRenderer::collectMeasureEventsDefault(EventMap* events, Measure const *
int controller = getControllerFromCC(sctx.cc);

if (controller == -1) {
qWarning("controller for CC %d not valid", sctx.cc);
qDebug("controller for CC %d not valid", sctx.cc);
return;
}

Expand Down Expand Up @@ -851,7 +851,7 @@ void MidiRenderer::collectMeasureEvents(EventMap* events, Measure const * m, con
collectMeasureEventsDefault(events, m, sctx, tickOffset);
break;
default:
qWarning("Unrecognized dynamics method: %d", int(sctx.method));
qDebug("Unrecognized dynamics method: %d", int(sctx.method));
break;
}

Expand Down Expand Up @@ -2359,7 +2359,7 @@ void MidiRenderer::renderChunk(const Chunk& chunk, EventMap* events, const Conte
renderMethod = DynamicsRenderMethod::FIXED_MAX;
break;
default:
qWarning("Unrecognized dynamics method: %d", method);
qDebug("Unrecognized dynamics method: %d", method);
break;
}

Expand Down
6 changes: 3 additions & 3 deletions libmscore/scorediff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ void TextDiffParser::makeDiffs(const QString& mscx, const std::vector<std::pair<
r.readNext();
}
if (r.hasError())
qWarning("TextDiffParser::makeDiffs: error while reading MSCX output: %s", r.errorString().toLatin1().constData());
qDebug("TextDiffParser::makeDiffs: error while reading MSCX output: %s", r.errorString().toLatin1().constData());
}

//---------------------------------------------------------
Expand Down Expand Up @@ -1189,7 +1189,7 @@ bool TextDiff::merge(const TextDiff& other)
text[1].append(other.text[1]);
}
else {
qWarning("TextDiff:merge: invalid argument: wrong line numbers");
qDebug("TextDiff:merge: invalid argument: wrong line numbers");
return false;
}
}
Expand All @@ -1203,7 +1203,7 @@ bool TextDiff::merge(const TextDiff& other)
text[iOther] = other.text[iOther];
}
else {
qWarning("TextDiff:merge: invalid argument: wrong types");
qDebug("TextDiff:merge: invalid argument: wrong types");
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion libmscore/shape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ void Shape::remove(const QRectF& r)
return;
}
}
// qWarning("Shape::remove: QRectF not found in Shape");
// qDebug("Shape::remove: QRectF not found in Shape");
qFatal("Shape::remove: QRectF not found in Shape");
}

Expand Down
4 changes: 2 additions & 2 deletions libmscore/spanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,7 @@ void SpannerWriter::fillSpannerPosition(Location& l, const MeasureBase* m, const
}
else {
if (!m) {
qWarning("fillSpannerPosition: couldn't find spanner's endpoint's measure");
qDebug("fillSpannerPosition: couldn't find spanner's endpoint's measure");
l.setMeasure(0);
l.setFrac(tick);
return;
Expand All @@ -1374,7 +1374,7 @@ SpannerWriter::SpannerWriter(XmlWriter& xml, const Element* current, const Spann
{
const bool clipboardmode = xml.clipboardmode();
if (!sp->startElement() || !sp->endElement()) {
qWarning("SpannerWriter: spanner (%s) doesn't have an endpoint!", sp->name());
qDebug("SpannerWriter: spanner (%s) doesn't have an endpoint!", sp->name());
return;
}
if (current->isMeasure() || current->isSegment() || (sp->startElement()->type() != current->type())) {
Expand Down
4 changes: 2 additions & 2 deletions libmscore/style.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2533,7 +2533,7 @@ Tid textStyleFromName(const QString& name)
if (name == "Technique") // compatibility
return Tid::EXPRESSION;

qWarning("text style <%s> not known", qPrintable(name));
qDebug("text style <%s> not known", qPrintable(name));
return Tid::DEFAULT;
}

Expand Down Expand Up @@ -2949,7 +2949,7 @@ bool MStyle::readTextStyleValCompat(XmlReader& e)
const QString newFontStyleName = typeName.toString() + "FontStyle";
const Sid sid = MStyle::styleIdx(newFontStyleName);
if (sid == Sid::NOSTYLE) {
qWarning() << "readFontStyleValCompat: couldn't read text readFontStyle value:" << tag;
qDebug() << "readFontStyleValCompat: couldn't read text readFontStyle value:" << tag;
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion libmscore/synthesizerstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ int SynthesizerState::ccToUse() const
cc = 11;
break;
default:
qWarning("Unrecognised CCToUse index from synthesizer: %d", idVal.data.toInt());
qDebug("Unrecognised CCToUse index from synthesizer: %d", idVal.data.toInt());
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions libmscore/undo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ UndoStack::~UndoStack()
void UndoStack::beginMacro(Score* score)
{
if (curCmd) {
qWarning("already active");
qDebug("already active");
return;
}
curCmd = new UndoMacro(score);
Expand Down Expand Up @@ -316,7 +316,7 @@ void UndoStack::push1(UndoCommand* cmd)
{
if (!curCmd) {
if (!ScoreLoad::loading())
qWarning("no active command, UndoStack %p", this);
qDebug("no active command, UndoStack %p", this);
return;
}
curCmd->appendChild(cmd);
Expand Down Expand Up @@ -373,7 +373,7 @@ void UndoStack::pop()
{
if (!curCmd) {
if (!ScoreLoad::loading())
qWarning("no active command");
qDebug("no active command");
return;
}
UndoCommand* cmd = curCmd->removeChild();
Expand Down Expand Up @@ -401,7 +401,7 @@ void UndoStack::rollback()
void UndoStack::endMacro(bool rollback)
{
if (curCmd == 0) {
qWarning("not active");
qDebug("not active");
return;
}
if (rollback)
Expand Down Expand Up @@ -1510,7 +1510,7 @@ void ChangePatch::flip(EditData*)
patch = op;

if (MScore::seq == 0) {
qWarning("no seq");
qDebug("no seq");
return;
}

Expand Down
2 changes: 1 addition & 1 deletion libmscore/volta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ bool Volta::readProperties(XmlReader& e)

if (anchor() != VOLTA_ANCHOR) {
// Volta strictly assumes that its anchor is measure, so don't let old scores override this.
qWarning("Correcting volta anchor type from %d to %d", int(anchor()), int(VOLTA_ANCHOR));
qDebug("Correcting volta anchor type from %d to %d", int(anchor()), int(VOLTA_ANCHOR));
setAnchor(VOLTA_ANCHOR);
}

Expand Down
Loading

0 comments on commit f3ffed7

Please sign in to comment.