From 5bf4047800fac7690204522bf65fce217048ea1c Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sun, 8 Nov 2026 08:05:41 -0300
Subject: Replace zero pointer constants in shared support
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>
---
 indexlib/compressed.cpp                            | 14 ++--
 indexlib/leafdata.cpp                              |  2 +-
 indexlib/logfile.cpp                               |  2 +-
 indexlib/mempool.h                                 |  2 +-
 indexlib/mempool.tcc                               |  2 +-
 indexlib/mmap_manager.cpp                          |  6 +-
 indexlib/pointer.h                                 |  2 +-
 indexlib/stringset.h                               |  2 +-
 knotes/knote.cpp                                   | 18 ++---
 knotes/knote.h                                     |  4 +-
 knotes/knotealarmdlg.h                             |  2 +-
 knotes/knotebutton.h                               |  2 +-
 knotes/knoteconfigdlg.h                            |  2 +-
 knotes/knoteedit.cpp                               | 10 +--
 knotes/knoteedit.h                                 |  2 +-
 knotes/knotehostdlg.h                              |  2 +-
 knotes/knoteprinter.cpp                            |  6 +-
 knotes/knotesalarm.cpp                             |  4 +-
 knotes/knotesalarm.h                               |  2 +-
 knotes/knotesapp.cpp                               | 16 ++---
 knotes/knoteslegacy.cpp                            |  2 +-
 knotes/knotesnetsend.cpp                           |  2 +-
 knotes/main.cpp                                    | 22 +++---
 knotes/resourcelocal.cpp                           |  2 +-
 knotes/resourcelocalconfig.h                       |  2 +-
 knotes/resourcemanager.cpp                         |  4 +-
 knotes/resourcenotes.cpp                           |  2 +-
 kode/kodemain.cpp                                  | 46 ++++++-------
 kode/kwsdl/kung/dispatcher.cpp                     |  2 +-
 kode/kwsdl/kung/inputfield.cpp                     |  4 +-
 kode/kwsdl/kung/inputfieldfactory.cpp              |  2 +-
 kode/kwsdl/schema/complextype.cpp                  |  4 +-
 kode/kwsdl/schema/parser.cpp                       | 10 +--
 kode/kwsdl/tests/google/directorycategory.cpp      |  8 +--
 kode/kwsdl/tests/google/directorycategoryarray.cpp |  4 +-
 kode/kwsdl/tests/google/googlesearchresult.cpp     | 44 ++++++------
 kode/kwsdl/tests/google/googlesearchservice.cpp    |  6 +-
 kode/kwsdl/tests/google/resultelement.cpp          | 36 +++++-----
 kode/kwsdl/tests/google/resultelementarray.cpp     |  4 +-
 kode/kxml_compiler/kxml_compiler.cpp               | 10 +--
 kode/kxml_compiler/parser.cpp                      |  2 +-
 konsolekalendar/konsolekalendarexports.h           |  2 +-
 konsolekalendar/main.cpp                           | 78 +++++++++++-----------
 konsolekalendar/stdcalendar.cpp                    |  2 +-
 libemailfunctions/networkstatus.cpp                |  4 +-
 libtdepim/addresseelineedit.cpp                    | 34 +++++-----
 libtdepim/addresseelineedit.h                      |  4 +-
 libtdepim/addresseeselector.cpp                    | 22 +++---
 libtdepim/addresseeselector.h                      |  4 +-
 libtdepim/addresseeview.cpp                        | 12 ++--
 libtdepim/addresseeview.h                          |  4 +-
 libtdepim/addressesdialog.cpp                      | 54 +++++++--------
 libtdepim/addressesdialog.h                        |  6 +-
 libtdepim/broadcaststatus.cpp                      |  4 +-
 libtdepim/broadcaststatus.h                        |  4 +-
 libtdepim/categoryeditdialog.h                     |  4 +-
 libtdepim/categoryselectdialog.h                   |  4 +-
 libtdepim/clicklineedit.h                          |  2 +-
 libtdepim/collectingprocess.cpp                    |  2 +-
 libtdepim/collectingprocess.h                      |  2 +-
 libtdepim/completionordereditor.h                  |  2 +-
 libtdepim/configmanager.h                          |  2 +-
 libtdepim/designerfields.cpp                       |  2 +-
 libtdepim/designerfields.h                         |  2 +-
 libtdepim/embeddedurlpage.cpp                      |  4 +-
 libtdepim/embeddedurlpage.h                        |  2 +-
 libtdepim/infoextension.cpp                        |  2 +-
 libtdepim/kaddrbook.cpp                            |  8 +--
 libtdepim/kcmdesignerfields.cpp                    | 18 ++---
 libtdepim/kcmdesignerfields.h                      |  2 +-
 libtdepim/kdateedit.cpp                            |  4 +-
 libtdepim/kdateedit.h                              |  4 +-
 libtdepim/kdatepickerpopup.h                       |  2 +-
 libtdepim/kfoldertree.h                            |  2 +-
 libtdepim/kimportdialog.cpp                        |  4 +-
 libtdepim/kincidencechooser.cpp                    | 16 ++---
 libtdepim/kincidencechooser.h                      |  2 +-
 libtdepim/kmailcompletion.cpp                      |  4 +-
 libtdepim/komposer/core/attachment.cpp             |  2 +-
 libtdepim/komposer/core/core.cpp                   |  2 +-
 libtdepim/komposer/core/editor.cpp                 |  2 +-
 libtdepim/komposer/core/plugin.cpp                 |  2 +-
 libtdepim/kpixmapregionselectordialog.h            | 10 +--
 libtdepim/kpixmapregionselectorwidget.h            |  2 +-
 libtdepim/kprefsdialog.cpp                         |  4 +-
 libtdepim/kprefsdialog.h                           |  4 +-
 libtdepim/krsqueezedtextlabel.h                    |  4 +-
 libtdepim/kscoring.cpp                             | 14 ++--
 libtdepim/kscoring.h                               |  6 +-
 libtdepim/kscoringeditor.cpp                       | 26 ++++----
 libtdepim/kscoringeditor.h                         | 20 +++---
 libtdepim/ksubscription.cpp                        | 10 +--
 libtdepim/ksubscription.h                          |  2 +-
 libtdepim/ktimeedit.cpp                            |  2 +-
 libtdepim/ktimeedit.h                              |  2 +-
 libtdepim/kvcarddrag.h                             |  4 +-
 libtdepim/kwidgetlister.h                          |  4 +-
 libtdepim/ldapclient.cpp                           |  6 +-
 libtdepim/ldapclient.h                             |  4 +-
 libtdepim/ldapsearchdialog.h                       |  2 +-
 libtdepim/linklocator.cpp                          |  6 +-
 libtdepim/maillistdrag.cpp                         |  4 +-
 libtdepim/maillistdrag.h                           |  2 +-
 libtdepim/overlaywidget.cpp                        |  2 +-
 libtdepim/overlaywidget.h                          |  2 +-
 libtdepim/pluginloader.h                           |  6 +-
 libtdepim/pluginloaderbase.cpp                     | 14 ++--
 libtdepim/progressdialog.cpp                       |  8 +--
 libtdepim/progressdialog.h                         |  8 +--
 libtdepim/progressmanager.cpp                      | 12 ++--
 libtdepim/progressmanager.h                        |  4 +-
 libtdepim/recentaddresses.cpp                      |  2 +-
 libtdepim/recentaddresses.h                        |  8 +--
 libtdepim/sendsmsdialog.h                          |  2 +-
 libtdepim/sidebarextension.cpp                     |  2 +-
 libtdepim/statusbarprogresswidget.cpp              | 10 +--
 libtdepim/tdeabcresourcecached.cpp                 |  4 +-
 libtdepim/tdeconfigpropagator.cpp                  |  6 +-
 libtdepim/tdeconfigwizard.cpp                      |  4 +-
 libtdepim/tdeconfigwizard.h                        |  6 +-
 libtdepim/tdefileio.cpp                            |  8 +--
 .../tdepartsdesignerplugin.cpp                     |  6 +-
 libtdepim/weaver.cpp                               | 30 ++++-----
 libtdepim/weaver.h                                 | 10 +--
 libtdepim/weaverextensions.h                       |  2 +-
 libtdepim/weaverlogger.h                           |  2 +-
 .../kmail/bodypartformatter/attendeeselector.cpp   |  2 +-
 plugins/kmail/bodypartformatter/attendeeselector.h |  2 +-
 .../kmail/bodypartformatter/delegateselector.cpp   |  2 +-
 plugins/kmail/bodypartformatter/delegateselector.h |  2 +-
 plugins/kmail/bodypartformatter/text_calendar.cpp  | 40 +++++------
 plugins/kmail/bodypartformatter/text_vcard.cpp     | 20 +++---
 plugins/kmail/bodypartformatter/text_xdiff.cpp     |  8 +--
 tdefile-plugins/ics/tdefile_ics.cpp                |  2 +-
 tdefile-plugins/vcf/tdefile_vcf.cpp                |  2 +-
 wizards/egroupwaremain.cpp                         |  2 +-
 wizards/exchangemain.cpp                           |  2 +-
 wizards/exchangewizard.cpp                         |  2 +-
 wizards/groupwarewizard.h                          |  2 +-
 wizards/groupwisemain.cpp                          |  2 +-
 wizards/kmailchanges.cpp                           |  4 +-
 wizards/kolabmain.cpp                              |  2 +-
 wizards/kolabwizard.cpp                            |  6 +-
 wizards/main.cpp                                   |  4 +-
 wizards/overviewpage.h                             |  2 +-
 wizards/scalixmain.cpp                             |  2 +-
 wizards/scalixwizard.cpp                           |  6 +-
 wizards/servertypemanager.cpp                      |  2 +-
 wizards/sloxmain.cpp                               |  2 +-
 149 files changed, 537 insertions(+), 537 deletions(-)

