forked from qt-creator/qt-creator
EditorManager: Open files with correct case
On case-insensitive file systems we still want files to open with the correct case, because otherwise Qt Creator will later save it with a different case. Task-number: QTCREATORBUG-6510 Change-Id: I8e3f011939306d53c92e28fbf6eded1a2d42a9f2 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -563,15 +563,17 @@ IEditor *EditorManagerPrivate::openEditor(EditorView *view, const QString &fileN
|
||||
int columnNumber = -1;
|
||||
if ((flags & EditorManager::CanContainLineAndColumnNumber) && !fi.exists()) {
|
||||
const EditorManager::FilePathInfo fp = EditorManager::splitLineAndColumnNumber(fn);
|
||||
fn = fp.filePath;
|
||||
fn = Utils::FileUtils::normalizePathName(fp.filePath);
|
||||
lineNumber = fp.lineNumber;
|
||||
columnNumber = fp.columnNumber;
|
||||
if (lineNumber != -1)
|
||||
fi.setFile(fn);
|
||||
} else {
|
||||
fn = Utils::FileUtils::normalizePathName(fn);
|
||||
}
|
||||
|
||||
if (fn.isEmpty())
|
||||
return 0;
|
||||
if (fn != fileName)
|
||||
fi.setFile(fn);
|
||||
|
||||
if (newEditor)
|
||||
*newEditor = false;
|
||||
|
||||
Reference in New Issue
Block a user