ProjectExplorer: Tr::tr

Change-Id: I8f1b463c5cc7a53627f7a9ad261998b92f13e56a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2023-01-13 12:38:22 +01:00
parent e373fe6aa9
commit c5f7f5ab0a
149 changed files with 1672 additions and 15967 deletions

View File

@@ -2,8 +2,9 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "sessionmodel.h"
#include "session.h"
#include "projectexplorertr.h"
#include "session.h"
#include "sessiondialog.h"
#include <coreplugin/actionmanager/actionmanager.h>
@@ -46,9 +47,9 @@ QVariant SessionModel::headerData(int section, Qt::Orientation orientation, int
switch (role) {
case Qt::DisplayRole:
switch (section) {
case 0: result = tr("Session");
case 0: result = Tr::tr("Session");
break;
case 1: result = tr("Last Modified");
case 1: result = Tr::tr("Last Modified");
break;
} // switch (section)
break;
@@ -194,8 +195,8 @@ void SessionModel::resetSessions()
void SessionModel::newSession(QWidget *parent)
{
SessionNameInputDialog sessionInputDialog(parent);
sessionInputDialog.setWindowTitle(tr("New Session Name"));
sessionInputDialog.setActionText(tr("&Create"), tr("Create and &Open"));
sessionInputDialog.setWindowTitle(Tr::tr("New Session Name"));
sessionInputDialog.setActionText(Tr::tr("&Create"), Tr::tr("Create and &Open"));
runSessionNameInputDialog(&sessionInputDialog, [](const QString &newName) {
SessionManager::createSession(newName);
@@ -205,8 +206,8 @@ void SessionModel::newSession(QWidget *parent)
void SessionModel::cloneSession(QWidget *parent, const QString &session)
{
SessionNameInputDialog sessionInputDialog(parent);
sessionInputDialog.setWindowTitle(tr("New Session Name"));
sessionInputDialog.setActionText(tr("&Clone"), tr("Clone and &Open"));
sessionInputDialog.setWindowTitle(Tr::tr("New Session Name"));
sessionInputDialog.setActionText(Tr::tr("&Clone"), Tr::tr("Clone and &Open"));
sessionInputDialog.setValue(session + " (2)");
runSessionNameInputDialog(&sessionInputDialog, [session](const QString &newName) {
@@ -228,8 +229,8 @@ void SessionModel::deleteSessions(const QStringList &sessions)
void SessionModel::renameSession(QWidget *parent, const QString &session)
{
SessionNameInputDialog sessionInputDialog(parent);
sessionInputDialog.setWindowTitle(tr("Rename Session"));
sessionInputDialog.setActionText(tr("&Rename"), tr("Rename and &Open"));
sessionInputDialog.setWindowTitle(Tr::tr("Rename Session"));
sessionInputDialog.setActionText(Tr::tr("&Rename"), Tr::tr("Rename and &Open"));
sessionInputDialog.setValue(session);
runSessionNameInputDialog(&sessionInputDialog, [session](const QString &newName) {