aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/tests/libsample/objecttype.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-07-03 08:24:42 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-07-03 13:42:12 +0200
commit3dd32863337ea2f6308ebf2f7656795d3fd488c9 (patch)
tree08a3b35607dee19536ccb5f21b2ede0fdc41cc79 /sources/shiboken2/tests/libsample/objecttype.cpp
parent4f4f1be9f46e02e87357aeee613cfd5ea0be8220 (diff)
parent67d635fe2cc2c89c30486a2e26dea4106a9d9c16 (diff)
Merge "Merge remote-tracking branch 'origin/5.13' into dev"
Diffstat (limited to 'sources/shiboken2/tests/libsample/objecttype.cpp')
-rw-r--r--sources/shiboken2/tests/libsample/objecttype.cpp16
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;
}