From eec28962cfd5d67368b1407b150fb97293ff30b7 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Wed, 18 Nov 2026 10:00:34 -0300
Subject: dcop: 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>
---
 dcop/client/dcop.cpp             |  17 +++----
 dcop/client/dcopfind.cpp         |   4 +-
 dcop/client/dcopstart.cpp        |   4 +-
 dcop/dcopclient.cpp              | 102 +++++++++++++++++++--------------------
 dcop/dcopclient.h                |   6 +--
 dcop/dcopidl/scanner.ll          |   2 +-
 dcop/dcopidl/yacc.yy             |   2 +-
 dcop/dcopidl2cpp/skel.cpp        |   2 +-
 dcop/dcopobject.cpp              |  14 +++---
 dcop/dcopref.cpp                 |  16 +++---
 dcop/dcopserver.cpp              |  68 +++++++++++++-------------
 dcop/dcopserver_shutdown_win.cpp |   8 +--
 dcop/dcopsignals.cpp             |   6 +--
 dcop/dcopsignals.h               |   2 +-
 dcop/dcopstub.cpp                |   8 +--
 dcop/dcoptypes.h                 |   2 +-
 dcop/testdcop.cpp                |  12 ++---
 dcop/tests/driver.cpp            |   2 +-
 18 files changed, 138 insertions(+), 139 deletions(-)

diff --git a/dcop/client/dcop.cpp b/dcop/client/dcop.cpp
index 6a395c222..4be5ad016 100644
--- a/dcop/client/dcop.cpp
+++ b/dcop/client/dcop.cpp
@@ -54,7 +54,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 typedef TQMap<TQString, TQString> UserList;
 
-static DCOPClient* dcop = 0;
+static DCOPClient* dcop = nullptr;
 
 static TQTextStream cin_ ( stdin,  IO_ReadOnly );
 static TQTextStream cout_( stdout, IO_WriteOnly );
@@ -418,7 +418,7 @@ TQStringList dcopSessionList( const TQString &user, const TQString &home )
     TQFileInfoListIterator it( *list );
     TQFileInfo *fi;
 
