Commit f7de8c93 authored by Lorenz Haas's avatar Lorenz Haas Committed by Erik Verbruggen
Browse files

Hide 'Refactor -> Add Definition in ...' for signals



Since signals don't have a definition there is no need to show that
action under 'Refactor'.

Change-Id: Ic4d65b56c9197e2dbce5cedd5c760faea14d920d
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent 0042175e
......@@ -299,7 +299,9 @@ void InsertDefFromDecl::match(const CppQuickFixInterface &interface, QuickFixOpe
if (simpleDecl->symbols && ! simpleDecl->symbols->next) {
if (Symbol *symbol = simpleDecl->symbols->value) {
if (Declaration *decl = symbol->asDeclaration()) {
if (decl->type()->isFunctionType()) {
if (Function *func = decl->type()->asFunctionType()) {
if (func->isSignal())
return;
CppRefactoringChanges refactoring(interface->snapshot());
InsertionPointLocator locator(refactoring);
foreach (const InsertionLocation &loc, locator.methodDefinition(decl)) {
......
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