From 338002c679994cf95bff667598edcd54fa664355 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Wed, 18 Nov 2026 10:00:39 -0300
Subject: tdeabc: use nullptr for pointer constants
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>
---
 kab/addressbook.cpp                                | 38 +++++++++++-----------
 kab/addressbook.h                                  |  2 +-
 kab/kabapi.cpp                                     |  6 ++--
 kab/kabapi.h                                       |  2 +-
 kab/qconfigDB.cpp                                  | 14 ++++----
 kab/qconfigDB.h                                    |  4 +--
 tdeabc/address.cpp                                 |  2 +-
 tdeabc/addressbook.cpp                             | 32 +++++++++---------
 tdeabc/addressbook.h                               |  2 +-
 tdeabc/addresseedialog.cpp                         |  4 +--
 tdeabc/addresseedialog.h                           |  2 +-
 tdeabc/addresseelist.cpp                           |  6 ++--
 tdeabc/addresseelist.h                             |  4 +--
 tdeabc/addresslineedit.cpp                         | 16 ++++-----
 tdeabc/addresslineedit.h                           |  2 +-
 tdeabc/agent.cpp                                   |  8 ++---
 tdeabc/distributionlist.cpp                        |  8 ++---
 tdeabc/distributionlistdialog.cpp                  |  2 +-
 tdeabc/distributionlisteditor.cpp                  |  6 ++--
 tdeabc/errorhandler.cpp                            |  2 +-
 tdeabc/formatfactory.cpp                           | 20 ++++++------
 tdeabc/ldapclient.cpp                              | 10 +++---
 tdeabc/ldapclient.h                                |  4 +--
 tdeabc/ldapconfigwidget.cpp                        | 22 ++++++-------
 tdeabc/ldapconfigwidget.h                          |  8 ++---
 tdeabc/plugins/dir/resourcedir.cpp                 | 12 +++----
 tdeabc/plugins/dir/resourcedirconfig.h             |  2 +-
 tdeabc/plugins/evolution/dbwrapper.cpp             | 12 +++----
 tdeabc/plugins/file/resourcefile.cpp               | 14 ++++----
 tdeabc/plugins/file/resourcefileconfig.h           |  2 +-
 tdeabc/plugins/ldaptdeio/resourceldaptdeio.cpp     | 14 ++++----
 .../plugins/ldaptdeio/resourceldaptdeioconfig.cpp  |  2 +-
 tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.h |  6 ++--
 tdeabc/plugins/net/resourcenet.cpp                 | 26 +++++++--------
 tdeabc/plugins/net/resourcenet.h                   |  2 +-
 tdeabc/plugins/net/resourcenetconfig.h             |  2 +-
 tdeabc/plugins/sql/resourcesql.cpp                 |  4 +--
 tdeabc/plugins/sql/resourcesqlconfig.h             |  2 +-
 tdeabc/resource.cpp                                |  2 +-
 tdeabc/resourceselectdialog.cpp                    |  8 ++---
 tdeabc/resourceselectdialog.h                      |  6 ++--
 tdeabc/scripts/addressee.src.cpp                   |  8 ++---
 tdeabc/scripts/field.src.cpp                       |  2 +-
 tdeabc/sortmode.cpp                                |  6 ++--
 tdeabc/stdaddressbook.cpp                          |  2 +-
 tdeabc/tdeab2tdeabc.cpp                            | 12 +++----
 tdeabc/tests/kabcargl.cpp                          |  2 +-
 tdeabc/tests/testaddressee.cpp                     |  4 +--
 tdeabc/tests/testaddresseelist.cpp                 |  4 +--
 tdeabc/tests/testaddressfmt.cpp                    |  4 +--
 tdeabc/tests/testaddresslineedit.cpp               |  2 +-
 tdeabc/tests/testdistlist.cpp                      |  4 +--
 tdeabc/tests/testkabcdlg.cpp                       |  6 ++--
 tdeabc/tests/testldapclient.cpp                    |  6 ++--
 tdeabc/tests/testlock.cpp                          | 12 +++----
 tdeabc/vcard/ContentLine.cpp                       | 12 +++----
 tdeabc/vcard/Enum.cpp                              |  2 +-
 tdeabc/vcard/RToken.cpp                            |  4 +--
 tdeabc/vcard/VCard.cpp                             |  8 ++---
 tdeabc/vcard/testread.cpp                          |  4 +--
 tdeabc/vcard21parser.cpp                           |  8 ++---
 tdeabc/vcard21parser.h                             |  2 +-
 tdeabc/vcardconverter.cpp                          |  2 +-
 tdeabc/vcardformat.cpp                             |  4 +--
 tdeabc/vcardparser/testread.cpp                    |  6 ++--
 tdeabc/vcardparser/vcardline.cpp                   | 10 +++---
 tdeabc/vcardtool.cpp                               |  2 +-
 tderesources/configdialog.h                        |  2 +-
 tderesources/configpage.cpp                        | 30 ++++++++---------
 tderesources/configpage.h                          |  2 +-
 tderesources/configwidget.h                        |  2 +-
 tderesources/factory.cpp                           | 20 ++++++------
 tderesources/factory.h                             |  2 +-
 tderesources/kcmtderesources.cpp                   |  4 +--
 tderesources/manager.h                             |  8 ++---
 tderesources/managerimpl.cpp                       | 16 ++++-----
 tderesources/resource.cpp                          |  4 +--
 tderesources/resource.h                            |  4 +--
 tderesources/selectdialog.cpp                      | 10 +++---
 tderesources/selectdialog.h                        |  6 ++--
 80 files changed, 295 insertions(+), 295 deletions(-)

