forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user