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,
|
||||
QString &parseError)
|
||||
{
|
||||
auto tr = [](const char *message){
|
||||
return QCoreApplication::translate("JsonRpcMessageHandler", message);
|
||||
};
|
||||
if (_content.isEmpty())
|
||||
return QJsonObject();
|
||||
QByteArray content;
|
||||
|
@@ -64,6 +64,8 @@ private:
|
||||
|
||||
class LANGUAGESERVERPROTOCOL_EXPORT JsonRpcMessageHandler
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(JsonRpcMessageHandler)
|
||||
|
||||
public:
|
||||
using MessageProvider = std::function<IContent *(const QJsonObject &)>;
|
||||
static void registerMessageProvider(const QString &method, MessageProvider provider);
|
||||
|
@@ -442,8 +442,8 @@ BinEditorPluginPrivate::BinEditorPluginPrivate()
|
||||
ExtensionSystem::PluginManager::addObject(&m_factoryService);
|
||||
ExtensionSystem::PluginManager::addObject(&m_editorFactory);
|
||||
|
||||
m_undoAction = new QAction(tr("&Undo"), this);
|
||||
m_redoAction = new QAction(tr("&Redo"), this);
|
||||
m_undoAction = new QAction(BinEditorPlugin::tr("&Undo"), this);
|
||||
m_redoAction = new QAction(BinEditorPlugin::tr("&Redo"), this);
|
||||
m_copyAction = new QAction(this);
|
||||
m_selectAllAction = new QAction(this);
|
||||
|
||||
|
@@ -47,6 +47,7 @@ namespace Internal {
|
||||
|
||||
class OptionsWidget final : public QWidget
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(CppcheckOptionsPage)
|
||||
public:
|
||||
explicit OptionsWidget(QWidget *parent = nullptr)
|
||||
: QWidget(parent),
|
||||
|
@@ -112,7 +112,7 @@ void ClangDiagnosticConfigsSelectionWidget::connectToClangDiagnosticConfigsDialo
|
||||
ClangDiagnosticConfigsWidget *widget = new ClangDiagnosticConfigsWidget(currentConfigId());
|
||||
widget->layout()->setMargin(0);
|
||||
QDialog dialog;
|
||||
dialog.setWindowTitle(widget->tr("Diagnostic Configurations"));
|
||||
dialog.setWindowTitle(ClangDiagnosticConfigsWidget::tr("Diagnostic Configurations"));
|
||||
dialog.setLayout(new QVBoxLayout);
|
||||
dialog.layout()->addWidget(widget);
|
||||
auto *buttonsBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||
|
@@ -153,11 +153,11 @@ DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *parent)
|
||||
});
|
||||
|
||||
auto viewButton = new QToolButton;
|
||||
viewButton->setText(tr("&Views"));
|
||||
viewButton->setText(DebuggerMainWindow::tr("&Views"));
|
||||
|
||||
auto closeButton = new QToolButton();
|
||||
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;
|
||||
toolbar->setProperty("topBorder", true);
|
||||
@@ -187,7 +187,7 @@ DebuggerMainWindowPrivate::DebuggerMainWindowPrivate(DebuggerMainWindow *parent)
|
||||
hbox->addWidget(viewButton);
|
||||
hbox->addWidget(closeButton);
|
||||
|
||||
auto dock = new QDockWidget(tr("Toolbar"), q);
|
||||
auto dock = new QDockWidget(DebuggerMainWindow::tr("Toolbar"), q);
|
||||
dock->setObjectName(QLatin1String("Toolbar"));
|
||||
dock->setFeatures(QDockWidget::NoDockWidgetFeatures);
|
||||
dock->setAllowedAreas(Qt::BottomDockWidgetArea);
|
||||
@@ -482,7 +482,8 @@ void DebuggerMainWindowPrivate::populateCurrentPerspective()
|
||||
|
||||
QWidget *central = m_currentPerspective->centralWidget();
|
||||
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();
|
||||
|
||||
|
@@ -278,11 +278,11 @@ bool EngineItem::setData(int row, const QVariant &value, int role)
|
||||
|
||||
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));
|
||||
menu->addSeparator();
|
||||
|
||||
QAction *actRemove = menu->addAction(tr("Abort Debugger"));
|
||||
QAction *actRemove = menu->addAction(EngineManager::tr("Abort Debugger"));
|
||||
actRemove->setEnabled(true);
|
||||
|
||||
QAction *act = menu->exec(cmev->globalPos());
|
||||
|
@@ -63,7 +63,7 @@ public:
|
||||
GenericMakeCleanStepFactory makeCleanStepFactory;
|
||||
GenericBuildConfigurationFactory buildConfigFactory;
|
||||
|
||||
QAction editFilesAction{GenericProjectPluginPrivate::tr("Edit Files..."), nullptr};
|
||||
QAction editFilesAction{GenericProjectPlugin::tr("Edit Files..."), nullptr};
|
||||
};
|
||||
|
||||
static GenericProjectPluginPrivate *dd = nullptr;
|
||||
|
@@ -114,6 +114,7 @@ private:
|
||||
|
||||
class LanguageClientSettingsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(LanguageClientSettingsPage)
|
||||
public:
|
||||
LanguageClientSettingsPage();
|
||||
~LanguageClientSettingsPage() override;
|
||||
@@ -147,9 +148,9 @@ LanguageClientSettingsPageWidget::LanguageClientSettingsPageWidget(LanguageClien
|
||||
return mimeType.name();
|
||||
});
|
||||
auto buttonLayout = new QVBoxLayout();
|
||||
auto addButton = new QPushButton(tr("&Add"));
|
||||
auto addButton = new QPushButton(LanguageClientSettingsPage::tr("&Add"));
|
||||
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);
|
||||
|
||||
mainLayout->addLayout(layout);
|
||||
@@ -577,6 +578,7 @@ public:
|
||||
|
||||
class MimeTypeDialog : public QDialog
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(MimeTypeDialog)
|
||||
public:
|
||||
explicit MimeTypeDialog(const QStringList &selectedMimeTypes, QWidget *parent = nullptr)
|
||||
: QDialog(parent)
|
||||
|
@@ -68,6 +68,7 @@ static void copyAspect(ProjectConfigurationAspect *source, ProjectConfigurationA
|
||||
|
||||
class CustomExecutableDialog : public QDialog
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(CustomExecutableDialog)
|
||||
public:
|
||||
explicit CustomExecutableDialog(RunConfiguration *rc);
|
||||
|
||||
|
Reference in New Issue
Block a user