X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Ftreemodel.h;h=e4b5ca3a4a94156141c03ea16f9520de146e6d8f;hp=cc602de77e3b26380e3ca178c3885292bb52ee6e;hb=ff7c0776d68d9749b07f54a3e26c342dfb12f081;hpb=2704de43e8f98c030f013e686736f3e299b7d815 diff --git a/src/client/treemodel.h b/src/client/treemodel.h index cc602de7..e4b5ca3a 100644 --- a/src/client/treemodel.h +++ b/src/client/treemodel.h @@ -79,13 +79,17 @@ signals: void beginRemoveChilds(int firstRow, int lastRow); void endRemoveChilds(); - + +protected: + void customEvent(QEvent *event); + private: QList _childItems; Qt::ItemFlags _flags; TreeItemFlags _treeItemFlags; - inline void checkForDeletion() { if(treeItemFlags() & DeleteOnLastChildRemoved && childCount() == 0) parent()->removeChild(this); } + void removeChildLater(AbstractTreeItem *child); + inline void checkForDeletion() { if(treeItemFlags() & DeleteOnLastChildRemoved && childCount() == 0) parent()->removeChildLater(this); } };