forked from qt-creator/qt-creator
C++: disable definition generation for pure virtual methods.
This commit is contained in:
@@ -282,7 +282,10 @@ QList<CppQuickFixOperation::Ptr> DefFromDecl::match(const CppQuickFixState &stat
|
|||||||
if (simpleDecl->symbols && ! simpleDecl->symbols->next) {
|
if (simpleDecl->symbols && ! simpleDecl->symbols->next) {
|
||||||
if (Symbol *symbol = simpleDecl->symbols->value) {
|
if (Symbol *symbol = simpleDecl->symbols->value) {
|
||||||
if (Declaration *decl = symbol->asDeclaration()) {
|
if (Declaration *decl = symbol->asDeclaration()) {
|
||||||
if (decl->type()->isFunctionType() && decl->enclosingScope() && decl->enclosingScope()->isClass()) {
|
if (decl->type()->isFunctionType()
|
||||||
|
&& !decl->type()->asFunctionType()->isPureVirtual()
|
||||||
|
&& decl->enclosingScope()
|
||||||
|
&& decl->enclosingScope()->isClass()) {
|
||||||
DeclaratorAST *declarator = simpleDecl->declarator_list->value;
|
DeclaratorAST *declarator = simpleDecl->declarator_list->value;
|
||||||
if (file.isCursorOn(declarator->core_declarator)) {
|
if (file.isCursorOn(declarator->core_declarator)) {
|
||||||
CppRefactoringChanges refactoring(state.snapshot());
|
CppRefactoringChanges refactoring(state.snapshot());
|
||||||
|
|||||||
Reference in New Issue
Block a user