forked from qt-creator/qt-creator
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:
committed by
Orgad Shaneh
parent
981f7411d3
commit
3389e5f969
@@ -113,11 +113,8 @@ void JsonKitsPage::setupProjectFiles(const JsonWizard::GeneratorFiles &files)
|
|||||||
foreach (const JsonWizard::GeneratorFile &f, files) {
|
foreach (const JsonWizard::GeneratorFile &f, files) {
|
||||||
if (f.file.attributes() & GeneratedFile::OpenProjectAttribute) {
|
if (f.file.attributes() & GeneratedFile::OpenProjectAttribute) {
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
QString path = f.file.path();
|
const QFileInfo fi(f.file.path());
|
||||||
const QFileInfo fi(path);
|
const QString path = fi.absoluteFilePath();
|
||||||
|
|
||||||
if (fi.exists())
|
|
||||||
path = fi.canonicalFilePath();
|
|
||||||
|
|
||||||
Utils::MimeDatabase mdb;
|
Utils::MimeDatabase mdb;
|
||||||
Utils::MimeType mt = mdb.mimeTypeForFile(fi);
|
Utils::MimeType mt = mdb.mimeTypeForFile(fi);
|
||||||
|
@@ -1735,10 +1735,8 @@ ProjectExplorerPlugin::OpenProjectResult ProjectExplorerPlugin::openProjects(con
|
|||||||
foreach (const QString &fileName, fileNames) {
|
foreach (const QString &fileName, fileNames) {
|
||||||
QTC_ASSERT(!fileName.isEmpty(), continue);
|
QTC_ASSERT(!fileName.isEmpty(), continue);
|
||||||
|
|
||||||
QFileInfo fi = QFileInfo(fileName);
|
const QFileInfo fi(fileName);
|
||||||
QString filePath = fileName;
|
const QString filePath = fi.absoluteFilePath();
|
||||||
if (fi.exists()) // canonicalFilePath will be empty otherwise!
|
|
||||||
filePath = fi.canonicalFilePath();
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
foreach (Project *pi, SessionManager::projects()) {
|
foreach (Project *pi, SessionManager::projects()) {
|
||||||
if (filePath == pi->projectFilePath().toString()) {
|
if (filePath == pi->projectFilePath().toString()) {
|
||||||
|
Reference in New Issue
Block a user