From 8ca85907ece44dd79fed7e3bc2995f5ca5138450 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sat, 3 Oct 2026 17:48:38 -0300
Subject: Replace zero 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>
---
 kxmleditor/kxmleditorshell.cpp  | 24 +++++++++----------
 kxmleditor/kxmleditorshell.h    |  2 +-
 kxmleditor/main.cpp             |  6 ++---
 part/actions.cpp                |  8 +++----
 part/commands_edit.cpp          |  2 +-
 part/commands_insert.cpp        |  8 +++----
 part/kxe_treeview.cpp           | 32 ++++++++++++-------------
 part/kxe_treeview.h             |  2 +-
 part/kxe_treeviewitem.cpp       | 12 +++++-----
 part/kxe_viewattributes.h       |  2 +-
 part/kxe_viewelement.h          |  2 +-
 part/kxearchiveextssettings.cpp |  2 +-
 part/kxearchiveextssettings.h   |  2 +-
 part/kxeattributedialog.h       |  2 +-
 part/kxechardatadialog.h        |  2 +-
 part/kxeconfiguration.cpp       |  6 ++---
 part/kxeconfiguration.h         |  4 ++--
 part/kxedocument.cpp            | 32 ++++++++++++-------------
 part/kxedocument.h              |  2 +-
 part/kxeelementdialog.h         |  2 +-
 part/kxefilenewdialog.h         |  2 +-
 part/kxenewfilesettings.cpp     |  2 +-
 part/kxenewfilesettings.h       |  2 +-
 part/kxeprintsettings.cpp       |  2 +-
 part/kxeprintsettings.h         |  2 +-
 part/kxeprocinstrdialog.h       |  2 +-
 part/kxesearchdialog.h          |  2 +-
 part/kxesettings.h              |  2 +-
 part/kxespecprocinstrdialog.h   |  2 +-
 part/kxetexteditordialog.h      |  2 +-
 part/kxetextviewsettings.cpp    |  2 +-
 part/kxetextviewsettings.h      |  2 +-
 part/kxetreeviewsettings.cpp    |  2 +-
 part/kxetreeviewsettings.h      |  2 +-
 part/kxmleditorabout.h          |  2 +-
 part/kxmleditorfactory.cpp      | 14 +++++------
 part/kxmleditorfactory.h        |  4 ++--
 part/kxmleditorpart.cpp         | 52 ++++++++++++++++++++---------------------
 38 files changed, 127 insertions(+), 127 deletions(-)

diff --git a/kxmleditor/kxmleditorshell.cpp b/kxmleditor/kxmleditorshell.cpp
index 5a3211e..2b32660 100644
--- a/kxmleditor/kxmleditorshell.cpp
+++ b/kxmleditor/kxmleditorshell.cpp
@@ -43,12 +43,12 @@
 #include "dcopiface_shell.h"
 
 
-KXEShellManager *KXMLEditorShell::s_manager=0L;
+KXEShellManager *KXMLEditorShell::s_manager=nullptr;
 
 KXMLEditorShell::KXMLEditorShell( const char * name, WFlags f )
 	: KParts::MainWindow( name, f ),
-	  m_pPart(0),
-	  m_pKXEShellIface(0)
+	  m_pPart(nullptr),
+	  m_pKXEShellIface(nullptr)
 {
 	//////////////////////////////
 	// CREATE ACTIONS
@@ -73,9 +73,9 @@ KXMLEditorShell::KXMLEditorShell( const char * name, WFlags f )
 
 	// L.V. moved to part pActPrint = KStdAction::print( 0, 0, actionCollection(), "print" );
 
-	pActCloseW = new TDEAction( i18n("&Close"), 0, 0, this,TQ_SLOT(slotActWindowClose()), actionCollection(), "window_close" );
-	pActCloseAllW = new TDEAction( i18n("Close &all"), 0, 0, this,TQ_SLOT(slotActWindowCloseAll()), actionCollection(), "window_close_all" );
-	pActCloseAllO = new TDEAction( i18n("Close all &others"), 0, 0, this,TQ_SLOT(slotActWindowCloseAllOthers()), actionCollection(), "window_close_all_others" );
+	pActCloseW = new TDEAction( i18n("&Close"), nullptr, 0, this,TQ_SLOT(slotActWindowClose()), actionCollection(), "window_close" );
+	pActCloseAllW = new TDEAction( i18n("Close &all"), nullptr, 0, this,TQ_SLOT(slotActWindowCloseAll()), actionCollection(), "window_close_all" );
+	pActCloseAllO = new TDEAction( i18n("Close all &others"), nullptr, 0, this,TQ_SLOT(slotActWindowCloseAllOthers()), actionCollection(), "window_close_all_others" );
 
 	//////////////////////////////
 	// CREATE STATUSBAR
@@ -96,7 +96,7 @@ KXMLEditorShell::KXMLEditorShell( const char * name, WFlags f )
 
 	statusBar()->setSizeGripEnabled(true);
 
-	setPart(0L);		// start empty
+	setPart(nullptr);		// start empty
 
 }
 
