From c1ab581f141ea53634ddc5e9b8bc5bb42e15e92f Mon Sep 17 00:00:00 2001 From: Kai Koehne <kai.koehne@nokia.com> Date: Fri, 18 Feb 2011 10:50:34 +0100 Subject: [PATCH] ApplicationLauncher/Win: Fix capitalization of working directory path QtDeclarative checks for the capitalization of .qml files. This might fail for relative pathes if the working directory is not capitalized like on disk (QTBUG-17529). Task-number: QTCREATORBUG-3722 Reviewed-by: dt --- .../projectexplorer/applicationlauncher_win.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/applicationlauncher_win.cpp b/src/plugins/projectexplorer/applicationlauncher_win.cpp index fcd913859b..d383ec9e0a 100644 --- a/src/plugins/projectexplorer/applicationlauncher_win.cpp +++ b/src/plugins/projectexplorer/applicationlauncher_win.cpp @@ -35,6 +35,8 @@ #include "consoleprocess.h" #include "winguiprocess.h" +#include <utils/winutils.h> + #include <QtCore/QDebug> namespace ProjectExplorer { @@ -69,8 +71,16 @@ ApplicationLauncher::~ApplicationLauncher() void ApplicationLauncher::setWorkingDirectory(const QString &dir) { - d->m_winGuiProcess.setWorkingDirectory(dir); - d->m_consoleProcess.setWorkingDirectory(dir); + QString fixedPath = dir; + QString error; + + // Work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch' ...) + const QString longPath = Utils::getLongPathName(dir, &error); + if (!longPath.isEmpty()) + fixedPath = longPath; + + d->m_winGuiProcess.setWorkingDirectory(fixedPath); + d->m_consoleProcess.setWorkingDirectory(fixedPath); } void ApplicationLauncher::setEnvironment(const Utils::Environment &env) -- GitLab