Robot: Use QStringLiteral

This commit is contained in:
Benjamin Bræstrup Sayoc
2025-02-09 18:26:56 +01:00
parent 099c9b3404
commit 017156ce44
8 changed files with 40 additions and 60 deletions

View File

@@ -63,8 +63,8 @@ Workbench::~Workbench() = default;
void Workbench::activated()
{
std::string res = App::Application::getResourceDir();
QString dir = QString::fromLatin1("%1/Mod/Robot/Lib/Kuka").arg(QString::fromUtf8(res.c_str()));
QFileInfo fi(dir, QString::fromLatin1("kr_16.csv"));
QString dir = QStringLiteral("%1/Mod/Robot/Lib/Kuka").arg(QString::fromUtf8(res.c_str()));
QFileInfo fi(dir, QStringLiteral("kr_16.csv"));
if (!fi.exists()) {
Gui::WaitCursor wc;
@@ -73,8 +73,8 @@ void Workbench::activated()
Gui::getMainWindow(),
QObject::tr("No robot files installed"),
QObject::tr("Please visit %1 and copy the files to %2")
.arg(QString::fromLatin1("https://github.com/FreeCAD/FreeCAD/tree/master"
"/src/Mod/Robot/Lib/Kuka"),
.arg(QStringLiteral("https://github.com/FreeCAD/FreeCAD/tree/master"
"/src/Mod/Robot/Lib/Kuka"),
dir));
wc.setWaitCursor();
}