Qt5 compatibility changes.

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

This change is Qt4/Qt5 neutral.
This commit is contained in:
Mateusz Skowroński
2016-02-14 08:20:13 +01:00
parent 6877619d94
commit d13882fcb3
2 changed files with 7 additions and 7 deletions

View File

@@ -236,7 +236,7 @@ QStringList ExpressionCompleter::splitPath ( const QString & path ) const
void ExpressionCompleter::slotUpdate(const QString & prefix)
{
using namespace boost::tuples;
int j = (prefix.size() > 0 && prefix.at(0) == QChar::fromAscii('=')) ? 1 : 0;
int j = (prefix.size() > 0 && prefix.at(0) == QChar::fromLatin1('=')) ? 1 : 0;
std::vector<boost::tuple<int, int, std::string> > tokens = ExpressionParser::tokenize(Base::Tools::toStdString(prefix.mid(j)));
std::string completionPrefix;