From 4ececbba5817445d59f66209fd48388f950673c5 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 2 May 2012 14:47:30 +0200 Subject: Allow the QPA plugin arguments to contain non-ASCII. Who knows what we might need them for in the future? Change-Id: Ic68e04aea6cb26afb0ed98684bbb37a62c111638 Reviewed-by: Paul Olav Tvete --- src/gui/kernel/qguiapplication.cpp | 2 +- src/gui/text/qrawfont_ft.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 8fd4d4a2b3..27e84b71a9 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -670,7 +670,7 @@ static void init_platform(const QString &pluginArgument, const QString &platform foreach (const QString &argument, arguments) { const int equalsPos = argument.indexOf(QLatin1Char('=')); const QByteArray name = - equalsPos != -1 ? argument.left(equalsPos).toAscii() : argument.toAscii(); + equalsPos != -1 ? argument.left(equalsPos).toUtf8() : argument.toUtf8(); const QVariant value = equalsPos != -1 ? QVariant(argument.mid(equalsPos + 1)) : QVariant(true); nativeInterface->setProperty(name.constData(), value); diff --git a/src/gui/text/qrawfont_ft.cpp b/src/gui/text/qrawfont_ft.cpp index b54a7a3ac3..959fb44606 100644 --- a/src/gui/text/qrawfont_ft.cpp +++ b/src/gui/text/qrawfont_ft.cpp @@ -63,7 +63,7 @@ public: void updateFamilyNameAndStyle() { - fontDef.family = QString::fromAscii(freetype->face->family_name); + fontDef.family = QString::fromUtf8(freetype->face->family_name); if (freetype->face->style_flags & FT_STYLE_FLAG_ITALIC) fontDef.style = QFont::StyleItalic; -- cgit v1.2.3