summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2010-10-06 16:43:42 +0200
committerErik Verbruggen <erik.verbruggen@nokia.com>2010-10-08 13:15:21 +0200
commite57297f6ee9e721687f25a61858ea5816b65ff23 (patch)
tree649bece4b52764d915c7a65dc7fb41d12db7eb50 /src/plugins/cppeditor
parent7334ed9ec4c0942fbaee9843fb2e6688f849675b (diff)
downloadqt-creator-e57297f6ee9e721687f25a61858ea5816b65ff23.tar.gz
C++: disable definition generation for pure virtual methods.
Diffstat (limited to 'src/plugins/cppeditor')
-rw-r--r--src/plugins/cppeditor/cppinsertdecldef.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cppinsertdecldef.cpp b/src/plugins/cppeditor/cppinsertdecldef.cpp
index 26177ac149..c0becdf2a4 100644
--- a/src/plugins/cppeditor/cppinsertdecldef.cpp
+++ b/src/plugins/cppeditor/cppinsertdecldef.cpp
@@ -282,7 +282,10 @@ QList<CppQuickFixOperation::Ptr> DefFromDecl::match(const CppQuickFixState &stat
if (simpleDecl->symbols && ! simpleDecl->symbols->next) {
if (Symbol *symbol = simpleDecl->symbols->value) {
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;
if (file.isCursorOn(declarator->core_declarator)) {
CppRefactoringChanges refactoring(state.snapshot());