From 40742ae859ddbfc3ead1237ef741a9ee8b14fdcf Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Tue, 22 Sep 2026 22:36:19 -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>
---
 knights/board_2d.cpp             | 10 +++---
 knights/challenge_graph.cpp      |  2 +-
 knights/challenge_graph_view.cpp |  2 +-
 knights/core.cpp                 | 68 ++++++++++++++++++++--------------------
 knights/dlg_login.h              |  2 +-
 knights/io_base.h                |  2 +-
 knights/io_engine.cpp            | 10 +++---
 knights/io_engine.h              |  2 +-
 knights/io_internet.cpp          | 32 +++++++++----------
 knights/io_internet.h            |  2 +-
 knights/knights.cpp              |  8 ++---
 knights/logic.cpp                |  2 +-
 knights/match.cpp                |  2 +-
 knights/pgn.cpp                  | 12 +++----
 knights/pgn.h                    |  2 +-
 knights/resource.cpp             |  4 +--
 knights/setpageengines.cpp       |  4 +--
 knights/setpageservers.cpp       |  2 +-
 knights/tab_pgnview.cpp          |  4 +--
 knights/tab_seeklist.cpp         |  2 +-
 knights/tabbox.cpp               |  2 +-
 knights/tabmanager.cpp           | 10 +++---
 knights/tabpage.cpp              |  6 ++--
 knights/thinbuttons.cpp          |  4 +--
 24 files changed, 98 insertions(+), 98 deletions(-)

