From 21c406d60aad5a7aa9256c2e44a4608680ea55d6 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sun, 8 Nov 2026 08:04:33 -0300
Subject: Replace zero pointer constants in news and mail components
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>
---
 kmailcvt/filter_evolution_v2.cpp   |   2 +-
 kmailcvt/filter_kmail_maildir.cpp  |   2 +-
 kmailcvt/filter_lnotes.cpp         |   2 +-
 kmailcvt/filter_opera.cpp          |   2 +-
 kmailcvt/filter_pmail.cpp          |   2 +-
 kmailcvt/filter_sylpheed.cpp       |   2 +-
 kmailcvt/filter_thebat.cpp         |   2 +-
 kmailcvt/filter_thunderbird.cpp    |   2 +-
 kmailcvt/kimportpage.h             |   2 +-
 kmailcvt/kmailcvt.h                |   2 +-
 kmailcvt/kselfilterpage.h          |   2 +-
 knode/aboutdata.cpp                |  22 ++--
 knode/articlewidget.cpp            |  20 +--
 knode/articlewidget.h              |   2 +-
 knode/headerview.cpp               |  12 +-
 knode/headerview.h                 |   4 +-
 knode/knaccountmanager.cpp         |  20 +--
 knode/knaccountmanager.h           |  10 +-
 knode/knarticle.cpp                |  18 +--
 knode/knarticle.h                  |  12 +-
 knode/knarticlecollection.cpp      |  30 ++---
 knode/knarticlecollection.h        |  10 +-
 knode/knarticlefactory.cpp         |  24 ++--
 knode/knarticlefactory.h           |   6 +-
 knode/knarticlefilter.cpp          |  22 ++--
 knode/knarticlemanager.cpp         |  38 +++---
 knode/knarticlewindow.cpp          |   2 +-
 knode/kncleanup.cpp                |   8 +-
 knode/kncollection.cpp             |   2 +-
 knode/kncollectionview.cpp         |  16 +--
 knode/kncollectionview.h           |   2 +-
 knode/kncollectionviewitem.cpp     |   6 +-
 knode/kncomposer.cpp               |  64 +++++-----
 knode/kncomposer.h                 |  14 +-
 knode/knconfig.cpp                 |   5 +-
 knode/knconfigmanager.cpp          |   4 +-
 knode/knconfigmanager.h            |   4 +-
 knode/knconfigpages.h              |   8 +-
 knode/knconfigwidgets.cpp          |  18 +--
 knode/knconfigwidgets.h            |  42 +++---
 knode/knconvert.cpp                |  10 +-
 knode/kndisplayedheader.cpp        |   8 +-
 knode/knfilterconfigwidget.h       |   2 +-
 knode/knfilterdialog.h             |   2 +-
 knode/knfiltermanager.cpp          |  16 +--
 knode/knfiltermanager.h            |   2 +-
 knode/knfolder.cpp                 |  10 +-
 knode/knfolder.h                   |   4 +-
 knode/knfoldermanager.cpp          |  12 +-
 knode/knfoldermanager.h            |   2 +-
 knode/knglobals.cpp                |  18 +--
 knode/kngroup.cpp                  |  12 +-
 knode/kngroup.h                    |   6 +-
 knode/kngroupbrowser.cpp           |   6 +-
 knode/kngroupbrowser.h             |   2 +-
 knode/kngroupdialog.cpp            |   6 +-
 knode/kngroupmanager.cpp           |  24 ++--
 knode/kngroupmanager.h             |  18 +--
 knode/kngrouppropdlg.h             |   2 +-
 knode/kngroupselectdialog.cpp      |   4 +-
 knode/knhdrviewitem.cpp            |   2 +-
 knode/knhdrviewitem.h              |   4 +-
 knode/knjobdata.cpp                |  12 +-
 knode/knjobdata.h                  |   2 +-
 knode/knmainwidget.cpp             |  72 +++++------
 knode/knmemorymanager.cpp          |   6 +-
 knode/knnetaccess.cpp              |  14 +-
 knode/knnetaccess.h                |   2 +-
 knode/knnntpaccount.cpp            |  12 +-
 knode/knnntpclient.cpp             |   4 +-
 knode/knode.cpp                    |   4 +-
 knode/knode.h                      |   2 +-
 knode/knode_options.h              |   2 +-
 knode/knprotocolclient.cpp         |   4 +-
 knode/knscoring.cpp                |   2 +-
 knode/knsearchdialog.h             |   2 +-
 knode/knserverinfo.cpp             |   2 +-
 knode/knsourceviewwindow.cpp       |   2 +-
 knode/knstatusfilter.cpp           |   2 +-
 knode/knstringfilter.cpp           |   4 +-
 knode/knwidgets.h                  |   6 +-
 knode/utilities.cpp                |  36 +++---
 knode/utilities.h                  |   8 +-
 ktnef/gui/attachpropertydialog.cpp |   6 +-
 ktnef/gui/attachpropertydialog.h   |   2 +-
 ktnef/gui/ktnefmain.cpp            |   4 +-
 ktnef/gui/ktnefmain.h              |   2 +-
 ktnef/gui/ktnefview.h              |   2 +-
 ktnef/gui/main.cpp                 |   4 +-
 ktnef/ktnef/ktnefparser.h          |   2 +-
 ktnef/lib/ktnefmessage.cpp         |   2 +-
 ktnef/lib/ktnefparser.cpp          |  20 +--
 ktnef/lib/mapi.cpp                 |   4 +-
 ktnef/tests/parsertest.cpp         |  18 +--
 libkmime/kmime_codec_uuencode.cpp  |   2 +-
 libkmime/kmime_codecs.cpp          |   4 +-
 libkmime/kmime_content.cpp         |  28 ++--
 libkmime/kmime_content.h           |  10 +-
 libkmime/kmime_header_parsing.cpp  |  16 +--
 libkmime/kmime_header_parsing.h    |   2 +-
 libkmime/kmime_headers.cpp         |  34 ++---
 libkmime/kmime_headers.h           |  18 +--
 libkmime/kmime_headers_obs.h       |  10 +-
 libkmime/kmime_mdn.cpp             |   8 +-
 libkmime/kmime_message.cpp         |  18 +--
 libkmime/kmime_message.h           |  22 ++--
 libkmime/kmime_newsarticle.cpp     |  24 ++--
 libkmime/kmime_newsarticle.h       |  12 +-
 libkmime/kmime_util.cpp            |  18 +--
 mimelib/address.cpp                |   6 +-
 mimelib/addrlist.cpp               |  16 +--
 mimelib/body.cpp                   |  30 ++---
 mimelib/bodypart.cpp               |  10 +-
 mimelib/boyermor.cpp               |  18 +--
 mimelib/datetime.cpp               |   6 +-
 mimelib/disptype.cpp               |  12 +-
 mimelib/dwstring.cpp               | 256 ++++++++++++++++++-------------------
 mimelib/entity.cpp                 |  18 +--
 mimelib/field.cpp                  |  22 ++--
 mimelib/group.cpp                  |   2 +-
 mimelib/headers.cpp                |  58 ++++-----
 mimelib/mailbox.cpp                |   2 +-
 mimelib/mboxlist.cpp               |  18 +--
 mimelib/mechansm.cpp               |   2 +-
 mimelib/mediatyp.cpp               |  16 +--
 mimelib/message.cpp                |   2 +-
 mimelib/mimelib/address.h          |   2 +-
 mimelib/mimelib/addrlist.h         |   2 +-
 mimelib/mimelib/body.h             |   2 +-
 mimelib/mimelib/bodypart.h         |   2 +-
 mimelib/mimelib/datetime.h         |   2 +-
 mimelib/mimelib/disptype.h         |   2 +-
 mimelib/mimelib/entity.h           |   4 +-
 mimelib/mimelib/field.h            |   2 +-
 mimelib/mimelib/fieldbdy.h         |   2 +-
 mimelib/mimelib/group.h            |   2 +-
 mimelib/mimelib/headers.h          |   2 +-
 mimelib/mimelib/mailbox.h          |   2 +-
 mimelib/mimelib/mboxlist.h         |   2 +-
 mimelib/mimelib/mechansm.h         |   2 +-
 mimelib/mimelib/mediatyp.h         |   2 +-
 mimelib/mimelib/message.h          |   2 +-
 mimelib/mimelib/msgcmp.h           |   2 +-
 mimelib/mimelib/msgid.h            |   2 +-
 mimelib/mimelib/nntp.h             |   4 +-
 mimelib/mimelib/param.h            |   2 +-
 mimelib/mimelib/text.h             |   2 +-
 mimelib/msgcmp.cpp                 |  12 +-
 mimelib/msgid.cpp                  |   4 +-
 mimelib/nntp.cpp                   |   8 +-
 mimelib/param.cpp                  |  10 +-
 mimelib/pop.cpp                    |   6 +-
 mimelib/protocol.cpp               |  10 +-
 mimelib/text.cpp                   |   2 +-
 mimelib/token.cpp                  |   4 +-
 155 files changed, 863 insertions(+), 864 deletions(-)

diff --git a/kmailcvt/filter_evolution_v2.cpp b/kmailcvt/filter_evolution_v2.cpp
index e0eb6d31a..4f18b9794 100644
--- a/kmailcvt/filter_evolution_v2.cpp
+++ b/kmailcvt/filter_evolution_v2.cpp
@@ -56,7 +56,7 @@ void FilterEvolution_v2::import(FilterInfo *info)
 
     //TQString mailDir = KFileDialog::getExistingDirectory(TQDir::homeDirPath(), info->parent());
     KFileDialog *kfd;
-    kfd = new KFileDialog( evolDir, "", 0, "tdefiledialog", true );
+    kfd = new KFileDialog( evolDir, "", nullptr, "tdefiledialog", true );
     kfd->setMode(KFile::Directory | KFile::LocalOnly);
     kfd->exec();
     mailDir = kfd->selectedFile();
diff --git a/kmailcvt/filter_kmail_maildir.cpp b/kmailcvt/filter_kmail_maildir.cpp
index df432925f..f0bdaeb68 100644
--- a/kmailcvt/filter_kmail_maildir.cpp
+++ b/kmailcvt/filter_kmail_maildir.cpp
@@ -47,7 +47,7 @@ void FilterKMail_maildir::import( FilterInfo *info )
     TQString _homeDir = TQDir::homeDirPath();
 
     KFileDialog *kfd;
-    kfd = new KFileDialog( _homeDir, "", 0, "tdefiledialog", true );
+    kfd = new KFileDialog( _homeDir, "", nullptr, "tdefiledialog", true );
     kfd->setMode( KFile::Directory | KFile::LocalOnly );
     kfd->exec();
     mailDir = kfd->selectedFile();
diff --git a/kmailcvt/filter_lnotes.cpp b/kmailcvt/filter_lnotes.cpp
index 7c50f4c14..ef0ff323f 100644
--- a/kmailcvt/filter_lnotes.cpp
+++ b/kmailcvt/filter_lnotes.cpp
@@ -91,7 +91,7 @@ void FilterLNotes::ImportLNotes(const TQString& file) {
         int ch = 0;
         int state = 0;
         int n = 0;
-        KTempFile *tempfile = 0;
+        KTempFile *tempfile = nullptr;
 
         // Get folder name
         TQFileInfo filenameInfo( file );
diff --git a/kmailcvt/filter_opera.cpp b/kmailcvt/filter_opera.cpp
index ff5376957..3aeb27bfc 100644
--- a/kmailcvt/filter_opera.cpp
+++ b/kmailcvt/filter_opera.cpp
@@ -50,7 +50,7 @@ void FilterOpera::import(FilterInfo *info)
 
     //TQString mailDir = KFileDialog::getExistingDirectory(TQDir::homeDirPath(), info->parent());
     KFileDialog *kfd;
-    kfd = new KFileDialog( startdir, "", 0, "tdefiledialog", true );
+    kfd = new KFileDialog( startdir, "", nullptr, "tdefiledialog", true );
     kfd->setMode(KFile::Directory | KFile::LocalOnly);
     kfd->exec();
     TQString operaDir = kfd->selectedFile();
diff --git a/kmailcvt/filter_pmail.cpp b/kmailcvt/filter_pmail.cpp
index b45a0be41..5b0265774 100644
--- a/kmailcvt/filter_pmail.cpp
+++ b/kmailcvt/filter_pmail.cpp
@@ -46,7 +46,7 @@ void FilterPMail::import(FilterInfo *info)
     
     // Select directory from where I have to import files
     KFileDialog *kfd;
-    kfd = new KFileDialog( TQDir::homeDirPath(), "", 0, "tdefiledialog", true );
+    kfd = new KFileDialog( TQDir::homeDirPath(), "", nullptr, "tdefiledialog", true );
     kfd->setMode(KFile::Directory | KFile::LocalOnly);
     kfd->exec();
     chosenDir = kfd->selectedFile();
diff --git a/kmailcvt/filter_sylpheed.cpp b/kmailcvt/filter_sylpheed.cpp
index 9d8570e33..c438f4220 100644
--- a/kmailcvt/filter_sylpheed.cpp
+++ b/kmailcvt/filter_sylpheed.cpp
@@ -46,7 +46,7 @@ void FilterSylpheed::import( FilterInfo *info )
     TQString _homeDir = TQDir::homeDirPath();
 
     KFileDialog *kfd;
-    kfd = new KFileDialog( _homeDir, "", 0, "tdefiledialog", true );
+    kfd = new KFileDialog( _homeDir, "", nullptr, "tdefiledialog", true );
     kfd->setMode( KFile::Directory | KFile::LocalOnly );
     kfd->exec();
     mailDir = kfd->selectedFile();
diff --git a/kmailcvt/filter_thebat.cpp b/kmailcvt/filter_thebat.cpp
index 6a9642a18..844cf089a 100644
--- a/kmailcvt/filter_thebat.cpp
+++ b/kmailcvt/filter_thebat.cpp
@@ -52,7 +52,7 @@ void FilterTheBat::import( FilterInfo *info )
     TQString _homeDir = TQDir::homeDirPath();
 
     KFileDialog *kfd;
-    kfd = new KFileDialog( _homeDir, "", 0, "tdefiledialog", true );
+    kfd = new KFileDialog( _homeDir, "", nullptr, "tdefiledialog", true );
     kfd->setMode( KFile::Directory | KFile::LocalOnly );
     kfd->exec();
     mailDir = kfd->selectedFile();
diff --git a/kmailcvt/filter_thunderbird.cpp b/kmailcvt/filter_thunderbird.cpp
index 69aacca48..efb3c9f69 100644
--- a/kmailcvt/filter_thunderbird.cpp
+++ b/kmailcvt/filter_thunderbird.cpp
@@ -55,7 +55,7 @@ void FilterThunderbird::import(FilterInfo *info)
     }
 
     KFileDialog *kfd;
-    kfd = new KFileDialog( thunderDir, "", 0, "tdefiledialog", true );
+    kfd = new KFileDialog( thunderDir, "", nullptr, "tdefiledialog", true );
     kfd->setMode(KFile::Directory | KFile::LocalOnly);
     kfd->exec();
     mailDir  = kfd->selectedFile();
diff --git a/kmailcvt/kimportpage.h b/kmailcvt/kimportpage.h
index 1b9fcdc57..79f7fb590 100644
--- a/kmailcvt/kimportpage.h
+++ b/kmailcvt/kimportpage.h
@@ -24,7 +24,7 @@ class KImportPage : public KImportPageDlg  {
 	TQ_OBJECT
   
 public:
-	KImportPage(TQWidget *parent=0, const char *name=0);
+	KImportPage(TQWidget *parent=nullptr, const char *name=nullptr);
 	~KImportPage();
 };
 
diff --git a/kmailcvt/kmailcvt.h b/kmailcvt/kmailcvt.h
index 0f6704b07..ac8779360 100644
--- a/kmailcvt/kmailcvt.h
+++ b/kmailcvt/kmailcvt.h
@@ -29,7 +29,7 @@ class KMailCVT : public KWizard {
 	TQ_OBJECT
   
 public:
-	KMailCVT(TQWidget* parent=0, const char *name=0);
+	KMailCVT(TQWidget* parent=nullptr, const char *name=nullptr);
 	~KMailCVT();
 
 	virtual void next();
diff --git a/kmailcvt/kselfilterpage.h b/kmailcvt/kselfilterpage.h
index 1dc208e68..27975112b 100644
--- a/kmailcvt/kselfilterpage.h
+++ b/kmailcvt/kselfilterpage.h
@@ -27,7 +27,7 @@ class KSelFilterPage : public KSelFilterPageDlg  {
 	TQ_OBJECT
   
 public:
-	KSelFilterPage(TQWidget *parent=0, const char *name=0);
+	KSelFilterPage(TQWidget *parent=nullptr, const char *name=nullptr);
 	~KSelFilterPage();
 public:
 	void  addFilter(Filter *f);
diff --git a/knode/aboutdata.cpp b/knode/aboutdata.cpp
index 0ded58c96..82d6003aa 100644
--- a/knode/aboutdata.cpp
+++ b/knode/aboutdata.cpp
@@ -30,15 +30,15 @@ namespace KNode
     { "Timothy Pearson", I18N_NOOP("Maintainer"), "kb9vqf@pearsoncomputing.net" },
     { "Volker Krause", I18N_NOOP("Former maintainer"), "volker.krause@rwth-aachen.de" },
     { "Roberto Selbach Teixeira", I18N_NOOP("Former maintainer"), "roberto@kde.org" },
-    { "Christian Gebauer", 0, "gebauer@kde.org" },
-    { "Christian Thurner", 0, "cthurner@web.de" },
-    { "Dirk Mueller", 0, "mueller@kde.org" },
-    { "Marc Mutz", 0, "mutz@kde.org" },
-    { "Mathias Waack", 0, "mathias@atoll-net.de" },
-    { "Laurent Montel", 0, "montel@kde.org" },
-    { "Stephan Johach", 0, "lucardus@onlinehome.de" },
-    { "Matthias Kalle Dalheimer", 0, "kalle@kde.org" },
-    { "Zack Rusin", 0, "zack@kde.org" }
+    { "Christian Gebauer", nullptr, "gebauer@kde.org" },
+    { "Christian Thurner", nullptr, "cthurner@web.de" },
+    { "Dirk Mueller", nullptr, "mueller@kde.org" },
+    { "Marc Mutz", nullptr, "mutz@kde.org" },
+    { "Mathias Waack", nullptr, "mathias@atoll-net.de" },
+    { "Laurent Montel", nullptr, "montel@kde.org" },
+    { "Stephan Johach", nullptr, "lucardus@onlinehome.de" },
+    { "Matthias Kalle Dalheimer", nullptr, "kalle@kde.org" },
+    { "Zack Rusin", nullptr, "zack@kde.org" }
   };
 
   AboutData::AboutData()
@@ -48,14 +48,14 @@ namespace KNode
                   I18N_NOOP("A newsreader for TDE"),
                   TDEAboutData::License_GPL,
                   I18N_NOOP("Copyright (c) 1999-2005 the KNode authors"),
-                  0,
+                  nullptr,
                   "http://knode.sourceforge.net/" )
   {
     using KNode::authors;
     for ( unsigned int i = 0 ; i < sizeof authors / sizeof *authors ; ++i )
       addAuthor( authors[i].name, authors[i].desc, authors[i].email );
 
-    addCredit( "Jakob Schroeter", 0, "js@camaya.net" );
+    addCredit( "Jakob Schroeter", nullptr, "js@camaya.net" );
   }
 
   AboutData::~AboutData()
diff --git a/knode/articlewidget.cpp b/knode/articlewidget.cpp
index 60ac8e9ae..71f494cf0 100644
--- a/knode/articlewidget.cpp
+++ b/knode/articlewidget.cpp
@@ -80,16 +80,16 @@ ArticleWidget::ArticleWidget( TQWidget *parent,
                               TDEActionCollection *actionCollection,
                               const char *name ) :
   TQWidget( parent, name ),
-  mArticle( 0 ),
-  mViewer( 0 ),
-  mCSSHelper( 0 ),
+  mArticle( nullptr ),
+  mViewer( nullptr ),
+  mCSSHelper( nullptr ),
   mHeaderStyle( "fancy" ),
   mAttachmentStyle( "inline" ),
   mShowHtml( false ),
   mRot13( false ),
   mForceCharset( false ),
   mOverrideCharset( KMime::Headers::Latin1 ),
