ProjectExplorer: Show project name instead with file paths

Now Recent Project menu entry shows project names with file paths.

Fixes: QTCREATORBUG-31753
Change-Id: I1109ffa70c034e38a348e7c07b7b19eb503c6c1e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Artem Sokolovskii
2024-10-08 15:16:59 +02:00
parent e99ee62295
commit f9a1e62499

View File

@@ -3256,8 +3256,8 @@ void ProjectExplorerPluginPrivate::updateRecentProjectMenu()
const QString displayPath =
filePath.osType() == OsTypeWindows ? filePath.displayName()
: filePath.withTildeHomePath();
const QString actionText =
ActionManager::withNumberAccelerator(displayPath, acceleratorKey);
const QString actionText = ActionManager::withNumberAccelerator(
displayPath + " (" + item.displayName + ")", acceleratorKey);
QAction *action = menu->addAction(actionText);
connect(action, &QAction::triggered, this, [this, filePath] {
openRecentProject(filePath);