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
@@ -209,7 +209,7 @@ void SoTextLabel::GLRender(SoGLRenderAction *action)
|
||||
// The font name is of the form "family:style". If 'style' is given it can be
|
||||
// 'Bold', 'Italic' or 'Bold Italic'.
|
||||
QFont font;
|
||||
QString fn = QString::fromAscii(fontname.getString());
|
||||
QString fn = QString::fromLatin1(fontname.getString());
|
||||
int pos = fn.indexOf(QLatin1Char(':'));
|
||||
if (pos > -1) {
|
||||
if (fn.indexOf(QLatin1String("Bold"),pos,Qt::CaseInsensitive) > pos)
|
||||
@@ -434,7 +434,7 @@ void SoFrameLabel::drawImage()
|
||||
return;
|
||||
}
|
||||
|
||||
QFont font(QString::fromAscii(name.getValue()), size.getValue());
|
||||
QFont font(QString::fromLatin1(name.getValue()), size.getValue());
|
||||
QFontMetrics fm(font);
|
||||
int w = 0;
|
||||
int h = fm.height() * num;
|
||||
|
||||
Reference in New Issue
Block a user