forked from qt-creator/qt-creator
macOS: Do not show numbers in recent files & projects
There are no accelerators on macOS, so these numbers are unnecessary noise. Change-Id: I0402dd961dbe955837e0aa70b92aef33f61d61bd Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Serhii Moroz <frost.asm@gmail.com>
This commit is contained in:
@@ -1070,10 +1070,12 @@ void MainWindow::aboutToShowRecentFiles()
|
||||
for (int i = 0; i < recentFiles.count(); ++i) {
|
||||
const DocumentManager::RecentFile file = recentFiles[i];
|
||||
|
||||
int acceleratorKey = i + 1;
|
||||
QString textPattern = acceleratorKey < 10 ? QStringLiteral("&%1: %2") : QStringLiteral("%1: %2");
|
||||
QString filePath = QDir::toNativeSeparators(withTildeHomePath(file.first));
|
||||
QString actionText = textPattern.arg(acceleratorKey).arg(filePath);
|
||||
const int acceleratorKey = i + 1;
|
||||
const QString textPattern = acceleratorKey < 10 ? QStringLiteral("&%1: %2") : QStringLiteral("%1: %2");
|
||||
const QString filePath = QDir::toNativeSeparators(withTildeHomePath(file.first));
|
||||
const QString actionText = HostOsInfo::isMacHost()
|
||||
? filePath
|
||||
: textPattern.arg(acceleratorKey).arg(filePath);
|
||||
QAction *action = menu->addAction(actionText);
|
||||
connect(action, &QAction::triggered, this, [file] {
|
||||
EditorManager::openEditor(file.first, file.second);
|
||||
|
||||
Reference in New Issue
Block a user