Deleted metod GarbageCollector.
--HG-- branch : develop
This commit is contained in:
parent
1d6582f374
commit
668084adfe
|
@ -1034,25 +1034,6 @@ void VDomDocument::setCurrentData(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void VDomDocument::GarbageCollector(){
|
|
||||||
QHashIterator<qint64, VDataTool*> t(tools);
|
|
||||||
while (t.hasNext()) {
|
|
||||||
t.next();
|
|
||||||
VDataTool *tool = t.value();
|
|
||||||
if(tool->referens() <= 0){
|
|
||||||
QDomElement domElement = elementById(QString().setNum(t.key()));
|
|
||||||
if(domElement.isElement()){
|
|
||||||
QDomNode parent = domElement.parentNode();
|
|
||||||
if(!parent.isNull()){
|
|
||||||
parent.removeChild(domElement);
|
|
||||||
} else {
|
|
||||||
qWarning()<<tr("Can't get parent for object id = %1").arg(t.key());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void VDomDocument::AddTool(const qint64 &id, VDataTool *tool){
|
void VDomDocument::AddTool(const qint64 &id, VDataTool *tool){
|
||||||
Q_ASSERT_X(id > 0, Q_FUNC_INFO, "id <= 0");
|
Q_ASSERT_X(id > 0, Q_FUNC_INFO, "id <= 0");
|
||||||
Q_CHECK_PTR(tool);
|
Q_CHECK_PTR(tool);
|
||||||
|
|
|
@ -63,7 +63,6 @@ public:
|
||||||
qint64 getCursor() const;
|
qint64 getCursor() const;
|
||||||
void setCursor(const qint64 &value);
|
void setCursor(const qint64 &value);
|
||||||
void setCurrentData();
|
void setCurrentData();
|
||||||
void GarbageCollector();
|
|
||||||
void AddTool(const qint64 &id, VDataTool *tool);
|
void AddTool(const qint64 &id, VDataTool *tool);
|
||||||
void UpdateToolData(const qint64 &id, VContainer *data);
|
void UpdateToolData(const qint64 &id, VContainer *data);
|
||||||
void IncrementReferens(qint64 id) const;
|
void IncrementReferens(qint64 id) const;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user