-    while ( ( fi = it.current() ) != 0 )
+    while (( fi = it.current() ) != nullptr)
     {
 	if( fi->isReadable() )
 	    result.append( fi->fileName() );
@@ -433,8 +433,8 @@ void sendUserTime( const char* app )
     static unsigned long time = 0;
     if( time == 0 )
     {
-        Display* dpy = XOpenDisplay( NULL );
-        if( dpy != NULL )
+        Display* dpy = XOpenDisplay( nullptr );
+        if( dpy )
         {
             Window w = XCreateSimpleWindow( dpy, DefaultRootWindow( dpy ), 0, 0, 1, 1, 0, 0, 0 );
             XSelectInput( dpy, w, PropertyChangeMask );
@@ -463,7 +463,7 @@ int runDCOP( QCStringList args, UserList users, Session session,
     TQCString objid;
     TQCString function;
     QCStringList params;
-    DCOPClient *client = 0L;
+    DCOPClient *client = nullptr;
     int retval = 0;
     if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 )
     {
@@ -552,8 +552,7 @@ int runDCOP( QCStringList args, UserList users, Session session,
 	    presetDCOPServer = true;
 	}
 
-	if( users.count() > 1 || ( users.count() == 1 &&
-	    ( getenv( "DCOPSERVER" ) == 0 /*&& getenv( "DISPLAY" ) == 0*/ ) ) )
+	if (users.count() > 1 || (users.count() == 1 && !getenv("DCOPSERVER")))
 	{
 	    sessions = dcopSessionList( it.key(), it.data() );
 	    if( sessions.isEmpty() )
@@ -590,8 +589,8 @@ int runDCOP( QCStringList args, UserList users, Session session,
 	    }
 	}
 
-	if ((users.count() > 1) || ((users.count() == 1) &&
-		((getenv("ICEAUTHORITY") == 0) || (getenv("DISPLAY") == 0))))
+	if (users.count() > 1 || (users.count() == 1 &&
+	    (!getenv("ICEAUTHORITY") || !getenv("DISPLAY"))))
 	{
 		// Check for ICE authority file and if the file can be read by us
 		TQString iceFileBase = "ICEauthority";
diff --git a/dcop/client/dcopfind.cpp b/dcop/client/dcopfind.cpp
index 940d62fd6..30d63354a 100644
--- a/dcop/client/dcopfind.cpp
+++ b/dcop/client/dcopfind.cpp
@@ -34,7 +34,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #include "marshall.cpp"
 
-static DCOPClient* dcop = 0;
+static DCOPClient* dcop = nullptr;
 static bool bAppIdOnly = 0;
 static bool bLaunchApp = 0;
 
@@ -229,7 +229,7 @@ int main( int argc, char** argv )
     TQCString app;
     TQCString objid;
     TQCString function;
-    char **args = 0;
+    char **args = nullptr;
     if ((argc > argi) && (strncmp(argv[argi], "DCOPRef(", 8)) == 0)
     {
        char *delim = strchr(argv[argi], ',');
diff --git a/dcop/client/dcopstart.cpp b/dcop/client/dcopstart.cpp
index a3ea04726..e196f1df5 100644
--- a/dcop/client/dcopstart.cpp
+++ b/dcop/client/dcopstart.cpp
@@ -28,11 +28,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #include <tqstringlist.h>
 
-static DCOPClient* dcop = 0;
+static DCOPClient* dcop = nullptr;
 
 void startApp(const char *_app, int argc, const char **args)
 {
-    const char *function = 0;
+    const char *function = nullptr;
     TQString app = TQString::fromLatin1(_app);
     if (app.endsWith(".desktop"))
        function = "start_service_by_desktop_path(TQString,TQStringList)";
diff --git a/dcop/dcopclient.cpp b/dcop/dcopclient.cpp
index 196d3b336..349f95f44 100644
--- a/dcop/dcopclient.cpp
+++ b/dcop/dcopclient.cpp
@@ -86,7 +86,7 @@ extern TQMap<TQCString, DCOPObject *> * kde_dcopObjMap; // defined in dcopobject
  * Keep track of local clients
  *********************************************/
 typedef TQAsciiDict<DCOPClient> client_map_t;
-static client_map_t *DCOPClient_CliMap = 0;
+static client_map_t *DCOPClient_CliMap = nullptr;
 
 static
 client_map_t *cliMap()
@@ -132,11 +132,11 @@ public:
     enum ReplyStatus { Pending, Ok, Failed };
     ReplyStruct() {
         status = Pending;
-        replyType = 0;
-        replyData = 0;
+        replyType = nullptr;
+        replyData = nullptr;
         replyId = -1;
         transactionId = -1;
-        replyObject = 0;
+        replyObject = nullptr;
     }
     ReplyStatus status;
     TQCString* replyType;
@@ -229,7 +229,7 @@ TQCString DCOPClient::iceauthPath()
 	char	szPath[512];
 	char *	pszFilePart;
 	int		ret;
-	ret = SearchPathA(NULL,"iceauth.exe",NULL,sizeof(szPath)/sizeof(szPath[0]),szPath,&pszFilePart);
+	ret = SearchPathA(nullptr,"iceauth.exe",nullptr,sizeof(szPath)/sizeof(szPath[0]),szPath,&pszFilePart);
 	if(ret != 0)
 		return TQCString(szPath);
 
@@ -246,7 +246,7 @@ TQCString DCOPClient::iceauthPath()
         {
             return fPath;
         }
-        fPath = strtok(NULL, ":\b");
+        fPath = strtok(nullptr, ":\b");
     }
 
 #endif
@@ -326,7 +326,7 @@ TQCString DCOPClient::dcopServerFileOld(const TQCString &hostname)
 }
 
 
-const char* DCOPClientPrivate::serverAddr = 0;
+const char* DCOPClientPrivate::serverAddr = nullptr;
 
 static void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const TQByteArray& dataReceived, bool canPost  );
 
@@ -351,9 +351,9 @@ static void DCOPProcessMessage(IceConn iceConn, IcePointer clientObject,
                         IceReplyWaitInfo *replyWait,
                         Bool *replyWaitRet)
 {
-    DCOPMsg *pMsg = 0;
+    DCOPMsg *pMsg = nullptr;
     DCOPClientPrivate *d = static_cast<DCOPClientPrivate *>(clientObject);
-    DCOPClient::ReplyStruct *replyStruct = replyWait ? static_cast<DCOPClient::ReplyStruct*>(replyWait->reply) : 0;
+    DCOPClient::ReplyStruct *replyStruct = replyWait ? static_cast<DCOPClient::ReplyStruct*>(replyWait->reply) : nullptr;
 
     IceReadMessageHeader(iceConn, sizeof(DCOPMsg), DCOPMsg, pMsg);
     CARD32 key = pMsg->key;
@@ -477,7 +477,7 @@ void DCOPProcessInternal( DCOPClientPrivate *d, int opcode, CARD32 key, const TQ
         return;
 
     IceConn iceConn = d->iceConn;
-    DCOPMsg *pMsg = 0;
+    DCOPMsg *pMsg = nullptr;
     DCOPClient *c = d->parent;
     TQDataStream ds( dataReceived, IO_ReadOnly );
 
@@ -594,7 +594,7 @@ static IcePoVersionRec DCOPClientVersions[] = {
 };
 
 
-static DCOPClient* dcop_main_client = 0;
+static DCOPClient* dcop_main_client = nullptr;
 
 DCOPClient* DCOPClient::mainClient()
 {
@@ -611,19 +611,19 @@ DCOPClient::DCOPClient()
 {
     d = new DCOPClientPrivate;
     d->parent = this;
-    d->iceConn = 0L;
+    d->iceConn = nullptr;
     d->key = 0;
     d->currentKey = 0;
     d->majorOpcode = 0;
-    d->appId = 0;
-    d->notifier = 0L;
+    d->appId = nullptr;
+    d->notifier = nullptr;
     d->non_blocking_call_lock = false;
     d->registered = false;
     d->foreign_server = true;
     d->accept_calls = true;
     d->accept_calls_override = false;
     d->qt_bridge_enabled = true;
-    d->transactionList = 0L;
+    d->transactionList = nullptr;
     d->transactionId = 0;
     TQObject::connect( &d->postMessageTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( processPostedMessagesInternal() ) );
     TQObject::connect( &d->eventLoopTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( eventLoopTimeout() ) );
@@ -665,7 +665,7 @@ DCOPClient::~DCOPClient()
     delete d;
 
     if ( mainClient() == this )
-        setMainClient( 0 );
+        setMainClient( nullptr );
 }
 
 void DCOPClient::setServerAddress(const TQCString &addr)
@@ -692,7 +692,7 @@ void DCOPClient::bindToApp()
         if ( d->notifier )
             delete d->notifier;
         d->notifier = new TQSocketNotifier(socket(),
-                                          TQSocketNotifier::Read, 0, 0);
+                                          TQSocketNotifier::Read, nullptr, nullptr);
         TQObject::connect(d->notifier, TQ_SIGNAL(activated(int)),
                 TQ_SLOT(processSocketData(int)));
     }
@@ -802,7 +802,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
                                                       1, DCOPClientVersions,
                                                       DCOPAuthCount,
                                                       const_cast<char **>(DCOPAuthNames),
-                                                      DCOPClientAuthProcs, 0L)) < 0) {
+                                                      DCOPClientAuthProcs, nullptr)) < 0) {
         emit attachFailed(TQString::fromLatin1( "Communications could not be established." ));
         return false;
     }
