Add support for iOS.

Provide support for platforms with older implementations of
realpath() (eg. iOS).

Change-Id: Iec7f73c8014d238ae6a2cb2fa836b36b89ce4ef6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
bb10
Qt4iOS 2012-03-24 14:09:04 +00:00 committed by Qt by Nokia
parent ac7dd2782f
commit 4a4e9e4a9c
1 changed files with 5 additions and 0 deletions

View File

@ -192,7 +192,12 @@ QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry,
}
}
# else
# if _POSIX_VERSION >= 200801L
ret = realpath(entry.nativeFilePath().constData(), (char*)0);
# else
ret = (char*)malloc(PATH_MAX);
realpath(entry.nativeFilePath().constData(), (char*)ret);
# endif
# endif
if (ret) {
data.knownFlagsMask |= QFileSystemMetaData::ExistsAttribute;