Change remaining uses of {to,from}Ascii to {to,from}Latin1 [platformsupport]
authorThiago Macieira <thiago.macieira@intel.com>
Wed, 2 May 2012 14:32:26 +0000 (16:32 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 4 May 2012 13:27:59 +0000 (15:27 +0200)
This operation should be a no-op anyway, since at this point in time,
the fromAscii and toAscii functions simply call their fromLatin1 and
toLatin1 counterparts.

Task-number: QTBUG-21872
Change-Id: Ie1a4e5ceca21c31e7357f28b90abc9129b122104
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
examples/desktop/screenshot/screenshot.cpp
examples/dialogs/classwizard/classwizard.cpp
src/platformsupport/cglconvenience/cglconvenience.mm
src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp

index 66467d4..c9310c9 100644 (file)
@@ -102,7 +102,7 @@ void Screenshot::saveScreenshot()
                                .arg(format.toUpper())
                                .arg(format));
     if (!fileName.isEmpty())
-        originalPixmap.save(fileName, format.toAscii().constData());
+        originalPixmap.save(fileName, format.toLatin1().constData());
 }
 //! [3]
 
index 211a764..eeb1fab 100644 (file)
@@ -79,7 +79,7 @@ void ClassWizard::accept()
 
     if (field("comment").toBool()) {
         block += "/*\n";
-        block += "    " + header.toAscii() + "\n";
+        block += "    " + header.toLatin1() + "\n";
         block += "*/\n";
         block += "\n";
     }
@@ -141,11 +141,11 @@ void ClassWizard::accept()
 
     if (field("comment").toBool()) {
         block += "/*\n";
-        block += "    " + implementation.toAscii() + "\n";
+        block += "    " + implementation.toLatin1() + "\n";
         block += "*/\n";
         block += "\n";
     }
-    block += "#include \"" + header.toAscii() + "\"\n";
+    block += "#include \"" + header.toLatin1() + "\"\n";
     block += "\n";
 
     if (field("qobjectCtor").toBool()) {
index 325f5c5..7ca9b60 100644 (file)
@@ -49,7 +49,7 @@ void (*qcgl_getProcAddress(const QByteArray &procName))()
     CFURLRef url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault,
             CFSTR("/System/Library/Frameworks/OpenGL.framework"), kCFURLPOSIXPathStyle, false);
     CFBundleRef bundle = CFBundleCreate(kCFAllocatorDefault, url);
-    CFStringRef procNameCF = QCFString::toCFStringRef(QString::fromAscii(procName.constData()));
+    CFStringRef procNameCF = QCFString::toCFStringRef(QString::fromLatin1(procName.constData()));
     void *proc = CFBundleGetFunctionPointerForName(bundle, procNameCF);
     CFRelease(url);
     CFRelease(bundle);
index 9a7e0d3..cddc08c 100644 (file)
@@ -251,7 +251,7 @@ namespace {
 
         void updateFamilyNameAndStyle()
         {
-            fontDef.family = QString::fromAscii(freetype->face->family_name);
+            fontDef.family = QString::fromLatin1(freetype->face->family_name);
 
             if (freetype->face->style_flags & FT_STYLE_FLAG_ITALIC)
                 fontDef.style = QFont::StyleItalic;
@@ -413,7 +413,7 @@ QStringList QBasicFontDatabase::addTTFile(const QByteArray &fontData, const QByt
             }
         }
 
-        QString family = QString::fromAscii(face->family_name);
+        QString family = QString::fromLatin1(face->family_name);
         FontFile *fontFile = new FontFile;
         fontFile->fileName = QFile::decodeName(file);
         fontFile->indexValue = index;