forked from qt-creator/qt-creator
Create definition is available on the whole declaration line.
Merge-request: 390 Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com> Change-Id: I046b3046d3d0148b0fad694181f17737e12a85b6 Reviewed-on: http://codereview.qt-project.org/5529 Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
This commit is contained in:
committed by
Christian Kamm
parent
9357b054ae
commit
9ceabbacfb
@@ -293,7 +293,6 @@ QList<CppQuickFixOperation::Ptr> DefFromDecl::match(
|
||||
const QSharedPointer<const Internal::CppQuickFixAssistInterface> &interface)
|
||||
{
|
||||
const QList<AST *> &path = interface->path();
|
||||
CppRefactoringFilePtr file = interface->currentFile();
|
||||
|
||||
int idx = path.size() - 1;
|
||||
for (; idx >= 0; --idx) {
|
||||
@@ -306,8 +305,6 @@ QList<CppQuickFixOperation::Ptr> DefFromDecl::match(
|
||||
&& !decl->type()->asFunctionType()->isPureVirtual()
|
||||
&& decl->enclosingScope()
|
||||
&& decl->enclosingScope()->isClass()) {
|
||||
DeclaratorAST *declarator = simpleDecl->declarator_list->value;
|
||||
if (file->isCursorOn(declarator->core_declarator)) {
|
||||
CppRefactoringChanges refactoring(interface->snapshot());
|
||||
InsertionPointLocator locator(refactoring);
|
||||
QList<CppQuickFixOperation::Ptr> results;
|
||||
@@ -320,7 +317,6 @@ QList<CppQuickFixOperation::Ptr> DefFromDecl::match(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user