Allow the QPA plugin arguments to contain non-ASCII.
authorThiago Macieira <thiago.macieira@intel.com>
Wed, 2 May 2012 12:47:30 +0000 (14:47 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 4 May 2012 13:24:52 +0000 (15:24 +0200)
Who knows what we might need them for in the future?

Change-Id: Ic68e04aea6cb26afb0ed98684bbb37a62c111638
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
src/gui/kernel/qguiapplication.cpp
src/gui/text/qrawfont_ft.cpp

index 8fd4d4a..27e84b7 100644 (file)
@@ -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);
index b54a7a3..959fb44 100644 (file)
@@ -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;