Commit fac5270c authored by Sankhesh Jhaveri's avatar Sankhesh Jhaveri

Qt5 obsoletes toAscii and fromAscii methods

Replaced all instances:
QString::toAscii --> QString::toLatin1
QString::fromAscii --> QString::fromLatin1
QChar::fromAscii --> QLatin1Char
parent d3a5a226
......@@ -177,7 +177,7 @@ QtTesting_getProperty(PyObject* /*self*/, PyObject* args)
}
return Py_BuildValue(const_cast<char*>("s"),
PropertyValue.toAscii().data());
PropertyValue.toLatin1().data());
}
static PyObject*
......@@ -291,7 +291,7 @@ QtTesting_getChildren(PyObject* /*self*/, PyObject* args)
QString ret = QString("[%1]").arg(objs);
return Py_BuildValue(const_cast<char*>("s"),
ret.toAscii().data());
ret.toLatin1().data());
}
static PyObject*
......@@ -344,7 +344,7 @@ QtTesting_invokeMethod(PyObject* /*self*/, PyObject* args)
}
return Py_BuildValue(const_cast<char*>("s"),
PropertyResult.toAscii().data());
PropertyResult.toLatin1().data());
}
static PyMethodDef QtTestingMethods[] = {
......@@ -448,7 +448,7 @@ QString pqPythonEventSource::getProperty(QString& object, QString& prop)
object = QString::null;
return QString();
}
int idx = qobject->metaObject()->indexOfProperty(prop.toAscii().data());
int idx = qobject->metaObject()->indexOfProperty(prop.toLatin1().data());
if(idx == -1)
{
prop = QString::null;
......@@ -490,7 +490,7 @@ void pqPythonEventSource::setProperty(QString& object, QString& prop,
return;
}
int idx = qobject->metaObject()->indexOfProperty(prop.toAscii().data());
int idx = qobject->metaObject()->indexOfProperty(prop.toLatin1().data());
if(idx == -1)
{
prop = QString::null;
......@@ -505,7 +505,7 @@ void pqPythonEventSource::setProperty(QString& object, QString& prop,
{
val = value.split(";");
}
qobject->setProperty(prop.toAscii().data(), val);
qobject->setProperty(prop.toLatin1().data(), val);
}
}
......@@ -596,7 +596,7 @@ QString pqPythonEventSource::invokeMethod(QString& object, QString& method)
}
else
{
if(!QMetaObject::invokeMethod(qobject, method.toAscii().data(),
if(!QMetaObject::invokeMethod(qobject, method.toLatin1().data(),
Q_RETURN_ARG(QVariant, ret)))
{
method = QString::null;
......
......@@ -39,7 +39,7 @@ void pqStdoutEventObserver::onRecordEvent(
const QString& Arguments)
{
printf("event: %s %s %s\n",
Widget.toAscii().data(),
Command.toAscii().data(),
Arguments.toAscii().data());
Widget.toLatin1().data(),
Command.toLatin1().data(),
Arguments.toLatin1().data());
}
......@@ -106,8 +106,8 @@ bool pqTabBarEventPlayer::playEvent(
if (sibling_tab_bar->tabText(cc) == value)
{
std::cout << "DEBUG: Could not find request tab-pane on "
<< pqObjectNaming::GetName(*tab_bar).toAscii().data() << ". Using "
<< pqObjectNaming::GetName(*sibling_tab_bar).toAscii().data() << " instead."
<< pqObjectNaming::GetName(*tab_bar).toLatin1().data() << ". Using "
<< pqObjectNaming::GetName(*sibling_tab_bar).toLatin1().data() << " instead."
<< std::endl;
sibling_tab_bar->setCurrentIndex(cc);
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment