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
This commit is contained in:
Friedemann Kleint
2010-03-04 09:33:28 +01:00
parent 88f2a707ff
commit 57d3aa8840

View File

@@ -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;