From 57d3aa8840bc2285c39fe8aa25ddb682da932429 Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Date: Thu, 4 Mar 2010 09:33:28 +0100
Subject: [PATCH] Designer: Fix goto slot in case of sources in different
 paths.

Check on path is too strict (since the documents are already
limited to the ones including the header).
Task-number: QTCREATORBUG-746
---
 src/plugins/designer/qtcreatorintegration.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/plugins/designer/qtcreatorintegration.cpp b/src/plugins/designer/qtcreatorintegration.cpp
index 990748349ca..ef2e54f80be 100644
--- a/src/plugins/designer/qtcreatorintegration.cpp
+++ b/src/plugins/designer/qtcreatorintegration.cpp
@@ -465,11 +465,10 @@ static Document::Ptr addDefinition(const CPlusPlus::Snapshot &docTable,
 
     QFileInfo headerFI(headerFileName);
     const QString headerBaseName = headerFI.completeBaseName();
-    const QString headerAbsolutePath = headerFI.absolutePath();
     foreach (const Document::Ptr &doc, docList) {
         const QFileInfo sourceFI(doc->fileName());
-        // we take only those documents which has the same filename and path (maybe we don't need to compare the path???)
-        if (headerBaseName == sourceFI.baseName() && headerAbsolutePath == sourceFI.absolutePath()) {
+        // we take only those documents which have the same filename
+        if (headerBaseName == sourceFI.baseName()) {
             if (ITextEditable *editable = editableAt(doc->fileName(), 0, 0)) {
                 const QString contents = editable->contents();
                 int column;
-- 
GitLab