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 d5c074f80d
commit cd2db00f22
154 changed files with 836 additions and 836 deletions

View File

@@ -332,7 +332,7 @@ void TextEditor::keyPressEvent (QKeyEvent * e)
int indent = hPrefGrp->GetInt( "IndentSize", 4 );
bool space = hPrefGrp->GetBool( "Spaces", false );
QString ch = space ? QString(indent, QLatin1Char(' '))
: QString::fromAscii("\t");
: QString::fromLatin1("\t");
QTextCursor cursor = textCursor();
if (!cursor.hasSelection()) {
@@ -421,12 +421,12 @@ void TextEditor::OnChange(Base::Subject<const char*> &rCaller,const char* sReaso
#else
int fontSize = hPrefGrp->GetInt("FontSize", 10);
#endif
QString fontFamily = QString::fromAscii(hPrefGrp->GetASCII( "Font", "Courier" ).c_str());
QString fontFamily = QString::fromLatin1(hPrefGrp->GetASCII( "Font", "Courier" ).c_str());
QFont font(fontFamily, fontSize);
setFont(font);
} else {
QMap<QString, QColor>::ConstIterator it = d->colormap.find(QString::fromAscii(sReason));
QMap<QString, QColor>::ConstIterator it = d->colormap.find(QString::fromLatin1(sReason));
if (it != d->colormap.end()) {
QColor color = it.value();
unsigned long col = (color.red() << 24) | (color.green() << 16) | (color.blue() << 8);