summaryrefslogtreecommitdiffstats
path: root/src/shared/qtpropertybrowser/qtpropertybrowser.cpp
diff options
context:
space:
mode:
authorZhang Hao <zhanghao@uniontech.com>2021-10-18 17:28:39 +0800
committerZhang Hao <zhanghao@uniontech.com>2021-10-18 19:08:25 +0800
commit74ca5ebec9bf10289393553c2a591977c9268b07 (patch)
tree346a41903bbf55055e8b76f3b9c7ab5533b40528 /src/shared/qtpropertybrowser/qtpropertybrowser.cpp
parent0099481761e8c52236aaa3f71d10dad34391e86f (diff)
Replace 0 with nullptr
We know that c++11 uses nullptr to replace 0, so we replace 0 with nullptr in the project. Change-Id: I52e3b70f58c477414ad8187e3d3cdae25408ecc7 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/shared/qtpropertybrowser/qtpropertybrowser.cpp')
-rw-r--r--src/shared/qtpropertybrowser/qtpropertybrowser.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/shared/qtpropertybrowser/qtpropertybrowser.cpp b/src/shared/qtpropertybrowser/qtpropertybrowser.cpp
index 601fb854a..bc86d2879 100644
--- a/src/shared/qtpropertybrowser/qtpropertybrowser.cpp
+++ b/src/shared/qtpropertybrowser/qtpropertybrowser.cpp
@@ -423,7 +423,7 @@ void QtProperty::setModified(bool modified)
*/
void QtProperty::addSubProperty(QtProperty *property)
{
- QtProperty *after = 0;
+ QtProperty *after = nullptr;
if (d_ptr->m_subItems.count() > 0)
after = d_ptr->m_subItems.last();
insertSubProperty(property, after);
@@ -468,7 +468,7 @@ void QtProperty::insertSubProperty(QtProperty *property,
pendingList = subProperties();
int pos = 0;
int newPos = 0;
- QtProperty *properAfterProperty = 0;
+ QtProperty *properAfterProperty = nullptr;
while (pos < pendingList.count()) {
QtProperty *i = pendingList.at(pos);
if (i == property)
@@ -1365,7 +1365,7 @@ QtBrowserItem *QtAbstractPropertyBrowserPrivate::createBrowserIndex(QtProperty *
q_ptr->itemInserted(newIndex, afterIndex);
const auto subItems = property->subProperties();
- QtBrowserItem *afterChild = 0;
+ QtBrowserItem *afterChild = nullptr;
for (QtProperty *child : subItems)
afterChild = createBrowserIndex(child, newIndex, afterChild);
return newIndex;
@@ -1742,7 +1742,7 @@ void QtAbstractPropertyBrowser::clear()
*/
QtBrowserItem *QtAbstractPropertyBrowser::addProperty(QtProperty *property)
{
- QtProperty *afterProperty = 0;
+ QtProperty *afterProperty = nullptr;
if (d_ptr->m_subItems.count() > 0)
afterProperty = d_ptr->m_subItems.last();
return insertProperty(property, afterProperty);
@@ -1849,7 +1849,7 @@ void QtAbstractPropertyBrowser::removeProperty(QtProperty *property)
QWidget *QtAbstractPropertyBrowser::createEditor(QtProperty *property,
QWidget *parent)
{
- QtAbstractEditorFactoryBase *factory = 0;
+ QtAbstractEditorFactoryBase *factory = nullptr;
QtAbstractPropertyManager *manager = property->propertyManager();
if (m_viewToManagerToFactory()->contains(this) &&