-  mTimer( 0 ),
+  mTimer( nullptr ),
   mGuiClient( guiClient ),
   mActionCollection( actionCollection )
 {
@@ -289,7 +289,7 @@ void ArticleWidget::readConfig()
   conf->setGroup( "READNEWS" );
   mAttachmentStyle = conf->readEntry( "attachmentStyle", "inline" );
   mHeaderStyle = conf->readEntry( "headerStyle", "fancy" );
-  TDERadioAction *ra = 0;
+  TDERadioAction *ra = nullptr;
   ra = static_cast<TDERadioAction*>( mActionCollection->action( TQString("view_attachments_%1").arg(mAttachmentStyle).latin1() ) );
   ra->setChecked( true );
   ra = static_cast<TDERadioAction*>( mActionCollection->action( TQString("view_headers_%1").arg(mHeaderStyle).latin1() ) );
@@ -424,7 +424,7 @@ void ArticleWidget::displayArticle()
     else
       codec = TDEGlobal::locale()->codecForEncoding();
 
-    for( ; *pbit != 0; ++pbit, ++npbit ) {
+    for( ; *pbit ; ++pbit, ++npbit ) {
       // handle non-pgp block
       TQCString str( *npbit );
       if( !str.isEmpty() ) {
@@ -553,7 +553,7 @@ void ArticleWidget::displayHeader()
   // full header style
   if ( mHeaderStyle == "all" ) {
     TQCString head = mArticle->head();
-    KMime::Headers::Generic *header = 0;
+    KMime::Headers::Generic *header = nullptr;
 
     while ( !head.isEmpty() ) {
       header = mArticle->getNextHeader( head );
@@ -1067,7 +1067,7 @@ void ArticleWidget::articleRemoved( KNArticle *article )
 {
   for ( InstanceIterator it = mInstances.begin(); it != mInstances.end(); ++it )
     if ( (*it)->article() == article )
-      (*it)->setArticle( 0 );
+      (*it)->setArticle( nullptr );
 }
 
 
@@ -1091,14 +1091,14 @@ void ArticleWidget::collectionRemoved( KNArticleCollection *coll )
 {
   for ( InstanceIterator it = mInstances.begin(); it != mInstances.end(); ++it )
     if ( (*it)->article() && (*it)->article()->collection() == coll )
-      (*it)->setArticle( 0 );
+      (*it)->setArticle( nullptr );
 }
 
 
 void ArticleWidget::cleanup()
 {
   for ( InstanceIterator it = mInstances.begin(); it != mInstances.end(); ++it )
-    (*it)->setArticle( 0 ); //delete orphant articles => avoid crash in destructor
+    (*it)->setArticle( nullptr ); //delete orphant articles => avoid crash in destructor
 }
 
 
diff --git a/knode/articlewidget.h b/knode/articlewidget.h
index 8a00e33fe..1d62a54f9 100644
--- a/knode/articlewidget.h
+++ b/knode/articlewidget.h
@@ -60,7 +60,7 @@ class ArticleWidget : public TQWidget, public KNJobConsumer {
     ArticleWidget( TQWidget *parent,
                    KXMLGUIClient *guiClient,
                    TDEActionCollection *actionCollection,
-                   const char *name = 0 );
+                   const char *name = nullptr );
     ~ArticleWidget();
 
     /// read config settings
diff --git a/knode/headerview.cpp b/knode/headerview.cpp
index 2d7850c5d..83a80f04e 100644
--- a/knode/headerview.cpp
+++ b/knode/headerview.cpp
@@ -37,7 +37,7 @@ KNHeaderView::KNHeaderView(TQWidget *parent, const char *name) :
   mSortAsc( true ),
   mSortByThreadChangeDate( false ),
   mDelayedCenter( -1 ),
-  mActiveItem( 0 ),
+  mActiveItem( nullptr ),
   mShowingFolder( false ),
   mInitDone( false )
 {
@@ -146,7 +146,7 @@ void KNHeaderView::setActive( TQListViewItem *i )
   if ( mActiveItem ) {
     mActiveItem->setActive( false );
     repaintItem( mActiveItem );
-    mActiveItem = 0;
+    mActiveItem = nullptr;
   }
 
   item->setActive( true );
@@ -160,7 +160,7 @@ void KNHeaderView::setActive( TQListViewItem *i )
 
 void KNHeaderView::clear()
 {
-  mActiveItem = 0;
+  mActiveItem = nullptr;
   TQListView::clear();
 }
 
@@ -391,8 +391,8 @@ bool KNHeaderView::nextUnreadThread()
 
 void KNHeaderView::toggleColumn( int column, int mode )
 {
-  bool *show = 0;
-  int  *col  = 0;
+  bool *show = nullptr;
+  int  *col  = nullptr;
   int  width = 0;
 
   switch ( static_cast<KPaintInfo::ColumnIds>( column ) )
@@ -527,7 +527,7 @@ TQDragObject* KNHeaderView::dragObject()
   if (item)
     return item->dragObject();
   else
-    return 0;
+    return nullptr;
 }
 
 
diff --git a/knode/headerview.h b/knode/headerview.h
index 3da99acbd..5fb12186e 100644
--- a/knode/headerview.h
+++ b/knode/headerview.h
@@ -32,7 +32,7 @@ class KNHeaderView : public TDEListView  {
   friend class KNHdrViewItem;
 
   public:
-    KNHeaderView( TQWidget *parent, const char *name = 0 );
+    KNHeaderView( TQWidget *parent, const char *name = nullptr );
     ~KNHeaderView();
 
     void setActive( TQListViewItem *item );
@@ -71,7 +71,7 @@ class KNHeaderView : public TDEListView  {
     void prepareForFolder();
 
   protected:
-    void activeRemoved()            { mActiveItem = 0; }
+    void activeRemoved()            { mActiveItem = nullptr; }
     /**
      * Reimplemented to avoid that TDEListview reloads the alternate
      * background on palette changes.
diff --git a/knode/knaccountmanager.cpp b/knode/knaccountmanager.cpp
index c3cf78041..0c28c1243 100644
--- a/knode/knaccountmanager.cpp
+++ b/knode/knaccountmanager.cpp
@@ -31,11 +31,11 @@
 #include "knaccountmanager.h"
 #include "knfoldermanager.h"
 
-TDEWallet::Wallet* KNAccountManager::mWallet = 0;
+TDEWallet::Wallet* KNAccountManager::mWallet = nullptr;
 bool KNAccountManager::mWalletOpenFailed = false;
 
 KNAccountManager::KNAccountManager(KNGroupManager *gm, TQObject * parent, const char * name)
-  : TQObject(parent, name), gManager(gm), c_urrentAccount(0),
+  : TQObject(parent, name), gManager(gm), c_urrentAccount(nullptr),
   mAsyncOpening( false )
 {
   s_mtp = new KNServerInfo();
@@ -57,7 +57,7 @@ KNAccountManager::~KNAccountManager()
   mAccounts.clear();
   delete s_mtp;
   delete mWallet;
-  mWallet = 0;
+  mWallet = nullptr;
 }
 
 
@@ -98,12 +98,12 @@ void KNAccountManager::loadAccounts()
 KNNntpAccount* KNAccountManager::account( int id )
 {
   if ( id <= 0 )
-    return 0;
+    return nullptr;
   TQValueList<KNNntpAccount*>::ConstIterator it;
   for ( it = mAccounts.begin(); it != mAccounts.end(); ++it )
     if ( (*it)->id() == id )
       return *it;
-  return 0;
+  return nullptr;
 }
 
 
@@ -180,7 +180,7 @@ bool KNAccountManager::removeAccount(KNNntpAccount *a)
       dir.rmdir(TQString("nntp.%1/").arg(a->id()));
     }
 
-    if(c_urrentAccount==a) setCurrentAccount(0);
+    if(c_urrentAccount==a) setCurrentAccount(nullptr);
 
     emit(accountRemoved(a));
     mAccounts.remove( a );  // finally delete a
@@ -213,7 +213,7 @@ void KNAccountManager::accountRenamed(KNNntpAccount *a)
 KNNntpAccount* KNAccountManager::first() const
 {
   if ( mAccounts.isEmpty() )
-    return 0;
+    return nullptr;
   return mAccounts.first();
 }
 
@@ -258,7 +258,7 @@ TDEWallet::Wallet* KNAccountManager::wallet()
     return mWallet;
 
   if ( !Wallet::isEnabled() || mWalletOpenFailed )
-    return 0;
+    return nullptr;
 
   delete mWallet;
   if ( knGlobals.top )
@@ -269,7 +269,7 @@ TDEWallet::Wallet* KNAccountManager::wallet()
 
   if ( !mWallet ) {
     mWalletOpenFailed = true;
-    return 0;
+    return nullptr;
   }
 
   prepareWallet();
@@ -293,7 +293,7 @@ void KNAccountManager::slotWalletOpened( bool success )
   if ( !success ) {
     mWalletOpenFailed = true;
     delete mWallet;
-    mWallet = 0;
+    mWallet = nullptr;
   } else {
     prepareWallet();
   }
diff --git a/knode/knaccountmanager.h b/knode/knaccountmanager.h
index 8a8b5f61b..37af6a57e 100644
--- a/knode/knaccountmanager.h
+++ b/knode/knaccountmanager.h
@@ -33,7 +33,7 @@ class KNAccountManager : public TQObject
   
 
   public:
-    KNAccountManager(KNGroupManager *gm, TQObject * parent=0, const char * name=0);
+    KNAccountManager(KNGroupManager *gm, TQObject * parent=nullptr, const char * name=nullptr);
     ~KNAccountManager();
 
     void prepareShutdown();
@@ -41,11 +41,11 @@ class KNAccountManager : public TQObject
     void setCurrentAccount(KNNntpAccount *a);
 
     bool newAccount(KNNntpAccount *a);       // a is new account allocated and configured by the caller
-    bool removeAccount(KNNntpAccount *a=0);  // a==0: remove current account
-    void editProperties(KNNntpAccount *a=0);
-    void accountRenamed(KNNntpAccount *a=0);
+    bool removeAccount(KNNntpAccount *a=nullptr);  // a==0: remove current account
+    void editProperties(KNNntpAccount *a=nullptr);
+    void accountRenamed(KNNntpAccount *a=nullptr);
 
-    bool hasCurrentAccount() const             { return (c_urrentAccount!=0); }
+    bool hasCurrentAccount() const             { return c_urrentAccount; }
     KNNntpAccount* currentAccount() const       { return c_urrentAccount; }
     KNServerInfo* smtp() const                 { return s_mtp; }
     /** Returns the account with the given id. */
diff --git a/knode/knarticle.cpp b/knode/knarticle.cpp
index 24ffe7205..e7be2ab05 100644
--- a/knode/knarticle.cpp
+++ b/knode/knarticle.cpp
@@ -28,7 +28,7 @@
 using namespace KMime;
 
 
-KNArticle::KNArticle(KNArticleCollection *c) : i_d(-1), c_ol(c), i_tem(0)
+KNArticle::KNArticle(KNArticleCollection *c) : i_d(-1), c_ol(c), i_tem(nullptr)
 {
 }
 
@@ -63,7 +63,7 @@ void KNArticle::setLocked(bool b)
 
 
 KNRemoteArticle::KNRemoteArticle(KNGroup *g)
- : KNArticle(g), a_rticleNumber(-1), i_dRef(-1), d_ref(0), t_hrLevel(0), s_core(0),
+ : KNArticle(g), a_rticleNumber(-1), i_dRef(-1), d_ref(nullptr), t_hrLevel(0), s_core(0),
    c_olor(knGlobals.configManager()->appearance()->unreadThreadColor()),
    u_nreadFups(0), n_ewFups(0), s_ubThreadChangeDate(0)
 {
@@ -109,15 +109,15 @@ void KNRemoteArticle::clear()
 Headers::Base* KNRemoteArticle::getHeaderByType(const char *type)
 {
   if(strcasecmp("Message-ID", type)==0) {
-    if(m_essageID.isEmpty()) return 0;
+    if(m_essageID.isEmpty()) return nullptr;
     else return &m_essageID;
   }
   else if(strcasecmp("From", type)==0) {
-    if(f_rom.isEmpty()) return 0;
+    if(f_rom.isEmpty()) return nullptr;
     else return &f_rom;
   }
   else if(strcasecmp("References", type)==0) {
-    if(r_eferences.isEmpty()) return 0;
+    if(r_eferences.isEmpty()) return nullptr;
     else return &r_eferences;
   }
   else
@@ -215,7 +215,7 @@ void KNRemoteArticle::updateListItem()
 
 void KNRemoteArticle::thread(KNRemoteArticle::List &l)
 {
-  KNRemoteArticle *tmp=0, *ref=this;
+  KNRemoteArticle *tmp=nullptr, *ref=this;
   KNGroup *g=static_cast<KNGroup*>(c_ol);
   int idRef=i_dRef, topID=-1;
 
@@ -406,7 +406,7 @@ void KNLocalArticle::setForceDefaultCS(bool b)
 
 
 KNAttachment::KNAttachment(Content *c)
-  : c_ontent(c), l_oadHelper(0), f_ile(0), i_sAttached(true)
+  : c_ontent(c), l_oadHelper(nullptr), f_ile(nullptr), i_sAttached(true)
 {
   Headers::ContentType  *t=c->contentType();
   Headers::CTEncoding   *e=c->contentTransferEncoding();
@@ -433,7 +433,7 @@ KNAttachment::KNAttachment(Content *c)
 
 
 KNAttachment::KNAttachment(KNLoadHelper *helper)
-  : c_ontent(0), l_oadHelper(helper), f_ile(helper->getFile()), i_sAttached(false), h_asChanged(true)
+  : c_ontent(nullptr), l_oadHelper(helper), f_ile(helper->getFile()), i_sAttached(false), h_asChanged(true)
 {
   setMimeType((KMimeMagic::self()->findFileType(f_ile->name()))->mimeType());
   n_ame=helper->getURL().fileName();
@@ -544,7 +544,7 @@ void KNAttachment::attach(Content *c)
   if (readBytes<(int)f_ile->size() && f_ile->status()!=IO_Ok) {
     KNHelper::displayExternalFileError();
     delete c_ontent;
-    c_ontent=0;
+    c_ontent=nullptr;
   } else {
     if (e_ncoding.cte()==Headers::CEbase64 || !type->isText()) { //encode base64
       c_ontent->setBody( KCodecs::base64Encode(data, true) + '\n' );
diff --git a/knode/knarticle.h b/knode/knarticle.h
index 798742e17..8bcc61897 100644
--- a/knode/knarticle.h
+++ b/knode/knarticle.h
@@ -104,9 +104,9 @@ class KNRemoteArticle : public KNArticle {
     KMime::Headers::Base* getHeaderByType(const char *type);
     void setHeader(KMime::Headers::Base *h);
     bool removeHeader(const char *type);
-    KMime::Headers::MessageID* messageID(bool create=true)   { if(!create && m_essageID.isEmpty()) return 0; return &m_essageID; }
-    KMime::Headers::From* from(bool create=true)             { if(!create && f_rom.isEmpty()) return 0; return &f_rom; }
-    KMime::Headers::References* references(bool create=true) { if(!create && r_eferences.isEmpty()) return 0; return &r_eferences; }
+    KMime::Headers::MessageID* messageID(bool create=true)   { if(!create && m_essageID.isEmpty()) return nullptr; return &m_essageID; }
+    KMime::Headers::From* from(bool create=true)             { if(!create && f_rom.isEmpty()) return nullptr; return &f_rom; }
+    KMime::Headers::References* references(bool create=true) { if(!create && r_eferences.isEmpty()) return nullptr; return &r_eferences; }
 
     // article number
     int articleNumber() const                 { return a_rticleNumber; }
@@ -209,7 +209,7 @@ class KNLocalArticle : public KNArticle {
   public:
     typedef TQValueList<KNLocalArticle*> List;
 
-    KNLocalArticle(KNArticleCollection *c=0);
+    KNLocalArticle(KNArticleCollection *c=nullptr);
     ~KNLocalArticle();
 
     //type
@@ -225,11 +225,11 @@ class KNLocalArticle : public KNArticle {
     bool removeHeader(const char *type);
     KMime::Headers::Newsgroups* newsgroups(bool create=true)     { if ( (!create && n_ewsgroups.isEmpty()) ||
                                                                    (!create && !isSavedRemoteArticle() && !doPost()) )
-                                                                return 0;
+                                                                return nullptr;
                                                               return &n_ewsgroups; }
     KMime::Headers::To* to(bool create=true)                     { if ( (!create && t_o.isEmpty()) ||
                                                                    (!create && !isSavedRemoteArticle() && !doMail()) )
-                                                                return 0;
+                                                                return nullptr;
                                                               return &t_o; }
 
     //send article as mail
diff --git a/knode/knarticlecollection.cpp b/knode/knarticlecollection.cpp
index e0a0af85c..62f0e866e 100644
--- a/knode/knarticlecollection.cpp
+++ b/knode/knarticlecollection.cpp
@@ -28,7 +28,7 @@
 static const int sizeIncr=50;
 
 KNArticleVector::KNArticleVector(KNArticleVector *master, SortingType sorting)
-  : m_aster(master), l_en(0), s_ize(0), l_ist(0), s_ortType(sorting)
+  : m_aster(master), l_en(0), s_ize(0), l_ist(nullptr), s_ortType(sorting)
 {
 }
 
@@ -86,7 +86,7 @@ void KNArticleVector::remove(int pos, bool autoDel, bool autoCompact)
   if(autoDel)
     delete l_ist[pos];
 
-  l_ist[pos]=0;
+  l_ist[pos]=nullptr;
 
   if(autoCompact)
     compact();
@@ -96,12 +96,12 @@ void KNArticleVector::remove(int pos, bool autoDel, bool autoCompact)
 void KNArticleVector::clear()
 {
   if(l_ist){
-    if(m_aster==0)
+    if(!m_aster)
       for(int i=0; i<l_en; i++) delete l_ist[i];
     free(l_ist);
   }
 
-  l_ist=0; l_en=0; s_ize=0;
+  l_ist=nullptr; l_en=0; s_ize=0;
 }
 
 
@@ -110,13 +110,13 @@ void KNArticleVector::compact()
   int newLen, nullStart=0, nullCnt=0, ptrStart=0, ptrCnt=0;
 
   for(int idx=0; idx<l_en; idx++) {
-    if(l_ist[idx]==0) {
+    if(!l_ist[idx]) {
       ptrStart=-1;
       ptrCnt=-1;
       nullStart=idx;
       nullCnt=1;
       for(int idx2=idx+1; idx2<l_en; idx2++) {
-        if(l_ist[idx2]==0) nullCnt++;
+        if(!l_ist[idx2]) nullCnt++;
         else {
           ptrStart=idx2;
           ptrCnt=1;
@@ -125,19 +125,19 @@ void KNArticleVector::compact()
       }
       if(ptrStart!=-1) {
         for(int idx2=ptrStart+1; idx2<l_en; idx2++) {
-          if(l_ist[idx2]!=0) ptrCnt++;
+          if(l_ist[idx2]) ptrCnt++;
           else break;
         }
         memmove(&(l_ist[nullStart]), &(l_ist[ptrStart]), ptrCnt*sizeof(KNArticle*));
         for(int idx2=nullStart+ptrCnt; idx2<nullStart+ptrCnt+nullCnt; idx2++)
-          l_ist[idx2]=0;
+          l_ist[idx2]=nullptr;
         idx=nullStart+ptrCnt-1;
         }
       else break;
     }
   }
   newLen=0;
-  while(l_ist[newLen]!=0) newLen++;
+  while(l_ist[newLen]) newLen++;
   l_en=newLen;
 }
 
@@ -156,7 +156,7 @@ void KNArticleVector::syncWithMaster()
 
 void KNArticleVector::sort()
 {
-  int (*cmp)(const void*,const void*) = 0;
+  int (*cmp)(const void*,const void*) = nullptr;
 
   switch(s_ortType) {
     case STid:
@@ -166,7 +166,7 @@ void KNArticleVector::sort()
       cmp=compareByMsgId;
     break;
     default:
-      cmp=0;
+      cmp=nullptr;
     break;
   }
 
@@ -217,7 +217,7 @@ KNArticle* KNArticleVector::bsearch(int id)
 {
   int idx=indexForId(id);
 
-  return ( idx>-1 ? l_ist[idx] : 0 );
+  return ( idx>-1 ? l_ist[idx] : nullptr );
 }
 
 
@@ -225,7 +225,7 @@ KNArticle* KNArticleVector::bsearch(const TQCString &id)
 {
   int idx=indexForMsgId(id);
 
-  return ( idx>-1 ? l_ist[idx] : 0 );
+  return ( idx>-1 ? l_ist[idx] : nullptr );
 }
 
 
@@ -235,7 +235,7 @@ int KNArticleVector::indexForId(int id)
 
   int start=0, end=l_en, mid=0, currentId=0;
   bool found=false;
-  KNArticle *current=0;
+  KNArticle *current=nullptr;
 
   while(start!=end && !found) {
     mid=(start+end)/2;
@@ -268,7 +268,7 @@ int KNArticleVector::indexForMsgId(const TQCString &id)
   int start=0, end=l_en, mid=0;
   TQCString currentMid=0;
   bool found=false;
-  KNArticle *current=0;
+  KNArticle *current=nullptr;
   int cnt=0;
 
   while(start!=end && !found) {
diff --git a/knode/knarticlecollection.h b/knode/knarticlecollection.h
index 507ff266b..30ecf3a53 100644
--- a/knode/knarticlecollection.h
+++ b/knode/knarticlecollection.h
@@ -27,15 +27,15 @@ class KNArticleVector {
   public:
     enum SortingType { STid, STmsgId, STunsorted };
 
-    KNArticleVector(KNArticleVector *master=0, SortingType sorting=STunsorted);
+    KNArticleVector(KNArticleVector *master=nullptr, SortingType sorting=STunsorted);
     virtual ~KNArticleVector();
 
     // list-info
     KNArticleVector* master()            { return m_aster; }
     void setMaster(KNArticleVector *m)   { m_aster=m; }
-    bool isMaster()   { return (m_aster==0); }
+    bool isMaster()   { return !m_aster; }
 
-    bool isEmpty()    { return ( (l_ist==0) || (l_en==0) ); }
+    bool isEmpty()    { return !l_ist || l_en == 0; }
     int length()      { return l_en; }
     int size()        { return s_ize; }
 
@@ -55,7 +55,7 @@ class KNArticleVector {
     static int compareByMsgId(const void *a1, const void *a2);
 
     // article access
-    KNArticle* at(int i)  { return ( (i>=0 && i<l_en) ? l_ist[i] : 0 ); }
+    KNArticle* at(int i)  { return (i>=0 && i<l_en) ? l_ist[i] : nullptr; }
     KNArticle* bsearch(int id);
     KNArticle* bsearch(const TQCString &id);
 
@@ -74,7 +74,7 @@ class KNArticleVector {
 class KNArticleCollection : public KNCollection {
 
   public:
-    KNArticleCollection(KNCollection *p=0);
+    KNArticleCollection(KNCollection *p=nullptr);
     ~KNArticleCollection();
 
     // info
diff --git a/knode/knarticlefactory.cpp b/knode/knarticlefactory.cpp
index 44e7bed8f..bfcf2597b 100644
--- a/knode/knarticlefactory.cpp
+++ b/knode/knarticlefactory.cpp
@@ -36,7 +36,7 @@
 
 
 KNArticleFactory::KNArticleFactory(TQObject *p, const char *n)
-  : TQObject(p, n), s_endErrDlg(0)
+  : TQObject(p, n), s_endErrDlg(nullptr)
 {
 }
 
@@ -371,7 +371,7 @@ void KNArticleFactory::createCancel(KNArticle *a)
   }
 
   KNGroup *grp;
-  KNNntpAccount *nntp=0;
+  KNNntpAccount *nntp=nullptr;
 
   if(a->type()==KMime::Base::ATremote)
     nntp=(static_cast<KNGroup*>(a->collection()))->account();
@@ -611,8 +611,8 @@ void KNArticleFactory::edit(KNLocalArticle *a)
 
 void KNArticleFactory::sendArticles( KNLocalArticle::List &l, bool now )
 {
-  KNJobData *job=0;
-  KNServerInfo *ser=0;
+  KNJobData *job=nullptr;
+  KNServerInfo *ser=nullptr;
 
   KNLocalArticle::List unsent, sent;
   for ( KNLocalArticle::List::Iterator it = l.begin(); it != l.end(); ++it ) {
@@ -664,7 +664,7 @@ void KNArticleFactory::sendArticles( KNLocalArticle::List &l, bool now )
 void KNArticleFactory::sendOutbox()
 {
   KNLocalArticle::List lst;
-  KNFolder *ob=0;
+  KNFolder *ob=nullptr;
 
   if(!knGlobals.folderManager()->loadOutbox()) {
     KMessageBox::error(knGlobals.topWidget, i18n("Unable to load the outbox-folder."));
@@ -706,7 +706,7 @@ KNComposer* KNArticleFactory::findComposer(KNLocalArticle *a)
   for ( TQValueList<KNComposer*>::Iterator it = mCompList.begin(); it != mCompList.end(); ++it )
     if ( (*it)->article() == a )
       return (*it);
-  return 0;
+  return nullptr;
 }
 
 
@@ -780,11 +780,11 @@ KNLocalArticle* KNArticleFactory::newArticle(KNCollection *col, TQString &sig, T
 
   if(pnt->generateMessageID() && pnt->hostname().isEmpty()) {
     KMessageBox::sorry(knGlobals.topWidget, i18n("Please set a hostname for the generation\nof the message-id or disable it."));
-    return 0;
+    return nullptr;
   }
 
-  KNLocalArticle *art=new KNLocalArticle(0);
-  KNConfig::Identity *tmpId=0, *id=0;
+  KNLocalArticle *art=new KNLocalArticle(nullptr);
+  KNConfig::Identity *tmpId=nullptr, *id=nullptr;
 
   if (col) {
     if (col->type() == KNCollection::CTgroup) {
@@ -827,7 +827,7 @@ KNLocalArticle* KNArticleFactory::newArticle(KNCollection *col, TQString &sig, T
       KMessageBox::sorry(knGlobals.topWidget,
          i18n("Please enter a valid email address at the identity section of the configuration dialog."));
     delete art;
-    return 0;
+    return nullptr;
   }
 
   //Reply-To
@@ -1056,7 +1056,7 @@ void KNArticleFactory::slotComposerDone(KNComposer *com)
 void KNArticleFactory::slotSendErrorDialogDone()
 {
   s_endErrDlg->delayedDestruct();
-  s_endErrDlg=0;
+  s_endErrDlg=nullptr;
 }
 
 
@@ -1064,7 +1064,7 @@ void KNArticleFactory::slotSendErrorDialogDone()
 
 
 KNSendErrorDialog::KNSendErrorDialog()
-  : KDialogBase(knGlobals.topWidget, 0, true, i18n("Errors While Sending"), Close, Close, true)
+  : KDialogBase(knGlobals.topWidget, nullptr, true, i18n("Errors While Sending"), Close, Close, true)
 {
   p_ixmap=knGlobals.configManager()->appearance()->icon(KNConfig::Appearance::sendErr);
 
diff --git a/knode/knarticlefactory.h b/knode/knarticlefactory.h
index c01ac3daf..a1a81fcc8 100644
--- a/knode/knarticlefactory.h
+++ b/knode/knarticlefactory.h
@@ -44,7 +44,7 @@ class KNArticleFactory : public TQObject , public KNJobConsumer {
   public:
     enum replyType { RTgroup, RTmail, RTboth };
 
-    KNArticleFactory(TQObject *p=0, const char *n=0);
+    KNArticleFactory(TQObject *p=nullptr, const char *n=nullptr);
     ~KNArticleFactory();
 
     //factory methods
@@ -76,7 +76,7 @@ class KNArticleFactory : public TQObject , public KNJobConsumer {
 
     //article generation
     // col: group or account
-    KNLocalArticle* newArticle(KNCollection *col, TQString &sig, TQCString defChset, bool withXHeaders=true, KNArticle *origPost=0);
+    KNLocalArticle* newArticle(KNCollection *col, TQString &sig, TQCString defChset, bool withXHeaders=true, KNArticle *origPost=nullptr);
 
     //cancel & supersede
     bool cancelAllowed(KNArticle *a);
@@ -108,7 +108,7 @@ class KNSendErrorDialog : public KDialogBase  {
   protected:
     class LBoxItem : public KNListBoxItem {
       public:
-        LBoxItem(const TQString &e, const TQString &t, TQPixmap *p=0)
+        LBoxItem(const TQString &e, const TQString &t, TQPixmap *p=nullptr)
           : KNListBoxItem(t, p) , error(e)  {}
         ~LBoxItem() {}
 
diff --git a/knode/knarticlefilter.cpp b/knode/knarticlefilter.cpp
index d55da9dc5..463e12453 100644
--- a/knode/knarticlefilter.cpp
+++ b/knode/knarticlefilter.cpp
@@ -27,7 +27,7 @@
 
 // the names of our default filters
 static const char *defFil[] = { "all","unread","new","watched","threads with unread",
-                                "threads with new","own articles","threads with own articles", 0 };
+                                "threads with new","own articles","threads with own articles", nullptr };
 void dummyFilter()
 {
   i18n("default filter name","all");
@@ -181,7 +181,7 @@ void KNArticleFilter::save()
 void KNArticleFilter::doFilter(KNGroup *g)
 {
   c_ount=0;
-  KNRemoteArticle *art=0, *ref=0;
+  KNRemoteArticle *art=nullptr, *ref=nullptr;
   KNRemoteArticle::List orphant_threads;
   int idRef;
   int mergeCnt=0;
@@ -198,7 +198,7 @@ void KNArticleFilter::doFilter(KNGroup *g)
     art=g->at(idx);
     art->setFiltered(false);
     art->setVisibleFollowUps(false);
-    art->setDisplayedReference(0);
+    art->setDisplayedReference(nullptr);
   }
 
   for(int idx=0; idx<g->length(); idx++) {
@@ -236,9 +236,9 @@ void KNArticleFilter::doFilter(KNGroup *g)
     if(art->filterResult()) {
       c_ount++;
 
-      ref = (art->idRef()>0) ? g->byId(art->idRef()) : 0;
+      ref = (art->idRef()>0) ? g->byId(art->idRef()) : nullptr;
       while(ref && !ref->filterResult())
-        ref = (ref->idRef()>0) ? g->byId(ref->idRef()) : 0;
+        ref = (ref->idRef()>0) ? g->byId(ref->idRef()) : nullptr;
 
       art->setDisplayedReference(ref);
       if(ref)
@@ -283,14 +283,14 @@ void KNArticleFilter::doFilter(KNGroup *g)
 void KNArticleFilter::doFilter(KNFolder *f)
 {
   c_ount=0;
-  KNLocalArticle *art=0;
+  KNLocalArticle *art=nullptr;
 
   if(!l_oaded) load();
 
-  subject.expand(0);  // replace placeholders
-  from.expand(0);
-  messageId.expand(0);
-  references.expand(0);
+  subject.expand(nullptr);  // replace placeholders
+  from.expand(nullptr);
+  messageId.expand(nullptr);
+  references.expand(nullptr);
 
   for(int idx=0; idx<f->length(); idx++) {
     art=f->at(idx);
@@ -322,7 +322,7 @@ TQString KNArticleFilter::translatedName()
 void KNArticleFilter::setTranslatedName(const TQString &s)
 {
   bool retranslated = false;
-  for (const char **c=defFil;(*c)!=0;c++)   // ok, try if it matches any of the standard filter names
+  for (const char **c=defFil;*c;c++)   // ok, try if it matches any of the standard filter names
     if (s==i18n("default filter name",*c)) {
       n_ame = TQString::fromLatin1(*c);
       retranslated = true;
diff --git a/knode/knarticlemanager.cpp b/knode/knarticlemanager.cpp
index 332690c2e..58a1ae13b 100644
--- a/knode/knarticlemanager.cpp
+++ b/knode/knarticlemanager.cpp
@@ -44,13 +44,13 @@
 using namespace KNode;
 
 
-KNArticleManager::KNArticleManager() : TQObject(0,0)
+KNArticleManager::KNArticleManager() : TQObject(nullptr,nullptr)
 {
-  g_roup=0;
-  f_older=0;
+  g_roup=nullptr;
+  f_older=nullptr;
   f_ilterMgr = knGlobals.filterManager();
   f_ilter = f_ilterMgr->currentFilter();
-  s_earchDlg=0;
+  s_earchDlg=nullptr;
   d_isableExpander=false;
 
   connect(f_ilterMgr, TQ_SIGNAL(filterChanged(KNArticleFilter*)), this,
@@ -195,8 +195,8 @@ void KNArticleManager::showHdrs(bool clear)
     current = static_cast<KNRemoteArticle*>( knGlobals.top->articleViewer()->article() );
 
     if(current && (current->collection() != g_roup)) {
-      current=0;
-      knGlobals.top->articleViewer()->setArticle( 0 );
+      current=nullptr;
+      knGlobals.top->articleViewer()->setArticle( nullptr );
     }
 
     if(g_roup->isLocked())
@@ -209,7 +209,7 @@ void KNArticleManager::showHdrs(bool clear)
         art=g_roup->at(i);
         art->setFilterResult(true);
         art->setFiltered(true);
-        ref=(art->idRef()!=0) ? g_roup->byId(art->idRef()) : 0;
+        ref=(art->idRef()!=0) ? g_roup->byId(art->idRef()) : nullptr;
         art->setDisplayedReference(ref);
         if(ref)
           ref->setVisibleFollowUps(true);
@@ -321,7 +321,7 @@ void KNArticleManager::showHdrs(bool clear)
 
   if(setFirstChild && v_iew->firstChild()) {
     v_iew->setCurrentItem(v_iew->firstChild());
-    knGlobals.top->articleViewer()->setArticle( 0 );
+    knGlobals.top->articleViewer()->setArticle( nullptr );
   }
 
   knGlobals.setStatusMsg(TQString());
@@ -389,7 +389,7 @@ void KNArticleManager::search()
     s_earchDlg->show();
     KWin::activateWindow(s_earchDlg->winId());
   } else {
-    s_earchDlg=new KNSearchDialog(KNSearchDialog::STgroupSearch, 0);
+    s_earchDlg=new KNSearchDialog(KNSearchDialog::STgroupSearch, nullptr);
     connect(s_earchDlg, TQ_SIGNAL(doSearch(KNArticleFilter*)), this,
       TQ_SLOT(slotFilterChanged(KNArticleFilter*)));
     connect(s_earchDlg, TQ_SIGNAL(dialogDone()), this,
@@ -422,7 +422,7 @@ KNArticleCollection* KNArticleManager::collection()
   if(f_older)
    return f_older;
 
-  return 0;
+  return nullptr;
 }
 
 
@@ -472,8 +472,8 @@ bool KNArticleManager::unloadArticle(KNArticle *a, bool force)
   if ( !force && ( ArticleWidget::articleVisible( a ) ) )
     return false;
 
-  if (!force && (a->type()==KMime::Base::ATlocal) &&
-      (knGlobals.artFactory->findComposer(static_cast<KNLocalArticle*>(a))!=0))
+  if (!force && a->type()==KMime::Base::ATlocal &&
+      knGlobals.artFactory->findComposer(static_cast<KNLocalArticle*>(a)))
     return false;
 
   if (!KNArticleWindow::closeAllWindowsForArticle(a, force))
@@ -501,7 +501,7 @@ void KNArticleManager::copyIntoFolder(KNArticle::List &l, KNFolder *f)
   for ( KNArticle::List::Iterator it = l.begin(); it != l.end(); ++it ) {
     if ( !(*it)->hasContent() )
       continue;
-    loc=new KNLocalArticle(0);
+    loc=new KNLocalArticle(nullptr);
     loc->setEditDisabled(true);
     loc->setContent( (*it)->encodedContent() );
     loc->parse();
@@ -652,7 +652,7 @@ void KNArticleManager::setRead(KNRemoteArticle::List &l, bool r, bool handleXPos
   if ( l.isEmpty() )
     return;
 
-  KNRemoteArticle *ref = 0;
+  KNRemoteArticle *ref = nullptr;
   KNGroup *g=static_cast<KNGroup*>( l.first()->collection() );
   int changeCnt=0, idRef=0;
 
@@ -661,8 +661,8 @@ void KNArticleManager::setRead(KNRemoteArticle::List &l, bool r, bool handleXPos
         handleXPosts && (*it)->newsgroups()->isCrossposted() ) {
 
       TQStringList groups = (*it)->newsgroups()->getGroups();
-      KNGroup *targetGroup=0;
-      KNRemoteArticle *xp=0;
+      KNGroup *targetGroup=nullptr;
+      KNRemoteArticle *xp=nullptr;
       KNRemoteArticle::List al;
       TQCString mid = (*it)->messageID()->as7BitString( false );
 
@@ -755,7 +755,7 @@ bool KNArticleManager::toggleWatched(KNRemoteArticle::List &l)
   if(l.isEmpty())
     return true;
 
-  KNRemoteArticle *a=l.first(), *ref=0;
+  KNRemoteArticle *a=l.first(), *ref=nullptr;
   bool watch = (!a->isWatched());
   KNGroup *g=static_cast<KNGroup*>(a->collection() );
   int changeCnt=0, idRef=0;
@@ -808,7 +808,7 @@ bool KNArticleManager::toggleIgnored(KNRemoteArticle::List &l)
   if(l.isEmpty())
     return true;
 
-  KNRemoteArticle *ref = 0;
+  KNRemoteArticle *ref = nullptr;
   bool ignore = !l.first()->isIgnored();
   KNGroup *g = static_cast<KNGroup*>( l.first()->collection() );
   int changeCnt = 0, idRef = 0;
@@ -942,7 +942,7 @@ void KNArticleManager::createCompleteThread(KNRemoteArticle *a)
   bool showThreads=knGlobals.configManager()->readNewsGeneral()->showThreads();
   KNConfig::ReadNewsGeneral *rng=knGlobals.configManager()->readNewsGeneral();
 
-  while (ref->displayedReference() != 0)
+  while (ref->displayedReference())
     ref=ref->displayedReference();
 
   top = ref;
diff --git a/knode/knarticlewindow.cpp b/knode/knarticlewindow.cpp
index 4a4235e82..8ccac52fa 100644
--- a/knode/knarticlewindow.cpp
+++ b/knode/knarticlewindow.cpp
@@ -85,7 +85,7 @@ bool KNArticleWindow::raiseWindowForArticle(const TQCString &mid)
 //==================================================================================
 
 KNArticleWindow::KNArticleWindow(KNArticle *art)
-  : TDEMainWindow(0, "articleWindow")
+  : TDEMainWindow(nullptr, "articleWindow")
 {
   if(knGlobals.instance)
     setInstance(knGlobals.instance);
diff --git a/knode/kncleanup.cpp b/knode/kncleanup.cpp
index 089ebfef4..371fbcf11 100644
--- a/knode/kncleanup.cpp
+++ b/knode/kncleanup.cpp
@@ -35,7 +35,7 @@
 #include "knnntpaccount.h"
 
 
-KNCleanUp::KNCleanUp() :  d_lg(0)
+KNCleanUp::KNCleanUp() :  d_lg(nullptr)
 {
 }
 
@@ -70,7 +70,7 @@ void KNCleanUp::start()
   }
 
   delete d_lg;
-  d_lg=0;
+  d_lg=nullptr;
 }
 
 
@@ -79,7 +79,7 @@ void KNCleanUp::reset()
   mColList.clear();
   if(d_lg) {
     delete d_lg;
-    d_lg=0;
+    d_lg=nullptr;
   }
 }
 
@@ -247,7 +247,7 @@ void KNCleanUp::compactFolder(KNFolder *f)
 
 
 KNCleanUp::ProgressDialog::ProgressDialog(int steps)
- : TQDialog(knGlobals.topWidget, 0, true)
+ : TQDialog(knGlobals.topWidget, nullptr, true)
 {
   const int w=400,
             h=160;
diff --git a/knode/kncollection.cpp b/knode/kncollection.cpp
index 28651fad9..1faf38498 100644
--- a/knode/kncollection.cpp
+++ b/knode/kncollection.cpp
@@ -20,7 +20,7 @@
 KNCollection::KNCollection(KNCollection *p)
 {
   p_arent=p;
-  l_istItem=0;
+  l_istItem=nullptr;
   c_ount=0;
 }
 
diff --git a/knode/kncollectionview.cpp b/knode/kncollectionview.cpp
index e7f9aa877..13cc085d7 100644
--- a/knode/kncollectionview.cpp
+++ b/knode/kncollectionview.cpp
@@ -34,8 +34,8 @@
 
 KNCollectionView::KNCollectionView(TQWidget *parent, const char* name) :
   KFolderTree(parent, name),
-  mActiveItem( 0 ),
-  mPopup( 0 )
+  mActiveItem( nullptr ),
+  mPopup( nullptr )
 {
   setDragEnabled(true);
   addAcceptableDropMimetype("x-knode-drag/article", false);
@@ -162,11 +162,11 @@ void KNCollectionView::removeAccount(KNNntpAccount *a)
 {
   if(!a->listItem())
     return;
-  KNCollectionViewItem *child = 0, *aitem = a->listItem();
+  KNCollectionViewItem *child = nullptr, *aitem = a->listItem();
   while((child = static_cast<KNCollectionViewItem*>(aitem->firstChild())))
     removeGroup(static_cast<KNGroup*>(child->coll));
   delete aitem;
-  a->setListItem(0);
+  a->setListItem(nullptr);
 }
 
 
@@ -206,7 +206,7 @@ void KNCollectionView::removeGroup(KNGroup *g)
     return;
 
   delete g->listItem();
-  g->setListItem(0);
+  g->setListItem(nullptr);
 }
 
 
@@ -249,11 +249,11 @@ void KNCollectionView::removeFolder(KNFolder* f)
 {
   if(!f->listItem())
     return;
-  KNCollectionViewItem *child = 0, *it = f->listItem();
+  KNCollectionViewItem *child = nullptr, *it = f->listItem();
   while((child = static_cast<KNCollectionViewItem*>(it->firstChild())))
     removeFolder(static_cast<KNFolder*>(child->coll));
   delete f->listItem();
-  f->setListItem(0);
+  f->setListItem(nullptr);
 }
 
 
@@ -371,7 +371,7 @@ TQDragObject* KNCollectionView::dragObject()
     d->setPixmap( SmallIcon("folder") );
     return d;
   }
-  return 0;
+  return nullptr;
 }
 
 
diff --git a/knode/kncollectionview.h b/knode/kncollectionview.h
index 957aa207d..e7a327a7e 100644
--- a/knode/kncollectionview.h
+++ b/knode/kncollectionview.h
@@ -30,7 +30,7 @@ class KNCollectionView : public KFolderTree {
   
 
   public:
-    KNCollectionView(TQWidget *parent, const char *name = 0);
+    KNCollectionView(TQWidget *parent, const char *name = nullptr);
     ~KNCollectionView();
 
     void setActive(TQListViewItem *item);
diff --git a/knode/kncollectionviewitem.cpp b/knode/kncollectionviewitem.cpp
index 4c1f4b7a2..a6dc4833d 100644
--- a/knode/kncollectionviewitem.cpp
+++ b/knode/kncollectionviewitem.cpp
@@ -33,14 +33,14 @@
 
 
 KNCollectionViewItem::KNCollectionViewItem( KFolderTree *parent, Protocol protocol, Type type) :
-  KFolderTreeItem(parent, TQString(), protocol, type), coll(0)
+  KFolderTreeItem(parent, TQString(), protocol, type), coll(nullptr)
 {
   setIcon();
 }
 
 
 KNCollectionViewItem::KNCollectionViewItem( KFolderTreeItem *it, Protocol protocol, Type type, int unread, int total ) :
-  KFolderTreeItem(it, TQString(), protocol, type, unread, total), coll(0)
+  KFolderTreeItem(it, TQString(), protocol, type, unread, total), coll(nullptr)
 {
   setIcon();
 }
@@ -48,7 +48,7 @@ KNCollectionViewItem::KNCollectionViewItem( KFolderTreeItem *it, Protocol protoc
 
 KNCollectionViewItem::~KNCollectionViewItem()
 {
-  if(coll) coll->setListItem(0);
+  if(coll) coll->setListItem(nullptr);
 }
 
 
diff --git a/knode/kncomposer.cpp b/knode/kncomposer.cpp
index 565cc95fc..552d40e4f 100644
--- a/knode/kncomposer.cpp
+++ b/knode/kncomposer.cpp
@@ -73,7 +73,7 @@ TQPopupMenu *KNLineEdit::createPopupMenu()
 {
     TQPopupMenu *menu = KLineEdit::createPopupMenu();
     if ( !menu )
-        return 0;
+        return nullptr;
 
     menu->insertSeparator();
     menu->insertItem( i18n( "Edit Recent Addresses..." ),
@@ -163,12 +163,12 @@ void KNLineEditSpell::spellCheckerCorrected( const TQString &old, const TQString
 
 
 KNComposer::KNComposer(KNLocalArticle *a, const TQString &text, const TQString &sig, const TQString &unwraped, bool firstEdit, bool dislikesCopies, bool createCopy)
-    : TDEMainWindow(0,"composerWindow"), r_esult(CRsave), a_rticle(a), s_ignature(sig), u_nwraped(unwraped),
-      n_eeds8Bit(true), v_alidated(false), a_uthorDislikesMailCopies(dislikesCopies), e_xternalEdited(false), e_xternalEditor(0),
-      e_ditorTempfile(0), s_pellChecker(0), a_ttChanged(false),
+    : TDEMainWindow(nullptr,"composerWindow"), r_esult(CRsave), a_rticle(a), s_ignature(sig), u_nwraped(unwraped),
+      n_eeds8Bit(true), v_alidated(false), a_uthorDislikesMailCopies(dislikesCopies), e_xternalEdited(false), e_xternalEditor(nullptr),
+      e_ditorTempfile(nullptr), s_pellChecker(nullptr), a_ttChanged(false),
       mFirstEdit( firstEdit )
 {
-    mSpellingFilter = 0;
+    mSpellingFilter = nullptr;
     spellLineEdit = false;
     m_listAction.setAutoDelete( true );
 
@@ -332,7 +332,7 @@ KNComposer::KNComposer(KNLocalArticle *a, const TQString &text, const TQString &
   //attachment popup
   a_ttPopup=static_cast<TQPopupMenu*> (factory()->container("attachment_popup", this));
   if(!a_ttPopup) a_ttPopup = new TQPopupMenu();
-  slotAttachmentSelected(0);
+  slotAttachmentSelected(nullptr);
 
   //init
   initData(text);
@@ -734,8 +734,8 @@ bool KNComposer::hasValidData()
 
 bool KNComposer::applyChanges()
 {
-  KMime::Content *text=0;
-  KNAttachment *a=0;
+  KMime::Content *text=nullptr;
+  KNAttachment *a=nullptr;
 
   //Date
   a_rticle->date()->setUnixTime();    //set current date+time
@@ -946,7 +946,7 @@ void KNComposer::initData(const TQString &text)
   if(a_rticle->contentType()->isMultipart()) {
     v_iew->showAttachmentView();
     KMime::Content::List attList;
-    AttachmentViewItem *item=0;
+    AttachmentViewItem *item=nullptr;
     attList.setAutoDelete(false);
     a_rticle->attachments(&attList);
     for(KMime::Content *c=attList.first(); c; c=attList.next()) {
@@ -1108,7 +1108,7 @@ void KNComposer::slotRemoveAttachment()
     AttachmentViewItem *it=static_cast<AttachmentViewItem*>(v_iew->a_ttView->currentItem());
     if(it->attachment->isAttached()) {
       mDeletedAttachments.append( it->attachment );
-      it->attachment=0;
+      it->attachment=nullptr;
     }
     delete it;
 
@@ -1249,7 +1249,7 @@ void KNComposer::slotExternalEditor()
   if(e_ditorTempfile) {       // shouldn't happen...
     e_ditorTempfile->unlink();
     delete e_ditorTempfile;
-    e_ditorTempfile=0;
+    e_ditorTempfile=nullptr;
   }
 
   e_ditorTempfile=new KTempFile();
@@ -1258,7 +1258,7 @@ void KNComposer::slotExternalEditor()
     KNHelper::displayTempFileError(this);
     e_ditorTempfile->unlink();
     delete e_ditorTempfile;
-    e_ditorTempfile=0;
+    e_ditorTempfile=nullptr;
     return;
   }
 
@@ -1282,7 +1282,7 @@ void KNComposer::slotExternalEditor()
     KNHelper::displayTempFileError(this);
     e_ditorTempfile->unlink();
     delete e_ditorTempfile;
-    e_ditorTempfile=0;
+    e_ditorTempfile=nullptr;
     return;
   }
 
@@ -1305,10 +1305,10 @@ void KNComposer::slotExternalEditor()
   if(!e_xternalEditor->start()) {
     KMessageBox::error(this, i18n("Unable to start external editor.\nPlease check your configuration in the settings dialog."));
     delete e_xternalEditor;
-    e_xternalEditor=0;
+    e_xternalEditor=nullptr;
     e_ditorTempfile->unlink();
     delete e_ditorTempfile;
-    e_ditorTempfile=0;
+    e_ditorTempfile=nullptr;
     return;
   }
 
@@ -1488,7 +1488,7 @@ void KNComposer::slotToBtnClicked()
 void KNComposer::slotGroupsBtnClicked()
 {
   int id=a_rticle->serverId();
-  KNNntpAccount *nntp=0;
+  KNNntpAccount *nntp=nullptr;
 
   if(id!=-1)
     nntp=knGlobals.accountManager()->account(id);
@@ -1535,10 +1535,10 @@ void KNComposer::slotEditorFinished(TDEProcess *)
 void KNComposer::slotCancelEditor()
 {
   delete e_xternalEditor;  // this also kills the editor process if it's still running
-  e_xternalEditor=0;
+  e_xternalEditor=nullptr;
   e_ditorTempfile->unlink();
   delete e_ditorTempfile;
-  e_ditorTempfile=0;
+  e_ditorTempfile=nullptr;
 
   a_ctExternalEditor->setEnabled(true);
   a_ctSpellCheck->setEnabled(true);
@@ -1556,8 +1556,8 @@ void KNComposer::slotAttachmentPopup(TDEListView*, TQListViewItem *it, const TQP
 void KNComposer::slotAttachmentSelected(TQListViewItem *it)
 {
   if(v_iew->a_ttWidget) {
-    v_iew->a_ttRemoveBtn->setEnabled((it!=0));
-    v_iew->a_ttEditBtn->setEnabled((it!=0));
+    v_iew->a_ttRemoveBtn->setEnabled(it);
+    v_iew->a_ttEditBtn->setEnabled(it);
   }
 }
 
@@ -1644,11 +1644,11 @@ void KNComposer::slotSpellFinished()
   a_ctSpellCheck->setEnabled(true);
   KSpell::spellStatus status=s_pellChecker->status();
   delete s_pellChecker;
-  s_pellChecker=0;
+  s_pellChecker=nullptr;
 
   kdDebug(5003) << "spelling: delete SpellingFilter" << endl;
   delete mSpellingFilter;
-  mSpellingFilter = 0;
+  mSpellingFilter = nullptr;
 
   if(status==KSpell::Error) {
     KMessageBox::error(this, i18n("ISpell could not be started.\n"
@@ -1716,7 +1716,7 @@ TQPopupMenu * KNComposer::popupMenu( const TQString& name )
     Q_ASSERT(factory());
     if ( factory() )
         return ((TQPopupMenu*)factory()->container( name, this ));
-    return 0L;
+    return nullptr;
 }
 
 
@@ -1724,7 +1724,7 @@ TQPopupMenu * KNComposer::popupMenu( const TQString& name )
 
 
 KNComposer::ComposerView::ComposerView(KNComposer *composer, const char *n)
-  : TQSplitter(TQt::Vertical, composer, n), a_ttWidget(0), a_ttView(0), v_iewOpen(false)
+  : TQSplitter(TQt::Vertical, composer, n), a_ttWidget(nullptr), a_ttView(nullptr), v_iewOpen(false)
 {
   TQWidget *main=new TQWidget(this);
 
@@ -1994,7 +1994,7 @@ KNComposer::Editor::Editor(KNComposer::ComposerView *_composerView, KNComposer *
     : KEdit(parent, name), m_composer( _composer ), m_composerView(_composerView)
 {
   setOverwriteEnabled(true);
-  spell = 0L;
+  spell = nullptr;
   installEventFilter(this);
   KCursor::setAutoHideCursor( this, true, true );
   m_bound = TQRegExp( TQString::fromLatin1("[\\s\\W]") );
@@ -2022,7 +2022,7 @@ bool KNComposer::Editor::eventFilter(TQObject*o, TQEvent* e)
       && lineOfChar(0, currentColumn()) == 0)
     {
       deselect();
-      m_composerView->focusNextPrevEdit(0, false); //take me up
+      m_composerView->focusNextPrevEdit(nullptr, false); //take me up
       return true;
     }
     // ---sven's Arrow key navigation end ---
@@ -2030,7 +2030,7 @@ bool KNComposer::Editor::eventFilter(TQObject*o, TQEvent* e)
     if (k->key() == Key_Backtab && k->state() == ShiftButton)
     {
       deselect();
-      m_composerView->focusNextPrevEdit(0, false);
+      m_composerView->focusNextPrevEdit(nullptr, false);
       return true;
     }
   } else if ( e->type() == TQEvent::ContextMenu ) {
@@ -2388,10 +2388,10 @@ void KNComposer::Editor::keyPressEvent ( TQKeyEvent *e)
 void KNComposer::Editor::contentsContextMenuEvent( TQContextMenuEvent */*e*/ )
 {
     TQString selectWord = selectWordUnderCursor();
-    TQPopupMenu* popup = 0L;
+    TQPopupMenu* popup = nullptr;
     if ( selectWord.isEmpty())
     {
-        popup = m_composer ? m_composer->popupMenu( "edit" ): 0;
+        popup = m_composer ? m_composer->popupMenu( "edit" ): nullptr;
         if ( popup )
             popup->popup(TQCursor::pos());
     }
@@ -2424,7 +2424,7 @@ void KNComposer::Editor::slotSpellFinished()
 {
   KSpell::spellStatus status=spell->status();
   delete spell;
-  spell=0;
+  spell=nullptr;
 
   if(status==KSpell::Error) {
     KMessageBox::error(this, i18n("ISpell could not be started.\n"
@@ -2460,13 +2460,13 @@ void KNComposer::Editor::slotMisspelling (const TQString &, const TQStringList &
     int countAction = m_composer->listOfResultOfCheckWord( lst , selectWordUnderCursor());
     if ( countAction>0 )
     {
-        TQPopupMenu* popup = m_composer ? m_composer->popupMenu( "edit_with_spell" ): 0;
+        TQPopupMenu* popup = m_composer ? m_composer->popupMenu( "edit_with_spell" ): nullptr;
         if ( popup )
             popup->popup(TQCursor::pos());
     }
     else
     {
-        TQPopupMenu* popup = m_composer ? m_composer->popupMenu( "edit" ): 0;
+        TQPopupMenu* popup = m_composer ? m_composer->popupMenu( "edit" ): nullptr;
         if ( popup )
             popup->popup(TQCursor::pos());
     }
diff --git a/knode/kncomposer.h b/knode/kncomposer.h
index 6505eaa62..395093307 100644
--- a/knode/kncomposer.h
+++ b/knode/kncomposer.h
@@ -207,7 +207,7 @@ class KNLineEdit;
 class KNComposer::ComposerView  : public TQSplitter {
 
   public:
-    ComposerView(KNComposer *_composer, const char *n=0);
+    ComposerView(KNComposer *_composer, const char *n=nullptr);
     ~ComposerView();
     void focusNextPrevEdit(const TQWidget* aCur, bool aNext);
     void setMessageMode(KNComposer::MessageMode mode);
@@ -252,7 +252,7 @@ class KNComposer::Editor : public KEdit {
   
 
   public:
-    Editor(KNComposer::ComposerView *_composerView, KNComposer *_composer, TQWidget *parent=0, char *name=0);
+    Editor(KNComposer::ComposerView *_composerView, KNComposer *_composer, TQWidget *parent=nullptr, char *name=nullptr);
     ~Editor();
     TQStringList processedText();
 
@@ -305,7 +305,7 @@ class KNComposer::AttachmentView : public TDEListView {
   
 
   public:
-    AttachmentView(TQWidget *parent, char *name=0);
+    AttachmentView(TQWidget *parent, char *name=nullptr);
     ~AttachmentView();
 
   protected:
@@ -333,7 +333,7 @@ class KNComposer::AttachmentPropertiesDlg : public KDialogBase {
   
 
   public:
-    AttachmentPropertiesDlg( KNAttachment *a, TQWidget *p=0, const char *n=0);
+    AttachmentPropertiesDlg( KNAttachment *a, TQWidget *p=nullptr, const char *n=nullptr);
     ~AttachmentPropertiesDlg();
 
     void apply();
@@ -359,8 +359,8 @@ class KNLineEdit : public TDEABC::AddressLineEdit
     typedef TDEABC::AddressLineEdit KNLineEditInherited;
 public:
 
-    KNLineEdit(KNComposer::ComposerView *_composerView, bool useCompletion, TQWidget *parent = 0,
-               const char *name = 0);
+    KNLineEdit(KNComposer::ComposerView *_composerView, bool useCompletion, TQWidget *parent = nullptr,
+               const char *name = nullptr);
 protected:
     // Inherited. Always called by the parent when this widget is created.
     virtual void loadAddresses();
@@ -377,7 +377,7 @@ class KNLineEditSpell : public KNLineEdit
     TQ_OBJECT
   
 public:
-    KNLineEditSpell(KNComposer::ComposerView *_composerView, bool useCompletion,TQWidget * parent, const char * name = 0);
+    KNLineEditSpell(KNComposer::ComposerView *_composerView, bool useCompletion,TQWidget * parent, const char * name = nullptr);
     void highLightWord( unsigned int length, unsigned int pos );
     void spellCheckDone( const TQString &s );
     void spellCheckerMisspelling( const TQString &text, const TQStringList &, unsigned int pos);
diff --git a/knode/knconfig.cpp b/knode/knconfig.cpp
index f92b0e0db..060d7f788 100644
--- a/knode/knconfig.cpp
+++ b/knode/knconfig.cpp
@@ -1020,9 +1020,8 @@ TQCString KNConfig::PostNewsTechnical::findComposerCharset(TQCString cs)
       if ((*it).lower()!="us-ascii") {
         TQTextCodec *composerCodec = TQTextCodec::codecForName((*it).latin1());
         TQTextCodec *csCodec = TQTextCodec::codecForName(cs);
-        if ((composerCodec != 0) &&
-            (csCodec != 0) &&
-            (0 == strcmp(composerCodec->name(), csCodec->name()))) {
+        if (composerCodec && csCodec &&
+            0 == strcmp(composerCodec->name(), csCodec->name())) {
       s = (*it).latin1();
       break;
     }
diff --git a/knode/knconfigmanager.cpp b/knode/knconfigmanager.cpp
index f7d265067..f852940c1 100644
--- a/knode/knconfigmanager.cpp
+++ b/knode/knconfigmanager.cpp
@@ -31,7 +31,7 @@
 
 
 KNConfigManager::KNConfigManager(TQObject *p, const char *n)
-    : TQObject(p, n), d_ialog(0)
+    : TQObject(p, n), d_ialog(nullptr)
 {
   i_dentity           = new KNConfig::Identity();
   a_ppearance         = new KNConfig::Appearance();
@@ -93,7 +93,7 @@ void KNConfigManager::syncConfig()
 void KNConfigManager::slotDialogDone()
 {
   d_ialog->delayedDestruct();
-  d_ialog=0;
+  d_ialog=nullptr;
 }
 
 
diff --git a/knode/knconfigmanager.h b/knode/knconfigmanager.h
index 25cbd211f..931f4bc41 100644
--- a/knode/knconfigmanager.h
+++ b/knode/knconfigmanager.h
@@ -30,7 +30,7 @@ class KNConfigManager : TQObject {
   
 
   public:
-    KNConfigManager(TQObject *p=0, const char *n=0);
+    KNConfigManager(TQObject *p=nullptr, const char *n=nullptr);
     ~KNConfigManager();
 
     KNConfig::Identity*             identity() const           { return i_dentity; }
@@ -75,7 +75,7 @@ class KNConfigDialog : public KCMultiDialog {
   
 
   public:
-    KNConfigDialog(TQWidget *p=0, const char *n=0);
+    KNConfigDialog(TQWidget *p=nullptr, const char *n=nullptr);
 
   protected slots:
     void slotConfigCommitted();
diff --git a/knode/knconfigpages.h b/knode/knconfigpages.h
index ade88885b..20dabc6dd 100644
--- a/knode/knconfigpages.h
+++ b/knode/knconfigpages.h
@@ -33,7 +33,7 @@ class TDE_EXPORT BasePageWithTabs : public TDECModule {
   TQ_OBJECT
   
   public:
-    BasePageWithTabs( TQWidget * parent=0, const char * name=0 );
+    BasePageWithTabs( TQWidget * parent=nullptr, const char * name=nullptr );
     ~BasePageWithTabs() {};
 
     virtual void load();
@@ -55,7 +55,7 @@ class AccountsPage : public BasePageWithTabs {
   
 
   public:
-    AccountsPage(TQWidget *parent = 0, const char *name = 0);
+    AccountsPage(TQWidget *parent = nullptr, const char *name = nullptr);
 };
 
 
@@ -65,7 +65,7 @@ class TDE_EXPORT ReadNewsPage : public BasePageWithTabs {
   
  
   public:
-    ReadNewsPage(TQWidget *parent = 0, const char *name = 0);
+    ReadNewsPage(TQWidget *parent = nullptr, const char *name = nullptr);
 };
 
 // post news page
@@ -74,7 +74,7 @@ class TDE_EXPORT PostNewsPage : public BasePageWithTabs {
   
 
   public:
-    PostNewsPage(TQWidget *parent = 0, const char *name = 0);
+    PostNewsPage(TQWidget *parent = nullptr, const char *name = nullptr);
 };
 
 
diff --git a/knode/knconfigwidgets.cpp b/knode/knconfigwidgets.cpp
index 27c81824a..72a2a5bfc 100644
--- a/knode/knconfigwidgets.cpp
+++ b/knode/knconfigwidgets.cpp
@@ -1776,7 +1776,7 @@ void KNConfig::FilterListWidget::addMenuItem(KNArticleFilter *f)
     if (findItem(m_lb, f)==-1)
       m_lb->insertItem(new LBoxItem(f, f->translatedName()));
   } else   // separator
-    m_lb->insertItem(new LBoxItem(0, "==="));
+    m_lb->insertItem(new LBoxItem(nullptr, "==="));
   slotSelectionChangedMenu();
   emit changed(true);
 }
@@ -1850,14 +1850,14 @@ void KNConfig::FilterListWidget::slotCopyBtnClicked()
 void KNConfig::FilterListWidget::slotUpBtnClicked()
 {
   int c=m_lb->currentItem();
-  KNArticleFilter *f=0;
+  KNArticleFilter *f=nullptr;
 
   if(c==0 || c==-1) return;
   f=(static_cast<LBoxItem*>(m_lb->item(c)))->filter;
   if(f)
     m_lb->insertItem(new LBoxItem(f, f->translatedName()), c-1);
   else
-    m_lb->insertItem(new LBoxItem(0, "==="), c-1);
+    m_lb->insertItem(new LBoxItem(nullptr, "==="), c-1);
   m_lb->removeItem(c+1);
   m_lb->setCurrentItem(c-1);
   emit changed(true);
@@ -1867,14 +1867,14 @@ void KNConfig::FilterListWidget::slotUpBtnClicked()
 void KNConfig::FilterListWidget::slotDownBtnClicked()
 {
   int c=m_lb->currentItem();
-  KNArticleFilter *f=0;
+  KNArticleFilter *f=nullptr;
 
   if(c==-1 || c+1==(int)m_lb->count()) return;
   f=(static_cast<LBoxItem*>(m_lb->item(c)))->filter;
   if(f)
     m_lb->insertItem(new LBoxItem(f, f->translatedName()), c+2);
   else
-    m_lb->insertItem(new LBoxItem(0, "==="), c+2);
+    m_lb->insertItem(new LBoxItem(nullptr, "==="), c+2);
   m_lb->removeItem(c);
   m_lb->setCurrentItem(c+1);
   emit changed(true);
@@ -1883,7 +1883,7 @@ void KNConfig::FilterListWidget::slotDownBtnClicked()
 
 void KNConfig::FilterListWidget::slotSepAddBtnClicked()
 {
-  m_lb->insertItem(new LBoxItem(0, "==="), m_lb->currentItem());
+  m_lb->insertItem(new LBoxItem(nullptr, "==="), m_lb->currentItem());
   slotSelectionChangedMenu();
   emit changed(true);
 }
@@ -1893,7 +1893,7 @@ void KNConfig::FilterListWidget::slotSepRemBtnClicked()
 {
   int c=m_lb->currentItem();
 
-  if( (c!=-1) && ( (static_cast<LBoxItem*>(m_lb->item(c)))->filter==0 ) )
+  if (c != -1 && !static_cast<LBoxItem*>(m_lb->item(c))->filter)
      m_lb->removeItem(c);
   slotSelectionChangedMenu();
   emit changed(true);
@@ -1922,7 +1922,7 @@ void KNConfig::FilterListWidget::slotSelectionChangedMenu()
 
   u_pBtn->setEnabled(curr>0);
   d_ownBtn->setEnabled((curr!=-1)&&(curr+1!=(int)m_lb->count()));
-  s_epRemBtn->setEnabled((curr!=-1) && ( (static_cast<LBoxItem*>(m_lb->item(curr)))->filter==0 ) );
+  s_epRemBtn->setEnabled(curr != -1 && !static_cast<LBoxItem*>(m_lb->item(curr))->filter);
 }
 
 
@@ -2308,7 +2308,7 @@ KNConfig::PostNewsSpellingWidget::PostNewsSpellingWidget( TQWidget *p, const cha
 {
   TQVBoxLayout *topL=new TQVBoxLayout(this, 5);
 
-  c_onf = new KSpellConfig( this, "spell", 0, false );
+  c_onf = new KSpellConfig( this, "spell", nullptr, false );
   topL->addWidget(c_onf);
   connect(c_onf, TQ_SIGNAL(configChanged()), TQ_SLOT(changed()));
 
diff --git a/knode/knconfigwidgets.h b/knode/knconfigwidgets.h
index 66978acae..c38a6240e 100644
--- a/knode/knconfigwidgets.h
+++ b/knode/knconfigwidgets.h
@@ -69,7 +69,7 @@ class TDE_EXPORT IdentityWidget : public TDECModule {
   
 
   public:
-    IdentityWidget(Identity *d, TQWidget *p=0, const char *n=0);
+    IdentityWidget(Identity *d, TQWidget *p=nullptr, const char *n=nullptr);
     ~IdentityWidget();
 
     void load();
@@ -111,7 +111,7 @@ class TDE_EXPORT NntpAccountListWidget : public TDECModule {
   
 
   public:
-    NntpAccountListWidget(TQWidget *p=0, const char *n=0);
+    NntpAccountListWidget(TQWidget *p=nullptr, const char *n=nullptr);
     ~NntpAccountListWidget();
 
     void load();
@@ -119,7 +119,7 @@ class TDE_EXPORT NntpAccountListWidget : public TDECModule {
   protected:
     class LBoxItem : public KNListBoxItem {
       public:
-        LBoxItem(KNNntpAccount *a, const TQString &t, TQPixmap *p=0)
+        LBoxItem(KNNntpAccount *a, const TQString &t, TQPixmap *p=nullptr)
           : KNListBoxItem(t, p) , account(a)  {}
         ~LBoxItem() {}
         KNNntpAccount *account;
@@ -159,7 +159,7 @@ class TDE_EXPORT NntpAccountConfDialog : public KDialogBase  {
   
 
   public:
-    NntpAccountConfDialog(KNNntpAccount* acc, TQWidget *p=0, const char *n=0);
+    NntpAccountConfDialog(KNNntpAccount* acc, TQWidget *p=nullptr, const char *n=nullptr);
     ~NntpAccountConfDialog();
 
   protected:
@@ -201,7 +201,7 @@ TQ_OBJECT
   
 
   public:
-    SmtpAccountWidget(TQWidget *p=0, const char *n=0);
+    SmtpAccountWidget(TQWidget *p=nullptr, const char *n=nullptr);
     ~SmtpAccountWidget() {}
 
     virtual void load();
@@ -223,7 +223,7 @@ class TDE_EXPORT AppearanceWidget : public TDECModule {
   
 
   public:
-    AppearanceWidget(TQWidget *p=0, const char *n=0);
+    AppearanceWidget(TQWidget *p=nullptr, const char *n=nullptr);
     ~AppearanceWidget();
 
     void load();
@@ -299,7 +299,7 @@ class TDE_EXPORT AppearanceWidget : public TDECModule {
 class TDE_EXPORT ReadNewsGeneralWidget : public TDECModule {
 
   public:
-    ReadNewsGeneralWidget(ReadNewsGeneral *d, TQWidget *p=0, const char *n=0);
+    ReadNewsGeneralWidget(ReadNewsGeneral *d, TQWidget *p=nullptr, const char *n=nullptr);
     ~ReadNewsGeneralWidget();
 
     void load();
@@ -328,7 +328,7 @@ class TDE_EXPORT ReadNewsGeneralWidget : public TDECModule {
 class TDE_EXPORT ReadNewsNavigationWidget : public TDECModule {
 
   public:
-    ReadNewsNavigationWidget(ReadNewsNavigation *d, TQWidget *p=0, const char *n=0);
+    ReadNewsNavigationWidget(ReadNewsNavigation *d, TQWidget *p=nullptr, const char *n=nullptr);
     ~ReadNewsNavigationWidget();
 
     void load();
@@ -352,7 +352,7 @@ class TDE_EXPORT ReadNewsViewerWidget : public TDECModule {
   
 
   public:
-    ReadNewsViewerWidget(ReadNewsViewer *d, TQWidget *p=0, const char *n=0);
+    ReadNewsViewerWidget(ReadNewsViewer *d, TQWidget *p=nullptr, const char *n=nullptr);
     ~ReadNewsViewerWidget();
 
     void load();
@@ -379,7 +379,7 @@ class TDE_EXPORT DisplayedHeadersWidget : public TDECModule {
   
 
   public:
-    DisplayedHeadersWidget(DisplayedHeaders *d, TQWidget *p=0, const char *n=0);
+    DisplayedHeadersWidget(DisplayedHeaders *d, TQWidget *p=nullptr, const char *n=nullptr);
     ~DisplayedHeadersWidget();
 
     void load();
@@ -426,7 +426,7 @@ class TDE_EXPORT DisplayedHeaderConfDialog : public KDialogBase {
   
 
   public:
-    DisplayedHeaderConfDialog(KNDisplayedHeader *h, TQWidget *p=0, char *n=0);
+    DisplayedHeaderConfDialog(KNDisplayedHeader *h, TQWidget *p=nullptr, char *n=nullptr);
     ~DisplayedHeaderConfDialog();
 
 
@@ -451,7 +451,7 @@ class TDE_EXPORT ScoringWidget : public TDECModule {
   
 
   public:
-    ScoringWidget(Scoring *d, TQWidget *p=0, const char *n=0);
+    ScoringWidget(Scoring *d, TQWidget *p=nullptr, const char *n=nullptr);
     ~ScoringWidget();
 
     void load();
@@ -472,7 +472,7 @@ class TDE_EXPORT FilterListWidget : public TDECModule {
   
 
   public:
-    FilterListWidget(TQWidget *p=0, const char *n=0);
+    FilterListWidget(TQWidget *p=nullptr, const char *n=nullptr);
     ~FilterListWidget();
 
     void load();
@@ -489,7 +489,7 @@ class TDE_EXPORT FilterListWidget : public TDECModule {
   protected:
     class LBoxItem : public KNListBoxItem {
       public:
-        LBoxItem(KNArticleFilter *f, const TQString &t, TQPixmap *p=0)
+        LBoxItem(KNArticleFilter *f, const TQString &t, TQPixmap *p=nullptr)
           : KNListBoxItem(t, p) , filter(f) {}
         ~LBoxItem() {}
 
@@ -538,7 +538,7 @@ class TDE_EXPORT PostNewsTechnicalWidget : public TDECModule {
   
 
   public:
-    PostNewsTechnicalWidget(PostNewsTechnical *d, TQWidget *p=0, const char *n=0);
+    PostNewsTechnicalWidget(PostNewsTechnical *d, TQWidget *p=nullptr, const char *n=nullptr);
     ~PostNewsTechnicalWidget();
 
     void load();
@@ -573,7 +573,7 @@ class TDE_EXPORT PostNewsTechnicalWidget : public TDECModule {
 class TDE_EXPORT XHeaderConfDialog : public KDialogBase {
 
   public:
-    XHeaderConfDialog(const TQString &h=TQString(), TQWidget *p=0, const char *n=0);
+    XHeaderConfDialog(const TQString &h=TQString(), TQWidget *p=nullptr, const char *n=nullptr);
     ~XHeaderConfDialog();
 
     TQString result();
@@ -592,7 +592,7 @@ class TDE_EXPORT PostNewsComposerWidget : public TDECModule {
   
 
   public:
-    PostNewsComposerWidget(PostNewsComposer *d, TQWidget *p=0, const char *n=0);
+    PostNewsComposerWidget(PostNewsComposer *d, TQWidget *p=nullptr, const char *n=nullptr);
     ~PostNewsComposerWidget();
 
     void load();
@@ -620,7 +620,7 @@ class TDE_EXPORT PostNewsComposerWidget : public TDECModule {
 class TDE_EXPORT PostNewsSpellingWidget : public TDECModule {
 
   public:
-    PostNewsSpellingWidget(TQWidget *p=0, const char *n=0);
+    PostNewsSpellingWidget(TQWidget *p=nullptr, const char *n=nullptr);
     ~PostNewsSpellingWidget();
 
     void save();
@@ -638,7 +638,7 @@ class TDE_EXPORT PrivacyWidget : public TDECModule {
   
 
   public:
-    PrivacyWidget(TQWidget *p=0, const char *n=0);
+    PrivacyWidget(TQWidget *p=nullptr, const char *n=nullptr);
     ~PrivacyWidget();
 
     void save();
@@ -658,7 +658,7 @@ class TDE_EXPORT GroupCleanupWidget : public TQWidget {
   
 
   public:
-    GroupCleanupWidget( Cleanup *data, TQWidget *parent = 0, const char *name = 0 );
+    GroupCleanupWidget( Cleanup *data, TQWidget *parent = nullptr, const char *name = nullptr );
 
     void load();
     void save();
@@ -687,7 +687,7 @@ class TDE_EXPORT CleanupWidget : public TDECModule {
   
 
   public:
-    CleanupWidget(TQWidget *p=0, const char *n=0);
+    CleanupWidget(TQWidget *p=nullptr, const char *n=nullptr);
     ~CleanupWidget();
 
     void load();
diff --git a/knode/knconvert.cpp b/knode/knconvert.cpp
index dce0df7a0..62afabc38 100644
--- a/knode/knconvert.cpp
+++ b/knode/knconvert.cpp
@@ -45,7 +45,7 @@ bool KNConvert::needToConvert(const TQString &oldVersion)
 
 
 KNConvert::KNConvert(const TQString &version)
-  : TQDialog(0,0,true), l_ogList(0), c_onversionDone(false), v_ersion(version)
+  : TQDialog(nullptr,nullptr,true), l_ogList(nullptr), c_onversionDone(false), v_ersion(version)
 {
   setCaption(tdeApp->makeStdCaption(i18n("Conversion")));
   TQVBoxLayout *topL=new TQVBoxLayout(this, 5,5);
@@ -180,8 +180,8 @@ void KNConvert::slotStart()
     connect(t_ar, TQ_SIGNAL(processExited(TDEProcess*)), this, TQ_SLOT(slotTarExited(TDEProcess*)));
     if(!t_ar->start()) {
       delete t_ar;
-      t_ar = 0;
-      slotTarExited(0);
+      t_ar = nullptr;
+      slotTarExited(nullptr);
     }
   }
   else
@@ -215,14 +215,14 @@ void KNConvert::slotTarExited(TDEProcess *proc)
     if(KMessageBox::Cancel==KMessageBox::warningContinueCancel(this, i18n("<b>The backup failed</b>; do you want to continue anyway?"))) {
 
       delete t_ar;
-      t_ar = 0;
+      t_ar = nullptr;
       reject();
       return;
     }
   }
 
   delete t_ar;
-  t_ar = 0;
+  t_ar = nullptr;
   if(success)
     l_og.append(i18n("created backup of the old data-files in %1").arg(b_ackupPath->text()));
   else
diff --git a/knode/kndisplayedheader.cpp b/knode/kndisplayedheader.cpp
index ffca72cf2..5bfd6b567 100644
--- a/knode/kndisplayedheader.cpp
+++ b/knode/kndisplayedheader.cpp
@@ -21,10 +21,10 @@
 static const char *predef[] = { "Approved","Content-Transfer-Encoding","Content-Type","Control","Date","Distribution",
                                 "Expires","Followup-To","From","Lines","Mail-Copies-To","Message-ID","Mime-Version","NNTP-Posting-Host",
                                 "Newsgroups","Organization","Path","References","Reply-To", "Sender","Subject",
-                                "Supersedes","To", "User-Agent","X-Mailer","X-Newsreader","X-No-Archive","XRef",0 };
+                                "Supersedes","To", "User-Agent","X-Mailer","X-Newsreader","X-No-Archive","XRef",nullptr };
 
 // default display names KNode uses
-static const char *disp[] = { "Groups", 0 };
+static const char *disp[] = { "Groups", nullptr };
 
 void dummyHeader()
 {
@@ -105,7 +105,7 @@ TQString KNDisplayedHeader::translatedName()
 void KNDisplayedHeader::setTranslatedName(const TQString &s)
 {
   bool retranslated = false;
-  for (const char **c=predef;(*c)!=0;c++) {  // ok, first the standard header names
+  for (const char **c=predef;*c;c++) {  // ok, first the standard header names
     if (s==i18n("collection of article headers",*c)) {
       n_ame = TQString::fromLatin1(*c);
       retranslated = true;
@@ -114,7 +114,7 @@ void KNDisplayedHeader::setTranslatedName(const TQString &s)
   }
 
   if (!retranslated) {
-    for (const char **c=disp;(*c)!=0;c++)   // now our standard display names
+    for (const char **c=disp;*c;c++)   // now our standard display names
       if (s==i18n("collection of article headers",*c)) {
         n_ame = TQString::fromLatin1(*c);
         retranslated = true;
diff --git a/knode/knfilterconfigwidget.h b/knode/knfilterconfigwidget.h
index 634a679aa..c1627619f 100644
--- a/knode/knfilterconfigwidget.h
+++ b/knode/knfilterconfigwidget.h
@@ -33,7 +33,7 @@ class KNFilterConfigWidget : public TQTabWidget  {
   friend class KNSearchDialog;
 
   public:
-    KNFilterConfigWidget(TQWidget *parent=0, const char *name=0);
+    KNFilterConfigWidget(TQWidget *parent=nullptr, const char *name=nullptr);
     ~KNFilterConfigWidget();
     
     void reset();
diff --git a/knode/knfilterdialog.h b/knode/knfilterdialog.h
index 969356398..5690edfc6 100644
--- a/knode/knfilterdialog.h
+++ b/knode/knfilterdialog.h
@@ -34,7 +34,7 @@ class KNFilterDialog : public KDialogBase {
   friend class KNFilterManager;
 
   public:
-    KNFilterDialog(KNArticleFilter *f=0, TQWidget *parent=0, const char *name=0);
+    KNFilterDialog(KNArticleFilter *f=nullptr, TQWidget *parent=nullptr, const char *name=nullptr);
     ~KNFilterDialog();
 
     KNArticleFilter* filter() { return fltr; }
diff --git a/knode/knfiltermanager.cpp b/knode/knfiltermanager.cpp
index b5394e28a..6baead930 100644
--- a/knode/knfiltermanager.cpp
+++ b/knode/knfiltermanager.cpp
@@ -62,7 +62,7 @@ void KNFilterSelectAction::slotMenuActivated(int id)
 //==============================================================================
 
 KNFilterManager::KNFilterManager(TQObject * parent, const char * name)
- : TQObject(parent,name), fset(0), currFilter(0), a_ctFilter(0)
+ : TQObject(parent,name), fset(nullptr), currFilter(nullptr), a_ctFilter(nullptr)
 {
   loadFilters();
 
@@ -159,7 +159,7 @@ void KNFilterManager::startConfig(KNConfig::FilterListWidget *fs)
     if ((*it)!=-1)
       fset->addMenuItem(byID((*it)));
     else
-      fset->addMenuItem(0);
+      fset->addMenuItem(nullptr);
     ++it;
   }
 }
@@ -168,7 +168,7 @@ void KNFilterManager::startConfig(KNConfig::FilterListWidget *fs)
 
 void KNFilterManager::endConfig()
 {
-  fset=0;
+  fset=nullptr;
 }
 
 
@@ -179,7 +179,7 @@ void KNFilterManager::commitChanges()
   saveFilterLists();
 
   if(currFilter)
-    if(!currFilter->isEnabled()) currFilter=0;
+    if(!currFilter->isEnabled()) currFilter=nullptr;
 
   updateMenu();
 
@@ -270,7 +270,7 @@ void KNFilterManager::deleteFilter(KNArticleFilter *f)
         fset->removeMenuItem( f );
       }
       if ( currFilter == f ) {
-        currFilter = 0;
+        currFilter = nullptr;
         emit filterChanged( currFilter );
       }
     }
@@ -313,7 +313,7 @@ KNArticleFilter* KNFilterManager::byID(int id)
     if ( (*it)->id() == id )
       return (*it);
 
-  return 0;
+  return nullptr;
 }
 
 
@@ -324,7 +324,7 @@ void KNFilterManager::updateMenu()
     return;
 
   a_ctFilter->popupMenu()->clear();
-  KNArticleFilter *f=0;
+  KNArticleFilter *f=nullptr;
 
   TQValueList<int>::Iterator it = menuOrder.begin();
   while (it != menuOrder.end()) {
@@ -353,7 +353,7 @@ void KNFilterManager::slotMenuActivated(int id)
 
 void KNFilterManager::slotShowFilterChooser()
 {
-  KNArticleFilter *f=0;
+  KNArticleFilter *f=nullptr;
   TQStringList items;
   TQValueList<int> ids;
 
diff --git a/knode/knfiltermanager.h b/knode/knfiltermanager.h
index b6df5280e..2ff26bbf0 100644
--- a/knode/knfiltermanager.h
+++ b/knode/knfiltermanager.h
@@ -57,7 +57,7 @@ class KNFilterManager : public TQObject
   
 
   public:
-    KNFilterManager(TQObject * parent = 0, const char * name = 0);
+    KNFilterManager(TQObject * parent = nullptr, const char * name = nullptr);
     ~KNFilterManager();
 
     void readOptions();
diff --git a/knode/knfolder.cpp b/knode/knfolder.cpp
index d2e90fa4b..fe86dc5a5 100644
--- a/knode/knfolder.cpp
+++ b/knode/knfolder.cpp
@@ -36,7 +36,7 @@ using namespace KNode;
 
 
 KNFolder::KNFolder()
-  : KNArticleCollection(0), i_d(-1), p_arentId(-1), i_ndexDirty(false), w_asOpen(true)
+  : KNArticleCollection(nullptr), i_d(-1), p_arentId(-1), i_ndexDirty(false), w_asOpen(true)
 {
 }
 
@@ -401,7 +401,7 @@ bool KNFolder::saveArticles( KNLocalArticle::List &l )
         kdError(5003) << "KNFolder::saveArticle(KNLocalArticle::List *l) : cannot append article!" << endl;
         ret = false;
         continue;
-        (*it)->setCollection(0);
+        (*it)->setCollection(nullptr);
       }
       else {
         (*it)->setCollection(this);
@@ -420,11 +420,11 @@ bool KNFolder::saveArticles( KNLocalArticle::List &l )
       ts << (*it)->subject()->as7BitString(false) << '\t';
 
       KMime::Headers::Base* h;
-      if( ( h = (*it)->newsgroups( false ) ) !=0 )
+      if ((h = (*it)->newsgroups(false)) != nullptr)
         ts << h->as7BitString(false);
       ts << '\t';
 
-      if( (h = (*it)->to( false ) ) != 0 )
+      if ((h = (*it)->to(false)) != nullptr)
         ts << h->as7BitString(false);
       ts << '\t';
 
@@ -470,7 +470,7 @@ void KNFolder::removeArticles( KNLocalArticle::List &l, bool del )
 
   int idx = 0, delCnt = 0, *positions;
   positions = new int[l.count()];
-  KNLocalArticle *a = 0;
+  KNLocalArticle *a = nullptr;
 
   for ( KNLocalArticle::List::Iterator it = l.begin(); it != l.end(); ++it, ++idx ) {
     if ( (*it)->isLocked() )
diff --git a/knode/knfolder.h b/knode/knfolder.h
index 0be6dafde..4542c1a80 100644
--- a/knode/knfolder.h
+++ b/knode/knfolder.h
@@ -28,8 +28,8 @@ class KNFolder : public KNArticleCollection  {
 
   public:
     KNFolder();
-    KNFolder(int id, const TQString &name, KNFolder *parent=0);
-    KNFolder(int id, const TQString &name, const TQString &prefix, KNFolder *parent=0);
+    KNFolder(int id, const TQString &name, KNFolder *parent=nullptr);
+    KNFolder(int id, const TQString &name, const TQString &prefix, KNFolder *parent=nullptr);
     ~KNFolder();
 
     //type
diff --git a/knode/knfoldermanager.cpp b/knode/knfoldermanager.cpp
index f4f4a22a2..dd53448dc 100644
--- a/knode/knfoldermanager.cpp
+++ b/knode/knfoldermanager.cpp
@@ -62,7 +62,7 @@ KNFolderManager::KNFolderManager(KNArticleManager *a) : a_rtManager(a)
   //custom folders
   loadCustomFolders();
 
-  setCurrentFolder(0);
+  setCurrentFolder(nullptr);
 }
 
 
@@ -131,7 +131,7 @@ KNFolder* KNFolderManager::folder(int i)
   for ( TQValueList<KNFolder*>::Iterator it = mFolderList.begin(); it != mFolderList.end(); ++it )
     if ( (*it)->id() == i )
       return (*it);
-  return 0;
+  return nullptr;
 }
 
 
@@ -173,7 +173,7 @@ bool KNFolderManager::deleteFolder(KNFolder *f)
   del.append(f);
   for ( TQValueList<KNFolder*>::Iterator it = del.begin(); it != del.end(); ++it ) {
     if ( c_urrentFolder == (*it) )
-      c_urrentFolder = 0;
+      c_urrentFolder = nullptr;
 
     if ( unloadHeaders( (*it), true ) ) {
       (*it)->deleteFiles();
@@ -202,7 +202,7 @@ bool KNFolderManager::moveFolder(KNFolder *f, KNFolder *p)
     return true;
 
   // is "p" a child of "f" ?
-  KNCollection *p2=p?p->parent():0;
+  KNCollection *p2=p?p->parent():nullptr;
   while(p2) {
     if(p2==f)
       break;
@@ -327,7 +327,7 @@ void KNFolderManager::importFromMBox(KNFolder *f)
 
           if (readBytes != -1) {
             buff.at(readBytes)='\0'; //terminate string
-            art = new KNLocalArticle(0);
+            art = new KNLocalArticle(nullptr);
             art->setEditDisabled(true);
             art->setContent(buff);
             art->parse();
@@ -346,7 +346,7 @@ void KNFolderManager::importFromMBox(KNFolder *f)
 
             if (readBytes != -1) {
               buff.at(readBytes)='\0'; //terminate string
-              art = new KNLocalArticle(0);
+              art = new KNLocalArticle(nullptr);
               art->setEditDisabled(true);
               art->setContent(buff);
               art->parse();
diff --git a/knode/knfoldermanager.h b/knode/knfoldermanager.h
index daf3e0ad1..6927a1121 100644
--- a/knode/knfoldermanager.h
+++ b/knode/knfoldermanager.h
@@ -35,7 +35,7 @@ class KNFolderManager : public TQObject
     //folder access
     void setCurrentFolder(KNFolder *f);
     KNFolder* currentFolder() const       { return c_urrentFolder; }
-    bool hasCurrentFolder() const         { return (c_urrentFolder!=0); }
+    bool hasCurrentFolder() const         { return c_urrentFolder; }
     KNFolder* folder(int id);
     TQValueList<KNFolder*> folders() const { return mFolderList; }
 
diff --git a/knode/knglobals.cpp b/knode/knglobals.cpp
index baab06afb..b1adb20aa 100644
--- a/knode/knglobals.cpp
+++ b/knode/knglobals.cpp
@@ -33,14 +33,14 @@
 #include "knwidgets.h"
 
 KNGlobals::KNGlobals() :
-  mNetAccess( 0 ),
-  mCfgManager( 0 ),
-  mAccManager( 0 ),
-  mGrpManager( 0 ),
-  mArtManager( 0 ),
-  mFilManager( 0 ),
-  mFolManager( 0 ),
-  mMemManager( 0 )
+  mNetAccess( nullptr ),
+  mCfgManager( nullptr ),
+  mAccManager( nullptr ),
+  mGrpManager( nullptr ),
+  mArtManager( nullptr ),
+  mFilManager( nullptr ),
+  mFolManager( nullptr ),
+  mMemManager( nullptr )
 {
 }
 
@@ -116,7 +116,7 @@ KNFolderManager* KNGlobals::folderManager()
   return mFolManager;
 }
 
-KNScoringManager* KNGlobals::mScoreManager = 0;
+KNScoringManager* KNGlobals::mScoreManager = nullptr;
 
 KNScoringManager* KNGlobals::scoringManager()
 {
diff --git a/knode/kngroup.cpp b/knode/kngroup.cpp
index e5f8f2d3b..d147d43f7 100644
--- a/knode/kngroup.cpp
+++ b/knode/kngroup.cpp
@@ -38,7 +38,7 @@
 KNGroup::KNGroup(KNCollection *p)
   : KNArticleCollection(p), n_ewCount(0), l_astFetchCount(0), r_eadCount(0), i_gnoreCount(0),
     l_astNr(0), m_axFetch(0), d_ynDataFormat(1), f_irstNew(-1), l_ocked(false),
-    u_seCharset(false), s_tatus(unknown), i_dentity(0)
+    u_seCharset(false), s_tatus(unknown), i_dentity(nullptr)
 {
   mCleanupConf = new KNConfig::Cleanup( false );
 }
@@ -108,7 +108,7 @@ bool KNGroup::readInfo(const TQString &confPath)
   }
   else {
     delete i_dentity;
-    i_dentity=0;
+    i_dentity=nullptr;
   }
 
   mCleanupConf->loadConfig( &info );
@@ -386,7 +386,7 @@ bool KNGroup::unloadHdrs(bool force)
 // Attention: this method is called from the network thread!
 void KNGroup::insortNewHeaders(TQStrList *hdrs, TQStrList *hdrfmt, KNProtocolClient *client)
 {
-  KNRemoteArticle *art=0, *art2=0;
+  KNRemoteArticle *art=nullptr, *art2=nullptr;
   TQCString data, hdr, hdrName;
   KTQCStringSplitter split;
   split.setIncludeSep(false);
@@ -871,7 +871,7 @@ KNRemoteArticle* KNGroup::findReference(KNRemoteArticle *a)
   int found=false;
   TQCString ref_mid;
   int ref_nr=0;
-  KNRemoteArticle *ref_art=0;
+  KNRemoteArticle *ref_art=nullptr;
 
   ref_mid=a->references()->first();
 
@@ -899,7 +899,7 @@ void KNGroup::scoreArticles(bool onlynew)
   if (todo) {
     // reset the notify collection
     delete KNScorableArticle::notifyC;
-    KNScorableArticle::notifyC = 0;
+    KNScorableArticle::notifyC = nullptr;
 
     kdDebug(5003) << "scoring " << newCount() << " articles" << endl;
     kdDebug(5003) << "(total " << length() << " article in group)" << endl;
@@ -1023,7 +1023,7 @@ void KNGroup::showProperties()
 
   if(i_dentity->isEmpty()) {
     delete i_dentity;
-    i_dentity=0;
+    i_dentity=nullptr;
   }
 
   delete d;
diff --git a/knode/kngroup.h b/knode/kngroup.h
index 15f26839e..ba9350650 100644
--- a/knode/kngroup.h
+++ b/knode/kngroup.h
@@ -37,7 +37,7 @@ class KNGroup : public KNArticleCollection , public KNJobItem  {
   public:
     enum Status { unknown=0, readOnly=1, postingAllowed=2, moderated=3 };
 
-    KNGroup(KNCollection *p=0);
+    KNGroup(KNCollection *p=nullptr);
     ~KNGroup();
 
     /** type */
@@ -93,7 +93,7 @@ class KNGroup : public KNArticleCollection , public KNJobItem  {
     /** load + save */
     bool loadHdrs();
     bool unloadHdrs(bool force=true);
-    void insortNewHeaders(TQStrList *hdrs, TQStrList *hdrfmt, KNProtocolClient *client=0);
+    void insortNewHeaders(TQStrList *hdrs, TQStrList *hdrfmt, KNProtocolClient *client=nullptr);
     int saveStaticData(int cnt,bool ovr=false);
     void saveDynamicData(int cnt,bool ovr=false);
     void syncDynamicData();
@@ -133,7 +133,7 @@ class KNGroup : public KNArticleCollection , public KNJobItem  {
 
 
   protected:
-    void buildThreads(int cnt, KNProtocolClient *client=0);
+    void buildThreads(int cnt, KNProtocolClient *client=nullptr);
     KNRemoteArticle* findReference(KNRemoteArticle *a);
 
     int       n_ewCount,
diff --git a/knode/kngroupbrowser.cpp b/knode/kngroupbrowser.cpp
index 865dbd202..834c0a4ce 100644
--- a/knode/kngroupbrowser.cpp
+++ b/knode/kngroupbrowser.cpp
@@ -36,7 +36,7 @@
 
 KNGroupBrowser::KNGroupBrowser(TQWidget *parent, const TQString &caption, KNNntpAccount *a,
                                int buttons, bool newCBact, const TQString &user1, const TQString &user2) :
-  KDialogBase( parent, 0L, true, caption, buttons | Help | Ok | Cancel, Ok, true, user1, user2 ),
+  KDialogBase( parent, nullptr, true, caption, buttons | Help | Ok | Cancel, Ok, true, user1, user2 ),
   incrementalFilter(false), a_ccount(a)
 {
   refilterTimer = new TQTimer();
@@ -324,7 +324,7 @@ void KNGroupBrowser::slotFilter(const TQString &txt)
 {
   TQString filtertxt = txt.lower();
   TQRegExp reg(filtertxt, false, false);
-  CheckItem *cit=0;
+  CheckItem *cit=nullptr;
 
   bool notCheckSub = !subCB->isChecked();
   bool notCheckNew = !newCB->isChecked();
@@ -455,7 +455,7 @@ KNGroupBrowser::CheckItem::~CheckItem()
 void KNGroupBrowser::CheckItem::setChecked(bool c)
 {
   KNGroupBrowser *b=browser;
-  browser=0;
+  browser=nullptr;
   TQCheckListItem::setOn(c);
   browser=b;
 }
diff --git a/knode/kngroupbrowser.h b/knode/kngroupbrowser.h
index 7470486ee..81d494dfa 100644
--- a/knode/kngroupbrowser.h
+++ b/knode/kngroupbrowser.h
@@ -81,7 +81,7 @@ class KNGroupBrowser : public KDialogBase {
     void changeItemState(const KNGroupInfo &gi, bool s);
     bool itemInListView(TQListView *view, const KNGroupInfo &gi);
     void removeListItem(TQListView *view, const KNGroupInfo &gi);
-    void createListItems(TQListViewItem *parent=0);
+    void createListItems(TQListViewItem *parent=nullptr);
 
     TQWidget *page;
     TQListView *groupView;
diff --git a/knode/kngroupdialog.cpp b/knode/kngroupdialog.cpp
index 0fe1e7db3..bcefa9ca0 100644
--- a/knode/kngroupdialog.cpp
+++ b/knode/kngroupdialog.cpp
@@ -115,7 +115,7 @@ void KNGroupDialog::updateItemState(CheckItem *it)
   it->setChecked( (it->info.subscribed && !itemInListView(unsubView, it->info)) ||
                   (!it->info.subscribed && itemInListView(subView, it->info)) );
 
-  if((it->info.subscribed || it->info.newGroup) && it->pixmap(0)==0)
+  if((it->info.subscribed || it->info.newGroup) && !it->pixmap(0))
     it->setPixmap(0, (it->info.newGroup)? pmNew:pmGroup);
 }
 
@@ -154,7 +154,7 @@ void KNGroupDialog::toUnsubscribe(TQStringList *l)
 
 void KNGroupDialog::setButtonDirection(arrowButton b, arrowDirection d)
 {
-  TQPushButton *btn=0;
+  TQPushButton *btn=nullptr;
   if(b==btn1 && dir1!=d) {
     btn=arrowBtn1;
     dir1=d;
@@ -281,7 +281,7 @@ void KNGroupDialog::slotUser1()
 void KNGroupDialog::slotUser2()
 {
   TQDate lastDate = a_ccount->lastNewFetch();
-  KDialogBase *dlg = new KDialogBase( this, 0L, true, i18n("New Groups"), Ok | Cancel, Ok);
+  KDialogBase *dlg = new KDialogBase( this, nullptr, true, i18n("New Groups"), Ok | Cancel, Ok);
 
   TQButtonGroup *btnGrp = new TQButtonGroup(i18n("Check for New Groups"),dlg);
   dlg->setMainWidget(btnGrp);
diff --git a/knode/kngroupmanager.cpp b/knode/kngroupmanager.cpp
index e4c7aed6f..2bfdafd9d 100644
--- a/knode/kngroupmanager.cpp
+++ b/knode/kngroupmanager.cpp
@@ -84,7 +84,7 @@ bool KNGroupInfo::PtrCompFn(KNGroupInfo *a, KNGroupInfo *b)
 
 
 KNGroupListData::KNGroupListData()
-  : codecForDescriptions(0)
+  : codecForDescriptions(nullptr)
 {
   groups = new std::list<KNGroupInfo*>();
 }
@@ -248,7 +248,7 @@ std::list<KNGroupInfo*>* KNGroupListData::extractList()
 KNGroupManager::KNGroupManager(TQObject * parent, const char * name)
   : TQObject(parent,name)
 {
-  c_urrentGroup=0;
+  c_urrentGroup=nullptr;
   a_rticleMgr = knGlobals.articleManager();
 }
 
@@ -357,7 +357,7 @@ KNGroup* KNGroupManager::group(const TQString &gName, const KNServerInfo *s)
     if ( (*it)->account() == s && (*it)->groupname() == gName )
       return (*it);
 
-  return 0;
+  return nullptr;
 }
 
 
@@ -367,7 +367,7 @@ KNGroup* KNGroupManager::firstGroupOfAccount(const KNServerInfo *s)
     if ( (*it)->account() == s )
       return (*it);
 
-  return 0;
+  return nullptr;
 }
 
 
@@ -406,7 +406,7 @@ void KNGroupManager::expireAll(KNNntpAccount *a)
       if ( loadHeaders( (*it) ) )
         a_rticleMgr->showHdrs();
       else
-        a_rticleMgr->setGroup(0);
+        a_rticleMgr->setGroup(nullptr);
     }
   }
 
@@ -416,7 +416,7 @@ void KNGroupManager::expireAll(KNNntpAccount *a)
 
 void KNGroupManager::showGroupDialog(KNNntpAccount *a, TQWidget *parent)
 {
-  KNGroupDialog* gDialog=new KNGroupDialog((parent!=0)? parent:knGlobals.topWidget, a);
+  KNGroupDialog* gDialog=new KNGroupDialog(parent ? parent : knGlobals.topWidget, a);
 
   connect(gDialog, TQ_SIGNAL(loadList(KNNntpAccount*)), this, TQ_SLOT(slotLoadGroupList(KNNntpAccount*)));
   connect(gDialog, TQ_SIGNAL(fetchList(KNNntpAccount*)), this, TQ_SLOT(slotFetchGroupList(KNNntpAccount*)));
@@ -424,12 +424,12 @@ void KNGroupManager::showGroupDialog(KNNntpAccount *a, TQWidget *parent)
   connect(this, TQ_SIGNAL(newListReady(KNGroupListData*)), gDialog, TQ_SLOT(slotReceiveList(KNGroupListData*)));
 
   if(gDialog->exec()) {
-    KNGroup *g=0;
+    KNGroup *g=nullptr;
 
     TQStringList lst;
     gDialog->toUnsubscribe(&lst);
     if (lst.count()>0) {
-      if (KMessageBox::Yes == KMessageBox::questionYesNoList((parent!=0)? parent:knGlobals.topWidget,i18n("Do you really want to unsubscribe\nfrom these groups?"),
+      if (KMessageBox::Yes == KMessageBox::questionYesNoList(parent ? parent : knGlobals.topWidget,i18n("Do you really want to unsubscribe\nfrom these groups?"),
                                                               lst, TQString(), i18n("Unsubscribe"), KStdGuiItem::cancel())) {
         for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
           if((g=group(*it, a)))
@@ -485,7 +485,7 @@ bool KNGroupManager::unsubscribeGroup(KNGroup *g)
   if (dir.exists()) {
     if (unloadHeaders(g, true)) {
       if(c_urrentGroup==g) {
-        setCurrentGroup(0);
+        setCurrentGroup(nullptr);
         a_rticleMgr->updateStatusString();
       }
 
@@ -556,7 +556,7 @@ void KNGroupManager::expireGroupNow(KNGroup *g)
     if( loadHeaders(g) )
       a_rticleMgr->showHdrs();
     else
-      a_rticleMgr->setGroup(0);
+      a_rticleMgr->setGroup(nullptr);
   }
 }
 
@@ -630,10 +630,10 @@ void KNGroupManager::processJob(KNJobData *j)
         emit(newListReady(d));
       } else {
         KMessageBox::error(knGlobals.topWidget, j->errorString());
-        emit(newListReady(0));
+        emit(newListReady(nullptr));
       }
     } else
-      emit(newListReady(0));
+      emit(newListReady(nullptr));
 
     delete j;
     delete d;
diff --git a/knode/kngroupmanager.h b/knode/kngroupmanager.h
index 06aa0b112..9cf254617 100644
--- a/knode/kngroupmanager.h
+++ b/knode/kngroupmanager.h
@@ -60,7 +60,7 @@ class KNGroupListData : public KNJobItem {
     KNGroupListData();
     ~KNGroupListData();
 
-    bool readIn(KNProtocolClient *client=0);
+    bool readIn(KNProtocolClient *client=nullptr);
     bool writeOut();
     void merge(std::list<KNGroupInfo*> *newGroups);
 
@@ -85,7 +85,7 @@ class KNGroupManager : public TQObject , public KNJobConsumer {
 
   public:
 
-    KNGroupManager(TQObject * parent=0, const char * name=0);
+    KNGroupManager(TQObject * parent=nullptr, const char * name=nullptr);
     ~KNGroupManager();
 
     // group access
@@ -99,18 +99,18 @@ class KNGroupManager : public TQObject , public KNJobConsumer {
     KNGroup* group(const TQString &gName, const KNServerInfo *s);
     KNGroup* firstGroupOfAccount(const KNServerInfo *s);
     KNGroup* currentGroup() const              { return c_urrentGroup; }
-    bool hasCurrentGroup() const               { return (c_urrentGroup!=0); }
+    bool hasCurrentGroup() const               { return c_urrentGroup; }
     void setCurrentGroup(KNGroup *g);
 
     // group handling
-    void showGroupDialog(KNNntpAccount *a, TQWidget *parent=0);
+    void showGroupDialog(KNNntpAccount *a, TQWidget *parent=nullptr);
     void subscribeGroup(const KNGroupInfo *gi, KNNntpAccount *a);
-    bool unsubscribeGroup(KNGroup *g=0);
-    void showGroupProperties(KNGroup *g=0);
-    void expireGroupNow(KNGroup *g=0);
-    void reorganizeGroup(KNGroup *g=0);
+    bool unsubscribeGroup(KNGroup *g=nullptr);
+    void showGroupProperties(KNGroup *g=nullptr);
+    void expireGroupNow(KNGroup *g=nullptr);
+    void reorganizeGroup(KNGroup *g=nullptr);
 
-    void checkGroupForNewHeaders(KNGroup *g=0);
+    void checkGroupForNewHeaders(KNGroup *g=nullptr);
     void checkAll(KNNntpAccount *a, bool silent=false);
 
     void expireAll(KNCleanUp *cup);
diff --git a/knode/kngrouppropdlg.h b/knode/kngrouppropdlg.h
index c7c408b78..797dae3b4 100644
--- a/knode/kngrouppropdlg.h
+++ b/knode/kngrouppropdlg.h
@@ -35,7 +35,7 @@ namespace KNConfig {
 class KNGroupPropDlg : public KDialogBase  {
 
   public:
-    KNGroupPropDlg(KNGroup *group, TQWidget *parent=0, const char *name=0);
+    KNGroupPropDlg(KNGroup *group, TQWidget *parent=nullptr, const char *name=nullptr);
     ~KNGroupPropDlg();
 
     bool nickHasChanged()const { return n_ickChanged; }
diff --git a/knode/kngroupselectdialog.cpp b/knode/kngroupselectdialog.cpp
index 10374d6d0..12d792dfb 100644
--- a/knode/kngroupselectdialog.cpp
+++ b/knode/kngroupselectdialog.cpp
@@ -79,7 +79,7 @@ void KNGroupSelectDialog::itemChangedState(CheckItem *it, bool s)
 void KNGroupSelectDialog::updateItemState(CheckItem *it)
 {
   it->setChecked(itemInListView(selView, it->info));
-  if(it->info.subscribed && it->pixmap(0)==0)
+  if(it->info.subscribed && !it->pixmap(0))
     it->setPixmap(0, pmGroup);
 }
 
@@ -127,7 +127,7 @@ void KNGroupSelectDialog::slotItemSelected(TQListViewItem *it)
   else {
     groupView->clearSelection();
     arrowBtn1->setEnabled(false);
-    arrowBtn2->setEnabled((it!=0));
+    arrowBtn2->setEnabled(it != nullptr);
   }
 }
 
diff --git a/knode/knhdrviewitem.cpp b/knode/knhdrviewitem.cpp
index 85a1fb68b..da360aa19 100644
--- a/knode/knhdrviewitem.cpp
+++ b/knode/knhdrviewitem.cpp
@@ -58,7 +58,7 @@ KNHdrViewItem::~KNHdrViewItem()
       static_cast<KNHeaderView*>( lv )->activeRemoved();
   }
 
-  if (art) art->setListItem( 0 );
+  if (art) art->setListItem( nullptr );
 }
 
 
diff --git a/knode/knhdrviewitem.h b/knode/knhdrviewitem.h
index a39140ac4..4a0344123 100644
--- a/knode/knhdrviewitem.h
+++ b/knode/knhdrviewitem.h
@@ -27,8 +27,8 @@ class KNHeaderView;
 class KNHdrViewItem : public TDEListViewItem  {
 
   public:
-    KNHdrViewItem( KNHeaderView *ref, KNArticle *a = 0 );
-    KNHdrViewItem( KNHdrViewItem *ref, KNArticle *a = 0 );
+    KNHdrViewItem( KNHeaderView *ref, KNArticle *a = nullptr );
+    KNHdrViewItem( KNHdrViewItem *ref, KNArticle *a = nullptr );
     ~KNHdrViewItem();
 
     virtual int compare(TQListViewItem *i, int col, bool ascending) const;
diff --git a/knode/knjobdata.cpp b/knode/knjobdata.cpp
index 74d98a856..b07654e80 100644
--- a/knode/knjobdata.cpp
+++ b/knode/knjobdata.cpp
@@ -35,7 +35,7 @@ KNJobConsumer::~KNJobConsumer()
 {
   TQValueList<KNJobData*>::Iterator it;
   for ( it = mJobs.begin(); it != mJobs.end(); ++it )
-    (*it)->c_onsumer = 0;
+    (*it)->c_onsumer = nullptr;
 }
 
 
@@ -64,8 +64,8 @@ void KNJobConsumer::processJob( KNJobData *j )
 // the assingment of a_ccount may cause race conditions, check again.... (CG)
 KNJobData::KNJobData(jobType t, KNJobConsumer *c, KNServerInfo *a, KNJobItem *i)
  : t_ype(t), d_ata(i), a_ccount(a), c_anceled(false), a_uthError(false), c_onsumer(c),
-  mJob( 0 ),
-  mProgressItem( 0 )
+  mJob( nullptr ),
+  mProgressItem( nullptr )
 {
   d_ata->setLocked(true);
 }
@@ -92,12 +92,12 @@ void KNJobData::cancel()
   c_anceled = true;
   if ( mJob ) {
     mJob->kill();
-    mJob = 0;
+    mJob = nullptr;
   }
   if ( mProgressItem ) {
     mProgressItem->setStatus( "Canceled" );
     mProgressItem->setComplete();
-    mProgressItem = 0;
+    mProgressItem = nullptr;
   }
 }
 
@@ -127,7 +127,7 @@ void KNJobData::createProgressItem()
   bool encr = false;
   if ( acc && acc->encryption() != KNServerInfo::None )
     encr = true;
-  mProgressItem = KPIM::ProgressManager::createProgressItem( 0,
+  mProgressItem = KPIM::ProgressManager::createProgressItem( nullptr,
       KPIM::ProgressManager::getUniqueID(), msg, i18n( "Waiting..." ), true, encr );
 }
 
diff --git a/knode/knjobdata.h b/knode/knjobdata.h
index 571067443..79fcceec9 100644
--- a/knode/knjobdata.h
+++ b/knode/knjobdata.h
@@ -117,7 +117,7 @@ class KNJobData : public TQObject
     // safe forwards to the progress item
     void setStatus( const TQString &msg ) { if ( mProgressItem ) mProgressItem->setStatus( msg ); }
     void setProgress( unsigned int progress ) { if ( mProgressItem ) mProgressItem->setProgress( progress ); }
-    void setComplete() { if ( mProgressItem ) { mProgressItem->setComplete(); mProgressItem = 0; } }
+    void setComplete() { if ( mProgressItem ) { mProgressItem->setComplete(); mProgressItem = nullptr; } }
 
   protected:
     jobType t_ype;
diff --git a/knode/knmainwidget.cpp b/knode/knmainwidget.cpp
index 473807ed1..5661064e7 100644
--- a/knode/knmainwidget.cpp
+++ b/knode/knmainwidget.cpp
@@ -92,7 +92,7 @@ KNMainWidget::KNMainWidget( KXMLGUIClient* client, bool detachable, TQWidget* pa
   manager()->setSplitterOpaqueResize(true);
 
   //article view
-  a_rtDock = createDockWidget("article_viewer", SmallIcon("contents"), 0,
+  a_rtDock = createDockWidget("article_viewer", SmallIcon("contents"), nullptr,
                               tdeApp->makeStdCaption(i18n("Article Viewer")), i18n("Article Viewer"));
   if (!detachable) {
     a_rtDock->setEnableDocking(KDockWidget::DockFullSite);
@@ -111,7 +111,7 @@ KNMainWidget::KNMainWidget( KXMLGUIClient* client, bool detachable, TQWidget* pa
   connect( mArticleViewer, TQ_SIGNAL(focusChangeRequest(TQWidget*)), TQ_SLOT(slotDockWidgetFocusChangeRequest(TQWidget*)) );
 
   //collection view
-  c_olDock = createDockWidget("group_view", UserIcon("group"), 0,
+  c_olDock = createDockWidget("group_view", UserIcon("group"), nullptr,
                               tdeApp->makeStdCaption(i18n("Group View")), i18n("Group View"));
   if (!detachable) {
     c_olDock->setEnableDocking(KDockWidget::DockFullSite);
@@ -141,7 +141,7 @@ KNMainWidget::KNMainWidget( KXMLGUIClient* client, bool detachable, TQWidget* pa
   accel->connectItem( accel->insertItem(Key_Next), mArticleViewer, TQ_SLOT(scrollNext()) );
 
   //header view
-  h_drDock = createDockWidget("header_view", SmallIcon("text_block"), 0,
+  h_drDock = createDockWidget("header_view", SmallIcon("text_block"), nullptr,
                               tdeApp->makeStdCaption(i18n("Header View")), i18n("Header View"));
   if (!detachable) {
     h_drDock->setEnableDocking(KDockWidget::DockFullSite);
@@ -306,7 +306,7 @@ void KNMainWidget::iniStatusBar()
 {
   //statusbar
   TDEMainWindow *mainWin = dynamic_cast<TDEMainWindow*>(topLevelWidget());
-  KStatusBar *sb =  mainWin ? mainWin->statusBar() : 0;
+  KStatusBar *sb =  mainWin ? mainWin->statusBar() : nullptr;
   s_tatusFilter = new KRSqueezedTextLabel( TQString(), sb );
   s_tatusFilter->setAlignment( AlignLeft | AlignVCenter );
   s_tatusGroup = new KRSqueezedTextLabel( TQString(), sb );
@@ -318,7 +318,7 @@ void KNMainWidget::iniStatusBar()
 void KNMainWidget::setStatusMsg(const TQString& text, int id)
 {
   TDEMainWindow *mainWin = dynamic_cast<TDEMainWindow*>(topLevelWidget());
-  KStatusBar *bar =  mainWin ? mainWin->statusBar() : 0;
+  KStatusBar *bar =  mainWin ? mainWin->statusBar() : nullptr;
   if ( !bar )
     return;
   bar->clear();
@@ -343,7 +343,7 @@ void KNMainWidget::setStatusMsg(const TQString& text, int id)
 void KNMainWidget::setStatusHelpMsg(const TQString& text)
 {
   TDEMainWindow *mainWin = dynamic_cast<TDEMainWindow*>(topLevelWidget());
-  KStatusBar *bar =  mainWin ? mainWin->statusBar() : 0;
+  KStatusBar *bar =  mainWin ? mainWin->statusBar() : nullptr;
   if ( bar )
     bar->message(text, 2000);
 }
@@ -376,11 +376,11 @@ void KNMainWidget::blockUI(bool b)
 {
   b_lockui = b;
   TDEMainWindow *mainWin = dynamic_cast<TDEMainWindow*>(topLevelWidget());
-  KMenuBar *mbar =  mainWin ? mainWin->menuBar() : 0;
+  KMenuBar *mbar =  mainWin ? mainWin->menuBar() : nullptr;
   if ( mbar )
     mbar->setEnabled(!b);
   a_ccel->setEnabled(!b);
-  TDEAccel *naccel = mainWin ? mainWin->accel() : 0;
+  TDEAccel *naccel = mainWin ? mainWin->accel() : nullptr;
   if ( naccel )
     naccel->setEnabled(!b);
   if (b)
@@ -395,7 +395,7 @@ void KNMainWidget::disableAccels(bool b)
 {
   a_ccel->setEnabled(!b);
   TDEMainWindow *mainWin = dynamic_cast<TDEMainWindow*>(topLevelWidget());
-  TDEAccel *naccel = mainWin ? mainWin->accel() : 0;
+  TDEAccel *naccel = mainWin ? mainWin->accel() : nullptr;
   if ( naccel )
     naccel->setEnabled(!b);
   if (b)
@@ -410,11 +410,11 @@ void KNMainWidget::secureProcessEvents()
 {
   b_lockui = true;
   TDEMainWindow *mainWin = dynamic_cast<TDEMainWindow*>(topLevelWidget());
-  KMenuBar *mbar =  mainWin ? mainWin->menuBar() : 0;
+  KMenuBar *mbar =  mainWin ? mainWin->menuBar() : nullptr;
   if ( mbar )
     mbar->setEnabled(false);
   a_ccel->setEnabled(false);
-  TDEAccel *naccel = mainWin ? mainWin->accel() : 0;
+  TDEAccel *naccel = mainWin ? mainWin->accel() : nullptr;
   if ( naccel )
     naccel->setEnabled(false);
   installEventFilter(this);
@@ -442,7 +442,7 @@ void KNMainWidget::openURL(const KURL &url)
   kdDebug(5003) << k_funcinfo << url << endl;
   TQString host = url.host();
   unsigned short int port = url.port();
-  KNNntpAccount *acc=0;
+  KNNntpAccount *acc=nullptr;
 
   if (url.url().left(7) == "news://") {
 
@@ -476,7 +476,7 @@ void KNMainWidget::openURL(const KURL &url)
     if (url.url().left(5) == "news:") {
       // TODO: make the default server configurable
       acc = a_ccManager->currentAccount();
-      if ( acc == 0 )
+      if (!acc)
         acc = a_ccManager->first();
     } else {
       kdDebug(5003) << "KNMainWidget::openURL() URL is not a valid news URL" << endl;
@@ -490,7 +490,7 @@ void KNMainWidget::openURL(const KURL &url)
       TQString groupname=url.path(-1);
       while(groupname.startsWith("/"))
         groupname.remove(0,1);
-      TQListViewItem *item=0;
+      TQListViewItem *item=nullptr;
       if(groupname.isEmpty())
         item=acc->listItem();
       else {
@@ -514,7 +514,7 @@ void KNMainWidget::openURL(const KURL &url)
     } else {
       TQString groupname = url.url().mid( url.protocol().length()+1 );
       KNGroup *g = g_rpManager->currentGroup();
-      if (g == 0)
+      if (!g)
         g = g_rpManager->firstGroupOfAccount(acc);
 
       if (g) {
@@ -996,7 +996,7 @@ void KNMainWidget::slotArticleSelected(TQListViewItem *i)
   kdDebug(5003) << "KNMainWidget::slotArticleSelected(TQListViewItem *i)" << endl;
   if(b_lockui)
     return;
-  KNArticle *selectedArticle=0;
+  KNArticle *selectedArticle=nullptr;
 
   if(i)
     selectedArticle=(static_cast<KNHdrViewItem*>(i))->art;
@@ -1034,7 +1034,7 @@ void KNMainWidget::slotArticleSelectionChanged()
   // enable all actions that work with multiple selection
 
   //actions
-  bool enabled = (g_rpManager->currentGroup()!=0);
+  bool enabled = g_rpManager->currentGroup();
 
   if(a_ctArtSetArtRead->isEnabled() != enabled) {
     a_ctArtSetArtRead->setEnabled(enabled);
@@ -1047,7 +1047,7 @@ void KNMainWidget::slotArticleSelectionChanged()
     a_ctScoreRaise->setEnabled(enabled);
   }
 
-  enabled = (f_olManager->currentFolder()!=0);
+  enabled = f_olManager->currentFolder();
   a_ctArtDelete->setEnabled(enabled);
   a_ctArtSendNow->setEnabled(enabled && (f_olManager->currentFolder()==f_olManager->outbox()));
 }
@@ -1058,14 +1058,14 @@ void KNMainWidget::slotCollectionSelected(TQListViewItem *i)
   kdDebug(5003) << "KNMainWidget::slotCollectionSelected(TQListViewItem *i)" << endl;
   if(b_lockui)
     return;
-  KNCollection *c=0;
-  KNNntpAccount *selectedAccount=0;
-  KNGroup *selectedGroup=0;
-  KNFolder *selectedFolder=0;
+  KNCollection *c=nullptr;
+  KNNntpAccount *selectedAccount=nullptr;
+  KNGroup *selectedGroup=nullptr;
+  KNFolder *selectedFolder=nullptr;
 
   s_earchLineEdit->clear();
   h_drView->clear();
-  slotArticleSelected(0);
+  slotArticleSelected(nullptr);
 
   // mark all articles in current group as not new/read
   if ( knGlobals.configManager()->readNewsNavigation()->leaveGroupMarkAsRead() )
@@ -1114,7 +1114,7 @@ void KNMainWidget::slotCollectionSelected(TQListViewItem *i)
     a_ctNavPrevArt->setEnabled(enabled);
   }
 
-  enabled=( selectedGroup!=0 );
+  enabled = selectedGroup;
   if(a_ctNavNextUnreadArt->isEnabled() != enabled) {
     a_ctNavNextUnreadArt->setEnabled(enabled);
     a_ctNavNextUnreadThread->setEnabled(enabled);
@@ -1122,7 +1122,7 @@ void KNMainWidget::slotCollectionSelected(TQListViewItem *i)
     a_ctFetchArticleWithID->setEnabled(enabled);
   }
 
-  enabled=( selectedAccount!=0 );
+  enabled = selectedAccount;
   if(a_ctAccProperties->isEnabled() != enabled) {
     a_ctAccProperties->setEnabled(enabled);
     a_ctAccRename->setEnabled(enabled);
@@ -1134,7 +1134,7 @@ void KNMainWidget::slotCollectionSelected(TQListViewItem *i)
     a_ctAccPostNewArticle->setEnabled(enabled);
   }
 
-  enabled=( selectedGroup!=0 );
+  enabled = selectedGroup;
   if(a_ctGrpProperties->isEnabled() != enabled) {
     a_ctGrpProperties->setEnabled(enabled);
     a_ctGrpRename->setEnabled(enabled);
@@ -1154,15 +1154,15 @@ void KNMainWidget::slotCollectionSelected(TQListViewItem *i)
     a_ctReScore->setEnabled(enabled);
   }
 
-  a_ctFolNewChild->setEnabled(selectedFolder!=0);
+  a_ctFolNewChild->setEnabled(selectedFolder);
 
-  enabled=( selectedFolder!=0 && !selectedFolder->isRootFolder() && !selectedFolder->isStandardFolder() );
+  enabled = selectedFolder && !selectedFolder->isRootFolder() && !selectedFolder->isStandardFolder();
   if(a_ctFolDelete->isEnabled() != enabled) {
     a_ctFolDelete->setEnabled(enabled);
     a_ctFolRename->setEnabled(enabled);
   }
 
-  enabled=( selectedFolder!=0 &&  !selectedFolder->isRootFolder() );
+  enabled = selectedFolder && !selectedFolder->isRootFolder();
   if(a_ctFolCompact->isEnabled() != enabled) {
     a_ctFolCompact->setEnabled(enabled);
     a_ctFolEmpty->setEnabled(enabled);
@@ -1194,7 +1194,7 @@ void KNMainWidget::slotCollectionViewDrop(TQDropEvent* e, KNCollectionViewItem*
   KNCollectionViewItem *cvi=static_cast<KNCollectionViewItem*>(after);
   if (cvi && cvi->coll->type() != KNCollection::CTfolder)   // safety measure...
     return;
-  KNFolder *dest=cvi ? static_cast<KNFolder*>(cvi->coll) : 0;
+  KNFolder *dest=cvi ? static_cast<KNFolder*>(cvi->coll) : nullptr;
 
   if (e->provides("x-knode-drag/folder") && f_olManager->currentFolder()) {
     f_olManager->moveFolder(f_olManager->currentFolder(), dest);
@@ -1387,7 +1387,7 @@ void KNMainWidget::slotNavReadThrough()
   kdDebug(5003) << "KNMainWidget::slotNavReadThrough()" << endl;
   if ( !mArticleViewer->atBottom() )
     mArticleViewer->scrollNext();
-  else if(g_rpManager->currentGroup() != 0)
+  else if(g_rpManager->currentGroup())
     slotNavNextUnreadArt();
 }
 
@@ -1442,7 +1442,7 @@ void KNMainWidget::slotAccDelete()
   kdDebug(5003) << "KNMainWidget::slotAccDelete()" << endl;
   if(a_ccManager->currentAccount()) {
     if (a_ccManager->removeAccount(a_ccManager->currentAccount()))
-      slotCollectionSelected(0);
+      slotCollectionSelected(nullptr);
   }
 }
 
@@ -1513,7 +1513,7 @@ void KNMainWidget::slotGrpUnsubscribe()
     if(KMessageBox::Yes==KMessageBox::questionYesNo(knGlobals.topWidget,
       i18n("Do you really want to unsubscribe from %1?").arg(g_rpManager->currentGroup()->groupname()), TQString(), i18n("Unsubscribe"), KStdGuiItem::cancel()))
       if (g_rpManager->unsubscribeGroup(g_rpManager->currentGroup()))
-        slotCollectionSelected(0);
+        slotCollectionSelected(nullptr);
   }
 }
 
@@ -1550,7 +1550,7 @@ void KNMainWidget::slotGrpSetUnread()
 void KNMainWidget::slotFolNew()
 {
   kdDebug(5003) << "KNMainWidget::slotFolNew()" << endl;
-  KNFolder *f = f_olManager->newFolder(0);
+  KNFolder *f = f_olManager->newFolder(nullptr);
 
   if (f) {
     f_olManager->setCurrentFolder(f);
@@ -1594,7 +1594,7 @@ void KNMainWidget::slotFolDelete()
       KMessageBox::sorry(knGlobals.topWidget,
       i18n("This folder cannot be deleted because some of\n its articles are currently in use.") );
     else
-      slotCollectionSelected(0);
+      slotCollectionSelected(nullptr);
   }
 }
 
@@ -2044,7 +2044,7 @@ KXMLGUIFactory* KNMainWidget::factory() const
 
 
 FetchArticleIdDlg::FetchArticleIdDlg(TQWidget *parent, const char */*name*/ )
-    :KDialogBase(parent, 0, true, i18n("Fetch Article with ID"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok)
+    :KDialogBase(parent, nullptr, true, i18n("Fetch Article with ID"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok)
 {
   TQHBox *page = makeHBoxMainWidget();
 
diff --git a/knode/knmemorymanager.cpp b/knode/knmemorymanager.cpp
index 37a639287..73d8210c4 100644
--- a/knode/knmemorymanager.cpp
+++ b/knode/knmemorymanager.cpp
@@ -131,7 +131,7 @@ KNMemoryManager::CollectionItem* KNMemoryManager::findCacheEntry(KNArticleCollec
     }
   }
 
-  return 0;
+  return nullptr;
 }
 
 
@@ -146,14 +146,14 @@ KNMemoryManager::ArticleItem* KNMemoryManager::findCacheEntry(KNArticle *a, bool
     }
   }
 
-  return 0;
+  return nullptr;
 }
 
 
 void KNMemoryManager::checkMemoryUsageCollections()
 {
   int maxSize = knGlobals.configManager()->readNewsGeneral()->collCacheSize() * 1024;
-  KNArticleCollection *c=0;
+  KNArticleCollection *c=nullptr;
 
   if (c_ollCacheSize > maxSize) {
     TQValueList<CollectionItem*> tempList( mColList ); // work on a copy, KNGroup-/Foldermanager will
diff --git a/knode/knnetaccess.cpp b/knode/knnetaccess.cpp
index 475a48e3f..fdd63e2ad 100644
--- a/knode/knnetaccess.cpp
+++ b/knode/knnetaccess.cpp
@@ -38,7 +38,7 @@ using KPIM::ProgressManager;
 
 
 KNNetAccess::KNNetAccess(TQObject *parent, const char *name )
-  : TQObject(parent,name), currentNntpJob(0), currentSmtpJob(0)
+  : TQObject(parent,name), currentNntpJob(nullptr), currentSmtpJob(nullptr)
 {
   if ( pipe(nntpInPipe) == -1 || pipe(nntpOutPipe) == -1 ) {
     KMessageBox::error(knGlobals.topWidget, i18n("Internal error:\nFailed to open pipes for internal communication."));
@@ -88,7 +88,7 @@ KNNetAccess::~KNNetAccess()
 void KNNetAccess::addJob(KNJobData *job)
 {
   // kdDebug(5003) << "KNNetAccess::addJob() : job queued" << endl;
-  if(job->account()==0) {
+  if(!job->account()) {
     job->setErrorString(i18n("Internal Error: No account set for this job."));
     job->notifyConsumer();
     return;
@@ -158,7 +158,7 @@ void KNNetAccess::cancelCurrentNntpJob( int type )
 void KNNetAccess::stopJobsNntp( int type )
 {
   cancelCurrentNntpJob( type );
-  KNJobData *tmp = 0;
+  KNJobData *tmp = nullptr;
   TQValueList<KNJobData*>::Iterator it;
   for ( it = nntpJobQueue.begin(); it != nntpJobQueue.end();) {
     tmp = *it;
@@ -196,7 +196,7 @@ void KNNetAccess::cancelCurrentSmtpJob( int type )
 void KNNetAccess::stopJobsSmtp( int type )
 {
   cancelCurrentSmtpJob( type );
-  KNJobData *tmp = 0;
+  KNJobData *tmp = nullptr;
   TQValueList<KNJobData*>::Iterator it;
   for ( it = smtpJobQueue.begin(); it != smtpJobQueue.end();) {
     tmp = *it;
@@ -329,7 +329,7 @@ void KNNetAccess::threadDoneNntp()
   }
 
   nntpClient->removeJob();
-  currentNntpJob = 0L;
+  currentNntpJob = nullptr;
 
   currMsg = TQString();
   knGlobals.setStatusMsg();
@@ -356,7 +356,7 @@ void KNNetAccess::threadDoneSmtp()
   kdDebug(5003) << "KNNetAccess::threadDoneSmtp(): job done" << endl;
 
   tmp = currentSmtpJob;
-  currentSmtpJob = 0L;
+  currentSmtpJob = nullptr;
   if (!currentNntpJob) {
     currMsg = TQString();
     knGlobals.setStatusMsg();
@@ -493,7 +493,7 @@ void KNNetAccess::slotPasswordsChanged()
 
 void KNNetAccess::slotCancelJob( KPIM::ProgressItem *item )
 {
-  KNJobData *tmp = 0;
+  KNJobData *tmp = nullptr;
   TQValueList<KNJobData*>::Iterator it;
   for ( it = nntpJobQueue.begin(); it != nntpJobQueue.end();) {
     tmp = *it;
diff --git a/knode/knnetaccess.h b/knode/knnetaccess.h
index fb12949ee..b33c1c4a2 100644
--- a/knode/knnetaccess.h
+++ b/knode/knnetaccess.h
@@ -41,7 +41,7 @@ class KNNetAccess : public TQObject  {
 
   public:
 
-    KNNetAccess(TQObject *parent=0, const char *name=0);
+    KNNetAccess(TQObject *parent=nullptr, const char *name=nullptr);
     ~KNNetAccess();
 
     void addJob(KNJobData *job);
diff --git a/knode/knnntpaccount.cpp b/knode/knnntpaccount.cpp
index 77ee6ef3b..034fa52fc 100644
--- a/knode/knnntpaccount.cpp
+++ b/knode/knnntpaccount.cpp
@@ -26,7 +26,7 @@
 #include "knglobals.h"
 
 
-KNNntpAccountIntervalChecking::KNNntpAccountIntervalChecking(KNNntpAccount* account) : t_imer(0) {
+KNNntpAccountIntervalChecking::KNNntpAccountIntervalChecking(KNNntpAccount* account) : t_imer(nullptr) {
   a_ccount = account;
 }
 
@@ -35,7 +35,7 @@ KNNntpAccountIntervalChecking::KNNntpAccountIntervalChecking(KNNntpAccount* acco
 KNNntpAccountIntervalChecking::~KNNntpAccountIntervalChecking()
 {
   if (t_imer) deinstallTimer();
-  a_ccount = 0;
+  a_ccount = nullptr;
 }
 
 
@@ -60,7 +60,7 @@ void KNNntpAccountIntervalChecking::installTimer()
 void KNNntpAccountIntervalChecking::deinstallTimer()
 {
   delete t_imer;
-  t_imer = 0;
+  t_imer = nullptr;
 }
 
 
@@ -73,7 +73,7 @@ void KNNntpAccountIntervalChecking::slotCheckNews()
 
 
 KNNntpAccount::KNNntpAccount()
-  : KNCollection(0), KNServerInfo(), i_dentity(0), f_etchDescriptions(true), w_asOpen(false), i_ntervalChecking(false), c_heckInterval(10)
+  : KNCollection(nullptr), KNServerInfo(), i_dentity(nullptr), f_etchDescriptions(true), w_asOpen(false), i_ntervalChecking(false), c_heckInterval(10)
 {
   l_astNewFetch = TQDate::currentDate();
   a_ccountIntervalChecking = new KNNntpAccountIntervalChecking(this);
@@ -112,7 +112,7 @@ bool KNNntpAccount::readInfo(const TQString &confPath)
     kdDebug(5003) << "KNGroup::readInfo(const TQString &confPath) : using alternative user for " << n_ame << endl;
   } else {
     delete i_dentity;
-    i_dentity=0;
+    i_dentity=nullptr;
   }
 
   mCleanupConf->loadConfig( &conf );
@@ -194,7 +194,7 @@ bool KNNntpAccount::editProperties(TQWidget *parent)
 
   if(i_dentity->isEmpty()) {
     delete i_dentity;
-    i_dentity=0;
+    i_dentity=nullptr;
   }
 
   delete d;
diff --git a/knode/knnntpclient.cpp b/knode/knnntpclient.cpp
index 0755dc969..408aa7882 100644
--- a/knode/knnntpclient.cpp
+++ b/knode/knnntpclient.cpp
@@ -535,7 +535,7 @@ void KNNntpClient::doPostArticle()
 
   sendSignal(TSsendArticle);
 
-  if (art->messageID(false)!=0) {
+  if (art->messageID(false)) {
     int rep;
     if (!sendCommand(TQCString("STAT ")+art->messageID(false)->as7BitString(false),rep))
       return;
@@ -551,7 +551,7 @@ void KNNntpClient::doPostArticle()
   if(!sendCommandWCheck("POST", 340))       // 340 send article to be posted. End with <CR-LF>.<CR-LF>
     return;
 
-  if (art->messageID(false)==0) {  // article has no message ID => search for a ID in the response
+  if (!art->messageID(false)) {  // article has no message ID => search for a ID in the response
     TQCString s = getCurrentLine();
     int start = s.findRev(TQRegExp("<[^\\s]*@[^\\s]*>"));
     if (start != -1) {        // post response includes a recommended id
diff --git a/knode/knode.cpp b/knode/knode.cpp
index 2bad1511a..b63e9b97c 100644
--- a/knode/knode.cpp
+++ b/knode/knode.cpp
@@ -50,7 +50,7 @@ KNMainWindow::KNMainWindow( TQWidget* pWidget )
   KStdAction::configureToolbars(this, TQ_SLOT(slotConfToolbar()), actionCollection());
   KStdAction::keyBindings(this, TQ_SLOT(slotConfKeys()), actionCollection());
 
-  m_mainWidget = new KNMainWidget( this, true, this, 0 );
+  m_mainWidget = new KNMainWidget( this, true, this, nullptr );
   connect( m_mainWidget, TQ_SIGNAL(signalCaptionChangeRequest(const TQString&)),
            TQ_SLOT( setCaption(const TQString&)) );
   setCentralWidget( m_mainWidget );
@@ -58,7 +58,7 @@ KNMainWindow::KNMainWindow( TQWidget* pWidget )
   connect( KPIM::BroadcastStatus::instance(), TQ_SIGNAL(statusMsg(const TQString&)),
     this, TQ_SLOT(slotShowStatusMsg(const TQString& )) );
   createGUI( "knodeui.rc" );
-  knGlobals.instance = 0;
+  knGlobals.instance = nullptr;
 
   applyMainWindowSettings(TDEGlobal::config(),"mainWindow_options");
 }
diff --git a/knode/knode.h b/knode/knode.h
index 3d1c79937..0d33a9e6d 100644
--- a/knode/knode.h
+++ b/knode/knode.h
@@ -47,7 +47,7 @@ class KNMainWindow : public TDEMainWindow
   
 
 public:
-  KNMainWindow( TQWidget* parentWidget=0 );
+  KNMainWindow( TQWidget* parentWidget=nullptr );
   ~KNMainWindow();
   void openURL( const KURL& );
   KNMainWidget *mainWidget() { return m_mainWidget; }
diff --git a/knode/knode_options.h b/knode/knode_options.h
index c7c446910..d71689e2a 100644
--- a/knode/knode_options.h
+++ b/knode/knode_options.h
@@ -22,7 +22,7 @@
 
 static TDECmdLineOptions knode_options[] =
 {
-  { "+[url]", I18N_NOOP("A 'news://server/group' URL"), 0 },
+  { "+[url]", I18N_NOOP("A 'news://server/group' URL"), nullptr },
   TDECmdLineLastOption
 };
 
diff --git a/knode/knprotocolclient.cpp b/knode/knprotocolclient.cpp
index a20856a1a..15fb4bc90 100644
--- a/knode/knprotocolclient.cpp
+++ b/knode/knprotocolclient.cpp
@@ -35,7 +35,7 @@
 
 
 KNProtocolClient::KNProtocolClient(int NfdPipeIn, int NfdPipeOut) :
-  job( 0 ),
+  job( nullptr ),
   inputSize( 10000 ),
   fdPipeIn( NfdPipeIn ),
   fdPipeOut( NfdPipeOut ),
@@ -74,7 +74,7 @@ void KNProtocolClient::insertJob(KNJobData *newJob)
 
 void KNProtocolClient::removeJob()
 {
-  job = 0L;
+  job = nullptr;
 }
 
 
diff --git a/knode/knscoring.cpp b/knode/knscoring.cpp
index 04fd17c72..ab92bb0a1 100644
--- a/knode/knscoring.cpp
+++ b/knode/knscoring.cpp
@@ -24,7 +24,7 @@
 #include "knglobals.h"
 
 //----------------------------------------------------------------------------
-NotifyCollection* KNScorableArticle::notifyC = 0;
+NotifyCollection* KNScorableArticle::notifyC = nullptr;
 
 KNScorableArticle::KNScorableArticle(KNRemoteArticle* a)
   : ScorableArticle(), _a(a)
diff --git a/knode/knsearchdialog.h b/knode/knsearchdialog.h
index fac2f1be2..656db85b9 100644
--- a/knode/knsearchdialog.h
+++ b/knode/knsearchdialog.h
@@ -32,7 +32,7 @@ class KNSearchDialog : public TQDialog {
 
   public:
     enum searchType { STfolderSearch, STgroupSearch };
-    KNSearchDialog(searchType t=STgroupSearch, TQWidget *parent=0);
+    KNSearchDialog(searchType t=STgroupSearch, TQWidget *parent=nullptr);
     ~KNSearchDialog();
 
     KNArticleFilter* filter() const  { return f_ilter; }
diff --git a/knode/knserverinfo.cpp b/knode/knserverinfo.cpp
index 2c7949419..a90cc508e 100644
--- a/knode/knserverinfo.cpp
+++ b/knode/knserverinfo.cpp
@@ -103,7 +103,7 @@ void KNServerInfo::saveConf(TDEConfig *conf)
   if (n_eedsLogon && p_assDirty) {
     Wallet *wallet = KNAccountManager::wallet();
     if (!wallet || wallet->writePassword(TQString::number(i_d), p_ass)) {
-      if ( KMessageBox::warningYesNo( 0,
+      if ( KMessageBox::warningYesNo( nullptr,
             i18n("TDEWallet is not available. It is strongly recommended to use "
                 "TDEWallet for managing your passwords.\n"
                 "However, KNode can store the password in its configuration "
diff --git a/knode/knsourceviewwindow.cpp b/knode/knsourceviewwindow.cpp
index c639c1161..97021aee9 100644
--- a/knode/knsourceviewwindow.cpp
+++ b/knode/knsourceviewwindow.cpp
@@ -23,7 +23,7 @@
 
 
 KNSourceViewWindow::KNSourceViewWindow( const TQString &text )
-  : KTextBrowser(0)
+  : KTextBrowser(nullptr)
 {
   setWFlags(WType_TopLevel | WDestructiveClose);
   TQAccel *accel = new TQAccel( this, "browser close-accel" );
diff --git a/knode/knstatusfilter.cpp b/knode/knstatusfilter.cpp
index 56572208d..eba45ff75 100644
--- a/knode/knstatusfilter.cpp
+++ b/knode/knstatusfilter.cpp
@@ -95,7 +95,7 @@ bool KNStatusFilter::doFilter(KNRemoteArticle *a)
 //==============================================================================
 
 KNStatusFilterWidget::KNStatusFilterWidget(TQWidget *parent) :
-  TQButtonGroup(0, parent)
+  TQButtonGroup(nullptr, parent)
 {
   setFrameStyle(NoFrame);
   enR=new TQCheckBox(i18n("Is read:"), this);
diff --git a/knode/knstringfilter.cpp b/knode/knstringfilter.cpp
index 68ca0b800..c7622b7c1 100644
--- a/knode/knstringfilter.cpp
+++ b/knode/knstringfilter.cpp
@@ -60,10 +60,10 @@ bool KNStringFilter::doFilter(const TQString &s)
 // replace placeholders
 void KNStringFilter::expand(KNGroup *g)
 {
-  KNConfig::Identity *id = (g) ? g->identity() : 0;
+  KNConfig::Identity *id = (g) ? g->identity() : nullptr;
 
   if (!id) {
-    id = (g) ? g->account()->identity() : 0;
+    id = (g) ? g->account()->identity() : nullptr;
     if (!id)
       id = knGlobals.configManager()->identity();
   }
diff --git a/knode/knwidgets.h b/knode/knwidgets.h
index 53b4b8539..bdc9a12fa 100644
--- a/knode/knwidgets.h
+++ b/knode/knwidgets.h
@@ -32,7 +32,7 @@ class TQPixmap;
 class KNListBoxItem : public TQListBoxItem  {
 
   public:
-    KNListBoxItem(const TQString& text, TQPixmap *pm=0);
+    KNListBoxItem(const TQString& text, TQPixmap *pm=nullptr);
     ~KNListBoxItem();
 
 
@@ -53,7 +53,7 @@ class KNDialogListBox : public TQListBox
 {
    public:
     // alwaysIgnore==false: enter is ignored when the widget isn't visible/out of focus
-    KNDialogListBox(bool alwaysIgnore=false, TQWidget * parent=0, const char * name=0);
+    KNDialogListBox(bool alwaysIgnore=false, TQWidget * parent=nullptr, const char * name=nullptr);
     ~KNDialogListBox();
 
   protected:
@@ -73,7 +73,7 @@ class KNDockWidgetHeaderDrag : public KDockWidgetHeaderDrag
 
   public:
     KNDockWidgetHeaderDrag(TQWidget *focusWidget, KDockWidgetAbstractHeader* parent, KDockWidget* dock,
-                            const char* name = 0);
+                            const char* name = nullptr);
     virtual ~KNDockWidgetHeaderDrag();
 
   protected slots:
diff --git a/knode/utilities.cpp b/knode/utilities.cpp
index 054838137..e4cd85bc6 100644
--- a/knode/utilities.cpp
+++ b/knode/utilities.cpp
@@ -104,7 +104,7 @@ int KNFile::findString(const char *s)
       buffPtr[readBytes] = 0;       // terminate string
 
     pos = strstr(buffPtr,s);
-    if (pos == 0) {
+    if (!pos) {
       if (!atEnd())
         at(at()-strlen(s));
       else
@@ -135,7 +135,7 @@ bool KNFile::increaseBuffer()
 TQString KNSaveHelper::lastPath;
 
 KNSaveHelper::KNSaveHelper(TQString saveName, TQWidget *parent)
-  : p_arent(parent), s_aveName(saveName), file(0), tmpFile(0)
+  : p_arent(parent), s_aveName(saveName), file(nullptr), tmpFile(nullptr)
 {
 }
 
@@ -147,7 +147,7 @@ KNSaveHelper::~KNSaveHelper()
   } else
     if (tmpFile) {      // network location, initiate transaction
       tmpFile->close();
-      if (TDEIO::NetAccess::upload(tmpFile->name(),url, 0) == false)
+      if (TDEIO::NetAccess::upload(tmpFile->name(),url, nullptr) == false)
         KNHelper::displayRemoteFileError();
       tmpFile->unlink();   // delete temp file
       delete tmpFile;
@@ -160,7 +160,7 @@ TQFile* KNSaveHelper::getFile(const TQString &dialogTitle)
   url = KFileDialog::getSaveURL(lastPath + s_aveName, TQString(), p_arent, dialogTitle);
 
   if (url.isEmpty())
-    return 0;
+    return nullptr;
 
   lastPath = url.upURL().url();
 
@@ -169,14 +169,14 @@ TQFile* KNSaveHelper::getFile(const TQString &dialogTitle)
         (KMessageBox::warningContinueCancel(knGlobals.topWidget,
                                             i18n("<qt>A file named <b>%1</b> already exists.<br>Do you want to replace it?</qt>").arg(url.path()),
                                             dialogTitle, i18n("&Replace")) != KMessageBox::Continue)) {
-      return 0;
+      return nullptr;
     }
 
     file = new TQFile(url.path());
     if(!file->open(IO_WriteOnly)) {
       KNHelper::displayExternalFileError();
       delete file;
-      file = 0;
+      file = nullptr;
     }
     return file;
   } else {
@@ -184,8 +184,8 @@ TQFile* KNSaveHelper::getFile(const TQString &dialogTitle)
     if (tmpFile->status()!=0) {
       KNHelper::displayTempFileError();
       delete tmpFile;
-      tmpFile = 0;
-      return 0;
+      tmpFile = nullptr;
+      return nullptr;
     }
     return tmpFile->file();
   }
@@ -197,7 +197,7 @@ TQFile* KNSaveHelper::getFile(const TQString &dialogTitle)
 TQString KNLoadHelper::l_astPath;
 
 KNLoadHelper::KNLoadHelper(TQWidget *parent)
-  : p_arent(parent), f_ile(0)
+  : p_arent(parent), f_ile(nullptr)
 {
 }
 
@@ -218,7 +218,7 @@ KNFile* KNLoadHelper::getFile( const TQString &dialogTitle )
   KURL url = KFileDialog::getOpenURL(l_astPath,TQString(),p_arent,dialogTitle);
 
   if (url.isEmpty())
-    return 0;
+    return nullptr;
 
   l_astPath = url.url(-1);
   l_astPath.truncate(l_astPath.length()-url.fileName().length());
@@ -235,23 +235,23 @@ KNFile* KNLoadHelper::setURL(KURL url)
   u_rl = url;
 
   if (u_rl.isEmpty())
-    return 0;
+    return nullptr;
 
   TQString fileName;
   if (!u_rl.isLocalFile()) {
-    if (TDEIO::NetAccess::download(u_rl, t_empName, 0))
+    if (TDEIO::NetAccess::download(u_rl, t_empName, nullptr))
       fileName = t_empName;
   } else
     fileName = u_rl.path();
 
   if (fileName.isEmpty())
-    return 0;
+    return nullptr;
 
   f_ile = new KNFile(fileName);
   if(!f_ile->open(IO_ReadOnly)) {
     KNHelper::displayExternalFileError();
     delete f_ile;
-    f_ile = 0;
+    f_ile = nullptr;
   }
   return f_ile;
 }
@@ -456,23 +456,23 @@ TQString KNHelper::rewrapStringList(TQStringList text, int wrapAt, TQChar quoteC
 
 void KNHelper::displayInternalFileError(TQWidget *w)
 {
-  KMessageBox::error((w!=0)? w : knGlobals.topWidget, i18n("Unable to load/save configuration.\nWrong permissions on home folder?\nYou should close KNode now to avoid data loss."));
+  KMessageBox::error(w ? w : knGlobals.topWidget, i18n("Unable to load/save configuration.\nWrong permissions on home folder?\nYou should close KNode now to avoid data loss."));
 }
 
 
 void KNHelper::displayExternalFileError(TQWidget *w)
 {
-  KMessageBox::error((w!=0)? w : knGlobals.topWidget, i18n("Unable to load/save file."));
+  KMessageBox::error(w ? w : knGlobals.topWidget, i18n("Unable to load/save file."));
 }
 
 
 void KNHelper::displayRemoteFileError(TQWidget *w)
 {
-  KMessageBox::error((w!=0)? w : knGlobals.topWidget, i18n("Unable to save remote file."));
+  KMessageBox::error(w ? w : knGlobals.topWidget, i18n("Unable to save remote file."));
 }
 
 
 void KNHelper::displayTempFileError(TQWidget *w)
 {
-  KMessageBox::error((w!=0)? w : knGlobals.topWidget, i18n("Unable to create temporary file."));
+  KMessageBox::error(w ? w : knGlobals.topWidget, i18n("Unable to create temporary file."));
 }
diff --git a/knode/utilities.h b/knode/utilities.h
index f20d99e1c..c2ff1cbe8 100644
--- a/knode/utilities.h
+++ b/knode/utilities.h
@@ -132,13 +132,13 @@ public:
   static TQString rewrapStringList(TQStringList text, int wrapAt, TQChar quoteChar, bool stopAtSig, bool alwaysSpace);
 
   /** use this for all internal files */
-  static void displayInternalFileError(TQWidget *w=0);
+  static void displayInternalFileError(TQWidget *w=nullptr);
   /** use this for all external files */
-  static void displayExternalFileError(TQWidget *w=0);
+  static void displayExternalFileError(TQWidget *w=nullptr);
   /** use this for remote files */
-  static void displayRemoteFileError(TQWidget *w=0);
+  static void displayRemoteFileError(TQWidget *w=nullptr);
   /** use this for error on temporary files */
-  static void displayTempFileError(TQWidget *w=0);
+  static void displayTempFileError(TQWidget *w=nullptr);
 
 };
 
diff --git a/ktnef/gui/attachpropertydialog.cpp b/ktnef/gui/attachpropertydialog.cpp
index f8d8ce125..8132fd91e 100644
--- a/ktnef/gui/attachpropertydialog.cpp
+++ b/ktnef/gui/attachpropertydialog.cpp
@@ -75,7 +75,7 @@ void formatProperties( const TQMap<int,KTNEFProperty*>& props, TQListView *lv, T
 {
 	for ( TQMap<int,KTNEFProperty*>::ConstIterator it=props.begin(); it!=props.end(); ++it )
 	{
-		TQListViewItem *newItem = 0;
+		TQListViewItem *newItem = nullptr;
 		if ( lv )
 			newItem = new TQListViewItem( lv, ( *it )->keyString() );
 		else if ( item )
@@ -107,10 +107,10 @@ void formatProperties( const TQMap<int,KTNEFProperty*>& props, TQListView *lv, T
 
 void formatPropertySet( KTNEFPropertySet *pSet, TQListView *lv )
 {
-	formatProperties( pSet->properties(), lv, 0, "prop" );
+	formatProperties( pSet->properties(), lv, nullptr, "prop" );
 	TQListViewItem *item = new TQListViewItem( lv, i18n( "TNEF Attributes" ) );
 	item->setOpen( true );
-	formatProperties( pSet->attributes(), 0, item, "attr" );
+	formatProperties( pSet->attributes(), nullptr, item, "attr" );
 }
 
 void saveProperty( TQListView *lv, KTNEFPropertySet *pSet, TQWidget *parent )
diff --git a/ktnef/gui/attachpropertydialog.h b/ktnef/gui/attachpropertydialog.h
index 970a7e39c..d3650ad99 100644
--- a/ktnef/gui/attachpropertydialog.h
+++ b/ktnef/gui/attachpropertydialog.h
@@ -31,7 +31,7 @@ class TQListViewItem;
 class AttachPropertyDialog : public AttachPropertyDialogBase
 {
 public:
-	AttachPropertyDialog(TQWidget *parent = 0, const char *name = 0);
+	AttachPropertyDialog(TQWidget *parent = nullptr, const char *name = nullptr);
 	~AttachPropertyDialog();
 
 	void setAttachment(KTNEFAttach *attach);
diff --git a/ktnef/gui/ktnefmain.cpp b/ktnef/gui/ktnefmain.cpp
index 057cb1660..32a79f2f5 100644
--- a/ktnef/gui/ktnefmain.cpp
+++ b/ktnef/gui/ktnefmain.cpp
@@ -148,7 +148,7 @@ void KTNEFMain::loadFile(const TQString& filename)
 	if (!parser_->openFile(filename))
 	{
 		TQMessageBox::critical(this, i18n("Error"), i18n("Unable to open file."), TQMessageBox::Ok|TQMessageBox::Default, 0);
-		view_->setAttachments(0);
+		view_->setAttachments(nullptr);
 		enableExtractAll(false);
 	}
 	else
@@ -165,7 +165,7 @@ void KTNEFMain::loadFile(const TQString& filename)
 
 void KTNEFMain::openFile()
 {
-	TQString	filename = KFileDialog::getOpenFileName(0,0,this,0);
+	TQString	filename = KFileDialog::getOpenFileName(nullptr,nullptr,this,nullptr);
 	if (!filename.isEmpty()) loadFile(filename);
 }
 
diff --git a/ktnef/gui/ktnefmain.h b/ktnef/gui/ktnefmain.h
index 7d6a984a3..85de01fea 100644
--- a/ktnef/gui/ktnefmain.h
+++ b/ktnef/gui/ktnefmain.h
@@ -32,7 +32,7 @@ class KTNEFMain : public TDEMainWindow
   
 
 public:
-	KTNEFMain(TQWidget *parent = 0, const char *name = 0);
+	KTNEFMain(TQWidget *parent = nullptr, const char *name = nullptr);
 	~KTNEFMain();
 
 	void loadFile(const TQString& filename);
diff --git a/ktnef/gui/ktnefview.h b/ktnef/gui/ktnefview.h
index 00d297211..b3051149e 100644
--- a/ktnef/gui/ktnefview.h
+++ b/ktnef/gui/ktnefview.h
@@ -30,7 +30,7 @@ class TDE_EXPORT KTNEFView : public TDEListView
   
 
 public:
-	KTNEFView(TQWidget *parent = 0, const char *name = 0);
+	KTNEFView(TQWidget *parent = nullptr, const char *name = nullptr);
 	~KTNEFView();
 
 	void setAttachments(TQPtrList<KTNEFAttach> *list);
diff --git a/ktnef/gui/main.cpp b/ktnef/gui/main.cpp
index 4a16a8c83..cbffbe43e 100644
--- a/ktnef/gui/main.cpp
+++ b/ktnef/gui/main.cpp
@@ -28,7 +28,7 @@ static const char description[] =
 
 static TDECmdLineOptions options[] =
 {
-  { "+[file]", I18N_NOOP("An optional argument 'file'"), 0 },
+  { "+[file]", I18N_NOOP("An optional argument 'file'"), nullptr },
   TDECmdLineLastOption
   // INSERT YOUR COMMANDLINE OPTIONS HERE
 };
@@ -39,7 +39,7 @@ int main(int argc, char *argv[])
   TDEAboutData aboutData( "ktnef", I18N_NOOP("KTnef"),
     "1.0", description, TDEAboutData::License_GPL,
     "(c) 2000, Michael Goffioul");
-  aboutData.addAuthor("Michael Goffioul",0, "tdeprint@swing.be");
+  aboutData.addAuthor("Michael Goffioul",nullptr, "tdeprint@swing.be");
   TDECmdLineArgs::init( argc, argv, &aboutData );
   TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
   TDEApplication::addCmdLineOptions();
diff --git a/ktnef/ktnef/ktnefparser.h b/ktnef/ktnef/ktnefparser.h
index da3c324a0..7f0be7996 100644
--- a/ktnef/ktnef/ktnefparser.h
+++ b/ktnef/ktnef/ktnefparser.h
@@ -47,7 +47,7 @@ private:
 	bool extractAttachmentTo(KTNEFAttach *att, const TQString& dirname);
 	bool parseDevice();
 	void checkCurrent(int state);
-	bool readMAPIProperties(TQMap<int,KTNEFProperty*>& pros, KTNEFAttach *attach = 0);
+	bool readMAPIProperties(TQMap<int,KTNEFProperty*>& pros, KTNEFAttach *attach = nullptr);
 	void deleteDevice();
 
 private:
diff --git a/ktnef/lib/ktnefmessage.cpp b/ktnef/lib/ktnefmessage.cpp
index 320ce411c..9b53b846c 100644
--- a/ktnef/lib/ktnefmessage.cpp
+++ b/ktnef/lib/ktnefmessage.cpp
@@ -53,7 +53,7 @@ KTNEFAttach* KTNEFMessage::attachment( const TQString& filename ) const
 	for ( ; it.current(); ++it )
 		if ( it.current()->name() == filename )
 			return it.current();
-	return 0;
+	return nullptr;
 }
 
 void KTNEFMessage::addAttachment( KTNEFAttach *attach )
diff --git a/ktnef/lib/ktnefparser.cpp b/ktnef/lib/ktnefparser.cpp
index cbd5ebef9..70f1c4a67 100644
--- a/ktnef/lib/ktnefparser.cpp
+++ b/ktnef/lib/ktnefparser.cpp
@@ -68,9 +68,9 @@ public:
 	ParserPrivate()
 	{
 		defaultdir_ = "/tmp/";
-		current_ = 0;
+		current_ = nullptr;
 		deleteDevice_ = false;
-		device_ = 0;
+		device_ = nullptr;
 		message_ = new KTNEFMessage;
 	}
 	~ParserPrivate()
@@ -106,7 +106,7 @@ void KTNEFParser::deleteDevice()
 {
 	if ( d->deleteDevice_ )
 		delete d->device_;
-	d->device_ = 0;
+	d->device_ = nullptr;
 	d->deleteDevice_ = false;
 }
 
@@ -159,7 +159,7 @@ bool KTNEFParser::decodeMessage()
 			{
 				int nProps = d->message_->properties().count();
 				i2 += d->device_->at();
-				readMAPIProperties( d->message_->properties(), 0 );
+				readMAPIProperties( d->message_->properties(), nullptr );
 				d->device_->at( i2 );
 				kdDebug() << "Properties: " << d->message_->properties().count() << endl;
 				value = TQString( "< %1 properties >" ).arg( d->message_->properties().count() - nProps );
@@ -208,7 +208,7 @@ bool KTNEFParser::decodeMessage()
 				for ( uint i=0; i<rows; i++ )
 				{
 					TQMap<int,KTNEFProperty*> props;
-					readMAPIProperties( props, 0 );
+					readMAPIProperties( props, nullptr );
 					recipTable << formatRecipient( props );
 				}
 				d->message_->addProperty( 0x0E12, MAPI_TYPE_STRING8, recipTable );
@@ -336,7 +336,7 @@ bool KTNEFParser::parseDevice()
 	if (d->current_)
 	{
 		delete d->current_;
-		d->current_ = 0;
+		d->current_ = nullptr;
 	}
 
 	if ( !d->device_->open( IO_ReadOnly ) ) {
@@ -374,7 +374,7 @@ bool KTNEFParser::parseDevice()
 								// attachment, if it has data. If not it does
 								// nothing, and the attachment will be discarded
 			delete d->current_;
-			d->current_ = 0;
+			d->current_ = nullptr;
 		}
 		return true;
 	}
@@ -492,12 +492,12 @@ void KTNEFParser::checkCurrent( int key )
 					d->current_->setMimeTag( mimetype->name() );
 				}
 				d->message_->addAttachment( d->current_ );
-				d->current_ = 0;
+				d->current_ = nullptr;
 			}
 			else
 			{ // invalid attachment, skip it
 				delete d->current_;
-				d->current_ = 0;
+				d->current_ = nullptr;
 			}
 			d->current_ = new KTNEFAttach();
 		}
@@ -625,7 +625,7 @@ TQVariant readTNEFAttribute( TQDataStream& stream, TQ_UINT16 type, TQ_UINT32 len
 TQString readMAPIString( TQDataStream& stream, bool isUnicode, bool align, int len_ )
 {
 	TQ_UINT32 len;
-	char *buf = 0;
+	char *buf = nullptr;
 	if ( len_ == -1 )
 		stream >> len;
 	else
diff --git a/ktnef/lib/mapi.cpp b/ktnef/lib/mapi.cpp
index 486ea84ea..e4500e164 100644
--- a/ktnef/lib/mapi.cpp
+++ b/ktnef/lib/mapi.cpp
@@ -151,7 +151,7 @@ static struct
 	{ 0x9006, I18N_NOOP( "TNEF Version" ) },
 	{ 0x9007, I18N_NOOP( "OEM Code Page" ) },
 
-	{ 0, 0 }
+	{ 0, nullptr }
 },
 MAPI_NamedTagStrings[] =
 {
@@ -185,7 +185,7 @@ MAPI_NamedTagStrings[] =
 	{ 0x8516, I18N_NOOP( "Start Date" ) },
 	{ 0x8517, I18N_NOOP( "End Date" ) },
 	{ 0x8560, I18N_NOOP( "Reminder Next Time" ) },
-	{ 0, 0 }
+	{ 0, nullptr }
 };
 static TQMap<int,TQString> MAPI_TagMap;
 static TQMap<int,TQString> MAPI_NamedTagMap;
diff --git a/ktnef/tests/parsertest.cpp b/ktnef/tests/parsertest.cpp
index 29a08e3e2..e5bb40a5d 100644
--- a/ktnef/tests/parsertest.cpp
+++ b/ktnef/tests/parsertest.cpp
@@ -31,13 +31,13 @@ void ParserTest::testSingleAttachment()
   assert( parser.openFile( TDESRCDIR "/one-file.tnef" ) == true );
 
   KTNEFMessage *msg = parser.message();
-  assert( msg != 0 );
+  assert(msg);
 
   TQPtrList<KTNEFAttach> atts = msg->attachmentList();
   assert( atts.count() == 1 );
 
   KTNEFAttach* att = atts.first();
-  assert( att != 0 );
+  assert(att);
   assert( att->size() == 244 );
   assert( att->name() == TQString( "AUTHORS" ) );
 }
@@ -48,18 +48,18 @@ void ParserTest::testTwoAttachments()
   assert( parser.openFile( TDESRCDIR "/two-files.tnef" ) == true );
 
   KTNEFMessage *msg = parser.message();
-  assert( msg != 0 );
+  assert(msg);
 
   TQPtrList<KTNEFAttach> atts = msg->attachmentList();
   assert( atts.count() == 2 );
 
   KTNEFAttach* att = atts.at( 0 );
-  assert( att != 0 );
+  assert(att);
   assert( att->size() == 244 );
   assert( att->name() == TQString( "AUTHORS" ) );
 
   att = atts.at( 1 );
-  assert( att != 0 );
+  assert(att);
   assert( att->size() == 893 );
   assert( att->name() == TQString( "README" ) );
 }
@@ -70,23 +70,23 @@ void ParserTest::testMAPIAttachments()
   assert( parser.openFile( TDESRCDIR "/mapi_attach_data_obj.tnef" ) == true );
 
   KTNEFMessage *msg = parser.message();
-  assert( msg != 0 );
+  assert(msg);
 
   TQPtrList<KTNEFAttach> atts = msg->attachmentList();
   assert( atts.count() == 3 );
 
   KTNEFAttach* att = atts.at( 0 );
-  assert( att != 0 );
+  assert(att);
   assert( att->size() == 61952 );
   assert( att->name() == TQString( "VIA_Nytt_1402.doc" ) );
 
   att = atts.at( 1 );
-  assert( att != 0 );
+  assert(att);
   assert( att->size() == 213688 );
   assert( att->name() == TQString( "VIA_Nytt_1402.pdf" ) );
 
   att = atts.at( 2 );
-  assert( att != 0 );
+  assert(att);
   assert( att->size() == 68920 );
   assert( att->name() == TQString( "VIA_Nytt_14021.htm" ) );
 }
diff --git a/libkmime/kmime_codec_uuencode.cpp b/libkmime/kmime_codec_uuencode.cpp
index ada9416d5..07395d367 100644
--- a/libkmime/kmime_codec_uuencode.cpp
+++ b/libkmime/kmime_codec_uuencode.cpp
@@ -74,7 +74,7 @@ public:
 
 
 Encoder * UUCodec::makeEncoder( bool ) const {
-  return 0; // encoding not supported
+  return nullptr; // encoding not supported
 }
 
 Decoder * UUCodec::makeDecoder( bool withCRLF ) const {
diff --git a/libkmime/kmime_codecs.cpp b/libkmime/kmime_codecs.cpp
index 361b224c5..8ed3b38ed 100644
--- a/libkmime/kmime_codecs.cpp
+++ b/libkmime/kmime_codecs.cpp
@@ -50,10 +50,10 @@ using namespace KMime;
 namespace KMime {
 
 // global list of KMime::Codec's
-TQAsciiDict<Codec>* Codec::all = 0;
+TQAsciiDict<Codec>* Codec::all = nullptr;
 static KStaticDeleter<TQAsciiDict<Codec> > sdAll;
 #if defined(TQT_THREAD_SUPPORT)
-TQMutex* Codec::dictLock = 0;
+TQMutex* Codec::dictLock = nullptr;
 static KStaticDeleter<TQMutex> sdDictLock;
 #endif
 
diff --git a/libkmime/kmime_content.cpp b/libkmime/kmime_content.cpp
index 037d8f4d8..4c79ff955 100644
--- a/libkmime/kmime_content.cpp
+++ b/libkmime/kmime_content.cpp
@@ -29,14 +29,14 @@ using namespace KMime;
 namespace KMime {
 
 Content::Content()
- : c_ontents(0), h_eaders(0), f_orceDefaultCS(false)
+ : c_ontents(nullptr), h_eaders(nullptr), f_orceDefaultCS(false)
 {
   d_efaultCS = cachedCharset("ISO-8859-1");
 }
 
 
 Content::Content(const TQCString &h, const TQCString &b)
- : c_ontents(0), h_eaders(0), f_orceDefaultCS(false)
+ : c_ontents(nullptr), h_eaders(nullptr), f_orceDefaultCS(false)
 {
   d_efaultCS = cachedCharset("ISO-8859-1");
   h_ead=h.copy();
@@ -100,12 +100,12 @@ void Content::parse()
 {
   //tqDebug("void Content::parse() : start");
   delete h_eaders;
-  h_eaders=0;
+  h_eaders=nullptr;
   
   // check this part has already been partioned into subparts.
   // if this is the case, we will not try to reparse the body
   // of this part.
-  if ((b_ody.size() == 0) && (c_ontents != 0) && !c_ontents->isEmpty()) {
+  if (b_ody.size() == 0 && c_ontents && !c_ontents->isEmpty()) {
     // reparse all sub parts
     for(Content *c=c_ontents->first(); c; c=c_ontents->next())
       c->parse();
@@ -113,7 +113,7 @@ void Content::parse()
   }    
   
   delete c_ontents;
-  c_ontents=0;
+  c_ontents=nullptr;
 
   Headers::ContentType *ct=contentType();
   TQCString tmp;
@@ -280,9 +280,9 @@ void Content::assemble()
 void Content::clear()
 {
   delete h_eaders;
-  h_eaders=0;
+  h_eaders=nullptr;
   delete c_ontents;
-  c_ontents=0;
+  c_ontents=nullptr;
   h_ead.resize(0);
   b_ody.resize(0);
 }
@@ -479,14 +479,14 @@ void Content::fromUnicodeString(const TQString &s)
 
 Content* Content::textContent()
 {
-  Content *ret=0;
+  Content *ret=nullptr;
 
   //return the first content with mimetype=text/*
   if(contentType()->isText())
     ret=this;
   else if(c_ontents)
     for(Content *c=c_ontents->first(); c; c=c_ontents->next())
-      if( (ret=c->textContent())!=0 )
+      if ((ret = c->textContent()) != nullptr)
         break;
 
   return ret;
@@ -617,7 +617,7 @@ void Content::removeContent(Content *c, bool del)
 
     //finally we can delete the content list
     delete c_ontents;
-    c_ontents=0;
+    c_ontents=nullptr;
   }
 }
 
@@ -662,7 +662,7 @@ Headers::Generic*  Content::getNextHeader(TQCString &head)
 {
   int pos1=-1, pos2=0, len=head.length()-1;
   bool folded(false);
-  Headers::Generic *header=0;
+  Headers::Generic *header=nullptr;
 
   pos1 = head.find(": ");
 
@@ -699,9 +699,9 @@ Headers::Generic*  Content::getNextHeader(TQCString &head)
 Headers::Base* Content::getHeaderByType(const char *type)
 {
   if(!type)
-    return 0;
+    return nullptr;
 
-  Headers::Base *h=0;
+  Headers::Base *h=nullptr;
   //first we check if the requested header is already cached
   if(h_eaders)
     for(h=h_eaders->first(); h; h=h_eaders->next())
@@ -759,7 +759,7 @@ Headers::Base* Content::getHeaderByType(const char *type)
     return h;
   }
   else
-    return 0; //header not found
+    return nullptr; //header not found
 }
 
 
diff --git a/libkmime/kmime_content.h b/libkmime/kmime_content.h
index 784179c6e..3878ed264 100644
--- a/libkmime/kmime_content.h
+++ b/libkmime/kmime_content.h
@@ -83,11 +83,11 @@ class TDE_EXPORT Content : public Base {
     virtual Headers::Base* getHeaderByType(const char *type);
     virtual void setHeader(Headers::Base *h);
     virtual bool removeHeader(const char *type);
-    bool hasHeader(const char *type)                                  { return (getHeaderByType(type)!=0); }
-    Headers::ContentType* contentType(bool create=true)             { Headers::ContentType *p=0; return getHeaderInstance(p, create); }
-    Headers::CTEncoding* contentTransferEncoding(bool create=true)  { Headers::CTEncoding *p=0; return getHeaderInstance(p, create); }
-    Headers::CDisposition* contentDisposition(bool create=true)     { Headers::CDisposition *p=0; return getHeaderInstance(p, create); }
-    Headers::CDescription* contentDescription(bool create=true)     { Headers::CDescription *p=0; return getHeaderInstance(p, create); }
+    bool hasHeader(const char *type)                                  { return getHeaderByType(type); }
+    Headers::ContentType* contentType(bool create=true)             { Headers::ContentType *p=nullptr; return getHeaderInstance(p, create); }
+    Headers::CTEncoding* contentTransferEncoding(bool create=true)  { Headers::CTEncoding *p=nullptr; return getHeaderInstance(p, create); }
+    Headers::CDisposition* contentDisposition(bool create=true)     { Headers::CDisposition *p=nullptr; return getHeaderInstance(p, create); }
+    Headers::CDescription* contentDescription(bool create=true)     { Headers::CDescription *p=nullptr; return getHeaderInstance(p, create); }
 
     //content access
     int size();
diff --git a/libkmime/kmime_header_parsing.cpp b/libkmime/kmime_header_parsing.cpp
index aa3d29b79..773ef0d23 100644
--- a/libkmime/kmime_header_parsing.cpp
+++ b/libkmime/kmime_header_parsing.cpp
@@ -102,7 +102,7 @@ bool parseEncodedWord( const char* & scursor, const char * const send,
   // remember start of charset (ie. just after the initial "=?") and
   // language (just after the first '*') fields:
   const char * charsetStart = scursor;
-  const char * languageStart = 0;
+  const char * languageStart = nullptr;
 
   // find delimiting '?' (and the '*' separating charset and language
   // tags, if any):
@@ -446,7 +446,7 @@ bool parseComment( const char* & scursor, const char * const send,
 		   TQString & result, bool isCRLF, bool reallySave )
 {
   int commentNestingDepth = 1;
-  const char * afterLastClosingParenPos = 0;
+  const char * afterLastClosingParenPos = nullptr;
   TQString maybeCmnt;
   const char * oldscursor = scursor;
 
@@ -504,7 +504,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
   enum { None, Phrase, Atom, EncodedWord, QuotedString } found = None;
   TQString tmp;
   TQCString lang;
-  const char * successfullyParsed = 0;
+  const char * successfullyParsed = nullptr;
   // only used by the encoded-word branch
   const char * oldscursor;
   // used to suppress whitespace between adjacent encoded-words
@@ -579,7 +579,7 @@ bool parsePhrase( const char* & scursor, const char * const send,
     case '=': // encoded-word
       tmp = TQString();
       oldscursor = scursor;
-      lang = 0;
+      lang = nullptr;
       if ( parseEncodedWord( scursor, send, tmp, lang ) ) {
 	successfullyParsed = scursor;
 	switch ( found ) {
@@ -1252,7 +1252,7 @@ static void decodeRFC2231Value( Codec* & rfc2231Codec,
     bool matchOK = false;
     textcodec = TDEGlobal::charsets()->codecForName( charset, matchOK );
     if ( !matchOK ) {
-      textcodec = 0;
+      textcodec = nullptr;
       KMIME_WARN_UNKNOWN(Charset,charset);
     }
   }
@@ -1308,8 +1308,8 @@ bool parseParameterList( const char* & scursor,	const char * const send,
   // NOTE: this code assumes that what TQMapIterator delivers is sorted
   // by the key!
 
-  Codec * rfc2231Codec = 0;
-  TQTextCodec * textcodec = 0;
+  Codec * rfc2231Codec = nullptr;
+  TQTextCodec * textcodec = nullptr;
   TQString attribute;
   TQString value;
   enum Modes { NoMode = 0x0, Continued = 0x1, Encoded = 0x2 } mode;
@@ -1491,7 +1491,7 @@ static bool parseAlphaNumericTimeZone( const char* & scursor,
 				       long int & secsEastOfGMT,
 				       bool & timeZoneKnown )
 {
-  TQPair<const char*,int> maybeTimeZone(0,0);
+  TQPair<const char*,int> maybeTimeZone(nullptr,0);
   if ( !parseToken( scursor, send, maybeTimeZone, false /*no 8bit*/ ) )
     return false;
   for ( int i = 0 ; i < timeZonesLen ; ++i )
diff --git a/libkmime/kmime_header_parsing.h b/libkmime/kmime_header_parsing.h
index a446c2f58..36010ca40 100644
--- a/libkmime/kmime_header_parsing.h
+++ b/libkmime/kmime_header_parsing.h
@@ -49,7 +49,7 @@ namespace Types {
 
   // for when we can't make up our mind what to use...
   struct TDE_EXPORT TQStringOrTQPair {
-    TQStringOrTQPair() : qstring(), qpair(0,0) {}
+    TQStringOrTQPair() : qstring(), qpair(nullptr,0) {}
     TQString qstring;
     TQPair<const char*,int> qpair;
   };
diff --git a/libkmime/kmime_headers.cpp b/libkmime/kmime_headers.cpp
index 2679971a9..2b956b2f0 100644
--- a/libkmime/kmime_headers.cpp
+++ b/libkmime/kmime_headers.cpp
@@ -49,7 +49,7 @@ namespace Headers {
 
 TQCString Base::rfc2047Charset()
 {
-  if( (e_ncCS==0) || forceCS() )
+  if (!e_ncCS || forceCS())
     return defaultCS();
   else
     return TQCString(e_ncCS);
@@ -64,13 +64,13 @@ void Base::setRFC2047Charset(const TQCString &cs)
 
 bool Base::forceCS()
 {
-  return ( p_arent!=0 ? p_arent->forceDefaultCS() : false );
+  return p_arent ? p_arent->forceDefaultCS() : false;
 }
 
 
 TQCString Base::defaultCS()
 {
-  return ( p_arent!=0 ? p_arent->defaultCharset() : Latin1 );
+  return p_arent ? p_arent->defaultCharset() : Latin1;
 }
 
 
@@ -286,8 +286,8 @@ bool GContentType::parse( const char* & scursor, const char * const send,
 
   // content-type: type "/" subtype *(";" parameter)
 
-  mMimeType = 0;
-  mMimeSubType = 0;
+  mMimeType = nullptr;
+  mMimeSubType = nullptr;
   mParameterHash.clear();
 
   eatCFWS( scursor, send, isCRLF );
@@ -347,7 +347,7 @@ bool GContentType::parse( const char* & scursor, const char * const send,
 bool GCISTokenWithParameterList::parse( const char* & scursor,
 					const char * const send, bool isCRLF ) {
 
-  mToken = 0;
+  mToken = nullptr;
   mParameterHash.clear();
 
   //
@@ -497,7 +497,7 @@ void Generic::setType(const char *type)
     strcpy(t_ype, type);
   }
   else
-    t_ype=0;
+    t_ype=nullptr;
 }
 
 //-----<Generic>-------------------------------
@@ -857,7 +857,7 @@ TQCString To::as7BitString(bool incType)
     AddressField *it=a_ddrList->first();
     if (it)
       ret+=it->as7BitString(false);
-    for (it=a_ddrList->next() ; it != 0; it=a_ddrList->next() )
+    for (it=a_ddrList->next() ; it ; it=a_ddrList->next() )
       ret+=","+it->as7BitString(false);
   }
 
@@ -894,7 +894,7 @@ TQString To::asUnicodeString()
 
   if (it)
     ret+=it->asUnicodeString();
-  for (it=a_ddrList->next() ; it != 0; it=a_ddrList->next() )
+  for (it=a_ddrList->next() ; it ; it=a_ddrList->next() )
     ret+=","+it->asUnicodeString();
   return ret;
 }
@@ -917,7 +917,7 @@ void To::emails(TQStrList *l)
 {
   l->clear();
 
-  for (AddressField *it=a_ddrList->first(); it != 0; it=a_ddrList->next() )
+  for (AddressField *it=a_ddrList->first(); it ; it=a_ddrList->next() )
     if( it->hasEmail() )
       l->append( it->email() );
 }
@@ -926,7 +926,7 @@ void To::names(TQStringList *l)
 {
     l->clear();
 
-    for (AddressField *it=a_ddrList->first(); it != 0 ; it=a_ddrList->next() )
+    for (AddressField *it=a_ddrList->first(); it ; it=a_ddrList->next() )
         if( it->hasName() )
             l->append( it->name() );
 }
@@ -935,7 +935,7 @@ void To::displayNames(TQStringList *l)
 {
     l->clear();
 
-    for (AddressField *it=a_ddrList->first(); it != 0 ; it=a_ddrList->next() )
+    for (AddressField *it=a_ddrList->first(); it ; it=a_ddrList->next() )
             l->append( it->asUnicodeString() );
 }
 
@@ -1314,7 +1314,7 @@ bool ContentType::isSubtype(const char *s)
 {
   char *c=strchr(m_imeType.data(), '/');
 
-  if( (c==0) || (*(c+1)=='\0') )
+  if (!c || *(c+1) == '\0')
     return false;
   else
     return ( strcasecmp(c+1, s)==0 );
@@ -1387,7 +1387,7 @@ void ContentType::setBoundary(const TQCString &s)
 
 TQString ContentType::name()
 {
-  const char *dummy=0;
+  const char *dummy=nullptr;
   return ( decodeRFC2047String(getParameter("name"), &dummy, defaultCS(), forceCS()) );
 }
 
@@ -1502,14 +1502,14 @@ static const encTableType encTable[] = {  { "7Bit", CE7Bit },
                                           { "base64", CEbase64 },
                                           { "x-uuencode", CEuuenc },
                                           { "binary", CEbinary },
-                                          { 0, 0} };
+                                          { nullptr, 0} };
 
 
 void CTEncoding::from7BitString(const TQCString &s)
 {
   TQCString stripped(s.simplifyWhiteSpace());
   c_te=CE7Bit;
-  for(int i=0; encTable[i].s!=0; i++)
+  for(int i=0; encTable[i].s; i++)
     if(strcasecmp(stripped.data(), encTable[i].s)==0) {
       c_te=(contentEncoding)encTable[i].e;
       break;
@@ -1523,7 +1523,7 @@ void CTEncoding::from7BitString(const TQCString &s)
 TQCString CTEncoding::as7BitString(bool incType)
 {
   TQCString str;
-  for(int i=0; encTable[i].s!=0; i++)
+  for(int i=0; encTable[i].s; i++)
     if(c_te==encTable[i].e) {
       str=encTable[i].s;
       break;
diff --git a/libkmime/kmime_headers.h b/libkmime/kmime_headers.h
index d550e5071..111ebde49 100644
--- a/libkmime/kmime_headers.h
+++ b/libkmime/kmime_headers.h
@@ -114,10 +114,10 @@ class TDE_EXPORT Base {
     typedef TQPtrList<Base> List;
 
     /** Create an empty header. */
-    Base() : e_ncCS(0), p_arent(0) {}
+    Base() : e_ncCS(nullptr), p_arent(nullptr) {}
 
     /** Create an empty header with a parent-content. */
-    Base(KMime::Content *parent) : e_ncCS(0), p_arent(parent) {}
+    Base(KMime::Content *parent) : e_ncCS(nullptr), p_arent(parent) {}
 
     /** Destructor */
     virtual ~Base()  {}
@@ -568,19 +568,19 @@ mk_trivial_subclass_with_name(ContentDisposition,Content-Disposition,
 class TDE_EXPORT Generic : public Generics::GUnstructured {
 
   public:
-    Generic() : Generics::GUnstructured(), t_ype(0) {}
+    Generic() : Generics::GUnstructured(), t_ype(nullptr) {}
     Generic(const char *t)
-      : Generics::GUnstructured(), t_ype(0) { setType(t); }
+      : Generics::GUnstructured(), t_ype(nullptr) { setType(t); }
     Generic(const char *t, Content *p)
-      : Generics::GUnstructured( p ), t_ype(0) { setType(t); }
+      : Generics::GUnstructured( p ), t_ype(nullptr) { setType(t); }
     Generic(const char *t, Content *p, const TQCString &s)
-      : Generics::GUnstructured( p, s ), t_ype(0) { setType(t); }
+      : Generics::GUnstructured( p, s ), t_ype(nullptr) { setType(t); }
     Generic(const char *t, Content *p, const TQString &s, const TQCString &cs)
-      : Generics::GUnstructured( p, s, cs ), t_ype(0) { setType(t); }
+      : Generics::GUnstructured( p, s, cs ), t_ype(nullptr) { setType(t); }
     ~Generic() { delete[] t_ype; }
 
     virtual void clear()            { delete[] t_ype; GUnstructured::clear(); }
-    virtual bool isEmpty()          { return (t_ype==0 || GUnstructured::isEmpty()); }
+    virtual bool isEmpty()          { return !t_ype || GUnstructured::isEmpty(); }
     virtual const char* type()      { return t_ype; }
     void setType(const char *type);
 
@@ -679,7 +679,7 @@ class TDE_EXPORT Date : public Base {
 
     time_t unixTime()               { return t_ime; }
     void setUnixTime(time_t t)      { t_ime=t; }
-    void setUnixTime()              { t_ime=time(0); }
+    void setUnixTime()              { t_ime=time(nullptr); }
     TQDateTime qdt();
     int ageInDays();
     
diff --git a/libkmime/kmime_headers_obs.h b/libkmime/kmime_headers_obs.h
index 51e4d5ba1..cdc10d020 100644
--- a/libkmime/kmime_headers_obs.h
+++ b/libkmime/kmime_headers_obs.h
@@ -149,17 +149,17 @@ class TDE_EXPORT MailCopiesTo : public AddressField {
 class TDE_EXPORT To : public Base {
 
   public:
-    To() : Base(),a_ddrList(0)  {}
-    To(Content *p) : Base(p),a_ddrList(0)  {}
-    To(Content *p, const TQCString &s) : Base(p),a_ddrList(0)  { from7BitString(s); }
-    To(Content *p, const TQString &s, const TQCString &cs) : Base(p),a_ddrList(0)  { fromUnicodeString(s,cs); }
+    To() : Base(),a_ddrList(nullptr)  {}
+    To(Content *p) : Base(p),a_ddrList(nullptr)  {}
+    To(Content *p, const TQCString &s) : Base(p),a_ddrList(nullptr)  { from7BitString(s); }
+    To(Content *p, const TQString &s, const TQCString &cs) : Base(p),a_ddrList(nullptr)  { fromUnicodeString(s,cs); }
     ~To()  { delete a_ddrList; }
 
     virtual void from7BitString(const TQCString &s);
     virtual TQCString as7BitString(bool incType=true);
     virtual void fromUnicodeString(const TQString &s, const TQCString &cs);
     virtual TQString asUnicodeString();
-    virtual void clear()            { delete a_ddrList; a_ddrList=0; }
+    virtual void clear()            { delete a_ddrList; a_ddrList=nullptr; }
     virtual bool isEmpty()          { return (!a_ddrList || a_ddrList->isEmpty()
                                               || a_ddrList->first()->isEmpty()); }
     virtual const char* type()      { return "To"; }
diff --git a/libkmime/kmime_mdn.cpp b/libkmime/kmime_mdn.cpp
index 60142120b..db10c3eeb 100644
--- a/libkmime/kmime_mdn.cpp
+++ b/libkmime/kmime_mdn.cpp
@@ -84,7 +84,7 @@ namespace MDN {
     for ( int i = 0 ; i < numDispositionTypes ; ++i )
       if ( dispositionTypes[i].dispositionType == d )
 	return dispositionTypes[i].string;
-    return 0;
+    return nullptr;
   }
 
 
@@ -110,7 +110,7 @@ namespace MDN {
     for ( int i = 0 ; i < numDispositionModifiers ; ++i )
       if ( dispositionModifiers[i].dispositionModifier == m )
 	return dispositionModifiers[i].string;
-    return 0;
+    return nullptr;
   }
 
   //
@@ -131,7 +131,7 @@ namespace MDN {
     for ( int i = 0 ; i < numActionModes ; ++i )
       if ( actionModes[i].actionMode == a )
 	return actionModes[i].string;
-    return 0;
+    return nullptr;
   }
 
 
@@ -153,7 +153,7 @@ namespace MDN {
     for ( int i = 0 ; i < numSendingModes ; ++i )
       if ( sendingModes[i].sendingMode == s )
 	return sendingModes[i].string;
-    return 0;
+    return nullptr;
   }
 
   static TQCString dispositionField( DispositionType d, ActionMode a, SendingMode s,
diff --git a/libkmime/kmime_message.cpp b/libkmime/kmime_message.cpp
index 0d516ecc7..20c7a9bd6 100644
--- a/libkmime/kmime_message.cpp
+++ b/libkmime/kmime_message.cpp
@@ -47,7 +47,7 @@ void Message::assemble()
   TQCString newHead="";
 
   //Message-ID
-  if( (h=messageID(false))!=0 )
+  if((h=messageID(false)))
     newHead+=h->as7BitString()+"\n";
 
   //From
@@ -59,15 +59,15 @@ void Message::assemble()
   newHead+=h->as7BitString()+"\n";
 
   //To
-  if( (h=to(false))!=0 )
+  if((h=to(false)))
     newHead+=h->as7BitString()+"\n";
 
   //Cc
-  if( (h=cc(false))!=0 )
+  if((h=cc(false)))
     newHead+=h->as7BitString()+"\n";
 
   //Reply-To
-  if( (h=replyTo(false))!=0 )
+  if((h=replyTo(false)))
     newHead+=h->as7BitString()+"\n";
 
   //Date
@@ -75,15 +75,15 @@ void Message::assemble()
   newHead+=h->as7BitString()+"\n";
 
   //References
-  if( (h=references(false))!=0 )
+  if ((h = references(false)) != nullptr)
     newHead+=h->as7BitString()+"\n";
 
   //Organization
-  if( (h=organization(false))!=0 )
+  if ((h = organization(false)) != nullptr)
     newHead+=h->as7BitString()+"\n";
 
   //UserAgent
-  if( (h=userAgent(false))!=0 )
+  if ((h = userAgent(false)) != nullptr)
     newHead+=h->as7BitString()+"\n";
 
   //Mime-Version
@@ -122,11 +122,11 @@ void Message::clear()
 Headers::Base* Message::getHeaderByType(const char *type)
 {
   if(strcasecmp("Subject", type)==0) {
-    if(s_ubject.isEmpty()) return 0;
+    if(s_ubject.isEmpty()) return nullptr;
     else return &s_ubject;
   }
   else if(strcasecmp("Date", type)==0){
-    if(d_ate.isEmpty()) return 0;
+    if(d_ate.isEmpty()) return nullptr;
     else return &d_ate;
   }
   else
diff --git a/libkmime/kmime_message.h b/libkmime/kmime_message.h
index 0cfa20152..eef1deb0e 100644
--- a/libkmime/kmime_message.h
+++ b/libkmime/kmime_message.h
@@ -41,17 +41,17 @@ public:
   virtual void setHeader(KMime::Headers::Base *h);
   virtual bool removeHeader(const char *type);
 
-  virtual KMime::Headers::MessageID* messageID(bool create=true)        { KMime::Headers::MessageID *p=0; return getHeaderInstance(p, create); }
-  virtual KMime::Headers::Subject* subject(bool create=true)            { if(!create && s_ubject.isEmpty()) return 0; return &s_ubject; }
-  virtual KMime::Headers::Date* date(bool create=true)                  { if(!create && d_ate.isEmpty()) return 0;return &d_ate; }
-  virtual KMime::Headers::From* from(bool create=true)                  { KMime::Headers::From *p=0; return getHeaderInstance(p, create); }
-  virtual KMime::Headers::Organization* organization(bool create=true)  { KMime::Headers::Organization *p=0; return getHeaderInstance(p, create); }
-  virtual KMime::Headers::ReplyTo* replyTo(bool create=true)            { KMime::Headers::ReplyTo *p=0; return getHeaderInstance(p, create); }
-  virtual KMime::Headers::To* to(bool create=true)                      { KMime::Headers::To *p=0; return getHeaderInstance(p, create); }
-  virtual KMime::Headers::CC* cc(bool create=true)                      { KMime::Headers::CC *p=0; return getHeaderInstance(p, create); }
-  virtual KMime::Headers::BCC* bcc(bool create=true)                    { KMime::Headers::BCC *p=0; return getHeaderInstance(p, create); }
-  virtual KMime::Headers::References* references(bool create=true)      { KMime::Headers::References *p=0; return getHeaderInstance(p, create); }
-  virtual KMime::Headers::UserAgent* userAgent(bool create=true)        { KMime::Headers::UserAgent *p=0; return getHeaderInstance(p, create); }
+  virtual KMime::Headers::MessageID* messageID(bool create=true)        { KMime::Headers::MessageID *p=nullptr; return getHeaderInstance(p, create); }
+  virtual KMime::Headers::Subject* subject(bool create=true)            { if(!create && s_ubject.isEmpty()) return nullptr; return &s_ubject; }
+  virtual KMime::Headers::Date* date(bool create=true)                  { if(!create && d_ate.isEmpty()) return nullptr;return &d_ate; }
+  virtual KMime::Headers::From* from(bool create=true)                  { KMime::Headers::From *p=nullptr; return getHeaderInstance(p, create); }
+  virtual KMime::Headers::Organization* organization(bool create=true)  { KMime::Headers::Organization *p=nullptr; return getHeaderInstance(p, create); }
+  virtual KMime::Headers::ReplyTo* replyTo(bool create=true)            { KMime::Headers::ReplyTo *p=nullptr; return getHeaderInstance(p, create); }
+  virtual KMime::Headers::To* to(bool create=true)                      { KMime::Headers::To *p=nullptr; return getHeaderInstance(p, create); }
+  virtual KMime::Headers::CC* cc(bool create=true)                      { KMime::Headers::CC *p=nullptr; return getHeaderInstance(p, create); }
+  virtual KMime::Headers::BCC* bcc(bool create=true)                    { KMime::Headers::BCC *p=nullptr; return getHeaderInstance(p, create); }
+  virtual KMime::Headers::References* references(bool create=true)      { KMime::Headers::References *p=nullptr; return getHeaderInstance(p, create); }
+  virtual KMime::Headers::UserAgent* userAgent(bool create=true)        { KMime::Headers::UserAgent *p=nullptr; return getHeaderInstance(p, create); }
   
 protected:
   //hardcoded headers
diff --git a/libkmime/kmime_newsarticle.cpp b/libkmime/kmime_newsarticle.cpp
index 1b16ad71f..48b27e331 100644
--- a/libkmime/kmime_newsarticle.cpp
+++ b/libkmime/kmime_newsarticle.cpp
@@ -35,15 +35,15 @@ void NewsArticle::assemble()
   TQCString newHead="";
 
   //Message-ID
-  if( (h=messageID(false))!=0 )
+  if ((h = messageID(false)) != nullptr)
     newHead+=h->as7BitString()+"\n";
 
   //Control
-  if( (h=control(false))!=0 )
+  if ((h = control(false)) != nullptr)
     newHead+=h->as7BitString()+"\n";
 
   //Supersedes
-  if( (h=supersedes(false))!=0 )
+  if ((h = supersedes(false)) != nullptr)
     newHead+=h->as7BitString()+"\n";
 
   //From
@@ -55,23 +55,23 @@ void NewsArticle::assemble()
   newHead+=h->as7BitString()+"\n";
 
   //To
-  if( (h=to(false))!=0 )
+  if ((h = to(false)) != nullptr)
     newHead+=h->as7BitString()+"\n";
 
   //Newsgroups
-  if( (h=newsgroups(false))!=0 )
+  if ((h = newsgroups(false)) != nullptr)
     newHead+=h->as7BitString()+"\n";
 
   //Followup-To
-  if( (h=followUpTo(false))!=0 )
+  if ((h = followUpTo(false)) != nullptr)
     newHead+=h->as7BitString()+"\n";
 
   //Reply-To
-  if( (h=replyTo(false))!=0 )
+  if ((h = replyTo(false)) != nullptr)
     newHead+=h->as7BitString()+"\n";
 
   //Mail-Copies-To
-  if( (h=mailCopiesTo(false))!=0 )
+  if ((h = mailCopiesTo(false)) != nullptr)
     newHead+=h->as7BitString()+"\n";
 
   //Date
@@ -79,7 +79,7 @@ void NewsArticle::assemble()
   newHead+=h->as7BitString()+"\n";
 
   //References
-  if( (h=references(false))!=0 )
+  if ((h = references(false)) != nullptr)
     newHead+=h->as7BitString()+"\n";
 
   //Lines
@@ -87,11 +87,11 @@ void NewsArticle::assemble()
   newHead+=h->as7BitString()+"\n";
 
   //Organization
-  if( (h=organization(false))!=0 )
+  if ((h = organization(false)) != nullptr)
     newHead+=h->as7BitString()+"\n";
 
   //User-Agent
-  if( (h=userAgent(false))!=0 )
+  if ((h = userAgent(false)) != nullptr)
     newHead+=h->as7BitString()+"\n";
 
   //Mime-Version
@@ -126,7 +126,7 @@ void NewsArticle::clear()
 Headers::Base * NewsArticle::getHeaderByType(const char * type)
 {
   if(strcasecmp("Lines", type)==0) {
-    if(l_ines.isEmpty()) return 0;
+    if(l_ines.isEmpty()) return nullptr;
     else return &l_ines;
   } else
     return Message::getHeaderByType(type);
diff --git a/libkmime/kmime_newsarticle.h b/libkmime/kmime_newsarticle.h
index b0197f65b..d3f080bbb 100644
--- a/libkmime/kmime_newsarticle.h
+++ b/libkmime/kmime_newsarticle.h
@@ -37,12 +37,12 @@ public:
   virtual void setHeader(KMime::Headers::Base *h);
   virtual bool removeHeader(const char * type);
 
-  virtual KMime::Headers::Control* control(bool create=true)            { KMime::Headers::Control *p=0; return getHeaderInstance(p, create); }
-  virtual KMime::Headers::Supersedes* supersedes(bool create=true)      { KMime::Headers::Supersedes *p=0; return getHeaderInstance(p, create); }
-  virtual KMime::Headers::MailCopiesTo* mailCopiesTo(bool create=true)  { KMime::Headers::MailCopiesTo *p=0; return getHeaderInstance(p, create); }
-  virtual KMime::Headers::Newsgroups* newsgroups(bool create=true)      { KMime::Headers::Newsgroups *p=0; return getHeaderInstance(p, create); }
-  virtual KMime::Headers::FollowUpTo* followUpTo(bool create=true)      { KMime::Headers::FollowUpTo *p=0; return getHeaderInstance(p, create); }
-  virtual KMime::Headers::Lines* lines(bool create=true)                { if(!create && l_ines.isEmpty()) return 0; return &l_ines; }
+  virtual KMime::Headers::Control* control(bool create=true)            { KMime::Headers::Control *p=nullptr; return getHeaderInstance(p, create); }
+  virtual KMime::Headers::Supersedes* supersedes(bool create=true)      { KMime::Headers::Supersedes *p=nullptr; return getHeaderInstance(p, create); }
+  virtual KMime::Headers::MailCopiesTo* mailCopiesTo(bool create=true)  { KMime::Headers::MailCopiesTo *p=nullptr; return getHeaderInstance(p, create); }
+  virtual KMime::Headers::Newsgroups* newsgroups(bool create=true)      { KMime::Headers::Newsgroups *p=nullptr; return getHeaderInstance(p, create); }
+  virtual KMime::Headers::FollowUpTo* followUpTo(bool create=true)      { KMime::Headers::FollowUpTo *p=nullptr; return getHeaderInstance(p, create); }
+  virtual KMime::Headers::Lines* lines(bool create=true)                { if(!create && l_ines.isEmpty()) return nullptr; return &l_ines; }
 
 
 protected:
diff --git a/libkmime/kmime_util.cpp b/libkmime/kmime_util.cpp
index 057d9e2be..532e8ae38 100644
--- a/libkmime/kmime_util.cpp
+++ b/libkmime/kmime_util.cpp
@@ -124,8 +124,8 @@ TQString decodeRFC2047String(const TQCString &src, const char **usedCS,
 {
   TQCString result, str;
   TQCString declaredCS;
-  const char *beg, *end, *mid, *pos=0;
-  char *dest, *endOfLastEncWord=0;
+  const char *beg, *end, *mid, *pos=nullptr;
+  char *dest, *endOfLastEncWord=nullptr;
   char encoding = '\0';
   bool valid, onlySpacesSinceLastWord=false;
   const int maxLen=400;
@@ -217,7 +217,7 @@ TQString decodeRFC2047String(const TQCString &src, const char **usedCS,
   }
 
   //find suitable TQTextCodec
-  TQTextCodec *codec=0;
+  TQTextCodec *codec=nullptr;
   bool ok=true;
   if (forceCS || declaredCS.isEmpty()) {
     codec=TDEGlobal::charsets()->codecForName(defaultCS);
@@ -248,7 +248,7 @@ TQCString encodeRFC2047String(const TQString &src, const char *charset,
   TQCString encoded8Bit, result, usedCS;
   unsigned int start=0,end=0;
   bool nonAscii=false, ok=true, useTQEncoding=false;
-  TQTextCodec *codec=0;
+  TQTextCodec *codec=nullptr;
 
   usedCS=charset;
   codec=TDEGlobal::charsets()->codecForName(usedCS, ok);
@@ -274,7 +274,7 @@ TQCString encodeRFC2047String(const TQString &src, const char *charset,
 
     // encode escape character, for japanese encodings...
     if (((signed char)encoded8Bit[i]<0) || (encoded8Bit[i] == '\033') ||
-        (addressHeader && (strchr("\"()<>@,.;:\\[]=",encoded8Bit[i])!=0))) {
+        (addressHeader && strchr("\"()<>@,.;:\\[]=",encoded8Bit[i]))) {
       end = start;   // non us-ascii char found, now we determine where to stop encoding
       nonAscii=true;
       break;
@@ -287,7 +287,7 @@ TQCString encodeRFC2047String(const TQString &src, const char *charset,
 
     for (unsigned int x=end;x<encoded8Bit.length();x++)
       if (((signed char)encoded8Bit[x]<0) || (encoded8Bit[x] == '\033') ||
-          (addressHeader && (strchr("\"()<>@,.;:\\[]=",encoded8Bit[x])!=0))) {
+          (addressHeader && strchr("\"()<>@,.;:\\[]=",encoded8Bit[x]))) {
         end = encoded8Bit.length();     // we found another non-ascii word
 
       while ((end<encoded8Bit.length())&&(encoded8Bit[end]!=' '))  // we encode complete words
@@ -342,7 +342,7 @@ TQCString uniqueString()
   unsigned int timeval;
 
   p[10]='\0';
-  now=time(0);
+  now=time(nullptr);
   ran=1+(int) (1000.0*rand()/(RAND_MAX+1.0));
   timeval=(now/ran)+getpid();
 
@@ -742,7 +742,7 @@ DateFormatter::formatCurrentDate( DateFormatter::FormatType t, const TQString& d
   if ( t == DateFormatter::Custom ) {
     f.setCustomFormat( data );
   }
-  return f.dateString( time(0), data, shortFormat, includeSecs );
+  return f.dateString( time(nullptr), data, shortFormat, includeSecs );
 }
 
 TQCString
@@ -756,7 +756,7 @@ bool
 DateFormatter::isDaylight()
 {
   if ( mDaylight == -1 ) {
-    time_t ntime = time( 0 );
+    time_t ntime = time( nullptr );
     struct tm *local = localtime( &ntime );
     if ( local->tm_isdst > 0 ) {
       mDaylight = 1;
diff --git a/mimelib/address.cpp b/mimelib/address.cpp
index 6d64abce8..f2dc018cd 100644
--- a/mimelib/address.cpp
+++ b/mimelib/address.cpp
@@ -38,7 +38,7 @@ const char* const DwAddress::sClassName = "DwAddress";
 DwAddress::DwAddress()
 {
     mIsValid = 0;
-    mNext = 0;
+    mNext = nullptr;
     mClassId = kCidAddress;
     mClassName = sClassName;
 }
@@ -48,7 +48,7 @@ DwAddress::DwAddress(const DwAddress& aAddr)
   : DwFieldBody(aAddr)
 {
     mIsValid = aAddr.mIsValid;
-    mNext = 0;
+    mNext = nullptr;
     mClassId = kCidAddress;
     mClassName = sClassName;
 }
@@ -58,7 +58,7 @@ DwAddress::DwAddress(const DwString& aStr, DwMessageComponent* aParent)
   : DwFieldBody(aStr, aParent)
 {
     mIsValid = 0;
-    mNext = 0;
+    mNext = nullptr;
     mClassId = kCidAddress;
     mClassName = sClassName;
 }
diff --git a/mimelib/addrlist.cpp b/mimelib/addrlist.cpp
index ab444744b..0508bfeda 100644
--- a/mimelib/addrlist.cpp
+++ b/mimelib/addrlist.cpp
@@ -38,7 +38,7 @@ const char* const DwAddressList::sClassName = "DwAddressList";
 
 
 DwAddressList* (*DwAddressList::sNewAddressList)(const DwString&,
-    DwMessageComponent*) = 0;
+    DwMessageComponent*) = nullptr;
 
 
 DwAddressList* DwAddressList::NewAddressList(const DwString& aStr,
@@ -55,7 +55,7 @@ DwAddressList* DwAddressList::NewAddressList(const DwString& aStr,
 
 DwAddressList::DwAddressList()
 {
-    mFirstAddress = 0;
+    mFirstAddress = nullptr;
     mClassId = kCidAddressList;
     mClassName = sClassName;
 }
@@ -64,7 +64,7 @@ DwAddressList::DwAddressList()
 DwAddressList::DwAddressList(const DwAddressList& aList)
   : DwFieldBody(aList)
 {
-    mFirstAddress = 0;
+    mFirstAddress = nullptr;
     const DwAddress* addr = aList.mFirstAddress;
     if (addr) {
         CopyList(addr);
@@ -77,7 +77,7 @@ DwAddressList::DwAddressList(const DwAddressList& aList)
 DwAddressList::DwAddressList(const DwString& aStr, DwMessageComponent* aParent)
   : DwFieldBody(aStr, aParent)
 {
-    mFirstAddress = 0;
+    mFirstAddress = nullptr;
     mClassId = kCidAddressList;
     mClassName = sClassName;
 }
@@ -120,7 +120,7 @@ DwAddress* DwAddressList::FirstAddress() const
 
 void DwAddressList::Add(DwAddress* aAddr)
 {
-    aAddr->SetNext(0);
+    aAddr->SetNext(nullptr);
     aAddr->SetParent(this);
     if (!mFirstAddress) {
         mFirstAddress = aAddr;
@@ -141,13 +141,13 @@ void DwAddressList::Remove(DwAddress* aAddr)
     DwAddress* addr = mFirstAddress;
     if (addr == aAddr) {
         mFirstAddress = (DwAddress*) addr->Next();
-        aAddr->SetNext(0);
+        aAddr->SetNext(nullptr);
         return;
     }
     while (addr) {
         if (addr->Next() == aAddr) {
             addr->SetNext(aAddr->Next());
-            aAddr->SetNext(0);
+            aAddr->SetNext(nullptr);
             break;
         }
     }
@@ -163,7 +163,7 @@ void DwAddressList::DeleteAll()
         delete addr;
         addr = nextAddr;
     }
-    mFirstAddress = 0;
+    mFirstAddress = nullptr;
 }
 
 
diff --git a/mimelib/body.cpp b/mimelib/body.cpp
index f5a56772f..1849abb5b 100644
--- a/mimelib/body.cpp
+++ b/mimelib/body.cpp
@@ -44,7 +44,7 @@ enum {
 
 
 struct DwBodyPartStr {
-    DwBodyPartStr(const DwString& aStr) : mString(aStr), mNext(0) {}
+    DwBodyPartStr(const DwString& aStr) : mString(aStr), mNext(nullptr) {}
     DwString mString;
     DwBodyPartStr* mNext;
 };
@@ -75,7 +75,7 @@ private:
 DwBodyParser::DwBodyParser(const DwString& aStr, const DwString& aBoundary)
   : mString(aStr), mBoundary(aBoundary)
 {
-    mFirstBodyPartStr = 0;
+    mFirstBodyPartStr = nullptr;
     Parse();
 }
 
@@ -96,7 +96,7 @@ int DwBodyParser::Parse()
     result = FindBoundary(pos, &boundaryStart, &boundaryEnd, &isFinal);
     if (result == kParseFail) {
         mPreamble = mEpilogue = "";
-        mFirstBodyPartStr = 0;
+        mFirstBodyPartStr = nullptr;
         return kParseFail;
     }
     int start = pos;
@@ -293,13 +293,13 @@ int DwBodyParser::FindBoundary(size_t aStartPos, size_t* aBoundaryStart,
 void DwBodyParser::AddPart(size_t start, size_t len)
 {
     DwBodyPartStr* toAdd = new DwBodyPartStr(mString.substr(start, len));
-    if (toAdd != 0) {
+    if (toAdd) {
         DwBodyPartStr* curr = mFirstBodyPartStr;
-        if (curr == 0) {
+        if (!curr) {
             mFirstBodyPartStr = toAdd;
             return;
         }
-        while (curr->mNext != 0) {
+        while (curr->mNext) {
             curr = curr->mNext;
         }
         curr->mNext = toAdd;
@@ -315,7 +315,7 @@ void DwBodyParser::DeleteParts()
         delete curr;
         curr = next;
     }
-    mFirstBodyPartStr = 0;
+    mFirstBodyPartStr = nullptr;
 }
 
 
@@ -325,7 +325,7 @@ void DwBodyParser::DeleteParts()
 const char* const DwBody::sClassName = "DwBody";
 
 
-DwBody* (*DwBody::sNewBody)(const DwString&, DwMessageComponent*) = 0;
+DwBody* (*DwBody::sNewBody)(const DwString&, DwMessageComponent*) = nullptr;
 
 
 DwBody* DwBody::NewBody(const DwString& aStr, DwMessageComponent* aParent)
@@ -344,8 +344,8 @@ DwBody* DwBody::NewBody(const DwString& aStr, DwMessageComponent* aParent)
 
 DwBody::DwBody()
 {
-    mFirstBodyPart = 0;
-    mMessage = 0;
+    mFirstBodyPart = nullptr;
+    mMessage = nullptr;
     mClassId = kCidBody;
     mClassName = sClassName;
 }
@@ -357,12 +357,12 @@ DwBody::DwBody(const DwBody& aBody)
     mPreamble(aBody.mPreamble),
     mEpilogue(aBody.mEpilogue)
 {
-    mFirstBodyPart = 0;
+    mFirstBodyPart = nullptr;
     const DwBodyPart* firstPart = aBody.mFirstBodyPart;
     if (firstPart) {
         CopyBodyParts(firstPart);
     }
-    mMessage = 0;
+    mMessage = nullptr;
     const DwMessage* message = aBody.mMessage;
     if (message) {
         DwMessage* msg = (DwMessage*) message->Clone();
@@ -376,8 +376,8 @@ DwBody::DwBody(const DwBody& aBody)
 DwBody::DwBody(const DwString& aStr, DwMessageComponent* aParent)
   : DwMessageComponent(aStr, aParent)
 {
-    mFirstBodyPart = 0;
-    mMessage = 0;
+    mFirstBodyPart = nullptr;
+    mMessage = nullptr;
     mClassId = kCidBody;
     mClassName = sClassName;
 }
@@ -634,7 +634,7 @@ void DwBody::DeleteBodyParts()
         delete part;
         part = nextPart;
     }
-    mFirstBodyPart = 0;
+    mFirstBodyPart = nullptr;
 }
 
 
diff --git a/mimelib/bodypart.cpp b/mimelib/bodypart.cpp
index fac2bba20..d74f55b6f 100644
--- a/mimelib/bodypart.cpp
+++ b/mimelib/bodypart.cpp
@@ -40,7 +40,7 @@ const char* const DwBodyPart::sClassName = "DwBodyPart";
 
 
 DwBodyPart* (*DwBodyPart::sNewBodyPart)(const DwString&,
-    DwMessageComponent*) = 0;
+    DwMessageComponent*) = nullptr;
 
 
 DwBodyPart* DwBodyPart::NewBodyPart(const DwString& aStr,
@@ -59,7 +59,7 @@ DwBodyPart* DwBodyPart::NewBodyPart(const DwString& aStr,
 
 DwBodyPart::DwBodyPart()
 {
-    mNext = 0;
+    mNext = nullptr;
     mClassId = kCidBodyPart;
     mClassName = sClassName;
 }
@@ -68,7 +68,7 @@ DwBodyPart::DwBodyPart()
 DwBodyPart::DwBodyPart(const DwBodyPart& aPart)
   : DwEntity(aPart)
 {
-    mNext = 0;
+    mNext = nullptr;
     mClassId = kCidBodyPart;
     mClassName = sClassName;
 }
@@ -76,7 +76,7 @@ DwBodyPart::DwBodyPart(const DwBodyPart& aPart)
 DwBodyPart::DwBodyPart(const DwEntity& aPart)
   : DwEntity(aPart)
 {
-    mNext = 0;
+    mNext = nullptr;
     mClassId = kCidBodyPart;
     mClassName = sClassName;
 }
@@ -85,7 +85,7 @@ DwBodyPart::DwBodyPart(const DwEntity& aPart)
 DwBodyPart::DwBodyPart(const DwString& aStr, DwMessageComponent* aParent)
   : DwEntity(aStr, aParent)
 {
-    mNext = 0;
+    mNext = nullptr;
     mClassId = kCidBodyPart;
     mClassName = sClassName;
 }
diff --git a/mimelib/boyermor.cpp b/mimelib/boyermor.cpp
index 5ee007ae8..fe34d0f7c 100644
--- a/mimelib/boyermor.cpp
+++ b/mimelib/boyermor.cpp
@@ -30,7 +30,7 @@
 
 
 DwBoyerMoore::DwBoyerMoore(const char* aCstr)
-  : mPat( 0 ), mCiPat( 0 )
+  : mPat( nullptr ), mCiPat( nullptr )
 {
     size_t len = strlen(aCstr);
     _Assign(aCstr, len);
@@ -38,13 +38,13 @@ DwBoyerMoore::DwBoyerMoore(const char* aCstr)
 
 
 DwBoyerMoore::DwBoyerMoore(const DwString& aStr)
-  : mPat( 0 ), mCiPat( 0 )
+  : mPat( nullptr ), mCiPat( nullptr )
 {
     _Assign(aStr.data(), aStr.length());
 }
 
 DwBoyerMoore::DwBoyerMoore(const DwBoyerMoore & other)
-  : mPat( 0 ), mCiPat( 0 )
+  : mPat( nullptr ), mCiPat( nullptr )
 {
     _Assign(other.mPat, other.mPatLen);
 }
@@ -52,8 +52,8 @@ DwBoyerMoore::DwBoyerMoore(const DwBoyerMoore & other)
 
 DwBoyerMoore::~DwBoyerMoore()
 {
-    delete[] mPat; mPat = 0;
-    delete[] mCiPat; mCiPat = 0;
+    delete[] mPat; mPat = nullptr;
+    delete[] mCiPat; mCiPat = nullptr;
 }
 
 const DwBoyerMoore & DwBoyerMoore::operator=( const DwBoyerMoore & other )
@@ -80,11 +80,11 @@ void DwBoyerMoore::Assign(const DwString& aStr)
 void DwBoyerMoore::_Assign(const char* aPat, size_t aPatLen)
 {
     mPatLen = 0;
-    delete[] mPat; mPat = 0;
-    delete[] mCiPat; mCiPat = 0;
+    delete[] mPat; mPat = nullptr;
+    delete[] mCiPat; mCiPat = nullptr;
     mPat = new char[aPatLen+1];
     mCiPat = new char[aPatLen+1];
-    if (mPat != 0 && aPatLen) {
+    if (mPat && aPatLen) {
         mPatLen = aPatLen;
         strncpy(mPat, aPat, mPatLen);
         mCiPat[mPatLen] = mPat[mPatLen] = 0;
@@ -111,7 +111,7 @@ size_t DwBoyerMoore::FindIn(const DwString& aStr, size_t aPos, bool aCs) const
     if (aStr.length() <= aPos) {
         return (size_t) -1;
     }
-    if (pat == 0 || mPatLen == 0) {
+    if (!pat || mPatLen == 0) {
         return 0;
     }
     size_t bufLen = aStr.length() - aPos;
diff --git a/mimelib/datetime.cpp b/mimelib/datetime.cpp
index 64f2eef2e..aa5b6a41a 100644
--- a/mimelib/datetime.cpp
+++ b/mimelib/datetime.cpp
@@ -54,7 +54,7 @@ const char* const DwDateTime::sClassName = "DwDateTime";
 int DwDateTime::sDefaultZone = 0;
 int DwDateTime::sIsDefaultZoneSet = 0;
 DwDateTime* (*DwDateTime::sNewDateTime)(const DwString&,
-    DwMessageComponent*) = 0;
+    DwMessageComponent*) = nullptr;
 
 
 DwDateTime* DwDateTime::NewDateTime(const DwString& aStr,
@@ -112,7 +112,7 @@ void DwDateTime::Init()
     if (sIsDefaultZoneSet == 0) {
         // Use calls to gmtime() and localtime() to get the time difference
         // between local time and UTC (GMT) time.
-        time_t t_now = time((time_t*) 0);
+        time_t t_now = time((time_t*) nullptr);
 #if defined(HAVE_GMTIME_R)
         struct tm utc;
         gmtime_r(&t_now, &utc);
@@ -133,7 +133,7 @@ void DwDateTime::Init()
     // Set the time zone from the default time zone
     mZone = sDefaultZone;
     // Get the current calendar time
-    time_t t_now = time((time_t*) 0);
+    time_t t_now = time((time_t*) nullptr);
     // Set year, month, day, hour, minute, and second from calendar time
     _FromCalendarTime(t_now);
 }
diff --git a/mimelib/disptype.cpp b/mimelib/disptype.cpp
index f93dc21be..878d28c49 100644
--- a/mimelib/disptype.cpp
+++ b/mimelib/disptype.cpp
@@ -35,7 +35,7 @@ const char* const DwDispositionType::sClassName = "DwDispositionType";
 
 
 DwDispositionType* (*DwDispositionType::sNewDispositionType)(
-    const DwString&, DwMessageComponent*) = 0;
+    const DwString&, DwMessageComponent*) = nullptr;
 
 
 DwDispositionType* DwDispositionType::NewDispositionType(
@@ -53,7 +53,7 @@ DwDispositionType* DwDispositionType::NewDispositionType(
 DwDispositionType::DwDispositionType()
 {
     mDispositionType = DwMime::kDispTypeNull;
-    mFirstParameter = 0;
+    mFirstParameter = nullptr;
     mClassId = kCidDispositionType;
     mClassName = sClassName;
 }
@@ -64,7 +64,7 @@ DwDispositionType::DwDispositionType(const DwDispositionType& aDispType)
     mDispositionTypeStr(aDispType.mDispositionTypeStr),
     mFilenameStr(aDispType.mFilenameStr)
 {
-    mFirstParameter = 0;
+    mFirstParameter = nullptr;
     mDispositionType = aDispType.mDispositionType;
     if (aDispType.mFirstParameter) {
         CopyParameterList(aDispType.mFirstParameter);
@@ -79,7 +79,7 @@ DwDispositionType::DwDispositionType(const DwString& aStr,
   : DwFieldBody(aStr, aParent)
 {
     mDispositionType = DwMime::kDispTypeNull;
-    mFirstParameter = 0;
+    mFirstParameter = nullptr;
     mClassId = kCidDispositionType;
     mClassName = sClassName;
 }
@@ -178,7 +178,7 @@ void DwDispositionType::SetFilename(const DwString& aStr)
         param = param->Next();
     }
     // Boundary parameter not found. Add it.
-    param = DwParameter::NewParameter("", 0);
+    param = DwParameter::NewParameter("", nullptr);
     param->SetAttribute("Filename");
     param->SetValue(aStr);
     AddParameter(param);
@@ -366,7 +366,7 @@ void DwDispositionType::DeleteParameterList()
         delete param;
         param = nextParam;
     }
-    mFirstParameter = 0;
+    mFirstParameter = nullptr;
     SetModified();
 }
 
diff --git a/mimelib/dwstring.cpp b/mimelib/dwstring.cpp
index 749f7c8ee..1db25c98d 100644
--- a/mimelib/dwstring.cpp
+++ b/mimelib/dwstring.cpp
@@ -60,8 +60,8 @@ static char dw_asciitoupper( const char c )
 static int dw_strasciicasecmp(const char* s1, size_t len1, const char* s2,
     size_t len2)
 {
-    assert(s1 != 0);
-    assert(s2 != 0);
+    assert(s1);
+    assert(s2);
     size_t len = DW_MIN(len1, len2);
     for (size_t i=0; i < len; ++i) {
         int c1 = dw_asciitolower( s1[i] );
@@ -111,8 +111,8 @@ static int dw_strcasecmp(const char* s1, size_t len1, const char* s2,
 
 static int dw_strcmp(const char* s1, size_t len1, const char* s2, size_t len2)
 {
-    assert(s1 != 0);
-    assert(s2 != 0);
+    assert(s1);
+    assert(s2);
     size_t len = DW_MIN(len1, len2);
     for (size_t i=0; i < len; ++i) {
         if (s1[i] < s2[i]) {
@@ -136,8 +136,8 @@ static int dw_strcmp(const char* s1, size_t len1, const char* s2, size_t len2)
 
 inline void mem_copy(const char* src, size_t n, char* dest)
 {
-    assert(src != 0);
-    assert(dest != 0);
+    assert(src);
+    assert(dest);
     assert(src != dest);
     if (n == 0 || src == dest || !src || !dest) return;
     memmove(dest, src, n);
@@ -150,7 +150,7 @@ inline void mem_copy(const char* src, size_t n, char* dest)
 
 static char* mem_alloc(size_t* aSize)
 {
-    assert(aSize != 0);
+    assert(aSize);
     // minimum size is 32
     size_t size = 32;
     while (size < *aSize) {
@@ -158,7 +158,7 @@ static char* mem_alloc(size_t* aSize)
     }
     *aSize = 0;
     char* buf = new char[size];
-    if (buf != 0)
+    if (buf)
         *aSize = size;
     return buf;
 }
@@ -168,7 +168,7 @@ static char* mem_alloc(size_t* aSize)
 
 inline void mem_free(char* buf)
 {
-    assert(buf != 0);
+    assert(buf);
     if (buf && buf != DwString::sEmptyBuffer)
         delete [] buf;
 }
@@ -176,7 +176,7 @@ inline void mem_free(char* buf)
 
 inline DwStringRep* new_rep_reference(DwStringRep* rep)
 {
-    assert(rep != 0);
+    assert(rep);
     ++rep->mRefCount;
     return rep;
 }
@@ -184,7 +184,7 @@ inline DwStringRep* new_rep_reference(DwStringRep* rep)
 
 inline void delete_rep_safely(DwStringRep* rep)
 {
-    assert(rep != 0);
+    assert(rep);
 #if defined(DW_DEBUG_VERSION) || defined(DW_DEVELOPMENT_VERSION)
     if (rep->mRefCount <= 0) {
         std::cerr << "Error: attempt to delete a DwStringRep "
@@ -212,7 +212,7 @@ inline void delete_rep_safely(DwStringRep* rep)
 
 DwStringRep::DwStringRep(char* aBuf, size_t aSize)
 {
-    assert(aBuf != 0);
+    assert(aBuf);
     mSize = aSize;
     mBuffer = aBuf;
     mRefCount = 1;
@@ -221,7 +221,7 @@ DwStringRep::DwStringRep(char* aBuf, size_t aSize)
 
 DwStringRep::DwStringRep(FILE* aFile, size_t aSize)
 {
-    assert(aFile != 0);
+    assert(aFile);
     static int pagesize = -1;
     if (pagesize < 0)
 	pagesize = getpagesize();
@@ -231,10 +231,10 @@ DwStringRep::DwStringRep(FILE* aFile, size_t aSize)
     mSize = aSize;
     mRefCount = 1;
 
-    mBuffer = (char *)mmap(0, aSize + mPageMod, PROT_READ, MAP_SHARED, fileno(aFile), tell - mPageMod) + mPageMod;
+    mBuffer = (char *)mmap(nullptr, aSize + mPageMod, PROT_READ, MAP_SHARED, fileno(aFile), tell - mPageMod) + mPageMod;
     ++mPageMod;
     if (mBuffer == MAP_FAILED) {
-	mBuffer = 0;
+	mBuffer = nullptr;
 	mSize = 0;
 	mPageMod = 0;
     }
@@ -244,7 +244,7 @@ DwStringRep::DwStringRep(FILE* aFile, size_t aSize)
 DwStringRep::~DwStringRep()
 {
 #if defined (DW_DEBUG_VERSION) || defined (DW_DEVELOPMENT_VERSION)
-    if (mBuffer == 0) {
+    if (!mBuffer) {
         std::cerr << "DwStringRep destructor called for bad DwStringRep object"
             << std::endl;
         std::cerr << "(Possibly 'delete' was called twice for same object)"
@@ -309,16 +309,16 @@ void DwStringRep::operator delete(void* aRep, size_t)
 
 const size_t DwString::kEmptyBufferSize = 4;
 char DW_EXPORT DwString::sEmptyBuffer[]="    ";
-DwStringRep* DwString::sEmptyRep = 0;
+DwStringRep* DwString::sEmptyRep = nullptr;
 
 const size_t DwString::npos = (size_t) -1;
 
 DwString::DwString()
 {
-    if (sEmptyRep == 0) {
+    if (!sEmptyRep) {
         sEmptyBuffer[0] = 0;
         sEmptyRep = new DwStringRep(sEmptyBuffer, kEmptyBufferSize);
-        assert(sEmptyRep != 0);
+        assert(sEmptyRep);
     }
     DBG_STMT(sEmptyRep->CheckInvariants())
     mRep = new_rep_reference(sEmptyRep);
@@ -330,10 +330,10 @@ DwString::DwString()
 DwString::DwString(const DwString& aStr, size_t aPos, size_t aLen)
 {
     assert(aPos <= aStr.mLength);
-    if (sEmptyRep == 0) {
+    if (!sEmptyRep) {
         sEmptyBuffer[0] = 0;
         sEmptyRep = new DwStringRep(sEmptyBuffer, kEmptyBufferSize);
-        assert(sEmptyRep != 0);
+        assert(sEmptyRep);
     }
     DBG_STMT(aStr.CheckInvariants())
     size_t pos = DW_MIN(aPos, aStr.mLength);
@@ -353,12 +353,12 @@ DwString::DwString(const DwString& aStr, size_t aPos, size_t aLen)
 
 DwString::DwString(const char* aBuf, size_t aLen)
 {
-    assert(aBuf != 0);
+    assert(aBuf);
     assert(aLen != (size_t)-1);
-    if (sEmptyRep == 0) {
+    if (!sEmptyRep) {
         sEmptyBuffer[0] = 0;
         sEmptyRep = new DwStringRep(sEmptyBuffer, kEmptyBufferSize);
-        assert(sEmptyRep != 0);
+        assert(sEmptyRep);
     }
     DBG_STMT(sEmptyRep->CheckInvariants())
     // Set valid values, in case an exception is thrown
@@ -371,12 +371,12 @@ DwString::DwString(const char* aBuf, size_t aLen)
 
 DwString::DwString(FILE* aFile , size_t aLen)
 {
-    assert(aFile != 0);
+    assert(aFile);
     assert(aLen != (size_t)-1);
-    if (sEmptyRep == 0) {
+    if (!sEmptyRep) {
         sEmptyBuffer[0] = 0;
         sEmptyRep = new DwStringRep(sEmptyBuffer, kEmptyBufferSize);
-        assert(sEmptyRep != 0);
+        assert(sEmptyRep);
     }
     DBG_STMT(sEmptyRep->CheckInvariants())
     // Set valid values, in case an exception is thrown
@@ -388,10 +388,10 @@ DwString::DwString(FILE* aFile , size_t aLen)
 
 DwString::DwString(const char* aCstr)
 {
-    if (sEmptyRep == 0) {
+    if (!sEmptyRep) {
         sEmptyBuffer[0] = 0;
         sEmptyRep = new DwStringRep(sEmptyBuffer, kEmptyBufferSize);
-        assert(sEmptyRep != 0);
+        assert(sEmptyRep);
     }
     DBG_STMT(sEmptyRep->CheckInvariants())
     // Set valid values, in case an exception is thrown
@@ -408,10 +408,10 @@ DwString::DwString(const char* aCstr)
 DwString::DwString(size_t aLen, char aChar)
 {
     assert(aLen != (size_t)-1);
-    if (sEmptyRep == 0) {
+    if (!sEmptyRep) {
         sEmptyBuffer[0] = 0;
         sEmptyRep = new DwStringRep(sEmptyBuffer, kEmptyBufferSize);
-        assert(sEmptyRep != 0);
+        assert(sEmptyRep);
     }
     DBG_STMT(sEmptyRep->CheckInvariants())
     // Set valid values, in case an exception is thrown
@@ -424,14 +424,14 @@ DwString::DwString(size_t aLen, char aChar)
 
 DwString::DwString(char* aBuf, size_t aSize, size_t aStart, size_t aLen)
 {
-    assert(aBuf != 0);
+    assert(aBuf);
     assert(aSize > 0);
     assert(aLen < aSize);
     assert(aStart < aSize - aLen);
-    if (sEmptyRep == 0) {
+    if (!sEmptyRep) {
         sEmptyBuffer[0] = 0;
         sEmptyRep = new DwStringRep(sEmptyBuffer, kEmptyBufferSize);
-        assert(sEmptyRep != 0);
+        assert(sEmptyRep);
     }
     DBG_STMT(sEmptyRep->CheckInvariants())
     // Set valid values, in case an exception is thrown
@@ -439,8 +439,8 @@ DwString::DwString(char* aBuf, size_t aSize, size_t aStart, size_t aLen)
     mStart = 0;
     mLength = 0;
     DwStringRep* rep = new DwStringRep(aBuf, aSize);
-    assert(rep != 0);
-    if (rep != 0) {
+    assert(rep);
+    if (rep) {
         mRep = rep;
         mStart = aStart;
         mLength = aLen;
@@ -453,9 +453,9 @@ DwString::DwString(char* aBuf, size_t aSize, size_t aStart, size_t aLen)
 
 DwString::~DwString()
 {
-    assert(mRep != 0);
+    assert(mRep);
     delete_rep_safely(mRep);
-    DEV_STMT(mRep = 0)
+    DEV_STMT(mRep = nullptr)
 }
 
 
@@ -494,15 +494,15 @@ void DwString::reserve(size_t aSize)
     }
     size_t size = aSize + 1;
     char* newBuf = mem_alloc(&size);
-    assert(newBuf != 0);
-    if (newBuf != 0) {
+    assert(newBuf);
+    if (newBuf) {
         char* to = newBuf;
         const char* from = mRep->mBuffer + mStart;
         mem_copy(from, mLength, to);
         to[mLength] = 0;
         DwStringRep* rep= new DwStringRep(newBuf, size);
-        assert(rep != 0);
-        if (rep != 0) {
+        assert(rep);
+        if (rep) {
             delete_rep_safely(mRep);
             mRep = rep;
             mStart = 0;
@@ -545,8 +545,8 @@ DwString& DwString::append(const DwString& aStr, size_t aPos,
 
 DwString& DwString::append(const char* aBuf, size_t aLen)
 {
-    assert(aBuf != 0);
-    if (aBuf != 0) {
+    assert(aBuf);
+    if (aBuf) {
         _replace(mLength, 0, aBuf, aLen);
     }
     return *this;
@@ -555,7 +555,7 @@ DwString& DwString::append(const char* aBuf, size_t aLen)
 
 DwString& DwString::append(const char* aCstr)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     size_t len = (aCstr) ? strlen(aCstr) : 0;
     _replace(mLength, 0, aCstr, len);
     return *this;
@@ -599,7 +599,7 @@ DwString& DwString::assign(const DwString& aStr, size_t aPos, size_t aLen)
 
 DwString& DwString::assign(const char* aBuf, size_t aLen)
 {
-    assert(aBuf != 0);
+    assert(aBuf);
     assert(aLen != (size_t)-1);
     _replace(0, mLength, aBuf, aLen);
     return *this;
@@ -608,7 +608,7 @@ DwString& DwString::assign(const char* aBuf, size_t aLen)
 
 DwString& DwString::assign(const char* aCstr)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     size_t len = (aCstr) ? strlen(aCstr) : 0;
     _replace(0, mLength, aCstr, len);
     return *this;
@@ -649,7 +649,7 @@ DwString& DwString::insert(size_t aPos1, const DwString& aStr,
 
 DwString& DwString::insert(size_t aPos, const char* aBuf, size_t aLen)
 {
-    assert(aBuf != 0);
+    assert(aBuf);
     _replace(aPos, 0, aBuf, aLen);
     return *this;
 }
@@ -657,7 +657,7 @@ DwString& DwString::insert(size_t aPos, const char* aBuf, size_t aLen)
 
 DwString& DwString::insert(size_t aPos, const char* aCstr)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     size_t len = (aCstr) ? strlen(aCstr) : 0;
     _replace(aPos, 0, aCstr, len);
     return *this;
@@ -731,7 +731,7 @@ DwString& DwString::replace(size_t aPos1, size_t aLen1, size_t aLen2,
 size_t DwString::copy(char* aBuf, size_t aLen, size_t aPos) const
 {
     assert(aPos <= mLength);
-    assert(aBuf != 0);
+    assert(aBuf);
     size_t pos = DW_MIN(aPos, mLength);
     size_t len = DW_MIN(aLen, mLength - pos);
     char* to = aBuf;
@@ -763,8 +763,8 @@ size_t DwString::find(const DwString& aStr, size_t aPos) const
 
 size_t DwString::find(const char* aBuf, size_t aPos, size_t aLen) const
 {
-    assert(aBuf != 0);
-    if (aBuf == 0) return (size_t)-1;
+    assert(aBuf);
+    if (!aBuf) return (size_t)-1;
     if (aLen > mLength) return (size_t)-1;
     if (aPos > mLength-aLen) return (size_t)-1;
     if (aLen == 0) return aPos;
@@ -783,8 +783,8 @@ size_t DwString::find(const char* aBuf, size_t aPos, size_t aLen) const
 
 size_t DwString::find(const char* aCstr, size_t aPos) const
 {
-    assert(aCstr != 0);
-    if (aCstr == 0) return (size_t)-1;
+    assert(aCstr);
+    if (!aCstr) return (size_t)-1;
     size_t len = strlen(aCstr);
     return find(aCstr, aPos, len);
 }
@@ -809,8 +809,8 @@ size_t DwString::rfind(const DwString& aStr, size_t aPos) const
 
 size_t DwString::rfind(const char* aBuf, size_t aPos, size_t aLen) const
 {
-    assert(aBuf != 0);
-    if (aBuf == 0) return (size_t)-1;
+    assert(aBuf);
+    if (!aBuf) return (size_t)-1;
     if (aLen > mLength) return (size_t)-1;
     size_t pos = DW_MIN(aPos, mLength - aLen);
     if (aLen == 0) return pos;
@@ -829,7 +829,7 @@ size_t DwString::rfind(const char* aBuf, size_t aPos, size_t aLen) const
 
 size_t DwString::rfind(const char* aCstr, size_t aPos) const
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     size_t len = (aCstr) ? strlen(aCstr) : 0;
     return rfind(aCstr, aPos, len);
 }
@@ -855,8 +855,8 @@ size_t DwString::find_first_of(const DwString& aStr, size_t aPos) const
 
 size_t DwString::find_first_of(const char* aBuf, size_t aPos, size_t aLen) const
 {
-    assert(aBuf != 0);
-    if (aBuf == 0) return (size_t)-1;
+    assert(aBuf);
+    if (!aBuf) return (size_t)-1;
     if (aPos >= mLength) return (size_t)-1;
     if (aLen == 0) return aPos;
     char table[256];
@@ -874,8 +874,8 @@ size_t DwString::find_first_of(const char* aBuf, size_t aPos, size_t aLen) const
 
 size_t DwString::find_first_of(const char* aCstr, size_t aPos) const
 {
-    assert(aCstr != 0);
-    if (aCstr == 0) return (size_t)-1;
+    assert(aCstr);
+    if (!aCstr) return (size_t)-1;
     size_t len = strlen(aCstr);
     return find_first_of(aCstr, aPos, len);
 }
@@ -889,8 +889,8 @@ size_t DwString::find_last_of(const DwString& aStr, size_t aPos) const
 
 size_t DwString::find_last_of(const char* aBuf, size_t aPos, size_t aLen) const
 {
-    assert(aBuf != 0);
-    if (aBuf == 0) return (size_t)-1;
+    assert(aBuf);
+    if (!aBuf) return (size_t)-1;
     if (mLength == 0) return (size_t)-1;
     size_t pos = DW_MIN(aPos, mLength - 1);
     if (aLen == 0) return pos;
@@ -910,8 +910,8 @@ size_t DwString::find_last_of(const char* aBuf, size_t aPos, size_t aLen) const
 
 size_t DwString::find_last_of(const char* aCstr, size_t aPos) const
 {
-    assert(aCstr != 0);
-    if (aCstr == 0) return (size_t)-1;
+    assert(aCstr);
+    if (!aCstr) return (size_t)-1;
     size_t len = strlen(aCstr);
     return find_last_of(aCstr, aPos, len);
 }
@@ -925,8 +925,8 @@ size_t DwString::find_first_not_of(const DwString& aStr, size_t aPos) const
 
 size_t DwString::find_first_not_of(const char* aBuf, size_t aPos, size_t aLen) const
 {
-    assert(aBuf != 0);
-    if (aBuf == 0) return (size_t)-1;
+    assert(aBuf);
+    if (!aBuf) return (size_t)-1;
     if (aPos >= mLength) return (size_t)-1;
     if (aLen == 0) return (size_t)-1;
     char table[256];
@@ -944,8 +944,8 @@ size_t DwString::find_first_not_of(const char* aBuf, size_t aPos, size_t aLen) c
 
 size_t DwString::find_first_not_of(const char* aCstr, size_t aPos) const
 {
-    assert(aCstr != 0);
-    if (aCstr == 0) return (size_t)-1;
+    assert(aCstr);
+    if (!aCstr) return (size_t)-1;
     size_t len = strlen(aCstr);
     return find_first_not_of(aCstr, aPos, len);
 }
@@ -959,8 +959,8 @@ size_t DwString::find_last_not_of(const DwString& aStr, size_t aPos) const
 
 size_t DwString::find_last_not_of(const char* aBuf, size_t aPos, size_t aLen) const
 {
-    assert(aBuf != 0);
-    if (aBuf == 0) return (size_t)-1;
+    assert(aBuf);
+    if (!aBuf) return (size_t)-1;
     if (mLength == 0) return (size_t)-1;
     size_t pos = DW_MIN(aPos, mLength - 1);
     if (aLen == 0) return (size_t)-1;
@@ -980,8 +980,8 @@ size_t DwString::find_last_not_of(const char* aBuf, size_t aPos, size_t aLen) co
 
 size_t DwString::find_last_not_of(const char* aCstr, size_t aPos) const
 {
-    assert(aCstr != 0);
-    if (aCstr == 0) return (size_t)-1;
+    assert(aCstr);
+    if (!aCstr) return (size_t)-1;
     size_t len = strlen(aCstr);
     return find_last_not_of(aCstr, aPos, len);
 }
@@ -1034,7 +1034,7 @@ int DwString::compare(size_t aPos1, size_t aLen1, const DwString& aStr,
 
 int DwString::compare(const char* aCstr) const
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     size_t len = (aCstr) ? strlen(aCstr) : 0;
     return compare(0, mLength, aCstr, len);
 }
@@ -1043,9 +1043,9 @@ int DwString::compare(const char* aCstr) const
 int DwString::compare(size_t aPos1, size_t aLen1, const char* aBuf,
     size_t aLen2) const
 {
-    assert(aBuf != 0);
+    assert(aBuf);
     assert(aPos1 <= mLength);
-    if (aBuf == 0) {
+    if (!aBuf) {
         return (aLen1 > 0) ? 1 : 0;
     }
     size_t pos1 = DW_MIN(aPos1, mLength);
@@ -1144,9 +1144,9 @@ void DwString::WriteTo(std::ostream& aStrm) const
 
 void DwString::TakeBuffer(char* aBuf, size_t aSize, size_t aStart, size_t aLen)
 {
-    assert(aBuf != 0);
+    assert(aBuf);
     DwStringRep* rep = new DwStringRep(aBuf, aSize);
-    assert(rep != 0);
+    assert(rep);
     if (rep) {
         delete_rep_safely(mRep);
         mRep = rep;
@@ -1159,10 +1159,10 @@ void DwString::TakeBuffer(char* aBuf, size_t aSize, size_t aStart, size_t aLen)
 void DwString::ReleaseBuffer(char** aBuf, size_t* aSize, size_t* aStart,
     size_t* aLen)
 {
-    assert(aBuf != 0);
-    assert(aSize != 0);
-    assert(aStart != 0);
-    assert(aLen != 0);
+    assert(aBuf);
+    assert(aSize);
+    assert(aStart);
+    assert(aLen);
     if (mRep->mRefCount == 1) {
         *aBuf = mRep->mBuffer;
         *aSize = mRep->mSize;
@@ -1170,15 +1170,15 @@ void DwString::ReleaseBuffer(char** aBuf, size_t* aSize, size_t* aStart,
     else {
         size_t size = mRep->mSize;
         char* buf = new char [size];
-        assert(buf != 0);
-        if (buf != 0) {
+        assert(buf);
+        if (buf) {
             mem_copy(mRep->mBuffer, size, buf);
             *aBuf = buf;
             *aSize = size;
         }
         else {
             // If not throwing an exception, recover as best we can
-            *aBuf = 0;
+            *aBuf = nullptr;
             *aSize = 0;
             *aStart = mStart = 0;
             *aLen = mLength = 0;
@@ -1195,18 +1195,18 @@ void DwString::ReleaseBuffer(char** aBuf, size_t* aSize, size_t* aStart,
 
 void DwString::CopyTo(DwString* aStr) const
 {
-    assert(aStr != 0);
+    assert(aStr);
     if (!aStr) return;
     size_t len = mLength;
     size_t size = len + 1;
     char* buf = mem_alloc(&size);
-    assert(buf != 0);
-    if (buf != 0) {
+    assert(buf);
+    if (buf) {
         mem_copy(mRep->mBuffer+mStart, len, buf);
         buf[len] = 0;
         DwStringRep* rep = new DwStringRep(buf, size);
-        assert(rep != 0);
-        if (rep != 0) {
+        assert(rep);
+        if (rep) {
             aStr->mRep = rep;
             delete_rep_safely(aStr->mRep);
             aStr->mStart = 0;
@@ -1221,15 +1221,15 @@ void DwString::_copy()
     if (mRep->mRefCount > 1) {
         size_t size = mLength + 1;
         char* newBuf = mem_alloc(&size);
-        assert(newBuf != 0);
-        if (newBuf != 0) {
+        assert(newBuf);
+        if (newBuf) {
             char* to = newBuf;
             const char* from = mRep->mBuffer + mStart;
             mem_copy(from, mLength, to);
             to[mLength] = 0;
             DwStringRep* rep = new DwStringRep(newBuf, size);
-            assert(rep != 0);
-            if (rep != 0) {
+            assert(rep);
+            if (rep) {
                 delete_rep_safely(mRep);
                 mRep = rep;
                 mStart = 0;
@@ -1249,7 +1249,7 @@ void DwString::_copy()
 void DwString::_replace(size_t aPos1, size_t aLen1, const char* aBuf, size_t aLen2)
 {
     assert(aPos1 <= mLength);
-    assert(aBuf != 0);
+    assert(aBuf);
     size_t pos1 = DW_MIN(aPos1, mLength);
     size_t len1 = DW_MIN(aLen1, mLength - pos1);
     assert(mStart + mLength - len1 < ((size_t)-1) - aLen2);
@@ -1259,7 +1259,7 @@ void DwString::_replace(size_t aPos1, size_t aLen1, const char* aBuf, size_t aLe
     const char* from;
     size_t newLen = (mLength - len1) + len2;
     // Is new string empty?
-    if (newLen == 0 || aBuf == 0) {
+    if (newLen == 0 || !aBuf) {
         if (mRep != sEmptyRep) {
             delete_rep_safely(mRep);
             mRep = new_rep_reference(sEmptyRep);
@@ -1271,8 +1271,8 @@ void DwString::_replace(size_t aPos1, size_t aLen1, const char* aBuf, size_t aLe
     else if (mRep->mRefCount > 1 || newLen >= mRep->mSize) {
         size_t size = newLen + 1;
         char* newBuf = mem_alloc(&size);
-        assert(newBuf != 0);
-        if (newBuf != 0) {
+        assert(newBuf);
+        if (newBuf) {
             to = newBuf;
             memcpy(to, mRep->mBuffer + mStart, pos1);
             to += pos1;
@@ -1282,8 +1282,8 @@ void DwString::_replace(size_t aPos1, size_t aLen1, const char* aBuf, size_t aLe
             to += mLength - pos1 - len1;
             *to = 0;
             DwStringRep* rep = new DwStringRep(newBuf, size);
-            assert(rep != 0);
-            if (rep != 0) {
+            assert(rep);
+            if (rep) {
                 delete_rep_safely(mRep);
                 mRep = rep;
                 mStart = 0;
@@ -1362,8 +1362,8 @@ void DwString::_replace(size_t aPos1, size_t aLen1, size_t aLen2, char aChar)
     else if (mRep->mRefCount > 1 || newLen >= mRep->mSize) {
         size_t size = newLen + 1;
         char* newBuf = mem_alloc(&size);
-        assert(newBuf != 0);
-        if (newBuf != 0) {
+        assert(newBuf);
+        if (newBuf) {
             to = newBuf;
             from = mRep->mBuffer + mStart;
             for (i=0; i < pos1; ++i) *to++ = *from++;
@@ -1372,8 +1372,8 @@ void DwString::_replace(size_t aPos1, size_t aLen1, size_t aLen2, char aChar)
             for (i=0; i < mLength - pos1 - len1; ++i) *to++ = *from++;
             *to = 0;
             DwStringRep* rep = new DwStringRep(newBuf, size);
-            assert(rep != 0);
-            if (rep != 0) {
+            assert(rep);
+            if (rep) {
                 delete_rep_safely(mRep);
                 mRep = rep;
                 mStart = 0;
@@ -1509,7 +1509,7 @@ DwBool operator == (const DwString& aStr1, const DwString& aStr2)
 
 DwBool operator == (const DwString& aStr1, const char* aCstr)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aStr1.data();
     size_t len1 = aStr1.length();
     const char* s2 = aCstr;
@@ -1522,7 +1522,7 @@ DwBool operator == (const DwString& aStr1, const char* aCstr)
 
 DwBool operator == (const char* aCstr, const DwString& aStr2)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aCstr;
     size_t len1 = (aCstr) ? strlen(aCstr) : 0;
     const char* s2 = aStr2.data();
@@ -1547,7 +1547,7 @@ DwBool operator != (const DwString& aStr1, const DwString& aStr2)
 
 DwBool operator != (const DwString& aStr1, const char* aCstr)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aStr1.data();
     size_t len1 = aStr1.length();
     const char* s2 = aCstr;
@@ -1560,7 +1560,7 @@ DwBool operator != (const DwString& aStr1, const char* aCstr)
 
 DwBool operator != (const char* aCstr, const DwString& aStr2)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aCstr;
     size_t len1 = (aCstr) ? strlen(aCstr) : 0;
     const char* s2 = aStr2.data();
@@ -1585,7 +1585,7 @@ DwBool operator < (const DwString& aStr1, const DwString& aStr2)
 
 DwBool operator < (const DwString& aStr1, const char* aCstr)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aStr1.data();
     size_t len1 = aStr1.length();
     const char* s2 = aCstr;
@@ -1598,7 +1598,7 @@ DwBool operator < (const DwString& aStr1, const char* aCstr)
 
 DwBool operator < (const char* aCstr, const DwString& aStr2)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aCstr;
     size_t len1 = (aCstr) ? strlen(aCstr) : 0;
     const char* s2 = aStr2.data();
@@ -1623,7 +1623,7 @@ DwBool operator > (const DwString& aStr1, const DwString& aStr2)
 
 DwBool operator > (const DwString& aStr1, const char* aCstr)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aStr1.data();
     size_t len1 = aStr1.length();
     const char* s2 = aCstr;
@@ -1636,7 +1636,7 @@ DwBool operator > (const DwString& aStr1, const char* aCstr)
 
 DwBool operator > (const char* aCstr, const DwString& aStr2)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aCstr;
     size_t len1 = (aCstr) ? strlen(aCstr) : 0;
     const char* s2 = aStr2.data();
@@ -1661,7 +1661,7 @@ DwBool operator <= (const DwString& aStr1, const DwString& aStr2)
 
 DwBool operator <= (const DwString& aStr1, const char* aCstr)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aStr1.data();
     size_t len1 = aStr1.length();
     const char* s2 = aCstr;
@@ -1674,7 +1674,7 @@ DwBool operator <= (const DwString& aStr1, const char* aCstr)
 
 DwBool operator <= (const char* aCstr, const DwString& aStr2)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aCstr;
     size_t len1 = (aCstr) ? strlen(aCstr) : 0;
     const char* s2 = aStr2.data();
@@ -1699,7 +1699,7 @@ DwBool operator >= (const DwString& aStr1, const DwString& aStr2)
 
 DwBool operator >= (const DwString& aStr1, const char* aCstr)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aStr1.data();
     size_t len1 = aStr1.length();
     const char* s2 = aCstr;
@@ -1712,7 +1712,7 @@ DwBool operator >= (const DwString& aStr1, const char* aCstr)
 
 DwBool operator >= (const char* aCstr, const DwString& aStr2)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aCstr;
     size_t len1 = (aCstr) ? strlen(aCstr) : 0;
     const char* s2 = aStr2.data();
@@ -1767,7 +1767,7 @@ int DwStrcasecmp(const DwString& aStr1, const DwString& aStr2)
 
 int DwStrcasecmp(const DwString& aStr, const char* aCstr)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aStr.data();
     size_t len1 = aStr.length();
     const char* s2 = aCstr;
@@ -1778,7 +1778,7 @@ int DwStrcasecmp(const DwString& aStr, const char* aCstr)
 
 int DwStrcasecmp(const char* aCstr, const DwString& aStr)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aCstr;
     size_t len1 =  (aCstr) ? strlen(aCstr) : 0;
     const char* s2 = aStr.data();
@@ -1801,7 +1801,7 @@ int DwStrncasecmp(const DwString& aStr1, const DwString& aStr2, size_t n)
 
 int DwStrncasecmp(const DwString& aStr, const char* aCstr, size_t n)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aStr.data();
     size_t len1 = aStr.length();
     len1 = DW_MIN(len1, n);
@@ -1814,7 +1814,7 @@ int DwStrncasecmp(const DwString& aStr, const char* aCstr, size_t n)
 
 int DwStrncasecmp(const char* aCstr, const DwString& aStr, size_t n)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aCstr;
     size_t len1 = (aCstr) ? strlen(aCstr) : 0;
     len1 = DW_MIN(len1, n);
@@ -1837,7 +1837,7 @@ int DwStrcmp(const DwString& aStr1, const DwString& aStr2)
 
 int DwStrcmp(const DwString& aStr, const char* aCstr)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aStr.data();
     size_t len1 = aStr.length();
     const char* s2 = aCstr;
@@ -1848,7 +1848,7 @@ int DwStrcmp(const DwString& aStr, const char* aCstr)
 
 int DwStrcmp(const char* aCstr, const DwString& aStr)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aCstr;
     size_t len1 = (aCstr) ? strlen(aCstr) : 0;
     const char* s2 = aStr.data();
@@ -1871,7 +1871,7 @@ int DwStrncmp(const DwString& aStr1, const DwString& aStr2, size_t n)
 
 int DwStrncmp(const DwString& aStr, const char* aCstr, size_t n)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aStr.data();
     size_t len1 = aStr.length();
     len1 = DW_MIN(len1, n);
@@ -1884,7 +1884,7 @@ int DwStrncmp(const DwString& aStr, const char* aCstr, size_t n)
 
 int DwStrncmp(const char* aCstr, const DwString& aStr, size_t n)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     const char* s1 = aCstr;
     size_t len1 = (aCstr) ? strlen(aCstr) : 0;
     len1 = DW_MIN(len1, n);
@@ -1909,7 +1909,7 @@ void DwStrcpy(DwString& aStrDest, const char* aCstrSrc)
 
 void DwStrcpy(char* aCstrDest, const DwString& aStrSrc)
 {
-    assert(aCstrDest != 0);
+    assert(aCstrDest);
     const char* buf = aStrSrc.data();
     size_t len = aStrSrc.length();
     mem_copy(buf, len, aCstrDest);
@@ -1931,7 +1931,7 @@ void DwStrncpy(DwString& aStrDest, const char* aCstrSrc, size_t n)
 
 void DwStrncpy(char* aCstrDest, const DwString& aStrSrc, size_t n)
 {
-    assert(aCstrDest != 0);
+    assert(aCstrDest);
     const char* buf = aStrSrc.data();
     size_t len = aStrSrc.length();
     len = DW_MIN(len, n);
@@ -1946,8 +1946,8 @@ char* DwStrdup(const DwString& aStr)
 {
     size_t len = aStr.length();
     char* buf = new char[len+1];
-    assert(buf != 0);
-    if (buf != 0) {
+    assert(buf);
+    if (buf) {
         DwStrncpy(buf, aStr, len);
         buf[len] = 0;
     }
diff --git a/mimelib/entity.cpp b/mimelib/entity.cpp
index a97d96e57..a3a159489 100644
--- a/mimelib/entity.cpp
+++ b/mimelib/entity.cpp
@@ -138,9 +138,9 @@ const char* const DwEntity::sClassName = "DwEntity";
 DwEntity::DwEntity()
 {
     mHeaders = DwHeaders::NewHeaders("", this);
-    ASSERT(mHeaders != 0);
+    ASSERT(mHeaders);
     mBody = DwBody::NewBody("", this);
-    ASSERT(mBody != 0);
+    ASSERT(mBody);
     mClassId = kCidEntity;
     mClassName = sClassName;
     mBodySize = -1;
@@ -151,10 +151,10 @@ DwEntity::DwEntity(const DwEntity& aEntity)
   : DwMessageComponent(aEntity)
 {
     mHeaders = (DwHeaders*) aEntity.mHeaders->Clone();
-    ASSERT(mHeaders != 0);
+    ASSERT(mHeaders);
     mHeaders->SetParent(this);
     mBody = (DwBody*) aEntity.mBody->Clone();
-    ASSERT(mBody != 0);
+    ASSERT(mBody);
     mBody->SetParent(this);
     mClassId = kCidEntity;
     mClassName = sClassName;
@@ -166,9 +166,9 @@ DwEntity::DwEntity(const DwString& aStr, DwMessageComponent* aParent)
   : DwMessageComponent(aStr, aParent)
 {
     mHeaders = DwHeaders::NewHeaders("", this);
-    ASSERT(mHeaders != 0);
+    ASSERT(mHeaders);
     mBody = DwBody::NewBody("", this);
-    ASSERT(mBody != 0);
+    ASSERT(mBody);
     mClassId = kCidEntity;
     mClassName = sClassName;
     mBodySize = -1;
@@ -190,11 +190,11 @@ const DwEntity& DwEntity::operator = (const DwEntity& aEntity)
     // assignment operator for DwHeaders and DwBody in the following.
     delete mHeaders;
     mHeaders = (DwHeaders*) aEntity.mHeaders->Clone();
-    ASSERT(mHeaders != 0);
+    ASSERT(mHeaders);
     mHeaders->SetParent(this);
     delete mBody;
     mBody = (DwBody*) aEntity.mBody->Clone();
-    ASSERT(mBody != 0);
+    ASSERT(mBody);
     mBody->SetParent(this);
     if (mParent) {
         mParent->SetModified();
@@ -240,7 +240,7 @@ void DwEntity::Assemble()
 
 DwHeaders& DwEntity::Headers() const
 {
-    ASSERT(mHeaders != 0);
+    ASSERT(mHeaders);
     return *mHeaders;
 }
 
diff --git a/mimelib/field.cpp b/mimelib/field.cpp
index a9f140b89..13569f78e 100644
--- a/mimelib/field.cpp
+++ b/mimelib/field.cpp
@@ -127,11 +127,11 @@ void DwFieldParser::Parse()
 const char* const DwField::sClassName = "DwField";
 
 
-DwField* (*DwField::sNewField)(const DwString&, DwMessageComponent*) = 0;
+DwField* (*DwField::sNewField)(const DwString&, DwMessageComponent*) = nullptr;
 
 
 DwFieldBody* (*DwField::sCreateFieldBody)(const DwString&,
-    const DwString&, DwMessageComponent*) = 0;
+    const DwString&, DwMessageComponent*) = nullptr;
 
 
 DwField* DwField::NewField(const DwString& aStr, DwMessageComponent* aParent)
@@ -147,8 +147,8 @@ DwField* DwField::NewField(const DwString& aStr, DwMessageComponent* aParent)
 
 DwField::DwField()
 {
-    mNext = 0;
-    mFieldBody = 0;
+    mNext = nullptr;
+    mFieldBody = nullptr;
     mClassId = kCidField;
     mClassName = sClassName;
 }
@@ -159,12 +159,12 @@ DwField::DwField(const DwField& aField)
     mFieldNameStr(aField.mFieldNameStr),
     mFieldBodyStr(aField.mFieldBodyStr)
 {
-    mNext = 0;
+    mNext = nullptr;
     if (aField.mFieldBody) {
         mFieldBody = (DwFieldBody*) aField.mFieldBody->Clone();
     }
     else {
-        mFieldBody = 0;
+        mFieldBody = nullptr;
     }
     mClassId = kCidField;
     mClassName = sClassName;
@@ -174,8 +174,8 @@ DwField::DwField(const DwField& aField)
 DwField::DwField(const DwString& aStr, DwMessageComponent* aParent)
   : DwMessageComponent(aStr, aParent)
 {
-    mNext = 0;
-    mFieldBody = 0;
+    mNext = nullptr;
+    mFieldBody = nullptr;
     mClassId = kCidField;
     mClassName = sClassName;
 }
@@ -227,7 +227,7 @@ void DwField::SetFieldBodyStr(const DwString& aStr)
     mFieldBodyStr = aStr;
     if (mFieldBody) {
         delete mFieldBody;
-        mFieldBody = 0;
+        mFieldBody = nullptr;
     }
     SetModified();
 }
@@ -283,7 +283,7 @@ void DwField::Parse()
     mFieldNameStr = parser.mName;
     mFieldBodyStr = parser.mBody;
     mFieldBody = CreateFieldBody(mFieldNameStr, mFieldBodyStr, this);
-    assert(mFieldBody != 0);
+    assert(mFieldBody);
     mFieldBody->Parse();
 }
 
@@ -314,7 +314,7 @@ DwFieldBody* DwField::CreateFieldBody(const DwString& aFieldName,
     const DwString& aFieldBody, DwMessageComponent* aParent)
 {
     DwFieldBody* fieldBody;
-    if (sCreateFieldBody != 0) {
+    if (sCreateFieldBody) {
         fieldBody = sCreateFieldBody(aFieldName, aFieldBody, aParent);
     }
     else {
diff --git a/mimelib/group.cpp b/mimelib/group.cpp
index 319e78449..4cc65183f 100644
--- a/mimelib/group.cpp
+++ b/mimelib/group.cpp
@@ -33,7 +33,7 @@
 const char* const DwGroup::sClassName = "DwGroup";
 
 
-DwGroup* (*DwGroup::sNewGroup)(const DwString&, DwMessageComponent*) = 0;
+DwGroup* (*DwGroup::sNewGroup)(const DwString&, DwMessageComponent*) = nullptr;
 
 
 DwGroup* DwGroup::NewGroup(const DwString& aStr, DwMessageComponent* aParent)
diff --git a/mimelib/headers.cpp b/mimelib/headers.cpp
index 7598ec7ea..9f528d128 100644
--- a/mimelib/headers.cpp
+++ b/mimelib/headers.cpp
@@ -100,7 +100,7 @@ void DwHeadersParser::NextField(DwString* aStr)
 const char* const DwHeaders::sClassName = "DwHeaders";
 
 
-DwHeaders* (*DwHeaders::sNewHeaders)(const DwString&, DwMessageComponent*) = 0;
+DwHeaders* (*DwHeaders::sNewHeaders)(const DwString&, DwMessageComponent*) = nullptr;
 
 
 DwHeaders* DwHeaders::NewHeaders(const DwString& aStr,
@@ -117,8 +117,8 @@ DwHeaders* DwHeaders::NewHeaders(const DwString& aStr,
 
 DwHeaders::DwHeaders()
 {
-    mFirstField = 0;
-    mLastField = 0;
+    mFirstField = nullptr;
+    mLastField = nullptr;
     mClassId = kCidHeaders;
     mClassName = sClassName;
 }
@@ -127,8 +127,8 @@ DwHeaders::DwHeaders()
 DwHeaders::DwHeaders(const DwHeaders& aHeader)
   : DwMessageComponent(aHeader)
 {
-    mFirstField = 0;
-    mLastField = 0;
+    mFirstField = nullptr;
+    mLastField = nullptr;
     if (aHeader.mFirstField) {
         CopyFields(aHeader.mFirstField);
     }
@@ -140,8 +140,8 @@ DwHeaders::DwHeaders(const DwHeaders& aHeader)
 DwHeaders::DwHeaders(const DwString& aStr, DwMessageComponent* aParent)
   : DwMessageComponent(aStr, aParent)
 {
-    mFirstField = 0;
-    mLastField = 0;
+    mFirstField = nullptr;
+    mLastField = nullptr;
     mClassId = kCidHeaders;
     mClassName = sClassName;
 }
@@ -216,7 +216,7 @@ DwFieldBody& DwHeaders::FieldBody(const DwString& aFieldName)
     // First, search for field
     DwField* field = FindField(aFieldName);
     // If the field is not found, create the field and its field body
-    if (field == 0) {
+    if (!field) {
         field = DwField::NewField("", this);
         field->SetFieldNameStr(aFieldName);
         DwFieldBody* fieldBody = DwField::CreateFieldBody(aFieldName,
@@ -227,7 +227,7 @@ DwFieldBody& DwHeaders::FieldBody(const DwString& aFieldName)
     // Get the field body
     DwFieldBody* fieldBody = field->FieldBody();
     // If it does not exist, create it
-    if (fieldBody == 0) {
+    if (!fieldBody) {
         fieldBody = DwField::CreateFieldBody(aFieldName, "", field);
         field->SetFieldBody(fieldBody);
         SetModified();
@@ -242,7 +242,7 @@ std::vector<DwFieldBody*> DwHeaders::AllFieldBodies(const DwString& aFieldName)
     // First, search for field
     DwField* field = FindField(aFieldName);
     // If the field is not found, create the field and its field body
-    if (field == 0) {
+    if (!field) {
         field = DwField::NewField("", this);
         field->SetFieldNameStr(aFieldName);
         DwFieldBody* fieldBody = DwField::CreateFieldBody(aFieldName,
@@ -256,7 +256,7 @@ std::vector<DwFieldBody*> DwHeaders::AllFieldBodies(const DwString& aFieldName)
             // Get the field body
             DwFieldBody* fieldBody = field->FieldBody();
             // If it does not exist, create it
-            if (fieldBody == 0) {
+            if (!fieldBody) {
                 fieldBody = DwField::CreateFieldBody(aFieldName, "", field);
                 field->SetFieldBody(fieldBody);
                 SetModified();
@@ -282,8 +282,8 @@ int DwHeaders::NumFields() const
 
 DwField* DwHeaders::FindField(const char* aFieldName) const
 {
-    assert(aFieldName != 0);
-    if (aFieldName == 0) return 0;
+    assert(aFieldName);
+    if (!aFieldName) return nullptr;
     DwField* field = mFirstField;
     while (field) {
         if (DwStrcasecmp(field->FieldNameStr(), aFieldName) == 0) {
@@ -310,11 +310,11 @@ DwField* DwHeaders::FindField(const DwString& aFieldName) const
 
 void DwHeaders::AddOrReplaceField(DwField* aField)
 {
-    assert(aField != 0);
-    if (aField == 0) return;
+    assert(aField);
+    if (!aField) return;
     SetModified();
     const DwString& fieldName = aField->FieldNameStr();
-    DwField* prevField = 0;
+    DwField* prevField = nullptr;
     DwField* field = mFirstField;
     while (field) {
         if (DwStrcasecmp(field->FieldNameStr(), fieldName) == 0) {
@@ -346,8 +346,8 @@ void DwHeaders::AddOrReplaceField(DwField* aField)
 
 void DwHeaders::AddField(DwField* aField)
 {
-    assert(aField != 0);
-    if (aField == 0) return;
+    assert(aField);
+    if (!aField) return;
     _AddField(aField);
     SetModified();
 }
@@ -355,12 +355,12 @@ void DwHeaders::AddField(DwField* aField)
 
 void DwHeaders::AddFieldAt(int aPos, DwField* aField)
 {
-    assert(aField != 0);
-    if (aField == 0) return;
+    assert(aField);
+    if (!aField) return;
     SetModified();
     // Special case: empty list
-    if (mFirstField == 0) {
-        aField->SetNext(0);
+    if (!mFirstField) {
+        aField->SetNext(nullptr);
         mFirstField = aField;
         mLastField = aField;
         return;
@@ -392,7 +392,7 @@ void DwHeaders::AddFieldAt(int aPos, DwField* aField)
 
 void DwHeaders::RemoveField(DwField* aField)
 {
-    DwField* prevField = 0;
+    DwField* prevField = nullptr;
     DwField* field = mFirstField;
     while (field) {
         if (field == aField) {
@@ -403,7 +403,7 @@ void DwHeaders::RemoveField(DwField* aField)
     }
     // If we found the field...
     if (field) {
-        if (prevField == 0) {
+        if (!prevField) {
             mFirstField = field->Next();
         }
         else {
@@ -412,7 +412,7 @@ void DwHeaders::RemoveField(DwField* aField)
         // Check whether we've removed the last field
         if ( field == mLastField )
             mLastField = prevField;
-        field->SetNext(0);
+        field->SetNext(nullptr);
         SetModified();
     }
 }
@@ -426,18 +426,18 @@ void DwHeaders::DeleteAllFields()
         delete field;
         field = nextField;
     }
-    mFirstField = 0;
-    mLastField = 0;
+    mFirstField = nullptr;
+    mLastField = nullptr;
 }
 
 
 void DwHeaders::_AddField(DwField* aField)
 {
-    if (aField == 0) return;
+    if (!aField) return;
     // Add field with setting is-modified flag for header
     aField->SetParent(this);
     // Special case: empty list
-    if (mFirstField == 0) {
+    if (!mFirstField) {
         mFirstField = aField;
         mLastField = aField;
         return;
diff --git a/mimelib/mailbox.cpp b/mimelib/mailbox.cpp
index b5dc7cc3f..b57ec9323 100644
--- a/mimelib/mailbox.cpp
+++ b/mimelib/mailbox.cpp
@@ -37,7 +37,7 @@ void RemoveCrAndLf(DwString& aStr);
 const char* const DwMailbox::sClassName = "DwMailbox";
 
 
-DwMailbox* (*DwMailbox::sNewMailbox)(const DwString&, DwMessageComponent*) = 0;
+DwMailbox* (*DwMailbox::sNewMailbox)(const DwString&, DwMessageComponent*) = nullptr;
 
 
 DwMailbox* DwMailbox::NewMailbox(const DwString& aStr,
diff --git a/mimelib/mboxlist.cpp b/mimelib/mboxlist.cpp
index 9dde322b3..3d4fd219a 100644
--- a/mimelib/mboxlist.cpp
+++ b/mimelib/mboxlist.cpp
@@ -38,7 +38,7 @@ const char* const DwMailboxList::sClassName = "DwMailboxList";
 
 
 DwMailboxList* (*DwMailboxList::sNewMailboxList)(const DwString&,
-    DwMessageComponent*) = 0;
+    DwMessageComponent*) = nullptr;
 
 
 DwMailboxList* DwMailboxList::NewMailboxList(const DwString& aStr,
@@ -55,7 +55,7 @@ DwMailboxList* DwMailboxList::NewMailboxList(const DwString& aStr,
 
 DwMailboxList::DwMailboxList()
 {
-    mFirstMailbox = 0;
+    mFirstMailbox = nullptr;
     mClassId = kCidMailboxList;
     mClassName = sClassName;
 }
@@ -64,7 +64,7 @@ DwMailboxList::DwMailboxList()
 DwMailboxList::DwMailboxList(const DwMailboxList& aList)
   : DwFieldBody(aList)
 {
-    mFirstMailbox = 0;
+    mFirstMailbox = nullptr;
     const DwMailbox* firstMailbox = aList.mFirstMailbox;
     if (firstMailbox) {
         CopyList(firstMailbox);
@@ -77,7 +77,7 @@ DwMailboxList::DwMailboxList(const DwMailboxList& aList)
 DwMailboxList::DwMailboxList(const DwString& aStr, DwMessageComponent* aParent)
   : DwFieldBody(aStr, aParent)
 {
-    mFirstMailbox = 0;
+    mFirstMailbox = nullptr;
     mClassId = kCidMailboxList;
     mClassName = sClassName;
 }
@@ -117,8 +117,8 @@ DwMailbox* DwMailboxList::FirstMailbox() const
 
 void DwMailboxList::Add(DwMailbox* aMailbox)
 {
-    assert(aMailbox != 0);
-    if (aMailbox == 0) return;
+    assert(aMailbox);
+    if (!aMailbox) return;
     _AddMailbox(aMailbox);
     SetModified();
 }
@@ -126,8 +126,8 @@ void DwMailboxList::Add(DwMailbox* aMailbox)
 
 void DwMailboxList::_AddMailbox(DwMailbox* aMailbox)
 {
-    assert(aMailbox != 0);
-    if (aMailbox == 0) return;
+    assert(aMailbox);
+    if (!aMailbox) return;
     if (!mFirstMailbox) {
         mFirstMailbox = aMailbox;
     }
@@ -174,7 +174,7 @@ void DwMailboxList::_DeleteAll()
         mb = (DwMailbox*) mb->Next();
         delete toDel;
     }
-    mFirstMailbox = 0;
+    mFirstMailbox = nullptr;
 }
 
 
diff --git a/mimelib/mechansm.cpp b/mimelib/mechansm.cpp
index bf9d37071..ccf23d303 100644
--- a/mimelib/mechansm.cpp
+++ b/mimelib/mechansm.cpp
@@ -34,7 +34,7 @@ const char* const DwMechanism::sClassName =
 
 
 DwMechanism* (*DwMechanism::sNewMechanism)(const DwString&,
-    DwMessageComponent*) = 0;
+    DwMessageComponent*) = nullptr;
 
 
 DwMechanism* DwMechanism::NewMechanism(const DwString& aStr,
diff --git a/mimelib/mediatyp.cpp b/mimelib/mediatyp.cpp
index 7c766fe3d..b70652bc5 100644
--- a/mimelib/mediatyp.cpp
+++ b/mimelib/mediatyp.cpp
@@ -41,7 +41,7 @@ const char* const DwMediaType::sClassName = "DwMediaType";
 
 
 DwMediaType* (*DwMediaType::sNewMediaType)(const DwString&,
-    DwMessageComponent*) = 0;
+    DwMessageComponent*) = nullptr;
 
 
 DwMediaType* DwMediaType::NewMediaType(const DwString& aStr,
@@ -60,7 +60,7 @@ DwMediaType::DwMediaType()
 {
     mType = DwMime::kTypeNull;
     mSubtype = DwMime::kSubtypeNull;
-    mFirstParameter = 0;
+    mFirstParameter = nullptr;
     mClassId = kCidMediaType;
     mClassName = sClassName;
 }
@@ -74,7 +74,7 @@ DwMediaType::DwMediaType(const DwMediaType& aCntType)
 {
     mType = aCntType.mType;
     mSubtype = aCntType.mSubtype;
-    mFirstParameter = 0;
+    mFirstParameter = nullptr;
 
     if (aCntType.mFirstParameter) {
         CopyParameterList(aCntType.mFirstParameter);
@@ -90,7 +90,7 @@ DwMediaType::DwMediaType(const DwString& aStr, DwMessageComponent* aParent)
 {
     mType = DwMime::kTypeNull;
     mSubtype = DwMime::kSubtypeNull;
-    mFirstParameter = 0;
+    mFirstParameter = nullptr;
     mClassId = kCidMediaType;
     mClassName = sClassName;
 }
@@ -221,7 +221,7 @@ void DwMediaType::SetBoundary(const DwString& aStr)
         param = param->Next();
     }
     // Boundary parameter not found. Add it.
-    param = DwParameter::NewParameter("", 0);
+    param = DwParameter::NewParameter("", nullptr);
     param->SetAttribute("boundary");
     param->SetValue(aStr);
     AddParameter(param);
@@ -242,7 +242,7 @@ void DwMediaType::CreateBoundary(unsigned aLevel)
     buf[pos++] = (n % 10) + '0';
     buf[pos++] = '=';
     buf[pos++] = '_';
-    DwUint32 r = (DwUint32) time(0);
+    DwUint32 r = (DwUint32) time(nullptr);
     buf[pos++] = c[r % cLen];
     r /= cLen;
     buf[pos++] = c[r % cLen];
@@ -304,7 +304,7 @@ void DwMediaType::SetName(const DwString& aStr)
         param = param->Next();
     }
     // Name parameter not found. Add it.
-    param = DwParameter::NewParameter("", 0);
+    param = DwParameter::NewParameter("", nullptr);
     param->SetAttribute("name");
     param->SetValue(aStr);
     AddParameter(param);
@@ -509,7 +509,7 @@ void DwMediaType::DeleteParameterList()
         delete param;
         param = nextParam;
     }
-    mFirstParameter = 0;
+    mFirstParameter = nullptr;
     SetModified();
 }
 
diff --git a/mimelib/message.cpp b/mimelib/message.cpp
index 608e4fa5a..84784ead8 100644
--- a/mimelib/message.cpp
+++ b/mimelib/message.cpp
@@ -34,7 +34,7 @@ const char* const DwMessage::sClassName = "DwMessage";
 
 
 DwMessage* (*DwMessage::sNewMessage)(const DwString&,
-    DwMessageComponent*) = 0;
+    DwMessageComponent*) = nullptr;
 
 
 DwMessage* DwMessage::NewMessage(const DwString& aStr,
diff --git a/mimelib/mimelib/address.h b/mimelib/mimelib/address.h
index 7ed56ba8c..749dcaae6 100644
--- a/mimelib/mimelib/address.h
+++ b/mimelib/mimelib/address.h
@@ -93,7 +93,7 @@ protected:
 
     DwAddress();
     DwAddress(const DwAddress& aAddr);
-    DwAddress(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwAddress(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which sets the
     //. {\tt DwAddress} object's string representation to the empty string
     //. and sets its parent to {\tt NULL}.
diff --git a/mimelib/mimelib/addrlist.h b/mimelib/mimelib/addrlist.h
index 5d26736a7..fdd0f53ea 100644
--- a/mimelib/mimelib/addrlist.h
+++ b/mimelib/mimelib/addrlist.h
@@ -48,7 +48,7 @@ public:
 
     DwAddressList();
     DwAddressList(const DwAddressList& aList);
-    DwAddressList(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwAddressList(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which sets the
     //. {\tt DwAddressList} object's string representation to the empty string
     //. and sets its parent to {\tt NULL}.
diff --git a/mimelib/mimelib/body.h b/mimelib/mimelib/body.h
index 2133a724e..61d43f40d 100644
--- a/mimelib/mimelib/body.h
+++ b/mimelib/mimelib/body.h
@@ -93,7 +93,7 @@ public:
 
     DwBody();
     DwBody(const DwBody& aBody);
-    DwBody(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwBody(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which sets the
     //. {\tt DwBody} object's string representation to the empty string
     //. and sets its parent to {\tt NULL}.
diff --git a/mimelib/mimelib/bodypart.h b/mimelib/mimelib/bodypart.h
index 9ed7f672e..b7411202f 100644
--- a/mimelib/mimelib/bodypart.h
+++ b/mimelib/mimelib/bodypart.h
@@ -66,7 +66,7 @@ public:
     DwBodyPart();
     DwBodyPart(const DwBodyPart& aPart);
     DwBodyPart(const DwEntity& aPart);
-    DwBodyPart(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwBodyPart(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which sets the
     //. {\tt DwBodyPart} object's string representation to the empty string
     //. and sets its parent to {\tt NULL}.
diff --git a/mimelib/mimelib/datetime.h b/mimelib/mimelib/datetime.h
index d23eba0b9..ae8c6650c 100644
--- a/mimelib/mimelib/datetime.h
+++ b/mimelib/mimelib/datetime.h
@@ -53,7 +53,7 @@ public:
 
     DwDateTime();
     DwDateTime(const DwDateTime& aDateTime);
-    DwDateTime(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwDateTime(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which assigns
     //. the current date and time as reported by the operating system.
     //.
diff --git a/mimelib/mimelib/disptype.h b/mimelib/mimelib/disptype.h
index 59c740cbe..5d323ff96 100644
--- a/mimelib/mimelib/disptype.h
+++ b/mimelib/mimelib/disptype.h
@@ -70,7 +70,7 @@ public:
 
     DwDispositionType();
     DwDispositionType(const DwDispositionType& aDispType);
-    DwDispositionType(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwDispositionType(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which sets the
     //. {\tt DwDispositionType} object's string representation to the empty
     //. string and sets its parent to {\tt NULL}.
diff --git a/mimelib/mimelib/entity.h b/mimelib/mimelib/entity.h
index e809c2820..ee4de57a8 100644
--- a/mimelib/mimelib/entity.h
+++ b/mimelib/mimelib/entity.h
@@ -72,7 +72,7 @@ public:
 
     DwEntity();
     DwEntity(const DwEntity& aEntity);
-    DwEntity(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwEntity(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which sets the
     //. {\tt DwEntity} object's string representation to the empty string
     //. and sets its parent to {\tt NULL}.
@@ -130,7 +130,7 @@ public:
     //.
     //. This function clears the is-modified flag.
 
-    bool hasHeaders() const { return 0 != mHeaders; }
+    bool hasHeaders() const { return mHeaders; }
 
     DwHeaders& Headers() const;
     //. This function returns the {\tt DwHeaders} object contained by
diff --git a/mimelib/mimelib/field.h b/mimelib/mimelib/field.h
index 9ada823cb..84d440f3a 100644
--- a/mimelib/mimelib/field.h
+++ b/mimelib/mimelib/field.h
@@ -79,7 +79,7 @@ public:
 
     DwField();
     DwField(const DwField& aField);
-    DwField(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwField(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which sets the
     //. {\tt DwField} object's field name and field body to the empty
     //. string, set its parent to {\tt NULL}, and sets its {\tt DwFieldBody}
diff --git a/mimelib/mimelib/fieldbdy.h b/mimelib/mimelib/fieldbdy.h
index e5f3243a7..4742de6de 100644
--- a/mimelib/mimelib/fieldbdy.h
+++ b/mimelib/mimelib/fieldbdy.h
@@ -75,7 +75,7 @@ public:
 
     DwFieldBody();
     DwFieldBody(const DwFieldBody& aFieldBody);
-    DwFieldBody(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwFieldBody(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which sets the
     //. {\tt DwFieldBody} object's string representation to the empty
     //. string and sets its parent to {\tt NULL}.
diff --git a/mimelib/mimelib/group.h b/mimelib/mimelib/group.h
index 21cf930b8..b77a30c4c 100644
--- a/mimelib/mimelib/group.h
+++ b/mimelib/mimelib/group.h
@@ -71,7 +71,7 @@ public:
 
     DwGroup();
     DwGroup(const DwGroup& aGroup);
-    DwGroup(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwGroup(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which sets the
     //. {\tt DwGroup} object's string representation to the empty string
     //. and sets its parent to {\tt NULL}.
diff --git a/mimelib/mimelib/headers.h b/mimelib/mimelib/headers.h
index f545a3db2..c8ed1556f 100644
--- a/mimelib/mimelib/headers.h
+++ b/mimelib/mimelib/headers.h
@@ -135,7 +135,7 @@ public:
 
     DwHeaders();
     DwHeaders(const DwHeaders& aHeaders);
-    DwHeaders(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwHeaders(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which sets the
     //. {\tt DwHeaders} object's string representation to the empty string
     //. and sets its parent to {\tt NULL}.
diff --git a/mimelib/mimelib/mailbox.h b/mimelib/mimelib/mailbox.h
index 7e38ae4b4..41d339539 100644
--- a/mimelib/mimelib/mailbox.h
+++ b/mimelib/mimelib/mailbox.h
@@ -82,7 +82,7 @@ public:
 
     DwMailbox();
     DwMailbox(const DwMailbox& aMailbox);
-    DwMailbox(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwMailbox(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which sets the
     //. {\tt DwMailbox} object's string representation to the empty string
     //. and sets its parent to {\tt NULL}.
diff --git a/mimelib/mimelib/mboxlist.h b/mimelib/mimelib/mboxlist.h
index 723a8c55d..74a9a3fd7 100644
--- a/mimelib/mimelib/mboxlist.h
+++ b/mimelib/mimelib/mboxlist.h
@@ -57,7 +57,7 @@ public:
 
     DwMailboxList();
     DwMailboxList(const DwMailboxList& aList);
-    DwMailboxList(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwMailboxList(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which sets the
     //. {\tt DwMailboxList} object's string representation to the empty string
     //. and sets its parent to {\tt NULL}.
diff --git a/mimelib/mimelib/mechansm.h b/mimelib/mimelib/mechansm.h
index 05a80fe95..cd46de63d 100644
--- a/mimelib/mimelib/mechansm.h
+++ b/mimelib/mimelib/mechansm.h
@@ -55,7 +55,7 @@ public:
 
     DwMechanism();
     DwMechanism(const DwMechanism& aCte);
-    DwMechanism(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwMechanism(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which sets the
     //. {\tt DwMechanism} object's string representation to the empty
     //. string and sets its parent to {\tt NULL}.
diff --git a/mimelib/mimelib/mediatyp.h b/mimelib/mimelib/mediatyp.h
index f57b9aa3d..79974df82 100644
--- a/mimelib/mimelib/mediatyp.h
+++ b/mimelib/mimelib/mediatyp.h
@@ -76,7 +76,7 @@ public:
 
     DwMediaType();
     DwMediaType(const DwMediaType& aMediaType);
-    DwMediaType(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwMediaType(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which sets the
     //. {\tt DwMediaType} object's string representation to the empty string
     //. and sets its parent to {\tt NULL}.
diff --git a/mimelib/mimelib/message.h b/mimelib/mimelib/message.h
index 5dbd7cc46..2702bf57a 100644
--- a/mimelib/mimelib/message.h
+++ b/mimelib/mimelib/message.h
@@ -63,7 +63,7 @@ public:
 
     DwMessage();
     DwMessage(const DwMessage& aMessage);
-    DwMessage(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwMessage(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which sets the
     //. {\tt DwMessage} object's string representation to the empty string
     //. and sets its parent to {\tt NULL}.
diff --git a/mimelib/mimelib/msgcmp.h b/mimelib/mimelib/msgcmp.h
index 5e5409f9d..3e88b8e4e 100644
--- a/mimelib/mimelib/msgcmp.h
+++ b/mimelib/mimelib/msgcmp.h
@@ -160,7 +160,7 @@ public:
 
     DwMessageComponent();
     DwMessageComponent(const DwMessageComponent& aCmp);
-    DwMessageComponent(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwMessageComponent(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which sets the
     //. {\tt DwMessageComponent} object's string representation to the
     //. empty string and sets its parent to NULL.
diff --git a/mimelib/mimelib/msgid.h b/mimelib/mimelib/msgid.h
index de066cdbc..a6e3f04d6 100644
--- a/mimelib/mimelib/msgid.h
+++ b/mimelib/mimelib/msgid.h
@@ -58,7 +58,7 @@ public:
 
     DwMsgId();
     DwMsgId(const DwMsgId& aMsgId);
-    DwMsgId(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwMsgId(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which sets the
     //. {\tt DwMsgId} object's string representation to the empty string
     //. and sets its parent to NULL.
diff --git a/mimelib/mimelib/nntp.h b/mimelib/mimelib/nntp.h
index bd617903b..c9010d0fc 100644
--- a/mimelib/mimelib/nntp.h
+++ b/mimelib/mimelib/nntp.h
@@ -294,7 +294,7 @@ public:
     //. the server.  If no response is received, the function returns zero.
 
     int Newgroups(const char* aDate, const char* aTime,
-        DwBool aIsGmt=DwFalse, const char* aDistributions=0);
+        DwBool aIsGmt=DwFalse, const char* aDistributions=nullptr);
     //. Sends the NNTP NEWGROUPS command and returns the reply code received
     //. from the server.  If no response is received, the function returns
     //. zero.
@@ -306,7 +306,7 @@ public:
     //. specifies the optional list of distribution groups.
 
     int Newnews(const char* aNewsgroups, const char* aDate,
-        const char* aTime, DwBool aIsGmt=DwFalse, const char* aDistribution=0);
+        const char* aTime, DwBool aIsGmt=DwFalse, const char* aDistribution=nullptr);
     //. Sends the NNTP NEWNEWS command and returns the reply code received
     //. from the server.  If no response is received, the function returns
     //. zero.
diff --git a/mimelib/mimelib/param.h b/mimelib/mimelib/param.h
index 94458a7a2..653bb08b9 100644
--- a/mimelib/mimelib/param.h
+++ b/mimelib/mimelib/param.h
@@ -59,7 +59,7 @@ public:
 
     DwParameter();
     DwParameter(const DwParameter& aParam);
-    DwParameter(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwParameter(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which sets the
     //. {\tt DwParameter} object's string representation to the empty string
     //. and sets its parent to NULL.
diff --git a/mimelib/mimelib/text.h b/mimelib/mimelib/text.h
index 89b908ad0..0e8883f23 100644
--- a/mimelib/mimelib/text.h
+++ b/mimelib/mimelib/text.h
@@ -52,7 +52,7 @@ public:
 
     DwText();
     DwText(const DwText& aText);
-    DwText(const DwString& aStr, DwMessageComponent* aParent=0);
+    DwText(const DwString& aStr, DwMessageComponent* aParent=nullptr);
     //. The first constructor is the default constructor, which sets the
     //. {\tt DwText} object's string representation to the empty string
     //. and sets its parent to NULL.
diff --git a/mimelib/msgcmp.cpp b/mimelib/msgcmp.cpp
index 4b154dc3d..d4e014b69 100644
--- a/mimelib/msgcmp.cpp
+++ b/mimelib/msgcmp.cpp
@@ -37,7 +37,7 @@ DwMessageComponent::DwMessageComponent()
 {
     mMagicNumber = (DwUint32) kMagicNumber;
     mIsModified = 0;
-    mParent = 0;
+    mParent = nullptr;
     mClassId = kCidMessageComponent;
     mClassName = sClassName;
     mId = DwString();
@@ -49,7 +49,7 @@ DwMessageComponent::DwMessageComponent(const DwMessageComponent& aCmp)
 {
     mMagicNumber = (DwUint32) kMagicNumber;
     mIsModified = aCmp.mIsModified;
-    mParent = 0;
+    mParent = nullptr;
     mClassId = kCidMessageComponent;
     mClassName = sClassName;
     mId = aCmp.mId;
@@ -98,7 +98,7 @@ void DwMessageComponent::FromString(const DwString& aStr)
 {
     mString = aStr;
     mIsModified = DwFalse;
-    if (mParent != 0) {
+    if (mParent) {
         mParent->SetModified();
     }
 }
@@ -106,9 +106,9 @@ void DwMessageComponent::FromString(const DwString& aStr)
 
 void DwMessageComponent::FromString(const char* aCstr)
 {
-    assert(aCstr != 0);
+    assert(aCstr);
     mString = aCstr;
-    if (mParent != 0) {
+    if (mParent) {
         mParent->SetModified();
     }
 }
@@ -141,7 +141,7 @@ DwBool DwMessageComponent::IsModified() const
 void DwMessageComponent::SetModified()
 {
     mIsModified = 1;
-    if (mParent != 0) {
+    if (mParent) {
       mParent->SetModified();
     }
 }
diff --git a/mimelib/msgid.cpp b/mimelib/msgid.cpp
index 6aef020f9..6bd2855aa 100644
--- a/mimelib/msgid.cpp
+++ b/mimelib/msgid.cpp
@@ -57,10 +57,10 @@ static DwUint32 GetPid();
 
 
 const char* const DwMsgId::sClassName = "DwMsgId";
-const char* DwMsgId::sHostName = 0;
+const char* DwMsgId::sHostName = nullptr;
 
 
-DwMsgId* (*DwMsgId::sNewMsgId)(const DwString&, DwMessageComponent*) = 0;
+DwMsgId* (*DwMsgId::sNewMsgId)(const DwString&, DwMessageComponent*) = nullptr;
 
 
 DwMsgId* DwMsgId::NewMsgId(const DwString& aStr, DwMessageComponent* aParent)
diff --git a/mimelib/nntp.cpp b/mimelib/nntp.cpp
index 32fbc86fe..01f4399c1 100644
--- a/mimelib/nntp.cpp
+++ b/mimelib/nntp.cpp
@@ -49,7 +49,7 @@ DwNntpClient::DwNntpClient()
     mNumRecvBufferChars = 0;
     mRecvBufferPos = 0;
     mReplyCode = 0;
-    mObserver = 0;
+    mObserver = nullptr;
 }
 
 
@@ -57,11 +57,11 @@ DwNntpClient::~DwNntpClient()
 {
     if (mRecvBuffer) {
         delete [] mRecvBuffer;
-        mRecvBuffer = 0;
+        mRecvBuffer = nullptr;
     }
     if (mSendBuffer) {
         delete [] mSendBuffer;
-        mSendBuffer = 0;
+        mSendBuffer = nullptr;
     }
 }
 
@@ -507,7 +507,7 @@ int DwNntpClient::SendData(const char* aBuf, int aBufLen)
 
     int pos = 0;
     int len = 0;
-    const char* buf = 0;
+    const char* buf = nullptr;
 
     int lastLastChar = '\r';
     int lastChar = '\n';
diff --git a/mimelib/param.cpp b/mimelib/param.cpp
index f928be558..e0b26bcda 100644
--- a/mimelib/param.cpp
+++ b/mimelib/param.cpp
@@ -36,7 +36,7 @@ const char* const DwParameter::sClassName = "DwParameter";
 
 
 DwParameter* (*DwParameter::sNewParameter)(const DwString&,
-    DwMessageComponent*) = 0;
+    DwMessageComponent*) = nullptr;
 
 
 DwParameter* DwParameter::NewParameter(const DwString& aStr,
@@ -53,7 +53,7 @@ DwParameter* DwParameter::NewParameter(const DwString& aStr,
 
 DwParameter::DwParameter()
 {
-    mNext = 0;
+    mNext = nullptr;
     mClassId = kCidParameter;
     mClassName = sClassName;
 }
@@ -65,7 +65,7 @@ DwParameter::DwParameter(const DwParameter& aParam)
     mValue(aParam.mValue),
     mForceNoQuotes(aParam.mForceNoQuotes)
 {
-    mNext = 0;
+    mNext = nullptr;
     mClassId = kCidParameter;
     mClassName = sClassName;
 }
@@ -74,7 +74,7 @@ DwParameter::DwParameter(const DwParameter& aParam)
 DwParameter::DwParameter(const DwString& aStr, DwMessageComponent* aParent)
     : DwMessageComponent(aStr, aParent)
 {
-    mNext = 0;
+    mNext = nullptr;
     mClassId = kCidParameter;
     mClassName = sClassName;
     mForceNoQuotes = false;
@@ -93,7 +93,7 @@ const DwParameter& DwParameter::operator = (const DwParameter& aParam)
     mAttribute = aParam.mAttribute;
     mValue     = aParam.mValue;
     mForceNoQuotes = aParam.mForceNoQuotes;
-    mNext      = 0;
+    mNext      = nullptr;
     return *this;
 }
 
diff --git a/mimelib/pop.cpp b/mimelib/pop.cpp
index 78bb64753..bba1268f8 100644
--- a/mimelib/pop.cpp
+++ b/mimelib/pop.cpp
@@ -47,7 +47,7 @@ DwPopClient::DwPopClient()
     mNumRecvBufferChars = 0;
     mRecvBufferPos = 0;
     mStatusCode = 0;
-    mObserver = 0;
+    mObserver = nullptr;
 }
 
 
@@ -55,11 +55,11 @@ DwPopClient::~DwPopClient()
 {
     if (mRecvBuffer) {
         delete [] mRecvBuffer;
-        mRecvBuffer = 0;
+        mRecvBuffer = nullptr;
     }
     if (mSendBuffer) {
         delete [] mSendBuffer;
-        mSendBuffer = 0;
+        mSendBuffer = nullptr;
     }
 }
 
diff --git a/mimelib/protocol.cpp b/mimelib/protocol.cpp
index 3211be660..3939845ad 100644
--- a/mimelib/protocol.cpp
+++ b/mimelib/protocol.cpp
@@ -67,7 +67,7 @@ DwProtocolClient::DwProtocolClient()
     mIsOpen         = DwFalse;
     mSocket         = -1;
     mPort           = 0;
-    mServerName     = 0;
+    mServerName     = nullptr;
     mReceiveTimeout = 90;
     mLastCommand    = 0;
     mFailureCode    = kFailNoFailure;
@@ -84,7 +84,7 @@ DwProtocolClient::~DwProtocolClient()
     }
     if (mServerName) {
         delete [] mServerName;
-        mServerName = 0;
+        mServerName = nullptr;
     }
 }
 
@@ -102,7 +102,7 @@ int DwProtocolClient::Open(const char* aServer, DwUint16 aPort)
         mErrorStr = get_error_text(mErrorCode);
         return -1;
     }
-    if (aServer == 0 || aServer[0] == 0) {
+    if (!aServer || aServer[0] == 0) {
         // error!
         mErrorCode = kErrBadParameter;
         mErrorStr = get_error_text(mErrorCode);
@@ -110,7 +110,7 @@ int DwProtocolClient::Open(const char* aServer, DwUint16 aPort)
     }
     if (mServerName) {
         delete [] mServerName;
-        mServerName = 0;
+        mServerName = nullptr;
     }
     mServerName = new char[strlen(aServer)+1];
     strcpy(mServerName, aServer);
@@ -309,7 +309,7 @@ int DwProtocolClient::PReceive(char* aBuf, int aBufSize)
     struct timeval timeout;
     timeout.tv_sec = mReceiveTimeout;
     timeout.tv_usec = 0;
-    int numFds = select(mSocket+1, &readfds, 0, 0, &timeout);
+    int numFds = select(mSocket+1, &readfds, nullptr, nullptr, &timeout);
     int numReceived = 0;
 
     // If an error occurred, deal with it
diff --git a/mimelib/text.cpp b/mimelib/text.cpp
index 81fe1a718..b89cecb78 100644
--- a/mimelib/text.cpp
+++ b/mimelib/text.cpp
@@ -31,7 +31,7 @@
 const char* const DwText::sClassName = "DwText";
 
 
-DwText* (*DwText::sNewText)(const DwString&, DwMessageComponent*) = 0;
+DwText* (*DwText::sNewText)(const DwString&, DwMessageComponent*) = nullptr;
 
 
 DwText* DwText::NewText(const DwString& aStr, DwMessageComponent* aParent)
diff --git a/mimelib/token.cpp b/mimelib/token.cpp
index 654d764f7..4d0f12d38 100644
--- a/mimelib/token.cpp
+++ b/mimelib/token.cpp
@@ -30,7 +30,7 @@
 #include <mimelib/token.h>
 
 
-std::ostream* DwTokenizer::mDebugOut = 0;
+std::ostream* DwTokenizer::mDebugOut = nullptr;
 
 
 DwTokenizer::DwTokenizer(const DwString& aStr)
@@ -222,7 +222,7 @@ void DwTokenizer::ParseDomainLiteral()
 void DwTokenizer::PrintToken(std::ostream* aOut)
 {
     if (!aOut) return;
-    const char* type = 0;
+    const char* type = nullptr;
     switch (mTkType) {
     case eTkError:
         type = "error          ";
-- 
cgit v1.2.3

