Changeset View
Changeset View
Standalone View
Standalone View
codecompletion/items/completionitem.cpp
Show All 27 Lines | |||||
28 | 28 | | |||
29 | namespace go | 29 | namespace go | ||
30 | { | 30 | { | ||
31 | 31 | | |||
32 | CompletionItem::CompletionItem(KDevelop::DeclarationPointer decl, QExplicitlySharedDataPointer< KDevelop::CodeCompletionContext > context, int inheritanceDepth): | 32 | CompletionItem::CompletionItem(KDevelop::DeclarationPointer decl, QExplicitlySharedDataPointer< KDevelop::CodeCompletionContext > context, int inheritanceDepth): | ||
33 | NormalDeclarationCompletionItem(decl, QExplicitlySharedDataPointer<KDevelop::CodeCompletionContext>(), 0), | 33 | NormalDeclarationCompletionItem(decl, QExplicitlySharedDataPointer<KDevelop::CodeCompletionContext>(), 0), | ||
34 | m_prefix("") | 34 | m_prefix("") | ||
35 | { | 35 | { | ||
36 | Q_UNUSED(context); | ||||
37 | Q_UNUSED(inheritanceDepth); | ||||
36 | DUChainReadLocker lock; | 38 | DUChainReadLocker lock; | ||
37 | if(!decl) | 39 | if(!decl) | ||
38 | return; | 40 | return; | ||
39 | //NormalDeclarationCompletionItem fails to get a meaningful prefix in these cases | 41 | //NormalDeclarationCompletionItem fails to get a meaningful prefix in these cases | ||
40 | if(decl->abstractType() && decl->abstractType()->whichType() == KDevelop::AbstractType::TypeFunction) | 42 | if(decl->abstractType() && decl->abstractType()->whichType() == KDevelop::AbstractType::TypeFunction) | ||
41 | m_prefix = decl->abstractType()->toString(); | 43 | m_prefix = decl->abstractType()->toString(); | ||
42 | if(decl->kind() == KDevelop::Declaration::Import || decl->kind() == KDevelop::Declaration::NamespaceAlias) | 44 | if(decl->kind() == KDevelop::Declaration::Import || decl->kind() == KDevelop::Declaration::NamespaceAlias) | ||
43 | m_prefix = "namespace"; | 45 | m_prefix = "namespace"; | ||
▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines |