From 9bcb7fc97e60cf4dc1561a3e0850173ed486e91c Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Wed, 18 Nov 2026 10:00:42 -0300
Subject: Use nullptr in editor interfaces and plugins
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>
---
 interfaces/khexedit/byteseditinterface.h           |  2 +-
 interfaces/tdeimproxy/library/tdeimproxy.cpp       |  6 +-
 interfaces/tdemediaplayer/player.cpp               |  4 +-
 .../tdefileaudiopreview/tdefileaudiopreview.cpp    |  2 +-
 .../tdefileaudiopreview/tdefileaudiopreview.h      |  2 +-
 interfaces/tdemediaplayer/view.cpp                 |  2 +-
 interfaces/tdescript/sample/shellscript.h          |  2 +-
 interfaces/tdescript/scriptinterface.h             |  2 +-
 interfaces/tdescript/scriptloader.cpp              |  2 +-
 interfaces/tdescript/scriptloader.h                |  2 +-
 interfaces/tdescript/scriptmanager.cpp             |  4 +-
 interfaces/tdescript/scriptmanager.h               |  2 +-
 .../tdetexteditor/blockselectioninterface.cpp      |  4 +-
 interfaces/tdetexteditor/clipboardinterface.cpp    |  4 +-
 .../tdetexteditor/codecompletioninterface.cpp      |  2 +-
 interfaces/tdetexteditor/configinterface.cpp       |  4 +-
 .../tdetexteditor/configinterfaceextension.cpp     |  4 +-
 .../tdetexteditor/configinterfaceextension.h       |  4 +-
 interfaces/tdetexteditor/cursorinterface.cpp       |  2 +-
 interfaces/tdetexteditor/document.h                |  6 +-
 interfaces/tdetexteditor/documentinfo.cpp          |  2 +-
 interfaces/tdetexteditor/dynwordwrapinterface.cpp  |  2 +-
 interfaces/tdetexteditor/editinterface.cpp         |  4 +-
 interfaces/tdetexteditor/editinterfaceext.cpp      |  4 +-
 interfaces/tdetexteditor/editor.h                  |  4 +-
 interfaces/tdetexteditor/editorchooser.cpp         |  8 +-
 interfaces/tdetexteditor/editorchooser.h           |  8 +-
 interfaces/tdetexteditor/encodinginterface.cpp     |  4 +-
 interfaces/tdetexteditor/highlightinginterface.cpp |  2 +-
 interfaces/tdetexteditor/markinterface.cpp         |  2 +-
 .../tdetexteditor/markinterfaceextension.cpp       |  2 +-
 interfaces/tdetexteditor/plugin.h                  |  4 +-
 interfaces/tdetexteditor/popupmenuinterface.cpp    |  2 +-
 interfaces/tdetexteditor/printinterface.cpp        |  4 +-
 interfaces/tdetexteditor/searchinterface.cpp       |  4 +-
 interfaces/tdetexteditor/selectioninterface.cpp    |  6 +-
 interfaces/tdetexteditor/selectioninterfaceext.cpp |  6 +-
 .../tdetexteditor/sessionconfiginterface.cpp       |  6 +-
 interfaces/tdetexteditor/tdetexteditor.cpp         |  4 +-
 interfaces/tdetexteditor/templateinterface.cpp     |  6 +-
 interfaces/tdetexteditor/templateinterface.h       |  4 +-
 interfaces/tdetexteditor/texthintinterface.cpp     |  2 +-
 interfaces/tdetexteditor/undointerface.cpp         |  4 +-
 interfaces/tdetexteditor/variableinterface.cpp     |  2 +-
 interfaces/tdetexteditor/view.h                    |  2 +-
 interfaces/tdetexteditor/viewcursorinterface.cpp   |  4 +-
 .../tdetexteditor/viewstatusmsginterface.cpp       |  4 +-
 interfaces/tdetexteditor/wordwrapinterface.cpp     |  2 +-
 kate/interfaces/document.h                         | 18 ++---
 kate/interfaces/interfaces.cpp                     |  8 +-
 kate/interfaces/katecmd.cpp                        |  2 +-
 kate/interfaces/view.h                             | 10 +--
 kate/part/katearbitraryhighlight.cpp               |  2 +-
 kate/part/katearbitraryhighlight.h                 | 10 +--
 kate/part/kateautoindent.cpp                       |  4 +-
 kate/part/kateautoindent.h                         |  6 +-
 kate/part/katebookmarks.cpp                        |  6 +-
 kate/part/katebuffer.cpp                           | 58 ++++++-------
 kate/part/katebuffer.h                             | 14 ++--
 kate/part/katecmds.cpp                             |  2 +-
 kate/part/katecodecompletion.cpp                   | 16 ++--
 kate/part/katecodecompletion.h                     |  2 +-
 kate/part/katecodefoldinghelpers.cpp               |  4 +-
 kate/part/kateconfig.cpp                           | 14 ++--
 kate/part/katedialogs.cpp                          | 16 ++--
 kate/part/katedialogs.h                            |  4 +-
 kate/part/katedocument.cpp                         | 94 +++++++++++-----------
 kate/part/katedocument.h                           | 34 ++++----
 kate/part/katefactory.cpp                          | 12 +--
 kate/part/katefiletype.cpp                         | 16 ++--
 kate/part/katefiletype.h                           |  2 +-
 kate/part/katefont.cpp                             |  2 +-
 kate/part/katehighlight.cpp                        | 56 ++++++-------
 kate/part/katehighlight.h                          |  4 +-
 kate/part/kateindentscriptabstracts.h              |  4 +-
 kate/part/katejscript.cpp                          | 26 +++---
 kate/part/kateprinter.cpp                          | 12 +--
 kate/part/kateprinter.h                            |  6 +-
 kate/part/katerenderer.cpp                         | 10 +--
 kate/part/katerenderer.h                           |  6 +-
 kate/part/kateschema.cpp                           | 16 ++--
 kate/part/kateschema.h                             | 14 ++--
 kate/part/katesearch.cpp                           |  4 +-
 kate/part/katespell.cpp                            |  8 +-
 kate/part/katesupercursor.h                        | 16 ++--
 kate/part/katesyntaxdocument.cpp                   | 10 +--
 kate/part/katetemplatehandler.cpp                  |  8 +-
 kate/part/katetextline.cpp                         |  2 +-
 kate/part/katetextline.h                           |  2 +-
 kate/part/kateview.cpp                             | 26 +++---
 kate/part/kateview.h                               |  2 +-
 kate/part/kateviewhelpers.cpp                      | 14 ++--
 kate/part/kateviewhelpers.h                        |  4 +-
 kate/part/kateviewinternal.cpp                     | 12 +--
 kate/part/kateviewinternal.h                       |  2 +-
 kate/part/test_regression.cpp                      |  6 +-
 kate/part/test_regression.h                        |  4 +-
 kate/plugins/autobookmarker/autobookmarker.cpp     |  2 +-
 kate/plugins/autobookmarker/autobookmarker.h       |  4 +-
 kate/plugins/insertfile/insertfileplugin.cpp       | 10 +--
 kate/plugins/insertfile/insertfileplugin.h         |  6 +-
 kate/plugins/isearch/ISearchPlugin.cpp             | 34 ++++----
 kate/plugins/isearch/ISearchPlugin.h               |  2 +-
 kate/plugins/kdatatool/kate_kdatatool.cpp          |  6 +-
 kate/plugins/kdatatool/kate_kdatatool.h            |  2 +-
 kate/plugins/wordcompletion/docwordcompletion.h    |  8 +-
 106 files changed, 437 insertions(+), 437 deletions(-)

diff --git a/interfaces/khexedit/byteseditinterface.h b/interfaces/khexedit/byteseditinterface.h
index bfeaa43e5..4389075ba 100644
--- a/interfaces/khexedit/byteseditinterface.h
+++ b/interfaces/khexedit/byteseditinterface.h
@@ -218,7 +218,7 @@ inline BytesEditInterface *bytesEditInterface( T *t )
   * @see BytesEditInterface, ValueColumnInterface, CharColumnInterface, ZoomInterface, ClipboardInterface
   * @since 3.2
   */
-inline TQWidget *createBytesEditWidget( TQWidget *Parent = 0, const char *Name = 0 )
+inline TQWidget *createBytesEditWidget( TQWidget *Parent = nullptr, const char *Name = nullptr )
 {
   return KParts::ComponentFactory::createInstanceFromQuery<TQWidget>
       ( TQString::fromLatin1("KHexEdit/KBytesEdit"), TQString::null, Parent, Name );
diff --git a/interfaces/tdeimproxy/library/tdeimproxy.cpp b/interfaces/tdeimproxy/library/tdeimproxy.cpp
index 627d66914..2db77349e 100644
--- a/interfaces/tdeimproxy/library/tdeimproxy.cpp
+++ b/interfaces/tdeimproxy/library/tdeimproxy.cpp
@@ -39,7 +39,7 @@
 
 static KStaticDeleter<KIMProxy> _staticDeleter;
 
-KIMProxy * KIMProxy::s_instance = 0L;
+KIMProxy * KIMProxy::s_instance = nullptr;
 
 struct AppPresenceCurrent
 {
@@ -172,7 +172,7 @@ KIMProxy * KIMProxy::instance( DCOPClient * client )
 		return s_instance;
 	}
 	else
-		return 0L;
+		return nullptr;
 }
 
 KIMProxy::KIMProxy( DCOPClient* dc ) : DCOPObject( "KIMProxyIface" ), TQObject(), d( new Private )
@@ -638,7 +638,7 @@ KIMIface_stub * KIMProxy::stubForProtocol( const TQString &protocol)
 		if ( it.current()->protocols().grep( protocol ).count() > 0 )
 			return it.current();
 	}	
-	return 0L;
+	return nullptr;
 }
 
 TQString KIMProxy::preferredApp()
