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

Method setData

kdevplatform/language/duchain/duchainbase.cpp:65–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65void DUChainBase::setData(DUChainBaseData* data, bool constructorCalled)
66{
67 Q_ASSERT(data);
68 Q_ASSERT(d_ptr);
69
70 if (d_ptr->m_dynamic) {
71 Q_ASSERT(constructorCalled);
72 DUChainItemSystem::self().deleteDynamicData(d_ptr);
73 } else if (constructorCalled) {
74 // If the data object isn't dynamic, then it is part of a central repository, and cannot be deleted here.
75 // we still need to call the destructor though
76 KDevelop::DUChainItemSystem::self().callDestructor(static_cast<DUChainBaseData*>(d_ptr));
77 }
78
79 d_ptr = data;
80}
81
82DUChainBase::~DUChainBase()
83{

Callers 2

saveDUChainItemFunction · 0.45
storeAllInformationMethod · 0.45

Calls 2

deleteDynamicDataMethod · 0.45
callDestructorMethod · 0.45

Tested by

no test coverage detected