aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@digia.com>2013-12-05 12:43:34 +0100
committerEike Ziller <eike.ziller@digia.com>2013-12-05 13:25:04 +0100
commit4b19bdd6f1297d463037aeb8038378de26d4241b (patch)
tree3500c7a8f0aab5ead822515dfcdbcf347afd9c2c
parent0c66e74cf0da54df83d5454a689f6e7b7fd75f89 (diff)
Resolve links and normalize file names when opening editors again.
For the check if a certain editor is already open. Broke with 8c2e3fd2cbaeb1178ae3991de794ee6d74c84d85. Task-number: QTCREATORBUG-10836 Task-number: QTCREATORBUG-10945 Task-number: QTCREATORBUG-10994 Change-Id: Id1b20cd935986306f85a659f19dff52f2ee38052 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: David Schulz <david.schulz@digia.com> Reviewed-by: Robert Loehning <robert.loehning@digia.com>
-rw-r--r--src/plugins/coreplugin/editormanager/documentmodel.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/editormanager/documentmodel.cpp b/src/plugins/coreplugin/editormanager/documentmodel.cpp
index 737b2fc5fa..be48667591 100644
--- a/src/plugins/coreplugin/editormanager/documentmodel.cpp
+++ b/src/plugins/coreplugin/editormanager/documentmodel.cpp
@@ -29,6 +29,7 @@
#include "documentmodel.h"
#include "ieditor.h"
+#include <coreplugin/documentmanager.h>
#include <coreplugin/idocument.h>
#include <utils/qtcassert.h>
@@ -194,8 +195,9 @@ int DocumentModel::indexOfFilePath(const QString &filePath) const
{
if (filePath.isEmpty())
return -1;
+ const QString fixedPath = DocumentManager::fixFileName(filePath, DocumentManager::KeepLinks);
for (int i = 0; i < d->m_documents.count(); ++i) {
- if (d->m_documents.at(i)->fileName() == filePath)
+ if (DocumentManager::fixFileName(d->m_documents.at(i)->fileName(), DocumentManager::KeepLinks) == fixedPath)
return i;
}
return -1;