diff --git a/kab/addressbook.cpp b/kab/addressbook.cpp
index aa1ddfdfb..adfd81478 100644
--- a/kab/addressbook.cpp
+++ b/kab/addressbook.cpp
@@ -157,7 +157,7 @@ bool AddressBook::Entry::Address::nameOfField(const char* key, TQString& value)
 {
   KeyNameMap::iterator pos;
   // -----
-  if(fields==0)
+  if(!fields)
     { // this is executed exactly one time per application instance,
       // as fields is static 
       int counter=0;
@@ -252,7 +252,7 @@ bool AddressBook::Entry::nameOfField(const char* key, TQString& value)
 {
   KeyNameMap::iterator pos;
   // -----
-  if(fields==0)
+  if(!fields)
     { // this is executed exactly one time per application instance,
       // as fields is static 
       int counter=0;
@@ -413,7 +413,7 @@ AddressBook::AddressBook(TQWidget* parent, const char* name, bool loadit)
   bool createBackup=true;
   KeyValueMap *keys;
   // ----- do memory checks (do not rely on exception handling):
-  if(config==0 || data==0 || entries==0)
+  if(!config || !data || !entries)
     {
       KMessageBox::error(this,
 	 i18n("Cannot initialize local variables."),
@@ -853,7 +853,7 @@ AddressBook::save(const TQString& filename, bool force)
   // ###########################################################################
   if(filename.isEmpty())
     {
-      if(data->save(0, force))
+      if(data->save(nullptr, force))
 	{
 	  emit(setStatus(i18n("File saved.")));
 	  return NoError;
@@ -863,7 +863,7 @@ AddressBook::save(const TQString& filename, bool force)
     } else {
       if(data->setFileName(filename, false, false))
 	{
-	  if(data->save(0, true))
+	  if(data->save(nullptr, true))
 	    {
 	      emit(newFile(filename));
 	      return NoError;
@@ -1035,7 +1035,7 @@ AddressBook::entrySection()
   // -----
   if(!data->get(ENTRY_SECTION, section))
     {
-      return 0;
+      return nullptr;
     } else {
       return section;
     }
@@ -1054,14 +1054,14 @@ AddressBook::add(const Entry& entry, KabKey& key, bool update)
   ErrorCode locked;
   ErrorCode rc;
   // -----
-  if(theEntries==0)
+  if(!theEntries)
     {
       kdDebug(KAB_KDEBUG_AREA) << "AddressBook::add: no entries section." 
 			       << endl;
       return NoFile;
     }
   newEntry=new Section;
-  if(newEntry==0)
+  if(!newEntry)
     {
       KMessageBox::error(this,
 	 i18n("Cannot initialize local variables."),
@@ -1137,7 +1137,7 @@ AddressBook::change(const KabKey& key, const Entry& entry)
   ErrorCode locked;
   ErrorCode rc;
   // -----
-  if(theEntries==0)
+  if(!theEntries)
     {
       return NoFile;
     }
@@ -1178,7 +1178,7 @@ AddressBook::remove(const KabKey& key)
   ErrorCode locked;
   ErrorCode rc;
   // -----
-  if(theEntries==0)
+  if(!theEntries)
     {
       return NoFile;
     }
@@ -1254,7 +1254,7 @@ AddressBook::nextAvailEntryKey()
   TQCString dummy;
   bool good=true;
   // -----
-  if(section!=0)
+  if(section)
     {
       for(pos=section->sectionsBegin(); pos!=section->sectionsEnd(); ++pos)
 	{
@@ -1295,7 +1295,7 @@ AddressBook::updateMirrorMap()
   Section::StringSectionMap::iterator pos;
   // -----
   entries->erase(entries->begin(), entries->end());
-  if(section==0)
+  if(!section)
     {
 	kdDebug(GUARD, KAB_KDEBUG_AREA) <<  "AddressBook::updateMirrorMap: done, "
 	  "no file loaded." << endl;
@@ -1490,8 +1490,8 @@ AddressBook::makeSectionFromEntry(const Entry& entry, Section& section)
 {
   // ###########################################################################
   list<Entry::Address>::const_iterator addPos;
-  Section *addresses=0;
-  Section *address=0;
+  Section *addresses=nullptr;
+  Section *address=nullptr;
   TQCString key; // used for creating address subsection keys
   int count=0; // counts the addresses
   KeyValueMap *keys;
@@ -1757,16 +1757,16 @@ void AddressBook::externalChange()
 Section* AddressBook::configurationSection()
 {
   Section *section;
-  if(data!=0)
+  if(data)
     {
       if(data->get(LOCAL_CONFIG_SECTION, section))
 	{
 	  return section;
 	} else {
-	  return 0;
+	  return nullptr;
 	}
     } else {
-      return 0;
+      return nullptr;
     }
 }
 
@@ -1967,7 +1967,7 @@ Section* AddressBook::categoriesSection()
 	  kdDebug(KAB_KDEBUG_AREA) 
 	    << "AddressBook::categoriesSection: error creating categories section."
 	    << endl;
-	  return 0;
+	  return nullptr;
 	}
       data->get(KAB_CATEGORY_KEY, section);
       // add the predefined categories:
@@ -1986,7 +1986,7 @@ Section* AddressBook::categoriesSection()
   save();
   if(data->get(KAB_CATEGORY_KEY, section))
       return section;
-  return 0; // might not happen
+  return nullptr; // might not happen
 }
 
 AddressBook::ErrorCode AddressBook::categories(CategoriesMap& cat)
diff --git a/kab/addressbook.h b/kab/addressbook.h
index 1137407b3..cabb48b6a 100644
--- a/kab/addressbook.h
+++ b/kab/addressbook.h
@@ -435,7 +435,7 @@ public:
    * The constructor. If \e load is true, the user standard file will
    * automatically be loaded into the object.
    */
-  AddressBook(TQWidget* parent=0, const char* name=0, bool load=true);
+  AddressBook(TQWidget* parent=nullptr, const char* name=nullptr, bool load=true);
   ~AddressBook(); /**< The destructor. */
   /**
    * Get the internal state of the object. 
diff --git a/kab/kabapi.cpp b/kab/kabapi.cpp
index 2008f1f88..e0fbce772 100644
--- a/kab/kabapi.cpp
+++ b/kab/kabapi.cpp
@@ -35,7 +35,7 @@ using namespace std;
 
 KabAPI::KabAPI(TQWidget* parent, const char* name)
   : KDialogBase(parent, name),
-    book(0),
+    book(nullptr),
     listbox(new TDEListBox(this)),
     selection(-1)
 {
@@ -57,7 +57,7 @@ int KabAPI::exec()
 {
   TQStringList names;
   // -----
-  if(book==0)
+  if(!book)
     {
       kdDebug(KAB_KDEBUG_AREA)
 	<< "KabAPI::exec: you have to call init before using the API."
@@ -87,7 +87,7 @@ int KabAPI::exec()
 AddressBook::ErrorCode KabAPI::init()
 {
   // ############################################################################
-  book=new AddressBook(0, "KABAPI::book", true);  //change parent from "this" to "0" //dsweet
+  book=new AddressBook(nullptr, "KABAPI::book", true);  //change parent from "this" to "0" //dsweet
   if(book->getState()==AddressBook::NoError)
     {
       connect(book, TQ_SIGNAL(setStatus(const TQString&)),
diff --git a/kab/kabapi.h b/kab/kabapi.h
index b2585760a..45188883a 100644
--- a/kab/kabapi.h
+++ b/kab/kabapi.h
@@ -79,7 +79,7 @@ public:
    * @param parent The TQWidget pointer to the parent widget.
    * @param name The widgets name (used for debugging)
    */
-  KabAPI(TQWidget* parent=0, const char* name=0);
+  KabAPI(TQWidget* parent=nullptr, const char* name=nullptr);
   /**
    * You must call init before accessing the database. init opens the
    * database file (usually $HOME/.trinity/share/apps/kab/addressbook.database)
diff --git a/kab/qconfigDB.cpp b/kab/qconfigDB.cpp
index ed4c2b15a..20e9688b8 100644
--- a/kab/qconfigDB.cpp
+++ b/kab/qconfigDB.cpp
@@ -1434,7 +1434,7 @@ Section::add(const TQCString& name)
       return false;
     }
   section=new Section; // create an empty section
-  if(section==0)
+  if(!section)
     {
 	kdDebug() << "Section::add: out of memory." << endl;
       return false;
@@ -1810,7 +1810,7 @@ Section::noOfSections()
 
 QConfigDB::QConfigDB(TQWidget* parent, const char* name)
   : TQWidget(parent, name),
-    timer(0),
+    timer(nullptr),
     readonly(true),
     locked(false),
     mtime(new TQDateTime)
@@ -1826,9 +1826,9 @@ QConfigDB::~QConfigDB()
   // ############################################################################
   // disconnect();
   // -----
-  if(timer!=0)
+  if(timer)
     {
-      delete timer; timer=0;
+      delete timer; timer=nullptr;
     }
   if(!clear()) // this will emit changed() a last time
     {
@@ -2218,14 +2218,14 @@ QConfigDB::watch(bool state)
   // ############################################################################
   if(state)
     { // start timer
-      if(timer==0)
+      if(!timer)
 	{
 	  timer=new TQTimer(this);
 	  connect(timer, TQ_SIGNAL(timeout()), TQ_SLOT(checkFileChanged()));
 	}
       timer->start(1000);
     } else { // stop timer
-      if(timer!=0)
+      if(timer)
 	{
 	  timer->stop();
 	}
@@ -2478,7 +2478,7 @@ QConfigDB::save(const char* header, bool force)
 	  TQTextStream stream(&file);
 	  stream.setEncoding(TQTextStream::Latin1); // no conversion
 	  // -----
-	  if(header!=0)
+	  if(header)
 	    {
 	      stream << "# " << header << endl;
 	    }
diff --git a/kab/qconfigDB.h b/kab/qconfigDB.h
index f74e5886c..c0bba1111 100644
--- a/kab/qconfigDB.h
+++ b/kab/qconfigDB.h
@@ -567,7 +567,7 @@ public:
   /**
    * The Qt standard constructor.
    */
-  QConfigDB(TQWidget* parent=0, const char* name=0);
+  QConfigDB(TQWidget* parent=nullptr, const char* name=nullptr);
   /**
    * The virtual destructor.
    */
@@ -616,7 +616,7 @@ public:
    * to read and write mode and back after saving. 
    * @see ::setFileName
    */
-  bool save(const char* header=0, bool force=false); 
+  bool save(const char* header=nullptr, bool force=false);
   /**
    * Set the current file name to \a name. 
    * Every QConfigDB object requires a file name to be set using
diff --git a/tdeabc/address.cpp b/tdeabc/address.cpp
index 309d97ec9..6e15bfefe 100644
--- a/tdeabc/address.cpp
+++ b/tdeabc/address.cpp
@@ -31,7 +31,7 @@
 
 using namespace TDEABC;
 
-TQMap<TQString, TQString> *Address::mISOMap = 0;
+TQMap<TQString, TQString> *Address::mISOMap = nullptr;
 static KStaticDeleter< TQMap<TQString, TQString> > isoMapDeleter;
 
 Address::Address() :
diff --git a/tdeabc/addressbook.cpp b/tdeabc/addressbook.cpp
index 67073d435..6905f9a27 100644
--- a/tdeabc/addressbook.cpp
+++ b/tdeabc/addressbook.cpp
@@ -92,7 +92,7 @@ AddressBook::Iterator &AddressBook::Iterator::operator=( const AddressBook::Iter
 AddressBook::Iterator::~Iterator()
 {
   delete d;
-  d = 0;
+  d = nullptr;
 }
 
 const Addressee &AddressBook::Iterator::operator*() const
@@ -219,7 +219,7 @@ AddressBook::ConstIterator &AddressBook::ConstIterator::operator=( const Address
 AddressBook::ConstIterator::~ConstIterator()
 {
   delete d;
-  d = 0;
+  d = nullptr;
 }
 
 const Addressee &AddressBook::ConstIterator::operator*() const
@@ -304,8 +304,8 @@ bool AddressBook::ConstIterator::operator!=( const ConstIterator &it )
 AddressBook::AddressBook()
   : d( new AddressBookData )
 {
-  d->mErrorHandler = 0;
-  d->mConfig = 0;
+  d->mErrorHandler = nullptr;
+  d->mConfig = nullptr;
   d->mManager = new KRES::Manager<Resource>( "contact" );
   d->end.d->mResources = TQValueList<Resource*>();
   d->end.d->mCurrRes = -1;
@@ -314,9 +314,9 @@ AddressBook::AddressBook()
 AddressBook::AddressBook( const TQString &config )
   : d( new AddressBookData )
 {
-  d->mErrorHandler = 0;
+  d->mErrorHandler = nullptr;
   if ( config.isEmpty() )
-    d->mConfig = 0;
+    d->mConfig = nullptr;
   else
     d->mConfig = new TDEConfig( config );
   d->mManager = new KRES::Manager<Resource>( "contact" );
@@ -327,10 +327,10 @@ AddressBook::AddressBook( const TQString &config )
 
 AddressBook::~AddressBook()
 {
-  delete d->mManager; d->mManager = 0;
-  delete d->mConfig; d->mConfig = 0;
-  delete d->mErrorHandler; d->mErrorHandler = 0;
-  delete d; d = 0;
+  delete d->mManager; d->mManager = nullptr;
+  delete d->mConfig; d->mConfig = nullptr;
+  delete d->mErrorHandler; d->mErrorHandler = nullptr;
+  delete d; d = nullptr;
 }
 
 bool AddressBook::load()
@@ -496,13 +496,13 @@ Ticket *AddressBook::requestSaveTicket( Resource *resource )
   for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) {
     if ( (*it) == resource ) {
       if ( (*it)->readOnly() || !(*it)->isOpen() )
-        return 0;
+        return nullptr;
       else
         return (*it)->requestSaveTicket();
     }
   }
 
-  return 0;
+  return nullptr;
 }
 
 void AddressBook::releaseSaveTicket( Ticket *ticket )
@@ -518,7 +518,7 @@ void AddressBook::releaseSaveTicket( Ticket *ticket )
 void AddressBook::insertAddressee( const Addressee &a )
 {
   Resource *resource = a.resource();
-  if ( resource == 0 )
+  if ( !resource )
     resource = standardResource();
 
   Resource::Iterator it;
@@ -529,7 +529,7 @@ void AddressBook::insertAddressee( const Addressee &a )
     if ( fAddr != a )
       addr.setRevision( TQDateTime::currentDateTime() );
     else {
-      if ( fAddr.resource() == 0 ) {
+      if ( !fAddr.resource() ) {
         fAddr.setResource( resource );
         //NOTE: Should we have setChanged( true ) here?
         resource->insertAddressee( fAddr );
@@ -729,9 +729,9 @@ bool AddressBook::removeResource( Resource *resource )
   resource->close();
 
   if ( resource == standardResource() )
-    d->mManager->setStandardResource( 0 );
+    d->mManager->setStandardResource( nullptr );
 
-  resource->setAddressBook( 0 );
+  resource->setAddressBook( nullptr );
 
   disconnect( resource, TQ_SIGNAL( loadingFinished( Resource* ) ),
               this, TQ_SLOT( resourceLoadingFinished( Resource* ) ) );
diff --git a/tdeabc/addressbook.h b/tdeabc/addressbook.h
index f505f5526..990341cf3 100644
--- a/tdeabc/addressbook.h
+++ b/tdeabc/addressbook.h
@@ -133,7 +133,7 @@ class KABC_EXPORT AddressBook : public TQObject
               otherwise.
       @see save()
      */
-    Ticket *requestSaveTicket( Resource *resource = 0 );
+    Ticket *requestSaveTicket( Resource *resource = nullptr );
 
     /**
       Releases the ticket requested previously with requestSaveTicket().
diff --git a/tdeabc/addresseedialog.cpp b/tdeabc/addresseedialog.cpp
index 73e7b7172..4f0593e55 100644
--- a/tdeabc/addresseedialog.cpp
+++ b/tdeabc/addresseedialog.cpp
@@ -193,7 +193,7 @@ void AddresseeDialog::removeSelected()
 
 Addressee AddresseeDialog::addressee()
 {
-  AddresseeItem *aItem = 0;
+  AddresseeItem *aItem = nullptr;
 
   if ( mMultiple )
     aItem = dynamic_cast<AddresseeItem *>( mSelectedList->firstChild() );
@@ -207,7 +207,7 @@ Addressee AddresseeDialog::addressee()
 Addressee::List AddresseeDialog::addressees()
 {
   Addressee::List al;
-  AddresseeItem *aItem = 0;
+  AddresseeItem *aItem = nullptr;
 
   if ( mMultiple ) {
     TQListViewItem *item = mSelectedList->firstChild();
diff --git a/tdeabc/addresseedialog.h b/tdeabc/addresseedialog.h
index 4623abdb1..5cd0c99cc 100644
--- a/tdeabc/addresseedialog.h
+++ b/tdeabc/addresseedialog.h
@@ -91,7 +91,7 @@ class KABC_EXPORT AddresseeDialog : public KDialogBase
       @param parent parent widget
       @param multiple if true, indicates a multiple selection.
     */
-    AddresseeDialog( TQWidget *parent=0, bool multiple=false );
+    AddresseeDialog( TQWidget *parent=nullptr, bool multiple=false );
 
     /**
       Destructor.
diff --git a/tdeabc/addresseelist.cpp b/tdeabc/addresseelist.cpp
index 5a4aa609b..1a9da52d9 100644
--- a/tdeabc/addresseelist.cpp
+++ b/tdeabc/addresseelist.cpp
@@ -104,7 +104,7 @@ bool SortingTraits::GivenName::lt( const Addressee &a1, const Addressee &a2 )
 //
 //
 
-static Field *sActiveField=0;
+static Field *sActiveField=nullptr;
 
 AddresseeList::AddresseeList()
   : TQValueList<Addressee>()
@@ -234,7 +234,7 @@ void AddresseeList::sortByField( Field *field )
 
   TDEABC::Addressee::setSortMode( mode );
   qHeapSort( *this );
-  TDEABC::Addressee::setSortMode( 0 );
+  TDEABC::Addressee::setSortMode( nullptr );
 
   delete mode;
 }
@@ -246,7 +246,7 @@ void AddresseeList::sortByMode( SortMode *mode )
 
   TDEABC::Addressee::setSortMode( mode );
   qHeapSort( *this );
-  TDEABC::Addressee::setSortMode( 0 );
+  TDEABC::Addressee::setSortMode( nullptr );
 }
 
 Field*
diff --git a/tdeabc/addresseelist.h b/tdeabc/addresseelist.h
index 7825a0c2c..3f0b27378 100644
--- a/tdeabc/addresseelist.h
+++ b/tdeabc/addresseelist.h
@@ -146,14 +146,14 @@ class KABC_EXPORT AddresseeList : public TQValueList<Addressee>
      * last used Field object will be used.
      * @param field    pointer to the Field object to be sorted by
      */
-    void sortByField( Field *field = 0 );
+    void sortByField( Field *field = nullptr );
 
     /**
      * Sorts this list by a specific sorting mode.
      * @param mode    pointer to the sorting mode object to be sorted by
      * @since 3.4
     */
-    void sortByMode( SortMode *mode = 0 );
+    void sortByMode( SortMode *mode = nullptr );
 
     /**
      * Sorts this list by its active sorting criterion. This normally is the
diff --git a/tdeabc/addresslineedit.cpp b/tdeabc/addresslineedit.cpp
index 8922d76e7..09ce38c27 100644
--- a/tdeabc/addresslineedit.cpp
+++ b/tdeabc/addresslineedit.cpp
@@ -55,13 +55,13 @@
 
 using namespace TDEABC;
 
-TDECompletion * AddressLineEdit::s_completion = 0L;
+TDECompletion * AddressLineEdit::s_completion = nullptr;
 bool AddressLineEdit::s_addressesDirty = false;
-TQTimer* AddressLineEdit::s_LDAPTimer = 0L;
-LdapSearch* AddressLineEdit::s_LDAPSearch = 0L;
-TQString* AddressLineEdit::s_LDAPText = 0L;
-AddressLineEdit* AddressLineEdit::s_LDAPLineEdit = 0L;
-TDEConfig *AddressLineEdit::s_config = 0L;
+TQTimer* AddressLineEdit::s_LDAPTimer = nullptr;
+LdapSearch* AddressLineEdit::s_LDAPSearch = nullptr;
+TQString* AddressLineEdit::s_LDAPText = nullptr;
+AddressLineEdit* AddressLineEdit::s_LDAPLineEdit = nullptr;
+TDEConfig *AddressLineEdit::s_config = nullptr;
 
 static KStaticDeleter<TDECompletion> completionDeleter;
 static KStaticDeleter<TQTimer> ldapTimerDeleter;
@@ -177,7 +177,7 @@ void AddressLineEdit::keyPressEvent(TQKeyEvent *e)
 
     if( e->isAccepted())
     {
-        if( m_useCompletion && s_LDAPTimer != NULL )
+        if( m_useCompletion && s_LDAPTimer )
         {
             if( *s_LDAPText != text())
                 stopLDAPLookup();
@@ -457,7 +457,7 @@ void AddressLineEdit::slotStartLDAPLookup()
 void AddressLineEdit::stopLDAPLookup()
 {
     s_LDAPSearch->cancelSearch();
-    s_LDAPLineEdit = NULL;
+    s_LDAPLineEdit = nullptr;
 }
 
 void AddressLineEdit::startLoadingLDAPEntries()
diff --git a/tdeabc/addresslineedit.h b/tdeabc/addresslineedit.h
index d42e35533..98aaf1aaa 100644
--- a/tdeabc/addresslineedit.h
+++ b/tdeabc/addresslineedit.h
@@ -52,7 +52,7 @@ class KABC_EXPORT AddressLineEdit : public KLineEdit
   TQ_OBJECT
 public:
   AddressLineEdit(TQWidget* parent, bool useCompletion = true,
-		const char *name = 0L);
+		const char *name = nullptr);
   virtual ~AddressLineEdit();
 
   /**
diff --git a/tdeabc/agent.cpp b/tdeabc/agent.cpp
index 6c3f140ef..0b8b273b1 100644
--- a/tdeabc/agent.cpp
+++ b/tdeabc/agent.cpp
@@ -25,12 +25,12 @@
 using namespace TDEABC;
 
 Agent::Agent()
-  : mAddressee( 0 ), mIntern( false )
+  : mAddressee( nullptr ), mIntern( false )
 {
 }
 
 Agent::Agent( const TQString &url )
-  : mAddressee( 0 ),mUrl( url ), mIntern( false )
+  : mAddressee( nullptr ),mUrl( url ), mIntern( false )
 {
 }
 
@@ -42,7 +42,7 @@ Agent::Agent( Addressee *addressee )
 Agent::~Agent()
 {
   delete mAddressee;
-  mAddressee = 0;
+  mAddressee = nullptr;
 }
 
 bool Agent::operator==( const Agent &a ) const
@@ -124,7 +124,7 @@ TQString Agent::asString() const
 
 TQDataStream &TDEABC::operator<<( TQDataStream &s, const Agent &agent )
 {
-  TQ_UINT32 hasAddressee = ( agent.mAddressee != 0 );
+  TQ_UINT32 hasAddressee = ( agent.mAddressee != nullptr );
 
   s << agent.mIntern << agent.mUrl << hasAddressee;
   if ( hasAddressee )
diff --git a/tdeabc/distributionlist.cpp b/tdeabc/distributionlist.cpp
index 40f221438..c9ebf53d7 100644
--- a/tdeabc/distributionlist.cpp
+++ b/tdeabc/distributionlist.cpp
@@ -129,7 +129,7 @@ DistributionListManager::~DistributionListManager()
   mLists.clear();
 
   delete d;
-  d = 0;
+  d = nullptr;
 }
 
 DistributionList *DistributionListManager::list( const TQString &name )
@@ -139,7 +139,7 @@ DistributionList *DistributionListManager::list( const TQString &name )
     if ( list->name() == name ) return list;
   }
 
-  return 0;
+  return nullptr;
 }
 
 void DistributionListManager::insert( DistributionList *l )
@@ -267,7 +267,7 @@ bool DistributionListManager::save()
   return true;
 }
 
-DistributionListWatcher* DistributionListWatcher::mSelf = 0;
+DistributionListWatcher* DistributionListWatcher::mSelf = nullptr;
 
 DistributionListWatcher::DistributionListWatcher()
  : TQObject( tqApp, "DistributionListWatcher" )
@@ -282,7 +282,7 @@ DistributionListWatcher::DistributionListWatcher()
 DistributionListWatcher::~DistributionListWatcher()
 {
   delete mDirWatch;
-  mDirWatch = 0;
+  mDirWatch = nullptr;
 }
 
 DistributionListWatcher *DistributionListWatcher::self()
diff --git a/tdeabc/distributionlistdialog.cpp b/tdeabc/distributionlistdialog.cpp
index 9d424a927..6aa889c85 100644
--- a/tdeabc/distributionlistdialog.cpp
+++ b/tdeabc/distributionlistdialog.cpp
@@ -54,7 +54,7 @@ DistributionListDialog::~DistributionListDialog()
 }
 
 // TODO KDE4: Add d-pointer to EmailSelector, make sEmailMap a member variable
-static TQMap<TQWidget*,TQString> *sEmailMap = 0;
+static TQMap<TQWidget*,TQString> *sEmailMap = nullptr;
 
 EmailSelector::EmailSelector( const TQStringList &emails, const TQString &current,
                                       TQWidget *parent ) :
diff --git a/tdeabc/distributionlisteditor.cpp b/tdeabc/distributionlisteditor.cpp
index e2882378f..386cde53d 100644
--- a/tdeabc/distributionlisteditor.cpp
+++ b/tdeabc/distributionlisteditor.cpp
@@ -184,7 +184,7 @@ DistributionListEditor::~DistributionListEditor()
 void DistributionListEditor::slotSelectionEntryViewChanged()
 {
     EditEntryItem *entryItem = dynamic_cast<EditEntryItem *>( mEntryView->selectedItem() );
-    bool state = (entryItem != 0L);
+    bool state = (entryItem != nullptr);
 
     changeEmailButton->setEnabled(state);
     removeEntryButton->setEnabled(state);
@@ -278,7 +278,7 @@ void DistributionListEditor::updateEntryView()
     new EditEntryItem( mEntryView, (*it).addressee, (*it).email );
   }
    EditEntryItem *entryItem = dynamic_cast<EditEntryItem *>( mEntryView->selectedItem() );
-   bool state = (entryItem != 0L);
+   bool state = (entryItem != nullptr);
 
    changeEmailButton->setEnabled(state);
    removeEntryButton->setEnabled(state);
@@ -305,6 +305,6 @@ void DistributionListEditor::slotSelectionAddresseeViewChanged()
 {
     AddresseeItem *addresseeItem =
         dynamic_cast<AddresseeItem *>( mAddresseeView->selectedItem() );
-    bool state = (addresseeItem != 0L);
+    bool state = (addresseeItem != nullptr);
     addEntryButton->setEnabled( state && !mNameCombo->currentText().isEmpty());
 }
diff --git a/tdeabc/errorhandler.cpp b/tdeabc/errorhandler.cpp
index 5bf327ac5..f18d5cae2 100644
--- a/tdeabc/errorhandler.cpp
+++ b/tdeabc/errorhandler.cpp
@@ -39,7 +39,7 @@ void ConsoleErrorHandler::error( const TQString &msg )
 
 void GUIErrorHandler::error( const TQString &msg )
 {
-  KMessageBox::error( 0, msg, i18n( "Error in libtdeabc" ) );
+  KMessageBox::error( nullptr, msg, i18n( "Error in libtdeabc" ) );
 }
 
 
diff --git a/tdeabc/formatfactory.cpp b/tdeabc/formatfactory.cpp
index ead39805e..07a70ffa3 100644
--- a/tdeabc/formatfactory.cpp
+++ b/tdeabc/formatfactory.cpp
@@ -32,7 +32,7 @@
 
 using namespace TDEABC;
 
-FormatFactory *FormatFactory::mSelf = 0;
+FormatFactory *FormatFactory::mSelf = nullptr;
 static KStaticDeleter<FormatFactory> factoryDeleter;
 
 FormatFactory *FormatFactory::self()
@@ -101,17 +101,17 @@ TQStringList FormatFactory::formats()
 FormatInfo *FormatFactory::info( const TQString &type )
 {
   if ( type.isEmpty() )
-    return 0;
+    return nullptr;
   else
     return mFormatList[ type ];
 }
 
 FormatPlugin *FormatFactory::format( const TQString& type )
 {
-  FormatPlugin *format = 0;
+  FormatPlugin *format = nullptr;
 
   if ( type.isEmpty() )
-    return 0;
+    return nullptr;
 
   if ( type == "vcard" ) {
     format = new VCardFormatPlugin;
@@ -123,12 +123,12 @@ FormatPlugin *FormatFactory::format( const TQString& type )
 
   FormatInfo *fi = mFormatList[ type ];
   if (!fi)
-	  return 0;
+	  return nullptr;
   TQString libName = fi->library;
 
   KLibrary *library = openLibrary( libName );
   if ( !library )
-    return 0;
+    return nullptr;
 
   void *format_func = library->symbol( "format" );
 
@@ -139,7 +139,7 @@ FormatPlugin *FormatFactory::format( const TQString& type )
     format->setDescriptionLabel( fi->descriptionLabel );
   } else {
     kdDebug( 5700 ) << "'" << libName << "' is not a format plugin." << endl;
-    return 0;
+    return nullptr;
   }
 
   return format;
@@ -148,20 +148,20 @@ FormatPlugin *FormatFactory::format( const TQString& type )
 
 KLibrary *FormatFactory::openLibrary( const TQString& libName )
 {
-  KLibrary *library = 0;
+  KLibrary *library = nullptr;
 
   TQString path = KLibLoader::findLibrary( TQFile::encodeName( libName ) );
 
   if ( path.isEmpty() ) {
     kdDebug( 5700 ) << "No format plugin library was found!" << endl;
-    return 0;
+    return nullptr;
   }
 
   library = KLibLoader::self()->library( TQFile::encodeName( path ) );
 
   if ( !library ) {
     kdDebug( 5700 ) << "Could not load library '" << libName << "'" << endl;
-    return 0;
+    return nullptr;
   }
 
   return library;
diff --git a/tdeabc/ldapclient.cpp b/tdeabc/ldapclient.cpp
index 5ae18b848..b4104c5cb 100644
--- a/tdeabc/ldapclient.cpp
+++ b/tdeabc/ldapclient.cpp
@@ -77,7 +77,7 @@ void LdapObject::assign( const LdapObject& that )
 }
 
 LdapClient::LdapClient( TQObject* parent, const char* name )
-  : TQObject( parent, name ), mJob( 0 ), mActive( false )
+  : TQObject( parent, name ), mJob( nullptr ), mActive( false )
 {
   d = new LdapClientPrivate;
 }
@@ -85,7 +85,7 @@ LdapClient::LdapClient( TQObject* parent, const char* name )
 LdapClient::~LdapClient()
 {
   cancelQuery();
-  delete d; d = 0;
+  delete d; d = nullptr;
 }
 
 void LdapClient::setHost( const TQString& host )
@@ -150,7 +150,7 @@ void LdapClient::cancelQuery()
 {
   if ( mJob ) {
     mJob->kill();
-    mJob = 0;
+    mJob = nullptr;
   }
 
   mActive = false;
@@ -189,8 +189,8 @@ void LdapClient::slotDone()
 void LdapClient::startParseLDIF()
 {
   mCurrentObject.clear();
-  mLastAttrName  = 0;
-  mLastAttrValue = 0;
+  mLastAttrName  = nullptr;
+  mLastAttrValue = nullptr;
   mIsBase64 = false;
   d->ldif.startParsing();
 }
diff --git a/tdeabc/ldapclient.h b/tdeabc/ldapclient.h
index c05162a22..f99d046e5 100644
--- a/tdeabc/ldapclient.h
+++ b/tdeabc/ldapclient.h
@@ -50,7 +50,7 @@ class KABC_EXPORT LdapObject
 {
   public:
     LdapObject()
-      : dn( TQString::null ), client( 0 ) {}
+      : dn( TQString::null ), client( nullptr ) {}
     explicit LdapObject( const TQString& _dn, LdapClient* _cl ) : dn( _dn ), client( _cl ) {}
     LdapObject( const LdapObject& that ) { assign( that ); }
 
@@ -87,7 +87,7 @@ class KABC_EXPORT LdapClient : public TQObject
   TQ_OBJECT
 
   public:
-    LdapClient( TQObject* parent = 0, const char* name = 0 );
+    LdapClient( TQObject* parent = nullptr, const char* name = nullptr );
     virtual ~LdapClient();
 
     /*! returns true if there is a query running */
diff --git a/tdeabc/ldapconfigwidget.cpp b/tdeabc/ldapconfigwidget.cpp
index 0c5b845be..d5708f9da 100644
--- a/tdeabc/ldapconfigwidget.cpp
+++ b/tdeabc/ldapconfigwidget.cpp
@@ -47,7 +47,7 @@ using namespace TDEABC;
 LdapConfigWidget::LdapConfigWidget( TQWidget* parent,
   const char* name, WFlags fl ) : TQWidget( parent, name, fl )
 {
-  mProg = 0;
+  mProg = nullptr;
   mFlags = 0;
   mainLayout = new TQGridLayout( this, 12, 4, 0,
       KDialog::spacingHint() );
@@ -57,7 +57,7 @@ LdapConfigWidget::LdapConfigWidget( int flags, TQWidget* parent,
   const char* name, WFlags fl ) : TQWidget( parent, name, fl )
 {
   mFlags = flags;
-  mProg = 0;
+  mProg = nullptr;
   mainLayout = new TQGridLayout( this, 12, 4, 0,
       KDialog::spacingHint() );
   initWidget();
@@ -71,11 +71,11 @@ void LdapConfigWidget::initWidget()
 {
   TQLabel *label;
 
-  mUser = mPassword = mHost = mDn = mBindDN = mRealm = mFilter = 0;
-  mPort = mVer = mTimeLimit = mSizeLimit = 0;
-  mAnonymous = mSimple = mSASL = mSecNO = mSecTLS = mSecSSL = 0;
-  mEditButton =  mQueryMech = 0;
-  mMech = 0;
+  mUser = mPassword = mHost = mDn = mBindDN = mRealm = mFilter = nullptr;
+  mPort = mVer = mTimeLimit = mSizeLimit = nullptr;
+  mAnonymous = mSimple = mSASL = mSecNO = mSecTLS = mSecSSL = nullptr;
+  mEditButton =  mQueryMech = nullptr;
+  mMech = nullptr;
   int row = 0;
   int col;
   
@@ -298,8 +298,8 @@ void LdapConfigWidget::sendQuery()
   connect( job, TQ_SIGNAL( result( TDEIO::Job* ) ),
     this, TQ_SLOT( loadResult( TDEIO::Job* ) ) );
 
-  if ( mProg == NULL )
-    mProg = new KProgressDialog( this, 0, i18n("LDAP Query"), _url.prettyURL(), true );
+  if ( !mProg )
+    mProg = new KProgressDialog( this, nullptr, i18n("LDAP Query"), _url.prettyURL(), true );
   else
     mProg->setLabel( _url.prettyURL() );
   mProg->progressBar()->setValue( 0 );
@@ -499,7 +499,7 @@ TQString LdapConfigWidget::filter() const
 
 void LdapConfigWidget::setMech( const TQString &mech )
 {
-  if ( mMech == 0 ) return;
+  if ( !mMech ) return;
   if ( !mech.isEmpty() ) {
     int i = 0;
     while ( i < mMech->count() ) {
@@ -613,7 +613,7 @@ void LdapConfigWidget::setFlags( int flags )
   TQWidget *widget;
 
   obj = ch2.first();
-  while ( obj != 0 ) {
+  while ( obj ) {
     widget = dynamic_cast<TQWidget*> (obj);
     if ( widget && widget->parent() == this ) {
       mainLayout->remove( widget );
diff --git a/tdeabc/ldapconfigwidget.h b/tdeabc/ldapconfigwidget.h
index 9f053bfd9..7af71b04f 100644
--- a/tdeabc/ldapconfigwidget.h
+++ b/tdeabc/ldapconfigwidget.h
@@ -94,11 +94,11 @@ namespace TDEABC {
       /** Constructs an empty configuration widget.
        * You need to call setFlags() after this.
        */
-      LdapConfigWidget( TQWidget* parent = 0, 
-        const char* name = 0, WFlags fl = 0 );
+      LdapConfigWidget( TQWidget* parent = nullptr,
+        const char* name = nullptr, WFlags fl = 0 );
       /** Constructs a configuration widget */
-      LdapConfigWidget( int flags, TQWidget* parent = 0,
-        const char* name = 0, WFlags fl = 0 );
+      LdapConfigWidget( int flags, TQWidget* parent = nullptr,
+        const char* name = nullptr, WFlags fl = 0 );
       /** Destructs a configuration widget */
       virtual ~LdapConfigWidget();
 
diff --git a/tdeabc/plugins/dir/resourcedir.cpp b/tdeabc/plugins/dir/resourcedir.cpp
index d3cde77c1..2c5fa444f 100644
--- a/tdeabc/plugins/dir/resourcedir.cpp
+++ b/tdeabc/plugins/dir/resourcedir.cpp
@@ -68,7 +68,7 @@ ResourceDir::ResourceDir( const TDEConfig *config )
 }
 
 ResourceDir::ResourceDir( const TQString &path, const TQString &format )
-  : Resource( 0 ), mAsynchronous( false )
+  : Resource( nullptr ), mAsynchronous( false )
 {
   init( path, format );
 }
@@ -85,7 +85,7 @@ void ResourceDir::init( const TQString &path, const TQString &format )
     mFormat = factory->format( mFormatName );
   }
 
-  mLock = 0;
+  mLock = nullptr;
 
   connect( &mDirWatch, TQ_SIGNAL( dirty(const TQString&) ), TQ_SLOT( pathChanged() ) );
   connect( &mDirWatch, TQ_SIGNAL( created(const TQString&) ), TQ_SLOT( pathChanged() ) );
@@ -97,7 +97,7 @@ void ResourceDir::init( const TQString &path, const TQString &format )
 ResourceDir::~ResourceDir()
 {
   delete mFormat;
-  mFormat = 0;
+  mFormat = nullptr;
 }
 
 void ResourceDir::writeConfig( TDEConfig *config )
@@ -116,7 +116,7 @@ Ticket *ResourceDir::requestSaveTicket()
 {
   kdDebug(5700) << "ResourceDir::requestSaveTicket()" << endl;
 
-  if ( !addressBook() ) return 0;
+  if ( !addressBook() ) return nullptr;
 
   delete mLock;
   mLock = new Lock( mPath );
@@ -127,7 +127,7 @@ Ticket *ResourceDir::requestSaveTicket()
     addressBook()->error( mLock->error() );
     kdDebug(5700) << "ResourceFile::requestSaveTicket(): Unable to lock path '"
                   << mPath << "': " << mLock->error() << endl;
-    return 0;
+    return nullptr;
   }
 
   return createTicket( this );
@@ -138,7 +138,7 @@ void ResourceDir::releaseSaveTicket( Ticket *ticket )
   delete ticket;
   
   delete mLock;
-  mLock = 0;
+  mLock = nullptr;
 }
 
 bool ResourceDir::doOpen()
diff --git a/tdeabc/plugins/dir/resourcedirconfig.h b/tdeabc/plugins/dir/resourcedirconfig.h
index 9ba2ec492..3351dffeb 100644
--- a/tdeabc/plugins/dir/resourcedirconfig.h
+++ b/tdeabc/plugins/dir/resourcedirconfig.h
@@ -33,7 +33,7 @@ class KABC_EXPORT ResourceDirConfig : public KRES::ConfigWidget
   TQ_OBJECT
 
 public:
-  ResourceDirConfig( TQWidget* parent = 0, const char* name = 0 );
+  ResourceDirConfig( TQWidget* parent = nullptr, const char* name = nullptr );
 
   void setEditMode( bool value );
 
diff --git a/tdeabc/plugins/evolution/dbwrapper.cpp b/tdeabc/plugins/evolution/dbwrapper.cpp
index fbdff165a..f1232f8e7 100644
--- a/tdeabc/plugins/evolution/dbwrapper.cpp
+++ b/tdeabc/plugins/evolution/dbwrapper.cpp
@@ -100,7 +100,7 @@ struct DBWrapper::Data {
 };
 DBWrapper::DBWrapper() {
     data = new Data;
-    (void)db_create(&data->db, NULL, 0 );
+    (void)db_create(&data->db, nullptr, 0 );
     data->only = false;
 }
 DBWrapper::~DBWrapper() {
@@ -109,7 +109,7 @@ DBWrapper::~DBWrapper() {
 }
 bool DBWrapper::open( const TQString& file, bool on) {
     data->only = on;
-    return  !data->db->open(data->db, TQFile::encodeName( file ), NULL, DB_HASH, 0, 0666 );
+    return  !data->db->open(data->db, TQFile::encodeName( file ), nullptr, DB_HASH, 0, 0666 );
 }
 bool DBWrapper::save() {
     return true;
@@ -119,7 +119,7 @@ DBIterator DBWrapper::begin() {
     DBC* cursor;
     DBT key, val;
     int ret;
-    ret = data->db->cursor(data->db, NULL, &cursor, 0 );
+    ret = data->db->cursor(data->db, nullptr, &cursor, 0 );
     if (ret ) {
         it.data->atEnd = true;
         return it;
@@ -154,7 +154,7 @@ bool DBWrapper::find( const TQString& _key,  TQString& _val ) {
     key.data = db_key.data();
     key.size = db_key.size();
 
-    int ret  = data->db->get(data->db, NULL, &key,  &val, 0 );
+    int ret  = data->db->get(data->db, nullptr, &key,  &val, 0 );
     if (!ret) {
         _val = TQString::fromUtf8( (char*)val.data, val.size );
         tqWarning("key: %s val: %sXXX", (char*)key.data, (char*)val.data );
@@ -174,7 +174,7 @@ bool DBWrapper::add( const TQString& _key, const TQString& _val ) {
     val.data = db_val.data();
     val.size = db_val.size();
 
-    return !data->db->put(data->db, NULL, &key, &val, 0 );
+    return !data->db->put(data->db, nullptr, &key, &val, 0 );
 }
 bool DBWrapper::remove( const TQString& _key ) {
     TQCString db_key = _key.local8Bit();
@@ -183,5 +183,5 @@ bool DBWrapper::remove( const TQString& _key ) {
     key.data = db_key.data();
     key.size = db_key.size();
 
-    return !data->db->del(data->db, NULL, &key, 0 );
+    return !data->db->del(data->db, nullptr, &key, 0 );
 }
diff --git a/tdeabc/plugins/file/resourcefile.cpp b/tdeabc/plugins/file/resourcefile.cpp
index f48790948..7786ecd2e 100644
--- a/tdeabc/plugins/file/resourcefile.cpp
+++ b/tdeabc/plugins/file/resourcefile.cpp
@@ -47,7 +47,7 @@
 using namespace TDEABC;
 
 ResourceFile::ResourceFile( const TDEConfig *config )
-  : Resource( config ), mFormat( 0 ),
+  : Resource( config ), mFormat( nullptr ),
     mAsynchronous( false )
 {
   TQString fileName, formatName;
@@ -65,7 +65,7 @@ ResourceFile::ResourceFile( const TDEConfig *config )
 
 ResourceFile::ResourceFile( const TQString &fileName,
                             const TQString &formatName )
-  : Resource( 0 ), mFormat( 0 ),
+  : Resource( nullptr ), mFormat( nullptr ),
     mAsynchronous( false )
 {
   init( fileName, formatName );
@@ -89,13 +89,13 @@ void ResourceFile::init( const TQString &fileName, const TQString &formatName )
 
   setFileName( fileName );
 
-  mLock = 0;
+  mLock = nullptr;
 }
 
 ResourceFile::~ResourceFile()
 {
   delete mFormat;
-  mFormat = 0;
+  mFormat = nullptr;
 }
 
 void ResourceFile::writeConfig( TDEConfig *config )
@@ -114,7 +114,7 @@ Ticket *ResourceFile::requestSaveTicket()
 {
   kdDebug(5700) << "ResourceFile::requestSaveTicket()" << endl;
 
-  if ( !addressBook() ) return 0;
+  if ( !addressBook() ) return nullptr;
 
   delete mLock;
   mLock = new Lock( mFileName );
@@ -125,7 +125,7 @@ Ticket *ResourceFile::requestSaveTicket()
     addressBook()->error( mLock->error() );
     kdDebug(5700) << "ResourceFile::requestSaveTicket(): Unable to lock file '"
                   << mFileName << "': " << mLock->error() << endl;
-    return 0;
+    return nullptr;
   }
 
   return createTicket( this );
@@ -136,7 +136,7 @@ void ResourceFile::releaseSaveTicket( Ticket *ticket )
   delete ticket;
 
   delete mLock;
-  mLock = 0;
+  mLock = nullptr;
 
   addressBook()->emitAddressBookUnlocked();
 }
diff --git a/tdeabc/plugins/file/resourcefileconfig.h b/tdeabc/plugins/file/resourcefileconfig.h
index 0f3c12cd5..26d165a06 100644
--- a/tdeabc/plugins/file/resourcefileconfig.h
+++ b/tdeabc/plugins/file/resourcefileconfig.h
@@ -33,7 +33,7 @@ class KABC_EXPORT ResourceFileConfig : public KRES::ConfigWidget
   TQ_OBJECT
 
 public:
-  ResourceFileConfig( TQWidget* parent = 0, const char* name = 0 );
+  ResourceFileConfig( TQWidget* parent = nullptr, const char* name = nullptr );
 
   void setEditMode( bool value );
 
diff --git a/tdeabc/plugins/ldaptdeio/resourceldaptdeio.cpp b/tdeabc/plugins/ldaptdeio/resourceldaptdeio.cpp
index a2c5523af..8a1668ce7 100644
--- a/tdeabc/plugins/ldaptdeio/resourceldaptdeio.cpp
+++ b/tdeabc/plugins/ldaptdeio/resourceldaptdeio.cpp
@@ -122,7 +122,7 @@ ResourceLDAPTDEIO::~ResourceLDAPTDEIO()
 
 void ResourceLDAPTDEIO::enter_loop()
 {
-  TQWidget dummy(0,0,(WFlags)(WType_Dialog | WShowModal));
+  TQWidget dummy(nullptr,nullptr,(WFlags)(WType_Dialog | WShowModal));
   dummy.setFocusPolicy( TQWidget::NoFocus );
   tqt_enter_modal(&dummy);
   tqApp->enter_loop();
@@ -454,7 +454,7 @@ Ticket *ResourceLDAPTDEIO::requestSaveTicket()
 {
   if ( !addressBook() ) {
     kdDebug(7125) << "no addressbook" << endl;
-    return 0;
+    return nullptr;
   }
 
   return createTicket( this );
@@ -476,7 +476,7 @@ void ResourceLDAPTDEIO::doClose()
 
 void ResourceLDAPTDEIO::createCache()
 {
-  d->mTmp = NULL;
+  d->mTmp = nullptr;
   if ( d->mCachePolicy == Cache_NoConnection && d->mAutoCache ) {
     d->mTmp = new KTempFile( d->mCacheDst, "tmp" );
     d->mTmp->setAutoDelete( true );
@@ -491,13 +491,13 @@ void ResourceLDAPTDEIO::activateCache()
   }
   if ( d->mTmp ) {
     delete d->mTmp;
-    d->mTmp = 0;
+    d->mTmp = nullptr;
   }
 }
 
 TDEIO::Job *ResourceLDAPTDEIO::loadFromCache()
 {
-  TDEIO::Job *job = NULL;
+  TDEIO::Job *job = nullptr;
   if ( d->mCachePolicy == Cache_Always || 
      ( d->mCachePolicy == Cache_NoConnection && 
       d->mError == TDEIO::ERR_COULD_NOT_CONNECT ) ) {
@@ -577,7 +577,7 @@ bool ResourceLDAPTDEIO::asyncLoad()
     connect( job, TQ_SIGNAL( result( TDEIO::Job* ) ),
       this, TQ_SLOT( result( TDEIO::Job* ) ) );
   } else {
-    result( NULL );
+    result( nullptr );
   }
   return true;
 }
@@ -815,7 +815,7 @@ void ResourceLDAPTDEIO::removeAddressee( const Addressee& addr )
     url.setPath( "/" + dn );
     url.setExtension( "x-dir", "base" );
     url.setScope( LDAPUrl::Base );
-    if ( TDEIO::NetAccess::del( url, NULL ) ) mAddrMap.erase( addr.uid() );
+    if ( TDEIO::NetAccess::del( url, nullptr ) ) mAddrMap.erase( addr.uid() );
   } else {
     //maybe it's not saved yet
     mAddrMap.erase( addr.uid() );
diff --git a/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp b/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp
index 9dc8a8a57..eae4cf90e 100644
--- a/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp
+++ b/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.cpp
@@ -260,7 +260,7 @@ AttributesDialog::AttributesDialog( const TQMap<TQString, TQString> &attributes,
   TQMap<TQString, TQString>::ConstIterator it;
   int i, j = 0;
   for ( i = 2, it = attributes.begin(); it != attributes.end(); ++it, ++i ) {
-    if ( mNameDict[ it.key() ] == 0 ) {
+    if ( !mNameDict[ it.key() ] ) {
       i--;  
       continue;
     }
diff --git a/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.h b/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.h
index 2d3f3571f..d363b5e24 100644
--- a/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.h
+++ b/tdeabc/plugins/ldaptdeio/resourceldaptdeioconfig.h
@@ -47,7 +47,7 @@ class KABC_EXPORT ResourceLDAPTDEIOConfig : public KRES::ConfigWidget
   TQ_OBJECT
 
   public:
-    ResourceLDAPTDEIOConfig( TQWidget* parent = 0, const char* name = 0 );
+    ResourceLDAPTDEIOConfig( TQWidget* parent = nullptr, const char* name = nullptr );
 
   public slots:
     void loadSettings( KRES::Resource* );
@@ -72,7 +72,7 @@ class AttributesDialog : public KDialogBase
 
   public:
     AttributesDialog( const TQMap<TQString, TQString> &attributes, int rdnprefix,
-                      TQWidget *parent, const char *name = 0 );
+                      TQWidget *parent, const char *name = nullptr );
     ~AttributesDialog();
 
     TQMap<TQString, TQString> attributes() const;
@@ -97,7 +97,7 @@ class OfflineDialog : public KDialogBase
 
   public:
     OfflineDialog( bool autoCache, int cachePolicy, const KURL &src, 
-      const TQString &dst, TQWidget *parent, const char *name = 0 );
+      const TQString &dst, TQWidget *parent, const char *name = nullptr );
     ~OfflineDialog();
 
     int cachePolicy() const;
diff --git a/tdeabc/plugins/net/resourcenet.cpp b/tdeabc/plugins/net/resourcenet.cpp
index 08fa8764a..06b85c9cf 100644
--- a/tdeabc/plugins/net/resourcenet.cpp
+++ b/tdeabc/plugins/net/resourcenet.cpp
@@ -50,8 +50,8 @@ class ResourceNet::ResourceNetPrivate
 };
 
 ResourceNet::ResourceNet( const TDEConfig *config )
-  : Resource( config ), mFormat( 0 ),
-    mTempFile( 0 ),
+  : Resource( config ), mFormat( nullptr ),
+    mTempFile( nullptr ),
     d( new ResourceNetPrivate )
 {
   if ( config ) {
@@ -62,8 +62,8 @@ ResourceNet::ResourceNet( const TDEConfig *config )
 }
 
 ResourceNet::ResourceNet( const KURL &url, const TQString &format )
-  : Resource( 0 ), mFormat( 0 ),
-    mTempFile( 0 ),
+  : Resource( nullptr ), mFormat( nullptr ),
+    mTempFile( nullptr ),
     d( new ResourceNetPrivate )
 {
   init( url, format );
@@ -71,9 +71,9 @@ ResourceNet::ResourceNet( const KURL &url, const TQString &format )
 
 void ResourceNet::init( const KURL &url, const TQString &format )
 {
-  d->mLoadJob = 0;
+  d->mLoadJob = nullptr;
   d->mIsLoading = false;
-  d->mSaveJob = 0;
+  d->mSaveJob = nullptr;
   d->mIsSaving = false;
 
   mFormatName = format;
@@ -96,10 +96,10 @@ ResourceNet::~ResourceNet()
     d->mSaveJob->kill();
 
   delete d;
-  d = 0;
+  d = nullptr;
 
   delete mFormat;
-  mFormat = 0;
+  mFormat = nullptr;
 
   deleteLocalTempFile();
 }
@@ -137,7 +137,7 @@ bool ResourceNet::load()
 {
   TQString tempFile;
 
-  if ( !TDEIO::NetAccess::download( mUrl, tempFile, 0 ) ) {
+  if ( !TDEIO::NetAccess::download( mUrl, tempFile, nullptr ) ) {
     addressBook()->error( i18n( "Unable to download file '%1'." ).arg( mUrl.prettyURL() ) );
     return false;
   }
@@ -204,7 +204,7 @@ void ResourceNet::abortAsyncLoading()
 
   if ( d->mLoadJob ) {
     d->mLoadJob->kill(); // result not emitted
-    d->mLoadJob = 0;
+    d->mLoadJob = nullptr;
   }
 
   deleteLocalTempFile();
@@ -217,7 +217,7 @@ void ResourceNet::abortAsyncSaving()
 
   if ( d->mSaveJob ) {
     d->mSaveJob->kill(); // result not emitted
-    d->mSaveJob = 0;
+    d->mSaveJob = nullptr;
   }
 
   deleteLocalTempFile();
@@ -247,7 +247,7 @@ bool ResourceNet::save( Ticket* )
     return false;
   }
 
-  ok = TDEIO::NetAccess::upload( tempFile.name(), mUrl, 0 );
+  ok = TDEIO::NetAccess::upload( tempFile.name(), mUrl, nullptr );
   if ( !ok )
     addressBook()->error( i18n( "Unable to upload to '%1'." ).arg( mUrl.prettyURL() ) );
 
@@ -311,7 +311,7 @@ void ResourceNet::deleteStaleTempFile()
 void ResourceNet::deleteLocalTempFile()
 {
   delete mTempFile;
-  mTempFile = 0;
+  mTempFile = nullptr;
 }
 
 void ResourceNet::saveToFile( TQFile *file )
diff --git a/tdeabc/plugins/net/resourcenet.h b/tdeabc/plugins/net/resourcenet.h
index 0ce7bf862..de7668bf1 100644
--- a/tdeabc/plugins/net/resourcenet.h
+++ b/tdeabc/plugins/net/resourcenet.h
@@ -95,7 +95,7 @@ class KABC_EXPORT ResourceNet : public Resource
   private:
     bool clearAndLoad( TQFile *file );
     void saveToFile( TQFile *file );
-    bool hasTempFile() const { return mTempFile != 0; }
+    bool hasTempFile() const { return mTempFile != nullptr; }
     void abortAsyncLoading();
     void abortAsyncSaving();
     bool createLocalTempFile();
diff --git a/tdeabc/plugins/net/resourcenetconfig.h b/tdeabc/plugins/net/resourcenetconfig.h
index df1a73ba6..a0be639b8 100644
--- a/tdeabc/plugins/net/resourcenetconfig.h
+++ b/tdeabc/plugins/net/resourcenetconfig.h
@@ -33,7 +33,7 @@ class KABC_EXPORT ResourceNetConfig : public KRES::ConfigWidget
   TQ_OBJECT
 
   public:
-    ResourceNetConfig( TQWidget* parent = 0, const char* name = 0 );
+    ResourceNetConfig( TQWidget* parent = nullptr, const char* name = nullptr );
 
     void setEditMode( bool value );
 
diff --git a/tdeabc/plugins/sql/resourcesql.cpp b/tdeabc/plugins/sql/resourcesql.cpp
index 3741fff3b..4da33a833 100644
--- a/tdeabc/plugins/sql/resourcesql.cpp
+++ b/tdeabc/plugins/sql/resourcesql.cpp
@@ -40,7 +40,7 @@ extern "C"
 }
 
 ResourceSql::ResourceSql( AddressBook *ab, const TDEConfig *config )
-  : Resource( ab ), mDb( 0 )
+  : Resource( ab ), mDb( nullptr )
 {
   TQString user, password, db, host;
 
@@ -54,7 +54,7 @@ ResourceSql::ResourceSql( AddressBook *ab, const TDEConfig *config )
 
 ResourceSql::ResourceSql( AddressBook *ab, const TQString &user,
     const TQString &password, const TQString &db, const TQString &host )
-  : Resource( ab ), mDb( 0 )
+  : Resource( ab ), mDb( nullptr )
 {
   init( user, password, db, host );
 }
diff --git a/tdeabc/plugins/sql/resourcesqlconfig.h b/tdeabc/plugins/sql/resourcesqlconfig.h
index 116248809..b1ebf5138 100644
--- a/tdeabc/plugins/sql/resourcesqlconfig.h
+++ b/tdeabc/plugins/sql/resourcesqlconfig.h
@@ -33,7 +33,7 @@ class ResourceSqlConfig : public ResourceConfigWidget
   TQ_OBJECT
 
 public:
-  ResourceSqlConfig( TQWidget* parent = 0, const char* name = 0 );
+  ResourceSqlConfig( TQWidget* parent = nullptr, const char* name = nullptr );
 
 public slots:
   void loadSettings( TDEConfig *config );
diff --git a/tdeabc/resource.cpp b/tdeabc/resource.cpp
index ffa1a40e3..6aed16f6d 100644
--- a/tdeabc/resource.cpp
+++ b/tdeabc/resource.cpp
@@ -198,7 +198,7 @@ bool Resource::ConstIterator::operator!=( const ConstIterator &it )
 
 
 Resource::Resource( const TDEConfig *config )
-  : KRES::Resource( config ), mAddressBook( 0 )
+  : KRES::Resource( config ), mAddressBook( nullptr )
 {
 }
 
diff --git a/tdeabc/resourceselectdialog.cpp b/tdeabc/resourceselectdialog.cpp
index 1bede4a84..1acf11be7 100644
--- a/tdeabc/resourceselectdialog.cpp
+++ b/tdeabc/resourceselectdialog.cpp
@@ -80,7 +80,7 @@ Resource *ResourceSelectDialog::resource()
   if ( mResourceId->currentItem() != -1 )
     return mResourceMap[ mResourceId->currentItem() ];
   else
-    return 0;
+    return nullptr;
 }
 
 Resource *ResourceSelectDialog::getResource( AddressBook *ab, TQWidget *parent )
@@ -88,12 +88,12 @@ Resource *ResourceSelectDialog::getResource( AddressBook *ab, TQWidget *parent )
   TQPtrList<Resource> resources = ab->resources();
   if ( resources.count() == 1 ) return resources.first();
 
-  Resource *found = 0;
+  Resource *found = nullptr;
   Resource *r = resources.first();
   while( r ) {
     if ( !r->readOnly() ) {
       if ( found ) {
-        found = 0;
+        found = nullptr;
         break;
       } else {
         found = r;
@@ -105,7 +105,7 @@ Resource *ResourceSelectDialog::getResource( AddressBook *ab, TQWidget *parent )
 
   ResourceSelectDialog dlg( ab, parent );
   if ( dlg.exec() == KDialog::Accepted ) return dlg.resource();
-  else return 0;
+  else return nullptr;
 }
 
 #include "resourceselectdialog.moc"
diff --git a/tdeabc/resourceselectdialog.h b/tdeabc/resourceselectdialog.h
index 4536c7ece..b4228fe09 100644
--- a/tdeabc/resourceselectdialog.h
+++ b/tdeabc/resourceselectdialog.h
@@ -41,11 +41,11 @@ class KABC_EXPORT_DEPRECATED ResourceSelectDialog : KDialog
   TQ_OBJECT
 
   public:
-    ResourceSelectDialog( AddressBook *ab, TQWidget *parent = 0,
-                          const char *name = 0);
+    ResourceSelectDialog( AddressBook *ab, TQWidget *parent = nullptr,
+                          const char *name = nullptr);
     Resource *resource();
 
-    static Resource *getResource( AddressBook *ab, TQWidget *parent = 0 );
+    static Resource *getResource( AddressBook *ab, TQWidget *parent = nullptr );
 
   private:
     TDEListBox *mResourceId;
diff --git a/tdeabc/scripts/addressee.src.cpp b/tdeabc/scripts/addressee.src.cpp
index 3fec361f2..fb1d27208 100644
--- a/tdeabc/scripts/addressee.src.cpp
+++ b/tdeabc/scripts/addressee.src.cpp
@@ -42,7 +42,7 @@ template <class L>
 static bool listEquals( const TQValueList<L>&, const TQValueList<L>& );
 static bool emailsEquals( const TQStringList&, const TQStringList& );
 
-TDEABC::SortMode *Addressee::mSortMode = 0;
+TDEABC::SortMode *Addressee::mSortMode = nullptr;
 
 struct Addressee::AddresseeData : public TDEShared
 {
@@ -63,7 +63,7 @@ struct Addressee::AddresseeData : public TDEShared
   bool changed  :1;
 };
 
-Addressee::AddresseeData* Addressee::shared_null = 0;
+Addressee::AddresseeData* Addressee::shared_null = nullptr;
 
 Addressee::AddresseeData* Addressee::makeSharedNull()
 {
@@ -71,7 +71,7 @@ Addressee::AddresseeData* Addressee::makeSharedNull()
   shared_null->_TDEShared_ref(); //just in case (we should add KSD)
   shared_null->empty = true;
   shared_null->changed = false;
-  shared_null->resource = 0;
+  shared_null->resource = nullptr;
   return shared_null;
 }
 
@@ -104,7 +104,7 @@ void Addressee::detach()
     mData = new AddresseeData;
     mData->empty = true;
     mData->changed = false;
-    mData->resource = 0;
+    mData->resource = nullptr;
     mData->uid = TDEApplication::randomString( 10 );
     return;
   } else if ( mData.count() == 1 ) return;
diff --git a/tdeabc/scripts/field.src.cpp b/tdeabc/scripts/field.src.cpp
index e162ea961..f6a673c17 100644
--- a/tdeabc/scripts/field.src.cpp
+++ b/tdeabc/scripts/field.src.cpp
@@ -491,7 +491,7 @@ Field::List Field::restoreFields( TDEConfig *cfg, const TQString &identifier )
   int custom = 0;
   TQValueList<int>::ConstIterator it;
   for( it = fieldIds.begin(); it != fieldIds.end(); ++it ) {
-    FieldImpl *f = 0;
+    FieldImpl *f = nullptr;
     if ( (*it) == FieldImpl::CustomField ) {
       TQStringList customEntry = cfg->readListEntry( "KABC_CustomEntry_" +
                                                  identifier + "_" +
diff --git a/tdeabc/sortmode.cpp b/tdeabc/sortmode.cpp
index 4d1881341..825a6ba6e 100644
--- a/tdeabc/sortmode.cpp
+++ b/tdeabc/sortmode.cpp
@@ -25,13 +25,13 @@
 using namespace TDEABC;
 
 NameSortMode::NameSortMode()
- : mNameType( FormattedName ), mAscendingOrder( true ), d( 0 )
+ : mNameType( FormattedName ), mAscendingOrder( true ), d( nullptr )
 {
   mNameType = FormattedName;
 }
 
 NameSortMode::NameSortMode( NameType type, bool ascending )
-  : mNameType( type ), mAscendingOrder( ascending ), d( 0 )
+  : mNameType( type ), mAscendingOrder( ascending ), d( nullptr )
 {
 }
 
@@ -61,7 +61,7 @@ bool NameSortMode::lesser( const TDEABC::Addressee &first, const TDEABC::Address
 }
 
 FieldSortMode::FieldSortMode( TDEABC::Field *field, bool ascending )
-  : mField( field ), mAscendingOrder( ascending ), d( 0 )
+  : mField( field ), mAscendingOrder( ascending ), d( nullptr )
 {
 }
 
diff --git a/tdeabc/stdaddressbook.cpp b/tdeabc/stdaddressbook.cpp
index bb5fc0558..84bc9fc3b 100644
--- a/tdeabc/stdaddressbook.cpp
+++ b/tdeabc/stdaddressbook.cpp
@@ -35,7 +35,7 @@
 
 using namespace TDEABC;
 
-StdAddressBook *StdAddressBook::mSelf = 0;
+StdAddressBook *StdAddressBook::mSelf = nullptr;
 bool StdAddressBook::mAutomaticSave = true;
 
 static KStaticDeleter<StdAddressBook> addressBookDeleter;
diff --git a/tdeabc/tdeab2tdeabc.cpp b/tdeabc/tdeab2tdeabc.cpp
index d20458288..9f836a7db 100644
--- a/tdeabc/tdeab2tdeabc.cpp
+++ b/tdeabc/tdeab2tdeabc.cpp
@@ -39,9 +39,9 @@ using namespace TDEABC;
 
 static const TDECmdLineOptions options[] =
 {
-  { "disable-autostart", I18N_NOOP( "Disable automatic startup on login" ), 0 },
-  { "quiet", "", 0 },
-  { "o", 0, 0 },
+  { "disable-autostart", I18N_NOOP( "Disable automatic startup on login" ), nullptr },
+  { "quiet", "", nullptr },
+  { "o", nullptr, nullptr },
   { "override", I18N_NOOP( "Override existing entries" ), "1" },
   TDECmdLineLastOption
 };
@@ -284,7 +284,7 @@ void importKab( TDEABC::AddressBook *ab, bool override, bool quiet )
   fileName += "addressbook.kab";
   if ( !TQFile::exists( fileName ) ) {
     if ( !quiet ) {
-      KMessageBox::error( 0, "<qt>" + i18n( "Address book file <b>%1</b> not found! Make sure the old address book is located there and you have read permission for this file." )
+      KMessageBox::error( nullptr, "<qt>" + i18n( "Address book file <b>%1</b> not found! Make sure the old address book is located there and you have read permission for this file." )
                           .arg( fileName ) + "</qt>" );
     }
     kdDebug(5700) << "No KDE 2 addressbook found." << endl;
@@ -294,7 +294,7 @@ void importKab( TDEABC::AddressBook *ab, bool override, bool quiet )
   kdDebug(5700) << "Converting old-style kab addressbook to "
                "new-style tdeabc addressbook." << endl;
 
-  KabAPI kab( 0 );
+  KabAPI kab( nullptr );
   if ( kab.init() != ::AddressBook::NoError ) {
     kdDebug(5700) << "Error initing kab" << endl;
     exit( 1 );
@@ -433,7 +433,7 @@ void importKab( TDEABC::AddressBook *ab, bool override, bool quiet )
 int main( int argc, char **argv )
 {
   TDEAboutData aboutData( "tdeab2tdeabc", I18N_NOOP( "Kab to Kabc Converter" ), "0.1" );
-  aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" );
+  aboutData.addAuthor( "Cornelius Schumacher", nullptr, "schumacher@kde.org" );
 
   TDECmdLineArgs::init( argc, argv, &aboutData );
   TDECmdLineArgs::addCmdLineOptions( options );
diff --git a/tdeabc/tests/kabcargl.cpp b/tdeabc/tests/kabcargl.cpp
index a348d3b02..0b5b41e40 100644
--- a/tdeabc/tests/kabcargl.cpp
+++ b/tdeabc/tests/kabcargl.cpp
@@ -36,7 +36,7 @@ using namespace TDEABC;
 int main(int argc,char **argv)
 {
   TDEAboutData aboutData("tdeabcargl","Fix broken pre3.0rc3 format","0.1");
-  aboutData.addAuthor("Cornelius Schumacher", 0, "schumacher@kde.org");
+  aboutData.addAuthor("Cornelius Schumacher", nullptr, "schumacher@kde.org");
 
   TDECmdLineArgs::init(argc,argv,&aboutData);
 
diff --git a/tdeabc/tests/testaddressee.cpp b/tdeabc/tests/testaddressee.cpp
index e7b38dd6e..572b5bcfa 100644
--- a/tdeabc/tests/testaddressee.cpp
+++ b/tdeabc/tests/testaddressee.cpp
@@ -15,8 +15,8 @@ using namespace TDEABC;
 
 static const TDECmdLineOptions options[] =
 {
-  { "save", "", 0 },
-  { "number", "", 0 },
+  { "save", "", nullptr },
+  { "number", "", nullptr },
   TDECmdLineLastOption
 };
 
diff --git a/tdeabc/tests/testaddresseelist.cpp b/tdeabc/tests/testaddresseelist.cpp
index e422f8cde..3147b7bab 100644
--- a/tdeabc/tests/testaddresseelist.cpp
+++ b/tdeabc/tests/testaddresseelist.cpp
@@ -12,8 +12,8 @@ using namespace TDEABC;
 
 static const TDECmdLineOptions options[] =
 {
-  { "save", "", 0 },
-  { "number", "", 0 },
+  { "save", "", nullptr },
+  { "number", "", nullptr },
   TDECmdLineLastOption
 };
 
diff --git a/tdeabc/tests/testaddressfmt.cpp b/tdeabc/tests/testaddressfmt.cpp
index ee883f7ab..0ecfd0f74 100644
--- a/tdeabc/tests/testaddressfmt.cpp
+++ b/tdeabc/tests/testaddressfmt.cpp
@@ -12,8 +12,8 @@ using namespace TDEABC;
 
 static const TDECmdLineOptions options[] =
 {
-  { "save", "", 0 },
-  { "number", "", 0 },
+  { "save", "", nullptr },
+  { "number", "", nullptr },
   TDECmdLineLastOption
 };
 
diff --git a/tdeabc/tests/testaddresslineedit.cpp b/tdeabc/tests/testaddresslineedit.cpp
index ee4513d98..1a1bd5276 100644
--- a/tdeabc/tests/testaddresslineedit.cpp
+++ b/tdeabc/tests/testaddresslineedit.cpp
@@ -16,7 +16,7 @@ int main( int argc,char **argv )
 
   TDEApplication app;
 
-  AddressLineEdit *lineEdit = new AddressLineEdit( 0 );
+  AddressLineEdit *lineEdit = new AddressLineEdit( nullptr );
 
   lineEdit->show();
   app.setMainWidget( lineEdit );
diff --git a/tdeabc/tests/testdistlist.cpp b/tdeabc/tests/testdistlist.cpp
index 4a46f8e83..38ffd56ea 100644
--- a/tdeabc/tests/testdistlist.cpp
+++ b/tdeabc/tests/testdistlist.cpp
@@ -15,7 +15,7 @@ using namespace TDEABC;
 
 static const TDECmdLineOptions options[] =
 {
-  {"list <listname>", I18N_NOOP("Show distribution list with name <listname>"), 0},
+  {"list <listname>", I18N_NOOP("Show distribution list with name <listname>"), nullptr},
   TDECmdLineLastOption
 };
 
@@ -46,7 +46,7 @@ int main(int argc,char **argv)
   }
 
   DistributionListEditor *editor =
-      new DistributionListEditor( StdAddressBook::self(), 0 );
+      new DistributionListEditor( StdAddressBook::self(), nullptr );
 
   editor->show();
   app.setMainWidget(editor);
diff --git a/tdeabc/tests/testkabcdlg.cpp b/tdeabc/tests/testkabcdlg.cpp
index 7b4b18e3e..791eb262a 100644
--- a/tdeabc/tests/testkabcdlg.cpp
+++ b/tdeabc/tests/testkabcdlg.cpp
@@ -12,7 +12,7 @@ using namespace TDEABC;
 
 static const TDECmdLineOptions options[] =
 {
-  {"multiple", I18N_NOOP("Allow selection of multiple addressees"), 0},
+  {"multiple", I18N_NOOP("Allow selection of multiple addressees"), nullptr},
   TDECmdLineLastOption
 };
 
@@ -26,14 +26,14 @@ int main(int argc,char **argv)
 
   TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
   if (args->isSet("multiple")) {
-    Addressee::List al = AddresseeDialog::getAddressees( 0 );
+    Addressee::List al = AddresseeDialog::getAddressees( nullptr );
     Addressee::List::ConstIterator it;
     kdDebug() << "Selected Addressees:" << endl;
     for( it = al.begin(); it != al.end(); ++it ) {
       kdDebug() << "  " << (*it).fullEmail() << endl;
     }
   } else {
-    Addressee a = AddresseeDialog::getAddressee( 0 );
+    Addressee a = AddresseeDialog::getAddressee( nullptr );
   
     if ( !a.isEmpty() ) {
       kdDebug() << "Selected Addressee:" << endl;
diff --git a/tdeabc/tests/testldapclient.cpp b/tdeabc/tests/testldapclient.cpp
index d8879273b..fee5c1c9d 100644
--- a/tdeabc/tests/testldapclient.cpp
+++ b/tdeabc/tests/testldapclient.cpp
@@ -30,7 +30,7 @@
 int main(int argc, char *argv[])
 {
   TDEApplication::disableAutoDcopRegistration();
-  TDECmdLineArgs::init(argc,argv,"testldapclient", 0, 0, 0, 0);
+  TDECmdLineArgs::init(argc,argv,"testldapclient", nullptr, nullptr, nullptr, 0);
   TDEApplication app (/*stylesEnabled=*/ false, /*GUIEnabled=*/ false);
 
   TestLDAPClient test;
@@ -69,7 +69,7 @@ bool TestLDAPClient::check(const TQString& txt, TQString a, TQString b)
 
 void TestLDAPClient::cleanup()
 {
-  mClient = 0;
+  mClient = nullptr;
 }
 
 void TestLDAPClient::testIntevation()
@@ -105,7 +105,7 @@ void TestLDAPClient::testIntevation()
            this, TQ_SLOT( slotLDAPError( const TQString& ) ) );
   mClient->startQuery( filter );
   tdeApp->eventLoop()->enterLoop();
-  delete mClient; mClient = 0;
+  delete mClient; mClient = nullptr;
 }
 
 // from kaddressbook... ugly though...
diff --git a/tdeabc/tests/testlock.cpp b/tdeabc/tests/testlock.cpp
index 24f34b79e..1851d4285 100644
--- a/tdeabc/tests/testlock.cpp
+++ b/tdeabc/tests/testlock.cpp
@@ -54,7 +54,7 @@ LockWidget::LockWidget( const TQString &identifier )
   topLayout->setSpacing( KDialog::spacingHint() );
 
   if ( identifier.isEmpty() ) {
-    mLock = 0;
+    mLock = nullptr;
   } else {
     mLock = new Lock( identifier );
 
@@ -155,11 +155,11 @@ void LockWidget::unlock()
 
 static const TDECmdLineOptions options[] =
 {
-  { "a", 0, 0 },
-  { "addressbook", "Standard address book", 0 },
-  { "d", 0, 0 },
-  { "diraddressbook", "Standard address book directory resource", 0 },
-  { "+identifier", "Identifier of resource to be locked, e.g. filename", 0 },
+  { "a", nullptr, nullptr },
+  { "addressbook", "Standard address book", nullptr },
+  { "d", nullptr, nullptr },
+  { "diraddressbook", "Standard address book directory resource", nullptr },
+  { "+identifier", "Identifier of resource to be locked, e.g. filename", nullptr },
   TDECmdLineLastOption
 };
 
diff --git a/tdeabc/vcard/ContentLine.cpp b/tdeabc/vcard/ContentLine.cpp
index 52bcdf4f5..c1d9abad5 100644
--- a/tdeabc/vcard/ContentLine.cpp
+++ b/tdeabc/vcard/ContentLine.cpp
@@ -66,7 +66,7 @@ using namespace VCARD;
 
 ContentLine::ContentLine()
 	:	Entity(),
-		value_(0),
+		value_(nullptr),
 		paramType_( ParamUnknown ),
 		valueType_( ValueUnknown ),
 		entityType_( EntityUnknown )
@@ -87,7 +87,7 @@ ContentLine::ContentLine(const ContentLine & x)
 
 ContentLine::ContentLine(const TQCString & s)
 	:	Entity(s),
-		value_(0),
+		value_(nullptr),
 		paramType_( ParamUnknown ),
 		valueType_( ValueUnknown ),
 		entityType_( EntityUnknown )
@@ -111,7 +111,7 @@ ContentLine::operator = (const TQCString & s)
 {
 	Entity::operator = (s);
 	delete value_;
-	value_ = 0;
+	value_ = nullptr;
 	return *this;
 }
 
@@ -131,7 +131,7 @@ ContentLine::operator == (ContentLine & x)
 ContentLine::~ContentLine()
 {
 	delete value_;
-	value_ = 0;
+	value_ = nullptr;
 }
 
 	void
@@ -268,7 +268,7 @@ ContentLine::_assemble()
 		line += ";" + it.current()->asString();
 	
 	vDebug("Adding value");
-	if (value_ != 0)
+	if (value_)
 		line += ":" + value_->asString();
 	else {
 		vDebug("No value");
@@ -295,7 +295,7 @@ ContentLine::clear()
 	name_.truncate(0);
 	paramList_.clear();
         delete value_;
-	value_ = 0;
+	value_ = nullptr;
 	paramType_ = ParamUnknown;
 	valueType_ = ValueUnknown;
 	entityType_ = EntityUnknown;
diff --git a/tdeabc/vcard/Enum.cpp b/tdeabc/vcard/Enum.cpp
index 4811a0955..85a08f08a 100644
--- a/tdeabc/vcard/Enum.cpp
+++ b/tdeabc/vcard/Enum.cpp
@@ -447,7 +447,7 @@ VCARD::decodeBase64(const char * s, unsigned long srcl, unsigned long & len)
 			switch (e++) {
 				case 3: e = 0;								break;
 				case 2: if (*src == '=')					break;
-				default: delete [] ret; ret = 0; return 0;	break;
+				default: delete [] ret; ret = nullptr; return nullptr;	break;
 			}
 			continue;
 		}
diff --git a/tdeabc/vcard/RToken.cpp b/tdeabc/vcard/RToken.cpp
index 0f7910688..0c86e339a 100644
--- a/tdeabc/vcard/RToken.cpp
+++ b/tdeabc/vcard/RToken.cpp
@@ -55,7 +55,7 @@ RTokenise(const char * str, const char * delim, TQStrList & l)
 			continue;
 		}
 		
-		if (strchr(delim, *i) != 0) {
+		if (strchr(delim, *i)) {
 			// We hit a delimiter. If we have some text, make a new token.
 			// This has the effect that multiple delimiters are collapsed.
                         // cs: We mustn't collapse multiple delimiters, otherwise we
@@ -78,7 +78,7 @@ RTokenise(const char * str, const char * delim, TQStrList & l)
 		l.append(rstart);
 //	}
 	
-	r = 0;
+	r = nullptr;
 	
 	delete [] rstart;
 
diff --git a/tdeabc/vcard/VCard.cpp b/tdeabc/vcard/VCard.cpp
index eb3f57f6e..39440f824 100644
--- a/tdeabc/vcard/VCard.cpp
+++ b/tdeabc/vcard/VCard.cpp
@@ -229,14 +229,14 @@ VCard::_assemble()
 VCard::has(EntityType t)
 {
 	parse();
-	return contentLine(t) == 0 ? false : true;
+	return contentLine(t) != nullptr;
 }
 
 	bool
 VCard::has(const TQCString & s)
 {
 	parse();
-	return contentLine(s) == 0 ? false : true;
+	return contentLine(s) != nullptr;
 }
 
 	void
@@ -265,7 +265,7 @@ VCard::contentLine(EntityType t)
 		if (it.current()->entityType() == t)
 			return it.current();
 
-	return 0;
+	return nullptr;
 }
 
 	ContentLine *
@@ -278,6 +278,6 @@ VCard::contentLine(const TQCString & s)
 		if (it.current()->entityType() == EntityNameToEntityType(s))
 			return it.current();
 
-	return 0;
+	return nullptr;
 }
 
diff --git a/tdeabc/vcard/testread.cpp b/tdeabc/vcard/testread.cpp
index 3a33c7d54..191dc5ada 100644
--- a/tdeabc/vcard/testread.cpp
+++ b/tdeabc/vcard/testread.cpp
@@ -73,7 +73,7 @@ int main(int argc, char * argv[])
 				(DateValue *)
 				v.contentLine(EntityRevision)->value();
 			
-			assert(d != 0);
+			assert(d);
 			
 			cerr << "Revision date: " << endl;
 			cerr << "Day   : " << d->day()		<< endl;
@@ -101,7 +101,7 @@ int main(int argc, char * argv[])
 			URIValue * urlVal =
 				(URIValue *)v.contentLine(EntityURL)->value();
 
-			assert(urlVal != 0);
+			assert(urlVal);
 			
 			cerr << "URL scheme == " <<
 				urlVal->scheme() << endl;
diff --git a/tdeabc/vcard21parser.cpp b/tdeabc/vcard21parser.cpp
index bae87fc75..0a83da998 100644
--- a/tdeabc/vcard21parser.cpp
+++ b/tdeabc/vcard21parser.cpp
@@ -212,7 +212,7 @@ TDEABC::Addressee VCard21Parser::readFromString( const TQString &data)
   TQString tmpStr;
 
   // Check if parsing failed
-  if (vCard == 0)
+  if (!vCard)
   {
      kdDebug() << "Parsing failed" << endl;
      return addressee;
@@ -527,14 +527,14 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const TQString& vc, int *err )
 
   if ( _err != 0 ) {
     delete vcdata;
-    return 0;
+    return nullptr;
   }
 
   return new VCard21ParserImpl( vcdata );
 }
 
 VCard21ParserImpl::VCard21ParserImpl()
-  : _vcdata( 0 )
+  : _vcdata( nullptr )
 {
 }
 
@@ -546,7 +546,7 @@ VCard21ParserImpl::VCard21ParserImpl(TQValueList<VCardLineX> *_vcd)
 VCard21ParserImpl::~VCard21ParserImpl()
 {
   delete _vcdata;
-  _vcdata = 0;
+  _vcdata = nullptr;
 }
 
 TQString VCard21ParserImpl::getValue(const TQString& name, const TQString& qualifier)
diff --git a/tdeabc/vcard21parser.h b/tdeabc/vcard21parser.h
index c6c75a3c8..16e9f7486 100644
--- a/tdeabc/vcard21parser.h
+++ b/tdeabc/vcard21parser.h
@@ -206,7 +206,7 @@ class KABC_EXPORT VCard21ParserImpl
 public:
   VCard21ParserImpl();
   virtual ~VCard21ParserImpl();
-  static VCard21ParserImpl *parseVCard(const TQString& vc, int *err = NULL);
+  static VCard21ParserImpl *parseVCard(const TQString& vc, int *err = nullptr);
   TQString getValue(const TQString& name, const TQString& qualifier);
   TQString getValue(const TQString& name);
   TQStringList getValues(const TQString& name, const TQString& qualifier);
diff --git a/tdeabc/vcardconverter.cpp b/tdeabc/vcardconverter.cpp
index 1026fecc0..4b1ade680 100644
--- a/tdeabc/vcardconverter.cpp
+++ b/tdeabc/vcardconverter.cpp
@@ -40,7 +40,7 @@ VCardConverter::VCardConverter()
 VCardConverter::~VCardConverter()
 {
   delete d;
-  d = 0;
+  d = nullptr;
 }
 
 TQString VCardConverter::createVCard( const Addressee &addr, Version version )
diff --git a/tdeabc/vcardformat.cpp b/tdeabc/vcardformat.cpp
index c9156699c..65d3c2ceb 100644
--- a/tdeabc/vcardformat.cpp
+++ b/tdeabc/vcardformat.cpp
@@ -39,7 +39,7 @@ bool VCardFormat::load( AddressBook *addressBook, const TQString &fileName )
   TQFile f( fileName );
   if ( !f.open( IO_ReadOnly ) ) return false;
   
-  bool result = mImpl->loadAll( addressBook, 0, &f );
+  bool result = mImpl->loadAll( addressBook, nullptr, &f );
   
   f.close();
   
@@ -51,7 +51,7 @@ bool VCardFormat::save( AddressBook *addressBook, const TQString &fileName )
   TQFile f( fileName );
   if ( !f.open( IO_WriteOnly ) ) return false;
   
-  mImpl->saveAll( addressBook, 0, &f );
+  mImpl->saveAll( addressBook, nullptr, &f );
   
   f.close();
   
diff --git a/tdeabc/vcardparser/testread.cpp b/tdeabc/vcardparser/testread.cpp
index 07c5b728f..82c028d08 100644
--- a/tdeabc/vcardparser/testread.cpp
+++ b/tdeabc/vcardparser/testread.cpp
@@ -35,8 +35,8 @@
 
 static const TDECmdLineOptions options[] =
 {
-  {"vcard21", I18N_NOOP("vCard 2.1"), 0},
-  {"+inputfile", I18N_NOOP("Input file"), 0},
+  {"vcard21", I18N_NOOP("vCard 2.1"), nullptr},
+  {"+inputfile", I18N_NOOP("Input file"), nullptr},
   TDECmdLineLastOption
 };
 
@@ -45,7 +45,7 @@ int main( int argc, char **argv )
   TDEApplication::disableAutoDcopRegistration();
 
   TDEAboutData aboutData( "testread", "vCard test reader", "0.1" );
-  aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" );
+  aboutData.addAuthor( "Cornelius Schumacher", nullptr, "schumacher@kde.org" );
 
   TDECmdLineArgs::init( argc, argv, &aboutData );
   TDECmdLineArgs::addCmdLineOptions( options );
diff --git a/tdeabc/vcardparser/vcardline.cpp b/tdeabc/vcardparser/vcardline.cpp
index 94051293d..4715345e7 100644
--- a/tdeabc/vcardparser/vcardline.cpp
+++ b/tdeabc/vcardparser/vcardline.cpp
@@ -29,25 +29,25 @@ class VCardLine::VCardLinePrivate
 };
 
 VCardLine::VCardLine()
-  : d( 0 )
+  : d( nullptr )
 {
 }
 
 VCardLine::VCardLine( const TQString &identifier )
-  : d( 0 )
+  : d( nullptr )
 {
   mIdentifier = identifier;
 }
 
 VCardLine::VCardLine( const TQString &identifier, const TQVariant &value )
-  : d( 0 )
+  : d( nullptr )
 {
   mIdentifier = identifier;
   mValue = value;
 }
 
 VCardLine::VCardLine( const VCardLine& line )
-  : d( 0 )
+  : d( nullptr )
 {
   mParamMap = line.mParamMap;
   mValue = line.mValue;
@@ -57,7 +57,7 @@ VCardLine::VCardLine( const VCardLine& line )
 VCardLine::~VCardLine()
 {
   delete d;
-  d = 0;
+  d = nullptr;
 }
 
 VCardLine& VCardLine::operator=( const VCardLine& line )
diff --git a/tdeabc/vcardtool.cpp b/tdeabc/vcardtool.cpp
index 71246497f..ec9192391 100644
--- a/tdeabc/vcardtool.cpp
+++ b/tdeabc/vcardtool.cpp
@@ -907,7 +907,7 @@ VCardLine VCardTool::createAgent( VCard::Version version, const Agent &agent )
   VCardLine line( "AGENT" );
 
   if ( agent.isIntern() ) {
-    if ( agent.addressee() != 0 ) {
+    if ( agent.addressee() ) {
       Addressee::List list;
       list.append( *agent.addressee() );
 
diff --git a/tderesources/configdialog.h b/tderesources/configdialog.h
index 37b1bf166..db94adb72 100644
--- a/tderesources/configdialog.h
+++ b/tderesources/configdialog.h
@@ -38,7 +38,7 @@ class TDERESOURCES_EXPORT ConfigDialog : public KDialogBase
   public:
     // Resource=0: create new resource
     ConfigDialog( TQWidget *parent, const TQString& resourceFamily,
-	          Resource* resource, const char *name = 0);
+	          Resource* resource, const char *name = nullptr);
 
     void setInEditMode( bool value );
 
diff --git a/tderesources/configpage.cpp b/tderesources/configpage.cpp
index 0b00721e8..875ed4463 100644
--- a/tderesources/configpage.cpp
+++ b/tderesources/configpage.cpp
@@ -46,15 +46,15 @@
 namespace KRES {
 
 ResourcePageInfo::ResourcePageInfo() : TDEShared() {
-  mManager = 0L;
-  mConfig = 0L;
+  mManager = nullptr;
+  mConfig = nullptr;
 }
 
 ResourcePageInfo::~ResourcePageInfo() {
   //delete mManager;
-  mManager = 0L;
+  mManager = nullptr;
   //delete mConfig;
-  mConfig = 0L;
+  mConfig = nullptr;
 }
 
 
@@ -97,8 +97,8 @@ class ConfigViewItem : public TQCheckListItem
 
 ConfigPage::ConfigPage( TQWidget *parent, const char *name )
   : TQWidget( parent, name ),
-    mCurrentManager( 0 ),
-    mCurrentConfig( 0 )
+    mCurrentManager( nullptr ),
+    mCurrentConfig( nullptr )
 {
   setCaption( i18n( "Resource Configuration" ) );
 
@@ -143,7 +143,7 @@ ConfigPage::ConfigPage( TQWidget *parent, const char *name )
   connect( mListView, TQ_SIGNAL( clicked( TQListViewItem * ) ),
            TQ_SLOT( slotItemClicked( TQListViewItem * ) ) );
 
-  mLastItem = 0;
+  mLastItem = nullptr;
 
   mConfig = new TDEConfig( "kcmtderesourcesrc" );
   mConfig->setGroup( "General" );
@@ -160,7 +160,7 @@ ConfigPage::~ConfigPage()
 
   mConfig->writeEntry( "CurrentFamily", mFamilyCombo->currentItem() );
   delete mConfig;
-  mConfig = 0;
+  mConfig = nullptr;
 }
 
 void ConfigPage::load()
@@ -204,7 +204,7 @@ void ConfigPage::load()
       loadManager( *cfit );
   }
 
-  mCurrentManager = 0;
+  mCurrentManager = nullptr;
 
   mFamilyCombo->clear();
   mFamilyCombo->insertStringList( familyDisplayNames );
@@ -326,7 +326,7 @@ void ConfigPage::slotAdd()
     if ( !resource->readOnly() ) {
       bool onlyReadOnly = true;
       TQListViewItem *it = mListView->firstChild();
-      while ( it != 0 ) {
+      while ( it ) {
         ConfigViewItem *confIt = static_cast<ConfigViewItem*>( it );
         if ( !confIt->readOnly() && confIt != item )
           onlyReadOnly = false;
@@ -341,7 +341,7 @@ void ConfigPage::slotAdd()
     emit changed( true );
   } else {
     delete resource;
-    resource = 0;
+    resource = nullptr;
   }
 }
 
@@ -364,7 +364,7 @@ void ConfigPage::slotRemove()
   mCurrentManager->remove( confItem->resource() );
 
   if ( item == mLastItem )
-    mLastItem = 0;
+    mLastItem = nullptr;
 
   mListView->takeItem( item );
   delete item;
@@ -420,7 +420,7 @@ void ConfigPage::slotStandard()
   }
 
   TQListViewItem *it = mListView->firstChild();
-  while ( it != 0 ) {
+  while ( it ) {
     ConfigViewItem *configItem = static_cast<ConfigViewItem*>( it );
     if ( configItem->standard() )
       configItem->setStandard( false );
@@ -435,7 +435,7 @@ void ConfigPage::slotStandard()
 
 void ConfigPage::slotSelectionChanged()
 {
-  bool state = ( mListView->currentItem() != 0 );
+  bool state = ( mListView->currentItem() != nullptr );
 
   mRemoveButton->setEnabled( state );
   mEditButton->setEnabled( state );
@@ -486,7 +486,7 @@ ConfigViewItem *ConfigPage::findItem( Resource *resource )
     ConfigViewItem *item = static_cast<ConfigViewItem *>( i );
     if ( item->resource() == resource ) return item;
   }
-  return 0;
+  return nullptr;
 }
 
 void ConfigPage::slotItemClicked( TQListViewItem *item )
diff --git a/tderesources/configpage.h b/tderesources/configpage.h
index a9bd37ada..ffad9158c 100644
--- a/tderesources/configpage.h
+++ b/tderesources/configpage.h
@@ -54,7 +54,7 @@ class TDERESOURCES_EXPORT ConfigPage : public TQWidget, public ManagerObserver<R
   TQ_OBJECT
 
   public:
-    ConfigPage( TQWidget *parent = 0, const char *name = 0 );
+    ConfigPage( TQWidget *parent = nullptr, const char *name = nullptr );
     virtual ~ConfigPage();
 
     void load();
diff --git a/tderesources/configwidget.h b/tderesources/configwidget.h
index e8014090d..d4eb87acc 100644
--- a/tderesources/configwidget.h
+++ b/tderesources/configwidget.h
@@ -34,7 +34,7 @@ class TDERESOURCES_EXPORT ConfigWidget : public TQWidget
 {
     TQ_OBJECT
   public:
-    ConfigWidget( TQWidget *parent = 0, const char *name = 0 );
+    ConfigWidget( TQWidget *parent = nullptr, const char *name = nullptr );
 
     /**
       Sets the widget to 'edit' mode. Reimplement this method if you are
diff --git a/tderesources/factory.cpp b/tderesources/factory.cpp
index 699dfe63f..784be12d4 100644
--- a/tderesources/factory.cpp
+++ b/tderesources/factory.cpp
@@ -34,14 +34,14 @@
 
 using namespace KRES;
 
-TQDict<Factory> *Factory::mSelves = 0;
+TQDict<Factory> *Factory::mSelves = nullptr;
 static KStaticDeleter< TQDict<Factory> > staticDeleter;
 
 Factory *Factory::self( const TQString& resourceFamily )
 {
   kdDebug(5650) << "Factory::self()" << endl;
 
-  Factory *factory = 0;
+  Factory *factory = nullptr;
   if ( !mSelves )
     staticDeleter.setObject( mSelves, new TQDict<Factory> );
 
@@ -80,14 +80,14 @@ TQStringList Factory::typeNames() const
 ConfigWidget *Factory::configWidget( const TQString& type, TQWidget *parent )
 {
   if ( type.isEmpty() || !mTypeMap.contains( type ) )
-    return 0;
+    return nullptr;
 
   KService::Ptr ptr = mTypeMap[ type ];
   KLibFactory *factory = KLibLoader::self()->factory( ptr->library().latin1() );
   if ( !factory ) {
     kdDebug(5650) << "KRES::Factory::configWidget(): Factory creation failed "
                   << KLibLoader::self()->lastErrorMessage() << endl;
-    return 0;
+    return nullptr;
   }
 
   PluginFactoryBase *pluginFactory = static_cast<PluginFactoryBase *>( factory );
@@ -95,13 +95,13 @@ ConfigWidget *Factory::configWidget( const TQString& type, TQWidget *parent )
   if ( !pluginFactory ) {
     kdDebug(5650) << "KRES::Factory::configWidget(): no plugin factory."
                   << endl;
-    return 0;
+    return nullptr;
   }
 
   ConfigWidget *wdg = pluginFactory->configWidget( parent );
   if ( !wdg ) {
     kdDebug(5650) << "'" << ptr->library() << "' doesn't provide a ConfigWidget" << endl;
-    return 0;
+    return nullptr;
   }
 
   return wdg;
@@ -131,7 +131,7 @@ Resource *Factory::resource( const TQString& type, const TDEConfig *config )
 
   if ( type.isEmpty() || !mTypeMap.contains( type ) ) {
     kdDebug(5650) << "Factory::resource() no such type " << type << endl;
-    return 0;
+    return nullptr;
   }
 
   KService::Ptr ptr = mTypeMap[ type ];
@@ -139,21 +139,21 @@ Resource *Factory::resource( const TQString& type, const TDEConfig *config )
   if ( !factory ) {
     kdDebug(5650) << "KRES::Factory::resource(): Factory creation failed "
                   << KLibLoader::self()->lastErrorMessage() << endl;
-    return 0;
+    return nullptr;
   }
 
   PluginFactoryBase *pluginFactory = static_cast<PluginFactoryBase *>( factory );
 
   if ( !pluginFactory ) {
     kdDebug(5650) << "KRES::Factory::resource(): no plugin factory." << endl;
-    return 0;
+    return nullptr;
   }
 
   Resource *resource = pluginFactory->resource( config );
   if ( !resource ) {
     kdDebug(5650) << "'" << ptr->library() << "' is not a " + mResourceFamily +
                      " plugin." << endl;
-    return 0;
+    return nullptr;
   }
 
   resource->setType( type );
diff --git a/tderesources/factory.h b/tderesources/factory.h
index 4ac5b63d8..d5d4d9c7a 100644
--- a/tderesources/factory.h
+++ b/tderesources/factory.h
@@ -77,7 +77,7 @@ class TDERESOURCES_EXPORT Factory
      * @param type   The type of the resource, returned by typeNames()
      * @param parent The parent widget
      */
-    ConfigWidget *configWidget( const TQString& type, TQWidget *parent = 0 );
+    ConfigWidget *configWidget( const TQString& type, TQWidget *parent = nullptr );
 
     /**
      * Returns a pointer to a resource object or a null pointer
diff --git a/tderesources/kcmtderesources.cpp b/tderesources/kcmtderesources.cpp
index a5c8cdc2e..f3a9cbf2d 100644
--- a/tderesources/kcmtderesources.cpp
+++ b/tderesources/kcmtderesources.cpp
@@ -43,10 +43,10 @@ KCMTDEResources::KCMTDEResources( TQWidget *parent, const char *name, const TQSt
   TDEAboutData *about =
    new TDEAboutData( I18N_NOOP( "kcmtderesources" ),
                    I18N_NOOP( "TDE Resources configuration module" ),
-                   0, 0, TDEAboutData::License_GPL,
+                   nullptr, nullptr, TDEAboutData::License_GPL,
                    I18N_NOOP( "(c) 2003 Tobias Koenig" ) );
 
-  about->addAuthor( "Tobias Koenig", 0, "tokoe@kde.org" );
+  about->addAuthor( "Tobias Koenig", nullptr, "tokoe@kde.org" );
   setAboutData(about);
 }
 
diff --git a/tderesources/manager.h b/tderesources/manager.h
index 0a3fca823..c7f520040 100644
--- a/tderesources/manager.h
+++ b/tderesources/manager.h
@@ -128,7 +128,7 @@ class Manager : private ManagerNotifier
     {
         friend class Manager;
       public:
-        ActiveIterator() : mList( 0 ) {};
+        ActiveIterator() : mList( nullptr ) {};
         ActiveIterator( const ActiveIterator &it )
         {
           mIt = it.mIt;
@@ -227,7 +227,7 @@ class Manager : private ManagerNotifier
       Recreate Resource objects from configuration file. If cfg is 0, read
       standard configuration file determined by family name.
     */
-    void readConfig( TDEConfig *cfg = 0 )
+    void readConfig( TDEConfig *cfg = nullptr )
     {
       mImpl->readConfig( cfg );
     }
@@ -236,7 +236,7 @@ class Manager : private ManagerNotifier
       Write configuration of Resource objects to configuration file. If cfg is
       0, write to standard configuration file determined by family name.
     */
-    void writeConfig( TDEConfig *cfg = 0 )
+    void writeConfig( TDEConfig *cfg = nullptr )
     {
       mImpl->writeConfig( cfg );
     }
@@ -312,7 +312,7 @@ class Manager : private ManagerNotifier
     */
     T *createResource( const TQString& type )
     {
-      return dynamic_cast<T *>( mFactory->resource( type, 0 ) );
+      return dynamic_cast<T *>( mFactory->resource( type, nullptr ) );
     }
 
     /**
diff --git a/tderesources/managerimpl.cpp b/tderesources/managerimpl.cpp
index f5fdc74f4..47329d2e3 100644
--- a/tderesources/managerimpl.cpp
+++ b/tderesources/managerimpl.cpp
@@ -40,8 +40,8 @@ using namespace KRES;
 ManagerImpl::ManagerImpl( ManagerNotifier *notifier, const TQString &family )
   : DCOPObject( "ManagerIface_" + family.utf8() ),
     mNotifier( notifier ),
-    mFamily( family ), mConfig( 0 ), mStdConfig( 0 ), mStandard( 0 ),
-    mFactory( 0 ), mConfigRead( false )
+    mFamily( family ), mConfig( nullptr ), mStdConfig( nullptr ), mStandard( nullptr ),
+    mFactory( nullptr ), mConfigRead( false )
 {
   kdDebug(5650) << "ManagerImpl::ManagerImpl()" << endl;
 
@@ -107,7 +107,7 @@ void ManagerImpl::readConfig( TDEConfig *cfg )
     mConfig = cfg;
   }
 
-  mStandard = 0;
+  mStandard = nullptr;
 
   mConfig->setGroup( "General" );
 
@@ -181,7 +181,7 @@ void ManagerImpl::add( Resource *resource )
 
 void ManagerImpl::remove( Resource *resource )
 {
-  if ( mStandard == resource ) mStandard = 0;
+  if ( mStandard == resource ) mStandard = nullptr;
   removeResource( resource );
 
   mResources.remove( resource );
@@ -274,7 +274,7 @@ void ManagerImpl::dcopKResourceDeleted( TQString managerId, TQString resourceId
     kdDebug(5650) << "Removing item from mResources" << endl;
     // Now delete item
     if ( mStandard == resource )
-      mStandard = 0;
+      mStandard = nullptr;
     mResources.remove( resource );
   } else
     kdError() << "Received DCOP: resource deleted for unknown resource "
@@ -328,7 +328,7 @@ Resource *ManagerImpl::readResourceConfig( const TQString &identifier,
 
   if ( !mFactory ) {
     kdError(5650) << "ManagerImpl::readResourceConfig: mFactory is 0. Did the app forget to call readConfig?" << endl;
-    return 0;
+    return nullptr;
   }
 
   mConfig->setGroup( "Resource_" + identifier );
@@ -338,7 +338,7 @@ Resource *ManagerImpl::readResourceConfig( const TQString &identifier,
   Resource *resource = mFactory->resource( type, mConfig );
   if ( !resource ) {
     kdDebug(5650) << "Failed to create resource with id " << identifier << endl;
-    return 0;
+    return nullptr;
   }
 
   if ( resource->identifier().isEmpty() )
@@ -439,7 +439,7 @@ Resource *ManagerImpl::getResource( const TQString &identifier )
     if ( (*it)->identifier() == identifier )
       return *it;
   }
-  return 0;
+  return nullptr;
 }
 
 TQString ManagerImpl::defaultConfigFile( const TQString &family )
diff --git a/tderesources/resource.cpp b/tderesources/resource.cpp
index 4333aa365..ee5e77d8c 100644
--- a/tderesources/resource.cpp
+++ b/tderesources/resource.cpp
@@ -45,7 +45,7 @@ class Resource::ResourcePrivate
 };
 
 Resource::Resource( const TDEConfig* config )
-  : TQObject( 0, "" ), d( new ResourcePrivate )
+  : TQObject( nullptr, "" ), d( new ResourcePrivate )
 {
   d->mOpenCount = 0;
   d->mIsOpen = false;
@@ -68,7 +68,7 @@ Resource::Resource( const TDEConfig* config )
 Resource::~Resource()
 {
   delete d;
-  d = 0;
+  d = nullptr;
 }
 
 void Resource::writeConfig( TDEConfig* config )
diff --git a/tderesources/resource.h b/tderesources/resource.h
index 3c5383799..989c0bdca 100644
--- a/tderesources/resource.h
+++ b/tderesources/resource.h
@@ -130,7 +130,7 @@ class ResourceExampleConfig : public KRES::ResourceConfigWidget
 {
     TQ_OBJECT
   public:
-    ResourceExampleConfig( TQWidget *parent = 0, const char *name = 0 );
+    ResourceExampleConfig( TQWidget *parent = nullptr, const char *name = nullptr );
 
   public slots:
     virtual void loadSettings( KRES::Resource *resource);
@@ -396,7 +396,7 @@ class TDERESOURCES_EXPORT PluginFactoryBase : public KLibFactory
       Q_UNUSED(name);
       Q_UNUSED(className);
       Q_UNUSED(args);
-      return 0;
+      return nullptr;
     }
 };
 
diff --git a/tderesources/selectdialog.cpp b/tderesources/selectdialog.cpp
index baba01039..fd43139e7 100644
--- a/tderesources/selectdialog.cpp
+++ b/tderesources/selectdialog.cpp
@@ -86,26 +86,26 @@ Resource *SelectDialog::resource()
   if ( mResourceId->currentItem() != -1 )
     return mResourceMap[ mResourceId->currentItem() ];
   else
-    return 0;
+    return nullptr;
 }
 
 Resource *SelectDialog::getResource( TQPtrList<Resource> list, TQWidget *parent )
 {
   if ( list.count() == 0 ) {
     KMessageBox::error( parent, i18n( "There is no resource available!" ) );
-    return 0;
+    return nullptr;
   }
 
   if ( list.count() == 1 ) return list.first();
 
   // the following lines will return a writeable resource if only _one_ writeable
   // resource exists
-  Resource *found = 0;
+  Resource *found = nullptr;
   Resource *it = list.first();
   while ( it ) {
     if ( !it->readOnly() ) {
       if ( found ) {
-        found = 0;
+        found = nullptr;
 	break;
       } else
         found = it;
@@ -118,5 +118,5 @@ Resource *SelectDialog::getResource( TQPtrList<Resource> list, TQWidget *parent
 
   SelectDialog dlg( list, parent );
   if ( dlg.exec() == KDialog::Accepted ) return dlg.resource();
-  else return 0;
+  else return nullptr;
 }
diff --git a/tderesources/selectdialog.h b/tderesources/selectdialog.h
index b275a4d84..5f686741c 100644
--- a/tderesources/selectdialog.h
+++ b/tderesources/selectdialog.h
@@ -62,8 +62,8 @@ class TDERESOURCES_EXPORT SelectDialog : KDialog
      * @param parent The parent widget
      * @param name   The name of the dialog
      */
-    SelectDialog( TQPtrList<Resource> list, TQWidget *parent = 0,
-        const char *name = 0);
+    SelectDialog( TQPtrList<Resource> list, TQWidget *parent = nullptr,
+        const char *name = nullptr);
 
     /**
      * Returns selected resource.
@@ -74,7 +74,7 @@ class TDERESOURCES_EXPORT SelectDialog : KDialog
      * Opens a dialog showing the available resources and returns the resource the
      * user has selected. Returns 0, if the dialog was canceled.
      */
-    static Resource *getResource( TQPtrList<Resource> list, TQWidget *parent = 0 );
+    static Resource *getResource( TQPtrList<Resource> list, TQWidget *parent = nullptr );
 
   private:
     TDEListBox *mResourceId;
-- 
cgit v1.2.3

