QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
This commit is contained in:
committed by
wmayer
parent
d5c074f80d
commit
cd2db00f22
@@ -100,7 +100,7 @@ void MacroManager::commit(void)
|
||||
// sort import lines and avoid duplicates
|
||||
QTextStream str(&file);
|
||||
QStringList import;
|
||||
import << QString::fromAscii("import FreeCAD");
|
||||
import << QString::fromLatin1("import FreeCAD");
|
||||
QStringList body;
|
||||
|
||||
QStringList::Iterator it;
|
||||
@@ -119,14 +119,14 @@ void MacroManager::commit(void)
|
||||
}
|
||||
|
||||
QString header;
|
||||
header += QString::fromAscii("# -*- coding: utf-8 -*-\n\n");
|
||||
header += QString::fromAscii("# Macro Begin: ");
|
||||
header += QString::fromLatin1("# -*- coding: utf-8 -*-\n\n");
|
||||
header += QString::fromLatin1("# Macro Begin: ");
|
||||
header += this->macroName;
|
||||
header += QString::fromAscii(" +++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
||||
header += QString::fromLatin1(" +++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
||||
|
||||
QString footer = QString::fromAscii("# Macro End: ");
|
||||
QString footer = QString::fromLatin1("# Macro End: ");
|
||||
footer += this->macroName;
|
||||
footer += QString::fromAscii(" +++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
||||
footer += QString::fromLatin1(" +++++++++++++++++++++++++++++++++++++++++++++++++\n");
|
||||
|
||||
// write the data to the text file
|
||||
str << header;
|
||||
@@ -173,7 +173,7 @@ void MacroManager::addLine(LineType Type, const char* sLine)
|
||||
comment = true;
|
||||
}
|
||||
|
||||
QStringList lines = QString::fromAscii(sLine).split(QLatin1String("\n"));
|
||||
QStringList lines = QString::fromLatin1(sLine).split(QLatin1String("\n"));
|
||||
if (comment) {
|
||||
for (QStringList::iterator it = lines.begin(); it != lines.end(); ++it)
|
||||
it->prepend(QLatin1String("#"));
|
||||
@@ -195,7 +195,7 @@ void MacroManager::setModule(const char* sModule)
|
||||
{
|
||||
if (this->openMacro && sModule && *sModule != '\0')
|
||||
{
|
||||
this->macroInProgress.append(QString::fromAscii("import %1").arg(QString::fromAscii(sModule)));
|
||||
this->macroInProgress.append(QString::fromLatin1("import %1").arg(QString::fromLatin1(sModule)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user