From 7778bc1b214ddcbee17586b48ad79c6b21ac86e8 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sat, 3 Oct 2026 17:47:58 -0300
Subject: Replace NULL pointer constants with nullptr
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
---
 src/calltreedlg.cpp      |  4 +-
 src/calltreemanager.cpp  |  2 +-
 src/cscopefrontend.cpp   | 24 ++++++------
 src/dirscanner.cpp       |  2 +-
 src/dirscanner.h         |  2 +-
 src/editorpage.cpp       | 12 +++---
 src/editorpage.h         |  2 +-
 src/editortabs.cpp       | 22 +++++------
 src/encoder.cpp          |  2 +-
 src/filelist.cpp         |  4 +-
 src/frontend.cpp         | 20 +++++-----
 src/frontend.h           |  2 +-
 src/graphnode.cpp        |  4 +-
 src/graphwidget.cpp      | 48 ++++++++++++------------
 src/historypage.cpp      |  8 ++--
 src/historyview.cpp      |  6 +--
 src/historyview.h        |  4 +-
 src/kscope.cpp           | 38 +++++++++----------
 src/kscopeactions.cpp    | 98 ++++++++++++++++++++++++------------------------
 src/kscopepixmaps.cpp    |  2 +-
 src/newprojectdlg.cpp    |  4 +-
 src/newprojectdlg.h      |  4 +-
 src/openprojectdlg.cpp   |  6 +--
 src/prefcolor.cpp        |  2 +-
 src/preffont.cpp         |  2 +-
 src/project.cpp          |  4 +-
 src/projectfilesdlg.cpp  | 24 ++++++------
 src/projectmanager.cpp   |  4 +-
 src/projectmanager.h     |  2 +-
 src/queryresultsmenu.cpp | 12 +++---
 src/queryresultsmenu.h   |  2 +-
 src/queryview.cpp        | 38 +++++++++----------
 src/queryview.h          |  8 ++--
 src/queryviewdriver.cpp  |  4 +-
 src/queryviewdriver.h    |  2 +-
 src/querywidget.cpp      | 40 ++++++++++----------
 src/querywidget.h        |  2 +-
 src/searchlist.cpp       |  6 +--
 src/symbolcompletion.cpp |  4 +-
 src/symbolcompletion.h   |  2 +-
 src/treewidget.cpp       | 16 ++++----
 41 files changed, 247 insertions(+), 247 deletions(-)

diff --git a/src/calltreedlg.cpp b/src/calltreedlg.cpp
index 517fbba..b8d82f3 100644
--- a/src/calltreedlg.cpp
+++ b/src/calltreedlg.cpp
@@ -160,7 +160,7 @@ bool CallTreeDlg::load(const TQString& sProjPath, const TQString& sFileName)
 	
 	// Open the file for reading
 	pFile = fopen(sPath.latin1(), "r");
-	if (pFile == NULL)
+	if (!pFile)
 		return false;
 		
 	// Check file version
@@ -214,7 +214,7 @@ void CallTreeDlg::store(const TQString& sProjPath)
 	
 	// Open a file for writing (create if necessary)
 	pFile = fopen(sPath.latin1(), "w+");
-	if (pFile == NULL)
+	if (!pFile)
 		return;
 		
 	// Write header
