From dcab5dd358535014d481f91ab7820bea78c52bf7 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sun, 8 Nov 2026 08:05:40 -0300
Subject: Replace zero pointer constants in crypto protocols
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>
---
 certmanager/aboutdata.cpp                          |  18 ++--
 certmanager/certificateinfowidgetimpl.cpp          |   4 +-
 certmanager/certificateinfowidgetimpl.h            |   2 +-
 certmanager/certificatewizardimpl.cpp              |   2 +-
 certmanager/certificatewizardimpl.h                |   2 +-
 certmanager/certlistview.h                         |   4 +-
 certmanager/certmanager.cpp                        |  46 ++++-----
 certmanager/certmanager.h                          |   2 +-
 certmanager/conf/appearanceconfigpage.h            |   2 +-
 certmanager/conf/appearanceconfigwidget.cpp        |   2 +-
 certmanager/conf/appearanceconfigwidget.h          |   2 +-
 certmanager/conf/configuredialog.h                 |   2 +-
 certmanager/conf/dirservconfigpage.cpp             |   4 +-
 certmanager/conf/dirservconfigpage.h               |   2 +-
 certmanager/conf/dnorderconfigpage.h               |   2 +-
 certmanager/crlview.cpp                            |   8 +-
 certmanager/crlview.h                              |   2 +-
 certmanager/customactions.cpp                      |   8 +-
 certmanager/hierarchyanalyser.h                    |   4 +-
 certmanager/kwatchgnupg/aboutdata.cpp              |   2 +-
 certmanager/kwatchgnupg/kwatchgnupgconfig.h        |   2 +-
 certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp     |   4 +-
 certmanager/kwatchgnupg/kwatchgnupgmainwin.h       |   2 +-
 certmanager/kwatchgnupg/main.cpp                   |   4 +-
 .../lib/backends/chiasmus/chiasmusbackend.cpp      |  60 +++++------
 .../lib/backends/chiasmus/chiasmusbackend.h        |  12 +--
 certmanager/lib/backends/chiasmus/chiasmusjob.cpp  |  12 +--
 .../lib/backends/chiasmus/chiasmuslibrary.cpp      |   8 +-
 .../lib/backends/chiasmus/chiasmuslibrary.h        |   2 +-
 .../lib/backends/chiasmus/obtainkeysjob.cpp        |   2 +-
 .../lib/backends/chiasmus/symcryptrunprocessbase.h |   2 +-
 certmanager/lib/backends/kpgp/kpgpbackendbase.cpp  |   2 +-
 .../lib/backends/qgpgme/gnupgprocessbase.cpp       |   6 +-
 certmanager/lib/backends/qgpgme/gnupgprocessbase.h |   2 +-
 certmanager/lib/backends/qgpgme/qgpgmebackend.cpp  |  16 +--
 certmanager/lib/backends/qgpgme/qgpgmebackend.h    |   4 +-
 .../lib/backends/qgpgme/qgpgmecryptoconfig.cpp     |   8 +-
 certmanager/lib/backends/qgpgme/qgpgmejob.cpp      |  52 +++++-----
 .../lib/backends/qgpgme/qgpgmekeygenerationjob.cpp |   8 +-
 .../lib/backends/qgpgme/qgpgmekeylistjob.cpp       |   8 +-
 .../backends/qgpgme/qgpgmeprogresstokenmapper.cpp  |   4 +-
 .../lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp   |   4 +-
 .../backends/qgpgme/qgpgmesecretkeyexportjob.cpp   |   4 +-
 .../lib/backends/qgpgme/qgpgmesignencryptjob.cpp   |   2 +-
 certmanager/lib/backends/qgpgme/qgpgmesignjob.cpp  |   2 +-
 certmanager/lib/cryptplug.cpp                      |  44 ++++----
 certmanager/lib/cryptplug.h                        |  32 +++---
 certmanager/lib/cryptplugfactory.cpp               |  12 +--
 certmanager/lib/cryptplugwrapper.cpp               |  80 +++++++--------
 certmanager/lib/cryptplugwrapper.h                 |   2 +-
 certmanager/lib/cryptplugwrapperlist.cpp           |   2 +-
 certmanager/lib/kleo/cryptobackend.h               |   6 +-
 certmanager/lib/kleo/cryptobackendfactory.cpp      |  32 +++---
 certmanager/lib/kleo/cryptobackendfactory.h        |   4 +-
 certmanager/lib/kleo/cryptoconfig.h                |   4 +-
 certmanager/lib/kleo/dn.cpp                        |   8 +-
 certmanager/lib/kleo/dn.h                          |   2 +-
 certmanager/lib/kleo/enum.cpp                      |  10 +-
 certmanager/lib/kleo/hierarchicalkeylistjob.cpp    |   6 +-
 certmanager/lib/kleo/job.h                         |   2 +-
 certmanager/lib/kleo/keyfiltermanager.cpp          |  10 +-
 certmanager/lib/kleo/keyfiltermanager.h            |   2 +-
 certmanager/lib/kleo/multideletejob.cpp            |   6 +-
 certmanager/lib/ui/adddirectoryservicedialogimpl.h |   2 +-
 certmanager/lib/ui/backendconfigwidget.cpp         |  18 ++--
 certmanager/lib/ui/backendconfigwidget.h           |   2 +-
 certmanager/lib/ui/cryptoconfigdialog.h            |   2 +-
 certmanager/lib/ui/cryptoconfigmodule.cpp          |  12 +--
 certmanager/lib/ui/cryptoconfigmodule.h            |   2 +-
 certmanager/lib/ui/cryptoconfigmodule_p.h          |  22 ++--
 certmanager/lib/ui/directoryserviceswidget.h       |   2 +-
 .../lib/ui/dnattributeorderconfigwidget.cpp        |   6 +-
 certmanager/lib/ui/dnattributeorderconfigwidget.h  |   2 +-
 certmanager/lib/ui/kdhorizontalline.cpp            |   2 +-
 certmanager/lib/ui/kdhorizontalline.h              |   4 +-
 certmanager/lib/ui/keyapprovaldialog.cpp           |   6 +-
 certmanager/lib/ui/keyapprovaldialog.h             |   2 +-
 certmanager/lib/ui/keylistview.cpp                 |  32 +++---
 certmanager/lib/ui/keylistview.h                   |  16 +--
 certmanager/lib/ui/keyrequester.cpp                |  16 +--
 certmanager/lib/ui/keyrequester.h                  |  12 +--
 certmanager/lib/ui/keyselectiondialog.cpp          |  28 +++---
 certmanager/lib/ui/keyselectiondialog.h            |   8 +-
 certmanager/lib/ui/messagebox.cpp                  |   6 +-
 certmanager/lib/ui/passphrasedialog.cpp            |   4 +-
 certmanager/lib/ui/passphrasedialog.h              |   2 +-
 certmanager/lib/ui/progressbar.h                   |   2 +-
 certmanager/lib/ui/progressdialog.h                |   2 +-
 certmanager/main.cpp                               |   8 +-
 libkpgp/kpgp.cpp                                   |  92 ++++++++---------
 libkpgp/kpgp.h                                     |   2 +-
 libkpgp/kpgpbase.cpp                               |   8 +-
 libkpgp/kpgpbase.h                                 |  34 +++----
 libkpgp/kpgpbase2.cpp                              |  42 ++++----
 libkpgp/kpgpbase5.cpp                              |  40 ++++----
 libkpgp/kpgpbase6.cpp                              |  40 ++++----
 libkpgp/kpgpbaseG.cpp                              |  32 +++---
 libkpgp/kpgpblock.cpp                              |   8 +-
 libkpgp/kpgpkey.cpp                                |   8 +-
 libkpgp/kpgpui.cpp                                 |  72 ++++++-------
 libkpgp/kpgpui.h                                   |  24 ++---
 libkpimexchange/core/exchangeaccount.cpp           |   8 +-
 libkpimexchange/core/exchangeclient.cpp            |   2 +-
 libkpimexchange/core/exchangedelete.cpp            |   4 +-
 libkpimexchange/core/exchangedelete.h              |   2 +-
 libkpimexchange/core/exchangedownload.cpp          |  18 ++--
 libkpimexchange/core/exchangedownload.h            |   2 +-
 libkpimexchange/core/exchangemonitor.cpp           |  10 +-
 libkpimexchange/core/exchangeprogress.h            |   2 +-
 libkpimexchange/core/exchangeupload.cpp            |   6 +-
 libkpimexchange/core/exchangeupload.h              |   2 +-
 libksieve/impl/lexer.h                             |   2 +-
 libksieve/parser/lexer.cpp                         |   4 +-
 libksieve/parser/parser.cpp                        |   6 +-
 libksieve/tests/lexertest.cpp                      |   2 +-
 libtdenetwork/gpgmepp/callbacks.cpp                |   2 +-
 libtdenetwork/gpgmepp/context.cpp                  |  92 ++++++++---------
 libtdenetwork/gpgmepp/context.h                    |   2 +-
 libtdenetwork/gpgmepp/context_p.h                  |   6 +-
 libtdenetwork/gpgmepp/data.cpp                     |  32 +++---
 libtdenetwork/gpgmepp/data_p.h                     |   2 +-
 libtdenetwork/gpgmepp/decryptionresult.cpp         |   6 +-
 libtdenetwork/gpgmepp/decryptionresult.h           |   2 +-
 libtdenetwork/gpgmepp/encryptionresult.cpp         |  10 +-
 libtdenetwork/gpgmepp/encryptionresult.h           |   2 +-
 libtdenetwork/gpgmepp/engineinfo.cpp               |  14 +--
 libtdenetwork/gpgmepp/eventloopinteractor.cpp      |  12 +--
 libtdenetwork/gpgmepp/importresult.cpp             |  12 +--
 libtdenetwork/gpgmepp/importresult.h               |   2 +-
 libtdenetwork/gpgmepp/key.cpp                      | 112 ++++++++++-----------
 libtdenetwork/gpgmepp/key.h                        |  10 +-
 libtdenetwork/gpgmepp/keygenerationresult.cpp      |   6 +-
 libtdenetwork/gpgmepp/keygenerationresult.h        |   2 +-
 libtdenetwork/gpgmepp/keylistresult.cpp            |   4 +-
 libtdenetwork/gpgmepp/keylistresult.h              |   2 +-
 libtdenetwork/gpgmepp/result_p.h                   |   4 +-
 libtdenetwork/gpgmepp/signingresult.cpp            |  18 ++--
 libtdenetwork/gpgmepp/signingresult.h              |   2 +-
 libtdenetwork/gpgmepp/verificationresult.cpp       |  24 ++---
 libtdenetwork/gpgmepp/verificationresult.h         |   2 +-
 libtdenetwork/qgpgme/eventloopinteractor.cpp       |   6 +-
 libtdenetwork/qgpgme/eventloopinteractor.h         |   2 +-
 tdeioslave/imap4/imap4.cpp                         |   8 +-
 tdeioslave/imap4/imaplist.cpp                      |   2 +-
 tdeioslave/imap4/imapparser.cpp                    |  42 ++++----
 tdeioslave/imap4/imapparser.h                      |   8 +-
 tdeioslave/imap4/mimeheader.cpp                    |   4 +-
 tdeioslave/mbox/readmbox.cpp                       |  12 +--
 tdeioslave/sieve/sieve.cpp                         |   4 +-
 tdeioslave/sieve/sieve.h                           |   2 +-
 150 files changed, 890 insertions(+), 890 deletions(-)

diff --git a/certmanager/aboutdata.cpp b/certmanager/aboutdata.cpp
index 80501daeb..589351b8e 100644
--- a/certmanager/aboutdata.cpp
+++ b/certmanager/aboutdata.cpp
@@ -49,29 +49,29 @@ struct about_data {
 };
 
 static const about_data authors[] = {
-  { "Marc Mutz", I18N_NOOP("Current Maintainer"), "mutz@kde.org", 0 },
-  { "Steffen Hansen", I18N_NOOP("Former Maintainer"), "hansen@kde.org", 0 },
-  { "Kalle Dalheimer", I18N_NOOP("Original Author"), "kalle@kde.org", 0 },
-  { "Jesper Petersen", I18N_NOOP("Original Author"), "blackie@kde.org", 0 },
+  { "Marc Mutz", I18N_NOOP("Current Maintainer"), "mutz@kde.org", nullptr },
+  { "Steffen Hansen", I18N_NOOP("Former Maintainer"), "hansen@kde.org", nullptr },
+  { "Kalle Dalheimer", I18N_NOOP("Original Author"), "kalle@kde.org", nullptr },
+  { "Jesper Petersen", I18N_NOOP("Original Author"), "blackie@kde.org", nullptr },
 };
 
 
 static const about_data credits[] = {
   { "David Faure",
     I18N_NOOP("Backend configuration framework, TDEIO integration"),
-    "faure@kde.org", 0 },
+    "faure@kde.org", nullptr },
   { "Michel Boyer de la Giroday",
     I18N_NOOP("Key-state dependant colors and fonts in the key list"),
-    "michel@klaralvdalens-datakonsult.se", 0 },
+    "michel@klaralvdalens-datakonsult.se", nullptr },
   { "Daniel Molkentin",
     I18N_NOOP("Certificate Wizard KIOSK integration, infrastructure"),
-    "molkentin@kde.org", 0 },
+    "molkentin@kde.org", nullptr },
   { "Ralf Nolden",
     I18N_NOOP("Support for obsolete EMAIL RDN in Certificate Wizard"),
-    "nolden@kde.org", 0 },
+    "nolden@kde.org", nullptr },
   { "Karl-Heinz Zimmer",
     I18N_NOOP("DN display ordering support, infrastructure"),
-    "khz@kde.org", 0 },
+    "khz@kde.org", nullptr },
 };
 
 
diff --git a/certmanager/certificateinfowidgetimpl.cpp b/certmanager/certificateinfowidgetimpl.cpp
index f0d738a5e..4066a73c8 100644
--- a/certmanager/certificateinfowidgetimpl.cpp
+++ b/certmanager/certificateinfowidgetimpl.cpp
@@ -124,7 +124,7 @@ void CertificateInfoWidgetImpl::setKey( const GpgME::Key & key  ) {
   startKeyExistanceCheck(); // starts a local keylisting to enable the
 			    // importButton if needed
 
-  TQListViewItem * item = 0;
+  TQListViewItem * item = nullptr;
   item = new TQListViewItem( listView, item, i18n("Valid"), TQString("From %1 to %2")
 			    .arg( time_t2string( key.subkey(0).creationTime() ),
 				  time_t2string( key.subkey(0).expirationTime() ) ) );
@@ -320,7 +320,7 @@ void CertificateInfoWidgetImpl::updateChainView() {
   pathView->clear();
   if ( mChain.empty() )
     return;
-  TQListViewItem * item = 0;
+  TQListViewItem * item = nullptr;
 
   TQValueList<GpgME::Key>::const_iterator it = mChain.begin();
   // root item:
diff --git a/certmanager/certificateinfowidgetimpl.h b/certmanager/certificateinfowidgetimpl.h
index 5838ec84f..555de8409 100644
--- a/certmanager/certificateinfowidgetimpl.h
+++ b/certmanager/certificateinfowidgetimpl.h
@@ -51,7 +51,7 @@ class CertificateInfoWidgetImpl : public CertificateInfoWidget {
   
 public:
   CertificateInfoWidgetImpl( const GpgME::Key & key, bool external,
-			     TQWidget * parent=0, const char * name=0);
+			     TQWidget * parent=nullptr, const char * name=nullptr);
 
   void setKey( const GpgME::Key & key );
 
diff --git a/certmanager/certificatewizardimpl.cpp b/certmanager/certificatewizardimpl.cpp
index fbe670d32..7fa606cce 100644
--- a/certmanager/certificatewizardimpl.cpp
+++ b/certmanager/certificatewizardimpl.cpp
@@ -184,7 +184,7 @@ static const char * oidForAttributeName( const TQString & attr ) {
   for ( unsigned int i = 0 ; i < numOidMaps ; ++i )
     if ( tqstricmp( attrUtf8, oidmap[i].name ) == 0 )
       return oidmap[i].oid;
-  return 0;
+  return nullptr;
 }
 
 /*
diff --git a/certmanager/certificatewizardimpl.h b/certmanager/certificatewizardimpl.h
index d54300059..7eee1fead 100644
--- a/certmanager/certificatewizardimpl.h
+++ b/certmanager/certificatewizardimpl.h
@@ -52,7 +52,7 @@ class CertificateWizardImpl : public CertificateWizard
   
 
 public:
-    CertificateWizardImpl( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
+    CertificateWizardImpl( TQWidget* parent = nullptr, const char* name = nullptr, bool modal = false, WFlags fl = 0 );
     ~CertificateWizardImpl();
 
     bool sendToCA() const;
diff --git a/certmanager/certlistview.h b/certmanager/certlistview.h
index dd4886911..4cbda9006 100644
--- a/certmanager/certlistview.h
+++ b/certmanager/certlistview.h
@@ -11,8 +11,8 @@ class CertKeyListView : public Kleo::KeyListView {
 
 public:
   CertKeyListView( const ColumnStrategy * strategy,
-                   const DisplayStrategy * display=0,
-                   TQWidget * parent=0, const char * name=0, WFlags f=0 );
+                   const DisplayStrategy * display=nullptr,
+                   TQWidget * parent=nullptr, const char * name=nullptr, WFlags f=0 );
 
 signals:
   void dropped( const KURL::List& urls );
diff --git a/certmanager/certmanager.cpp b/certmanager/certmanager.cpp
index 7b726e233..edb7b7620 100644
--- a/certmanager/certmanager.cpp
+++ b/certmanager/certmanager.cpp
@@ -163,14 +163,14 @@ namespace {
 CertManager::CertManager( bool remote, const TQString& query, const TQString & import,
 			  TQWidget* parent, const char* name, WFlags f )
   : TDEMainWindow( parent, name, f|WDestructiveClose ),
-    mCrlView( 0 ),
-    mDirmngrProc( 0 ),
-    mHierarchyAnalyser( 0 ),
-    mLineEditAction( 0 ),
-    mComboAction( 0 ),
-    mFindAction( 0 ),
-    mImportCertFromFileAction( 0 ),
-    mImportCRLFromFileAction( 0 ),
+    mCrlView( nullptr ),
+    mDirmngrProc( nullptr ),
+    mHierarchyAnalyser( nullptr ),
+    mLineEditAction( nullptr ),
+    mComboAction( nullptr ),
+    mFindAction( nullptr ),
+    mImportCertFromFileAction( nullptr ),
+    mImportCRLFromFileAction( nullptr ),
     mNextFindRemote( remote ),
     mRemote( remote ),
     mDirMngrFound( false )
@@ -213,8 +213,8 @@ CertManager::CertManager( bool remote, const TQString& query, const TQString & i
 
 CertManager::~CertManager() {
   writeConfig();
-  delete mDirmngrProc; mDirmngrProc = 0;
-  delete mHierarchyAnalyser; mHierarchyAnalyser = 0;
+  delete mDirmngrProc; mDirmngrProc = nullptr;
+  delete mHierarchyAnalyser; mHierarchyAnalyser = nullptr;
 }
 
 void CertManager::readConfig( bool noQueryGiven ) {
@@ -250,7 +250,7 @@ static inline void connectEnableOperationSignal( TQObject * s, TQObject * d ) {
 
 
 void CertManager::createActions() {
-  TDEAction * action = 0;
+  TDEAction * action = nullptr;
 
   (void)KStdAction::quit( this, TQ_SLOT(close()), actionCollection() );
 
@@ -275,14 +275,14 @@ void CertManager::createActions() {
 			      actionCollection(), "view_hierarchical" ),
 	   TQ_SIGNAL(toggled(bool)), TQ_SLOT(slotToggleHierarchicalView(bool)) );
 
-  action = new TDEAction( i18n("Expand All"), 0, CTRL+Key_Period,
+  action = new TDEAction( i18n("Expand All"), nullptr, CTRL+Key_Period,
 			this, TQ_SLOT(slotExpandAll()),
 			actionCollection(), "view_expandall" );
-  action = new TDEAction( i18n("Collapse All"), 0, CTRL+Key_Comma,
+  action = new TDEAction( i18n("Collapse All"), nullptr, CTRL+Key_Comma,
 			this, TQ_SLOT(slotCollapseAll()),
 			actionCollection(), "view_collapseall" );
 
-  (void)   new TDEAction( i18n("Refresh CRLs"), 0, 0,
+  (void)   new TDEAction( i18n("Refresh CRLs"), nullptr, 0,
 			this, TQ_SLOT(slotRefreshKeys()),
 			actionCollection(), "certificates_refresh_clr" );
 
@@ -327,10 +327,10 @@ void CertManager::createActions() {
                                         actionCollection(), "file_export_secret_keys" );
   connectEnableOperationSignal( this, mExportSecretKeyAction );
 
-  mViewCertDetailsAction = new TDEAction( i18n("Certificate Details..."), 0, 0,
+  mViewCertDetailsAction = new TDEAction( i18n("Certificate Details..."), nullptr, 0,
                                         this, TQ_SLOT(slotViewDetails()), actionCollection(),
                                         "view_certificate_details" );
-  mDownloadCertificateAction = new TDEAction( i18n( "Download"), 0, 0,
+  mDownloadCertificateAction = new TDEAction( i18n( "Download"), nullptr, 0,
                                         this, TQ_SLOT(slotDownloadCertificate()), actionCollection(),
                                         "download_certificate" );
 
@@ -369,7 +369,7 @@ void CertManager::createActions() {
   KStdAction::keyBindings( this, TQ_SLOT(slotEditKeybindings()), actionCollection() );
   KStdAction::preferences( this, TQ_SLOT(slotShowConfigurationDialog()), actionCollection() );
 
-  new TDEAction( i18n( "Configure &GpgME Backend" ), 0, 0, this, TQ_SLOT(slotConfigureGpgME()),
+  new TDEAction( i18n( "Configure &GpgME Backend" ), nullptr, 0, this, TQ_SLOT(slotConfigureGpgME()),
                actionCollection(), "configure_gpgme" );
 
   createStandardStatusBarAction();
@@ -563,7 +563,7 @@ void CertManager::startKeyListing( bool validating, bool refresh, const TQString
   mComboAction->setEnabled( false );
   mFindAction->setEnabled( false );
 
-  Kleo::KeyListJob * job = 0;
+  Kleo::KeyListJob * job = nullptr;
   if ( !validating && !refresh && mKeyListView->hierarchical() && !patterns.empty() )
     job = new Kleo::HierarchicalKeyListJob( Kleo::CryptoBackendFactory::instance()->smime(),
 					    mRemote, false, validating );
@@ -879,7 +879,7 @@ void CertManager::slotDirmngrExited() {
     else
       KMessageBox::information( this, i18n( "CRL file imported successfully." ), i18n( "Certificate Manager Information" ) );
 
-    delete mDirmngrProc; mDirmngrProc = 0;
+    delete mDirmngrProc; mDirmngrProc = nullptr;
     if ( !mImportCRLTempFile.isEmpty() )
       TQFile::remove( mImportCRLTempFile );
     updateImportActions( true );
@@ -934,7 +934,7 @@ bool CertManager::connectAndStartDirmngr( const char * slot, const char * proces
   connect( mDirmngrProc, TQ_SIGNAL(receivedStderr(TDEProcess*,char*,int) ),
            this, TQ_SLOT(slotStderr(TDEProcess*,char*,int)) );
   if( !mDirmngrProc->start( TDEProcess::NotifyOnExit, TDEProcess::Stderr ) ) {
-    delete mDirmngrProc; mDirmngrProc = 0;
+    delete mDirmngrProc; mDirmngrProc = nullptr;
     KMessageBox::error( this, i18n( "Unable to start %1 process. Please check your installation." ).arg( processname ), i18n( "Certificate Manager Error" ) );
     return false;
   }
@@ -995,7 +995,7 @@ void CertManager::slotClearCRLsResult() {
     KMessageBox::error( this, i18n( "An error occurred when trying to clear the CRL cache. The output from DirMngr was:\n%1").arg( mErrorbuffer ), i18n( "Certificate Manager Error" ) );
   else
     KMessageBox::information( this, i18n( "CRL cache cleared successfully." ), i18n( "Certificate Manager Information" ) );
-  delete mDirmngrProc; mDirmngrProc = 0;
+  delete mDirmngrProc; mDirmngrProc = nullptr;
 }
 
 static void showDeleteError( TQWidget * parent, const GpgME::Error & err ) {
@@ -1041,7 +1041,7 @@ void CertManager::slotDeleteCertificate() {
     connectJobToStatusBarProgress( job, i18n("Checking key dependencies...") );
     if ( const GpgME::Error error = job->start( TQStringList() ) ) {
       showKeyListError( this, error );
-      delete mHierarchyAnalyser; mHierarchyAnalyser = 0;
+      delete mHierarchyAnalyser; mHierarchyAnalyser = nullptr;
     }
     return;
   } else
@@ -1060,7 +1060,7 @@ void CertManager::slotDeleteCertificate() {
 				   WithRespectToFingerprints ),
 		      keysToDelete.end() );
 
-  delete mHierarchyAnalyser; mHierarchyAnalyser = 0;
+  delete mHierarchyAnalyser; mHierarchyAnalyser = nullptr;
 
   if ( keysToDelete.size() > keys.size() )
     if ( KMessageBox::warningContinueCancel( this,
diff --git a/certmanager/certmanager.h b/certmanager/certmanager.h
index 1b9fe81ed..bc7baa450 100644
--- a/certmanager/certmanager.h
+++ b/certmanager/certmanager.h
@@ -82,7 +82,7 @@ class TDE_EXPORT CertManager : public TDEMainWindow {
 public:
     CertManager( bool remote = false, const TQString& query = TQString(),
 		 const TQString& import=TQString(),
-		 TQWidget * parent=0, const char * name=0, WFlags f=0 );
+		 TQWidget * parent=nullptr, const char * name=nullptr, WFlags f=0 );
     ~CertManager();
 
     bool isRemote() const { return mRemote; }
diff --git a/certmanager/conf/appearanceconfigpage.h b/certmanager/conf/appearanceconfigpage.h
index c8cd8e225..b21dfc89a 100644
--- a/certmanager/conf/appearanceconfigpage.h
+++ b/certmanager/conf/appearanceconfigpage.h
@@ -45,7 +45,7 @@ class AppearanceConfigurationPage : public TDECModule {
   TQ_OBJECT
   
 public:
-  AppearanceConfigurationPage( TQWidget * parent=0, const char * name=0 );
+  AppearanceConfigurationPage( TQWidget * parent=nullptr, const char * name=nullptr );
 
   virtual void load();
   virtual void save();
diff --git a/certmanager/conf/appearanceconfigwidget.cpp b/certmanager/conf/appearanceconfigwidget.cpp
index 54c677cab..699245ff2 100644
--- a/certmanager/conf/appearanceconfigwidget.cpp
+++ b/certmanager/conf/appearanceconfigwidget.cpp
@@ -198,7 +198,7 @@ AppearanceConfigWidget::~AppearanceConfigWidget()
 
 void AppearanceConfigWidget::slotSelectionChanged( TQListViewItem* item )
 {
-  bool sel = item != 0;
+  bool sel = item != nullptr;
   foregroundButton->setEnabled( sel );
   backgroundButton->setEnabled( sel );
   fontButton->setEnabled( sel );
diff --git a/certmanager/conf/appearanceconfigwidget.h b/certmanager/conf/appearanceconfigwidget.h
index 2609f5dce..435af306e 100644
--- a/certmanager/conf/appearanceconfigwidget.h
+++ b/certmanager/conf/appearanceconfigwidget.h
@@ -46,7 +46,7 @@ namespace Kleo {
 
   public:
     AppearanceConfigWidget(
-      TQWidget * parent=0, const char * name=0, WFlags f=0 );
+      TQWidget * parent=nullptr, const char * name=nullptr, WFlags f=0 );
     ~AppearanceConfigWidget();
 
     void load();
diff --git a/certmanager/conf/configuredialog.h b/certmanager/conf/configuredialog.h
index 8216cbe8f..4a9be3bb0 100644
--- a/certmanager/conf/configuredialog.h
+++ b/certmanager/conf/configuredialog.h
@@ -42,7 +42,7 @@ class ConfigureDialog : public KCMultiDialog
   
 
 public:
-  ConfigureDialog( TQWidget *parent=0, const char *name=0, bool modal=true );
+  ConfigureDialog( TQWidget *parent=nullptr, const char *name=nullptr, bool modal=true );
   ~ConfigureDialog();
 
 protected:
diff --git a/certmanager/conf/dirservconfigpage.cpp b/certmanager/conf/dirservconfigpage.cpp
index 772dfd7d2..ea3deef94 100644
--- a/certmanager/conf/dirservconfigpage.cpp
+++ b/certmanager/conf/dirservconfigpage.cpp
@@ -284,11 +284,11 @@ Kleo::CryptoConfigEntry* DirectoryServicesConfigurationPage::configEntry( const
     Kleo::CryptoConfigEntry* entry = mConfig->entry( componentName, groupName, entryName );
     if ( !entry ) {
         KMessageBox::error( this, i18n( "Backend error: gpgconf does not seem to know the entry for %1/%2/%3" ).arg( componentName, groupName, entryName ) );
-        return 0;
+        return nullptr;
     }
     if( entry->argType() != argType || entry->isList() != isList ) {
         KMessageBox::error( this, i18n( "Backend error: gpgconf has wrong type for %1/%2/%3: %4 %5" ).arg( componentName, groupName, entryName ).arg( entry->argType() ).arg( entry->isList() ) );
-        return 0;
+        return nullptr;
     }
     return entry;
 }
diff --git a/certmanager/conf/dirservconfigpage.h b/certmanager/conf/dirservconfigpage.h
index 81bf3b8ef..62d8775f1 100644
--- a/certmanager/conf/dirservconfigpage.h
+++ b/certmanager/conf/dirservconfigpage.h
@@ -54,7 +54,7 @@ class TDE_EXPORT DirectoryServicesConfigurationPage : public TDECModule {
   TQ_OBJECT
   
 public:
-  DirectoryServicesConfigurationPage( TQWidget * parent=0, const char * name=0 );
+  DirectoryServicesConfigurationPage( TQWidget * parent=nullptr, const char * name=nullptr );
 
   virtual void load();
   virtual void save();
diff --git a/certmanager/conf/dnorderconfigpage.h b/certmanager/conf/dnorderconfigpage.h
index 9c42d5c80..46633544a 100644
--- a/certmanager/conf/dnorderconfigpage.h
+++ b/certmanager/conf/dnorderconfigpage.h
@@ -45,7 +45,7 @@ class DNOrderConfigPage : public TDECModule {
   TQ_OBJECT
   
 public:
-  DNOrderConfigPage( TQWidget * parent=0, const char * name=0 );
+  DNOrderConfigPage( TQWidget * parent=nullptr, const char * name=nullptr );
 
   /*! reimplementation */
   void load();
diff --git a/certmanager/crlview.cpp b/certmanager/crlview.cpp
index 4055b1374..0444d5233 100644
--- a/certmanager/crlview.cpp
+++ b/certmanager/crlview.cpp
@@ -50,7 +50,7 @@
 #include <tqtimer.h>
 
 CRLView::CRLView( TQWidget* parent, const char* name, bool modal )
-  : TQDialog( parent, name, modal ), _process(0)
+  : TQDialog( parent, name, modal ), _process(nullptr)
 {
   TQVBoxLayout* topLayout = new TQVBoxLayout( this, 10, 4 );
 
@@ -85,12 +85,12 @@ CRLView::CRLView( TQWidget* parent, const char* name, bool modal )
 
 CRLView::~CRLView()
 {
-  delete _process; _process = 0;
+  delete _process; _process = nullptr;
 }
 
 void CRLView::closeEvent( TQCloseEvent * e ) {
   TQDialog::closeEvent( e );
-  delete _process; _process = 0;
+  delete _process; _process = nullptr;
 }
 
 void CRLView::slotUpdateView()
@@ -98,7 +98,7 @@ void CRLView::slotUpdateView()
   _updateButton->setEnabled( false );
   _textView->clear();
   _buffer = TQString();
-  if( _process == 0 ) {
+  if(!_process) {
     _process = new TDEProcess();
     *_process << "gpgsm" << "--call-dirmngr" << "listcrls";
     connect( _process, TQ_SIGNAL( receivedStdout( TDEProcess*, char*, int) ),
diff --git a/certmanager/crlview.h b/certmanager/crlview.h
index 0e500f88b..a5f39ff51 100644
--- a/certmanager/crlview.h
+++ b/certmanager/crlview.h
@@ -45,7 +45,7 @@ class CRLView : public TQDialog {
   TQ_OBJECT
   
 public:
-  CRLView( TQWidget* parent = 0, const char* name = 0, bool modal = false );
+  CRLView( TQWidget* parent = nullptr, const char* name = nullptr, bool modal = false );
   ~CRLView();
 public slots:
   void slotUpdateView();
diff --git a/certmanager/customactions.cpp b/certmanager/customactions.cpp
index 2db64ebb9..2b3114bc3 100644
--- a/certmanager/customactions.cpp
+++ b/certmanager/customactions.cpp
@@ -41,7 +41,7 @@
 
 LabelAction::LabelAction( const TQString & text,  TDEActionCollection * parent,
 			  const char* name )
-  : TDEAction( text, TQIconSet(), TDEShortcut(), 0, 0, parent, name )
+  : TDEAction( text, TQIconSet(), TDEShortcut(), nullptr, nullptr, parent, name )
 {
 
 }
@@ -64,8 +64,8 @@ int LabelAction::plug( TQWidget * widget, int index ) {
 
 LineEditAction::LineEditAction( const TQString & text, TDEActionCollection * parent,
 				TQObject * receiver, const char * member, const char * name )
-  : TDEAction( text, TQIconSet(), TDEShortcut(), 0, 0, parent, name ),
-    _le(0), _receiver(receiver), _member(member)
+  : TDEAction( text, TQIconSet(), TDEShortcut(), nullptr, nullptr, parent, name ),
+    _le(nullptr), _receiver(receiver), _member(member)
 {
 
 }
@@ -111,7 +111,7 @@ void LineEditAction::setText( const TQString & txt ) {
 ComboAction::ComboAction( const TQStringList & lst,  TDEActionCollection * parent,
 			  TQObject * receiver, const char * member, const char * name,
                           int selectedID )
-  : TDEAction( TQString(), TQIconSet(), TDEShortcut(), 0, 0, parent, name ),
+  : TDEAction( TQString(), TQIconSet(), TDEShortcut(), nullptr, nullptr, parent, name ),
     _lst(lst), _receiver(receiver), _member(member), _selectedId( selectedID )
 {
 
diff --git a/certmanager/hierarchyanalyser.h b/certmanager/hierarchyanalyser.h
index 34e7b5a6e..ad51d961a 100644
--- a/certmanager/hierarchyanalyser.h
+++ b/certmanager/hierarchyanalyser.h
@@ -45,11 +45,11 @@ class HierarchyAnalyser : public TQObject {
   TQ_OBJECT
   
 public:
-  HierarchyAnalyser( TQObject * parent=0, const char * name=0 );
+  HierarchyAnalyser( TQObject * parent=nullptr, const char * name=nullptr );
   ~HierarchyAnalyser();
 
   const std::vector<GpgME::Key> & rootItems() const {
-    return subjectsForIssuer( 0 );
+    return subjectsForIssuer( nullptr );
   }
   const std::vector<GpgME::Key> & subjectsForIssuer( const char * issuer_fpr ) const;
   std::vector<GpgME::Key> subjectsForIssuerRecursive( const char * issuer_fpr ) const;
diff --git a/certmanager/kwatchgnupg/aboutdata.cpp b/certmanager/kwatchgnupg/aboutdata.cpp
index 2f7c5d618..f9aaf12f0 100644
--- a/certmanager/kwatchgnupg/aboutdata.cpp
+++ b/certmanager/kwatchgnupg/aboutdata.cpp
@@ -45,7 +45,7 @@ struct about_data {
 };
 
 static const about_data authors[] = {
-  { "Steffen Hansen", I18N_NOOP("Original Author"), "hansen@kde.org", 0 },
+  { "Steffen Hansen", I18N_NOOP("Original Author"), "hansen@kde.org", nullptr },
 };
 
 #if 0
diff --git a/certmanager/kwatchgnupg/kwatchgnupgconfig.h b/certmanager/kwatchgnupg/kwatchgnupgconfig.h
index 09fc36a2b..0b077661b 100644
--- a/certmanager/kwatchgnupg/kwatchgnupgconfig.h
+++ b/certmanager/kwatchgnupg/kwatchgnupgconfig.h
@@ -44,7 +44,7 @@ class KWatchGnuPGConfig : public KDialogBase {
   TQ_OBJECT
   
 public:
-  KWatchGnuPGConfig( TQWidget* parent, const char* name = 0 );
+  KWatchGnuPGConfig( TQWidget* parent, const char* name = nullptr );
 
   void loadConfig();
   void saveConfig();
diff --git a/certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp b/certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp
index 647056ab6..0806a5cc0 100644
--- a/certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp
+++ b/certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp
@@ -59,7 +59,7 @@
 #define WATCHGNUPGSOCKET ( TQDir::home().canonicalPath() + "/.gnupg/log-socket")
 
 KWatchGnuPGMainWindow::KWatchGnuPGMainWindow( TQWidget* parent, const char* name )
-  : TDEMainWindow( parent, name, WType_TopLevel ), mConfig(0)
+  : TDEMainWindow( parent, name, WType_TopLevel ), mConfig(nullptr)
 {
   createActions();
   createGUI();
@@ -186,7 +186,7 @@ void KWatchGnuPGMainWindow::setGnuPGConfig()
   }
   cconfig->sync(true);
   if( logclients.isEmpty() ) {
-	KMessageBox::sorry( 0, i18n("There are no components available that support logging." ) );
+	KMessageBox::sorry( nullptr, i18n("There are no components available that support logging." ) );
   }
 }
 
diff --git a/certmanager/kwatchgnupg/kwatchgnupgmainwin.h b/certmanager/kwatchgnupg/kwatchgnupgmainwin.h
index da0a15867..9142110f4 100644
--- a/certmanager/kwatchgnupg/kwatchgnupgmainwin.h
+++ b/certmanager/kwatchgnupg/kwatchgnupgmainwin.h
@@ -44,7 +44,7 @@ class KWatchGnuPGMainWindow : public TDEMainWindow {
   TQ_OBJECT
   
 public:
-  KWatchGnuPGMainWindow( TQWidget* parent = 0, const char* name = 0 );
+  KWatchGnuPGMainWindow( TQWidget* parent = nullptr, const char* name = nullptr );
   virtual ~KWatchGnuPGMainWindow();
 public slots:
   void slotWatcherExited();
diff --git a/certmanager/kwatchgnupg/main.cpp b/certmanager/kwatchgnupg/main.cpp
index b9f6237a9..3451d89a9 100644
--- a/certmanager/kwatchgnupg/main.cpp
+++ b/certmanager/kwatchgnupg/main.cpp
@@ -55,7 +55,7 @@ private:
 };
 
 KWatchGnuPGApplication::KWatchGnuPGApplication()
-  : TDEUniqueApplication(), mMainWin(0)
+  : TDEUniqueApplication(), mMainWin(nullptr)
 {
 }
 
@@ -67,7 +67,7 @@ KWatchGnuPGApplication::~KWatchGnuPGApplication()
 int KWatchGnuPGApplication::newInstance()
 {
   if( !mMainWin ) {
-	mMainWin = new KWatchGnuPGMainWindow( 0, "kwatchgnupg mainwin" );
+	mMainWin = new KWatchGnuPGMainWindow( nullptr, "kwatchgnupg mainwin" );
 	setMainWidget( mMainWin );
   }
   mMainWin->show();
diff --git a/certmanager/lib/backends/chiasmus/chiasmusbackend.cpp b/certmanager/lib/backends/chiasmus/chiasmusbackend.cpp
index d5083b96e..b63c95343 100644
--- a/certmanager/lib/backends/chiasmus/chiasmusbackend.cpp
+++ b/certmanager/lib/backends/chiasmus/chiasmusbackend.cpp
@@ -253,7 +253,7 @@ namespace {
     mutable std::map<TQString,ChiasmusConfigEntry*> mCache;
     mutable TDEConfig * mConfigObject;
   public:
-    ChiasmusGeneralGroup() : Kleo::CryptoConfigGroup(), mConfigObject( 0 ) {}
+    ChiasmusGeneralGroup() : Kleo::CryptoConfigGroup(), mConfigObject( nullptr ) {}
     ~ChiasmusGeneralGroup() { clear(); delete mConfigObject; }
     TQString name() const { return "General"; }
     TQString iconName() const { return "chiasmus_chi"; }
@@ -275,7 +275,7 @@ namespace {
           entry->read( &group );
           return mCache[name] = entry;
         }
-      return 0;
+      return nullptr;
     }
 
     void sync() {
@@ -302,7 +302,7 @@ namespace {
   class ChiasmusComponent : public Kleo::CryptoConfigComponent {
     mutable ChiasmusGeneralGroup * mGeneralGroup;
   public:
-    ChiasmusComponent() : Kleo::CryptoConfigComponent(), mGeneralGroup( 0 ) {}
+    ChiasmusComponent() : Kleo::CryptoConfigComponent(), mGeneralGroup( nullptr ) {}
     ~ChiasmusComponent() { delete mGeneralGroup; }
 
     void sync() {
@@ -316,7 +316,7 @@ namespace {
     TQStringList groupList() const { return TQStringList() << "General"; }
     Kleo::CryptoConfigGroup * group( const TQString & name ) const {
       if ( name != "General" )
-        return 0;
+        return nullptr;
       if ( !mGeneralGroup )
         mGeneralGroup = new ChiasmusGeneralGroup();
       return mGeneralGroup;
@@ -328,13 +328,13 @@ namespace {
 class Kleo::ChiasmusBackend::CryptoConfig : public Kleo::CryptoConfig {
   mutable ChiasmusComponent * mComponent;
 public:
-  CryptoConfig() : Kleo::CryptoConfig(), mComponent( 0 ) {}
+  CryptoConfig() : Kleo::CryptoConfig(), mComponent( nullptr ) {}
   ~CryptoConfig() { delete mComponent; }
 
   TQStringList componentList() const { return TQStringList() << "Chiasmus" ; }
   ChiasmusComponent * component( const TQString & name ) const {
     if ( name != "Chiasmus" )
-      return 0;
+      return nullptr;
     if ( !mComponent )
       mComponent = new ChiasmusComponent();
     return mComponent;
@@ -343,7 +343,7 @@ public:
     if ( mComponent )
       mComponent->sync();
   }
-  void clear() { delete mComponent; mComponent = 0; }
+  void clear() { delete mComponent; mComponent = nullptr; }
 };
 
 class Kleo::ChiasmusBackend::Protocol : public Kleo::CryptoBackend::Protocol {
@@ -358,21 +358,21 @@ public:
 
   TQString name() const { return "Chiasmus"; }
   TQString displayName() const { return i18n( "Chiasmus command line tool" ); }
-  KeyListJob * keyListJob( bool, bool, bool ) const { return 0; }
-  EncryptJob * encryptJob( bool, bool ) const { return 0; }
-  DecryptJob * decryptJob() const { return 0; }
-  SignJob * signJob( bool, bool ) const { return 0; }
-  VerifyDetachedJob * verifyDetachedJob( bool ) const { return 0; }
-  VerifyOpaqueJob * verifyOpaqueJob( bool ) const { return 0; }
-  KeyGenerationJob * keyGenerationJob() const { return 0; }
-  ImportJob * importJob() const { return 0; }
-  ExportJob * publicKeyExportJob( bool ) const { return 0; }
-  ExportJob * secretKeyExportJob( bool, const TQString& ) const { return 0; }
-  DownloadJob * downloadJob( bool ) const { return 0; }
-  DeleteJob * deleteJob() const { return 0; }
-  SignEncryptJob * signEncryptJob( bool, bool ) const { return 0; }
-  DecryptVerifyJob * decryptVerifyJob( bool ) const { return 0; }
-  RefreshKeysJob * refreshKeysJob() const { return 0; }
+  KeyListJob * keyListJob( bool, bool, bool ) const { return nullptr; }
+  EncryptJob * encryptJob( bool, bool ) const { return nullptr; }
+  DecryptJob * decryptJob() const { return nullptr; }
+  SignJob * signJob( bool, bool ) const { return nullptr; }
+  VerifyDetachedJob * verifyDetachedJob( bool ) const { return nullptr; }
+  VerifyOpaqueJob * verifyOpaqueJob( bool ) const { return nullptr; }
+  KeyGenerationJob * keyGenerationJob() const { return nullptr; }
+  ImportJob * importJob() const { return nullptr; }
+  ExportJob * publicKeyExportJob( bool ) const { return nullptr; }
+  ExportJob * secretKeyExportJob( bool, const TQString& ) const { return nullptr; }
+  DownloadJob * downloadJob( bool ) const { return nullptr; }
+  DeleteJob * deleteJob() const { return nullptr; }
+  SignEncryptJob * signEncryptJob( bool, bool ) const { return nullptr; }
+  DecryptVerifyJob * decryptVerifyJob( bool ) const { return nullptr; }
+  RefreshKeysJob * refreshKeysJob() const { return nullptr; }
 
   SpecialJob * specialJob( const char * type, const TQStringVariantMap & args ) const {
     if ( tqstricmp( type, "x-obtain-keys" ) == 0 && args.size() == 0 )
@@ -384,22 +384,22 @@ public:
     kdDebug(5150) << "ChiasmusBackend::Protocol: tried to instantiate unknown job type \""
                   << type << "\"" << endl;
 
-    return 0;
+    return nullptr;
   }
 };
 
-Kleo::ChiasmusBackend * Kleo::ChiasmusBackend::self = 0;
+Kleo::ChiasmusBackend * Kleo::ChiasmusBackend::self = nullptr;
 
 Kleo::ChiasmusBackend::ChiasmusBackend()
   : Kleo::CryptoBackend(),
-    mCryptoConfig( 0 ),
-    mProtocol( 0 )
+    mCryptoConfig( nullptr ),
+    mProtocol( nullptr )
 {
   self = this;
 }
 
 Kleo::ChiasmusBackend::~ChiasmusBackend() {
-  self = 0;
+  self = nullptr;
   delete mCryptoConfig;
   delete mProtocol;
 }
@@ -420,7 +420,7 @@ Kleo::CryptoConfig * Kleo::ChiasmusBackend::config() const {
 
 Kleo::CryptoBackend::Protocol * Kleo::ChiasmusBackend::protocol( const char * name ) const {
   if ( tqstricmp( name, "Chiasmus" ) != 0 )
-    return 0;
+    return nullptr;
   if ( !mProtocol )
     if ( checkForChiasmus() )
       mProtocol = new Protocol( config() );
@@ -443,7 +443,7 @@ bool Kleo::ChiasmusBackend::checkForChiasmus( TQString * reason ) const {
 
   // kills the protocol instance when we return false:
   std::unique_ptr<Protocol> tmp( mProtocol );
-  mProtocol = 0;
+  mProtocol = nullptr;
 
   const CryptoConfigEntry * path = config()->entry( "Chiasmus", "General", "path" );
   assert( path ); assert( path->argType() == CryptoConfigEntry::ArgType_Path );
@@ -473,5 +473,5 @@ bool Kleo::ChiasmusBackend::supportsProtocol( const char * name ) const {
 }
 
 const char * Kleo::ChiasmusBackend::enumerateProtocols( int i ) const {
-  return i == 0 ? "Chiasmus" : 0 ;
+  return i == 0 ? "Chiasmus" : nullptr ;
 }
diff --git a/certmanager/lib/backends/chiasmus/chiasmusbackend.h b/certmanager/lib/backends/chiasmus/chiasmusbackend.h
index 17f7572c0..db9a42a73 100644
--- a/certmanager/lib/backends/chiasmus/chiasmusbackend.h
+++ b/certmanager/lib/backends/chiasmus/chiasmusbackend.h
@@ -57,14 +57,14 @@ namespace Kleo {
 
     Kleo::CryptoConfig * config() const;
 
-    Kleo::CryptoBackend::Protocol * openpgp() const { return 0; }
-    Kleo::CryptoBackend::Protocol * smime() const { return 0; }
+    Kleo::CryptoBackend::Protocol * openpgp() const { return nullptr; }
+    Kleo::CryptoBackend::Protocol * smime() const { return nullptr; }
     Kleo::CryptoBackend::Protocol * protocol( const char * name ) const;
 
-    bool checkForOpenPGP( TQString * reason=0 ) const;
-    bool checkForSMIME( TQString * reason=0 ) const;
-    bool checkForChiasmus( TQString * reason=0 ) const;
-    bool checkForProtocol( const char * name, TQString * reason=0 ) const;
+    bool checkForOpenPGP( TQString * reason=nullptr ) const;
+    bool checkForSMIME( TQString * reason=nullptr ) const;
+    bool checkForChiasmus( TQString * reason=nullptr ) const;
+    bool checkForProtocol( const char * name, TQString * reason=nullptr ) const;
 
     bool supportsOpenPGP() const { return false; }
     bool supportsSMIME() const { return false; }
diff --git a/certmanager/lib/backends/chiasmus/chiasmusjob.cpp b/certmanager/lib/backends/chiasmus/chiasmusjob.cpp
index 5c49478e4..fcc6bf8a9 100644
--- a/certmanager/lib/backends/chiasmus/chiasmusjob.cpp
+++ b/certmanager/lib/backends/chiasmus/chiasmusjob.cpp
@@ -57,8 +57,8 @@
 #include <cassert>
 
 Kleo::ChiasmusJob::ChiasmusJob( Mode mode )
-  : Kleo::SpecialJob( 0, 0 ),
-    mSymCryptRun( 0 ),
+  : Kleo::SpecialJob( nullptr, nullptr ),
+    mSymCryptRun( nullptr ),
     mError( 0 ),
     mCanceled( false ),
     mTimeout( false ),
@@ -99,7 +99,7 @@ namespace {
     TQObject * _this;
     LaterDeleter( TQObject * o ) : _this( o ) {}
     ~LaterDeleter() { if ( _this ) _this->deleteLater(); }
-    void disable() { _this = 0; }
+    void disable() { _this = nullptr; }
   };
 }
 
@@ -163,7 +163,7 @@ void Kleo::ChiasmusJob::showChiasmusOutput() {
   kdDebug() << k_funcinfo << endl;
   if ( mStderr.isEmpty() )
     return;
-  KMessageBox::information( 0 /*how to get a parent widget?*/,
+  KMessageBox::information( nullptr /*how to get a parent widget?*/,
                             mStderr,
                             i18n( "Output from chiasmus" ) );
 }
@@ -173,12 +173,12 @@ GpgME::Error Kleo::ChiasmusJob::exec() {
     return mError = err;
 
   if ( !mSymCryptRun->launch( mInput, TDEProcess::Block ) ) {
-    delete mSymCryptRun; mSymCryptRun = 0;
+    delete mSymCryptRun; mSymCryptRun = nullptr;
     return mError = gpg_error( GPG_ERR_ENOENT ); // what else?
   }
 
   const GpgME::Error err = slotProcessExited( mSymCryptRun );
-  delete mSymCryptRun; mSymCryptRun = 0;
+  delete mSymCryptRun; mSymCryptRun = nullptr;
   return err;
 }
 
diff --git a/certmanager/lib/backends/chiasmus/chiasmuslibrary.cpp b/certmanager/lib/backends/chiasmus/chiasmuslibrary.cpp
index 6bb588d63..86ecdb7c6 100644
--- a/certmanager/lib/backends/chiasmus/chiasmuslibrary.cpp
+++ b/certmanager/lib/backends/chiasmus/chiasmuslibrary.cpp
@@ -50,9 +50,9 @@
 #include <cstdlib>
 #include <cstring>
 
-Kleo::ChiasmusLibrary * Kleo::ChiasmusLibrary::self = 0;
+Kleo::ChiasmusLibrary * Kleo::ChiasmusLibrary::self = nullptr;
 
-Kleo::ChiasmusLibrary::ChiasmusLibrary() : mXiaLibrary( 0 ) {
+Kleo::ChiasmusLibrary::ChiasmusLibrary() : mXiaLibrary( nullptr ) {
   self = this;
 }
 
@@ -74,7 +74,7 @@ Kleo::ChiasmusLibrary::main_func Kleo::ChiasmusLibrary::chiasmus( TQString * rea
                 .arg( libfile,KLibLoader::self()->lastErrorMessage() );
     kdDebug(5150) << "ChiasmusLibrary: loading \"" << libfile
                   << "\" failed: " << KLibLoader::self()->lastErrorMessage() << endl;
-    return 0;
+    return nullptr;
   }
   if ( !mXiaLibrary->hasSymbol( "Chiasmus" ) ) {
     if ( reason )
@@ -82,7 +82,7 @@ Kleo::ChiasmusLibrary::main_func Kleo::ChiasmusLibrary::chiasmus( TQString * rea
                 .arg( libfile, i18n( "Library does not contain the symbol \"Chiasmus\"." ) );
     kdDebug(5150) << "ChiasmusLibrary: loading \"" << libfile
                   << "\" failed: " << "Library does not contain the symbol \"Chiasmus\"." << endl;
-    return 0;
+    return nullptr;
   }
   void * symbol = mXiaLibrary->symbol( "Chiasmus" );
   assert( symbol );
diff --git a/certmanager/lib/backends/chiasmus/chiasmuslibrary.h b/certmanager/lib/backends/chiasmus/chiasmuslibrary.h
index 3a3536af9..cb3dc62f3 100644
--- a/certmanager/lib/backends/chiasmus/chiasmuslibrary.h
+++ b/certmanager/lib/backends/chiasmus/chiasmuslibrary.h
@@ -55,7 +55,7 @@ namespace Kleo {
     int perform( const TQValueVector<TQCString> & args ) const;
   private:
     typedef int ( *main_func )( int, char** );
-    main_func chiasmus( TQString * reason=0 ) const;
+    main_func chiasmus( TQString * reason=nullptr ) const;
 
   private:
     static ChiasmusLibrary * self;
diff --git a/certmanager/lib/backends/chiasmus/obtainkeysjob.cpp b/certmanager/lib/backends/chiasmus/obtainkeysjob.cpp
index 90f512435..196f79970 100644
--- a/certmanager/lib/backends/chiasmus/obtainkeysjob.cpp
+++ b/certmanager/lib/backends/chiasmus/obtainkeysjob.cpp
@@ -55,7 +55,7 @@
 #include <cassert>
 
 Kleo::ObtainKeysJob::ObtainKeysJob()
-  : SpecialJob( 0, 0 ),
+  : SpecialJob( nullptr, nullptr ),
     mIndex( 0 ),
     mCanceled( false )
 {
diff --git a/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h b/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h
index b5b60fe59..44e8ce452 100644
--- a/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h
+++ b/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h
@@ -51,7 +51,7 @@ public:
   SymCryptRunProcessBase( const TQString & class_, const TQString & program,
                           const TQString & keyFile, const TQString& options,
                           Operation op,
-                          TQObject * parent=0, const char * name=0 );
+                          TQObject * parent=nullptr, const char * name=nullptr );
   ~SymCryptRunProcessBase();
 
   bool launch( const TQByteArray & input, RunMode rm=NotifyOnExit );
diff --git a/certmanager/lib/backends/kpgp/kpgpbackendbase.cpp b/certmanager/lib/backends/kpgp/kpgpbackendbase.cpp
index dfa88af66..81d2d2798 100644
--- a/certmanager/lib/backends/kpgp/kpgpbackendbase.cpp
+++ b/certmanager/lib/backends/kpgp/kpgpbackendbase.cpp
@@ -55,7 +55,7 @@ Kleo::KpgpBackendBase::KpgpBackendBase()
 
 Kleo::KpgpBackendBase::~KpgpBackendBase()
 {
-  delete mOpenPGPProtocol; mOpenPGPProtocol = 0;
+  delete mOpenPGPProtocol; mOpenPGPProtocol = nullptr;
 }
 
 TQString Kleo::GPG1Backend::name() const {
diff --git a/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp b/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp
index e0da7eca4..6940a4855 100644
--- a/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp
+++ b/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp
@@ -45,7 +45,7 @@
 #include <assert.h>
 
 struct Kleo::GnuPGProcessBase::Private {
-  Private() : usetStatusFD( false ), statnot( 0 ) {
+  Private() : usetStatusFD( false ), statnot( nullptr ) {
     statusFD[0] = statusFD[1] = -1;
   }
 
@@ -63,7 +63,7 @@ Kleo::GnuPGProcessBase::GnuPGProcessBase( TQObject * parent, const char * name )
 }
 
 Kleo::GnuPGProcessBase::~GnuPGProcessBase() {
-  delete d; d = 0;
+  delete d; d = nullptr;
 }
 
 void Kleo::GnuPGProcessBase::setUsetStatusFD( bool use ) {
@@ -133,7 +133,7 @@ bool Kleo::GnuPGProcessBase::closetStatus() {
   if ( !d->usetStatusFD )
     return false;
   d->usetStatusFD = false;
-  delete d->statnot; d->statnot = 0;
+  delete d->statnot; d->statnot = nullptr;
   ::close( d->statusFD[0] ); d->statusFD[0] = -1;
   return true;
 }
diff --git a/certmanager/lib/backends/qgpgme/gnupgprocessbase.h b/certmanager/lib/backends/qgpgme/gnupgprocessbase.h
index d894884e4..81ed056cd 100644
--- a/certmanager/lib/backends/qgpgme/gnupgprocessbase.h
+++ b/certmanager/lib/backends/qgpgme/gnupgprocessbase.h
@@ -49,7 +49,7 @@ namespace Kleo {
     TQ_OBJECT
   
   public:
-    GnuPGProcessBase( TQObject * parent=0, const char * name=0 );
+    GnuPGProcessBase( TQObject * parent=nullptr, const char * name=nullptr );
     ~GnuPGProcessBase();
 
     void setUsetStatusFD( bool use );
diff --git a/certmanager/lib/backends/qgpgme/qgpgmebackend.cpp b/certmanager/lib/backends/qgpgme/qgpgmebackend.cpp
index 86439bb99..46bfb0ab1 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmebackend.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmebackend.cpp
@@ -50,17 +50,17 @@
 
 Kleo::QGpgMEBackend::QGpgMEBackend()
   : Kleo::CryptoBackend(),
-    mCryptoConfig( 0 ),
-    mOpenPGPProtocol( 0 ),
-    mSMIMEProtocol( 0 )
+    mCryptoConfig( nullptr ),
+    mOpenPGPProtocol( nullptr ),
+    mSMIMEProtocol( nullptr )
 {
   GpgME::initializeLibrary();
 }
 
 Kleo::QGpgMEBackend::~QGpgMEBackend() {
-  delete mCryptoConfig; mCryptoConfig = 0;
-  delete mOpenPGPProtocol; mOpenPGPProtocol = 0;
-  delete mSMIMEProtocol; mSMIMEProtocol = 0;
+  delete mCryptoConfig; mCryptoConfig = nullptr;
+  delete mOpenPGPProtocol; mOpenPGPProtocol = nullptr;
+  delete mSMIMEProtocol; mSMIMEProtocol = nullptr;
 }
 
 TQString Kleo::QGpgMEBackend::name() const {
@@ -137,7 +137,7 @@ Kleo::CryptoBackend::Protocol * Kleo::QGpgMEBackend::protocol( const char * name
     return openpgp();
   if ( tqstricmp( name, SMIME ) == 0 )
     return smime();
-  return 0;
+  return nullptr;
 }
 
 bool Kleo::QGpgMEBackend::supportsProtocol( const char * name ) const {
@@ -148,6 +148,6 @@ const char * Kleo::QGpgMEBackend::enumerateProtocols( int i ) const {
   switch ( i ) {
   case 0: return OpenPGP;
   case 1: return SMIME;
-  default: return 0;
+  default: return nullptr;
   }
 }
diff --git a/certmanager/lib/backends/qgpgme/qgpgmebackend.h b/certmanager/lib/backends/qgpgme/qgpgmebackend.h
index 9d6aca814..a7c202984 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmebackend.h
+++ b/certmanager/lib/backends/qgpgme/qgpgmebackend.h
@@ -60,8 +60,8 @@ namespace Kleo {
     Protocol * smime() const;
     Protocol * protocol( const char * name ) const;
 
-    bool checkForOpenPGP( TQString * reason=0 ) const;
-    bool checkForSMIME( TQString * reason=0 ) const;
+    bool checkForOpenPGP( TQString * reason=nullptr ) const;
+    bool checkForSMIME( TQString * reason=nullptr ) const;
     bool checkForProtocol( const char * name, TQString * reason ) const;
 
     bool supportsOpenPGP() const { return true; }
diff --git a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp
index c77dcb208..9177b848c 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp
@@ -95,7 +95,7 @@ void QGpgMECryptoConfig::runGpgConf( bool showErrors )
     else
         wmsg = wmsg.arg( strerror(rc) );
     kdWarning(5150) << wmsg << endl; // to see it from test_cryptoconfig.cpp
-    KMessageBox::error(0, wmsg);
+    KMessageBox::error(nullptr, wmsg);
   }
   mParsed = true;
 }
@@ -175,7 +175,7 @@ void QGpgMECryptoConfigComponent::runGpgConf()
 
   TQObject::connect( &proc, TQ_SIGNAL( readReady(TDEProcIO*) ),
                     this, TQ_SLOT( slotCollectStdOut(TDEProcIO*) ) );
-  mCurrentGroup = 0;
+  mCurrentGroup = nullptr;
 
   // run the process:
   int rc = 0;
@@ -302,13 +302,13 @@ void QGpgMECryptoConfigComponent::sync( bool runtime )
   {
     TQString wmsg = i18n( "Could not start gpgconf\nCheck that gpgconf is in the PATH and that it can be started" );
     kdWarning(5150) << wmsg << endl;
-    KMessageBox::error(0, wmsg);
+    KMessageBox::error(nullptr, wmsg);
   }
   else if( rc != 0 ) // Happens due to bugs in gpgconf (e.g. issues 104/115)
   {
     TQString wmsg = i18n( "Error from gpgconf while saving configuration: %1" ).arg( TQString::fromLocal8Bit( strerror( rc ) ) );
     kdWarning(5150) << k_funcinfo << ":" << strerror( rc ) << endl;
-    KMessageBox::error(0, wmsg);
+    KMessageBox::error(nullptr, wmsg);
   }
   else
   {
diff --git a/certmanager/lib/backends/qgpgme/qgpgmejob.cpp b/certmanager/lib/backends/qgpgme/qgpgmejob.cpp
index 8c378536f..6f8d3cc41 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmejob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmejob.cpp
@@ -84,12 +84,12 @@ Kleo::QGpgMEJob::QGpgMEJob( Kleo::Job * _this, GpgME::Context * context )
     GpgME::PassphraseProvider(),
     mThis( _this ),
     mCtx( context ),
-    mInData( 0 ),
-    mInDataDataProvider( 0 ),
-    mOutData( 0 ),
-    mOutDataDataProvider( 0 ),
-    mPatterns( 0 ),
-    mReplacedPattern( 0 ),
+    mInData( nullptr ),
+    mInDataDataProvider( nullptr ),
+    mOutData( nullptr ),
+    mOutDataDataProvider( nullptr ),
+    mPatterns( nullptr ),
+    mReplacedPattern( nullptr ),
     mNumPatterns( 0 ),
     mChunkSize( 1024 ),
     mPatternStartIndex( 0 ), mPatternEndIndex( 0 )
@@ -109,7 +109,7 @@ Kleo::QGpgMEJob::QGpgMEJob( Kleo::Job * _this, GpgME::Context * context )
 void Kleo::QGpgMEJob::checkInvariants() const {
 #ifndef NDEBUG
   if ( mPatterns ) {
-    assert( mPatterns[mNumPatterns] == 0 );
+    assert(!mPatterns[mNumPatterns]);
     if ( mPatternEndIndex > 0 ) {
       assert( mPatternEndIndex > mPatternStartIndex );
       assert( mPatternEndIndex - mPatternStartIndex == mChunkSize );
@@ -117,27 +117,27 @@ void Kleo::QGpgMEJob::checkInvariants() const {
       assert( mPatternEndIndex == mPatternStartIndex );
     }
     if ( mPatternEndIndex < mNumPatterns ) {
-      assert( mPatterns[mPatternEndIndex] == 0 );
-      assert( mReplacedPattern != 0 );
+      assert(!mPatterns[mPatternEndIndex]);
+      assert(mReplacedPattern);
     } else {
-      assert( mReplacedPattern == 0 );
+      assert(!mReplacedPattern);
     }
   } else {
     assert( mNumPatterns == 0 );
     assert( mPatternStartIndex == 0 );
     assert( mPatternEndIndex == 0 );
-    assert( mReplacedPattern == 0 );
+    assert(!mReplacedPattern);
   }
 #endif
 }
 
 Kleo::QGpgMEJob::~QGpgMEJob() {
   InvarianceChecker check( this );
-  delete mCtx; mCtx = 0;
-  delete mInData; mInData = 0;
-  delete mInDataDataProvider; mInDataDataProvider = 0;
-  delete mOutData; mOutData = 0;
-  delete mOutDataDataProvider; mOutDataDataProvider = 0;
+  delete mCtx; mCtx = nullptr;
+  delete mInData; mInData = nullptr;
+  delete mInDataDataProvider; mInDataDataProvider = nullptr;
+  delete mOutData; mOutData = nullptr;
+  delete mOutDataDataProvider; mOutDataDataProvider = nullptr;
   deleteAllPatterns();
 }
 
@@ -145,8 +145,8 @@ void Kleo::QGpgMEJob::deleteAllPatterns() {
   if ( mPatterns )
     for ( unsigned int i = 0 ; i < mNumPatterns ; ++i )
       free( (void*)mPatterns[i] );
-  free( (void*)mReplacedPattern ); mReplacedPattern = 0;
-  delete[] mPatterns; mPatterns = 0;
+  free( (void*)mReplacedPattern ); mReplacedPattern = nullptr;
+  delete[] mPatterns; mPatterns = nullptr;
   mPatternEndIndex = mPatternStartIndex = mNumPatterns = 0;
 }
 
@@ -172,8 +172,8 @@ void Kleo::QGpgMEJob::setPatterns( const TQStringList & sl, bool allowEmpty ) {
     *pat_it++ = strdup( (*it).utf8().data() );
     ++mNumPatterns;
   }
-  *pat_it++ = 0;
-  mReplacedPattern = 0;
+  *pat_it++ = nullptr;
+  mReplacedPattern = nullptr;
   mPatternEndIndex = mChunkSize = mNumPatterns;
 }
 
@@ -181,26 +181,26 @@ void Kleo::QGpgMEJob::setChunkSize( unsigned int chunksize ) {
   InvarianceChecker check( this );
   if ( mReplacedPattern ) {
     mPatterns[mPatternEndIndex] = mReplacedPattern;
-    mReplacedPattern = 0;
+    mReplacedPattern = nullptr;
   }
   mChunkSize = std::min( chunksize, mNumPatterns );
   mPatternStartIndex = 0;
   mPatternEndIndex = mChunkSize;
   mReplacedPattern = mPatterns[mPatternEndIndex];
-  mPatterns[mPatternEndIndex] = 0;
+  mPatterns[mPatternEndIndex] = nullptr;
 }
 
 const char* * Kleo::QGpgMEJob::nextChunk() {
   InvarianceChecker check( this );
   if ( mReplacedPattern ) {
     mPatterns[mPatternEndIndex] = mReplacedPattern;
-    mReplacedPattern = 0;
+    mReplacedPattern = nullptr;
   }
   mPatternStartIndex += mChunkSize;
   mPatternEndIndex += mChunkSize;
   if ( mPatternEndIndex < mNumPatterns ) { // could safely be <=, but the last entry is NULL anyway
     mReplacedPattern = mPatterns[mPatternEndIndex];
-    mPatterns[mPatternEndIndex] = 0;
+    mPatterns[mPatternEndIndex] = nullptr;
   }
   return patterns();
 }
@@ -209,7 +209,7 @@ const char* * Kleo::QGpgMEJob::patterns() const {
   InvarianceChecker check( this );
   if ( mPatternStartIndex < mNumPatterns )
     return mPatterns + mPatternStartIndex;
-  return 0;
+  return nullptr;
 }
 
 GpgME::Error Kleo::QGpgMEJob::setSigningKeys( const std::vector<GpgME::Key> & signers ) {
@@ -297,7 +297,7 @@ char * Kleo::QGpgMEJob::getPassphrase( const char * useridHint, const char * /*d
   Kleo::PassphraseDialog dlg( msg, i18n("Passphrase Dialog") );
   if ( dlg.exec() != TQDialog::Accepted ) {
     canceled = true;
-    return 0;
+    return nullptr;
   }
   canceled = false;
   // gpgme++ free()s it, and we need to copy as long as dlg isn't deleted :o
diff --git a/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.cpp
index 0d79f581f..2a4af0af3 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.cpp
@@ -48,15 +48,15 @@
 Kleo::QGpgMEKeyGenerationJob::QGpgMEKeyGenerationJob( GpgME::Context * context )
   : KeyGenerationJob( QGpgME::EventLoopInteractor::instance(), "Kleo::QGpgMEKeyGenerationJob" ),
     QGpgMEJob( this, context ),
-    mPubKeyDataProvider( 0 ),
-    mPubKey( 0 )
+    mPubKeyDataProvider( nullptr ),
+    mPubKey( nullptr )
 {
   assert( context );
 }
 
 Kleo::QGpgMEKeyGenerationJob::~QGpgMEKeyGenerationJob() {
-  delete mPubKey; mPubKey = 0;
-  delete mPubKeyDataProvider; mPubKeyDataProvider = 0;
+  delete mPubKey; mPubKey = nullptr;
+  delete mPubKeyDataProvider; mPubKeyDataProvider = nullptr;
 }
 
 GpgME::Error Kleo::QGpgMEKeyGenerationJob::start( const TQString & parameters ) {
diff --git a/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.cpp
index d74b0993a..47227adea 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.cpp
@@ -104,10 +104,10 @@ GpgME::Error Kleo::QGpgMEKeyListJob::start( const TQStringList & pats, bool secr
         return GpgME::Error();
     }
     deleteLater();
-    mResult = GpgME::KeyListResult( 0, err );
+    mResult = GpgME::KeyListResult( nullptr, err );
     return err;
   }
-  mResult = GpgME::KeyListResult( 0, 0 );
+  mResult = GpgME::KeyListResult( nullptr, 0 );
   return 0;
 }
 
@@ -144,7 +144,7 @@ GpgME::KeyListResult Kleo::QGpgMEKeyListJob::attemptSyncKeyListing( std::vector<
   for ( const char* * chunk = patterns() ; chunk ; chunk = nextChunk() ) {
 
     if ( const GpgME::Error err = mCtx->startKeyListing( chunk, mSecretOnly ) )
-      return GpgME::KeyListResult( 0, err );
+      return GpgME::KeyListResult( nullptr, err );
 
     GpgME::Error err;
     do
@@ -181,7 +181,7 @@ void Kleo::QGpgMEKeyListJob::slotOperationDoneEvent( GpgME::Context * context, c
   if ( !mResult.error() )
     if ( const char* * chunk = nextChunk() ) {
       if ( const GpgME::Error err = mCtx->startKeyListing( chunk, mSecretOnly ) )
-	mResult.mergeWith( GpgME::KeyListResult( 0, err ) );
+	mResult.mergeWith( GpgME::KeyListResult( nullptr, err ) );
       else
 	return;
     }
diff --git a/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.cpp b/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.cpp
index 54d13358e..c313ba9ef 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.cpp
@@ -92,7 +92,7 @@ static const struct {
 
 
 
-Kleo::QGpgMEProgressTokenMapper * Kleo::QGpgMEProgressTokenMapper::mSelf = 0;
+Kleo::QGpgMEProgressTokenMapper * Kleo::QGpgMEProgressTokenMapper::mSelf = nullptr;
 
 const Kleo::QGpgMEProgressTokenMapper * Kleo::QGpgMEProgressTokenMapper::instance() {
   if ( !mSelf )
@@ -105,7 +105,7 @@ Kleo::QGpgMEProgressTokenMapper::QGpgMEProgressTokenMapper() {
 }
 
 Kleo::QGpgMEProgressTokenMapper::~QGpgMEProgressTokenMapper() {
-  mSelf = 0;
+  mSelf = nullptr;
 }
 
 typedef std::map< TQString, std::map<int,Desc> > Map;
diff --git a/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp
index 8088d28ae..47332bb34 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp
@@ -53,7 +53,7 @@
 
 Kleo::QGpgMERefreshKeysJob::QGpgMERefreshKeysJob()
   : RefreshKeysJob( QGpgME::EventLoopInteractor::instance(), "Kleo::QGpgMERefreshKeysJob" ),
-    mProcess( 0 ),
+    mProcess( nullptr ),
     mError( 0 )
 {
 
@@ -125,7 +125,7 @@ GpgME::Error Kleo::QGpgMERefreshKeysJob::startAProcess() {
 void Kleo::QGpgMERefreshKeysJob::slotCancel() {
   if ( mProcess )
     mProcess->kill();
-  mProcess = 0;
+  mProcess = nullptr;
   mError = gpg_err_make( GPG_ERR_SOURCE_GPGSM, GPG_ERR_CANCELED );
 }
 
diff --git a/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp
index af72a5391..92a9013bf 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp
@@ -55,7 +55,7 @@
 
 Kleo::QGpgMESecretKeyExportJob::QGpgMESecretKeyExportJob( bool armour, const TQString& charset )
   : ExportJob( QGpgME::EventLoopInteractor::instance(), "Kleo::QGpgMESecretKeyExportJob" ),
-    mProcess( 0 ),
+    mProcess( nullptr ),
     mError( 0 ),
     mArmour( armour ),
     mCharset( charset )
@@ -108,7 +108,7 @@ GpgME::Error Kleo::QGpgMESecretKeyExportJob::start( const TQStringList & pattern
 void Kleo::QGpgMESecretKeyExportJob::slotCancel() {
   if ( mProcess )
     mProcess->kill();
-  mProcess = 0;
+  mProcess = nullptr;
   mError = gpg_err_make( GPG_ERR_SOURCE_GPGSM, GPG_ERR_CANCELED );
 }
 
diff --git a/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.cpp
index 70ff6b8fd..f80b91b91 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.cpp
@@ -97,7 +97,7 @@ Kleo::QGpgMESignEncryptJob::exec( const std::vector<GpgME::Key> & signers,
 				  const TQByteArray & plainText, bool alwaysTrust,
 				  TQByteArray & cipherText ) {
   if ( GpgME::Error err = setup( signers, plainText ) )
-    return std::make_pair( GpgME::SigningResult( 0, err ), GpgME::EncryptionResult() );
+    return std::make_pair( GpgME::SigningResult( nullptr, err ), GpgME::EncryptionResult() );
   const GpgME::Context::EncryptionFlags flags =
     alwaysTrust ? GpgME::Context::AlwaysTrust : GpgME::Context::None ;
   mResult = mCtx->signAndEncrypt( recipients, *mInData, *mOutData, flags );
diff --git a/certmanager/lib/backends/qgpgme/qgpgmesignjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmesignjob.cpp
index eda519b12..22a9f7191 100644
--- a/certmanager/lib/backends/qgpgme/qgpgmesignjob.cpp
+++ b/certmanager/lib/backends/qgpgme/qgpgmesignjob.cpp
@@ -95,7 +95,7 @@ GpgME::SigningResult Kleo::QGpgMESignJob::exec( const std::vector<GpgME::Key> &
 						GpgME::Context::SignatureMode mode,
 						TQByteArray & signature ) {
   if ( const GpgME::Error err = setup( signers, plainText ) )
-    return mResult = GpgME::SigningResult( 0, err );
+    return mResult = GpgME::SigningResult( nullptr, err );
   mResult = mCtx->sign( *mInData, *mOutData, mode );
   signature = mOutDataDataProvider->data();
   getAuditLog();
diff --git a/certmanager/lib/cryptplug.cpp b/certmanager/lib/cryptplug.cpp
index a9fbc1692..50cc2c7f0 100644
--- a/certmanager/lib/cryptplug.cpp
+++ b/certmanager/lib/cryptplug.cpp
@@ -270,8 +270,8 @@ CryptPlug::~CryptPlug() {
 }
 
 bool CryptPlug::initialize() {
-  GpgME::setDefaultLocale( LC_CTYPE, setlocale( LC_CTYPE, 0 ) );
-  GpgME::setDefaultLocale( LC_MESSAGES, setlocale( LC_MESSAGES, 0 ) );
+  GpgME::setDefaultLocale( LC_CTYPE, setlocale( LC_CTYPE, nullptr ) );
+  GpgME::setDefaultLocale( LC_MESSAGES, setlocale( LC_MESSAGES, nullptr ) );
   return (gpgme_engine_check_version (GPGMEPLUG_PROTOCOL) == GPG_ERR_NO_ERROR);
 }
 
@@ -326,7 +326,7 @@ bool CryptPlug::decryptMessage( const char* ciphertext,
   gpgme_error_t err;
   gpgme_data_t gCiphertext, gPlaintext;
   size_t rCLen = 0;
-  char*  rCiph = 0;
+  char*  rCiph = nullptr;
   bool bOk = false;
 
   if( !ciphertext )
@@ -604,8 +604,8 @@ add_dn_parts( TQCString& result, struct CryptPlug::DnPair* dn, const char* part
 
 static char*
 reorder_dn( struct CryptPlug::DnPair *dn,
-            char** attrOrder = 0,
-            const char* unknownAttrsHandling = 0 )
+            char** attrOrder = nullptr,
+            const char* unknownAttrsHandling = nullptr )
 {
   struct CryptPlug::DnPair *dnOrg = dn;
 
@@ -792,7 +792,7 @@ void obtain_signature_information( gpgme_ctx_t ctx,
                                    struct CryptPlug::SignatureMetaData* sigmeta,
                                    char** attrOrder,
                                    const char* unknownAttrsHandling,
-                                   bool * signatureFound=0 )
+                                   bool * signatureFound=nullptr )
 {
   gpgme_error_t err;
   unsigned long sumGPGME;
@@ -803,7 +803,7 @@ void obtain_signature_information( gpgme_ctx_t ctx,
   assert( ctx );
   assert( sigmeta );
 
-  sigmeta->extended_info = 0;
+  sigmeta->extended_info = nullptr;
   gpgme_verify_result_t result = gpgme_op_verify_result( ctx );
   if ( !result )
     return;
@@ -861,7 +861,7 @@ void obtain_signature_information( gpgme_ctx_t ctx,
     this_info.validity = GPGME_VALIDITY_UNKNOWN;
 
     /* sig key data */
-    gpgme_key_t key = 0;
+    gpgme_key_t key = nullptr;
     // PENDING(marc) if this is deprecated, how shall we get at all
     // the infos below?
     err = gpgme_get_sig_key (ctx, sig_idx, &key);
@@ -871,13 +871,13 @@ void obtain_signature_information( gpgme_ctx_t ctx,
       unsigned long attr_ulong;
 
       /* extract key identidy */
-      attr_string = key->subkeys ? key->subkeys->keyid : 0 ;
+      attr_string = key->subkeys ? key->subkeys->keyid : nullptr ;
       if ( attr_string )
 	storeNewCharPtr( &this_info.keyid, attr_string );
 
       /* pubkey algorithm */
-      attr_string = key->subkeys ? gpgme_pubkey_algo_name( key->subkeys->pubkey_algo ) : 0 ;
-      if (attr_string != 0)
+      attr_string = key->subkeys ? gpgme_pubkey_algo_name( key->subkeys->pubkey_algo ) : nullptr ;
+      if (attr_string)
 	storeNewCharPtr( &this_info.algo, attr_string );
       attr_ulong = key->subkeys ? key->subkeys->pubkey_algo : 0 ;
       this_info.algo_num = attr_ulong;
@@ -889,8 +889,8 @@ void obtain_signature_information( gpgme_ctx_t ctx,
       /* extract user id, according to the documentation it's representable
        * as a number, but it seems that it also has a string representation
        */
-      attr_string = key->uids ? key->uids->uid : 0 ;
-      if (attr_string != 0) {
+      attr_string = key->uids ? key->uids->uid : nullptr ;
+      if (attr_string) {
         a = parse_dn( (const unsigned char*)attr_string );
         this_info.userid = reorder_dn( a, attrOrder, unknownAttrsHandling );
       }
@@ -910,15 +910,15 @@ void obtain_signature_information( gpgme_ctx_t ctx,
       this_info.key_expires = attr_ulong;
 
       /* extract user name */
-      attr_string = key->uids ? key->uids->name : 0 ;
-      if (attr_string != 0) {
+      attr_string = key->uids ? key->uids->name : nullptr ;
+      if (attr_string) {
         a = parse_dn( (const unsigned char*)attr_string );
         this_info.name = reorder_dn( a, attrOrder, unknownAttrsHandling );
       }
 
       /* extract email(s) */
       this_info.emailCount = 0;
-      this_info.emailList = 0;
+      this_info.emailList = nullptr;
       for ( gpgme_user_id_t uid = key->uids ; uid ; uid = uid->next ) {
         attr_string = uid->email;
         if ( attr_string && *attr_string) {
@@ -941,8 +941,8 @@ void obtain_signature_information( gpgme_ctx_t ctx,
 	fprintf( stderr, "gpgmeplug checkMessageSignature found NO EMAIL\n" );
 
       /* extract the comment */
-      attr_string = key->uids ? key->uids->comment : 0 ;
-      if (attr_string != 0)
+      attr_string = key->uids ? key->uids->comment : nullptr ;
+      if (attr_string)
 	storeNewCharPtr( &this_info.comment, attr_string );
     }
 
@@ -969,7 +969,7 @@ bool CryptPlug::checkMessageSignature( char** cleartext,
   gpgme_ctx_t ctx;
   gpgme_sig_stat_t status = GPGME_SIG_STAT_NONE;
   gpgme_data_t datapart, sigpart;
-  char* rClear = 0;
+  char* rClear = nullptr;
   size_t clearLen;
   bool isOpaqueSigned;
 
@@ -1002,9 +1002,9 @@ bool CryptPlug::checkMessageSignature( char** cleartext,
                            1 );
 
   if ( isOpaqueSigned )
-    gpgme_op_verify( ctx, sigpart, 0, datapart );
+    gpgme_op_verify( ctx, sigpart, nullptr, datapart );
   else
-    gpgme_op_verify( ctx, sigpart, datapart, 0 );
+    gpgme_op_verify( ctx, sigpart, datapart, nullptr );
 
   if( isOpaqueSigned ) {
     rClear = gpgme_data_release_and_get_mem( datapart, &clearLen );
@@ -1046,7 +1046,7 @@ bool CryptPlug::decryptAndCheckMessage( const char*  ciphertext,
   gpgme_data_t gCiphertext, gPlaintext;
   gpgme_sig_stat_t sigstatus = GPGME_SIG_STAT_NONE;
   size_t rCLen = 0;
-  char*  rCiph = 0;
+  char*  rCiph = nullptr;
   bool bOk = false;
 
   if( !ciphertext )
diff --git a/certmanager/lib/cryptplug.h b/certmanager/lib/cryptplug.h
index 9b281101d..38f7b7918 100644
--- a/certmanager/lib/cryptplug.h
+++ b/certmanager/lib/cryptplug.h
@@ -751,22 +751,22 @@ struct StructuringInfo {
     s->makeMimeObject = false;
     s->makeMultiMime = false;
 
-    s->contentTypeMain = 0;
-    s->contentDispMain = 0;
-    s->contentTEncMain = 0;
-
-    s->contentTypeVersion = 0;
-    s->contentDispVersion = 0;
-    s->contentTEncVersion = 0;
-    s->bodyTextVersion = 0;
-
-    s->contentTypeCode = 0;
-    s->contentDispCode = 0;
-    s->contentTEncCode = 0;
-
-    s->flatTextPrefix = 0;
-    s->flatTextSeparator = 0;
-    s->flatTextPostfix = 0;
+    s->contentTypeMain = nullptr;
+    s->contentDispMain = nullptr;
+    s->contentTEncMain = nullptr;
+
+    s->contentTypeVersion = nullptr;
+    s->contentDispVersion = nullptr;
+    s->contentTEncVersion = nullptr;
+    s->bodyTextVersion = nullptr;
+
+    s->contentTypeCode = nullptr;
+    s->contentDispCode = nullptr;
+    s->contentTEncCode = nullptr;
+
+    s->flatTextPrefix = nullptr;
+    s->flatTextSeparator = nullptr;
+    s->flatTextPostfix = nullptr;
   }
 
 /*! \ingroup groupSignCryptAct
diff --git a/certmanager/lib/cryptplugfactory.cpp b/certmanager/lib/cryptplugfactory.cpp
index 12adac0f0..412ff363d 100644
--- a/certmanager/lib/cryptplugfactory.cpp
+++ b/certmanager/lib/cryptplugfactory.cpp
@@ -45,7 +45,7 @@
 
 #include <assert.h>
 
-KMail::CryptPlugFactory * KMail::CryptPlugFactory::mSelf = 0;
+KMail::CryptPlugFactory * KMail::CryptPlugFactory::mSelf = nullptr;
 
 //
 //
@@ -56,7 +56,7 @@ KMail::CryptPlugFactory * KMail::CryptPlugFactory::mSelf = 0;
 
 KMail::CryptPlugFactory::CryptPlugFactory()
   : Kleo::CryptoBackendFactory(),
-    mCryptPlugWrapperList( 0 )
+    mCryptPlugWrapperList( nullptr )
 {
   mSelf = this;
 
@@ -66,8 +66,8 @@ KMail::CryptPlugFactory::CryptPlugFactory()
 }
 
 KMail::CryptPlugFactory::~CryptPlugFactory() {
-  mSelf = 0;
-  delete mCryptPlugWrapperList; mCryptPlugWrapperList = 0;
+  mSelf = nullptr;
+  delete mCryptPlugWrapperList; mCryptPlugWrapperList = nullptr;
 }
 
 KMail::CryptPlugFactory * KMail::CryptPlugFactory::instance() {
@@ -81,7 +81,7 @@ CryptPlugWrapper * KMail::CryptPlugFactory::active() const {
     return smime();
   if ( openpgp() && openpgp()->active() )
     return openpgp();
-  return 0;
+  return nullptr;
 }
 
 CryptPlugWrapper * KMail::CryptPlugFactory::createForProtocol( const TQString & proto ) const {
@@ -90,7 +90,7 @@ CryptPlugWrapper * KMail::CryptPlugFactory::createForProtocol( const TQString &
     return smime();
   if ( p == "application/pgp-signature" || p == "application/x-pgp-signature" )
     return openpgp();
-  return 0;
+  return nullptr;
 }
 
 CryptPlugWrapper * KMail::CryptPlugFactory::smime() const {
diff --git a/certmanager/lib/cryptplugwrapper.cpp b/certmanager/lib/cryptplugwrapper.cpp
index 6303708f1..2d1edbd2e 100644
--- a/certmanager/lib/cryptplugwrapper.cpp
+++ b/certmanager/lib/cryptplugwrapper.cpp
@@ -165,7 +165,7 @@ public:
       _attrOrder = fallbackAttrOrder;
 
     if( _attrOrder.isEmpty() ){
-      _attrOrderChar = 0;
+      _attrOrderChar = nullptr;
     }else{
       _attrOrderChar = new char*[ _attrOrder.count()+1 ];
       int i=0;
@@ -425,11 +425,11 @@ CryptPlugWrapper::CryptPlugWrapper( const TQString& name,
     _updateURL( update ),
     _active(  active  ),
     _iniStatus( IniStatus_undef ),
-    _cp( 0 ),
-    _config( 0 ),
-    _cryptoConfig( 0 )
+    _cp( nullptr ),
+    _config( nullptr ),
+    _cryptoConfig( nullptr )
 {
-  const bool ok = initialize( 0, 0 );
+  const bool ok = initialize( nullptr, nullptr );
   assert( ok );
 }
 
@@ -510,8 +510,8 @@ bool CryptPlugWrapper::initialize( IniStatus* iniStatus, TQString* errorMsg )
 	_cp = new OpenPGPCryptPlug();
 	_config = new Config( GPGME_PROTOCOL_OpenPGP );
       } else {
-	_cp = 0;
-	_config = 0;
+	_cp = nullptr;
+	_config = nullptr;
       }
 
       if ( !_cp ) {
@@ -525,8 +525,8 @@ bool CryptPlugWrapper::initialize( IniStatus* iniStatus, TQString* errorMsg )
 	  _lastError = i18n("Error while initializing plugin \"%1\"").arg( _libName );
 	  if ( errorMsg )
 	    *errorMsg = _lastError;
-	  delete _cp; _cp = 0;
-	  delete _config; _config = 0;
+	  delete _cp; _cp = nullptr;
+	  delete _config; _config = nullptr;
 	} else {
 	  _iniStatus  = IniStatus_Ok;
 	}
@@ -541,9 +541,9 @@ bool CryptPlugWrapper::initialize( IniStatus* iniStatus, TQString* errorMsg )
 
 void CryptPlugWrapper::deinitialize()
 {
-    delete _cp; _cp = 0;
-    delete _config; _config = 0;
-    delete _cryptoConfig; _cryptoConfig = 0;
+    delete _cp; _cp = nullptr;
+    delete _config; _config = nullptr;
+    delete _cryptoConfig; _cryptoConfig = nullptr;
 }
 
 
@@ -662,11 +662,11 @@ GpgME::ImportResult CryptPlugWrapper::importCertificate( const char* data, size_
 
 Kleo::KeyListJob * CryptPlugWrapper::keyListJob( bool remote, bool includeSigs, bool validate ) const {
   if ( !_cp )
-    return 0;
+    return nullptr;
 
   GpgME::Context * context = GpgME::Context::createForProtocol( _cp->mProtocol );
   if ( !context )
-    return 0;
+    return nullptr;
 
   unsigned int mode = context->keyListMode();
   if ( remote ) {
@@ -684,11 +684,11 @@ Kleo::KeyListJob * CryptPlugWrapper::keyListJob( bool remote, bool includeSigs,
 
 Kleo::EncryptJob * CryptPlugWrapper::encryptJob( bool armor, bool textmode ) const {
   if ( !_cp )
-    return 0;
+    return nullptr;
 
   GpgME::Context * context = GpgME::Context::createForProtocol( _cp->mProtocol );
   if ( !context )
-    return 0;
+    return nullptr;
 
   context->setArmor( armor );
   context->setTextMode( textmode );
@@ -697,22 +697,22 @@ Kleo::EncryptJob * CryptPlugWrapper::encryptJob( bool armor, bool textmode ) con
 
 Kleo::DecryptJob * CryptPlugWrapper::decryptJob() const {
   if ( !_cp )
-    return 0;
+    return nullptr;
 
   GpgME::Context * context = GpgME::Context::createForProtocol( _cp->mProtocol );
   if ( !context )
-    return 0;
+    return nullptr;
 
   return new Kleo::QGpgMEDecryptJob( context );
 }
 
 Kleo::SignJob * CryptPlugWrapper::signJob( bool armor, bool textMode ) const {
   if ( !_cp )
-    return 0;
+    return nullptr;
 
   GpgME::Context * context = GpgME::Context::createForProtocol( _cp->mProtocol );
   if ( !context )
-    return 0;
+    return nullptr;
 
   context->setArmor( armor );
   context->setTextMode( textMode );
@@ -722,11 +722,11 @@ Kleo::SignJob * CryptPlugWrapper::signJob( bool armor, bool textMode ) const {
 
 Kleo::VerifyDetachedJob * CryptPlugWrapper::verifyDetachedJob( bool textMode ) const {
   if ( !_cp )
-    return 0;
+    return nullptr;
 
   GpgME::Context * context = GpgME::Context::createForProtocol( _cp->mProtocol );
   if ( !context )
-    return 0;
+    return nullptr;
 
   context->setTextMode( textMode );
 
@@ -735,11 +735,11 @@ Kleo::VerifyDetachedJob * CryptPlugWrapper::verifyDetachedJob( bool textMode ) c
 
 Kleo::VerifyOpaqueJob * CryptPlugWrapper::verifyOpaqueJob( bool textMode ) const {
   if ( !_cp )
-    return 0;
+    return nullptr;
 
   GpgME::Context * context = GpgME::Context::createForProtocol( _cp->mProtocol );
   if ( !context )
-    return 0;
+    return nullptr;
 
   context->setTextMode( textMode );
 
@@ -748,33 +748,33 @@ Kleo::VerifyOpaqueJob * CryptPlugWrapper::verifyOpaqueJob( bool textMode ) const
 
 Kleo::KeyGenerationJob * CryptPlugWrapper::keyGenerationJob() const {
   if ( !_cp )
-    return 0;
+    return nullptr;
 
   GpgME::Context * context = GpgME::Context::createForProtocol( _cp->mProtocol );
   if ( !context )
-    return 0;
+    return nullptr;
 
   return new Kleo::QGpgMEKeyGenerationJob( context );
 }
 
 Kleo::ImportJob * CryptPlugWrapper::importJob() const {
   if ( !_cp )
-    return 0;
+    return nullptr;
 
   GpgME::Context * context = GpgME::Context::createForProtocol( _cp->mProtocol );
   if ( !context )
-    return 0;
+    return nullptr;
 
   return new Kleo::QGpgMEImportJob( context );
 }
 
 Kleo::ExportJob * CryptPlugWrapper::publicKeyExportJob( bool armor ) const {
   if ( !_cp )
-    return 0;
+    return nullptr;
 
   GpgME::Context * context = GpgME::Context::createForProtocol( _cp->mProtocol );
   if ( !context )
-    return 0;
+    return nullptr;
 
   context->setArmor( armor );
   return new Kleo::QGpgMEExportJob( context );
@@ -782,7 +782,7 @@ Kleo::ExportJob * CryptPlugWrapper::publicKeyExportJob( bool armor ) const {
 
 Kleo::ExportJob * CryptPlugWrapper::secretKeyExportJob( bool armor, const TQString& charset ) const {
   if ( !_cp || _cp->mProtocol != GpgME::Context::CMS ) // fixme: add support for gpg, too
-    return 0;
+    return nullptr;
 
   // this operation is not supported by gpgme, so we have to call gpgsm ourselves:
   return new Kleo::QGpgMESecretKeyExportJob( armor, charset );
@@ -790,7 +790,7 @@ Kleo::ExportJob * CryptPlugWrapper::secretKeyExportJob( bool armor, const TQStri
 
 Kleo::RefreshKeysJob * CryptPlugWrapper::refreshKeysJob() const {
   if ( !_cp || _cp->mProtocol != GpgME::Context::CMS ) // fixme: add support for gpg, too
-    return 0;
+    return nullptr;
 
   // this operation is not supported by gpgme, so we have to call gpgsm ourselves:
   return new Kleo::QGpgMERefreshKeysJob();
@@ -798,11 +798,11 @@ Kleo::RefreshKeysJob * CryptPlugWrapper::refreshKeysJob() const {
 
 Kleo::DownloadJob * CryptPlugWrapper::downloadJob( bool armor ) const {
   if ( !_cp )
-    return 0;
+    return nullptr;
 
   GpgME::Context * context = GpgME::Context::createForProtocol( _cp->mProtocol );
   if ( !context )
-    return 0;
+    return nullptr;
 
   context->setArmor( armor );
   // this is the hackish interface for downloading from keyserers currently:
@@ -813,22 +813,22 @@ Kleo::DownloadJob * CryptPlugWrapper::downloadJob( bool armor ) const {
 
 Kleo::DeleteJob * CryptPlugWrapper::deleteJob() const {
   if ( !_cp )
-    return 0;
+    return nullptr;
 
   GpgME::Context * context = GpgME::Context::createForProtocol( _cp->mProtocol );
   if ( !context )
-    return 0;
+    return nullptr;
 
   return new Kleo::QGpgMEDeleteJob( context );
 }
 
 Kleo::SignEncryptJob * CryptPlugWrapper::signEncryptJob( bool armor, bool textMode ) const {
   if ( !_cp )
-    return 0;
+    return nullptr;
 
   GpgME::Context * context = GpgME::Context::createForProtocol( _cp->mProtocol );
   if ( !context )
-    return 0;
+    return nullptr;
 
   context->setArmor( armor );
   context->setTextMode( textMode );
@@ -838,11 +838,11 @@ Kleo::SignEncryptJob * CryptPlugWrapper::signEncryptJob( bool armor, bool textMo
 
 Kleo::DecryptVerifyJob * CryptPlugWrapper::decryptVerifyJob( bool textMode ) const {
   if ( !_cp )
-    return 0;
+    return nullptr;
 
   GpgME::Context * context = GpgME::Context::createForProtocol( _cp->mProtocol );
   if ( !context )
-    return 0;
+    return nullptr;
 
   context->setTextMode( textMode );
 
diff --git a/certmanager/lib/cryptplugwrapper.h b/certmanager/lib/cryptplugwrapper.h
index 41a9fc2b8..b485c7078 100644
--- a/certmanager/lib/cryptplugwrapper.h
+++ b/certmanager/lib/cryptplugwrapper.h
@@ -813,7 +813,7 @@ public:
     Kleo::DecryptVerifyJob * decryptVerifyJob( bool textmode=false ) const;
     Kleo::RefreshKeysJob * refreshKeysJob() const;
 
-    Kleo::SpecialJob * specialJob( const char *, const TQStringVariantMap & ) const { return 0; }
+    Kleo::SpecialJob * specialJob( const char *, const TQStringVariantMap & ) const { return nullptr; }
 
     GpgME::ImportResult importCertificate( const char* data, size_t length );
 
diff --git a/certmanager/lib/cryptplugwrapperlist.cpp b/certmanager/lib/cryptplugwrapperlist.cpp
index 94d8a48cb..a9465f834 100644
--- a/certmanager/lib/cryptplugwrapperlist.cpp
+++ b/certmanager/lib/cryptplugwrapperlist.cpp
@@ -29,5 +29,5 @@ CryptPlugWrapper * CryptPlugWrapperList::findForLibName( const TQString & libNam
   for ( TQPtrListIterator<CryptPlugWrapper> it( *this ) ; it.current() ; ++it )
     if ( (*it)->libName().find( libName, 0, false ) >= 0 )
       return *it;
-  return 0;
+  return nullptr;
 }
diff --git a/certmanager/lib/kleo/cryptobackend.h b/certmanager/lib/kleo/cryptobackend.h
index 215c4e3c6..19718b36c 100644
--- a/certmanager/lib/kleo/cryptobackend.h
+++ b/certmanager/lib/kleo/cryptobackend.h
@@ -69,9 +69,9 @@ namespace Kleo {
     virtual TQString name() const = 0;
     virtual TQString displayName() const = 0;
 
-    virtual bool checkForOpenPGP( TQString * reason=0 ) const = 0;
-    virtual bool checkForSMIME( TQString * reason=0 ) const = 0;
-    virtual bool checkForProtocol( const char * name,  TQString * reason=0 ) const = 0;
+    virtual bool checkForOpenPGP( TQString * reason=nullptr ) const = 0;
+    virtual bool checkForSMIME( TQString * reason=nullptr ) const = 0;
+    virtual bool checkForProtocol( const char * name,  TQString * reason=nullptr ) const = 0;
 
     virtual bool supportsOpenPGP() const = 0;
     virtual bool supportsSMIME() const = 0;
diff --git a/certmanager/lib/kleo/cryptobackendfactory.cpp b/certmanager/lib/kleo/cryptobackendfactory.cpp
index ce31cc9a5..5e5cae006 100644
--- a/certmanager/lib/kleo/cryptobackendfactory.cpp
+++ b/certmanager/lib/kleo/cryptobackendfactory.cpp
@@ -57,7 +57,7 @@
 
 #include <cassert>
 
-Kleo::CryptoBackendFactory * Kleo::CryptoBackendFactory::mSelf = 0;
+Kleo::CryptoBackendFactory * Kleo::CryptoBackendFactory::mSelf = nullptr;
 
 static const char * availableProtocols[] = {
   "Chiasmus",
@@ -67,7 +67,7 @@ static const unsigned int numAvailableProtocols = sizeof availableProtocols / si
 
 Kleo::CryptoBackendFactory::CryptoBackendFactory()
   : TQObject( tqApp, "CryptoBackendFactory::instance()" ),
-    mConfigObject( 0 ),
+    mConfigObject( nullptr ),
     mAvailableProtocols( availableProtocols, availableProtocols + numAvailableProtocols )
 {
   mBackendList.push_back( new QGpgMEBackend() );
@@ -85,14 +85,14 @@ Kleo::CryptoBackendFactory::CryptoBackendFactory()
 }
 
 Kleo::CryptoBackendFactory::~CryptoBackendFactory() {
-  mSelf = 0; // first!
+  mSelf = nullptr; // first!
 
   for ( std::vector<CryptoBackend*>::iterator it = mBackendList.begin() ; it != mBackendList.end() ; ++it ) {
     delete *it;
-    *it = 0;
+    *it = nullptr;
   }
   delete mConfigObject;
-  mConfigObject = 0;
+  mConfigObject = nullptr;
 }
 
 Kleo::CryptoBackendFactory * Kleo::CryptoBackendFactory::instance() {
@@ -113,33 +113,33 @@ Kleo::CryptoBackendFactory * Kleo::CryptoBackendFactory::instance() {
 const Kleo::CryptoBackend::Protocol * Kleo::CryptoBackendFactory::smime() const {
   const BackendMap::const_iterator it = mBackends.find( "SMIME" );
   if ( it == mBackends.end() )
-    return 0;
+    return nullptr;
   if ( !it->second )
-    return 0;
+    return nullptr;
   return it->second->smime();
 }
 
 const Kleo::CryptoBackend::Protocol * Kleo::CryptoBackendFactory::openpgp() const {
   const BackendMap::const_iterator it = mBackends.find( "OpenPGP" );
   if ( it == mBackends.end() )
-    return 0;
+    return nullptr;
   if ( !it->second )
-    return 0;
+    return nullptr;
   return it->second->openpgp();
 }
 
 const Kleo::CryptoBackend::Protocol * Kleo::CryptoBackendFactory::protocol( const char * name ) const {
   const BackendMap::const_iterator it = mBackends.find( name );
   if ( it == mBackends.end() )
-    return 0;
+    return nullptr;
   if ( !it->second )
-    return 0;
+    return nullptr;
   return it->second->protocol( name );
 }
 
 Kleo::CryptoConfig * Kleo::CryptoBackendFactory::config() const {
   // ## should we use mSMIMEBackend? mOpenPGPBackend? backend(0) i.e. always qgpgme?
-  return backend( 0 ) ? backend( 0 )->config() : 0;
+  return backend( 0 ) ? backend( 0 )->config() : nullptr;
 }
 
 bool Kleo::CryptoBackendFactory::hasBackends() const {
@@ -163,7 +163,7 @@ void Kleo::CryptoBackendFactory::scanForBackends( TQStringList * reasons ) {
 }
 
 const Kleo::CryptoBackend * Kleo::CryptoBackendFactory::backend( unsigned int idx ) const {
-  return ( idx < mBackendList.size() ) ? mBackendList[idx] : 0 ;
+  return ( idx < mBackendList.size() ) ? mBackendList[idx] : nullptr ;
 }
 
 const Kleo::CryptoBackend * Kleo::CryptoBackendFactory::backendByName( const TQString& name ) const {
@@ -171,7 +171,7 @@ const Kleo::CryptoBackend * Kleo::CryptoBackendFactory::backendByName( const TQS
     if ( (*it)->name() == name )
       return *it;
   }
-  return 0;
+  return nullptr;
 }
 
 Kleo::BackendConfigWidget * Kleo::CryptoBackendFactory::configWidget( TQWidget * parent, const char * name ) const {
@@ -213,7 +213,7 @@ static const char * defaultBackend( const char * proto ) {
   for ( unsigned int i = 0 ; i < sizeof defaults / sizeof *defaults ; ++i )
     if ( tqstricmp( proto, defaults[i].proto ) == 0 )
       return defaults[i].backend;
-  return 0;
+  return nullptr;
 }
 
 void Kleo::CryptoBackendFactory::readConfig() {
@@ -227,7 +227,7 @@ void Kleo::CryptoBackendFactory::readConfig() {
 
 const char * Kleo::CryptoBackendFactory::enumerateProtocols( int i ) const {
   if ( i < 0 || static_cast<unsigned int>( i ) >= mAvailableProtocols.size() )
-    return 0;
+    return nullptr;
   return mAvailableProtocols[i];
 }
 
diff --git a/certmanager/lib/kleo/cryptobackendfactory.h b/certmanager/lib/kleo/cryptobackendfactory.h
index d8b1dd6c3..faf724d3f 100644
--- a/certmanager/lib/kleo/cryptobackendfactory.h
+++ b/certmanager/lib/kleo/cryptobackendfactory.h
@@ -74,7 +74,7 @@ namespace Kleo {
 
     bool hasBackends() const;
 
-    Kleo::BackendConfigWidget * configWidget( TQWidget * parent=0, const char * name=0 ) const;
+    Kleo::BackendConfigWidget * configWidget( TQWidget * parent=nullptr, const char * name=nullptr ) const;
 
     TDEConfig* configObject() const;
 
@@ -89,7 +89,7 @@ namespace Kleo {
     void setOpenPGPBackend( const CryptoBackend* backend );
     void setProtocolBackend( const char * name, const CryptoBackend * backend );
 
-    void scanForBackends( TQStringList * reasons=0 );
+    void scanForBackends( TQStringList * reasons=nullptr );
 
     const char * enumerateProtocols( int i ) const;
 
diff --git a/certmanager/lib/kleo/cryptoconfig.h b/certmanager/lib/kleo/cryptoconfig.h
index 90272a67e..b92c72af0 100644
--- a/certmanager/lib/kleo/cryptoconfig.h
+++ b/certmanager/lib/kleo/cryptoconfig.h
@@ -359,8 +359,8 @@ namespace Kleo {
      */
     CryptoConfigEntry* entry( const TQString& componentName, const TQString& groupName, const TQString& entryName ) const {
       const Kleo::CryptoConfigComponent* comp = component( componentName );
-      const Kleo::CryptoConfigGroup* group = comp ? comp->group( groupName ) : 0;
-      return group ? group->entry( entryName ) : 0;
+      const Kleo::CryptoConfigGroup* group = comp ? comp->group( groupName ) : nullptr;
+      return group ? group->entry( entryName ) : nullptr;
     }
 
     /**
diff --git a/certmanager/lib/kleo/dn.cpp b/certmanager/lib/kleo/dn.cpp
index ec8e255da..a0ae17e52 100644
--- a/certmanager/lib/kleo/dn.cpp
+++ b/certmanager/lib/kleo/dn.cpp
@@ -240,7 +240,7 @@ parse_dn( const unsigned char * string ) {
       if (!*string)
         break; /* ready */
 
-      DnPair pair = { 0, 0 };
+      DnPair pair = { nullptr, nullptr };
       string = parse_dn_part (&pair, string);
       if (!string)
 	goto failure;
@@ -493,11 +493,11 @@ Kleo::DNAttributeMapper::DNAttributeMapper() {
 }
 
 Kleo::DNAttributeMapper::~DNAttributeMapper() {
-  mSelf = 0;
-  delete d; d = 0;
+  mSelf = nullptr;
+  delete d; d = nullptr;
 }
 
-Kleo::DNAttributeMapper * Kleo::DNAttributeMapper::mSelf = 0;
+Kleo::DNAttributeMapper * Kleo::DNAttributeMapper::mSelf = nullptr;
 
 const Kleo::DNAttributeMapper * Kleo::DNAttributeMapper::instance() {
   if ( !mSelf )
diff --git a/certmanager/lib/kleo/dn.h b/certmanager/lib/kleo/dn.h
index 493a61a08..1a1fbdbbb 100644
--- a/certmanager/lib/kleo/dn.h
+++ b/certmanager/lib/kleo/dn.h
@@ -62,7 +62,7 @@ namespace Kleo {
 
     void setAttributeOrder( const TQStringList & order );
 
-    DNAttributeOrderConfigWidget * configWidget( TQWidget * parent=0, const char * name=0 ) const;
+    DNAttributeOrderConfigWidget * configWidget( TQWidget * parent=nullptr, const char * name=nullptr ) const;
 
   private:
     class Private;
diff --git a/certmanager/lib/kleo/enum.cpp b/certmanager/lib/kleo/enum.cpp
index bc9011fc2..66a482fa8 100644
--- a/certmanager/lib/kleo/enum.cpp
+++ b/certmanager/lib/kleo/enum.cpp
@@ -64,7 +64,7 @@ const char * Kleo::cryptoMessageFormatToString( Kleo::CryptoMessageFormat f ) {
   for ( unsigned int i = 0 ; i < numCryptoMessageFormats ; ++i )
     if ( f == cryptoMessageFormats[i].format )
       return cryptoMessageFormats[i].configName;
-  return 0;
+  return nullptr;
 }
 
 TQStringList Kleo::cryptoMessageFormatsToStringList( unsigned int f ) {
@@ -105,7 +105,7 @@ const char* Kleo::encryptionPreferenceToString( EncryptionPreference pref )
 {
   switch( pref ) {
   case UnknownPreference:
-    return 0;
+    return nullptr;
   case NeverEncrypt:
     return "never";
   case AlwaysEncrypt:
@@ -117,7 +117,7 @@ const char* Kleo::encryptionPreferenceToString( EncryptionPreference pref )
   case AskWheneverPossible:
     return "askWhenPossible";
   }
-  return 0; // keep the compiler happy
+  return nullptr; // keep the compiler happy
 }
 
 Kleo::EncryptionPreference Kleo::stringToEncryptionPreference( const TQString& str )
@@ -157,7 +157,7 @@ const char* Kleo::signingPreferenceToString( SigningPreference pref )
 {
   switch( pref ) {
   case UnknownSigningPreference:
-    return 0;
+    return nullptr;
   case NeverSign:
     return "never";
   case AlwaysSign:
@@ -169,7 +169,7 @@ const char* Kleo::signingPreferenceToString( SigningPreference pref )
   case AskSigningWheneverPossible:
     return "askWhenPossible";
   }
-  return 0; // keep the compiler happy
+  return nullptr; // keep the compiler happy
 }
 
 Kleo::SigningPreference Kleo::stringToSigningPreference( const TQString& str )
diff --git a/certmanager/lib/kleo/hierarchicalkeylistjob.cpp b/certmanager/lib/kleo/hierarchicalkeylistjob.cpp
index 03bb267f1..159c11d9f 100644
--- a/certmanager/lib/kleo/hierarchicalkeylistjob.cpp
+++ b/certmanager/lib/kleo/hierarchicalkeylistjob.cpp
@@ -56,14 +56,14 @@
 
 Kleo::HierarchicalKeyListJob::HierarchicalKeyListJob( const CryptoBackend::Protocol * protocol,
 						      bool remote, bool includeSigs, bool validating )
-  : KeyListJob( 0, "Kleo::HierarchicalKeyListJob" ),
+  : KeyListJob( nullptr, "Kleo::HierarchicalKeyListJob" ),
     mProtocol( protocol ),
     mRemote( remote ),
     mIncludeSigs( includeSigs ),
     mValidating( validating ),
     mTruncated( false ),
     mIntermediateResult(),
-    mJob( 0 )
+    mJob( nullptr )
 {
   assert( protocol );
 }
@@ -105,7 +105,7 @@ void Kleo::HierarchicalKeyListJob::slotCancel() {
 }
 
 void Kleo::HierarchicalKeyListJob::slotResult( const GpgME::KeyListResult & res ) {
-  mJob = 0;
+  mJob = nullptr;
   mIntermediateResult.mergeWith( res );
   std::set<TQString> tmp;
   std::set_difference( mNextSet.begin(), mNextSet.end(),
diff --git a/certmanager/lib/kleo/job.h b/certmanager/lib/kleo/job.h
index 52630c30f..a87e94ebf 100644
--- a/certmanager/lib/kleo/job.h
+++ b/certmanager/lib/kleo/job.h
@@ -69,7 +69,7 @@ namespace Kleo {
   public:
     ~Job();
 
-    virtual void showErrorDialog( TQWidget * parent=0, const TQString & caption=TQString() ) const;
+    virtual void showErrorDialog( TQWidget * parent=nullptr, const TQString & caption=TQString() ) const;
 
     virtual TQString auditLogAsHtml() const;
     virtual GpgME::Error auditLogError() const;
diff --git a/certmanager/lib/kleo/keyfiltermanager.cpp b/certmanager/lib/kleo/keyfiltermanager.cpp
index 2c5b5a350..78db53392 100644
--- a/certmanager/lib/kleo/keyfiltermanager.cpp
+++ b/certmanager/lib/kleo/keyfiltermanager.cpp
@@ -64,10 +64,10 @@ struct Kleo::KeyFilterManager::Private {
   TQValueVector<KeyFilter*> filters;
 };
 
-Kleo::KeyFilterManager * Kleo::KeyFilterManager::mSelf = 0;
+Kleo::KeyFilterManager * Kleo::KeyFilterManager::mSelf = nullptr;
 
 Kleo::KeyFilterManager::KeyFilterManager( TQObject * parent, const char * name )
-  : TQObject( parent, name ), d( 0 )
+  : TQObject( parent, name ), d( nullptr )
 {
   mSelf = this;
   d = new Private();
@@ -78,10 +78,10 @@ Kleo::KeyFilterManager::KeyFilterManager( TQObject * parent, const char * name )
 }
 
 Kleo::KeyFilterManager::~KeyFilterManager() {
-  mSelf = 0;
+  mSelf = nullptr;
   if ( d )
     d->clear();
-  delete d; d = 0;
+  delete d; d = nullptr;
 }
 
 Kleo::KeyFilterManager * Kleo::KeyFilterManager::instance() {
@@ -94,7 +94,7 @@ const Kleo::KeyFilter * Kleo::KeyFilterManager::filterMatching( const GpgME::Key
   for ( TQValueVector<KeyFilter*>::const_iterator it = d->filters.begin() ; it != d->filters.end() ; ++it )
     if ( (*it)->matches( key ) )
       return *it;
-  return 0;
+  return nullptr;
 }
 
 static inline bool by_increasing_specificity( const Kleo::KeyFilter * left, const Kleo::KeyFilter * right ) {
diff --git a/certmanager/lib/kleo/keyfiltermanager.h b/certmanager/lib/kleo/keyfiltermanager.h
index 40f3687d3..35b048ce0 100644
--- a/certmanager/lib/kleo/keyfiltermanager.h
+++ b/certmanager/lib/kleo/keyfiltermanager.h
@@ -49,7 +49,7 @@ namespace Kleo {
     TQ_OBJECT
   
   protected:
-    KeyFilterManager( TQObject * parent=0, const char * name=0 );
+    KeyFilterManager( TQObject * parent=nullptr, const char * name=nullptr );
     ~KeyFilterManager();
 
   public:
diff --git a/certmanager/lib/kleo/multideletejob.cpp b/certmanager/lib/kleo/multideletejob.cpp
index 9aafdd79a..64a117eaf 100644
--- a/certmanager/lib/kleo/multideletejob.cpp
+++ b/certmanager/lib/kleo/multideletejob.cpp
@@ -49,9 +49,9 @@
 #include <assert.h>
 
 Kleo::MultiDeleteJob::MultiDeleteJob( const CryptoBackend::Protocol * protocol )
-  : Job( 0, "Kleo::MultiDeleteJob" ),
+  : Job( nullptr, "Kleo::MultiDeleteJob" ),
     mProtocol( protocol ),
-    mJob( 0 )
+    mJob( nullptr )
 {
   assert( protocol );
 }
@@ -78,7 +78,7 @@ void Kleo::MultiDeleteJob::slotCancel() {
 }
 
 void Kleo::MultiDeleteJob::slotResult( const GpgME::Error & err ) {
-  mJob = 0;
+  mJob = nullptr;
   GpgME::Error error = err;
   if ( error || // error in last op
        mIt == mKeys.end() || // (shouldn't happen)
diff --git a/certmanager/lib/ui/adddirectoryservicedialogimpl.h b/certmanager/lib/ui/adddirectoryservicedialogimpl.h
index bc6af0100..1d76e1d9c 100644
--- a/certmanager/lib/ui/adddirectoryservicedialogimpl.h
+++ b/certmanager/lib/ui/adddirectoryservicedialogimpl.h
@@ -40,7 +40,7 @@ class AddDirectoryServiceDialogImpl : public AddDirectoryServiceDialog
   
 
 public:
-    AddDirectoryServiceDialogImpl( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
+    AddDirectoryServiceDialogImpl( TQWidget* parent = nullptr, const char* name = nullptr, bool modal = false, WFlags fl = 0 );
     ~AddDirectoryServiceDialogImpl();
 
 };
diff --git a/certmanager/lib/ui/backendconfigwidget.cpp b/certmanager/lib/ui/backendconfigwidget.cpp
index 43b1c13f5..10d49fe3c 100644
--- a/certmanager/lib/ui/backendconfigwidget.cpp
+++ b/certmanager/lib/ui/backendconfigwidget.cpp
@@ -76,7 +76,7 @@ namespace Kleo {
 class Kleo::BackendListView : public TDEListView
 {
 public:
-  BackendListView( BackendConfigWidget* parent, const char* name = 0 )
+  BackendListView( BackendConfigWidget* parent, const char* name = nullptr )
     : TDEListView( parent, name ) {}
 
   /// return backend for currently selected (/current) item. Used by Configure button.
@@ -160,12 +160,12 @@ private:
 const Kleo::CryptoBackend* Kleo::BackendListView::currentBackend() const {
   const TQListViewItem* curItem = currentItem();
   if ( !curItem ) // can't happen
-    return 0;
+    return nullptr;
   if ( lvi_cast<Kleo::ProtocolCheckListItem>( curItem ) )
     curItem = curItem->parent();
   if ( const Kleo::BackendListViewItem * blvi = lvi_cast<Kleo::BackendListViewItem>( curItem ) )
     return blvi->cryptoBackend();
-  return 0;
+  return nullptr;
 }
 
 // can't be const method due to TQListViewItemIterator (why?)
@@ -180,7 +180,7 @@ const Kleo::CryptoBackend* Kleo::BackendListView::chosenBackend( const char * pr
         if ( const BackendListViewItem * parItem = lvi_cast<BackendListViewItem>( it.current()->parent() ) )
           return parItem->cryptoBackend();
       }
-  return 0;
+  return nullptr;
 }
 
 void Kleo::BackendListView::deselectAll( const char * protocolName, TQCheckListItem* except )
@@ -197,7 +197,7 @@ void Kleo::BackendListView::deselectAll( const char * protocolName, TQCheckListI
 ////
 
 Kleo::BackendConfigWidget::BackendConfigWidget( CryptoBackendFactory * factory, TQWidget * parent, const char * name, WFlags f )
-  : TQWidget( parent, name, f ), d( 0 )
+  : TQWidget( parent, name, f ), d( nullptr )
 {
   assert( factory );
   d = new Private();
@@ -238,7 +238,7 @@ Kleo::BackendConfigWidget::BackendConfigWidget( CryptoBackendFactory * factory,
 }
 
 Kleo::BackendConfigWidget::~BackendConfigWidget() {
-  delete d; d = 0;
+  delete d; d = nullptr;
 }
 
 void Kleo::BackendConfigWidget::load() {
@@ -247,12 +247,12 @@ void Kleo::BackendConfigWidget::load() {
   unsigned int backendCount = 0;
 
   // populate the plugin list:
-  BackendListViewItem * top = 0;
+  BackendListViewItem * top = nullptr;
   for ( unsigned int i = 0 ; const CryptoBackend * b = d->backendFactory->backend( i ) ; ++i ) {
 
     top = new Kleo::BackendListViewItem( d->listView, top, b );
 
-    ProtocolCheckListItem * last = 0;
+    ProtocolCheckListItem * last = nullptr;
     for ( int i = 0 ; const char * name = b->enumerateProtocols( i ) ; ++i ) {
       const CryptoBackend::Protocol * protocol = b->protocol( name );
 
@@ -260,7 +260,7 @@ void Kleo::BackendConfigWidget::load() {
         last = new ProtocolCheckListItem( top, last, name, protocol );
         last->setOn( protocol == d->backendFactory->protocol( name ) );
       } else if ( b->supportsProtocol( name ) ) {
-        last = new ProtocolCheckListItem( top, last, name, 0 );
+        last = new ProtocolCheckListItem( top, last, name, nullptr );
         last->setOn( false );
         last->setEnabled( false );
       }
diff --git a/certmanager/lib/ui/backendconfigwidget.h b/certmanager/lib/ui/backendconfigwidget.h
index 7f9657730..fc7a4f00e 100644
--- a/certmanager/lib/ui/backendconfigwidget.h
+++ b/certmanager/lib/ui/backendconfigwidget.h
@@ -49,7 +49,7 @@ namespace Kleo {
     TQ_OBJECT
   
   public:
-    BackendConfigWidget( CryptoBackendFactory * factory, TQWidget * parent=0, const char * name=0, WFlags f=0 );
+    BackendConfigWidget( CryptoBackendFactory * factory, TQWidget * parent=nullptr, const char * name=nullptr, WFlags f=0 );
     ~BackendConfigWidget();
 
     void load();
diff --git a/certmanager/lib/ui/cryptoconfigdialog.h b/certmanager/lib/ui/cryptoconfigdialog.h
index f16ff948c..d3ebce712 100644
--- a/certmanager/lib/ui/cryptoconfigdialog.h
+++ b/certmanager/lib/ui/cryptoconfigdialog.h
@@ -48,7 +48,7 @@ namespace Kleo {
     TQ_OBJECT
   
   public:
-    CryptoConfigDialog( Kleo::CryptoConfig* config, TQWidget *parent = 0, const char* name = 0 );
+    CryptoConfigDialog( Kleo::CryptoConfig* config, TQWidget *parent = nullptr, const char* name = nullptr );
 
   protected:
     virtual void slotOk();
diff --git a/certmanager/lib/ui/cryptoconfigmodule.cpp b/certmanager/lib/ui/cryptoconfigmodule.cpp
index c6e5594fe..38706c318 100644
--- a/certmanager/lib/ui/cryptoconfigmodule.cpp
+++ b/certmanager/lib/ui/cryptoconfigmodule.cpp
@@ -83,7 +83,7 @@ static const KJanusWidget::Face determineJanusFace( const Kleo::CryptoConfig * c
 Kleo::CryptoConfigModule::CryptoConfigModule( Kleo::CryptoConfig* config, TQWidget * parent, const char * name )
   : KJanusWidget( parent, name, determineJanusFace( config ) ), mConfig( config )
 {
-  TQWidget * vbox = 0;
+  TQWidget * vbox = nullptr;
   if ( face() == Plain ) {
     vbox = plainPage();
     TQVBoxLayout * vlay = new TQVBoxLayout( vbox, 0, KDialog::spacingHint() );
@@ -314,12 +314,12 @@ CryptoConfigEntryGUI* Kleo::CryptoConfigEntryGUIFactory::createEntryGUI( CryptoC
     case Kleo::CryptoConfigEntry::ArgType_DirPath:
     case Kleo::CryptoConfigEntry::ArgType_String:
       kdWarning(5150) << "No widget implemented for list of type " << entry->argType() << endl;
-      return 0; // TODO when the need arises :)
+      return nullptr; // TODO when the need arises :)
     case Kleo::CryptoConfigEntry::ArgType_LDAPURL:
       return new CryptoConfigEntryLDAPURL( module, entry, entryName, glay, widget, name );
     }
     kdWarning(5150) << "No widget implemented for list of (unknown) type " << entry->argType() << endl;
-    return 0;
+    return nullptr;
   }
 
   switch( entry->argType() ) {
@@ -336,12 +336,12 @@ CryptoConfigEntryGUI* Kleo::CryptoConfigEntryGUIFactory::createEntryGUI( CryptoC
     return new CryptoConfigEntryDirPath( module, entry, entryName, glay, widget, name );
   case Kleo::CryptoConfigEntry::ArgType_LDAPURL:
       kdWarning(5150) << "No widget implemented for type " << entry->argType() << endl;
-      return 0; // TODO when the need arises :)
+      return nullptr; // TODO when the need arises :)
   case Kleo::CryptoConfigEntry::ArgType_String:
     return new CryptoConfigEntryLineEdit( module, entry, entryName, glay, widget, name );
   }
   kdWarning(5150) << "No widget implemented for (unknown) type " << entry->argType() << endl;
-  return 0;
+  return nullptr;
 }
 
 ////
@@ -637,7 +637,7 @@ void Kleo::CryptoConfigEntryLDAPURL::slotOpenDialog()
 {
   // I'm a bad boy and I do it all on the stack. Enough classes already :)
   // This is just a simple dialog around the directory-services-widget
-  KDialogBase dialog( mPushButton->parentWidget(), 0, true /*modal*/,
+  KDialogBase dialog( mPushButton->parentWidget(), nullptr, true /*modal*/,
                       i18n( "Configure LDAP Servers" ),
                       KDialogBase::Default|KDialogBase::Cancel|KDialogBase::Ok,
                       KDialogBase::Ok, true /*separator*/ );
diff --git a/certmanager/lib/ui/cryptoconfigmodule.h b/certmanager/lib/ui/cryptoconfigmodule.h
index dd0d34218..82186d892 100644
--- a/certmanager/lib/ui/cryptoconfigmodule.h
+++ b/certmanager/lib/ui/cryptoconfigmodule.h
@@ -49,7 +49,7 @@ namespace Kleo {
     TQ_OBJECT
   
   public:
-    CryptoConfigModule( Kleo::CryptoConfig* config, TQWidget * parent=0, const char * name=0 );
+    CryptoConfigModule( Kleo::CryptoConfig* config, TQWidget * parent=nullptr, const char * name=nullptr );
 
     bool hasError() const;
 
diff --git a/certmanager/lib/ui/cryptoconfigmodule_p.h b/certmanager/lib/ui/cryptoconfigmodule_p.h
index 652d2071b..5faa9eb82 100644
--- a/certmanager/lib/ui/cryptoconfigmodule_p.h
+++ b/certmanager/lib/ui/cryptoconfigmodule_p.h
@@ -62,7 +62,7 @@ namespace Kleo {
 
   public:
     CryptoConfigComponentGUI( CryptoConfigModule* module, Kleo::CryptoConfigComponent* component,
-                              TQWidget* parent, const char* name = 0 );
+                              TQWidget* parent, const char* name = nullptr );
 
     bool save();
     void load();
@@ -82,7 +82,7 @@ namespace Kleo {
 
   public:
     CryptoConfigGroupGUI( CryptoConfigModule* module, Kleo::CryptoConfigGroup* group,
-                          TQGridLayout * layout, TQWidget* parent, const char* name = 0 );
+                          TQGridLayout * layout, TQWidget* parent, const char* name = nullptr );
 
     bool save();
     void load();
@@ -102,7 +102,7 @@ namespace Kleo {
     static CryptoConfigEntryGUI* createEntryGUI(
       CryptoConfigModule* module,
       Kleo::CryptoConfigEntry* entry, const TQString& entryName,
-      TQGridLayout * layout, TQWidget* widget, const char* name = 0 );
+      TQGridLayout * layout, TQWidget* widget, const char* name = nullptr );
   };
 
   /**
@@ -115,7 +115,7 @@ namespace Kleo {
     CryptoConfigEntryGUI( CryptoConfigModule* module,
                           Kleo::CryptoConfigEntry* entry,
                           const TQString& entryName,
-                          const char* name = 0 );
+                          const char* name = nullptr );
     virtual ~CryptoConfigEntryGUI() {}
 
     void load() { doLoad(); mChanged = false; }
@@ -155,7 +155,7 @@ namespace Kleo {
                                Kleo::CryptoConfigEntry* entry,
                                const TQString& entryName,
                                TQGridLayout * layout,
-                               TQWidget* parent, const char* name = 0 );
+                               TQWidget* parent, const char* name = nullptr );
 
     virtual void doSave();
     virtual void doLoad();
@@ -175,7 +175,7 @@ namespace Kleo {
                            Kleo::CryptoConfigEntry* entry,
                            const TQString& entryName,
                            TQGridLayout * layout,
-                           TQWidget* parent, const char* name = 0 );
+                           TQWidget* parent, const char* name = nullptr );
 
     virtual void doSave();
     virtual void doLoad();
@@ -195,7 +195,7 @@ namespace Kleo {
                               Kleo::CryptoConfigEntry* entry,
                               const TQString& entryName,
                               TQGridLayout * layout,
-                              TQWidget* parent, const char* name = 0 );
+                              TQWidget* parent, const char* name = nullptr );
 
     virtual void doSave();
     virtual void doLoad();
@@ -215,7 +215,7 @@ namespace Kleo {
                           Kleo::CryptoConfigEntry* entry,
                           const TQString& entryName,
                           TQGridLayout * layout,
-                          TQWidget* parent, const char* name = 0 );
+                          TQWidget* parent, const char* name = nullptr );
 
     virtual void doSave();
     virtual void doLoad();
@@ -235,7 +235,7 @@ namespace Kleo {
                               Kleo::CryptoConfigEntry* entry,
                               const TQString& entryName,
                               TQGridLayout * layout,
-                              TQWidget* parent, const char* name = 0 );
+                              TQWidget* parent, const char* name = nullptr );
     virtual void doSave();
     virtual void doLoad();
   private:
@@ -255,7 +255,7 @@ namespace Kleo {
                                Kleo::CryptoConfigEntry* entry,
                                const TQString& entryName,
                                TQGridLayout * layout,
-                               TQWidget* parent, const char* name = 0 );
+                               TQWidget* parent, const char* name = nullptr );
     virtual void doSave();
     virtual void doLoad();
   private:
@@ -274,7 +274,7 @@ namespace Kleo {
                               Kleo::CryptoConfigEntry* entry,
                               const TQString& entryName,
                               TQGridLayout * layout,
-                              TQWidget* parent, const char* name = 0 );
+                              TQWidget* parent, const char* name = nullptr );
     virtual void doSave();
     virtual void doLoad();
   private slots:
diff --git a/certmanager/lib/ui/directoryserviceswidget.h b/certmanager/lib/ui/directoryserviceswidget.h
index 9a97c680d..f666c39f8 100644
--- a/certmanager/lib/ui/directoryserviceswidget.h
+++ b/certmanager/lib/ui/directoryserviceswidget.h
@@ -49,7 +49,7 @@ class TDE_EXPORT DirectoryServicesWidget : public DirectoryServicesWidgetBase
 public:
   DirectoryServicesWidget(
     Kleo::CryptoConfigEntry* configEntry,
-    TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+    TQWidget* parent = nullptr, const char* name = nullptr, WFlags fl = 0 );
   ~DirectoryServicesWidget();
 
   void load();
diff --git a/certmanager/lib/ui/dnattributeorderconfigwidget.cpp b/certmanager/lib/ui/dnattributeorderconfigwidget.cpp
index 38c4df9d2..bf8da2f85 100644
--- a/certmanager/lib/ui/dnattributeorderconfigwidget.cpp
+++ b/certmanager/lib/ui/dnattributeorderconfigwidget.cpp
@@ -75,7 +75,7 @@ static void prepare( TQListView * lv ) {
 }
 
 Kleo::DNAttributeOrderConfigWidget::DNAttributeOrderConfigWidget( DNAttributeMapper * mapper, TQWidget * parent, const char * name, WFlags f )
-  : TQWidget( parent, name, f ), d( 0 )
+  : TQWidget( parent, name, f ), d( nullptr )
 {
   assert( mapper );
   d = new Private();
@@ -144,7 +144,7 @@ Kleo::DNAttributeOrderConfigWidget::DNAttributeOrderConfigWidget( DNAttributeMap
 }
 
 Kleo::DNAttributeOrderConfigWidget::~DNAttributeOrderConfigWidget() {
-  delete d; d = 0;
+  delete d; d = nullptr;
 }
 
 void Kleo::DNAttributeOrderConfigWidget::load() {
@@ -157,7 +157,7 @@ void Kleo::DNAttributeOrderConfigWidget::load() {
   const TQStringList order = d->mapper->attributeOrder();
 
   // fill the RHS listview:
-  TQListViewItem * last = 0;
+  TQListViewItem * last = nullptr;
   for ( TQStringList::const_iterator it = order.begin() ; it != order.end() ; ++it ) {
     const TQString attr = (*it).upper();
     if ( attr == "_X_" ) {
diff --git a/certmanager/lib/ui/dnattributeorderconfigwidget.h b/certmanager/lib/ui/dnattributeorderconfigwidget.h
index a8fcf9340..c16eab651 100644
--- a/certmanager/lib/ui/dnattributeorderconfigwidget.h
+++ b/certmanager/lib/ui/dnattributeorderconfigwidget.h
@@ -48,7 +48,7 @@ namespace Kleo {
   
   public:
     /*! Use Kleo::DNAttributeMapper::instance()->configWidget( parent, name ) instead. */
-    DNAttributeOrderConfigWidget( DNAttributeMapper * mapper, TQWidget * parent=0, const char * name=0, WFlags f=0 );
+    DNAttributeOrderConfigWidget( DNAttributeMapper * mapper, TQWidget * parent=nullptr, const char * name=nullptr, WFlags f=0 );
     ~DNAttributeOrderConfigWidget();
 
     void load();
diff --git a/certmanager/lib/ui/kdhorizontalline.cpp b/certmanager/lib/ui/kdhorizontalline.cpp
index 2892a05e8..94f07d20d 100644
--- a/certmanager/lib/ui/kdhorizontalline.cpp
+++ b/certmanager/lib/ui/kdhorizontalline.cpp
@@ -154,7 +154,7 @@ void KDHorizontalLine::paintEvent( TQPaintEvent * e ) {
     if ( !style().styleHint( TQStyle::SH_UnderlineAccelerator, this ) )
       va |= NoAccel;
     style().drawItem( &paint, r, ShowPrefix | AlignHCenter | va, colorGroup(),
-                      isEnabled(), 0, mTitle, -1, ownPalette() ? 0 : &pen );
+                      isEnabled(), nullptr, mTitle, -1, ownPalette() ? nullptr : &pen );
     paint.setClipRegion( e->region().subtract( r ) ); // clip everything but title
   }
   drawFrame( &paint );
diff --git a/certmanager/lib/ui/kdhorizontalline.h b/certmanager/lib/ui/kdhorizontalline.h
index e9b9646f7..1d4897a5a 100644
--- a/certmanager/lib/ui/kdhorizontalline.h
+++ b/certmanager/lib/ui/kdhorizontalline.h
@@ -49,8 +49,8 @@ class KDHorizontalLine : public TQFrame {
   
   TQ_PROPERTY( TQString title READ title WRITE setTitle )
 public:
-  KDHorizontalLine( TQWidget * parent=0, const char * name=0,  WFlags f=0 );
-  KDHorizontalLine( const TQString & title, TQWidget * parent=0, const char * name=0,  WFlags f=0 );
+  KDHorizontalLine( TQWidget * parent=nullptr, const char * name=nullptr,  WFlags f=0 );
+  KDHorizontalLine( const TQString & title, TQWidget * parent=nullptr, const char * name=nullptr,  WFlags f=0 );
   ~KDHorizontalLine();
 
   TQString title() const { return mTitle; }
diff --git a/certmanager/lib/ui/keyapprovaldialog.cpp b/certmanager/lib/ui/keyapprovaldialog.cpp
index fd796b8dc..edd332bed 100644
--- a/certmanager/lib/ui/keyapprovaldialog.cpp
+++ b/certmanager/lib/ui/keyapprovaldialog.cpp
@@ -95,7 +95,7 @@ static TQStringList preferencesStrings() {
 
 
 struct Kleo::KeyApprovalDialog::Private {
-  Private() : selfRequester( 0 ), prefsChanged( false ) {}
+  Private() : selfRequester( nullptr ), prefsChanged( false ) {}
 
   Kleo::KeyRequester * selfRequester;
   TQStringList addresses;
@@ -109,7 +109,7 @@ Kleo::KeyApprovalDialog::KeyApprovalDialog( const std::vector<Item> & recipients
                                       TQWidget * parent, const char * name,
                                       bool modal )
   : KDialogBase( parent, name, modal, i18n("Encryption Key Approval"), Ok|Cancel, Ok ),
-    d( 0 )
+    d( nullptr )
 {
   assert( !recipients.empty() );
 
@@ -195,7 +195,7 @@ Kleo::KeyApprovalDialog::KeyApprovalDialog( const std::vector<Item> & recipients
 }
 
 Kleo::KeyApprovalDialog::~KeyApprovalDialog() {
-  delete d; d = 0;
+  delete d; d = nullptr;
 }
 
 std::vector<GpgME::Key> Kleo::KeyApprovalDialog::senderKeys() const {
diff --git a/certmanager/lib/ui/keyapprovaldialog.h b/certmanager/lib/ui/keyapprovaldialog.h
index 25c82fcf1..fcffadcc2 100644
--- a/certmanager/lib/ui/keyapprovaldialog.h
+++ b/certmanager/lib/ui/keyapprovaldialog.h
@@ -71,7 +71,7 @@ namespace Kleo {
 
     KeyApprovalDialog( const std::vector<Item> & recipients,
 		       const std::vector<GpgME::Key> & sender,
-		       TQWidget * parent=0, const char * name=0,
+		       TQWidget * parent=nullptr, const char * name=nullptr,
                        bool modal=true );
     ~KeyApprovalDialog();
 
diff --git a/certmanager/lib/ui/keylistview.cpp b/certmanager/lib/ui/keylistview.cpp
index af067b1ed..8b9ac736a 100644
--- a/certmanager/lib/ui/keylistview.cpp
+++ b/certmanager/lib/ui/keylistview.cpp
@@ -109,7 +109,7 @@ namespace {
 } // anon namespace
 
 struct Kleo::KeyListView::Private {
-  Private() : updateTimer( 0 ), itemToolTip( 0 ) {}
+  Private() : updateTimer( nullptr ), itemToolTip( nullptr ) {}
 
   std::vector<GpgME::Key> keyBuffer;
   TQTimer * updateTimer;
@@ -179,10 +179,10 @@ Kleo::KeyListView::~KeyListView() {
   clear();
   assert( d->itemMap.size() == 0 );
   // need to delete the tooltip ourselves, as ~TQToolTip isn't virtual :o
-  delete d->itemToolTip; d->itemToolTip = 0;
-  delete d; d = 0;
-  delete mColumnStrategy; mColumnStrategy = 0;
-  delete mDisplayStrategy; mDisplayStrategy = 0;
+  delete d->itemToolTip; d->itemToolTip = nullptr;
+  delete d; d = nullptr;
+  delete mColumnStrategy; mColumnStrategy = nullptr;
+  delete mDisplayStrategy; mDisplayStrategy = nullptr;
 }
 
 void Kleo::KeyListView::insertItem( TQListViewItem * qlvi ) {
@@ -274,7 +274,7 @@ void Kleo::KeyListView::doHierarchicalInsert( const GpgME::Key & key ) {
   const TQCString fpr = key.primaryFingerprint();
   if ( fpr.isEmpty() )
     return;
-  KeyListViewItem * item = 0;
+  KeyListViewItem * item = nullptr;
   if ( !key.isRoot() )
     if ( KeyListViewItem * parent = itemByFingerprint( key.chainID() ) ) {
       item = new KeyListViewItem( parent, key );
@@ -323,10 +323,10 @@ void Kleo::KeyListView::scatterGathered( TQListViewItem * start ) {
 
 Kleo::KeyListViewItem * Kleo::KeyListView::itemByFingerprint( const TQCString & s ) const {
   if ( s.isEmpty() )
-    return 0;
+    return nullptr;
   const std::map<TQCString,KeyListViewItem*>::const_iterator it = d->itemMap.find( s );
   if ( it == d->itemMap.end() )
-    return 0;
+    return nullptr;
   return it->second;
 }
   
@@ -422,7 +422,7 @@ void Kleo::KeyListViewItem::setKey( const GpgME::Key & key ) {
 
   // the ColumnStrategy operations might be very slow, so cache their
   // result here, where we're non-const :)
-  const Kleo::KeyListView::ColumnStrategy * cs = lv ? lv->columnStrategy() : 0 ;
+  const Kleo::KeyListView::ColumnStrategy * cs = lv ? lv->columnStrategy() : nullptr ;
   if ( !cs )
     return;
   const int numCols = lv ? lv->columns() : 0 ;
@@ -448,7 +448,7 @@ int Kleo::KeyListViewItem::compare( TQListViewItem * item, int col, bool ascendi
 }
 
 void Kleo::KeyListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ) {
-  const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : 0 ;
+  const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : nullptr ;
   if ( !ds ) {
     TQListViewItem::paintCell( p, cg, column, width, alignment );
     return;
@@ -529,7 +529,7 @@ TQString Kleo::SubkeyKeyListViewItem::toolTip( int col ) const {
 
 const TQPixmap * Kleo::SubkeyKeyListViewItem::pixmap( int col ) const {
   return listView() && listView()->columnStrategy()
-    ? listView()->columnStrategy()->subkeyPixmap( subkey(), col ) : 0 ;
+    ? listView()->columnStrategy()->subkeyPixmap( subkey(), col ) : nullptr ;
 }
 
 int Kleo::SubkeyKeyListViewItem::compare( TQListViewItem * item, int col, bool ascending ) const {
@@ -540,7 +540,7 @@ int Kleo::SubkeyKeyListViewItem::compare( TQListViewItem * item, int col, bool a
 }
 
 void Kleo::SubkeyKeyListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ) {
-  const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : 0 ;
+  const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : nullptr ;
   if ( !ds ) {
     TQListViewItem::paintCell( p, cg, column, width, alignment );
     return;
@@ -607,7 +607,7 @@ TQString Kleo::UserIDKeyListViewItem::toolTip( int col ) const {
 
 const TQPixmap * Kleo::UserIDKeyListViewItem::pixmap( int col ) const {
   return listView() && listView()->columnStrategy()
-    ? listView()->columnStrategy()->userIDPixmap( userID(), col ) : 0 ;
+    ? listView()->columnStrategy()->userIDPixmap( userID(), col ) : nullptr ;
 }
 
 int Kleo::UserIDKeyListViewItem::compare( TQListViewItem * item, int col, bool ascending ) const {
@@ -619,7 +619,7 @@ int Kleo::UserIDKeyListViewItem::compare( TQListViewItem * item, int col, bool a
 
 
 void Kleo::UserIDKeyListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ) {
-  const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : 0 ;
+  const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : nullptr ;
   if ( !ds ) {
     TQListViewItem::paintCell( p, cg, column, width, alignment );
     return;
@@ -686,7 +686,7 @@ TQString Kleo::SignatureKeyListViewItem::toolTip( int col ) const {
 
 const TQPixmap * Kleo::SignatureKeyListViewItem::pixmap( int col ) const {
   return listView() && listView()->columnStrategy()
-    ? listView()->columnStrategy()->signaturePixmap( signature(), col ) : 0 ;
+    ? listView()->columnStrategy()->signaturePixmap( signature(), col ) : nullptr ;
 }
 
 int Kleo::SignatureKeyListViewItem::compare( TQListViewItem * item, int col, bool ascending ) const {
@@ -697,7 +697,7 @@ int Kleo::SignatureKeyListViewItem::compare( TQListViewItem * item, int col, boo
 }
 
 void Kleo::SignatureKeyListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int alignment ) {
-  const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : 0 ;
+  const KeyListView::DisplayStrategy * ds = listView() ? listView()->displayStrategy() : nullptr ;
   if ( !ds ) {
     TQListViewItem::paintCell( p, cg, column, width, alignment );
     return;
diff --git a/certmanager/lib/ui/keylistview.h b/certmanager/lib/ui/keylistview.h
index 0db1b1e38..cb6f39163 100644
--- a/certmanager/lib/ui/keylistview.h
+++ b/certmanager/lib/ui/keylistview.h
@@ -50,13 +50,13 @@ namespace Kleo {
   TEMPLATE_TYPENAME(T)
   inline T * lvi_cast( TQListViewItem * item ) {
     return item && (item->rtti() & T::RTTI_MASK) == T::RTTI
-      ? static_cast<T*>( item ) : 0 ;
+      ? static_cast<T*>( item ) : nullptr ;
   }
 
   TEMPLATE_TYPENAME(T)
   inline const T * lvi_cast( const TQListViewItem * item ) {
     return item && (item->rtti() & T::RTTI_MASK) == T::RTTI
-      ? static_cast<const T*>( item ) : 0 ;
+      ? static_cast<const T*>( item ) : nullptr ;
   }
 #undef TEMPLATE_TYPENAME
 
@@ -213,22 +213,22 @@ namespace Kleo {
 
       virtual TQString text( const GpgME::Key & key, int column ) const = 0;
       virtual TQString toolTip( const GpgME::Key & key, int column ) const;
-      virtual const TQPixmap * pixmap( const GpgME::Key &, int ) const { return 0; }
+      virtual const TQPixmap * pixmap( const GpgME::Key &, int ) const { return nullptr; }
       virtual int compare( const GpgME::Key & key1, const GpgME::Key & key2, const int column ) const;
 
       virtual TQString subkeyText( const GpgME::Subkey &, int ) const { return TQString(); }
       virtual TQString subkeyToolTip( const GpgME::Subkey & subkey, int column ) const;
-      virtual const TQPixmap * subkeyPixmap( const GpgME::Subkey &, int ) const { return 0; }
+      virtual const TQPixmap * subkeyPixmap( const GpgME::Subkey &, int ) const { return nullptr; }
       virtual int subkeyCompare( const GpgME::Subkey & subkey1, const GpgME::Subkey & subkey2, const int column ) const;
 
       virtual TQString userIDText( const GpgME::UserID &, int ) const { return TQString(); }
       virtual TQString userIDToolTip( const GpgME::UserID & userID, int column ) const;
-      virtual const TQPixmap * userIDPixmap( const GpgME::UserID &, int ) const { return 0; }
+      virtual const TQPixmap * userIDPixmap( const GpgME::UserID &, int ) const { return nullptr; }
       virtual int userIDCompare( const GpgME::UserID & userID1, const GpgME::UserID & userID2, const int column ) const;
 
       virtual TQString signatureText( const GpgME::UserID::Signature &, int ) const { return TQString(); }
       virtual TQString signatureToolTip( const GpgME::UserID::Signature & sig, int column ) const;
-      virtual const TQPixmap * signaturePixmap( const GpgME::UserID::Signature &, int ) const { return 0; }
+      virtual const TQPixmap * signaturePixmap( const GpgME::UserID::Signature &, int ) const { return nullptr; }
       virtual int signatureCompare( const GpgME::UserID::Signature & sig1, const GpgME::UserID::Signature & sig2, const int column ) const;
     };
 
@@ -253,8 +253,8 @@ namespace Kleo {
     };
 
     KeyListView( const ColumnStrategy * strategy,
-		 const DisplayStrategy * display=0,
-		 TQWidget * parent=0, const char * name=0, WFlags f=0 );
+		 const DisplayStrategy * display=nullptr,
+		 TQWidget * parent=nullptr, const char * name=nullptr, WFlags f=0 );
 
     ~KeyListView();
 
diff --git a/certmanager/lib/ui/keyrequester.cpp b/certmanager/lib/ui/keyrequester.cpp
index 6dd1b05e5..04b1bf022 100644
--- a/certmanager/lib/ui/keyrequester.cpp
+++ b/certmanager/lib/ui/keyrequester.cpp
@@ -84,24 +84,24 @@
 Kleo::KeyRequester::KeyRequester( unsigned int allowedKeys, bool multipleKeys,
 				  TQWidget * parent, const char * name )
   : TQWidget( parent, name ),
-    mOpenPGPBackend( 0 ),
-    mSMIMEBackend( 0 ),
+    mOpenPGPBackend( nullptr ),
+    mSMIMEBackend( nullptr ),
     mMulti( multipleKeys ),
     mKeyUsage( allowedKeys ),
     mJobs( 0 ),
-    d( 0 )
+    d( nullptr )
 {
   init();
 }
 
 Kleo::KeyRequester::KeyRequester( TQWidget * parent, const char * name )
   : TQWidget( parent, name ),
-    mOpenPGPBackend( 0 ),
-    mSMIMEBackend( 0 ),
+    mOpenPGPBackend( nullptr ),
+    mSMIMEBackend( nullptr ),
     mMulti( false ),
     mKeyUsage( 0 ),
     mJobs( 0 ),
-    d( 0 )
+    d( nullptr )
 {
   init();
 }
@@ -380,8 +380,8 @@ unsigned int Kleo::KeyRequester::allowedKeys() const {
 
 void Kleo::KeyRequester::setAllowedKeys( unsigned int keyUsage ) {
   mKeyUsage = keyUsage;
-  mOpenPGPBackend = 0;
-  mSMIMEBackend = 0;
+  mOpenPGPBackend = nullptr;
+  mSMIMEBackend = nullptr;
 
   if ( mKeyUsage & KeySelectionDialog::OpenPGPKeys )
     mOpenPGPBackend = Kleo::CryptoBackendFactory::instance()->openpgp();
diff --git a/certmanager/lib/ui/keyrequester.h b/certmanager/lib/ui/keyrequester.h
index ba383335e..a9de0ed7c 100644
--- a/certmanager/lib/ui/keyrequester.h
+++ b/certmanager/lib/ui/keyrequester.h
@@ -78,9 +78,9 @@ namespace Kleo {
   
   public:
     KeyRequester( unsigned int allowedKeys, bool multipleKeys=false,
-		  TQWidget * parent=0, const char * name=0 );
+		  TQWidget * parent=nullptr, const char * name=nullptr );
     // Constructor for TQt Designer
-    KeyRequester( TQWidget * parent=0, const char * name=0 );
+    KeyRequester( TQWidget * parent=nullptr, const char * name=nullptr );
     ~KeyRequester();
 
     const GpgME::Key & key() const;
@@ -169,12 +169,12 @@ namespace Kleo {
      * Preferred constructor
      */
     EncryptionKeyRequester( bool multipleKeys=false, unsigned int proto=AllProtocols,
-			    TQWidget * parent=0, const char * name=0,
+			    TQWidget * parent=nullptr, const char * name=nullptr,
 			    bool onlyTrusted=true, bool onlyValid=true );
     /**
      * Constructor for TQt designer
      */
-    EncryptionKeyRequester( TQWidget * parent=0, const char * name=0 );
+    EncryptionKeyRequester( TQWidget * parent=nullptr, const char * name=nullptr );
     ~EncryptionKeyRequester();
 
     void setAllowedKeys( unsigned int proto, bool onlyTrusted=true, bool onlyValid=true );
@@ -202,12 +202,12 @@ namespace Kleo {
      * @param onlyValid only show valid keys
      */
     SigningKeyRequester( bool multipleKeys=false, unsigned int proto=AllProtocols,
-			 TQWidget * parent=0, const char * name=0,
+			 TQWidget * parent=nullptr, const char * name=nullptr,
 			 bool onlyTrusted=true, bool onlyValid=true );
     /**
      * Constructor for TQt designer
      */
-    SigningKeyRequester( TQWidget * parent=0, const char * name=0 );
+    SigningKeyRequester( TQWidget * parent=nullptr, const char * name=nullptr );
     ~SigningKeyRequester();
 
     /*
diff --git a/certmanager/lib/ui/keyselectiondialog.cpp b/certmanager/lib/ui/keyselectiondialog.cpp
index 969ba1496..fc6d97597 100644
--- a/certmanager/lib/ui/keyselectiondialog.cpp
+++ b/certmanager/lib/ui/keyselectiondialog.cpp
@@ -266,7 +266,7 @@ namespace {
 
   const TQPixmap * ColumnStrategy::pixmap( const GpgME::Key & key, int col ) const {
     if ( col != 0 ) {
-      return 0;
+      return nullptr;
     }
     // this key did not undergo a validating keylisting yet:
     if ( !( key.keyListMode() & GpgME::Context::Validate ) ) {
@@ -309,12 +309,12 @@ Kleo::KeySelectionDialog::KeySelectionDialog( const TQString & title,
 					      TQWidget * parent, const char * name,
 					      bool modal )
   : KDialogBase( parent, name, modal, title, Default|Ok|Cancel|Help, Ok ),
-    mOpenPGPBackend( 0 ),
-    mSMIMEBackend( 0 ),
-    mRememberCB( 0 ),
+    mOpenPGPBackend( nullptr ),
+    mSMIMEBackend( nullptr ),
+    mRememberCB( nullptr ),
     mSelectedKeys( selectedKeys ),
     mKeyUsage( keyUsage ),
-    mCurrentContextMenuItem( 0 )
+    mCurrentContextMenuItem( nullptr )
 {
   init( rememberChoice, extendedSelection, text, TQString() );
 }
@@ -329,14 +329,14 @@ Kleo::KeySelectionDialog::KeySelectionDialog( const TQString & title,
 					      TQWidget * parent, const char * name,
 					      bool modal )
   : KDialogBase( parent, name, modal, title, Default|Ok|Cancel|Help, Ok ),
-    mOpenPGPBackend( 0 ),
-    mSMIMEBackend( 0 ),
-    mRememberCB( 0 ),
+    mOpenPGPBackend( nullptr ),
+    mSMIMEBackend( nullptr ),
+    mRememberCB( nullptr ),
     mSelectedKeys( selectedKeys ),
     mKeyUsage( keyUsage ),
     mSearchText( initialQuery ),
     mInitialQuery( initialQuery ),
-    mCurrentContextMenuItem( 0 )
+    mCurrentContextMenuItem( nullptr )
 {
   init( rememberChoice, extendedSelection, text, initialQuery );
 }
@@ -350,13 +350,13 @@ Kleo::KeySelectionDialog::KeySelectionDialog( const TQString & title,
 					      TQWidget * parent, const char * name,
 					      bool modal )
   : KDialogBase( parent, name, modal, title, Default|Ok|Cancel|Help, Ok ),
-    mOpenPGPBackend( 0 ),
-    mSMIMEBackend( 0 ),
-    mRememberCB( 0 ),
+    mOpenPGPBackend( nullptr ),
+    mSMIMEBackend( nullptr ),
+    mRememberCB( nullptr ),
     mKeyUsage( keyUsage ),
     mSearchText( initialQuery ),
     mInitialQuery( initialQuery ),
-    mCurrentContextMenuItem( 0 )
+    mCurrentContextMenuItem( nullptr )
 {
   init( rememberChoice, extendedSelection, text, initialQuery );
 }
@@ -411,7 +411,7 @@ void Kleo::KeySelectionDialog::init( bool rememberChoice, bool extendedSelection
 	   this, TQ_SLOT(slotSearch(const TQString&)) );
   connect( mStartSearchTimer, TQ_SIGNAL(timeout()), TQ_SLOT(slotFilter()) );
 
-  mKeyListView = new KeyListView( new ColumnStrategy( mKeyUsage ), 0, page, "mKeyListView" );
+  mKeyListView = new KeyListView( new ColumnStrategy( mKeyUsage ), nullptr, page, "mKeyListView" );
   mKeyListView->setResizeMode( TQListView::LastColumn );
   mKeyListView->setRootIsDecorated( true );
   mKeyListView->setShowSortIndicator( true );
diff --git a/certmanager/lib/ui/keyselectiondialog.h b/certmanager/lib/ui/keyselectiondialog.h
index 60442558b..17746e8df 100644
--- a/certmanager/lib/ui/keyselectiondialog.h
+++ b/certmanager/lib/ui/keyselectiondialog.h
@@ -90,7 +90,7 @@ namespace Kleo {
                         unsigned int keyUsage=AllKeys,
                         bool extendedSelection=false,
 			bool rememberChoice=false,
-                        TQWidget * parent=0, const char * name=0,
+                        TQWidget * parent=nullptr, const char * name=nullptr,
                         bool modal=true );
     KeySelectionDialog( const TQString & title,
                         const TQString & text,
@@ -99,7 +99,7 @@ namespace Kleo {
                         unsigned int keyUsage=AllKeys,
                         bool extendedSelection=false,
 			bool rememberChoice=false,
-                        TQWidget * parent=0, const char * name=0,
+                        TQWidget * parent=nullptr, const char * name=nullptr,
                         bool modal=true );
     KeySelectionDialog( const TQString & title,
                         const TQString & text,
@@ -107,7 +107,7 @@ namespace Kleo {
                         unsigned int keyUsage=AllKeys,
                         bool extendedSelection=false,
 			bool rememberChoice=false,
-                        TQWidget * parent=0, const char * name=0,
+                        TQWidget * parent=nullptr, const char * name=nullptr,
                         bool modal=true );
     ~KeySelectionDialog();
 
@@ -145,7 +145,7 @@ namespace Kleo {
     }
     void slotKeyListResult( const GpgME::KeyListResult & );
     void slotSelectionChanged();
-    void slotCheckSelection() { slotCheckSelection( 0 ); }
+    void slotCheckSelection() { slotCheckSelection( nullptr ); }
     void slotCheckSelection( Kleo::KeyListViewItem * );
     void slotRMB( Kleo::KeyListViewItem *, const TQPoint & );
     void slotRecheckKey();
diff --git a/certmanager/lib/ui/messagebox.cpp b/certmanager/lib/ui/messagebox.cpp
index 689c094e5..725415cd2 100644
--- a/certmanager/lib/ui/messagebox.cpp
+++ b/certmanager/lib/ui/messagebox.cpp
@@ -77,7 +77,7 @@ class AuditLogViewer : public KDialogBase {
     // TQ_OBJECT
   
 public:
-    explicit AuditLogViewer( const TQString & log, TQWidget * parent=0, const char * name=0, WFlags f=0 )
+    explicit AuditLogViewer( const TQString & log, TQWidget * parent=nullptr, const char * name=nullptr, WFlags f=0 )
         : KDialogBase( parent, name, false, i18n("View GnuPG Audit Log"),
                        Close|User1|User2, Close, false, KGuiItem_save(), KGuiItem_copy() ),
           m_log( /* sic */ ),
@@ -320,6 +320,6 @@ void MessageBox::make( TQWidget * parent, TQMessageBox::Icon icon, const TQStrin
     if ( options & KMessageBox::PlainCaption )
         dialog->setPlainCaption( caption );
 
-    if ( KDialogBase::No == KMessageBox::createKMessageBox( dialog, icon, text, TQStringList(), TQString(), 0, options ) )
-        auditLog( 0, job );
+    if ( KDialogBase::No == KMessageBox::createKMessageBox( dialog, icon, text, TQStringList(), TQString(), nullptr, options ) )
+        auditLog( nullptr, job );
 }
diff --git a/certmanager/lib/ui/passphrasedialog.cpp b/certmanager/lib/ui/passphrasedialog.cpp
index 68837d38b..b4a9553d9 100644
--- a/certmanager/lib/ui/passphrasedialog.cpp
+++ b/certmanager/lib/ui/passphrasedialog.cpp
@@ -67,7 +67,7 @@ struct Kleo::PassphraseDialog::Private {
 
 Kleo::PassphraseDialog::PassphraseDialog( const TQString & msg, const TQString & caption,
 					  TQWidget * parent, const char * name, bool modal )
-  : KDialogBase( parent, name, modal, caption, Ok|Cancel, Ok ), d( 0 )
+  : KDialogBase( parent, name, modal, caption, Ok|Cancel, Ok ), d( nullptr )
 {
   d = new Private();
 
@@ -97,7 +97,7 @@ Kleo::PassphraseDialog::PassphraseDialog( const TQString & msg, const TQString &
 
 
 Kleo::PassphraseDialog::~PassphraseDialog() {
-  delete d; d = 0;
+  delete d; d = nullptr;
 }
 
 TQString Kleo::PassphraseDialog::passphrase() const {
diff --git a/certmanager/lib/ui/passphrasedialog.h b/certmanager/lib/ui/passphrasedialog.h
index 15d0a157f..a07efec0a 100644
--- a/certmanager/lib/ui/passphrasedialog.h
+++ b/certmanager/lib/ui/passphrasedialog.h
@@ -59,7 +59,7 @@ namespace Kleo {
   public:
     PassphraseDialog( const TQString & description,
 		      const TQString & caption=TQString(),
-		      TQWidget * parent=0, const char * name=0,
+		      TQWidget * parent=nullptr, const char * name=nullptr,
                       bool modal=true );
     ~PassphraseDialog();
 
diff --git a/certmanager/lib/ui/progressbar.h b/certmanager/lib/ui/progressbar.h
index 4119a1d78..161441079 100644
--- a/certmanager/lib/ui/progressbar.h
+++ b/certmanager/lib/ui/progressbar.h
@@ -46,7 +46,7 @@ namespace Kleo {
     TQ_OBJECT
   
   public:
-    ProgressBar( TQWidget * parent=0, const char * name=0, WFlags f=0 );
+    ProgressBar( TQWidget * parent=nullptr, const char * name=nullptr, WFlags f=0 );
 
   public slots:
     void slotProgress( const TQString & message, int type, int current, int total );
diff --git a/certmanager/lib/ui/progressdialog.h b/certmanager/lib/ui/progressdialog.h
index 7414cb08a..4cf734d3b 100644
--- a/certmanager/lib/ui/progressdialog.h
+++ b/certmanager/lib/ui/progressdialog.h
@@ -48,7 +48,7 @@ namespace Kleo {
   
   public:
     ProgressDialog( Job * job, const TQString & baseText,
-		    TQWidget * creator=0, const char * name=0, WFlags f=0  );
+		    TQWidget * creator=nullptr, const char * name=nullptr, WFlags f=0  );
     ~ProgressDialog();
 
   public slots:
diff --git a/certmanager/main.cpp b/certmanager/main.cpp
index bccb8d477..21bd8097a 100644
--- a/certmanager/main.cpp
+++ b/certmanager/main.cpp
@@ -52,9 +52,9 @@ int main( int argc, char** argv )
 
   TDECmdLineArgs::init(argc, argv, &aboutData);
   static const TDECmdLineOptions options[] = {
-            { "external" , I18N_NOOP("Search for external certificates initially"), 0 },
-            { "query " , I18N_NOOP("Initial query string"), 0 },
-	    { "import-certificate ", I18N_NOOP("Name of certificate file to import"), 0 },
+            { "external" , I18N_NOOP("Search for external certificates initially"), nullptr },
+            { "query " , I18N_NOOP("Initial query string"), nullptr },
+	    { "import-certificate ", I18N_NOOP("Name of certificate file to import"), nullptr },
 	    TDECmdLineLastOption// End of options.
   };
   TDECmdLineArgs::addCmdLineOptions( options );
@@ -67,7 +67,7 @@ int main( int argc, char** argv )
   TDEGlobal::iconLoader()->addAppDir( "libkleopatra" );
 
   if( !Kleo::CryptoBackendFactory::instance()->smime() ) {
-    KMessageBox::error(0,
+    KMessageBox::error(nullptr,
 			i18n( "<qt>The crypto plugin could not be initialized.<br>"
 			      "Certificate Manager will terminate now.</qt>") );
     return -2;
diff --git a/libkpgp/kpgp.cpp b/libkpgp/kpgp.cpp
index 4602d7294..ff7a04357 100644
--- a/libkpgp/kpgp.cpp
+++ b/libkpgp/kpgp.cpp
@@ -47,7 +47,7 @@
 
 namespace Kpgp {
 
-Module *Module::kpgpObject = 0L;
+Module *Module::kpgpObject = nullptr;
 static KStaticDeleter<Module> kpgpod;
 
 Module::Module()
@@ -61,7 +61,7 @@ Module::Module()
     kdDebug(5100) << "creating new pgp object" << endl;
   }
   kpgpObject=kpgpod.setObject(Module::kpgpObject, this);
-  pgp = 0;
+  pgp = nullptr;
 
   config = new TDEConfig("kpgprc");
 
@@ -72,7 +72,7 @@ Module::~Module()
 {
   writeAddressData();
 
-  if (kpgpObject == this) kpgpObject = kpgpod.setObject( Module::kpgpObject, 0, false );
+  if (kpgpObject == this) kpgpObject = kpgpod.setObject( Module::kpgpObject, nullptr, false );
   clear(true);
   delete config;
   delete pgp;
@@ -100,7 +100,7 @@ Module::init()
   // the autodetection of PGP 2/6
   //assignPGPBase();
   delete pgp;
-  pgp=0;
+  pgp=nullptr;
 }
 
 
@@ -132,7 +132,7 @@ Module::writeConfig(bool sync)
   /// ### Why is the pgp object deleted? This is only necessary if the
   ///     PGP type was changed in the config dialog.
   delete pgp;
-  pgp = 0;
+  pgp = nullptr;
 }
 
 
@@ -180,7 +180,7 @@ Module::storePassPhrase(void) const
 int
 Module::prepare( bool needPassPhrase, Block* block )
 {
-  if (0 == pgp) assignPGPBase();
+  if (!pgp) assignPGPBase();
 
   if(!havePgp)
   {
@@ -193,7 +193,7 @@ Module::prepare( bool needPassPhrase, Block* block )
     return 0;
 
   if(needPassPhrase && !havePassPhrase) {
-    if( ( tGPG == pgpType ) && ( 0 != getenv("GPG_AGENT_INFO") ) ) {
+    if( tGPG == pgpType && getenv("GPG_AGENT_INFO") ) {
       // the user uses gpg-agent which asks itself for the passphrase
       kdDebug(5100) << "user uses gpg-agent -> don't ask for passphrase" << endl;
       // set dummy passphrase (because else signing doesn't work -> FIXME)
@@ -203,7 +203,7 @@ Module::prepare( bool needPassPhrase, Block* block )
       TQString ID;
       if( block )
         ID = block->requiredUserId();
-      PassphraseDialog passdlg(0, i18n("OpenPGP Security Check"), true, ID);
+      PassphraseDialog passdlg(nullptr, i18n("OpenPGP Security Check"), true, ID);
       TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
       int passdlgResult = passdlg.exec();
       TQApplication::restoreOverrideCursor();
@@ -241,7 +241,7 @@ Module::verify( Block& block )
 {
   int retval;
 
-  if (0 == pgp) assignPGPBase();
+  if (!pgp) assignPGPBase();
 
   // everything ready
   if( !prepare( false, &block ) )
@@ -262,7 +262,7 @@ Module::decrypt( Block& block )
 {
   int retval;
 
-  if (0 == pgp) assignPGPBase();
+  if (!pgp) assignPGPBase();
 
   do {
     // loop as long as the user enters a wrong passphrase and doesn't abort
@@ -275,7 +275,7 @@ Module::decrypt( Block& block )
     if( retval & BADPHRASE ) {
       wipePassPhrase();
       TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
-      int ret = KMessageBox::warningContinueCancel(0,
+      int ret = KMessageBox::warningContinueCancel(nullptr,
 	     i18n("You just entered an invalid passphrase.\n"
 		  "Do you want to try again, or "
 		  "cancel and view the message undecrypted?"),
@@ -313,7 +313,7 @@ Module::encrypt( Block& block,
   int status = 0;
   errMsg = "";
 
-  if( 0 == pgp ) assignPGPBase();
+  if(!pgp) assignPGPBase();
 
   setUser( keyId );
 
@@ -337,7 +337,7 @@ Module::encrypt( Block& block,
                        "Do you want to try again, continue and leave the "
                        "message unsigned, or cancel sending the message?");
     TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
-    int ret = KMessageBox::warningYesNoCancel( 0, str,
+    int ret = KMessageBox::warningYesNoCancel( nullptr, str,
                                                i18n("PGP Warning"),
                                                i18n("&Retry"),
                                                i18n("Send &Unsigned") );
@@ -366,7 +366,7 @@ Module::encrypt( Block& block,
                        "or cancel sending the message?")
                   .arg( pgp->lastErrorMessage() );
     TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
-    int ret = KMessageBox::warningContinueCancel( 0, str,
+    int ret = KMessageBox::warningContinueCancel( nullptr, str,
                                                   i18n("PGP Warning"),
                                                   i18n("Send &Unsigned") );
     TQApplication::restoreOverrideCursor();
@@ -385,7 +385,7 @@ Module::encrypt( Block& block,
                   .arg( pgp->lastErrorMessage() );
 
     TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
-    int ret = KMessageBox::warningYesNoCancel( 0, str,
+    int ret = KMessageBox::warningYesNoCancel( nullptr, str,
                                                i18n("PGP Warning"),
                                                i18n("Send &Encrypted"),
                                                i18n("Send &Unencrypted") );
@@ -411,7 +411,7 @@ Module::encrypt( Block& block,
                        "or cancel sending the message?")
                   .arg( pgp->lastErrorMessage() );
     TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
-    int ret = KMessageBox::warningContinueCancel( 0, str,
+    int ret = KMessageBox::warningContinueCancel( nullptr, str,
                                                   i18n("PGP Warning"),
                                                   i18n("&Send As-Is") );
     TQApplication::restoreOverrideCursor();
@@ -430,7 +430,7 @@ Module::encrypt( Block& block,
                       .arg( ( pgpType == tGPG ) ? "GnuPG" : "PGP" )
                       .arg( block.error().data() );
     TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
-    KMessageBox::detailedSorry( 0, errMsg, details );
+    KMessageBox::detailedSorry( nullptr, errMsg, details );
     TQApplication::restoreOverrideCursor();
     return Kpgp::Failure;
   }
@@ -453,7 +453,7 @@ Module::doEncSign( Block& block,
 {
   int retval = 0;
 
-  if( 0 == pgp ) assignPGPBase();
+  if(!pgp) assignPGPBase();
 
   // to avoid error messages in case pgp is not installed
   if( !havePgp ) return OK;
@@ -578,7 +578,7 @@ Module::getEncryptionKeys( KeyIDList& encryptionKeyIds,
                          "recipients of this message; therefore, the message "
                          "will not be encrypted.");
     TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
-    int ret = KMessageBox::warningContinueCancel( 0, str,
+    int ret = KMessageBox::warningContinueCancel( nullptr, str,
                                                   i18n("PGP Warning"),
                                                   i18n("Send &Unencrypted") );
     TQApplication::restoreOverrideCursor();
@@ -597,7 +597,7 @@ Module::getEncryptionKeys( KeyIDList& encryptionKeyIds,
                          "the recipients; these persons will not be able to "
                          "decrypt the message if you encrypt it." );
     TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
-    int ret = KMessageBox::warningYesNoCancel( 0, str,
+    int ret = KMessageBox::warningYesNoCancel( nullptr, str,
                                                i18n("PGP Warning"),
                                                i18n("Send &Encrypted"),
                                                i18n("Send &Unencrypted") );
@@ -617,7 +617,7 @@ Module::getEncryptionKeys( KeyIDList& encryptionKeyIds,
 int
 Module::encryptionPossible( const TQStringList& recipients )
 {
-  if( 0 == pgp ) assignPGPBase();
+  if(!pgp) assignPGPBase();
 
   if( !usePGP() )
     return 0;
@@ -675,7 +675,7 @@ Module::encryptionPossible( const TQStringList& recipients )
 bool
 Module::signKey(const KeyID& keyId)
 {
-  if (0 == pgp) assignPGPBase();
+  if (!pgp) assignPGPBase();
 
   if( prepare( true ) != 1 )
     return false;
@@ -691,7 +691,7 @@ Module::signKey(const KeyID& keyId)
 const KeyList
 Module::publicKeys()
 {
-  if (0 == pgp) assignPGPBase();
+  if (!pgp) assignPGPBase();
 
   if (!prepare()) return KeyList();
 
@@ -706,7 +706,7 @@ Module::publicKeys()
 const KeyList
 Module::secretKeys()
 {
-  if (0 == pgp) assignPGPBase();
+  if (!pgp) assignPGPBase();
 
   if (!prepare()) return KeyList();
 
@@ -728,7 +728,7 @@ Module::publicKey(const KeyID& keyID)
 	keyID == (*it)->primaryFingerprint() )
       return (*it);
 
-  return 0;
+  return nullptr;
 }
 
 Key*
@@ -740,7 +740,7 @@ Module::publicKey( const TQString& userID )
     if( (*it)->matchesUserID( userID ) )
       return (*it);
 
-  return 0;
+  return nullptr;
 }
 
 Key*
@@ -753,7 +753,7 @@ Module::secretKey(const KeyID& keyID)
 	keyID == (*it)->primaryFingerprint() )
       return (*it);
 
-  return 0;
+  return nullptr;
 }
 
 Validity
@@ -761,10 +761,10 @@ Module::keyTrust( const KeyID& keyID )
 {
   Key *key = publicKey( keyID );
 
-  if( ( 0 == key ) || ( key->keyTrust() == KPGP_VALIDITY_UNKNOWN ) )
+  if( !key || key->keyTrust() == KPGP_VALIDITY_UNKNOWN )
   { // (re)check the key if it's unknown or if its trust is unknown
     key = rereadKey( keyID, true );
-    if( key == 0 )
+    if(!key)
       return KPGP_VALIDITY_UNKNOWN;
   }
 
@@ -776,13 +776,13 @@ Module::keyTrust( const TQString& userID )
 {
   Key *key = publicKey( userID );
 
-  if( key == 0 )
+  if(!key)
     return KPGP_VALIDITY_UNKNOWN;
 
   if( key->keyTrust() == KPGP_VALIDITY_UNKNOWN )
   {
     key = rereadKey( key->primaryKeyID(), true );
-    if( key == 0 )
+    if(!key)
       return KPGP_VALIDITY_UNKNOWN;
   }
 
@@ -798,20 +798,20 @@ Module::isTrusted( const KeyID& keyID )
 Key*
 Module::rereadKey( const KeyID& keyID, const bool readTrust /* = true */ )
 {
-  if( 0 == pgp ) assignPGPBase();
+  if(!pgp) assignPGPBase();
 
   // search the old key data in the key list
   Key* oldKey = publicKey( keyID );
 
   Key* newKey = pgp->readPublicKey( keyID, readTrust, oldKey );
 
-  if( ( 0 == oldKey ) && ( 0 != newKey ) )
+  if( !oldKey && newKey )
   {
     mPublicKeys.inSort( newKey );
     kdDebug(5100) << "New public key 0x" << newKey->primaryKeyID() << " ("
                   << newKey->primaryUserID() << ")." << endl;
   }
-  else if( ( 0 != oldKey ) && ( 0 == newKey ) )
+  else if( oldKey && !newKey )
   { // the key has been deleted in the meantime
     kdDebug(5100) << "Public key 0x" << oldKey->primaryKeyID() << " ("
                   << oldKey->primaryUserID() << ") will be removed." << endl;
@@ -824,7 +824,7 @@ Module::rereadKey( const KeyID& keyID, const bool readTrust /* = true */ )
 TQCString
 Module::getAsciiPublicKey(const KeyID& keyID)
 {
-  if (0 == pgp) assignPGPBase();
+  if (!pgp) assignPGPBase();
 
   return pgp->getAsciiPublicKey(keyID);
 }
@@ -854,7 +854,7 @@ bool
 Module::changePassPhrase()
 {
   //FIXME...
-  KMessageBox::information(0,i18n("This feature is\nstill missing"));
+  KMessageBox::information(nullptr,i18n("This feature is\nstill missing"));
   return false;
 }
 
@@ -894,7 +894,7 @@ Module::selectSecretKey( const TQString& title,
                          const TQString& text,
                          const KeyID& keyId )
 {
-  if( 0 == pgp ) {
+  if(!pgp) {
     assignPGPBase();
   }
 
@@ -902,7 +902,7 @@ Module::selectSecretKey( const TQString& title,
     return selectKey( secretKeys(), title, text, keyId, SecretKeys );
   }
   else {
-    KMessageBox::sorry( 0, i18n("You either do not have GnuPG/PGP installed "
+    KMessageBox::sorry( nullptr, i18n("You either do not have GnuPG/PGP installed "
                                 "or you chose not to use GnuPG/PGP.") );
     return KeyID();
   }
@@ -915,7 +915,7 @@ Module::selectPublicKey( const TQString& title,
                          const TQString& address /* = TQString() */,
                          const unsigned int allowedKeys /* = AllKeys */ )
 {
-  if( 0 == pgp ) {
+  if(!pgp) {
     assignPGPBase();
   }
 
@@ -937,7 +937,7 @@ Module::selectPublicKey( const TQString& title,
     return keyId;
   }
   else {
-    KMessageBox::sorry( 0, i18n("You either do not have GnuPG/PGP installed "
+    KMessageBox::sorry( nullptr, i18n("You either do not have GnuPG/PGP installed "
                                 "or you chose not to use GnuPG/PGP.") );
     return KeyID();
   }
@@ -951,7 +951,7 @@ Module::selectPublicKeys( const TQString& title,
                           const TQString& address /* = TQString() */,
                           const unsigned int allowedKeys /* = AllKeys */ )
 {
-  if( 0 == pgp ) {
+  if(!pgp) {
     assignPGPBase();
   }
 
@@ -973,7 +973,7 @@ Module::selectPublicKeys( const TQString& title,
     return keyIds;
   }
   else {
-    KMessageBox::sorry( 0, i18n("You either do not have GnuPG/PGP installed "
+    KMessageBox::sorry( nullptr, i18n("You either do not have GnuPG/PGP installed "
                                 "or you chose not to use GnuPG/PGP.") );
     return KeyIDList();
   }
@@ -1086,7 +1086,7 @@ Module::prepareMessageForDecryption( const TQCString& msg,
 bool
 Module::haveTrustedEncryptionKey( const TQString& person )
 {
-  if( 0 == pgp ) assignPGPBase();
+  if(!pgp) assignPGPBase();
 
   if( !usePGP() ) return false;
 
@@ -1146,7 +1146,7 @@ Module::haveTrustedEncryptionKey( const TQString& person )
 KeyIDList
 Module::getEncryptionKeys( const TQString& person )
 {
-  if( 0 == pgp ) assignPGPBase();
+  if(!pgp) assignPGPBase();
 
   if( !usePGP() ) return KeyIDList();
 
@@ -1492,7 +1492,7 @@ Module::canonicalAddress( const TQString& _adress )
 void
 Module::readPublicKeys( bool reread )
 {
-  if( 0 == pgp ) assignPGPBase();
+  if(!pgp) assignPGPBase();
 
   if( !usePGP() )
   {
@@ -1535,7 +1535,7 @@ Module::readPublicKeys( bool reread )
 void
 Module::readSecretKeys( bool reread )
 {
-  if( 0 == pgp ) assignPGPBase();
+  if(!pgp) assignPGPBase();
 
   if( !usePGP() )
   {
diff --git a/libkpgp/kpgp.h b/libkpgp/kpgp.h
index 26f56cc8c..52189bc1b 100644
--- a/libkpgp/kpgp.h
+++ b/libkpgp/kpgp.h
@@ -340,7 +340,7 @@ private:
        0 (together with some warning message) if something is missing
       -1 if the passphrase dialog was canceled
   */
-  int prepare(bool needPassPhrase=false, Block* block = 0 );
+  int prepare(bool needPassPhrase=false, Block* block = nullptr );
 
   /** cleanup passphrase if it should not be stored. */
   void cleanupPass() { if (!storePass) wipePassPhrase(); }
diff --git a/libkpgp/kpgpbase.cpp b/libkpgp/kpgpbase.cpp
index a033a0b4a..93b6dfa7e 100644
--- a/libkpgp/kpgpbase.cpp
+++ b/libkpgp/kpgpbase.cpp
@@ -141,7 +141,7 @@ Base::run( const char *cmd, const TQString &passphrase, bool onlyReadFromPGP )
     dup2(perr[1], 2);
     close(perr[1]);
 
-    execl("/bin/sh", "sh", "-c", cmd,  (void *)0);
+    execl("/bin/sh", "sh", "-c", cmd,  (void *)nullptr);
     _exit(127);
   }
 
@@ -464,7 +464,7 @@ Base::runGpg( const char *cmd, const TQString &passphrase, bool onlyReadFromGnuP
   if (!passphrase.isEmpty()) {
     if( mVersion >= "1.0.7" ) {
       // GnuPG >= 1.0.7 supports the gpg-agent, so we look for it.
-      if( 0 == getenv("GPG_AGENT_INFO") ) {
+      if(!getenv("GPG_AGENT_INFO")) {
         // gpg-agent not found, so we tell gpg not to use the agent
         snprintf( gpgcmd, 1023,
                   "LANGUAGE=C gpg --no-use-agent --passphrase-fd %d %s",
@@ -509,7 +509,7 @@ Base::runGpg( const char *cmd, const TQString &passphrase, bool onlyReadFromGnuP
     if (!passphrase.isEmpty()) {
       if( mVersion >= "1.0.7" ) {
         // GnuPG >= 1.0.7 supports the gpg-agent, so we look for it.
-        if( 0 == getenv("GPG_AGENT_INFO") ) {
+        if(!getenv("GPG_AGENT_INFO")) {
           // gpg-agent not found, so we tell gpg not to use the agent
           snprintf( gpgcmd, 1023,
                     "LANGUAGE=C gpg --no-use-agent --passphrase-fd %d %s",
@@ -535,7 +535,7 @@ Base::runGpg( const char *cmd, const TQString &passphrase, bool onlyReadFromGnuP
 
     kdDebug(5100) << "pgp cmd = " << gpgcmd << endl;
 
-    execl("/bin/sh", "sh", "-c", gpgcmd,  (void *)0);
+    execl("/bin/sh", "sh", "-c", gpgcmd,  (void *)nullptr);
     _exit(127);
   }
 
diff --git a/libkpgp/kpgpbase.h b/libkpgp/kpgpbase.h
index 1dc0acf59..816c5af51 100644
--- a/libkpgp/kpgpbase.h
+++ b/libkpgp/kpgpbase.h
@@ -51,7 +51,7 @@ public:
   virtual int decrypt( Block& , const TQString& = TQString::null) { return OK; }
 
   /** Verifies the message. */
-  virtual int verify( Block& block ) { return decrypt( block, 0 ); }
+  virtual int verify( Block& block ) { return decrypt( block, nullptr ); }
   
 
   /** Reads the key data for the given key and returns it. If
@@ -60,8 +60,8 @@ public:
       key.
    */
   virtual Key* readPublicKey( const KeyID&, const bool = false,
-                              Key* = 0 )
-    { return 0; }
+                              Key* = nullptr )
+    { return nullptr; }
 
   /** Returns the list of public keys in the users public keyring. */
   virtual KeyList publicKeys( const TQStringList & = TQStringList() )
@@ -119,11 +119,11 @@ public:
   virtual int encsign( Block& block, const KeyIDList& recipients,
                        const TQString &passphrase = TQString::null );
   virtual int decrypt( Block& block, const TQString &passphrase = TQString::null );
-  virtual int verify( Block& block ) { return decrypt( block, 0 ); }
+  virtual int verify( Block& block ) { return decrypt( block, nullptr ); }
 
   virtual Key* readPublicKey( const KeyID& keyID,
                               const bool readTrust = false,
-                              Key* key = 0 );
+                              Key* key = nullptr );
   virtual KeyList publicKeys( const TQStringList & patterns = TQStringList() );
   virtual KeyList secretKeys( const TQStringList & patterns = TQStringList() );
   virtual TQCString getAsciiPublicKey( const KeyID& keyID );
@@ -135,7 +135,7 @@ protected:
   virtual KeyList parseKeyList( const TQCString&, bool );
 
 private:
-  Key* parsePublicKeyData( const TQCString& output, Key* key = 0 );
+  Key* parsePublicKeyData( const TQCString& output, Key* key = nullptr );
   void parseTrustDataForKey( Key* key, const TQCString& str );
 };
 
@@ -151,18 +151,18 @@ public:
   virtual int encsign( Block& block, const KeyIDList& recipients,
                        const TQString &passphrase = TQString::null );
   virtual int decrypt( Block& block, const TQString &passphrase = TQString::null );
-  virtual int verify( Block& block ) { return decrypt( block, 0 ); }
+  virtual int verify( Block& block ) { return decrypt( block, nullptr ); }
 
   virtual Key* readPublicKey( const KeyID& keyID,
                               const bool readTrust = false,
-                              Key* key = 0 );
+                              Key* key = nullptr );
   virtual KeyList publicKeys( const TQStringList & patterns = TQStringList() );
   virtual KeyList secretKeys( const TQStringList & patterns = TQStringList() );
   virtual TQCString getAsciiPublicKey( const KeyID& keyID );
   virtual int signKey( const KeyID& keyID, const TQString &passphrase );
 
 private:
-  Key* parseKeyData( const TQCString& output, int& offset, Key* key = 0 );
+  Key* parseKeyData( const TQCString& output, int& offset, Key* key = nullptr );
   KeyList parseKeyList( const TQCString&, bool );
 };
 
@@ -179,19 +179,19 @@ public:
   virtual int encsign( Block& block, const KeyIDList& recipients,
                        const TQString &passphrase = TQString::null );
   virtual int decrypt( Block& block, const TQString &passphrase = TQString::null );
-  virtual int verify( Block& block ) { return decrypt( block, 0 ); }
+  virtual int verify( Block& block ) { return decrypt( block, nullptr ); }
 
   virtual Key* readPublicKey( const KeyID& keyID,
                               const bool readTrust = false,
-                              Key* key = 0 );
+                              Key* key = nullptr );
   virtual KeyList publicKeys( const TQStringList & patterns = TQStringList() );
   virtual KeyList secretKeys( const TQStringList & patterns = TQStringList() );
   virtual TQCString getAsciiPublicKey( const KeyID& keyID );
   virtual int signKey( const KeyID& keyID, const TQString &passphrase );
 
 private:
-  Key* parseKeyData( const TQCString& output, int& offset, Key* key = 0 );
-  Key* parseSingleKey( const TQCString& output, Key* key = 0 );
+  Key* parseKeyData( const TQCString& output, int& offset, Key* key = nullptr );
+  Key* parseSingleKey( const TQCString& output, Key* key = nullptr );
   KeyList parseKeyList( const TQCString& output, bool );
   void parseTrustDataForKey( Key* key, const TQCString& str );
 };
@@ -205,11 +205,11 @@ public:
   virtual ~Base6();
 
   virtual int decrypt( Block& block, const TQString &passphrase = TQString::null );
-  virtual int verify( Block& block ) { return decrypt( block, 0 ); }
+  virtual int verify( Block& block ) { return decrypt( block, nullptr ); }
 
   virtual Key* readPublicKey( const KeyID& keyID,
                               const bool readTrust = false,
-                              Key* key = 0 );
+                              Key* key = nullptr );
   virtual KeyList publicKeys( const TQStringList & patterns = TQStringList() );
   virtual KeyList secretKeys( const TQStringList & patterns = TQStringList() );
 
@@ -219,8 +219,8 @@ protected:
   virtual KeyList parseKeyList( const TQCString &, bool );
 
 private:
-  Key* parseKeyData( const TQCString& output, int& offset, Key* key = 0 );
-  Key* parseSingleKey( const TQCString& output, Key* key = 0 );
+  Key* parseKeyData( const TQCString& output, int& offset, Key* key = nullptr );
+  Key* parseSingleKey( const TQCString& output, Key* key = nullptr );
   void parseTrustDataForKey( Key* key, const TQCString& str );
 };
 
diff --git a/libkpgp/kpgpbase2.cpp b/libkpgp/kpgpbase2.cpp
index 0ff728256..ee455b2af 100644
--- a/libkpgp/kpgpbase2.cpp
+++ b/libkpgp/kpgpbase2.cpp
@@ -50,7 +50,7 @@ Base2::~Base2()
 int
 Base2::encrypt( Block& block, const KeyIDList& recipients )
 {
-  return encsign( block, recipients, 0 );
+  return encsign( block, recipients, nullptr );
 }
 
 
@@ -471,28 +471,28 @@ Base2::readPublicKey( const KeyID& keyID,
 
   status = 0;
   exitStatus = run( PGP2 " +batchmode +language=en +verbose=0 -kvc -f 0x" +
-                    keyID, 0, true );
+                    keyID, nullptr, true );
 
   if(exitStatus != 0) {
     status = ERROR;
-    return 0;
+    return nullptr;
   }
 
   key = parsePublicKeyData( output, key );
 
-  if( key == 0 )
+  if(!key)
   {
-    return 0;
+    return nullptr;
   }
 
   if( readTrust )
   {
     exitStatus = run( PGP2 " +batchmode +language=en +verbose=0 -kc -f",
-                      0, true );
+                      nullptr, true );
 
     if(exitStatus != 0) {
       status = ERROR;
-      return 0;
+      return nullptr;
     }
 
     parseTrustDataForKey( key, error );
@@ -517,7 +517,7 @@ Base2::doGetPublicKeys( const TQCString & cmd, const TQStringList & patterns )
 
   status = 0;
   if ( patterns.isEmpty() ) {
-    exitStatus = run( cmd, 0, true );
+    exitStatus = run( cmd, nullptr, true );
 
     if ( exitStatus != 0 ) {
       status = ERROR;
@@ -534,7 +534,7 @@ Base2::doGetPublicKeys( const TQCString & cmd, const TQStringList & patterns )
     for ( TQStringList::ConstIterator it = patterns.begin();
           it != patterns.end(); ++it ) {
       exitStatus = run( cmd + " " + TDEProcess::quote( *it ).local8Bit(),
-                        0, true );
+                        nullptr, true );
 
       if ( exitStatus != 0 ) {
         status = ERROR;
@@ -601,7 +601,7 @@ TQCString Base2::getAsciiPublicKey(const KeyID& keyID)
 
   status = 0;
   exitStatus = run( PGP2 " +batchmode +force +language=en -kxaf 0x" + keyID,
-                    0, true );
+                    nullptr, true );
 
   if(exitStatus != 0) {
     status = ERROR;
@@ -615,7 +615,7 @@ TQCString Base2::getAsciiPublicKey(const KeyID& keyID)
 Key*
 Base2::parsePublicKeyData( const TQCString& output, Key* key /* = 0 */ )
 {
-  Subkey *subkey = 0;
+  Subkey *subkey = nullptr;
   int index;
 
   // search start of key data
@@ -631,7 +631,7 @@ Base2::parsePublicKeyData( const TQCString& output, Key* key /* = 0 */ )
     */
       index = output.find( "\npub" );
     if( index == -1 )
-      return 0;
+      return nullptr;
     else
       index++;
   }
@@ -658,7 +658,7 @@ Base2::parsePublicKeyData( const TQCString& output, Key* key /* = 0 */ )
 
       int pos, pos2;
 
-      if( key == 0 )
+      if(!key)
         key = new Key();
       else
         key->clear();
@@ -739,9 +739,9 @@ Base2::parsePublicKeyData( const TQCString& output, Key* key /* = 0 */ )
     else if( output[index] == ' ' )
     { // line contains additional key data
 
-      if( key == 0 )
+      if(!key)
         break;
-      assert( subkey != 0 );
+      assert(subkey);
 
       int pos = index + 1;
       while( output[pos] == ' ' )
@@ -820,7 +820,7 @@ Base2::parsePublicKeyData( const TQCString& output, Key* key /* = 0 */ )
 void
 Base2::parseTrustDataForKey( Key* key, const TQCString& str )
 {
-  if( ( key == 0 ) || str.isEmpty() )
+  if( !key || str.isEmpty() )
     return;
 
   TQCString keyID = key->primaryKeyID();
@@ -897,8 +897,8 @@ Base2::parseKeyList( const TQCString& output, bool secretKeys )
 {
   kdDebug(5100) << "Kpgp::Base2::parseKeyList()" << endl;
   KeyList keys;
-  Key *key = 0;
-  Subkey *subkey = 0;
+  Key *key = nullptr;
+  Subkey *subkey = nullptr;
   int index;
 
   // search start of key data
@@ -939,7 +939,7 @@ Base2::parseKeyList( const TQCString& output, bool secretKeys )
 
       int pos, pos2;
 
-      if( key != 0 ) // store the previous key in the key list
+      if(key) // store the previous key in the key list
 	keys.append( key );
 
       key = new Key();
@@ -1019,7 +1019,7 @@ Base2::parseKeyList( const TQCString& output, bool secretKeys )
     else if( output[index] == ' ' )
     { // line contains additional key data
 
-      if( key == 0 )
+      if(!key)
         break;
 
       int pos = index + 1;
@@ -1093,7 +1093,7 @@ Base2::parseKeyList( const TQCString& output, bool secretKeys )
     index = index2 + 1;
   }
 
-  if (key != 0) // store the last key in the key list
+  if (key) // store the last key in the key list
     keys.append( key );
 
   //kdDebug(5100) << "finished parsing keys" << endl;
diff --git a/libkpgp/kpgpbase5.cpp b/libkpgp/kpgpbase5.cpp
index fd8f4c2ab..106e07ddf 100644
--- a/libkpgp/kpgpbase5.cpp
+++ b/libkpgp/kpgpbase5.cpp
@@ -50,7 +50,7 @@ Base5::~Base5()
 int
 Base5::encrypt( Block& block, const KeyIDList& recipients )
 {
-  return encsign( block, recipients, 0 );
+  return encsign( block, recipients, nullptr );
 }
 
 
@@ -324,27 +324,27 @@ Base5::readPublicKey( const KeyID& keyId, const bool readTrust, Key* key )
   int exitStatus = 0;
 
   status = 0;
-  exitStatus = run( "pgpk -ll 0x" + keyId, 0, true );
+  exitStatus = run( "pgpk -ll 0x" + keyId, nullptr, true );
 
   if(exitStatus != 0) {
     status = ERROR;
-    return 0;
+    return nullptr;
   }
 
   key = parseSingleKey( output, key );
 
-  if( key == 0 )
+  if(!key)
   {
-    return 0;
+    return nullptr;
   }
 
   if( readTrust )
   {
-    exitStatus = run( "pgpk -c 0x" + keyId, 0, true );
+    exitStatus = run( "pgpk -c 0x" + keyId, nullptr, true );
 
     if(exitStatus != 0) {
       status = ERROR;
-      return 0;
+      return nullptr;
     }
 
     parseTrustDataForKey( key, output );
@@ -366,7 +366,7 @@ Base5::publicKeys( const TQStringList & patterns )
     cmd += TDEProcess::quote( *it ).local8Bit();
   }
   status = 0;
-  exitStatus = run( cmd, 0, true );
+  exitStatus = run( cmd, nullptr, true );
 
   if(exitStatus != 0) {
     status = ERROR;
@@ -396,7 +396,7 @@ Base5::secretKeys( const TQStringList & patterns )
     cmd += TDEProcess::quote( *it ).local8Bit();
   }
   status = 0;
-  exitStatus = run( cmd, 0, true );
+  exitStatus = run( cmd, nullptr, true );
 
   if(exitStatus != 0) {
     status = ERROR;
@@ -421,7 +421,7 @@ TQCString Base5::getAsciiPublicKey(const KeyID& keyID)
     return TQCString();
 
   status = 0;
-  exitStatus = run( "pgpk -xa 0x" + keyID, 0, true );
+  exitStatus = run( "pgpk -xa 0x" + keyID, nullptr, true );
 
   if(exitStatus != 0) {
     status = ERROR;
@@ -467,15 +467,15 @@ Base5::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
       ( strncmp( output.data() + offset, "sec", 3 ) != 0 ) )
   {
     kdDebug(5100) << "Unknown key type or corrupt key data." << endl;
-    return 0;
+    return nullptr;
   }
 
-  if( key == 0 )
+  if(!key)
     key = new Key();
   else
     key->clear();
 
-  Subkey *subkey = 0;
+  Subkey *subkey = nullptr;
   bool primaryKey = true;
 
   while( true )
@@ -658,7 +658,7 @@ Base5::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
       // remove white space from the fingerprint
       for ( int idx = 0 ; (idx = fingerprint.find(' ', idx)) >= 0 ; )
 	fingerprint.replace( idx, 1, "" );
-      assert( subkey != 0 );
+      assert(subkey);
       subkey->setFingerprint( fingerprint );
       //kdDebug(5100)<<"Fingerprint: "<<fingerprint<<endl;
     }
@@ -702,13 +702,13 @@ Base5::parseSingleKey( const TQCString& output, Key* key /* = 0 */ )
   {
     offset = output.find( "\nType Bits" ) + 1;
     if( offset == 0 )
-      return 0;
+      return nullptr;
   }
 
   // key data begins in the next line
   offset = output.find( '\n', offset ) + 1;
   if( offset == -1 )
-    return 0;
+    return nullptr;
 
   key = parseKeyData( output, offset, key );
 
@@ -722,7 +722,7 @@ KeyList
 Base5::parseKeyList( const TQCString& output, bool onlySecretKeys )
 {
   KeyList keys;
-  Key *key = 0;
+  Key *key = nullptr;
   int offset;
 
   // search start of header line
@@ -743,7 +743,7 @@ Base5::parseKeyList( const TQCString& output, bool onlySecretKeys )
   do
   {
     key = parseKeyData( output, offset );
-    if( key != 0 )
+    if(key)
     {
       // if only secret keys should be read test if the key is secret
       if( !onlySecretKeys || !key->secret() )
@@ -752,7 +752,7 @@ Base5::parseKeyList( const TQCString& output, bool onlySecretKeys )
       offset++;
     }
   }
-  while( key != 0 );
+  while(key);
 
   //kdDebug(5100) << "finished parsing keys" << endl;
 
@@ -763,7 +763,7 @@ Base5::parseKeyList( const TQCString& output, bool onlySecretKeys )
 void
 Base5::parseTrustDataForKey( Key* key, const TQCString& str )
 {
-  if( ( key == 0 ) || str.isEmpty() )
+  if( !key || str.isEmpty() )
     return;
 
   TQCString keyID = "0x" + key->primaryKeyID();
diff --git a/libkpgp/kpgpbase6.cpp b/libkpgp/kpgpbase6.cpp
index 59c85a2cd..4a8c36beb 100644
--- a/libkpgp/kpgpbase6.cpp
+++ b/libkpgp/kpgpbase6.cpp
@@ -194,28 +194,28 @@ Base6::readPublicKey( const KeyID& keyID,
 
   status = 0;
   exitStatus = run( PGP6 " +batchmode -compatible +verbose=0 +language=C -kvvc "
-                    "0x" + keyID, 0, true );
+                    "0x" + keyID, nullptr, true );
 
   if(exitStatus != 0) {
     status = ERROR;
-    return 0;
+    return nullptr;
   }
 
   key = parseSingleKey( output, key );
 
-  if( key == 0 )
+  if(!key)
   {
-    return 0;
+    return nullptr;
   }
 
   if( readTrust )
   {
     exitStatus = run( PGP6 " +batchmode -compatible +verbose=0 +language=C -kc "
-                      "0x" + keyID, 0, true );
+                      "0x" + keyID, nullptr, true );
 
     if(exitStatus != 0) {
       status = ERROR;
-      return 0;
+      return nullptr;
     }
 
     parseTrustDataForKey( key, output );
@@ -354,7 +354,7 @@ Base6::isVersion6()
 {
   int exitStatus = 0;
 
-  exitStatus = run( PGP6, 0, true );
+  exitStatus = run( PGP6, nullptr, true );
 
   if(exitStatus == -1) {
     errMsg = i18n("error running PGP");
@@ -385,10 +385,10 @@ Base6::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
       ( strncmp( output.data() + offset, "RSA", 3 ) != 0 ) )
   {
     kdDebug(5100) << "Unknown key type or corrupt key data." << endl;
-    return 0;
+    return nullptr;
   }
 
-  Subkey *subkey = 0;
+  Subkey *subkey = nullptr;
   bool firstLine = true;
   bool canSign = false;
   bool canEncr = false;
@@ -438,7 +438,7 @@ Base6::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
 
       int pos, pos2;
 
-      if( key == 0 )
+      if(!key)
         key = new Key();
       else
         key->clear();
@@ -559,7 +559,7 @@ Base6::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
         break; // here begins the next key's data
       //kdDebug(5100)<<"Secondary key data:" << endl;
 
-      if( key == 0 )
+      if(!key)
         break;
 
       bool sign = false;
@@ -644,7 +644,7 @@ Base6::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
     }
     else if( output[offset] == ' ' )
     { // line contains additional key data
-      if( key == 0 )
+      if(!key)
         break;
       //kdDebug(5100)<<"Additional key data:" << endl;
 
@@ -666,7 +666,7 @@ Base6::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
 	  fingerprint.replace( idx, 1, "" );
 
         //kdDebug(5100)<<"Fingerprint: "<<fingerprint<<endl;
-        assert( subkey != 0 );
+        assert(subkey);
         subkey->setFingerprint( fingerprint );
       }
       else
@@ -689,7 +689,7 @@ Base6::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
     offset = eol + 1;
   }
 
-  if( key != 0 )
+  if(key)
   {
     // set the global key capabilities
     key->setCanEncrypt( canEncr );
@@ -714,7 +714,7 @@ Base6::parseSingleKey( const TQCString& output, Key* key /* = 0 */ )
   {
     offset = output.find( "\nType bits" );
     if( offset == -1 )
-      return 0;
+      return nullptr;
     else
       offset += 10;
   }
@@ -722,7 +722,7 @@ Base6::parseSingleKey( const TQCString& output, Key* key /* = 0 */ )
   // key data begins in the next line
   offset = output.find( '\n', offset ) + 1;
   if( offset == 0 )
-    return 0;
+    return nullptr;
 
   key = parseKeyData( output, offset, key );
 
@@ -737,7 +737,7 @@ Base6::parseKeyList( const TQCString& output, bool secretKeys )
 {
   kdDebug(5100) << "Kpgp::Base6::parseKeyList()" << endl;
   KeyList keys;
-  Key *key = 0;
+  Key *key = nullptr;
   int offset;
 
   // search start of header line
@@ -758,13 +758,13 @@ Base6::parseKeyList( const TQCString& output, bool secretKeys )
   do
   {
     key = parseKeyData( output, offset );
-    if( key != 0 )
+    if(key)
     {
       key->setSecret( secretKeys );
       keys.append( key );
     }
   }
-  while( key != 0 );
+  while(key);
 
   //kdDebug(5100) << "finished parsing keys" << endl;
 
@@ -775,7 +775,7 @@ Base6::parseKeyList( const TQCString& output, bool secretKeys )
 void
 Base6::parseTrustDataForKey( Key* key, const TQCString& str )
 {
-  if( ( key == 0 ) || str.isEmpty() )
+  if( !key || str.isEmpty() )
     return;
 
   TQCString keyID = "0x" + key->primaryKeyID();
diff --git a/libkpgp/kpgpbaseG.cpp b/libkpgp/kpgpbaseG.cpp
index 71a6f1716..f8f9813b7 100644
--- a/libkpgp/kpgpbaseG.cpp
+++ b/libkpgp/kpgpbaseG.cpp
@@ -37,7 +37,7 @@ BaseG::BaseG()
   : Base()
 {
   // determine the version of gpg (the method is equivalent to gpgme's method)
-  runGpg( "--version", 0 );
+  runGpg( "--version", nullptr );
   int eol = output.find( '\n' );
   if( eol > 0 ) {
     int pos = output.findRev( ' ', eol - 1 );
@@ -57,7 +57,7 @@ BaseG::~BaseG()
 int
 BaseG::encrypt( Block& block, const KeyIDList& recipients )
 {
-  return encsign( block, recipients, 0 );
+  return encsign( block, recipients, nullptr );
 }
 
 
@@ -391,13 +391,13 @@ BaseG::readPublicKey( const KeyID& keyID,
 
   status = 0;
   if( readTrust )
-    exitStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode 0x" + keyID, 0, true );
+    exitStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode 0x" + keyID, nullptr, true );
   else
-    exitStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode --no-expensive-trust-checks 0x" + keyID, 0, true );
+    exitStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode --no-expensive-trust-checks 0x" + keyID, nullptr, true );
 
   if(exitStatus != 0) {
     status = ERROR;
-    return 0;
+    return nullptr;
   }
 
   int offset;
@@ -407,7 +407,7 @@ BaseG::readPublicKey( const KeyID& keyID,
   else {
     offset = output.find( "\npub:" );
     if( offset == -1 )
-      return 0;
+      return nullptr;
     else
       offset++;
   }
@@ -433,7 +433,7 @@ BaseG::publicKeys( const TQStringList & patterns )
     cmd += TDEProcess::quote( *it ).local8Bit();
   }
   status = 0;
-  exitStatus = runGpg( cmd, 0, true );
+  exitStatus = runGpg( cmd, nullptr, true );
 
   if(exitStatus != 0) {
     status = ERROR;
@@ -465,7 +465,7 @@ BaseG::secretKeys( const TQStringList & patterns )
     cmd += TDEProcess::quote( *it ).local8Bit();
   }
   status = 0;
-  exitStatus = runGpg( cmd, 0, true );
+  exitStatus = runGpg( cmd, nullptr, true );
 
   if(exitStatus != 0) {
     status = ERROR;
@@ -512,7 +512,7 @@ BaseG::getAsciiPublicKey(const KeyID& keyID)
     return TQCString();
 
   status = 0;
-  exitStatus = runGpg("--batch --armor --export 0x" + keyID, 0, true);
+  exitStatus = runGpg("--batch --armor --export 0x" + keyID, nullptr, true);
 
   if(exitStatus != 0) {
     status = ERROR;
@@ -537,10 +537,10 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
 
   if(    ( strncmp( output.data() + offset, "pub:", 4 ) != 0 )
       && ( strncmp( output.data() + offset, "sec:", 4 ) != 0 ) ) {
-    return 0;
+    return nullptr;
   }
 
-  if( key == 0 )
+  if(!key)
     key = new Key();
   else
     key->clear();
@@ -731,7 +731,7 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
           // because they shouldn't appear in user IDs
           for ( int idx = 0 ; (idx = uid.find( "\\x", idx )) >= 0 ; ++idx ) {
             char str[2] = "x";
-            str[0] = (char) TQString( uid.mid( idx + 2, 2 ) ).toShort( 0, 16 );
+            str[0] = (char) TQString( uid.mid( idx + 2, 2 ) ).toShort( nullptr, 16 );
             uid.replace( idx, 4, str );
           }
           TQString uidString = TQString::fromUtf8( uid.data() );
@@ -811,7 +811,7 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
     { // line contains a fingerprint
       // Example: fpr:::::::::17AFBAAF21064E513F037E6E63CB691DFAEBD5FC:
 
-      if (key == 0) // invalid key data
+      if (!key) // invalid key data
 	break;
 
       // search the fingerprint (it's in the 10th field)
@@ -837,7 +837,7 @@ KeyList
 BaseG::parseKeyList( const TQCString& output, bool secretKeys )
 {
   KeyList keys;
-  Key *key = 0;
+  Key *key = nullptr;
   int offset;
 
   // search start of key data
@@ -857,10 +857,10 @@ BaseG::parseKeyList( const TQCString& output, bool secretKeys )
 
   do {
     key = parseKeyData( output, offset );
-    if( key != 0 )
+    if(key)
       keys.append( key );
   }
-  while( key != 0 );
+  while(key);
 
   //kdDebug(5100) << "finished parsing keys" << endl;
 
diff --git a/libkpgp/kpgpblock.cpp b/libkpgp/kpgpblock.cpp
index f1c6a5aef..be395fc27 100644
--- a/libkpgp/kpgpblock.cpp
+++ b/libkpgp/kpgpblock.cpp
@@ -93,7 +93,7 @@ Block::decrypt()
 {
   Kpgp::Module *pgp = Kpgp::Module::getKpgp();
 
-  if( pgp == 0 )
+  if(!pgp)
     return false;
 
   return pgp->decrypt( *this );
@@ -104,7 +104,7 @@ Block::verify()
 {
   Kpgp::Module *pgp = Kpgp::Module::getKpgp();
 
-  if( pgp == 0 )
+  if(!pgp)
     return false;
 
   return pgp->verify( *this );
@@ -115,7 +115,7 @@ Block::clearsign( const TQCString& keyId, const TQCString& charset )
 {
   Kpgp::Module *pgp = Kpgp::Module::getKpgp();
 
-  if( pgp == 0 )
+  if(!pgp)
     return Kpgp::Failure;
 
   return pgp->clearsign( *this, keyId, charset );
@@ -127,7 +127,7 @@ Block::encrypt( const TQStringList& receivers, const TQCString& keyId,
 {
   Kpgp::Module *pgp = Kpgp::Module::getKpgp();
 
-  if( pgp == 0 )
+  if(!pgp)
     return Kpgp::Failure;
 
   return pgp->encrypt( *this, receivers, keyId, sign, charset );
diff --git a/libkpgp/kpgpkey.cpp b/libkpgp/kpgpkey.cpp
index 8a8ed48b8..127807bc5 100644
--- a/libkpgp/kpgpkey.cpp
+++ b/libkpgp/kpgpkey.cpp
@@ -73,7 +73,7 @@ Subkey::Subkey(const KeyID& keyID, const bool secret)
   mCanCertify = false;
   mKeyAlgo = 0;
   mKeyLen = 0;
-  mFingerprint = 0;
+  mFingerprint = nullptr;
   mTimestamp = 0;
   mExpiration = 0;
 }
@@ -227,7 +227,7 @@ void Key::addSubkey(const KeyID& keyID, const bool secret)
 Subkey *Key::getSubkey(const KeyID& keyID)
 {
   if (keyID.isEmpty() || mSubkeys.isEmpty())
-    return 0;
+    return nullptr;
   
   // is the given key ID a long (16 chars) or a short (8 chars) key ID?
   bool longKeyID = (keyID.length() == 16);
@@ -243,13 +243,13 @@ Subkey *Key::getSubkey(const KeyID& keyID)
     }
   }
 
-  return 0;
+  return nullptr;
 }
 
 void Key::setFingerprint(const KeyID& keyID, const TQCString &fpr)
 {
   Subkey *key;
-  if ((key = getSubkey(keyID)) != 0) {
+  if ((key = getSubkey(keyID)) != nullptr) {
     key->setFingerprint(fpr);
   }
   else
diff --git a/libkpgp/kpgpui.cpp b/libkpgp/kpgpui.cpp
index bea5aced3..e6c01e18b 100644
--- a/libkpgp/kpgpui.cpp
+++ b/libkpgp/kpgpui.cpp
@@ -59,7 +59,7 @@ namespace Kpgp {
 PassphraseDialog::PassphraseDialog( TQWidget *parent,
                                     const TQString &caption, bool modal,
                                     const TQString &keyID )
-  :KDialogBase( parent, 0, modal, caption, Ok|Cancel )
+  :KDialogBase( parent, nullptr, modal, caption, Ok|Cancel )
 {
   TQHBox *hbox = makeHBoxMainWidget();
   hbox->setSpacing( spacingHint() );
@@ -182,7 +182,7 @@ Config::Config( TQWidget *parent, const char *name, bool encrypt )
     TQWhatsThis::add( encToSelf, msg );
   }
   else
-    encToSelf = 0;
+    encToSelf = nullptr;
   showCipherText = new TQCheckBox( i18n("&Show signed/encrypted text after "
                                        "composing"),
                                   mpOptionsGroupBox );
@@ -209,7 +209,7 @@ Config::Config( TQWidget *parent, const char *name, bool encrypt )
     TQWhatsThis::add( showKeyApprovalDlg, msg );
 }
   else
-    showKeyApprovalDlg = 0;
+    showKeyApprovalDlg = nullptr;
 
   topLayout->addWidget( mpOptionsGroupBox );
 
@@ -228,10 +228,10 @@ Config::setValues()
 {
   // set default values
   storePass->setChecked( pgp->storePassPhrase() );
-  if( 0 != encToSelf )
+  if(encToSelf)
     encToSelf->setChecked( pgp->encryptToSelf() );
   showCipherText->setChecked( pgp->showCipherText() );
-  if( 0 != showKeyApprovalDlg )
+  if(showKeyApprovalDlg)
     showKeyApprovalDlg->setChecked( pgp->showKeyApprovalDlg() );
 
   int type = 0;
@@ -252,10 +252,10 @@ void
 Config::applySettings()
 {
   pgp->setStorePassPhrase(storePass->isChecked());
-  if( 0 != encToSelf )
+  if(encToSelf)
     pgp->setEncryptToSelf(encToSelf->isChecked());
   pgp->setShowCipherText(showCipherText->isChecked());
-  if( 0 != showKeyApprovalDlg )
+  if(showKeyApprovalDlg)
     pgp->setShowKeyApprovalDlg( showKeyApprovalDlg->isChecked() );
 
   Module::PGPType type;
@@ -287,9 +287,9 @@ KeySelectionDialog::KeySelectionDialog( const KeyList& keyList,
                                         TQWidget *parent, const char *name,
                                         bool modal )
   : KDialogBase( parent, name, modal, title, Default|Ok|Cancel, Ok ),
-    mRememberCB( 0 ),
+    mRememberCB( nullptr ),
     mAllowedKeys( allowedKeys ),
-    mCurrentContextMenuItem( 0 )
+    mCurrentContextMenuItem( nullptr )
 {
   if ( tdeApp )
     KWin::setIcons( winId(), tdeApp->icon(), tdeApp->miniIcon() );
@@ -367,7 +367,7 @@ KeySelectionDialog::KeySelectionDialog( const KeyList& keyList,
   }
   // make sure that the selected item is visible
   // (ensureItemVisible(...) doesn't work correctly in TQt 3.0.0)
-  if( lvi != 0 )
+  if(lvi)
     mListView->center( mListView->contentsX(), mListView->itemPos( lvi ) );
 
   if( extendedSelection ) {
@@ -418,7 +418,7 @@ KeyID KeySelectionDialog::key() const
 void KeySelectionDialog::initKeylist( const KeyList& keyList,
                                       const KeyIDList& keyIds )
 {
-  TQListViewItem* firstSelectedItem = 0;
+  TQListViewItem* firstSelectedItem = nullptr;
   mKeyIds.clear();
   mListView->clear();
 
@@ -431,7 +431,7 @@ void KeySelectionDialog::initKeylist( const KeyList& keyList,
 
     // select and open the given key
     if( keyIds.findIndex( curKeyId ) != -1 ) {
-      if( 0 == firstSelectedItem ) {
+      if(!firstSelectedItem) {
         firstSelectedItem = primaryUserID;
       }
       mListView->setSelected( primaryUserID, true );
@@ -482,7 +482,7 @@ void KeySelectionDialog::initKeylist( const KeyList& keyList,
     }
   }
 
-  if( 0 != firstSelectedItem ) {
+  if(firstSelectedItem) {
     mListView->setCurrentItem( firstSelectedItem );
   }
 }
@@ -602,7 +602,7 @@ TQString KeySelectionDialog::beautifyFingerprint( const TQCString& fpr ) const
 
 int KeySelectionDialog::keyValidity( const Kpgp::Key *key ) const
 {
-  if( 0 == key ) {
+  if(!key) {
     return -1;
   }
 
@@ -664,15 +664,15 @@ int KeySelectionDialog::keyValidity( const Kpgp::Key *key ) const
 void KeySelectionDialog::updateKeyInfo( const Kpgp::Key* key,
                                         TQListViewItem* lvi ) const
 {
-  if( 0 == lvi ) {
+  if(!lvi) {
     return;
   }
 
-  if( lvi->parent() != 0 ) {
+  if(lvi->parent()) {
     lvi = lvi->parent();
   }
 
-  if( 0 == key ) {
+  if(!key) {
     // the key doesn't exist anymore -> delete it from the list view
     while( lvi->firstChild() ) {
       kdDebug(5100) << "Deleting '" << lvi->firstChild()->text( 1 ) << "'" << endl;
@@ -681,7 +681,7 @@ void KeySelectionDialog::updateKeyInfo( const Kpgp::Key* key,
     kdDebug(5100) << "Deleting key 0x" << lvi->text( 0 ) << " ("
                   << lvi->text( 1 ) << ")" << endl;
     delete lvi;
-    lvi = 0;
+    lvi = nullptr;
     return;
   }
 
@@ -729,14 +729,14 @@ KeySelectionDialog::keyAdmissibility( TQListViewItem* lvi,
 
   Kpgp::Module *pgp = Kpgp::Module::getKpgp();
 
-  if( 0 == pgp ) {
+  if(!pgp) {
     return 0;
   }
 
   KeyID keyId = getKeyId( lvi );
   Kpgp::Key* key = pgp->publicKey( keyId );
 
-  if( 0 == key ) {
+  if(!key) {
     return 0;
   }
 
@@ -785,8 +785,8 @@ KeySelectionDialog::getKeyId( const TQListViewItem* lvi ) const
 {
   KeyID keyId;
 
-  if( 0 != lvi ) {
-    if( 0 != lvi->parent() ) {
+  if(lvi) {
+    if(lvi->parent()) {
       keyId = lvi->parent()->text(0).local8Bit();
     }
     else {
@@ -802,7 +802,7 @@ void KeySelectionDialog::slotRereadKeys()
 {
   Kpgp::Module *pgp = Kpgp::Module::getKpgp();
 
-  if( 0 == pgp ) {
+  if(!pgp) {
     return;
   }
 
@@ -894,7 +894,7 @@ void KeySelectionDialog::slotCheckSelection( TQListViewItem* plvi /* = 0 */ )
     enum { UNKNOWN, SELECTED, DESELECTED } userAction = UNKNOWN;
     // Iterate over the tree to find selected keys.
     for( TQListViewItem *lvi = mListView->firstChild();
-         0 != lvi;
+         lvi;
          lvi = lvi->nextSibling() ) {
       // We make sure that either all items belonging to a key are selected
       // or unselected. As it's possible to select/deselect multiple keys at
@@ -905,7 +905,7 @@ void KeySelectionDialog::slotCheckSelection( TQListViewItem* plvi /* = 0 */ )
       int itemCount = 1 + lvi->childCount();
       int selectedCount = lvi->isSelected() ? 1 : 0;
       for( TQListViewItem *clvi = lvi->firstChild();
-           0 != clvi;
+           clvi;
            clvi = clvi->nextSibling() ) {
         if( clvi->isSelected() ) {
           ++selectedCount;
@@ -954,7 +954,7 @@ void KeySelectionDialog::slotCheckSelection( TQListViewItem* plvi /* = 0 */ )
           // select all items of this key
           mListView->setSelected( lvi, true );
           for( TQListViewItem *clvi = lvi->firstChild();
-               0 != clvi;
+               clvi;
                clvi = clvi->nextSibling() ) {
             mListView->setSelected( clvi, true );
           }
@@ -973,7 +973,7 @@ void KeySelectionDialog::slotCheckSelection( TQListViewItem* plvi /* = 0 */ )
           // deselect all items of this key
           mListView->setSelected( lvi, false );
           for( TQListViewItem *clvi = lvi->firstChild();
-               0 != clvi;
+               clvi;
                clvi = clvi->nextSibling() ) {
             mListView->setSelected( clvi, false );
           }
@@ -995,11 +995,11 @@ void KeySelectionDialog::slotCheckSelection( TQListViewItem* plvi /* = 0 */ )
 
 bool KeySelectionDialog::checkKeys( const TQValueList<TQListViewItem*>& keys ) const
 {
-  KProgressDialog* pProgressDlg = 0;
+  KProgressDialog* pProgressDlg = nullptr;
   bool keysAllowed = true;
   kdDebug(5100) << "Checking keys..." << endl;
 
-  pProgressDlg = new KProgressDialog( 0, 0, i18n("Checking Keys"),
+  pProgressDlg = new KProgressDialog( nullptr, nullptr, i18n("Checking Keys"),
                                       i18n("Checking key 0xMMMMMMMM..."),
                                       true );
   pProgressDlg->setAllowCancel( false );
@@ -1020,7 +1020,7 @@ bool KeySelectionDialog::checkKeys( const TQValueList<TQListViewItem*>& keys ) c
   }
 
   delete pProgressDlg;
-  pProgressDlg = 0;
+  pProgressDlg = nullptr;
 
   return keysAllowed;
 }
@@ -1042,7 +1042,7 @@ void KeySelectionDialog::slotRMB( TQListViewItem* lvi, const TQPoint& pos, int )
 
 void KeySelectionDialog::slotRecheckKey()
 {
-  if( 0 != mCurrentContextMenuItem ) {
+  if(mCurrentContextMenuItem) {
     // force rereading the key
     keyAdmissibility( mCurrentContextMenuItem, ForceTrustCheck );
     // recheck the selection
@@ -1163,7 +1163,7 @@ KeyRequester::KeyRequester( TQWidget * parent, bool multipleKeys,
     mDialogMessage( i18n("Please select an OpenPGP key to use.") ),
     mMulti( multipleKeys ),
     mAllowedKeys( allowedKeys ),
-    d( 0 )
+    d( nullptr )
 {
   TQHBoxLayout * hlay = new TQHBoxLayout( this, 0, KDialog::spacingHint() );
 
@@ -1318,7 +1318,7 @@ KeyApprovalDialog::KeyApprovalDialog( const TQStringList& addresses,
 {
   Kpgp::Module *pgp = Kpgp::Module::getKpgp();
 
-  if( pgp == 0 )
+  if(!pgp)
     return;
 
   // ##### error handling
@@ -1386,7 +1386,7 @@ KeyApprovalDialog::KeyApprovalDialog( const TQStringList& addresses,
   else {
     mEncryptToSelf = 0;
     // insert dummy KeyIdListBox
-    mKeyIdsLabels.insert( 0, 0 );
+    mKeyIdsLabels.insert( 0, nullptr );
     //mKeyIdListBoxes.insert( 0, 0 );
   }
 
@@ -1515,7 +1515,7 @@ KeyApprovalDialog::slotChangeEncryptionKey( int nr )
   kdDebug(5100) << "Key approval dialog size is "
                 << width() << "x" << height() << endl;
 
-  if( pgp == 0 )
+  if(!pgp)
     return;
 
   if( !mEncryptToSelf )
@@ -1564,7 +1564,7 @@ KeyApprovalDialog::slotOk()
 {
   Kpgp::Module *pgp = Kpgp::Module::getKpgp();
 
-  if( pgp == 0 ) {
+  if(!pgp) {
     accept();
     return;
   }
diff --git a/libkpgp/kpgpui.h b/libkpgp/kpgpui.h
index 908881337..fbf7147f2 100644
--- a/libkpgp/kpgpui.h
+++ b/libkpgp/kpgpui.h
@@ -58,7 +58,7 @@ class TDE_EXPORT PassphraseDialog : public KDialogBase
   
 
   public:
-    PassphraseDialog( TQWidget *parent=0, const TQString &caption=TQString(),
+    PassphraseDialog( TQWidget *parent=nullptr, const TQString &caption=TQString(),
                       bool modal=true, const TQString &keyID=TQString());
     virtual ~PassphraseDialog();
 
@@ -79,7 +79,7 @@ class TDE_EXPORT Config : public TQWidget
   
 
   public:
-    Config(TQWidget *parent = 0, const char *name = 0, bool encrypt =true);
+    Config(TQWidget *parent = nullptr, const char *name = nullptr, bool encrypt =true);
     virtual ~Config();
 
     virtual void setValues();
@@ -121,7 +121,7 @@ class TDE_EXPORT KeySelectionDialog: public KeySelectionDialogSuper
                         const bool rememberChoice = false,
                         const unsigned int allowedKeys = AllKeys,
                         const bool extendedSelection = false,
-                        TQWidget *parent=0, const char *name=0,
+                        TQWidget *parent=nullptr, const char *name=nullptr,
                         bool modal=true );
     virtual ~KeySelectionDialog();
 
@@ -144,7 +144,7 @@ class TDE_EXPORT KeySelectionDialog: public KeySelectionDialogSuper
     virtual void slotRereadKeys();
     virtual void slotSelectionChanged( TQListViewItem* );
     virtual void slotSelectionChanged();
-    virtual void slotCheckSelection( TQListViewItem* = 0 );
+    virtual void slotCheckSelection( TQListViewItem* = nullptr );
     virtual void slotRMB( TQListViewItem*, const TQPoint&, int );
     virtual void slotRecheckKey();
     virtual void slotOk();
@@ -207,8 +207,8 @@ class TDE_EXPORT KeyRequester: public TQWidget
   
 
 public:
-  KeyRequester( TQWidget * parent=0, bool multipleKeys=false,
-		unsigned int allowedKeys=AllKeys, const char * name=0 );
+  KeyRequester( TQWidget * parent=nullptr, bool multipleKeys=false,
+		unsigned int allowedKeys=AllKeys, const char * name=nullptr );
   virtual ~KeyRequester();
 
   KeyIDList keyIDs() const;
@@ -258,8 +258,8 @@ class TDE_EXPORT PublicKeyRequester : public KeyRequester {
   TQ_OBJECT
   
 public:
-  PublicKeyRequester( TQWidget * parent=0, bool multipleKeys=false,
-		      unsigned int allowedKeys=PublicKeys, const char * name=0 );
+  PublicKeyRequester( TQWidget * parent=nullptr, bool multipleKeys=false,
+		      unsigned int allowedKeys=PublicKeys, const char * name=nullptr );
   virtual ~PublicKeyRequester();
 
 protected:
@@ -278,8 +278,8 @@ class TDE_EXPORT SecretKeyRequester : public KeyRequester {
   TQ_OBJECT
   
 public:
-  SecretKeyRequester( TQWidget * parent=0, bool multipleKeys=false,
-		      unsigned int allowedKeys=SecretKeys, const char * name=0 );
+  SecretKeyRequester( TQWidget * parent=nullptr, bool multipleKeys=false,
+		      unsigned int allowedKeys=SecretKeys, const char * name=nullptr );
   virtual ~SecretKeyRequester();
 
 protected:
@@ -304,7 +304,7 @@ class TDE_EXPORT KeyApprovalDialog: public KDialogBase
     KeyApprovalDialog( const TQStringList&,
                        const TQValueVector<KeyIDList>&,
                        const int allowedKeys,
-                       TQWidget *parent = 0, const char *name = 0,
+                       TQWidget *parent = nullptr, const char *name = nullptr,
                        bool modal = true );
     virtual ~KeyApprovalDialog() {};
 
@@ -338,7 +338,7 @@ class TDE_EXPORT CipherTextDialog: public KDialogBase
 
   public:
     CipherTextDialog( const TQCString & text, const TQCString & charset=0,
-                      TQWidget *parent=0, const char *name=0, bool modal=true );
+                      TQWidget *parent=nullptr, const char *name=nullptr, bool modal=true );
     virtual ~CipherTextDialog() {};
 
   private:
diff --git a/libkpimexchange/core/exchangeaccount.cpp b/libkpimexchange/core/exchangeaccount.cpp
index 6979bcc5a..348e2c58c 100644
--- a/libkpimexchange/core/exchangeaccount.cpp
+++ b/libkpimexchange/core/exchangeaccount.cpp
@@ -73,7 +73,7 @@ ExchangeAccount::ExchangeAccount( const TQString &host, const TQString &port,
 
   kdDebug() << "ExchangeAccount: mMailbox: " << mMailbox << endl;
 
-  mCalendarURL = 0;
+  mCalendarURL = nullptr;
 }
 
 ExchangeAccount::ExchangeAccount( const TQString& group )
@@ -199,7 +199,7 @@ bool ExchangeAccount::authenticate( int windowId )
   dcopClient->detach();
   delete dcopClient;
 
-  mCalendarURL = 0;
+  mCalendarURL = nullptr;
 
   calcFolderURLs();
 
@@ -250,7 +250,7 @@ void ExchangeAccount::slotFolderResult( TDEIO::Job *job )
     kdError() << "Error: Cannot get well-know folder names; " << job->error() << endl;
     TQString text = i18n("ExchangeAccount\nError accessing '%1': %2")
                    .arg( baseURL().prettyURL() ).arg( job->errorString() );
-    KMessageBox::error( 0, text );
+    KMessageBox::error( nullptr, text );
     mError = true;
     return;
   }
@@ -297,7 +297,7 @@ TQString ExchangeAccount::tryMailbox( const TQString &_url, const TQString &user
   url.setPass( password );
 
   TQString tmpFile;
-  if ( !TDEIO::NetAccess::download( url, tmpFile, 0 ) ) {
+  if ( !TDEIO::NetAccess::download( url, tmpFile, nullptr ) ) {
     kdWarning() << "Trying to find mailbox failed: not able to download " << url.prettyURL() << endl;
     return TQString();
   }
diff --git a/libkpimexchange/core/exchangeclient.cpp b/libkpimexchange/core/exchangeclient.cpp
index 6c75d030d..8ec533b1e 100644
--- a/libkpimexchange/core/exchangeclient.cpp
+++ b/libkpimexchange/core/exchangeclient.cpp
@@ -44,7 +44,7 @@ using namespace KPIM;
 
 ExchangeClient::ExchangeClient( ExchangeAccount *account,
                                 const TQString &timeZoneId )
-  : mWindow( 0 ), mTimeZoneId( timeZoneId )
+  : mWindow( nullptr ), mTimeZoneId( timeZoneId )
 {
   kdDebug() << "Creating ExchangeClient..." << endl;
   mAccount = account;
diff --git a/libkpimexchange/core/exchangedelete.cpp b/libkpimexchange/core/exchangedelete.cpp
index d9e8c1776..3602b9fa8 100644
--- a/libkpimexchange/core/exchangedelete.cpp
+++ b/libkpimexchange/core/exchangedelete.cpp
@@ -80,7 +80,7 @@ void ExchangeDelete::findUidSingleMaster( TQString const& uid )
 void ExchangeDelete::slotFindUidResult( TDEIO::Job * job )
 {
   if ( job->error() ) {
-    job->showErrorDialog( 0L );
+    job->showErrorDialog( nullptr );
     emit finished( this, ExchangeClient::CommunicationError, "IO Error: " + TQString::number(job->error()) + ":" + job->errorString() );
     return;
   }
@@ -111,7 +111,7 @@ void ExchangeDelete::slotDeleteResult( TDEIO::Job* job )
 {
   kdDebug() << "Finished Delete" << endl;
   if ( job->error() ) {
-    job->showErrorDialog( 0L );
+    job->showErrorDialog( nullptr );
     emit finished( this, ExchangeClient::CommunicationError, "IO Error: " + TQString::number(job->error()) + ":" + job->errorString() );
     return;
   }
diff --git a/libkpimexchange/core/exchangedelete.h b/libkpimexchange/core/exchangedelete.h
index 1ee3b7422..e0699819d 100644
--- a/libkpimexchange/core/exchangedelete.h
+++ b/libkpimexchange/core/exchangedelete.h
@@ -37,7 +37,7 @@ class TDE_EXPORT ExchangeDelete : public TQObject {
     TQ_OBJECT
   
   public:
-    ExchangeDelete( KCal::Event* event, ExchangeAccount* account, TQWidget* window=0 );
+    ExchangeDelete( KCal::Event* event, ExchangeAccount* account, TQWidget* window=nullptr );
     ~ExchangeDelete();
 
   private slots:
diff --git a/libkpimexchange/core/exchangedownload.cpp b/libkpimexchange/core/exchangedownload.cpp
index 035d8565e..b77c4df9c 100644
--- a/libkpimexchange/core/exchangedownload.cpp
+++ b/libkpimexchange/core/exchangedownload.cpp
@@ -68,8 +68,8 @@ ExchangeDownload::ExchangeDownload( ExchangeAccount *account, TQWidget *window )
 
   mAccount = account;
   mDownloadsBusy = 0;
-  mProgress = 0;
-  mCalendar = 0;
+  mProgress = nullptr;
+  mCalendar = nullptr;
   mFormat = new KCal::ICalFormat();
 }
 
@@ -84,7 +84,7 @@ void ExchangeDownload::download( KCal::Calendar *calendar, const TQDate &start,
                                  const TQDate &end, bool showProgress )
 {
   mCalendar = calendar;
-  mEvents = 0;
+  mEvents = nullptr;
 
   if( showProgress ) {
 #if 0
@@ -118,7 +118,7 @@ void ExchangeDownload::download( KCal::Calendar *calendar, const TQDate &start,
 
 void ExchangeDownload::download( const TQDate& start, const TQDate& end, bool showProgress )
 {
-  mCalendar = 0;
+  mCalendar = nullptr;
   mEvents = new TQPtrList<KCal::Event>;
 
   if( showProgress ) {
@@ -184,7 +184,7 @@ void ExchangeDownload::slotSearchResult( TDEIO::Job *job )
     TQString text = i18n("ExchangeDownload\nError accessing '%1': %2")
                    .arg( mAccount->calendarURL().prettyURL() )
                    .arg( job->errorString() );
-    KMessageBox::error( 0, text );
+    KMessageBox::error( nullptr, text );
     finishUp( ExchangeClient::CommunicationError, job );
     return;
   }
@@ -201,7 +201,7 @@ void ExchangeDownload::slotMasterResult( TDEIO::Job *job )
 {
   if ( job->error() ) {
     kdError() << "Error result for Master search: " << job->error() << endl;
-    job->showErrorDialog( 0 );
+    job->showErrorDialog( nullptr );
     finishUp( ExchangeClient::CommunicationError, job );
     return;
   }
@@ -359,7 +359,7 @@ void ExchangeDownload::slotPropFindResult( TDEIO::Job *job )
 
   int error = job->error();
   if ( error ) {
-    job->showErrorDialog( 0 );
+    job->showErrorDialog( nullptr );
     finishUp( ExchangeClient::CommunicationError, job );
     return;
   }
@@ -621,8 +621,8 @@ void ExchangeDownload::finishUp( int result, const TQString &moreInfo )
   if ( mCalendar ) mCalendar->setModified( true );
   // Disconnect from progress bar
   if ( mProgress ) {
-    disconnect( this, 0, mProgress, 0 );
-    disconnect( mProgress, 0, this, 0 );
+    disconnect( this, nullptr, mProgress, nullptr );
+    disconnect( mProgress, nullptr, this, nullptr );
     mProgress->delayedDestruct();
   }
 
diff --git a/libkpimexchange/core/exchangedownload.h b/libkpimexchange/core/exchangedownload.h
index f0b1dcdd8..0c7fac477 100644
--- a/libkpimexchange/core/exchangedownload.h
+++ b/libkpimexchange/core/exchangedownload.h
@@ -39,7 +39,7 @@ class ExchangeDownload : public TQObject {
     TQ_OBJECT
   
   public:
-    ExchangeDownload( ExchangeAccount* account, TQWidget* window=0 );
+    ExchangeDownload( ExchangeAccount* account, TQWidget* window=nullptr );
    ~ExchangeDownload();
 
     void download( KCal::Calendar* calendar, 
diff --git a/libkpimexchange/core/exchangemonitor.cpp b/libkpimexchange/core/exchangemonitor.cpp
index aadfb7c86..bab503912 100644
--- a/libkpimexchange/core/exchangemonitor.cpp
+++ b/libkpimexchange/core/exchangemonitor.cpp
@@ -86,7 +86,7 @@ ExchangeMonitor::ExchangeMonitor( ExchangeAccount* account, int pollMode, const
   mAccount = account;
   mSubscriptionLifetime = 3600; // by default, renew subscription every 3600 seconds or one hour
   mPollMode = pollMode;
-  mPollTimer = 0;
+  mPollTimer = nullptr;
 
   if ( pollMode == CallBack ) {
     mSocket = new TQSocketDevice( TQSocketDevice::Datagram );
@@ -188,7 +188,7 @@ void ExchangeMonitor::removeWatch( ID id )
 void ExchangeMonitor::slotSubscribeResult( TDEIO::Job * job )
 {
   if ( job->error() ) {
-    job->showErrorDialog( 0L );
+    job->showErrorDialog( nullptr );
     emit error( ExchangeClient::CommunicationError, "IO Error: " + TQString::number(job->error()) + ":" + job->errorString() );
     return;
   }
@@ -248,7 +248,7 @@ void ExchangeMonitor::slotSubscribeResult( TDEIO::Job * job )
 void ExchangeMonitor::slotUnsubscribeResult( TDEIO::Job * job )
 {
   if ( job->error() ) {
-    job->showErrorDialog( 0L );
+    job->showErrorDialog( nullptr );
     emit error( ExchangeClient::CommunicationError, "IO Error: " + TQString::number(job->error()) + ":" + job->errorString() );
     return;
   }
@@ -329,7 +329,7 @@ void ExchangeMonitor::poll( const IDList& IDs ) {
 void ExchangeMonitor::slotPollResult( TDEIO::Job * job )
 {
   if ( job->error() ) {
-    job->showErrorDialog( 0L );
+    job->showErrorDialog( nullptr );
     emit error( ExchangeClient::CommunicationError, "IO Error: " + TQString::number(job->error()) + ":" + job->errorString() );
     return;
   }
@@ -374,7 +374,7 @@ void ExchangeMonitor::slotRenewTimer()
 void ExchangeMonitor::slotRenewResult( TDEIO::Job* job )
 {
   if ( job->error() ) {
-    job->showErrorDialog( 0L );
+    job->showErrorDialog( nullptr );
     emit error( ExchangeClient::CommunicationError, "IO Error: " + TQString::number(job->error()) + ":" + job->errorString() );
     return;
   }
diff --git a/libkpimexchange/core/exchangeprogress.h b/libkpimexchange/core/exchangeprogress.h
index 078724495..cee085316 100644
--- a/libkpimexchange/core/exchangeprogress.h
+++ b/libkpimexchange/core/exchangeprogress.h
@@ -32,7 +32,7 @@ class ExchangeProgress : public KProgressDialog
   
   
   public:
-    ExchangeProgress(TQWidget *parent=0);
+    ExchangeProgress(TQWidget *parent=nullptr);
     virtual ~ExchangeProgress();
     
   public slots:
diff --git a/libkpimexchange/core/exchangeupload.cpp b/libkpimexchange/core/exchangeupload.cpp
index 8e49e0aa8..9c1469961 100644
--- a/libkpimexchange/core/exchangeupload.cpp
+++ b/libkpimexchange/core/exchangeupload.cpp
@@ -98,7 +98,7 @@ void ExchangeUpload::slotFindUidResult( TDEIO::Job * job )
 
   if ( job->error() ) {
     kdDebug() << "Error: " << job->error() << endl;
-    job->showErrorDialog( 0 );
+    job->showErrorDialog( nullptr );
     emit finished( this, ExchangeClient::CommunicationError,
                    "IO Error: " + TQString::number(job->error()) + ":" +
                    job->errorString() );
@@ -157,7 +157,7 @@ void ExchangeUpload::slotPropFindResult( TDEIO::Job *job )
   int error = job->error(); 
   kdDebug() << "PROPFIND error: " << error << ":" << job->errorString() << endl;
   if ( error && error != TDEIO::ERR_DOES_NOT_EXIST ) {
-    job->showErrorDialog( 0 );
+    job->showErrorDialog( nullptr );
     emit finished( this, ExchangeClient::CommunicationError,
                    "IO Error: " + TQString::number(error) + ":" +
                    job->errorString() );
@@ -340,7 +340,7 @@ void ExchangeUpload::slotPatchResult( TDEIO::Job *job )
 {
   kdDebug() << "slotPropPatchResult()" << endl;
   if ( job->error() ) {
-    job->showErrorDialog( 0 );
+    job->showErrorDialog( nullptr );
     kdDebug() << "Error: " << job->error() << endl;
     emit finished( this, ExchangeClient::CommunicationError,
                    "IO Error: " + TQString::number(job->error()) + ":" +
diff --git a/libkpimexchange/core/exchangeupload.h b/libkpimexchange/core/exchangeupload.h
index 6d5700979..4c42fa9e9 100644
--- a/libkpimexchange/core/exchangeupload.h
+++ b/libkpimexchange/core/exchangeupload.h
@@ -37,7 +37,7 @@ class TDE_EXPORT ExchangeUpload : public TQObject {
     TQ_OBJECT
   
   public:
-    ExchangeUpload( KCal::Event* event, ExchangeAccount* account, const TQString& timeZoneId, TQWidget* window=0 );
+    ExchangeUpload( KCal::Event* event, ExchangeAccount* account, const TQString& timeZoneId, TQWidget* window=nullptr );
     ~ExchangeUpload();
 
   private slots:
diff --git a/libksieve/impl/lexer.h b/libksieve/impl/lexer.h
index ee64745be..4d8d0a69f 100644
--- a/libksieve/impl/lexer.h
+++ b/libksieve/impl/lexer.h
@@ -118,7 +118,7 @@ namespace KSieve {
     bool parseQuotedString( TQString & result );
 
     struct State {
-      State( const char * s=0 )
+      State( const char * s=nullptr )
 	: cursor( s ), line( 0 ), beginOfLine( s ), error() {}
       const char * cursor;
       int line;
diff --git a/libksieve/parser/lexer.cpp b/libksieve/parser/lexer.cpp
index 0213f7d7f..ed7e23719 100644
--- a/libksieve/parser/lexer.cpp
+++ b/libksieve/parser/lexer.cpp
@@ -61,13 +61,13 @@ namespace KSieve {
   //
 
   Lexer::Lexer( const char * scursor, const char * send, int options )
-    : i( 0 )
+    : i( nullptr )
   {
     i = new Impl( scursor, send, options );
   }
 
   Lexer::~Lexer() {
-    delete i; i = 0;
+    delete i; i = nullptr;
   }
 
   bool Lexer::ignoreComments() const {
diff --git a/libksieve/parser/parser.cpp b/libksieve/parser/parser.cpp
index 68718c327..8704dd7bd 100644
--- a/libksieve/parser/parser.cpp
+++ b/libksieve/parser/parser.cpp
@@ -52,13 +52,13 @@ namespace KSieve {
   //
 
   Parser::Parser( const char * scursor, const char * const send, int options )
-    : i( 0 )
+    : i( nullptr )
   {
     i = new Impl( scursor, send, options );
   }
 
   Parser::~Parser() {
-    delete i; i = 0;
+    delete i; i = nullptr;
   }
 
   void Parser::setScriptBuilder( ScriptBuilder * builder ) {
@@ -116,7 +116,7 @@ namespace KSieve {
   Parser::Impl::Impl( const char * scursor, const char * const send, int options )
     : mToken( Lexer::None ),
       lexer( scursor, send, options ),
-      mBuilder( 0 )
+      mBuilder( nullptr )
   {
 
   }
diff --git a/libksieve/tests/lexertest.cpp b/libksieve/tests/lexertest.cpp
index d3e54ba67..6b0dfc0d1 100644
--- a/libksieve/tests/lexertest.cpp
+++ b/libksieve/tests/lexertest.cpp
@@ -460,7 +460,7 @@ int main( int argc, char * argv[]  ) {
 	if ( error )
 	  goto ErrorOut;
 	if ( t.expected[j].token == Lexer::None &&
-	     t.expected[j].result == 0 )
+	     !t.expected[j].result )
 	  break;
       }
       if ( !lexer.atEnd() ) {
diff --git a/libtdenetwork/gpgmepp/callbacks.cpp b/libtdenetwork/gpgmepp/callbacks.cpp
index 23cc55e82..7ed8cbc10 100644
--- a/libtdenetwork/gpgmepp/callbacks.cpp
+++ b/libtdenetwork/gpgmepp/callbacks.cpp
@@ -63,7 +63,7 @@ gpgme_error_t passphrase_callback( void * opaque, const char * uid_hint, const c
   PassphraseProvider * provider = static_cast<PassphraseProvider*>( opaque );
   bool canceled = false;
   gpgme_error_t err = GPG_ERR_NO_ERROR;
-  char * passphrase = provider ? provider->getPassphrase( uid_hint, desc, prev_was_bad, canceled ) : 0 ;
+  char * passphrase = provider ? provider->getPassphrase( uid_hint, desc, prev_was_bad, canceled ) : nullptr ;
   if ( canceled ) {
     err = makeError( GPG_ERR_CANCELED );
   }
diff --git a/libtdenetwork/gpgmepp/context.cpp b/libtdenetwork/gpgmepp/context.cpp
index 5c61bd531..82b028e7e 100644
--- a/libtdenetwork/gpgmepp/context.cpp
+++ b/libtdenetwork/gpgmepp/context.cpp
@@ -55,7 +55,7 @@ using std::endl;
 namespace GpgME {
 
   void initializeLibrary() {
-    gpgme_check_version( 0 );
+    gpgme_check_version( nullptr );
   }
 
   const char * Error::source() const {
@@ -87,29 +87,29 @@ namespace GpgME {
   }
 
   Context::~Context() {
-    delete d; d = 0;
+    delete d; d = nullptr;
   }
 
   Context * Context::createForProtocol( Protocol proto ) {
-    gpgme_ctx_t ctx = 0;
+    gpgme_ctx_t ctx = nullptr;
     if ( gpgme_new ( &ctx ) != 0 )
-      return 0;
+      return nullptr;
 
     switch ( proto ) {
     case OpenPGP:
       if ( gpgme_set_protocol( ctx, GPGME_PROTOCOL_OpenPGP ) != 0 ) {
 	gpgme_release( ctx );
-	return 0;
+	return nullptr;
       }
       break;
     case CMS:
       if ( gpgme_set_protocol( ctx, GPGME_PROTOCOL_CMS ) != 0 ) {
 	gpgme_release( ctx );
-	return 0;
+	return nullptr;
       }
       break;
     default:
-      return 0;
+      return nullptr;
     }
 
     return new Context( ctx );
@@ -175,21 +175,21 @@ namespace GpgME {
   }
 
   void Context::setProgressProvider( ProgressProvider * provider ) {
-    gpgme_set_progress_cb( d->ctx, provider ? &progress_callback : 0, provider );
+    gpgme_set_progress_cb( d->ctx, provider ? &progress_callback : nullptr, provider );
   }
   ProgressProvider * Context::progressProvider() const {
-    void * pp = 0;
+    void * pp = nullptr;
     gpgme_progress_cb_t pcb = &progress_callback;
     gpgme_get_progress_cb( d->ctx, &pcb, &pp );
     return static_cast<ProgressProvider*>( pp );
   }
 
   void Context::setPassphraseProvider( PassphraseProvider * provider ) {
-    gpgme_set_passphrase_cb( d->ctx, provider ? &passphrase_callback : 0, provider );
+    gpgme_set_passphrase_cb( d->ctx, provider ? &passphrase_callback : nullptr, provider );
   }
 
   PassphraseProvider * Context::passphraseProvider() const {
-    void * pp = 0;
+    void * pp = nullptr;
     gpgme_passphrase_cb_t pcb = &passphrase_callback;
     gpgme_get_passphrase_cb( d->ctx, &pcb, &pp );
     return static_cast<PassphraseProvider*>( pp );
@@ -210,7 +210,7 @@ namespace GpgME {
       EventLoopInteractor::instance()->unmanage( this );
   }
   bool Context::managedByEventLoopInteractor() const {
-    return d->iocbs != 0;
+    return d->iocbs != nullptr;
   }
 
 
@@ -224,10 +224,10 @@ namespace GpgME {
   }
 
   void Context::uninstallIOCallbacks() {
-    static gpgme_io_cbs noiocbs = { 0, 0, 0, 0, 0 };
+    static gpgme_io_cbs noiocbs = { nullptr, nullptr, nullptr, nullptr, nullptr };
     // io.add == 0 means disable io callbacks:
     gpgme_set_io_cbs( d->ctx, &noiocbs );
-    delete d->iocbs; d->iocbs = 0;
+    delete d->iocbs; d->iocbs = nullptr;
   }
 
   Error Context::setLocale( int cat, const char * val ) {
@@ -276,14 +276,14 @@ namespace GpgME {
   KeyGenerationResult Context::generateKey( const char * parameters, Data & pubKey ) {
     d->lastop = Private::KeyGen;
     Data::Private * dp = pubKey.impl();
-    d->lasterr = gpgme_op_genkey( d->ctx, parameters, dp ? dp->data : 0, 0 );
+    d->lasterr = gpgme_op_genkey( d->ctx, parameters, dp ? dp->data : nullptr, nullptr );
     return KeyGenerationResult( d->ctx, d->lasterr );
   }
 
   Error Context::startKeyGeneration( const char * parameters, Data & pubKey ) {
     d->lastop = Private::KeyGen;
     Data::Private * dp = pubKey.impl();
-    return d->lasterr = gpgme_op_genkey_start( d->ctx, parameters, dp ? dp->data : 0, 0 );
+    return d->lasterr = gpgme_op_genkey_start( d->ctx, parameters, dp ? dp->data : nullptr, nullptr );
   }
 
   KeyGenerationResult Context::keyGenerationResult() const {
@@ -296,39 +296,39 @@ namespace GpgME {
   Error Context::exportPublicKeys( const char * pattern, Data & keyData ) {
     d->lastop = Private::Export;
     Data::Private * dp = keyData.impl();
-    return d->lasterr = gpgme_op_export( d->ctx, pattern, 0, dp ? dp->data : 0 );
+    return d->lasterr = gpgme_op_export( d->ctx, pattern, 0, dp ? dp->data : nullptr );
   }
 
   Error Context::exportPublicKeys( const char * patterns[], Data & keyData ) {
     d->lastop = Private::Export;
     Data::Private * dp = keyData.impl();
-    return d->lasterr = gpgme_op_export_ext( d->ctx, patterns, 0, dp ? dp->data : 0 );
+    return d->lasterr = gpgme_op_export_ext( d->ctx, patterns, 0, dp ? dp->data : nullptr );
   }
 
   Error Context::startPublicKeyExport( const char * pattern, Data & keyData ) {
     d->lastop = Private::Export;
     Data::Private * dp = keyData.impl();
-    return d->lasterr = gpgme_op_export_start( d->ctx, pattern, 0, dp ? dp->data : 0 );
+    return d->lasterr = gpgme_op_export_start( d->ctx, pattern, 0, dp ? dp->data : nullptr );
   }
 
   Error Context::startPublicKeyExport( const char * patterns[], Data & keyData ) {
     d->lastop = Private::Export;
     Data::Private * dp = keyData.impl();
-    return d->lasterr = gpgme_op_export_ext_start( d->ctx, patterns, 0, dp ? dp->data : 0 );
+    return d->lasterr = gpgme_op_export_ext_start( d->ctx, patterns, 0, dp ? dp->data : nullptr );
   }
 
 
   ImportResult Context::importKeys( const Data & data ) {
     d->lastop = Private::Import;
     Data::Private * dp = data.impl();
-    d->lasterr = gpgme_op_import( d->ctx, dp ? dp->data : 0 );
+    d->lasterr = gpgme_op_import( d->ctx, dp ? dp->data : nullptr );
     return ImportResult( d->ctx, d->lasterr );
   }
 
   Error Context::startKeyImport( const Data & data ) {
     d->lastop = Private::Import;
     Data::Private * dp = data.impl();
-    return d->lasterr = gpgme_op_import_start( d->ctx, dp ? dp->data : 0 );
+    return d->lasterr = gpgme_op_import_start( d->ctx, dp ? dp->data : nullptr );
   }
 
   ImportResult Context::importResult() const {
@@ -352,7 +352,7 @@ namespace GpgME {
     d->lastop = Private::Decrypt;
     Data::Private * cdp = cipherText.impl();
     Data::Private * pdp = plainText.impl();
-    d->lasterr = gpgme_op_decrypt( d->ctx, cdp ? cdp->data : 0, pdp ? pdp->data : 0 );
+    d->lasterr = gpgme_op_decrypt( d->ctx, cdp ? cdp->data : nullptr, pdp ? pdp->data : nullptr );
     return DecryptionResult( d->ctx, d->lasterr );
   }
 
@@ -360,7 +360,7 @@ namespace GpgME {
     d->lastop = Private::Decrypt;
     Data::Private * cdp = cipherText.impl();
     Data::Private * pdp = plainText.impl();
-    return d->lasterr = gpgme_op_decrypt_start( d->ctx, cdp ? cdp->data : 0, pdp ? pdp->data : 0 );
+    return d->lasterr = gpgme_op_decrypt_start( d->ctx, cdp ? cdp->data : nullptr, pdp ? pdp->data : nullptr );
   }
 
   DecryptionResult Context::decryptionResult() const {
@@ -376,7 +376,7 @@ namespace GpgME {
     d->lastop = Private::Verify;
     Data::Private * sdp = signature.impl();
     Data::Private * tdp = signedText.impl();
-    d->lasterr = gpgme_op_verify( d->ctx, sdp ? sdp->data : 0, tdp ? tdp->data : 0, 0 );
+    d->lasterr = gpgme_op_verify( d->ctx, sdp ? sdp->data : nullptr, tdp ? tdp->data : nullptr, nullptr );
     return VerificationResult( d->ctx, d->lasterr );
   }
 
@@ -384,7 +384,7 @@ namespace GpgME {
     d->lastop = Private::Verify;
     Data::Private * sdp = signedData.impl();
     Data::Private * pdp = plainText.impl();
-    d->lasterr = gpgme_op_verify( d->ctx, sdp ? sdp->data : 0, 0, pdp ? pdp->data : 0 );
+    d->lasterr = gpgme_op_verify( d->ctx, sdp ? sdp->data : nullptr, nullptr, pdp ? pdp->data : nullptr );
     return VerificationResult( d->ctx, d->lasterr );
   }
 
@@ -392,14 +392,14 @@ namespace GpgME {
     d->lastop = Private::Verify;
     Data::Private * sdp = signature.impl();
     Data::Private * tdp = signedText.impl();
-    return d->lasterr = gpgme_op_verify_start( d->ctx, sdp ? sdp->data : 0, tdp ? tdp->data : 0, 0 );
+    return d->lasterr = gpgme_op_verify_start( d->ctx, sdp ? sdp->data : nullptr, tdp ? tdp->data : nullptr, nullptr );
   }
 
   Error Context::startOpaqueSignatureVerification( const Data & signedData, Data & plainText ) {
     d->lastop = Private::Verify;
     Data::Private * sdp = signedData.impl();
     Data::Private * pdp = plainText.impl();
-    return d->lasterr = gpgme_op_verify_start( d->ctx, sdp ? sdp->data : 0, 0, pdp ? pdp->data : 0 );
+    return d->lasterr = gpgme_op_verify_start( d->ctx, sdp ? sdp->data : nullptr, nullptr, pdp ? pdp->data : nullptr );
   }
 
   VerificationResult Context::verificationResult() const {
@@ -414,7 +414,7 @@ namespace GpgME {
     d->lastop = Private::DecryptAndVerify;
     Data::Private * cdp = cipherText.impl();
     Data::Private * pdp = plainText.impl();
-    d->lasterr = gpgme_op_decrypt_verify( d->ctx, cdp ? cdp->data : 0, pdp ? pdp->data : 0 );
+    d->lasterr = gpgme_op_decrypt_verify( d->ctx, cdp ? cdp->data : nullptr, pdp ? pdp->data : nullptr );
     return std::make_pair( DecryptionResult( d->ctx, d->lasterr ),
 			   VerificationResult( d->ctx, d->lasterr ) );
   }
@@ -423,7 +423,7 @@ namespace GpgME {
     d->lastop = Private::DecryptAndVerify;
     Data::Private * cdp = cipherText.impl();
     Data::Private * pdp = plainText.impl();
-    return d->lasterr = gpgme_op_decrypt_verify_start( d->ctx, cdp ? cdp->data : 0, pdp ? pdp->data : 0 );
+    return d->lasterr = gpgme_op_decrypt_verify_start( d->ctx, cdp ? cdp->data : nullptr, pdp ? pdp->data : nullptr );
   }
 
 #ifdef HAVE_GPGME_OP_GETAUDITLOG
@@ -442,7 +442,7 @@ namespace GpgME {
     d->lastop = Private::GetAuditLog;
 #ifdef HAVE_GPGME_OP_GETAUDITLOG
     Data::Private * const odp = output.impl();
-    return Error( d->lasterr = gpgme_op_getauditlog_start( d->ctx, odp ? odp->data : 0, to_auditlog_flags( flags ) ) );
+    return Error( d->lasterr = gpgme_op_getauditlog_start( d->ctx, odp ? odp->data : nullptr, to_auditlog_flags( flags ) ) );
 #else
     (void)output; (void)flags;
     return Error( d->lasterr = gpg_error( GPG_ERR_NOT_IMPLEMENTED ) );
@@ -453,7 +453,7 @@ namespace GpgME {
     d->lastop = Private::GetAuditLog;
 #ifdef HAVE_GPGME_OP_GETAUDITLOG
     Data::Private * const odp = output.impl();
-    return Error( d->lasterr = gpgme_op_getauditlog( d->ctx, odp ? odp->data : 0, to_auditlog_flags( flags ) ) );
+    return Error( d->lasterr = gpgme_op_getauditlog( d->ctx, odp ? odp->data : nullptr, to_auditlog_flags( flags ) ) );
 #else
     (void)output; (void)flags;
     return Error( d->lasterr = gpg_error( GPG_ERR_NOT_IMPLEMENTED ) );
@@ -487,7 +487,7 @@ namespace GpgME {
     d->lastop = Private::Sign;
     Data::Private * pdp = plainText.impl();
     Data::Private * sdp = signature.impl();
-    d->lasterr = gpgme_op_sign( d->ctx, pdp ? pdp->data : 0, sdp ? sdp->data : 0, sigmode2sigmode( mode ) );
+    d->lasterr = gpgme_op_sign( d->ctx, pdp ? pdp->data : nullptr, sdp ? sdp->data : nullptr, sigmode2sigmode( mode ) );
     return SigningResult( d->ctx, d->lasterr );
   }
 
@@ -496,7 +496,7 @@ namespace GpgME {
     d->lastop = Private::Sign;
     Data::Private * pdp = plainText.impl();
     Data::Private * sdp = signature.impl();
-    return d->lasterr = gpgme_op_sign_start( d->ctx, pdp ? pdp->data : 0, sdp ? sdp->data : 0, sigmode2sigmode( mode ) );
+    return d->lasterr = gpgme_op_sign_start( d->ctx, pdp ? pdp->data : nullptr, sdp ? sdp->data : nullptr, sigmode2sigmode( mode ) );
   }
 
   SigningResult Context::signingResult() const {
@@ -516,10 +516,10 @@ namespace GpgME {
     for ( std::vector<Key>::const_iterator it = recipients.begin() ; it != recipients.end() ; ++it )
       if ( it->impl() )
 	*keys_it++ = it->impl();
-    *keys_it++ = 0;
+    *keys_it++ = nullptr;
     d->lasterr = gpgme_op_encrypt( d->ctx, keys,
 				   flags & AlwaysTrust ? GPGME_ENCRYPT_ALWAYS_TRUST : (gpgme_encrypt_flags_t)0,
-				   pdp ? pdp->data : 0, cdp ? cdp->data : 0 );
+				   pdp ? pdp->data : nullptr, cdp ? cdp->data : nullptr );
     delete[] keys;
     return EncryptionResult( d->ctx, d->lasterr );
   }
@@ -528,8 +528,8 @@ namespace GpgME {
     d->lastop = Private::Encrypt;
     Data::Private * pdp = plainText.impl();
     Data::Private * cdp = cipherText.impl();
-    return d->lasterr = gpgme_op_encrypt( d->ctx, 0, (gpgme_encrypt_flags_t)0,
-					  pdp ? pdp->data : 0, cdp ? cdp->data : 0 );
+    return d->lasterr = gpgme_op_encrypt( d->ctx, nullptr, (gpgme_encrypt_flags_t)0,
+					  pdp ? pdp->data : nullptr, cdp ? cdp->data : nullptr );
   }
 
   Error Context::startEncryption( const std::vector<Key> & recipients, const Data & plainText, Data & cipherText, EncryptionFlags flags ) {
@@ -541,10 +541,10 @@ namespace GpgME {
     for ( std::vector<Key>::const_iterator it = recipients.begin() ; it != recipients.end() ; ++it )
       if ( it->impl() )
 	*keys_it++ = it->impl();
-    *keys_it++ = 0;
+    *keys_it++ = nullptr;
     d->lasterr = gpgme_op_encrypt_start( d->ctx, keys,
 					 flags & AlwaysTrust ? GPGME_ENCRYPT_ALWAYS_TRUST : (gpgme_encrypt_flags_t)0,
-					 pdp ? pdp->data : 0, cdp ? cdp->data : 0 );
+					 pdp ? pdp->data : nullptr, cdp ? cdp->data : nullptr );
     delete[] keys;
     return d->lasterr;
   }
@@ -565,10 +565,10 @@ namespace GpgME {
     for ( std::vector<Key>::const_iterator it = recipients.begin() ; it != recipients.end() ; ++it )
       if ( it->impl() )
 	*keys_it++ = it->impl();
-    *keys_it++ = 0;
+    *keys_it++ = nullptr;
     d->lasterr = gpgme_op_encrypt_sign( d->ctx, keys,
 					flags & AlwaysTrust ? GPGME_ENCRYPT_ALWAYS_TRUST : (gpgme_encrypt_flags_t)0,
-					pdp ? pdp->data : 0, cdp ? cdp->data : 0 );
+					pdp ? pdp->data : nullptr, cdp ? cdp->data : nullptr );
     delete[] keys;
     return std::make_pair( SigningResult( d->ctx, d->lasterr ),
 			   EncryptionResult( d->ctx, d->lasterr ) );
@@ -583,10 +583,10 @@ namespace GpgME {
     for ( std::vector<Key>::const_iterator it = recipients.begin() ; it != recipients.end() ; ++it )
       if ( it->impl() )
 	*keys_it++ = it->impl();
-    *keys_it++ = 0;
+    *keys_it++ = nullptr;
     d->lasterr = gpgme_op_encrypt_sign_start( d->ctx, keys,
 					      flags & AlwaysTrust ? GPGME_ENCRYPT_ALWAYS_TRUST : (gpgme_encrypt_flags_t)0,
-					      pdp ? pdp->data : 0, cdp ? cdp->data : 0 );
+					      pdp ? pdp->data : nullptr, cdp ? cdp->data : nullptr );
     delete[] keys;
     return d->lasterr;
   }
@@ -705,11 +705,11 @@ namespace GpgME {
 } // namespace GpgME
 
 GpgME::Error GpgME::setDefaultLocale( int cat, const char * val ) {
-  return gpgme_set_locale( 0, cat, val );
+  return gpgme_set_locale( nullptr, cat, val );
 }
 
 GpgME::EngineInfo GpgME::engineInfo( Context::Protocol proto ) {
-  gpgme_engine_info_t ei = 0;
+  gpgme_engine_info_t ei = nullptr;
   if ( gpgme_get_engine_info( &ei ) )
     return EngineInfo();
 
diff --git a/libtdenetwork/gpgmepp/context.h b/libtdenetwork/gpgmepp/context.h
index 580d766ce..55ae9df7b 100644
--- a/libtdenetwork/gpgmepp/context.h
+++ b/libtdenetwork/gpgmepp/context.h
@@ -136,7 +136,7 @@ namespace GpgME {
     // Key Listing
     //
 
-    GpgME::Error startKeyListing( const char * pattern=0, bool secretOnly=false );
+    GpgME::Error startKeyListing( const char * pattern=nullptr, bool secretOnly=false );
     GpgME::Error startKeyListing( const char * patterns[], bool secretOnly=false );
 
     Key nextKey( GpgME::Error & e );
diff --git a/libtdenetwork/gpgmepp/context_p.h b/libtdenetwork/gpgmepp/context_p.h
index c6f2da8eb..c5eabd0c2 100644
--- a/libtdenetwork/gpgmepp/context_p.h
+++ b/libtdenetwork/gpgmepp/context_p.h
@@ -48,15 +48,15 @@ namespace GpgME {
       GetAuditLog = 0x1000 // no gpgme_getauditlog_result_t, but nevertheless...
     };
 
-    Private( gpgme_ctx_t c=0 )
+    Private( gpgme_ctx_t c=nullptr )
       : ctx( c ),
-	 iocbs( 0 ),
+	 iocbs( nullptr ),
 	 lastop( None ),
 	 lasterr( GPG_ERR_NO_ERROR ) {}
     ~Private() {
       if ( ctx ) {
 	gpgme_release( ctx );
-	ctx = 0;
+	ctx = nullptr;
       }
       delete iocbs;
     }
diff --git a/libtdenetwork/gpgmepp/data.cpp b/libtdenetwork/gpgmepp/data.cpp
index 52471be9b..505e4d9d2 100644
--- a/libtdenetwork/gpgmepp/data.cpp
+++ b/libtdenetwork/gpgmepp/data.cpp
@@ -37,12 +37,12 @@ GpgME::Data::Private::~Private()  {
     gpgme_data_release( data );
 }
 
-GpgME::Data GpgME::Data::null( (gpgme_data_t)0 );
+GpgME::Data GpgME::Data::null( (gpgme_data_t)nullptr );
 
 GpgME::Data::Data() {
   gpgme_data_t data;
   const gpgme_error_t e = gpgme_data_new( &data );
-  d = new Private( e ? 0 : data );
+  d = new Private( e ? nullptr : data );
   d->ref();
 }
 
@@ -58,7 +58,7 @@ GpgME::Data::Data( const Data & other )
 }
 
 GpgME::Data::~Data() {
-  d->unref(); d = 0;
+  d->unref(); d = nullptr;
 }
 
 
@@ -77,42 +77,42 @@ const GpgME::Data & GpgME::Data::operator=( const Data & other ) {
 GpgME::Data::Data( const char * buffer, size_t size, bool copy ) {
   gpgme_data_t data;
   const gpgme_error_t e = gpgme_data_new_from_mem( &data, buffer, size, int( copy ) );
-  d = new Private( e ? 0 : data );
+  d = new Private( e ? nullptr : data );
   d->ref();
 }
 
 GpgME::Data::Data( const char * filename ) {
   gpgme_data_t data;
   const gpgme_error_t e = gpgme_data_new_from_file( &data, filename, 1 );
-  d = new Private( e ? 0 : data );
+  d = new Private( e ? nullptr : data );
   d->ref();
 }
 
 GpgME::Data::Data( const char * filename, off_t offset, size_t length ) {
   gpgme_data_t data;
-  const gpgme_error_t e = gpgme_data_new_from_filepart( &data, filename, 0, offset, length );
-  d = new Private( e ? 0 : data );
+  const gpgme_error_t e = gpgme_data_new_from_filepart( &data, filename, nullptr, offset, length );
+  d = new Private( e ? nullptr : data );
   d->ref();
 }
 
 GpgME::Data::Data( FILE * fp ) {
   gpgme_data_t data;
   const gpgme_error_t e = gpgme_data_new_from_stream( &data, fp );
-  d = new Private( e ? 0 : data );
+  d = new Private( e ? nullptr : data );
   d->ref();
 }
 
 GpgME::Data::Data( FILE * fp, off_t offset, size_t length ) {
   gpgme_data_t data;
-  const gpgme_error_t e = gpgme_data_new_from_filepart( &data, 0, fp, offset, length );
-  d = new Private( e ? 0 : data );
+  const gpgme_error_t e = gpgme_data_new_from_filepart( &data, nullptr, fp, offset, length );
+  d = new Private( e ? nullptr : data );
   d->ref();
 }
 
 GpgME::Data::Data( int fd ) {
   gpgme_data_t data;
   const gpgme_error_t e = gpgme_data_new_from_fd( &data, fd );
-  d = new Private( e ? 0 : data );
+  d = new Private( e ? nullptr : data );
   d->ref();
 }
 
@@ -122,16 +122,16 @@ GpgME::Data::Data( DataProvider * dp ) {
   if ( !dp )
     return;
   if ( !dp->isSupported( DataProvider::Read ) )
-    d->cbs.read = 0;
+    d->cbs.read = nullptr;
   if ( !dp->isSupported( DataProvider::Write ) )
-    d->cbs.write = 0;
+    d->cbs.write = nullptr;
   if ( !dp->isSupported( DataProvider::Seek ) )
-    d->cbs.seek = 0;
+    d->cbs.seek = nullptr;
   if ( !dp->isSupported( DataProvider::Release ) )
-    d->cbs.release = 0;
+    d->cbs.release = nullptr;
   const gpgme_error_t e = gpgme_data_new_from_cbs( &d->data, &d->cbs, dp );
   if ( e )
-    d->data = 0;
+    d->data = nullptr;
 #ifndef NDEBUG
 //  std::cerr << "GpgME::Data(): DataProvider supports: "
 //	    << ( d->cbs.read ? "read" : "no read" ) << ", "
diff --git a/libtdenetwork/gpgmepp/data_p.h b/libtdenetwork/gpgmepp/data_p.h
index 7f2c83fc3..b4eaf3043 100644
--- a/libtdenetwork/gpgmepp/data_p.h
+++ b/libtdenetwork/gpgmepp/data_p.h
@@ -27,7 +27,7 @@
 
 class GpgME::Data::Private : public GpgME::Shared {
 public:
-  Private( gpgme_data_t d=0 )
+  Private( gpgme_data_t d=nullptr )
     : Shared(), data( d ), cbs( data_provider_callbacks ) {}
   ~Private();
     
diff --git a/libtdenetwork/gpgmepp/decryptionresult.cpp b/libtdenetwork/gpgmepp/decryptionresult.cpp
index 2efcc67d9..1bd717029 100644
--- a/libtdenetwork/gpgmepp/decryptionresult.cpp
+++ b/libtdenetwork/gpgmepp/decryptionresult.cpp
@@ -42,14 +42,14 @@ public:
   ~Private() {
     if ( res.unsupported_algorithm )
       std::free( res.unsupported_algorithm );
-    res.unsupported_algorithm = 0;
+    res.unsupported_algorithm = nullptr;
   }
 
   _gpgme_op_decrypt_result res;
 };
 
 GpgME::DecryptionResult::DecryptionResult( gpgme_ctx_t ctx, int error )
-  : GpgME::Result( error ), d( 0 )
+  : GpgME::Result( error ), d( nullptr )
 {
   if ( error || !ctx )
     return;
@@ -63,7 +63,7 @@ GpgME::DecryptionResult::DecryptionResult( gpgme_ctx_t ctx, int error )
 make_standard_stuff(DecryptionResult)
 
 const char * GpgME::DecryptionResult::unsupportedAlgortihm() const {
-  return d ? d->res.unsupported_algorithm : 0 ;
+  return d ? d->res.unsupported_algorithm : nullptr ;
 }
 
 bool GpgME::DecryptionResult::wrongKeyUsage() const {
diff --git a/libtdenetwork/gpgmepp/decryptionresult.h b/libtdenetwork/gpgmepp/decryptionresult.h
index f23d5fc34..862a3b1ea 100644
--- a/libtdenetwork/gpgmepp/decryptionresult.h
+++ b/libtdenetwork/gpgmepp/decryptionresult.h
@@ -34,7 +34,7 @@ namespace GpgME {
 
   class TDE_EXPORT DecryptionResult : public Result {
   public:
-    DecryptionResult( gpgme_ctx_t ctx=0, int error=0 );
+    DecryptionResult( gpgme_ctx_t ctx=nullptr, int error=0 );
     explicit DecryptionResult( const Error & err );
     DecryptionResult( const DecryptionResult & other );
     ~DecryptionResult();
diff --git a/libtdenetwork/gpgmepp/encryptionresult.cpp b/libtdenetwork/gpgmepp/encryptionresult.cpp
index f827ca839..e32e77e6a 100644
--- a/libtdenetwork/gpgmepp/encryptionresult.cpp
+++ b/libtdenetwork/gpgmepp/encryptionresult.cpp
@@ -44,14 +44,14 @@ public:
       gpgme_invalid_key_t copy = new _gpgme_invalid_key( *ik );
       if ( ik->fpr )
 	copy->fpr = strdup( ik->fpr );
-      copy->next = 0;
+      copy->next = nullptr;
       invalid.push_back( copy );
     }
   }
   ~Private() {
     for ( std::vector<gpgme_invalid_key_t>::iterator it = invalid.begin() ; it != invalid.end() ; ++it ) {
       std::free( (*it)->fpr );
-      delete *it; *it = 0;
+      delete *it; *it = nullptr;
     }
   }
 
@@ -59,7 +59,7 @@ public:
 };
 
 GpgME::EncryptionResult::EncryptionResult( gpgme_ctx_t ctx, int error )
-  : GpgME::Result( error ), d( 0 )
+  : GpgME::Result( error ), d( nullptr )
 {
   if ( error || !ctx )
     return;
@@ -101,7 +101,7 @@ GpgME::InvalidRecipient::InvalidRecipient( EncryptionResult::Private * parent, u
     d->ref();
 }
 
-GpgME::InvalidRecipient::InvalidRecipient() : d( 0 ), idx( 0 ) {}
+GpgME::InvalidRecipient::InvalidRecipient() : d( nullptr ), idx( 0 ) {}
 
 GpgME::InvalidRecipient::InvalidRecipient( const InvalidRecipient & other )
   : d( other.d ), idx( other.idx )
@@ -134,7 +134,7 @@ bool GpgME::InvalidRecipient::isNull() const {
 }
 
 const char * GpgME::InvalidRecipient::fingerprint() const {
-  return isNull() ? 0 : d->invalid[idx]->fpr ;
+  return isNull() ? nullptr : d->invalid[idx]->fpr ;
 }
 
 GpgME::Error GpgME::InvalidRecipient::reason() const {
diff --git a/libtdenetwork/gpgmepp/encryptionresult.h b/libtdenetwork/gpgmepp/encryptionresult.h
index 62649604e..73eeef0a1 100644
--- a/libtdenetwork/gpgmepp/encryptionresult.h
+++ b/libtdenetwork/gpgmepp/encryptionresult.h
@@ -36,7 +36,7 @@ namespace GpgME {
 
   class TDE_EXPORT EncryptionResult : public Result {
   public:
-    EncryptionResult( gpgme_ctx_t ctx=0, int error=0 );
+    EncryptionResult( gpgme_ctx_t ctx=nullptr, int error=0 );
     explicit EncryptionResult( const Error & err );
     EncryptionResult( const EncryptionResult & other );
     ~EncryptionResult();
diff --git a/libtdenetwork/gpgmepp/engineinfo.cpp b/libtdenetwork/gpgmepp/engineinfo.cpp
index 461a61db3..f67fd48d9 100644
--- a/libtdenetwork/gpgmepp/engineinfo.cpp
+++ b/libtdenetwork/gpgmepp/engineinfo.cpp
@@ -28,17 +28,17 @@
 #include <gpgme.h>
 
 struct GpgME::EngineInfo::Private : public GpgME::Shared {
-  Private( gpgme_engine_info_t engine=0 ) : Shared(), info( engine ) {}
-  ~Private() { info = 0; }
+  Private( gpgme_engine_info_t engine=nullptr ) : Shared(), info( engine ) {}
+  ~Private() { info = nullptr; }
 
   gpgme_engine_info_t info;
 };
 
 
-GpgME::EngineInfo::EngineInfo() : d(0) {}
+GpgME::EngineInfo::EngineInfo() : d(nullptr) {}
 
 GpgME::EngineInfo::EngineInfo( gpgme_engine_info_t engine )
-  : d(0)
+  : d(nullptr)
 {
   d = new Private( engine );
   d->ref();
@@ -86,14 +86,14 @@ GpgME::Context::Protocol GpgME::EngineInfo::protocol() const {
 }
 
 const char * GpgME::EngineInfo::fileName() const {
-  return isNull() ? 0 : d->info->file_name;
+  return isNull() ? nullptr : d->info->file_name;
 }
 
 const char * GpgME::EngineInfo::version() const {
-  return isNull() ? 0 : d->info->version;
+  return isNull() ? nullptr : d->info->version;
 }
 
 const char * GpgME::EngineInfo::requiredVersion() const {
-  return isNull() ? 0 : d->info->req_version;
+  return isNull() ? nullptr : d->info->req_version;
 }
 
diff --git a/libtdenetwork/gpgmepp/eventloopinteractor.cpp b/libtdenetwork/gpgmepp/eventloopinteractor.cpp
index b04a36c85..9959bf88a 100644
--- a/libtdenetwork/gpgmepp/eventloopinteractor.cpp
+++ b/libtdenetwork/gpgmepp/eventloopinteractor.cpp
@@ -68,10 +68,10 @@ namespace GpgME {
 
   gpgme_io_cbs EventLoopInteractor::Private::iocbs = {
     &EventLoopInteractor::Private::registerIOCb,
-    0,
+    nullptr,
     &EventLoopInteractor::Private::removeIOCb,
     &EventLoopInteractor::Private::eventIOCb,
-    0
+    nullptr
   };
 
 
@@ -100,7 +100,7 @@ namespace GpgME {
 	 it != instance()->d->mCallbacks.end() ; ++it ) {
       if ( *it == tag ) {
 	instance()->unregisterWatcher( (*it)->externalTag );
-	delete *it; *it = 0;
+	delete *it; *it = nullptr;
 	instance()->d->mCallbacks.erase( it );
 	return;
       }
@@ -139,7 +139,7 @@ namespace GpgME {
   // EventLoopInteractor Implementation
   //
 
-  EventLoopInteractor * EventLoopInteractor::mSelf = 0;
+  EventLoopInteractor * EventLoopInteractor::mSelf = nullptr;
 
   EventLoopInteractor::EventLoopInteractor() {
     assert( !mSelf );
@@ -149,8 +149,8 @@ namespace GpgME {
 
   EventLoopInteractor::~EventLoopInteractor() {
     // warn if there are still callbacks registered
-    mSelf = 0;
-    delete d; d = 0;
+    mSelf = nullptr;
+    delete d; d = nullptr;
   }
 
   void EventLoopInteractor::manage( Context * context ) {
diff --git a/libtdenetwork/gpgmepp/importresult.cpp b/libtdenetwork/gpgmepp/importresult.cpp
index d23c195e3..5b0b19887 100644
--- a/libtdenetwork/gpgmepp/importresult.cpp
+++ b/libtdenetwork/gpgmepp/importresult.cpp
@@ -39,15 +39,15 @@ public:
     for ( gpgme_import_status_t is = r.imports ; is ; is = is->next ) {
       gpgme_import_status_t copy = new _gpgme_import_status( *is );
       copy->fpr = strdup( is->fpr );
-      copy->next = 0;
+      copy->next = nullptr;
       imports.push_back( copy );
     }
-    res.imports = 0;
+    res.imports = nullptr;
   }
   ~Private() {
     for ( std::vector<gpgme_import_status_t>::iterator it = imports.begin() ; it != imports.end() ; ++it ) {
       std::free( (*it)->fpr );
-      delete *it; *it = 0;
+      delete *it; *it = nullptr;
     }
   }
 
@@ -56,7 +56,7 @@ public:
 };
 
 GpgME::ImportResult::ImportResult( gpgme_ctx_t ctx, int error )
-  : GpgME::Result( error ), d( 0 )
+  : GpgME::Result( error ), d( nullptr )
 {
   if ( error || !ctx )
     return;
@@ -147,7 +147,7 @@ GpgME::Import::Import( ImportResult::Private * parent, unsigned int i )
     d->ref();
 }
 
-GpgME::Import::Import() : d( 0 ), idx( 0 ) {}
+GpgME::Import::Import() : d( nullptr ), idx( 0 ) {}
 
 GpgME::Import::Import( const Import & other )
   : d( other.d ), idx( other.idx )
@@ -183,7 +183,7 @@ bool GpgME::Import::isNull() const {
 
 
 const char * GpgME::Import::fingerprint() const {
-  return isNull() ? 0 : d->imports[idx]->fpr ;
+  return isNull() ? nullptr : d->imports[idx]->fpr ;
 }
 
 GpgME::Error GpgME::Import::error() const {
diff --git a/libtdenetwork/gpgmepp/importresult.h b/libtdenetwork/gpgmepp/importresult.h
index e85298e69..e949bbd9e 100644
--- a/libtdenetwork/gpgmepp/importresult.h
+++ b/libtdenetwork/gpgmepp/importresult.h
@@ -34,7 +34,7 @@ namespace GpgME {
 
   class TDE_EXPORT ImportResult : public Result {
   public:
-    ImportResult( gpgme_ctx_t ctx=0, int error=0 );
+    ImportResult( gpgme_ctx_t ctx=nullptr, int error=0 );
     explicit ImportResult( const Error & error );
     ImportResult( const ImportResult & other );
     ~ImportResult();
diff --git a/libtdenetwork/gpgmepp/key.cpp b/libtdenetwork/gpgmepp/key.cpp
index cf70aaf03..dc2fb6ab7 100644
--- a/libtdenetwork/gpgmepp/key.cpp
+++ b/libtdenetwork/gpgmepp/key.cpp
@@ -49,7 +49,7 @@ namespace GpgME {
   };
 
   Key::Key() {
-    d = new Private( 0, 0 );
+    d = new Private( nullptr, 0 );
   }
 
   Key::Key( gpgme_key_t key, bool ref, unsigned int mode ) {
@@ -67,7 +67,7 @@ namespace GpgME {
   Key::~Key() {
     if ( d->key )
       gpgme_key_unref( d->key );
-    delete d; d = 0;
+    delete d; d = nullptr;
   }
 
   const Key & Key::operator=( const Key & other ) {
@@ -82,7 +82,7 @@ namespace GpgME {
   }
 
   bool Key::isNull() const {
-    return d->key == 0;
+    return d->key == nullptr;
   }
 
   gpgme_key_t Key::impl() const {
@@ -178,7 +178,7 @@ namespace GpgME {
   }
 
   const char * Key::protocolAsString() const {
-    return d->key ? gpgme_get_protocol_name( d->key->protocol ) : 0 ;
+    return d->key ? gpgme_get_protocol_name( d->key->protocol ) : nullptr ;
   }
 
   bool Key::isRevoked() const {
@@ -227,13 +227,13 @@ namespace GpgME {
   }
 
   const char * Key::issuerSerial() const {
-    return d->key ? d->key->issuer_serial : 0 ;
+    return d->key ? d->key->issuer_serial : nullptr ;
   }
   const char * Key::issuerName() const {
-    return d->key ? d->key->issuer_name : 0 ;
+    return d->key ? d->key->issuer_name : nullptr ;
   }
   const char * Key::chainID() const {
-    return d->key ? d->key->chain_id : 0 ;
+    return d->key ? d->key->chain_id : nullptr ;
   }
 
   const char * Key::keyID() const {
@@ -241,10 +241,10 @@ namespace GpgME {
     return d->key ? d->key->keyid : 0 ;
 #else
     if ( !d->key || !d->key->subkeys || !d->key->subkeys->fpr )
-      return 0;
+      return nullptr;
     const int len = strlen( d->key->subkeys->fpr );
     if ( len < 16 )
-      return 0;
+      return nullptr;
     return d->key->subkeys->fpr + len - 16; // return the last 8 bytes (in hex notation)
 #endif
   }
@@ -253,14 +253,14 @@ namespace GpgME {
     if ( const char * keyid = keyID() )
       return keyid + 8 ;
     else
-      return 0;
+      return nullptr;
   }
 
   const char * Key::primaryFingerprint() const {
 #ifdef HAVE_GPGME_KEY_T_FPR
     return d->key ? d->key->fpr : 0 ;
 #else
-    return d->key && d->key->subkeys ? d->key->subkeys->fpr : 0 ;
+    return d->key && d->key->subkeys ? d->key->subkeys->fpr : nullptr ;
 #endif
   }
 
@@ -280,7 +280,7 @@ namespace GpgME {
 
   struct Subkey::Private {
     Private( gpgme_key_t aKey, unsigned int idx )
-      : key( aKey ), subkey( 0 )
+      : key( aKey ), subkey( nullptr )
     {
       if ( key )
 	for ( gpgme_sub_key_t s = key->subkeys ; s ; s = s->next, --idx )
@@ -289,11 +289,11 @@ namespace GpgME {
 	    break;
 	  }
       if ( !subkey )
-	key = 0;
+	key = nullptr;
     }
 
     Private( gpgme_key_t aKey, gpgme_sub_key_t aSubkey )
-      : key( aKey ), subkey( 0 )
+      : key( aKey ), subkey( nullptr )
     {
       if ( key )
 	for ( gpgme_sub_key_t s = key->subkeys ; s ; s = s->next )
@@ -302,7 +302,7 @@ namespace GpgME {
 	    break;
 	  }
       if ( !subkey )
-	key = 0;
+	key = nullptr;
     }
 
     gpgme_key_t key;
@@ -330,7 +330,7 @@ namespace GpgME {
   Subkey::~Subkey() {
     if ( d->key )
       gpgme_key_unref( d->key );
-    delete d; d = 0;
+    delete d; d = nullptr;
   }
 
   const Subkey & Subkey::operator=( const Subkey & other ) {
@@ -353,11 +353,11 @@ namespace GpgME {
   }
 
   const char * Subkey::keyID() const {
-    return d->subkey ? d->subkey->keyid : 0 ;
+    return d->subkey ? d->subkey->keyid : nullptr ;
   }
 
   const char * Subkey::fingerprint() const {
-    return d->subkey ? d->subkey->fpr : 0 ;
+    return d->subkey ? d->subkey->fpr : nullptr ;
   }
 
   unsigned int Subkey::publicKeyAlgorithm() const {
@@ -428,7 +428,7 @@ namespace GpgME {
 
   struct UserID::Private {
     Private( gpgme_key_t aKey, unsigned int idx )
-      : key( aKey ), uid( 0 )
+      : key( aKey ), uid( nullptr )
     {
       if ( key )
 	for ( gpgme_user_id_t u = key->uids ; u ; u = u->next, --idx )
@@ -437,11 +437,11 @@ namespace GpgME {
 	    break;
 	  }
       if ( !uid )
-	key = 0;
+	key = nullptr;
     }
 
     Private( gpgme_key_t aKey, gpgme_user_id_t aUid )
-      : key( aKey ), uid( 0 )
+      : key( aKey ), uid( nullptr )
     {
       if ( key )
 	for ( gpgme_user_id_t u = key->uids ; u ; u = u->next )
@@ -450,7 +450,7 @@ namespace GpgME {
 	    break;
 	  }
       if ( !uid )
-	key = 0;
+	key = nullptr;
     }
 
     gpgme_key_t key;
@@ -478,7 +478,7 @@ namespace GpgME {
   UserID::~UserID() {
     if ( d->key )
       gpgme_key_unref( d->key );
-    delete d; d = 0;
+    delete d; d = nullptr;
   }
 
   const UserID & UserID::operator=( const UserID & other ) {
@@ -525,19 +525,19 @@ namespace GpgME {
   }
 
   const char * UserID::id() const {
-    return d->uid ? d->uid->uid : 0 ;
+    return d->uid ? d->uid->uid : nullptr ;
   }
 
   const char * UserID::name() const {
-    return d->uid ? d->uid->name : 0 ;
+    return d->uid ? d->uid->name : nullptr ;
   }
 
   const char * UserID::email() const {
-    return d->uid ? d->uid->email : 0 ;
+    return d->uid ? d->uid->email : nullptr ;
   }
 
   const char * UserID::comment() const {
-    return d->uid ? d->uid->comment : 0 ;
+    return d->uid ? d->uid->comment : nullptr ;
   }
 
   UserID::Validity UserID::validity() const {
@@ -584,7 +584,7 @@ namespace GpgME {
 
   struct UserID::Signature::Private {
     Private( gpgme_key_t aKey, gpgme_user_id_t aUid, unsigned int idx )
-      : key( aKey ), uid( 0 ), sig( 0 )
+      : key( aKey ), uid( nullptr ), sig( nullptr )
     {
       if ( key )
 	for ( gpgme_user_id_t u = key->uids ; u ; u = u->next )
@@ -598,14 +598,14 @@ namespace GpgME {
 	    break;
 	  }
       if ( !uid || !sig ) {
-	uid = 0;
-	sig = 0;
-	key = 0;
+	uid = nullptr;
+	sig = nullptr;
+	key = nullptr;
       }
     }
 	  
     Private( gpgme_key_t aKey, gpgme_user_id_t aUid, gpgme_key_sig_t aSig )
-      : key( aKey ), uid( 0 ), sig( 0 )
+      : key( aKey ), uid( nullptr ), sig( nullptr )
     {
       if ( key )
 	for ( gpgme_user_id_t u = key->uids ; u ; u = u->next )
@@ -619,9 +619,9 @@ namespace GpgME {
 	    break;
 	  }
       if ( !uid || !sig ) {
-	uid = 0;
-	sig = 0;
-	key = 0;
+	uid = nullptr;
+	sig = nullptr;
+	key = nullptr;
       }
     }
 	  
@@ -651,7 +651,7 @@ namespace GpgME {
   UserID::Signature::~Signature() {
     if ( d->key )
       gpgme_key_unref( d->key );
-    delete d; d = 0;
+    delete d; d = nullptr;
   }
 
   const UserID::Signature & UserID::Signature::operator=( const Signature & other ) {
@@ -674,7 +674,7 @@ namespace GpgME {
   }
 
   const char * UserID::Signature::signerKeyID() const {
-    return d->sig ? d->sig->keyid : 0 ;
+    return d->sig ? d->sig->keyid : nullptr ;
   }
 
   const char * UserID::Signature::algorithmAsString() const {
@@ -714,19 +714,19 @@ namespace GpgME {
   }
 
   const char * UserID::Signature::signerUserID() const {
-    return d->sig ? d->sig->uid : 0 ;
+    return d->sig ? d->sig->uid : nullptr ;
   }
 
   const char * UserID::Signature::signerName() const {
-    return d->sig ? d->sig->name : 0 ;
+    return d->sig ? d->sig->name : nullptr ;
   }
 
   const char * UserID::Signature::signerEmail() const {
-    return d->sig ? d->sig->email : 0 ;
+    return d->sig ? d->sig->email : nullptr ;
   }
 
   const char * UserID::Signature::signerComment() const {
-    return d->sig ? d->sig->comment : 0 ;
+    return d->sig ? d->sig->comment : nullptr ;
   }
 
   unsigned int UserID::Signature::certClass() const {
@@ -749,7 +749,7 @@ namespace GpgME {
   }
 
   const char * UserID::Signature::statusAsString() const {
-    return d->sig ? gpgme_strerror( d->sig->status ) : 0 ;
+    return d->sig ? gpgme_strerror( d->sig->status ) : nullptr ;
   }
 
   UserID::Signature::Notation UserID::Signature::notation( unsigned int idx ) const {
@@ -788,7 +788,7 @@ namespace GpgME {
       if ( !nota->name )
 	return nota->value;
 #endif
-    return 0;
+    return nullptr;
   }
 
 
@@ -802,7 +802,7 @@ namespace GpgME {
   struct UserID::Signature::Notation::Private {
     Private( gpgme_key_t aKey, gpgme_user_id_t aUid,
 	     gpgme_key_sig_t aSig, unsigned int idx )
-      : key( aKey ), uid( 0 ), sig( 0 ), nota( 0 )
+      : key( aKey ), uid( nullptr ), sig( nullptr ), nota( nullptr )
     {
       if ( key )
 	for ( gpgme_user_id_t u = key->uids ; u ; u = u->next )
@@ -825,16 +825,16 @@ namespace GpgME {
 	    break;
 	  }
       if ( !uid || !sig || !nota ) {
-	uid = 0;
-	sig = 0;
-	key = 0;
-	nota = 0;
+	uid = nullptr;
+	sig = nullptr;
+	key = nullptr;
+	nota = nullptr;
       }
     }
 	  
     Private( gpgme_key_t aKey, gpgme_user_id_t aUid,
 	     gpgme_key_sig_t aSig, gpgme_sig_notation_t aNota )
-      : key( aKey ), uid( 0 ), sig( 0 ), nota( 0 )
+      : key( aKey ), uid( nullptr ), sig( nullptr ), nota( nullptr )
     {
       if ( key )
 	for ( gpgme_user_id_t u = key->uids ; u ; u = u->next )
@@ -857,10 +857,10 @@ namespace GpgME {
 	    break;
 	  }
       if ( !uid || !sig || !nota ) {
-	uid = 0;
-	sig = 0;
-	key = 0;
-	nota = 0;
+	uid = nullptr;
+	sig = nullptr;
+	key = nullptr;
+	nota = nullptr;
       }
     }
 	  
@@ -893,7 +893,7 @@ namespace GpgME {
   UserID::Signature::Notation::~Notation() {
     if ( d->key )
       gpgme_key_unref( d->key );
-    delete d; d = 0;
+    delete d; d = nullptr;
   }
 
   const UserID::Signature::Notation & UserID::Signature::Notation::operator=( const Notation & other ) {
@@ -916,11 +916,11 @@ namespace GpgME {
   }
 
   const char * UserID::Signature::Notation::name() const {
-    return d->nota ? d->nota->name : 0 ;
+    return d->nota ? d->nota->name : nullptr ;
   }
 
   const char * UserID::Signature::Notation::value() const {
-    return d->nota ? d->nota->value : 0 ;
+    return d->nota ? d->nota->value : nullptr ;
   }
 
 } // namespace GpgME
diff --git a/libtdenetwork/gpgmepp/key.h b/libtdenetwork/gpgmepp/key.h
index b64c564e1..faa93be5f 100644
--- a/libtdenetwork/gpgmepp/key.h
+++ b/libtdenetwork/gpgmepp/key.h
@@ -112,7 +112,7 @@ namespace GpgME {
 
   class TDE_EXPORT Subkey {
   public:
-    Subkey( gpgme_key_t key=0, gpgme_sub_key_t subkey=0 );
+    Subkey( gpgme_key_t key=nullptr, gpgme_sub_key_t subkey=nullptr );
     Subkey( gpgme_key_t key, unsigned int idx );
     Subkey( const Subkey & other );
     ~Subkey();
@@ -160,7 +160,7 @@ namespace GpgME {
   public:
     class Signature;
 
-    UserID( gpgme_key_t key=0, gpgme_user_id_t uid=0 );
+    UserID( gpgme_key_t key=nullptr, gpgme_user_id_t uid=nullptr );
     UserID( gpgme_key_t key, unsigned int idx );
     UserID( const UserID & other );
     ~UserID();
@@ -202,7 +202,7 @@ namespace GpgME {
   public:
     class Notation;
 
-    Signature( gpgme_key_t key=0, gpgme_user_id_t uid=0, gpgme_key_sig_t sig=0 );
+    Signature( gpgme_key_t key=nullptr, gpgme_user_id_t uid=nullptr, gpgme_key_sig_t sig=nullptr );
     Signature( gpgme_key_t key, gpgme_user_id_t uid, unsigned int idx );
     Signature( const Signature & other );
     ~Signature();
@@ -257,8 +257,8 @@ namespace GpgME {
 
   class TDE_EXPORT UserID::Signature::Notation {
   public:
-    Notation( gpgme_key_t key=0, gpgme_user_id_t uid=0,
-	      gpgme_key_sig_t sig=0, gpgme_sig_notation_t nota=0 );
+    Notation( gpgme_key_t key=nullptr, gpgme_user_id_t uid=nullptr,
+	      gpgme_key_sig_t sig=nullptr, gpgme_sig_notation_t nota=nullptr );
     Notation( gpgme_key_t key, gpgme_user_id_t uid,
 	      gpgme_key_sig_t sig, unsigned int idx );
     Notation( const Notation & other );
diff --git a/libtdenetwork/gpgmepp/keygenerationresult.cpp b/libtdenetwork/gpgmepp/keygenerationresult.cpp
index 76045ee29..b186d3e3a 100644
--- a/libtdenetwork/gpgmepp/keygenerationresult.cpp
+++ b/libtdenetwork/gpgmepp/keygenerationresult.cpp
@@ -40,14 +40,14 @@ public:
   ~Private() {
     if ( res.fpr )
       std::free( res.fpr );
-    res.fpr = 0;
+    res.fpr = nullptr;
   }
 
   _gpgme_op_genkey_result res;
 };
 
 GpgME::KeyGenerationResult::KeyGenerationResult( gpgme_ctx_t ctx, int error )
-  : GpgME::Result( error ), d( 0 )
+  : GpgME::Result( error ), d( nullptr )
 {
   if ( error || !ctx )
     return;
@@ -69,5 +69,5 @@ bool GpgME::KeyGenerationResult::subkeyGenerated() const {
 }
 
 const char * GpgME::KeyGenerationResult::fingerprint() const {
-  return d ? d->res.fpr : 0 ;
+  return d ? d->res.fpr : nullptr ;
 }
diff --git a/libtdenetwork/gpgmepp/keygenerationresult.h b/libtdenetwork/gpgmepp/keygenerationresult.h
index dcfb56f20..c15cb08f1 100644
--- a/libtdenetwork/gpgmepp/keygenerationresult.h
+++ b/libtdenetwork/gpgmepp/keygenerationresult.h
@@ -30,7 +30,7 @@ namespace GpgME {
 
   class TDE_EXPORT KeyGenerationResult : public Result {
   public:
-    KeyGenerationResult( gpgme_ctx_t ctx=0, int error=0 );
+    KeyGenerationResult( gpgme_ctx_t ctx=nullptr, int error=0 );
     explicit KeyGenerationResult( const Error & err );
     KeyGenerationResult( const KeyGenerationResult & other );
     ~KeyGenerationResult();
diff --git a/libtdenetwork/gpgmepp/keylistresult.cpp b/libtdenetwork/gpgmepp/keylistresult.cpp
index 17dc3a46d..9b7ea5a6b 100644
--- a/libtdenetwork/gpgmepp/keylistresult.cpp
+++ b/libtdenetwork/gpgmepp/keylistresult.cpp
@@ -40,7 +40,7 @@ public:
 };
 
 GpgME::KeyListResult::KeyListResult( gpgme_ctx_t ctx, int error )
-  : GpgME::Result( error ), d( 0 )
+  : GpgME::Result( error ), d( nullptr )
 {
   if ( error || !ctx )
     return;
@@ -52,7 +52,7 @@ GpgME::KeyListResult::KeyListResult( gpgme_ctx_t ctx, int error )
 }
 
 GpgME::KeyListResult::KeyListResult( const Error & error, const _gpgme_op_keylist_result & res )
-  : GpgME::Result( error ), d( 0 )
+  : GpgME::Result( error ), d( nullptr )
 {
   d = new Private( res );
   d->ref();
diff --git a/libtdenetwork/gpgmepp/keylistresult.h b/libtdenetwork/gpgmepp/keylistresult.h
index 877fd517c..b6377e6e0 100644
--- a/libtdenetwork/gpgmepp/keylistresult.h
+++ b/libtdenetwork/gpgmepp/keylistresult.h
@@ -32,7 +32,7 @@ namespace GpgME {
 
   class TDE_EXPORT KeyListResult : public Result {
   public:
-    KeyListResult( gpgme_ctx_t ctx=0, int error=0 );
+    KeyListResult( gpgme_ctx_t ctx=nullptr, int error=0 );
     explicit KeyListResult( const Error & err );
     KeyListResult( const Error & err, const _gpgme_op_keylist_result & res );
     KeyListResult( const KeyListResult & other );
diff --git a/libtdenetwork/gpgmepp/result_p.h b/libtdenetwork/gpgmepp/result_p.h
index cc1d2793f..067033158 100644
--- a/libtdenetwork/gpgmepp/result_p.h
+++ b/libtdenetwork/gpgmepp/result_p.h
@@ -31,7 +31,7 @@ GpgME::x::x( const x & other ) \
 
 #define make_error_ctor(x) \
 GpgME::x::x( const Error & error ) \
-  : GpgME::Result( error ), d( 0 ) \
+  : GpgME::Result( error ), d( nullptr ) \
 { \
  \
 }
@@ -53,7 +53,7 @@ const GpgME::x & GpgME::x::operator=( const x & other ) { \
 GpgME::x::~x() { \
   if ( d ) \
     d->unref(); \
-  d = 0; \
+  d = nullptr; \
 }
 
 #define make_isNull(x) bool GpgME::x::isNull() const { return !d && !error(); }
diff --git a/libtdenetwork/gpgmepp/signingresult.cpp b/libtdenetwork/gpgmepp/signingresult.cpp
index 6996eef7a..13dab24e6 100644
--- a/libtdenetwork/gpgmepp/signingresult.cpp
+++ b/libtdenetwork/gpgmepp/signingresult.cpp
@@ -44,25 +44,25 @@ public:
       gpgme_new_signature_t copy = new _gpgme_new_signature( *is );
       if ( is->fpr )
 	copy->fpr = strdup( is->fpr );
-      copy->next = 0;
+      copy->next = nullptr;
       created.push_back( copy );
     }
     for ( gpgme_invalid_key_t ik = r->invalid_signers ; ik ; ik = ik->next ) {
       gpgme_invalid_key_t copy = new _gpgme_invalid_key( *ik );
       if ( ik->fpr )
 	copy->fpr = strdup( ik->fpr );
-      copy->next = 0;
+      copy->next = nullptr;
       invalid.push_back( copy );
     }
   }
   ~Private() {
     for ( std::vector<gpgme_new_signature_t>::iterator it = created.begin() ; it != created.end() ; ++it ) {
       std::free( (*it)->fpr );
-      delete *it; *it = 0;
+      delete *it; *it = nullptr;
     }
     for ( std::vector<gpgme_invalid_key_t>::iterator it = invalid.begin() ; it != invalid.end() ; ++it ) {
       std::free( (*it)->fpr );
-      delete *it; *it = 0;
+      delete *it; *it = nullptr;
     }
   }
 
@@ -71,7 +71,7 @@ public:
 };
 
 GpgME::SigningResult::SigningResult( gpgme_ctx_t ctx, int error )
-  : GpgME::Result( error ), d( 0 )
+  : GpgME::Result( error ), d( nullptr )
 {
   if ( error || !ctx )
     return;
@@ -123,7 +123,7 @@ GpgME::InvalidSigningKey::InvalidSigningKey( SigningResult::Private * parent, un
     d->ref();
 }
 
-GpgME::InvalidSigningKey::InvalidSigningKey() : d( 0 ), idx( 0 ) {}
+GpgME::InvalidSigningKey::InvalidSigningKey() : d( nullptr ), idx( 0 ) {}
 
 GpgME::InvalidSigningKey::InvalidSigningKey( const InvalidSigningKey & other )
   : d( other.d ), idx( other.idx )
@@ -156,7 +156,7 @@ bool GpgME::InvalidSigningKey::isNull() const {
 }
 
 const char * GpgME::InvalidSigningKey::fingerprint() const {
-  return isNull() ? 0 : d->invalid[idx]->fpr ;
+  return isNull() ? nullptr : d->invalid[idx]->fpr ;
 }
 
 GpgME::Error GpgME::InvalidSigningKey::reason() const {
@@ -172,7 +172,7 @@ GpgME::CreatedSignature::CreatedSignature( SigningResult::Private * parent, unsi
     d->ref();
 }
 
-GpgME::CreatedSignature::CreatedSignature() : d( 0 ), idx( 0 ) {}
+GpgME::CreatedSignature::CreatedSignature() : d( nullptr ), idx( 0 ) {}
 
 GpgME::CreatedSignature::CreatedSignature( const CreatedSignature & other )
   : d( other.d ), idx( other.idx )
@@ -205,7 +205,7 @@ bool GpgME::CreatedSignature::isNull() const {
 }
 
 const char * GpgME::CreatedSignature::fingerprint() const {
-  return isNull() ? 0 : d->created[idx]->fpr ;
+  return isNull() ? nullptr : d->created[idx]->fpr ;
 }
 
 time_t GpgME::CreatedSignature::creationTime() const {
diff --git a/libtdenetwork/gpgmepp/signingresult.h b/libtdenetwork/gpgmepp/signingresult.h
index c43b577ed..75e1d27f6 100644
--- a/libtdenetwork/gpgmepp/signingresult.h
+++ b/libtdenetwork/gpgmepp/signingresult.h
@@ -40,7 +40,7 @@ namespace GpgME {
 
   class TDE_EXPORT SigningResult : public Result {
   public:
-    SigningResult( gpgme_ctx_t ctx=0, int error=0 );
+    SigningResult( gpgme_ctx_t ctx=nullptr, int error=0 );
     explicit SigningResult( const Error & err );
     SigningResult( const SigningResult & other );
     ~SigningResult();
diff --git a/libtdenetwork/gpgmepp/verificationresult.cpp b/libtdenetwork/gpgmepp/verificationresult.cpp
index abf30d96c..f11f52181 100644
--- a/libtdenetwork/gpgmepp/verificationresult.cpp
+++ b/libtdenetwork/gpgmepp/verificationresult.cpp
@@ -46,18 +46,18 @@ public:
       gpgme_signature_t scopy = new _gpgme_signature( *is );
       if ( is->fpr )
 	scopy->fpr = strdup( is->fpr );
-      scopy->next = 0;
+      scopy->next = nullptr;
       sigs.push_back( scopy );
       // copy notations:
       nota.push_back( std::vector<Nota>() );
-      purls.push_back( 0 );
+      purls.push_back( nullptr );
       for ( gpgme_sig_notation_t in = is->notations ; in ; in = in->next ) {
 	if ( !in->name ) {
 	  if ( in->value )
 	    purls.back() = strdup( in->value ); // policy url
 	  continue;
 	}
-	Nota n = { 0, 0 };
+	Nota n = { nullptr, nullptr };
 	n.name = strdup( in->name );
 	if ( in->value )
 	  n.value = strdup( in->value );
@@ -68,12 +68,12 @@ public:
   ~Private() {
     for ( std::vector<gpgme_signature_t>::iterator it = sigs.begin() ; it != sigs.end() ; ++it ) {
       std::free( (*it)->fpr );
-      delete *it; *it = 0;
+      delete *it; *it = nullptr;
     }
     for ( std::vector< std::vector<Nota> >::iterator it = nota.begin() ; it != nota.end() ; ++it )
       for ( std::vector<Nota>::iterator jt = it->begin() ; jt != it->end() ; ++jt ) {
-	std::free( jt->name );  jt->name = 0;
-	std::free( jt->value ); jt->value = 0;
+	std::free( jt->name );  jt->name = nullptr;
+	std::free( jt->value ); jt->value = nullptr;
       }
     std::for_each( purls.begin(), purls.end(), &std::free );
   }
@@ -89,7 +89,7 @@ public:
 };
 
 GpgME::VerificationResult::VerificationResult( gpgme_ctx_t ctx, int error )
-  : GpgME::Result( error ), d( 0 )
+  : GpgME::Result( error ), d( nullptr )
 {
   if ( error || !ctx )
     return;
@@ -128,7 +128,7 @@ GpgME::Signature::Signature( VerificationResult::Private * parent, unsigned int
     d->ref();
 }
 
-GpgME::Signature::Signature() : d( 0 ), idx( 0 ) {}
+GpgME::Signature::Signature() : d( nullptr ), idx( 0 ) {}
 
 GpgME::Signature::Signature( const Signature & other )
   : d( other.d ), idx( other.idx )
@@ -181,7 +181,7 @@ GpgME::Signature::Summary GpgME::Signature::summary() const {
 }
 
 const char * GpgME::Signature::fingerprint() const {
-  return isNull() ? 0 : d->sigs[idx]->fpr ;
+  return isNull() ? nullptr : d->sigs[idx]->fpr ;
 }
 
 GpgME::Error GpgME::Signature::status() const {
@@ -261,7 +261,7 @@ GpgME::Signature::Notation::Notation( VerificationResult::Private * parent, unsi
 }
 
 GpgME::Signature::Notation::Notation()
-  : d( 0 ), sidx( 0 ), nidx( 0 ) {}
+  : d( nullptr ), sidx( 0 ), nidx( 0 ) {}
 
 GpgME::Signature::Notation::Notation( const Notation & other )
   : d( other.d ), sidx( other.sidx ), nidx( other.nidx )
@@ -295,11 +295,11 @@ bool GpgME::Signature::Notation::isNull() const {
 
 
 const char * GpgME::Signature::Notation::name() const {
-  return isNull() ? 0 : d->nota[sidx][nidx].name ;
+  return isNull() ? nullptr : d->nota[sidx][nidx].name ;
 }
 
 const char * GpgME::Signature::Notation::value() const {
-  return isNull() ? 0 : d->nota[sidx][nidx].value ;
+  return isNull() ? nullptr : d->nota[sidx][nidx].value ;
 }
 
 
diff --git a/libtdenetwork/gpgmepp/verificationresult.h b/libtdenetwork/gpgmepp/verificationresult.h
index 86d54b8dc..91ec2d947 100644
--- a/libtdenetwork/gpgmepp/verificationresult.h
+++ b/libtdenetwork/gpgmepp/verificationresult.h
@@ -38,7 +38,7 @@ namespace GpgME {
 
   class TDE_EXPORT VerificationResult : public Result {
   public:
-    VerificationResult( gpgme_ctx_t ctx=0, int error=0 );
+    VerificationResult( gpgme_ctx_t ctx=nullptr, int error=0 );
     explicit VerificationResult( const Error & err );
     VerificationResult( const VerificationResult & other );
     ~VerificationResult();
diff --git a/libtdenetwork/qgpgme/eventloopinteractor.cpp b/libtdenetwork/qgpgme/eventloopinteractor.cpp
index c9a4764a9..2d663c42b 100644
--- a/libtdenetwork/qgpgme/eventloopinteractor.cpp
+++ b/libtdenetwork/qgpgme/eventloopinteractor.cpp
@@ -47,10 +47,10 @@ QGpgME::EventLoopInteractor::EventLoopInteractor( TQObject * parent, const char
 
 QGpgME::EventLoopInteractor::~EventLoopInteractor() {
   emit aboutToDestroy();
-  mSelf = 0;
+  mSelf = nullptr;
 }
 
-QGpgME::EventLoopInteractor * QGpgME::EventLoopInteractor::mSelf = 0;
+QGpgME::EventLoopInteractor * QGpgME::EventLoopInteractor::mSelf = nullptr;
 
 QGpgME::EventLoopInteractor * QGpgME::EventLoopInteractor::instance() {
   if ( !mSelf )
@@ -59,7 +59,7 @@ QGpgME::EventLoopInteractor * QGpgME::EventLoopInteractor::instance() {
       tqWarning( "QGpgME::EventLoopInteractor: Need a TQApplication object before calling instance()!" );
     else
 #endif
-      (void)new EventLoopInteractor( 0, "QGpgME::EventLoopInteractor::instance()" );
+      (void)new EventLoopInteractor( nullptr, "QGpgME::EventLoopInteractor::instance()" );
   return mSelf;
 }
 
diff --git a/libtdenetwork/qgpgme/eventloopinteractor.h b/libtdenetwork/qgpgme/eventloopinteractor.h
index b28d1f306..9d511531d 100644
--- a/libtdenetwork/qgpgme/eventloopinteractor.h
+++ b/libtdenetwork/qgpgme/eventloopinteractor.h
@@ -36,7 +36,7 @@ namespace QGpgME {
     TQ_OBJECT
   
   protected:
-    EventLoopInteractor( TQObject * parent, const char * name=0 );
+    EventLoopInteractor( TQObject * parent, const char * name=nullptr );
   public:
     virtual ~EventLoopInteractor();
 
diff --git a/tdeioslave/imap4/imap4.cpp b/tdeioslave/imap4/imap4.cpp
index ff989cc21..dae6e0b1a 100644
--- a/tdeioslave/imap4/imap4.cpp
+++ b/tdeioslave/imap4/imap4.cpp
@@ -344,7 +344,7 @@ IMAP4Protocol::get (const KURL & _url)
         while (!(res = parseLoop())) ;
         if (res == -1) break;
 
-        mailHeader *lastone = 0;
+        mailHeader *lastone = nullptr;
         imapCache *cache = getLastHandled ();
         if (cache)
           lastone = cache->getHeader ();
@@ -623,7 +623,7 @@ IMAP4Protocol::listDir (const KURL & _url)
     } else {
       warning( i18n( "Message from %1: %2" ).arg( myHost, TQString(selectInfo.alert()) ) );
     }
-    selectInfo.setAlert( 0 );
+    selectInfo.setAlert( nullptr );
   }
 
   kdDebug(7116) << "IMAP4Protocol::listDir - Finishing listDir" << endl;
@@ -2019,7 +2019,7 @@ void IMAP4Protocol::closeConnection()
   setState(ISTATE_NO);
   completeQueue.clear();
   sentQueue.clear();
-  lastHandled = 0;
+  lastHandled = nullptr;
   currentBox = TQString();
   readBufferLen = 0;
 }
@@ -2683,7 +2683,7 @@ IMAP4Protocol::assureBox (const TQString & aBox, bool readonly)
 {
   if (aBox.isEmpty()) return false;
 
-  imapCommand *cmd = 0;
+  imapCommand *cmd = nullptr;
 
   if (aBox != getCurrentBox () || (!getSelected().readWrite() && !readonly))
   {
diff --git a/tdeioslave/imap4/imaplist.cpp b/tdeioslave/imap4/imaplist.cpp
index 51062c474..e6242e967 100644
--- a/tdeioslave/imap4/imaplist.cpp
+++ b/tdeioslave/imap4/imaplist.cpp
@@ -45,7 +45,7 @@
 
 #include <kdebug.h>
 
-imapList::imapList (): parser_(0), noInferiors_ (false),
+imapList::imapList (): parser_(nullptr), noInferiors_ (false),
 noSelect_ (false), marked_ (false), unmarked_ (false), 
 hasChildren_ (false), hasNoChildren_ (false)
 {
diff --git a/tdeioslave/imap4/imapparser.cpp b/tdeioslave/imap4/imapparser.cpp
index 718f28f27..3b41517fc 100644
--- a/tdeioslave/imap4/imapparser.cpp
+++ b/tdeioslave/imap4/imapparser.cpp
@@ -77,13 +77,13 @@ imapParser::imapParser ()
   completeQueue.setAutoDelete (true);
   currentState = ISTATE_NO;
   commandCounter = 0;
-  lastHandled = 0;
+  lastHandled = nullptr;
 }
 
 imapParser::~imapParser ()
 {
   delete lastHandled;
-  lastHandled = 0;
+  lastHandled = nullptr;
 }
 
 imapCommand *
@@ -203,7 +203,7 @@ static bool sasl_interact( TDEIO::SlaveBase *slave, TDEIO::AuthInfo &ai, void *i
         interact->len = strlen( (const char *) interact->result );
         break;
       default:
-        interact->result = 0;
+        interact->result = nullptr;
         interact->len = 0;
         break;
     }
@@ -220,11 +220,11 @@ imapParser::clientAuthenticate ( TDEIO::SlaveBase *slave, TDEIO::AuthInfo &ai,
   bool retVal = false;
 #ifdef HAVE_LIBSASL2
   int result;
-  sasl_conn_t *conn = 0;
-  sasl_interact_t *client_interact = 0;
-  const char *out = 0;
+  sasl_conn_t *conn = nullptr;
+  sasl_interact_t *client_interact = nullptr;
+  const char *out = nullptr;
   uint outlen = 0;
-  const char *mechusing = 0;
+  const char *mechusing = nullptr;
   TQByteArray tmp, challenge;
 
   kdDebug(7116) << "aAuth: " << aAuth << " FTQDN: " << aFTQDN << " isSSL: " << isSSL << endl;
@@ -237,7 +237,7 @@ imapParser::clientAuthenticate ( TDEIO::SlaveBase *slave, TDEIO::AuthInfo &ai,
   result = sasl_client_new( "imap", /* FIXME: with cyrus-imapd, even imaps' digest-uri
                                        must be 'imap'. I don't know if it's good or bad. */
                        aFTQDN.latin1(),
-                       0, 0, callbacks, 0, &conn );
+                       nullptr, nullptr, callbacks, 0, &conn );
 
   if ( result != SASL_OK ) {
     kdDebug(7116) << "sasl_client_new failed with: " << result << endl;
@@ -247,7 +247,7 @@ imapParser::clientAuthenticate ( TDEIO::SlaveBase *slave, TDEIO::AuthInfo &ai,
 
   do {
     result = sasl_client_start(conn, aAuth.latin1(), &client_interact,
-                       hasCapability("SASL-IR") ? &out : 0, &outlen, &mechusing);
+                       hasCapability("SASL-IR") ? &out : nullptr, &outlen, &mechusing);
 
     if ( result == SASL_INTERACT ) {
       if ( !sasl_interact( slave, ai, client_interact ) ) {
@@ -293,7 +293,7 @@ imapParser::clientAuthenticate ( TDEIO::SlaveBase *slave, TDEIO::AuthInfo &ai,
       }
 
       do {
-        result = sasl_client_step(conn, challenge.isEmpty() ? 0 : challenge.data(),
+        result = sasl_client_step(conn, challenge.isEmpty() ? nullptr : challenge.data(),
                                   challenge.size(),
                                   &client_interact,
                                   &out, &outlen);
@@ -945,7 +945,7 @@ const mailAddress& imapParser::parseAddress (parseString & inWords, mailAddress&
 
 mailHeader * imapParser::parseEnvelope (parseString & inWords)
 {
-  mailHeader *envelope = 0;
+  mailHeader *envelope = nullptr;
 
   if (inWords[0] != '(')
     return envelope;
@@ -1099,7 +1099,7 @@ mimeHeader * imapParser::parseSimplePart (parseString & inWords,
   parameters.setAutoDelete (true);
 
   if (inWords[0] != '(')
-    return 0;
+    return nullptr;
 
   if (!localPart)
     localPart = new mimeHeader;
@@ -1226,7 +1226,7 @@ mimeHeader * imapParser::parseBodyStructure (parseString & inWords,
   {
     // skip ""
     parseOneWordC (inWords);
-    return 0;
+    return nullptr;
   }
   inWords.pos++;
   skipWS (inWords);
@@ -1264,7 +1264,7 @@ mimeHeader * imapParser::parseBodyStructure (parseString & inWords,
       outSection = TQString::number(++section);
       if (!init)
         outSection = inSection + "." + outSection;
-      mimeHeader *subpart = parseBodyStructure (inWords, outSection, 0);
+      mimeHeader *subpart = parseBodyStructure (inWords, outSection, nullptr);
       localPart->addNestedPart (subpart);
     }
 
@@ -1367,7 +1367,7 @@ void imapParser::parseBody (parseString & inWords)
     // parse the header
     if (specifier == "0")
     {
-      mailHeader *envelope = 0;
+      mailHeader *envelope = nullptr;
       if (lastHandled)
         envelope = lastHandled->getHeader ();
 
@@ -1396,7 +1396,7 @@ void imapParser::parseBody (parseString & inWords)
       // << TQCString(label.data(), label.size()+1) << endl;
       if (label == "REFERENCES")
       {
-       mailHeader *envelope = 0;
+       mailHeader *envelope = nullptr;
        if (lastHandled)
          envelope = lastHandled->getHeader ();
 
@@ -1442,7 +1442,7 @@ void imapParser::parseBody (parseString & inWords)
   }
   else // no part specifier
   {
-    mailHeader *envelope = 0;
+    mailHeader *envelope = nullptr;
     if (lastHandled)
       envelope = lastHandled->getHeader ();
 
@@ -1472,7 +1472,7 @@ void imapParser::parseFetch (ulong /* value */, parseString & inWords)
   skipWS (inWords);
 
   delete lastHandled;
-  lastHandled = 0;
+  lastHandled = nullptr;
 
   while (!inWords.isEmpty () && inWords[0] != ')')
   {
@@ -1488,7 +1488,7 @@ void imapParser::parseFetch (ulong /* value */, parseString & inWords)
       case 'E':
         if (word == "ENVELOPE")
         {
-          mailHeader *envelope = 0;
+          mailHeader *envelope = nullptr;
 
           if (lastHandled)
             envelope = lastHandled->getHeader ();
@@ -1526,7 +1526,7 @@ void imapParser::parseFetch (ulong /* value */, parseString & inWords)
         }
         else if (word == "BODYSTRUCTURE")
         {
-          mailHeader *envelope = 0;
+          mailHeader *envelope = nullptr;
 
           if (lastHandled)
             envelope = lastHandled->getHeader ();
@@ -1548,7 +1548,7 @@ void imapParser::parseFetch (ulong /* value */, parseString & inWords)
         if (word == "UID")
         {
           seenUid = parseOneWordC(inWords);
-          mailHeader *envelope = 0;
+          mailHeader *envelope = nullptr;
           if (lastHandled)
             envelope = lastHandled->getHeader ();
           else
diff --git a/tdeioslave/imap4/imapparser.h b/tdeioslave/imap4/imapparser.h
index e17159224..605017bde 100644
--- a/tdeioslave/imap4/imapparser.h
+++ b/tdeioslave/imap4/imapparser.h
@@ -325,11 +325,11 @@ public:
 
   /** parse the body structure recursively */
   mimeHeader *parseBodyStructure (parseString & inWords,
-    TQString & section, mimeHeader * inHeader = 0);
+    TQString & section, mimeHeader * inHeader = nullptr);
 
   /** parse only one not nested part */
   mimeHeader *parseSimplePart (parseString & inWords, TQString & section,
-      mimeHeader * localPart = 0);
+      mimeHeader * localPart = nullptr);
 
   /** parse a parameter list (name value pairs) */
   TQAsciiDict < TQString > parseParameters (parseString & inWords);
@@ -365,7 +365,7 @@ public:
 
   /** parse a literal or word, may require more data */
   TQCString parseLiteralC(parseString & inWords, bool relay = false,
-                           bool stopAtBracket = false, int *outlen = 0);
+                           bool stopAtBracket = false, int *outlen = nullptr);
   inline TQByteArray parseLiteral (parseString & inWords, bool relay = false,
                            bool stopAtBracket = false) {
     int len = 0; // string size
@@ -382,7 +382,7 @@ public:
 
   /** parse one word (maybe quoted) upto next space " ) ] } */
   static TQCString parseOneWordC (parseString & inWords,
-    bool stopAtBracket = false, int *len = 0);
+    bool stopAtBracket = false, int *len = nullptr);
 
   /** parse one number using parseOneWord */
   static bool parseOneNumber (parseString & inWords, ulong & num);
diff --git a/tdeioslave/imap4/mimeheader.cpp b/tdeioslave/imap4/mimeheader.cpp
index 9ce3b032b..fb6d0c635 100644
--- a/tdeioslave/imap4/mimeheader.cpp
+++ b/tdeioslave/imap4/mimeheader.cpp
@@ -85,7 +85,7 @@ mimeHeader::addHdrLine (mimeHdrLine * aHdrLine)
     {
       int skip;
       const char *aCStr = addLine->getValue ().data ();
-      TQDict < TQString > *aList = 0;
+      TQDict < TQString > *aList = nullptr;
 
       skip = mimeHdrLine::parseSeparator (';', aCStr);
       if (skip > 0)
@@ -633,7 +633,7 @@ void mimeHeader::serialize(TQDataStream& stream)
   {
     TQPtrListIterator < mimeHeader > it(nestedParts);
     mimeHeader* part;
-    while ( (part = it.current()) != 0 )
+    while ((part = it.current()) != nullptr)
     {
       ++it;
       part->serialize(stream);
diff --git a/tdeioslave/mbox/readmbox.cpp b/tdeioslave/mbox/readmbox.cpp
index 942f369e5..d79d5bc06 100644
--- a/tdeioslave/mbox/readmbox.cpp
+++ b/tdeioslave/mbox/readmbox.cpp
@@ -39,12 +39,12 @@
 
 ReadMBox::ReadMBox( const UrlInfo* info, MBoxProtocol* parent, bool onlynew, bool savetime )
 	: MBoxFile( info, parent ),
-	m_file( 0 ),
-	m_stream( 0 ),
+	m_file( nullptr ),
+	m_stream( nullptr ),
 	m_current_line( new TQString( TQString() ) ),
 	m_current_id( new TQString( TQString() ) ),
 	m_atend( true ),
-	m_prev_time( 0 ),
+	m_prev_time( nullptr ),
 	m_only_new( onlynew ),
 	m_savetime( savetime ),
 	m_status( false ),
@@ -180,7 +180,7 @@ bool ReadMBox::open( bool savetime )
 	if( !m_file->open( IO_ReadOnly ) )
 	{
 		delete m_file;
-		m_file = 0;
+		m_file = nullptr;
 		return false;
 	}
 	m_stream = new TQTextStream( m_file );
@@ -194,9 +194,9 @@ void ReadMBox::close()
 	if( !m_stream )
 		return;
 
-	delete m_stream; m_stream = 0;
+	delete m_stream; m_stream = nullptr;
 	m_file->close();
-	delete m_file; m_file = 0;
+	delete m_file; m_file = nullptr;
 
 	if( m_prev_time )
 		utime( TQFile::encodeName( m_info->filename() ), m_prev_time );
diff --git a/tdeioslave/sieve/sieve.cpp b/tdeioslave/sieve/sieve.cpp
index 85704bfe6..fa0bf473f 100644
--- a/tdeioslave/sieve/sieve.cpp
+++ b/tdeioslave/sieve/sieve.cpp
@@ -1046,7 +1046,7 @@ bool tdeio_sieveProtocol::authenticate()
 
   result = sasl_client_new( "sieve",
                        m_sServer.latin1(),
-                       0, 0, callbacks, 0, &conn );
+                       nullptr, nullptr, callbacks, 0, &conn );
 
   if ( result != SASL_OK ) {
     ksDebug() << "sasl_client_new failed with: " << result << endl;
@@ -1132,7 +1132,7 @@ bool tdeio_sieveProtocol::authenticate()
 //		ksDebug() << "S-1:  [" << TQCString(challenge.data(), challenge.size()+1) << "]." << endl;
 
     do {
-      result = sasl_client_step(conn, challenge.isEmpty() ? 0 : challenge.data(),
+      result = sasl_client_step(conn, challenge.isEmpty() ? nullptr : challenge.data(),
                                   challenge.size(),
                                   &client_interact,
                                   &out, &outlen);
diff --git a/tdeioslave/sieve/sieve.h b/tdeioslave/sieve/sieve.h
index 09cf3060b..f9ec81a6e 100644
--- a/tdeioslave/sieve/sieve.h
+++ b/tdeioslave/sieve/sieve.h
@@ -99,7 +99,7 @@ protected:
 	void changeCheck( const KURL &url );
 
 	bool sendData(const TQCString &data);
-	bool receiveData(bool waitForData = true, TQCString *reparse = 0);
+	bool receiveData(bool waitForData = true, TQCString *reparse = nullptr);
 	bool operationSuccessful();
 	int operationResult();
 
-- 
cgit v1.2.3

