Changeset View
Changeset View
Standalone View
Standalone View
duchain/typeutils.cpp
Show First 20 Lines • Show All 181 Lines • ▼ Show 20 Line(s) | 179 | void getMemberFunctions(const StructureType::Ptr& klass, const TopDUContext* topContext, QList<Declaration*>& functions, const QString& functionName, bool mustBeConstant) { | |||
---|---|---|---|---|---|
182 | for( QHash<KDevelop::FunctionType::Ptr, ClassFunctionDeclaration*>::const_iterator it = tempFunctions.constBegin(); it != tempFunctions.constEnd(); ++it ) | 182 | for( QHash<KDevelop::FunctionType::Ptr, ClassFunctionDeclaration*>::const_iterator it = tempFunctions.constBegin(); it != tempFunctions.constEnd(); ++it ) | ||
183 | functions << (*it); | 183 | functions << (*it); | ||
184 | } | 184 | } | ||
185 | 185 | | |||
186 | void getConstructors(const StructureType::Ptr& klass, const TopDUContext* topContext, QList<Declaration*>& functions) { | 186 | void getConstructors(const StructureType::Ptr& klass, const TopDUContext* topContext, QList<Declaration*>& functions) { | ||
187 | Declaration* klassDecl = klass->declaration(topContext); | 187 | Declaration* klassDecl = klass->declaration(topContext); | ||
188 | DUContext* context = klassDecl ? klassDecl->internalContext() : 0; | 188 | DUContext* context = klassDecl ? klassDecl->internalContext() : 0; | ||
189 | if( !context || !context->owner() || !context->owner() ) { | 189 | if( !context || !context->owner() || !context->owner() ) { | ||
190 | // kDebug(9007) << "Tried to get constructors of a class without context"; | 190 | // qDebug(9007) << "Tried to get constructors of a class without context"; | ||
191 | return; | 191 | return; | ||
192 | } | 192 | } | ||
193 | 193 | | |||
194 | Identifier id(context->owner()->identifier()); | 194 | Identifier id(context->owner()->identifier()); | ||
195 | id.clearTemplateIdentifiers(); | 195 | id.clearTemplateIdentifiers(); | ||
196 | 196 | | |||
197 | QList<Declaration*> declarations = context->findLocalDeclarations(id, CursorInRevision::invalid(), topContext, AbstractType::Ptr(), DUContext::OnlyFunctions); | 197 | QList<Declaration*> declarations = context->findLocalDeclarations(id, CursorInRevision::invalid(), topContext, AbstractType::Ptr(), DUContext::OnlyFunctions); | ||
198 | 198 | | |||
Show All 38 Lines | 219 | KDevelop::AbstractType::Ptr matchingClassPointer(const KDevelop::AbstractType::Ptr& matchTo, const KDevelop::AbstractType::Ptr& actual, const KDevelop::TopDUContext* topContext) { | |||
237 | } | 237 | } | ||
238 | 238 | | |||
239 | return actual; | 239 | return actual; | ||
240 | } | 240 | } | ||
241 | 241 | | |||
242 | Declaration* getDeclaration( const AbstractType::Ptr& type, TopDUContext* top ) { | 242 | Declaration* getDeclaration( const AbstractType::Ptr& type, TopDUContext* top ) { | ||
243 | if( !type) return 0; | 243 | if( !type) return 0; | ||
244 | 244 | | |||
245 | const IdentifiedType* idType = dynamic_cast<const IdentifiedType*>(type.unsafeData()); | 245 | const IdentifiedType* idType = dynamic_cast<const IdentifiedType*>(type.data()); | ||
246 | if( idType ) { | 246 | if( idType ) { | ||
247 | return idType->declaration(top); | 247 | return idType->declaration(top); | ||
248 | } else { | 248 | } else { | ||
249 | return 0; | 249 | return 0; | ||
250 | } | 250 | } | ||
251 | } | 251 | } | ||
252 | 252 | | |||
253 | AbstractType::Ptr decreasePointerDepth(AbstractType::Ptr type, TopDUContext* top, bool useOperator) { | 253 | AbstractType::Ptr decreasePointerDepth(AbstractType::Ptr type, TopDUContext* top, bool useOperator) { | ||
Show All 38 Lines |