diff --git a/knights/board_2d.cpp b/knights/board_2d.cpp
index de3ff4c..7b10d20 100644
--- a/knights/board_2d.cpp
+++ b/knights/board_2d.cpp
@@ -32,7 +32,7 @@ board_2d::board_2d(TQWidget *parent, const char *name, resource *Rsrc, logic *Lg
 	init = true;
 	premoveFrom = Null;
 	premoveTo = Null;
-	DragSprite = NULL;
+	DragSprite = nullptr;
 	lastMoveWasDrag = false;
 	cache = myResource->pixCache;
 	int size = 8 + ( 1 * ( myResource->ThemeBorder == true ) );
@@ -493,7 +493,7 @@ void board_2d::mouseReleaseEvent( TQMouseEvent *event )
 {
 	event->accept();
 
-	if( DragSprite != NULL )
+	if( DragSprite != nullptr )
 	{
 		/* Destroy any sprites being dragged */
 		int tmp = DragSprite->POSITION_Origin;
@@ -501,7 +501,7 @@ void board_2d::mouseReleaseEvent( TQMouseEvent *event )
 						&DragSprite->PIXMAP_FlipFrame,
 						DragSprite->PIXMAP_FlipFrame.rect() );
 		sprites.removeRef( DragSprite );
-		DragSprite = NULL;
+		DragSprite = nullptr;
 		drawPosition( tmp );
 		commit();
 		lastMoveWasDrag = true;
@@ -534,7 +534,7 @@ void board_2d::mousePressEvent( TQMouseEvent *event )
 void board_2d::mouseMoveEvent( TQMouseEvent *event )
 {
 	event->accept();
-	if( DragSprite == NULL )
+	if( DragSprite == nullptr )
 	{
 		if( event->state() & TQt::LeftButton )
 		{
@@ -551,7 +551,7 @@ void board_2d::mouseMoveEvent( TQMouseEvent *event )
 				{
 					/* The selection didn't take.. back out. */
 					sprites.removeRef( DragSprite );
-					DragSprite = NULL;
+					DragSprite = nullptr;
 					drawPosition( position( pressPoint ) );
 					commit();
 					return;
diff --git a/knights/challenge_graph.cpp b/knights/challenge_graph.cpp
index d00fc37..f610818 100644
--- a/knights/challenge_graph.cpp
+++ b/knights/challenge_graph.cpp
@@ -415,7 +415,7 @@ void Challenge_Graph::addSoughtItem( const TQString &src )
 void Challenge_Graph::display_menuSeek( Challenge_Game *Item, const TQPoint &Pos )
 {
 	bool enable;
-	if( Item != NULL )
+	if( Item != nullptr )
 	{
 		selectedPlayerName = Item->_player.replace( TQRegExp("\\(.+\\)"), TQString("") );
 		selectedMatchID = Item->id();
diff --git a/knights/challenge_graph_view.cpp b/knights/challenge_graph_view.cpp
index b28b3f3..131b75f 100644
--- a/knights/challenge_graph_view.cpp
+++ b/knights/challenge_graph_view.cpp
@@ -67,7 +67,7 @@ void Challenge_Graph_View::contentsMousePressEvent(TQMouseEvent* e)
 		return;
 	}
 	if( e->button() == TQt::RightButton )
-		emit rightClick( NULL, e->globalPos() ); // We need to catch all right clicks
+		emit rightClick( nullptr, e->globalPos() ); // We need to catch all right clicks
 }
 ///////////////////////////////////////
 //
diff --git a/knights/core.cpp b/knights/core.cpp
index 56e3d05..21c2db9 100644
--- a/knights/core.cpp
+++ b/knights/core.cpp
@@ -42,8 +42,8 @@
 core::core(TQWidget *parent, const char *name, resource *Rsrc ) : TQWidget(parent,name)
 {
   myResource = Rsrc;
-  listPGN = NULL;
-	currentMatch = NULL;
+  listPGN = nullptr;
+	currentMatch = nullptr;
 
   myButtonGroup = new thinbuttons( this, "ButtonGroup", myResource );
   myButtonGroup->show();
@@ -72,8 +72,8 @@ core::~core()
 ///////////////////////////////////////
 void core::createNewIO( int type, int ID, int side, int str )
 {
-	io_internet *internetioPtr = NULL;
-	io_engine *engineioPtr = NULL;
+	io_internet *internetioPtr = nullptr;
+	io_engine *engineioPtr = nullptr;
 //	io_email *ioEmailPtr = NULL;
   switch( type )
   {
@@ -91,7 +91,7 @@ void core::createNewIO( int type, int ID, int side, int str )
         {
           /* Use an existing internetIO */
           internetioPtr = (io_internet*) myIOMap.find(Null);
-          if( internetioPtr == NULL )
+          if( internetioPtr == nullptr )
           {
             kdWarning() << "core::createNewIO: Trying to connect a match to an internetIO that doesn't exsist." << endl;
           }
@@ -115,12 +115,12 @@ void core::createNewIO( int type, int ID, int side, int str )
         else
         {
           internetioPtr = (io_internet*)  myIOMap.find(ID);
-          if( internetioPtr == NULL )
+          if( internetioPtr == nullptr )
           {
             /* no io mapped to the ID yet, use the internetio */
             /* Use an existing internetIO */
             internetioPtr = (io_internet*) myIOMap.find(Null);
-            if( internetioPtr == NULL )
+            if( internetioPtr == nullptr )
             {
               kdWarning() << "core::createNewIO: Trying to connect a match to an internetIO that doesn't exsist." << endl;
             }
@@ -161,7 +161,7 @@ void core::createNewIO( int type, int ID, int side, int str )
 ///////////////////////////////////////
 match* core::newMatch( match_param* param )
 {
-  match *match_ptr = NULL;
+  match *match_ptr = nullptr;
   int newID;
 
   /* create a new ID for the match */
@@ -203,7 +203,7 @@ void core::setMatch( int ID )
   /*
     Disconnect the current match from the display
   */
-  if( currentMatch != NULL )
+  if( currentMatch != nullptr )
   {
     currentMatch->setCurrent( false );
     disconnect( currentMatch, TQ_SIGNAL( setClocks() ), this, TQ_SLOT( slot_setClocks() ) );
@@ -255,7 +255,7 @@ bool core::clearMatch( int id )
 
 	if( id == Null )
 	{
-		if( currentMatch != NULL )
+		if( currentMatch != nullptr )
 		{
 			id = currentMatch->getID();
 		}
@@ -267,7 +267,7 @@ bool core::clearMatch( int id )
 	departingMatch = myMatchMap.find(id);
 
 	/* A bad ID was passed */
-	if( departingMatch == NULL )
+	if( departingMatch == nullptr )
 	{
 		kdError() << "core::clearMatch: Bad matchID " << id << " could not be cleared." << endl;
 		return false;
@@ -287,26 +287,26 @@ bool core::clearMatch( int id )
 	{
 		/* Find another match in the map */
 		nextMatch = --myMatchMap;
-		if( nextMatch == NULL )
+		if( nextMatch == nullptr )
 		{
 			++myMatchMap;
 			nextMatch = ++myMatchMap;
 		}
 		/* Set the new current match */
-		if( nextMatch != NULL )
+		if( nextMatch != nullptr )
 		{
 			setMatch( nextMatch->getID() );
 		}
 		else
 		{
-			currentMatch = NULL;
+			currentMatch = nullptr;
 			emit initMatch();
 		}
 	}
 
 	/* Remove IOs in this match... */
 	ioPtr = myIOMap.find(id);
-	while( ioPtr != NULL )
+	while( ioPtr != nullptr )
 	{
 		myIOMap.remove( id );
 		if( ioPtr->getType() != io_base::INTERNET )
@@ -333,7 +333,7 @@ void core::resize( void )
 {
 	int size = 8 + ( 1 * ( myResource->ThemeBorder == true ) );
 
-	if( currentMatch != NULL )
+	if( currentMatch != nullptr )
 	{
 		currentMatch->resize();
 		myButtonGroup->resize( currentMatch->width() );
@@ -358,7 +358,7 @@ void core::command2IO( const Command &command )
   int id = ((Command)command).getID();
 
   io = myIOMap.find(id);
-  while( io != NULL )
+  while( io != nullptr )
   {
     io->recvCMD(command);
     io = myIOMap.findNext();
@@ -376,7 +376,7 @@ void core::command2Match( const Command &command )
 	Command cmd = command;
 
 	matchPtr = myMatchMap.find( cmd.getID() );
-  while( matchPtr != NULL )
+  while( matchPtr != nullptr )
 	{
 		/* Catch Commands Meant for Core */
 		switch( cmd.getCommand() )
@@ -429,7 +429,7 @@ void core::command2Match( const Command &command )
 ///////////////////////////////////////
 bool core::flag( const bool Army )
 {
-	if( currentMatch == NULL ) return false;
+	if( currentMatch == nullptr ) return false;
 	return currentMatch->flag( Army );
 	return false;
 }
@@ -440,7 +440,7 @@ bool core::flag( const bool Army )
 ///////////////////////////////////////
 TQString core::clock( const bool Army )
 {
-	if( currentMatch == NULL ) return TQString();
+	if( currentMatch == nullptr ) return TQString();
 	return currentMatch->clock( Army );
 	return "";
 }
@@ -451,7 +451,7 @@ TQString core::clock( const bool Army )
 ///////////////////////////////////////
 bool core::modified( void )
 {
-	if( currentMatch == NULL ) return false;
+	if( currentMatch == nullptr ) return false;
 	return currentMatch->modified();
 	return false;
 }
@@ -462,7 +462,7 @@ bool core::modified( void )
 ///////////////////////////////////////
 bool core::paused( void )
 {
-	if( currentMatch == NULL ) return false;
+	if( currentMatch == nullptr ) return false;
 	return currentMatch->paused();
 	return false;
 }
@@ -491,7 +491,7 @@ bool core::isOnline( void )
 ///////////////////////////////////////
 char core::onMove( void )
 {
-	if( currentMatch == NULL ) return Null;
+	if( currentMatch == nullptr ) return Null;
 	return currentMatch->onMove();
 }
 ///////////////////////////////////////
@@ -502,9 +502,9 @@ char core::onMove( void )
 TQString core::caption( void )
 {
 	TQButton *Button;
-	if( currentMatch == NULL ) return TQString();
+	if( currentMatch == nullptr ) return TQString();
 	Button = myButtonGroup->find( currentMatch->getID() );
-	if( Button != NULL ) Button->setText( currentMatch->caption() );
+	if( Button != nullptr ) Button->setText( currentMatch->caption() );
 	return currentMatch->caption();
 }
 ///////////////////////////////////////
@@ -514,7 +514,7 @@ TQString core::caption( void )
 ///////////////////////////////////////
 char core::whiteInput(void)
 {
-	if( currentMatch == NULL ) return Null;
+	if( currentMatch == nullptr ) return Null;
 	return currentMatch->input(WHITE);
 }
 ///////////////////////////////////////
@@ -524,7 +524,7 @@ char core::whiteInput(void)
 ///////////////////////////////////////
 char core::blackInput(void)
 {
-	if( currentMatch == NULL ) return Null;
+	if( currentMatch == nullptr ) return Null;
 	return currentMatch->input(BLACK);
 }
 ///////////////////////////////////////
@@ -534,7 +534,7 @@ char core::blackInput(void)
 ///////////////////////////////////////
 void core::review( int Index )
 {
-	if( currentMatch == NULL ) return;
+	if( currentMatch == nullptr ) return;
 	currentMatch->review( Index );
 }
 ///////////////////////////////////////
@@ -544,7 +544,7 @@ void core::review( int Index )
 ///////////////////////////////////////
 char core::inputOnMove( bool reverse )
 {
-	if( currentMatch == NULL ) return Null;
+	if( currentMatch == nullptr ) return Null;
 	return currentMatch->inputOnMove( reverse );
 }
 ///////////////////////////////////////
@@ -554,7 +554,7 @@ char core::inputOnMove( bool reverse )
 ///////////////////////////////////////
 TQStringList* core::notation( void )
 {
-	if( currentMatch == NULL ) return NULL;
+	if( currentMatch == nullptr ) return nullptr;
 	return currentMatch->notation();
 }
 ///////////////////////////////////////
@@ -601,7 +601,7 @@ void core::print( int ID )
 	{
 		m2p = myMatchMap.find( ID );
 	}
-	if( m2p == NULL ) return;
+	if( m2p == nullptr ) return;
 	m2p->print();
 	return;
 }
@@ -652,7 +652,7 @@ bool core::save( const int ID, const bool Prompt, const bool SaveAs )
 	{
 		match2bSaved = myMatchMap.find( ID );
 	}
-	if( match2bSaved == NULL ) return false;
+	if( match2bSaved == nullptr ) return false;
 	if( Prompt )
 	{
 		/* Prompt for the save */
@@ -864,7 +864,7 @@ void core::resetServer( void )
 void core::goOffline(void)
 {
   unsigned int index(0);
-	io_base *ioPtr(NULL);
+	io_base *ioPtr(nullptr);
 
 	while( index < myIOMap.count() )
 	{
@@ -886,7 +886,7 @@ void core::goOffline(void)
 		}
 		index++;
 	}
-	if( ioPtr != NULL )
+	if( ioPtr != nullptr )
 		delete ioPtr;
 }
 
diff --git a/knights/dlg_login.h b/knights/dlg_login.h
index f8d203f..cea7f45 100644
--- a/knights/dlg_login.h
+++ b/knights/dlg_login.h
@@ -41,7 +41,7 @@ class dlg_login : public KDialogBase
   
 
   public:
-                          dlg_login(TQWidget *parent, const char *name=0, resource *rsrc = NULL);
+                          dlg_login(TQWidget *parent, const char *name=0, resource *rsrc = nullptr);
                           ~dlg_login();
 		void									disableServerSelect();
 
diff --git a/knights/io_base.h b/knights/io_base.h
index a16d150..cd4ba5b 100644
--- a/knights/io_base.h
+++ b/knights/io_base.h
@@ -43,7 +43,7 @@ public:
     LOCAL = 1
   };
 
-  io_base(TQWidget *parent=NULL, resource *rsrc=NULL);
+  io_base(TQWidget *parent=nullptr, resource *rsrc=nullptr);
   io_base(resource *rsrc);
   io_base(resource *rsrc, int ID);
   virtual               ~io_base();
diff --git a/knights/io_engine.cpp b/knights/io_engine.cpp
index 19c0a0f..6c91afb 100644
--- a/knights/io_engine.cpp
+++ b/knights/io_engine.cpp
@@ -34,9 +34,9 @@
 io_engine::io_engine( TQWidget *parent, resource *Rsrc ) : io_base( parent, Rsrc )
 {
 	myType							= io_base::LOCAL;
-	engine							= NULL;
-	Log									= NULL;
-	proto								= NULL;
+	engine							= nullptr;
+	Log									= nullptr;
+	proto								= nullptr;
 	SafeToSend					= true;
 	CleanBuffer					= true;
 	SendSIGINT					= false;
@@ -75,7 +75,7 @@ void io_engine::Start( const int side )
 	bool Army;
 
 	/* Stop accidents */
-	if( engine != NULL )
+	if( engine != nullptr )
 		return;
 	engine = new TDEProcess();
 
@@ -183,7 +183,7 @@ void io_engine::Start( const int side )
 void io_engine::Kill( void )
 {
 	proto->parse( Command( myID, CMD_Exit ) );
-	if( engine != NULL )
+	if( engine != nullptr )
 		delete engine;
 }
 ///////////////////////////////////////
diff --git a/knights/io_engine.h b/knights/io_engine.h
index 101a4af..d634eb9 100644
--- a/knights/io_engine.h
+++ b/knights/io_engine.h
@@ -36,7 +36,7 @@ class io_engine : public io_base
   TQ_OBJECT
   
 	public:
-													io_engine( TQWidget *parent=NULL, resource *Rsrc=0 );
+													io_engine( TQWidget *parent=nullptr, resource *Rsrc=0 );
 													~io_engine();
 
 		void									Start( const int side );
diff --git a/knights/io_internet.cpp b/knights/io_internet.cpp
index d333b0f..86849ad 100644
--- a/knights/io_internet.cpp
+++ b/knights/io_internet.cpp
@@ -48,12 +48,12 @@ static const int TXT_Not = 5;
 io_internet::io_internet( TQWidget *parent, resource *rsrc )
 {
   myResource = rsrc;
-  challenge = NULL;
-  myTimeseal = NULL;
-  socket = NULL;
+  challenge = nullptr;
+  myTimeseal = nullptr;
+  socket = nullptr;
   loginStage = LOGIN_STAGE_NAME;
   lineBuffer = "";
-  Log = NULL;
+  Log = nullptr;
 
   /* set type */
   this->myType = io_base::INTERNET;
@@ -78,7 +78,7 @@ io_internet::~io_internet()
   TabMap::Iterator i;
 
   /* Close and remove socket */
-  if( socket != NULL )
+  if( socket != nullptr )
   {
     if(socket->socket() != -1)
     {
@@ -91,10 +91,10 @@ io_internet::~io_internet()
   {
     Log->close();
     delete Log;
-    Log = NULL;
+    Log = nullptr;
   }
   /* Remove Timeseal */
-  if( myTimeseal != NULL )
+  if( myTimeseal != nullptr )
   {
     myTimeseal->kill();
     delete myTimeseal;
@@ -119,7 +119,7 @@ void io_internet::connectToServer()
 
   tqApp->mainWidget()->setCursor( myResource->CURSOR_Thinking );
   /* Get and parse server config from resource */
-  myServer = NULL;
+  myServer = nullptr;
   for( i = myResource->servers.begin(); i != myResource->servers.end(); i++ )
   {
     if( (*i).CurrentRef )
@@ -127,7 +127,7 @@ void io_internet::connectToServer()
       myServer = &(*i);
     }
   }
-  if(myServer == NULL)
+  if(myServer == nullptr)
   {
     /* No server configured. Notify User and die gracefully */
     tqApp->mainWidget()->setCursor( myResource->CURSOR_Standard );
@@ -354,7 +354,7 @@ void io_internet::send(const TQString& msg)
       ( tmp == "decline" ) ||
       ( tmp.left(6) == "match " ) )
   {
-    if( challenge != NULL )
+    if( challenge != nullptr )
     {
       delete challenge;
       nullifyChallenge();
@@ -535,7 +535,7 @@ void io_internet::parseLine( TQString line )
       else if( line.contains(TQRegExp("^\\s*Challenge: ")))
       {
         myResource->play( SND_CHALLENGE );
-        if( challenge != NULL )
+        if( challenge != nullptr )
         {
           delete challenge;
         }
@@ -549,7 +549,7 @@ void io_internet::parseLine( TQString line )
       }
       else if( ( line.left(15) == "Challenge from " ) && ( line.right(9) == " removed." ) )
       {
-        if( challenge != NULL )
+        if( challenge != nullptr )
         {
           delete challenge;
         }
@@ -745,7 +745,7 @@ void io_internet::parseStyle12(TQString line, const unsigned int Mode)
   struct ChessMove move;
   TQStringList fields;
   TQString position_line = "";
-  match_param *param = NULL;
+  match_param *param = nullptr;
   Command::clearMove(&move);
   switch(Mode)
   {
@@ -925,7 +925,7 @@ void io_internet::parseStyle12(TQString line, const unsigned int Mode)
 ///////////////////////////////////////
 void io_internet::nullifyChallenge( void )
 {
-	challenge = NULL;
+	challenge = nullptr;
 }
 
 ///////////////////////////////////////
@@ -937,7 +937,7 @@ void io_internet::declineChallenge( void )
 {
 	send( "decline" );
 	delete challenge;
-	challenge = NULL;
+	challenge = nullptr;
 }
 ///////////////////////////////////////
 //
@@ -948,7 +948,7 @@ void io_internet::acceptChallenge( void )
 {
   send( challenge->values() );
   delete challenge;
-  challenge = NULL;
+  challenge = nullptr;
 }
 
 ///////////////////////////////////////
diff --git a/knights/io_internet.h b/knights/io_internet.h
index 1f15fba..c7e1e2f 100644
--- a/knights/io_internet.h
+++ b/knights/io_internet.h
@@ -75,7 +75,7 @@ class io_internet : public io_base
   TQ_OBJECT
   
   public:
-                              io_internet(TQWidget *parent = NULL, resource *Rsrc = NULL);
+                              io_internet(TQWidget *parent = nullptr, resource *Rsrc = nullptr);
                               ~io_internet();
 
   public slots:
diff --git a/knights/knights.cpp b/knights/knights.cpp
index 1279e15..de23c93 100644
--- a/knights/knights.cpp
+++ b/knights/knights.cpp
@@ -46,7 +46,7 @@ Knights::Knights(TDECmdLineArgs *Args, TQWidget *parent, const char *name) : TDE
 	ResizeFlag = true;
 	Minimized = false;
 	args = Args;
-	SplashScreen = NULL;
+	SplashScreen = nullptr;
 	setFocusPolicy( TQWidget::ClickFocus );
 }
 
@@ -62,7 +62,7 @@ Knights::~Knights()
 ///////////////////////////////////////
 void Knights::BirthAll(void)
 {
-	SettingsDialog	= NULL;
+	SettingsDialog	= nullptr;
 	Resource				= new resource(args);
 
 	if( Resource->OPTION_Show_Splash )
@@ -207,7 +207,7 @@ bool Knights::init( void )
 	setStatusBar( READY );
 
 	/* Remove the Splash Screen */
-	if( SplashScreen != NULL )
+	if( SplashScreen != nullptr )
 	{
 		delete SplashScreen;
 	}
@@ -728,7 +728,7 @@ void Knights::setNotation( void )
 			of notation data. Therefore, we'll enable & disable those here
 			since we've gathered the notation data anyway.
 	*/
-	if( list == NULL )
+	if( list == nullptr )
 	{
 		/* Disable Save & Print Functions */
 		fileMenu->setItemEnabled( MENU_SAVE, false );
diff --git a/knights/logic.cpp b/knights/logic.cpp
index e0e374d..0d2bdd2 100644
--- a/knights/logic.cpp
+++ b/knights/logic.cpp
@@ -189,7 +189,7 @@ void logic::Init_Standard( void )
 ///////////////////////////////////////
 bool logic::parseCAN( const bool Army )
 {
-	if( chessMove.CAN == NULL ) return false;
+	if( chessMove.CAN == nullptr ) return false;
  	if( ( chessMove.CAN[0] != 'o' ) && ( chessMove.CAN[0] != 'O' ) )
  	{
 		if( ( chessMove.CAN[0] < 'a' ) || ( chessMove.CAN[0] > 'h' ) ) return false;
diff --git a/knights/match.cpp b/knights/match.cpp
index f8c873f..36ec214 100644
--- a/knights/match.cpp
+++ b/knights/match.cpp
@@ -78,7 +78,7 @@ match::match( TQWidget *parent, match_param *param, resource *Rsrc ) : TQWidget(
 match::~match()
 {
 	delete Clock;
-	if( Board != NULL ) delete Board;
+	if( Board != nullptr ) delete Board;
 	delete Record;
 	delete Logic;
 }
diff --git a/knights/pgn.cpp b/knights/pgn.cpp
index 3727408..38793c3 100644
--- a/knights/pgn.cpp
+++ b/knights/pgn.cpp
@@ -30,9 +30,9 @@ pgn::pgn( resource *Rsrc, match_param *param )
 {
 	Resource = Rsrc;
 	Param = param;
-	pgnView = NULL;
+	pgnView = nullptr;
 
-	if( Param != NULL )
+	if( Param != nullptr )
 	{
 		connect( Param, TQ_SIGNAL( valuesChanged() ), this, TQ_SLOT( parseMatchParam() ) );
 	}
@@ -56,7 +56,7 @@ pgn::~pgn()
 ///////////////////////////////////////
 void pgn::parseMatchParam( void )
 {
-	if( Param == NULL )
+	if( Param == nullptr )
 		return;
 	TAG_White = Param->name( WHITE );
 	TAG_Black = Param->name( BLACK );
@@ -173,14 +173,14 @@ TQStringList* pgn::notation( const int format )
 				}
 				/* Insert RAVs */
 				annon = RAV.find( tmp );
-				if( annon != NULL )
+				if( annon != nullptr )
 				{
 					notation += TQString( " (%1)" ).arg( annon->text );
 					showLineNumber = true;
 				}
 				/* Insert Annotations */
 				annon = annotations.find( tmp );
-				if( annon != NULL )
+				if( annon != nullptr )
 				{
 					notation += TQString( " {%1}" ).arg( annon->text );
 					showLineNumber = true;
@@ -963,7 +963,7 @@ void pgn::print( void )
 ///////////////////////////////////////
 void pgn::childViewDestroyed( void )
 {
-	pgnView = NULL;
+	pgnView = nullptr;
 }
 ///////////////////////////////////////
 //
diff --git a/knights/pgn.h b/knights/pgn.h
index 2bcd542..d653524 100644
--- a/knights/pgn.h
+++ b/knights/pgn.h
@@ -111,7 +111,7 @@ class pgn : public TQObject
 		TQStringList					Positions;
 		unsigned int				currentIndex;
 
-												pgn( resource *Rsrc=0, match_param *param=NULL );
+												pgn( resource *Rsrc=0, match_param *param=nullptr );
 												~pgn();
 		void								clear( void );
 		void								init( void );
diff --git a/knights/resource.cpp b/knights/resource.cpp
index 680a4d4..9d5d560 100644
--- a/knights/resource.cpp
+++ b/knights/resource.cpp
@@ -1016,9 +1016,9 @@ TQPixmap resource::loadSCIDImage( const TQString &name )
 		while( !file.atEnd() )
 		{
 			file.readLine( buffer, BufferMax );
-			if( strstr( buffer, photo ) != NULL )
+			if( strstr( buffer, photo ) != nullptr )
 			{
-				if( strstr( buffer, searchName.latin1() ) != NULL )
+				if( strstr( buffer, searchName.latin1() ) != nullptr )
 				{
 					/* From here on, we're reading the image */
 					index = file.readBlock( array, SkipSize );
diff --git a/knights/setpageengines.cpp b/knights/setpageengines.cpp
index 270fe30..a67a392 100644
--- a/knights/setpageengines.cpp
+++ b/knights/setpageengines.cpp
@@ -21,8 +21,8 @@ setPageEngines::setPageEngines(TQWidget *parent, resource *Rsrc  ) : TQVBoxLayou
 {
 	Parent = parent;
 	Resource = Rsrc;
-	Engine_Dialog = NULL;
-	Engines_ListView = NULL;
+	Engine_Dialog = nullptr;
+	Engines_ListView = nullptr;
 
 	BOX_Current = new TQHBox( parent );
 	addWidget( BOX_Current );
diff --git a/knights/setpageservers.cpp b/knights/setpageservers.cpp
index 70f2bab..2f4d219 100644
--- a/knights/setpageservers.cpp
+++ b/knights/setpageservers.cpp
@@ -24,7 +24,7 @@ setPageServers::setPageServers(TQWidget *parent, resource *Rsrc  ) : TQVBoxLayou
 	TQStyle& Style = TQApplication::style();
 	margin = Style.defaultFrameWidth();
 	Resource = Rsrc;
-	Servers_ListView = NULL;
+	Servers_ListView = nullptr;
 	resetServer = false;
 
 	TabParent = new TQTabWidget( parent, "setPageDisplay" );
diff --git a/knights/tab_pgnview.cpp b/knights/tab_pgnview.cpp
index 3ddb230..ace78c0 100644
--- a/knights/tab_pgnview.cpp
+++ b/knights/tab_pgnview.cpp
@@ -28,8 +28,8 @@
 tab_pgnView::tab_pgnView(pgn *parent, resource *Rsrc ) : KnightsTextView(0,Rsrc)
 {
 	myParent = parent;
-	whiteImage = NULL;
-	blackImage = NULL;
+	whiteImage = nullptr;
+	blackImage = nullptr;
 
 	TQString source = locate( "appdata", "pgn_template.kml" );
 	TQFile file( source );
diff --git a/knights/tab_seeklist.cpp b/knights/tab_seeklist.cpp
index 4ae0a8e..c5d7781 100644
--- a/knights/tab_seeklist.cpp
+++ b/knights/tab_seeklist.cpp
@@ -135,7 +135,7 @@ void tab_SeekList::addSoughtItem( const TQString &src )
 void tab_SeekList::display_menuSeek( TQListViewItem *Item, const TQPoint &Pos, int )
 {
 	bool enable;
-	if( Item != NULL )
+	if( Item != nullptr )
 	{
 		setSelected( Item, true );
 		selectedPlayerName = Item->text(0).replace( TQRegExp("\\(.+\\)"), TQString("") );
diff --git a/knights/tabbox.cpp b/knights/tabbox.cpp
index f4db998..9443a55 100644
--- a/knights/tabbox.cpp
+++ b/knights/tabbox.cpp
@@ -137,7 +137,7 @@ void TabBox::destroyChild( void )
 	TQObject *child = ((TQObject*)sender());
 
 	/* Be careful... make sure we have a valid child calling us */
-	if( child == NULL )
+	if( child == nullptr )
 		return;
 	if( !child->isWidgetType() )
 		return;
diff --git a/knights/tabmanager.cpp b/knights/tabmanager.cpp
index 6258c06..3d81bf9 100644
--- a/knights/tabmanager.cpp
+++ b/knights/tabmanager.cpp
@@ -69,7 +69,7 @@ void TabManager::changeCaption( TQWidget *child, const TQString &caption )
 {
 	TabBox *boxPtr = getParentBox( child );
 
-	if( boxPtr != NULL )
+	if( boxPtr != nullptr )
 	{
 		boxPtr->changeCaption( child, caption );
 	}
@@ -99,7 +99,7 @@ void TabManager::removeTab( TQObject *child )
 	TabBox *boxPtr = getParentBox( ((TQWidget*)child) );
 
 	/* Remove this Child's Parent, the TabPage */
-	if( boxPtr != NULL )
+	if( boxPtr != nullptr )
 	{
 		kdDebug() << "Removing child: " << childName << endl;
 		boxPtr->removeTab( ((TQWidget*)child), true );
@@ -120,7 +120,7 @@ void TabManager::removeTab( TQObject *child )
 void TabManager::showTab( TQWidget *child )
 {
 	TabBox *boxPtr = getParentBox( child );
-	if( boxPtr != NULL )
+	if( boxPtr != nullptr )
 	{
 		boxPtr->showTab( child );
 	}
@@ -132,7 +132,7 @@ void TabManager::showTab( TQWidget *child )
 ///////////////////////////////////////
 bool TabManager::isTab( TQWidget *child )
 {
-	if( getParentBox( child ) == NULL )
+	if( getParentBox( child ) == nullptr )
 	{
 		return false;
 	}
@@ -198,5 +198,5 @@ TabBox* TabManager::getParentBox( TQWidget *child )
 			return boxPtr;
 		}
 	}
-	return NULL;
+	return nullptr;
 }
diff --git a/knights/tabpage.cpp b/knights/tabpage.cpp
index 636208e..3392165 100644
--- a/knights/tabpage.cpp
+++ b/knights/tabpage.cpp
@@ -76,13 +76,13 @@ TabPage::~TabPage()
 void TabPage::tabDragged( const TQPoint &dest, const TQPoint &offset )
 {
 	TabBox *myParent = parentTabBox();
-	if( myParent != NULL )
+	if( myParent != nullptr )
 	{
 		TQWidget *destWidget = TQApplication::widgetAt( dest, true );
 		/* Find a TabBox */
 		while(1)
 		{
-			if( destWidget == NULL )
+			if( destWidget == nullptr )
 			{
 				/* Create new TabBox */
 				TabBox *newBox = new TabBox( myResource );
@@ -150,7 +150,7 @@ TabBox* TabPage::parentTabBox( void )
 			}
 		}
 	}
-	return NULL;
+	return nullptr;
 }
 ///////////////////////////////////////
 //
diff --git a/knights/thinbuttons.cpp b/knights/thinbuttons.cpp
index 8e0f329..769fae9 100644
--- a/knights/thinbuttons.cpp
+++ b/knights/thinbuttons.cpp
@@ -121,7 +121,7 @@ TQButton* thinbuttons::find( int id )
 	for( tmp = 0; tmp < buttons.count(); tmp++ )
 		if( buttons.at( tmp )->ID == id )
 			return buttons.at( tmp )->button;
-	return NULL;
+	return nullptr;
 }
 ///////////////////////////////////////
 //
@@ -158,7 +158,7 @@ void thinbuttons::remove( const int &id )
 	TQButton *butt;
 
 	butt = find(id);
-	if( butt != NULL )
+	if( butt != nullptr )
 	{
 		remove( butt );
 		delete butt;
-- 
cgit v1.2.3

