simplify creation of strings
This commit is contained in:
@@ -506,14 +506,10 @@ bool SelectionSingleton::setPreselect(const char* pDocName, const char* pObjectN
|
||||
} else {
|
||||
msg = QCoreApplication::translate("SelectionFilter","Not allowed:");
|
||||
}
|
||||
msg += QString::fromUtf8(" ");
|
||||
msg.append(
|
||||
QObject::tr("%1.%2.%3")
|
||||
.arg(QString::fromLatin1(pDocName))
|
||||
.arg(QString::fromLatin1(pObjectName))
|
||||
.arg(QString::fromLatin1(pSubName))
|
||||
);
|
||||
msg += QString::fromUtf8(" ");
|
||||
msg.append(QString::fromLatin1(" %1.%2.%3 ")
|
||||
.arg(QString::fromLatin1(pDocName))
|
||||
.arg(QString::fromLatin1(pObjectName))
|
||||
.arg(QString::fromLatin1(pSubName)));
|
||||
|
||||
if (getMainWindow()) {
|
||||
getMainWindow()->showMessage(msg);
|
||||
|
||||
@@ -291,8 +291,9 @@ void TDragger::drag()
|
||||
Base::Quantity quantity(
|
||||
static_cast<double>(translationIncrementCount.getValue()) * translationIncrement.getValue(), Base::Unit::Length);
|
||||
|
||||
QString message(QObject::tr("Translation:")+QString::fromUtf8(" "));
|
||||
message += quantity.getUserString();
|
||||
QString message = QString::fromLatin1("%1 %2")
|
||||
.arg(QObject::tr("Translation:"))
|
||||
.arg(quantity.getUserString());
|
||||
getMainWindow()->showMessage(message, 3000);
|
||||
}
|
||||
|
||||
@@ -576,8 +577,9 @@ void RDragger::drag()
|
||||
static_cast<double>(rotationIncrementCount.getValue()) * (180.0 / M_PI) *
|
||||
rotationIncrement.getValue(), Base::Unit::Angle);
|
||||
|
||||
QString message(QObject::tr("Rotation:")+QString::fromUtf8(" "));
|
||||
message += quantity.getUserString();
|
||||
QString message = QString::fromLatin1("%1 %2")
|
||||
.arg(QObject::tr("Rotation:"))
|
||||
.arg(quantity.getUserString());
|
||||
getMainWindow()->showMessage(message, 3000);
|
||||
}
|
||||
|
||||
|
||||
@@ -1218,14 +1218,11 @@ bool MDIViewPage::compareSelections(std::vector<Gui::SelectionObject> treeSel, Q
|
||||
|
||||
void MDIViewPage::showStatusMsg(const char* s1, const char* s2, const char* s3) const
|
||||
{
|
||||
QString msg = tr("Selected:");
|
||||
msg += QString::fromUtf8(" ");
|
||||
msg.append(QObject::tr("%1.%2.%3")
|
||||
.arg(QString::fromUtf8(s1))
|
||||
.arg(QString::fromUtf8(s2))
|
||||
.arg(QString::fromUtf8(s3))
|
||||
);
|
||||
msg += QString::fromUtf8(" ");
|
||||
QString msg = QString::fromLatin1("%1 %2.%3.%4 ")
|
||||
.arg(tr("Selected:"))
|
||||
.arg(QString::fromUtf8(s1))
|
||||
.arg(QString::fromUtf8(s2))
|
||||
.arg(QString::fromUtf8(s3));
|
||||
if (Gui::getMainWindow()) {
|
||||
Gui::getMainWindow()->showMessage(msg,3000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user