Skip to content

Commit d98a3ee

Browse files
committed
no QDialog in batch mode
1 parent dc836cc commit d98a3ee

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

mscore/capella.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,10 +2346,12 @@ Score::FileError importCapella(Score* score, const QString& name)
23462346
cf.read(&fp);
23472347
}
23482348
catch (Capella::CapellaError errNo) {
2349-
QMessageBox::warning(0,
2350-
QWidget::tr("MuseScore: Import Capella"),
2351-
QString("Load failed: ") + cf.error(errNo),
2352-
QString::null, QWidget::tr("Quit"), QString::null, 0, 1);
2349+
if (!noGui) {
2350+
QMessageBox::warning(0,
2351+
QWidget::tr("MuseScore: Import Capella"),
2352+
QString("Load failed: ") + cf.error(errNo),
2353+
QString::null, QWidget::tr("Quit"), QString::null, 0, 1);
2354+
}
23532355
fp.close();
23542356
// avoid another error message box
23552357
return Score::FILE_NO_ERROR;

mscore/importgtp.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2670,10 +2670,12 @@ Score::FileError importGTP(Score* score, const QString& name)
26702670
gp->read(&fp);
26712671
}
26722672
catch(GuitarPro::GuitarProError errNo) {
2673-
QMessageBox::warning(0,
2674-
QWidget::tr("MuseScore: Import GuitarPro"),
2675-
QString("Load failed: ") + gp->error(errNo),
2676-
QString::null, QWidget::tr("Quit"), QString::null, 0, 1);
2673+
if (!noGui) {
2674+
QMessageBox::warning(0,
2675+
QWidget::tr("MuseScore: Import GuitarPro"),
2676+
QString("Load failed: ") + gp->error(errNo),
2677+
QString::null, QWidget::tr("Quit"), QString::null, 0, 1);
2678+
}
26772679
fp.close();
26782680
qDebug("guitar pro import error====\n");
26792681
// avoid another error message box

0 commit comments

Comments
 (0)