Fix "File name case mismatch" error when debugging QML apps (Win)

Work around QTBUG-17529 by normalizing the capitalization of the
working directory (which we do already for launching apps without
debugging).

Task-number: QTCREATORBUG-4592
Reviewed-by: Friedemann Kleint
This commit is contained in:
Kai Koehne
2011-04-19 11:07:34 +02:00
committed by con
parent 3f6e418b68
commit c3e2fd9ed7
5 changed files with 28 additions and 15 deletions

View File

@@ -163,6 +163,19 @@ QTCREATOR_UTILS_EXPORT QString getLongPathName(const QString &name)
return rc;
}
// makes sure that capitalization of directories is canonical.
// This mimics the logic in QDeclarative_isFileCaseCorrect
QTCREATOR_UTILS_EXPORT QString normalizePathName(const QString &name)
{
QString canonicalName = getShortPathName(name);
if (canonicalName.isEmpty())
return name;
canonicalName = getLongPathName(canonicalName);
if (canonicalName.isEmpty())
return name;
return canonicalName;
}
QTCREATOR_UTILS_EXPORT unsigned long winQPidToPid(const Q_PID qpid)
{
const PROCESS_INFORMATION *processInfo = reinterpret_cast<const PROCESS_INFORMATION*>(qpid);