diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2015-05-24 21:25:11 +0100 |
---|---|---|
committer | Sérgio Martins <sergio.martins@kdab.com> | 2015-05-27 08:07:15 +0000 |
commit | 6764e1b646d3c6049b24d5ceb7cdecd637cdf8c0 (patch) | |
tree | 8084068364e748e0c4419d67a5c1a78762cf1f44 /src | |
parent | 35175b8fa5f8be93b147f57a247b8e52f28ee8cb (diff) | |
download | qtbase-6764e1b646d3c6049b24d5ceb7cdecd637cdf8c0.tar.gz |
QStandardPaths: Use QDir::listSeparator() instead of ifdefs
Change-Id: I1783ce7bcbaabb4920166440e2ed0b41d6daa7aa
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qstandardpaths.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/corelib/io/qstandardpaths.cpp b/src/corelib/io/qstandardpaths.cpp index 5f764549e0..beb5d29d54 100644 --- a/src/corelib/io/qstandardpaths.cpp +++ b/src/corelib/io/qstandardpaths.cpp @@ -494,13 +494,8 @@ QString QStandardPaths::findExecutable(const QString &executableName, const QStr QStringList searchPaths = paths; if (paths.isEmpty()) { QByteArray pEnv = qgetenv("PATH"); -#if defined(Q_OS_WIN) - const QLatin1Char pathSep(';'); -#else - const QLatin1Char pathSep(':'); -#endif // Remove trailing slashes, which occur on Windows. - const QStringList rawPaths = QString::fromLocal8Bit(pEnv.constData()).split(pathSep, QString::SkipEmptyParts); + const QStringList rawPaths = QString::fromLocal8Bit(pEnv.constData()).split(QDir::listSeparator(), QString::SkipEmptyParts); searchPaths.reserve(rawPaths.size()); foreach (const QString &rawPath, rawPaths) { QString cleanPath = QDir::cleanPath(rawPath); |