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

@@ -221,9 +221,9 @@ void TreeWidget::onCreateGroup()
if (this->contextItem->type() == DocumentType) {
DocumentItem* docitem = static_cast<DocumentItem*>(this->contextItem);
App::Document* doc = docitem->document()->getDocument();
QString cmd = QString::fromAscii("App.getDocument(\"%1\").addObject"
QString cmd = QString::fromLatin1("App.getDocument(\"%1\").addObject"
"(\"App::DocumentObjectGroup\",\"%2\")")
.arg(QString::fromAscii(doc->getName())).arg(name);
.arg(QString::fromLatin1(doc->getName())).arg(name);
Gui::Document* gui = Gui::Application::Instance->getDocument(doc);
gui->openCommand("Create group");
Gui::Application::Instance->runPythonCode(cmd.toUtf8());
@@ -234,10 +234,10 @@ void TreeWidget::onCreateGroup()
(this->contextItem);
App::DocumentObject* obj = objitem->object()->getObject();
App::Document* doc = obj->getDocument();
QString cmd = QString::fromAscii("App.getDocument(\"%1\").getObject(\"%2\")"
QString cmd = QString::fromLatin1("App.getDocument(\"%1\").getObject(\"%2\")"
".newObject(\"App::DocumentObjectGroup\",\"%3\")")
.arg(QString::fromAscii(doc->getName()))
.arg(QString::fromAscii(obj->getNameInDocument()))
.arg(QString::fromLatin1(doc->getName()))
.arg(QString::fromLatin1(obj->getNameInDocument()))
.arg(name);
Gui::Document* gui = Gui::Application::Instance->getDocument(doc);
gui->openCommand("Create group");
@@ -1364,9 +1364,9 @@ void DocumentObjectItem::displayStatusInfo()
{
App::DocumentObject* Obj = viewObject->getObject();
QString info = QString::fromAscii(Obj->getStatusString());
QString info = QString::fromLatin1(Obj->getStatusString());
if ( Obj->mustExecute() == 1 )
info += QString::fromAscii(" (but must be executed)");
info += QString::fromLatin1(" (but must be executed)");
getMainWindow()->showMessage( info );
if (Obj->isError()) {