forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user