Commit 57d3aa88 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

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
parent 88f2a707
......@@ -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;
......
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