diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-26 08:34:20 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-26 08:34:20 +0200 |
commit | 3d6d370db58b7b1575838d6c627f5109001ef136 (patch) | |
tree | 82ec6ef675f8fd77204667354f92b954e2df00b4 /sources/shiboken2/tests/libsample/objecttype.cpp | |
parent | 54c3abd8774f479535d0b8741a3c30d1e7ee8548 (diff) | |
parent | 45fa0715398f8d90573552eada0adf2e4eb5e763 (diff) |
Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"
Diffstat (limited to 'sources/shiboken2/tests/libsample/objecttype.cpp')
-rw-r--r-- | sources/shiboken2/tests/libsample/objecttype.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sources/shiboken2/tests/libsample/objecttype.cpp b/sources/shiboken2/tests/libsample/objecttype.cpp index f82b7cf0d..855c08611 100644 --- a/sources/shiboken2/tests/libsample/objecttype.cpp +++ b/sources/shiboken2/tests/libsample/objecttype.cpp @@ -35,7 +35,7 @@ using namespace std; -ObjectType::ObjectType(ObjectType* parent) : m_parent(0), m_layout(0), m_call_id(-1) +ObjectType::ObjectType(ObjectType* parent) : m_parent(nullptr), m_layout(nullptr), m_call_id(-1) { setParent(parent); } @@ -66,7 +66,7 @@ ObjectType::removeChild(ObjectType* child) ObjectTypeList::iterator child_iter = std::find(m_children.begin(), m_children.end(), child); if (child_iter != m_children.end()) { m_children.erase(child_iter); - child->m_parent = 0; + child->m_parent = nullptr; } } @@ -74,15 +74,15 @@ ObjectType* ObjectType::takeChild(ObjectType* child) { if (!child) - return 0; + return nullptr; ObjectTypeList::iterator child_iter = std::find(m_children.begin(), m_children.end(), child); if (child_iter != m_children.end()) { m_children.erase(child_iter); - child->m_parent = 0; + child->m_parent = nullptr; return child; } - return 0; + return nullptr; } ObjectType* @@ -101,7 +101,7 @@ ObjectType::findChild(const Str& name) if ((*child_iter)->objectName() == name) return *child_iter; } - return 0; + return nullptr; } void @@ -218,8 +218,8 @@ ObjectTypeLayout* ObjectType::takeLayout() { ObjectTypeLayout* l = layout(); if (!l) - return 0; - m_layout = 0; + return nullptr; + m_layout = nullptr; l->setParent(0); return l; } |