forked from qt-creator/qt-creator
Environment, expandVariables() can return native separators
Convert to '/' at the right place.
This commit is contained in:
@@ -219,7 +219,7 @@ QString Environment::searchInPath(const QStringList &executables,
|
|||||||
const QStringList &additionalDirs) const
|
const QStringList &additionalDirs) const
|
||||||
{
|
{
|
||||||
foreach (const QString &executable, executables) {
|
foreach (const QString &executable, executables) {
|
||||||
QString exec = expandVariables(executable);
|
QString exec = QDir::cleanPath(expandVariables(executable));
|
||||||
|
|
||||||
if (exec.isEmpty())
|
if (exec.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ QString PathChooserPrivate::expandedPath(const QString &input) const
|
|||||||
{
|
{
|
||||||
if (input.isEmpty())
|
if (input.isEmpty())
|
||||||
return input;
|
return input;
|
||||||
const QString path = QDir::fromNativeSeparators(m_environment.expandVariables(input));
|
const QString path = QDir::cleanPath(m_environment.expandVariables(input));
|
||||||
if (path.isEmpty())
|
if (path.isEmpty())
|
||||||
return path;
|
return path;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user