Changeset View
Changeset View
Standalone View
Standalone View
codecompletion/context.cpp
Show First 20 Lines • Show All 142 Lines • ▼ Show 20 Line(s) | 139 | { | |||
---|---|---|---|---|---|
143 | FunctionDeclaration* functionCalled = 0; | 143 | FunctionDeclaration* functionCalled = 0; | ||
144 | auto v = visitorForString(m_guessTypeOfExpression, m_duContext.data()); | 144 | auto v = visitorForString(m_guessTypeOfExpression, m_duContext.data()); | ||
145 | DUChainReadLocker lock; | 145 | DUChainReadLocker lock; | ||
146 | if ( ! v || ! v->lastDeclaration() ) { | 146 | if ( ! v || ! v->lastDeclaration() ) { | ||
147 | qCWarning(KDEV_PYTHON_CODECOMPLETION) << "Did not receive a function declaration from expression visitor! Not offering call tips."; | 147 | qCWarning(KDEV_PYTHON_CODECOMPLETION) << "Did not receive a function declaration from expression visitor! Not offering call tips."; | ||
148 | qCWarning(KDEV_PYTHON_CODECOMPLETION) << "Tried: " << m_guessTypeOfExpression; | 148 | qCWarning(KDEV_PYTHON_CODECOMPLETION) << "Tried: " << m_guessTypeOfExpression; | ||
149 | return resultingItems; | 149 | return resultingItems; | ||
150 | } | 150 | } | ||
151 | functionCalled = Helper::functionDeclarationForCalledDeclaration(v->lastDeclaration()).first.data(); | 151 | functionCalled = Helper::functionForCalled(v->lastDeclaration().data()).declaration; | ||
152 | 152 | | |||
153 | auto current = Helper::resolveAliasDeclaration(functionCalled); | 153 | auto current = Helper::resolveAliasDeclaration(functionCalled); | ||
154 | QList<Declaration*> calltips; | 154 | QList<Declaration*> calltips; | ||
155 | if ( current && current->isFunctionDeclaration() ) { | 155 | if ( current && current->isFunctionDeclaration() ) { | ||
156 | calltips << current; | 156 | calltips << current; | ||
157 | } | 157 | } | ||
158 | 158 | | |||
159 | auto calltipItems = declarationListToItemList(calltips); | 159 | auto calltipItems = declarationListToItemList(calltips); | ||
▲ Show 20 Lines • Show All 1146 Lines • Show Last 20 Lines |