QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().

This change is Qt4/Qt5 neutral.
This commit is contained in:
Mateusz Skowroński
2016-08-14 16:48:57 +02:00
committed by wmayer
parent 07dc86fc10
commit f06de8d916
5 changed files with 24 additions and 24 deletions

View File

@@ -212,7 +212,7 @@ App::DocumentObjectExecReturn * DrawSVGTemplate::execute(void)
outfragment = boost::regex_replace(newfragment, e3, fmt);
const QString qsOut = QString::fromStdString(outfragment);
QDomDocument doc(QString::fromAscii("mydocument"));
QDomDocument doc(QString::fromLatin1("mydocument"));
//if (!doc.setContent(&resultFile)) {
if (!doc.setContent(qsOut)) {
@@ -236,13 +236,13 @@ App::DocumentObjectExecReturn * DrawSVGTemplate::execute(void)
Base::Quantity quantity;
// Obtain the width
QString str = docElem.attribute(QString::fromAscii("width"));
QString str = docElem.attribute(QString::fromLatin1("width"));
quantity = Base::Quantity::parse(str);
quantity.setUnit(Base::Unit::Length);
Width.setValue(quantity.getValue());
str = docElem.attribute(QString::fromAscii("height"));
str = docElem.attribute(QString::fromLatin1("height"));
quantity = Base::Quantity::parse(str);
quantity.setUnit(Base::Unit::Length);