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

This change is Qt4/Qt5 neutral.
This commit is contained in:
Mateusz Skowroński
2015-12-15 07:00:20 +01:00
committed by wmayer
parent d5c074f80d
commit cd2db00f22
154 changed files with 836 additions and 836 deletions

View File

@@ -43,9 +43,9 @@ ExpressionCompleter::ExpressionCompleter(const App::Document * currentDoc, const
/* Create tree with full path to all objects */
while (di != docs.end()) {
QStandardItem* docItem = new QStandardItem(QString::fromAscii((*di)->getName()));
QStandardItem* docItem = new QStandardItem(QString::fromLatin1((*di)->getName()));
docItem->setData(QString::fromAscii((*di)->getName()) + QString::fromAscii("#"), Qt::UserRole);
docItem->setData(QString::fromLatin1((*di)->getName()) + QString::fromLatin1("#"), Qt::UserRole);
createModelForDocument(*di, docItem, forbidden);
model->appendRow(docItem);
@@ -90,9 +90,9 @@ void ExpressionCompleter::createModelForDocument(const App::Document * doc, QSta
continue;
}
QStandardItem* docObjItem = new QStandardItem(QString::fromAscii((*doi)->getNameInDocument()));
QStandardItem* docObjItem = new QStandardItem(QString::fromLatin1((*doi)->getNameInDocument()));
docObjItem->setData(QString::fromAscii((*doi)->getNameInDocument()) + QString::fromAscii("."), Qt::UserRole);
docObjItem->setData(QString::fromLatin1((*doi)->getNameInDocument()) + QString::fromLatin1("."), Qt::UserRole);
createModelForDocumentObject(*doi, docObjItem);
parent->appendRow(docObjItem);
@@ -104,7 +104,7 @@ void ExpressionCompleter::createModelForDocument(const App::Document * doc, QSta
docObjItem = new QStandardItem(QString::fromUtf8(label.c_str()));
docObjItem->setData( QString::fromUtf8(label.c_str()) + QString::fromAscii("."), Qt::UserRole);
docObjItem->setData( QString::fromUtf8(label.c_str()) + QString::fromLatin1("."), Qt::UserRole);
createModelForDocumentObject(*doi, docObjItem);
parent->appendRow(docObjItem);
}