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>bb10
parent
7c717e56f5
commit
0ec1b9d162
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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:"));
|
||||
|
|
|
|||
Loading…
Reference in New Issue