Part: Use QStringLiteral
This commit is contained in:
@@ -207,7 +207,7 @@ void DlgExtrusion::onSelectEdgeClicked()
|
||||
|
||||
//visibility automation
|
||||
try{
|
||||
QString code = QString::fromLatin1(
|
||||
QString code = QStringLiteral(
|
||||
"import Show\n"
|
||||
"tv = Show.TempoVis(App.ActiveDocument, tag= 'PartGui::DlgExtrusion')\n"
|
||||
"tv.hide([%1])"
|
||||
@@ -217,9 +217,9 @@ void DlgExtrusion::onSelectEdgeClicked()
|
||||
for (App::DocumentObject* obj: sources){
|
||||
if (!obj)
|
||||
continue;
|
||||
features_to_hide.append(QString::fromLatin1("App.ActiveDocument."));
|
||||
features_to_hide.append(QStringLiteral("App.ActiveDocument."));
|
||||
features_to_hide.append(QString::fromLatin1(obj->getNameInDocument()));
|
||||
features_to_hide.append(QString::fromLatin1(", \n"));
|
||||
features_to_hide.append(QStringLiteral(", \n"));
|
||||
}
|
||||
QByteArray code_2 = code.arg(features_to_hide).toLatin1();
|
||||
Base::Interpreter().runString(code_2.constData());
|
||||
@@ -474,8 +474,8 @@ void DlgExtrusion::apply()
|
||||
name = sourceObj->getDocument()->getUniqueObjectName("Extrude").c_str();
|
||||
if (addBaseName) {
|
||||
//FIXME: implement
|
||||
//QString baseName = QString::fromLatin1("Extrude_%1").arg(sourceObjectName);
|
||||
//label = QString::fromLatin1("%1_Extrude").arg((*it)->text(0));
|
||||
//QString baseName = QStringLiteral("Extrude_%1").arg(sourceObjectName);
|
||||
//label = QStringLiteral("%1_Extrude").arg((*it)->text(0));
|
||||
}
|
||||
|
||||
FCMD_OBJ_DOC_CMD(sourceObj,"addObject('Part::Extrusion','" << name << "')");
|
||||
@@ -505,7 +505,7 @@ void DlgExtrusion::apply()
|
||||
}
|
||||
catch(...) {
|
||||
QMessageBox::critical(this, windowTitle(),
|
||||
tr("Creating Extrusion failed.\n%1").arg(QString::fromUtf8("Unknown error")));
|
||||
tr("Creating Extrusion failed.\n%1").arg(QStringLiteral("Unknown error")));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -604,7 +604,7 @@ void DlgExtrusion::setAxisLink(const char* objname, const char* subname)
|
||||
if(objname && strlen(objname) > 0){
|
||||
QString txt = QString::fromLatin1(objname);
|
||||
if (subname && strlen(subname) > 0){
|
||||
txt = txt + QString::fromLatin1(":") + QString::fromLatin1(subname);
|
||||
txt = txt + QStringLiteral(":") + QString::fromLatin1(subname);
|
||||
}
|
||||
ui->txtLink->setText(txt);
|
||||
} else {
|
||||
@@ -677,7 +677,7 @@ bool DlgExtrusion::validate()
|
||||
} catch(Standard_Failure &err) {
|
||||
errmsg = QString::fromLocal8Bit(err.GetMessageString());
|
||||
} catch(...) {
|
||||
errmsg = QString::fromUtf8("Unknown error");
|
||||
errmsg = QStringLiteral("Unknown error");
|
||||
}
|
||||
if (errmsg.length() > 0){
|
||||
QMessageBox::critical(this, windowTitle(), tr("Can't determine normal vector of shape to be extruded. Please use other mode. \n\n(%1)").arg(errmsg));
|
||||
|
||||
Reference in New Issue
Block a user