forked from qt-creator/qt-creator
Fix that menus didn't show ampersands in files names
And instead interpreted the ampersand + following character as an accelerator key. Task-number: QTCREATORBUG-17817 Change-Id: I327239499ce56e75fd12f2df5be60d4b04913acd Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -1060,7 +1060,8 @@ void MainWindow::aboutToShowRecentFiles()
|
||||
for (int i = 0; i < recentFiles.count(); ++i) {
|
||||
const DocumentManager::RecentFile file = recentFiles[i];
|
||||
|
||||
const QString filePath = QDir::toNativeSeparators(withTildeHomePath(file.first));
|
||||
const QString filePath
|
||||
= Utils::quoteAmpersands(QDir::toNativeSeparators(withTildeHomePath(file.first)));
|
||||
const QString actionText = ActionManager::withNumberAccelerator(filePath, i + 1);
|
||||
QAction *action = menu->addAction(actionText);
|
||||
connect(action, &QAction::triggered, this, [file] {
|
||||
|
||||
Reference in New Issue
Block a user