@@ -369,7 +369,7 @@ void KXMLEditorShell::setPart(KParts::ReadWritePart* pPart)
 	if (pPart)
 	{
 		// get the parts browser extension and connect additional actions to it
-		KParts::BrowserExtension * pBrowserExt = 0;
+		KParts::BrowserExtension * pBrowserExt = nullptr;
 		if ( (pBrowserExt = KParts::BrowserExtension::childObject(pPart)) )  // if there is one
 		{
 			connect( pBrowserExt, TQ_SIGNAL(enableAction( const char *, bool )), this, TQ_SLOT(slotEnableBrowserExtActions( const char *, bool )) );
@@ -385,8 +385,8 @@ void KXMLEditorShell::setPart(KParts::ReadWritePart* pPart)
 	}
 	else
 	{
-		createGUI(0L);
-		setCentralWidget(0L);
+		createGUI(nullptr);
+		setCentralWidget(nullptr);
 		stateChanged("empty");
 	}
 
@@ -405,7 +405,7 @@ KParts::ReadWritePart* KXMLEditorShell::createXMLPart(TQObject *parent)
 
 KParts::ReadWritePart* KXMLEditorShell::createPart(TQObject *parent, const TQString& libName, const TQString& className)
 {
-	KParts::ReadWritePart* newPart = 0L;
+	KParts::ReadWritePart* newPart = nullptr;
 	KLibFactory * pFactory = KLibLoader::self()->factory(libName.local8Bit());
 	if (pFactory)
 		newPart = static_cast <KParts::ReadWritePart*> ( pFactory->create( parent, "KXMLEditor view", className.utf8() ) );
@@ -417,7 +417,7 @@ KParts::ReadWritePart* KXMLEditorShell::createPart(TQObject *parent, const TQStr
 void KXMLEditorShell::slotActClose()
 {
 	if (part() && part()->queryClose())
-		setPart(0L);
+		setPart(nullptr);
 }
 
 void KXMLEditorShell::close()
diff --git a/kxmleditor/kxmleditorshell.h b/kxmleditor/kxmleditorshell.h
index fa91208..2f4eb29 100644
--- a/kxmleditor/kxmleditorshell.h
+++ b/kxmleditor/kxmleditorshell.h
@@ -46,7 +46,7 @@ class KXMLEditorShell : public KParts::MainWindow
 		Creates shell and adds it into one global instance of KXEShellManager.
 		@sa KXEShellManager
 		*/
-		KXMLEditorShell( const char * name = 0L, WFlags f = WDestructiveClose );
+		KXMLEditorShell( const char * name = nullptr, WFlags f = WDestructiveClose );
 
 		/** @short Destructor
 
diff --git a/kxmleditor/main.cpp b/kxmleditor/main.cpp
index 7c4fd1b..605f0f0 100644
--- a/kxmleditor/main.cpp
+++ b/kxmleditor/main.cpp
@@ -30,8 +30,8 @@
 
 static TDECmdLineOptions options[] =
 {
-  { "+[File(s)]", I18N_NOOP("XML file(s) to open"), 0 },
-  { 0, 0, 0 }
+  { "+[File(s)]", I18N_NOOP("XML file(s) to open"), nullptr },
+  { nullptr, nullptr, nullptr }
 };
 
 #define USE_KPART 1
@@ -106,7 +106,7 @@ int main(int argc, char *argv[])
 				else
 					{
             kdDebug() << "Couldn't open file " << url.path() << endl;
-            KMessageBox::sorry(0, i18n("Couldn't open file !") + "\n" + url.path());
+            KMessageBox::sorry(nullptr, i18n("Couldn't open file !") + "\n" + url.path());
             delete pShell;
           }
 			}
diff --git a/part/actions.cpp b/part/actions.cpp
index c71fa93..b2c15dc 100644
--- a/part/actions.cpp
+++ b/part/actions.cpp
@@ -43,7 +43,7 @@ KXmlEditorComboAction::KXmlEditorComboAction(const TQString& text,
                                              TQObject* parent,
                                              const char* name)
     : TDEAction(text, accel, parent, name),
-      m_pCombo(0)
+      m_pCombo(nullptr)
 {
 	m_receiver = receiver;
   m_member = member;
@@ -99,7 +99,7 @@ void KXmlEditorComboAction::unplug(TQWidget *w)
   toolBar->removeItem( menuId( idx ) );
 
   removeContainer( idx );
-  m_pCombo = 0;
+  m_pCombo = nullptr;
 }
 
 void KXmlEditorComboAction::slotClear()
@@ -151,7 +151,7 @@ const TQPixmap * KXmlEditorComboAction::currentPixmap() const
   if ( containerCount() == 0 )
   {
     kdWarning() << "[KXmlEditorComboAction::currentPixmap] action not plugged" << endl;
-    return 0;
+    return nullptr;
   }
 
   return m_pCombo->pixmap( m_pCombo->currentItem() );
@@ -218,7 +218,7 @@ int KXmlEditorComboAction::findItem( const TQString & text )
 }
 
 ToolbarLabel::ToolbarLabel(  const TQString& text )
-  : TQLabel( text, 0L, "tde toolbar widget" )	// Use this name for it to be styled!
+  : TQLabel( text, nullptr, "tde toolbar widget" )	// Use this name for it to be styled!
 //  , m_mw(mw)
 {
   setBackgroundMode( TQt::PaletteButton );
diff --git a/part/commands_edit.cpp b/part/commands_edit.cpp
index d899479..c941153 100644
--- a/part/commands_edit.cpp
+++ b/part/commands_edit.cpp
@@ -42,7 +42,7 @@ KXEPasteToDocumentCommand::KXEPasteToDocumentCommand(
   )
  : KXECommand(pDocument)
 {
-  if ( pDomTargetDoc == 0 )
+  if ( !pDomTargetDoc )
     kdError() << "KXEPasteToDocumentCommand::KXEPasteToDocumentCommand the given XML document object is empty." << endl;
 
   m_pDomTargetDoc = pDomTargetDoc;
diff --git a/part/commands_insert.cpp b/part/commands_insert.cpp
index fb79d63..6da9963 100644
--- a/part/commands_insert.cpp
+++ b/part/commands_insert.cpp
@@ -33,7 +33,7 @@ KXEElementCommand::KXEElementCommand(
   )
  : KXECommand(pDocument)
 {
-  if ( pDomDoc == 0 )
+  if ( !pDomDoc )
     kdError() << "KXEElementCommand::KXEElementCommand the given XML document object is empty." << endl;
  
   m_pDomDoc = pDomDoc;
@@ -58,7 +58,7 @@ KXEElementCommand::KXEElementCommand(
     kdError() << "KXEElementCommand::KXEElementCommand the given XML element object is empty." << endl;
 
   m_domParentElement = domParentElement;
-  m_pDomDoc = 0;
+  m_pDomDoc = nullptr;
   m_bAtTop = bAtTop;
 
   if ( strNsURI.isEmpty() )
@@ -246,7 +246,7 @@ KXEProcInstrCommand::KXEProcInstrCommand(
   )
  : KXECommand(pDocument)
 {
-  if ( pDomDoc == 0 )
+  if ( !pDomDoc )
 	{
 		kdError() << k_funcinfo << "KXEProcInstrCommand::KXEProcInstrCommand - The given parent object is empty." << endl;
 		return;
@@ -274,7 +274,7 @@ KXEProcInstrCommand::KXEProcInstrCommand(
 	}
 	
   m_domParentElement = domParentElement;
-  m_pDomDoc = 0;
+  m_pDomDoc = nullptr;
   m_bAtTop = bAtTop;
 
   m_domProcInstr = domParentElement.ownerDocument().createProcessingInstruction( strTarget, strData );
diff --git a/part/kxe_treeview.cpp b/part/kxe_treeview.cpp
index bcb0bd8..b4359e0 100644
--- a/part/kxe_treeview.cpp
+++ b/part/kxe_treeview.cpp
@@ -61,8 +61,8 @@ KXE_TreeView::KXE_TreeView( KXMLGUIClient * pGUIClient, TQWidget * pParent, cons
 	setReadWrite(false);
 
 	m_bDrag = false;
-	m_pCurrentBeforeDropItem = 0;
-  m_pDropItem = 0;
+	m_pCurrentBeforeDropItem = nullptr;
+  m_pDropItem = nullptr;
 
 	m_autoOpenTimer = new TQTimer(this);
   connect(m_autoOpenTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotAutoOpenFolder()));
@@ -229,7 +229,7 @@ void KXE_TreeView::bookmarksPrev()
 	}
 
 	// Search items above the selected one
-	while ( (pSelItem = pSelItem->prevItem()) != 0 )
+	while ( (pSelItem = pSelItem->prevItem()) != nullptr )
 	{
     if ( pSelItem->isBookmarked() )
 		{
@@ -260,7 +260,7 @@ void KXE_TreeView::bookmarksNext()
 	}
 
 	// Search items below the selected one
-	while ( (pSelItem = pSelItem->nextItem()) != 0 )
+	while ( (pSelItem = pSelItem->nextItem()) != nullptr )
 	{
 		if ( pSelItem->isBookmarked() )
 		{
@@ -308,7 +308,7 @@ TQDomNode * KXE_TreeView::getSelectedNode() const
 	// get selected item from tree view
 	TQListViewItem * pSelItem = selectedItem();
 	if ( ! pSelItem )
-		return 0;
+		return nullptr;
 
 	KXE_TreeViewItem * pSelTreeItem = static_cast <KXE_TreeViewItem *> (pSelItem);
 	return pSelTreeItem->xmlNode();
@@ -329,7 +329,7 @@ TQDomNode * KXE_TreeView::getSpecProcInstrNode(const TQString& target) const
 		pTreeItem = pTreeItem->nextItem();
 	}
 
-	return 0;
+	return nullptr;
 }
 
 // Return info, is root element is already created
@@ -691,7 +691,7 @@ KXE_TreeViewItem * KXE_TreeView::findCorrespondingItem( const TQDomNode & node )
 		pItem = pItem->nextItem();
 	}
 
-	return 0;
+	return nullptr;
 }
 
 //////////////////////////////////////////////////////////////
@@ -742,7 +742,7 @@ void KXE_TreeView::contentsMouseReleaseEvent(TQMouseEvent *e)
 /** Overrides TQScrollView::contentsDragEnterEvent */
 void KXE_TreeView::contentsDragEnterEvent(TQDragEnterEvent *e)
 {
-	m_pDropItem = 0;
+	m_pDropItem = nullptr;
   m_pCurrentBeforeDropItem = selectedItem();
 
 	// Save the available formats
@@ -761,7 +761,7 @@ void KXE_TreeView::contentsDragMoveEvent(TQDragMoveEvent *e)
 
   // Accept drops on the background, if Texts
   if(!item && (m_lstDropFormats.contains("text/")))
-    {	m_pDropItem = 0;
+    {	m_pDropItem = nullptr;
      	e->acceptAction();
      	if(selectedItem())
      		setSelected(selectedItem(), false); // no item selected
@@ -769,7 +769,7 @@ void KXE_TreeView::contentsDragMoveEvent(TQDragMoveEvent *e)
     }
 
   if(!item || !item->isSelectable())
-    { m_pDropItem = 0;
+    { m_pDropItem = nullptr;
       m_autoOpenTimer->stop();
       e->ignore();
       return;
@@ -796,8 +796,8 @@ void KXE_TreeView::contentsDragLeaveEvent(TQDragLeaveEvent *e)
   else
     setSelected(m_pDropItem, false); // no item selected
 
-  m_pCurrentBeforeDropItem = 0;
-  m_pDropItem = 0;
+  m_pCurrentBeforeDropItem = nullptr;
+  m_pDropItem = nullptr;
   m_lstDropFormats.clear();
 }
 
@@ -824,7 +824,7 @@ void KXE_TreeView::slotAutoOpenFolder()
 /** Drop or paste text into item */
 bool KXE_TreeView::drop(TQListViewItem *pItem, TQDropEvent *pDropEvent)
 {
-	KXE_TreeViewItem* pTreeItem = 0;
+	KXE_TreeViewItem* pTreeItem = nullptr;
   if(pItem)
   	pTreeItem = static_cast <KXE_TreeViewItem *> (pItem);
 
@@ -839,13 +839,13 @@ bool KXE_TreeView::drop(TQListViewItem *pItem, TQDropEvent *pDropEvent)
 				
 			if(m_pCurrentBeforeDropItem && pTreeItem &&
 				  static_cast <KXE_TreeViewItem*> (m_pCurrentBeforeDropItem)->isMyChildren(pTreeItem))
-				{	KMessageBox::sorry(0, i18n("An XML element can't be moved to its own subtree."));
+				{	KMessageBox::sorry(nullptr, i18n("An XML element can't be moved to its own subtree."));
 					return false;
 				}
 
       if (pTreeItem->xmlNode()->isProcessingInstruction())
 			{
-        KMessageBox::sorry(0, i18n("An XML node can't be moved in a processing instruction."));
+        KMessageBox::sorry(nullptr, i18n("An XML node can't be moved in a processing instruction."));
 				return false;
       }
 
@@ -855,7 +855,7 @@ bool KXE_TreeView::drop(TQListViewItem *pItem, TQDropEvent *pDropEvent)
         TQDomProcessingInstruction domProcInstr = pNode->toProcessingInstruction();
 									  
         if(domProcInstr.target() == "xml")
-        { KMessageBox::sorry(0, i18n("This processing instruction cannot be moved !"));
+        { KMessageBox::sorry(nullptr, i18n("This processing instruction cannot be moved !"));
           return false;
         }
       }
diff --git a/part/kxe_treeview.h b/part/kxe_treeview.h
index f307ca2..f45af91 100644
--- a/part/kxe_treeview.h
+++ b/part/kxe_treeview.h
@@ -44,7 +44,7 @@ class KXE_TreeView : public TDEListView
 		TQ_OBJECT
 
 public:
-	KXE_TreeView( KXMLGUIClient * pGUIClient, TQWidget * pParent = 0, const char * pszName = 0 );
+	KXE_TreeView( KXMLGUIClient * pGUIClient, TQWidget * pParent = nullptr, const char * pszName = nullptr );
 
 	/** Changes the behaviour of this view to readonly or readwrite. */
 	void setReadWrite( bool fReadWrite );
diff --git a/part/kxe_treeviewitem.cpp b/part/kxe_treeviewitem.cpp
index 4163497..e94b80e 100644
--- a/part/kxe_treeviewitem.cpp
+++ b/part/kxe_treeviewitem.cpp
@@ -32,7 +32,7 @@
 KXE_TreeViewItem::KXE_TreeViewItem( const TQDomNode & xmlNode, TQListViewItem * pParent )
 	: TQListViewItem(pParent),
 	  m_xmlNode(xmlNode),
-	  m_pPrevSibling(0),
+	  m_pPrevSibling(nullptr),
 	  m_bBookmarked(false),
 	  m_bChildsCreated(false),
 	  m_bGrandChildsCreated(false)
@@ -44,7 +44,7 @@ KXE_TreeViewItem::KXE_TreeViewItem( const TQDomNode & xmlNode, TQListViewItem *
 KXE_TreeViewItem::KXE_TreeViewItem( const TQDomNode & xmlNode, TDEListView * pParent,  TQListViewItem* pAfter)
 	: TQListViewItem(pParent,pAfter),
 	  m_xmlNode(xmlNode),
-	  m_pPrevSibling(0),
+	  m_pPrevSibling(nullptr),
 	  m_bBookmarked(false),
 	  m_bChildsCreated(false),
 	  m_bGrandChildsCreated(false)
@@ -56,7 +56,7 @@ KXE_TreeViewItem::KXE_TreeViewItem( const TQDomNode & xmlNode, TDEListView * pPa
 KXE_TreeViewItem::KXE_TreeViewItem( const TQDomNode & xmlNode, TQListViewItem * pParent, TQListViewItem * pAfter )
 	: TQListViewItem( pParent, pAfter ),
 	  m_xmlNode(xmlNode),
-	  m_pPrevSibling(0),
+	  m_pPrevSibling(nullptr),
 	  m_bBookmarked(false),
 	  m_bChildsCreated(false),
 	  m_bGrandChildsCreated(false)
@@ -172,10 +172,10 @@ KXE_TreeViewItem * KXE_TreeViewItem::lastChild() const
 	TQListViewItem * pTmpItem = firstChild();
 	// if there are no childs return 0
 	if ( ! pTmpItem )
-		return 0;
+		return nullptr;
 
   TQListViewItem * pTmpItem2;
-	while ( (pTmpItem2 = pTmpItem->nextSibling()) != 0 )     // traversing all childs
+	while ( (pTmpItem2 = pTmpItem->nextSibling()) != nullptr )     // traversing all childs
 		{
       pTmpItem = pTmpItem2;
     }
@@ -218,7 +218,7 @@ KXE_TreeViewItem * KXE_TreeViewItem::nextItem()
 			return static_cast <KXE_TreeViewItem*> (pTmp);
 		pParent = pParent->parent();
 	}
-	return 0;
+	return nullptr;
 }
 
 void KXE_TreeViewItem::expandSubTree( int iLevel )
diff --git a/part/kxe_viewattributes.h b/part/kxe_viewattributes.h
index cf7d886..4bfb5e6 100644
--- a/part/kxe_viewattributes.h
+++ b/part/kxe_viewattributes.h
@@ -30,7 +30,7 @@ class KXE_ViewAttributes : public TQTable
 
 	public:
 
-		KXE_ViewAttributes( TQWidget * pParent = 0, const char * pszName = 0 );
+		KXE_ViewAttributes( TQWidget * pParent = nullptr, const char * pszName = nullptr );
 
 		/** Returns a pointer to the currently selected attribute or a null pointer. */
 		TQDomAttr getSelectedAttribute() const;
diff --git a/part/kxe_viewelement.h b/part/kxe_viewelement.h
index 72ad060..e57667f 100644
--- a/part/kxe_viewelement.h
+++ b/part/kxe_viewelement.h
@@ -41,7 +41,7 @@ class KXE_ViewElement : public TQSplitter
 
 	public:
 
-		KXE_ViewElement( TQWidget * pParent, TDEConfig *pConfig, const char * pszName = 0 );
+		KXE_ViewElement( TQWidget * pParent, TDEConfig *pConfig, const char * pszName = nullptr );
 		~KXE_ViewElement();
 
 		/** Returns a pointer to the currently selected attribute or a null pointer. */
diff --git a/part/kxearchiveextssettings.cpp b/part/kxearchiveextssettings.cpp
index 4832419..471fbc8 100644
--- a/part/kxearchiveextssettings.cpp
+++ b/part/kxearchiveextssettings.cpp
@@ -30,7 +30,7 @@
 
 KXEArchiveExtsSettings::KXEArchiveExtsSettings( TQObject * pParent, const char * pszName )
  : KXESettings( "TarGz Extensions", pParent, pszName ),
-   m_pDialogPage(0)
+   m_pDialogPage(nullptr)
 {
 }
 
diff --git a/part/kxearchiveextssettings.h b/part/kxearchiveextssettings.h
index db8923a..b2bb508 100644
--- a/part/kxearchiveextssettings.h
+++ b/part/kxearchiveextssettings.h
@@ -36,7 +36,7 @@ class KXEArchiveExtsSettings : public KXESettings
 
 	public:
 
-		KXEArchiveExtsSettings( TQObject * pParent = 0, const char * pszName = 0 );
+		KXEArchiveExtsSettings( TQObject * pParent = nullptr, const char * pszName = nullptr );
 
 		// The following function(s) can be used to access this object's settings.
 		const TQStringList & extensions() const { return m_lstExtensions; }
diff --git a/part/kxeattributedialog.h b/part/kxeattributedialog.h
index 5461ad8..7f8424b 100644
--- a/part/kxeattributedialog.h
+++ b/part/kxeattributedialog.h
@@ -27,7 +27,7 @@ class KXEAttributeDialog : public KXEAttributeDialogBase
 		TQ_OBJECT
 
 	public:
-		KXEAttributeDialog( TQWidget * pParent = 0, const char * pszName = 0, bool fModal = true, WFlags fl = 0 );
+		KXEAttributeDialog( TQWidget * pParent = nullptr, const char * pszName = nullptr, bool fModal = true, WFlags fl = 0 );
 
     const TQString attributeNamespace() const { return m_strNamespace; }
     const TQString QName() const { return m_strQName; }
diff --git a/part/kxechardatadialog.h b/part/kxechardatadialog.h
index aad82d4..f0cb9eb 100644
--- a/part/kxechardatadialog.h
+++ b/part/kxechardatadialog.h
@@ -32,7 +32,7 @@ class KXECharDataDialog : public KXECharDataDialogBase
 		TQ_OBJECT
 
 	public:
-		KXECharDataDialog( TQWidget * pParent = 0, const char * pszName = 0, bool fModal = true, WFlags fl = 0 );
+		KXECharDataDialog( TQWidget * pParent = nullptr, const char * pszName = nullptr, bool fModal = true, WFlags fl = 0 );
 
 //    const CharDataKind charDataKind() const { return m_eCharDataKind; }
     const bool atTop() const { return m_bAtTop; }
diff --git a/part/kxeconfiguration.cpp b/part/kxeconfiguration.cpp
index 4d25856..95649d9 100644
--- a/part/kxeconfiguration.cpp
+++ b/part/kxeconfiguration.cpp
@@ -31,8 +31,8 @@
 
 
 KXEConfiguration::KXEConfiguration()
- : TQObject( 0, "KXMLEditor's configuration (KXEConfiguration)" ),
-   m_pDialog( 0 )
+ : TQObject( nullptr, "KXMLEditor's configuration (KXEConfiguration)" ),
+   m_pDialog( nullptr )
 {
 	// initialize all setting group objects
 	m_pTreeView = new KXETreeViewSettings( this, "tree view config. settings" );
@@ -86,7 +86,7 @@ void KXEConfiguration::showDialog()
 		                             i18n("Configure KXMLEditor"), // caption
 		                             KDialogBase::Apply | KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Help,   // buttons
 		                             KDialogBase::Ok,              // default button
-		                             0,                            // parent
+		                             nullptr,                      // parent
 		                             "configuration dialog",       // name
 		                             false,                        // not modal
 		                             true );                       // show separator
diff --git a/part/kxeconfiguration.h b/part/kxeconfiguration.h
index 7e53c2f..26940fa 100644
--- a/part/kxeconfiguration.h
+++ b/part/kxeconfiguration.h
@@ -62,14 +62,14 @@ class KXEConfiguration : public TQObject
 		 * If no @ref TDEConfig object is given, @ref TDEGlobal::config is
 		 * used.
 		 */
-		void store( TDEConfig * pConfig = 0 ) const;
+		void store( TDEConfig * pConfig = nullptr ) const;
 		/**
 		 * Restores all configuration from the given @ref TDEConfig object
 		 * by using @ref KXESettings's @ref restore function.
 		 * If no @ref TDEConfig object is given, @ref TDEGlobal::config is
 		 * used.
 		 */
-		void restore( TDEConfig * pConfig = 0 );
+		void restore( TDEConfig * pConfig = nullptr );
 		/**
 		 * Shows the configuration dialog.
 		 * If there is no one yet, it is created by.
diff --git a/part/kxedocument.cpp b/part/kxedocument.cpp
index 5bba469..a24d7f0 100644
--- a/part/kxedocument.cpp
+++ b/part/kxedocument.cpp
@@ -66,7 +66,7 @@ KXEDocument::~KXEDocument()
 bool KXEDocument::save(const TQString  &strFileName)
 {
 	if (this->documentElement().isNull() &&
-	    KMessageBox::warningContinueCancel(0,
+	    KMessageBox::warningContinueCancel(nullptr,
 		i18n("Your file doesn't have root element defined. \n\
 		Continue saving?"))==KMessageBox::Cancel )
 		{
@@ -108,8 +108,8 @@ bool KXEDocument::save(const TQString  &strFileName)
   else
     pTextCodec = TQTextCodec::codecForName(strEncoding.latin1());
 
-	if(pTextCodec == 0)
-		{ if(KMessageBox::questionYesNo(0, i18n("Codec for encoding %1 not found ! Continue saving ?").arg(strEncoding)) != KMessageBox::Yes)
+	if(!pTextCodec)
+		{ if(KMessageBox::questionYesNo(nullptr, i18n("Codec for encoding %1 not found ! Continue saving ?").arg(strEncoding)) != KMessageBox::Yes)
 					return false;
 		}
 
@@ -127,7 +127,7 @@ bool KXEDocument::save(const TQString  &strFileName)
 	  				file.close();
 	  			}
 	  		else
-					{ KMessageBox::error(0,
+					{ KMessageBox::error(nullptr,
 												 i18n("Can't create file %1").arg(strFileName),
 												 i18n("Write error !"));
 					}
@@ -144,7 +144,7 @@ bool KXEDocument::save(const TQString  &strFileName)
 					
 				if(strExtension == "svgz")
 				{
-					KMessageBox::sorry(0,
+					KMessageBox::sorry(nullptr,
 												 "Saving *.svgz not implemented yet",
 												 "sory");
 					return false;
@@ -157,7 +157,7 @@ bool KXEDocument::save(const TQString  &strFileName)
 							tarGzFile.close();
 						}
 					else
-						{ KMessageBox::error(0,
+						{ KMessageBox::error(nullptr,
 													i18n("Can't create archive %1").arg(strFileName),
 													i18n("Write error !"));
 						}
@@ -191,7 +191,7 @@ bool KXEDocument::open(const TQString &strFileName)
 			if (tmp.status() != 0)
 			{
 				kdError() << "Couldn't open temp file" << endl;
-				KMessageBox::sorry(0, i18n("Couldn't open temp file !"));
+				KMessageBox::sorry(nullptr, i18n("Couldn't open temp file !"));
 				return false;
 			}
 		
@@ -244,7 +244,7 @@ bool KXEDocument::open(const TQString &strFileName)
 		
 					// For KOffice files let user to choose maindoc or documentinfo
 					if(strCompressedTarEntryName.length() == 0)
-					{ KXEChooseStringDialog dlgChooseString(0, 0, i18n("Choose file").utf8(), i18n("File:").utf8());
+					{ KXEChooseStringDialog dlgChooseString(nullptr, nullptr, i18n("Choose file").utf8(), i18n("File:").utf8());
 						dlgChooseString.m_pComboBox->insertItem("maindoc.xml");
 						dlgChooseString.m_pComboBox->insertItem("documentinfo.xml");
 	
@@ -326,7 +326,7 @@ bool KXEDocument::open(const TQString &strFileName)
           txtStreamLocal.setCodec(pTextCodec);
         else
         {
-          KMessageBox::sorry(0, i18n("Codec for encoding %1 not found ! Using locale encoding for load.").arg(strEncoding));
+          KMessageBox::sorry(nullptr, i18n("Codec for encoding %1 not found ! Using locale encoding for load.").arg(strEncoding));
           txtStreamLocal.setEncoding(TQTextStream::Locale);
         }
       }
@@ -357,7 +357,7 @@ bool KXEDocument::open(const TQString &strFileName)
  	if( ! pNewDoc->setContent(strFileContents, true, &strErrorMsg, &iErrorLine, &iErrorColumn) )
  		{ kdDebug() << "KXEDocument::openFile: Failed parsing the file." << endl;
 
-			KMessageBox::error(0,
+			KMessageBox::error(nullptr,
 												 i18n("%1 in line %2, column %3").arg(strErrorMsg).arg(iErrorLine).arg(iErrorColumn),
 												 i18n("Parsing error !"));
 
@@ -526,7 +526,7 @@ void KXEDocument::newFile()
 		case KXENewFileSettings::CreateWithAssistance:
 		{
 
-			KXEFileNewDialog dlg( 0L);
+			KXEFileNewDialog dlg( nullptr);
 			dlg.fillDialog( KXMLEditorFactory::configuration()->newfile()->dfltVersion(),
 			                KXMLEditorFactory::configuration()->newfile()->dfltEncoding() );
 			if( dlg.exec() )
@@ -559,7 +559,7 @@ KCommand * KXEDocument::actDetachStylesheet()
 		KCommand *pCmd = new KXEStylesheetDetachCommand(this,domNode.toProcessingInstruction().data());
 		return pCmd;
 	}
-	return 0L;
+	return nullptr;
 }
 
 KCommand * KXEDocument::actAttachStylesheet()
@@ -575,7 +575,7 @@ KCommand * KXEDocument::actAttachStylesheet()
 		KCommand *pCmd = new KXEStylesheetAttachCommand(this,data,dlg.attachURI->url());
 		return pCmd;
 	}
-	return 0L;
+	return nullptr;
 }
 
 KCommand * KXEDocument::actDetachSchema()
@@ -588,7 +588,7 @@ KCommand * KXEDocument::actDetachSchema()
 													);
 		return pCmd;
 	}
-	return 0L;
+	return nullptr;
 }
 
 KCommand * KXEDocument::actAttachSchema()
@@ -604,7 +604,7 @@ KCommand * KXEDocument::actAttachSchema()
 			return pCmd;
 		}
 	}
-	return 0L;
+	return nullptr;
 }
 
 // Instert or edit special processing instruction <?xml ... ?>
@@ -627,7 +627,7 @@ KCommand * KXEDocument::actVersionEncoding()
 		KCommand *pCmd = new KXEVersionEncodingCommand(this,strOldData,dlg.getData());
 		return pCmd;
 	}
-	return 0L;
+	return nullptr;
 }
 
 #include "kxedocument.moc"
diff --git a/part/kxedocument.h b/part/kxedocument.h
index 9260c95..b56badb 100644
--- a/part/kxedocument.h
+++ b/part/kxedocument.h
@@ -44,7 +44,7 @@ class KXEDocument : public TQObject, public TQDomDocument, public KXMLGUIClient
         TQ_OBJECT
 public:
 	/** @short Constructor */
-	KXEDocument(TQObject *parent=0, const char *name=0);
+	KXEDocument(TQObject *parent=nullptr, const char *name=nullptr);
 
 	/** @short Destructor */
 	~KXEDocument();
diff --git a/part/kxeelementdialog.h b/part/kxeelementdialog.h
index 1a705db..f6500e1 100644
--- a/part/kxeelementdialog.h
+++ b/part/kxeelementdialog.h
@@ -25,7 +25,7 @@ class KXEElementDialog : public KXEElementDialogBase
 		TQ_OBJECT
 
 	public:
-		KXEElementDialog( TQWidget * pParent = 0, const char * pszName = 0, bool fModal = true, WFlags fl = 0 );
+		KXEElementDialog( TQWidget * pParent = nullptr, const char * pszName = nullptr, bool fModal = true, WFlags fl = 0 );
 
 	public:
 
diff --git a/part/kxefilenewdialog.h b/part/kxefilenewdialog.h
index ba1c44c..fd063cd 100644
--- a/part/kxefilenewdialog.h
+++ b/part/kxefilenewdialog.h
@@ -22,7 +22,7 @@ Dialog for File->New assistance.
 class KXEFileNewDialog : public KXESpecProcInstrDialog
 {
 public:
-    KXEFileNewDialog(TQWidget* parent, const char* name=0);
+    KXEFileNewDialog(TQWidget* parent, const char* name=nullptr);
 
     ~KXEFileNewDialog();
 
diff --git a/part/kxenewfilesettings.cpp b/part/kxenewfilesettings.cpp
index a108a98..a524595 100644
--- a/part/kxenewfilesettings.cpp
+++ b/part/kxenewfilesettings.cpp
@@ -43,7 +43,7 @@ KXENewFileSettings::KXENewFileSettings( TQObject * pParent, const char * pszName
    m_strDfltVersion( DFLT_VALUE_DFLT_VERSION ),
    m_strDfltEncoding( DFLT_VALUE_DFLT_ENCODING ),
    m_enmNewFileCreaBehav( DFLT_VALUE_NEWFILE_CREAT_BEHAVIOUR ),
-   m_pDialogPage(0)
+   m_pDialogPage(nullptr)
 {
 }
 
diff --git a/part/kxenewfilesettings.h b/part/kxenewfilesettings.h
index e53f4a0..05f0f82 100644
--- a/part/kxenewfilesettings.h
+++ b/part/kxenewfilesettings.h
@@ -39,7 +39,7 @@ class KXENewFileSettings : public KXESettings
 			UseDefaults
 		};
 
-		KXENewFileSettings( TQObject * pParent = 0, const char * pszName = 0 );
+		KXENewFileSettings( TQObject * pParent = nullptr, const char * pszName = nullptr );
 
 		// The following functions can be used to access this object's settings.
 		TQString dfltVersion() const { return m_strDfltVersion; }
diff --git a/part/kxeprintsettings.cpp b/part/kxeprintsettings.cpp
index 0a76e60..7448ffc 100644
--- a/part/kxeprintsettings.cpp
+++ b/part/kxeprintsettings.cpp
@@ -49,7 +49,7 @@ KXEPrintSettings::KXEPrintSettings( TQObject * pParent, const char * pszName )
    m_iIndentSteps( DFLT_VALUE_INDENT_STEPS ),
    m_bWithHeader( DFLT_VALUE_WITH_FOOTER ),
    m_bWithFooter( DFLT_VALUE_WITH_HEADER ),
-   m_pDialogPage(0)
+   m_pDialogPage(nullptr)
 {
 }
 
diff --git a/part/kxeprintsettings.h b/part/kxeprintsettings.h
index a66d627..4d9c62c 100644
--- a/part/kxeprintsettings.h
+++ b/part/kxeprintsettings.h
@@ -32,7 +32,7 @@ class KXEPrintSettings : public KXESettings
 {
 	public:
 
-		KXEPrintSettings( TQObject * pParent = 0, const char * pszName = 0 );
+		KXEPrintSettings( TQObject * pParent = nullptr, const char * pszName = nullptr );
 
 		// The following functions can be used to access this object's settings.
 		TQString fontFamily() const { return m_strFontFamily; }
diff --git a/part/kxeprocinstrdialog.h b/part/kxeprocinstrdialog.h
index 953fd95..bdfee91 100644
--- a/part/kxeprocinstrdialog.h
+++ b/part/kxeprocinstrdialog.h
@@ -25,7 +25,7 @@ class KXEProcInstrDialog : public KXEProcInstrDialogBase
 		TQ_OBJECT
 
 	public:
-		KXEProcInstrDialog( TQWidget * pParent = 0, const char * pszName = 0, bool fModal = true, WFlags fl = 0 );
+		KXEProcInstrDialog( TQWidget * pParent = nullptr, const char * pszName = nullptr, bool fModal = true, WFlags fl = 0 );
 
     const bool atTop() const { return m_bAtTop; }
     const TQString target() const { return m_strTarget; }
diff --git a/part/kxesearchdialog.h b/part/kxesearchdialog.h
index 9d77da4..de2dc16 100644
--- a/part/kxesearchdialog.h
+++ b/part/kxesearchdialog.h
@@ -33,7 +33,7 @@ class KXESearchDialog : public KXESearchDialogBase
 		TQ_OBJECT
 
 	public:
-		KXESearchDialog( TQWidget * pParent, const char * pszName = 0, bool bModal = true );
+		KXESearchDialog( TQWidget * pParent, const char * pszName = nullptr, bool bModal = true );
 
 		TQString getSearchString() const { return m_pEditSearchedString->text(); }
 		bool getMatchCase() const { return m_pCheckBoxMatchCase->isChecked(); }
diff --git a/part/kxesettings.h b/part/kxesettings.h
index a44b3e4..4f823ea 100644
--- a/part/kxesettings.h
+++ b/part/kxesettings.h
@@ -42,7 +42,7 @@ class KXESettings : public TQObject
 		 * @param strConfigGroup the name of the corresponding group in the config file,
 		 *                       it is copied to the member @ref m_strConfigGroup
 		 */
-		KXESettings( const TQString & strConfigGroup, TQObject * pParent = 0, const char * pszName = 0 );
+		KXESettings( const TQString & strConfigGroup, TQObject * pParent = nullptr, const char * pszName = nullptr );
 
 		/**
 		 * Stores this settings to the given @ref TDEConfig object, by doing the
diff --git a/part/kxespecprocinstrdialog.h b/part/kxespecprocinstrdialog.h
index 9251647..2f8083d 100644
--- a/part/kxespecprocinstrdialog.h
+++ b/part/kxespecprocinstrdialog.h
@@ -31,7 +31,7 @@ class KXESpecProcInstrDialog : public KXESpecProcInstrDialogBase
    TQ_OBJECT
    
 public: 
-	KXESpecProcInstrDialog(TQWidget *parent=0, const char *name=0);
+	KXESpecProcInstrDialog(TQWidget *parent=nullptr, const char *name=nullptr);
 	~KXESpecProcInstrDialog();
 
   TQString getData();
diff --git a/part/kxetexteditordialog.h b/part/kxetexteditordialog.h
index a07f869..55f986d 100644
--- a/part/kxetexteditordialog.h
+++ b/part/kxetexteditordialog.h
@@ -35,7 +35,7 @@ class KXETextEditorDialog : public KXETextEditorDialogBase
 {
    TQ_OBJECT
 public:
-	KXETextEditorDialog(TQWidget *parent=0, const char *name=0);
+	KXETextEditorDialog(TQWidget *parent=nullptr, const char *name=nullptr);
 	~KXETextEditorDialog();
 
   TQString editorText() const { return m_pTextEditor->text(); }
diff --git a/part/kxetextviewsettings.cpp b/part/kxetextviewsettings.cpp
index b995ca9..00e143c 100644
--- a/part/kxetextviewsettings.cpp
+++ b/part/kxetextviewsettings.cpp
@@ -65,7 +65,7 @@ KXETextViewSettings::KXETextViewSettings( TQObject * pParent, const char * pszNa
    m_colorErrors( DFLT_VALUE_COLOR_ERRORS ),
    m_iIndentSteps( DFLT_VALUE_INDENT_STEPS ),
    m_bWrapOn(DFLT_VALUE_WRAP_ON),
-	 m_pDialogPage(0)
+	 m_pDialogPage(nullptr)
 	 
 {
 }
diff --git a/part/kxetextviewsettings.h b/part/kxetextviewsettings.h
index ab30df7..34eb7d7 100644
--- a/part/kxetextviewsettings.h
+++ b/part/kxetextviewsettings.h
@@ -34,7 +34,7 @@ class KXETextViewSettings : public KXESettings
 {
 	public:
 
-		KXETextViewSettings( TQObject * pParent = 0, const char * pszName = 0 );
+		KXETextViewSettings( TQObject * pParent = nullptr, const char * pszName = nullptr );
 
 		// The following functions can be used to access this object's settings.
 		const TQColor & colorDfltText() const { return m_colorDfltText; }
diff --git a/part/kxetreeviewsettings.cpp b/part/kxetreeviewsettings.cpp
index 3437a98..0a11875 100644
--- a/part/kxetreeviewsettings.cpp
+++ b/part/kxetreeviewsettings.cpp
@@ -55,7 +55,7 @@ KXETreeViewSettings::KXETreeViewSettings( TQObject * pParent, const char * pszNa
    m_bEnableDragging( DFLT_VALUE_ENABLE_DRAG ),
    m_bEnableDropping( DFLT_VALUE_ENABLE_DROP ),
    m_enmElemDisplMode( DFLT_VALUE_ELEM_DISPL_MODE ),
-   m_pDialogPage(0)
+   m_pDialogPage(nullptr)
 {
 }
 
diff --git a/part/kxetreeviewsettings.h b/part/kxetreeviewsettings.h
index ee016f6..b1d4786 100644
--- a/part/kxetreeviewsettings.h
+++ b/part/kxetreeviewsettings.h
@@ -39,7 +39,7 @@ class KXETreeViewSettings : public KXESettings
 			NamesAndValues
 		};
 
-		KXETreeViewSettings( TQObject * pParent = 0, const char * pszName = 0 );
+		KXETreeViewSettings( TQObject * pParent = nullptr, const char * pszName = nullptr );
 
 		// The following functions can be used to access this object's settings.
 		bool createItemsOnDemand() const { return m_bCreateItemsOnDemand; }
diff --git a/part/kxmleditorabout.h b/part/kxmleditorabout.h
index 05b54dd..7960f39 100644
--- a/part/kxmleditorabout.h
+++ b/part/kxmleditorabout.h
@@ -37,7 +37,7 @@ class KXMLEditorAboutData : public TDEAboutData
 		               description,
 		               TDEAboutData::License_GPL,
 		               "(c) 2001-2004, The KXML Editor Developers",
-		               0,
+		               nullptr,
 		               "http://kxmleditor.sourceforge.net",
 		               "lvanek@users.sourceforge.net" )
 		{
diff --git a/part/kxmleditorfactory.cpp b/part/kxmleditorfactory.cpp
index 02206e2..a4f16de 100644
--- a/part/kxmleditorfactory.cpp
+++ b/part/kxmleditorfactory.cpp
@@ -34,8 +34,8 @@ extern "C"
 	}
 } 
 
-TDEInstance * KXMLEditorFactory::s_instance = 0L;
-KXEConfiguration * KXMLEditorFactory::s_pKXEConfig = 0L;
+TDEInstance * KXMLEditorFactory::s_instance = nullptr;
+KXEConfiguration * KXMLEditorFactory::s_pKXEConfig = nullptr;
 
 KXMLEditorFactory::KXMLEditorFactory( TQObject * pParent, const char * pszName )
 	: KParts::Factory(pParent,pszName)
@@ -47,12 +47,12 @@ KXMLEditorFactory::~KXMLEditorFactory()
 	if ( s_pKXEConfig )
 		delete s_pKXEConfig;
 
-	s_pKXEConfig = 0L;
+	s_pKXEConfig = nullptr;
 
 	if (s_instance)
 		delete s_instance;
 
-	s_instance = 0L;
+	s_instance = nullptr;
 }
 
 KParts::Part * KXMLEditorFactory::createPartObject( TQWidget * pParentWidget, const char * pszWidgetName, TQObject * pParent, const char * pszName, const char * pszClassName, const TQStringList & )
@@ -61,8 +61,8 @@ KParts::Part * KXMLEditorFactory::createPartObject( TQWidget * pParentWidget, co
 	pParent = pParent;
 	pszName = pszName;
 
-	KParts::Part * pPart=0L;
-	KXEDocument* pDocument=0L;
+	KParts::Part * pPart=nullptr;
+	KXEDocument* pDocument=nullptr;
 	if ( TQCString(pszClassName) == "KParts::ReadOnlyPart" )
 	{
 		pDocument = new KXEDocument();
@@ -79,7 +79,7 @@ KParts::Part * KXMLEditorFactory::createPartObject( TQWidget * pParentWidget, co
 	else
 	{
 		kdError() << "KXMLEditorFactory::createPartObject: classname isn't KParts::ReadOnlyPart nor KParts::ReadWritePart." << endl;
-		return 0L;
+		return nullptr;
 	}
 
 
diff --git a/part/kxmleditorfactory.h b/part/kxmleditorfactory.h
index 69e399c..d305a1b 100644
--- a/part/kxmleditorfactory.h
+++ b/part/kxmleditorfactory.h
@@ -35,12 +35,12 @@ class KXMLEditorFactory : public KParts::Factory
 
 	public:
 		/** @brief Constructor  */
-		KXMLEditorFactory( TQObject * pParent = 0, const char * pszName = 0 );
+		KXMLEditorFactory( TQObject * pParent = nullptr, const char * pszName = nullptr );
 		/** @brief Destructor  */
 		virtual ~KXMLEditorFactory();
 
 		/** @short Creates part object, depending on given part class */
-		virtual KParts::Part * createPartObject( TQWidget * pParentWidget = 0, const char * pszWidgetName = 0, TQObject * pParent = 0, const char * pszName = 0, const char * pszClassName = "KParts::Part", const TQStringList & args = TQStringList() );
+		virtual KParts::Part * createPartObject( TQWidget * pParentWidget = nullptr, const char * pszWidgetName = nullptr, TQObject * pParent = nullptr, const char * pszName = nullptr, const char * pszClassName = "KParts::Part", const TQStringList & args = TQStringList() );
 
 		static TDEInstance * instance();
 		static KXEConfiguration * configuration();
diff --git a/part/kxmleditorpart.cpp b/part/kxmleditorpart.cpp
index 64d83fe..8900dc0 100644
--- a/part/kxmleditorpart.cpp
+++ b/part/kxmleditorpart.cpp
@@ -89,8 +89,8 @@
 
 KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, TQWidget * pParent, const char * pszName )
 	: KParts::ReadWritePart(pParent,pszName),
-	m_pDlgSearch(0),
-	m_pDocument(0)
+	m_pDlgSearch(nullptr),
+	m_pDocument(nullptr)
 {
 	//////////////////////////////
 	// INIT PART
@@ -99,11 +99,11 @@ KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, TQWidge
 	setInstance(KXMLEditorFactory::instance());
 
 	if(fReadWrite)
-		m_pBrowserExt = 0L; // Create Browser extension only for read-only part
+		m_pBrowserExt = nullptr; // Create Browser extension only for read-only part
 	else
 		m_pBrowserExt = new KXMLEditorBrowserExtension( this, "KXMLEditorPart browser extension" );
 	
-	m_pPrinter = 0L;
+	m_pPrinter = nullptr;
 
 	m_bAlreadyModified = false;
 
@@ -160,7 +160,7 @@ KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, TQWidge
 	new TDEAction( i18n("Clear Path Bar"), BarIcon("locationbar_erase", 16), 0, this,
 	             TQ_SLOT(slotPathClear()), actionCollection(), "path_clear" );
 	TQLabel *m_locationLabel = new ToolbarLabel( i18n("Path: ") );
-	new KWidgetAction( m_locationLabel, i18n("Path: "), 0, this, 0, actionCollection(), "path_label" );
+	new KWidgetAction( m_locationLabel, i18n("Path: "), 0, this, nullptr, actionCollection(), "path_label" );
 	m_locationLabel->setBuddy( m_pActPathCombo->comboBox());
 
 	if ( ! fReadWrite )
@@ -171,22 +171,22 @@ KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, TQWidge
 			KStdAction::copy( m_pBrowserExt, TQ_SLOT(slotEditCopy()), actionCollection(), "copy" );
 			KStdAction::paste( m_pBrowserExt, TQ_SLOT(slotEditPaste()), actionCollection(), "paste");
 			
-			m_pCmdHistory = 0L;
+			m_pCmdHistory = nullptr;
 			
-			m_pActVersionEncoding =  0L;
-			m_pActAttachSchema =  0L;
-			m_pActDetachSchema =  0L;
-			m_pActAttachStylesheet =  0L;
-			m_pActDetachStylesheet =  0L;
+			m_pActVersionEncoding =  nullptr;
+			m_pActAttachSchema =  nullptr;
+			m_pActDetachSchema =  nullptr;
+			m_pActAttachStylesheet =  nullptr;
+			m_pActDetachStylesheet =  nullptr;
 		}
 	else
 	{
 		// document specific actions here
-		m_pActVersionEncoding = new TDEAction( i18n("&Version && Encoding..."), 0, 0, this, TQ_SLOT(slotActVersionEncoding()), actionCollection(), "xml_ins_spec_procins" );
-		m_pActAttachSchema = new TDEAction(i18n("Attach Schema..."),0,0,this,TQ_SLOT(slotActAttachSchema()), actionCollection(), "xml_attach_schema");
-		m_pActDetachSchema = new TDEAction(i18n("Detach Schema"),0,0,this,TQ_SLOT(slotActDetachSchema()), actionCollection(), "xml_detach_schema");
-		m_pActAttachStylesheet = new TDEAction(i18n("Attach Stylesheet..."),0,0,this,TQ_SLOT(slotActAttachStylesheet()), actionCollection(), "xml_attach_stylesheet");
-		m_pActDetachStylesheet = new TDEAction(i18n("Detach Stylesheet"),0,0,this,TQ_SLOT(slotActDetachStylesheet()), actionCollection(), "xml_detach_stylesheet");
+		m_pActVersionEncoding = new TDEAction( i18n("&Version && Encoding..."), nullptr, 0, this, TQ_SLOT(slotActVersionEncoding()), actionCollection(), "xml_ins_spec_procins" );
+		m_pActAttachSchema = new TDEAction(i18n("Attach Schema..."),nullptr,0,this,TQ_SLOT(slotActAttachSchema()), actionCollection(), "xml_attach_schema");
+		m_pActDetachSchema = new TDEAction(i18n("Detach Schema"),nullptr,0,this,TQ_SLOT(slotActDetachSchema()), actionCollection(), "xml_detach_schema");
+		m_pActAttachStylesheet = new TDEAction(i18n("Attach Stylesheet..."),nullptr,0,this,TQ_SLOT(slotActAttachStylesheet()), actionCollection(), "xml_attach_stylesheet");
+		m_pActDetachStylesheet = new TDEAction(i18n("Detach Stylesheet"),nullptr,0,this,TQ_SLOT(slotActDetachStylesheet()), actionCollection(), "xml_detach_stylesheet");
 		
 		KStdAction::print( this, TQ_SLOT(slotActPrint()), actionCollection(), "print" );
 		
@@ -219,11 +219,11 @@ KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, TQWidge
 
 		// Edit node properties
 		m_pActProperties = new TDEAction(i18n("&Properties..."),"edit",0,this,TQ_SLOT(slotActProperties()),actionCollection(),"edit_properties");
-		m_pActEditRawXml = new TDEAction(i18n("Edit &raw XML..."), 0, 0, this, TQ_SLOT(slotActEditRawXml()),actionCollection(),"edit_as_raw_xml");
+		m_pActEditRawXml = new TDEAction(i18n("Edit &raw XML..."), nullptr, 0, this, TQ_SLOT(slotActEditRawXml()),actionCollection(),"edit_as_raw_xml");
 
 		// delete actions
 		m_pActXmlAttributeDel = new TDEAction( i18n("&Delete"), "editdelete", 0, this, TQ_SLOT(slotXmlAttributeDel()), actionCollection(), "xml_del_attribute" );
-		m_pActXmlAttributesDel = new TDEAction( i18n("Delete all Attributes..."), 0, 0, this, TQ_SLOT(slotXmlAttributesDel()), actionCollection(), "xml_del_attributes" );
+		m_pActXmlAttributesDel = new TDEAction( i18n("Delete all Attributes..."), nullptr, 0, this, TQ_SLOT(slotXmlAttributesDel()), actionCollection(), "xml_del_attributes" );
 		m_pActDelete = new TDEAction(i18n("&Delete"),"editdelete",0,this,TQ_SLOT(slotActDelete()),actionCollection(),"edit_delete");
 
 		setXMLFile( "kxmleditorpartEditUI.rc", true );
@@ -550,7 +550,7 @@ void KXMLEditorPart::slotEditPaste()
 
 	if (document()->documentElement().isNull())
 	{
-		pasteNode(0, TQApplication::clipboard()->data());
+		pasteNode(nullptr, TQApplication::clipboard()->data());
 	}
 	else
 	{
@@ -706,7 +706,7 @@ void KXMLEditorPart::slotActEditRawXml()
 	int iIndent = KXMLEditorFactory::configuration()->textview()->indentSteps();
 	pNode->save(streamXML, iIndent);
 
-	KXETextEditorDialog dlg(0, "Text dialog");
+	KXETextEditorDialog dlg(nullptr, "Text dialog");
 	dlg.setEditorText(strXML);
 	if((dlg.exec() == TQDialog::Accepted) && (strXML != dlg.editorText()))
 	{
@@ -787,7 +787,7 @@ void KXMLEditorPart::slotXmlAttributesDel()
 		return;
 	}
 
-	if(KMessageBox::questionYesNo(0, i18n("Remove all attributes from selected node ?")) != KMessageBox::Yes)
+	if(KMessageBox::questionYesNo(nullptr, i18n("Remove all attributes from selected node ?")) != KMessageBox::Yes)
 		return;
 
 	emit setStatusBarText( i18n("Delete all attributes...") );
@@ -1235,7 +1235,7 @@ void KXMLEditorPart::slotAttributeValueChangedInplace( const TQDomAttr & domAttr
 /** Copy XML node into clipboard */
 TQTextDrag * KXMLEditorPart::copyNode(TQDomNode * pNode)
 {
-	TQTextDrag *pDrag = 0;
+	TQTextDrag *pDrag = nullptr;
 	TQString strXML;
 
 	TQTextStream streamXML(&strXML, IO_WriteOnly);
@@ -1277,7 +1277,7 @@ bool KXMLEditorPart::pasteNode(TQDomNode * pTargetNode, TQMimeSource *data)
   if(TQTextDrag::decode(data, strText))
 		{ if(strText.find("<?xml ") == 0)
       {
-        KMessageBox::sorry(0, i18n("This processing instruction cannot be pasted here !"));
+        KMessageBox::sorry(nullptr, i18n("This processing instruction cannot be pasted here !"));
         return false;
       }
 
@@ -1302,7 +1302,7 @@ bool KXMLEditorPart::pasteNode(TQDomNode * pTargetNode, TQMimeSource *data)
 
 			// Import parsed document to main document
 			if(doc.hasChildNodes())
-				{ if(pTargetNode == 0)
+				{ if(!pTargetNode)
 						{ // check if root item already exists
               if(!document()->documentElement().isNull() /*(this->documentElement().isElement())*/ && (doc.firstChild().firstChild().isElement()) )
               { KMessageBox::sorry(m_pViewTree, i18n("Root element already exists !"));
@@ -1744,7 +1744,7 @@ void KXMLEditorPart::updateNodeDeleted( const TQDomNode & node )
 	m_pViewTree->updateNodeDeleted(node);
 
 	// if root element deleted, enable Insert Element
-	if(node.isElement() && (m_pViewTree->firstChild() == 0) && (isReadWrite()))
+	if(node.isElement() && !m_pViewTree->firstChild() && isReadWrite())
 	m_pActXmlElementInsert->setEnabled(true);
 }
 
@@ -1843,7 +1843,7 @@ void KXMLEditorPart::setDocument(KXEDocument *pDocument)
 	// detach previously used document
 	if (m_pDocument)
 	{
-		disconnect (m_pDocument,0,this,0);
+		disconnect (m_pDocument,nullptr,this,nullptr);
 	}
 	m_pDocument = pDocument;
 	if (pDocument)
-- 
cgit v1.2.3

