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 0695552cff
commit c275b35d48
154 changed files with 836 additions and 836 deletions

View File

@@ -114,8 +114,8 @@ void AbstractSplitView::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp
}
else if (strcmp(Reason,"HeadlightDirection") == 0) {
std::string pos = rGrp.GetASCII("HeadlightDirection");
QString flt = QString::fromAscii("([-+]?[0-9]+\\.?[0-9]+)");
QRegExp rx(QString::fromAscii("^\\(%1,%1,%1\\)$").arg(flt));
QString flt = QString::fromLatin1("([-+]?[0-9]+\\.?[0-9]+)");
QRegExp rx(QString::fromLatin1("^\\(%1,%1,%1\\)$").arg(flt));
if (rx.indexIn(QLatin1String(pos.c_str())) > -1) {
float x = rx.cap(1).toFloat();
float y = rx.cap(2).toFloat();
@@ -143,8 +143,8 @@ void AbstractSplitView::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp
}
else if (strcmp(Reason,"BacklightDirection") == 0) {
std::string pos = rGrp.GetASCII("BacklightDirection");
QString flt = QString::fromAscii("([-+]?[0-9]+\\.?[0-9]+)");
QRegExp rx(QString::fromAscii("^\\(%1,%1,%1\\)$").arg(flt));
QString flt = QString::fromLatin1("([-+]?[0-9]+\\.?[0-9]+)");
QRegExp rx(QString::fromLatin1("^\\(%1,%1,%1\\)$").arg(flt));
if (rx.indexIn(QLatin1String(pos.c_str())) > -1) {
float x = rx.cap(1).toFloat();
float y = rx.cap(2).toFloat();