summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-05-02 14:46:10 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-04 15:24:52 +0200
commit0ec1b9d162dd1372bce789268251fe90b723f2ef (patch)
treedb1ec97937139b583389202e2417816322617885 /src
parent7c717e56f51e7e8b1ab756f4b2b9717dadb1d82c (diff)
Use QFile::encodeName to encode a file name on Unix
This usually matches QString::toLocal8Bit, not toAscii. Change-Id: I7b1c3e500be8265de0710cf36ca407c8b3f31edd Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp2
-rw-r--r--src/printsupport/kernel/qprinterinfo_unix.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp b/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp
index 38a6f2f9df..9a7e0d31db 100644
--- a/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp
+++ b/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp
@@ -415,7 +415,7 @@ QStringList QBasicFontDatabase::addTTFile(const QByteArray &fontData, const QByt
QString family = QString::fromAscii(face->family_name);
FontFile *fontFile = new FontFile;
- fontFile->fileName = QString::fromAscii(file);
+ fontFile->fileName = QFile::decodeName(file);
fontFile->indexValue = index;
QFont::Stretch stretch = QFont::Unstretched;
diff --git a/src/printsupport/kernel/qprinterinfo_unix.cpp b/src/printsupport/kernel/qprinterinfo_unix.cpp
index b87d2a160b..05908dcf9e 100644
--- a/src/printsupport/kernel/qprinterinfo_unix.cpp
+++ b/src/printsupport/kernel/qprinterinfo_unix.cpp
@@ -254,7 +254,7 @@ void qt_parseEtcLpPrinters(QList<QPrinterDescription> *printers)
QFileInfo printer = dirs.at(i);
if (printer.isDir()) {
tmp.sprintf("/etc/lp/printers/%s/configuration",
- printer.fileName().toAscii().data());
+ QFile::encodeName(printer.fileName()).data());
QFile configuration(tmp);
char *line = new char[1025];
QString remote(QLatin1String("Remote:"));