diff --git a/src/calltreemanager.cpp b/src/calltreemanager.cpp
index 5ae0257..b6bebc8 100644
--- a/src/calltreemanager.cpp
+++ b/src/calltreemanager.cpp
@@ -58,7 +58,7 @@ void CallTreeManager::saveOpenDialogs(const TQString& sProjPath,
 	CallTreeDlg *pDlg;
 	
 	// Iterate over the open dialogues
-	for (pDlg = m_lstDialogs.first(); pDlg != NULL; 
+	for (pDlg = m_lstDialogs.first(); pDlg; 
 		pDlg = m_lstDialogs.next()) {
 		pDlg->store(sProjPath);
 		slFiles += pDlg->getFileName();
diff --git a/src/cscopefrontend.cpp b/src/cscopefrontend.cpp
index 1123609..586390c 100644
--- a/src/cscopefrontend.cpp
+++ b/src/cscopefrontend.cpp
@@ -383,8 +383,8 @@ void CscopeFrontend::finalize()
  */
 CscopeProgress::CscopeProgress(TQWidget* pMainWidget) : TQObject(),
 	m_pMainWidget(pMainWidget),
-	m_pProgressBar(NULL),
-	m_pLabel(NULL)
+	m_pProgressBar(nullptr),
+	m_pLabel(nullptr)
 {
 }
 
@@ -408,13 +408,13 @@ void CscopeProgress::setProgress(int nProgress, int nTotal)
 	// Was the final value is reached?
 	if (nProgress == nTotal) {
 		// Destroy the progress bar
-		if (m_pProgressBar != NULL) {
+		if (m_pProgressBar) {
 			delete m_pProgressBar;
-			m_pProgressBar = NULL;
+			m_pProgressBar = nullptr;
 		}
 		
 		// Show the "Please wait..." label
-		if (m_pLabel == NULL) {
+		if (!m_pLabel) {
 			m_pLabel = new TQLabel(i18n("Processing query results, "
 				"please wait..."), m_pMainWidget);
 			m_pLabel->setFrameStyle(TQFrame::Box | TQFrame::Plain);
@@ -436,7 +436,7 @@ void CscopeProgress::setProgress(int nProgress, int nTotal)
 	// Note that the progress bar will only be displayed one second after the
 	// first progress signal is received. Thus the bar will not be displayed
 	// on very short queries.
-	if (m_pProgressBar == NULL) {
+	if (!m_pProgressBar) {
 		m_pProgressBar = new TQProgressBar(m_pMainWidget);
 		TQTimer::singleShot(1000, this, TQ_SLOT(slotShowProgressBar()));
 	}
@@ -451,15 +451,15 @@ void CscopeProgress::setProgress(int nProgress, int nTotal)
 void CscopeProgress::finished()
 {
 	// Destroy the progress bar
-	if (m_pProgressBar != NULL) {
+	if (m_pProgressBar) {
 		delete m_pProgressBar;
-		m_pProgressBar = NULL;
+		m_pProgressBar = nullptr;
 	}
 	
 	// Destroy the label
-	if (m_pLabel != NULL) {
+	if (m_pLabel) {
 		delete m_pLabel;
-		m_pLabel = NULL;
+		m_pLabel = nullptr;
 	}
 }
 
@@ -470,7 +470,7 @@ void CscopeProgress::finished()
  */
 void CscopeProgress::slotShowProgressBar()
 {
-	if (m_pProgressBar != NULL)
+	if (m_pProgressBar)
 		m_pProgressBar->show();
 }
 
@@ -481,7 +481,7 @@ void CscopeProgress::slotShowProgressBar()
  */
 void CscopeProgress::slotShowLabel()
 {
-	if (m_pLabel != NULL)
+	if (m_pLabel)
 		m_pLabel->show();
 }
 
diff --git a/src/dirscanner.cpp b/src/dirscanner.cpp
index 27c8738..574522f 100644
--- a/src/dirscanner.cpp
+++ b/src/dirscanner.cpp
@@ -130,7 +130,7 @@ int DirScanner::scanDir(TQDir& dir)
 		sFile = dir.absPath() + "/" + *itr;
 
 		// Make sure an entry for this file does not exist
-		if (m_pDicFiles->find(sFile) == NULL) {
+		if (!m_pDicFiles->find(sFile)) {
 			m_slFiles.append(sFile);
 			nFiles++;
 		}
diff --git a/src/dirscanner.h b/src/dirscanner.h
index 89868a8..6d7e678 100644
--- a/src/dirscanner.h
+++ b/src/dirscanner.h
@@ -75,7 +75,7 @@ public:
 	}
 	
 	bool exists(const TQString& sItem) {
-		return find(sItem) != NULL;
+		return find(sItem) != nullptr;
 	}
 };
 
diff --git a/src/editorpage.cpp b/src/editorpage.cpp
index 87c81af..862e5ab 100644
--- a/src/editorpage.cpp
+++ b/src/editorpage.cpp
@@ -332,7 +332,7 @@ TQString EditorPage::getWordUnderCursor(uint* pPosInWord)
 
 	// Get a cursor object
 	pCursor = dynamic_cast<KTextEditor::ViewCursorInterface*>(m_pView);
-	if (pCursor == NULL)
+	if (!pCursor)
 		return TQString::null;
 
 	// Get a pointer to the edit interface	
@@ -369,7 +369,7 @@ TQString EditorPage::getWordUnderCursor(uint* pPosInWord)
 		return TQString::null;
 	
 	// Return the in-word position, if required
-	if (pPosInWord != NULL)
+	if (pPosInWord)
 		*pPosInWord = nCol - nFrom;
 	
 	// Extract the word under the cursor from the entire line
@@ -511,7 +511,7 @@ bool EditorPage::getCursorPos(uint& nLine, uint& nCol)
 	
 	// Acquire the view cursor
 	pCursorIf = dynamic_cast<KTextEditor::ViewCursorInterface*>(m_pView);
-	if (pCursorIf == NULL)
+	if (!pCursorIf)
 		return false;
 	
 	// Get the cursor position (adjusted to 1-based counting)
@@ -544,13 +544,13 @@ bool EditorPage::setCursorPos(uint nLine, uint nCol)
 		
 	// Acquire the view cursor
 	pCursorIf = dynamic_cast<KTextEditor::ViewCursorInterface*>(m_pView);
-	if (pCursorIf == NULL)
+	if (!pCursorIf)
 		return false;
 	
 	// NOTE: The following code is a fix to a bug in Kate, which wrongly
 	// calculates the column number in setCursorPosition.
 	pKateView = dynamic_cast<Kate::View*>(m_pView);
-	if (pKateView != NULL) {
+	if (pKateView) {
 		KTextEditor::EditInterface* pEditIf;
 		const char* szLine;
 		uint nRealCol;
@@ -569,7 +569,7 @@ bool EditorPage::setCursorPos(uint nLine, uint nCol)
 			szLine = pEditIf->textLine(nLine).latin1();
 			
 			// Check for empty line
-			if (szLine != NULL) {
+			if (szLine) {
 				// The number of columns which a tab character adds
 				nTabAdjust = pKateView->tabWidth() - 1;
 				
diff --git a/src/editorpage.h b/src/editorpage.h
index 53795ee..8cedd54 100644
--- a/src/editorpage.h
+++ b/src/editorpage.h
@@ -86,7 +86,7 @@ public:
 	bool setCursorPos(uint, uint nCol = 1);
 	void setTabWidth(uint);
 	
-	virtual TQString getWordUnderCursor(uint* pPosInWord = NULL);
+	virtual TQString getWordUnderCursor(uint* pPosInWord = nullptr);
 
 	/**
 	 * Implements the SymbolCompletion interface method for returning an
diff --git a/src/editortabs.cpp b/src/editortabs.cpp
index e728f7e..9b753ae 100644
--- a/src/editortabs.cpp
+++ b/src/editortabs.cpp
@@ -41,8 +41,8 @@
  */
 EditorTabs::EditorTabs(TQWidget* pParent, const char* szName) :
 	TabWidget(pParent, szName),
-	m_pCurPage(NULL),
-	m_pWindowMenu(NULL),
+	m_pCurPage(nullptr),
+	m_pWindowMenu(nullptr),
 	m_nWindowMenuItems(0),
 	m_nNewFiles(0)
 {
@@ -122,7 +122,7 @@ void EditorTabs::addEditorPage(EditorPage* pNewPage)
  * @param	bForceChange	If set to true, the method will emit the signal
  *							editorChanged() even if the found page is the
  *							current one
- * @return	The editor page object, if found, NULL otherwise
+ * @return	The editor page object, if found, nullptr otherwise
  */
 EditorPage* EditorTabs::findEditorPage(const TQString& sFileName,
 	bool bForceChange)
@@ -134,7 +134,7 @@ EditorPage* EditorTabs::findEditorPage(const TQString& sFileName,
 	// Find the page according to the associated file name
 	itr = m_mapEdit.find(sFileName);
 	if (itr == m_mapEdit.end())
-		return NULL;
+		return nullptr;
 
 	// Set the page as the current one
 	pPage = *itr;
@@ -143,7 +143,7 @@ EditorPage* EditorTabs::findEditorPage(const TQString& sFileName,
 
 	// Emit the editorChanged() signal, if required
 	if (bEmit)
-		emit editorChanged(NULL, m_pCurPage);
+		emit editorChanged(nullptr, m_pCurPage);
 		
 	return *itr;
 }
@@ -168,7 +168,7 @@ void EditorTabs::removeCurrentPage()
 
 	// Get the active page, if any
 	pPage = currentPage();
-	if (pPage == NULL)
+	if (!pPage)
 		return;
 
 	// Close the editor window
@@ -186,7 +186,7 @@ bool EditorTabs::removeAllPages()
 	// Check if there are any modified files
 	if (getModifiedFilesCount()) {
 		// Prompt the user to save these files
-		switch (KMessageBox::questionYesNoCancel(NULL,
+		switch (KMessageBox::questionYesNoCancel(nullptr,
 			i18n("Some files contain unsaved changes.\nWould you like to "
 			"save these files?"))) {
 			case KMessageBox::Yes:
@@ -208,7 +208,7 @@ bool EditorTabs::removeAllPages()
 	Kate::Document::setFileChangedDialogsActivated(false);
 	
 	// Iterate pages until none is left
-	while ((pPage = currentPage()) != NULL)
+	while ((pPage = currentPage()) != nullptr)
 		removePage(pPage, true);
 	
 	// Restore kate warning if enabled
@@ -436,7 +436,7 @@ void EditorTabs::slotToggleTagList()
 	Config().setShowTagList(!Config().getShowTagList());
 	
 	// Apply for the current page, if any
-	if ((pPage = (EditorPage*)currentPage()) != NULL) {
+	if ((pPage = (EditorPage*)currentPage()) != nullptr) {
 		pPage->setLayout(Config().getShowTagList(),
 			Config().getEditorSizes());
 	}
@@ -629,8 +629,8 @@ bool EditorTabs::removePage(TQWidget* pPage, bool bForce)
 	// Update the new state if no other page exists (if another page has
 	// become active, it will update the new state, so there is no need for
 	// special handling)
-	if (currentPage() == NULL)
-		slotCurrentChanged(NULL);
+	if (!currentPage())
+		slotCurrentChanged(nullptr);
 	
 	// Notify the page has been removed
 	emit editorRemoved(pEditPage);
diff --git a/src/encoder.cpp b/src/encoder.cpp
index aa0ef34..6aa3e01 100644
--- a/src/encoder.cpp
+++ b/src/encoder.cpp
@@ -34,7 +34,7 @@
 /**
  * Class constructor.
  */
-Encoder::Encoder() : m_pBuf(NULL), m_nBufLen(0)
+Encoder::Encoder() : m_pBuf(nullptr), m_nBufLen(0)
 {
 }
 	
diff --git a/src/filelist.cpp b/src/filelist.cpp
index 275daae..0b2c06f 100644
--- a/src/filelist.cpp
+++ b/src/filelist.cpp
@@ -110,7 +110,7 @@ bool FileList::findFile(const TQString& sPath)
 	if (m_sRoot != "/")
 		sFindPath.replace(m_sRoot, "$");
 	
-	return (m_pList->findItem(sFindPath, 2) != NULL);
+	return (m_pList->findItem(sFindPath, 2) != nullptr);
 }
 
 /**
@@ -164,7 +164,7 @@ void FileList::setRoot(const TQString& sRoot)
 	TQString sPath;
 	
 	// Update all items in the list
-	for (pItem = m_pList->firstChild(); pItem != NULL; 
+	for (pItem = m_pList->firstChild(); pItem; 
 		pItem = pItem->nextSibling()) {
 		sPath = pItem->text(2);
 		
diff --git a/src/frontend.cpp b/src/frontend.cpp
index 52c97c2..faa2bbf 100644
--- a/src/frontend.cpp
+++ b/src/frontend.cpp
@@ -38,9 +38,9 @@
  */
 Frontend::Frontend(uint nRecordSize, bool bAutoDelete) : TDEProcess(),
 	m_nRecords(0),
-	m_pHeadToken(NULL),
-	m_pTailToken(NULL),
-	m_pCurToken(NULL),
+	m_pHeadToken(nullptr),
+	m_pTailToken(nullptr),
+	m_pCurToken(nullptr),
 	m_bAutoDelete(bAutoDelete),
 	m_bInToken(false),
 	m_nRecordSize(nRecordSize)
@@ -129,7 +129,7 @@ void Frontend::kill()
 void Frontend::addToken(FrontendToken* pToken)
 {
 	// Check if this is the firt token
-	if (m_pHeadToken == NULL) {
+	if (!m_pHeadToken) {
 		m_pHeadToken = pToken;
 		m_pTailToken = pToken;
 	}
@@ -147,15 +147,15 @@ void Frontend::removeToken()
 {
 	FrontendToken* pToken;
 	
-	if (m_pHeadToken == NULL)
+	if (!m_pHeadToken)
 		return;
 
 	pToken = m_pHeadToken;
 	m_pHeadToken = m_pHeadToken->m_pNext;
 	delete pToken;
 
-	if (m_pHeadToken == NULL)
-		m_pTailToken = NULL;	
+	if (!m_pHeadToken)
+		m_pTailToken = nullptr;	
 }
 
 /**
@@ -166,7 +166,7 @@ void Frontend::removeRecord()
 {
 	uint i;
 
-	for (i = 0; (i < m_nRecordSize) && (m_pHeadToken != NULL); i++)
+	for (i = 0; (i < m_nRecordSize) && m_pHeadToken; i++)
 		removeToken();
 }
 
@@ -295,7 +295,7 @@ void Frontend::slotReadStdout(TDEProcess*, char* pBuffer, int nSize)
 	// Iterate over the given buffer
 	while (nSize > 0) {
 		// Create a new token, if the last iteration has completed one
-		if (m_pCurToken == NULL)
+		if (!m_pCurToken)
 			m_pCurToken = new FrontendToken();
 
 		// Extract text until the requested delimiter
@@ -338,7 +338,7 @@ void Frontend::slotReadStdout(TDEProcess*, char* pBuffer, int nSize)
 			break;
 		}
 
-		m_pCurToken = NULL;
+		m_pCurToken = nullptr;
 	}
 }
 
diff --git a/src/frontend.h b/src/frontend.h
index 37dd41e..db65192 100644
--- a/src/frontend.h
+++ b/src/frontend.h
@@ -43,7 +43,7 @@ public:
 	/**
 	 * Class constructor.
 	 */
-	FrontendToken() : m_pNext(NULL) {}
+	FrontendToken() : m_pNext(nullptr) {}
 
 	/**
 	 * @return	The text associated with this token
diff --git a/src/graphnode.cpp b/src/graphnode.cpp
index 89d135e..479079b 100644
--- a/src/graphnode.cpp
+++ b/src/graphnode.cpp
@@ -65,7 +65,7 @@ GraphEdge* GraphNode::addOutEdge(GraphNode* pTail)
 	GraphEdge* pEdge;
 	
 	// Look for the edge
-	if ((pEdge = m_dictOutEdges.find(pTail->getFunc())) == NULL) {
+	if (!(pEdge = m_dictOutEdges.find(pTail->getFunc()))) {
 		// Create a new edge
 		pEdge = new GraphEdge(canvas(), this, pTail);
 		m_dictOutEdges.insert(pTail->getFunc(), pEdge);
@@ -146,7 +146,7 @@ void GraphNode::getFirstNeighbour(GraphNode*& pNode, bool& bCalled)
 		bCalled = true;
 	}
 	else {
-		pNode = NULL;
+		pNode = nullptr;
 	}
 }
 
diff --git a/src/graphwidget.cpp b/src/graphwidget.cpp
index d0f38fe..b2469de 100644
--- a/src/graphwidget.cpp
+++ b/src/graphwidget.cpp
@@ -124,7 +124,7 @@ GraphWidget::GraphWidget(TQWidget* pParent, const char* szName) :
 	m_dZoom(1.0),
 	m_nMaxNodeDegree(10), // will be overriden by CallTreeDlg
 	m_nMultiCallNum(0),
-	m_pProgressDlg(NULL)					 
+	m_pProgressDlg(nullptr)					 
 {
 	// Automatically delete nodes when they are removed
 	m_dictNodes.setAutoDelete(true);
@@ -228,7 +228,7 @@ GraphNode* GraphWidget::addNode(const TQString& sFunc, bool bMultiCall)
 	GraphNode* pNode;
 	
 	// Look for a node with the given name
-	if ((pNode = m_dictNodes.find(sFunc)) == NULL) {
+	if (!(pNode = m_dictNodes.find(sFunc))) {
 		// Node not found, create it
 		pNode = new GraphNode(canvas(), sFunc, bMultiCall);
 		m_dictNodes.insert(sFunc, pNode);
@@ -320,7 +320,7 @@ void GraphWidget::draw()
 	// Open a temporary file
 	strcpy(szTempFile, TMP_TMPL);
 	nFd = mkstemp(szTempFile);
-	if ((pFile = fdopen(nFd, "w")) == NULL)
+	if (!(pFile = fdopen(nFd, "w")))
 		return;
 	
 	// Remember the file name (so it can be deleted later)
@@ -449,18 +449,18 @@ TQString GraphWidget::getTip(const TQPoint& ptPos, TQRect& rc)
 	
 	ptRealPos = viewportToContents(ptPos);
 	ptRealPos /= m_dZoom;
-	pEdge = NULL;
+	pEdge = nullptr;
 	
 	// Check if there is an edge at this position
 	il = canvas()->collisions(ptRealPos);
 	for (itr = il.begin(); itr != il.end(); ++itr) {
 		pEdge = dynamic_cast<GraphEdge*>(*itr);
-		if (pEdge != NULL)
+		if (pEdge)
 			break;
 	}
 	
 	// No tip if no edge was found
-	if (pEdge == NULL)
+	if (!pEdge)
 		return TQString::null;
 	
 	// Set the rectangle for the tip (the tip is closed when the mouse leaves
@@ -584,7 +584,7 @@ void GraphWidget::drawContents(TQPainter* pPainter, int nX, int nY,
 	TQCanvasView::drawContents(pPainter, nX, nY, nWidth, nHeight);
 	
 	// Erase the canvas's area border
-	if (canvas() != NULL) {
+	if (canvas()) {
 		TQRect rect = canvas()->rect();
 		pPainter->setBrush(TQBrush()); // Null brush
 		pPainter->setPen(Config().getColor(KScopeConfig::GraphBack));
@@ -605,8 +605,8 @@ void GraphWidget::contentsMousePressEvent(TQMouseEvent* pEvent)
 	GraphNode* pNode;
 	GraphEdge* pEdge;
 	
-	pNode = NULL;
-	pEdge = NULL;
+	pNode = nullptr;
+	pEdge = nullptr;
 	
 	// Handle right-clicks only
 	if (pEvent->button() != TQt::RightButton) {
@@ -621,18 +621,18 @@ void GraphWidget::contentsMousePressEvent(TQMouseEvent* pEvent)
 	// Check if an item was clicked
 	il = canvas()->collisions(ptRealPos);
 	for (itr = il.begin(); itr != il.end(); ++itr) {
-		if (dynamic_cast<GraphNode*>(*itr) != NULL)
+		if (dynamic_cast<GraphNode*>(*itr))
 			pNode = dynamic_cast<GraphNode*>(*itr);
-		else if (dynamic_cast<GraphEdge*>(*itr) != NULL)
+		else if (dynamic_cast<GraphEdge*>(*itr))
 			pEdge = dynamic_cast<GraphEdge*>(*itr);
 	}
 	
 	// Handle clicks over different types of items
-	if (pNode != NULL) {
+	if (pNode) {
 		// Show a context menu for nodes
 		showNodeMenu(pNode, pEvent->globalPos());
 	}
-	else if (pEdge != NULL) {
+	else if (pEdge) {
 		// Show a context menu for edges
 		showEdgeMenu(pEdge, pEvent->globalPos());
 	}
@@ -803,7 +803,7 @@ void GraphWidget::slotDotFinished()
 	// Delete the progress dialogue
 	if (m_pProgressDlg) {
 		delete m_pProgressDlg;
-		m_pProgressDlg = NULL;
+		m_pProgressDlg = nullptr;
 	}
 	
 	setUpdatesEnabled(true);
@@ -906,7 +906,7 @@ void GraphWidget::slotShowCalled()
 	
 	// Make sure the menu item is a node
 	pNode = dynamic_cast<GraphNode*>(m_pMenuItem);
-	if (pNode == NULL)
+	if (!pNode)
 		return;
 	
 	// Run a query for called functions
@@ -929,7 +929,7 @@ void GraphWidget::slotListCalled()
 
 	// Make sure the menu item is a node
 	pNode = dynamic_cast<GraphNode*>(m_pMenuItem);
-	if (pNode == NULL)
+	if (!pNode)
 		return;
 	
 	QueryViewDlg dlg(0, (TQWidget*)parent());
@@ -973,7 +973,7 @@ void GraphWidget::slotHideCalled()
 	
 	// Make sure the menu item is a node
 	pNode = dynamic_cast<GraphNode*>(m_pMenuItem);
-	if (pNode == NULL)
+	if (!pNode)
 		return;
 	
 	// Remove edges and redraw the graph
@@ -992,7 +992,7 @@ void GraphWidget::slotShowCalling()
 	
 	// Make sure the menu item is a node
 	pNode = dynamic_cast<GraphNode*>(m_pMenuItem);
-	if (pNode == NULL)
+	if (!pNode)
 		return;
 	
 	// Run a query for called functions
@@ -1015,7 +1015,7 @@ void GraphWidget::slotListCalling()
 	
 	// Make sure the menu item is a node
 	pNode = dynamic_cast<GraphNode*>(m_pMenuItem);
-	if (pNode == NULL)
+	if (!pNode)
 		return;
 	
 	QueryViewDlg dlg(0, (TQWidget*)parent());
@@ -1059,7 +1059,7 @@ void GraphWidget::slotHideCalling()
 	
 	// Make sure the menu item is a node
 	pNode = dynamic_cast<GraphNode*>(m_pMenuItem);
-	if (pNode == NULL)
+	if (!pNode)
 		return;
 	
 	// Remove edges and redraw the graph
@@ -1078,7 +1078,7 @@ void GraphWidget::slotFindDef()
 	
 	// Make sure the menu item is a node
 	pNode = dynamic_cast<GraphNode*>(m_pMenuItem);
-	if (pNode == NULL)
+	if (!pNode)
 		return;
 	
 	// Create a query view dialogue
@@ -1104,7 +1104,7 @@ void GraphWidget::slotRemoveNode()
 	
 	// Make sure the menu item is a node
 	pNode = dynamic_cast<GraphNode*>(m_pMenuItem);
-	if (pNode == NULL)
+	if (!pNode)
 		return;
 	
 	// Remove all incoming edges
@@ -1128,7 +1128,7 @@ void GraphWidget::slotMultiCallDetails()
 	
 	// Make sure the menu item is a node
 	pNode = dynamic_cast<GraphNode*>(m_pMenuItem);
-	if (pNode == NULL || !pNode->isMultiCall())
+	if (!pNode || !pNode->isMultiCall())
 		return;
 	
 	// Get the required information from the node
@@ -1155,7 +1155,7 @@ void GraphWidget::slotOpenCall()
 	
 	// Make sure the menu item is an edge
 	pEdge = dynamic_cast<GraphEdge*>(m_pMenuItem);
-	if (pEdge != NULL && pEdge->getFile() != "")
+	if (pEdge && pEdge->getFile() != "")
 		emit lineRequested(pEdge->getFile(), pEdge->getLine());
 }
 
diff --git a/src/historypage.cpp b/src/historypage.cpp
index 8d5bc4a..97e48ac 100644
--- a/src/historypage.cpp
+++ b/src/historypage.cpp
@@ -70,7 +70,7 @@ void HistoryPage::addRecord(const TQString& sFile, uint nLine,
 	HistoryItem* pItem, * pNextItem;
 	
 	pItem = (HistoryItem*)m_pView->currentItem();
-	if (pItem != NULL) {
+	if (pItem) {
 		// Do not add duplicate items
 		if ((pItem->text(1) == sFile) && (pItem->text(2).toUInt() == nLine))
 			return;
@@ -78,7 +78,7 @@ void HistoryPage::addRecord(const TQString& sFile, uint nLine,
 		// Remove all items above the current one, so the new item is added to
 		// the top of the list
 		pItem = pItem->m_pPrevSibling;
-		while (pItem != NULL) {
+		while (pItem) {
 			pNextItem = pItem;
 			pItem = pItem->m_pPrevSibling;
 			delete pNextItem;
@@ -86,7 +86,7 @@ void HistoryPage::addRecord(const TQString& sFile, uint nLine,
 	}
 	
 	// Create the new item at the top of the list
-	m_pView->addRecord("", sFile, TQString::number(nLine), sText, NULL);
+	m_pView->addRecord("", sFile, TQString::number(nLine), sText, nullptr);
 }
 
 /**
@@ -99,7 +99,7 @@ void HistoryPage::addRecord(const TQString& sFile, uint nLine,
 void HistoryPage::addRecord(const TQString&, const TQString& sFile,
 	const TQString& sLine, const TQString& sText)
 {
-	m_pView->addRecord("", sFile, sLine, sText, NULL);
+	m_pView->addRecord("", sFile, sLine, sText, nullptr);
 }
 
 /**
diff --git a/src/historyview.cpp b/src/historyview.cpp
index 743fa6a..aebb86e 100644
--- a/src/historyview.cpp
+++ b/src/historyview.cpp
@@ -79,7 +79,7 @@ void HistoryView::selectPrev()
 	pItem = currentItem();
 	
 	// Select the next item in the list
-	if (pItem != NULL && pItem->nextSibling() != NULL) {
+	if (pItem && pItem->nextSibling()) {
 		pItem = pItem->nextSibling();
 		select(pItem);
 	}
@@ -98,7 +98,7 @@ void HistoryView::selectNext()
 	pItem = (HistoryItem*)currentItem();
 	
 	// Select the previous item in the list
-	if (pItem != NULL && pItem->m_pPrevSibling != NULL) {
+	if (pItem && pItem->m_pPrevSibling) {
 		pItem = pItem->m_pPrevSibling;
 		select(pItem);
 	}
@@ -115,7 +115,7 @@ void HistoryView::slotRemoveItem(TQListViewItem* pItem)
 	HistoryItem* pCurItem, * pNextItem;
 	
 	pCurItem = (HistoryItem*)pItem;
-	if ((pNextItem = (HistoryItem*)pCurItem->nextSibling()) != NULL)
+	if ((pNextItem = (HistoryItem*)pCurItem->nextSibling()))
 		pNextItem->m_pPrevSibling = pCurItem->m_pPrevSibling;
 	
 	delete pCurItem;
diff --git a/src/historyview.h b/src/historyview.h
index 712b47f..08b92f5 100644
--- a/src/historyview.h
+++ b/src/historyview.h
@@ -52,11 +52,11 @@ public:
 	HistoryItem(TQListView* pList, TQString sFile, TQString sLine, 
 		TQString sText) : 
 		TQListViewItem(pList, "", sFile, sLine, sText),
-		m_pPrevSibling(NULL) {
+		m_pPrevSibling(nullptr) {
 		HistoryItem* pNext;
 		
 		// Mark the new item as the predecessor of its next sibling 
-		if ((pNext = (HistoryItem*)nextSibling()) != NULL)
+		if ((pNext = (HistoryItem*)nextSibling()))
 			pNext->m_pPrevSibling = this;
 	}
 	
diff --git a/src/kscope.cpp b/src/kscope.cpp
index 6483199..b5594e5 100644
--- a/src/kscope.cpp
+++ b/src/kscope.cpp
@@ -73,14 +73,14 @@
  */
 KScope::KScope(TQWidget* pParent, const char* szName) :
 	KParts::DockMainWindow(pParent, szName),
-	m_pCscopeBuild(NULL),	
+	m_pCscopeBuild(nullptr),	
 	m_sCurFilePath(""),
 	m_nCurLine(0),
-	m_pProgressDlg(NULL),
+	m_pProgressDlg(nullptr),
 	m_bUpdateGUI(true),
 	m_bCscopeVerified(false),
 	m_bRebuildDB(false),
-	m_pMakeDlg(NULL)
+	m_pMakeDlg(nullptr)
 {
 	TQString sPath;
 
@@ -88,7 +88,7 @@ KScope::KScope(TQWidget* pParent, const char* szName) :
 	Config().load();
 	
 	// Create the main child widgets
-	m_pEditTabs = new EditorTabs(this, NULL);
+	m_pEditTabs = new EditorTabs(this, nullptr);
 	m_pQueryWidget = new QueryWidget(this);
 	m_pFileView = new FileView(this);
 	m_pFileList = m_pFileView->getFileList();
@@ -191,7 +191,7 @@ KScope::~KScope()
 	delete m_pCscopeBuild;
 	delete m_pProjMgr;
 	
-	if (m_pMakeDlg != NULL)
+	if (m_pMakeDlg)
 		delete m_pMakeDlg;
 }
 
@@ -844,7 +844,7 @@ void KScope::restoreSession()
 	// hidden windows
 	m_bUpdateGUI = false;
 	
-	for (pLoc = sess.fllOpenFiles.first(); pLoc != NULL;
+	for (pLoc = sess.fllOpenFiles.first(); pLoc;
 		pLoc = sess.fllOpenFiles.next()) {
 		if (TQFile::exists(pLoc->m_sPath)) {
 			pPage = addEditor(pLoc->m_sPath);
@@ -856,7 +856,7 @@ void KScope::restoreSession()
 	m_bUpdateGUI = true;
 
 	// Set the active editor (or choose a default one)
-	if (m_pEditTabs->findEditorPage(sess.sLastFile, true) == NULL)
+	if (!m_pEditTabs->findEditorPage(sess.sLastFile, true))
 		m_pEditTabs->findEditorPage(sess.fllOpenFiles.last()->m_sPath, true);
 	
 	// Reload bookmarks
@@ -1022,7 +1022,7 @@ bool KScope::slotCloseProject()
 	m_pActions->slotEnableProjectActions(false);
 	
 	// Destroy the make dialogue
-	if (m_pMakeDlg != NULL) {
+	if (m_pMakeDlg) {
 		// Save session information for persistent projects
 		if (!pProj->isTemporary()) {
 			sess.sMakeCmd = m_pMakeDlg->getCommand();
@@ -1030,7 +1030,7 @@ bool KScope::slotCloseProject()
 		}
 		
 		delete m_pMakeDlg;
-		m_pMakeDlg = NULL;
+		m_pMakeDlg = nullptr;
 	}
 	
 	// Save session information for persistent projects
@@ -1051,7 +1051,7 @@ bool KScope::slotCloseProject()
 	// process
 	m_pProjMgr->close();
 	delete m_pCscopeBuild;
-	m_pCscopeBuild = NULL;
+	m_pCscopeBuild = nullptr;
 	setCaption(TQString::null);
 
 	// Clear the contents of the file list
@@ -1096,7 +1096,7 @@ void KScope::slotCompleteSymbol()
 	EditorPage* pPage;
 	
 	pPage = m_pEditTabs->getCurrentPage();
-	if (pPage != NULL)
+	if (pPage)
 		pPage->slotCompleteSymbol();
 }
 
@@ -1164,7 +1164,7 @@ void KScope::slotProjectMake()
 	TQString sCmd, sDir;
 	
 	// Create the make dialogue, if it does not exist
-	if (m_pMakeDlg == NULL) {
+	if (!m_pMakeDlg) {
 		// Create the dialogue
 		m_pMakeDlg = new MakeDlg();
 		
@@ -1246,7 +1246,7 @@ bool KScope::getSymbol(uint& nType, TQString& sSymbol, bool& bCase,
 	TQString sSuggested;
 	
 	// Set the currently selected text, if any
-	if ((pPage = m_pEditTabs->getCurrentPage()) != NULL)
+	if ((pPage = m_pEditTabs->getCurrentPage()) != nullptr)
 		sSuggested = pPage->getSuggestedText();
 
 	// Return if a symbol was found, and prompting is turned off
@@ -1292,7 +1292,7 @@ EditorPage* KScope::addEditor(const TQString& sFilePath)
 	
 	// Do not open a new editor if one exists for this file
 	pPage = m_pEditTabs->findEditorPage(sAbsFilePath);
-	if (pPage != NULL)
+	if (pPage)
 		return pPage;
 
 	// Create a new page
@@ -1317,8 +1317,8 @@ EditorPage* KScope::createEditorPage()
 	
 	// Load a new document part
 	pDoc = m_pEditMgr->add();
-	if (pDoc == NULL)
-		return NULL;
+	if (!pDoc)
+		return nullptr;
 
 	// Create the new editor page
 	pMenu = (TQPopupMenu*)factory()->container(Config().getEditorPopupName(),
@@ -1428,7 +1428,7 @@ void KScope::slotShowEditor(const TQString& sFilePath, uint nLine)
 	
 	// Open the requested file (or select an already-open editor page)
 	pPage = addEditor(sFilePath);
-	if (pPage == NULL)
+	if (!pPage)
 		return;
 	
 	// Make sure the main window is visible
@@ -1594,7 +1594,7 @@ void KScope::slotBuildFinished(uint)
 	// Delete the progress dialogue, if it exists (first time builds)
 	if (m_pProgressDlg) {
 		delete m_pProgressDlg;
-		m_pProgressDlg = NULL;
+		m_pProgressDlg = nullptr;
 		return;
 	}
 	
@@ -1613,7 +1613,7 @@ void KScope::slotBuildAborted()
 	// Delete the progress dialogue, if it exists (first time builds)
 	if (m_pProgressDlg) {
 		delete m_pProgressDlg;
-		m_pProgressDlg = NULL;
+		m_pProgressDlg = nullptr;
 	
 		// Display a failure message
 		KMessageBox::error(0, i18n("The database could not be built.\n"
diff --git a/src/kscopeactions.cpp b/src/kscopeactions.cpp
index 66e7e5d..ceaf47b 100644
--- a/src/kscopeactions.cpp
+++ b/src/kscopeactions.cpp
@@ -56,7 +56,7 @@ void KScopeActions::init()
 	KStdAction::quit(m_pWindow, TQ_SLOT(slotClose()), m_pCollection);
 
 	addAction(i18n("Go to File List"),
-		NULL,
+		nullptr,
 		"Ctrl+Shift+O",
 		m_pWindow->m_pFileList,
 		TQ_SLOT(slotSetFocus()),
@@ -69,11 +69,11 @@ void KScopeActions::init()
 		m_pWindow->m_pEditTabs,
 		TQ_SLOT(slotSaveAll()),
 		"file_save_all",
-		NULL);
+		nullptr);
 	
 	// Edit menu
 	m_pExtEditAction = addAction(i18n("Edit in E&xternal Editor"),
-		NULL,
+		nullptr,
 		"Ctrl+E",
 		m_pWindow,
 		TQ_SLOT(slotExtEdit()),
@@ -81,7 +81,7 @@ void KScopeActions::init()
 		TQ_SIGNAL(toggleFile(bool)));
 		
 	addAction(i18n("Go To Tag"),
-		NULL,
+		nullptr,
 		"Ctrl+Shift+T",
 		m_pWindow,
 		TQ_SLOT(slotGotoTag()),
@@ -89,7 +89,7 @@ void KScopeActions::init()
 		TQ_SIGNAL(toggleFile(bool)));
 	
 	addAction(i18n("Complete Symbol"),
-		NULL,
+		nullptr,
 		"Ctrl+Space",
 		m_pWindow,
 		TQ_SLOT(slotCompleteSymbol()),
@@ -98,40 +98,40 @@ void KScopeActions::init()
 		
 	// Project menu
 	addAction(i18n("&New Project..."),
-		NULL,
-		NULL,
+		nullptr,
+		nullptr,
 		m_pWindow,
 		TQ_SLOT(slotCreateProject()),
 		"project_new",
-		NULL);
+		nullptr);
 		
 	addAction(i18n("&Open Project..."),
 		"project_open",
-		NULL,
+		nullptr,
 		m_pWindow,
 		TQ_SLOT(slotOpenProject()),
 		"project_open",
-		NULL);
+		nullptr);
 		
 	addAction(i18n("Open &Cscope.out..."),
-		NULL,
-		NULL,
+		nullptr,
+		nullptr,
 		m_pWindow,
 		TQ_SLOT(slotProjectCscopeOut()),
 		"project_cscope_out",
-		NULL);
+		nullptr);
 		
 	addAction(i18n("Add/Remove &Files..."),
-		NULL,
-		NULL,
+		nullptr,
+		nullptr,
 		m_pWindow,
 		TQ_SLOT(slotProjectFiles()),
 		"project_add_rem_files",
 		TQ_SIGNAL(toggleProject(bool)));
 		
 	addAction(i18n("&Properties..."),
-		NULL,
-		NULL,
+		nullptr,
+		nullptr,
 		m_pWindow,
 		TQ_SLOT(slotProjectProps()),
 		"project_properties",
@@ -155,7 +155,7 @@ void KScopeActions::init()
 	
 	addAction(i18n("&Close Project"),
 		"window-close",
-		NULL,
+		nullptr,
 		m_pWindow,
 		TQ_SLOT(slotCloseProject()),
 		"project_close",
@@ -163,7 +163,7 @@ void KScopeActions::init()
 
 	// Cscope menu
 	addAction(i18n("&References..."),
-		NULL,
+		nullptr,
 		"Ctrl+0",
 		m_pWindow,
 		TQ_SLOT(slotQueryReference()),
@@ -171,7 +171,7 @@ void KScopeActions::init()
 		TQ_SIGNAL(toggleProject(bool)));
 		
 	addAction(i18n("&Definition..."),
-		NULL,
+		nullptr,
 		"Ctrl+1",
 		m_pWindow,
 		TQ_SLOT(slotQueryDefinition()),
@@ -179,7 +179,7 @@ void KScopeActions::init()
 		TQ_SIGNAL(toggleProject(bool)));
 	
 	addAction(i18n("&Called Functions..."),
-		NULL,
+		nullptr,
 		"Ctrl+2",
 		m_pWindow,
 		TQ_SLOT(slotQueryCalled()),
@@ -187,7 +187,7 @@ void KScopeActions::init()
 		TQ_SIGNAL(toggleProject(bool)));
 		
 	addAction(i18n("C&alling Functions..."),
-		NULL,
+		nullptr,
 		"Ctrl+3",
 		m_pWindow,
 		TQ_SLOT(slotQueryCalling()),
@@ -195,7 +195,7 @@ void KScopeActions::init()
 		TQ_SIGNAL(toggleProject(bool)));
 		
 	addAction(i18n("Find &Text..."),
-		NULL,
+		nullptr,
 		"Ctrl+4",
 		m_pWindow,
 		TQ_SLOT(slotQueryText()),
@@ -203,7 +203,7 @@ void KScopeActions::init()
 		TQ_SIGNAL(toggleProject(bool)));
 		
 	addAction(i18n("Find &EGrep Pattern..."),
-		NULL,
+		nullptr,
 		"Ctrl+5",
 		m_pWindow,
 		TQ_SLOT(slotQueryPattern()),
@@ -211,7 +211,7 @@ void KScopeActions::init()
 		TQ_SIGNAL(toggleProject(bool)));
 		
 	addAction(i18n("Find &File..."),
-		NULL,
+		nullptr,
 		"Ctrl+7",
 		m_pWindow,
 		TQ_SLOT(slotQueryFile()),
@@ -219,7 +219,7 @@ void KScopeActions::init()
 		TQ_SIGNAL(toggleProject(bool)));
 		
 	addAction(i18n("&Including Files..."),
-		NULL,
+		nullptr,
 		"Ctrl+8",
 		m_pWindow,
 		TQ_SLOT(slotQueryIncluding()),
@@ -227,7 +227,7 @@ void KScopeActions::init()
 		TQ_SIGNAL(toggleProject(bool)));
 		
 	addAction(i18n("&Quick Definition"),
-		NULL,
+		nullptr,
 		"Ctrl+]",
 		m_pWindow,
 		TQ_SLOT(slotQueryQuickDef()),
@@ -235,7 +235,7 @@ void KScopeActions::init()
 		TQ_SIGNAL(toggleProject(bool)));
 		
 	addAction(i18n("Call &Graph..."),
-		NULL,
+		nullptr,
 		"Ctrl+\\",
 		m_pWindow,
 		TQ_SLOT(slotCallTree()),
@@ -244,7 +244,7 @@ void KScopeActions::init()
 		
 	addAction(i18n("Re&build database"),
 		"vcs_update",
-		NULL,
+		nullptr,
 		m_pWindow,
 		TQ_SLOT(slotRebuildDB()),
 		"cscope_rebuild",
@@ -273,7 +273,7 @@ void KScopeActions::init()
 		m_pWindow->m_pQueryWidget,
 		TQ_SLOT(slotHistoryPrev()),
 		"go_prev_pos",
-		NULL);
+		nullptr);
 	
 	addAction(i18n("&Next Position"),
 		"forward", 
@@ -281,7 +281,7 @@ void KScopeActions::init()
 		m_pWindow->m_pQueryWidget,
 		TQ_SLOT(slotHistoryNext()),
 		"go_next_pos",
-		NULL);
+		nullptr);
 		
 	addAction(i18n("Position &History"),
 		"history",
@@ -289,7 +289,7 @@ void KScopeActions::init()
 		m_pWindow,
 		TQ_SLOT(slotHistoryShow()),
 		"go_history",
-		NULL);
+		nullptr);
 		
 	addAction(i18n("Global &Bookmarks"),
 		"bookmark", 
@@ -297,7 +297,7 @@ void KScopeActions::init()
 		m_pWindow,
 		TQ_SLOT(slotShowBookmarks()),
 		"go_bookmarks",
-		NULL);
+		nullptr);
 
 	// View menu
 	m_pToggleFileViewAction = addToggle(i18n("Toggle File List"),
@@ -306,7 +306,7 @@ void KScopeActions::init()
 		m_pWindow->m_pFileViewDock,
 		TQ_SLOT(changeHideShowState()),
 		"view_toggle_filelist_dock",
-		NULL);
+		nullptr);
 	
 	m_pToggleQueryWindowAction = addToggle(i18n("Toggle Query Window"),
 		"view_top_bottom",
@@ -314,7 +314,7 @@ void KScopeActions::init()
 		m_pWindow->m_pQueryDock,
 		TQ_SLOT(changeHideShowState()),
 		"view_toggle_query_dock",
-		NULL);
+		nullptr);
 	
 	m_pToggleTagListAction = addToggle(i18n("Toggle Tag List"),
 		"view_detailed",
@@ -322,16 +322,16 @@ void KScopeActions::init()
 		m_pWindow->m_pEditTabs,
 		TQ_SLOT(slotToggleTagList()),
 		"view_toggle_tag_list",
-		NULL);
+		nullptr);
 			
 	// Window menu
 	addAction(i18n("Close &All"),
 		"window-close",
-		NULL,
+		nullptr,
 		m_pWindow,
 		TQ_SLOT(slotCloseAllWindows()),
 		"window_close_all",
-		NULL);
+		nullptr);
 		
 	addAction(i18n("Go &Left"),
 		"back", 
@@ -339,7 +339,7 @@ void KScopeActions::init()
 		m_pWindow->m_pEditTabs,
 		TQ_SLOT(slotGoLeft()),
 		"window_go_left",
-		NULL);
+		nullptr);
 		
 	addAction(i18n("Go &Right"),
 		"forward",
@@ -347,7 +347,7 @@ void KScopeActions::init()
 		m_pWindow->m_pEditTabs,
 		TQ_SLOT(slotGoRight()),
 		"window_go_right",
-		NULL);
+		nullptr);
 		
 	// Settings menu
 	KStdAction::preferences(m_pWindow, TQ_SLOT(slotConfigure()), m_pCollection);
@@ -355,17 +355,17 @@ void KScopeActions::init()
 	
 	// Help menu
 	addAction(i18n("Show &Welcome Message..."),
-		NULL,
-		NULL,
+		nullptr,
+		nullptr,
 		m_pWindow,
 		TQ_SLOT(slotShowWelcome()),
 		"help_welcome",
-		NULL);
+		nullptr);
 	
 	// Query widget popup menu
 	addAction(i18n("&New"),
 		"document-new",
-		NULL,
+		nullptr,
 		m_pWindow->m_pQueryWidget,
 		TQ_SLOT(slotNewQueryPage()),
 		"query_new",
@@ -373,7 +373,7 @@ void KScopeActions::init()
 	
 	addAction(i18n("&Refresh"),
 		"reload",
-		NULL,
+		nullptr,
 		m_pWindow->m_pQueryWidget,
 		TQ_SLOT(slotRefreshCurrent()),
 		"query_refresh",
@@ -381,7 +381,7 @@ void KScopeActions::init()
 		
 	m_pLockAction = addToggle(i18n("&Lock/Unlock"),
 		"encrypted",
-		NULL,
+		nullptr,
 		m_pWindow->m_pQueryWidget,
 		TQ_SLOT(slotLockCurrent()),
 		"query_toggle_locked",
@@ -389,7 +389,7 @@ void KScopeActions::init()
 		
 	addAction(i18n("&Close"),
 		"window-close",
-		NULL,
+		nullptr,
 		m_pWindow->m_pQueryWidget,
 		TQ_SLOT(slotCloseCurrent()),
 		"query_close",
@@ -483,7 +483,7 @@ TDEAction* KScopeActions::addAction(const TQString& sCaption, const char* szIcon
 	// Create the action
 	pAction = new TDEAction(sCaption,
 			szIcon,
-			szShortcut == NULL ? TDEShortcut() : TDEShortcut(szShortcut),
+			!szShortcut ? TDEShortcut() : TDEShortcut(szShortcut),
 			pReceiver,
 			szSlot,
 			m_pCollection,
@@ -517,7 +517,7 @@ TDEToggleAction* KScopeActions::addToggle(const TQString& sCaption,
 	// Create the action
 	pAction = new TDEToggleAction(sCaption,
 			szIcon,
-			szShortcut == NULL ? TDEShortcut() : TDEShortcut(szShortcut),
+			!szShortcut ? TDEShortcut() : TDEShortcut(szShortcut),
 			pReceiver,
 			szSlot,
 			m_pCollection,
diff --git a/src/kscopepixmaps.cpp b/src/kscopepixmaps.cpp
index 31eb251..afe1b2a 100644
--- a/src/kscopepixmaps.cpp
+++ b/src/kscopepixmaps.cpp
@@ -233,7 +233,7 @@ static const char* XPM_UNKNOWN[] = {
  * Class constructor.
  */
 KScopePixmaps::KScopePixmaps() :
-	m_pPixArray(NULL),
+	m_pPixArray(nullptr),
 	m_loader()
 {
 }
diff --git a/src/newprojectdlg.cpp b/src/newprojectdlg.cpp
index ac2aa18..6ffd4cd 100644
--- a/src/newprojectdlg.cpp
+++ b/src/newprojectdlg.cpp
@@ -250,7 +250,7 @@ void NewProjectDlg::slotAddType()
 
 	// Do not add an existing type.
 	if (m_pTypesList->findItem(sType, TQt::CaseSensitive | TQt::ExactMatch) != 
-		NULL) {
+		nullptr) {
 		return;
 	}
 
@@ -279,7 +279,7 @@ void NewProjectDlg::slotRemoveType()
 	
 	// Add to the list of available types.
 	if (m_pAvailTypesList->findItem(sType, TQt::CaseSensitive | TQt::ExactMatch) 
-		== NULL) {
+		== nullptr) {
 		m_pAvailTypesList->insertItem(sType);
 	}
 	
diff --git a/src/newprojectdlg.h b/src/newprojectdlg.h
index 7ea56c8..2732abb 100644
--- a/src/newprojectdlg.h
+++ b/src/newprojectdlg.h
@@ -44,7 +44,7 @@ class AutoCompletionDlg : public AutoCompletionLayout
 	TQ_OBJECT
 	
 public:
-	AutoCompletionDlg(TQWidget* pParent, const char* szName = NULL);
+	AutoCompletionDlg(TQWidget* pParent, const char* szName = nullptr);
 	~AutoCompletionDlg();
 
 public slots:		
@@ -82,7 +82,7 @@ class NewProjectDlg : public NewProjectLayout
 	TQ_OBJECT
 	
 public: 
-	NewProjectDlg(bool, TQWidget* pParent = NULL, const char* szName = NULL);
+	NewProjectDlg(bool, TQWidget* pParent = nullptr, const char* szName = nullptr);
 	~NewProjectDlg();
 	
 	void setProperties(const TQString&, const TQString&, 
diff --git a/src/openprojectdlg.cpp b/src/openprojectdlg.cpp
index 9f13489..58a04e6 100644
--- a/src/openprojectdlg.cpp
+++ b/src/openprojectdlg.cpp
@@ -80,7 +80,7 @@ void OpenProjectDlg::slotRemoveRecent()
 
 	// Remove the selected item, if any
 	pItem = m_pRecentList->selectedItem();
-	if (pItem != NULL) {
+	if (pItem) {
 		Config().removeRecentProject(pItem->text());
 		m_pRecentList->removeItem(m_pRecentList->currentItem());
 	}
@@ -95,7 +95,7 @@ void OpenProjectDlg::slotRemoveRecent()
  */
 void OpenProjectDlg::slotSelectRecent(TQListBoxItem* pItem)
 {
-	if (pItem != NULL)
+	if (pItem)
 		m_pProjPathRequester->setURL(pItem->text());
 }
 
@@ -108,7 +108,7 @@ void OpenProjectDlg::slotSelectRecent(TQListBoxItem* pItem)
  */
 void OpenProjectDlg::slotOpenRecent(TQListBoxItem* pItem)
 {
-	if (pItem != NULL) {
+	if (pItem) {
 		m_pProjPathRequester->setURL(pItem->text());
 		accept();
 	}
diff --git a/src/prefcolor.cpp b/src/prefcolor.cpp
index 4c77066..ddab24e 100644
--- a/src/prefcolor.cpp
+++ b/src/prefcolor.cpp
@@ -143,7 +143,7 @@ void PrefColor::apply()
 	ColorListItem* pItem;
 	
 	// Create a list item for every GUI element
-	for (pItem = (ColorListItem*)m_pList->firstChild(); pItem != NULL; 
+	for (pItem = (ColorListItem*)m_pList->firstChild(); pItem; 
 		pItem = (ColorListItem*)pItem->nextSibling()) {
 		Config().setColor(pItem->getElement(), pItem->getColor());
 	}
diff --git a/src/preffont.cpp b/src/preffont.cpp
index 960719c..70b191a 100644
--- a/src/preffont.cpp
+++ b/src/preffont.cpp
@@ -145,7 +145,7 @@ void PrefFont::apply()
 	FontListItem* pItem;
 	
 	// Create a list item for every GUI element
-	for (pItem = (FontListItem*)m_pList->firstChild(); pItem != NULL; 
+	for (pItem = (FontListItem*)m_pList->firstChild(); pItem; 
 		pItem = (FontListItem*)pItem->nextSibling()) {
 		Config().setFont(pItem->getElement(), pItem->getFont());
 	}
diff --git a/src/project.cpp b/src/project.cpp
index 2938778..6360305 100644
--- a/src/project.cpp
+++ b/src/project.cpp
@@ -63,7 +63,7 @@ inline void stringListFromFlList(TQStringList& sl, const FileLocationList& fll)
 	
 	// Turn the object list into a string list, so that it can be written in
 	// the configuration file
-	for (pLoc = pList->first(); pLoc != NULL; pLoc = pList->next()) {
+	for (pLoc = pList->first(); pLoc; pLoc = pList->next()) {
 		sLoc = "";
 		TQTextOStream(&sLoc) << pLoc->m_sPath << ":" << pLoc->m_nLine << ":" 
 				<< pLoc->m_nCol;
@@ -74,7 +74,7 @@ inline void stringListFromFlList(TQStringList& sl, const FileLocationList& fll)
 /**
  */
 Project::Project() : ProjectBase(),
-	m_pConf(NULL)
+	m_pConf(nullptr)
 {
 }
 
diff --git a/src/projectfilesdlg.cpp b/src/projectfilesdlg.cpp
index 568261b..b274978 100644
--- a/src/projectfilesdlg.cpp
+++ b/src/projectfilesdlg.cpp
@@ -47,9 +47,9 @@ ProjectFilesDlg::ProjectFilesDlg(Project* pProj, TQWidget* pParent,
 	const char* szName) :
 	ProjectFilesLayout(pParent, szName),
 	m_pProj(pProj),
-	m_pScanDlg(NULL),
-	m_pItrItem(NULL),
-	m_pLastItem(NULL)
+	m_pScanDlg(nullptr),
+	m_pItrItem(nullptr),
+	m_pLastItem(nullptr)
 {
 	// Create the scanner object
 	m_pScanner = new DirScanner(this, &m_dicFiles);
@@ -142,7 +142,7 @@ bool ProjectFilesDlg::firstItem(TQString& sFilePath)
  */
 bool ProjectFilesDlg::nextItem(TQString& sFilePath)
 {
-	if (m_pItrItem == NULL)
+	if (!m_pItrItem)
 		return false;
 
 	sFilePath = m_pItrItem->text(0);
@@ -170,7 +170,7 @@ void ProjectFilesDlg::customEvent(TQCustomEvent* pEvent)
 	// Check if the scan has terminated
 	if (!pDSE->m_bFinished) {
 		// Create the scan progress dialog, if required
-		if (m_pScanDlg == NULL) {
+		if (!m_pScanDlg) {
 			m_pScanDlg = new ScanProgressDlg(this);
 			connect(m_pScanDlg, TQ_SIGNAL(cancelled()), this,
 				TQ_SLOT(slotCancelDirScan()));
@@ -183,7 +183,7 @@ void ProjectFilesDlg::customEvent(TQCustomEvent* pEvent)
 
 	// Destroy the scan progress dialog
 	delete m_pScanDlg;
-	m_pScanDlg = NULL;
+	m_pScanDlg = nullptr;
 
 	// Verify the thread has terminated
 	m_pScanner->wait(500);
@@ -239,7 +239,7 @@ void ProjectFilesDlg::slotAddFiles()
 
 	// Add the selected files, skipping existing entries
 	for (itr = slFiles.begin(); itr != slFiles.end(); ++itr) {
-		if (m_dicFiles.find(*itr) == NULL)
+		if (!m_dicFiles.find(*itr))
 			addItem(*itr);
 	}
 }
@@ -303,7 +303,7 @@ void ProjectFilesDlg::slotRemSel()
 
 	// Remove the selected files
 	pItem = m_pFileList->firstChild();
-	while (pItem != NULL) {
+	while (pItem) {
 		pPrevItem = pItem;
 		pItem = pItem->nextSibling();
 		
@@ -333,7 +333,7 @@ void ProjectFilesDlg::slotRemDir()
 
 	// Remove the files under the selected directory
 	pItem = m_pFileList->firstChild();
-	while (pItem != NULL) {
+	while (pItem) {
 		pPrevItem = pItem;
 		pItem = pItem->nextSibling();
 
@@ -367,7 +367,7 @@ void ProjectFilesDlg::slotRemTree()
 
 	// Remove the files under the selected directory
 	pItem = m_pFileList->firstChild();
-	while (pItem != NULL) {
+	while (pItem) {
 		pPrevItem = pItem;
 		pItem = pItem->nextSibling();
 
@@ -400,7 +400,7 @@ void ProjectFilesDlg::slotFilter()
 	// Iterate over the list entries, and hide all items not matching the
 	// filter string
 	pItem = m_pFileList->firstChild();
-	while (pItem != NULL) {
+	while (pItem) {
 		if (reFilter.search(pItem->text(0)) == -1) {
 			pItem->setVisible(false);
 			pItem->setSelectable(false);
@@ -419,7 +419,7 @@ void ProjectFilesDlg::slotShowAll()
 
 	// Iterate over the list entries, and make all items visible
 	pItem = m_pFileList->firstChild();
-	while (pItem != NULL) {
+	while (pItem) {
 		pItem->setVisible(true);
 		pItem->setSelectable(true);
 		pItem = pItem->nextSibling();
diff --git a/src/projectmanager.cpp b/src/projectmanager.cpp
index 6c38028..078774d 100644
--- a/src/projectmanager.cpp
+++ b/src/projectmanager.cpp
@@ -34,7 +34,7 @@
 /**
  * Class constructor.
  */
-ProjectManager::ProjectManager() : m_pCurProj(NULL)
+ProjectManager::ProjectManager() : m_pCurProj(nullptr)
 {
 }
 
@@ -167,7 +167,7 @@ void ProjectManager::close()
 {
 	if (m_pCurProj) {
 		delete m_pCurProj;
-		m_pCurProj = NULL;
+		m_pCurProj = nullptr;
 	}
 }
 
diff --git a/src/projectmanager.h b/src/projectmanager.h
index d45dd7d..222012f 100644
--- a/src/projectmanager.h
+++ b/src/projectmanager.h
@@ -49,7 +49,7 @@ public:
 	ProjectBase* curProject() const { return m_pCurProj; }
 	
 private:
-	/** The current project (NULL if no project is open). */
+	/** The current project (nullptr if no project is open). */
 	ProjectBase* m_pCurProj;
 };
 
diff --git a/src/queryresultsmenu.cpp b/src/queryresultsmenu.cpp
index 4865d15..219469d 100644
--- a/src/queryresultsmenu.cpp
+++ b/src/queryresultsmenu.cpp
@@ -35,7 +35,7 @@
  */
 QueryResultsMenu::QueryResultsMenu(TQWidget* pParent, const char* szName) :
 	TQPopupMenu(pParent, szName),
-	m_pItem(NULL)
+	m_pItem(nullptr)
 {
 	// Create the menu
 	insertItem(i18n("&View Source"), this, TQ_SLOT(slotViewSource()), 0,
@@ -72,7 +72,7 @@ void QueryResultsMenu::slotShow(TQListViewItem* pItem, const TQPoint& ptPos,
 	m_pItem = pItem;
 	m_nCol = nCol;
 	
-	if (m_pItem == NULL) {
+	if (!m_pItem) {
 		// No item selected, disable everything but the "Filter" and "Show All" 
 		// items
 		setItemEnabled(ViewSource, false);
@@ -124,7 +124,7 @@ void QueryResultsMenu::slotShow(TQListViewItem* pItem, const TQPoint& ptPos,
  */
 void QueryResultsMenu::slotViewSource()
 {
-	if (m_pItem != NULL)
+	if (m_pItem)
 		emit viewSource(m_pItem);
 }
 
@@ -134,7 +134,7 @@ void QueryResultsMenu::slotViewSource()
  */
 void QueryResultsMenu::slotFindDef()
 {
-	if (m_pItem != NULL)
+	if (m_pItem)
 		emit findDef(m_pItem->text(0));
 }
 
@@ -144,7 +144,7 @@ void QueryResultsMenu::slotFindDef()
  */
 void QueryResultsMenu::slotCopy()
 {
-	if (m_pItem != NULL)
+	if (m_pItem)
 		emit copy(m_pItem, m_nCol);
 }
 
@@ -163,7 +163,7 @@ void QueryResultsMenu::slotFilter()
  */
 void QueryResultsMenu::slotRemove()
 {
-	if (m_pItem != NULL)
+	if (m_pItem)
 		emit remove(m_pItem);
 } 
 
diff --git a/src/queryresultsmenu.h b/src/queryresultsmenu.h
index ce9bae4..db200e8 100644
--- a/src/queryresultsmenu.h
+++ b/src/queryresultsmenu.h
@@ -93,7 +93,7 @@ private:
 	/** Menu item IDs. */
 	enum { ViewSource, FindDef, Copy, Filter, ShowAll, Remove };
 		
-	/** The item for which the popup menu is provided (cannot be NULL). */
+	/** The item for which the popup menu is provided (cannot be nullptr). */
 	TQListViewItem* m_pItem;
 	
 	/** The list column for which the query was invoked. */
diff --git a/src/queryview.cpp b/src/queryview.cpp
index 68db81a..3ee318a 100644
--- a/src/queryview.cpp
+++ b/src/queryview.cpp
@@ -41,7 +41,7 @@
  */
 QueryView::QueryView(TQWidget* pParent, const char* szName) :
 	TQListView(pParent, szName),
-	m_pLastItem(NULL)
+	m_pLastItem(nullptr)
 {
 	// Create the popup-menu
 	m_pQueryMenu = new QueryResultsMenu(this);
@@ -138,17 +138,17 @@ void QueryView::selectNext()
 	TQListViewItem* pItem;
 	
 	// Do nothing if the list is empty
-	if (firstChild() == NULL)
+	if (!firstChild())
 		return;
 		
 	// Find the next record
 	pItem = currentItem();
-	if (pItem == NULL) {
+	if (!pItem) {
 		pItem = firstChild();
 	}
 	else if (pItem->isSelected()) {
 		pItem = pItem->itemBelow();
-		if (pItem == NULL)
+		if (!pItem)
 			return;
 	}
 	
@@ -168,17 +168,17 @@ void QueryView::selectPrev()
 	TQListViewItem* pItem;
 	
 	// Do nothing if the list is empty
-	if (firstChild() == NULL)
+	if (!firstChild())
 		return;
 	
 	// Find the item immediately above this one
 	pItem = currentItem();
-	if (pItem == NULL) {
+	if (!pItem) {
 		pItem = firstChild();
 	}
 	else if (pItem->isSelected()) {
 		pItem = pItem->itemAbove();
-		if (pItem == NULL)
+		if (!pItem)
 			return;
 	}
 		
@@ -212,7 +212,7 @@ void QueryView::queryFinished(uint nRecords, TQListViewItem*)
 	
 	// Report a query that has returned an empty record set
 	if (nRecords == 0)
-		addRecord(i18n("No results"), "", "", "", NULL);
+		addRecord(i18n("No results"), "", "", "", nullptr);
 	
 	// Data is available, instruct the owner object to show the view
 	emit needToShow();
@@ -227,7 +227,7 @@ QueryView::Iterator QueryView::getIterator()
 {
 	TQListViewItem* pItem;
 	
-	for (pItem = firstChild(); pItem != NULL && !pItem->isVisible(); 
+	for (pItem = firstChild(); pItem && !pItem->isVisible(); 
 		pItem = pItem->nextSibling());
 		
 	return Iterator(pItem);
@@ -245,12 +245,12 @@ void QueryView::contentsMouseDoubleClickEvent(TQMouseEvent* pEvent)
 	TQListViewItem* pItem;
 	
 	// Handle only left button double-clicks
-	if (pEvent == NULL || pEvent->button() != LeftButton)
+	if (!pEvent || pEvent->button() != LeftButton)
 		return;
 		
 	// Find the clicked item
 	pItem = itemAt(contentsToViewport(pEvent->pos()));
-	if (pItem == NULL)
+	if (!pItem)
 		return;
 		
 	// Emit the doubleClicked() signal
@@ -340,7 +340,7 @@ void QueryView::slotFilter(int nCol)
 	
 	// Iterate over all items in the list
 	pItem = firstChild();
-	while (pItem != NULL) {
+	while (pItem) {
 		// Filter visible items only
 		if (pItem->isVisible() &&
 			(re.search(pItem->text(nCol)) == -1) != bNegate) {
@@ -366,7 +366,7 @@ void QueryView::slotShowAll()
 	
 	// Iterate over all items in the list
 	pItem = firstChild();
-	while (pItem != NULL) {
+	while (pItem) {
 		pItem->setVisible(true);
 		pItem = pItem->nextSibling();
 	}
@@ -388,12 +388,12 @@ void QueryView::slotRemoveItem(TQListViewItem* pItem)
  */
 void QueryView::Iterator::next()
 {
-	if (m_pItem == NULL)
+	if (!m_pItem)
 		return;
 		
 	do {
 		m_pItem = m_pItem->nextSibling();
-	} while (m_pItem != NULL && !m_pItem->isVisible());
+	} while (m_pItem && !m_pItem->isVisible());
 }
 
 /**
@@ -401,7 +401,7 @@ void QueryView::Iterator::next()
  */
 TQString QueryView::Iterator::getFunc()
 {
-	if (m_pItem == NULL)
+	if (!m_pItem)
 		return "";
 		
 	return m_pItem->text(0);
@@ -412,7 +412,7 @@ TQString QueryView::Iterator::getFunc()
  */
 TQString QueryView::Iterator::getFile()
 {
-	if (m_pItem == NULL)
+	if (!m_pItem)
 		return "";
 		
 	return m_pItem->text(1);
@@ -424,7 +424,7 @@ TQString QueryView::Iterator::getFile()
  */
 TQString QueryView::Iterator::getLine()
 {
-	if (m_pItem == NULL)
+	if (!m_pItem)
 		return "";
 		
 	return m_pItem->text(2);
@@ -435,7 +435,7 @@ TQString QueryView::Iterator::getLine()
  */
 TQString QueryView::Iterator::getText()
 {
-	if (m_pItem == NULL)
+	if (!m_pItem)
 		return "";
 		
 	return m_pItem->text(3);
diff --git a/src/queryview.h b/src/queryview.h
index fee8828..50f1a05 100644
--- a/src/queryview.h
+++ b/src/queryview.h
@@ -124,12 +124,12 @@ public:
 	~QueryView();
 	
 	virtual void addRecord(const TQString&, const TQString&, const TQString&,
-		const TQString&, TQListViewItem* pParent = NULL);
+		const TQString&, TQListViewItem* pParent = nullptr);
 	virtual void select(TQListViewItem*);
 	virtual void selectNext();
 	virtual void selectPrev();
 	virtual void queryProgress();
-	virtual void queryFinished(uint, TQListViewItem* pParent = NULL);
+	virtual void queryFinished(uint, TQListViewItem* pParent = nullptr);
 	
 	/**
 	 * Provides an iterator over the list of query results.
@@ -141,7 +141,7 @@ public:
 		/**
 		 * Default constructor.
 		 */
-		Iterator() : m_pItem(NULL) {}
+		Iterator() : m_pItem(nullptr) {}
 		
 		/**
 		 * Copy constructor.
@@ -153,7 +153,7 @@ public:
 		 * @return	true if the iterator points _beyond_ the end of the list,
 		 *			false otherwise
 		 */
-		bool isEOF() { return m_pItem == NULL; }
+		bool isEOF() { return m_pItem == nullptr; }
 		
 		void next();
 			
diff --git a/src/queryviewdriver.cpp b/src/queryviewdriver.cpp
index 59ad92a..38fc511 100644
--- a/src/queryviewdriver.cpp
+++ b/src/queryviewdriver.cpp
@@ -39,7 +39,7 @@
 QueryViewDriver::QueryViewDriver(QueryView* pView, TQObject* pParent, 
 	const char* szName) : TQObject(pParent, szName),
 	m_pView(pView),
-	m_pItem(NULL),
+	m_pItem(nullptr),
 	m_progress(pView),
 	m_bRunning(false)
 {
@@ -173,7 +173,7 @@ void QueryViewDriver::slotProgress(int nFiles, int nTotal)
  */
 void QueryViewDriver::slotViewClosed()
 {
-	m_pView = NULL;
+	m_pView = nullptr;
 	m_pCscope->kill();
 }
 
diff --git a/src/queryviewdriver.h b/src/queryviewdriver.h
index 641ced2..4ec6256 100644
--- a/src/queryviewdriver.h
+++ b/src/queryviewdriver.h
@@ -50,7 +50,7 @@ public:
     QueryViewDriver(QueryView*, TQObject* pParent = 0, const char* szName = 0);
     ~QueryViewDriver();
 
-	void query(uint, const TQString&, bool bCase, TQListViewItem* pItem = NULL);
+	void query(uint, const TQString&, bool bCase, TQListViewItem* pItem = nullptr);
 	
 	/**
 	 * @return	true if a query is currently running, false otherwise
diff --git a/src/querywidget.cpp b/src/querywidget.cpp
index b0f0755..bbfc3ce 100644
--- a/src/querywidget.cpp
+++ b/src/querywidget.cpp
@@ -40,9 +40,9 @@
  */
 QueryWidget::QueryWidget(TQWidget* pParent, const char* szName) :
 	QueryWidgetLayout(pParent, szName),
-	m_pPageMenu(NULL),
-	m_pLockAction(NULL),
-	m_pHistPage(NULL),
+	m_pPageMenu(nullptr),
+	m_pLockAction(nullptr),
+	m_pHistPage(nullptr),
 	m_bHistEnabled(true),
 	m_nQueryPages(0)
 {
@@ -253,7 +253,7 @@ void QueryWidget::slotLockCurrent(bool bOn)
 	
 	pPage = currentPage();
 	
-	if (pPage != NULL)
+	if (pPage)
 		setPageLocked(currentPage(), bOn);
 }
 
@@ -265,7 +265,7 @@ void QueryWidget::slotLockCurrent()
 	QueryPageBase* pPage;
 	
 	pPage = currentPage();
-	if (pPage != NULL)
+	if (pPage)
 		setPageLocked(pPage, !pPage->isLocked());
 }
 
@@ -278,7 +278,7 @@ void QueryWidget::slotRefreshCurrent()
 	
 	// Make sure the current page is a valid, non-empty one
 	pPage = dynamic_cast<QueryPage*>(currentPage());
-	if (pPage == NULL)
+	if (!pPage)
 		return;
 	
 	// Clear the current page contents
@@ -294,7 +294,7 @@ void QueryWidget::slotNextResult()
 
 	// Select the next record in the current page
 	pPage = dynamic_cast<QueryPage*>(currentPage());
-	if (pPage != NULL)
+	if (pPage)
 		pPage->selectNext();
 }
 
@@ -307,7 +307,7 @@ void QueryWidget::slotPrevResult()
 
 	// Select the next record in the current page
 	pPage = dynamic_cast<QueryPage*>(currentPage());
-	if (pPage != NULL)
+	if (pPage)
 		pPage->selectPrev();
 }
 
@@ -320,7 +320,7 @@ void QueryWidget::slotCloseCurrent()
 
 	// Close the current page
 	pPage = currentPage();
-	if (pPage != NULL)
+	if (pPage)
 		slotClosePage(pPage);
 }
 
@@ -340,7 +340,7 @@ void QueryWidget::slotCloseAll()
 		delete pPage;
 	}
 	
-	m_pHistPage = NULL;
+	m_pHistPage = nullptr;
 }
 
 /**
@@ -349,7 +349,7 @@ void QueryWidget::slotCloseAll()
  */
 void QueryWidget::slotHistoryPrev()
 {
-	if (m_pHistPage != NULL) {
+	if (m_pHistPage) {
 		m_bHistEnabled = false;
 		m_pHistPage->selectPrev();
 		m_bHistEnabled = true;
@@ -362,7 +362,7 @@ void QueryWidget::slotHistoryPrev()
  */
 void QueryWidget::slotHistoryNext()
 {
-	if (m_pHistPage != NULL) {
+	if (m_pHistPage) {
 		m_bHistEnabled = false;
 		m_pHistPage->selectNext();
 		m_bHistEnabled = true;
@@ -435,7 +435,7 @@ void QueryWidget::slotClosePage(TQWidget* pPage)
 {
 	// Prompt the user before closing a locked query
 	if (((QueryPage*)pPage)->isLocked()) {
-		if (KMessageBox::questionYesNo(NULL, i18n("You about about to close"
+		if (KMessageBox::questionYesNo(nullptr, i18n("You about about to close"
 			" a locked page.\nAre you sure?")) == KMessageBox::No) {
 			return;
 		}
@@ -443,9 +443,9 @@ void QueryWidget::slotClosePage(TQWidget* pPage)
 
 	// Check if the closed page is the active history page
 	if (pPage == m_pHistPage)
-		m_pHistPage = NULL;
+		m_pHistPage = nullptr;
 	// Update the number of open history pages
-	else if (dynamic_cast<HistoryPage*>(pPage) == NULL)
+	else if (!dynamic_cast<HistoryPage*>(pPage))
 		m_nQueryPages--;
 	
 	// Remove the page and delete the object
@@ -516,7 +516,7 @@ void QueryWidget::setPageLocked(QueryPageBase* pPage, bool bLock)
 	// query page is being unlocked
 	if (isHistoryPage(pPage) && (pPage != m_pHistPage)	&& !bLock) {
 		// Lock the active history page (may be NULL)
-		if (m_pHistPage != NULL)
+		if (m_pHistPage)
 			setPageLocked(m_pHistPage, true);
 		
 		// Set the unlock page as the new active history page
@@ -539,7 +539,7 @@ void QueryWidget::findQueryPage()
 	
 	// First check if the current page is an unlocked query page
 	pPage = dynamic_cast<QueryPage*>(currentPage());
-	if (pPage != NULL) {
+	if (pPage) {
 		if (!pPage->isLocked() && !pPage->isRunning())
 			return;
 	}
@@ -548,7 +548,7 @@ void QueryWidget::findQueryPage()
 	nPages = m_pQueryTabs->count();
 	for (i = 0; i < nPages; i++) {
 		pPage = dynamic_cast<QueryPage*>(m_pQueryTabs->page(i));
-		if (pPage != NULL) {
+		if (pPage) {
 			if (!pPage->isLocked() && !pPage->isRunning()) {
 				setCurrentPage(pPage);
 				return;
@@ -572,14 +572,14 @@ void QueryWidget::findHistoryPage()
 	TQString sTitle;
 	
 	// First check if the active history page is unlocked
-	if (m_pHistPage != NULL && !m_pHistPage->isLocked())
+	if (m_pHistPage && !m_pHistPage->isLocked())
 		return;
 	
 	// Look for the first unlocked history page
 	nPages = m_pQueryTabs->count();
 	for (i = 0; i < nPages; i++) {
 		pPage = dynamic_cast<HistoryPage*>(m_pQueryTabs->page(i));
-		if (pPage != NULL && !pPage->isLocked()) {
+		if (pPage && !pPage->isLocked()) {
 			m_pHistPage = pPage;
 			return;
 		}
diff --git a/src/querywidget.h b/src/querywidget.h
index e7e2486..e43ec5b 100644
--- a/src/querywidget.h
+++ b/src/querywidget.h
@@ -134,7 +134,7 @@ private:
 	 * @return	true if the given page is a history page
 	 */
 	inline bool isHistoryPage(TQWidget* pPage) {
-		return (dynamic_cast<HistoryPage*>(pPage) != NULL);
+		return (dynamic_cast<HistoryPage*>(pPage) != nullptr);
 	}
 	
 	void setPageLocked(QueryPageBase*, bool);
diff --git a/src/searchlist.cpp b/src/searchlist.cpp
index 38443f2..1442d04 100644
--- a/src/searchlist.cpp
+++ b/src/searchlist.cpp
@@ -72,7 +72,7 @@ void ListToolTip::maybeTip(const TQPoint& pt)
 	// Get the item at the given point
 	pList = m_pList->getList();
 	pItem = pList->itemAt(pt);
-	if (pItem == NULL)
+	if (!pItem)
 		return;
 
 	// Get the tip string for this item
@@ -187,7 +187,7 @@ void SearchList::slotItemSelected()
 {
 	TQListViewItem* pItem;
 
-	if ((pItem = m_pList->selectedItem()) != NULL) {
+	if ((pItem = m_pList->selectedItem()) != nullptr) {
 		m_pEdit->setText(pItem->text(m_nSearchCol));
 		processItemSelected(pItem);
 	}
@@ -257,7 +257,7 @@ void SearchList::slotKeyPressed(TQKeyEvent* pKey)
 	}
 
 	// Select the first item if no other item was selected
-	if (pItem == NULL)
+	if (!pItem)
 		pItem = m_pList->firstChild();
 		
 	// Select the new item
diff --git a/src/symbolcompletion.cpp b/src/symbolcompletion.cpp
index 6e1dd30..87802f2 100644
--- a/src/symbolcompletion.cpp
+++ b/src/symbolcompletion.cpp
@@ -44,7 +44,7 @@ SymbolCompletion::SymbolCompletion(SymbolCompletion::Interface* pEditor,
 	TQObject* pParent, const char* szName) :
  	TQObject(pParent, szName),
 	m_pEditor(pEditor),
-	m_pCCObject(NULL)
+	m_pCCObject(nullptr)
 {
 	// Initialise member objects
 	m_pCscope = new CscopeFrontend();
@@ -313,7 +313,7 @@ void SymbolCompletion::slotFilterInsert(KTextEditor::CompletionEntry* pEntry,
 		
 	// Disconnect the CC object signals
 	disconnect(m_pCCObject, 0, this, 0);
-	m_pCCObject = NULL;
+	m_pCCObject = nullptr;
 }
 
 /**
diff --git a/src/symbolcompletion.h b/src/symbolcompletion.h
index baa3831..36839bc 100644
--- a/src/symbolcompletion.h
+++ b/src/symbolcompletion.h
@@ -71,7 +71,7 @@ public:
 		/**
 		 * Returns a target object for displaying the completion list.
 		 * @return	A pointer to an object implementing
-		 *			KTextEditor::CodeCompletionInterface, or NULL if the
+		 *			KTextEditor::CodeCompletionInterface, or nullptr if the
 		 *			implementation does not support this interface.
 		 */
 		virtual TQObject* getCCObject() = 0;
diff --git a/src/treewidget.cpp b/src/treewidget.cpp
index cae5edb..a56e0c1 100644
--- a/src/treewidget.cpp
+++ b/src/treewidget.cpp
@@ -73,7 +73,7 @@ void TreeWidget::setRoot(const TQString& sFunc)
 	TQListViewItem* pRoot;
 	
 	// Remove the current root, if any
-	if ((pRoot = firstChild()) != NULL)
+	if ((pRoot = firstChild()) != nullptr)
 		delete pRoot;
 	
 	// Create a new root item
@@ -88,7 +88,7 @@ void TreeWidget::queryRoot()
 {
 	TQListViewItem* pRoot;
 	
-	if ((pRoot = firstChild()) != NULL)
+	if ((pRoot = firstChild()) != nullptr)
 		slotQueryItem(pRoot);
 }
 
@@ -127,7 +127,7 @@ void TreeWidget::save(FILE* pFile)
 void TreeWidget::saveItems(TQListViewItem* pItem, TQTextStream& str, Encoder& enc)
 {
 	// Iterate over all items in this level
-	for (; pItem != NULL; pItem = pItem->nextSibling()) {
+	for (; pItem; pItem = pItem->nextSibling()) {
 		// Write function parameters
 		str << pItem->text(0) << " [ "
 			<< "kscope_file=\"" << pItem->text(1) << "\", "
@@ -190,7 +190,7 @@ void TreeWidget::slotQueryItem(TQListViewItem* pItem)
 {
 	// Do nothing if the item was already queried
 	// An item has been queried if it has children or marked as non-expandable
-	if (pItem->firstChild() != NULL || !pItem->isExpandable())
+	if (pItem->firstChild() || !pItem->isExpandable())
 		return;
 		
 	// Run the query
@@ -213,13 +213,13 @@ void TreeWidget::slotSearch(TQListViewItem* pParent, const TQRegExp& re,
 	TQListViewItem* pItem;
 	
 	// Get the first child
-	if (pParent != NULL)
+	if (pParent)
 		pItem = pParent->firstChild();
 	else
 		pItem = firstChild();
 	
 	// Iterate over all child items
-	while (pItem != NULL) {
+	while (pItem) {
 		// Filter visible items only
 		if (pItem->isVisible() && re.search(pItem->text(nCol)) == -1)
 			pItem->setVisible(false);
@@ -241,13 +241,13 @@ void TreeWidget::slotShowAll(TQListViewItem* pParent)
 	TQListViewItem* pItem;
 	
 	// Get the first child
-	if (pParent != NULL)
+	if (pParent)
 		pItem = pParent->firstChild();
 	else
 		pItem = firstChild();
 	
 	// Iterate over all child items
-	while (pItem != NULL) {
+	while (pItem) {
 		pItem->setVisible(true);
 		
 		// Show child items recursively
-- 
cgit v1.2.3