diff --git a/indexlib/compressed.cpp b/indexlib/compressed.cpp
index 9c73c304c..bd6460a24 100644
--- a/indexlib/compressed.cpp
+++ b/indexlib/compressed.cpp
@@ -40,7 +40,7 @@
 #include <iostream>
 
 namespace {
-	memory_manager* cmanager = 0;
+	memory_manager* cmanager = nullptr;
 }
 
 void set_compression_manager( memory_manager* m ) {
@@ -71,9 +71,9 @@ const unsigned char* compressed_file::ronly_base( const unsigned idx ) const {
 		page* p =  new page( true );
 		pages_[ pageidx( idx ) ] = p;
 		z_stream stream;
-		stream.zalloc = 0;
-		stream.zfree = 0;
-		stream.opaque = 0;
+		stream.zalloc = nullptr;
+		stream.zfree = nullptr;
+		stream.opaque = nullptr;
 		zlibcheck( inflateInit( &stream ) );
 		p->origin_ = compressed_pageptr::cast_from_uint32( compressed_data_for( pageidx( idx ) ) );
 		unsigned char* source = reinterpret_cast<unsigned char*>( p->origin_->data() );
@@ -145,9 +145,9 @@ void compressed_file::write_back() {
 
 				unsigned char buffer2[ 4096 ] = {0};
 				z_stream stream;
-				stream.zalloc = 0;
-				stream.zfree = 0;
-				stream.opaque = 0;
+				stream.zalloc = nullptr;
+				stream.zfree = nullptr;
+				stream.opaque = nullptr;
 				zlibcheck( inflateInit( &stream ) );
 				stream.next_in = buffer;
 				stream.avail_in = size;
diff --git a/indexlib/leafdata.cpp b/indexlib/leafdata.cpp
index c88821569..1ebb23eab 100644
--- a/indexlib/leafdata.cpp
+++ b/indexlib/leafdata.cpp
@@ -37,7 +37,7 @@
 #include "format.h"
 
 namespace {
-	memory_manager* manager = 0;
+	memory_manager* manager = nullptr;
 }
 
 memory_manager* get_leafdata_manager() { return manager ; }
diff --git a/indexlib/logfile.cpp b/indexlib/logfile.cpp
index 4605030fa..2a7ccd000 100644
--- a/indexlib/logfile.cpp
+++ b/indexlib/logfile.cpp
@@ -32,7 +32,7 @@
 #include "logfile.h"
 #include <fstream>
 
-static std::ostream* logfile_ = 0;
+static std::ostream* logfile_ = nullptr;
 
 std::ostream& logfile() {
 	if ( !logfile_ ) {
diff --git a/indexlib/mempool.h b/indexlib/mempool.h
index 08be88578..595948183 100644
--- a/indexlib/mempool.h
+++ b/indexlib/mempool.h
@@ -118,7 +118,7 @@ struct mempool /* : boost::noncopyable */ {
 			protected:
 				const mempool* parent_;
 			public:
-				explicit list_node_manager( const mempool* p = 0 ):parent_( p ) {}
+				explicit list_node_manager( const mempool* p = nullptr ):parent_( p ) {}
 
 				void* rw_base( unsigned idx ) const {
 					return parent_->manager_->rw_base( idx );
diff --git a/indexlib/mempool.tcc b/indexlib/mempool.tcc
index 750209a22..bcf58aff0 100644
--- a/indexlib/mempool.tcc
+++ b/indexlib/mempool.tcc
@@ -35,7 +35,7 @@
 template <typename Traits>
 mempool<Traits>::mempool( std::unique_ptr<memory_manager> &&source ):
 	manager_( std::move(source) ),
-	max_order_( 0 )
+	max_order_( nullptr )
 {
 	if ( !manager_->size() ) init_memory();
 	max_order_.assign( memory_reference<uint32_t>( manager_->rw_base( 0 ) ) );
diff --git a/indexlib/mmap_manager.cpp b/indexlib/mmap_manager.cpp
index 30e045cf8..cf3dfdc5d 100644
--- a/indexlib/mmap_manager.cpp
+++ b/indexlib/mmap_manager.cpp
@@ -47,7 +47,7 @@ using indexlib::detail::errno_error;
 mmap_manager::mmap_manager( std::string filename )
 	:filename_( filename ),
 	 pagesize_( ( size_t )sysconf( _SC_PAGESIZE ) ),
-	 base_( 0 ),
+	 base_( nullptr ),
 	 size_( 0 )
 {
 	fd_ = open( filename.c_str(), O_RDWR | O_CREAT, 0644 );
@@ -91,12 +91,12 @@ void mmap_manager::unmap() {
 	if ( munmap( base_, size_ ) == -1 ) {
 		throw errno_error( "munmap()" ); // This should be BUG
 	}
-	base_ = 0;
+	base_ = nullptr;
 	size_ = 0;
 }
 
 void mmap_manager::map( unsigned size ) {
-	base_ = mmap( 0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd_, 0 );
+	base_ = mmap( nullptr, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd_, 0 );
 	if ( base_ == reinterpret_cast<void*>( -1 ) ) {
 		throw errno_error( "mmap()" );
 	}
diff --git a/indexlib/pointer.h b/indexlib/pointer.h
index 336ede764..a15045917 100644
--- a/indexlib/pointer.h
+++ b/indexlib/pointer.h
@@ -89,7 +89,7 @@ struct pointer: private Thing {
 		}
 
 		operator const volatile void*() const {
-			return this->idx_ ? this : 0;
+			return this->idx_ ? this : nullptr;
 		}
 		void* raw_pointer() { return base_type::base(); }
 	private:
diff --git a/indexlib/stringset.h b/indexlib/stringset.h
index 4761718b2..739d2459f 100644
--- a/indexlib/stringset.h
+++ b/indexlib/stringset.h
@@ -90,7 +90,7 @@ struct stringset {
 						return !( *this == other );
 				}
 				const_iterator():
-					mother_( 0 ),
+					mother_( nullptr ),
 					idx_( 0 )
 					{
 					}
diff --git a/knotes/knote.cpp b/knotes/knote.cpp
index f03943c96..fe624b0ca 100644
--- a/knotes/knote.cpp
+++ b/knotes/knote.cpp
@@ -81,8 +81,8 @@ int KNote::s_ppOffset = 0;
 
 KNote::KNote( TQDomDocument buildDoc, Journal *j, TQWidget *parent, const char *name )
   : TQFrame( parent, name, WStyle_Customize | WStyle_NoBorder | WDestructiveClose ),
-    m_label( 0 ), m_pushpin( 0 ), m_fold( 0 ), m_button( 0 ), m_tool( 0 ), m_editor( 0 ),
-    m_config( 0 ), m_journal( j ), m_find( 0 ),
+    m_label( nullptr ), m_pushpin( nullptr ), m_fold( nullptr ), m_button( nullptr ), m_tool( nullptr ), m_editor( nullptr ),
+    m_config( nullptr ), m_journal( j ), m_find( nullptr ),
     m_twinConf( TDESharedConfig::openConfig( "twinrc", true ) ),
     m_busy( 0 ), m_deleteWhenIdle( false ), m_blockEmitDataChanged( false )
 {
@@ -144,7 +144,7 @@ KNote::KNote( TQDomDocument buildDoc, Journal *j, TQWidget *parent, const char *
     connect( m_toDesktop->popupMenu(), TQ_SIGNAL(aboutToShow()), this, TQ_SLOT(slotUpdateDesktopActions()) );
 
     // invisible action to walk through the notes to make this configurable
-    new TDEAction( i18n("Walk Through Notes"), 0, SHIFT+Key_BackTab,
+    new TDEAction( i18n("Walk Through Notes"), nullptr, SHIFT+Key_BackTab,
                  this, TQ_SIGNAL(sigShowNextNote()), actionCollection(), "walk_notes" );
 
     // create the note header, button and label...
@@ -180,7 +180,7 @@ KNote::KNote( TQDomDocument buildDoc, Journal *j, TQWidget *parent, const char *
       // if there was just a way of making KComboBox adhere the toolbar height...
       TQObjectList *list = m_tool->queryList( "KComboBox" );
       TQObjectListIt it( *list );
-      while ( it.current() != 0 )
+      while (it.current())
       {
           KComboBox *combo = (KComboBox *)it.current();
           TQFont font = combo->font();
@@ -219,7 +219,7 @@ KNote::KNote( TQDomDocument buildDoc, Journal *j, TQWidget *parent, const char *
 
     // no config file yet? -> use the default display config if available
     // we want to write to configFile, so use "false"
-    bool newNote = !TDEIO::NetAccess::exists( KURL::fromPathOrURL( configFile ), false, 0 );
+    bool newNote = !TDEIO::NetAccess::exists( KURL::fromPathOrURL( configFile ), false, nullptr );
 
     m_config = new KNoteConfig( TDESharedConfig::openConfig( configFile, false, false ) );
     m_config->readConfig();
@@ -405,7 +405,7 @@ void KNote::slotKill( bool force )
     aboutToEnterEventLoop();
     // delete the configuration first, then the corresponding file
     delete m_config;
-    m_config = 0;
+    m_config = nullptr;
 
     TQString configFile = TDEGlobal::dirs()->saveLocation( "appdata", "notes/" );
     configFile += m_journal->uid();
@@ -621,7 +621,7 @@ void KNote::slotFindNext()
         m_editor->removeSelection( 1 );
         emit sigFindFinished();
         delete m_find;
-        m_find = 0;
+        m_find = nullptr;
     }
     else
     {
@@ -886,11 +886,11 @@ void KNote::slotPrint()
 void KNote::slotSaveAs()
 {
     m_blockEmitDataChanged = true;
-    TQCheckBox *convert = 0;
+    TQCheckBox *convert = nullptr;
 
     if ( m_editor->textFormat() == RichText )
     {
-        convert = new TQCheckBox( 0 );
+        convert = new TQCheckBox( nullptr );
         convert->setText( i18n("Save note as plain text") );
     }
 
diff --git a/knotes/knote.h b/knotes/knote.h
index 73ca8f4a3..1f08da32b 100644
--- a/knotes/knote.h
+++ b/knotes/knote.h
@@ -53,8 +53,8 @@ class KNote : public TQFrame, virtual public KXMLGUIClient
     TQ_OBJECT
   
 public:
-    KNote( TQDomDocument buildDoc, KCal::Journal *journal, TQWidget *parent = 0,
-           const char *name = 0 );
+    KNote( TQDomDocument buildDoc, KCal::Journal *journal, TQWidget *parent = nullptr,
+           const char *name = nullptr );
     ~KNote();
 
     void changeJournal(KCal::Journal *);
diff --git a/knotes/knotealarmdlg.h b/knotes/knotealarmdlg.h
index a64f2daa3..481091f83 100644
--- a/knotes/knotealarmdlg.h
+++ b/knotes/knotealarmdlg.h
@@ -48,7 +48,7 @@ class KNoteAlarmDlg : public KDialogBase
     TQ_OBJECT
   
 public:
-    KNoteAlarmDlg( const TQString& caption, TQWidget *parent=0, const char *name=0 );
+    KNoteAlarmDlg( const TQString& caption, TQWidget *parent=nullptr, const char *name=nullptr );
 
     void setIncidence( KCal::Journal *journal );
 
diff --git a/knotes/knotebutton.h b/knotes/knotebutton.h
index 1b5d4960a..e6410d1f0 100644
--- a/knotes/knotebutton.h
+++ b/knotes/knotebutton.h
@@ -33,7 +33,7 @@ class KNoteButton: public TQPushButton
     TQ_OBJECT
   
 public:
-    KNoteButton( const TQString& icon, TQWidget *parent=0, const char *name=0 );
+    KNoteButton( const TQString& icon, TQWidget *parent=nullptr, const char *name=nullptr );
     ~KNoteButton();
 
     virtual TQSize sizeHint() const;
diff --git a/knotes/knoteconfigdlg.h b/knotes/knoteconfigdlg.h
index 97c4ae9e4..f3b14599c 100644
--- a/knotes/knoteconfigdlg.h
+++ b/knotes/knoteconfigdlg.h
@@ -33,7 +33,7 @@ class KNoteConfigDlg : public TDEConfigDialog
   
 public:
     KNoteConfigDlg( KNoteConfig *config, const TQString &title,
-                    TQWidget *parent=0, const char *name=0 );
+                    TQWidget *parent=nullptr, const char *name=nullptr );
     ~KNoteConfigDlg();
 
 public slots:
diff --git a/knotes/knoteedit.cpp b/knotes/knoteedit.cpp
index 4ef1274de..de60711ed 100644
--- a/knotes/knoteedit.cpp
+++ b/knotes/knoteedit.cpp
@@ -37,7 +37,7 @@ static const short ICON_SIZE = 10;
 
 
 KNoteEdit::KNoteEdit( TDEActionCollection *actions, TQWidget *parent, const char *name )
-    : KTextEdit( parent, name ), m_note( 0 )
+    : KTextEdit( parent, name ), m_note( nullptr )
 {
     setAcceptDrops( true );
     setWordWrap( WidgetWidth );
@@ -68,13 +68,13 @@ KNoteEdit::KNoteEdit( TDEActionCollection *actions, TQWidget *parent, const char
     KStdAction::selectAll( this, TQ_SLOT(selectAll()), actions );
 
     // create the actions modifying the text format
-    m_textBold = new TDEToggleAction( i18n("Bold"), "format-text-bold", CTRL + Key_B, 0, 0,
+    m_textBold = new TDEToggleAction( i18n("Bold"), "format-text-bold", CTRL + Key_B, nullptr, nullptr,
                                     actions, "format_bold" );
-    m_textItalic = new TDEToggleAction( i18n("Italic"), "format-text-italic", CTRL + Key_I, 0, 0,
+    m_textItalic = new TDEToggleAction( i18n("Italic"), "format-text-italic", CTRL + Key_I, nullptr, nullptr,
                                       actions, "format_italic" );
-    m_textUnderline = new TDEToggleAction( i18n("Underline"), "format-text-underline", CTRL + Key_U, 0, 0,
+    m_textUnderline = new TDEToggleAction( i18n("Underline"), "format-text-underline", CTRL + Key_U, nullptr, nullptr,
                                          actions, "format_underline" );
-    m_textStrikeOut = new TDEToggleAction( i18n("Strike Out"), "format-text-strikethrough", CTRL + Key_S, 0, 0,
+    m_textStrikeOut = new TDEToggleAction( i18n("Strike Out"), "format-text-strikethrough", CTRL + Key_S, nullptr, nullptr,
                                          actions, "format_strikeout" );
 
     connect( m_textBold, TQ_SIGNAL(toggled(bool)), TQ_SLOT(setBold(bool)) );
diff --git a/knotes/knoteedit.h b/knotes/knoteedit.h
index 259cba821..27ca4af44 100644
--- a/knotes/knoteedit.h
+++ b/knotes/knoteedit.h
@@ -40,7 +40,7 @@ class KNoteEdit : public KTextEdit
     TQ_OBJECT
   
 public:
-    KNoteEdit( TDEActionCollection *actions, TQWidget *parent=0, const char *name=0 );
+    KNoteEdit( TDEActionCollection *actions, TQWidget *parent=nullptr, const char *name=nullptr );
     ~KNoteEdit();
     void setNote( KNote *_note ) {
         m_note = _note;
diff --git a/knotes/knotehostdlg.h b/knotes/knotehostdlg.h
index 81afc6c52..7107fbc87 100644
--- a/knotes/knotehostdlg.h
+++ b/knotes/knotehostdlg.h
@@ -46,7 +46,7 @@ class KNoteHostDlg : public KDialogBase
     TQ_OBJECT
   
 public:
-    KNoteHostDlg( const TQString& caption, TQWidget *parent=0, const char *name=0 );
+    KNoteHostDlg( const TQString& caption, TQWidget *parent=nullptr, const char *name=nullptr );
     ~KNoteHostDlg();
 
     TQString host() const;
diff --git a/knotes/knoteprinter.cpp b/knotes/knoteprinter.cpp
index cd3bc9b3c..6d949665c 100644
--- a/knotes/knoteprinter.cpp
+++ b/knotes/knoteprinter.cpp
@@ -12,7 +12,7 @@
 #include <tqsimplerichtext.h>
 #include <tqstring.h>
 
-KNotePrinter::KNotePrinter() : m_styleSheet( 0 ), m_mimeSourceFactory( 0 )
+KNotePrinter::KNotePrinter() : m_styleSheet( nullptr ), m_mimeSourceFactory( nullptr )
 {
 }
 
@@ -117,7 +117,7 @@ void KNotePrinter::printNote( const TQString& name, const TQString& content ) co
     KPrinter printer;
     printer.setFullPage( true );
 
-    if ( !printer.setup( 0, i18n("Print %1").arg(name) ) )
+    if ( !printer.setup( nullptr, i18n("Print %1").arg(name) ) )
         return;
     TQPainter painter;
     painter.begin( &printer );
@@ -133,7 +133,7 @@ void KNotePrinter::printNotes( const TQValueList<KCal::Journal*>& journals ) con
     KPrinter printer;
     printer.setFullPage( true );
 
-    if ( !printer.setup( 0, i18n("Print Note", "Print %n notes", journals.count() ) ) )
+    if ( !printer.setup( nullptr, i18n("Print Note", "Print %n notes", journals.count() ) ) )
         return;
 
     TQPainter painter;
diff --git a/knotes/knotesalarm.cpp b/knotes/knotesalarm.cpp
index 99f05cd96..14a24f823 100644
--- a/knotes/knotesalarm.cpp
+++ b/knotes/knotesalarm.cpp
@@ -45,7 +45,7 @@
 KNotesAlarm::KNotesAlarm( KNotesResourceManager *manager, TQObject *parent, const char *name )
   : TQObject( parent, name ),
     m_manager( manager ),
-    m_checkTimer( 0, "m_checkTimer" )
+    m_checkTimer( nullptr, "m_checkTimer" )
 {
     // TODO: fix timezone stuff?
 
@@ -72,7 +72,7 @@ void KNotesAlarm::checkAlarms()
     }
 
     if ( !notes.isEmpty() )
-        KMessageBox::informationList( 0, i18n("The following notes triggered alarms:"), notes, i18n("Alarm") );
+        KMessageBox::informationList( nullptr, i18n("The following notes triggered alarms:"), notes, i18n("Alarm") );
 }
 
 
diff --git a/knotes/knotesalarm.h b/knotes/knotesalarm.h
index c173f8803..393aa06c3 100644
--- a/knotes/knotesalarm.h
+++ b/knotes/knotesalarm.h
@@ -47,7 +47,7 @@ class KNotesAlarm : public TQObject
     TQ_OBJECT
   
 public:
-    KNotesAlarm( KNotesResourceManager *manager, TQObject *parent = 0, const char *name = 0 );
+    KNotesAlarm( KNotesResourceManager *manager, TQObject *parent = nullptr, const char *name = nullptr );
 
 private slots:
     void checkAlarms();
diff --git a/knotes/knotesapp.cpp b/knotes/knotesapp.cpp
index aa322df3f..c0b88f446 100644
--- a/knotes/knotesapp.cpp
+++ b/knotes/knotesapp.cpp
@@ -60,7 +60,7 @@ using namespace KNetwork;
 class KNotesKeyDialog : public KDialogBase
 {
 public:
-    KNotesKeyDialog( TDEGlobalAccel *globals, TQWidget *parent, const char* name = 0 )
+    KNotesKeyDialog( TDEGlobalAccel *globals, TQWidget *parent, const char* name = nullptr )
         : KDialogBase( parent, name, true, i18n("Configure Shortcuts"), Default|Ok|Cancel, Ok )
     {
         m_keyChooser = new KKeyChooser( globals, this );
@@ -93,8 +93,8 @@ int KNotesApp::KNoteActionList::compareItems( TQPtrCollection::Item s1, TQPtrCol
 
 
 KNotesApp::KNotesApp()
-    : DCOPObject("KNotesIface"), TQLabel( 0, 0, WType_TopLevel ),
-      m_alarm( 0 ), m_listener( 0 ), m_find( 0 ), m_findPos( 0 )
+    : DCOPObject("KNotesIface"), TQLabel( nullptr, nullptr, WType_TopLevel ),
+      m_alarm( nullptr ), m_listener( nullptr ), m_find( nullptr ), m_findPos( nullptr )
 {
     connect( tdeApp, TQ_SIGNAL(lastWindowClosed()), tdeApp, TQ_SLOT(quit()) );
 
@@ -560,9 +560,9 @@ void KNotesApp::slotFindNext()
     {
         m_find->displayFinalDialog();
         delete m_find;
-        m_find = 0;
+        m_find = nullptr;
         delete m_findPos;
-        m_findPos = 0;
+        m_findPos = nullptr;
     }
 }
 
@@ -573,7 +573,7 @@ void KNotesApp::slotPreferences()
         return;
 
     // create a new preferences dialog...
-    KNoteConfigDlg *dialog = new KNoteConfigDlg( 0, i18n("Settings"), this,
+    KNoteConfigDlg *dialog = new KNoteConfigDlg( nullptr, i18n("Settings"), this,
                                                  "KNotes Settings" );
     connect( dialog, TQ_SIGNAL(settingsChanged()), this, TQ_SLOT(updateNetworkListener()) );
     connect( dialog, TQ_SIGNAL(settingsChanged()), this, TQ_SLOT(updateStyle()) );
@@ -654,7 +654,7 @@ void KNotesApp::createNote( KCal::Journal *journal )
          return;
   }
   m_noteUidModify = journal->uid();
-    KNote *newNote = new KNote( m_noteGUI, journal, 0, journal->uid().utf8() );
+    KNote *newNote = new KNote( m_noteGUI, journal, nullptr, journal->uid().utf8() );
     m_noteList.insert( newNote->noteId(), newNote );
 
     connect( newNote, TQ_SIGNAL(sigRequestNewNote()), TQ_SLOT(newNote()) );
@@ -726,7 +726,7 @@ void KNotesApp::updateNoteActions()
     {
         TDEAction *action = new TDEAction( it.current()->name().replace("&", "&&"),
                                        TDEShortcut(), this, TQ_SLOT(slotShowNote()),
-                                       (TQObject *)0,
+                                       (TQObject *)nullptr,
                                        it.current()->noteId().utf8() );
         TDEIconEffect effect;
         TQPixmap icon = effect.apply( tdeApp->miniIcon(), TDEIconEffect::Colorize, 1,
diff --git a/knotes/knoteslegacy.cpp b/knotes/knoteslegacy.cpp
index ebe3f3aec..ebf1896b1 100644
--- a/knotes/knoteslegacy.cpp
+++ b/knotes/knoteslegacy.cpp
@@ -149,7 +149,7 @@ bool KNotesLegacy::convertKNotes1Config( Journal *journal, TQDir& noteDir,
     TDEIO::NetAccess::copy(
         KURL( TDEGlobal::dirs()->saveLocation( "config" ) + "knotesrc" ),
         KURL( configFile ),
-        0
+        nullptr
     );
 
     KNoteConfig config( TDESharedConfig::openConfig( configFile, false, false ) );
diff --git a/knotes/knotesnetsend.cpp b/knotes/knotesnetsend.cpp
index 55dc75c38..e66e614a5 100644
--- a/knotes/knotesnetsend.cpp
+++ b/knotes/knotesnetsend.cpp
@@ -90,7 +90,7 @@ void KNotesNetworkSender::slotReadyWrite()
 
 void KNotesNetworkSender::slotError( int err )
 {
-    KMessageBox::sorry( 0, i18n("Communication error: %1")
+    KMessageBox::sorry( nullptr, i18n("Communication error: %1")
            .arg( TQString(KNetwork::TDESocketBase::errorString( static_cast<TDESocketBase::SocketError>(err) )) )
     );
     slotClosed();
diff --git a/knotes/main.cpp b/knotes/main.cpp
index 5f045a386..786e30dd3 100644
--- a/knotes/main.cpp
+++ b/knotes/main.cpp
@@ -38,7 +38,7 @@ void remove_sm_from_client_leader()
     int format, status;
     unsigned long nitems = 0;
     unsigned long extra = 0;
-    unsigned char *data = 0;
+    unsigned char *data = nullptr;
 
     Atom atoms[ 2 ];
     char *atom_names[ 2 ] = { (char*)"WM_CLIENT_LEADER", (char*)"SM_CLIENT_ID" };
@@ -64,7 +64,7 @@ void remove_sm_from_client_leader()
 
 
 Application::Application()
-    : TDEUniqueApplication(), mMainWindow( 0 )
+    : TDEUniqueApplication(), mMainWindow( nullptr )
 {
 }
 
@@ -107,15 +107,15 @@ int main( int argc, char* argv[] )
 
     aboutData.addCredit("Bera Debajyoti", I18N_NOOP("Idea and initial code for the new look&feel"),
                         "debajyotibera@gmail.com");
-    aboutData.addCredit("Matthias Ettrich", 0, "ettrich@kde.org");
-    aboutData.addCredit("David Faure", 0, "faure@kde.org");
-    aboutData.addCredit("Matthias Kiefer", 0, "kiefer@kde.org");
-    aboutData.addCredit("Luboš Luňák", 0, "l.lunak@kde.org");
-    aboutData.addCredit("Laurent Montel", 0, "montel@kde.org");
-    aboutData.addCredit("Dirk A. Mueller", 0, "dmuell@gmx.net");
-    aboutData.addCredit("Carsten Pfeiffer", 0, "pfeiffer@kde.org");
-    aboutData.addCredit("Harri Porten", 0, "porten@kde.org");
-    aboutData.addCredit("Espen Sand", 0, "espen@kde.org");
+    aboutData.addCredit("Matthias Ettrich", nullptr, "ettrich@kde.org");
+    aboutData.addCredit("David Faure", nullptr, "faure@kde.org");
+    aboutData.addCredit("Matthias Kiefer", nullptr, "kiefer@kde.org");
+    aboutData.addCredit("Luboš Luňák", nullptr, "l.lunak@kde.org");
+    aboutData.addCredit("Laurent Montel", nullptr, "montel@kde.org");
+    aboutData.addCredit("Dirk A. Mueller", nullptr, "dmuell@gmx.net");
+    aboutData.addCredit("Carsten Pfeiffer", nullptr, "pfeiffer@kde.org");
+    aboutData.addCredit("Harri Porten", nullptr, "porten@kde.org");
+    aboutData.addCredit("Espen Sand", nullptr, "espen@kde.org");
 
     TDECmdLineArgs::init( argc, argv, &aboutData );
 
diff --git a/knotes/resourcelocal.cpp b/knotes/resourcelocal.cpp
index 5f797ef94..44b7d5656 100644
--- a/knotes/resourcelocal.cpp
+++ b/knotes/resourcelocal.cpp
@@ -85,7 +85,7 @@ bool ResourceLocal::save()
 {
     if ( !mCalendar.save( mURL.path(), new KCal::ICalFormat() ) )
     {
-        KMessageBox::error( 0,
+        KMessageBox::error( nullptr,
                             i18n("<qt>Unable to save the notes to <b>%1</b>. "
                                  "Check that there is sufficient disk space."
                                  "<br>There should be a backup in the same directory "
diff --git a/knotes/resourcelocalconfig.h b/knotes/resourcelocalconfig.h
index 680f5146d..253fd019e 100644
--- a/knotes/resourcelocalconfig.h
+++ b/knotes/resourcelocalconfig.h
@@ -30,7 +30,7 @@ class ResourceLocalConfig : public KRES::ConfigWidget
     TQ_OBJECT
   
     public:
-        ResourceLocalConfig( TQWidget *parent = 0, const char *name = 0 );
+        ResourceLocalConfig( TQWidget *parent = nullptr, const char *name = nullptr );
         virtual ~ResourceLocalConfig();
 
     public slots:
diff --git a/knotes/resourcemanager.cpp b/knotes/resourcemanager.cpp
index 4ede5b82c..03b21a60f 100644
--- a/knotes/resourcemanager.cpp
+++ b/knotes/resourcemanager.cpp
@@ -38,7 +38,7 @@
 
 
 KNotesResourceManager::KNotesResourceManager()
-    : TQObject( 0, "KNotes Resource Manager" )
+    : TQObject( nullptr, "KNotes Resource Manager" )
 {
     m_manager = new KRES::Manager<ResourceNotes>( "notes" );
     m_manager->addObserver( this );
@@ -55,7 +55,7 @@ void KNotesResourceManager::load()
     if ( !m_manager->standardResource() )
     {
         kdWarning(5500) << "No standard resource yet." << endl;
-        ResourceNotes *resource = new ResourceLocal( 0 );
+        ResourceNotes *resource = new ResourceLocal( nullptr );
         m_manager->add( resource );
         m_manager->setStandardResource( resource );
     }
diff --git a/knotes/resourcenotes.cpp b/knotes/resourcenotes.cpp
index 2cd31eb0d..84d219059 100644
--- a/knotes/resourcenotes.cpp
+++ b/knotes/resourcenotes.cpp
@@ -34,7 +34,7 @@
 
 
 ResourceNotes::ResourceNotes( const TDEConfig *config )
-    : KRES::Resource( config ), mManager( 0 )
+    : KRES::Resource( config ), mManager( nullptr )
 {
     if ( !config )
         setResourceName( "Notes" );
diff --git a/kode/kodemain.cpp b/kode/kodemain.cpp
index f1c82d057..49cef0993 100644
--- a/kode/kodemain.cpp
+++ b/kode/kodemain.cpp
@@ -48,28 +48,28 @@
 
 static const TDECmdLineOptions options[] =
 {
-  { "c", 0, 0 },
-  { "create-class", I18N_NOOP("Create class"), 0 },
-  { "d", 0, 0 },
-  { "create-dialog", I18N_NOOP("Create dialog"), 0 },
-  { "create-tdeioslave", I18N_NOOP("Create tdeioslave"), 0 },
-  { "create-main", I18N_NOOP("Create main function template"), 0 },
-  { "y", 0, 0 },
-  { "codify", I18N_NOOP("Create generator code for given source"), 0 },
-  { "add-property", I18N_NOOP("Add property to class"), 0 },
-  { "inplace", I18N_NOOP("Change file in place"), 0 },
-  { "author-email <name>", I18N_NOOP("Add author with given email address"), 0 },
-  { "project <name>", I18N_NOOP("Name of project"), 0 },
-  { "gpl", I18N_NOOP("Use GPL as license"), 0 },
-  { "lgpl", I18N_NOOP("Use LGPL as license"), 0 },
-  { "classname <name>", I18N_NOOP("Name of class"), 0 },
-  { "filename <name>", I18N_NOOP("Name of file"), 0 },
-  { "namespace <name>", I18N_NOOP("Namespace"), 0 },
-  { "warning", I18N_NOOP("Create warning about code generation"), 0 },
-  { "qt-exception", I18N_NOOP("Add TQt exception to GPL"), 0 },
-  { "singleton", I18N_NOOP("Create a singleton class"), 0 },
-  { "protocol", I18N_NOOP("tdeioslave protocol"), 0 },
-  { "+[filename]", I18N_NOOP("Source code file name"), 0 },
+  { "c", nullptr, nullptr },
+  { "create-class", I18N_NOOP("Create class"), nullptr },
+  { "d", nullptr, nullptr },
+  { "create-dialog", I18N_NOOP("Create dialog"), nullptr },
+  { "create-tdeioslave", I18N_NOOP("Create tdeioslave"), nullptr },
+  { "create-main", I18N_NOOP("Create main function template"), nullptr },
+  { "y", nullptr, nullptr },
+  { "codify", I18N_NOOP("Create generator code for given source"), nullptr },
+  { "add-property", I18N_NOOP("Add property to class"), nullptr },
+  { "inplace", I18N_NOOP("Change file in place"), nullptr },
+  { "author-email <name>", I18N_NOOP("Add author with given email address"), nullptr },
+  { "project <name>", I18N_NOOP("Name of project"), nullptr },
+  { "gpl", I18N_NOOP("Use GPL as license"), nullptr },
+  { "lgpl", I18N_NOOP("Use LGPL as license"), nullptr },
+  { "classname <name>", I18N_NOOP("Name of class"), nullptr },
+  { "filename <name>", I18N_NOOP("Name of file"), nullptr },
+  { "namespace <name>", I18N_NOOP("Namespace"), nullptr },
+  { "warning", I18N_NOOP("Create warning about code generation"), nullptr },
+  { "qt-exception", I18N_NOOP("Add TQt exception to GPL"), nullptr },
+  { "singleton", I18N_NOOP("Create a singleton class"), nullptr },
+  { "protocol", I18N_NOOP("tdeioslave protocol"), nullptr },
+  { "+[filename]", I18N_NOOP("Source code file name"), nullptr },
   TDECmdLineLastOption
 };
 
@@ -610,7 +610,7 @@ int create( TDECmdLineArgs *args )
 int main(int argc,char **argv)
 {
   TDEAboutData aboutData( "kode", I18N_NOOP("TDE Code Generator"), "0.1" );
-  aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" );
+  aboutData.addAuthor( "Cornelius Schumacher", nullptr, "schumacher@kde.org" );
 
   TDECmdLineArgs::init( argc, argv, &aboutData );
   TDECmdLineArgs::addCmdLineOptions( options );
diff --git a/kode/kwsdl/kung/dispatcher.cpp b/kode/kwsdl/kung/dispatcher.cpp
index 7b2ad4776..a01f2ede5 100644
--- a/kode/kwsdl/kung/dispatcher.cpp
+++ b/kode/kwsdl/kung/dispatcher.cpp
@@ -45,7 +45,7 @@ Dispatcher::Dispatcher()
 Dispatcher::~Dispatcher()
 {
   delete mConversationManager;
-  mConversationManager = 0;
+  mConversationManager = nullptr;
 }
 
 void Dispatcher::setWSDL( const KWSDL::WSDL &wsdl )
diff --git a/kode/kwsdl/kung/inputfield.cpp b/kode/kwsdl/kung/inputfield.cpp
index 7bdd4cdeb..b5896ba23 100644
--- a/kode/kwsdl/kung/inputfield.cpp
+++ b/kode/kwsdl/kung/inputfield.cpp
@@ -81,7 +81,7 @@ SimpleInputField::SimpleInputField( const TQString &name, const Schema::SimpleTy
 SimpleInputField::~SimpleInputField()
 {
   delete mType;
-  mType = 0;
+  mType = nullptr;
 }
 
 ComplexInputField::ComplexInputField( const TQString &name, const Schema::ComplexType *type )
@@ -96,7 +96,7 @@ ComplexInputField::ComplexInputField( const TQString &name, const Schema::Comple
 ComplexInputField::~ComplexInputField()
 {
   delete mType;
-  mType = 0;
+  mType = nullptr;
 }
 
 #include "inputfield.moc"
diff --git a/kode/kwsdl/kung/inputfieldfactory.cpp b/kode/kwsdl/kung/inputfieldfactory.cpp
index 8359eef67..3d57e881e 100644
--- a/kode/kwsdl/kung/inputfieldfactory.cpp
+++ b/kode/kwsdl/kung/inputfieldfactory.cpp
@@ -37,7 +37,7 @@
 
 #include "inputfieldfactory.h"
 
-InputFieldFactory *InputFieldFactory::mSelf = 0;
+InputFieldFactory *InputFieldFactory::mSelf = nullptr;
 static KStaticDeleter<InputFieldFactory> inputFieldFactoryDeleter;
 
 InputFieldFactory::InputFieldFactory()
diff --git a/kode/kwsdl/schema/complextype.cpp b/kode/kwsdl/schema/complextype.cpp
index 21e9e90c5..a21de3c2b 100644
--- a/kode/kwsdl/schema/complextype.cpp
+++ b/kode/kwsdl/schema/complextype.cpp
@@ -32,7 +32,7 @@ ComplexType::ComplexType( const TQString &nameSpace )
 {
   mBaseType.typeId = XSDType::ANYTYPE;
   mBaseType.derivation = Extension;
-  mBaseType.type = 0;
+  mBaseType.type = nullptr;
 }
 
 ComplexType::ComplexType()
@@ -43,7 +43,7 @@ ComplexType::ComplexType()
 {
   mBaseType.typeId = XSDType::ANYTYPE;
   mBaseType.derivation = Extension;
-  mBaseType.type = 0;
+  mBaseType.type = nullptr;
 }
 
 ComplexType::~ComplexType()
diff --git a/kode/kwsdl/schema/parser.cpp b/kode/kwsdl/schema/parser.cpp
index b981c77ed..be3bee23f 100644
--- a/kode/kwsdl/schema/parser.cpp
+++ b/kode/kwsdl/schema/parser.cpp
@@ -54,7 +54,7 @@ Types Parser::types() const
 
   for ( int i = 0; i < numTypes(); i++ ) {
     const XSDType *pType = type( i + XSDType::ANYURI + 1 );
-    if ( pType != 0 ) {
+    if (pType) {
       if ( pType->isSimple() ) {
         const SimpleType *simpleType = static_cast<const SimpleType*>( pType );
 
@@ -405,7 +405,7 @@ void Parser::addElement( const TQDomElement &element, ComplexType *cType )
     if ( refName.nameSpace() == mNameSpace )
       e = this->element( elementId( refName ) );
 
-    if ( e == 0 ) {
+    if (!e) {
       added = true;
       mForwardElementRef.append( refName );
     } else {
@@ -531,7 +531,7 @@ void Parser::addAttribute( const TQDomElement &element, ComplexType *cType )
     if ( refAttribute.nameSpace() == mNameSpace )
       attribute = this->attribute( attributeId( refAttribute ) );
           
-    if ( attribute == 0 ) {
+    if (!attribute) {
       added = true;
       mForwardAttributeRef.append( refAttribute );
     } else {
@@ -920,7 +920,7 @@ int Parser::elementType( const QualifiedName &type )
     return 0;
 
   Element *e = element( id );
-  if ( e != 0 )
+  if (e)
     return e->type();
   else
     return 0;
@@ -989,7 +989,7 @@ int Parser::attributeType( const QualifiedName &type )
     return 0;
 
   Attribute *a = attribute( attId );
-  if ( a != 0 )
+  if (a)
     return a->type();
   else
     return 0;
diff --git a/kode/kwsdl/tests/google/directorycategory.cpp b/kode/kwsdl/tests/google/directorycategory.cpp
index e4cc56054..36d790e58 100644
--- a/kode/kwsdl/tests/google/directorycategory.cpp
+++ b/kode/kwsdl/tests/google/directorycategory.cpp
@@ -49,16 +49,16 @@ TQString*DirectoryCategory::specialEncoding() const
 
 DirectoryCategory::DirectoryCategory()
 {
-  mFullViewableName = 0;
-  mSpecialEncoding = 0;
+  mFullViewableName = nullptr;
+  mSpecialEncoding = nullptr;
 }
 
 DirectoryCategory::~DirectoryCategory()
 {
   delete mFullViewableName;
-  mFullViewableName = 0;
+  mFullViewableName = nullptr;
   delete mSpecialEncoding;
-  mSpecialEncoding = 0;
+  mSpecialEncoding = nullptr;
 }
 
 
diff --git a/kode/kwsdl/tests/google/directorycategoryarray.cpp b/kode/kwsdl/tests/google/directorycategoryarray.cpp
index b290fc3da..5de7d293c 100644
--- a/kode/kwsdl/tests/google/directorycategoryarray.cpp
+++ b/kode/kwsdl/tests/google/directorycategoryarray.cpp
@@ -40,13 +40,13 @@ TQPtrList<DirectoryCategory>*DirectoryCategoryArray::items() const
 
 DirectoryCategoryArray::DirectoryCategoryArray()
 {
-  mItems = 0;
+  mItems = nullptr;
 }
 
 DirectoryCategoryArray::~DirectoryCategoryArray()
 {
   delete mItems;
-  mItems = 0;
+  mItems = nullptr;
 }
 
 
diff --git a/kode/kwsdl/tests/google/googlesearchresult.cpp b/kode/kwsdl/tests/google/googlesearchresult.cpp
index 451ff4e57..81536569e 100644
--- a/kode/kwsdl/tests/google/googlesearchresult.cpp
+++ b/kode/kwsdl/tests/google/googlesearchresult.cpp
@@ -141,43 +141,43 @@ double*GoogleSearchResult::searchTime() const
 
 GoogleSearchResult::GoogleSearchResult()
 {
-  mDocumentFiltering = 0;
-  mSearchComments = 0;
-  mEstimatedTotalResultsCount = 0;
-  mEstimateIsExact = 0;
-  mResultElements = 0;
-  mSearchQuery = 0;
-  mStartIndex = 0;
-  mEndIndex = 0;
-  mSearchTips = 0;
-  mDirectoryCategories = 0;
-  mSearchTime = 0;
+  mDocumentFiltering = nullptr;
+  mSearchComments = nullptr;
+  mEstimatedTotalResultsCount = nullptr;
+  mEstimateIsExact = nullptr;
+  mResultElements = nullptr;
+  mSearchQuery = nullptr;
+  mStartIndex = nullptr;
+  mEndIndex = nullptr;
+  mSearchTips = nullptr;
+  mDirectoryCategories = nullptr;
+  mSearchTime = nullptr;
 }
 
 GoogleSearchResult::~GoogleSearchResult()
 {
   delete mDocumentFiltering;
-  mDocumentFiltering = 0;
+  mDocumentFiltering = nullptr;
   delete mSearchComments;
-  mSearchComments = 0;
+  mSearchComments = nullptr;
   delete mEstimatedTotalResultsCount;
-  mEstimatedTotalResultsCount = 0;
+  mEstimatedTotalResultsCount = nullptr;
   delete mEstimateIsExact;
-  mEstimateIsExact = 0;
+  mEstimateIsExact = nullptr;
   delete mResultElements;
-  mResultElements = 0;
+  mResultElements = nullptr;
   delete mSearchQuery;
-  mSearchQuery = 0;
+  mSearchQuery = nullptr;
   delete mStartIndex;
-  mStartIndex = 0;
+  mStartIndex = nullptr;
   delete mEndIndex;
-  mEndIndex = 0;
+  mEndIndex = nullptr;
   delete mSearchTips;
-  mSearchTips = 0;
+  mSearchTips = nullptr;
   delete mDirectoryCategories;
-  mDirectoryCategories = 0;
+  mDirectoryCategories = nullptr;
   delete mSearchTime;
-  mSearchTime = 0;
+  mSearchTime = nullptr;
 }
 
 
diff --git a/kode/kwsdl/tests/google/googlesearchservice.cpp b/kode/kwsdl/tests/google/googlesearchservice.cpp
index 095fe115c..a64119b49 100644
--- a/kode/kwsdl/tests/google/googlesearchservice.cpp
+++ b/kode/kwsdl/tests/google/googlesearchservice.cpp
@@ -196,11 +196,11 @@ GoogleSearchService::GoogleSearchService()
 GoogleSearchService::~GoogleSearchService()
 {
   delete mDoGetCachedPageTransport;
-  mDoGetCachedPageTransport = 0;
+  mDoGetCachedPageTransport = nullptr;
   delete mDoSpellingSuggestionTransport;
-  mDoSpellingSuggestionTransport = 0;
+  mDoSpellingSuggestionTransport = nullptr;
   delete mDoGoogleSearchTransport;
-  mDoGoogleSearchTransport = 0;
+  mDoGoogleSearchTransport = nullptr;
 }
 
 
diff --git a/kode/kwsdl/tests/google/resultelement.cpp b/kode/kwsdl/tests/google/resultelement.cpp
index f4e78a01f..591cfe00c 100644
--- a/kode/kwsdl/tests/google/resultelement.cpp
+++ b/kode/kwsdl/tests/google/resultelement.cpp
@@ -120,37 +120,37 @@ TQString*ResultElement::directoryTitle() const
 
 ResultElement::ResultElement()
 {
-  mSummary = 0;
-  mURL = 0;
-  mSnippet = 0;
-  mTitle = 0;
-  mCachedSize = 0;
-  mRelatedInformationPresent = 0;
-  mHostName = 0;
-  mDirectoryCategory = 0;
-  mDirectoryTitle = 0;
+  mSummary = nullptr;
+  mURL = nullptr;
+  mSnippet = nullptr;
+  mTitle = nullptr;
+  mCachedSize = nullptr;
+  mRelatedInformationPresent = nullptr;
+  mHostName = nullptr;
+  mDirectoryCategory = nullptr;
+  mDirectoryTitle = nullptr;
 }
 
 ResultElement::~ResultElement()
 {
   delete mSummary;
-  mSummary = 0;
+  mSummary = nullptr;
   delete mURL;
-  mURL = 0;
+  mURL = nullptr;
   delete mSnippet;
-  mSnippet = 0;
+  mSnippet = nullptr;
   delete mTitle;
-  mTitle = 0;
+  mTitle = nullptr;
   delete mCachedSize;
-  mCachedSize = 0;
+  mCachedSize = nullptr;
   delete mRelatedInformationPresent;
-  mRelatedInformationPresent = 0;
+  mRelatedInformationPresent = nullptr;
   delete mHostName;
-  mHostName = 0;
+  mHostName = nullptr;
   delete mDirectoryCategory;
-  mDirectoryCategory = 0;
+  mDirectoryCategory = nullptr;
   delete mDirectoryTitle;
-  mDirectoryTitle = 0;
+  mDirectoryTitle = nullptr;
 }
 
 
diff --git a/kode/kwsdl/tests/google/resultelementarray.cpp b/kode/kwsdl/tests/google/resultelementarray.cpp
index 210f57db4..232599496 100644
--- a/kode/kwsdl/tests/google/resultelementarray.cpp
+++ b/kode/kwsdl/tests/google/resultelementarray.cpp
@@ -40,13 +40,13 @@ TQPtrList<ResultElement>*ResultElementArray::items() const
 
 ResultElementArray::ResultElementArray()
 {
-  mItems = 0;
+  mItems = nullptr;
 }
 
 ResultElementArray::~ResultElementArray()
 {
   delete mItems;
-  mItems = 0;
+  mItems = nullptr;
 }
 
 
diff --git a/kode/kxml_compiler/kxml_compiler.cpp b/kode/kxml_compiler/kxml_compiler.cpp
index 66c0030d0..e31ef8e2c 100644
--- a/kode/kxml_compiler/kxml_compiler.cpp
+++ b/kode/kxml_compiler/kxml_compiler.cpp
@@ -46,12 +46,12 @@
 
 static const TDECmdLineOptions options[] =
 {
-  { "d", 0, 0 },
+  { "d", nullptr, nullptr },
   { "directory <dir>", I18N_NOOP("Directory to generate files in"), "." },
-  { "+dtd", I18N_NOOP("DTD of XML file"), 0 },
+  { "+dtd", I18N_NOOP("DTD of XML file"), nullptr },
   { "external-parser", I18N_NOOP("Generate parser in separate source file"),
-    0 },
-  { "custom-parser", I18N_NOOP("Generate parser customized for schema"), 0 },
+    nullptr },
+  { "custom-parser", I18N_NOOP("Generate parser customized for schema"), nullptr },
   TDECmdLineLastOption
 };
 
@@ -59,7 +59,7 @@ int main( int argc, char **argv )
 {
   TDEAboutData aboutData( "kxml_compiler", I18N_NOOP("TDE xml compiler"), "0.1",
   	I18N_NOOP("TDE XML Compiler") , TDEAboutData::License_LGPL );
-  aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" );
+  aboutData.addAuthor( "Cornelius Schumacher", nullptr, "schumacher@kde.org" );
 
   TDECmdLineArgs::init( argc, argv, &aboutData );
   TDECmdLineArgs::addCmdLineOptions( options );
diff --git a/kode/kxml_compiler/parser.cpp b/kode/kxml_compiler/parser.cpp
index 7a91411bd..025fb1bd8 100644
--- a/kode/kxml_compiler/parser.cpp
+++ b/kode/kxml_compiler/parser.cpp
@@ -85,7 +85,7 @@ Parser::Parser()
 
 Element *Parser::parse( const TQDomElement &docElement )
 {
-  Element *start = 0;
+  Element *start = nullptr;
 
   TQDomNode n1;
   for( n1 = docElement.firstChild(); !n1.isNull(); n1 = n1.nextSibling() ) {
diff --git a/konsolekalendar/konsolekalendarexports.h b/konsolekalendar/konsolekalendarexports.h
index 930426d48..769ef21c4 100644
--- a/konsolekalendar/konsolekalendarexports.h
+++ b/konsolekalendar/konsolekalendarexports.h
@@ -52,7 +52,7 @@ namespace KCal
      * Constructs a KonsoleKalendarChange object from command line arguments.
      * @param vars is a KonsoleKalendarVariable object with Event information.
      */
-    KonsoleKalendarExports( KonsoleKalendarVariables *vars = 0 );
+    KonsoleKalendarExports( KonsoleKalendarVariables *vars = nullptr );
     /**
      * Destructor
      */
diff --git a/konsolekalendar/main.cpp b/konsolekalendar/main.cpp
index 8135e5732..4f9644bbf 100644
--- a/konsolekalendar/main.cpp
+++ b/konsolekalendar/main.cpp
@@ -83,71 +83,71 @@ static const char progURL[] = "pim.kde.org/components/konsolekalendar.php";
 static TDECmdLineOptions options[] =
 {
   { "verbose",
-    I18N_NOOP( "Print helpful runtime messages" ), 0 },
+    I18N_NOOP( "Print helpful runtime messages" ), nullptr },
   { "dry-run",
-    I18N_NOOP( "Print what would have been done, but do not execute" ), 0 },
+    I18N_NOOP( "Print what would have been done, but do not execute" ), nullptr },
   { "file <calendar-file>",
-    I18N_NOOP( "Specify which calendar you want to use" ), 0 },
+    I18N_NOOP( "Specify which calendar you want to use" ), nullptr },
 
   { ":",
-    I18N_NOOP( "Incidence types (these options can be combined):" ), 0 },
+    I18N_NOOP( "Incidence types (these options can be combined):" ), nullptr },
   { "event",
-    I18N_NOOP( "  Operate for Events only (Default)" ), 0 },
+    I18N_NOOP( "  Operate for Events only (Default)" ), nullptr },
   { "todo",
-    I18N_NOOP( "  Operate for To-dos only [NOT WORKING YET]" ), 0 },
+    I18N_NOOP( "  Operate for To-dos only [NOT WORKING YET]" ), nullptr },
   { "journal",
-    I18N_NOOP( "  Operate for Journals only [NOT WORKING YET]" ), 0 },
+    I18N_NOOP( "  Operate for Journals only [NOT WORKING YET]" ), nullptr },
 
   { ":",
-    I18N_NOOP( "Major operation modes:" ), 0 },
+    I18N_NOOP( "Major operation modes:" ), nullptr },
   { "view",
-    I18N_NOOP( "  Print incidences in specified export format" ), 0 },
+    I18N_NOOP( "  Print incidences in specified export format" ), nullptr },
   { "add",
-    I18N_NOOP( "  Insert an incidence into the calendar" ), 0 },
+    I18N_NOOP( "  Insert an incidence into the calendar" ), nullptr },
   { "change",
-    I18N_NOOP( "  Modify an existing incidence" ), 0 },
+    I18N_NOOP( "  Modify an existing incidence" ), nullptr },
   { "delete",
-    I18N_NOOP( "  Remove an existing incidence" ), 0 },
+    I18N_NOOP( "  Remove an existing incidence" ), nullptr },
   { "create",
-    I18N_NOOP( "  Create new calendar file if one does not exist" ), 0 },
+    I18N_NOOP( "  Create new calendar file if one does not exist" ), nullptr },
   { "import <import-file>",
-    I18N_NOOP( "  Import this calendar to main calendar" ), 0 },
+    I18N_NOOP( "  Import this calendar to main calendar" ), nullptr },
   { ":",
-    I18N_NOOP( "Operation modifiers:" ), 0 },
+    I18N_NOOP( "Operation modifiers:" ), nullptr },
   { "all",
-    I18N_NOOP( "  View all calendar entries" ), 0 },
+    I18N_NOOP( "  View all calendar entries" ), nullptr },
   { "next",
-    I18N_NOOP( "  View next activity in calendar" ), 0 },
+    I18N_NOOP( "  View next activity in calendar" ), nullptr },
   { "show-next <days>",
-    I18N_NOOP( "  From start date show next # days' activities" ), 0 },
+    I18N_NOOP( "  From start date show next # days' activities" ), nullptr },
   { "uid <uid>",
-    I18N_NOOP( "  Incidence Unique-string identifier" ), 0 },
+    I18N_NOOP( "  Incidence Unique-string identifier" ), nullptr },
   { "date <start-date>",
-    I18N_NOOP( "  Start from this day [YYYY-MM-DD]" ), 0 },
+    I18N_NOOP( "  Start from this day [YYYY-MM-DD]" ), nullptr },
   { "time <start-time>",
-    I18N_NOOP( "  Start from this time [HH:MM:SS]" ), 0 },
+    I18N_NOOP( "  Start from this time [HH:MM:SS]" ), nullptr },
   { "end-date <end-date>",
-    I18N_NOOP( "  End at this day [YYYY-MM-DD]" ), 0 },
+    I18N_NOOP( "  End at this day [YYYY-MM-DD]" ), nullptr },
   { "end-time <end-time>",
-    I18N_NOOP( "  End at this time [HH:MM:SS]" ), 0 },
+    I18N_NOOP( "  End at this time [HH:MM:SS]" ), nullptr },
   { "epoch-start <epoch-time>",
-    I18N_NOOP( " Start from this time [secs since epoch]" ), 0 },
+    I18N_NOOP( " Start from this time [secs since epoch]" ), nullptr },
   { "epoch-end <epoch-time>",
-    I18N_NOOP( "  End at this time [secs since epoch]" ), 0 },
+    I18N_NOOP( "  End at this time [secs since epoch]" ), nullptr },
   { "summary <summary>",
-    I18N_NOOP( "  Add summary to incidence (for add/change modes)" ), 0 },
+    I18N_NOOP( "  Add summary to incidence (for add/change modes)" ), nullptr },
   { "description <description>",
-    I18N_NOOP( "Add description to incidence (for add/change modes)" ), 0 },
+    I18N_NOOP( "Add description to incidence (for add/change modes)" ), nullptr },
   { "location <location>",
-    I18N_NOOP( "  Add location to incidence (for add/change modes)" ), 0 },
+    I18N_NOOP( "  Add location to incidence (for add/change modes)" ), nullptr },
 
-  { ":", I18N_NOOP( "Export options:" ), 0 },
+  { ":", I18N_NOOP( "Export options:" ), nullptr },
   { "export-type <export-type>",
-    I18N_NOOP( "Export file type (Default: text)" ), 0 },
+    I18N_NOOP( "Export file type (Default: text)" ), nullptr },
   { "export-file <export-file>",
-    I18N_NOOP( "Export to file (Default: stdout)" ), 0 },
+    I18N_NOOP( "Export to file (Default: stdout)" ), nullptr },
   { "export-list",
-    I18N_NOOP( "  Print list of export types supported and exit" ), 0 },
+    I18N_NOOP( "  Print list of export types supported and exit" ), nullptr },
 
   { "",
     I18N_NOOP( "Examples:\n"
@@ -156,11 +156,11 @@ static TDECmdLineOptions options[] =
                "--time 10:00 --end-time 12:00 \\\n"
                "                  --summary \"Doctor Visit\" "
                "--description \"Get My Head Examined\"\n"
-               "  konsolekalendar --delete --uid KOrganizer-1740326.803" ), 0 },
+               "  konsolekalendar --delete --uid KOrganizer-1740326.803" ), nullptr },
 
   { "",
     I18N_NOOP( "For more information visit the program home page at:\n"
-               "  http://pim.kde.org/components/konsolekalendar.php" ), 0 },
+               "  http://pim.kde.org/components/konsolekalendar.php" ), nullptr },
 
   TDECmdLineLastOption
 };
@@ -174,7 +174,7 @@ int main( int argc, char *argv[] )
     I18N_NOOP( progDesc ),           // short porgram description
     TDEAboutData::License_GPL,         // license type
     "(c) 2002-2005, Tuukka Pasanen and Allen Winter", // copyright statement
-    0,                               // any free form text
+    nullptr,                               // any free form text
     progURL,                         // program home page address
     "bugs.trinitydesktop.org"                   // bug report email address
     );
@@ -183,13 +183,13 @@ int main( int argc, char *argv[] )
     "Tuukka Pasanen",                // developer's name
     I18N_NOOP( "Primary Author" ),   // task or role
     "illuusio@mailcity.com",         // email address
-    0                                // home page or relevant link
+    nullptr                                // home page or relevant link
     );
   aboutData.addAuthor(
     "Allen Winter",                  // developer's name
     I18N_NOOP( "Author" ),           // task or role
     "winter@kde.org",                // email address
-    0                                // home page or relevant link
+    nullptr                                // home page or relevant link
     );
 
   //TODO: KDE 4.0, add the StdCmdLineArgs option to init()
@@ -611,7 +611,7 @@ int main( int argc, char *argv[] )
               << "(" << option << ")"
               << endl;
 
-    epochstart = ( time_t ) option.toULong( 0, 10 );
+    epochstart = ( time_t ) option.toULong( nullptr, 10 );
   }
 
   /*
@@ -626,7 +626,7 @@ int main( int argc, char *argv[] )
               << "(" << option << ")"
               << endl;
 
-    epochend = ( time_t ) option.toULong( 0, 10 );
+    epochend = ( time_t ) option.toULong( nullptr, 10 );
   }
 
   if ( args->isSet( "all" ) ) {
diff --git a/konsolekalendar/stdcalendar.cpp b/konsolekalendar/stdcalendar.cpp
index 9225c0329..8efc496f8 100644
--- a/konsolekalendar/stdcalendar.cpp
+++ b/konsolekalendar/stdcalendar.cpp
@@ -72,7 +72,7 @@ StdCalendar::StdCalendar()
 void StdCalendar::addFileResource( const TQString &fileName,
                                    const TQString &resName )
 {
-  KCal::ResourceCalendar *resource = 0;
+  KCal::ResourceCalendar *resource = nullptr;
 
   if ( !fileName.isEmpty() ) {
     KURL url( fileName );
diff --git a/libemailfunctions/networkstatus.cpp b/libemailfunctions/networkstatus.cpp
index 878a564af..97176231c 100644
--- a/libemailfunctions/networkstatus.cpp
+++ b/libemailfunctions/networkstatus.cpp
@@ -30,10 +30,10 @@
 using namespace KPIM;
 
 static KStaticDeleter<NetworkStatus> networkStatusDeleter;
-NetworkStatus *NetworkStatus::mSelf = 0;
+NetworkStatus *NetworkStatus::mSelf = nullptr;
 
 NetworkStatus::NetworkStatus()
-  : TQObject( 0, "NetworkStatus" ), DCOPObject( "NetworkStatus" )
+  : TQObject( nullptr, "NetworkStatus" ), DCOPObject( "NetworkStatus" )
 {
   TDEConfigGroup group( TDEGlobal::config(), "NetworkStatus" );
   if ( group.readBoolEntry( "Online", true ) == true )
diff --git a/libtdepim/addresseelineedit.cpp b/libtdepim/addresseelineedit.cpp
index bf6eb4e43..f88d2cc20 100644
--- a/libtdepim/addresseelineedit.cpp
+++ b/libtdepim/addresseelineedit.cpp
@@ -61,23 +61,23 @@
 
 using namespace KPIM;
 
-KMailCompletion * AddresseeLineEdit::s_completion = 0L;
-KPIM::CompletionItemsMap* AddresseeLineEdit::s_completionItemMap = 0L;
-TQStringList* AddresseeLineEdit::s_completionSources = 0L;
+KMailCompletion * AddresseeLineEdit::s_completion = nullptr;
+KPIM::CompletionItemsMap* AddresseeLineEdit::s_completionItemMap = nullptr;
+TQStringList* AddresseeLineEdit::s_completionSources = nullptr;
 bool AddresseeLineEdit::s_addressesDirty = false;
-TQTimer* AddresseeLineEdit::s_LDAPTimer = 0L;
-KPIM::LdapSearch* AddresseeLineEdit::s_LDAPSearch = 0L;
-TQString* AddresseeLineEdit::s_LDAPText = 0L;
-AddresseeLineEdit* AddresseeLineEdit::s_LDAPLineEdit = 0L;
+TQTimer* AddresseeLineEdit::s_LDAPTimer = nullptr;
+KPIM::LdapSearch* AddresseeLineEdit::s_LDAPSearch = nullptr;
+TQString* AddresseeLineEdit::s_LDAPText = nullptr;
+AddresseeLineEdit* AddresseeLineEdit::s_LDAPLineEdit = nullptr;
 
 // The weights associated with the completion sources in s_completionSources.
 // Both are maintained by addCompletionSource(), don't attempt to modifiy those yourself.
-TQMap<TQString,int>* s_completionSourceWeights = 0;
+TQMap<TQString,int>* s_completionSourceWeights = nullptr;
 
 // maps LDAP client indices to completion source indices
 // the assumption that they are always the first n indices in s_completion
 // does not hold when clients are added later on
-TQMap<int, int>* AddresseeLineEdit::s_ldapClientToCompletionSourceMap = 0;
+TQMap<int, int>* AddresseeLineEdit::s_ldapClientToCompletionSourceMap = nullptr;
 
 static KStaticDeleter<KMailCompletion> completionDeleter;
 static KStaticDeleter<KPIM::CompletionItemsMap> completionItemsDeleter;
@@ -156,7 +156,7 @@ void AddresseeLineEdit::init()
 
   if ( m_useCompletion ) {
     if ( !s_LDAPTimer ) {
-      ldapTimerDeleter.setObject( s_LDAPTimer, new TQTimer( 0, "ldapTimerDeleter" ) );
+      ldapTimerDeleter.setObject( s_LDAPTimer, new TQTimer( nullptr, "ldapTimerDeleter" ) );
       ldapSearchDeleter.setObject( s_LDAPSearch, new KPIM::LdapSearch );
       ldapTextDeleter.setObject( s_LDAPText, new TQString );
     }
@@ -539,7 +539,7 @@ void AddresseeLineEdit::slotReturnPressed( const TQString& item )
 {
   Q_UNUSED( item );
   TQListBoxItem* i = completionBox()->selectedItem();
-  if ( i != 0 )
+  if (i)
     slotPopupCompletion( i->text() );
 }
 
@@ -765,7 +765,7 @@ void AddresseeLineEdit::addCompletionItem( const TQString& string, int weight, i
   } else {
     s_completionItemMap->insert( string, qMakePair( weight, completionItemSource ) );
   }
-  if ( keyWords == 0 )
+  if (!keyWords)
     s_completion->addItem( string, weight );
   else
     s_completion->addItemWithKeys( string, weight, keyWords );
@@ -870,9 +870,9 @@ void AddresseeLineEdit::setCompletedItems( const TQStringList& items, bool autoS
 
         // Try to re-select what was selected before, otherrwise use the first
         // item, if there is one
-        TQListBoxItem* item = 0;
+        TQListBoxItem* item = nullptr;
         if ( oldCurrentText.isEmpty()
-           || ( item = completionBox->findItem( oldCurrentText ) ) == 0 ) {
+           || ( item = completionBox->findItem( oldCurrentText ) ) == nullptr ) {
             item = completionBox->item( 1 );
         }
         if ( item )
@@ -919,7 +919,7 @@ TQPopupMenu* AddresseeLineEdit::createPopupMenu()
 {
   TQPopupMenu *menu = KLineEdit::createPopupMenu();
   if ( !menu )
-    return 0;
+    return nullptr;
 
   if ( m_useCompletion ){
     menu->setItemVisible( ShortAutoCompletion, false );
@@ -1143,7 +1143,7 @@ bool KPIM::AddresseeLineEdit::eventFilter(TQObject *obj, TQEvent *e)
                 ( ke->key() == Key_Tab || ke->key() == Key_Backtab ) ) {
       //kdDebug() << "EVENTFILTER: Key_Tab. currentIndex=" << currentIndex << endl;
       /// first, find the header of the current section
-      TQListBoxItem *myHeader = 0;
+      TQListBoxItem *myHeader = nullptr;
       const int iterationstep = ke->key() == Key_Tab ?  1 : -1;
       int i = TQMIN( TQMAX( currentIndex - iterationstep, 0 ), completionBox()->count() - 1 );
       while ( i>=0 ) {
@@ -1156,7 +1156,7 @@ bool KPIM::AddresseeLineEdit::eventFilter(TQObject *obj, TQEvent *e)
       Q_ASSERT( myHeader ); // we should always be able to find a header
 
       // find the next header (searching backwards, for Key_Backtab)
-      TQListBoxItem *nextHeader = 0;
+      TQListBoxItem *nextHeader = nullptr;
       // when iterating forward, start at the currentindex, when backwards,
       // one up from our header, or at the end
       uint j;
diff --git a/libtdepim/addresseelineedit.h b/libtdepim/addresseelineedit.h
index 7bad4c7e0..9d026f665 100644
--- a/libtdepim/addresseelineedit.h
+++ b/libtdepim/addresseelineedit.h
@@ -58,7 +58,7 @@ class TDE_EXPORT AddresseeLineEdit : public ClickLineEdit, public DCOPObject
 
   public:
     AddresseeLineEdit( TQWidget* parent, bool useCompletion = true,
-                     const char *name = 0L);
+                     const char *name = nullptr);
     virtual ~AddresseeLineEdit();
 
     virtual void setFont( const TQFont& );
@@ -132,7 +132,7 @@ class TDE_EXPORT AddresseeLineEdit : public ClickLineEdit, public DCOPObject
     void updateLDAPWeights();
 
     void setCompletedItems( const TQStringList& items, bool autoSuggest );
-    void addCompletionItem( const TQString& string, int weight, int source, const TQStringList * keyWords=0 );
+    void addCompletionItem( const TQString& string, int weight, int source, const TQStringList * keyWords=nullptr );
     TQString completionSearchText( TQString& );
     const TQStringList getAdjustedCompletionItems( bool fullSearch );
     void updateSearchString();
diff --git a/libtdepim/addresseeselector.cpp b/libtdepim/addresseeselector.cpp
index b89184e6b..cc7b16c29 100644
--- a/libtdepim/addresseeselector.cpp
+++ b/libtdepim/addresseeselector.cpp
@@ -136,7 +136,7 @@ bool AddresseeSelector::AddressBookManager::contains( uint index, const Selectio
 
 
 SelectionItem::SelectionItem( const TDEABC::Addressee &addressee, uint index )
-  : mAddressee( addressee ), mDistributionList( 0 ), mIndex( index )
+  : mAddressee( addressee ), mDistributionList( nullptr ), mIndex( index )
 {
   mField.fill( false, 10 );
 }
@@ -148,7 +148,7 @@ SelectionItem::SelectionItem( TDEABC::DistributionList *list, uint index )
 }
 
 SelectionItem::SelectionItem()
-  : mDistributionList( 0 ), mIndex( 0 )
+  : mDistributionList( nullptr ), mIndex( 0 )
 {
   mField.fill( false, 10 );
 }
@@ -191,7 +191,7 @@ class SelectionViewItem : public TQListViewItem
                        SelectionItem *item )
       : TQListViewItem( parent, "" ), mSelection( selection ), mItem( item )
     {
-      if ( mItem->distributionList() == 0 )
+      if (!mItem->distributionList())
         mIcon = mSelection->itemIcon( mItem->addressee(), mItem->index() );
       else
         mIcon = mSelection->distributionListIcon( mItem->distributionList() );
@@ -200,7 +200,7 @@ class SelectionViewItem : public TQListViewItem
     TQString text( int column ) const
     {
       if ( column == 0 ) {
-        if ( mItem->distributionList() == 0 )
+        if (!mItem->distributionList())
           return mSelection->itemText( mItem->addressee(), mItem->index() );
         else
           return mSelection->distributionListText( mItem->distributionList() );
@@ -213,7 +213,7 @@ class SelectionViewItem : public TQListViewItem
       if ( column == 0 ) {
         return &mIcon;
       } else
-        return 0;
+        return nullptr;
     }
 
     SelectionItem* item() const { return mItem; }
@@ -225,7 +225,7 @@ class SelectionViewItem : public TQListViewItem
 };
 
 AddresseeSelector::AddresseeSelector( Selection *selection, TQWidget *parent, const char *name )
-  : TQWidget( parent, name ), mSelection( selection ), mManager( 0 )
+  : TQWidget( parent, name ), mSelection( selection ), mManager( nullptr )
 {
   mMoveMapper = new TQSignalMapper( this );
   mRemoveMapper = new TQSignalMapper( this );
@@ -242,10 +242,10 @@ AddresseeSelector::AddresseeSelector( Selection *selection, TQWidget *parent, co
 AddresseeSelector::~AddresseeSelector()
 {
   delete mManager;
-  mManager = 0;
+  mManager = nullptr;
 
   delete mAddressBookManager;
-  mAddressBookManager = 0;
+  mAddressBookManager = nullptr;
 }
 
 void AddresseeSelector::init()
@@ -345,7 +345,7 @@ void AddresseeSelector::finish()
   for ( uint field = 0; field < mSelection->fieldCount(); ++field ) {
     for ( it = mSelectionItems.begin(); it != mSelectionItems.end(); ++it ) {
       if ( (*it).isInField( field ) ) {
-        if ( (*it).distributionList() == 0 )
+        if (!(*it).distributionList())
           mSelection->addSelectedAddressees( field, (*it).addressee(), (*it).index() );
         else
           mSelection->addSelectedDistributionList( field, (*it).distributionList() );
@@ -363,7 +363,7 @@ void AddresseeSelector::updateAddresseeView()
   SelectionItem::List::Iterator it;
   for ( it = mSelectionItems.begin(); it != mSelectionItems.end(); ++it ) {
     if ( mAddressBookManager->contains( addressBookIndex, *it ) ) {
-      if ( (*it).distributionList() == 0 ) {
+      if (!(*it).distributionList()) {
         if ( mAddresseeFilter->text().isEmpty() ||
              mSelection->itemMatches( (*it).addressee(), (*it).index(),
                                       mAddresseeFilter->text() ) )
@@ -482,7 +482,7 @@ void AddresseeSelector::reloadAddressBook()
     }
 
     // we don't save distribution lists, since this leads to crashes
-    if ( isSelected && (*itemIt).distributionList() == 0 ) {
+    if (isSelected && !(*itemIt).distributionList()) {
       selectedItems.append( *itemIt );
     }
   }
diff --git a/libtdepim/addresseeselector.h b/libtdepim/addresseeselector.h
index 83b8ad51f..8c02e2a76 100644
--- a/libtdepim/addresseeselector.h
+++ b/libtdepim/addresseeselector.h
@@ -170,7 +170,7 @@ class TDE_EXPORT AddresseeSelector : public TQWidget
 
   public:
     AddresseeSelector( Selection *selection,
-                       TQWidget *parent, const char *name = 0 );
+                       TQWidget *parent, const char *name = nullptr );
     ~AddresseeSelector();
 
     /**
@@ -220,7 +220,7 @@ class TDE_EXPORT AddresseeSelectorDialog : public KDialogBase
 
   public:
     AddresseeSelectorDialog( Selection *selection,
-                             TQWidget *parent = 0, const char *name = 0 );
+                             TQWidget *parent = nullptr, const char *name = nullptr );
 
   protected slots:
     void accept();
diff --git a/libtdepim/addresseeview.cpp b/libtdepim/addresseeview.cpp
index a87249915..32674ec86 100644
--- a/libtdepim/addresseeview.cpp
+++ b/libtdepim/addresseeview.cpp
@@ -52,7 +52,7 @@ using namespace KPIM;
 
 AddresseeView::AddresseeView( TQWidget *parent, const char *name,
                               TDEConfig *config )
-  : KTextBrowser( parent, name ), mDefaultConfig( false ), mImageJob( 0 ),
+  : KTextBrowser( parent, name ), mDefaultConfig( false ), mImageJob( nullptr ),
     mLinkMask( AddressLinks | EmailLinks | PhoneLinks | URLLinks | IMLinks | CustomFields )
 {
   setWrapPolicy( TQTextEdit::AtWordBoundary );
@@ -116,7 +116,7 @@ AddresseeView::~AddresseeView()
 {
   if ( mDefaultConfig )
     delete mConfig;
-  mConfig = 0;
+  mConfig = nullptr;
 
   delete mActionShowBirthday;
   delete mActionShowAddresses;
@@ -126,7 +126,7 @@ AddresseeView::~AddresseeView()
   delete mActionShowIMAddresses;
   delete mActionShowCustomFields;
 
-  mKIMProxy = 0;
+  mKIMProxy = nullptr;
 }
 
 void AddresseeView::setAddressee( const TDEABC::Addressee& addr )
@@ -135,7 +135,7 @@ void AddresseeView::setAddressee( const TDEABC::Addressee& addr )
 
   if ( mImageJob ) {
     mImageJob->kill();
-    mImageJob = 0;
+    mImageJob = nullptr;
   }
 
   mImageData.truncate( 0 );
@@ -502,7 +502,7 @@ void AddresseeView::updateView()
 
   if ( mImageJob ) {
     mImageJob->kill();
-    mImageJob = 0;
+    mImageJob = nullptr;
 
     mImageData.truncate( 0 );
   }
@@ -743,7 +743,7 @@ void AddresseeView::data( TDEIO::Job*, const TQByteArray &d )
 
 void AddresseeView::result( TDEIO::Job *job )
 {
-  mImageJob = 0;
+  mImageJob = nullptr;
 
   if ( job->error() )
     mImageData.truncate( 0 );
diff --git a/libtdepim/addresseeview.h b/libtdepim/addresseeview.h
index 13230c11f..f47797810 100644
--- a/libtdepim/addresseeview.h
+++ b/libtdepim/addresseeview.h
@@ -51,8 +51,8 @@ class TDE_EXPORT AddresseeView : public KTextBrowser
       @param config The config object where the settings are stored
                     which fields will be shown.
      */
-    AddresseeView( TQWidget *parent = 0, const char *name = 0,
-                   TDEConfig *config = 0 );
+    AddresseeView( TQWidget *parent = nullptr, const char *name = nullptr,
+                   TDEConfig *config = nullptr );
 
     ~AddresseeView();
 
diff --git a/libtdepim/addressesdialog.cpp b/libtdepim/addressesdialog.cpp
index cec329d81..48eec425d 100644
--- a/libtdepim/addressesdialog.cpp
+++ b/libtdepim/addressesdialog.cpp
@@ -68,9 +68,9 @@ struct AddresseeViewItem::AddresseeViewItemPrivate {
 
 struct AddressesDialog::AddressesDialogPrivate {
   AddressesDialogPrivate() :
-    ui(0), personal(0), recent(0),
-    toItem(0), ccItem(0), bccItem(0),
-    ldapSearchDialog(0)
+    ui(nullptr), personal(nullptr), recent(nullptr),
+    toItem(nullptr), ccItem(nullptr), bccItem(nullptr),
+    ldapSearchDialog(nullptr)
   {}
 
   AddressPickerUI             *ui;
@@ -93,7 +93,7 @@ struct AddressesDialog::AddressesDialogPrivate {
 
 AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const TDEABC::Addressee& addr,
                                       int emailIndex )
-  : TQObject( 0 ), TDEListViewItem( parent, addr.realName(),
+  : TQObject( nullptr ), TDEListViewItem( parent, addr.realName(),
                                ( emailIndex == 0 ? addr.preferredEmail() : addr.emails()[ emailIndex ] ) )
 {
   d = new AddresseeViewItemPrivate;
@@ -114,7 +114,7 @@ AddresseeViewItem::AddresseeViewItem( AddresseeViewItem *parent, const TDEABC::A
 }
 
 AddresseeViewItem::AddresseeViewItem( TDEListView *lv, const TQString& name, Category cat )
-  : TQObject(0), TDEListViewItem( lv, name )
+  : TQObject(nullptr), TDEListViewItem( lv, name )
 {
   d = new AddresseeViewItemPrivate;
   d->category = cat;
@@ -122,7 +122,7 @@ AddresseeViewItem::AddresseeViewItem( TDEListView *lv, const TQString& name, Cat
 
 AddresseeViewItem::AddresseeViewItem(  AddresseeViewItem *parent, const TQString& name,
                                        const TDEABC::Addressee::List &lst )
-  : TQObject(0), TDEListViewItem( parent, name, i18n("<group>") )
+  : TQObject(nullptr), TDEListViewItem( parent, name, i18n("<group>") )
 {
   d = new AddresseeViewItemPrivate;
   d->category = FilledGroup;
@@ -130,7 +130,7 @@ AddresseeViewItem::AddresseeViewItem(  AddresseeViewItem *parent, const TQString
 }
 
 AddresseeViewItem::AddresseeViewItem(  AddresseeViewItem *parent, const TQString& name )
-  : TQObject(0), TDEListViewItem( parent, name, i18n("<group>") )
+  : TQObject(nullptr), TDEListViewItem( parent, name, i18n("<group>") )
 {
   d = new AddresseeViewItemPrivate;
   d->category = DistList;
@@ -141,7 +141,7 @@ AddresseeViewItem::AddresseeViewItem(  AddresseeViewItem *parent, const TQString
 AddresseeViewItem::~AddresseeViewItem()
 {
   delete d;
-  d = 0;
+  d = nullptr;
 }
 
 TDEABC::Addressee
@@ -233,7 +233,7 @@ AddressesDialog::AddressesDialog( TQWidget *widget, const char *name )
 AddressesDialog::~AddressesDialog()
 {
   delete d;
-  d = 0;
+  d = nullptr;
 }
 
 AddresseeViewItem* AddressesDialog::selectedToItem()
@@ -475,10 +475,10 @@ AddressesDialog::updateAvailableAddressees()
     addAddresseeToAvailable( *it, d->personal );
   }
 
-  d->recent = 0;
+  d->recent = nullptr;
   updateRecentAddresses();
 
-  d->topdist = 0;
+  d->topdist = nullptr;
   addDistributionLists();
   if ( d->personal->childCount() > 0 ) {
     d->personal->setOpen( true );
@@ -491,7 +491,7 @@ AddressesDialog::updateAvailableAddressees()
 void AddressesDialog::checkForSingleAvailableGroup()
 {
   TQListViewItem* item = d->ui->mAvailableView->firstChild();
-  TQListViewItem* firstGroup = 0;
+  TQListViewItem* firstGroup = nullptr;
   int found = 0;
   while (item)
   {
@@ -678,12 +678,12 @@ AddressesDialog::addAddresseesToSelected( AddresseeViewItem *parent,
     AddresseeViewItem* address = itr.current();
     ++itr;
 
-    if (selectedToAvailableMapping.find(address) != 0)
+    if (selectedToAvailableMapping.find(address))
     {
       continue;
     }
 
-    AddresseeViewItem* newItem = 0;
+    AddresseeViewItem* newItem = nullptr;
     if (address->category() == AddresseeViewItem::Entry)
     {
       newItem = new AddresseeViewItem( parent, address->addressee() );
@@ -736,7 +736,7 @@ AddressesDialog::addSelectedTo()
     d->toItem->setVisible( true );
   } else {
     delete d->toItem;
-    d->toItem = 0;
+    d->toItem = nullptr;
   }
 }
 
@@ -757,7 +757,7 @@ AddressesDialog::addSelectedCC()
     d->ccItem->setVisible( true );
   } else {
     delete d->ccItem;
-    d->ccItem = 0;
+    d->ccItem = nullptr;
   }
 }
 
@@ -778,7 +778,7 @@ AddressesDialog::addSelectedBCC()
     d->bccItem->setVisible( true );
   } else {
     delete d->bccItem;
-    d->bccItem = 0;
+    d->bccItem = nullptr;
   }
 }
 
@@ -827,27 +827,27 @@ AddressesDialog::removeEntry()
   lst.setAutoDelete( true );
   lst.clear();
   if ( resetTo )
-    d->toItem  = 0;
+    d->toItem  = nullptr;
   else if ( d->toItem && d->toItem->childCount() == 0 )
   {
     delete d->toItem;
-    d->toItem = 0;
+    d->toItem = nullptr;
   }
   if ( resetCC )
-    d->ccItem = 0;
+    d->ccItem = nullptr;
   else if ( d->ccItem && d->ccItem->childCount() == 0 )
   {
     delete d->ccItem;
-    d->ccItem = 0;
+    d->ccItem = nullptr;
   }
   if ( resetBCC )
-    d->bccItem  = 0;
+    d->bccItem  = nullptr;
   else if ( d->bccItem && d->bccItem->childCount() == 0 )
   {
     delete d->bccItem;
-    d->bccItem = 0;
+    d->bccItem = nullptr;
   }
-  d->ui->mSaveAs->setEnabled(d->ui->mSelectedView->firstChild() != 0);
+  d->ui->mSaveAs->setEnabled(d->ui->mSelectedView->firstChild() != nullptr);
 }
 
 #ifdef TDEPIM_NEW_DISTRLISTS
@@ -861,7 +861,7 @@ static TDEABC::Resource *requestResource( TDEABC::AddressBook* abook, TQWidget *
   TQPtrList<KRES::Resource> kresResources;
   TQPtrListIterator<TDEABC::Resource> resIt( tdeabcResources );
   TDEABC::Resource *resource;
-  while ( ( resource = resIt.current() ) != 0 ) {
+  while ((resource = resIt.current()) != nullptr) {
     ++resIt;
     if ( !resource->readOnly() ) {
       KRES::Resource *res = static_cast<KRES::Resource*>( resource );
@@ -884,7 +884,7 @@ AddressesDialog::saveAs()
 #endif
 
   if ( !d->ui->mSelectedView->firstChild() ) {
-    KMessageBox::information( 0,
+    KMessageBox::information( nullptr,
                               i18n("There are no addresses in your list. "
                                    "First add some addresses from your address book, "
                                    "then try again.") );
@@ -909,7 +909,7 @@ AddressesDialog::saveAs()
 #endif
 
   if ( alreadyExists ) {
-    KMessageBox::information( 0,
+    KMessageBox::information( nullptr,
                               i18n( "<qt>Distribution list with the given name <b>%1</b> "
                                     "already exists. Please select a different name.</qt>" )
                               .arg( name ) );
diff --git a/libtdepim/addressesdialog.h b/libtdepim/addressesdialog.h
index 152938ab7..cea0f7a85 100644
--- a/libtdepim/addressesdialog.h
+++ b/libtdepim/addressesdialog.h
@@ -81,7 +81,7 @@ namespace KPIM {
     TQ_OBJECT
   
   public:
-    AddressesDialog( TQWidget *widget=0, const char *name=0 );
+    AddressesDialog( TQWidget *widget=nullptr, const char *name=nullptr );
     ~AddressesDialog();
 
     /**
@@ -191,9 +191,9 @@ namespace KPIM {
     void initConnections();
     void addDistributionLists();
     void addAddresseeToAvailable( const TDEABC::Addressee& addr,
-                                  AddresseeViewItem* defaultParent=0, bool useCategory=true );
+                                  AddresseeViewItem* defaultParent=nullptr, bool useCategory=true );
     void addAddresseeToSelected( const TDEABC::Addressee& addr,
-                                 AddresseeViewItem* defaultParent=0 );
+                                 AddresseeViewItem* defaultParent=nullptr );
     void addAddresseesToSelected( AddresseeViewItem *parent,
                                   const TQPtrList<AddresseeViewItem>& addresses );
     TQStringList entryToString( const TDEABC::Addressee::List& l ) const;
diff --git a/libtdepim/broadcaststatus.cpp b/libtdepim/broadcaststatus.cpp
index 905c46fab..eb40cef47 100644
--- a/libtdepim/broadcaststatus.cpp
+++ b/libtdepim/broadcaststatus.cpp
@@ -23,7 +23,7 @@
 #include "broadcaststatus.h"
 #include "progressmanager.h"
 
-KPIM::BroadcastStatus* KPIM::BroadcastStatus::instance_ = 0;
+KPIM::BroadcastStatus* KPIM::BroadcastStatus::instance_ = nullptr;
 static KStaticDeleter<KPIM::BroadcastStatus> broadcasStatusDeleter;
 
 namespace KPIM {
@@ -43,7 +43,7 @@ BroadcastStatus::BroadcastStatus()
 
 BroadcastStatus::~BroadcastStatus()
 {
-  instance_ = 0;
+  instance_ = nullptr;
 }
 
 void BroadcastStatus::setStatusMsg( const TQString& message )
diff --git a/libtdepim/broadcaststatus.h b/libtdepim/broadcaststatus.h
index 7c93bc5b3..e23f559d5 100644
--- a/libtdepim/broadcaststatus.h
+++ b/libtdepim/broadcaststatus.h
@@ -51,14 +51,14 @@ public:
                                           int numBytesRead = -1,
                                           int numBytesToRead = -1,
                                           bool mLeaveOnServer = false,
-                                          KPIM::ProgressItem* progressItem = 0 ); // set the same status in this progress item
+                                          KPIM::ProgressItem* progressItem = nullptr ); // set the same status in this progress item
   void setStatusMsgTransmissionCompleted( const TQString& account,
                                           int numMessages,
                                           int numBytes = -1,
                                           int numBytesRead = -1,
                                           int numBytesToRead = -1,
                                           bool mLeaveOnServer = false,
-                                          KPIM::ProgressItem* progressItem = 0 ); // set the same status in this progress item
+                                          KPIM::ProgressItem* progressItem = nullptr ); // set the same status in this progress item
 
 public slots:
   /** Emit an update status bar signal. It's a slot so it can be hooked up
diff --git a/libtdepim/categoryeditdialog.h b/libtdepim/categoryeditdialog.h
index 4b81f552b..31ac198eb 100644
--- a/libtdepim/categoryeditdialog.h
+++ b/libtdepim/categoryeditdialog.h
@@ -34,8 +34,8 @@ class TDE_EXPORT CategoryEditDialog : public KDialogBase
     TQ_OBJECT
   
   public:
-    CategoryEditDialog( KPimPrefs *prefs, TQWidget* parent = 0,
-                        const char* name = 0,
+    CategoryEditDialog( KPimPrefs *prefs, TQWidget* parent = nullptr,
+                        const char* name = nullptr,
                         bool modal = false );
     ~CategoryEditDialog();
 
diff --git a/libtdepim/categoryselectdialog.h b/libtdepim/categoryselectdialog.h
index 38e05064b..f471a7a8b 100644
--- a/libtdepim/categoryselectdialog.h
+++ b/libtdepim/categoryselectdialog.h
@@ -35,8 +35,8 @@ class TDE_EXPORT CategorySelectDialog : public KDialogBase
     TQ_OBJECT
   
   public:
-    CategorySelectDialog( KPimPrefs *prefs, TQWidget *parent = 0,
-                          const char *name = 0, bool modal = false );
+    CategorySelectDialog( KPimPrefs *prefs, TQWidget *parent = nullptr,
+                          const char *name = nullptr, bool modal = false );
     ~CategorySelectDialog();
 
     /**
diff --git a/libtdepim/clicklineedit.h b/libtdepim/clicklineedit.h
index 25ad3e3a7..5e375eda2 100644
--- a/libtdepim/clicklineedit.h
+++ b/libtdepim/clicklineedit.h
@@ -39,7 +39,7 @@ class TDE_EXPORT ClickLineEdit : public KLineEdit
   
   TQ_PROPERTY( TQString clickMessage READ clickMessage WRITE setClickMessage )
   public:
-    ClickLineEdit( TQWidget *parent, const TQString &msg = TQString(), const char* name = 0 );
+    ClickLineEdit( TQWidget *parent, const TQString &msg = TQString(), const char* name = nullptr );
     ~ClickLineEdit();
 
     void setClickMessage( const TQString &msg );
diff --git a/libtdepim/collectingprocess.cpp b/libtdepim/collectingprocess.cpp
index da6654644..4c41c967b 100644
--- a/libtdepim/collectingprocess.cpp
+++ b/libtdepim/collectingprocess.cpp
@@ -56,7 +56,7 @@ CollectingProcess::CollectingProcess( TQObject * parent, const char * name )
 }
 
 CollectingProcess::~CollectingProcess() {
-  delete d; d = 0;
+  delete d; d = nullptr;
 }
 
 bool CollectingProcess::start( RunMode runmode, Communication comm ) {
diff --git a/libtdepim/collectingprocess.h b/libtdepim/collectingprocess.h
index 9a1b81bde..ae1ad8d84 100644
--- a/libtdepim/collectingprocess.h
+++ b/libtdepim/collectingprocess.h
@@ -50,7 +50,7 @@ class TDE_EXPORT CollectingProcess : public TDEProcess {
   TQ_OBJECT
   
 public:
-  CollectingProcess( TQObject * parent = 0, const char * name = 0 );
+  CollectingProcess( TQObject * parent = nullptr, const char * name = nullptr );
   ~CollectingProcess();
 
   /** Starts the process in NotifyOnExit mode and writes in to stdin of
diff --git a/libtdepim/completionordereditor.h b/libtdepim/completionordereditor.h
index e4485a814..952eece5d 100644
--- a/libtdepim/completionordereditor.h
+++ b/libtdepim/completionordereditor.h
@@ -66,7 +66,7 @@ class CompletionOrderEditor : public KDialogBase {
   
 
 public:
-  CompletionOrderEditor( KPIM::LdapSearch* ldapSearch, TQWidget* parent, const char* name = 0 );
+  CompletionOrderEditor( KPIM::LdapSearch* ldapSearch, TQWidget* parent, const char* name = nullptr );
   ~CompletionOrderEditor();
 
   TDEConfig* configFile() { return &mConfig; }
diff --git a/libtdepim/configmanager.h b/libtdepim/configmanager.h
index 274dc9cff..e01420636 100644
--- a/libtdepim/configmanager.h
+++ b/libtdepim/configmanager.h
@@ -46,7 +46,7 @@ signals:
   void changed();
 
 protected:
-  ConfigManager( TQObject * parent=0, const char * name=0 );
+  ConfigManager( TQObject * parent=nullptr, const char * name=nullptr );
   virtual ~ConfigManager();
 };
 
diff --git a/libtdepim/designerfields.cpp b/libtdepim/designerfields.cpp
index 332885490..f972c8646 100644
--- a/libtdepim/designerfields.cpp
+++ b/libtdepim/designerfields.cpp
@@ -52,7 +52,7 @@ void DesignerFields::initGUI( const TQString &uiFile )
 {
   TQVBoxLayout *layout = new TQVBoxLayout( this );
 
-  TQWidget *wdg = TQWidgetFactory::create( uiFile, 0, this );
+  TQWidget *wdg = TQWidgetFactory::create( uiFile, nullptr, this );
   if ( !wdg ) {
     kdError() << "No ui file found" << endl;
     return;
diff --git a/libtdepim/designerfields.h b/libtdepim/designerfields.h
index c4a23b72b..c17a66549 100644
--- a/libtdepim/designerfields.h
+++ b/libtdepim/designerfields.h
@@ -38,7 +38,7 @@ class TDE_EXPORT DesignerFields : public TQWidget
   
   public:
     DesignerFields( const TQString &uiFile, TQWidget *parent,
-      const char *name = 0 );
+      const char *name = nullptr );
 
     class Storage
     {
diff --git a/libtdepim/embeddedurlpage.cpp b/libtdepim/embeddedurlpage.cpp
index 4a3aed79b..83f370a23 100644
--- a/libtdepim/embeddedurlpage.cpp
+++ b/libtdepim/embeddedurlpage.cpp
@@ -34,7 +34,7 @@ using namespace KPIM;
 
 EmbeddedURLPage::EmbeddedURLPage( const TQString &url, const TQString &mimetype,
                                   TQWidget *parent, const char *name )
-  : TQWidget( parent, name ), mUri(url), mMimeType( mimetype ), mPart( 0 )
+  : TQWidget( parent, name ), mUri(url), mMimeType( mimetype ), mPart( nullptr )
 {
   initGUI( url, mimetype );
 }
@@ -55,7 +55,7 @@ void EmbeddedURLPage::loadContents()
     if ( mimetype == "auto" )
         mimetype == KMimeType::findByURL( mUri )->name();
     // "this" is both the parent widget and the parent object
-    mPart = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, TQString(), this, 0, this, 0 );
+    mPart = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, TQString(), this, nullptr, this, nullptr );
     if ( mPart ) {
         mPart->openURL( mUri );
         mPart->widget()->show();
diff --git a/libtdepim/embeddedurlpage.h b/libtdepim/embeddedurlpage.h
index 14a9cffd2..b6dba6e93 100644
--- a/libtdepim/embeddedurlpage.h
+++ b/libtdepim/embeddedurlpage.h
@@ -35,7 +35,7 @@ class TDE_EXPORT EmbeddedURLPage : public TQWidget
   
   public:
     EmbeddedURLPage( const TQString &url, const TQString &mimetype,
-                     TQWidget *parent, const char *name = 0 );
+                     TQWidget *parent, const char *name = nullptr );
 
   public slots:
     void loadContents();
diff --git a/libtdepim/infoextension.cpp b/libtdepim/infoextension.cpp
index 80f53010d..1662c5b6d 100644
--- a/libtdepim/infoextension.cpp
+++ b/libtdepim/infoextension.cpp
@@ -27,7 +27,7 @@
 using namespace KParts;
 
 InfoExtension::InfoExtension( KParts::ReadOnlyPart *parent, const char* name)
-: TQObject(parent, name), d(0)
+: TQObject(parent, name), d(nullptr)
 {
 }
 
diff --git a/libtdepim/kaddrbook.cpp b/libtdepim/kaddrbook.cpp
index 2752f95e4..e11837de8 100644
--- a/libtdepim/kaddrbook.cpp
+++ b/libtdepim/kaddrbook.cpp
@@ -155,7 +155,7 @@ void KAddrBookExternal::addEmail( const TQString& addr, TQWidget *parent) {
     KMessageBox::information( parent, text, TQString(),
                               "alreadyInAddressBook" );
   }
-  ab->setErrorHandler( 0 );
+  ab->setErrorHandler( nullptr );
 }
 
 void KAddrBookExternal::openAddressBook(TQWidget *) {
@@ -196,7 +196,7 @@ bool KAddrBookExternal::addVCard( const TDEABC::Addressee& addressee, TQWidget *
     inserted = true;
   }
 
-  ab->setErrorHandler( 0 );
+  ab->setErrorHandler( nullptr );
   return inserted;
 }
 
@@ -267,7 +267,7 @@ TDEABC::Resource* KAddrBookExternal::selectResourceForSaving( TDEABC::AddressBoo
   TQPtrList<KRES::Resource> kresResources;
   TQPtrListIterator<TDEABC::Resource> resIt( tdeabcResources );
   TDEABC::Resource *tdeabcResource;
-  while ( ( tdeabcResource = resIt.current() ) != 0 ) {
+  while ((tdeabcResource = resIt.current()) != nullptr) {
     ++resIt;
     if ( !tdeabcResource->readOnly() ) {
       KRES::Resource *res = static_cast<KRES::Resource*>( tdeabcResource );
@@ -276,5 +276,5 @@ TDEABC::Resource* KAddrBookExternal::selectResourceForSaving( TDEABC::AddressBoo
     }
   }
 
-  return static_cast<TDEABC::Resource*>( KRES::SelectDialog::getResource( kresResources, 0 ) );
+  return static_cast<TDEABC::Resource*>( KRES::SelectDialog::getResource( kresResources, nullptr ) );
 }
diff --git a/libtdepim/kcmdesignerfields.cpp b/libtdepim/kcmdesignerfields.cpp
index 777565a19..8f76bddb9 100644
--- a/libtdepim/kcmdesignerfields.cpp
+++ b/libtdepim/kcmdesignerfields.cpp
@@ -62,7 +62,7 @@ class PageItem : public TQCheckListItem
     {
       mName = path.mid( path.findRev( '/' ) + 1 );
 
-      TQWidget *wdg = TQWidgetFactory::create( mPath, 0, 0 );
+      TQWidget *wdg = TQWidgetFactory::create( mPath, nullptr, nullptr );
       if ( wdg ) {
         setText( 0, wdg->caption() );
 
@@ -133,11 +133,11 @@ KCMDesignerFields::KCMDesignerFields( TQWidget *parent, const char *name )
   
   TDEAboutData *about = new TDEAboutData( I18N_NOOP( "KCMDesignerfields" ),
                                       I18N_NOOP( "TQt Designer Fields Dialog" ),
-                                      0, 0, TDEAboutData::License_LGPL,
+                                      nullptr, nullptr, TDEAboutData::License_LGPL,
                                       I18N_NOOP( "(c), 2004 Tobias Koenig" ) );
 
-  about->addAuthor( "Tobias Koenig", 0, "tokoe@kde.org" );
-  about->addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" );
+  about->addAuthor( "Tobias Koenig", nullptr, "tokoe@kde.org" );
+  about->addAuthor( "Cornelius Schumacher", nullptr, "schumacher@kde.org" );
   setAboutData( about );
 }
 
@@ -178,7 +178,7 @@ void KCMDesignerFields::deleteFile()
     if (KMessageBox::warningContinueCancel(this,
 	i18n( "<qt>Do you really want to delete '<b>%1</b>'?</qt>").arg( pageItem->text(0) ), "", KStdGuiItem::del() )
          == KMessageBox::Continue)
-      TDEIO::NetAccess::del( pageItem->path(), 0 );
+      TDEIO::NetAccess::del( pageItem->path(), nullptr );
   }
   // The actual view refresh will be done automagically by the slots connected to kdirwatch
 }
@@ -205,7 +205,7 @@ void KCMDesignerFields::loadUiFiles()
 void KCMDesignerFields::rebuildList()
 {
   TQStringList ai = saveActivePages();
-  updatePreview( 0 );
+  updatePreview( nullptr );
   mPageView->clear();
   loadUiFiles();
   loadActivePages(ai);
@@ -215,7 +215,7 @@ void KCMDesignerFields::loadActivePages(const TQStringList& ai)
 {
   TQListViewItemIterator it( mPageView );
   while ( it.current() ) {
-    if ( it.current()->parent() == 0 ) {
+    if (!it.current()->parent()) {
       PageItem *item = static_cast<PageItem*>( it.current() );
       if ( ai.find( item->name() ) != ai.end() ) {
         item->setOn( true );
@@ -239,7 +239,7 @@ TQStringList KCMDesignerFields::saveActivePages()
 
   TQStringList activePages;
   while ( it.current() ) {
-    if ( it.current()->parent() == 0 ) {
+    if (!it.current()->parent()) {
       PageItem *item = static_cast<PageItem*>( it.current() );
       activePages.append( item->name() );
     }
@@ -394,7 +394,7 @@ void KCMDesignerFields::updatePreview( TQListViewItem *item )
 
 void KCMDesignerFields::itemClicked( TQListViewItem *item )
 {
-  if ( !item || item->parent() != 0 )
+  if (!item || item->parent())
     return;
 
   PageItem *pageItem = static_cast<PageItem*>( item );
diff --git a/libtdepim/kcmdesignerfields.h b/libtdepim/kcmdesignerfields.h
index 3d1b8524f..e2a3ddad0 100644
--- a/libtdepim/kcmdesignerfields.h
+++ b/libtdepim/kcmdesignerfields.h
@@ -39,7 +39,7 @@ class TDE_EXPORT KCMDesignerFields : public TDECModule
   
 
   public:
-    KCMDesignerFields( TQWidget *parent = 0, const char *name = 0 );
+    KCMDesignerFields( TQWidget *parent = nullptr, const char *name = nullptr );
 
     virtual void load();
     virtual void save();
diff --git a/libtdepim/kdateedit.cpp b/libtdepim/kdateedit.cpp
index 0f50f75b3..e3753045f 100644
--- a/libtdepim/kdateedit.cpp
+++ b/libtdepim/kdateedit.cpp
@@ -37,7 +37,7 @@
 class DateValidator : public TQValidator
 {
   public:
-    DateValidator( const TQStringList &keywords, TQWidget* parent, const char* name = 0 )
+    DateValidator( const TQStringList &keywords, TQWidget* parent, const char* name = nullptr )
       : TQValidator( parent, name ), mKeywords( keywords )
     {}
 
@@ -104,7 +104,7 @@ KDateEdit::KDateEdit( TQWidget *parent, const char *name )
 KDateEdit::~KDateEdit()
 {
   delete mPopup;
-  mPopup = 0;
+  mPopup = nullptr;
 }
 
 void KDateEdit::setDate( const TQDate& date )
diff --git a/libtdepim/kdateedit.h b/libtdepim/kdateedit.h
index 41d955b23..1837452e3 100644
--- a/libtdepim/kdateedit.h
+++ b/libtdepim/kdateedit.h
@@ -57,7 +57,7 @@ class TDE_EXPORT KDateEdit : public TQComboBox
   
 
   public:
-    KDateEdit( TQWidget *parent = 0, const char *name = 0 );
+    KDateEdit( TQWidget *parent = nullptr, const char *name = nullptr );
     virtual ~KDateEdit();
 
     /**
@@ -134,7 +134,7 @@ class TDE_EXPORT KDateEdit : public TQComboBox
     void setupKeywords();
 
   private:
-    TQDate parseDate( bool* = 0 ) const;
+    TQDate parseDate( bool* = nullptr ) const;
     void updateView();
 
     KDatePickerPopup *mPopup;
diff --git a/libtdepim/kdatepickerpopup.h b/libtdepim/kdatepickerpopup.h
index c052c1fcb..f7ab2a45b 100644
--- a/libtdepim/kdatepickerpopup.h
+++ b/libtdepim/kdatepickerpopup.h
@@ -58,7 +58,7 @@ class TDE_EXPORT KDatePickerPopup: public TQPopupMenu
        @param name The object's name.
     */
     KDatePickerPopup( int items = DatePicker, const TQDate &date = TQDate::currentDate(),
-                      TQWidget *parent = 0, const char *name = 0 );
+                      TQWidget *parent = nullptr, const char *name = nullptr );
 
     /**
        @return A pointer to the private variable mDatePicker, an instance of
diff --git a/libtdepim/kfoldertree.h b/libtdepim/kfoldertree.h
index 6045e912f..c36131864 100644
--- a/libtdepim/kfoldertree.h
+++ b/libtdepim/kfoldertree.h
@@ -244,7 +244,7 @@ class TDE_EXPORT KFolderTree : public TDEListView
   
 
   public:
-    KFolderTree( TQWidget *parent, const char *name=0 );
+    KFolderTree( TQWidget *parent, const char *name=nullptr );
 
     /** registers MIMETypes that are handled
       @param mimeType the name of the MIMEType
diff --git a/libtdepim/kimportdialog.cpp b/libtdepim/kimportdialog.cpp
index 19468ff97..7901ed08e 100644
--- a/libtdepim/kimportdialog.cpp
+++ b/libtdepim/kimportdialog.cpp
@@ -316,7 +316,7 @@ void KImportDialog::readFile( int rows )
   TQTextStream inputStream(mFile, IO_ReadOnly);
   inputStream.setEncoding(TQTextStream::Locale);
 
-  KProgressDialog pDialog(this, 0, i18n("Loading Progress"),
+  KProgressDialog pDialog(this, nullptr, i18n("Loading Progress"),
                     i18n("Please wait while the file is loaded."), true);
   pDialog.setAllowCancel(true);
   pDialog.showCancelButton(true);
@@ -649,7 +649,7 @@ void KImportDialog::applyConverter()
 {
   kdDebug(5300) << "KImportDialog::applyConverter" << endl;
 
-  KProgressDialog pDialog(this, 0, i18n("Importing Progress"),
+  KProgressDialog pDialog(this, nullptr, i18n("Importing Progress"),
                     i18n("Please wait while the data is imported."), true);
   pDialog.setAllowCancel(true);
   pDialog.showCancelButton(true);
diff --git a/libtdepim/kincidencechooser.cpp b/libtdepim/kincidencechooser.cpp
index f11b03607..71348d98f 100644
--- a/libtdepim/kincidencechooser.cpp
+++ b/libtdepim/kincidencechooser.cpp
@@ -102,7 +102,7 @@ KIncidenceChooser::KIncidenceChooser(TQWidget *parent, char *name) :
     topLayout->addMultiCellWidget(mDiffBut, iii,iii,0,2);
     ++iii;
 #else
-    mDiffBut = 0;
+    mDiffBut = nullptr;
 #endif
     mBg = new TQButtonGroup ( 1,  TQt::Horizontal, i18n("Sync Preferences"), topFrame);
     topLayout->addMultiCellWidget(mBg, iii,iii,0,2);
@@ -113,10 +113,10 @@ KIncidenceChooser::KIncidenceChooser(TQWidget *parent, char *name) :
     mBg->insert( new TQRadioButton ( i18n("Ask for every entry on conflict"), mBg ),KIncidenceChooser::ask );
     mBg->insert( new TQRadioButton ( i18n("Take both on conflict"), mBg ), KIncidenceChooser::both );
     mBg->setButton ( chooseMode );
-    mTbL = 0;
-    mTbN =  0;
-    mDisplayDiff = 0;
-    mSelIncidence = 0;
+    mTbL = nullptr;
+    mTbN =  nullptr;
+    mDisplayDiff = nullptr;
+    mSelIncidence = nullptr;
     button = new TQPushButton( i18n("Apply This to All Conflicts of This Sync"), topFrame );
     connect ( button, TQ_SIGNAL( clicked()), this, TQ_SLOT ( setSyncMode() ) );
     topLayout->addMultiCellWidget(button, iii,iii,0,2);
@@ -148,11 +148,11 @@ KCal::Incidence* KIncidenceChooser::getIncidence( )
     else  if ( chooseMode == KIncidenceChooser::remote )
         retval = mInc2;
     else  if ( chooseMode == KIncidenceChooser::both ) {
-        retval = 0;
+        retval = nullptr;
     }
     else  if ( chooseMode == KIncidenceChooser::newest ) {
         if ( mInc1->lastModified() == mInc2->lastModified())
-            retval = 0;
+            retval = nullptr;
         if ( mInc1->lastModified() >  mInc2->lastModified() )
             retval =  mInc1;
         else
@@ -318,7 +318,7 @@ void KIncidenceChooser::takeIncidence2()
 void KIncidenceChooser::takeBoth()
 {
 
-    mSelIncidence = 0;
+    mSelIncidence = nullptr;
     TQDialog::accept();
 }
 
diff --git a/libtdepim/kincidencechooser.h b/libtdepim/kincidencechooser.h
index ceffc0b04..47864bad5 100644
--- a/libtdepim/kincidencechooser.h
+++ b/libtdepim/kincidencechooser.h
@@ -48,7 +48,7 @@ class TDE_EXPORT KIncidenceChooser : public KDialog
       local, remote, newest, ask, both
     };
     /** Initialize dialog and pages */
-    KIncidenceChooser( TQWidget *parent=0, char *name=0 );
+    KIncidenceChooser( TQWidget *parent=nullptr, char *name=nullptr );
     ~KIncidenceChooser();
     //void setChooseText( TQString );
     void setIncidence( KCal::Incidence *, KCal::Incidence  * );
diff --git a/libtdepim/kmailcompletion.cpp b/libtdepim/kmailcompletion.cpp
index 84640cb16..13262e7ea 100644
--- a/libtdepim/kmailcompletion.cpp
+++ b/libtdepim/kmailcompletion.cpp
@@ -74,7 +74,7 @@ TQString KMailCompletion::makeCompletion( const TQString &string )
 
 void KMailCompletion::addItemWithKeys( const TQString& email, int weight, const TQStringList*  keyWords)
 {
-  Q_ASSERT( keyWords != 0 );
+  Q_ASSERT(keyWords);
   for ( TQStringList::ConstIterator it( keyWords->begin() ); it != keyWords->end(); ++it ) {
     TQStringList &emailList = m_keyMap[ (*it) ];      //lookup email-list for given keyword
     if ( emailList.find( email ) == emailList.end() ) //add email if not there
@@ -85,7 +85,7 @@ void KMailCompletion::addItemWithKeys( const TQString& email, int weight, const
 
 void KMailCompletion::postProcessMatches( TQStringList * pMatches )const
 {
-  Q_ASSERT( pMatches != 0 );
+  Q_ASSERT(pMatches);
   if ( pMatches->isEmpty() )
     return;
 
diff --git a/libtdepim/komposer/core/attachment.cpp b/libtdepim/komposer/core/attachment.cpp
index 6d5017e91..d1517248d 100644
--- a/libtdepim/komposer/core/attachment.cpp
+++ b/libtdepim/komposer/core/attachment.cpp
@@ -57,7 +57,7 @@ Attachment::Attachment( const TQString &name,
 
 Attachment::~Attachment()
 {
-  delete d; d = 0;
+  delete d; d = nullptr;
 }
 
 TQString
diff --git a/libtdepim/komposer/core/core.cpp b/libtdepim/komposer/core/core.cpp
index 30236b09d..a686b155e 100644
--- a/libtdepim/komposer/core/core.cpp
+++ b/libtdepim/komposer/core/core.cpp
@@ -207,7 +207,7 @@ Core::slotQuit()
 void
 Core::slotPreferences()
 {
-  if ( m_dlg == 0 )
+  if (!m_dlg)
     m_dlg = new KSettings::Dialog( this );
   m_dlg->show();
 }
diff --git a/libtdepim/komposer/core/editor.cpp b/libtdepim/komposer/core/editor.cpp
index 83b11b0e8..148356912 100644
--- a/libtdepim/komposer/core/editor.cpp
+++ b/libtdepim/komposer/core/editor.cpp
@@ -36,7 +36,7 @@ Editor::Editor( TQObject *parent, const char *name, const TQStringList &args )
 
 Editor::~Editor()
 {
-  delete d; d = 0;
+  delete d; d = nullptr;
 }
 
 void
diff --git a/libtdepim/komposer/core/plugin.cpp b/libtdepim/komposer/core/plugin.cpp
index 133d203d5..3e604b96d 100644
--- a/libtdepim/komposer/core/plugin.cpp
+++ b/libtdepim/komposer/core/plugin.cpp
@@ -42,7 +42,7 @@ Plugin::Plugin( TQObject *parent, const char *name, const TQStringList & )
 
 Plugin::~Plugin()
 {
-  delete d; d = 0;
+  delete d; d = nullptr;
 }
 
 void
diff --git a/libtdepim/kpixmapregionselectordialog.h b/libtdepim/kpixmapregionselectordialog.h
index 220a00b82..d618dcb2d 100644
--- a/libtdepim/kpixmapregionselectordialog.h
+++ b/libtdepim/kpixmapregionselectordialog.h
@@ -51,7 +51,7 @@ public:
     * later the setPixmap method of the KPixmapRegionSelectorWidget widget of
     * the new object.
     */
-   KPixmapRegionSelectorDialog(TQWidget *parent=0L, const char *name=0L,
+   KPixmapRegionSelectorDialog(TQWidget *parent=nullptr, const char *name=nullptr,
                       bool modal = false );
    /**
     * The destructor of the dialog
@@ -72,7 +72,7 @@ public:
     * @returns the selected rectangle, or an invalid rectangle if the user
     * pressed the Cancel button.
     */
-   static TQRect getSelectedRegion(const TQPixmap &pixmap, TQWidget *parent = 0L );
+   static TQRect getSelectedRegion(const TQPixmap &pixmap, TQWidget *parent = nullptr );
 
    /**
     * Creates a modal dialog, lets the user to select a region of the @p pixmap
@@ -82,7 +82,7 @@ public:
     * @returns the selected rectangle, or an invalid rectangle if the user
     * pressed the Cancel button.
     */
-   static TQRect getSelectedRegion(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent = 0L );
+   static TQRect getSelectedRegion(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent = nullptr );
 
    /**
     * Creates a modal dialog, lets the user to select a region of the @p pixmap
@@ -91,7 +91,7 @@ public:
     * @returns the selected image, or an invalid image if the user
     * pressed the Cancel button.
     */
-   static TQImage getSelectedImage(const TQPixmap &pixmap, TQWidget *parent = 0L );
+   static TQImage getSelectedImage(const TQPixmap &pixmap, TQWidget *parent = nullptr );
 
    /**
     * Creates a modal dialog, lets the user to select a region of the @p pixmap
@@ -101,7 +101,7 @@ public:
     * @returns the selected image, or an invalid image if the user
     * pressed the Cancel button.
     */
-   static TQImage getSelectedImage(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent = 0L );
+   static TQImage getSelectedImage(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent = nullptr );
 
 protected:
    KPIM::KPixmapRegionSelectorWidget *m_pixmapSelectorWidget;
diff --git a/libtdepim/kpixmapregionselectorwidget.h b/libtdepim/kpixmapregionselectorwidget.h
index 7a90e2ac5..4232ed1ac 100644
--- a/libtdepim/kpixmapregionselectorwidget.h
+++ b/libtdepim/kpixmapregionselectorwidget.h
@@ -53,7 +53,7 @@ public:
    /**
     * Constructor for a KPixmapRegionSelectorWidget.
     */
-   KPixmapRegionSelectorWidget( TQWidget *parent = 0L, const char *name=0L);
+   KPixmapRegionSelectorWidget( TQWidget *parent = nullptr, const char *name=nullptr);
 
    /**
     * Destructor for a KPixmapRegionSelectorWidget
diff --git a/libtdepim/kprefsdialog.cpp b/libtdepim/kprefsdialog.cpp
index b910dc33c..10e907898 100644
--- a/libtdepim/kprefsdialog.cpp
+++ b/libtdepim/kprefsdialog.cpp
@@ -70,7 +70,7 @@ KPrefsWid *create( TDEConfigSkeletonItem *item, TQWidget *parent )
     TQValueList<TDEConfigSkeleton::ItemEnum::Choice> choices = enumItem->choices();
     if ( choices.isEmpty() ) {
       kdError() << "KPrefsWidFactory::create(): Enum has no choices." << endl;
-      return 0;
+      return nullptr;
     } else {
       KPrefsWidRadios *radios = new KPrefsWidRadios( enumItem, parent );
       TQValueList<TDEConfigSkeleton::ItemEnum::Choice>::ConstIterator it;
@@ -87,7 +87,7 @@ KPrefsWid *create( TDEConfigSkeletonItem *item, TQWidget *parent )
     return new KPrefsWidInt( intItem, parent );
   }
 
-  return 0;
+  return nullptr;
 }
 
 }
diff --git a/libtdepim/kprefsdialog.h b/libtdepim/kprefsdialog.h
index ff85b6982..6e374302a 100644
--- a/libtdepim/kprefsdialog.h
+++ b/libtdepim/kprefsdialog.h
@@ -731,7 +731,7 @@ class TDE_EXPORT KPrefsDialog : public KDialogBase, public KPrefsWidManager
       @param name   Widget name.
       @param modal  true, if dialog has to be modal, false for non-modal.
     */
-    KPrefsDialog( TDEConfigSkeleton *prefs, TQWidget *parent = 0, char *name = 0,
+    KPrefsDialog( TDEConfigSkeleton *prefs, TQWidget *parent = nullptr, char *name = nullptr,
                   bool modal = false );
     /**
       Destructor.
@@ -777,7 +777,7 @@ class TDE_EXPORT KPrefsModule : public TDECModule, public KPrefsWidManager
     TQ_OBJECT
   
   public:
-    KPrefsModule( TDEConfigSkeleton *, TQWidget *parent = 0, const char *name = 0 );
+    KPrefsModule( TDEConfigSkeleton *, TQWidget *parent = nullptr, const char *name = nullptr );
 
     virtual void addWid( KPrefsWid * );
 
diff --git a/libtdepim/krsqueezedtextlabel.h b/libtdepim/krsqueezedtextlabel.h
index 35216b854..ddeb994a4 100644
--- a/libtdepim/krsqueezedtextlabel.h
+++ b/libtdepim/krsqueezedtextlabel.h
@@ -46,8 +46,8 @@ public:
   /**
    * Default constructor.
    */
-  KRSqueezedTextLabel( TQWidget *parent, const char *name = 0 );
-  KRSqueezedTextLabel( const TQString &text, TQWidget *parent, const char *name = 0 );
+  KRSqueezedTextLabel( TQWidget *parent, const char *name = nullptr );
+  KRSqueezedTextLabel( const TQString &text, TQWidget *parent, const char *name = nullptr );
 
   virtual TQSize minimumSizeHint() const;
   virtual TQSize sizeHint() const;
diff --git a/libtdepim/kscoring.cpp b/libtdepim/kscoring.cpp
index 62f1a21a9..abeae5268 100644
--- a/libtdepim/kscoring.cpp
+++ b/libtdepim/kscoring.cpp
@@ -70,7 +70,7 @@ static TQString toXml(const TQString& str)
 
 
 // small dialog to display the messages from NotifyAction
-NotifyDialog* NotifyDialog::me = 0;
+NotifyDialog* NotifyDialog::me = nullptr;
 NotifyDialog::NotesMap NotifyDialog::dict;
 
 NotifyDialog::NotifyDialog(TQWidget* p)
@@ -160,7 +160,7 @@ ActionBase* ActionBase::factory(int type, const TQString &value)
     case MARKASREAD: return new ActionMarkAsRead();
   default:
     kdWarning(5100) << "unknown type " << type << " in ActionBase::factory()" << endl;
-    return 0;
+    return nullptr;
   }
 }
 
@@ -173,7 +173,7 @@ TQString ActionBase::userName(int type)
     case MARKASREAD: return i18n("Mark As Read");
   default:
     kdWarning(5100) << "unknown type " << type << " in ActionBase::userName()" << endl;
-    return 0;
+    return nullptr;
   }
 }
 
@@ -382,7 +382,7 @@ TQString NotifyCollection::collection() const
 void NotifyCollection::displayCollection(TQWidget *p) const
 {
   //KMessageBox::information(p,collection(),i18n("Collected Notes"));
-  KDialogBase *dlg = new KDialogBase( p, 0, false, i18n("Collected Notes"),
+  KDialogBase *dlg = new KDialogBase( p, nullptr, false, i18n("Collected Notes"),
                                       KDialogBase::Close, KDialogBase::Close );
   TQTextView *text = new TQTextView(dlg);
   text->setText(collection());
@@ -864,7 +864,7 @@ void KScoringManager::expireRules()
 
 void KScoringManager::createInternalFromXML(TQDomNode n)
 {
-  static KScoringRule *cR = 0; // the currentRule
+  static KScoringRule *cR = nullptr; // the currentRule
   // the XML file was parsed and now we simply traverse the resulting tree
   if ( !n.isNull() ) {
     kdDebug(5100) << "inspecting node of type " << n.nodeType()
@@ -1117,7 +1117,7 @@ KScoringRule* KScoringManager::findRule(const TQString& ruleName)
       return it;
     }
   }
-  return 0;
+  return nullptr;
 }
 
 bool KScoringManager::setCacheValid(bool v)
@@ -1200,7 +1200,7 @@ void RuleStack::push(TQPtrList<KScoringRule>& l)
 {
   kdDebug(5100) << "RuleStack::push pushing list with " << l.count() << " rules" << endl;
   KScoringManager::ScoringRuleList *l1 = new KScoringManager::ScoringRuleList;
-  for ( KScoringRule *r=l.first(); r != 0; r=l.next() ) {
+  for ( KScoringRule *r=l.first(); r ; r=l.next() ) {
     l1->append(new KScoringRule(*r));
   }
   stack.push(l1);
diff --git a/libtdepim/kscoring.h b/libtdepim/kscoring.h
index deb48646a..8097fb706 100644
--- a/libtdepim/kscoring.h
+++ b/libtdepim/kscoring.h
@@ -169,7 +169,7 @@ public:
   ~NotifyCollection();
   void addNote(const ScorableArticle&, const TQString&);
   TQString collection() const;
-  void displayCollection(TQWidget *p=0) const;
+  void displayCollection(TQWidget *p=nullptr) const;
 private:
   struct article_info {
     TQString from;
@@ -340,7 +340,7 @@ class TDE_EXPORT KScoringManager : public TQObject
   KScoringRule* addRule();
   void cancelNewRule(KScoringRule *);
   void deleteRule(KScoringRule *);
-  void editRule(KScoringRule *e, TQWidget *w=0);
+  void editRule(KScoringRule *e, TQWidget *w=nullptr);
   KScoringRule* copyRule(KScoringRule *);
   void moveRuleAbove( KScoringRule *above, KScoringRule *below );
   void moveRuleBelow( KScoringRule *below, KScoringRule *above );
@@ -416,7 +416,7 @@ public:
 protected slots:
   void slotShowAgainToggled(bool);
 private:
-  NotifyDialog(TQWidget* p =0);
+  NotifyDialog(TQWidget* p =nullptr);
   static NotifyDialog *me;
 
   TQLabel *note;
diff --git a/libtdepim/kscoringeditor.cpp b/libtdepim/kscoringeditor.cpp
index 1a536e829..57f98d670 100644
--- a/libtdepim/kscoringeditor.cpp
+++ b/libtdepim/kscoringeditor.cpp
@@ -210,7 +210,7 @@ void ConditionEditWidget::updateRule(KScoringRule *rule)
 //
 //============================================================================
 SingleActionWidget::SingleActionWidget(KScoringManager *m,TQWidget *p, const char *n)
-  : TQWidget(p,n), notifyEditor(0), scoreEditor(0), colorEditor(0),manager(m)
+  : TQWidget(p,n), notifyEditor(nullptr), scoreEditor(nullptr), colorEditor(nullptr),manager(m)
 {
   TQHBoxLayout *topL = new TQHBoxLayout(this,0,5);
   types = new KComboBox(this);
@@ -231,7 +231,7 @@ SingleActionWidget::SingleActionWidget(KScoringManager *m,TQWidget *p, const cha
     int feature = ActionBase::getTypeForUserName(name);
     if (manager->hasFeature(feature)) {
       types->insertItem(name);
-      TQWidget *w=0;
+      TQWidget *w=nullptr;
       switch (feature) {
         case ActionBase::SETSCORE:
           w = scoreEditor = new KIntSpinBox(-99999,99999,1,0,10, stack);
@@ -290,7 +290,7 @@ ActionBase* SingleActionWidget::createAction() const
 {
   // no action selected...
   if (types->currentText().isEmpty())
-    return 0;
+    return nullptr;
 
   int type = ActionBase::getTypeForUserName(types->currentText());
   switch (type) {
@@ -304,7 +304,7 @@ ActionBase* SingleActionWidget::createAction() const
       return new ActionMarkAsRead();
     default:
       kdWarning(5100) << "unknown action type in SingleActionWidget::getValue()" << endl;
-      return 0;
+      return nullptr;
   }
 }
 
@@ -529,8 +529,8 @@ void RuleEditWidget::clearContents()
   expireCheck->setChecked(false);
   expireEdit->setValue(30);
   expireEdit->setEnabled(false);
-  condEditor->slotEditRule(0);
-  actionEditor->slotEditRule(0);
+  condEditor->slotEditRule(nullptr);
+  actionEditor->slotEditRule(nullptr);
   oldRuleName = TQString();
 }
 
@@ -622,7 +622,7 @@ RuleListWidget::RuleListWidget(KScoringManager *m, bool standalone, TQWidget *p,
   connect( mRuleDown, TQ_SIGNAL( clicked() ), TQ_SLOT( slotRuleDown() ) );
 
   btnL = new TQHBoxLayout( topL, KDialog::spacingHint() );
-  editRule=0L;
+  editRule=nullptr;
   newRule = new TQPushButton(this);
   newRule->setPixmap( BarIcon( "document-new", TDEIcon::SizeSmall ) );
   TQToolTip::add(newRule,i18n("New rule")),
@@ -684,8 +684,8 @@ void RuleListWidget::updateButton()
 
   TQListBoxItem *item = ruleList->item( ruleList->currentItem() );
   if ( item ) {
-    mRuleUp->setEnabled( item->prev() != 0 );
-    mRuleDown->setEnabled( item->next() != 0 );
+    mRuleUp->setEnabled( item->prev() != nullptr );
+    mRuleDown->setEnabled( item->next() != nullptr );
   }
 }
 
@@ -818,7 +818,7 @@ void RuleListWidget::slotCopyRule()
 
 void RuleListWidget::slotRuleUp()
 {
-  KScoringRule *rule = 0, *below = 0;
+  KScoringRule *rule = nullptr, *below = nullptr;
   TQListBoxItem *item = ruleList->item( ruleList->currentItem() );
   if ( item ) {
     rule = manager->findRule( item->text() );
@@ -834,7 +834,7 @@ void RuleListWidget::slotRuleUp()
 
 void RuleListWidget::slotRuleDown()
 {
-  KScoringRule *rule = 0, *above = 0;
+  KScoringRule *rule = nullptr, *above = nullptr;
   TQListBoxItem *item = ruleList->item( ruleList->currentItem() );
   if ( item ) {
     rule = manager->findRule( item->text() );
@@ -853,7 +853,7 @@ void RuleListWidget::slotRuleDown()
 // class KScoringEditor (the score edit dialog)
 //
 //============================================================================
-KScoringEditor* KScoringEditor::scoreEditor = 0;
+KScoringEditor* KScoringEditor::scoreEditor = nullptr;
 
 KScoringEditor::KScoringEditor(KScoringManager* m,
                                TQWidget *parent, const char *name)
@@ -890,7 +890,7 @@ void KScoringEditor::setDirty()
 
 KScoringEditor::~KScoringEditor()
 {
-  scoreEditor = 0;
+  scoreEditor = nullptr;
 }
 
 KScoringEditor* KScoringEditor::createEditor(KScoringManager* m,
diff --git a/libtdepim/kscoringeditor.h b/libtdepim/kscoringeditor.h
index 41faec008..dade2e076 100644
--- a/libtdepim/kscoringeditor.h
+++ b/libtdepim/kscoringeditor.h
@@ -55,7 +55,7 @@ class TDE_EXPORT SingleConditionWidget : public TQFrame
   
   friend class ConditionEditWidget;
 public:
-  SingleConditionWidget(KScoringManager *,TQWidget *p =0, const char *n =0);
+  SingleConditionWidget(KScoringManager *,TQWidget *p =nullptr, const char *n =nullptr);
   ~SingleConditionWidget();
   void setCondition(KScoringExpression*);
   KScoringExpression *createCondition() const;
@@ -87,7 +87,7 @@ class ConditionEditWidget: public KWidgetLister
   TQ_OBJECT
   
 public:
-  ConditionEditWidget(KScoringManager *,TQWidget *p =0, const char *n =0);
+  ConditionEditWidget(KScoringManager *,TQWidget *p =nullptr, const char *n =nullptr);
   ~ConditionEditWidget();
   TQWidget* createWidget(TQWidget*);
   void updateRule(KScoringRule*);
@@ -107,7 +107,7 @@ class SingleActionWidget : public TQWidget
   
   friend class ActionEditWidget;
 public:
-  SingleActionWidget(KScoringManager *m,TQWidget *p =0, const char *n =0);
+  SingleActionWidget(KScoringManager *m,TQWidget *p =nullptr, const char *n =nullptr);
   ~SingleActionWidget();
   void setAction(ActionBase*);
   ActionBase *createAction() const;
@@ -136,7 +136,7 @@ class TDE_EXPORT ActionEditWidget : public KWidgetLister
   TQ_OBJECT
   
 public:
-  ActionEditWidget(KScoringManager *m,TQWidget *p =0, const char *n =0);
+  ActionEditWidget(KScoringManager *m,TQWidget *p =nullptr, const char *n =nullptr);
   ~ActionEditWidget();
   TQWidget* createWidget(TQWidget *parent);
   void updateRule(KScoringRule*);
@@ -154,7 +154,7 @@ class RuleEditWidget : public TQWidget
   TQ_OBJECT
   
 public:
-  RuleEditWidget(KScoringManager *m,TQWidget *p =0, const char *n =0);
+  RuleEditWidget(KScoringManager *m,TQWidget *p =nullptr, const char *n =nullptr);
   ~RuleEditWidget();
 public slots:
   void setDirty();
@@ -205,7 +205,7 @@ class TDE_EXPORT RuleListWidget : public TQWidget
   TQ_OBJECT
   
 public:
-  RuleListWidget(KScoringManager *m, bool =false, TQWidget *p =0, const char *n =0);
+  RuleListWidget(KScoringManager *m, bool =false, TQWidget *p =nullptr, const char *n =nullptr);
   ~RuleListWidget();
   TQString currentRule() const { return ruleList->currentText(); }
 protected:
@@ -258,11 +258,11 @@ class TDE_EXPORT KScoringEditor : public KDialogBase
 public:
   ~KScoringEditor();
   void setRule(KScoringRule*);
-  static KScoringEditor *createEditor(KScoringManager* m, TQWidget *parent=0, const char *name=0);
+  static KScoringEditor *createEditor(KScoringManager* m, TQWidget *parent=nullptr, const char *name=nullptr);
   static KScoringEditor *editor() { return scoreEditor; }
   void setDirty();
 protected:
-  KScoringEditor(KScoringManager* m, TQWidget *parent=0, const char *name=0);
+  KScoringEditor(KScoringManager* m, TQWidget *parent=nullptr, const char *name=nullptr);
 private:
   /** the editor for the current rule */
   RuleEditWidget* ruleEditor;
@@ -287,7 +287,7 @@ class KScoringEditorWidgetDialog : public KDialogBase
   TQ_OBJECT
   
 public:
-  KScoringEditorWidgetDialog(KScoringManager *m, const TQString& rName, TQWidget *parent=0, const char *name=0);
+  KScoringEditorWidgetDialog(KScoringManager *m, const TQString& rName, TQWidget *parent=nullptr, const char *name=nullptr);
 protected slots:
   void slotApply();
   void slotOk();
@@ -304,7 +304,7 @@ class TDE_EXPORT KScoringEditorWidget : public TQWidget
   TQ_OBJECT
   
 public:
-  KScoringEditorWidget(KScoringManager *m,TQWidget *p =0, const char *n =0);
+  KScoringEditorWidget(KScoringManager *m,TQWidget *p =nullptr, const char *n =nullptr);
   ~KScoringEditorWidget();
 protected slots:
   void slotRuleEdited(const TQString&);
diff --git a/libtdepim/ksubscription.cpp b/libtdepim/ksubscription.cpp
index 7bb7179db..b0cfec94b 100644
--- a/libtdepim/ksubscription.cpp
+++ b/libtdepim/ksubscription.cpp
@@ -123,7 +123,7 @@ void GroupItem::setVisible( bool b )
     if (isCheckItem())
     {
       bool setInvisible = true;
-      for (TQListViewItem * lvchild = firstChild(); lvchild != 0;
+      for (TQListViewItem * lvchild = firstChild(); lvchild;
           lvchild = lvchild->nextSibling())
       {
         if (lvchild->isVisible()) // item has a visible child
@@ -143,7 +143,7 @@ void GroupItem::setVisible( bool b )
       // non-checkable item
       TQPtrList<TQListViewItem> moveItems;
 
-      for (TQListViewItem * lvchild = firstChild(); lvchild != 0;
+      for (TQListViewItem * lvchild = firstChild(); lvchild;
           lvchild = lvchild->nextSibling())
       {
         if (static_cast<GroupItem*>(lvchild)->isCheckItem())
@@ -208,7 +208,7 @@ void GroupItem::setup()
 
 KSubscription::KSubscription( TQWidget *parent, const TQString &caption,
     KAccount * acct, int buttons, const TQString &user1, bool descriptionColumn )
-  : KDialogBase( parent, 0, true, caption, buttons | Help | Ok | Cancel, Ok,
+  : KDialogBase( parent, nullptr, true, caption, buttons | Help | Ok | Cancel, Ok,
       true, i18n("Reload &List"), user1 ),
     mAcct( acct )
 {
@@ -389,7 +389,7 @@ void KSubscription::removeListItem( TQListView *view, const KGroupInfo &gi )
 //-----------------------------------------------------------------------------
 TQListViewItem* KSubscription::getListItem( TQListView *view, const KGroupInfo &gi )
 {
-  if(!view) return 0;
+  if(!view) return nullptr;
   TQListViewItemIterator it(view);
 
   for ( ; it.current(); ++it)
@@ -397,7 +397,7 @@ TQListViewItem* KSubscription::getListItem( TQListView *view, const KGroupInfo &
     if (static_cast<GroupItem*>(it.current())->info() == gi)
       return (it.current());
   }
-  return 0;
+  return nullptr;
 }
 
 //-----------------------------------------------------------------------------
diff --git a/libtdepim/ksubscription.h b/libtdepim/ksubscription.h
index e85571a31..687255b08 100644
--- a/libtdepim/ksubscription.h
+++ b/libtdepim/ksubscription.h
@@ -280,7 +280,7 @@ class TDE_EXPORT KSubscription : public KDialogBase
      * Update the item-states (visible, enabled) when a filter
      * criteria changed
      */
-    void filterChanged( TQListViewItem* item = 0,
+    void filterChanged( TQListViewItem* item = nullptr,
         const TQString & text = TQString() );
 
     /**
diff --git a/libtdepim/ktimeedit.cpp b/libtdepim/ktimeedit.cpp
index 4dd662809..c996af75a 100644
--- a/libtdepim/ktimeedit.cpp
+++ b/libtdepim/ktimeedit.cpp
@@ -43,7 +43,7 @@
 class KOTimeValidator : public TQValidator
 {
 public:
-    KOTimeValidator(TQWidget* parent, const char* name=0) : TQValidator(parent, name) {}
+    KOTimeValidator(TQWidget* parent, const char* name=nullptr) : TQValidator(parent, name) {}
 
     virtual State validate(TQString& str, int& /*cursorPos*/) const
     {
diff --git a/libtdepim/ktimeedit.h b/libtdepim/ktimeedit.h
index 1cc200841..c38be5d4d 100644
--- a/libtdepim/ktimeedit.h
+++ b/libtdepim/ktimeedit.h
@@ -47,7 +47,7 @@ class TDE_EXPORT KTimeEdit : public TQComboBox
   
   public:
     /** constructs a new time edit. */
-    KTimeEdit(TQWidget *parent=0, TQTime qt=TQTime(12,0), const char *name=0);
+    KTimeEdit(TQWidget *parent=nullptr, TQTime qt=TQTime(12,0), const char *name=nullptr);
 
     virtual ~KTimeEdit();
 
diff --git a/libtdepim/kvcarddrag.h b/libtdepim/kvcarddrag.h
index 1669d7955..aa5bc3b20 100644
--- a/libtdepim/kvcarddrag.h
+++ b/libtdepim/kvcarddrag.h
@@ -46,7 +46,7 @@ class TDE_EXPORT KVCardDrag : public TQStoredDrag
     /**
      * Constructs an empty vcard drag.
      */
-    KVCardDrag( TQWidget *dragsource = 0, const char *name = 0 );
+    KVCardDrag( TQWidget *dragsource = nullptr, const char *name = nullptr );
 
     /**
      * Constructs a vcard drag with the @p addressee.
@@ -54,7 +54,7 @@ class TDE_EXPORT KVCardDrag : public TQStoredDrag
 #if defined(KABC_VCARD_ENCODING_FIX)
     KVCardDrag( const TQByteArray &content, TQWidget *dragsource = 0, const char *name = 0 );
 #else
-    KVCardDrag( const TQString &content, TQWidget *dragsource = 0, const char *name = 0 );
+    KVCardDrag( const TQString &content, TQWidget *dragsource = nullptr, const char *name = nullptr );
 #endif
     virtual ~KVCardDrag() {}
 
diff --git a/libtdepim/kwidgetlister.h b/libtdepim/kwidgetlister.h
index 520e2018d..9d779f96b 100644
--- a/libtdepim/kwidgetlister.h
+++ b/libtdepim/kwidgetlister.h
@@ -67,7 +67,7 @@ class TDE_EXPORT KWidgetLister : public TQWidget
   TQ_OBJECT
   
 public:
-  KWidgetLister( int minWidgets=1, int maxWidgets=8, TQWidget* parent=0, const char* name=0 );
+  KWidgetLister( int minWidgets=1, int maxWidgets=8, TQWidget* parent=nullptr, const char* name=nullptr );
   virtual ~KWidgetLister();
 
 protected slots:
@@ -101,7 +101,7 @@ protected:
       implementaion, though, since you cannot put the widget on screen
       from derived classes (@p mLayout is private).
       Make sure the parent of the TQWidget to add is this KWidgetLister. */
-  virtual void addWidgetAtEnd(TQWidget *w =0);
+  virtual void addWidgetAtEnd(TQWidget *w =nullptr);
   /** Removes a single (always the last) widget. Doesn't care if there
       are still only @ref mMinWidgets left on screen and whether it
       should enable/disable any controls. It simply does what it is
diff --git a/libtdepim/ldapclient.cpp b/libtdepim/ldapclient.cpp
index ef911bf7e..6a40a4b86 100644
--- a/libtdepim/ldapclient.cpp
+++ b/libtdepim/ldapclient.cpp
@@ -44,7 +44,7 @@
 
 using namespace KPIM;
 
-TDEConfig *KPIM::LdapSearch::s_config = 0L;
+TDEConfig *KPIM::LdapSearch::s_config = nullptr;
 static KStaticDeleter<TDEConfig> configDeleter;
 
 TQString LdapObject::toString() const
@@ -77,7 +77,7 @@ void LdapObject::assign( const LdapObject& that )
 }
 
 LdapClient::LdapClient( int clientNumber, TQObject* parent, const char* name )
-  : TQObject( parent, name ), mJob( 0 ), mActive( false ), mReportObjectClass( false )
+  : TQObject( parent, name ), mJob( nullptr ), mActive( false ), mReportObjectClass( false )
 {
 //  d = new LdapClientPrivate;
   mClientNumber = clientNumber;
@@ -149,7 +149,7 @@ void LdapClient::cancelQuery()
 {
   if ( mJob ) {
     mJob->kill();
-    mJob = 0;
+    mJob = nullptr;
   }
 
   mActive = false;
diff --git a/libtdepim/ldapclient.h b/libtdepim/ldapclient.h
index ecfbbd32a..e03ddf030 100644
--- a/libtdepim/ldapclient.h
+++ b/libtdepim/ldapclient.h
@@ -106,7 +106,7 @@ class LdapObject
 {
   public:
     LdapObject()
-      : dn( TQString() ), client( 0 ) {}
+      : dn( TQString() ), client( nullptr ) {}
     explicit LdapObject( const TQString& _dn, LdapClient* _cl ) : dn( _dn ), client( _cl ) {}
     LdapObject( const LdapObject& that ) { assign( that ); }
 
@@ -145,7 +145,7 @@ class TDE_EXPORT LdapClient : public TQObject
   
 
   public:
-    LdapClient( int clientNumber, TQObject* parent = 0, const char* name = 0 );
+    LdapClient( int clientNumber, TQObject* parent = nullptr, const char* name = nullptr );
     virtual ~LdapClient();
 
     /*! returns true if there is a query running */
diff --git a/libtdepim/ldapsearchdialog.h b/libtdepim/ldapsearchdialog.h
index cf33cb8a2..564b159e0 100644
--- a/libtdepim/ldapsearchdialog.h
+++ b/libtdepim/ldapsearchdialog.h
@@ -41,7 +41,7 @@ class LDAPSearchDialog : public KDialogBase
   
 
   public:
-    LDAPSearchDialog( TQWidget* parent, const char* name = 0 );
+    LDAPSearchDialog( TQWidget* parent, const char* name = nullptr );
     ~LDAPSearchDialog();
 
     bool isOK() const { return mIsOK; }
diff --git a/libtdepim/linklocator.cpp b/libtdepim/linklocator.cpp
index 30fda573f..014c77ed7 100644
--- a/libtdepim/linklocator.cpp
+++ b/libtdepim/linklocator.cpp
@@ -34,8 +34,8 @@
 
 #include <limits.h>
 
-TQMap<TQString, TQString> *LinkLocator::s_smileyEmoticonNameMap = 0;
-TQMap<TQString, TQString> *LinkLocator::s_smileyEmoticonHTMLCache = 0;
+TQMap<TQString, TQString> *LinkLocator::s_smileyEmoticonNameMap = nullptr;
+TQMap<TQString, TQString> *LinkLocator::s_smileyEmoticonHTMLCache = nullptr;
 
 static KStaticDeleter< TQMap<TQString, TQString> > smileyMapDeleter;
 static KStaticDeleter< TQMap<TQString, TQString> > smileyCacheDeleter;
@@ -230,7 +230,7 @@ TQString LinkLocator::convertToHtml(const TQString& plainText, int flags,
   locator.setMaxAddressLen(maxAddressLen);
 
   TQString str;
-  TQString result((TQChar*)0, (int)locator.mText.length() * 2);
+  TQString result((TQChar*)nullptr, (int)locator.mText.length() * 2);
   TQChar ch;
   int x;
   bool startOfLine = true;
diff --git a/libtdepim/maillistdrag.cpp b/libtdepim/maillistdrag.cpp
index f8932d123..d31a6ed67 100644
--- a/libtdepim/maillistdrag.cpp
+++ b/libtdepim/maillistdrag.cpp
@@ -87,7 +87,7 @@ MailListDrag::MailListDrag( MailList mailList, TQWidget * parent, MailTextSource
 MailListDrag::~MailListDrag()
 {
     delete _src;
-    _src = 0;
+    _src = nullptr;
 }
 
 const char* MailListDrag::format()
@@ -233,7 +233,7 @@ TQByteArray MailListDrag::encodedData(const char *mimeType) const
         TQByteArray enc = TQStoredDrag::encodedData(format());
         decode(enc, ml);
 
-        KProgressDialog *dlg = new KProgressDialog(0, 0, TQString(), i18n("Retrieving and storing messages..."), true);
+        KProgressDialog *dlg = new KProgressDialog(nullptr, nullptr, TQString(), i18n("Retrieving and storing messages..."), true);
         dlg->setAllowCancel(true);
         dlg->progressBar()->setTotalSteps(ml.count());
         int i = 0;
diff --git a/libtdepim/maillistdrag.h b/libtdepim/maillistdrag.h
index 496d6fb7f..92a210191 100644
--- a/libtdepim/maillistdrag.h
+++ b/libtdepim/maillistdrag.h
@@ -96,7 +96,7 @@ class TDE_EXPORT MailListDrag : public TQStoredDrag
 {
 public:
     // Takes ownership of "src" and deletes it when done
-    MailListDrag( MailList, TQWidget * parent = 0, MailTextSource *src = 0 );
+    MailListDrag( MailList, TQWidget * parent = nullptr, MailTextSource *src = nullptr );
     ~MailListDrag();
 
     const char *format(int i) const;
diff --git a/libtdepim/overlaywidget.cpp b/libtdepim/overlaywidget.cpp
index 067e2d71a..95bf3fee1 100644
--- a/libtdepim/overlaywidget.cpp
+++ b/libtdepim/overlaywidget.cpp
@@ -32,7 +32,7 @@
 using namespace KPIM;
 
 OverlayWidget::OverlayWidget( TQWidget* alignWidget, TQWidget* parent, const char* name )
-  : TQHBox( parent, name ), mAlignWidget( 0 )
+  : TQHBox( parent, name ), mAlignWidget( nullptr )
 {
   setAlignWidget( alignWidget );
 }
diff --git a/libtdepim/overlaywidget.h b/libtdepim/overlaywidget.h
index acc7fe979..94ed0d9e5 100644
--- a/libtdepim/overlaywidget.h
+++ b/libtdepim/overlaywidget.h
@@ -47,7 +47,7 @@ class OverlayWidget : public TQHBox
   
 
 public:
-  OverlayWidget( TQWidget* alignWidget, TQWidget* parent, const char* name = 0 );
+  OverlayWidget( TQWidget* alignWidget, TQWidget* parent, const char* name = nullptr );
   ~OverlayWidget();
 
   TQWidget * alignWidget() { return mAlignWidget; }
diff --git a/libtdepim/pluginloader.h b/libtdepim/pluginloader.h
index 5e69c265e..99582fef8 100644
--- a/libtdepim/pluginloader.h
+++ b/libtdepim/pluginloader.h
@@ -84,7 +84,7 @@ namespace KPIM {
     static PluginLoader<T,T_config> * mSelf;
 
   public:
-    virtual ~PluginLoader() { mSelf = 0; }
+    virtual ~PluginLoader() { mSelf = nullptr; }
 
     /** Returns the single instance of this loader. */
     static PluginLoader<T,T_config> * instance() {
@@ -107,7 +107,7 @@ namespace KPIM {
         for when you want to handle builtin types */
     virtual T * createForName( const TQString & type ) const {
       void * main_func = mainFunc( type, T_config::mainfunc );
-      if ( !main_func ) return 0;
+      if ( !main_func ) return nullptr;
 
       // cast to a pointer to a function returning T*, call it and
       // return the result; don't you love C? ;-)
@@ -116,7 +116,7 @@ namespace KPIM {
   };
 
   template< typename T, typename T_config >
-  PluginLoader<T,T_config> * PluginLoader<T,T_config>::mSelf = 0;
+  PluginLoader<T,T_config> * PluginLoader<T,T_config>::mSelf = nullptr;
 
 }
 
diff --git a/libtdepim/pluginloaderbase.cpp b/libtdepim/pluginloaderbase.cpp
index a899dc677..158d65dd6 100644
--- a/libtdepim/pluginloaderbase.cpp
+++ b/libtdepim/pluginloaderbase.cpp
@@ -45,7 +45,7 @@ static kndbgstream debug( bool cond )
 
 namespace KPIM {
 
-  PluginLoaderBase::PluginLoaderBase() : d(0) {}
+  PluginLoaderBase::PluginLoaderBase() : d(nullptr) {}
   PluginLoaderBase::~PluginLoaderBase() {}
 
 
@@ -58,7 +58,7 @@ namespace KPIM {
   }
 
   const PluginMetaData * PluginLoaderBase::infoForName( const TQString & type ) const {
-    return mPluginMap.contains( type ) ? &(mPluginMap[type]) : 0 ;
+    return mPluginMap.contains( type ) ? &(mPluginMap[type]) : nullptr ;
   }
 
 
@@ -115,15 +115,15 @@ namespace KPIM {
   void * PluginLoaderBase::mainFunc( const TQString & type,
 				     const char * mf_name ) const {
     if ( type.isEmpty() || !mPluginMap.contains( type ) )
-      return 0;
+      return nullptr;
 
     const TQString libName = mPluginMap[ type ].library;
     if ( libName.isEmpty() )
-      return 0;
+      return nullptr;
 
     const KLibrary * lib = openLibrary( libName );
     if ( !lib )
-      return 0;
+      return nullptr;
 
     mPluginMap[ type ].loaded = true;
 
@@ -132,7 +132,7 @@ namespace KPIM {
       warning() << "No symbol named \"" << factory_name.latin1() << "\" ("
 		<< factory_name << ") was found in library \"" << libName
 		<< "\"" << endl;
-      return 0;
+      return nullptr;
     }
 
     return lib->symbol( factory_name.latin1() );
@@ -145,7 +145,7 @@ namespace KPIM {
     if ( path.isEmpty() ) {
       warning() << "No plugin library named \"" << libName
 		<< "\" was found!" << endl;
-      return 0;
+      return nullptr;
     }
 
     const KLibrary * library = KLibLoader::self()->library( TQFile::encodeName( path ) );
diff --git a/libtdepim/progressdialog.cpp b/libtdepim/progressdialog.cpp
index e780c297e..28b8fc21c 100644
--- a/libtdepim/progressdialog.cpp
+++ b/libtdepim/progressdialog.cpp
@@ -89,8 +89,8 @@ void TransactionItemView::resizeContents( int w, int h )
   // Resize the parent (progressdialog) - this works but resize horizontally too often
   //parentWidget()->adjustSize();
 
-  TQApplication::sendPostedEvents( 0, TQEvent::ChildInserted );
-  TQApplication::sendPostedEvents( 0, TQEvent::LayoutHint );
+  TQApplication::sendPostedEvents( nullptr, TQEvent::ChildInserted );
+  TQApplication::sendPostedEvents( nullptr, TQEvent::LayoutHint );
   TQSize sz = parentWidget()->sizeHint();
   int currentWidth = parentWidget()->width();
   // Don't resize to sz.width() every time when it only reduces a little bit
@@ -141,7 +141,7 @@ void TransactionItemView::slotLayoutFirstItem()
 
 TransactionItem::TransactionItem( TQWidget* parent,
                                   ProgressItem *item, bool first )
-  : TQVBox( parent, "TransactionItem" ), mCancelButton( 0 ), mItem( item )
+  : TQVBox( parent, "TransactionItem" ), mCancelButton( nullptr ), mItem( item )
 
 {
   setSpacing( 2 );
@@ -307,7 +307,7 @@ ProgressDialog::~ProgressDialog()
 
 void ProgressDialog::slotTransactionAdded( ProgressItem *item )
 {
-   TransactionItem *parent = 0;
+   TransactionItem *parent = nullptr;
    if ( item->parent() ) {
      if ( mTransactionsToListviewItems.contains( item->parent() ) ) {
        parent = mTransactionsToListviewItems[ item->parent() ];
diff --git a/libtdepim/progressdialog.h b/libtdepim/progressdialog.h
index ad7dd7e8c..11b882f81 100644
--- a/libtdepim/progressdialog.h
+++ b/libtdepim/progressdialog.h
@@ -54,8 +54,8 @@ class TransactionItemView : public TQScrollView {
   TQ_OBJECT
   
 public:
-  TransactionItemView( TQWidget * parent = 0,
-                       const char * name = 0,
+  TransactionItemView( TQWidget * parent = nullptr,
+                       const char * name = nullptr,
                        WFlags f = 0 );
 
   virtual ~TransactionItemView()
@@ -100,7 +100,7 @@ public:
 
   // The progressitem is deleted immediately, we take 5s to go out,
   // so better not use mItem during this time.
-  void setItemComplete() { mItem = 0; }
+  void setItemComplete() { mItem = nullptr; }
 
 public slots:
   void slotItemCanceled();
@@ -121,7 +121,7 @@ class TDE_EXPORT ProgressDialog : public OverlayWidget
   
 
 public:
-  ProgressDialog( TQWidget* alignWidget, TQWidget* parent, const char* name = 0 );
+  ProgressDialog( TQWidget* alignWidget, TQWidget* parent, const char* name = nullptr );
   ~ProgressDialog();
   void setVisible( bool b );
 
diff --git a/libtdepim/progressmanager.cpp b/libtdepim/progressmanager.cpp
index 68e8ac28a..95dda70c6 100644
--- a/libtdepim/progressmanager.cpp
+++ b/libtdepim/progressmanager.cpp
@@ -31,7 +31,7 @@
 
 namespace KPIM {
 
-KPIM::ProgressManager * KPIM::ProgressManager::mInstance = 0;
+KPIM::ProgressManager * KPIM::ProgressManager::mInstance = nullptr;
 unsigned int KPIM::ProgressManager::uID = 42;
 
 ProgressItem::ProgressItem(
@@ -135,7 +135,7 @@ ProgressManager::ProgressManager() :TQObject() {
   mInstance = this;
 }
 
-ProgressManager::~ProgressManager() { mInstance = 0; }
+ProgressManager::~ProgressManager() { mInstance = nullptr; }
 static KStaticDeleter<ProgressManager> progressManagerDeleter;
 
 ProgressManager* ProgressManager::instance()
@@ -151,7 +151,7 @@ ProgressItem* ProgressManager::createProgressItemImpl(
      const TQString &label, const TQString &status,
      bool cancellable, bool usesCrypto )
 {
-   ProgressItem *t = 0;
+   ProgressItem *t = nullptr;
    if ( !mTransactions[ id ] ) {
      t = new ProgressItem ( parent, id, label, status, cancellable, usesCrypto );
      mTransactions.insert( id, t );
@@ -217,17 +217,17 @@ void ProgressManager::slotStandardCancelHandler( ProgressItem *item )
 
 ProgressItem* ProgressManager::singleItem() const
 {
-  ProgressItem *item = 0;
+  ProgressItem *item = nullptr;
   TQDictIterator< ProgressItem > it( mTransactions );
   for ( ; it.current(); ++it ) {
 
     // No single item for progress possible, as one of them is a busy indicator one.
     if ( (*it)->usesBusyIndicator() )
-      return 0;
+      return nullptr;
 
     if ( !(*it)->parent() ) {             // if it's a top level one, only those count
       if ( item )
-        return 0; // we found more than one
+        return nullptr; // we found more than one
       else
         item = (*it);
     }
diff --git a/libtdepim/progressmanager.h b/libtdepim/progressmanager.h
index 17c96c32c..114e4bc98 100644
--- a/libtdepim/progressmanager.h
+++ b/libtdepim/progressmanager.h
@@ -294,7 +294,7 @@ class TDE_EXPORT ProgressManager : public TQObject
       *              interpreted as rich text, so it might have to be escaped.
       */
      static ProgressItem * createProgressItem( const TQString &label ) {
-       return instance()->createProgressItemImpl( 0, getUniqueID(), label,
+       return instance()->createProgressItemImpl( nullptr, getUniqueID(), label,
                                                   TQString(), true, false );
      }
 
@@ -346,7 +346,7 @@ class TDE_EXPORT ProgressManager : public TQObject
                                                const TQString& status = TQString(),
                                                bool canBeCanceled = true,
                                                bool usesCrypto = false ) {
-       return instance()->createProgressItemImpl( 0, id, label, status,
+       return instance()->createProgressItemImpl( nullptr, id, label, status,
                                                   canBeCanceled, usesCrypto );
      }
 
diff --git a/libtdepim/recentaddresses.cpp b/libtdepim/recentaddresses.cpp
index 7ba218c2a..c1a18571a 100644
--- a/libtdepim/recentaddresses.cpp
+++ b/libtdepim/recentaddresses.cpp
@@ -45,7 +45,7 @@ using namespace TDERecentAddress;
 
 static KStaticDeleter<RecentAddresses> sd;
 
-RecentAddresses * RecentAddresses::s_self = 0;
+RecentAddresses * RecentAddresses::s_self = nullptr;
 
 RecentAddresses * RecentAddresses::self( TDEConfig *config)
 {
diff --git a/libtdepim/recentaddresses.h b/libtdepim/recentaddresses.h
index fb26a4a42..406da5486 100644
--- a/libtdepim/recentaddresses.h
+++ b/libtdepim/recentaddresses.h
@@ -44,7 +44,7 @@ namespace TDERecentAddress {
 class TDE_EXPORT RecentAddressDialog : public KDialogBase
 {
  public:
-  RecentAddressDialog( TQWidget *parent, const char *name = 0 );
+  RecentAddressDialog( TQWidget *parent, const char *name = nullptr );
   void setAddresses( const TQStringList &addrs );
   TQStringList addresses() const;
  private:
@@ -65,12 +65,12 @@ public:
     /**
      * @returns the only possible instance of this class.
      */
-    static RecentAddresses * self(TDEConfig *config = 0L);
+    static RecentAddresses * self(TDEConfig *config = nullptr);
 
     /*
      * @return true if self() was called, i.e. a RecentAddresses instance exists
      */
-    static bool exists() { return s_self != 0; }
+    static bool exists() { return s_self != nullptr; }
 
     /**
      * @returns the list of recent addresses.
@@ -116,7 +116,7 @@ public:
     void clear();
 
 private:
-    RecentAddresses(TDEConfig *config = 0L);
+    RecentAddresses(TDEConfig *config = nullptr);
 
     TDEABC::Addressee::List m_addresseeList;
 
diff --git a/libtdepim/sendsmsdialog.h b/libtdepim/sendsmsdialog.h
index fd9d1b6b1..f5c40832f 100644
--- a/libtdepim/sendsmsdialog.h
+++ b/libtdepim/sendsmsdialog.h
@@ -33,7 +33,7 @@ class SendSMSDialog : public KDialogBase
   
 
   public:
-    SendSMSDialog( const TQString &recipientName, TQWidget *parent, const char *name = 0 );
+    SendSMSDialog( const TQString &recipientName, TQWidget *parent, const char *name = nullptr );
 
     TQString text() const;
 
diff --git a/libtdepim/sidebarextension.cpp b/libtdepim/sidebarextension.cpp
index 9c5113dbb..dbdc0d582 100644
--- a/libtdepim/sidebarextension.cpp
+++ b/libtdepim/sidebarextension.cpp
@@ -27,7 +27,7 @@
 using namespace KParts;
 
 SideBarExtension::SideBarExtension(TQWidget *exported, KParts::ReadOnlyPart *parent, const char* name)
-: TQObject(parent, name), m_exported(exported), d(0)
+: TQObject(parent, name), m_exported(exported), d(nullptr)
 {
 }
 
diff --git a/libtdepim/statusbarprogresswidget.cpp b/libtdepim/statusbarprogresswidget.cpp
index d0cd9d7d3..0f88d5c0e 100644
--- a/libtdepim/statusbarprogresswidget.cpp
+++ b/libtdepim/statusbarprogresswidget.cpp
@@ -59,8 +59,8 @@ using namespace KPIM;
 
 //-----------------------------------------------------------------------------
 StatusbarProgressWidget::StatusbarProgressWidget( ProgressDialog* progressDialog, TQWidget* parent, bool button )
-  : TQFrame( parent ), mCurrentItem( 0 ), mProgressDialog( progressDialog ),
-    mDelayTimer( 0 ), mBusyTimer( 0 )
+  : TQFrame( parent ), mCurrentItem( nullptr ), mProgressDialog( progressDialog ),
+    mDelayTimer( nullptr ), mBusyTimer( nullptr )
 {
   m_bShowButton = button;
   int w = fontMetrics().width( " 999.9 kB/s 00:00:01 " ) + 8;
@@ -126,7 +126,7 @@ void StatusbarProgressWidget::updateBusyMode()
   connectSingleItem(); // if going to 1 item
   if ( mCurrentItem ) { // Exactly one item
     delete mBusyTimer;
-    mBusyTimer = 0;
+    mBusyTimer = nullptr;
     mDelayTimer->start( 1000, true );
   }
   else { // N items
@@ -156,7 +156,7 @@ void StatusbarProgressWidget::slotProgressItemCompleted( ProgressItem *item )
     TQTimer::singleShot( 5000, this, TQ_SLOT( slotClean() ) );
   } else if ( mCurrentItem ) { // Exactly one item
     delete mBusyTimer;
-    mBusyTimer = 0;
+    mBusyTimer = nullptr;
     activateSingleItemMode();
   }
 }
@@ -166,7 +166,7 @@ void StatusbarProgressWidget::connectSingleItem()
   if ( mCurrentItem ) {
     disconnect ( mCurrentItem, TQ_SIGNAL( progressItemProgress( KPIM::ProgressItem *, unsigned int ) ),
                  this, TQ_SLOT( slotProgressItemProgress( KPIM::ProgressItem *, unsigned int ) ) );
-    mCurrentItem = 0;
+    mCurrentItem = nullptr;
   }
   mCurrentItem = ProgressManager::instance()->singleItem();
   if ( mCurrentItem ) {
diff --git a/libtdepim/tdeabcresourcecached.cpp b/libtdepim/tdeabcresourcecached.cpp
index 22f13e0e0..75eca73b8 100644
--- a/libtdepim/tdeabcresourcecached.cpp
+++ b/libtdepim/tdeabcresourcecached.cpp
@@ -32,9 +32,9 @@ using namespace TDEABC;
 ResourceCached::ResourceCached( const TDEConfig *config )
   : TDEABC::Resource( config ), mIdMapper( "tdeabc/uidmaps/" ),
     mReloadPolicy( ReloadInterval ),  mReloadInterval( 10 ),
-    mKABCReloadTimer( 0, "mKABCReloadTimer" ), mReloaded( false ),
+    mKABCReloadTimer( nullptr, "mKABCReloadTimer" ), mReloaded( false ),
     mSavePolicy( SaveDelayed ), mSaveInterval( 10 ),
-    mKABCSaveTimer( 0, "mKABCSaveTimer" )
+    mKABCSaveTimer( nullptr, "mKABCSaveTimer" )
 {
   connect( &mKABCReloadTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( slotKABCReload() ) );
   connect( &mKABCSaveTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( slotKABCSave() ) );
diff --git a/libtdepim/tdeconfigpropagator.cpp b/libtdepim/tdeconfigpropagator.cpp
index f802bdb93..5c1968d2f 100644
--- a/libtdepim/tdeconfigpropagator.cpp
+++ b/libtdepim/tdeconfigpropagator.cpp
@@ -62,7 +62,7 @@ void TDEConfigPropagator::ChangeConfig::apply()
 }
 
 TDEConfigPropagator::TDEConfigPropagator()
-  : mSkeleton( 0 )
+  : mSkeleton( nullptr )
 {
   init();
 }
@@ -202,7 +202,7 @@ TDEConfigSkeletonItem *TDEConfigPropagator::findItem( const TQString &group,
 {
 //  kdDebug() << "TDEConfigPropagator::findItem()" << endl;
 
-  if ( !mSkeleton ) return 0;
+  if ( !mSkeleton ) return nullptr;
 
   TDEConfigSkeletonItem::List items = mSkeleton->items();
   TDEConfigSkeletonItem::List::ConstIterator it;
@@ -213,7 +213,7 @@ TDEConfigSkeletonItem *TDEConfigPropagator::findItem( const TQString &group,
       break;
     }
   }
-  if ( it == items.end() ) return 0;
+  if ( it == items.end() ) return nullptr;
   else return *it;
 }
 
diff --git a/libtdepim/tdeconfigwizard.cpp b/libtdepim/tdeconfigwizard.cpp
index 026a8dd00..6c2cb0130 100644
--- a/libtdepim/tdeconfigwizard.cpp
+++ b/libtdepim/tdeconfigwizard.cpp
@@ -35,7 +35,7 @@ TDEConfigWizard::TDEConfigWizard( TQWidget *parent,
                               char *name, bool modal )
   : KDialogBase( TreeList, i18n("Configuration Wizard"), Ok|Cancel, Ok, parent,
                  name, modal ),
-    mPropagator( 0 ), mChangesPage( 0 )
+    mPropagator( nullptr ), mChangesPage( nullptr )
 {
   init();
 }
@@ -44,7 +44,7 @@ TDEConfigWizard::TDEConfigWizard( TDEConfigPropagator *propagator, TQWidget *par
                               char *name, bool modal )
   : KDialogBase( TreeList, i18n("Configuration Wizard"), Ok|Cancel, Ok, parent,
                  name, modal ),
-    mPropagator( propagator ), mChangesPage( 0 )
+    mPropagator( propagator ), mChangesPage( nullptr )
 {
   init();
 }
diff --git a/libtdepim/tdeconfigwizard.h b/libtdepim/tdeconfigwizard.h
index 4f4ac8b25..0a571e0f0 100644
--- a/libtdepim/tdeconfigwizard.h
+++ b/libtdepim/tdeconfigwizard.h
@@ -38,13 +38,13 @@ class TDE_EXPORT TDEConfigWizard : public KDialogBase
     /**
       Create wizard. You have to set a propgator with setPropagator() later.
     */
-    TDEConfigWizard( TQWidget *parent = 0, char *name = 0, bool modal = false );
+    TDEConfigWizard( TQWidget *parent = nullptr, char *name = nullptr, bool modal = false );
     /**
       Create wizard for given TDEConfigPropagator. The wizard takes ownership of
       the propagator.
     */
-    TDEConfigWizard( TDEConfigPropagator *propagator, TQWidget *parent = 0,
-                   char *name = 0, bool modal = false );
+    TDEConfigWizard( TDEConfigPropagator *propagator, TQWidget *parent = nullptr,
+                   char *name = nullptr, bool modal = false );
     /**
       Destructor.
     */
diff --git a/libtdepim/tdefileio.cpp b/libtdepim/tdefileio.cpp
index 7e423dc02..a72e97e59 100644
--- a/libtdepim/tdefileio.cpp
+++ b/libtdepim/tdefileio.cpp
@@ -28,7 +28,7 @@ namespace KPIM {
 //-----------------------------------------------------------------------------
 static void msgDialog(const TQString &msg)
 {
-  KMessageBox::sorry(0, msg, i18n("File I/O Error"));
+  KMessageBox::sorry(nullptr, msg, i18n("File I/O Error"));
 }
 
 
@@ -192,7 +192,7 @@ TDE_EXPORT bool kBytesToFile(const char* aBuffer, int len,
       TQString str;
       str = i18n("File %1 exists.\nDo you want to replace it?")
 		  .arg(aFileName);
-      rc = KMessageBox::warningContinueCancel(0,
+      rc = KMessageBox::warningContinueCancel(nullptr,
 	   str, i18n("Save to File"), i18n("&Replace"));
       if (rc != KMessageBox::Continue) return false;
     }
@@ -207,7 +207,7 @@ TDE_EXPORT bool kBytesToFile(const char* aBuffer, int len,
       {
 	// failed to rename file
 	if (!aVerbose) return false;
-	rc = KMessageBox::warningContinueCancel(0,
+	rc = KMessageBox::warningContinueCancel(nullptr,
 	     i18n("Failed to make a backup copy of %1.\nContinue anyway?")
 	     .arg(aFileName),
              i18n("Save to File"), KStdGuiItem::save() );
@@ -351,7 +351,7 @@ TQString checkAndCorrectPermissionsIfPossible( const TQString &toCheck,
       const TQFileInfoList *list = g.entryInfoList();
       TQFileInfoListIterator it( *list );
       TQFileInfo *fi;
-      while ((fi = it.current()) != 0) {
+      while ((fi = it.current()) != nullptr) {
         TQString newToCheck = toCheck + "/" + fi->fileName();
         TQFileInfo fiNewToCheck(newToCheck);
         if ( fi->fileName() != "." && fi->fileName() != ".." ) {
diff --git a/libtdepim/tdepartsdesignerplugin/tdepartsdesignerplugin.cpp b/libtdepim/tdepartsdesignerplugin/tdepartsdesignerplugin.cpp
index f1e4f941c..0e392055d 100644
--- a/libtdepim/tdepartsdesignerplugin/tdepartsdesignerplugin.cpp
+++ b/libtdepim/tdepartsdesignerplugin/tdepartsdesignerplugin.cpp
@@ -27,7 +27,7 @@
 #include <tdemacros.h>
 
 KPartsGenericPart::KPartsGenericPart( TQWidget* parentWidget, const char* name )
-    : TQWidget( parentWidget, name ), m_part( 0 )
+    : TQWidget( parentWidget, name ), m_part( nullptr )
 {
     TQVBoxLayout* layout = new TQVBoxLayout( this );
     layout->setAutoAdd( true );
@@ -48,7 +48,7 @@ void KPartsGenericPart::load()
         delete m_part;
     }
     // "this" is both the parent widget and the parent object
-    m_part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, TQString(), this, 0, this, 0 );
+    m_part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>( mimetype, TQString(), this, nullptr, this, nullptr );
     if ( m_part ) {
         m_part->openURL( m_url );
         m_part->widget()->show();
@@ -66,7 +66,7 @@ TQStringList KPartsWidgetPlugin::keys() const {
 TQWidget * KPartsWidgetPlugin::create( const TQString & key, TQWidget * parent, const char * name ) {
     if ( key == mykey )
         return new KPartsGenericPart( parent, name );
-    return 0;
+    return nullptr;
 }
 
 TQString KPartsWidgetPlugin::group( const TQString & key ) const {
diff --git a/libtdepim/weaver.cpp b/libtdepim/weaver.cpp
index 5743b57ba..625318f3f 100644
--- a/libtdepim/weaver.cpp
+++ b/libtdepim/weaver.cpp
@@ -31,7 +31,7 @@ namespace ThreadWeaver {
         : TQObject (parent, name),
           m_finished (false),
           m_mutex (new TQMutex (true) ),
-          m_thread (0)
+          m_thread (nullptr)
     {
     }
 
@@ -59,7 +59,7 @@ namespace ThreadWeaver {
 
         m_mutex->lock();
         setFinished (true);
-        m_thread = 0;
+        m_thread = nullptr;
         m_mutex->unlock();
     }
 
@@ -115,7 +115,7 @@ namespace ThreadWeaver {
 
         m_mutex->lock ();
         delete m_wc;
-        m_wc = 0;
+        m_wc = nullptr;
         m_mutex->unlock ();
     }
 
@@ -132,11 +132,11 @@ namespace ThreadWeaver {
     void Job::wakeAPR ()
     {
         TQMutexLocker l(m_mutex);
-        if ( m_wc!=0 )
+        if (m_wc)
         {
             m_wc->wakeOne ();
             delete m_wc;
-            m_wc = 0;
+            m_wc = nullptr;
         }
     }
 
@@ -157,11 +157,11 @@ namespace ThreadWeaver {
 
     Thread* Event::thread () const
     {
-        if ( m_thread != 0)
+        if (m_thread)
         {
             return m_thread;
         } else {
-            return 0;
+            return nullptr;
         }
     }
 
@@ -203,7 +203,7 @@ namespace ThreadWeaver {
 
     void Thread::run()
     {
-        Job *job = 0;
+        Job *job = nullptr;
 
         post ( Event::ThreadStarted );
 
@@ -213,7 +213,7 @@ namespace ThreadWeaver {
 
             job = m_parent->applyForWork ( this, job );
 
-            if (job == 0)
+            if (!job)
             {
                 break;
             } else {
@@ -400,7 +400,7 @@ namespace ThreadWeaver {
                 switch (event->action() )
                 {
                     case Event::JobFinished:
-                        if ( event->job() !=0 )
+                        if (event->job())
                         {
                             emit (jobDone (event->job() ) );
                         }
@@ -427,7 +427,7 @@ namespace ThreadWeaver {
                         break;
                 }
 
-                if ( event->job() !=0 )
+                if (event->job())
                 {
                     event->job()->processEvent (event);
                 }
@@ -455,7 +455,7 @@ namespace ThreadWeaver {
 
     Job* Weaver::applyForWork(Thread *th, Job* previous)
     {
-        Job *rc = 0;
+        Job *rc = nullptr;
         bool lastjob = false;
         bool suspended = false;
 
@@ -463,7 +463,7 @@ namespace ThreadWeaver {
         {
             lock();
 
-            if (previous != 0)
+            if (previous)
             {   // cleanup and send events:
                 --m_active;
 
@@ -489,13 +489,13 @@ namespace ThreadWeaver {
                 m_jobFinished.wakeOne();
             }
 
-            previous = 0;
+            previous = nullptr;
 
             if (m_shuttingDown == true)
             {
                 unlock();
 
-                return 0;
+                return nullptr;
             } else {
                 if ( !isEmpty() && m_suspend == false )
                 {
diff --git a/libtdepim/weaver.h b/libtdepim/weaver.h
index 5cffc86f1..907897e96 100644
--- a/libtdepim/weaver.h
+++ b/libtdepim/weaver.h
@@ -112,7 +112,7 @@ namespace ThreadWeaver {
             JobSPR, /// Synchronous Process Request
             JobAPR  /// Asynchronous Process Request
         };
-        Event ( Action = NoAction, Thread * = 0, Job *job = 0);
+        Event ( Action = NoAction, Thread * = nullptr, Job *job = nullptr);
         /** Return the (custom defined) event type. */
         static int type ();
         /** The ID of the sender thread. */
@@ -166,7 +166,7 @@ namespace ThreadWeaver {
   
     public:
         /** Construct a Job object. */
-        Job(TQObject* parent=0, const char* name=0);
+        Job(TQObject* parent=nullptr, const char* name=nullptr);
 
         /** Destructor. */
         virtual ~Job();
@@ -279,7 +279,7 @@ namespace ThreadWeaver {
         unsigned int id() const;
 
         /** Post an event, will be received and processed by the Weaver. */
-        void post (Event::Action, Job* = 0);
+        void post (Event::Action, Job* = nullptr);
 
     private:
         Weaver *m_parent;
@@ -298,7 +298,7 @@ namespace ThreadWeaver {
         TQ_OBJECT
   
     public:
-        Weaver (TQObject* parent=0, const char* name=0,
+        Weaver (TQObject* parent=nullptr, const char* name=nullptr,
                 int inventoryMin = 4, // minimal number of provided threads
                 int inventoryMax = 32); // maximum number of provided threads
         virtual ~Weaver ();
@@ -378,7 +378,7 @@ namespace ThreadWeaver {
             (GUI) thread. Different threads may use this method to communicate
             with the main thread.
             thread and job mark the objects associated with this event. */
-               void post (Event::Action, Thread* = 0, Job* = 0);
+               void post (Event::Action, Thread* = nullptr, Job* = nullptr);
         /** Returns the current number of threads in the inventory. */
         int threads () const;
     signals:
diff --git a/libtdepim/weaverextensions.h b/libtdepim/weaverextensions.h
index 52984a29d..94914eabd 100644
--- a/libtdepim/weaverextensions.h
+++ b/libtdepim/weaverextensions.h
@@ -34,7 +34,7 @@ namespace ThreadWeaver {
             TQ_OBJECT
   
         public:
-            WeaverExtension ( TQObject *parent = 0, const char *name = 0);
+            WeaverExtension ( TQObject *parent = nullptr, const char *name = nullptr);
             /** Attach() is a convenience method that will connect all our
             slots to signals emitted by the weaver. It is also possible to
             avoid attach() and only connect necessary signals. */
diff --git a/libtdepim/weaverlogger.h b/libtdepim/weaverlogger.h
index 889f080ea..b113acf80 100644
--- a/libtdepim/weaverlogger.h
+++ b/libtdepim/weaverlogger.h
@@ -27,7 +27,7 @@ namespace ThreadWeaver {
         TQ_OBJECT
   
     public:
-        WeaverThreadLogger( TQObject *parent = 0, const char *name = 0);
+        WeaverThreadLogger( TQObject *parent = nullptr, const char *name = nullptr);
         ~WeaverThreadLogger();
         void threadCreated (Thread *);
         void threadDestroyed (Thread *);
diff --git a/plugins/kmail/bodypartformatter/attendeeselector.cpp b/plugins/kmail/bodypartformatter/attendeeselector.cpp
index c0c893078..7afb09aaf 100644
--- a/plugins/kmail/bodypartformatter/attendeeselector.cpp
+++ b/plugins/kmail/bodypartformatter/attendeeselector.cpp
@@ -29,7 +29,7 @@
 #include <tqlayout.h>
 
 AttendeeSelector::AttendeeSelector(TQWidget * parent)
-  : KDialogBase( parent, 0, true, i18n("Select Attendees"), Ok|Cancel, NoDefault, true )
+  : KDialogBase( parent, nullptr, true, i18n("Select Attendees"), Ok|Cancel, NoDefault, true )
 {
   ui = new AttendeeSelectorWidget( this );
   setMainWidget( ui );
diff --git a/plugins/kmail/bodypartformatter/attendeeselector.h b/plugins/kmail/bodypartformatter/attendeeselector.h
index 05c73d5ff..b6671f3e6 100644
--- a/plugins/kmail/bodypartformatter/attendeeselector.h
+++ b/plugins/kmail/bodypartformatter/attendeeselector.h
@@ -32,7 +32,7 @@ class AttendeeSelector : public KDialogBase
   TQ_OBJECT
   
   public:
-    AttendeeSelector( TQWidget *parent = 0 );
+    AttendeeSelector( TQWidget *parent = nullptr );
 
     TQStringList attendees() const;
 
diff --git a/plugins/kmail/bodypartformatter/delegateselector.cpp b/plugins/kmail/bodypartformatter/delegateselector.cpp
index e4d3c6e1c..542aa38dd 100644
--- a/plugins/kmail/bodypartformatter/delegateselector.cpp
+++ b/plugins/kmail/bodypartformatter/delegateselector.cpp
@@ -29,7 +29,7 @@
 #include <tqvbox.h>
 
 DelegateSelector::DelegateSelector(TQWidget * parent)
-  : KDialogBase( parent, 0, true, i18n("Select delegate"), Ok|Cancel, Ok, true )
+  : KDialogBase( parent, nullptr, true, i18n("Select delegate"), Ok|Cancel, Ok, true )
 {
   TQVBox *page = makeVBoxMainWidget();
 
diff --git a/plugins/kmail/bodypartformatter/delegateselector.h b/plugins/kmail/bodypartformatter/delegateselector.h
index 775c88587..335c3690c 100644
--- a/plugins/kmail/bodypartformatter/delegateselector.h
+++ b/plugins/kmail/bodypartformatter/delegateselector.h
@@ -37,7 +37,7 @@ class DelegateSelector : public KDialogBase
   
 
   public:
-    DelegateSelector( TQWidget *parent = 0 );
+    DelegateSelector( TQWidget *parent = nullptr );
 
     TQString delegate() const;
     bool rsvp() const;
diff --git a/plugins/kmail/bodypartformatter/text_calendar.cpp b/plugins/kmail/bodypartformatter/text_calendar.cpp
index a6ea8bc50..d7d45494b 100644
--- a/plugins/kmail/bodypartformatter/text_calendar.cpp
+++ b/plugins/kmail/bodypartformatter/text_calendar.cpp
@@ -104,7 +104,7 @@ class CalendarManager
 };
 
 static KStaticDeleter<CalendarManager> sCalendarDeleter;
-CalendarManager* CalendarManager::mSelf = 0;
+CalendarManager* CalendarManager::mSelf = nullptr;
 
 CalendarManager::CalendarManager()
 {
@@ -130,14 +130,14 @@ CalendarManager::CalendarManager()
   if ( multipleKolabResources ) {
     kdDebug() << k_funcinfo << "disabling calendar lookup because multiple active Kolab resources" << endl;
     delete mCalendar;
-    mCalendar = 0;
+    mCalendar = nullptr;
   }
 }
 
 CalendarManager::~CalendarManager()
 {
   delete mCalendar;
-  mSelf = 0;
+  mSelf = nullptr;
 }
 
 Calendar* CalendarManager::calendar()
@@ -220,7 +220,7 @@ static Incidence *icalToString( const TQString &iCal )
     format.parseScheduleMessage( &calendar, iCal );
   if ( !message )
     //TODO: Error message?
-    return 0;
+    return nullptr;
   return dynamic_cast<Incidence*>( message->event() );
 }
 
@@ -243,7 +243,7 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
     {
       Attendee::List attendees = incidence->attendees();
       Attendee::List::ConstIterator it;
-      Attendee* myself = 0;
+      Attendee* myself = nullptr;
       // Find myself. There will always be all attendees listed, even if
       // only I need to answer it.
       for ( it = attendees.begin(); it != attendees.end(); ++it ) {
@@ -298,7 +298,7 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
     Attendee* setStatusOnMyself( Incidence* incidence, Attendee* myself,
                             Attendee::PartStat status, const TQString &receiver ) const
     {
-      Attendee* newMyself = 0;
+      Attendee* newMyself = nullptr;
       TQString name;
       TQString email;
       KPIM::getNameAndMail( receiver, name, email );
@@ -409,7 +409,7 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
                                    true ) );
       TQTextStream* ts = file.textStream();
       if ( !ts ) {
-        KMessageBox::error( 0, i18n("Could not save file to KOrganizer") );
+        KMessageBox::error( nullptr, i18n("Could not save file to KOrganizer") );
         return false;
       }
       ts->setEncoding( TQTextStream::UnicodeUTF8 );
@@ -530,7 +530,7 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
         }
 
         if ( KMessageBox::warningYesNo(
-               0,
+               nullptr,
                i18n( "%1\n%2" ).arg( warnStr ).arg( queryStr ) ) == KMessageBox::No ) {
           return true;
         }
@@ -584,7 +584,7 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
         if ( delegateString.isEmpty() )
           return true;
         if ( KPIM::compareEmail( delegateString, incidence->organizer().email(), false ) ) {
-          KMessageBox::sorry( 0, i18n("Delegation to organizer is not possible.") );
+          KMessageBox::sorry( nullptr, i18n("Delegation to organizer is not possible.") );
           return true;
         }
       }
@@ -622,7 +622,7 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
 
       } else if ( !myself && (status != Attendee::Declined) ) {
         // forwarded invitation
-        Attendee* newMyself = 0;
+        Attendee* newMyself = nullptr;
         TQString name;
         TQString email;
         KPIM::getNameAndMail( receiver, name, email );
@@ -730,7 +730,7 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
     {
       if ( !CalHelper::hasMyWritableEventsFolders( "calendar" ) ) {
         KMessageBox::error(
-          0,
+          nullptr,
           i18n( "You have no writable calendar folders for invitations, "
                 "so storing or saving a response will not be possible.\n"
                 "Please create at least 1 writable events calendar and re-sync." ) );
@@ -750,7 +750,7 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
       Incidence *incidence = icalToString( iCal );
       if ( !incidence ) {
         KMessageBox::sorry(
-          0,
+          nullptr,
           i18n( "The calendar invitation stored in this email message is broken in some way. "
                 "Unable to continue." ) );
         return false;
@@ -804,7 +804,7 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
 
         int response =
           KMessageBox::questionYesNoCancel(
-          0,
+          nullptr,
           i18n( "The organizer is not expecting a reply to this invitation "
                 "but you can send them an email message if you desire.\n\n"
                 "Would you like to send the organizer a message regarding this invitation?\n"
@@ -845,7 +845,7 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
       if ( path.startsWith( "ATTACH:" ) ) {
         TQString name = path;
         name.remove( TQRegExp( "^ATTACH:" ) );
-        result = AttachmentHandler::view( 0, name, icalToMessage( iCal ) );
+        result = AttachmentHandler::view( nullptr, name, icalToMessage( iCal ) );
       }
 
       if ( result ) {
@@ -882,10 +882,10 @@ class UrlHandler : public KMail::Interface::BodyPartURLHandler
 
       switch( menu->exec( point, 0 ) ) {
       case 0: // open
-        AttachmentHandler::view( 0, name, icalToMessage( iCal ) );
+        AttachmentHandler::view( nullptr, name, icalToMessage( iCal ) );
         break;
       case 1: // save as
-        AttachmentHandler::saveAs( 0, name, icalToMessage( iCal ) );
+        AttachmentHandler::saveAs( nullptr, name, icalToMessage( iCal ) );
         break;
       default:
         break;
@@ -942,26 +942,26 @@ class Plugin : public KMail::Interface::BodyPartFormatterPlugin
     const KMail::Interface::BodyPartFormatter *bodyPartFormatter( int idx ) const
     {
       if ( idx == 0 || idx == 1 ) return new Formatter();
-      else return 0;
+      else return nullptr;
     }
 
     const char *type( int idx ) const
     {
       if ( idx == 0 || idx == 1 ) return "text";
-      else return 0;
+      else return nullptr;
     }
 
     const char *subtype( int idx ) const
     {
       if ( idx == 0 ) return "calendar";
       if ( idx == 1 ) return "x-vcalendar";
-      else return 0;
+      else return nullptr;
     }
 
     const KMail::Interface::BodyPartURLHandler * urlHandler( int idx ) const
     {
       if ( idx == 0 ) return new UrlHandler();
-      else return 0;
+      else return nullptr;
     }
 };
 
diff --git a/plugins/kmail/bodypartformatter/text_vcard.cpp b/plugins/kmail/bodypartformatter/text_vcard.cpp
index 215c83c8d..3ed92806d 100644
--- a/plugins/kmail/bodypartformatter/text_vcard.cpp
+++ b/plugins/kmail/bodypartformatter/text_vcard.cpp
@@ -100,7 +100,7 @@ namespace {
           TDEABC::Addressee a = (*it);
           if ( a.isEmpty() ) return AsIcon;
 
-          TQString contact = AddresseeView::vCardAsHTML( a, 0L, AddresseeView::NoLinks, false, AddresseeView::DefaultFields );
+          TQString contact = AddresseeView::vCardAsHTML( a, nullptr, AddresseeView::NoLinks, false, AddresseeView::DefaultFields );
           writer->queue( contact );
 
           TQString addToLinkText = i18n( "[Add this contact to the addressbook]" );
@@ -137,7 +137,7 @@ namespace {
       if ( index == -1 ) return true;
       TDEABC::Addressee a = al[index];
       if ( a.isEmpty() ) return true;
-      KAddrBookExternal::addVCard( a, 0 );
+      KAddrBookExternal::addVCard( a, nullptr );
       return true;
     }
 
@@ -202,7 +202,7 @@ namespace {
     bool openVCard( const TDEABC::Addressee &a, const TQString &vCard ) const
     {
       Q_UNUSED( vCard );
-      AddresseeView *view = new AddresseeView( 0 );
+      AddresseeView *view = new AddresseeView( nullptr );
       view->setVScrollBarMode( TQScrollView::Auto );
       if ( a.isEmpty() ) {
         view->setText( i18n( "Failed to parse the business card." ) );
@@ -221,12 +221,12 @@ namespace {
       // get the saveas file name
       KURL saveAsUrl =
         KFileDialog::getSaveURL( fileName,
-                                 TQString(), 0,
+                                 TQString(), nullptr,
                                  i18n( "Save Business Card" ) );
       if ( saveAsUrl.isEmpty() ||
            ( TQFileInfo( saveAsUrl.path() ).exists() &&
              ( KMessageBox::warningYesNo(
-               0,
+               nullptr,
                i18n( "%1 already exists. Do you want to overwrite it?").
                arg( saveAsUrl.path() ) ) == KMessageBox::No ) ) ) {
         return false;
@@ -240,24 +240,24 @@ namespace {
       tmpFile.file()->writeBlock( data.data(), data.size() );
       tmpFile.close();
 
-      return TDEIO::NetAccess::upload( tmpFile.name(), saveAsUrl, 0 );
+      return TDEIO::NetAccess::upload( tmpFile.name(), saveAsUrl, nullptr );
     }
   };
 
   class Plugin : public KMail::Interface::BodyPartFormatterPlugin {
   public:
     const KMail::Interface::BodyPartFormatter * bodyPartFormatter( int idx ) const {
-      return validIndex( idx ) ? new Formatter() : 0 ;
+      return validIndex( idx ) ? new Formatter() : nullptr ;
     }
     const char * type( int idx ) const {
-      return validIndex( idx ) ? "text" : 0 ;
+      return validIndex( idx ) ? "text" : nullptr ;
     }
     const char * subtype( int idx ) const {
-      return idx == 0 ? "x-vcard" : idx == 1 ? "vcard" : 0 ;
+      return idx == 0 ? "x-vcard" : idx == 1 ? "vcard" : nullptr ;
     }
 
     const KMail::Interface::BodyPartURLHandler * urlHandler( int idx ) const {
-       return validIndex( idx ) ? new UrlHandler() : 0 ;
+       return validIndex( idx ) ? new UrlHandler() : nullptr ;
     }
   private:
     bool validIndex( int idx ) const {
diff --git a/plugins/kmail/bodypartformatter/text_xdiff.cpp b/plugins/kmail/bodypartformatter/text_xdiff.cpp
index 7a229f03e..ef51eec43 100644
--- a/plugins/kmail/bodypartformatter/text_xdiff.cpp
+++ b/plugins/kmail/bodypartformatter/text_xdiff.cpp
@@ -131,16 +131,16 @@ namespace {
   class Plugin : public KMail::Interface::BodyPartFormatterPlugin {
   public:
     const KMail::Interface::BodyPartFormatter * bodyPartFormatter( int idx ) const {
-      return idx == 0 ? new Formatter() : 0 ;
+      return idx == 0 ? new Formatter() : nullptr ;
     }
     const char * type( int idx ) const {
-      return idx == 0 ? "text" : 0 ;
+      return idx == 0 ? "text" : nullptr ;
     }
     const char * subtype( int idx ) const {
-      return idx == 0 ? "x-diff" : 0 ;
+      return idx == 0 ? "x-diff" : nullptr ;
     }
 
-    const KMail::Interface::BodyPartURLHandler * urlHandler( int ) const { return 0; }
+    const KMail::Interface::BodyPartURLHandler * urlHandler( int ) const { return nullptr; }
   };
 
 }
diff --git a/tdefile-plugins/ics/tdefile_ics.cpp b/tdefile-plugins/ics/tdefile_ics.cpp
index 11a5384fb..ef88b5943 100644
--- a/tdefile-plugins/ics/tdefile_ics.cpp
+++ b/tdefile-plugins/ics/tdefile_ics.cpp
@@ -38,7 +38,7 @@ ICSPlugin::ICSPlugin( TQObject *parent, const char *name, const TQStringList& ar
 {
   KFileMimeTypeInfo* info = addMimeTypeInfo( "text/calendar" ); //TODO: vcs !!
 
-  KFileMimeTypeInfo::GroupInfo* group = 0L;
+  KFileMimeTypeInfo::GroupInfo* group = nullptr;
   group = addGroupInfo(info, "ICSInfo", i18n("Calendar Statistics"));
 
   addItemInfo( group, "ProductID",   i18n("Product ID"),     TQVariant::String );
diff --git a/tdefile-plugins/vcf/tdefile_vcf.cpp b/tdefile-plugins/vcf/tdefile_vcf.cpp
index 075246953..07693c433 100644
--- a/tdefile-plugins/vcf/tdefile_vcf.cpp
+++ b/tdefile-plugins/vcf/tdefile_vcf.cpp
@@ -40,7 +40,7 @@ KVcfPlugin::KVcfPlugin(TQObject *parent, const char *name,
 {
     KFileMimeTypeInfo* info = addMimeTypeInfo( "text/x-vcard" );
 
-    KFileMimeTypeInfo::GroupInfo* group = 0L;
+    KFileMimeTypeInfo::GroupInfo* group = nullptr;
 
     group = addGroupInfo(info, "Technical", i18n("Technical Details"));
 
diff --git a/wizards/egroupwaremain.cpp b/wizards/egroupwaremain.cpp
index baff8afb8..5e574c7aa 100644
--- a/wizards/egroupwaremain.cpp
+++ b/wizards/egroupwaremain.cpp
@@ -28,7 +28,7 @@
 
 static const TDECmdLineOptions options[] =
 {
-  {"verbose", "Verbose output", 0},
+  {"verbose", "Verbose output", nullptr},
   TDECmdLineLastOption
 };
 
diff --git a/wizards/exchangemain.cpp b/wizards/exchangemain.cpp
index 923c575d5..9afaeb500 100644
--- a/wizards/exchangemain.cpp
+++ b/wizards/exchangemain.cpp
@@ -29,7 +29,7 @@
 
 static const TDECmdLineOptions options[] =
 {
-  {"verbose", "Verbose output", 0},
+  {"verbose", "Verbose output", nullptr},
   TDECmdLineLastOption
 };
 
diff --git a/wizards/exchangewizard.cpp b/wizards/exchangewizard.cpp
index 35c8fe3bc..b3a879398 100644
--- a/wizards/exchangewizard.cpp
+++ b/wizards/exchangewizard.cpp
@@ -170,7 +170,7 @@ class ExchangePropagator : public TDEConfigPropagator
 {
   public:
     ExchangePropagator()
-      : TDEConfigPropagator( /*ExchangeConfig::self()*/ 0, "exchange.kcfg" )
+      : TDEConfigPropagator( /*ExchangeConfig::self()*/ nullptr, "exchange.kcfg" )
     {
     }
 
diff --git a/wizards/groupwarewizard.h b/wizards/groupwarewizard.h
index 03923ac31..262389bef 100644
--- a/wizards/groupwarewizard.h
+++ b/wizards/groupwarewizard.h
@@ -32,7 +32,7 @@ class GroupwareWizard : public TQWidget
   
 
   public:
-    GroupwareWizard( TQWidget *parent, const char *name = 0 );
+    GroupwareWizard( TQWidget *parent, const char *name = nullptr );
     ~GroupwareWizard();
 
   private:
diff --git a/wizards/groupwisemain.cpp b/wizards/groupwisemain.cpp
index 9de56eb1c..f5f0ab738 100644
--- a/wizards/groupwisemain.cpp
+++ b/wizards/groupwisemain.cpp
@@ -29,7 +29,7 @@
 
 static const TDECmdLineOptions options[] =
 {
-  {"verbose", "Verbose output", 0},
+  {"verbose", "Verbose output", nullptr},
   TDECmdLineLastOption
 };
 
diff --git a/wizards/kmailchanges.cpp b/wizards/kmailchanges.cpp
index b3e9297d8..a669b0b98 100644
--- a/wizards/kmailchanges.cpp
+++ b/wizards/kmailchanges.cpp
@@ -40,14 +40,14 @@ static const char* s_folderContentsType[] = {
   I18N_NOOP( "Tasks" ),
   I18N_NOOP( "Journal" ) };
 
-Wallet* CreateImapAccount::mWallet = 0;
+Wallet* CreateImapAccount::mWallet = nullptr;
 
 CreateImapAccount::CreateImapAccount( const TQString &accountName, const TQString &title )
   : TDEConfigPropagator::Change( title ),
     mAccountName( accountName ), mPort( 993 ), mEnableSieve( false ), mEnableSavePassword( true ),
     mEncryption( None ), mAuthentication( NONE ), mAuthenticationSend( PLAIN ), mSmtpPort( 25 ),
     mExistingAccountId( -1 ), mExistingTransportId( -1 ),
-    mCustomWriter( 0 )
+    mCustomWriter( nullptr )
 {
 }
 
diff --git a/wizards/kolabmain.cpp b/wizards/kolabmain.cpp
index 388478ca1..ff9c7b44d 100644
--- a/wizards/kolabmain.cpp
+++ b/wizards/kolabmain.cpp
@@ -30,7 +30,7 @@
 
 static const TDECmdLineOptions options[] =
 {
-  {"verbose", "Verbose output", 0},
+  {"verbose", "Verbose output", nullptr},
   TDECmdLineLastOption
 };
 
diff --git a/wizards/kolabwizard.cpp b/wizards/kolabwizard.cpp
index ca338d664..4d4143b5f 100644
--- a/wizards/kolabwizard.cpp
+++ b/wizards/kolabwizard.cpp
@@ -105,7 +105,7 @@ class CreateCalendarImapResource : public TDEConfigPropagator::Change
     {
       KCal::CalendarResourceManager m( "calendar" );
       m.readConfig();
-      KCal::ResourceKolab *r = new KCal::ResourceKolab( 0 );
+      KCal::ResourceKolab *r = new KCal::ResourceKolab( nullptr );
       r->setResourceName( i18n("Kolab Server") );
       m.add( r );
       m.setStandardResource( r );
@@ -125,7 +125,7 @@ class CreateContactImapResource : public TDEConfigPropagator::Change
     {
       KRES::Manager<TDEABC::Resource> m( "contact" );
       m.readConfig();
-      TDEABC::ResourceKolab *r = new TDEABC::ResourceKolab( 0 );
+      TDEABC::ResourceKolab *r = new TDEABC::ResourceKolab( nullptr );
       r->setResourceName( i18n("Kolab Server") );
       m.add( r );
       m.setStandardResource( r );
@@ -146,7 +146,7 @@ class CreateNotesImapResource : public TDEConfigPropagator::Change
     {
       KRES::Manager<ResourceNotes> m( "notes" );
       m.readConfig();
-      Kolab::ResourceKolab *r = new Kolab::ResourceKolab( 0 );
+      Kolab::ResourceKolab *r = new Kolab::ResourceKolab( nullptr );
       r->setResourceName( i18n("Kolab Server") );
       m.add( r );
       m.setStandardResource( r );
diff --git a/wizards/main.cpp b/wizards/main.cpp
index b6c2de25e..6e883258a 100644
--- a/wizards/main.cpp
+++ b/wizards/main.cpp
@@ -8,7 +8,7 @@
 
 static const TDECmdLineOptions options[] =
 {
-  { "serverType <type>", "The server type", 0 },
+  { "serverType <type>", "The server type", nullptr },
   TDECmdLineLastOption
 };
 
@@ -31,7 +31,7 @@ int main( int argc, char **argv )
   if ( args->isSet( "serverType" ) )
     serverType = args->getOption( "serverType" );
 
-  GroupwareWizard wizard( 0 );
+  GroupwareWizard wizard( nullptr );
   app.setMainWidget( &wizard );
 
   wizard.show();
diff --git a/wizards/overviewpage.h b/wizards/overviewpage.h
index 6701d9c16..480e17272 100644
--- a/wizards/overviewpage.h
+++ b/wizards/overviewpage.h
@@ -30,7 +30,7 @@ class OverViewPage : public TQWidget
   
 
   public:
-    OverViewPage( TQWidget *parent, const char *name = 0 );
+    OverViewPage( TQWidget *parent, const char *name = nullptr );
     ~OverViewPage();
 
   private slots:
diff --git a/wizards/scalixmain.cpp b/wizards/scalixmain.cpp
index 16920c01b..0745809ef 100644
--- a/wizards/scalixmain.cpp
+++ b/wizards/scalixmain.cpp
@@ -30,7 +30,7 @@
 
 static const TDECmdLineOptions options[] =
 {
-  {"verbose", "Verbose output", 0},
+  {"verbose", "Verbose output", nullptr},
   TDECmdLineLastOption
 };
 
diff --git a/wizards/scalixwizard.cpp b/wizards/scalixwizard.cpp
index 3aa5634c0..9ce80285d 100644
--- a/wizards/scalixwizard.cpp
+++ b/wizards/scalixwizard.cpp
@@ -161,7 +161,7 @@ class CreateCalendarImapResource : public TDEConfigPropagator::Change
     {
       KCal::CalendarResourceManager m( "calendar" );
       m.readConfig();
-      KCal::ResourceScalix *r = new KCal::ResourceScalix( 0 );
+      KCal::ResourceScalix *r = new KCal::ResourceScalix( nullptr );
       r->setResourceName( i18n("Scalix Server") );
       m.add( r );
       m.setStandardResource( r );
@@ -181,7 +181,7 @@ class CreateContactImapResource : public TDEConfigPropagator::Change
     {
       KRES::Manager<TDEABC::Resource> m( "contact" );
       m.readConfig();
-      TDEABC::ResourceScalix *r = new TDEABC::ResourceScalix( 0 );
+      TDEABC::ResourceScalix *r = new TDEABC::ResourceScalix( nullptr );
       r->setResourceName( i18n("Scalix Server") );
       m.add( r );
       m.setStandardResource( r );
@@ -213,7 +213,7 @@ class SynchronizeScalixAccount : public TDEConfigPropagator::Change
         findServiceFor( "DCOP/ResourceBackend/IMAP", TQString(),
                         TQString(), &error, &dcopService );
       if ( result != 0 ) {
-        KMessageBox::error( 0, i18n( "Unable to start KMail to trigger initial synchronization with Scalix server" ) );
+        KMessageBox::error( nullptr, i18n( "Unable to start KMail to trigger initial synchronization with Scalix server" ) );
         delete msg;
         return;
       }
diff --git a/wizards/servertypemanager.cpp b/wizards/servertypemanager.cpp
index e91374ae0..b4614c16a 100644
--- a/wizards/servertypemanager.cpp
+++ b/wizards/servertypemanager.cpp
@@ -25,7 +25,7 @@
 
 #include "servertypemanager.h"
 
-ServerTypeManager* ServerTypeManager::mSelf = 0;
+ServerTypeManager* ServerTypeManager::mSelf = nullptr;
 static KStaticDeleter<ServerTypeManager> serverManagerDeleter;
 
 ServerTypeManager::ServerTypeManager( TQObject *parent, const char *name )
diff --git a/wizards/sloxmain.cpp b/wizards/sloxmain.cpp
index 20dbcb665..794ccb058 100644
--- a/wizards/sloxmain.cpp
+++ b/wizards/sloxmain.cpp
@@ -29,7 +29,7 @@
 
 static const TDECmdLineOptions options[] =
 {
-  {"verbose", "Verbose output", 0},
+  {"verbose", "Verbose output", nullptr},
   TDECmdLineLastOption
 };
 
-- 
cgit v1.2.3

