Commit c1ab581f authored by Kai Koehne's avatar Kai Koehne
Browse files

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
parent 21b18540
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
#include "consoleprocess.h" #include "consoleprocess.h"
#include "winguiprocess.h" #include "winguiprocess.h"
#include <utils/winutils.h>
#include <QtCore/QDebug> #include <QtCore/QDebug>
namespace ProjectExplorer { namespace ProjectExplorer {
...@@ -69,8 +71,16 @@ ApplicationLauncher::~ApplicationLauncher() ...@@ -69,8 +71,16 @@ ApplicationLauncher::~ApplicationLauncher()
void ApplicationLauncher::setWorkingDirectory(const QString &dir) void ApplicationLauncher::setWorkingDirectory(const QString &dir)
{ {
d->m_winGuiProcess.setWorkingDirectory(dir); QString fixedPath = dir;
d->m_consoleProcess.setWorkingDirectory(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) void ApplicationLauncher::setEnvironment(const Utils::Environment &env)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment