src: use nullptr instead of NULL
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
QtBookmark::QtBookmark(ControllerProxy<BookmarkController>* controllerProxy)
|
||||
: m_controllerProxy(controllerProxy)
|
||||
, m_treeWidgetItem(NULL)
|
||||
, m_treeWidgetItem(nullptr)
|
||||
, m_arrowImageName(L"arrow_line_down.png")
|
||||
, m_hovered(false)
|
||||
, m_ignoreNextResize(false)
|
||||
|
||||
@@ -81,7 +81,7 @@ void QtBookmarkCategory::setTreeWidgetItem(QTreeWidgetItem* treeItem)
|
||||
|
||||
void QtBookmarkCategory::updateArrow()
|
||||
{
|
||||
if (m_treeItem != NULL)
|
||||
if (m_treeItem != nullptr)
|
||||
{
|
||||
if (m_treeItem->isExpanded())
|
||||
{
|
||||
@@ -98,7 +98,7 @@ void QtBookmarkCategory::updateArrow()
|
||||
|
||||
void QtBookmarkCategory::expandClicked()
|
||||
{
|
||||
if (m_treeItem != NULL)
|
||||
if (m_treeItem != nullptr)
|
||||
{
|
||||
m_treeItem->setExpanded(!m_treeItem->isExpanded());
|
||||
updateArrow();
|
||||
|
||||
@@ -32,7 +32,7 @@ void QtTcpWrapper::stopListening()
|
||||
|
||||
QtTcpWrapper::~QtTcpWrapper()
|
||||
{
|
||||
if (m_tcpServer != NULL)
|
||||
if (m_tcpServer != nullptr)
|
||||
{
|
||||
if (m_tcpServer->isListening())
|
||||
{
|
||||
@@ -111,7 +111,7 @@ void QtTcpWrapper::startRead()
|
||||
|
||||
QString message = QString::fromUtf8(byteArray);
|
||||
|
||||
if (m_readCallback != NULL)
|
||||
if (m_readCallback != nullptr)
|
||||
{
|
||||
m_readCallback(message.toStdWString());
|
||||
}
|
||||
@@ -121,7 +121,7 @@ void QtTcpWrapper::startRead()
|
||||
|
||||
m_tcpClient->close();
|
||||
|
||||
if (m_readCallback != NULL)
|
||||
if (m_readCallback != nullptr)
|
||||
{
|
||||
m_readCallback(buffer);
|
||||
}*/
|
||||
|
||||
@@ -297,7 +297,7 @@ void QtGraphView::rebuildGraph(
|
||||
|
||||
for (unsigned int i = 0; i < nodes.size(); i++)
|
||||
{
|
||||
QtGraphNode* node = createNodeRecursive(view, NULL, nodes[i].get(), activeNodeCount > 1);
|
||||
QtGraphNode* node = createNodeRecursive(view, nullptr, nodes[i].get(), activeNodeCount > 1);
|
||||
if (node)
|
||||
{
|
||||
m_nodes.push_back(node);
|
||||
@@ -889,7 +889,7 @@ QtGraphNode* QtGraphView::createNodeRecursive(
|
||||
){
|
||||
if (!node->visible)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QtGraphNode* newNode = nullptr;
|
||||
@@ -970,13 +970,13 @@ QtGraphEdge* QtGraphView::createEdge(
|
||||
{
|
||||
if (!edge->visible)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QtGraphNode* owner = findNodeRecursive(m_nodes, edge->ownerId);
|
||||
QtGraphNode* target = findNodeRecursive(m_nodes, edge->targetId);
|
||||
|
||||
if (owner != NULL && target != NULL)
|
||||
if (owner != nullptr && target != nullptr)
|
||||
{
|
||||
QtGraphEdge* qtEdge = new QtGraphEdge(
|
||||
owner, target, edge->data, edge->getWeight(), edge->active && !useBezier, edge->getDirection());
|
||||
@@ -1022,7 +1022,7 @@ QtGraphEdge* QtGraphView::createEdge(
|
||||
return qtEdge;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QtGraphEdge* QtGraphView::createAggregationEdge(
|
||||
@@ -1030,7 +1030,7 @@ QtGraphEdge* QtGraphView::createAggregationEdge(
|
||||
{
|
||||
if (!edge->visible)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool allVisible = true;
|
||||
@@ -1046,7 +1046,7 @@ QtGraphEdge* QtGraphView::createAggregationEdge(
|
||||
|
||||
if (allVisible)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return createEdge(view, edge, visibleEdgeIds, Graph::TRAIL_NONE, QPointF(), false);
|
||||
|
||||
@@ -193,14 +193,14 @@ void QtBookmarkBrowser::filterOrOrderChanged(const QString& text)
|
||||
void QtBookmarkBrowser::treeItemClicked(QTreeWidgetItem* item, int column)
|
||||
{
|
||||
QtBookmarkCategory* category = dynamic_cast<QtBookmarkCategory*>(m_bookmarkTree->itemWidget(item, 0));
|
||||
if (category != NULL)
|
||||
if (category != nullptr)
|
||||
{
|
||||
category->expandClicked();
|
||||
return;
|
||||
}
|
||||
|
||||
QtBookmark* bookmark = dynamic_cast<QtBookmark*>(m_bookmarkTree->itemWidget(item, 0));
|
||||
if (bookmark != NULL)
|
||||
if (bookmark != nullptr)
|
||||
{
|
||||
bookmark->commentToggled();
|
||||
return;
|
||||
|
||||
@@ -937,7 +937,7 @@ void QtProjectWizzard::createProject()
|
||||
if (m_editing)
|
||||
{
|
||||
Application* application = Application::getInstance().get();
|
||||
if (application->getCurrentProject() != NULL)
|
||||
if (application->getCurrentProject() != nullptr)
|
||||
{
|
||||
settingsChanged = !(application->getCurrentProject()->settingsEqualExceptNameAndLocation(*(m_projectSettings.get())));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user