Commit 3389e5f9 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

ProjectExplorer: Do not resolve symlinks when opening a project

Task-number: QTCREATORBUG-15145
Change-Id: I71ec43fa8cb0073100c988b6aa8a8a59a254af0c
Reviewed-by: default avatarDaniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent 981f7411
......@@ -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);
......
......@@ -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()) {
......
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