forked from qt-creator/qt-creator
HostOsInfo: Add some more useful abstractions.
Namely: - path list separator - executable suffix - file name case sensitivity All of these are duplicated in various places in the current Creator code. Change-Id: I86eb4662fa3c2071759bd728cae1aaf7111ae686 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
@@ -655,8 +655,8 @@ static QStringList environmentImportPaths()
|
||||
|
||||
QByteArray envImportPath = qgetenv("QML_IMPORT_PATH");
|
||||
|
||||
const QChar pathSep = Utils::HostOsInfo::isWindowsHost() ? QLatin1Char(';') : QLatin1Char(':');
|
||||
foreach (const QString &path, QString::fromLatin1(envImportPath).split(pathSep, QString::SkipEmptyParts)) {
|
||||
foreach (const QString &path, QString::fromLatin1(envImportPath)
|
||||
.split(Utils::HostOsInfo::pathListSeparator(), QString::SkipEmptyParts)) {
|
||||
QString canonicalPath = QDir(path).canonicalPath();
|
||||
if (!canonicalPath.isEmpty() && !paths.contains(canonicalPath))
|
||||
paths.append(canonicalPath);
|
||||
|
||||
Reference in New Issue
Block a user