[kdev-python/listcontenttypes] /: Further tries to add a new type, but it crashes

Sven Brauch svenbrauch at googlemail.com
Wed Jun 15 13:25:49 UTC 2011


Hi,

okay! I tried to do it exactly like in the example now, but I still get asserts:

KDevelop::AbstractTypeDataRequest::createItem: created type in
repository does not equal source type
ASSERT: "otherType->equals(&m_item)" in file
kdevplatform/language/duchain/repositories/typerepository.cpp, line 61

This looks like some data is not being copied correctly -- but why?

I also added my own "equals" function which compares additional stuff,
but this assert occured before in the same way, so the problem is
probably not there.

It's about those two files:
https://projects.kde.org/projects/playground/devtools/plugins/kdev-python/repository/revisions/listcontenttypes/show/duchain/types

Best regards,
Sven

2011/6/14 David Nolden <david.nolden.kdevelop at art-master.de>:
> The type-system classes are not simply classes you can write
> "standard" ways, but they need to follow a very specific structure.
> All the rules that must be followed are written down at the top of
> AbstractType.h. It is simpler, however, to just copy another existing
> type, and replace the occurences of the base-class with your own
> base-class, and rename the type and data-type class.
>
> Your copy-constructors for example look wrong, because they miss the
> copyData call.
>
> Greetings, David
>
> --
> KDevelop-devel mailing list
> KDevelop-devel at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
>




More information about the KDevelop-devel mailing list