MCPcopy Create free account
hub / github.com/KDE/kdevelop / accept

Method accept

plugins/quickopen/quickopenplugin.cpp:136–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134 {
135 }
136 bool accept(Declaration* decl) override
137 {
138 if (decl->range().isEmpty()) {
139 return false;
140 }
141 bool collectable = mode == Functions ? decl->isFunctionDeclaration() : (decl->isFunctionDeclaration() || (decl->internalContext() && decl->internalContext()->type() == DUContext::Class));
142 if (collectable) {
143 DUChainItem item;
144 item.m_item = IndexedDeclaration(decl);
145 item.m_text = decl->toString();
146 items << item;
147
148 return true;
149 } else {
150 return false;
151 }
152 }
153 bool accept(DUContext* ctx) override
154 {
155 if (ctx->type() == DUContext::Class || ctx->type() == DUContext::Namespace || ctx->type() == DUContext::Global || ctx->type() == DUContext::Other || ctx->type() == DUContext::Helper) {

Callers 1

eventFilterMethod · 0.45

Calls 7

IndexedDeclarationClass · 0.50
isEmptyMethod · 0.45
rangeMethod · 0.45
isFunctionDeclarationMethod · 0.45
internalContextMethod · 0.45
typeMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected