From c7f3faa304bcaaa60aa88081c19c2acaa727f280 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sun, 20 Sep 2026 16:01:57 -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>
---
 kbfxlib/common/kbfxplasmapixmapprovider.cpp       |  2 +-
 kbfxlib/data/kbfxdatastack.cpp                    |  2 +-
 kbfxlib/data/kbfxplasmadataplugin.cpp             |  2 +-
 kbfxlib/data/kbfxplasmapluginloader.cpp           | 10 +++++-----
 kbfxlib/data/kbfxplugin.cpp                       | 12 ++++++------
 plugins/applications/kbfxplasmadataplugin.cpp     |  4 ++--
 plugins/settings/kbfxplasmadatapluginsettings.cpp |  2 +-
 src/kbfxplasmacanvasgroupview.cpp                 |  6 +++---
 src/kbfxplasmacanvasitem.cpp                      |  2 +-
 src/kbfxplasmacanvasstack.cpp                     |  2 +-
 src/kbfxplasmacanvasview.cpp                      | 18 +++++++++---------
 src/kbfxplasmaindexview.cpp                       | 12 ++++++------
 src/kbfxspinxmenu.cpp                             | 10 +++++-----
 13 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/kbfxlib/common/kbfxplasmapixmapprovider.cpp b/kbfxlib/common/kbfxplasmapixmapprovider.cpp
index 0ca0dfd..178dc1f 100644
--- a/kbfxlib/common/kbfxplasmapixmapprovider.cpp
+++ b/kbfxlib/common/kbfxplasmapixmapprovider.cpp
@@ -27,7 +27,7 @@ KbfxPlasmaPixmapProvider::addPixmap ( TQString pixmapname )
 	TQString lFileName = PixmapPath( pixmapname );
 	TQPixmap * lPixmapPtr = 0;
 
-	if ( ( lPixmapPtr = TQPixmapCache::find ( pixmapname ) ) == NULL )
+	if ( ( lPixmapPtr = TQPixmapCache::find ( pixmapname ) ) == nullptr )
 	{
 		lPixmapPtr = new TQPixmap ( lFileName );
 		TQPixmapCache::insert ( pixmapname,lPixmapPtr );
diff --git a/kbfxlib/data/kbfxdatastack.cpp b/kbfxlib/data/kbfxdatastack.cpp
index 9ca6e45..823925a 100644
--- a/kbfxlib/data/kbfxdatastack.cpp
+++ b/kbfxlib/data/kbfxdatastack.cpp
@@ -63,7 +63,7 @@ KbfxDataStack::getStack ( TQString name )
 		return m_stack[name];
 	else
 	{
-		return NULL;
+		return nullptr;
 	}
 }
 
diff --git a/kbfxlib/data/kbfxplasmadataplugin.cpp b/kbfxlib/data/kbfxplasmadataplugin.cpp
index 0a2b04c..b65a24a 100644
--- a/kbfxlib/data/kbfxplasmadataplugin.cpp
+++ b/kbfxlib/data/kbfxplasmadataplugin.cpp
@@ -24,6 +24,6 @@
 KbfxPlasmaCanvasStack * view()
 {
 
-	return NULL;
+	return nullptr;
 
 }
diff --git a/kbfxlib/data/kbfxplasmapluginloader.cpp b/kbfxlib/data/kbfxplasmapluginloader.cpp
index 5a3cc82..531d9b3 100644
--- a/kbfxlib/data/kbfxplasmapluginloader.cpp
+++ b/kbfxlib/data/kbfxplasmapluginloader.cpp
@@ -103,7 +103,7 @@ KbfxPlasmaPluginLoader::getView ( TQString name )
 		pluginMap().remove ( it );
 	}
 	init();
-	KbfxDataStack * stack = pluginMap() [name] ? pluginMap() [name]->data() : NULL;
+	KbfxDataStack * stack = pluginMap() [name] ? pluginMap() [name]->data() : nullptr;
 	
         if (stack == 0 ) {
             return new KbfxDataStack();
@@ -115,14 +115,14 @@ KbfxPlasmaPluginLoader::getView ( TQString name )
 KbfxDataGroup *
 KbfxPlasmaPluginLoader::search ( TQString pname,TQString keyword )
 {
-	if ( pname == NULL )
-		return NULL;
+	if ( pname == nullptr )
+		return nullptr;
 
 	KbfxDataGroup * group = pluginMap() [pname]->search ( keyword );
-	if ( group == NULL )
+	if ( group == nullptr )
 	{
 		kdDebug() << "KbfxPlasmaaPluginLoader:109:Null pointer" << endl;
-		return NULL;
+		return nullptr;
 	}
 
 	return group;
diff --git a/kbfxlib/data/kbfxplugin.cpp b/kbfxlib/data/kbfxplugin.cpp
index 26d8b1a..816b5a9 100644
--- a/kbfxlib/data/kbfxplugin.cpp
+++ b/kbfxlib/data/kbfxplugin.cpp
@@ -71,7 +71,7 @@ KbfxPlugin::data()
 	KbfxPluginView m_hook;
 	TQLibrary * m_plugin = new  TQLibrary ( m_libName );
 
-	if ( m_plugin == NULL )
+	if ( m_plugin == nullptr )
 		return new KbfxDataStack();
 
 	m_hook = ( KbfxPluginView ) m_plugin->resolve ( "view" );
@@ -79,7 +79,7 @@ KbfxPlugin::data()
 	m_plugin->unload();
 	delete m_plugin;
 
-	if ( m_stack != NULL )
+	if ( m_stack != nullptr )
 		return m_stack;
 	else
 		return new KbfxDataStack();
@@ -89,10 +89,10 @@ KbfxDataGroup *
 KbfxPlugin::search ( TQString keyword )
 {
 	if ( keyword == 0 )
-		return NULL;//new KbfxDataGroup();
+		return nullptr;//new KbfxDataGroup();
 
 	if ( keyword.isNull() )
-		return  NULL;//KbfxDataGroup();
+		return  nullptr;//KbfxDataGroup();
 
 
 	typedef KbfxDataGroup * ( *KbfxPluginSearch ) ( TQString key );
@@ -103,12 +103,12 @@ KbfxPlugin::search ( TQString keyword )
 	m_group = m_hook ( keyword );
 	m_plugin->unload();
 	delete m_plugin;
-	if ( m_group != NULL )
+	if ( m_group != nullptr )
 	{
 		// tqDebug("KbfxPlugin():search():103:return Valid Group "+m_group->name());
 		return m_group;
 	}
-	else return NULL;
+	else return nullptr;
 }
 
 
diff --git a/plugins/applications/kbfxplasmadataplugin.cpp b/plugins/applications/kbfxplasmadataplugin.cpp
index dca0b2d..73af688 100644
--- a/plugins/applications/kbfxplasmadataplugin.cpp
+++ b/plugins/applications/kbfxplasmadataplugin.cpp
@@ -96,7 +96,7 @@ view ()
 	KbfxDataStack *gstack = new KbfxDataStack ();
 
 	KServiceGroup::Ptr service = KServiceGroup::group ( "/" );
-	if ( service == NULL)
+	if ( service == nullptr)
 	{
 		int messageBoxUserResReturn = KMessageBox::questionYesNo ( 0,
 				tr2i18n ( "<p align='center'>There is a problem in TDE Menu services!<br>KBFX can try to autorepair this problem.<br>Should KBFX autorepair this problem?</p>" ),
@@ -196,7 +196,7 @@ search ( TQString _keyword )
 
 	for ( ; s != offers.end (); ++s )
 	{
-		if ( s == NULL )
+		if ( s == nullptr )
 			continue;
 		if ( (*s)->noDisplay () )
 			continue;
diff --git a/plugins/settings/kbfxplasmadatapluginsettings.cpp b/plugins/settings/kbfxplasmadatapluginsettings.cpp
index aeda5c0..6cf6d40 100644
--- a/plugins/settings/kbfxplasmadatapluginsettings.cpp
+++ b/plugins/settings/kbfxplasmadatapluginsettings.cpp
@@ -97,7 +97,7 @@ view ()
 	KbfxDataStack *gstack = new KbfxDataStack ();
 
 	KServiceGroup::Ptr service = KServiceGroup::baseGroup ( "settings" );//KServiceGroup::group ("/");
-	if ( service == NULL)
+	if ( service == nullptr)
 	{
 		int messageBoxUserResReturn = KMessageBox::questionYesNo ( 0,
 				tr2i18n ( "<p align='center'>There is a problem in TDE Menu services!<br>KBFX can try to autorepair this problem.<br>Should KBFX autorepair this problem?</p>" ),
diff --git a/src/kbfxplasmacanvasgroupview.cpp b/src/kbfxplasmacanvasgroupview.cpp
index 5a3604b..b566510 100644
--- a/src/kbfxplasmacanvasgroupview.cpp
+++ b/src/kbfxplasmacanvasgroupview.cpp
@@ -46,7 +46,7 @@ KbfxPlasmaCanvasGroupView::~KbfxPlasmaCanvasGroupView ()
 void
 KbfxPlasmaCanvasGroupView::addGroup ( KbfxPlasmaCanvasGroup * gPtr )
 {
-	if ( gPtr == NULL )
+	if ( gPtr == nullptr )
 	{
 		tqDebug
 		( "KbfxPlasmaCanvasGroupView.cpp:39:Null Pointer Passed to addGroup()" );
@@ -162,7 +162,7 @@ KbfxPlasmaCanvasGroupView::foldGroup ( uint e_id )
 
 	KbfxPlasmaCanvasGroup *_it;
 	KbfxPlasmaCanvasGroup *_et = m_groupChain.at ( e_id );
-	if ( _et == NULL )
+	if ( _et == nullptr )
 		return;
 
 	int _height = _et->height ();
@@ -188,7 +188,7 @@ KbfxPlasmaCanvasGroupView::unFoldGroup ( uint e_id )
 {
 	KbfxPlasmaCanvasGroup *_it;
 	KbfxPlasmaCanvasGroup *_et = m_groupChain.at ( e_id );
-	if ( _et == NULL )
+	if ( _et == nullptr )
 	{
 		tqDebug ( "OOps no such groups can't unfold" );
 		return;
diff --git a/src/kbfxplasmacanvasitem.cpp b/src/kbfxplasmacanvasitem.cpp
index 671f84a..ae41db1 100644
--- a/src/kbfxplasmacanvasitem.cpp
+++ b/src/kbfxplasmacanvasitem.cpp
@@ -209,7 +209,7 @@ void
 KbfxPlasmaCanvasItem::drawBackDrop ( TQPainter * pe,TQRect & r )
 {
 	r = r ;
-	if ( pe == NULL )
+	if ( pe == nullptr )
 		return ;
 }
 
diff --git a/src/kbfxplasmacanvasstack.cpp b/src/kbfxplasmacanvasstack.cpp
index 8278939..27d9642 100644
--- a/src/kbfxplasmacanvasstack.cpp
+++ b/src/kbfxplasmacanvasstack.cpp
@@ -95,7 +95,7 @@ KbfxPlasmaCanvasStack::contains ( TQString name )
 void
 KbfxPlasmaCanvasStack::addGroup ( KbfxPlasmaCanvasGroupView * gPtr )
 {
-	if ( gPtr == NULL )
+	if ( gPtr == nullptr )
 	{
 		tqDebug
 		( "KbfxPlasmaCanvasStack.cpp:34:Null Pointer Passed to addGroup()" );
diff --git a/src/kbfxplasmacanvasview.cpp b/src/kbfxplasmacanvasview.cpp
index c79faaa..cb3367c 100644
--- a/src/kbfxplasmacanvasview.cpp
+++ b/src/kbfxplasmacanvasview.cpp
@@ -144,7 +144,7 @@ void
 KbfxPlasmaCanvasView::mouseMoveEvent ( TQMouseEvent * me )
 {
 	TQPoint p = inverseWorldMatrix ().map ( viewportToContents ( me->pos () ) );
-	if ( canvas () == NULL )
+	if ( canvas () == nullptr )
 		return;
 
 //	KbfxPlasmaCanvasGroup *tmp = 0;
@@ -157,7 +157,7 @@ KbfxPlasmaCanvasView::mouseMoveEvent ( TQMouseEvent * me )
 		{
 			KbfxPlasmaCanvasItem *t = ( KbfxPlasmaCanvasItem * ) ( *it );
 			t->mouseMoveEvent ( me );
-			if ( m_currentItem != NULL )
+			if ( m_currentItem != nullptr )
 			{
 				m_currentItem->setCurrent ( false );
 			}
@@ -171,7 +171,7 @@ KbfxPlasmaCanvasView::mouseMoveEvent ( TQMouseEvent * me )
 void
 KbfxPlasmaCanvasView::contentsMouseMoveEvent ( TQMouseEvent * me )
 {
-	if ( canvas () == NULL )
+	if ( canvas () == nullptr )
 		return;
 
 	if ( me->state () & TQt::LeftButton )
@@ -195,7 +195,7 @@ KbfxPlasmaCanvasView::contentsMouseMoveEvent ( TQMouseEvent * me )
 		{
 			KbfxPlasmaCanvasItem *t = ( KbfxPlasmaCanvasItem * ) ( *it );
 			t->mouseMoveEvent ( me );
-			if ( m_currentItem != NULL )
+			if ( m_currentItem != nullptr )
 			{
 				m_currentItem->setCurrent ( false );
 			}
@@ -326,7 +326,7 @@ KbfxPlasmaCanvasView::setKbfxCanvas ( TQCanvas * cnv )
 	setCanvas ( m_default );
   //    canvas ()->setBackgroundPixmap ( ( *KbfxPlasmaPixmapProvider::pixmap ( "appviewbg" )) );
 	TQPixmap * pixmap = KbfxPlasmaPixmapProvider::pixmap ( "middleboxbg" );
-	if ( pixmap != NULL )
+	if ( pixmap != nullptr )
 	{
 		TQImage img = pixmap->convertToImage();
 		img = img.smoothScale ( this->width(),pixmap->height(),TQImage::ScaleFree );
@@ -460,7 +460,7 @@ KbfxPlasmaCanvasView::search_R ( const TQString name )
 	this->setCanvas ( m_search );
 
 	TQPixmap * pixmap = KbfxPlasmaPixmapProvider::pixmap ( "middleboxbg" );
-	if ( pixmap != NULL )
+	if ( pixmap != nullptr )
 	{
 		TQImage img = pixmap->convertToImage();
 		img = img.smoothScale ( this->width(),pixmap->height(),TQImage::ScaleFree );
@@ -475,7 +475,7 @@ KbfxPlasmaCanvasView::search_R ( const TQString name )
 
 	for ( sit = m_dataStack.begin (); sit != m_dataStack.end (); ++sit )
 	{
-		if ( sit == NULL )
+		if ( sit == nullptr )
 			continue;
 
 		visualGroup = new KbfxPlasmaCanvasGroup ();
@@ -487,10 +487,10 @@ KbfxPlasmaCanvasView::search_R ( const TQString name )
 		    ( KbfxPlasmaCanvasItem * ) boxwrapper->
 		    item ( KbfxPlasmaCanvasItem::SEPARATOR );
 
-		if ( appGroup != NULL )
+		if ( appGroup != nullptr )
 			box->setLabelText ( "Hits for " + sit.key () );
 
-		if ( appGroup == NULL )
+		if ( appGroup == nullptr )
 		{
 			tqDebug ( "Null Search Group" );
 			continue;
diff --git a/src/kbfxplasmaindexview.cpp b/src/kbfxplasmaindexview.cpp
index 12b2fea..e940c8e 100644
--- a/src/kbfxplasmaindexview.cpp
+++ b/src/kbfxplasmaindexview.cpp
@@ -97,7 +97,7 @@ KbfxPlasmaIndexView::checkMousePos ()
 void
 KbfxPlasmaIndexView::setView ( KbfxPlasmaCanvasView * view )
 {
-	if ( view == NULL )
+	if ( view == nullptr )
 		return;
 	m_currentView = view;
 }
@@ -188,7 +188,7 @@ KbfxPlasmaIndexView::contentsContextMenuEvent ( TQContextMenuEvent * event )
 void
 KbfxPlasmaIndexView::loadList ( KbfxDataStack * stkPtr )
 {
-	if ( stkPtr == NULL )
+	if ( stkPtr == nullptr )
 	{
 		kdDebug() << "Loading Stack Failed:KbfxListBox->loadList()" << endl;
 		return;
@@ -276,7 +276,7 @@ KbfxPlasmaIndexView::loadPlugin ( TQString name, KbfxPlasmaCanvasView * view )
 		KbfxPlasmaPluginLoader *m_loader = new KbfxPlasmaPluginLoader ();
 		KbfxDataStack *m_stack_R = m_loader->getView ( name );
 
-		if ( m_stack_R == NULL )
+		if ( m_stack_R == nullptr )
 			return;
 
 		if ( m_currentView != 0 )
@@ -308,7 +308,7 @@ KbfxPlasmaIndexView::mouseMoveEvent ( TQMouseEvent * me )
 void
 KbfxPlasmaIndexView::contentsMouseMoveEvent ( TQMouseEvent * me )
 {
-	if ( canvas () == NULL )
+	if ( canvas () == nullptr )
 		return;
 
 	m_currentPos = me->pos ();
@@ -345,7 +345,7 @@ KbfxPlasmaIndexView::contentsMouseMoveEvent ( TQMouseEvent * me )
 		{
 			KbfxPlasmaIndexItem *t = ( KbfxPlasmaIndexItem * ) ( *it );
 			t->mouseMoveEvent ( me );
-			if ( m_currentItem != NULL )
+			if ( m_currentItem != nullptr )
 			{
 				if ( !m_currentItem->isSelected () )
 					m_currentItem->setCurrent ( false );
@@ -402,7 +402,7 @@ KbfxPlasmaIndexView::contentsMousePressEvent ( TQMouseEvent * me )
 void
 KbfxPlasmaIndexView::slotClicked ( KbfxPlasmaIndexItem * it )
 {
-	if ( it == NULL )
+	if ( it == nullptr )
 		return;
 
 	KbfxPlasmaIndexItem *_it = ( KbfxPlasmaIndexItem * ) it;
diff --git a/src/kbfxspinxmenu.cpp b/src/kbfxspinxmenu.cpp
index c2a7f8c..437acd7 100644
--- a/src/kbfxspinxmenu.cpp
+++ b/src/kbfxspinxmenu.cpp
@@ -275,13 +275,13 @@ KbfxSpinxMenuWidget::loadHistory ()
 	for ( it = ConfigInit ().m_pluginsLeft.begin ();
 	        it != ConfigInit ().m_pluginsLeft.end (); ++it )
 	{
-            if ( (*it) != NULL)
+            if ( (*it) != nullptr)
 		this->loadPluginLeft ( ( *it ) );
 	}
 	for ( it = ConfigInit ().m_pluginsRight.begin ();
 	        it != ConfigInit ().m_pluginsRight.end (); ++it )
 	{
-            if ( (*it) != NULL)
+            if ( (*it) != nullptr)
 		this->loadPluginRight ( ( *it ) );
 	}
 }
@@ -317,7 +317,7 @@ KbfxSpinxMenuWidget::mouseMoveEvent (TQMouseEvent * me)
 void
 KbfxSpinxMenuWidget::loadPluginLeft ( TQString name )
 {
-    if (name == NULL) {
+    if (name == nullptr) {
             return;
     }
 	if ( m_loadedListLeft.contains ( name ) <= 0 )
@@ -325,7 +325,7 @@ KbfxSpinxMenuWidget::loadPluginLeft ( TQString name )
 		m_loader = new KbfxPlasmaPluginLoader ();
 		m_stack_R = m_loader->getView ( name );
 
-		if ( m_stack_R == NULL )
+		if ( m_stack_R == nullptr )
 			return;
 
 		m_canvasView->addStack ( m_stack_R, name );
@@ -349,7 +349,7 @@ if ( m_loadedListRight.contains ( name ) <= 0 )
 		m_loader = new KbfxPlasmaPluginLoader ();
 		m_stack_R = m_loader->getView ( name );
 
-		if ( m_stack_R == NULL )
+		if ( m_stack_R == nullptr )
 			return;
 
 		m_canvasView->addStack ( m_stack_R, name );
-- 
cgit v1.2.3

