QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
This commit is contained in:
committed by
wmayer
parent
d5c074f80d
commit
cd2db00f22
@@ -217,13 +217,13 @@ void Placement::applyPlacement(const QString& data, bool incremental)
|
||||
if (jt != props.end()) {
|
||||
QString cmd;
|
||||
if (incremental)
|
||||
cmd = QString::fromAscii(
|
||||
cmd = QString::fromLatin1(
|
||||
"App.getDocument(\"%1\").%2.Placement=%3.multiply(App.getDocument(\"%1\").%2.Placement)")
|
||||
.arg(QLatin1String((*it)->getDocument()->getName()))
|
||||
.arg(QLatin1String((*it)->getNameInDocument()))
|
||||
.arg(data);
|
||||
else {
|
||||
cmd = QString::fromAscii(
|
||||
cmd = QString::fromLatin1(
|
||||
"App.getDocument(\"%1\").%2.Placement=%3")
|
||||
.arg(QLatin1String((*it)->getDocument()->getName()))
|
||||
.arg(QLatin1String((*it)->getNameInDocument()))
|
||||
@@ -399,7 +399,7 @@ void Placement::setPlacementData(const Base::Placement& p)
|
||||
|
||||
if (newitem) {
|
||||
// add a new item before the very last item
|
||||
QString display = QString::fromAscii("(%1,%2,%3)")
|
||||
QString display = QString::fromLatin1("(%1,%2,%3)")
|
||||
.arg(dir.x)
|
||||
.arg(dir.y)
|
||||
.arg(dir.z);
|
||||
@@ -448,7 +448,7 @@ QString Placement::getPlacementString() const
|
||||
|
||||
if (index == 0) {
|
||||
Base::Vector3d dir = getDirection();
|
||||
cmd = QString::fromAscii(
|
||||
cmd = QString::fromLatin1(
|
||||
"App.Placement(App.Vector(%1,%2,%3), App.Rotation(App.Vector(%4,%5,%6),%7), App.Vector(%8,%9,%10))")
|
||||
.arg(ui->xPos->value().getValue())
|
||||
.arg(ui->yPos->value().getValue())
|
||||
@@ -462,7 +462,7 @@ QString Placement::getPlacementString() const
|
||||
.arg(ui->zCnt->value().getValue());
|
||||
}
|
||||
else if (index == 1) {
|
||||
cmd = QString::fromAscii(
|
||||
cmd = QString::fromLatin1(
|
||||
"App.Placement(App.Vector(%1,%2,%3), App.Rotation(%4,%5,%6), App.Vector(%7,%8,%9))")
|
||||
.arg(ui->xPos->value().getValue())
|
||||
.arg(ui->yPos->value().getValue())
|
||||
|
||||
Reference in New Issue
Block a user