diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index ec7d89fa87..be15e33fff 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -760,9 +760,13 @@ QString QDir::relativeFilePath(const QString &fileName) const #endif QString result; +#if defined(Q_OS_WIN) QStringList dirElts = dir.split(QLatin1Char('/'), QString::SkipEmptyParts); QStringList fileElts = file.split(QLatin1Char('/'), QString::SkipEmptyParts); - +#else + QVector dirElts = dir.splitRef(QLatin1Char('/'), QString::SkipEmptyParts); + QVector fileElts = file.splitRef(QLatin1Char('/'), QString::SkipEmptyParts); +#endif int i = 0; while (i < dirElts.size() && i < fileElts.size() && #if defined(Q_OS_WIN)