diff --git a/mscore/musescore.cpp b/mscore/musescore.cpp index b3cbc869faaef..7adc966035fb5 100644 --- a/mscore/musescore.cpp +++ b/mscore/musescore.cpp @@ -1358,8 +1358,9 @@ void MuseScore::openRecentMenu() break; // QFileInfo fi(s); // QAction* action = openRecent->addAction(fi.completeBaseName()); - QAction* action = openRecent->addAction(s); // show complete path - action->setData(s); + QString data(s); + QAction* action = openRecent->addAction(s.replace("&", "&&")); // show complete path + action->setData(data); } } diff --git a/mscore/scoretab.cpp b/mscore/scoretab.cpp index 7ad5dacb3bc47..f8e332283c4ea 100644 --- a/mscore/scoretab.cpp +++ b/mscore/scoretab.cpp @@ -192,9 +192,9 @@ void ScoreTab::setCurrent(int n) QList& excerpts = score->excerpts(); if (!excerpts.isEmpty()) { tab2->blockSignals(true); - tab2->addTab(score->name()); + tab2->addTab(score->name().replace("&","&&")); foreach(const Excerpt* excerpt, excerpts) { - tab2->addTab(excerpt->score()->name()); + tab2->addTab(excerpt->score()->name().replace("&","&&")); } tab2->setCurrentIndex(tsv->part); tab2->blockSignals(false); @@ -228,9 +228,9 @@ void ScoreTab::updateExcerpts() QList& excerpts = score->excerpts(); if (!excerpts.isEmpty()) { tab2->blockSignals(true); - tab2->addTab(score->name()); + tab2->addTab(score->name().replace("&","&&")); foreach(const Excerpt* excerpt, excerpts) - tab2->addTab(excerpt->score()->name()); + tab2->addTab(excerpt->score()->name().replace("&","&&")); tab2->blockSignals(false); tab2->setVisible(true); } @@ -282,7 +282,7 @@ void ScoreTab::insertTab(Score* s) { int idx = scoreList->indexOf(s); tab->blockSignals(true); - tab->insertTab(idx, s->name()); + tab->insertTab(idx, s->name().replace("&","&&")); tab->setTabData(idx, QVariant::fromValue(new TabScoreView(s))); tab->blockSignals(false); } @@ -293,7 +293,8 @@ void ScoreTab::insertTab(Score* s) void ScoreTab::setTabText(int idx, const QString& s) { - tab->setTabText(idx, s); + QString text(s); + tab->setTabText(idx, text.replace("&","&&")); } //---------------------------------------------------------