diff --git a/interfaces/tdemediaplayer/player.cpp b/interfaces/tdemediaplayer/player.cpp
index 2d97aa1f7..627ff27e6 100644
--- a/interfaces/tdemediaplayer/player.cpp
+++ b/interfaces/tdemediaplayer/player.cpp
@@ -32,7 +32,7 @@ KMediaPlayer::Player::Player(TQWidget *, const char *, TQObject *parent, const c
 	: KParts::ReadOnlyPart(parent, name)
 	, currentLooping(false)
 	, currentState(Empty)
-	, d(0)
+	, d(nullptr)
 {
 }
 
@@ -40,7 +40,7 @@ KMediaPlayer::Player::Player(TQObject *parent, const char *name)
 	: KParts::ReadOnlyPart(parent, name)
 	, currentLooping(false)
 	, currentState(Empty)
-	, d(0)
+	, d(nullptr)
 {
 }
 
diff --git a/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.cpp b/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.cpp
index be0f92111..ac84fd244 100644
--- a/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.cpp
+++ b/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.cpp
@@ -70,7 +70,7 @@ KFileAudioPreview::KFileAudioPreview( TQWidget *parent, const char *name )
 
     (void) new TQWidget( box ); // spacer
 
-    d = new KFileAudioPreviewPrivate( 0L ); // not box -- being reparented anyway
+    d = new KFileAudioPreviewPrivate( nullptr ); // not box -- being reparented anyway
     if ( d->player ) // only if there actually is a component...
     {
         setSupportedMimeTypes( formats );
diff --git a/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.h b/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.h
index f67533df2..63b092487 100644
--- a/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.h
+++ b/interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.h
@@ -39,7 +39,7 @@ class KFileAudioPreview : public KPreviewWidgetBase
     TQ_OBJECT
 
 public:
-    KFileAudioPreview(TQWidget *parent = 0, const char *name = 0 );
+    KFileAudioPreview(TQWidget *parent = nullptr, const char *name = nullptr );
     ~KFileAudioPreview();
 
 public slots:
diff --git a/interfaces/tdemediaplayer/view.cpp b/interfaces/tdemediaplayer/view.cpp
index 87d1d78a5..5c169e449 100644
--- a/interfaces/tdemediaplayer/view.cpp
+++ b/interfaces/tdemediaplayer/view.cpp
@@ -25,7 +25,7 @@
 
 struct KMediaPlayer::View::Data
 {
-	Data() : videoWidget(0L) {}
+	Data() : videoWidget(nullptr) {}
 
 	TQWidget *videoWidget;
 };
diff --git a/interfaces/tdescript/sample/shellscript.h b/interfaces/tdescript/sample/shellscript.h
index dc62dde33..7fba17bd1 100644
--- a/interfaces/tdescript/sample/shellscript.h
+++ b/interfaces/tdescript/sample/shellscript.h
@@ -33,7 +33,7 @@ public:
 	TQString script() const;
 	void setScript( const TQString &scriptFile );
 	void setScript( const TQString &scriptLibFile, const TQString &method );
-	void run(TQObject *context = 0, const TQVariant &arg = 0);
+	void run(TQObject *context = nullptr, const TQVariant &arg = 0);
 	void kill();
 private slots:
 	void Exit(TDEProcess *proc);
diff --git a/interfaces/tdescript/scriptinterface.h b/interfaces/tdescript/scriptinterface.h
index d52c0f85a..ecfa47764 100644
--- a/interfaces/tdescript/scriptinterface.h
+++ b/interfaces/tdescript/scriptinterface.h
@@ -68,7 +68,7 @@ class KScriptClientInterface;
 		*	This can both take a context object that will be shared between the
 		*	main application and a variant that will contain the arguments.
 		**/
-		virtual void run(TQObject *context = 0, const TQVariant &arg = 0) = 0;
+		virtual void run(TQObject *context = nullptr, const TQVariant &arg = 0) = 0;
 		/**
 		*	Abort the scripts run
 		**/
diff --git a/interfaces/tdescript/scriptloader.cpp b/interfaces/tdescript/scriptloader.cpp
index 916ad2c74..ffe4dedb6 100644
--- a/interfaces/tdescript/scriptloader.cpp
+++ b/interfaces/tdescript/scriptloader.cpp
@@ -72,7 +72,7 @@ TDESelectAction * ScriptLoader::getScripts()
 			TDEDesktopFile desktop((fi->absFilePath()), true);
 			kdDebug () << "Trying to load script type: " << desktop.readType() << endl;
 			KScriptInterface *tmpIface = KParts::ComponentFactory::createInstanceFromQuery<KScriptInterface>(desktop.readType() );
-			if( tmpIface != 0 )
+			if( tmpIface )
 			{
 				m_scripts.append(tmpIface);			
 				m_scripts.current()->setScript(desktop.readURL());
diff --git a/interfaces/tdescript/scriptloader.h b/interfaces/tdescript/scriptloader.h
index ece776c6d..03ae73bf5 100644
--- a/interfaces/tdescript/scriptloader.h
+++ b/interfaces/tdescript/scriptloader.h
@@ -33,7 +33,7 @@ class ScriptLoader : virtual public TQObject
 		/** 
 		* Default Constructor
 		*/
-		ScriptLoader(TDEMainWindow *parent=0);
+		ScriptLoader(TDEMainWindow *parent=nullptr);
 		~ScriptLoader();
 		/** Return the a TDESelectAction with all of the scripts
 		 * @returns TDESelectAction containing access to all of the scripts
diff --git a/interfaces/tdescript/scriptmanager.cpp b/interfaces/tdescript/scriptmanager.cpp
index 1f546485a..e7b392db2 100644
--- a/interfaces/tdescript/scriptmanager.cpp
+++ b/interfaces/tdescript/scriptmanager.cpp
@@ -103,7 +103,7 @@ void KScriptManager::runScript( const TQString &scriptName, TQObject *context, c
                         }
                         else
                         {
-                          KMessageBox::sorry(0, i18n("Unable to get KScript Runner for type \"%1\".").arg(newScript->scriptType), i18n("KScript Error"));
+                          KMessageBox::sorry(nullptr, i18n("Unable to get KScript Runner for type \"%1\".").arg(newScript->scriptType), i18n("KScript Error"));
                           return;
                         }
 		}
@@ -126,7 +126,7 @@ void KScriptManager::runScript( const TQString &scriptName, TQObject *context, c
 		}
 	}
 	else
-	  KMessageBox::sorry(0, i18n("Unable find script \"%1\".").arg(scriptName), i18n("KScript Error"));
+	  KMessageBox::sorry(nullptr, i18n("Unable find script \"%1\".").arg(scriptName), i18n("KScript Error"));
 }
 #include "scriptmanager.moc"
 #include "scriptinterface.moc"
diff --git a/interfaces/tdescript/scriptmanager.h b/interfaces/tdescript/scriptmanager.h
index 82ca96dc7..42a0f0473 100644
--- a/interfaces/tdescript/scriptmanager.h
+++ b/interfaces/tdescript/scriptmanager.h
@@ -102,7 +102,7 @@ class ScriptInfo;
 		/**
 		*	Run the selected script
 		*/
-		void runScript( const TQString &scriptName, TQObject *context = 0, const TQVariant &arg = 0 );
+		void runScript( const TQString &scriptName, TQObject *context = nullptr, const TQVariant &arg = 0 );
 	signals:
 		/**
 		*	Send out a signal of the error message from the current running
diff --git a/interfaces/tdetexteditor/blockselectioninterface.cpp b/interfaces/tdetexteditor/blockselectioninterface.cpp
index 6d562a43e..0bf752f4a 100644
--- a/interfaces/tdetexteditor/blockselectioninterface.cpp
+++ b/interfaces/tdetexteditor/blockselectioninterface.cpp
@@ -28,7 +28,7 @@ namespace KTextEditor
 class PrivateBlockSelectionInterface
 {
   public:
-    PrivateBlockSelectionInterface() {interface = 0;}
+    PrivateBlockSelectionInterface() {interface = nullptr;}
     ~PrivateBlockSelectionInterface() {}
     BlockSelectionDCOPInterface *interface;
 };
@@ -68,7 +68,7 @@ void BlockSelectionInterface::setBlockSelectionInterfaceDCOPSuffix (const TQCStr
 BlockSelectionInterface *KTextEditor::blockSelectionInterface (Document *doc)
 {
   if (!doc)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::BlockSelectionInterface*>(doc);
 }
diff --git a/interfaces/tdetexteditor/clipboardinterface.cpp b/interfaces/tdetexteditor/clipboardinterface.cpp
index 89f92d089..821a570f2 100644
--- a/interfaces/tdetexteditor/clipboardinterface.cpp
+++ b/interfaces/tdetexteditor/clipboardinterface.cpp
@@ -12,7 +12,7 @@ namespace KTextEditor
 	public:
 		PrivateClipboardInterface()
 		{
-		interface = 0;
+		interface = nullptr;
 		}
 		~PrivateClipboardInterface(){}
 	// Data Members
@@ -50,7 +50,7 @@ void ClipboardInterface::setClipboardInterfaceDCOPSuffix (const TQCString &suffi
 ClipboardInterface *KTextEditor::clipboardInterface (View *view)
 {                                    
   if (!view)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::ClipboardInterface*>(view);
 }
diff --git a/interfaces/tdetexteditor/codecompletioninterface.cpp b/interfaces/tdetexteditor/codecompletioninterface.cpp
index 416dd593a..b3ff5d52f 100644
--- a/interfaces/tdetexteditor/codecompletioninterface.cpp
+++ b/interfaces/tdetexteditor/codecompletioninterface.cpp
@@ -43,7 +43,7 @@ void CodeCompletionInterface::setCodeCompletionInterfaceDCOPSuffix (const TQCStr
 CodeCompletionInterface *KTextEditor::codeCompletionInterface (View *view)
 {                
   if (!view)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::CodeCompletionInterface*>(view);
 }
diff --git a/interfaces/tdetexteditor/configinterface.cpp b/interfaces/tdetexteditor/configinterface.cpp
index 63bf086e0..a9c8fd184 100644
--- a/interfaces/tdetexteditor/configinterface.cpp
+++ b/interfaces/tdetexteditor/configinterface.cpp
@@ -65,7 +65,7 @@ void ConfigInterface::setConfigInterfaceDCOPSuffix (const TQCString &/*suffix*/)
 ConfigInterface *KTextEditor::configInterface (Document *doc)
 {                       
   if (!doc)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::ConfigInterface*>(doc);
 }      
@@ -73,7 +73,7 @@ ConfigInterface *KTextEditor::configInterface (Document *doc)
 ConfigInterface *KTextEditor::configInterface (Plugin *plugin)
 {                       
   if (!plugin)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::ConfigInterface*>(plugin);
 }
diff --git a/interfaces/tdetexteditor/configinterfaceextension.cpp b/interfaces/tdetexteditor/configinterfaceextension.cpp
index 460d930a4..4772acbf8 100644
--- a/interfaces/tdetexteditor/configinterfaceextension.cpp
+++ b/interfaces/tdetexteditor/configinterfaceextension.cpp
@@ -70,7 +70,7 @@ void ConfigInterfaceExtension::setConfigInterfaceExtensionDCOPSuffix (const TQCS
 ConfigInterfaceExtension *KTextEditor::configInterfaceExtension (Document *doc)
 {           
   if (!doc)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::ConfigInterfaceExtension*>(doc);
 }
@@ -78,7 +78,7 @@ ConfigInterfaceExtension *KTextEditor::configInterfaceExtension (Document *doc)
 ConfigInterfaceExtension *KTextEditor::configInterfaceExtension (Plugin *plugin)
 {                       
   if (!plugin)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::ConfigInterfaceExtension*>(plugin);
 }
diff --git a/interfaces/tdetexteditor/configinterfaceextension.h b/interfaces/tdetexteditor/configinterfaceextension.h
index f640ab0c5..02e65d2df 100644
--- a/interfaces/tdetexteditor/configinterfaceextension.h
+++ b/interfaces/tdetexteditor/configinterfaceextension.h
@@ -31,7 +31,7 @@ class KTEXTEDITOR_EXPORT ConfigPage : public TQWidget
   TQ_OBJECT
 
   public:
-    ConfigPage ( TQWidget *parent=0, const char *name=0 );
+    ConfigPage ( TQWidget *parent=nullptr, const char *name=nullptr );
     virtual ~ConfigPage ();
 
   //
@@ -91,7 +91,7 @@ class KTEXTEDITOR_EXPORT ConfigInterfaceExtension
       config pages from 0 to configPages()-1 are available
       if configPages() > 0
     */ 
-    virtual ConfigPage *configPage (uint number = 0, TQWidget *parent = 0, const char *name=0 ) = 0;
+    virtual ConfigPage *configPage (uint number = 0, TQWidget *parent = nullptr, const char *name=nullptr ) = 0;
   
     virtual TQString configPageName (uint number = 0) const = 0;
     virtual TQString configPageFullName (uint number = 0) const = 0;
diff --git a/interfaces/tdetexteditor/cursorinterface.cpp b/interfaces/tdetexteditor/cursorinterface.cpp
index 96d00290e..2ec7879bd 100644
--- a/interfaces/tdetexteditor/cursorinterface.cpp
+++ b/interfaces/tdetexteditor/cursorinterface.cpp
@@ -63,7 +63,7 @@ void CursorInterface::setCursorInterfaceDCOPSuffix (const TQCString &/*suffix*/)
 CursorInterface *KTextEditor::cursorInterface (Document *doc)
 {               
   if (!doc)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::CursorInterface*>(doc);
 }
diff --git a/interfaces/tdetexteditor/document.h b/interfaces/tdetexteditor/document.h
index 817389ba3..595e516d4 100644
--- a/interfaces/tdetexteditor/document.h
+++ b/interfaces/tdetexteditor/document.h
@@ -36,7 +36,7 @@ class KTEXTEDITOR_EXPORT Document : public KTextEditor::Editor
   
 
   public:
-    Document ( TQObject *parent = 0, const char *name = 0 );
+    Document ( TQObject *parent = nullptr, const char *name = nullptr );
     virtual ~Document ();
 
     /**
@@ -54,7 +54,7 @@ class KTEXTEDITOR_EXPORT Document : public KTextEditor::Editor
     * views as you like. When the user modifies data in one view then all other
     * views will be updated as well.
     */
-    virtual class View *createView ( TQWidget *parent, const char *name = 0 ) = 0;
+    virtual class View *createView ( TQWidget *parent, const char *name = nullptr ) = 0;
 
     /*
     * Returns a list of all views of this document.
@@ -78,7 +78,7 @@ class KTEXTEDITOR_EXPORT Document : public KTextEditor::Editor
     long myDocumentListPosition;
 };
 
-KTEXTEDITOR_EXPORT Document *createDocument ( const char* libname, TQObject *parent = 0, const char *name = 0 );
+KTEXTEDITOR_EXPORT Document *createDocument ( const char* libname, TQObject *parent = nullptr, const char *name = nullptr );
 
 }
 
diff --git a/interfaces/tdetexteditor/documentinfo.cpp b/interfaces/tdetexteditor/documentinfo.cpp
index c675bfb5f..1be45f529 100644
--- a/interfaces/tdetexteditor/documentinfo.cpp
+++ b/interfaces/tdetexteditor/documentinfo.cpp
@@ -27,7 +27,7 @@ namespace KTextEditor
 class PrivateDocumentInfoInterface
 {
   public:
-    PrivateDocumentInfoInterface() {interface = 0;}
+    PrivateDocumentInfoInterface() {interface = nullptr;}
     ~PrivateDocumentInfoInterface() {}
     DocumentInfoDCOPInterface *interface;
 };
diff --git a/interfaces/tdetexteditor/dynwordwrapinterface.cpp b/interfaces/tdetexteditor/dynwordwrapinterface.cpp
index 9c1da6d4b..c467c971e 100644
--- a/interfaces/tdetexteditor/dynwordwrapinterface.cpp
+++ b/interfaces/tdetexteditor/dynwordwrapinterface.cpp
@@ -63,7 +63,7 @@ void DynWordWrapInterface::setDynWordWrapInterfaceDCOPSuffix (const TQCString &/
 DynWordWrapInterface *KTextEditor::dynWordWrapInterface (View *view)
 {           
   if (!view)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::DynWordWrapInterface*>(view);
 }
diff --git a/interfaces/tdetexteditor/editinterface.cpp b/interfaces/tdetexteditor/editinterface.cpp
index cfa0b67bc..d9022de1d 100644
--- a/interfaces/tdetexteditor/editinterface.cpp
+++ b/interfaces/tdetexteditor/editinterface.cpp
@@ -11,7 +11,7 @@ namespace KTextEditor
   public:
     PrivateEditInterface()
     {
-    interface = 0;
+    interface = nullptr;
     }
     ~PrivateEditInterface(){}
   // Data Members
@@ -50,7 +50,7 @@ void EditInterface::setEditInterfaceDCOPSuffix (const TQCString &suffix)
 EditInterface *KTextEditor::editInterface (Document *doc)
 {                    
   if (!doc)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::EditInterface*>(doc);
 }
diff --git a/interfaces/tdetexteditor/editinterfaceext.cpp b/interfaces/tdetexteditor/editinterfaceext.cpp
index 008fa488d..d38f6ec7d 100644
--- a/interfaces/tdetexteditor/editinterfaceext.cpp
+++ b/interfaces/tdetexteditor/editinterfaceext.cpp
@@ -25,7 +25,7 @@ using namespace KTextEditor;
 uint EditInterfaceExt::globalEditInterfaceExtNumber = 0;
 
 EditInterfaceExt::EditInterfaceExt()
-	: d(0L)
+	: d(nullptr)
 {
   globalEditInterfaceExtNumber++;
   myEditInterfaceExtNumber = globalEditInterfaceExtNumber;
@@ -43,7 +43,7 @@ uint EditInterfaceExt::editInterfaceExtNumber() const
 EditInterfaceExt *KTextEditor::editInterfaceExt (Document *doc)
 {
   if (!doc)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::EditInterfaceExt*>(doc);
 }
diff --git a/interfaces/tdetexteditor/editor.h b/interfaces/tdetexteditor/editor.h
index 475711a9d..fbb228163 100644
--- a/interfaces/tdetexteditor/editor.h
+++ b/interfaces/tdetexteditor/editor.h
@@ -47,7 +47,7 @@ class KTEXTEDITOR_EXPORT Editor : public KParts::ReadWritePart
     /**
     * Create a new editor widget.
     */
-    Editor ( TQObject *parent = 0, const char *name = 0  );
+    Editor ( TQObject *parent = nullptr, const char *name = nullptr  );
     virtual ~Editor ();
     
     unsigned int editorNumber () const;
@@ -58,7 +58,7 @@ class KTEXTEDITOR_EXPORT Editor : public KParts::ReadWritePart
     unsigned int myEditorNumber;
 };     
 
-KTEXTEDITOR_EXPORT Editor *createEditor ( const char* libname, TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject *parent = 0, const char *name = 0 );
+KTEXTEDITOR_EXPORT Editor *createEditor ( const char* libname, TQWidget *parentWidget = nullptr, const char *widgetName = nullptr, TQObject *parent = nullptr, const char *name = nullptr );
 
 }
 
diff --git a/interfaces/tdetexteditor/editorchooser.cpp b/interfaces/tdetexteditor/editorchooser.cpp
index 0fc06bd9e..9ec7ba2ad 100644
--- a/interfaces/tdetexteditor/editorchooser.cpp
+++ b/interfaces/tdetexteditor/editorchooser.cpp
@@ -103,7 +103,7 @@ void EditorChooser::writeAppSetting(const TQString& postfix){
 
 KTextEditor::Document *EditorChooser::createDocument(TQObject *parent,const char* name, const TQString& postfix,bool fallBackToKatePart){
 
-	KTextEditor::Document *tmpDoc=0;
+	KTextEditor::Document *tmpDoc=nullptr;
 
 	TDEConfig *cfg=tdeApp->config();
         TQString previousGroup=cfg->group();
@@ -127,13 +127,13 @@ KTextEditor::Document *EditorChooser::createDocument(TQObject *parent,const char
 	if (fallBackToKatePart)
 		return KTextEditor::createDocument("libkatepart",parent,name);
 
-	return 0;
+	return nullptr;
 }
 
 KTextEditor::Editor *EditorChooser::createEditor(TQWidget *parentWidget,TQObject *parent,const char* widgetName,
 	const char* name,const TQString& postfix,bool fallBackToKatePart){
 
-        KTextEditor::Editor *tmpEd=0;
+        KTextEditor::Editor *tmpEd=nullptr;
 
         TDEConfig *cfg=tdeApp->config();
         TQString previousGroup=cfg->group();
@@ -157,6 +157,6 @@ KTextEditor::Editor *EditorChooser::createEditor(TQWidget *parentWidget,TQObject
         if (fallBackToKatePart)
                 return KTextEditor::createEditor("libkatepart",parentWidget,widgetName,parent,name);
 
-        return 0;
+        return nullptr;
 }
 
diff --git a/interfaces/tdetexteditor/editorchooser.h b/interfaces/tdetexteditor/editorchooser.h
index 62feda5c6..69cdd03da 100644
--- a/interfaces/tdetexteditor/editorchooser.h
+++ b/interfaces/tdetexteditor/editorchooser.h
@@ -19,7 +19,7 @@ class KTEXTEDITOR_EXPORT EditorChooser: public TQWidget
   TQ_OBJECT
 
   public:
-    EditorChooser(TQWidget *parent=0,const char *name=0);
+    EditorChooser(TQWidget *parent=nullptr,const char *name=nullptr);
     virtual ~EditorChooser();
     
    /* void writeSysDefault();*/
@@ -27,8 +27,8 @@ class KTEXTEDITOR_EXPORT EditorChooser: public TQWidget
     void readAppSetting(const TQString& postfix=TQString::null);
     void writeAppSetting(const TQString& postfix=TQString::null);
 
-    static KTextEditor::Document *createDocument(TQObject* parent=0,const char *name=0,const TQString& postfix=TQString::null, bool fallBackToKatePart=true);
-    static KTextEditor::Editor *createEditor(TQWidget *parentWidget,TQObject *parent,const char* widgetName=0,const char* name=0,const TQString& postfix=TQString::null,bool fallBackToKatePart=true);
+    static KTextEditor::Document *createDocument(TQObject* parent=nullptr,const char *name=nullptr,const TQString& postfix=TQString::null, bool fallBackToKatePart=true);
+    static KTextEditor::Editor *createEditor(TQWidget *parentWidget,TQObject *parent,const char* widgetName=nullptr,const char* name=nullptr,const TQString& postfix=TQString::null,bool fallBackToKatePart=true);
   private:
     class PrivateEditorChooser *d;
 };
@@ -38,7 +38,7 @@ class EditorChooserBackEnd: public ComponentChooserPlugin {
 
 TQ_OBJECT
 public:
-	EditorChooserBackEnd(TQObject *parent=0, const char *name=0);
+	EditorChooserBackEnd(TQObject *parent=nullptr, const char *name=nullptr);
 	virtual ~EditorChooserBackEnd();
 
 	virtual TQWidget *widget(TQWidget *);
diff --git a/interfaces/tdetexteditor/encodinginterface.cpp b/interfaces/tdetexteditor/encodinginterface.cpp
index a0ef1ad22..764ce142a 100644
--- a/interfaces/tdetexteditor/encodinginterface.cpp
+++ b/interfaces/tdetexteditor/encodinginterface.cpp
@@ -30,7 +30,7 @@ namespace KTextEditor
 class PrivateEncodingInterface
 {
   public:
-    PrivateEncodingInterface() {interface=0;}
+    PrivateEncodingInterface() {interface=nullptr;}
     ~PrivateEncodingInterface() {}
     EncodingDCOPInterface *interface;
 };
@@ -70,7 +70,7 @@ void EncodingInterface::setEncodingInterfaceDCOPSuffix (const TQCString &suffix)
 EncodingInterface *KTextEditor::encodingInterface (Document *doc)
 {         
   if (!doc)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::EncodingInterface*>(doc);
 }
diff --git a/interfaces/tdetexteditor/highlightinginterface.cpp b/interfaces/tdetexteditor/highlightinginterface.cpp
index 1677ca87c..9240c1d12 100644
--- a/interfaces/tdetexteditor/highlightinginterface.cpp
+++ b/interfaces/tdetexteditor/highlightinginterface.cpp
@@ -63,7 +63,7 @@ void HighlightingInterface::setHighlightingInterfaceDCOPSuffix (const TQCString
 HighlightingInterface *KTextEditor::highlightingInterface (Document *doc)
 {       
   if (!doc)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::HighlightingInterface*>(doc);
 }
diff --git a/interfaces/tdetexteditor/markinterface.cpp b/interfaces/tdetexteditor/markinterface.cpp
index 024db35c4..1aab0f494 100644
--- a/interfaces/tdetexteditor/markinterface.cpp
+++ b/interfaces/tdetexteditor/markinterface.cpp
@@ -63,7 +63,7 @@ void MarkInterface::setMarkInterfaceDCOPSuffix (const TQCString &/*suffix*/)
 MarkInterface *KTextEditor::markInterface (Document *doc)
 {                                 
   if (!doc)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::MarkInterface*>(doc);
 }
diff --git a/interfaces/tdetexteditor/markinterfaceextension.cpp b/interfaces/tdetexteditor/markinterfaceextension.cpp
index 86538abfc..13db5fc31 100644
--- a/interfaces/tdetexteditor/markinterfaceextension.cpp
+++ b/interfaces/tdetexteditor/markinterfaceextension.cpp
@@ -63,7 +63,7 @@ void MarkInterfaceExtension::setMarkInterfaceExtensionDCOPSuffix (const TQCStrin
 MarkInterfaceExtension *KTextEditor::markInterfaceExtension (Document *doc)
 {                   
   if (!doc)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::MarkInterfaceExtension*>(doc);
 }
diff --git a/interfaces/tdetexteditor/plugin.h b/interfaces/tdetexteditor/plugin.h
index b13dc37e9..c62999f8d 100644
--- a/interfaces/tdetexteditor/plugin.h
+++ b/interfaces/tdetexteditor/plugin.h
@@ -40,7 +40,7 @@ class KTEXTEDITOR_EXPORT Plugin : public TQObject
   TQ_OBJECT
 
   public:
-    Plugin ( Document *document = 0, const char *name = 0 );
+    Plugin ( Document *document = nullptr, const char *name = nullptr );
     virtual ~Plugin ();
     
     unsigned int pluginNumber () const;
@@ -53,7 +53,7 @@ class KTEXTEDITOR_EXPORT Plugin : public TQObject
     unsigned int myPluginNumber;
 };
    
-KTEXTEDITOR_EXPORT Plugin *createPlugin ( const char* libname, Document *document = 0, const char *name = 0 );
+KTEXTEDITOR_EXPORT Plugin *createPlugin ( const char* libname, Document *document = nullptr, const char *name = nullptr );
 
 /**
  * View plugin class.
diff --git a/interfaces/tdetexteditor/popupmenuinterface.cpp b/interfaces/tdetexteditor/popupmenuinterface.cpp
index 350fa138b..00cfc7237 100644
--- a/interfaces/tdetexteditor/popupmenuinterface.cpp
+++ b/interfaces/tdetexteditor/popupmenuinterface.cpp
@@ -63,7 +63,7 @@ void PopupMenuInterface::setPopupMenuInterfaceDCOPSuffix (const TQCString &/*suf
 PopupMenuInterface *KTextEditor::popupMenuInterface (View *view)
 {        
   if (!view)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::PopupMenuInterface*>(view);
 }
diff --git a/interfaces/tdetexteditor/printinterface.cpp b/interfaces/tdetexteditor/printinterface.cpp
index 5a4011eb4..195952754 100644
--- a/interfaces/tdetexteditor/printinterface.cpp
+++ b/interfaces/tdetexteditor/printinterface.cpp
@@ -28,7 +28,7 @@ namespace KTextEditor
 class PrivatePrintInterface
 {
   public:
-    PrivatePrintInterface() {interface=0;}
+    PrivatePrintInterface() {interface=nullptr;}
     ~PrivatePrintInterface() {}
     PrintDCOPInterface *interface;
 };
@@ -68,7 +68,7 @@ void PrintInterface::setPrintInterfaceDCOPSuffix (const TQCString &suffix)
 PrintInterface *KTextEditor::printInterface (Document *doc)
 {           
   if (!doc)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::PrintInterface*>(doc);
 }
diff --git a/interfaces/tdetexteditor/searchinterface.cpp b/interfaces/tdetexteditor/searchinterface.cpp
index 6ea021e0d..def30a656 100644
--- a/interfaces/tdetexteditor/searchinterface.cpp
+++ b/interfaces/tdetexteditor/searchinterface.cpp
@@ -11,7 +11,7 @@ namespace KTextEditor
 	public:
 		PrivateSearchInterface()
 		{
-		interface = 0;
+		interface = nullptr;
 		}
 		~PrivateSearchInterface(){}
 	// Data Members
@@ -49,7 +49,7 @@ void SearchInterface::setSearchInterfaceDCOPSuffix (const TQCString &suffix)
 SearchInterface *KTextEditor::searchInterface (Document *doc)
 {  
   if (!doc)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::SearchInterface*>(doc);
 }
diff --git a/interfaces/tdetexteditor/selectioninterface.cpp b/interfaces/tdetexteditor/selectioninterface.cpp
index 0a8dc6b00..3350986f1 100644
--- a/interfaces/tdetexteditor/selectioninterface.cpp
+++ b/interfaces/tdetexteditor/selectioninterface.cpp
@@ -12,7 +12,7 @@ namespace KTextEditor
 	public:
 		PrivateSelectionInterface()
 		{
-		interface = 0;
+		interface = nullptr;
 		}
 		~PrivateSelectionInterface(){}
 	// Data Members
@@ -50,7 +50,7 @@ void SelectionInterface::setSelectionInterfaceDCOPSuffix (const TQCString &suffi
 SelectionInterface *KTextEditor::selectionInterface (Document *doc)
 {
   if (!doc)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::SelectionInterface*>(doc);
 }
@@ -58,7 +58,7 @@ SelectionInterface *KTextEditor::selectionInterface (Document *doc)
 SelectionInterface *KTextEditor::selectionInterface (View *view)
 {
   if (!view)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::SelectionInterface*>(view);
 }
diff --git a/interfaces/tdetexteditor/selectioninterfaceext.cpp b/interfaces/tdetexteditor/selectioninterfaceext.cpp
index 3034f33a5..df64f407b 100644
--- a/interfaces/tdetexteditor/selectioninterfaceext.cpp
+++ b/interfaces/tdetexteditor/selectioninterfaceext.cpp
@@ -30,7 +30,7 @@ using namespace KTextEditor;
 //BEGIN KTextEditor::SelectionInterfaceExt
 class KTextEditor::PrivateSelectionInterfaceExt {
   public:
-    PrivateSelectionInterfaceExt() : interface( 0 ) {}
+    PrivateSelectionInterfaceExt() : interface( nullptr ) {}
     ~PrivateSelectionInterfaceExt() {}
     
     SelectionExtDCOPInterface *interface;
@@ -66,7 +66,7 @@ void SelectionInterfaceExt::setSelectionInterfaceExtDCOPSuffix (const TQCString
 SelectionInterfaceExt *KTextEditor::selectionInterfaceExt (Document *doc)
 {
   if (!doc)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::SelectionInterfaceExt*>(doc);
 }
@@ -74,7 +74,7 @@ SelectionInterfaceExt *KTextEditor::selectionInterfaceExt (Document *doc)
 SelectionInterfaceExt *KTextEditor::selectionInterfaceExt (View *view)
 {
   if (!view)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::SelectionInterfaceExt*>(view);
 }
diff --git a/interfaces/tdetexteditor/sessionconfiginterface.cpp b/interfaces/tdetexteditor/sessionconfiginterface.cpp
index def7bf0a5..bb75fc908 100644
--- a/interfaces/tdetexteditor/sessionconfiginterface.cpp
+++ b/interfaces/tdetexteditor/sessionconfiginterface.cpp
@@ -66,7 +66,7 @@ void SessionConfigInterface::setSessionConfigInterfaceDCOPSuffix (const TQCStrin
 SessionConfigInterface *KTextEditor::sessionConfigInterface (Document *doc)
 {                       
   if (!doc)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::SessionConfigInterface*>(doc);
 }      
@@ -74,7 +74,7 @@ SessionConfigInterface *KTextEditor::sessionConfigInterface (Document *doc)
 SessionConfigInterface *KTextEditor::sessionConfigInterface (View *view)
 {                       
   if (!view)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::SessionConfigInterface*>(view);
 }
@@ -82,7 +82,7 @@ SessionConfigInterface *KTextEditor::sessionConfigInterface (View *view)
 SessionConfigInterface *KTextEditor::sessionConfigInterface (Plugin *plugin)
 {                       
   if (!plugin)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::SessionConfigInterface*>(plugin);
 }
diff --git a/interfaces/tdetexteditor/tdetexteditor.cpp b/interfaces/tdetexteditor/tdetexteditor.cpp
index 25726577b..10b63c471 100644
--- a/interfaces/tdetexteditor/tdetexteditor.cpp
+++ b/interfaces/tdetexteditor/tdetexteditor.cpp
@@ -224,7 +224,7 @@ Editor *KTextEditor::createEditor ( const char* libname, TQWidget *parentWidget,
 
 Document *KTextEditor::createDocument ( const char* libname, TQObject *parent, const char *name )
 {
-  return KParts::ComponentFactory::createPartInstanceFromLibrary<Document>( libname, 0, 0, parent, name );
+  return KParts::ComponentFactory::createPartInstanceFromLibrary<Document>( libname, nullptr, nullptr, parent, name );
 }     
 
 Plugin *KTextEditor::createPlugin ( const char* libname, Document *document, const char *name )
@@ -235,7 +235,7 @@ Plugin *KTextEditor::createPlugin ( const char* libname, Document *document, con
 PluginViewInterface *KTextEditor::pluginViewInterface (Plugin *plugin)
 {       
   if (!plugin)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::PluginViewInterface*>(plugin);
 }
diff --git a/interfaces/tdetexteditor/templateinterface.cpp b/interfaces/tdetexteditor/templateinterface.cpp
index f3de57447..e9b896a61 100644
--- a/interfaces/tdetexteditor/templateinterface.cpp
+++ b/interfaces/tdetexteditor/templateinterface.cpp
@@ -53,7 +53,7 @@ void TemplateInterface::setTemplateInterfaceDCOPSuffix ( const TQCString &suffix
 {}
 
 #define INITKABC do { \
-  if (addrBook==0) { \
+  if (!addrBook) { \
     addrBook=TDEABC::StdAddressBook::self(); \
     userAddress=addrBook->whoAmI(); \
     if (userAddress.isEmpty()) { \
@@ -72,7 +72,7 @@ void TemplateInterface::setTemplateInterfaceDCOPSuffix ( const TQCString &suffix
 
 bool TemplateInterface::expandMacros( TQMap<TQString, TQString> &map, TQWidget *parentWindow )
 {
-  TDEABC::StdAddressBook *addrBook = 0;
+  TDEABC::StdAddressBook *addrBook = nullptr;
   TDEABC::Addressee userAddress;
   TQDateTime datetime = TQDateTime::currentDateTime();
   TQDate date = datetime.date();
@@ -190,7 +190,7 @@ bool TemplateInterface::insertTemplateText ( uint line, uint column, const TQStr
 TemplateInterface *KTextEditor::templateInterface ( KTextEditor::Document *doc )
 {
   if ( !doc )
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::TemplateInterface*>( doc );
 }
diff --git a/interfaces/tdetexteditor/templateinterface.h b/interfaces/tdetexteditor/templateinterface.h
index 966955735..6acd83412 100644
--- a/interfaces/tdetexteditor/templateinterface.h
+++ b/interfaces/tdetexteditor/templateinterface.h
@@ -103,7 +103,7 @@ class KTEXTEDITOR_EXPORT TemplateInterface //should be named AbstractTemplateInt
      * If the editor supports some kind of smart indentation, the inserted code
      * should be layouted by the indenter.
      */
-    bool insertTemplateText ( uint line, uint column, const TQString &templateString, const TQMap<TQString,TQString> &initialValues, TQWidget *parentWindow=0);
+    bool insertTemplateText ( uint line, uint column, const TQString &templateString, const TQMap<TQString,TQString> &initialValues, TQWidget *parentWindow=nullptr);
 
 protected:
     /**
@@ -113,7 +113,7 @@ protected:
      * insertTemplateText above.
      * @return true if any text was inserted.
      */
-    virtual bool insertTemplateTextImplementation ( uint line, uint column, const TQString &templateString, const TQMap<TQString,TQString> &initialValues, TQWidget *parentWindow=0 )=0;
+    virtual bool insertTemplateTextImplementation ( uint line, uint column, const TQString &templateString, const TQMap<TQString,TQString> &initialValues, TQWidget *parentWindow=nullptr )=0;
 
   /**
   * only for the interface itself - REAL PRIVATE
diff --git a/interfaces/tdetexteditor/texthintinterface.cpp b/interfaces/tdetexteditor/texthintinterface.cpp
index f6aa4f0b3..f3df6e304 100644
--- a/interfaces/tdetexteditor/texthintinterface.cpp
+++ b/interfaces/tdetexteditor/texthintinterface.cpp
@@ -56,7 +56,7 @@ unsigned int TextHintInterface::textHintInterfaceNumber () const
 TextHintInterface *textHintInterface (View *view)
 {                
   if (!view)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::TextHintInterface*>(view);
 }
diff --git a/interfaces/tdetexteditor/undointerface.cpp b/interfaces/tdetexteditor/undointerface.cpp
index 30a1dd292..f7b5b611f 100644
--- a/interfaces/tdetexteditor/undointerface.cpp
+++ b/interfaces/tdetexteditor/undointerface.cpp
@@ -28,7 +28,7 @@ namespace KTextEditor
 class PrivateUndoInterface
 {
   public:
-    PrivateUndoInterface() {interface = 0;}
+    PrivateUndoInterface() {interface = nullptr;}
     ~PrivateUndoInterface() {}
     UndoDCOPInterface *interface;
 };
@@ -68,7 +68,7 @@ void UndoInterface::setUndoInterfaceDCOPSuffix (const TQCString &suffix)
 UndoInterface *KTextEditor::undoInterface (Document *doc)
 {  
   if (!doc)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::UndoInterface*>(doc);
 }
diff --git a/interfaces/tdetexteditor/variableinterface.cpp b/interfaces/tdetexteditor/variableinterface.cpp
index 616e0beab..293b810c9 100644
--- a/interfaces/tdetexteditor/variableinterface.cpp
+++ b/interfaces/tdetexteditor/variableinterface.cpp
@@ -42,7 +42,7 @@ unsigned int VariableInterface::variableInterfaceNumber()
 VariableInterface *KTextEditor::variableInterface( Document *doc )
 {
   if ( ! doc )
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::VariableInterface*>(doc);
 }
diff --git a/interfaces/tdetexteditor/view.h b/interfaces/tdetexteditor/view.h
index c8cf586b8..2cdf0af2b 100644
--- a/interfaces/tdetexteditor/view.h
+++ b/interfaces/tdetexteditor/view.h
@@ -39,7 +39,7 @@ class KTEXTEDITOR_EXPORT View : public TQWidget, public KXMLGUIClient
     /**
     * Create a new view to the given document. The document must be non-null.
     */
-    View ( class Document *, TQWidget *parent, const char *name = 0 );
+    View ( class Document *, TQWidget *parent, const char *name = nullptr );
     virtual ~View ();
 
     /**
diff --git a/interfaces/tdetexteditor/viewcursorinterface.cpp b/interfaces/tdetexteditor/viewcursorinterface.cpp
index 58cea6289..88c4c7cf3 100644
--- a/interfaces/tdetexteditor/viewcursorinterface.cpp
+++ b/interfaces/tdetexteditor/viewcursorinterface.cpp
@@ -28,7 +28,7 @@ namespace KTextEditor
 class PrivateViewCursorInterface
 {
   public:
-    PrivateViewCursorInterface() {interface=0;}
+    PrivateViewCursorInterface() {interface=nullptr;}
     ~PrivateViewCursorInterface() {}
     ViewCursorDCOPInterface *interface;
 };
@@ -68,7 +68,7 @@ void ViewCursorInterface::setViewCursorInterfaceDCOPSuffix (const TQCString &suf
 ViewCursorInterface *KTextEditor::viewCursorInterface (View *view)
 {                   
   if (!view)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::ViewCursorInterface*>(view);
 }
diff --git a/interfaces/tdetexteditor/viewstatusmsginterface.cpp b/interfaces/tdetexteditor/viewstatusmsginterface.cpp
index af8870c80..8587dc5c4 100644
--- a/interfaces/tdetexteditor/viewstatusmsginterface.cpp
+++ b/interfaces/tdetexteditor/viewstatusmsginterface.cpp
@@ -30,7 +30,7 @@ namespace KTextEditor
 class PrivateViewStatusMsgInterface
 {
   public:
-    PrivateViewStatusMsgInterface() {interface=0;}
+    PrivateViewStatusMsgInterface() {interface=nullptr;}
     ~PrivateViewStatusMsgInterface() {}
     ViewStatusMsgDCOPInterface  *interface;
 };
@@ -70,7 +70,7 @@ void ViewStatusMsgInterface::setViewStatusMsgInterfaceDCOPSuffix (const TQCStrin
 ViewStatusMsgInterface *KTextEditor::viewStatusMsgInterface (View *view)
 {           
   if (!view)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::ViewStatusMsgInterface*>(view);
 }
diff --git a/interfaces/tdetexteditor/wordwrapinterface.cpp b/interfaces/tdetexteditor/wordwrapinterface.cpp
index 6be76120b..18081b4fe 100644
--- a/interfaces/tdetexteditor/wordwrapinterface.cpp
+++ b/interfaces/tdetexteditor/wordwrapinterface.cpp
@@ -64,7 +64,7 @@ void WordWrapInterface::setWordWrapInterfaceDCOPSuffix (const TQCString &/*suffi
 WordWrapInterface *KTextEditor::wordWrapInterface (Document *doc)
 {          
   if (!doc)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<KTextEditor::WordWrapInterface*>(doc);
 }
diff --git a/kate/interfaces/document.h b/kate/interfaces/document.h
index c30a6d320..39e09c832 100644
--- a/kate/interfaces/document.h
+++ b/kate/interfaces/document.h
@@ -64,7 +64,7 @@ class KATEPARTINTERFACES_EXPORT ConfigPage : public KTextEditor::ConfigPage
   TQ_OBJECT
 
   public:
-    ConfigPage ( TQWidget *parent=0, const char *name=0 ) : KTextEditor::ConfigPage (parent, name) { ; };
+    ConfigPage ( TQWidget *parent=nullptr, const char *name=nullptr ) : KTextEditor::ConfigPage (parent, name) { ; };
     virtual ~ConfigPage () { ; };
 
   public slots:
@@ -82,7 +82,7 @@ class KATEPARTINTERFACES_EXPORT ActionMenu : public TDEActionMenu
   TQ_OBJECT
 
   public:
-    ActionMenu ( const TQString& text, TQObject* parent = 0, const char* name = 0 )
+    ActionMenu ( const TQString& text, TQObject* parent = nullptr, const char* name = nullptr )
       : TDEActionMenu(text, parent, name) { ; };
     virtual ~ActionMenu () { ; };
 
@@ -154,7 +154,7 @@ class CommandExtension
      *
      * @param cmdname The command name associated with this request.
      */
-    virtual TDECompletion *completionObject( const TQString & cmdname, Kate::View * /*view*/ ) { Q_UNUSED(cmdname); return 0L; }
+    virtual TDECompletion *completionObject( const TQString & cmdname, Kate::View * /*view*/ ) { Q_UNUSED(cmdname); return nullptr; }
 
     /**
      * @return whether this command wants to process text interactively given the @p cmdname.
@@ -214,7 +214,7 @@ class KATEPARTINTERFACES_EXPORT Document : public KTextEditor::Document, public
     /**
      * Returns the document name.
      */
-    virtual TQString docName () { return 0L; };
+    virtual TQString docName () { return nullptr; };
 
     /**
      * Sets the document name.
@@ -224,8 +224,8 @@ class KATEPARTINTERFACES_EXPORT Document : public KTextEditor::Document, public
      */
     virtual void setDocName (TQString ) { ; };
 
-    virtual ActionMenu *hlActionMenu (const TQString& , TQObject* =0, const char* = 0) = 0;
-    virtual ActionMenu *exportActionMenu (const TQString& , TQObject* =0, const char* = 0) = 0;
+    virtual ActionMenu *hlActionMenu (const TQString& , TQObject* =nullptr, const char* = nullptr) = 0;
+    virtual ActionMenu *exportActionMenu (const TQString& , TQObject* =nullptr, const char* = nullptr) = 0;
 
   public slots:
     // clear buffer/filename - update the views
@@ -273,7 +273,7 @@ class KATEPARTINTERFACES_EXPORT Document : public KTextEditor::Document, public
     /** @deprecated */
     virtual ConfigPage *keysConfigPage (TQWidget *) = 0;
     /** @deprecated */
-    virtual ConfigPage *kSpellConfigPage (TQWidget *) { return 0L; }
+    virtual ConfigPage *kSpellConfigPage (TQWidget *) { return nullptr; }
     /** @deprecated */
     virtual ConfigPage *hlConfigPage (TQWidget *) = 0;
 
@@ -380,7 +380,7 @@ class KATEPARTINTERFACES_EXPORT DocumentExt
      * The @p v argument is used to avoid asking again, when the
      * editor regains focus after the dialog is hidden.
      */
-    virtual void slotModifiedOnDisk( View *v=0 ) = 0;
+    virtual void slotModifiedOnDisk( View *v=nullptr ) = 0;
 };
 
 /**
@@ -400,7 +400,7 @@ KATEPARTINTERFACES_EXPORT DocumentExt *documentExt (KTextEditor::Document *doc);
 /**
  * Creates a new Kate::Document object
  */
-KATEPARTINTERFACES_EXPORT Document *createDocument ( TQObject *parent = 0, const char *name = 0 );
+KATEPARTINTERFACES_EXPORT Document *createDocument ( TQObject *parent = nullptr, const char *name = nullptr );
 
 }
 
diff --git a/kate/interfaces/interfaces.cpp b/kate/interfaces/interfaces.cpp
index 902459c24..fc7db24df 100644
--- a/kate/interfaces/interfaces.cpp
+++ b/kate/interfaces/interfaces.cpp
@@ -36,7 +36,7 @@ Document::Document (TQObject* parent, const char* name)
 {
 }
 
-Document::Document () : KTextEditor::Document (0L, "Kate::Document")
+Document::Document () : KTextEditor::Document (nullptr, "Kate::Document")
 {
 }
 
@@ -98,7 +98,7 @@ DocumentExt::~DocumentExt ()
 Document *document (KTextEditor::Document *doc)
 {
   if (!doc)
-    return 0;
+    return nullptr;
 
   return ::tqt_cast<Kate::Document*>(doc);
 }
@@ -106,7 +106,7 @@ Document *document (KTextEditor::Document *doc)
 DocumentExt *documentExt (KTextEditor::Document *doc)
 {
   if (!doc)
-    return 0;
+    return nullptr;
 
   return dynamic_cast<Kate::DocumentExt*>(doc);
 }
@@ -119,7 +119,7 @@ Document *createDocument ( TQObject *parent, const char *name )
 View *view (KTextEditor::View *view)
 {
   if (!view)
-    return 0;
+    return nullptr;
 
   return ::tqt_cast<Kate::View*>(view);
 }
diff --git a/kate/interfaces/katecmd.cpp b/kate/interfaces/katecmd.cpp
index ef356a6bb..a6704ab27 100644
--- a/kate/interfaces/katecmd.cpp
+++ b/kate/interfaces/katecmd.cpp
@@ -24,7 +24,7 @@
 //BEGIN KateCmd
 #define CMD_HIST_LENGTH 256
 
-KateCmd *KateCmd::s_self = 0;
+KateCmd *KateCmd::s_self = nullptr;
 
 KateCmd::KateCmd ()
 {
diff --git a/kate/interfaces/view.h b/kate/interfaces/view.h
index fcaf43110..fe98f93ae 100644
--- a/kate/interfaces/view.h
+++ b/kate/interfaces/view.h
@@ -53,7 +53,7 @@ class KATEPARTINTERFACES_EXPORT View : public KTextEditor::View, public KTextEdi
     /**
      Constructor (should much rather take a reference to the document).
     */
-    View ( KTextEditor::Document *, TQWidget *, const char *name = 0 );
+    View ( KTextEditor::Document *, TQWidget *, const char *name = nullptr );
     /**
      Destructor, you need a destructor if Scott Meyers says so.
     */
@@ -69,16 +69,16 @@ class KATEPARTINTERFACES_EXPORT View : public KTextEditor::View, public KTextEdi
     /**
       Gets the text line where the cursor is on
     */
-    virtual TQString currentTextLine() { return 0L; }
+    virtual TQString currentTextLine() { return nullptr; }
     /**
       Gets the word where the cursor is on
     */
-    virtual TQString currentWord() { return 0L; }
+    virtual TQString currentWord() { return nullptr; }
     /**
       Gets the word at position x, y. Can be used to find
       the word under the mouse cursor
     */
-    virtual TQString word(int , int ) { return 0L; }
+    virtual TQString word(int , int ) { return nullptr; }
     /**
       Insert text at the current cursor position.
       @param mark is unused.
@@ -264,7 +264,7 @@ class KATEPARTINTERFACES_EXPORT View : public KTextEditor::View, public KTextEdi
     /**
      Returns a pointer to the document of the view.
     */
-    virtual Document *getDoc () { return 0L; }
+    virtual Document *getDoc () { return nullptr; }
 
   public slots:
     /**
diff --git a/kate/part/katearbitraryhighlight.cpp b/kate/part/katearbitraryhighlight.cpp
index 1f526b7af..6fd51804b 100644
--- a/kate/part/katearbitraryhighlight.cpp
+++ b/kate/part/katearbitraryhighlight.cpp
@@ -156,5 +156,5 @@ KateView* KateArbitraryHighlight::viewForRange(KateSuperRange* range)
         return it.key();
 
   // This must belong to a document-global highlight
-  return 0L;
+  return nullptr;
 }
diff --git a/kate/part/katearbitraryhighlight.h b/kate/part/katearbitraryhighlight.h
index 222c82c2e..0d4317cc6 100644
--- a/kate/part/katearbitraryhighlight.h
+++ b/kate/part/katearbitraryhighlight.h
@@ -34,9 +34,9 @@ class KateArbitraryHighlightRange : public KateSuperRange, public KateAttribute
   TQ_OBJECT
 
 public:
-  KateArbitraryHighlightRange(KateSuperCursor* start, KateSuperCursor* end, TQObject* parent = 0L, const char* name = 0L);
-  KateArbitraryHighlightRange(KateDocument* doc, const KateRange& range, TQObject* parent = 0L, const char* name = 0L);
-  KateArbitraryHighlightRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, TQObject* parent = 0L, const char* name = 0L);
+  KateArbitraryHighlightRange(KateSuperCursor* start, KateSuperCursor* end, TQObject* parent = nullptr, const char* name = nullptr);
+  KateArbitraryHighlightRange(KateDocument* doc, const KateRange& range, TQObject* parent = nullptr, const char* name = nullptr);
+  KateArbitraryHighlightRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, TQObject* parent = nullptr, const char* name = nullptr);
 
 	virtual ~KateArbitraryHighlightRange();
 
@@ -62,12 +62,12 @@ class KateArbitraryHighlight : public TQObject
   TQ_OBJECT
 
 public:
-  KateArbitraryHighlight(KateDocument* parent = 0L, const char* name = 0L);
+  KateArbitraryHighlight(KateDocument* parent = nullptr, const char* name = nullptr);
 
   void addHighlightToDocument(KateSuperRangeList* list);
   void addHighlightToView(KateSuperRangeList* list, KateView* view);
 
-  KateSuperRangeList& rangesIncluding(uint line, KateView* view = 0L);
+  KateSuperRangeList& rangesIncluding(uint line, KateView* view = nullptr);
 
 signals:
   void tagLines(KateView* view, KateSuperRange* range);
diff --git a/kate/part/kateautoindent.cpp b/kate/part/kateautoindent.cpp
index f4a9df273..7d769bfe4 100644
--- a/kate/part/kateautoindent.cpp
+++ b/kate/part/kateautoindent.cpp
@@ -144,7 +144,7 @@ IndenterConfigPage* KateAutoIndent::configPage(TQWidget *parent, uint mode)
 //  if ( mode == KateDocumentConfig::imScriptIndent )
 //    return new ScriptIndentConfigPage(parent, "script_indent_config_page");
 
-  return 0;
+  return nullptr;
 }
 
 KateAutoIndent::KateAutoIndent (KateDocument *_doc)
@@ -1380,7 +1380,7 @@ void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags,
 {
   prevIndent = 0;
   int firstChar;
-  KateTextLine::Ptr prevLine = 0;
+  KateTextLine::Ptr prevLine = nullptr;
 
   // get the indentation of the first non-empty line
   while(true) {
diff --git a/kate/part/kateautoindent.h b/kate/part/kateautoindent.h
index c14f16ce3..b2fc3afef 100644
--- a/kate/part/kateautoindent.h
+++ b/kate/part/kateautoindent.h
@@ -51,7 +51,7 @@ class IndenterConfigPage : public TQWidget
      * @param parent parent widget
      * @param name name
      */
-    IndenterConfigPage ( TQWidget *parent=0, const char *name=0 ) : TQWidget(parent, name) {}
+    IndenterConfigPage ( TQWidget *parent=nullptr, const char *name=nullptr ) : TQWidget(parent, name) {}
     virtual ~IndenterConfigPage () {}
 
   public slots:
@@ -197,7 +197,7 @@ class KateViewIndentationAction : public TDEActionMenu
   TQ_OBJECT
 
   public:
-    KateViewIndentationAction(KateDocument *_doc, const TQString& text, TQObject* parent = 0, const char* name = 0);
+    KateViewIndentationAction(KateDocument *_doc, const TQString& text, TQObject* parent = nullptr, const char* name = nullptr);
 
     ~KateViewIndentationAction(){;};
 
@@ -566,7 +566,7 @@ class ScriptIndentConfigPage : public IndenterConfigPage
     TQ_OBJECT
 
   public:
-    ScriptIndentConfigPage ( TQWidget *parent=0, const char *name=0 );
+    ScriptIndentConfigPage ( TQWidget *parent=nullptr, const char *name=nullptr );
     virtual ~ScriptIndentConfigPage ();
 
   public slots:
diff --git a/kate/part/katebookmarks.cpp b/kate/part/katebookmarks.cpp
index 25f00d71b..e30ff292e 100644
--- a/kate/part/katebookmarks.cpp
+++ b/kate/part/katebookmarks.cpp
@@ -64,7 +64,7 @@ KateBookmarks::KateBookmarks( KateView* view, Sorting sort )
 {
   connect (view->getDoc(), TQ_SIGNAL(marksChanged()), this, TQ_SLOT(marksChanged()));
   _tries=0;
-  m_bookmarksMenu = 0L;
+  m_bookmarksMenu = nullptr;
 }
 
 KateBookmarks::~KateBookmarks()
@@ -152,8 +152,8 @@ void KateBookmarks::insertBookmarks( TQPopupMenu& menu )
   const TQRegExp re("&(?!&)");
   int idx( -1 );
   int old_menu_count = menu.count();
-  KTextEditor::Mark *next = 0;
-  KTextEditor::Mark *prev = 0;
+  KTextEditor::Mark *next = nullptr;
+  KTextEditor::Mark *prev = nullptr;
 
   TQPtrList<KTextEditor::Mark> m = m_view->getDoc()->marks();
   TQMemArray<uint> sortArray( m.count() );
diff --git a/kate/part/katebuffer.cpp b/kate/part/katebuffer.cpp
index bb11afd0e..6d9af4b1a 100644
--- a/kate/part/katebuffer.cpp
+++ b/kate/part/katebuffer.cpp
@@ -336,7 +336,7 @@ KateBuffer::KateBuffer(KateDocument *doc)
    m_cacheWriteError(false),
    m_loadingBorked (false),
    m_binary (false),
-   m_highlight (0),
+   m_highlight (nullptr),
    m_regionTree (this),
    m_tabWidth (8),
    m_lineHighlightedMax (0),
@@ -400,7 +400,7 @@ void KateBuffer::editEnd ()
       if (editTagLineStart > 0)
         editTagLineStart--;
 
-      KateBufBlock *buf2 = 0;
+      KateBufBlock *buf2 = nullptr;
       bool needContinue = false;
       while ((buf2 = findBlock(editTagLineStart)))
       {
@@ -439,7 +439,7 @@ void KateBuffer::clear()
   m_blocks.clear ();
 
   // create a bufblock with one line, we need that, only in openFile we won't have that
-  KateBufBlock *block = new KateBufBlock(this, 0, 0);
+  KateBufBlock *block = new KateBufBlock(this, nullptr, nullptr);
   m_blocks.append (block);
 
   // reset the state
@@ -487,11 +487,11 @@ bool KateBuffer::openFile (const TQString &m_file)
   m_blocks.clear ();
 
   // do the real work
-  KateBufBlock *block = 0;
+  KateBufBlock *block = nullptr;
   m_lines = 0;
   while (!file.eof() && !m_cacheWriteError)
   {
-    block = new KateBufBlock (this, block, 0, &file);
+    block = new KateBufBlock (this, block, nullptr, &file);
 
     m_lines = block->endLine ();
 
@@ -617,7 +617,7 @@ bool KateBuffer::saveFile (const TQString &m_file)
 KateTextLine::Ptr KateBuffer::line_internal (KateBufBlock *buf, uint i)
 {
   // update hl until this line + max KATE_HL_LOOKAHEAD
-  KateBufBlock *buf2 = 0;
+  KateBufBlock *buf2 = nullptr;
   while ((i >= m_lineHighlighted) && (buf2 = findBlock(m_lineHighlighted)))
   {
     uint end = kMin(i + KATE_HL_LOOKAHEAD, buf2->endLine());
@@ -667,7 +667,7 @@ KateBufBlock *KateBuffer::findBlock_internal (uint i, uint *index)
     if ((m_lastInSyncBlock+1) < m_blocks.size())
       m_lastInSyncBlock++;
     else
-      return 0;
+      return nullptr;
 
     for (; m_lastInSyncBlock < m_blocks.size(); m_lastInSyncBlock++)
     {
@@ -696,7 +696,7 @@ KateBufBlock *KateBuffer::findBlock_internal (uint i, uint *index)
 
   // no block found !
   // index will not be set to any useful value in this case !
-  return 0;
+  return nullptr;
 }
 
 void KateBuffer::changeLine(uint i)
@@ -987,7 +987,7 @@ bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, b
 
         // doHighlight *shall* do his work. After invalidation, some highlight has
         // been recalculated, but *maybe not* until endLine ! So we shall force it manually...
-        KateBufBlock *buf = 0;
+        KateBufBlock *buf = nullptr;
         while ((endLine > m_lineHighlighted) && (buf = findBlock(m_lineHighlighted)))
         {
           uint end = kMin(endLine, buf->endLine());
@@ -1014,7 +1014,7 @@ bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, b
 
   // get the previous line, if we start at the beginning of this block
   // take the last line of the previous block
-  KateTextLine::Ptr prevLine = 0;
+  KateTextLine::Ptr prevLine = nullptr;
 
   if ((startLine == buf->startLine()) && buf->prev() && (buf->prev()->lines() > 0))
     prevLine = buf->prev()->line (buf->prev()->lines() - 1);
@@ -1275,14 +1275,14 @@ KateBufBlock::KateBufBlock ( KateBuffer *parent, KateBufBlock *prev, KateBufBloc
 : m_state (KateBufBlock::stateDirty),
   m_startLine (0),
   m_lines (0),
-  m_vmblock (0),
+  m_vmblock (nullptr),
   m_vmblockSize (0),
   m_parent (parent),
   m_prev (prev),
   m_next (next),
-  list (0),
-  listPrev (0),
-  listNext (0)
+  list (nullptr),
+  listPrev (nullptr),
+  listNext (nullptr)
 {
   // init startline + the next pointers of the neighbour blocks
   if (m_prev)
@@ -1416,7 +1416,7 @@ void KateBufBlock::fillBlock (KateFileLoader *stream)
         if (m_vmblock)
           KateFactory::self()->vm()->free(m_vmblock);
 
-        m_vmblock = 0;
+        m_vmblock = nullptr;
         m_vmblockSize = 0;
 
         m_parent->m_cacheWriteError = true;
@@ -1487,7 +1487,7 @@ void KateBufBlock::markDirty ()
       if (m_vmblock)
         KateFactory::self()->vm()->free(m_vmblock);
 
-      m_vmblock = 0;
+      m_vmblock = nullptr;
       m_vmblockSize = 0;
 
       // we are dirty
@@ -1558,7 +1558,7 @@ void KateBufBlock::swapOut ()
         if (m_vmblock)
           KateFactory::self()->vm()->free(m_vmblock);
 
-        m_vmblock = 0;
+        m_vmblock = nullptr;
         m_vmblockSize = 0;
 
         m_parent->m_cacheWriteError = true;
@@ -1581,8 +1581,8 @@ void KateBufBlock::swapOut ()
 
 KateBufBlockList::KateBufBlockList ()
  : m_count (0),
-   m_first (0),
-   m_last (0)
+   m_first (nullptr),
+   m_last (nullptr)
 {
 }
 
@@ -1599,7 +1599,7 @@ void KateBufBlockList::append (KateBufBlock *buf)
     m_last->listNext = buf;
 
     buf->listPrev = m_last;
-    buf->listNext = 0;
+    buf->listNext = nullptr;
 
     m_last = buf;
 
@@ -1612,8 +1612,8 @@ void KateBufBlockList::append (KateBufBlock *buf)
   m_last = buf;
   m_first = buf;
 
-  buf->listPrev = 0;
-  buf->listNext = 0;
+  buf->listPrev = nullptr;
+  buf->listNext = nullptr;
 
   buf->list = this;
 }
@@ -1628,20 +1628,20 @@ void KateBufBlockList::removeInternal (KateBufBlock *buf)
   if ((buf == m_first) && (buf == m_last))
   {
     // last element removed !
-    m_first = 0;
-    m_last = 0;
+    m_first = nullptr;
+    m_last = nullptr;
   }
   else if (buf == m_first)
   {
     // first element removed
     m_first = buf->listNext;
-    m_first->listPrev = 0;
+    m_first->listPrev = nullptr;
   }
   else if (buf == m_last)
   {
     // last element removed
     m_last = buf->listPrev;
-    m_last->listNext = 0;
+    m_last->listNext = nullptr;
   }
   else
   {
@@ -1649,10 +1649,10 @@ void KateBufBlockList::removeInternal (KateBufBlock *buf)
     buf->listNext->listPrev = buf->listPrev;
   }
 
-  buf->listPrev = 0;
-  buf->listNext = 0;
+  buf->listPrev = nullptr;
+  buf->listNext = nullptr;
 
-  buf->list = 0;
+  buf->list = nullptr;
 }
 
 //END KateBufBlockList
diff --git a/kate/part/katebuffer.h b/kate/part/katebuffer.h
index 96765ceba..280e058f9 100644
--- a/kate/part/katebuffer.h
+++ b/kate/part/katebuffer.h
@@ -58,8 +58,8 @@ class KateBufBlock
      * @param next next bufblock in the list
      * @param stream stream to load the content from, if any given
      */
-    KateBufBlock ( KateBuffer *parent, KateBufBlock *prev = 0, KateBufBlock *next = 0,
-                   KateFileLoader *stream = 0 );
+    KateBufBlock ( KateBuffer *parent, KateBufBlock *prev = nullptr, KateBufBlock *next = nullptr,
+                   KateFileLoader *stream = nullptr );
 
     /**
      * destroy this block and take care of freeing all mem
@@ -489,7 +489,7 @@ class KateBuffer : public TQObject
     {
       KateBufBlock *buf = findBlock(i);
       if (!buf)
-        return 0;
+        return nullptr;
 
       if (i < m_lineHighlighted)
         return buf->line (i - buf->startLine());
@@ -513,7 +513,7 @@ class KateBuffer : public TQObject
     {
       KateBufBlock *buf = findBlock(i);
       if (!buf)
-        return 0;
+        return nullptr;
 
       return buf->line(i - buf->startLine());
     }
@@ -529,11 +529,11 @@ class KateBuffer : public TQObject
      * index pointer gets filled with index of block in m_blocks
      * index only valid if returned block != 0 !
      */
-    KateBufBlock *findBlock (uint i, uint *index = 0)
+    KateBufBlock *findBlock (uint i, uint *index = nullptr)
     {
       // out of range !
       if (i >= m_lines)
-        return 0;
+        return nullptr;
 
       if ((m_blocks[m_lastFoundBlock]->startLine() <= i) && (m_blocks[m_lastFoundBlock]->endLine() > i))
       {
@@ -546,7 +546,7 @@ class KateBuffer : public TQObject
       return findBlock_internal (i, index);
     }
 
-    KateBufBlock *findBlock_internal (uint i, uint *index = 0);
+    KateBufBlock *findBlock_internal (uint i, uint *index = nullptr);
 
   public:
     /**
diff --git a/kate/part/katecmds.cpp b/kate/part/katecmds.cpp
index 0f6cd4e53..1715d63ab 100644
--- a/kate/part/katecmds.cpp
+++ b/kate/part/katecmds.cpp
@@ -293,7 +293,7 @@ TDECompletion *KateCommands::CoreCommands::completionObject( const TQString &cmd
     co->setIgnoreCase( true );
     return co;
   }
-  return 0L;
+  return nullptr;
 }
 //END CoreCommands
 
diff --git a/kate/part/katecodecompletion.cpp b/kate/part/katecodecompletion.cpp
index 0a3dfe771..444db8121 100644
--- a/kate/part/katecodecompletion.cpp
+++ b/kate/part/katecodecompletion.cpp
@@ -57,7 +57,7 @@ class KateCCListBox : public TQListBox
     /**
       @short Create a new CCListBox
     */
-    KateCCListBox (TQWidget* parent = 0, const char* name = 0, WFlags f = 0):TQListBox(parent, name, f)
+    KateCCListBox (TQWidget* parent = nullptr, const char* name = nullptr, WFlags f = 0):TQListBox(parent, name, f)
     {
     }
 
@@ -111,9 +111,9 @@ class KateCompletionItem : public TQListBoxText
 KateCodeCompletion::KateCodeCompletion( KateView* view )
   : TQObject( view, "Kate Code Completion" )
   , m_view( view )
-  , m_commentLabel( 0 )
+  , m_commentLabel( nullptr )
 {
-  m_completionPopup = new TQVBox( 0, 0, (WFlags)WType_Popup );
+  m_completionPopup = new TQVBox( nullptr, nullptr, (WFlags)WType_Popup );
   m_completionPopup->setFrameStyle( TQFrame::Box | TQFrame::Plain );
   m_completionPopup->setLineWidth( 1 );
 
@@ -174,7 +174,7 @@ bool KateCodeCompletion::eventFilter( TQObject *o, TQEvent *e )
      //even on successfull completion we will emit completionAborted() twice...
      m_completionPopup->hide();
      delete m_commentLabel;
-     m_commentLabel = 0;
+     m_commentLabel = nullptr;
      return false;
    }
 
@@ -221,7 +221,7 @@ void KateCodeCompletion::doComplete()
   KateCompletionItem* item = static_cast<KateCompletionItem*>(
      m_completionListBox->item(m_completionListBox->currentItem()));
 
-  if( item == 0 )
+  if( !item )
     return;
 
   TQString text = item->m_entry.text;
@@ -243,7 +243,7 @@ void KateCodeCompletion::abortCompletion()
 {
   m_completionPopup->hide();
   delete m_commentLabel;
-  m_commentLabel = 0;
+  m_commentLabel = nullptr;
   emit completionAborted();
 }
 
@@ -251,7 +251,7 @@ void KateCodeCompletion::complete( KTextEditor::CompletionEntry entry )
 {
   m_completionPopup->hide();
   delete m_commentLabel;
-  m_commentLabel = 0;
+  m_commentLabel = nullptr;
   emit completionDone( entry );
   emit completionDone();
 }
@@ -368,7 +368,7 @@ void KateCodeCompletion::showComment()
     return;
 
   delete m_commentLabel;
-  m_commentLabel = new KateCodeCompletionCommentLabel( 0, item->m_entry.comment );
+  m_commentLabel = new KateCodeCompletionCommentLabel( nullptr, item->m_entry.comment );
   m_commentLabel->setFont(TQToolTip::font());
   m_commentLabel->setPalette(TQToolTip::palette());
 
diff --git a/kate/part/katecodecompletion.h b/kate/part/katecodecompletion.h
index 78c68a759..7b79b1073 100644
--- a/kate/part/katecodecompletion.h
+++ b/kate/part/katecodecompletion.h
@@ -119,7 +119,7 @@ class KateArgHint: public TQFrame
   TQ_OBJECT
 
   public:
-      KateArgHint( KateView* =0, const char* =0 );
+      KateArgHint( KateView* =nullptr, const char* =nullptr );
       virtual ~KateArgHint();
 
       virtual void setCurrentFunction( int );
diff --git a/kate/part/katecodefoldinghelpers.cpp b/kate/part/katecodefoldinghelpers.cpp
index f65c69b22..5f1d9b4f7 100644
--- a/kate/part/katecodefoldinghelpers.cpp
+++ b/kate/part/katecodefoldinghelpers.cpp
@@ -30,7 +30,7 @@
 bool KateCodeFoldingTree::trueVal = true;
 
 KateCodeFoldingNode::KateCodeFoldingNode() :
-    parentNode(0),
+    parentNode(nullptr),
     startLineRel(0),
     endLineRel(0),
     startCol(0),
@@ -130,7 +130,7 @@ KateCodeFoldingNode *KateCodeFoldingNode::takeChild (uint index)
   uint s = m_children.size ();
 
   if (index >= s)
-    return 0;
+    return nullptr;
 
   KateCodeFoldingNode *n = m_children[index];
 
diff --git a/kate/part/kateconfig.cpp b/kate/part/kateconfig.cpp
index 981359d1a..4daa46460 100644
--- a/kate/part/kateconfig.cpp
+++ b/kate/part/kateconfig.cpp
@@ -79,9 +79,9 @@ void KateConfig::configEnd ()
 //END
 
 //BEGIN KateDocumentConfig
-KateDocumentConfig *KateDocumentConfig::s_global = 0;
-KateViewConfig *KateViewConfig::s_global = 0;
-KateRendererConfig *KateRendererConfig::s_global = 0;
+KateDocumentConfig *KateDocumentConfig::s_global = nullptr;
+KateViewConfig *KateViewConfig::s_global = nullptr;
+KateRendererConfig *KateRendererConfig::s_global = nullptr;
 
 KateDocumentConfig::KateDocumentConfig ()
  : m_tabWidth (8),
@@ -105,7 +105,7 @@ KateDocumentConfig::KateDocumentConfig ()
    m_backupPrefixSet (true),
    m_backupSuffixSet (true),
    m_pluginsSet (m_plugins.size()),
-   m_doc (0)
+   m_doc (nullptr)
 {
   s_global = this;
 
@@ -626,7 +626,7 @@ KateViewConfig::KateViewConfig ()
    m_defaultMarkTypeSet (true),
    m_persistentSelectionSet (true),
    m_textToSearchModeSet (true),
-   m_view (0)
+   m_view (nullptr)
 {
   s_global = this;
 
@@ -1014,7 +1014,7 @@ KateRendererConfig::KateRendererConfig ()
    m_iconBarColorSet (true),
    m_lineNumberColorSet (true),
    m_lineMarkerColorSet (m_lineMarkerColor.size()),
-   m_renderer (0)
+   m_renderer (nullptr)
 {
   // init bitarray
   m_lineMarkerColorSet.fill (true);
@@ -1028,7 +1028,7 @@ KateRendererConfig::KateRendererConfig ()
 }
 
 KateRendererConfig::KateRendererConfig (KateRenderer *renderer)
- : m_font (0),
+ : m_font (nullptr),
    m_lineMarkerColor (KTextEditor::MarkInterface::reservedMarkersCount()),
    m_schemaSet (false),
    m_fontSet (false),
diff --git a/kate/part/katedialogs.cpp b/kate/part/katedialogs.cpp
index 09111d14e..995c942bb 100644
--- a/kate/part/katedialogs.cpp
+++ b/kate/part/katedialogs.cpp
@@ -1253,7 +1253,7 @@ void KatePartPluginConfigPage::slotConfigure()
 //BEGIN KateHlConfigPage
 KateHlConfigPage::KateHlConfigPage (TQWidget *parent, KateDocument *doc)
  : KateConfigPage (parent, "")
- , hlData (0)
+ , hlData (nullptr)
  , m_doc (doc)
 {
   TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
@@ -1383,7 +1383,7 @@ void KateHlConfigPage::hlChanged(int z)
 
   if (!hl)
   {
-    hlData = 0;
+    hlData = nullptr;
     return;
   }
 
@@ -1483,7 +1483,7 @@ void KateHlDownloadDialog::listDataReceived(TDEIO::Job *, const TQByteArray &dat
       doc.setContent(listData);
       TQDomElement DocElem=doc.documentElement();
       TQDomNode n=DocElem.firstChild();
-      KateHighlighting *hl = 0;
+      KateHighlighting *hl = nullptr;
 
       if (n.isNull()) kdDebug(13000)<<"There is no usable childnode"<<endl;
       while (!n.isNull())
@@ -1505,7 +1505,7 @@ void KateHlDownloadDialog::listDataReceived(TDEIO::Job *, const TQByteArray &dat
             installedVersion="    "+hl->version();
             break;
           }
-          else hl = 0;
+          else hl = nullptr;
         }
 
         // autoselect entry if new or updated.
@@ -1544,7 +1544,7 @@ void KateHlDownloadDialog::slotUser1()
 
 //BEGIN KateGotoLineDialog
 KateGotoLineDialog::KateGotoLineDialog(TQWidget *parent, int line, int max)
-  : KDialogBase(parent, 0L, true, i18n("Go to Line"), Ok | Cancel, Ok) {
+  : KDialogBase(parent, nullptr, true, i18n("Go to Line"), Ok | Cancel, Ok) {
 
   TQWidget *page = new TQWidget(this);
   setMainWidget(page);
@@ -1575,7 +1575,7 @@ KateModOnHdPrompt::KateModOnHdPrompt( KateDocument *doc,
   : KDialogBase( parent, "", true, "", Ok|Apply|Cancel|User1 ),
     m_doc( doc ),
     m_modtype ( modtype ),
-    m_tmpfile( 0 )
+    m_tmpfile( nullptr )
 {
   TQString title, btnOK, whatisok;
   if ( modtype == 3 ) // deleted
@@ -1695,13 +1695,13 @@ void KateModOnHdPrompt::slotPDone( TDEProcess *p )
                              "diff(1) is installed and in your PATH."),
                         i18n("Error Creating Diff") );
     delete m_tmpfile;
-    m_tmpfile = 0;
+    m_tmpfile = nullptr;
     return;
   }
 
   KRun::runURL( m_tmpfile->name(), "text/x-diff", true );
   delete m_tmpfile;
-  m_tmpfile = 0;
+  m_tmpfile = nullptr;
 }
 
 void KateModOnHdPrompt::slotApply()
diff --git a/kate/part/katedialogs.h b/kate/part/katedialogs.h
index 32d7cfccd..91633c634 100644
--- a/kate/part/katedialogs.h
+++ b/kate/part/katedialogs.h
@@ -82,7 +82,7 @@ class KateConfigPage : public Kate::ConfigPage
   TQ_OBJECT
 
   public:
-    KateConfigPage ( TQWidget *parent=0, const char *name=0 );
+    KateConfigPage ( TQWidget *parent=nullptr, const char *name=nullptr );
     virtual ~KateConfigPage ();
 
   public:
@@ -270,7 +270,7 @@ class KatePartPluginListView : public TDEListView
   friend class KatePartPluginListItem;
 
   public:
-    KatePartPluginListView (TQWidget *parent = 0, const char *name = 0);
+    KatePartPluginListView (TQWidget *parent = nullptr, const char *name = nullptr);
 
   signals:
     void stateChange(KatePartPluginListItem *, bool);
diff --git a/kate/part/katedocument.cpp b/kate/part/katedocument.cpp
index 7781df55e..04c03118b 100644
--- a/kate/part/katedocument.cpp
+++ b/kate/part/katedocument.cpp
@@ -97,15 +97,15 @@ KateDocument::KateDocument ( bool bSingleViewMode, bool bBrowserView,
   m_plugins (KateFactory::self()->plugins().count()),
   m_undoDontMerge(false),
   m_undoIgnoreCancel(false),
-  lastUndoGroupWhenSaved( 0 ),
-  lastRedoGroupWhenSaved( 0 ),
+  lastUndoGroupWhenSaved( nullptr ),
+  lastRedoGroupWhenSaved( nullptr ),
   docWasSavedWhenUndoWasEmpty( true ),
   docWasSavedWhenRedoWasEmpty( true ),
   m_modOnHd (false),
   m_modOnHdReason (0),
-  m_job (0),
-  m_tempFile (0),
-  m_tabInterceptor(0)
+  m_job (nullptr),
+  m_tempFile (nullptr),
+  m_tabInterceptor(nullptr)
 {
   m_undoComplexMerge=false;
   m_isInUndo = false;
@@ -131,7 +131,7 @@ KateDocument::KateDocument ( bool bSingleViewMode, bool bBrowserView,
   setWordWrapInterfaceDCOPSuffix (documentDCOPSuffix());
 
   // init local plugin array
-  m_plugins.fill (0);
+  m_plugins.fill (nullptr);
 
   // register doc at factory
   KateFactory::self()->registerDocument (this);
@@ -147,7 +147,7 @@ KateDocument::KateDocument ( bool bSingleViewMode, bool bBrowserView,
   m_config = new KateDocumentConfig (this);
 
   // init some more vars !
-  m_activeView = 0L;
+  m_activeView = nullptr;
 
   hlSetByUser = false;
   m_fileType = -1;
@@ -156,7 +156,7 @@ KateDocument::KateDocument ( bool bSingleViewMode, bool bBrowserView,
 
   editSessionNumber = 0;
   editIsRunning = false;
-  m_editCurrentUndo = 0L;
+  m_editCurrentUndo = nullptr;
   editWithUndo = false;
 
   m_docNameNumber = 0;
@@ -299,7 +299,7 @@ void KateDocument::unloadPlugin (uint pluginIndex)
   disablePluginGUI (m_plugins[pluginIndex]);
 
   delete m_plugins[pluginIndex];
-  m_plugins[pluginIndex] = 0L;
+  m_plugins[pluginIndex] = nullptr;
 }
 
 void KateDocument::enablePluginGUI (KTextEditor::Plugin *plugin, KateView *view)
@@ -417,10 +417,10 @@ KTextEditor::ConfigPage *KateDocument::configPage (uint number, TQWidget *parent
       return new KatePartPluginConfigPage (parent);
 
     default:
-      return 0;
+      return nullptr;
   }
 
-  return 0;
+  return nullptr;
 }
 
 TQString KateDocument::configPageName (uint number) const
@@ -664,7 +664,7 @@ bool KateDocument::clear()
   if (!isReadWrite())
     return false;
 
-  for (KateView * view = m_views.first(); view != 0L; view = m_views.next() ) {
+  for (KateView * view = m_views.first(); view != nullptr; view = m_views.next() ) {
     view->clear();
     view->tagAll();
     view->update();
@@ -704,7 +704,7 @@ bool KateDocument::insertText( uint line, uint col, const TQString &s, bool bloc
   uint tw = config()->tabWidth();
   uint insertPosExpanded = insertPos;
   KateTextLine::Ptr l = m_buffer->line( line );
-  if (l != 0)
+  if (l)
     insertPosExpanded = l->cursorX( insertPos, tw );
 
   for (uint pos = 0; pos < len; pos++)
@@ -969,7 +969,7 @@ void KateDocument::undoEnd()
     m_undoDontMerge = false;
     m_undoIgnoreCancel = true;
 
-    m_editCurrentUndo = 0L;
+    m_editCurrentUndo = nullptr;
 
     // (Re)Start the single-shot timer to cancel the undo merge
     // the user has 5 seconds to input more data, or undo merging gets canceled for the current undo item.
@@ -993,7 +993,7 @@ void KateDocument::undoCancel()
 
   // As you can see by the above assert, neither of these should really be required
   delete m_editCurrentUndo;
-  m_editCurrentUndo = 0L;
+  m_editCurrentUndo = nullptr;
 }
 
 void KateDocument::undoSafePoint() {
@@ -1410,7 +1410,7 @@ bool KateDocument::editInsertLine ( uint line, const TQString &s )
   removeTrailingSpace( line ); // old line
 
   KateTextLine::Ptr tl = new KateTextLine();
-  tl->insertText (0, s.length(), s.unicode(), 0);
+  tl->insertText (0, s.length(), s.unicode(), nullptr);
   m_buffer->insertLine(line, tl);
   m_buffer->changeLine(line);
 
@@ -1459,7 +1459,7 @@ bool KateDocument::editRemoveLine ( uint line )
   m_buffer->removeLine(line);
 
   TQPtrList<KTextEditor::Mark> list;
-  KTextEditor::Mark* rmark = 0;
+  KTextEditor::Mark* rmark = nullptr;
   for( TQIntDictIterator<KTextEditor::Mark> it( m_marks ); it.current(); ++it )
   {
     if ( (it.current()->line > line) )
@@ -1574,8 +1574,8 @@ void KateDocument::updateModified()
   unsigned char currentPattern = 0;
   const unsigned char patterns[] = {5,16,24,26,88,90,93,133,144,149,165};
   const unsigned char patternCount = sizeof(patterns);
-  KateUndoGroup* undoLast = 0;
-  KateUndoGroup* redoLast = 0;
+  KateUndoGroup* undoLast = nullptr;
+  KateUndoGroup* redoLast = nullptr;
 
   if (undoItems.isEmpty())
   {
@@ -1624,7 +1624,7 @@ void KateDocument::clearUndo()
   undoItems.clear ();
   undoItems.setAutoDelete (false);
 
-  lastUndoGroupWhenSaved = 0;
+  lastUndoGroupWhenSaved = nullptr;
   docWasSavedWhenUndoWasEmpty = false;
 
   emit undoChanged ();
@@ -1636,7 +1636,7 @@ void KateDocument::clearRedo()
   redoItems.clear ();
   redoItems.setAutoDelete (false);
 
-  lastRedoGroupWhenSaved = 0;
+  lastRedoGroupWhenSaved = nullptr;
   docWasSavedWhenRedoWasEmpty = false;
 
   emit undoChanged ();
@@ -2281,7 +2281,7 @@ bool KateDocument::openURL( const KURL &url )
 
     m_file = m_url.path();
 
-    emit started( 0 );
+    emit started( nullptr );
 
     if (openFile())
     {
@@ -2342,8 +2342,8 @@ void KateDocument::slotFinishedKate ( TDEIO::Job * job )
     return;
 
   delete m_tempFile;
-  m_tempFile = 0;
-  m_job = 0;
+  m_tempFile = nullptr;
+  m_job = nullptr;
 
   if (job->error())
     emit canceled( job->errorString() );
@@ -2361,16 +2361,16 @@ void KateDocument::abortLoadKate()
   {
     kdDebug(13020) << "Aborting job " << m_job << endl;
     m_job->kill();
-    m_job = 0;
+    m_job = nullptr;
   }
 
   delete m_tempFile;
-  m_tempFile = 0;
+  m_tempFile = nullptr;
 }
 
 bool KateDocument::openFile()
 {
-  return openFile (0);
+  return openFile (nullptr);
 }
 
 bool KateDocument::openFile(TDEIO::Job * job)
@@ -2449,7 +2449,7 @@ bool KateDocument::openFile(TDEIO::Job * job)
   //
   // update views
   //
-  for (KateView * view = m_views.first(); view != 0L; view = m_views.next() )
+  for (KateView * view = m_views.first(); view != nullptr; view = m_views.next() )
   {
     view->updateView(true);
   }
@@ -2571,13 +2571,13 @@ bool KateDocument::saveFile()
 
       if (!isModified())
       {
-        if (KMessageBox::warningContinueCancel(0,
+        if (KMessageBox::warningContinueCancel(nullptr,
                str + i18n("Do you really want to save this unmodified file? You could overwrite changed data in the file on disk."),i18n("Trying to Save Unmodified File"),i18n("Save Nevertheless")) != KMessageBox::Continue)
           return false;
       }
       else
       {
-        if (KMessageBox::warningContinueCancel(0,
+        if (KMessageBox::warningContinueCancel(nullptr,
                str + i18n("Do you really want to save this file? Both your open file and the file on disk were changed. There could be some data lost."),i18n("Possible Data Loss"),i18n("Save Nevertheless")) != KMessageBox::Continue)
           return false;
       }
@@ -2588,7 +2588,7 @@ bool KateDocument::saveFile()
   // can we encode it if we want to save it ?
   //
   if (!m_buffer->canEncode ()
-       && (KMessageBox::warningContinueCancel(0,
+       && (KMessageBox::warningContinueCancel(nullptr,
            i18n("The selected encoding cannot encode every unicode character in this document. Do you really want to save it? There could be some data lost."),i18n("Possible Data Loss"),i18n("Save Nevertheless")) != KMessageBox::Continue))
   {
     return false;
@@ -2800,7 +2800,7 @@ bool KateDocument::closeURL()
   m_buffer->setHighlight(0);
 
   // update all our views
-  for (KateView * view = m_views.first(); view != 0L; view = m_views.next() )
+  for (KateView * view = m_views.first(); view != nullptr; view = m_views.next() )
   {
     // Explicitly call the internal version because we don't want this to look like
     // an external request (and thus have the view not TQWidget::scroll()ed.
@@ -2825,7 +2825,7 @@ void KateDocument::setReadWrite( bool rw )
   {
     KParts::ReadWritePart::setReadWrite (rw);
 
-    for( KateView* view = m_views.first(); view != 0L; view = m_views.next() )
+    for( KateView* view = m_views.first(); view != nullptr; view = m_views.next() )
     {
       view->slotUpdate();
       view->slotReadWriteChanged ();
@@ -2838,7 +2838,7 @@ void KateDocument::setModified(bool m) {
   if (isModified() != m) {
     KParts::ReadWritePart::setModified (m);
 
-    for( KateView* view = m_views.first(); view != 0L; view = m_views.next() )
+    for( KateView* view = m_views.first(); view != nullptr; view = m_views.next() )
     {
       view->slotUpdate();
     }
@@ -2891,7 +2891,7 @@ void KateDocument::addView(KTextEditor::View *view) {
   m_textEditViews.append( view );
 
   // apply the view & renderer vars from the file type
-  const KateFileType *t = 0;
+  const KateFileType *t = nullptr;
   if ((m_fileType > -1) && (t = KateFactory::self()->fileTypeManager()->fileType(m_fileType)))
     readVariableLine (t->varLine, true);
 
@@ -2906,7 +2906,7 @@ void KateDocument::removeView(KTextEditor::View *view) {
     return;
 
   if (m_activeView == view)
-    m_activeView = 0L;
+    m_activeView = nullptr;
 
   m_views.removeRef( (KateView *) view );
   m_textEditViews.removeRef( view  );
@@ -4424,7 +4424,7 @@ void KateDocument::reloadFile()
     if (m_modOnHd && s_fileChangedDialogsActivated)
     {
       int i = KMessageBox::warningYesNoCancel
-                (0, reasonedMOHString() + "\n\n" + i18n("What do you want to do?"),
+                (nullptr, reasonedMOHString() + "\n\n" + i18n("What do you want to do?"),
                 i18n("File Was Changed on Disk"), i18n("&Reload File"), i18n("&Ignore Changes"));
 
       if ( i != KMessageBox::Yes)
@@ -4582,7 +4582,7 @@ void KateDocument::updateConfig ()
   emit undoChanged ();
   tagAll();
 
-  for (KateView * view = m_views.first(); view != 0L; view = m_views.next() )
+  for (KateView * view = m_views.first(); view != nullptr; view = m_views.next() )
   {
     view->updateDocumentConfig ();
   }
@@ -4627,7 +4627,7 @@ void KateDocument::readVariables(bool onlyViewAndRenderer)
 
   // views!
   KateView *v;
-  for (v = m_views.first(); v != 0L; v= m_views.next() )
+  for (v = m_views.first(); v != nullptr; v= m_views.next() )
   {
     v->config()->configStart();
     v->renderer()->config()->configStart();
@@ -4648,7 +4648,7 @@ void KateDocument::readVariables(bool onlyViewAndRenderer)
   if (!onlyViewAndRenderer)
     m_config->configEnd();
 
-  for (v = m_views.first(); v != 0L; v= m_views.next() )
+  for (v = m_views.first(); v != nullptr; v= m_views.next() )
   {
     v->config()->configEnd();
     v->renderer()->config()->configEnd();
@@ -4833,7 +4833,7 @@ void KateDocument::setViewVariable( TQString var, TQString val )
   bool state;
   int n;
   TQColor c;
-  for (v = m_views.first(); v != 0L; v= m_views.next() )
+  for (v = m_views.first(); v != nullptr; v= m_views.next() )
   {
     if ( var == "dynamic-word-wrap" && checkBoolValue( val, &state ) )
       v->config()->setDynWordWrap( state );
@@ -5043,7 +5043,7 @@ void KateDocument::updateFileType (int newType, bool user)
 {
   if (user || !m_fileTypeSetByUser)
   {
-    const KateFileType *t = 0;
+    const KateFileType *t = nullptr;
     if ((newType == -1) || (t = KateFactory::self()->fileTypeManager()->fileType (newType)))
     {
       m_fileType = newType;
@@ -5053,7 +5053,7 @@ void KateDocument::updateFileType (int newType, bool user)
         m_config->configStart();
         // views!
         KateView *v;
-        for (v = m_views.first(); v != 0L; v= m_views.next() )
+        for (v = m_views.first(); v != nullptr; v= m_views.next() )
         {
           v->config()->configStart();
           v->renderer()->config()->configStart();
@@ -5062,7 +5062,7 @@ void KateDocument::updateFileType (int newType, bool user)
         readVariableLine( t->varLine );
 
         m_config->configEnd();
-        for (v = m_views.first(); v != 0L; v= m_views.next() )
+        for (v = m_views.first(); v != nullptr; v= m_views.next() )
         {
           v->config()->configEnd();
           v->renderer()->config()->configEnd();
@@ -5095,7 +5095,7 @@ void KateDocument::slotQueryClose_save(bool *handled, bool* abortClosing) {
       if (m_url.isEmpty())
       {
         KEncodingFileDialog::Result res=KEncodingFileDialog::getSaveURLAndEncoding(config()->encoding(),
-                TQString::null,TQString::null,0,i18n("Save File"));
+                TQString::null,TQString::null,nullptr,i18n("Save File"));
 
         if( res.URLs.isEmpty() || !checkOverwrite( res.URLs.first() ) ) {
                 *abortClosing=true;
@@ -5122,7 +5122,7 @@ bool KateDocument::checkOverwrite( KURL u )
   if( !info.exists() )
     return true;
 
-  return KMessageBox::Cancel != KMessageBox::warningContinueCancel( 0,
+  return KMessageBox::Cancel != KMessageBox::warningContinueCancel( nullptr,
     i18n( "A file named \"%1\" already exists. "
           "Are you sure you want to overwrite it?" ).arg( info.fileName() ),
     i18n( "Overwrite File?" ),
@@ -5158,7 +5158,7 @@ bool KateDocument::setTabInterceptor(KateKeyInterceptorFunctor *interceptor) {
 
 bool KateDocument::removeTabInterceptor(KateKeyInterceptorFunctor *interceptor) {
   if (m_tabInterceptor!=interceptor) return false;
-  m_tabInterceptor=0;
+  m_tabInterceptor=nullptr;
   return true;
 }
 //END KTextEditor::TemplateInterface
diff --git a/kate/part/katedocument.h b/kate/part/katedocument.h
index c16a86840..1650d946e 100644
--- a/kate/part/katedocument.h
+++ b/kate/part/katedocument.h
@@ -91,7 +91,7 @@ class KateDocument : public Kate::Document,
 
   public:
     KateDocument (bool bSingleViewMode=false, bool bBrowserView=false, bool bReadOnly=false,
-        TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject * = 0, const char * = 0);
+        TQWidget *parentWidget = nullptr, const char *widgetName = nullptr, TQObject * = nullptr, const char * = nullptr);
     ~KateDocument ();
 
     bool closeURL();
@@ -160,7 +160,7 @@ class KateDocument : public Kate::Document,
   //
   public slots:
     uint configPages () const;
-    KTextEditor::ConfigPage *configPage (uint number = 0, TQWidget *parent = 0, const char *name=0 );
+    KTextEditor::ConfigPage *configPage (uint number = 0, TQWidget *parent = nullptr, const char *name=nullptr );
     TQString configPageName (uint number = 0) const;
     TQString configPageFullName (uint number = 0) const;
     TQPixmap configPagePixmap (uint number = 0, int size = TDEIcon::SizeSmall) const;
@@ -258,7 +258,7 @@ class KateDocument : public Kate::Document,
      * @param newLineAdded return value is true, if new line was added (may be 0)
      * @return true on success
      */
-    bool editWrapLine ( uint line, uint col, bool newLine = true, bool *newLineAdded = 0 );
+    bool editWrapLine ( uint line, uint col, bool newLine = true, bool *newLineAdded = nullptr );
     /**
      * Unwrap @p line. If @p removeLine is true, we force to join the lines. If
      * @p removeLine is true, @p length is ignored (eg not needed).
@@ -580,18 +580,18 @@ class KateDocument : public Kate::Document,
   // Kate::Document stuff, this is all deprecated!!!!!!!!!!
   //
   public:
-    Kate::ConfigPage *colorConfigPage (TQWidget *) { return 0; }
-    Kate::ConfigPage *fontConfigPage (TQWidget *) { return 0; }
-    Kate::ConfigPage *indentConfigPage (TQWidget *) { return 0; }
-    Kate::ConfigPage *selectConfigPage (TQWidget *) { return 0; }
-    Kate::ConfigPage *editConfigPage (TQWidget *) { return 0; }
-    Kate::ConfigPage *keysConfigPage (TQWidget *) { return 0; }
-    Kate::ConfigPage *hlConfigPage (TQWidget *) { return 0; }
-    Kate::ConfigPage *viewDefaultsConfigPage (TQWidget *) { return 0; }
-    Kate::ConfigPage *saveConfigPage( TQWidget * ) { return 0; }
-
-    Kate::ActionMenu *hlActionMenu (const TQString& /* text */, TQObject* /* parent */ = 0, const char* /* name */ = 0) { return 0; }
-    Kate::ActionMenu *exportActionMenu (const TQString& /* text */, TQObject* /* parent */ = 0, const char* /* name */ = 0) { return 0; }
+    Kate::ConfigPage *colorConfigPage (TQWidget *) { return nullptr; }
+    Kate::ConfigPage *fontConfigPage (TQWidget *) { return nullptr; }
+    Kate::ConfigPage *indentConfigPage (TQWidget *) { return nullptr; }
+    Kate::ConfigPage *selectConfigPage (TQWidget *) { return nullptr; }
+    Kate::ConfigPage *editConfigPage (TQWidget *) { return nullptr; }
+    Kate::ConfigPage *keysConfigPage (TQWidget *) { return nullptr; }
+    Kate::ConfigPage *hlConfigPage (TQWidget *) { return nullptr; }
+    Kate::ConfigPage *viewDefaultsConfigPage (TQWidget *) { return nullptr; }
+    Kate::ConfigPage *saveConfigPage( TQWidget * ) { return nullptr; }
+
+    Kate::ActionMenu *hlActionMenu (const TQString& /* text */, TQObject* /* parent */ = nullptr, const char* /* name */ = nullptr) { return nullptr; }
+    Kate::ActionMenu *exportActionMenu (const TQString& /* text */, TQObject* /* parent */ = nullptr, const char* /* name */ = nullptr) { return nullptr; }
 
   public:
     /**
@@ -784,7 +784,7 @@ class KateDocument : public Kate::Document,
      *
      * @since 3.3
      */
-    void slotModifiedOnDisk( Kate::View *v=0 );
+    void slotModifiedOnDisk( Kate::View *v=nullptr );
 
     /**
      * Reloads the current document from disc if possible
@@ -1014,7 +1014,7 @@ class KateDocument : public Kate::Document,
       bool invokeTabInterceptor(KKey);
 
   protected:
-      virtual bool insertTemplateTextImplementation ( uint line, uint column, const TQString &templateString, const TQMap<TQString,TQString> &initialValues, TQWidget *parentWindow=0 );
+      virtual bool insertTemplateTextImplementation ( uint line, uint column, const TQString &templateString, const TQMap<TQString,TQString> &initialValues, TQWidget *parentWindow=nullptr );
       KateKeyInterceptorFunctor *m_tabInterceptor;
 
   protected slots:
diff --git a/kate/part/katefactory.cpp b/kate/part/katefactory.cpp
index 56bdfa307..9dc0adac5 100644
--- a/kate/part/katefactory.cpp
+++ b/kate/part/katefactory.cpp
@@ -64,15 +64,15 @@ class KateFactoryPublic : public KParts::Factory
 
 K_EXPORT_COMPONENT_FACTORY( libkatepart, KateFactoryPublic )
 
-KateFactory *KateFactory::s_self = 0;
+KateFactory *KateFactory::s_self = nullptr;
 
 KateFactory::KateFactory ()
  : m_aboutData ("katepart", I18N_NOOP("Kate Part"), KATEPART_VERSION,
              I18N_NOOP( "Embeddable editor component" ), TDEAboutData::License_LGPL_V2,
-             I18N_NOOP( "(c) 2000-2004 The Kate Authors" ), 0, "http://kate-editor.org/")
+             I18N_NOOP( "(c) 2000-2004 The Kate Authors" ), nullptr, "http://kate-editor.org/")
  , m_instance (&m_aboutData)
  , m_plugins (TDETrader::self()->query("KTextEditor/Plugin"))
- , m_jscript (0)
+ , m_jscript (nullptr)
 {
   // set s_self
   s_self = this;
@@ -91,8 +91,8 @@ KateFactory::KateFactory ()
   m_aboutData.addAuthor ("Michael McCallum", I18N_NOOP("Core Developer"), "gholam@xtra.co.nz");
   m_aboutData.addAuthor ("Jochen Wilhemly", I18N_NOOP( "KWrite Author" ), "digisnap@cs.tu-berlin.de" );
   m_aboutData.addAuthor ("Michael Koch",I18N_NOOP("KWrite port to KParts"), "koch@kde.org");
-  m_aboutData.addAuthor ("Christian Gebauer", 0, "gebauer@kde.org" );
-  m_aboutData.addAuthor ("Simon Hausmann", 0, "hausmann@kde.org" );
+  m_aboutData.addAuthor ("Christian Gebauer", nullptr, "gebauer@kde.org" );
+  m_aboutData.addAuthor ("Simon Hausmann", nullptr, "hausmann@kde.org" );
   m_aboutData.addAuthor ("Glen Parker",I18N_NOOP("KWrite Undo History, Kspell integration"), "glenebob@nwlink.com");
   m_aboutData.addAuthor ("Scott Manson",I18N_NOOP("KWrite XML Syntax highlighting support"), "sdmanson@alltel.net");
   m_aboutData.addAuthor ("John Firebaugh",I18N_NOOP("Patches and more"), "jfirebaugh@kde.org");
@@ -170,7 +170,7 @@ KateFactory::~KateFactory()
     s_self=this; /* this is needed because the KStaticDeleter sets the global reference to 0, before it deletes the object it handles.
     To prevent a crash again restore the factory pointer temporarily. (jowenn)*/
     delete doc;
-    s_self=0;
+    s_self=nullptr;
   }
   /*another solution would be to set a flag in the documents, and inhibit calling of the deregistering methods, but I don't see a problem
   if all created objects are deleted before their factory. If somebody sees a problem, let me know*/
diff --git a/kate/part/katefiletype.cpp b/kate/part/katefiletype.cpp
index eeecce36a..297cec754 100644
--- a/kate/part/katefiletype.cpp
+++ b/kate/part/katefiletype.cpp
@@ -196,7 +196,7 @@ int KateFileTypeManager::fileType (KateDocument *doc)
     int pri = -1;
     int hl = -1;
 
-    for (KateFileType *type = types.first(); type != 0L; type = types.next())
+    for (KateFileType *type = types.first(); type != nullptr; type = types.next())
     {
       if (type->priority > pri)
       {
@@ -233,7 +233,7 @@ int KateFileTypeManager::wildcardsFind (const TQString &fileName)
     int pri = -1;
     int hl = -1;
 
-    for (KateFileType *type = types.first(); type != 0L; type = types.next())
+    for (KateFileType *type = types.first(); type != nullptr; type = types.next())
     {
       if (type->priority > pri)
       {
@@ -253,7 +253,7 @@ const KateFileType *KateFileTypeManager::fileType (uint number)
   if (number < m_types.count())
     return m_types.at(number);
 
-  return 0;
+  return nullptr;
 }
 //END KateFileTypeManager
 
@@ -262,7 +262,7 @@ KateFileTypeConfigTab::KateFileTypeConfigTab( TQWidget *parent )
   : KateConfigPage( parent )
 {
   m_types.setAutoDelete (true);
-  m_lastType = 0;
+  m_lastType = nullptr;
 
   TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() );
 
@@ -393,7 +393,7 @@ void KateFileTypeConfigTab::defaults()
 
 void KateFileTypeConfigTab::update ()
 {
-  m_lastType = 0;
+  m_lastType = nullptr;
 
   typeCombo->clear ();
 
@@ -461,7 +461,7 @@ void KateFileTypeConfigTab::typeChanged (int type)
 {
   save ();
 
-  KateFileType *t = 0;
+  KateFileType *t = nullptr;
 
   if ((type > -1) && ((uint)type < m_types.count()))
     t = m_types.at(type);
@@ -516,7 +516,7 @@ void KateFileTypeConfigTab::showMTDlg()
 //BEGIN KateViewFileTypeAction
 void KateViewFileTypeAction::init()
 {
-  m_doc = 0;
+  m_doc = nullptr;
   subMenus.setAutoDelete( true );
 
   popupMenu()->insertItem ( i18n("None"), this, TQ_SLOT(setType(int)), 0,  0);
@@ -573,7 +573,7 @@ void KateViewFileTypeAction::slotAboutToShow()
     popupMenu()->setItemChecked (0, true);
   else
   {
-    const KateFileType *t = 0;
+    const KateFileType *t = nullptr;
     if ((t = KateFactory::self()->fileTypeManager()->fileType (doc->fileType())))
     {
       int i = subMenusName.findIndex (t->section);
diff --git a/kate/part/katefiletype.h b/kate/part/katefiletype.h
index c85682249..55bc8c23f 100644
--- a/kate/part/katefiletype.h
+++ b/kate/part/katefiletype.h
@@ -117,7 +117,7 @@ class KateViewFileTypeAction : public Kate::ActionMenu
   TQ_OBJECT
 
   public:
-    KateViewFileTypeAction(const TQString& text, TQObject* parent = 0, const char* name = 0)
+    KateViewFileTypeAction(const TQString& text, TQObject* parent = nullptr, const char* name = nullptr)
        : Kate::ActionMenu(text, parent, name) { init(); };
 
     ~KateViewFileTypeAction(){;};
diff --git a/kate/part/katefont.cpp b/kate/part/katefont.cpp
index 0f8ca30cd..6050220c0 100644
--- a/kate/part/katefont.cpp
+++ b/kate/part/katefont.cpp
@@ -31,7 +31,7 @@
 
 KateFontMetrics::KateFontMetrics(const TQFont& f) : TQFontMetrics(f)
 {
-  for (int i=0; i<256; i++) warray[i]=0;
+  for (int i=0; i<256; i++) warray[i]=nullptr;
 }
 
 KateFontMetrics::~KateFontMetrics()
diff --git a/kate/part/katehighlight.cpp b/kate/part/katehighlight.cpp
index 12093902c..ac5a76d81 100644
--- a/kate/part/katehighlight.cpp
+++ b/kate/part/katehighlight.cpp
@@ -88,7 +88,7 @@ class KateHlItem
 
     virtual bool lineContinue(){return false;}
 
-    virtual TQStringList *capturedTexts() {return 0;}
+    virtual TQStringList *capturedTexts() {return nullptr;}
     virtual KateHlItem *clone(const TQStringList *) {return this;}
 
     static void dynamicSubstitute(TQString& str, const TQStringList *args);
@@ -385,7 +385,7 @@ class KateHlDetectIdentifier : public KateHlItem
 //END
 
 //BEGIN STATICS
-KateHlManager *KateHlManager::s_self = 0;
+KateHlManager *KateHlManager::s_self = nullptr;
 
 static const bool trueBool = true;
 static const TQString stdDeliminator = TQString (" \t.():!+,-<=>%&*/;?[]^{|}~\\");
@@ -635,7 +635,7 @@ void KateHlKeyword::addList(const TQStringList& list)
       dict.resize (len+1);
 
       for (uint m=oldSize; m < dict.size(); ++m)
-        dict[m] = 0;
+        dict[m] = nullptr;
     }
 
     if (!dict[len])
@@ -1185,7 +1185,7 @@ KateHighlighting::KateHighlighting(const KateSyntaxModeListItem *def) : refCount
   folding=false;
   internalIDList.setAutoDelete(true);
 
-  if (def == 0)
+  if (!def)
   {
     noHl = true;
     iName = "None"; // not translated internal name (for config and more)
@@ -1408,7 +1408,7 @@ void KateHighlighting::doHighlight ( KateTextLine *prevLine,
   const int startNonSpace = (firstChar == -1) ? len : firstChar;
 
   // last found item
-  KateHlItem *item = 0;
+  KateHlItem *item = nullptr;
 
   // loop over the line, offset gives current offset
   int offset = 0;
@@ -1419,7 +1419,7 @@ void KateHighlighting::doHighlight ( KateTextLine *prevLine,
     bool customStartEnableDetermined = false;
 
     uint index = 0;
-    for (item = context->items.empty() ? 0 : context->items[0]; item; item = (++index < context->items.size()) ? context->items[index] : 0 )
+    for (item = context->items.empty() ? nullptr : context->items[0]; item; item = (++index < context->items.size()) ? context->items[index] : nullptr )
     {
       // does we only match if we are firstNonSpace?
       if (item->firstNonSpace && (offset > startNonSpace))
@@ -1506,7 +1506,7 @@ void KateHighlighting::doHighlight ( KateTextLine *prevLine,
       if (context->dynamic)
       {
         TQStringList *lst = item->capturedTexts();
-        if (lst != 0)
+        if (lst)
         {
           // Replace the top of the stack and the current context
           int newctx = makeDynamicContext(context, lst);
@@ -1681,7 +1681,7 @@ void KateHighlighting::getKateHlItemDataList (uint schema, KateHlItemDataList &l
   list.clear();
   createKateHlItemData(list);
 
-  for (KateHlItemData *p = list.first(); p != 0L; p = list.next())
+  for (KateHlItemData *p = list.first(); p != nullptr; p = list.next())
   {
     TQStringList s = config->readListEntry(p->name);
 
@@ -1697,10 +1697,10 @@ void KateHighlighting::getKateHlItemDataList (uint schema, KateHlItemDataList &l
       TQRgb col;
 
       tmp=s[1]; if (!tmp.isEmpty()) {
-         col=tmp.toUInt(0,16); p->setTextColor(col); }
+         col=tmp.toUInt(nullptr,16); p->setTextColor(col); }
 
       tmp=s[2]; if (!tmp.isEmpty()) {
-         col=tmp.toUInt(0,16); p->setSelectedTextColor(col); }
+         col=tmp.toUInt(nullptr,16); p->setSelectedTextColor(col); }
 
       tmp=s[3]; if (!tmp.isEmpty()) p->setBold(tmp!="0");
 
@@ -1711,10 +1711,10 @@ void KateHighlighting::getKateHlItemDataList (uint schema, KateHlItemDataList &l
       tmp=s[6]; if (!tmp.isEmpty()) p->setUnderline(tmp!="0");
 
       tmp=s[7]; if (!tmp.isEmpty()) {
-         col=tmp.toUInt(0,16); p->setBGColor(col); }
+         col=tmp.toUInt(nullptr,16); p->setBGColor(col); }
 
       tmp=s[8]; if (!tmp.isEmpty()) {
-         col=tmp.toUInt(0,16); p->setSelectedBGColor(col); }
+         col=tmp.toUInt(nullptr,16); p->setSelectedBGColor(col); }
 
     }
   }
@@ -1734,7 +1734,7 @@ void KateHighlighting::setKateHlItemDataList(uint schema, KateHlItemDataList &li
 
   TQStringList settings;
 
-  for (KateHlItemData *p = list.first(); p != 0L; p = list.next())
+  for (KateHlItemData *p = list.first(); p != nullptr; p = list.next())
   {
     settings.clear();
     settings<<TQString::number(p->defStyleNum,10);
@@ -1916,7 +1916,7 @@ KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data,
 {
   // No highlighting -> exit
   if (noHl)
-    return 0;
+    return nullptr;
 
   // get the (tagname) itemd type
   TQString dataname=KateHlManager::self()->syntax->groupItemData(data,TQString(""));
@@ -2051,7 +2051,7 @@ KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data,
   else
   {
     // oops, unknown type. Perhaps a spelling error in the xml file
-    return 0;
+    return nullptr;
   }
 
   // set lookAhead & dynamic properties
@@ -2501,7 +2501,7 @@ void KateHighlighting::makeContextList()
 
   // if there have been errors show them
   if (!errorsAndWarnings.isEmpty())
-  KMessageBox::detailedSorry(0L,i18n(
+  KMessageBox::detailedSorry(nullptr,i18n(
         "There were warning(s) and/or error(s) while parsing the syntax "
         "highlighting configuration."),
         errorsAndWarnings, i18n("Kate Syntax Highlighting Parser"));
@@ -2654,7 +2654,7 @@ int KateHighlighting::addToContextList(const TQString &ident, int ctx0)
   if (!KateHlManager::self()->syntax->setIdentifier(ident))
   {
     noHl=true;
-    KMessageBox::information(0L,i18n(
+    KMessageBox::information(nullptr,i18n(
         "Since there has been an error parsing the highlighting description, "
         "this highlighting will be disabled"));
     return 0;
@@ -2988,7 +2988,7 @@ KateHlManager::KateHlManager()
   }
 
   // Normal HL
-  KateHighlighting *hl = new KateHighlighting(0);
+  KateHighlighting *hl = new KateHighlighting(nullptr);
   hlList.prepend (hl);
   hlDict.insert (hl->name(), hl);
 
@@ -3066,7 +3066,7 @@ int KateHlManager::realWildcardFind(const TQString &fileName)
 
   TQPtrList<KateHighlighting> highlights;
 
-  for (KateHighlighting *highlight = hlList.first(); highlight != 0L; highlight = hlList.next()) {
+  for (KateHighlighting *highlight = hlList.first(); highlight != nullptr; highlight = hlList.next()) {
     highlight->loadWildcards();
 
     for (TQStringList::Iterator it = highlight->getPlainExtensions().begin(); it != highlight->getPlainExtensions().end(); ++it)
@@ -3085,7 +3085,7 @@ int KateHlManager::realWildcardFind(const TQString &fileName)
     int pri = -1;
     int hl = -1;
 
-    for (KateHighlighting *highlight = highlights.first(); highlight != 0L; highlight = highlights.next())
+    for (KateHighlighting *highlight = highlights.first(); highlight != nullptr; highlight = highlights.next())
     {
       if (highlight->priority() > pri)
       {
@@ -3107,7 +3107,7 @@ int KateHlManager::mimeFind( KateDocument *doc )
 
   TQPtrList<KateHighlighting> highlights;
 
-  for (KateHighlighting *highlight = hlList.first(); highlight != 0L; highlight = hlList.next())
+  for (KateHighlighting *highlight = hlList.first(); highlight != nullptr; highlight = hlList.next())
   {
     TQStringList l = TQStringList::split( sep, highlight->getMimetypes() );
 
@@ -3123,7 +3123,7 @@ int KateHlManager::mimeFind( KateDocument *doc )
     int pri = -1;
     int hl = -1;
 
-    for (KateHighlighting *highlight = highlights.first(); highlight != 0L; highlight = highlights.next())
+    for (KateHighlighting *highlight = highlights.first(); highlight != nullptr; highlight = highlights.next())
     {
       if (highlight->priority() > pri)
       {
@@ -3284,10 +3284,10 @@ void KateHlManager::getDefaults(uint schema, KateAttributeList &list)
       TQRgb col;
 
       tmp=s[0]; if (!tmp.isEmpty()) {
-         col=tmp.toUInt(0,16); i->setTextColor(col); }
+         col=tmp.toUInt(nullptr,16); i->setTextColor(col); }
 
       tmp=s[1]; if (!tmp.isEmpty()) {
-         col=tmp.toUInt(0,16); i->setSelectedTextColor(col); }
+         col=tmp.toUInt(nullptr,16); i->setSelectedTextColor(col); }
 
       tmp=s[2]; if (!tmp.isEmpty()) i->setBold(tmp!="0");
 
@@ -3300,7 +3300,7 @@ void KateHlManager::getDefaults(uint schema, KateAttributeList &list)
       tmp=s[6]; if (!tmp.isEmpty()) {
         if ( tmp != "-" )
         {
-          col=tmp.toUInt(0,16);
+          col=tmp.toUInt(nullptr,16);
           i->setBGColor(col);
         }
         else
@@ -3309,7 +3309,7 @@ void KateHlManager::getDefaults(uint schema, KateAttributeList &list)
       tmp=s[7]; if (!tmp.isEmpty()) {
         if ( tmp != "-" )
         {
-          col=tmp.toUInt(0,16);
+          col=tmp.toUInt(nullptr,16);
           i->setSelectedBGColor(col);
         }
         else
@@ -3372,7 +3372,7 @@ bool KateHlManager::hlHidden(int n)
 
 TQString KateHlManager::identifierForName(const TQString& name)
 {
-  KateHighlighting *hl = 0;
+  KateHighlighting *hl = nullptr;
 
   if ((hl = hlDict[name]))
     return hl->getIdentifier ();
@@ -3402,7 +3402,7 @@ bool KateHlManager::resetDynamicCtxs()
 //BEGIN KateHighlightAction
 void KateViewHighlightAction::init()
 {
-  m_doc = 0;
+  m_doc = nullptr;
   subMenus.setAutoDelete( true );
 
   connect(popupMenu(),TQ_SIGNAL(aboutToShow()),this,TQ_SLOT(slotAboutToShow()));
diff --git a/kate/part/katehighlight.h b/kate/part/katehighlight.h
index caad80a90..ff50b749f 100644
--- a/kate/part/katehighlight.h
+++ b/kate/part/katehighlight.h
@@ -249,7 +249,7 @@ class KateHighlighting
     KateHlItemDataList internalIDList;
 
     TQValueVector<KateHlContext*> m_contexts;
-    inline KateHlContext *contextNum (uint n) { if (n < m_contexts.size()) return m_contexts[n]; return 0; }
+    inline KateHlContext *contextNum (uint n) { if (n < m_contexts.size()) return m_contexts[n]; return nullptr; }
 
     TQMap< TQPair<KateHlContext *, TQString>, short> dynamicCtxs;
 
@@ -411,7 +411,7 @@ class KateViewHighlightAction: public Kate::ActionMenu
   TQ_OBJECT
 
   public:
-    KateViewHighlightAction(const TQString& text, TQObject* parent = 0, const char* name = 0)
+    KateViewHighlightAction(const TQString& text, TQObject* parent = nullptr, const char* name = nullptr)
        : Kate::ActionMenu(text, parent, name) { init(); };
 
     ~KateViewHighlightAction(){;};
diff --git a/kate/part/kateindentscriptabstracts.h b/kate/part/kateindentscriptabstracts.h
index 84dd219fb..ada2f0e5a 100644
--- a/kate/part/kateindentscriptabstracts.h
+++ b/kate/part/kateindentscriptabstracts.h
@@ -59,7 +59,7 @@ class KateIndentScript {
   public:
     KateIndentScript(KateIndentScriptImplAbstract *scr):m_scr(scr) { if (scr) scr->incRef(); }
     ~KateIndentScript() {if (m_scr) m_scr->decRef();}
-    KateIndentScript():m_scr(0) {}
+    KateIndentScript():m_scr(nullptr) {}
     KateIndentScript(const KateIndentScript &p):m_scr(p.m_scr){if (m_scr) m_scr->incRef();}
     KateIndentScript &operator=(const KateIndentScript &p) {
       if (m_scr==p.m_scr) return *this;
@@ -82,7 +82,7 @@ class KateIndentScript {
       if (m_scr) return m_scr->processNewline(view,begin,needcontinue,errorMsg); else return true;
     }
 
-    bool isNull () const {return (m_scr==0);}
+    bool isNull () const {return (m_scr==nullptr);}
   private:
     KateIndentScriptImplAbstract *m_scr;
 };
diff --git a/kate/part/katejscript.cpp b/kate/part/katejscript.cpp
index 2f91e476e..2d3ad01ed 100644
--- a/kate/part/katejscript.cpp
+++ b/kate/part/katejscript.cpp
@@ -238,8 +238,8 @@ class KateJSIndenter : public KJS::ObjectImp
 KateJScript::KateJScript ()
  : m_global (new KJS::Object (new KateJSGlobal ()))
  , m_interpreter (new KJS::Interpreter (*m_global))
- , m_document (new KJS::Object(wrapDocument(m_interpreter->globalExec(), 0)))
- , m_view (new KJS::Object (wrapView(m_interpreter->globalExec(), 0)))
+ , m_document (new KJS::Object(wrapDocument(m_interpreter->globalExec(), nullptr)))
+ , m_view (new KJS::Object (wrapView(m_interpreter->globalExec(), nullptr)))
 {
   // put some stuff into env., this should stay for all executions, as we keep external
   // references to the inserted KJS::Objects, this should avoid any garbage collection
@@ -358,7 +358,7 @@ DEFINE_PROTOTYPE("KateJSDocument",KateJSDocumentProto)
 IMPLEMENT_PROTOFUNC(KateJSDocumentProtoFunc)
 IMPLEMENT_PROTOTYPE(KateJSDocumentProto,KateJSDocumentProtoFunc)
 
-const KJS::ClassInfo KateJSDocument::info = { "KateJSDocument", 0, 0, 0 };
+const KJS::ClassInfo KateJSDocument::info = { "KateJSDocument", nullptr, nullptr, nullptr };
 
 KJS::Value KJS::KateJSDocumentProtoFunc::call(KJS::ExecState *exec, KJS::Object &thisObj, const KJS::List &args)
 {
@@ -521,7 +521,7 @@ DEFINE_PROTOTYPE("KateJSView",KateJSViewProto)
 IMPLEMENT_PROTOFUNC(KateJSViewProtoFunc)
 IMPLEMENT_PROTOTYPE(KateJSViewProto,KateJSViewProtoFunc)
 
-const KJS::ClassInfo KateJSView::info = { "KateJSView", 0, &KateJSViewTable, 0 };
+const KJS::ClassInfo KateJSView::info = { "KateJSView", nullptr, &KateJSViewTable, nullptr };
 
 KJS::Value KJS::KateJSViewProtoFunc::call(KJS::ExecState *exec, KJS::Object &thisObj, const KJS::List &args)
 {
@@ -832,7 +832,7 @@ DEFINE_PROTOTYPE("KateJSIndenter",KateJSIndenterProto)
 IMPLEMENT_PROTOFUNC(KateJSIndenterProtoFunc)
 IMPLEMENT_PROTOTYPE(KateJSIndenterProto,KateJSIndenterProtoFunc)
 
-const KJS::ClassInfo KateJSIndenter::info = { "KateJSIndenter", 0, &KateJSIndenterTable, 0 };
+const KJS::ClassInfo KateJSIndenter::info = { "KateJSIndenter", nullptr, &KateJSIndenterTable, nullptr };
 
 KJS::Value KJS::KateJSIndenterProtoFunc::call(KJS::ExecState *exec, KJS::Object &thisObj, const KJS::List &args)
 {
@@ -847,7 +847,7 @@ KJS::Value KJS::KateJSIndenterProtoFunc::call(KJS::ExecState *exec, KJS::Object
 KateIndentJScriptImpl::KateIndentJScriptImpl(const TQString& internalName,
         const TQString  &filePath, const TQString &niceName,
         const TQString &copyright, double version):
-          KateIndentScriptImplAbstract(internalName,filePath,niceName,copyright,version),m_interpreter(0),m_indenter(0)
+          KateIndentScriptImplAbstract(internalName,filePath,niceName,copyright,version),m_interpreter(nullptr),m_indenter(nullptr)
 {
 }
 
@@ -868,12 +868,12 @@ void KateIndentJScriptImpl::decRef()
 
 void KateIndentJScriptImpl::deleteInterpreter()
 {
-    m_docWrapper=0;
-    m_viewWrapper=0;
+    m_docWrapper=nullptr;
+    m_viewWrapper=nullptr;
     delete m_indenter;
-    m_indenter=0;
+    m_indenter=nullptr;
     delete m_interpreter;
-    m_interpreter=0;
+    m_interpreter=nullptr;
 }
 
 bool KateIndentJScriptImpl::setupInterpreter(TQString &errorMsg)
@@ -882,8 +882,8 @@ bool KateIndentJScriptImpl::setupInterpreter(TQString &errorMsg)
   {
     kdDebug(13050)<<"Setting up interpreter"<<endl;
     m_interpreter=new KJS::Interpreter(KJS::Object(new KateJSGlobal()));
-    m_docWrapper=new KateJSDocument(m_interpreter->globalExec(),0);
-    m_viewWrapper=new KateJSView(m_interpreter->globalExec(),0);
+    m_docWrapper=new KateJSDocument(m_interpreter->globalExec(),nullptr);
+    m_viewWrapper=new KateJSView(m_interpreter->globalExec(),nullptr);
     m_indenter=new KJS::Object(new KateJSIndenter(m_interpreter->globalExec()));
     m_interpreter->globalObject().put(m_interpreter->globalExec(),"document",KJS::Object(m_docWrapper),KJS::DontDelete | KJS::ReadOnly);
     m_interpreter->globalObject().put(m_interpreter->globalExec(),"view",KJS::Object(m_viewWrapper),KJS::DontDelete | KJS::ReadOnly);
@@ -1141,7 +1141,7 @@ void KateIndentJScriptManager::parseScriptHeader(const TQString &filePath,
         TQString key=sl[1];
         TQString value=sl[2];
         if (key=="NAME") (*niceName)=value.stripWhiteSpace();
-        else if (key=="VERSION") (*version)=value.stripWhiteSpace().toDouble(0);
+        else if (key=="VERSION") (*version)=value.stripWhiteSpace().toDouble(nullptr);
         else if (key=="COPYRIGHT")
         {
           tmpblockdata="";
diff --git a/kate/part/kateprinter.cpp b/kate/part/kateprinter.cpp
index e6c50e7b3..f7e2f6cb5 100644
--- a/kate/part/kateprinter.cpp
+++ b/kate/part/kateprinter.cpp
@@ -63,11 +63,11 @@ bool KatePrinter::print (KateDocument *doc)
   // docname is now always there, including the right Untitled name
   printer.setDocName(doc->docName());
 
-  KatePrintTextSettings *kpts = new KatePrintTextSettings(&printer, NULL);
+  KatePrintTextSettings *kpts = new KatePrintTextSettings(&printer, nullptr);
   kpts->enableSelection( doc->hasSelection() );
   printer.addDialogPage( kpts );
-  printer.addDialogPage( new KatePrintHeaderFooter(&printer, NULL) );
-  printer.addDialogPage( new KatePrintLayout(&printer, NULL) );
+  printer.addDialogPage( new KatePrintHeaderFooter(&printer, nullptr) );
+  printer.addDialogPage( new KatePrintLayout(&printer, nullptr) );
 
    if ( printer.setup( tdeApp->mainWidget(), i18n("Print %1").arg(printer.docName()) ) )
    {
@@ -124,7 +124,7 @@ bool KatePrinter::print (KateDocument *doc)
      TQColor footerBgColor(printer.option("app-kate-footerbg"));
      TQColor footerFgColor(printer.option("app-kate-footerfg"));
      uint footerHeight( 0 ); // further init only if needed
-     TQStringList footerTagList = 0; // do
+     TQStringList footerTagList = nullptr; // do
      bool footerDrawBg = 0; // do
 
      // Layout Page
@@ -316,7 +316,7 @@ bool KatePrinter::print (KateDocument *doc)
          KateHlItemData *_d;
 
          int _items ( 0 );
-         while ( ( _d = it.current()) != 0 )
+         while (( _d = it.current()) != nullptr)
          {
            _widest = kMax( _widest, ((TQFontMetrics)(
                                 _d->bold() ?
@@ -538,7 +538,7 @@ bool KatePrinter::print (KateDocument *doc)
              int _cw = _w/guideCols;
              int _i(0);
 
-             while ( ( _d = _it.current() ) != 0 )
+             while (( _d = _it.current() ) != nullptr)
              {
                paint.setPen( renderer.attribute(_i)->textColor() );
                paint.setFont( renderer.attribute(_i)->font( *renderer.currentFont() ) );
diff --git a/kate/part/kateprinter.h b/kate/part/kateprinter.h
index ef0040eac..9711aed34 100644
--- a/kate/part/kateprinter.h
+++ b/kate/part/kateprinter.h
@@ -52,7 +52,7 @@ class KatePrintTextSettings : public KPrintDialogPage
 {
   TQ_OBJECT
   public:
-    KatePrintTextSettings( KPrinter *printer, TQWidget *parent=0, const char *name=0 );
+    KatePrintTextSettings( KPrinter *printer, TQWidget *parent=nullptr, const char *name=nullptr );
     ~KatePrintTextSettings(){};
 
     void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
@@ -79,7 +79,7 @@ class KatePrintHeaderFooter : public KPrintDialogPage
 {
   TQ_OBJECT
   public:
-    KatePrintHeaderFooter( KPrinter *printer, TQWidget *parent=0, const char *name=0 );
+    KatePrintHeaderFooter( KPrinter *printer, TQWidget *parent=nullptr, const char *name=nullptr );
     ~KatePrintHeaderFooter(){};
 
     void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
@@ -117,7 +117,7 @@ class KatePrintLayout : public KPrintDialogPage
 {
   TQ_OBJECT
   public:
-    KatePrintLayout( KPrinter *printer, TQWidget *parent=0, const char *name=0 );
+    KatePrintLayout( KPrinter *printer, TQWidget *parent=nullptr, const char *name=nullptr );
     ~KatePrintLayout(){};
 
     void getOptions(TQMap<TQString,TQString>& opts, bool incldef = false);
diff --git a/kate/part/katerenderer.cpp b/kate/part/katerenderer.cpp
index 30a93b817..335aed7ee 100644
--- a/kate/part/katerenderer.cpp
+++ b/kate/part/katerenderer.cpp
@@ -261,15 +261,15 @@ void KateRenderer::paintTextLine(TQPainter& paint, const KateLineRange* range, i
 
   bool showCursor = drawCaret() && cursor && range->includesCursor(*cursor);
 
-  KateSuperRangeList& superRanges = m_doc->arbitraryHL()->rangesIncluding(range->line, 0);
+  KateSuperRangeList& superRanges = m_doc->arbitraryHL()->rangesIncluding(range->line, nullptr);
 
   int minIndent = 0;
 
   // A bit too verbose for my tastes
   // Re-write a bracketmark class? put into its own function? add more helper constructors to the range stuff?
   // Also, need a light-weight arbitraryhighlightrange class for static stuff
-  KateArbitraryHighlightRange* bracketStartRange (0L);
-  KateArbitraryHighlightRange* bracketEndRange (0L);
+  KateArbitraryHighlightRange* bracketStartRange (nullptr);
+  KateArbitraryHighlightRange* bracketEndRange (nullptr);
   if (bracketmark && bracketmark->isValid()) {
     if (range->includesCursor(bracketmark->start())) {
       KateTextCursor startend = bracketmark->start();
@@ -385,8 +385,8 @@ void KateRenderer::paintTextLine(TQPainter& paint, const KateLineRange* range, i
 
     KateAttribute customHL;
 
-    const TQColor *curColor = 0;
-    const TQColor *oldColor = 0;
+    const TQColor *curColor = nullptr;
+    const TQColor *oldColor = nullptr;
 
     KateAttribute* oldAt = &attr[0];
 
diff --git a/kate/part/katerenderer.h b/kate/part/katerenderer.h
index 1b9169efd..0950041aa 100644
--- a/kate/part/katerenderer.h
+++ b/kate/part/katerenderer.h
@@ -55,7 +55,7 @@ public:
      * @param doc document to render
      * @param view view which is output (0 for example for rendering to print)
      */
-    KateRenderer(KateDocument* doc, KateView *view = 0);
+    KateRenderer(KateDocument* doc, KateView *view = nullptr);
 
     /**
      * Destructor
@@ -170,7 +170,7 @@ public:
     // Width calculators
     uint spaceWidth();
     uint textWidth(const KateTextLine::Ptr &, int cursorCol);
-    uint textWidth(const KateTextLine::Ptr &textLine, uint startcol, uint maxwidth, bool *needWrap, int *endX = 0);
+    uint textWidth(const KateTextLine::Ptr &textLine, uint startcol, uint maxwidth, bool *needWrap, int *endX = nullptr);
     uint textWidth(const KateTextCursor &cursor);
 
     // Cursor constrainer
@@ -207,7 +207,7 @@ public:
      * The text line is painted from the upper limit of (0,0).  To move that,
      * apply a transform to your painter.
      */
-    void paintTextLine(TQPainter& paint, const KateLineRange* range, int xStart, int xEnd, const KateTextCursor* cursor = 0L, const KateBracketRange* bracketmark = 0L);
+    void paintTextLine(TQPainter& paint, const KateLineRange* range, int xStart, int xEnd, const KateTextCursor* cursor = nullptr, const KateBracketRange* bracketmark = nullptr);
 
     /**
      * Paint the background of a line
diff --git a/kate/part/kateschema.cpp b/kate/part/kateschema.cpp
index a055a00e5..7337bc282 100644
--- a/kate/part/kateschema.cpp
+++ b/kate/part/kateschema.cpp
@@ -83,10 +83,10 @@
 class KateStyleListItem : public TQListViewItem
 {
   public:
-    KateStyleListItem( TQListViewItem *parent=0, const TQString & stylename=0,
-                   class KateAttribute* defaultstyle=0, class KateHlItemData *data=0 );
-    KateStyleListItem( TQListView *parent, const TQString & stylename=0,
-                   class KateAttribute* defaultstyle=0, class KateHlItemData *data=0 );
+    KateStyleListItem( TQListViewItem *parent=nullptr, const TQString & stylename=nullptr,
+                   class KateAttribute* defaultstyle=nullptr, class KateHlItemData *data=nullptr );
+    KateStyleListItem( TQListView *parent, const TQString & stylename=nullptr,
+                   class KateAttribute* defaultstyle=nullptr, class KateHlItemData *data=nullptr );
     ~KateStyleListItem() { if (st) delete is; };
 
     /* mainly for readability */
@@ -541,7 +541,7 @@ KateSchemaConfigFontTab::KateSchemaConfigFontTab( TQWidget *parent, const char *
     // sizemanagment
   TQGridLayout *grid = new TQGridLayout( this, 1, 1 );
 
-  m_fontchooser = new TDEFontChooser ( this, 0L, false, TQStringList(), false );
+  m_fontchooser = new TDEFontChooser ( this, nullptr, false, TQStringList(), false );
   grid->addWidget( m_fontchooser, 0, 0);
 
   connect (this, TQ_SIGNAL( changed()), parent->parentWidget(), TQ_SLOT (slotChanged()));
@@ -775,7 +775,7 @@ void KateSchemaConfigHighlightTab::schemaChanged (uint schema)
 
   TQDict<KateStyleListCaption> prefixes;
   for ( KateHlItemData *itemData = m_hlDict[m_schema]->find(m_hl)->last();
-        itemData != 0L;
+        itemData;
         itemData = m_hlDict[m_schema]->find(m_hl)->prev())
   {
     kdDebug(13030) << "insert items " << itemData->name << endl;
@@ -962,7 +962,7 @@ void KateSchemaConfigPage::deleteSchema ()
 
 void KateSchemaConfigPage::newSchema ()
 {
-  TQString t = KInputDialog::getText (i18n("Name for New Schema"), i18n ("Name:"), i18n("New Schema"), 0, this);
+  TQString t = KInputDialog::getText (i18n("Name for New Schema"), i18n ("Name:"), i18n("New Schema"), nullptr, this);
 
   KateFactory::self()->schemaManager()->addSchema (t);
 
@@ -1000,7 +1000,7 @@ void KateSchemaConfigPage::newCurrentPage (TQWidget *w)
 //BEGIN SCHEMA ACTION -- the 'View->Schema' menu action
 void KateViewSchemaAction::init()
 {
-  m_view = 0;
+  m_view = nullptr;
   last = 0;
 
   connect(popupMenu(),TQ_SIGNAL(aboutToShow()),this,TQ_SLOT(slotAboutToShow()));
diff --git a/kate/part/kateschema.h b/kate/part/kateschema.h
index 63cc210b5..b1e393049 100644
--- a/kate/part/kateschema.h
+++ b/kate/part/kateschema.h
@@ -95,7 +95,7 @@ class KateViewSchemaAction : public TDEActionMenu
   TQ_OBJECT
 
   public:
-    KateViewSchemaAction(const TQString& text, TQObject* parent = 0, const char* name = 0)
+    KateViewSchemaAction(const TQString& text, TQObject* parent = nullptr, const char* name = nullptr)
        : TDEActionMenu(text, parent, name) { init(); };
 
     ~KateViewSchemaAction(){;};
@@ -132,7 +132,7 @@ class KateStyleListView : public TQListView
   friend class KateStyleListItem;
 
   public:
-    KateStyleListView( TQWidget *parent=0, bool showUseDefaults=false);
+    KateStyleListView( TQWidget *parent=nullptr, bool showUseDefaults=false);
     ~KateStyleListView() {};
     /* Display a popupmenu for item i at the specified global position, eventually with a title,
        promoting the context name of that item */
@@ -165,7 +165,7 @@ class KateSchemaConfigColorTab : public TQWidget
   TQ_OBJECT
 
   public:
-    KateSchemaConfigColorTab( TQWidget *parent = 0, const char *name = 0 );
+    KateSchemaConfigColorTab( TQWidget *parent = nullptr, const char *name = nullptr );
     ~KateSchemaConfigColorTab();
 
   private:
@@ -212,7 +212,7 @@ class KateSchemaConfigFontTab : public TQWidget
   TQ_OBJECT
 
   public:
-    KateSchemaConfigFontTab( TQWidget *parent = 0, const char *name = 0 );
+    KateSchemaConfigFontTab( TQWidget *parent = nullptr, const char *name = nullptr );
     ~KateSchemaConfigFontTab();
 
   public:
@@ -239,7 +239,7 @@ class KateSchemaConfigFontColorTab : public TQWidget
   TQ_OBJECT
 
   public:
-    KateSchemaConfigFontColorTab( TQWidget *parent = 0, const char *name = 0 );
+    KateSchemaConfigFontColorTab( TQWidget *parent = nullptr, const char *name = nullptr );
     ~KateSchemaConfigFontColorTab();
 
   public:
@@ -259,7 +259,7 @@ class KateSchemaConfigHighlightTab : public TQWidget
   TQ_OBJECT
 
   public:
-    KateSchemaConfigHighlightTab( TQWidget *parent = 0, const char *name = 0, KateSchemaConfigFontColorTab *page = 0, uint hl = 0 );
+    KateSchemaConfigHighlightTab( TQWidget *parent = nullptr, const char *name = nullptr, KateSchemaConfigFontColorTab *page = nullptr, uint hl = 0 );
     ~KateSchemaConfigHighlightTab();
 
   public:
@@ -287,7 +287,7 @@ class KateSchemaConfigPage : public KateConfigPage
   TQ_OBJECT
 
   public:
-    KateSchemaConfigPage ( TQWidget *parent, class KateDocument *doc=0 );
+    KateSchemaConfigPage ( TQWidget *parent, class KateDocument *doc=nullptr );
     ~KateSchemaConfigPage ();
 
   public slots:
diff --git a/kate/part/katesearch.cpp b/kate/part/katesearch.cpp
index b76af856b..8a0cbaa3f 100644
--- a/kate/part/katesearch.cpp
+++ b/kate/part/katesearch.cpp
@@ -82,7 +82,7 @@ void KateSearch::addToList( TQStringList& list, const TQString& s )
 {
   if( list.count() > 0 ) {
     TQStringList::Iterator it = list.find( s );
-    if( *it != 0L )
+    if( !(*it).isNull() )
       list.remove( it );
     if( list.count() >= 16 )
       list.remove( list.fromLast() );
@@ -762,7 +762,7 @@ void KateSearch::exposeFound( KateTextCursor &cursor, int slen )
 //BEGIN KateReplacePrompt
 // this dialog is not modal
 KateReplacePrompt::KateReplacePrompt ( TQWidget *parent )
-  : KDialogBase ( parent, 0L, false, i18n( "Replace Confirmation" ),
+  : KDialogBase ( parent, nullptr, false, i18n( "Replace Confirmation" ),
                   User3 | User2 | User1 | Close | Ok , Ok, true,
                   i18n("Replace &All"), i18n("Re&place && Close"), i18n("&Replace") )
 {
diff --git a/kate/part/katespell.cpp b/kate/part/katespell.cpp
index e19f4fb94..f7aa2f0f6 100644
--- a/kate/part/katespell.cpp
+++ b/kate/part/katespell.cpp
@@ -36,7 +36,7 @@
 KateSpell::KateSpell( KateView* view )
   : TQObject( view )
   , m_view (view)
-  , m_tdespell (0)
+  , m_tdespell (nullptr)
 {
 }
 
@@ -201,17 +201,17 @@ void KateSpell::spellCleanDone()
   KSpell::spellStatus status = m_tdespell->status();
 
   if( status == KSpell::Error ) {
-    KMessageBox::sorry( 0,
+    KMessageBox::sorry( nullptr,
       i18n("The spelling program could not be started. "
            "Please make sure you have set the correct spelling program "
            "and that it is properly configured and in your PATH."));
   } else if( status == KSpell::Crashed ) {
-    KMessageBox::sorry( 0,
+    KMessageBox::sorry( nullptr,
       i18n("The spelling program seems to have crashed."));
   }
 
   delete m_tdespell;
-  m_tdespell = 0;
+  m_tdespell = nullptr;
 
   kdDebug (13020) << "SPELLING END" << endl;
 }
diff --git a/kate/part/katesupercursor.h b/kate/part/katesupercursor.h
index 270227925..796db75fe 100644
--- a/kate/part/katesupercursor.h
+++ b/kate/part/katesupercursor.h
@@ -52,8 +52,8 @@ public:
      * all internally only used SuperCursors should be private or people could modify them from the
      * outside breaking kate's internals
      */
-    KateSuperCursor(KateDocument* doc, bool privateC, const KateTextCursor& cursor, TQObject* parent = 0L, const char* name = 0L);
-    KateSuperCursor(KateDocument* doc, bool privateC, int lineNum = 0, int col = 0, TQObject* parent = 0L, const char* name = 0L);
+    KateSuperCursor(KateDocument* doc, bool privateC, const KateTextCursor& cursor, TQObject* parent = nullptr, const char* name = nullptr);
+    KateSuperCursor(KateDocument* doc, bool privateC, int lineNum = 0, int col = 0, TQObject* parent = nullptr, const char* name = nullptr);
 
     ~KateSuperCursor ();
 
@@ -185,9 +185,9 @@ public:
   /**
    * Constructor.  Takes posession of @p start and @p end.
    */
-  KateSuperRange(KateSuperCursor* start, KateSuperCursor* end, TQObject* parent = 0L, const char* name = 0L);
-  KateSuperRange(KateDocument* doc, const KateRange& range, TQObject* parent = 0L, const char* name = 0L);
-  KateSuperRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, TQObject* parent = 0L, const char* name = 0L);
+  KateSuperRange(KateSuperCursor* start, KateSuperCursor* end, TQObject* parent = nullptr, const char* name = nullptr);
+  KateSuperRange(KateDocument* doc, const KateRange& range, TQObject* parent = nullptr, const char* name = nullptr);
+  KateSuperRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, TQObject* parent = nullptr, const char* name = nullptr);
 
   virtual ~KateSuperRange();
 
@@ -344,7 +344,7 @@ public:
   /**
    * @sa autoManage()
    */
-  KateSuperRangeList(bool autoManage = true, TQObject* parent = 0L, const char* name = 0L);
+  KateSuperRangeList(bool autoManage = true, TQObject* parent = nullptr, const char* name = nullptr);
 
   /**
    * Semi-copy constructor.
@@ -355,7 +355,7 @@ public:
    * Also, does not connect signals and slots to save time, as this is mainly
    * used by the document itself while drawing (call connectAll() to re-constitute)
    */
-  KateSuperRangeList(const TQPtrList<KateSuperRange>& rangeList, TQObject* parent = 0L, const char* name = 0L);
+  KateSuperRangeList(const TQPtrList<KateSuperRange>& rangeList, TQObject* parent = nullptr, const char* name = nullptr);
 
   virtual ~KateSuperRangeList() {}
   /**
@@ -406,7 +406,7 @@ public:
    *
    * @returns the first boundary location
    */
-  KateSuperCursor* firstBoundary(const KateTextCursor* start = 0L);
+  KateSuperCursor* firstBoundary(const KateTextCursor* start = nullptr);
 
   /**
    * @returns the next boundary, or 0L if there are no more.
diff --git a/kate/part/katesyntaxdocument.cpp b/kate/part/katesyntaxdocument.cpp
index 40870e4b8..f893d588a 100644
--- a/kate/part/katesyntaxdocument.cpp
+++ b/kate/part/katesyntaxdocument.cpp
@@ -73,7 +73,7 @@ bool KateSyntaxDocument::setIdentifier(const TQString& identifier)
 
       if (!success)
       {
-        KMessageBox::error(0L,i18n("<qt>The error <b>%4</b><br> has been detected in the file %1 at %2/%3</qt>").arg(identifier)
+        KMessageBox::error(nullptr,i18n("<qt>The error <b>%4</b><br> has been detected in the file %1 at %2/%3</qt>").arg(identifier)
             .arg(line).arg(col).arg(i18n("TQXml",errorMsg.utf8())));
         return false;
       }
@@ -81,7 +81,7 @@ bool KateSyntaxDocument::setIdentifier(const TQString& identifier)
     else
     {
       // Oh o, we couldn't open the file.
-      KMessageBox::error( 0L, i18n("Unable to open %1").arg(identifier) );
+      KMessageBox::error( nullptr, i18n("Unable to open %1").arg(identifier) );
       return false;
     }
   }
@@ -195,7 +195,7 @@ KateSyntaxContextData* KateSyntaxDocument::getSubItems(KateSyntaxContextData* da
 {
   KateSyntaxContextData *retval = new KateSyntaxContextData;
 
-  if (data != 0)
+  if (data)
   {
     retval->parent = data->currentGroup;
     retval->currentGroup = data->item;
@@ -253,7 +253,7 @@ KateSyntaxContextData* KateSyntaxDocument::getConfig(const TQString& mainGroupNa
     data->item = element;
     return data;
   }
-  return 0;
+  return nullptr;
 }
 
 /**
@@ -269,7 +269,7 @@ KateSyntaxContextData* KateSyntaxDocument::getGroupInfo(const TQString& mainGrou
     data->parent = element;
     return data;
   }
-  return 0;
+  return nullptr;
 }
 
 /**
diff --git a/kate/part/katetemplatehandler.cpp b/kate/part/katetemplatehandler.cpp
index 5403d0308..d79168ba9 100644
--- a/kate/part/katetemplatehandler.cpp
+++ b/kate/part/katetemplatehandler.cpp
@@ -34,7 +34,7 @@ KateTemplateHandler::KateTemplateHandler(
     , KateKeyInterceptorFunctor()
     , m_doc( doc )
     , m_currentTabStop( -1 )
-    , m_currentRange( 0 )
+    , m_currentRange( nullptr )
     , m_initOk( false )
     , m_recursion( false )
 {
@@ -144,7 +144,7 @@ KateTemplateHandler::~KateTemplateHandler()
   m_ranges->clear();
 }
 
-void KateTemplateHandler::slotDocumentDestroyed() {m_doc = 0;}
+void KateTemplateHandler::slotDocumentDestroyed() {m_doc = nullptr;}
 
 void KateTemplateHandler::generateRangeTable( uint insertLine, uint insertCol, const TQString& insertString, const TQValueList<KateTemplateHandlerPlaceHolderInfo> &buildList )
 {
@@ -272,7 +272,7 @@ void KateTemplateHandler::locateRange( const KateTextCursor& cursor )
 
   }
 
-  m_currentRange = 0;
+  m_currentRange = nullptr;
   /*while (m_ranges->count()>0)
    delete (m_ranges->take(0));
   disconnect(m_ranges,0,0,0);
@@ -317,7 +317,7 @@ void KateTemplateHandler::slotAboutToRemoveText( const KateTextRange &range )
 
   if ( m_currentRange && ( !m_currentRange->includes( range.start() ) ) ) locateRange( range.start() );
 
-  if ( m_currentRange != 0 )
+  if ( m_currentRange )
   {
     if ( m_currentRange->end() <= range.end() ) return ;
   }
diff --git a/kate/part/katetextline.cpp b/kate/part/katetextline.cpp
index 3dae9ddd2..798788bce 100644
--- a/kate/part/katetextline.cpp
+++ b/kate/part/katetextline.cpp
@@ -66,7 +66,7 @@ void KateTextLine::insertText (uint pos, uint insLen, const TQChar *insText, uch
   // BUH, actually insert the new text
   for (uint z = 0; z < insLen; z++)
   {
-    if (insAttribs == 0)
+    if (!insAttribs)
       m_attributes[z+pos] = 0;
     else
       m_attributes[z+pos] = insAttribs[z];
diff --git a/kate/part/katetextline.h b/kate/part/katetextline.h
index dec072d9d..d3ae54f83 100644
--- a/kate/part/katetextline.h
+++ b/kate/part/katetextline.h
@@ -304,7 +304,7 @@ class KateTextLine : public TDEShared
      * @param insText text to insert
      * @param insAttribs attributes for the insert text
      */
-    void insertText (uint pos, uint insLen, const TQChar *insText, uchar *insAttribs = 0);
+    void insertText (uint pos, uint insLen, const TQChar *insText, uchar *insAttribs = nullptr);
 
     /**
      * remove text at given position
diff --git a/kate/part/kateview.cpp b/kate/part/kateview.cpp
index 95e9d1eae..c735b3e72 100644
--- a/kate/part/kateview.cpp
+++ b/kate/part/kateview.cpp
@@ -87,7 +87,7 @@ KateView::KateView( KateDocument *doc, TQWidget *parent, const char * name )
     , m_search( new KateSearch( this ) )
     , m_spell( new KateSpell( this ) )
     , m_bookmarks( new KateBookmarks( this ) )
-    , m_cmdLine (0)
+    , m_cmdLine (nullptr)
     , m_cmdLineOn (false)
     , m_active( false )
     , m_hasWrap( false )
@@ -177,10 +177,10 @@ KateView::~KateView()
   //delete m_codeCompletion;
 
   delete m_renderer;
-  m_renderer = 0;
+  m_renderer = nullptr;
 
   delete m_config;
-  m_config = 0;
+  m_config = nullptr;
   KateFactory::self()->deregisterView (this);
 }
 
@@ -210,7 +210,7 @@ void KateView::setupActions()
   TDEActionCollection *ac = this->actionCollection ();
   TDEAction *a;
 
-  m_toggleWriteLock = 0;
+  m_toggleWriteLock = nullptr;
 
   m_cut = a=KStdAction::cut(this, TQ_SLOT(cut()), ac);
   a->setWhatsThis(i18n("Cut the selected text and move it to the clipboard"));
@@ -264,7 +264,7 @@ void KateView::setupActions()
     a->setWhatsThis(i18n("This command removes comments from the current line or a selected block of text.<BR><BR>"
     "The characters for single/multiple line comments are defined within the language's highlighting."));
     a = m_toggleWriteLock = new TDEToggleAction(
-                i18n("&Read Only Mode"), 0, 0,
+                i18n("&Read Only Mode"), nullptr, 0,
                 this, TQ_SLOT( toggleWriteLock() ),
                 ac, "tools_toggle_write_lock" );
     a->setWhatsThis( i18n("Lock/unlock the document for writing") );
@@ -296,8 +296,8 @@ void KateView::setupActions()
   {
     m_cut->setEnabled (false);
     m_paste->setEnabled (false);
-    m_editUndo = 0;
-    m_editRedo = 0;
+    m_editUndo = nullptr;
+    m_editRedo = nullptr;
   }
 
   a=KStdAction::print( m_doc, TQ_SLOT(print()), ac );
@@ -329,7 +329,7 @@ void KateView::setupActions()
   new KateViewIndentationAction (m_doc, i18n("&Indentation"),ac,"tools_indentation");
 
   // html export
-  a = new TDEAction(i18n("E&xport as HTML..."), 0, 0, this, TQ_SLOT(exportAsHTML()), ac, "file_export_html");
+  a = new TDEAction(i18n("E&xport as HTML..."), nullptr, 0, this, TQ_SLOT(exportAsHTML()), ac, "file_export_html");
   a->setWhatsThis(i18n("This command allows you to export the current document"
                       " with all highlighting information into a HTML document."));
 
@@ -765,7 +765,7 @@ void KateView::slotReadWriteChanged ()
       << "tools_apply_wordwrap" << "edit_undo" << "edit_redo" << "tools_spelling_from_cursor"
       << "tools_spelling_selection";
 
-  TDEAction *a = 0;
+  TDEAction *a = nullptr;
   for (uint z = 0; z < l.size(); z++)
     if ((a = actionCollection()->action( l[z].ascii() )))
       a->setEnabled (m_doc->isReadWrite());
@@ -1261,7 +1261,7 @@ void KateView::updateFoldingConfig ()
   l << "folding_toplevel" << "folding_expandtoplevel"
     << "folding_collapselocal" << "folding_expandlocal";
 
-  TDEAction *a = 0;
+  TDEAction *a = nullptr;
   for (uint z = 0; z < l.size(); z++)
     if ((a = actionCollection()->action( l[z].ascii() )))
       a->setEnabled (m_doc->highlight() && m_doc->highlight()->allowsFolding());
@@ -1736,7 +1736,7 @@ void KateView::lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, T
   // do not insert equally styled characters one by one
   TQString textcache;
 
-  KateAttribute *charAttributes = 0;
+  KateAttribute *charAttributes = nullptr;
 
   for (uint curPos=startCol;curPos<(length+startCol);curPos++)
   {
@@ -1796,7 +1796,7 @@ void KateView::lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, T
 
 void KateView::exportAsHTML ()
 {
-  KURL url = KFileDialog::getSaveURL(m_doc->docName(),"text/html",0,i18n("Export File as HTML"));
+  KURL url = KFileDialog::getSaveURL(m_doc->docName(),"text/html",nullptr,i18n("Export File as HTML"));
 
   if ( url.isEmpty() )
     return;
@@ -1844,7 +1844,7 @@ void KateView::exportAsHTML ()
   if ( url.isLocalFile() )
       return;
 
-  TDEIO::NetAccess::upload( filename, url, 0 );
+  TDEIO::NetAccess::upload( filename, url, nullptr );
 }
 //END
 
diff --git a/kate/part/kateview.h b/kate/part/kateview.h
index 1e113618e..f2bd8a776 100644
--- a/kate/part/kateview.h
+++ b/kate/part/kateview.h
@@ -69,7 +69,7 @@ class KateView : public Kate::View,
     friend class KateCodeCompletion;
 
   public:
-    KateView( KateDocument* doc, TQWidget* parent = 0L, const char* name = 0 );
+    KateView( KateDocument* doc, TQWidget* parent = nullptr, const char* name = nullptr );
     ~KateView ();
 
   //
diff --git a/kate/part/kateviewhelpers.cpp b/kate/part/kateviewhelpers.cpp
index 948040236..31bad7b59 100644
--- a/kate/part/kateviewhelpers.cpp
+++ b/kate/part/kateviewhelpers.cpp
@@ -292,8 +292,8 @@ KateCmdLine::KateCmdLine (KateView *view)
   , m_msgMode (false)
   , m_histpos( 0 )
   , m_cmdend( 0 )
-  , m_command( 0L )
-  , m_oldCompletionObject( 0L )
+  , m_command( nullptr )
+  , m_oldCompletionObject( nullptr )
 {
   connect (this, TQ_SIGNAL(returnPressed(const TQString &)),
            this, TQ_SLOT(slotReturnPressed(const TQString &)));
@@ -367,11 +367,11 @@ void KateCmdLine::slotReturnPressed ( const TQString& text )
   {
     TDECompletion *c = completionObject();
     setCompletionObject( m_oldCompletionObject );
-    m_oldCompletionObject = 0;
+    m_oldCompletionObject = nullptr;
     delete c;
-    c = 0;
+    c = nullptr;
   }
-  m_command = 0;
+  m_command = nullptr;
   m_cmdend = 0;
 
   m_view->setFocus ();
@@ -467,9 +467,9 @@ void KateCmdLine::keyPressEvent( TQKeyEvent *ev )
         {
           TDECompletion *c = completionObject();
           setCompletionObject( m_oldCompletionObject );
-          m_oldCompletionObject = 0;
+          m_oldCompletionObject = nullptr;
           delete c;
-          c = 0;
+          c = nullptr;
         }
 
         m_cmdend = 0;
diff --git a/kate/part/kateviewhelpers.h b/kate/part/kateviewhelpers.h
index 1e162af18..3843f8849 100644
--- a/kate/part/kateviewhelpers.h
+++ b/kate/part/kateviewhelpers.h
@@ -50,7 +50,7 @@ class KateScrollBar : public TQScrollBar
   TQ_OBJECT
 
   public:
-    KateScrollBar(Orientation orientation, class KateViewInternal *parent, const char* name = 0L);
+    KateScrollBar(Orientation orientation, class KateViewInternal *parent, const char* name = nullptr);
 
     inline bool showMarks() { return m_showMarks; };
     inline void setShowMarks(bool b) { m_showMarks = b; update(); };
@@ -187,7 +187,7 @@ class KateViewEncodingAction : public TDEActionMenu
   TQ_OBJECT
 
   public:
-    KateViewEncodingAction(KateDocument *_doc, KateView *_view, const TQString& text, TQObject* parent = 0, const char* name = 0);
+    KateViewEncodingAction(KateDocument *_doc, KateView *_view, const TQString& text, TQObject* parent = nullptr, const char* name = nullptr);
 
     ~KateViewEncodingAction(){;};
 
diff --git a/kate/part/kateviewinternal.cpp b/kate/part/kateviewinternal.cpp
index 40ab06252..feb26919d 100644
--- a/kate/part/kateviewinternal.cpp
+++ b/kate/part/kateviewinternal.cpp
@@ -59,7 +59,7 @@ KateViewInternal::KateViewInternal(KateView *view, KateDocument *doc)
   , m_doc (doc)
   , cursor (doc, true, 0, 0, this)
   , possibleTripleClick (false)
-  , m_dummy (0)
+  , m_dummy (nullptr)
   , m_startPos(doc, true, 0,0)
   , m_madeVisible(false)
   , m_shiftKeyPressed (false)
@@ -1433,7 +1433,7 @@ KateLineRange KateViewInternal::range(const KateTextCursor& realCursor)
   bool first = true;
 
   do {
-    thisRange = range(realCursor.line(), first ? 0L : &thisRange);
+    thisRange = range(realCursor.line(), first ? nullptr : &thisRange);
     first = false;
   } while (thisRange.wrap && !(realCursor.col() >= thisRange.startCol && realCursor.col() < thisRange.endCol) && thisRange.startCol != thisRange.endCol);
 
@@ -1448,7 +1448,7 @@ KateLineRange KateViewInternal::range(uint realLine, int viewLine)
   bool first = true;
 
   do {
-    thisRange = range(realLine, first ? 0L : &thisRange);
+    thisRange = range(realLine, first ? nullptr : &thisRange);
     first = false;
   } while (thisRange.wrap && viewLine != thisRange.viewLine && thisRange.startCol != thisRange.endCol);
 
@@ -1473,7 +1473,7 @@ uint KateViewInternal::viewLine(const KateTextCursor& realCursor)
   bool first = true;
 
   do {
-    thisRange = range(realCursor.line(), first ? 0L : &thisRange);
+    thisRange = range(realCursor.line(), first ? nullptr : &thisRange);
     first = false;
   } while (thisRange.wrap && !(realCursor.col() >= thisRange.startCol && realCursor.col() < thisRange.endCol) && thisRange.startCol != thisRange.endCol);
 
@@ -1539,7 +1539,7 @@ uint KateViewInternal::lastViewLine(uint realLine)
   bool first = true;
 
   do {
-    thisRange = range(realLine, first ? 0L : &thisRange);
+    thisRange = range(realLine, first ? nullptr : &thisRange);
     first = false;
   } while (thisRange.wrap && thisRange.startCol != thisRange.endCol);
 
@@ -1625,7 +1625,7 @@ KateTextCursor KateViewInternal::viewLineOffset(const KateTextCursor& virtualCur
     int realLine = m_doc->getRealLine(virtualLine);
 
     do {
-      thisRange = range(realLine, first ? 0L : &thisRange);
+      thisRange = range(realLine, first ? nullptr : &thisRange);
       first = false;
 
       if (offset == currentOffset) {
diff --git a/kate/part/kateviewinternal.h b/kate/part/kateviewinternal.h
index 77fb81e7a..c3c51bb65 100644
--- a/kate/part/kateviewinternal.h
+++ b/kate/part/kateviewinternal.h
@@ -299,7 +299,7 @@ class KateViewInternal : public TQWidget
 
     // get the values for a specific range.
     // specify lastLine to get the next line of a range.
-    KateLineRange range(int realLine, const KateLineRange* previous = 0L);
+    KateLineRange range(int realLine, const KateLineRange* previous = nullptr);
 
     KateLineRange currentRange();
     KateLineRange previousRange();
diff --git a/kate/part/test_regression.cpp b/kate/part/test_regression.cpp
index 972d8a7ea..f381d0033 100644
--- a/kate/part/test_regression.cpp
+++ b/kate/part/test_regression.cpp
@@ -648,7 +648,7 @@ int main(int argc, char *argv[])
 
 // -------------------------------------------------------------------------
 
-RegressionTest *RegressionTest::curr = 0;
+RegressionTest *RegressionTest::curr = nullptr;
 
 RegressionTest::RegressionTest(KateDocument *part, TDEConfig *baseConfig,
                                const TQString &baseDir,
@@ -669,8 +669,8 @@ RegressionTest::RegressionTest(KateDocument *part, TDEConfig *baseConfig,
     createMissingDirs(m_outputDir + "/");
     m_keepOutput = false;
     m_genOutput = _genOutput;
-    m_failureComp = 0;
-    m_failureSave = 0;
+    m_failureComp = nullptr;
+    m_failureSave = nullptr;
     m_showGui = false;
     m_passes_work = m_passes_fail = m_passes_new = 0;
     m_failures_work = m_failures_fail = m_failures_new = 0;
diff --git a/kate/part/test_regression.h b/kate/part/test_regression.h
index 7ef1b9ee1..40f5b1772 100644
--- a/kate/part/test_regression.h
+++ b/kate/part/test_regression.h
@@ -176,8 +176,8 @@ public:
     CheckResult checkOutput(const TQString& againstFilename);
     enum FailureType { NoFailure = 0, AllFailure = 1, ResultFailure = 4, NewFailure = 65536 };
     bool runTests(TQString relPath = TQString::null, bool mustExist = false, int known_failure = NoFailure);
-    bool reportResult( bool passed, const TQString & description = TQString::null, bool *newfailure = 0 );
-    bool reportResult(CheckResult result, const TQString & description = TQString::null, bool *newfailure = 0 );
+    bool reportResult( bool passed, const TQString & description = TQString::null, bool *newfailure = nullptr );
+    bool reportResult(CheckResult result, const TQString & description = TQString::null, bool *newfailure = nullptr );
     void rereadConfig();
     static void createMissingDirs(const TQString &path);
 
diff --git a/kate/plugins/autobookmarker/autobookmarker.cpp b/kate/plugins/autobookmarker/autobookmarker.cpp
index 889fb98b1..1e5442e65 100644
--- a/kate/plugins/autobookmarker/autobookmarker.cpp
+++ b/kate/plugins/autobookmarker/autobookmarker.cpp
@@ -170,7 +170,7 @@ void AutoBookmarker::applyEntity( AutoBookmarkEnt *e )
 //END
 
 //BEGIN ABGlobal
-ABGlobal *ABGlobal::s_self = 0;
+ABGlobal *ABGlobal::s_self = nullptr;
 
 ABGlobal::ABGlobal()
 {
diff --git a/kate/plugins/autobookmarker/autobookmarker.h b/kate/plugins/autobookmarker/autobookmarker.h
index 1f6d1daeb..b1ed7d1cd 100644
--- a/kate/plugins/autobookmarker/autobookmarker.h
+++ b/kate/plugins/autobookmarker/autobookmarker.h
@@ -52,8 +52,8 @@ class AutoBookmarker
 {
   TQ_OBJECT
   public:
-    AutoBookmarker( TQObject *parent = 0,
-                        const char* name = 0,
+    AutoBookmarker( TQObject *parent = nullptr,
+                        const char* name = nullptr,
                         const TQStringList &args = TQStringList() );
     virtual ~AutoBookmarker() {};
 
diff --git a/kate/plugins/insertfile/insertfileplugin.cpp b/kate/plugins/insertfile/insertfileplugin.cpp
index ed6cd3c6f..c063d24c5 100644
--- a/kate/plugins/insertfile/insertfileplugin.cpp
+++ b/kate/plugins/insertfile/insertfileplugin.cpp
@@ -75,7 +75,7 @@ InsertFilePluginView::InsertFilePluginView( KTextEditor::View *view, const char
 {
   view->insertChildClient( this );
   setInstance( KGenericFactory<InsertFilePlugin>::instance() );
-  _job = 0;
+  _job = nullptr;
   (void) new TDEAction( i18n("Insert File..."), 0, this, TQ_SLOT(slotInsertFile()), actionCollection(), "tools_insert_file" );
   setXMLFile( "tdetexteditor_insertfileui.rc" );
 }
@@ -111,7 +111,7 @@ void InsertFilePluginView::slotInsertFile()
 void InsertFilePluginView::slotFinished( TDEIO::Job *job )
 {
   assert( job == _job );
-  _job = 0;
+  _job = nullptr;
   if ( job->error() )
     KMessageBox::error( (TQWidget*)parent(), i18n("Failed to load file:\n\n") + job->errorString(), i18n("Insert File Error") );
   else
@@ -176,9 +176,9 @@ void InsertFilePluginView::insertFile()
   // clean up
   _file = KURL ();
   _tmpfile.truncate( 0 );
-  v = 0;
-  ei = 0;
-  ci = 0;
+  v = nullptr;
+  ei = nullptr;
+  ci = nullptr;
 }
 
 //END InsertFilePluginView
diff --git a/kate/plugins/insertfile/insertfileplugin.h b/kate/plugins/insertfile/insertfileplugin.h
index 0f7bfc2c9..26711e59a 100644
--- a/kate/plugins/insertfile/insertfileplugin.h
+++ b/kate/plugins/insertfile/insertfileplugin.h
@@ -35,8 +35,8 @@ class InsertFilePlugin : public KTextEditor::Plugin, public KTextEditor::PluginV
   TQ_OBJECT
 
   public:
-    InsertFilePlugin( TQObject *parent = 0, 
-                            const char* name = 0, 
+    InsertFilePlugin( TQObject *parent = nullptr,
+                            const char* name = nullptr,
                             const TQStringList &args = TQStringList() );
     virtual ~InsertFilePlugin();       
     
@@ -52,7 +52,7 @@ class InsertFilePluginView : public TQObject, public KXMLGUIClient
 {
   TQ_OBJECT
   public:
-    InsertFilePluginView( KTextEditor::View *view, const char *name=0 );
+    InsertFilePluginView( KTextEditor::View *view, const char *name=nullptr );
     ~InsertFilePluginView() {};
   public slots:
     /* display a file dialog, and insert the chosen file */
diff --git a/kate/plugins/isearch/ISearchPlugin.cpp b/kate/plugins/isearch/ISearchPlugin.cpp
index 306fcf596..4e1017110 100644
--- a/kate/plugins/isearch/ISearchPlugin.cpp
+++ b/kate/plugins/isearch/ISearchPlugin.cpp
@@ -34,16 +34,16 @@ K_EXPORT_COMPONENT_FACTORY( tdetexteditor_isearch, KGenericFactory<ISearchPlugin
 
 ISearchPluginView::ISearchPluginView( KTextEditor::View *view )
 	: TQObject ( view ), KXMLGUIClient (view)
-	, m_view( 0L )
-	, m_doc( 0L )
-	, m_searchIF( 0L )
-	, m_cursorIF( 0L )
-	, m_selectIF( 0L )
+	, m_view( nullptr )
+	, m_doc( nullptr )
+	, m_searchIF( nullptr )
+	, m_cursorIF( nullptr )
+	, m_selectIF( nullptr )
 //	, m_toolBarAction( 0L )
-	, m_searchForwardAction( 0L )
-	, m_searchBackwardAction( 0L )
-	, m_label( 0L )
-	, m_combo( 0L )
+	, m_searchForwardAction( nullptr )
+	, m_searchBackwardAction( nullptr )
+	, m_label( nullptr )
+	, m_combo( nullptr )
 	, m_lastString( "" )
 	, m_searchBackward( false )
 	, m_caseSensitive( false )
@@ -73,10 +73,10 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view )
 		this, TQ_SLOT(slotSearchBackwardAction()),
 		actionCollection(), "edit_isearch_reverse" );
 
-	m_label = new TQLabel( i18n("I-Search:"), 0L, "tde toolbar widget" );
+	m_label = new TQLabel( i18n("I-Search:"), nullptr, "tde toolbar widget" );
 	KWidgetAction* labelAction = new KWidgetAction(
 		m_label,
-		i18n("I-Search:"), 0, 0, 0,
+		i18n("I-Search:"), 0, nullptr, nullptr,
 		actionCollection(), "isearch_label" );
 	labelAction->setShortcutConfigurable( false );
 
@@ -92,7 +92,7 @@ ISearchPluginView::ISearchPluginView( KTextEditor::View *view )
 		 this, TQ_SLOT(slotAddContextMenuItems(TQPopupMenu*)) );
 	m_comboAction = new KWidgetAction(
 		m_combo,
-		i18n("Search"), 0, 0, 0,
+		i18n("Search"), 0, nullptr, nullptr,
 		actionCollection(), "isearch_combo" );
 	m_comboAction->setAutoSized( true );
 	m_comboAction->setShortcutConfigurable( false );
@@ -158,11 +158,11 @@ void ISearchPluginView::setView( KTextEditor::View* view )
 	m_cursorIF = KTextEditor::viewCursorInterface ( m_view );
 	m_selectIF = KTextEditor::selectionInterface ( m_doc );
 	if( !m_doc || !m_cursorIF || !m_selectIF ) {
-		m_view = 0L;
-		m_doc = 0L;
-		m_searchIF = 0L;
-		m_cursorIF = 0L;
-		m_selectIF = 0L;
+		m_view = nullptr;
+		m_doc = nullptr;
+		m_searchIF = nullptr;
+		m_cursorIF = nullptr;
+		m_selectIF = nullptr;
 	}
 
 	readConfig();
diff --git a/kate/plugins/isearch/ISearchPlugin.h b/kate/plugins/isearch/ISearchPlugin.h
index e1893c516..735132509 100644
--- a/kate/plugins/isearch/ISearchPlugin.h
+++ b/kate/plugins/isearch/ISearchPlugin.h
@@ -37,7 +37,7 @@ class ISearchPlugin : public KTextEditor::Plugin, public KTextEditor::PluginView
 	TQ_OBJECT
 	
 public:
-	ISearchPlugin( TQObject *parent = 0, const char* name = 0, const TQStringList &args = TQStringList() );
+	ISearchPlugin( TQObject *parent = nullptr, const char* name = nullptr, const TQStringList &args = TQStringList() );
 	virtual ~ISearchPlugin();
 	
 	void addView (KTextEditor::View *view);
diff --git a/kate/plugins/kdatatool/kate_kdatatool.cpp b/kate/plugins/kdatatool/kate_kdatatool.cpp
index 00edb8ced..16483adfb 100644
--- a/kate/plugins/kdatatool/kate_kdatatool.cpp
+++ b/kate/plugins/kdatatool/kate_kdatatool.cpp
@@ -69,7 +69,7 @@ void KDataToolPlugin::removeView(KTextEditor::View *view)
 
 
 KDataToolPluginView::KDataToolPluginView( KTextEditor::View *view )
-	:m_menu(0),m_notAvailable(0)
+	:m_menu(nullptr),m_notAvailable(nullptr)
 {
 
 	view->insertChildClient (this);
@@ -103,7 +103,7 @@ void KDataToolPluginView::aboutToShow()
 	if (m_notAvailable) {
 		m_menu->remove(m_notAvailable);
 		delete m_notAvailable;
-		m_notAvailable=0;
+		m_notAvailable=nullptr;
 	}
 	if ( selectionInterface(m_view->document())->hasSelection() )
 	{
@@ -180,7 +180,7 @@ void KDataToolPluginView::aboutToShow()
 
 void KDataToolPluginView::slotNotAvailable()
 {
-	KMessageBox::sorry(0, i18n("Data tools are only available when text is selected, "
+	KMessageBox::sorry(nullptr, i18n("Data tools are only available when text is selected, "
 		"or when the right mouse button is clicked over a word. If no data tools are offered "
 		"even when text is selected, you need to install them. Some data tools are part "
 		"of the KOffice package."));
diff --git a/kate/plugins/kdatatool/kate_kdatatool.h b/kate/plugins/kdatatool/kate_kdatatool.h
index b3ef86767..e1c085b5a 100644
--- a/kate/plugins/kdatatool/kate_kdatatool.h
+++ b/kate/plugins/kdatatool/kate_kdatatool.h
@@ -39,7 +39,7 @@ class KDataToolPlugin : public KTextEditor::Plugin, public KTextEditor::PluginVi
 	TQ_OBJECT
 
 public:
-	KDataToolPlugin( TQObject *parent = 0, const char* name = 0, const TQStringList &args = TQStringList() );
+	KDataToolPlugin( TQObject *parent = nullptr, const char* name = nullptr, const TQStringList &args = TQStringList() );
 	virtual ~KDataToolPlugin();
 	void addView (KTextEditor::View *view);
 	void removeView (KTextEditor::View *view);
diff --git a/kate/plugins/wordcompletion/docwordcompletion.h b/kate/plugins/wordcompletion/docwordcompletion.h
index e2ff3cfb2..11f4c1648 100644
--- a/kate/plugins/wordcompletion/docwordcompletion.h
+++ b/kate/plugins/wordcompletion/docwordcompletion.h
@@ -47,8 +47,8 @@ class DocWordCompletionPlugin
   TQ_OBJECT
 
   public:
-    DocWordCompletionPlugin( TQObject *parent = 0,
-                            const char* name = 0,
+    DocWordCompletionPlugin( TQObject *parent = nullptr,
+                            const char* name = nullptr,
                             const TQStringList &args = TQStringList() );
     virtual ~DocWordCompletionPlugin() {};
 
@@ -84,8 +84,8 @@ class DocWordCompletionPluginView
   TQ_OBJECT
 
   public:
-    DocWordCompletionPluginView( uint treshold=3, bool autopopup=true, KTextEditor::View *view=0,
-                               const char *name=0 );
+    DocWordCompletionPluginView( uint treshold=3, bool autopopup=true, KTextEditor::View *view=nullptr,
+                               const char *name=nullptr );
     ~DocWordCompletionPluginView() {};
 
     void settreshold( uint treshold );
-- 
cgit v1.2.3

