QString::toAscii() is obsolete in Qt5. Replace it with toLatin1().

This change is Qt4/Qt5 neutral.
This commit is contained in:
Mateusz Skowroński 2016-04-14 19:35:07 +02:00 committed by wmayer
parent 81b59324cd
commit 3df6064e85
4 changed files with 6 additions and 6 deletions

View File

@ -151,7 +151,7 @@ namespace Gui
void operator()(std::ostream& out, const VertexW& vertexW) const
{
out << "[label=\"";
out << graphVW[vertexW].text->toPlainText().toAscii().data();
out << graphVW[vertexW].text->toPlainText().toLatin1().data();
out << "\"]";
}
private:

View File

@ -107,7 +107,7 @@ void TaskDatumParameters::makeRefStrings(std::vector<QString>& refstrings, std::
}
TaskDatumParameters::TaskDatumParameters(ViewProviderDatum *DatumView,QWidget *parent)
: TaskBox(Gui::BitmapFactory().pixmap((QString::fromAscii("PartDesign_") + DatumView->datumType).toAscii()),
: TaskBox(Gui::BitmapFactory().pixmap((QString::fromAscii("PartDesign_") + DatumView->datumType).toLatin1()),
DatumView->datumType + tr(" parameters"), true, parent),
DatumView(DatumView)
{
@ -597,7 +597,7 @@ void TaskDatumParameters::onRefName(const QString& text, unsigned idx)
if (parts.length() < 2)
parts.push_back(QString::fromAscii(""));
// Check whether this is the name of an App::Plane or Part::Datum feature
App::DocumentObject* obj = DatumView->getObject()->getDocument()->getObject(parts[0].toAscii());
App::DocumentObject* obj = DatumView->getObject()->getDocument()->getObject(parts[0].toLatin1());
if (obj == NULL) return;
std::string subElement;

View File

@ -198,7 +198,7 @@ std::vector<App::DocumentObject*> TaskFeaturePick::getFeatures() {
std::vector<App::DocumentObject*> result;
for (std::vector<QString>::const_iterator s = features.begin(); s != features.end(); s++)
result.push_back(App::GetApplication().getActiveDocument()->getObject(s->toAscii().data()));
result.push_back(App::GetApplication().getActiveDocument()->getObject(s->toLatin1().data()));
return result;
}
@ -217,7 +217,7 @@ std::vector<App::DocumentObject*> TaskFeaturePick::buildFeatures() {
QString t = item->text();
t = t.left(t.indexOf(QString::fromAscii("(")) - 1);
auto obj = App::GetApplication().getActiveDocument()->getObject(t.toAscii().data());
auto obj = App::GetApplication().getActiveDocument()->getObject(t.toLatin1().data());
//build the dependend copy or reference if wanted by the user
if(*st == otherBody ||

View File

@ -136,7 +136,7 @@ const QByteArray TaskSketchBasedParameters::onFaceName(const QString& text)
if (parts.length() < 2)
parts.push_back(QString::fromAscii(""));
// Check whether this is the name of an App::Plane or Part::Datum feature
App::DocumentObject* obj = vp->getObject()->getDocument()->getObject(parts[0].toAscii());
App::DocumentObject* obj = vp->getObject()->getDocument()->getObject(parts[0].toLatin1());
if (obj == NULL)
return QByteArray();