@@ -851,12 +851,12 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
 
     if ((d->iceConn = IceOpenConnection(const_cast<char*>(d->serverAddr),
                                         static_cast<IcePointer>(this), False, d->majorOpcode,
-                                        sizeof(errBuf), errBuf)) == 0L) {
+                                        sizeof(errBuf), errBuf)) == nullptr) {
         tqDebug("DCOPClient::attachInternal. Attach failed %s", errBuf);
-        d->iceConn = 0;
+        d->iceConn = nullptr;
         if (bClearServerAddr) {
            delete [] d->serverAddr;
-           d->serverAddr = 0;
+           d->serverAddr = nullptr;
         }
         emit attachFailed(TQString::fromLatin1( errBuf ));
         return false;
@@ -866,8 +866,8 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
     IceSetShutdownNegotiation(d->iceConn, False);
 
     int setupstat;
-    char* vendor = 0;
-    char* release = 0;
+    char* vendor = nullptr;
+    char* release = nullptr;
     setupstat = IceProtocolSetup(d->iceConn, d->majorOpcode,
                                  static_cast<IcePointer>(d),
                                  False, /* must authenticate */
@@ -879,17 +879,17 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
     if (setupstat == IceProtocolSetupFailure ||
         setupstat == IceProtocolSetupIOError) {
         IceCloseConnection(d->iceConn);
-        d->iceConn = 0;
+        d->iceConn = nullptr;
         if (bClearServerAddr) {
             delete [] d->serverAddr;
-            d->serverAddr = 0;
+            d->serverAddr = nullptr;
         }
         emit attachFailed(TQString::fromLatin1( errBuf ));
         return false;
     } else if (setupstat == IceProtocolAlreadyActive) {
         if (bClearServerAddr) {
             delete [] d->serverAddr;
-            d->serverAddr = 0;
+            d->serverAddr = nullptr;
         }
         /* should not happen because 3rd arg to IceOpenConnection was 0. */
         emit attachFailed(TQString::fromLatin1( "internal error in IceOpenConnection" ));
@@ -900,7 +900,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous )
     if (IceConnectionStatus(d->iceConn) != IceConnectAccepted) {
         if (bClearServerAddr) {
             delete [] d->serverAddr;
-            d->serverAddr = 0;
+            d->serverAddr = nullptr;
         }
         emit attachFailed(TQString::fromLatin1( "DCOP server did not accept the connection." ));
         return false;
@@ -933,14 +933,14 @@ bool DCOPClient::detach()
         if (status != IceClosedNow)
             return false;
         else
-            d->iceConn = 0L;
+            d->iceConn = nullptr;
     }
 
     if (d->registered)
         unregisterLocalClient(d->appId);
 
     delete d->notifier;
-    d->notifier = 0L;
+    d->notifier = nullptr;
     d->registered = false;
     d->foreign_server = true;
     return true;
@@ -1098,7 +1098,7 @@ bool DCOPClient::send(const TQCString &remApp, const TQCString &remObjId,
         TQ_INT32 saveTransactionId = d->transactionId;
         TQCString saveSenderId = d->senderId;
 
-        d->senderId = 0; // Local call
+        d->senderId = nullptr; // Local call
         TQCString replyType;
         TQByteArray replyData;
         (void) localClient->receive(  remApp, remObjId, remFun, data, replyType, replyData );
@@ -1167,8 +1167,8 @@ bool DCOPClient::findObject(const TQCString &remApp, const TQCString &remObj,
     if (app.isEmpty())
         app = "*";
 
-    foundApp = 0;
-    foundObj = 0;
+    foundApp = nullptr;
+    foundObj = nullptr;
 
     if (app[app.length()-1] == '*')
     {
@@ -1209,7 +1209,7 @@ bool DCOPClient::findObject(const TQCString &remApp, const TQCString &remObj,
             TQ_INT32 saveTransactionId = d->transactionId;
             TQCString saveSenderId = d->senderId;
 
-            d->senderId = 0; // Local call
+            d->senderId = nullptr; // Local call
             result = localClient->find(  remApp, remObj, remFun, data, replyType, replyData );
 
             TQ_INT32 id = localClient->transactionId();
@@ -1394,7 +1394,7 @@ namespace
 {
 struct O
 {
-    O(): o(0) {}
+    O(): o(nullptr) {}
     O ( const TQCString& str, TQObject* obj ):s(str), o(obj){}
     TQCString s;
     TQObject* o;
@@ -1432,9 +1432,9 @@ static TQObject* findQtObject( TQCString id )
 {
     TQRegExp expr( id );
     TQValueList<O> l;
-    fillQtObjectsEx( l, 0, "qt" );
+    fillQtObjectsEx( l, nullptr, "qt" );
     // Prefer an exact match, but fall-back on the first that contains the substring
-    TQObject* firstContains = 0L;
+    TQObject* firstContains = nullptr;
     for ( TQValueList<O>::ConstIterator it = l.begin(); it != l.end(); ++it ) {
         if ( (*it).s == id ) // exact match
             return (*it).o;
@@ -1449,7 +1449,7 @@ static QCStringList  findQtObjects( TQCString id )
 {
     TQRegExp expr( id );
     TQValueList<O> l;
-    fillQtObjectsEx( l, 0, "qt" );
+    fillQtObjectsEx( l, nullptr, "qt" );
     QCStringList result;
     for ( TQValueList<O>::ConstIterator it = l.begin(); it != l.end(); ++it ) {
         if ( (*it).s.contains( expr ) )
@@ -1484,7 +1484,7 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const
             replyType = "QCStringList";
             TQDataStream reply( replyData, IO_WriteOnly );
             QCStringList l;
-            fillQtObjects( l, 0, "qt" );
+            fillQtObjects( l, nullptr, "qt" );
             reply << l;
             return true;
         } else if ( fun == "find(TQCString)" ) {
@@ -1663,7 +1663,7 @@ bool DCOPClient::receive(const TQCString &/*app*/, const TQCString &objId,
         TQPtrList<DCOPObject> matchList =
             DCOPObject::match(objId.left(objId.length()-1));
         for (DCOPObject *objPtr = matchList.first();
-             objPtr != 0L; objPtr = matchList.next()) {
+             objPtr != nullptr; objPtr = matchList.next()) {
             objPtr->setCallingDcopClient(this);
             if (!objPtr->process(fun, data, replyType, replyData))
                 return false;
@@ -1751,9 +1751,9 @@ bool DCOPClient::find(const TQCString &app, const TQCString &objId,
         TQPtrList<DCOPObject> matchList =
             DCOPObject::match(objId.left(objId.length()-1));
         for (DCOPObject *objPtr = matchList.first();
-             objPtr != 0L; objPtr = matchList.next())
+             objPtr != nullptr; objPtr = matchList.next())
         {
-            replyType = 0;
+            replyType = nullptr;
             replyData = TQByteArray();
             if (fun.isEmpty())
                 return findSuccess(app, objPtr->objId(), replyType, replyData);
@@ -1797,7 +1797,7 @@ bool DCOPClient::call(const TQCString &remApp, const TQCString &remObjId,
         TQ_INT32 saveTransactionId = d->transactionId;
         TQCString saveSenderId = d->senderId;
 
-        d->senderId = 0; // Local call
+        d->senderId = nullptr; // Local call
         bool b = localClient->receive(  remApp, remObjId, remFun, data, replyType, replyData );
 
         TQ_INT32 id = localClient->transactionId();
@@ -1928,13 +1928,13 @@ bool DCOPClient::callInternal(const TQCString &remApp, const TQCString &remObjId
     int time_left = -1;
     if( timeout >= 0 )
     {
-        gettimeofday( &time_start, NULL );
+        gettimeofday( &time_start, nullptr );
         time_left = timeout;
     }
     for(;;) {
         bool checkMessages = true;
         if ( useEventLoop
-             ? d->notifier != NULL  // useEventLoop needs a socket notifier and a tqApp
+             ? d->notifier != nullptr  // useEventLoop needs a socket notifier and a tqApp
              : timeout >= 0 ) {     // !useEventLoop doesn't block only for timeout >= 0
             const int guiTimeout = 100;
             checkMessages = false;
@@ -1948,7 +1948,7 @@ bool DCOPClient::callInternal(const TQCString &remApp, const TQCString &remObjId
             FD_SET( socket(), &fds );
             tv.tv_sec = msecs / 1000;
             tv.tv_usec = (msecs % 1000) * 1000;
-            if ( select( socket() + 1, &fds, 0, 0, &tv ) <= 0 ) {
+            if ( select( socket() + 1, &fds, nullptr, nullptr, &tv ) <= 0 ) {
                 if( useEventLoop && (timeout < 0 || time_left > guiTimeout)) {
                     // nothing was available, we got a timeout. Reactivate
                     // the GUI in blocked state.
@@ -2004,7 +2004,7 @@ bool DCOPClient::callInternal(const TQCString &remApp, const TQCString &remObjId
         if( timeout < 0 )
             continue;
         timeval time_now;
-        gettimeofday( &time_now, NULL );
+        gettimeofday( &time_now, nullptr );
         time_left = timeout -
                         ((time_now.tv_sec - time_start.tv_sec) * 1000) -
                         ((time_now.tv_usec - time_start.tv_usec) / 1000);
@@ -2047,7 +2047,7 @@ void DCOPClient::processSocketData(int fd)
     timeout.tv_usec = 0;
     FD_ZERO(&fds);
     FD_SET(fd, &fds);
-    int result = select(fd+1, &fds, 0, 0, &timeout);
+    int result = select(fd+1, &fds, nullptr, nullptr, &timeout);
     if (result == 0)
         return;
 
@@ -2060,12 +2060,12 @@ void DCOPClient::processSocketData(int fd)
     if (!d->iceConn) {
         if( d->notifier )
             d->notifier->deleteLater();
-        d->notifier = 0;
+        d->notifier = nullptr;
         tqWarning("received an error processing data from the DCOP server!");
         return;
     }
 
-    IceProcessMessagesStatus s =  IceProcessMessages(d->iceConn, 0, 0);
+    IceProcessMessagesStatus s =  IceProcessMessages(d->iceConn, nullptr, nullptr);
 
     if (s == IceProcessMessagesIOError) {
         detach();
@@ -2103,7 +2103,7 @@ DCOPClientTransaction *
 DCOPClient::beginTransaction()
 {
     if (d->opcode == DCOPSend)
-        return 0;
+        return nullptr;
     if (!d->transactionList)
         d->transactionList = new TQPtrList<DCOPClientTransaction>;
 
@@ -2300,7 +2300,7 @@ DCOPClient::emergencyClose()
         if (cl->d->iceConn) {
             IceProtocolShutdown(cl->d->iceConn, cl->d->majorOpcode);
             IceCloseConnection(cl->d->iceConn);
-            cl->d->iceConn = 0L;
+            cl->d->iceConn = nullptr;
         }
     }
 }
diff --git a/dcop/dcopclient.h b/dcop/dcopclient.h
index 4ad76ba96..280e261ba 100644
--- a/dcop/dcopclient.h
+++ b/dcop/dcopclient.h
@@ -548,7 +548,7 @@ class DCOP_EXPORT DCOPClient : public TQObject
    *           and false if an error occurred
    * @return the list of object ids
    */
-  QCStringList remoteObjects( const TQCString& remApp, bool *ok = 0 );
+  QCStringList remoteObjects( const TQCString& remApp, bool *ok = nullptr );
 
   /**
    * Retrieves the list of interfaces of the remote object @p remObj
@@ -559,7 +559,7 @@ class DCOP_EXPORT DCOPClient : public TQObject
    *           and false if an error occurred
    * @return the list of interfaces
   */
-  QCStringList remoteInterfaces( const TQCString& remApp, const TQCString& remObj , bool *ok = 0 );
+  QCStringList remoteInterfaces( const TQCString& remApp, const TQCString& remObj , bool *ok = nullptr );
 
   /**
    * Retrieves the list of functions of the remote object @p remObj
@@ -570,7 +570,7 @@ class DCOP_EXPORT DCOPClient : public TQObject
    *           and false if an error occurred
    * @return the list of function ids
   */
-  QCStringList remoteFunctions( const TQCString& remApp, const TQCString& remObj , bool *ok = 0 );
+  QCStringList remoteFunctions( const TQCString& remApp, const TQCString& remObj , bool *ok = nullptr );
 
   /**
    * @internal
diff --git a/dcop/dcopidl/scanner.ll b/dcop/dcopidl/scanner.ll
index ec6c48f32..04cb720cf 100644
--- a/dcop/dcopidl/scanner.ll
+++ b/dcop/dcopidl/scanner.ll
@@ -67,7 +67,7 @@ static double ascii_to_longdouble (const char *s)
    * systems where scanf("%Lf") is known to be broken (Linux/Alpha)
    * have sizeof(double) == sizeof(long double).
    */
-  d = strtod (s, NULL);
+  d = strtod (s, nullptr);
 #endif
   return d;
 }
diff --git a/dcop/dcopidl/yacc.yy b/dcop/dcopidl/yacc.yy
index 82d5fc333..d433f647e 100644
--- a/dcop/dcopidl/yacc.yy
+++ b/dcop/dcopidl/yacc.yy
@@ -715,7 +715,7 @@ function_header
 	: type Identifier T_LEFT_PARANTHESIS params T_RIGHT_PARANTHESIS const_qualifier
 	  {
 	     if (dcop_area || dcop_signal_area) {
-		TQString* tmp = 0;
+		TQString* tmp = nullptr;
                 tmp = new TQString(
                         "    <%4>\n"
                         "        %2\n"
diff --git a/dcop/dcopidl2cpp/skel.cpp b/dcop/dcopidl2cpp/skel.cpp
index cc3dae6bb..df8321d9c 100644
--- a/dcop/dcopidl2cpp/skel.cpp
+++ b/dcop/dcopidl2cpp/skel.cpp
@@ -215,7 +215,7 @@ void generateSkel( const TQString& idl, const TQString& filename, TQDomElement d
 	str << "::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)" << endl;
 	str << "{" << endl;
 	if ( useHashing ) {
-	    str << "    static TQAsciiDict<int>* fdict = 0;" << endl;
+	    str << "    static TQAsciiDict<int>* fdict = nullptr;" << endl;
     
 	    str << "    if ( !fdict ) {" << endl;
 	    str << "\tfdict = new TQAsciiDict<int>( " << className << "_fhash, true, false );" << endl;
diff --git a/dcop/dcopobject.cpp b/dcop/dcopobject.cpp
index fd39fb347..c1c9abbc8 100644
--- a/dcop/dcopobject.cpp
+++ b/dcop/dcopobject.cpp
@@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include <dcopobject.h>
 #include <dcopclient.h>
 
-TQMap<TQCString, DCOPObject *> *kde_dcopObjMap = 0;
+TQMap<TQCString, DCOPObject *> *kde_dcopObjMap = nullptr;
 
 static inline TQMap<TQCString, DCOPObject *> *objMap()
 {
@@ -38,7 +38,7 @@ class DCOPObject::DCOPObjectPrivate
 {
 public:
     DCOPObjectPrivate()
-        { m_signalConnections = 0; m_dcopClient = 0; }
+        { m_signalConnections = 0; m_dcopClient = nullptr; }
 
     unsigned int m_signalConnections;
     DCOPClient *m_dcopClient;
@@ -55,7 +55,7 @@ DCOPObject::DCOPObject(TQObject *obj)
 {
     d = new DCOPObjectPrivate;
     TQObject *currentObj = obj;
-    while (currentObj != 0L) {
+    while (currentObj) {
         ident.prepend( currentObj->name() );
         ident.prepend("/");
         currentObj = currentObj->parent();
@@ -129,7 +129,7 @@ DCOPObject *DCOPObject::find(const TQCString &_objId)
   if (it != objMap()->end())
     return *it;
   else
-    return 0L;
+    return nullptr;
 }
 
 TQPtrList<DCOPObject> DCOPObject::match(const TQCString &partialId)
@@ -145,13 +145,13 @@ TQPtrList<DCOPObject> DCOPObject::match(const TQCString &partialId)
 
 TQCString DCOPObject::objectName( TQObject* obj )
 {
-    if ( obj == 0 )
+    if ( !obj )
 	return TQCString();
 
     TQCString identity;
 
     TQObject *currentObj = obj;
-    while (currentObj != 0 )
+    while (currentObj )
     {
 	identity.prepend( currentObj->name() );
 	identity.prepend("/");
@@ -245,7 +245,7 @@ bool DCOPObject::disconnectDCOPSignal( const TQCString &sender, const TQCString
 }
 
 
-TQPtrList<DCOPObjectProxy>* DCOPObjectProxy::proxies = 0;
+TQPtrList<DCOPObjectProxy>* DCOPObjectProxy::proxies = nullptr;
 
 DCOPObjectProxy::DCOPObjectProxy()
 {
diff --git a/dcop/dcopref.cpp b/dcop/dcopref.cpp
index 6c4ca180e..bc76267d5 100644
--- a/dcop/dcopref.cpp
+++ b/dcop/dcopref.cpp
@@ -103,7 +103,7 @@ bool DCOPRef::sendInternal( const TQCString& fun, const TQCString& args, const T
 }
 
 DCOPRef::DCOPRef()
-    :d(0)
+    :d(nullptr)
 {
 }
 
@@ -117,18 +117,18 @@ DCOPRef::DCOPRef( const DCOPRef& ref )
 
 DCOPRef::DCOPRef( DCOPObject *o )
     : m_app( DCOPClient::mainClient() ? DCOPClient::mainClient()->appId() : TQCString() ),
-    m_obj( o->objId() ), m_type( o->interfaces().last() ), d(0)
+    m_obj( o->objId() ), m_type( o->interfaces().last() ), d(nullptr)
 
 {
 }
 
 DCOPRef::DCOPRef( const TQCString& _app, const TQCString& obj )
-    : m_app( _app ), m_obj( obj ), d(0)
+    : m_app( _app ), m_obj( obj ), d(nullptr)
 {
 }
 
 DCOPRef::DCOPRef( const TQCString& _app, const TQCString& _obj, const TQCString& _type )
-    : m_app( _app ), m_obj( _obj ), m_type( _type ), d(0)
+    : m_app( _app ), m_obj( _obj ), m_type( _type ), d(nullptr)
 {
 }
 
@@ -181,7 +181,7 @@ void DCOPRef::setRef( const TQCString& _app, const TQCString& _obj )
 {
     m_app = _app;
     m_obj = _obj;
-    m_type = 0;
+    m_type = nullptr;
 }
 
 void DCOPRef::setRef( const TQCString& _app, const TQCString& _obj, const TQCString& _type )
@@ -193,9 +193,9 @@ void DCOPRef::setRef( const TQCString& _app, const TQCString& _obj, const TQCStr
 
 void DCOPRef::clear()
 {
-    m_app = 0;
-    m_obj = 0;
-    m_type = 0;
+    m_app = nullptr;
+    m_obj = nullptr;
+    m_type = nullptr;
 }
 
 TQDataStream& operator<<( TQDataStream& str, const DCOPRef& ref )
diff --git a/dcop/dcopserver.cpp b/dcop/dcopserver.cpp
index 99c3cba67..a11012e61 100644
--- a/dcop/dcopserver.cpp
+++ b/dcop/dcopserver.cpp
@@ -87,7 +87,7 @@ static TQCString findDcopserverShutdown()
 	char szPath[512];
 	char *pszFilePart;
 	int ret;
-	ret = SearchPathA(NULL,"dcopserver_shutdown","exe",sizeof(szPath)/sizeof(szPath[0]),szPath,&pszFilePart);
+	ret = SearchPathA(nullptr,"dcopserver_shutdown","exe",sizeof(szPath)/sizeof(szPath[0]),szPath,&pszFilePart);
 	if(ret != 0)
 		return TQCString(szPath);
 #else
@@ -99,7 +99,7 @@ static TQCString findDcopserverShutdown()
       file += "/dcopserver_shutdown";
       if (access(file.data(), X_OK) == 0)
          return file;
-      dir = strtok(NULL, ":");
+      dir = strtok(nullptr, ":");
    }
    TQCString file = DCOP_PATH;
    file += "/dcopserver_shutdown";
@@ -401,7 +401,7 @@ class DCOPListener : public TQSocketNotifier
 public:
     DCOPListener( IceListenObj obj )
 	: TQSocketNotifier( IceGetListenConnectionNumber( obj ),
-			   TQSocketNotifier::Read, 0, 0)
+			   TQSocketNotifier::Read, nullptr, nullptr)
 {
     listenObj = obj;
 }
@@ -411,14 +411,14 @@ public:
 
 DCOPConnection::DCOPConnection( IceConn conn )
 	: TQSocketNotifier( IceConnectionNumber( conn ),
-			   TQSocketNotifier::Read, 0, 0 )
+			   TQSocketNotifier::Read, nullptr, nullptr )
 {
     iceConn = conn;
     notifyRegister = 0;
-    _signalConnectionList = 0;
+    _signalConnectionList = nullptr;
     daemon = false;
     outputBlocked = false;
-    outputBufferNotifier = 0;
+    outputBufferNotifier = nullptr;
     outputBufferStart = 0;
 }
 
@@ -553,7 +553,7 @@ static char *unique_filename (const char *path, const char *prefix, int *pFd)
     snprintf (tempFile, PATH_MAX, "%s/%sXXXXXX", path, prefix);
 #endif
     ptr = static_cast<char *>(malloc(strlen(tempFile) + 1));
-    if (ptr != NULL)
+    if (ptr)
 	{
 		int fd = mkstemps(tempFile, 0);
 		if(fd >= 0)
@@ -564,7 +564,7 @@ static char *unique_filename (const char *path, const char *prefix, int *pFd)
 		else
 		{
 			free(ptr);
-			ptr = NULL;
+			ptr = nullptr;
 		}
 	}
     return ptr;
@@ -576,7 +576,7 @@ Status
 SetAuthentication (int count, IceListenObj *_listenObjs,
 		   IceAuthDataEntry **_authDataEntries)
 {
-    FILE        *addfp = NULL;
+    FILE        *addfp = nullptr;
     const char  *path;
     int         original_umask;
     int         i;
@@ -600,13 +600,13 @@ SetAuthentication (int count, IceListenObj *_listenObjs,
     if (!path)
 	path = "/tmp";
 #endif
-    if ((addAuthFile = unique_filename (path, "dcop", &fd)) == NULL)
+    if (!(addAuthFile = unique_filename (path, "dcop", &fd)))
 	goto bad;
 
     if (!(addfp = fdopen(fd, "wb")))
 	goto bad;
 
-    if ((*_authDataEntries = static_cast<IceAuthDataEntry *>(malloc (count * 2 * sizeof (IceAuthDataEntry)))) == NULL)
+    if (!(*_authDataEntries = static_cast<IceAuthDataEntry *>(malloc (count * 2 * sizeof (IceAuthDataEntry)))))
 	goto bad;
 
     for (i = 0; i < numTransports * 2; i += 2) {
@@ -719,7 +719,7 @@ void DCOPServer::processMessage( IceConn iceConn, int opcode,
     case DCOPSend:
     case DCOPReplyDelayed:
 	{
-	    DCOPMsg *pMsg = 0;
+	    DCOPMsg *pMsg = nullptr;
 	    IceReadMessageHeader(iceConn, sizeof(DCOPMsg), DCOPMsg, pMsg);
 	    CARD32 key = pMsg->key;
 	    TQByteArray ba( length );
@@ -797,7 +797,7 @@ if (opcode == DCOPSend)
     case DCOPCall:
     case DCOPFind:
 	{
-	    DCOPMsg *pMsg = 0;
+	    DCOPMsg *pMsg = nullptr;
 	    IceReadMessageHeader(iceConn, sizeof(DCOPMsg), DCOPMsg, pMsg);
 	    CARD32 key = pMsg->key;
 	    TQByteArray ba( length );
@@ -879,7 +879,7 @@ if (opcode == DCOPCall)
     case DCOPReplyFailed:
     case DCOPReplyWait:
 	{
-	    DCOPMsg *pMsg = 0;
+	    DCOPMsg *pMsg = nullptr;
 	    IceReadMessageHeader(iceConn, sizeof(DCOPMsg), DCOPMsg, pMsg);
 	    CARD32 key = pMsg->key;
 	    TQByteArray ba( length );
@@ -925,7 +925,7 @@ static const IcePaVersionRec DCOPServerVersions[] = {
 };
 
 static const IcePoVersionRec DUMMYVersions[] = {
-    { DCOPVersionMajor, DCOPVersionMinor, 0 }
+    { DCOPVersionMajor, DCOPVersionMinor, nullptr }
 };
 
 static Status DCOPServerProtocolSetupProc ( IceConn /*iceConn*/,
@@ -943,7 +943,7 @@ static Status DCOPServerProtocolSetupProc ( IceConn /*iceConn*/,
     if (release)
 	free (release);
 
-    *clientDataRet = 0;
+    *clientDataRet = nullptr;
 
     return (majorVersion == DCOPVersionMajor && minorVersion == DCOPVersionMinor);
 }
@@ -968,7 +968,7 @@ extern "C"
 }
 
 DCOPServer::DCOPServer(bool _suicide)
-    : TQObject(0,0), currentClientNumber(0), appIds(263), clients(263)
+    : TQObject(nullptr,nullptr), currentClientNumber(0), appIds(263), clients(263)
 {
     serverKey = 42;
 
@@ -983,7 +983,7 @@ DCOPServer::DCOPServer(bool _suicide)
 				    const_cast<char *>("DUMMY"),
 				    1, const_cast<IcePoVersionRec *>(DUMMYVersions),
 				    DCOPAuthCount, const_cast<char **>(DCOPAuthNames),
-				    DCOPClientAuthProcs, 0);
+				    DCOPClientAuthProcs, nullptr);
     if (_kde_IceLastMajorOpcode < 1 )
 	tqWarning("[dcopserver] DCOPServer Error: incorrect major opcode!");
 
@@ -996,11 +996,11 @@ DCOPServer::DCOPServer(bool _suicide)
 						     DCOPServerAuthProcs,
 						     HostBasedAuthProc,
 						     DCOPServerProtocolSetupProc,
-						     NULL,	/* IceProtocolActivateProc - we don't care about
+						     nullptr,	/* IceProtocolActivateProc - we don't care about
 								   when the Protocol Reply is sent, because the
 								   session manager can not immediately send a
 								   message - it must wait for RegisterClient. */
-						     NULL	/* IceIOErrorProc */
+						     nullptr	/* IceIOErrorProc */
 						     )) < 0)
 	{
 	    tqWarning("[dcopserver] Could not register DCOP protocol with ICE");
@@ -1024,7 +1024,7 @@ DCOPServer::DCOPServer(bool _suicide)
 		exit(1);
 	    }
 	    char *idlist = IceComposeNetworkIdList(numTransports, listenObjs);
-	    if (idlist != 0) {
+	    if (idlist) {
 	        fprintf(f, "%s", idlist);
 		free(idlist);
 	    }
@@ -1069,9 +1069,9 @@ DCOPServer::DCOPServer(bool _suicide)
 #ifdef Q_OS_WIN
 	char szEventName[256];
 	sprintf(szEventName,"dcopserver%i",GetCurrentProcessId());
-	m_evTerminate = CreateEventA(NULL,TRUE,FALSE,(LPCSTR)szEventName);
+	m_evTerminate = CreateEventA(nullptr,TRUE,FALSE,(LPCSTR)szEventName);
 	ResetEvent(m_evTerminate);
-	m_hTerminateThread = CreateThread(NULL,0,TerminatorThread,this,0,&m_dwTerminateThreadId);
+	m_hTerminateThread = CreateThread(nullptr,0,TerminatorThread,this,0,&m_dwTerminateThreadId);
 	if(m_hTerminateThread)
 		CloseHandle(m_hTerminateThread);
 #endif
@@ -1108,7 +1108,7 @@ DCOPServer::~DCOPServer()
 DCOPConnection* DCOPServer::findApp( const TQCString& appId )
 {
     if ( appId.isNull() )
-	return 0;
+	return nullptr;
     DCOPConnection* conn = appIds.find( appId );
     return conn;
 }
@@ -1141,7 +1141,7 @@ void DCOPServer::ioError( IceConn iceConn  )
 void DCOPServer::processData( int /*socket*/ )
 {
     IceConn iceConn = static_cast<const DCOPConnection*>(sender())->iceConn;
-    IceProcessMessagesStatus status = IceProcessMessages( iceConn, 0, 0 );
+    IceProcessMessagesStatus status = IceProcessMessages( iceConn, nullptr, nullptr );
     if ( status == IceProcessMessagesIOError ) {
         deadConnections.removeRef(iceConn);
         if (deadConnections.isEmpty())
@@ -1167,7 +1167,7 @@ void DCOPServer::newClient( int /*socket*/ )
 
     IceConnectStatus cstatus;
     while ((cstatus = IceConnectionStatus (iceConn))==IceConnectPending) {
-	(void) IceProcessMessages( iceConn, 0, 0 );
+	(void) IceProcessMessages( iceConn, nullptr, nullptr );
     }
 
     if (cstatus != IceConnectAccepted) {
@@ -1292,7 +1292,7 @@ void DCOPServer::slotTerminate()
     fprintf( stderr, "[dcopserver] slotTerminate() -> sending terminateTDE signal." );
 #endif
     TQByteArray data;
-    dcopSignals->emitSignal(0L /* dcopserver */, "terminateTDE()", data, false);
+    dcopSignals->emitSignal(nullptr /* dcopserver */, "terminateTDE()", data, false);
     disconnect( m_timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotTerminate()) );
     connect( m_timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotSuicide()) );
     system(findDcopserverShutdown()+" --nokill");
@@ -1319,7 +1319,7 @@ void DCOPServer::slotShutdown()
     {
        shutdown = true;
        TQByteArray data;
-       dcopSignals->emitSignal(0L /* dcopserver */, "terminateTDE()", data, false);
+       dcopSignals->emitSignal(nullptr /* dcopserver */, "terminateTDE()", data, false);
        m_timer->start( 10000 ); // if within 10 seconds nothing happens, we'll terminate
        disconnect( m_timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotTerminate()) );
        connect( m_timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotExit()) );
@@ -1440,7 +1440,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
 #endif
 
 		conn->appId = app2;
-		if ( appIds.find( app2 ) != 0 ) {
+		if ( appIds.find( app2 ) ) {
 		    // we already have this application, unify
 		    int n = 1;
 		    TQCString tmp;
@@ -1449,7 +1449,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
 			tmp.setNum( n );
 			tmp.prepend("-");
 			tmp.prepend( app2 );
-		    } while ( appIds.find( tmp ) != 0 );
+		    } while ( appIds.find( tmp ) );
 		    conn->appId = tmp;
 		}
 		appIds.insert( conn->appId, conn );
@@ -1486,7 +1486,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj,
 	if (!args.atEnd()) {
 	    TQCString s = readQCString(args);
 	    TQDataStream reply( replyData, IO_WriteOnly );
-	    int b = ( findApp( s ) != 0 );
+	    int b = ( findApp( s ) != nullptr );
 	    replyType = "bool";
 	    reply << b;
 	    return true;
@@ -1561,7 +1561,7 @@ void DCOPServer::broadcastApplicationRegistration( DCOPConnection* conn, const T
     ds <<TQCString("DCOPServer") <<  TQCString("") << TQCString("")
        << type << data;
     int datalen = ba.size();
-    DCOPMsg *pMsg = 0;
+    DCOPMsg *pMsg = nullptr;
     while ( it.current() ) {
         DCOPConnection* c = it.current();
         ++it;
@@ -1586,7 +1586,7 @@ DCOPServer::sendMessage(DCOPConnection *conn, const TQCString &sApp,
    TQDataStream ds( ba, IO_WriteOnly );
    ds << sApp << rApp << rObj << rFun << data;
    int datalen = ba.size();
-   DCOPMsg *pMsg = 0;
+   DCOPMsg *pMsg = nullptr;
 
    IceGetHeader( conn->iceConn, majorOpcode, DCOPSend,
                  sizeof(DCOPMsg), DCOPMsg, pMsg );
@@ -1778,7 +1778,7 @@ extern "C" DCOP_EXPORT int kdemain( int argc, char* argv[] )
 #ifdef Q_OS_WIN
 	SetConsoleCtrlHandler(DCOPServer::dcopServerConsoleProc,TRUE);
 #else
-	TQSocketNotifier DEATH(pipeOfDeath[0], TQSocketNotifier::Read, 0, 0);
+	TQSocketNotifier DEATH(pipeOfDeath[0], TQSocketNotifier::Read, nullptr, nullptr);
 		server->connect(&DEATH, TQ_SIGNAL(activated(int)), TQ_SLOT(slotShutdown()));
 #endif
 
diff --git a/dcop/dcopserver_shutdown_win.cpp b/dcop/dcopserver_shutdown_win.cpp
index af38c66f8..8197c1760 100644
--- a/dcop/dcopserver_shutdown_win.cpp
+++ b/dcop/dcopserver_shutdown_win.cpp
@@ -78,8 +78,8 @@ static char *getDisplay()
       display = "NODISPLAY";
    }
    result = (char*)malloc(strlen(display)+1);
-   if (result == NULL)
-      return NULL;
+   if (!result)
+      return nullptr;
    strcpy(result, display);
    screen = strrchr(result, '.');
    colon = strrchr(result, ':');
@@ -117,10 +117,10 @@ static void killDCOPWin(pid_t pid)
 {
 	char	sz[256];
 	sprintf(sz,"dcopserver%i",pid);
-	HANDLE hEvent = CreateEventA(NULL,TRUE,FALSE,(LPCSTR)sz);
+	HANDLE hEvent = CreateEventA(nullptr,TRUE,FALSE,(LPCSTR)sz);
 	DWORD dwError = GetLastError();
 	printf("Signal event %s %p, %i\n",sz,hEvent,dwError);
-	if(hEvent != NULL)
+	if(hEvent)
 	{
 		SetEvent(hEvent);
 		CloseHandle(hEvent);
diff --git a/dcop/dcopsignals.cpp b/dcop/dcopsignals.cpp
index 46b1dcd14..c252da456 100644
--- a/dcop/dcopsignals.cpp
+++ b/dcop/dcopsignals.cpp
@@ -126,7 +126,7 @@ DCOPSignals::connectSignal( const TQCString &sender, const TQCString &senderObj,
          return false;
    }
 
-   DCOPConnection *senderConn = 0;
+   DCOPConnection *senderConn = nullptr;
    if (Volatile)
    {
       senderConn = the_server->findApp(sender);
@@ -181,7 +181,7 @@ DCOPSignals::disconnectSignal( const TQCString &sender, const TQCString &senderO
    if (!list)
       return false; // Not found...
 
-   DCOPSignalConnection *next = 0;
+   DCOPSignalConnection *next = nullptr;
    bool result = false;
 
    for(DCOPSignalConnection *current = list->first(); current; current = next)
@@ -234,7 +234,7 @@ DCOPSignals::removeConnections(DCOPConnection *conn, const TQCString &obj)
    if (!list)
       return; // Nothing to do...
 
-   DCOPSignalConnection *next = 0;
+   DCOPSignalConnection *next = nullptr;
 
    for(DCOPSignalConnection *current = list->first(); current; current = next)
    {
diff --git a/dcop/dcopsignals.h b/dcop/dcopsignals.h
index 8a930b85f..65624e434 100644
--- a/dcop/dcopsignals.h
+++ b/dcop/dcopsignals.h
@@ -111,7 +111,7 @@ public:
     *   All connections for which "conn" is the receiver.
     *   All volatile connections for which "conn" is the sender.
     */
-   void removeConnections(DCOPConnection *conn, const TQCString &obj=0);
+   void removeConnections(DCOPConnection *conn, const TQCString &obj=nullptr);
 
 
    /*
diff --git a/dcop/dcopstub.cpp b/dcop/dcopstub.cpp
index 903ed0bc5..50e9382c7 100644
--- a/dcop/dcopstub.cpp
+++ b/dcop/dcopstub.cpp
@@ -29,17 +29,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 class DCOPStubPrivate
 {
 public:
-    DCOPStubPrivate():dcopClient(0){}
+    DCOPStubPrivate():dcopClient(nullptr){}
     DCOPClient* dcopClient;
 };
 
 DCOPStub::DCOPStub( const TQCString& app, const TQCString& obj )
-    : m_app( app ), m_obj( obj ), m_status( CallSucceeded ),d(0)
+    : m_app( app ), m_obj( obj ), m_status( CallSucceeded ),d(nullptr)
 {
 }
 
 DCOPStub::DCOPStub( DCOPClient* client, const TQCString& app, const TQCString& obj )
-    : m_app( app ), m_obj( obj ), m_status( CallSucceeded ),d(0)
+    : m_app( app ), m_obj( obj ), m_status( CallSucceeded ),d(nullptr)
 {
     if ( client ) {
 	d = new DCOPStubPrivate;
@@ -48,7 +48,7 @@ DCOPStub::DCOPStub( DCOPClient* client, const TQCString& app, const TQCString& o
 }
 
 DCOPStub::DCOPStub( const DCOPRef& ref )
-    : m_app( ref.app() ), m_obj( ref.obj() ), m_status( CallSucceeded ),d(0)
+    : m_app( ref.app() ), m_obj( ref.obj() ), m_status( CallSucceeded ),d(nullptr)
 {
 }
 
diff --git a/dcop/dcoptypes.h b/dcop/dcoptypes.h
index d70f787f7..329e5c140 100644
--- a/dcop/dcoptypes.h
+++ b/dcop/dcoptypes.h
@@ -87,7 +87,7 @@ inline void dcopTypeInit(long& l){l=0;}
 inline void dcopTypeInit(ulong& l){l=0;}
 inline void dcopTypeInit(float& f){f=0;}
 inline void dcopTypeInit(double& d){d=0;}
-inline void dcopTypeInit(const char* s ){s=0;}
+inline void dcopTypeInit(const char* s ){s=nullptr;}
 
 // generic template fallback for self-initializing classes
 template <class T> inline void dcopTypeInit(T&){}
diff --git a/dcop/testdcop.cpp b/dcop/testdcop.cpp
index 583a0255b..784729c74 100644
--- a/dcop/testdcop.cpp
+++ b/dcop/testdcop.cpp
@@ -28,12 +28,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #include <assert.h>
 
-DCOPClientTransaction *countDownAction = 0;
+DCOPClientTransaction *countDownAction = nullptr;
 int countDownCount = 0;
 
-DCOPClientTransaction *countDownAction2 = 0;
+DCOPClientTransaction *countDownAction2 = nullptr;
 int countDownCount2 = 0;
-DCOPClient *client = 0;
+DCOPClient *client = nullptr;
 
 bool MyDCOPObject::process(const TQCString &fun, const TQByteArray &data,
 			   TQCString& replyType, TQByteArray &replyData)
@@ -80,7 +80,7 @@ tqDebug("countDown() countDownAction = %p", countDownAction);
        return true;
     }
 
-    if (countDownAction == 0)
+    if (!countDownAction)
     {
        countDownCount = 10;       
        countDownAction = client->beginTransaction();
@@ -109,7 +109,7 @@ void MyDCOPObject::slotTimeout()
      TQDataStream reply( replyData, IO_WriteOnly );
      reply << TQString("Hello World");
      client->endTransaction(countDownAction, replyType, replyData);
-     countDownAction = 0;
+     countDownAction = nullptr;
   }
   else
   {
@@ -128,7 +128,7 @@ void MyDCOPObject::slotTimeout2()
      TQDataStream reply( replyData, IO_WriteOnly );
      reply << TQString("Hello World");
      client->endTransaction(countDownAction2, replyType, replyData);
-     countDownAction2 = 0;
+     countDownAction2 = nullptr;
   }
   else
   {
diff --git a/dcop/tests/driver.cpp b/dcop/tests/driver.cpp
index 74dee9edd..aed6e1a4a 100644
--- a/dcop/tests/driver.cpp
+++ b/dcop/tests/driver.cpp
@@ -52,7 +52,7 @@ int main(int argc, char** argv)
 {
 	if ( argc < 2 ) { tqWarning("Usage: driver <appid>"); return 1; }
 	const char* appname = strdup( argv[ 1 ] );
-	argv[ 1 ] = 0; // sue me
+	argv[ 1 ] = nullptr; // sue me
 	TDECmdLineArgs::init( argc, argv, argv[1], "TestAppDriver", "Tests the dcop familly of tools + libraries", "1.0" ); // FIXME
 	TDEApplication app (/*stylesEnabled=*/ false, /*GUIEnabled=*/ false);
 	app.dcopClient()->attach(  );
-- 
cgit v1.2.3

