summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2023-02-09 15:26:50 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2023-02-10 16:27:08 +0000
commit6138414813c58162d948de203db4c70075d000b4 (patch)
tree94f8b46f77d9d701e74fc0676f7f03936f27ed3d
parentba34f00e1e67721cda2af8a2a2a436940b1e1e4a (diff)
downloadqt-creator-6138414813c58162d948de203db4c70075d000b4.tar.gz
Tests: Remove a couple of tr() calls
No need to have them translatable and to risk lupdating them. Change-Id: I41c84240ed30ffb6e19ab133422f4e5fb3a97aa4 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
-rw-r--r--tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp3
-rw-r--r--tests/auto/utils/settings/tst_settings.cpp3
-rw-r--r--tests/manual/dockwidgets/mainwindow.cpp14
-rw-r--r--tests/manual/pluginview/plugindialog.cpp10
4 files changed, 15 insertions, 15 deletions
diff --git a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp
index e497d73d18..d6e6226380 100644
--- a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp
+++ b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp
@@ -2874,7 +2874,8 @@ void tst_TestCore::testModelRootNode()
QVERIFY(rootModelNode.isValid());
QVERIFY(rootModelNode.isRootNode());
} catch (const QmlDesigner::Exception &exception) {
- QString errorMsg = tr("Exception: %1 %2 %3:%4").arg(exception.type(), exception.function(), exception.file()).arg(exception.line());
+ const QString errorMsg = QString("Exception: %1 %2 %3:%4")
+ .arg(exception.type(), exception.function(), exception.file()).arg(exception.line());
QFAIL(errorMsg.toLatin1().constData());
}
QApplication::processEvents();
diff --git a/tests/auto/utils/settings/tst_settings.cpp b/tests/auto/utils/settings/tst_settings.cpp
index d897102e08..a436ac45e8 100644
--- a/tests/auto/utils/settings/tst_settings.cpp
+++ b/tests/auto/utils/settings/tst_settings.cpp
@@ -89,8 +89,7 @@ protected:
std::optional<Issue> writeFile(const Utils::FilePath &path, const QVariantMap &data) const override
{
if (data.isEmpty()) {
- return Issue(QCoreApplication::translate("Utils::SettingsAccessor", "Failed to Write File"),
- QCoreApplication::translate("Utils::SettingsAccessor", "There was nothing to write."),
+ return Issue("Failed to Write File", "There was nothing to write.",
Issue::Type::WARNING);
}
diff --git a/tests/manual/dockwidgets/mainwindow.cpp b/tests/manual/dockwidgets/mainwindow.cpp
index 983a6e6d21..8803ece39d 100644
--- a/tests/manual/dockwidgets/mainwindow.cpp
+++ b/tests/manual/dockwidgets/mainwindow.cpp
@@ -29,7 +29,7 @@ protected:
QStyleOptionTabV2 opt;
opt.initFrom(this);
opt.shape = QTabBar::RoundedWest;
- opt.text = tr("Hello");
+ opt.text = "Hello";
QStylePainter p(this);
p.drawControl(QStyle::CE_TabBarTab, opt);
@@ -49,7 +49,7 @@ private:
MainWindow::MainWindow()
{
- centralWidget = new QLabel(tr("Central Widget"));
+ centralWidget = new QLabel("Central Widget");
setCentralWidget(centralWidget);
QToolBar *tb = this->addToolBar("Normal Toolbar");
@@ -62,7 +62,7 @@ MainWindow::MainWindow()
createDockWindows();
- setWindowTitle(tr("Dock Widgets"));
+ setWindowTitle("Dock Widgets");
}
void MainWindow::createDockWindows()
@@ -71,10 +71,10 @@ void MainWindow::createDockWindows()
for (int i=0; i<5; ++i) {
QArrowManagedDockWidget *dock = new QArrowManagedDockWidget(manager);
- QLabel *label = new QLabel(tr("Widget %1").arg(i), dock);
- label->setWindowTitle(tr("Widget %1").arg(i));
- label->setObjectName(tr("widget_%1").arg(i));
- dock->setObjectName(tr("dock_%1").arg(i));
+ QLabel *label = new QLabel(QString("Widget %1").arg(i), dock);
+ label->setWindowTitle(QString("Widget %1").arg(i));
+ label->setObjectName(QString("widget_%1").arg(i));
+ dock->setObjectName(QString("dock_%1").arg(i));
dock->setWidget(label);
addDockWidget(Qt::RightDockWidgetArea, dock);
}
diff --git a/tests/manual/pluginview/plugindialog.cpp b/tests/manual/pluginview/plugindialog.cpp
index 460411dc7e..d1ed1d906d 100644
--- a/tests/manual/pluginview/plugindialog.cpp
+++ b/tests/manual/pluginview/plugindialog.cpp
@@ -30,15 +30,15 @@ PluginDialog::PluginDialog()
vl->addLayout(hl);
hl->setContentsMargins(0, 0, 0, 0);
hl->setSpacing(6);
- m_detailsButton = new QPushButton(tr("Details"), this);
- m_errorDetailsButton = new QPushButton(tr("Error Details"), this);
+ m_detailsButton = new QPushButton("Details", this);
+ m_errorDetailsButton = new QPushButton("Error Details", this);
m_detailsButton->setEnabled(false);
m_errorDetailsButton->setEnabled(false);
hl->addWidget(m_detailsButton);
hl->addWidget(m_errorDetailsButton);
hl->addStretch(5);
resize(650, 300);
- setWindowTitle(tr("Installed Plugins"));
+ setWindowTitle("Installed Plugins");
connect(m_view, &ExtensionSystem::PluginView::currentPluginChanged,
this, &PluginDialog::updateButtons);
@@ -69,7 +69,7 @@ void PluginDialog::openDetails(ExtensionSystem::PluginSpec *spec)
return;
}
QDialog dialog(this);
- dialog.setWindowTitle(tr("Plugin Details of %1").arg(spec->name()));
+ dialog.setWindowTitle(QString("Plugin Details of %1").arg(spec->name()));
QVBoxLayout *layout = new QVBoxLayout;
dialog.setLayout(layout);
ExtensionSystem::PluginDetailsView *details = new ExtensionSystem::PluginDetailsView(&dialog);
@@ -89,7 +89,7 @@ void PluginDialog::openErrorDetails()
if (!spec)
return;
QDialog dialog(this);
- dialog.setWindowTitle(tr("Plugin Errors of %1").arg(spec->name()));
+ dialog.setWindowTitle(QString("Plugin Errors of %1").arg(spec->name()));
QVBoxLayout *layout = new QVBoxLayout;
dialog.setLayout(layout);
ExtensionSystem::PluginErrorView *errors = new ExtensionSystem::PluginErrorView(&dialog);