forked from qt-creator/qt-creator
Fix missing translation contexts
Change-Id: I4402157e7991ad0050333a34394b87ff3d6f4a1b Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -123,9 +123,6 @@ QJsonObject JsonRpcMessageHandler::toJsonObject(const QByteArray &_content,
|
|||||||
QTextCodec *codec,
|
QTextCodec *codec,
|
||||||
QString &parseError)
|
QString &parseError)
|
||||||
{
|
{
|
||||||
auto tr = [](const char *message){
|
|
||||||
return QCoreApplication::translate("JsonRpcMessageHandler", message);
|
|
||||||
};
|
|
||||||
if (_content.isEmpty())
|
if (_content.isEmpty())
|
||||||
return QJsonObject();
|
return QJsonObject();
|
||||||
QByteArray content;
|
QByteArray content;
|
||||||
|
@@ -64,6 +64,8 @@ private:
|
|||||||
|
|
||||||
class LANGUAGESERVERPROTOCOL_EXPORT JsonRpcMessageHandler
|
class LANGUAGESERVERPROTOCOL_EXPORT JsonRpcMessageHandler
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(JsonRpcMessageHandler)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using MessageProvider = std::function<IContent *(const QJsonObject &)>;
|
using MessageProvider = std::function<IContent *(const QJsonObject &)>;
|
||||||
static void registerMessageProvider(const QString &method, MessageProvider provider);
|
static void registerMessageProvider(const QString &method, MessageProvider provider);
|
||||||
|
@@ -442,8 +442,8 @@ BinEditorPluginPrivate::BinEditorPluginPrivate()
|
|||||||
ExtensionSystem::PluginManager::addObject(&m_factoryService);
|
ExtensionSystem::PluginManager::addObject(&m_factoryService);
|
||||||
ExtensionSystem::PluginManager::addObject(&m_editorFactory);
|
ExtensionSystem::PluginManager::addObject(&m_editorFactory);
|
||||||
|
|
||||||
m_undoAction = new QAction(tr("&Undo"), this);
|
m_undoAction = new QAction(BinEditorPlugin::tr("&Undo"), this);
|
||||||
m_redoAction = new QAction(tr("&Redo"), this);
|
m_redoAction = new QAction(BinEditorPlugin::tr("&Redo"), this);
|
||||||
m_copyAction = new QAction(this);
|
m_copyAction = new QAction(this);
|
||||||
m_selectAllAction = new QAction(this);
|
m_selectAllAction = new QAction(this);
|
||||||
|
|
||||||
|
@@ -47,6 +47,7 @@ namespace Internal {
|
|||||||
|
|
||||||
class OptionsWidget final : public QWidget
|
class OptionsWidget final : public QWidget
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(CppcheckOptionsPage)
|
||||||
public:
|
public:
|
||||||
explicit OptionsWidget(QWidget *parent = nullptr)
|
explicit OptionsWidget(QWidget *parent = nullptr)
|
||||||
: QWidget(parent),
|
: QWidget(parent),
|
||||||
|
@@ -112,7 +112,7 @@ void ClangDiagnosticConfigsSelectionWidget::connectToClangDiagnosticConfigsDialo
|
|||||||
ClangDiagnosticConfigsWidget *widget = new ClangDiagnosticConfigsWidget(currentConfigId());
|
ClangDiagnosticConfigsWidget *widget = new ClangDiagnosticConfigsWidget(currentConfigId());
|
||||||
widget->layout()->setMargin(0);
|
widget->layout()->setMargin(0);
|
||||||
QDialog dialog;
|
QDialog dialog;
|
||||||
dialog.setWindowTitle(widget->tr("Diagnostic Configurations"));
|
dialog.setWindowTitle(ClangDiagnosticConfigsWidget::tr("Diagnostic Configurations"));
|
||||||
dialog.setLayout(new QVBoxLayout);
|
dialog.setLayout(new QVBoxLayout);
|
||||||
dialog.layout()->addWidget(widget);
|
dialog.layout()->addWidget(widget);
|
||||||
auto *buttonsBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
auto *buttonsBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||||
|
@@ -153,11 +153,11 @@ DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *parent)
|
|||||||
});
|
});
|
||||||
|
|
||||||
auto viewButton = new QToolButton;
|
auto viewButton = new QToolButton;
|
||||||
viewButton->setText(tr("&Views"));
|
viewButton->setText(DebuggerMainWindow::tr("&Views"));
|
||||||
|
|
||||||
auto closeButton = new QToolButton();
|
auto closeButton = new QToolButton();
|
||||||
closeButton->setIcon(Utils::Icons::CLOSE_SPLIT_BOTTOM.icon());
|
closeButton->setIcon(Utils::Icons::CLOSE_SPLIT_BOTTOM.icon());
|
||||||
closeButton->setToolTip(tr("Leave Debug Mode"));
|
closeButton->setToolTip(DebuggerMainWindow::tr("Leave Debug Mode"));
|
||||||
|
|
||||||
auto toolbar = new Utils::StyledBar;
|
auto toolbar = new Utils::StyledBar;
|
||||||
toolbar->setProperty("topBorder", true);
|
toolbar->setProperty("topBorder", true);
|
||||||
@@ -187,7 +187,7 @@ DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *parent)
|
|||||||
hbox->addWidget(viewButton);
|
hbox->addWidget(viewButton);
|
||||||
hbox->addWidget(closeButton);
|
hbox->addWidget(closeButton);
|
||||||
|
|
||||||
auto dock = new QDockWidget(tr("Toolbar"), q);
|
auto dock = new QDockWidget(DebuggerMainWindow::tr("Toolbar"), q);
|
||||||
dock->setObjectName(QLatin1String("Toolbar"));
|
dock->setObjectName(QLatin1String("Toolbar"));
|
||||||
dock->setFeatures(QDockWidget::NoDockWidgetFeatures);
|
dock->setFeatures(QDockWidget::NoDockWidgetFeatures);
|
||||||
dock->setAllowedAreas(Qt::BottomDockWidgetArea);
|
dock->setAllowedAreas(Qt::BottomDockWidgetArea);
|
||||||
@@ -482,7 +482,8 @@ void DebuggerMainWindowPrivate::populateCurrentPerspective()
|
|||||||
|
|
||||||
QWidget *central = m_currentPerspective->centralWidget();
|
QWidget *central = m_currentPerspective->centralWidget();
|
||||||
m_centralWidgetStack->addWidget(central ? central : m_editorPlaceHolder);
|
m_centralWidgetStack->addWidget(central ? central : m_editorPlaceHolder);
|
||||||
q->showCentralWidgetAction()->setText(central ? central->windowTitle() : tr("Editor"));
|
q->showCentralWidgetAction()->setText(central ? central->windowTitle()
|
||||||
|
: DebuggerMainWindow::tr("Editor"));
|
||||||
|
|
||||||
m_statusLabel->clear();
|
m_statusLabel->clear();
|
||||||
|
|
||||||
|
@@ -278,11 +278,11 @@ bool EngineItem::setData(int row, const QVariant &value, int role)
|
|||||||
|
|
||||||
auto menu = new QMenu(ev.view());
|
auto menu = new QMenu(ev.view());
|
||||||
|
|
||||||
QAction *actCreate = menu->addAction(tr("Create Snapshot"));
|
QAction *actCreate = menu->addAction(EngineManager::tr("Create Snapshot"));
|
||||||
actCreate->setEnabled(m_engine->hasCapability(SnapshotCapabilityRole));
|
actCreate->setEnabled(m_engine->hasCapability(SnapshotCapabilityRole));
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
|
|
||||||
QAction *actRemove = menu->addAction(tr("Abort Debugger"));
|
QAction *actRemove = menu->addAction(EngineManager::tr("Abort Debugger"));
|
||||||
actRemove->setEnabled(true);
|
actRemove->setEnabled(true);
|
||||||
|
|
||||||
QAction *act = menu->exec(cmev->globalPos());
|
QAction *act = menu->exec(cmev->globalPos());
|
||||||
|
@@ -63,7 +63,7 @@ public:
|
|||||||
GenericMakeCleanStepFactory makeCleanStepFactory;
|
GenericMakeCleanStepFactory makeCleanStepFactory;
|
||||||
GenericBuildConfigurationFactory buildConfigFactory;
|
GenericBuildConfigurationFactory buildConfigFactory;
|
||||||
|
|
||||||
QAction editFilesAction{GenericProjectPluginPrivate::tr("Edit Files..."), nullptr};
|
QAction editFilesAction{GenericProjectPlugin::tr("Edit Files..."), nullptr};
|
||||||
};
|
};
|
||||||
|
|
||||||
static GenericProjectPluginPrivate *dd = nullptr;
|
static GenericProjectPluginPrivate *dd = nullptr;
|
||||||
|
@@ -114,6 +114,7 @@ private:
|
|||||||
|
|
||||||
class LanguageClientSettingsPage : public Core::IOptionsPage
|
class LanguageClientSettingsPage : public Core::IOptionsPage
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(LanguageClientSettingsPage)
|
||||||
public:
|
public:
|
||||||
LanguageClientSettingsPage();
|
LanguageClientSettingsPage();
|
||||||
~LanguageClientSettingsPage() override;
|
~LanguageClientSettingsPage() override;
|
||||||
@@ -147,9 +148,9 @@ LanguageClientSettingsPageWidget::LanguageClientSettingsPageWidget(LanguageClien
|
|||||||
return mimeType.name();
|
return mimeType.name();
|
||||||
});
|
});
|
||||||
auto buttonLayout = new QVBoxLayout();
|
auto buttonLayout = new QVBoxLayout();
|
||||||
auto addButton = new QPushButton(tr("&Add"));
|
auto addButton = new QPushButton(LanguageClientSettingsPage::tr("&Add"));
|
||||||
connect(addButton, &QPushButton::pressed, this, &LanguageClientSettingsPageWidget::addItem);
|
connect(addButton, &QPushButton::pressed, this, &LanguageClientSettingsPageWidget::addItem);
|
||||||
auto deleteButton = new QPushButton(tr("&Delete"));
|
auto deleteButton = new QPushButton(LanguageClientSettingsPage::tr("&Delete"));
|
||||||
connect(deleteButton, &QPushButton::pressed, this, &LanguageClientSettingsPageWidget::deleteItem);
|
connect(deleteButton, &QPushButton::pressed, this, &LanguageClientSettingsPageWidget::deleteItem);
|
||||||
|
|
||||||
mainLayout->addLayout(layout);
|
mainLayout->addLayout(layout);
|
||||||
@@ -577,6 +578,7 @@ public:
|
|||||||
|
|
||||||
class MimeTypeDialog : public QDialog
|
class MimeTypeDialog : public QDialog
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(MimeTypeDialog)
|
||||||
public:
|
public:
|
||||||
explicit MimeTypeDialog(const QStringList &selectedMimeTypes, QWidget *parent = nullptr)
|
explicit MimeTypeDialog(const QStringList &selectedMimeTypes, QWidget *parent = nullptr)
|
||||||
: QDialog(parent)
|
: QDialog(parent)
|
||||||
|
@@ -68,6 +68,7 @@ static void copyAspect(ProjectConfigurationAspect *source, ProjectConfigurationA
|
|||||||
|
|
||||||
class CustomExecutableDialog : public QDialog
|
class CustomExecutableDialog : public QDialog
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(CustomExecutableDialog)
|
||||||
public:
|
public:
|
||||||
explicit CustomExecutableDialog(RunConfiguration *rc);
|
explicit CustomExecutableDialog(RunConfiguration *rc);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user