ProjectExplorer: Do not resolve symlinks when opening a project

Task-number: QTCREATORBUG-15145
Change-Id: I71ec43fa8cb0073100c988b6aa8a8a59a254af0c
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-10-14 11:44:42 +03:00
committed by Orgad Shaneh
parent 981f7411d3
commit 3389e5f969
2 changed files with 4 additions and 9 deletions

View File

@@ -113,11 +113,8 @@ void JsonKitsPage::setupProjectFiles(const JsonWizard::GeneratorFiles &files)
foreach (const JsonWizard::GeneratorFile &f, files) {
if (f.file.attributes() & GeneratedFile::OpenProjectAttribute) {
QString errorMessage;
QString path = f.file.path();
const QFileInfo fi(path);
if (fi.exists())
path = fi.canonicalFilePath();
const QFileInfo fi(f.file.path());
const QString path = fi.absoluteFilePath();
Utils::MimeDatabase mdb;
Utils::MimeType mt = mdb.mimeTypeForFile(fi);

View File

@@ -1735,10 +1735,8 @@ ProjectExplorerPlugin::OpenProjectResult ProjectExplorerPlugin::openProjects(con
foreach (const QString &fileName, fileNames) {
QTC_ASSERT(!fileName.isEmpty(), continue);
QFileInfo fi = QFileInfo(fileName);
QString filePath = fileName;
if (fi.exists()) // canonicalFilePath will be empty otherwise!
filePath = fi.canonicalFilePath();
const QFileInfo fi(fileName);
const QString filePath = fi.absoluteFilePath();
bool found = false;
foreach (Project *pi, SessionManager::projects()) {
if (filePath == pi->projectFilePath().toString()) {