summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfile.cpp
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-03-19 04:06:02 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-03-19 04:06:02 (GMT)
commitf9e3b16b7e2f3ca9ecf6f05341c2a78fb561b682 (patch)
tree65f3b637a19ff47fcc97e3f22deeae7d843cad17 /src/corelib/io/qfile.cpp
parent331ad8eb0aedb4baefcaf6f08a8e0ce440a32b06 (diff)
parent8a7de547942c9a660dfc45c176ea1a3027bbf99a (diff)
downloadQt-f9e3b16b7e2f3ca9ecf6f05341c2a78fb561b682.zip
Qt-f9e3b16b7e2f3ca9ecf6f05341c2a78fb561b682.tar.gz
Qt-f9e3b16b7e2f3ca9ecf6f05341c2a78fb561b682.tar.bz2
Merge remote branch 'origin/4.7' into oslo-staging-1
Conflicts: mkspecs/common/symbian/symbian.conf
Diffstat (limited to 'src/corelib/io/qfile.cpp')
-rw-r--r--src/corelib/io/qfile.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index 728c316..aa1c7d9 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -62,21 +62,25 @@ static const int QFILE_WRITEBUFFER_SIZE = 16384;
static QByteArray locale_encode(const QString &f)
{
-#ifndef Q_OS_DARWIN
- return f.toLocal8Bit();
-#else
+#if defined(Q_OS_DARWIN)
// Mac always expects UTF-8... and decomposed...
return f.normalized(QString::NormalizationForm_D).toUtf8();
+#elif defined(Q_OS_SYMBIAN)
+ return f.toUtf8();
+#else
+ return f.toLocal8Bit();
#endif
}
static QString locale_decode(const QByteArray &f)
{
-#ifndef Q_OS_DARWIN
- return QString::fromLocal8Bit(f);
-#else
+#if defined(Q_OS_DARWIN)
// Mac always gives us UTF-8 and decomposed, we want that composed...
return QString::fromUtf8(f).normalized(QString::NormalizationForm_C);
+#elif defined(Q_OS_SYMBIAN)
+ return QString::fromUtf8(f);
+#else
+ return QString::fromLocal8Bit(f);
#endif
}