qlistobject.cpp 481 B

12345678910111213141516171819202122232425
  1. /*
  2. Copyright 2017 Herik Lima de Castro and Marcelo Medeiros Eler
  3. Distributed under MIT license, or public domain if desired and
  4. recognized in your jurisdiction.
  5. See file LICENSE for detail.
  6. */
  7. #include "qlistobject.h"
  8. CWF_BEGIN_NAMESPACE
  9. QListObject::~QListObject()
  10. {
  11. if(!autoDelete)
  12. {
  13. const QObjectList &childrenList = children();
  14. for(QObject *obj : childrenList)
  15. {
  16. obj->setParent(nullptr);
  17. }
  18. }
  19. }
  20. CWF_END_NAMESPACE