From 2c673b44f23f03d920f449142092c0a2c497019e Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Mon, 28 Sep 2026 23:24:54 -0300
Subject: Replace NULL pointer constants with nullptr
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>
---
 examples/demo/opengl/gllandscape.cpp               |  2 +-
 examples/themes/metal.cpp                          |  2 +-
 examples/themes/wood.cpp                           |  2 +-
 mkspecs/win32-g++/qtcrtentrypoint.cpp              |  2 +-
 .../inputmethods/imsw-multi/qmultiinputcontext.cpp |  2 +-
 .../src/inputmethods/xim/qximinputcontext_x11.cpp  |  2 +-
 qmake/generators/makefile.cpp                      |  4 +-
 qmake/main.cpp                                     |  2 +-
 qmake/meta.cpp                                     |  2 +-
 qmake/option.cpp                                   |  6 +-
 qmake/project.cpp                                  |  4 +-
 qmake/project.h                                    |  2 +-
 qmake/property.cpp                                 |  4 +-
 src/codecs/tqbig5codec.cpp                         |  2 +-
 src/kernel/tqaccessible.cpp                        |  2 +-
 src/kernel/tqapplication.cpp                       |  4 +-
 src/kernel/tqapplication_x11.cpp                   | 16 ++--
 src/kernel/tqclipboard_x11.cpp                     |  8 +-
 src/kernel/tqdnd_x11.cpp                           |  2 +-
 src/kernel/tqdragobject.cpp                        |  2 +-
 src/kernel/tqeventloop_x11_glib.cpp                |  6 +-
 src/kernel/tqfontdatabase.cpp                      |  4 +-
 src/kernel/tqfontengine_p.h                        |  2 +-
 src/kernel/tqjpegio.cpp                            |  4 +-
 src/kernel/tqobject.cpp                            | 10 +--
 src/kernel/tqpainter.h                             |  2 +-
 src/kernel/tqpixmap_x11.cpp                        | 34 ++++----
 src/kernel/tqpngio.cpp                             |  8 +-
 src/kernel/tqprocess_unix.cpp                      |  2 +-
 src/kernel/tqpsprinter.cpp                         | 12 +--
 src/kernel/tqregion_x11.cpp                        | 36 ++++-----
 src/kernel/tqsound_x11.cpp                         | 14 ++--
 src/kernel/tqstyle.cpp                             | 92 +++++++++++-----------
 src/kernel/tqstyle.h                               |  2 +-
 src/kernel/tqthread_unix.cpp                       |  4 +-
 src/kernel/tqttdeintegration_x11.cpp               | 22 +++---
 src/kernel/tqwidget.cpp                            |  4 +-
 src/kernel/tqwidget_x11.cpp                        |  6 +-
 src/opengl/tqgl.cpp                                |  4 +-
 src/opengl/tqgl.h                                  |  2 +-
 src/sql/drivers/ibase/tqsql_ibase.cpp              |  4 +-
 src/sql/drivers/mysql/tqsql_mysql.cpp              | 10 +--
 src/sql/drivers/odbc/tqsql_odbc.cpp                | 52 ++++++------
 src/sql/drivers/psql/tqsql_psql.cpp                |  2 +-
 src/sql/tqsqlerror.cpp                             |  2 +-
 src/styles/tqcommonstyle.cpp                       | 14 ++--
 src/styles/tqcompactstyle.cpp                      |  6 +-
 src/styles/tqmotifplusstyle.cpp                    |  8 +-
 src/styles/tqmotifstyle.cpp                        |  4 +-
 src/styles/tqplatinumstyle.cpp                     |  2 +-
 src/styles/tqsgistyle.cpp                          |  2 +-
 src/styles/tqwindowsstyle.cpp                      |  6 +-
 src/tools/tqfile.cpp                               |  4 +-
 src/tools/tqfileinfo_unix.cpp                      |  8 +-
 src/tools/tqglobal.cpp                             | 12 +--
 src/tools/tqlocale.cpp                             |  6 +-
 src/tools/tqstring.cpp                             |  4 +-
 src/tools/tqwaitcondition_unix.cpp                 |  2 +-
 src/widgets/tqdialogbuttons.cpp                    |  6 +-
 src/widgets/tqdialogbuttons_p.h                    |  4 +-
 src/widgets/tqiconview.cpp                         | 12 +--
 src/widgets/tqpopupmenu.cpp                        | 10 +--
 src/widgets/tqradiobutton.cpp                      |  2 +-
 src/widgets/tqtabbar.cpp                           |  2 +-
 src/workspace/tqworkspace.cpp                      |  8 +-
 tools/designer/designer/mainwindow.cpp             | 12 +--
 66 files changed, 273 insertions(+), 273 deletions(-)

diff --git a/examples/demo/opengl/gllandscape.cpp b/examples/demo/opengl/gllandscape.cpp
index 612f8c264..091805d51 100644
--- a/examples/demo/opengl/gllandscape.cpp
+++ b/examples/demo/opengl/gllandscape.cpp
@@ -331,7 +331,7 @@ void GLLandscape::createGrid( int size )
 
 void GLLandscape::destroyGrid()
 {
-    if ( landscape != NULL ) {
+    if ( landscape ) {
 	for( int i = 0; i < gridSize; i++ ) {
 	    delete[] landscape[i];
 	    delete[] normals[i];
diff --git a/examples/themes/metal.cpp b/examples/themes/metal.cpp
index 05d080d61..db630bbbb 100644
--- a/examples/themes/metal.cpp
+++ b/examples/themes/metal.cpp
@@ -279,7 +279,7 @@ void MetalStyle::drawControl( ControlElement element,
 	    drawItem( p, TQRect( x, y, w, h ),
 		      AlignCenter|ShowPrefix,
 		      cg, (elementFlags & CEF_IsEnabled),
-		      (ceData.fgPixmap.isNull())?NULL:&ceData.fgPixmap, ceData.text, -1,
+		      (ceData.fgPixmap.isNull())?nullptr:&ceData.fgPixmap, ceData.text, -1,
 		      ((elementFlags & CEF_IsDown) || (elementFlags & CEF_IsOn))? &cg.brightText() : &cg.buttonText() );
 	    if ( dx || dy )
 		p->translate( -dx, -dy );
diff --git a/examples/themes/wood.cpp b/examples/themes/wood.cpp
index 98b56fbbb..2ca8fd7fc 100644
--- a/examples/themes/wood.cpp
+++ b/examples/themes/wood.cpp
@@ -1080,7 +1080,7 @@ void NorwegianWoodStyle::drawControl( ControlElement element,
 	    drawItem( p, TQRect( x, y, w, h ),
 		      AlignCenter | ShowPrefix,
 		      cg, (elementFlags & CEF_IsEnabled),
-		      (ceData.fgPixmap.isNull())?NULL:&ceData.fgPixmap, ceData.text, -1,
+		      (ceData.fgPixmap.isNull())?nullptr:&ceData.fgPixmap, ceData.text, -1,
 		      ((elementFlags & CEF_IsDown) || (elementFlags & CEF_IsOn)) ? &cg.brightText()
 		      : &cg.buttonText() );
 	    if ( dx || dy )
diff --git a/mkspecs/win32-g++/qtcrtentrypoint.cpp b/mkspecs/win32-g++/qtcrtentrypoint.cpp
index 3d047e8a7..918e57790 100644
--- a/mkspecs/win32-g++/qtcrtentrypoint.cpp
+++ b/mkspecs/win32-g++/qtcrtentrypoint.cpp
@@ -213,7 +213,7 @@ int TQtWinMainCRTStartup()
         }
     }
     
-    nRet = WinMain (GetModuleHandle (NULL), NULL, szCmd,
+    nRet = WinMain (GetModuleHandle (nullptr), nullptr, szCmd,
                     (startinfo.dwFlags & STARTF_USESHOWWINDOW) ?
                      startinfo.wShowWindow : SW_SHOWDEFAULT);
     
diff --git a/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp b/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp
index 99e86ae42..96d6ba2cb 100644
--- a/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp
+++ b/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp
@@ -56,7 +56,7 @@
 TQMultiInputContext::TQMultiInputContext()
     : TQInputContext(), _slave( 0 ), imIndex( 0 ), cachedFocus( false ),
       cachedFocusWidget( 0 ), cachedHolderWidget( 0 ),
-      beIndirectlyConnected( false ), popup( NULL ), currentIMKey( TQString::null )
+      beIndirectlyConnected( false ), popup( nullptr ), currentIMKey( TQString::null )
 {
     keyDict.setAutoDelete( true );
     keyDict.clear();
diff --git a/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp b/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp
index f239ddd4b..c8fa3b76b 100644
--- a/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp
+++ b/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp
@@ -236,7 +236,7 @@ extern "C" {
 	if (text) {
 	    char *str = 0;
 	    if (text->encoding_is_wchar) {
-		int l = wcstombs(NULL, text->string.wide_char, text->length);
+		int l = wcstombs(nullptr, text->string.wide_char, text->length);
 		if (l != -1) {
 		    str = new char[l + 1];
 		    wcstombs(str, text->string.wide_char, l);
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 6a0e3cac3..1564bf2b1 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -101,7 +101,7 @@ MakefileGenerator::MakefileGenerator(TQMakeProject *p) : init_opath_already(fals
 
 static char *gimme_buffer(off_t s)
 {
-    static char *big_buffer = NULL;
+    static char *big_buffer = nullptr;
     static int big_buffer_size = 0;
     if(!big_buffer || big_buffer_size < s)
 	big_buffer = (char *)realloc(big_buffer, s);
@@ -2500,7 +2500,7 @@ MakefileGenerator::create(TQMakeProject *proj)
     if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT)
 	return new ProjectGenerator(proj);
 
-    MakefileGenerator *mkfile = NULL;
+    MakefileGenerator *mkfile = nullptr;
     TQString gen = proj->first("MAKEFILE_GENERATOR");
     if(gen.isEmpty()) {
 	fprintf(stderr, "No generator specified in config file: %s\n",
diff --git a/qmake/main.cpp b/qmake/main.cpp
index d8ba9ea2c..05146812e 100644
--- a/qmake/main.cpp
+++ b/qmake/main.cpp
@@ -178,7 +178,7 @@ int main(int argc, char **argv)
 	    exit_val = 6;
 	}
 	delete mkfile;
-	mkfile = NULL;
+	mkfile = nullptr;
 
 	/* debugging */
 	if(Option::debug_level) {
diff --git a/qmake/meta.cpp b/qmake/meta.cpp
index bb6437ee8..8d96b5f54 100644
--- a/qmake/meta.cpp
+++ b/qmake/meta.cpp
@@ -168,7 +168,7 @@ TQMakeMetaInfo::readLibtoolFile(const TQString &f)
 		    dep = dep.mid(1, dep.length() - 2);
 		lst = TQStringList::split(" ", dep.stripWhiteSpace());
 	    }
-	    TQMakeProject *conf = NULL;
+	    TQMakeProject *conf = nullptr;
 	    for(TQStringList::Iterator lit = lst.begin(); lit != lst.end(); ++lit) {
 		if((*lit).startsWith("-R")) {
 		    if(!conf) {
diff --git a/qmake/option.cpp b/qmake/option.cpp
index 9d64e0ca3..25fdd697c 100644
--- a/qmake/option.cpp
+++ b/qmake/option.cpp
@@ -329,7 +329,7 @@ Option::parseCommandLine(int argc, char **argv)
 	Option::qmake_mode = default_mode(argv[0]);
     if(const char *envflags = getenv("QMAKEFLAGS")) {
 	int env_argc = 0, env_size = 0, currlen=0;
-	char quote = 0, **env_argv = NULL;
+	char quote = 0, **env_argv = nullptr;
 	for(int i = 0; envflags[i]; i++) {
 	    if(!quote && (envflags[i] == '\'' || envflags[i] == '"')) {
 		quote = envflags[i];
@@ -345,7 +345,7 @@ Option::parseCommandLine(int argc, char **argv)
 		if(!env_argv || env_argc > env_size) {
 		    env_argv = (char **)realloc(env_argv, sizeof(char *)*(env_size+=10));
 		    for(int i2 = env_argc; i2 < env_size; i2++)
-			env_argv[i2] = NULL;
+			env_argv[i2] = nullptr;
 		}
 		if(!env_argv[env_argc]) {
 		    currlen = 0;
@@ -511,7 +511,7 @@ Option::fixPathToLocalOS(const TQString& in, bool fix_env, bool canonical)
 
 const char *qmake_version()
 {
-    static char *ret = NULL;
+    static char *ret = nullptr;
     if(ret)
 	return ret;
     ret = (char *)malloc(15);
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 73f2bd277..fa14a7fa1 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -190,7 +190,7 @@ static TQStringList split_value_list(const TQString &vals, bool do_semicolon=fal
 
 TQMakeProject::TQMakeProject()
 {
-    prop = NULL;
+    prop = nullptr;
 }
 
 TQMakeProject::TQMakeProject(TQMakeProperty *p)
@@ -721,7 +721,7 @@ TQMakeProject::isActiveConfig(const TQString &x, bool regex, TQMap<TQString, TQS
 	return true;
 #ifdef Q_OS_UNIX
     else if(spec == "default") {
-	static char *buffer = NULL;
+	static char *buffer = nullptr;
 	if(!buffer)
 	    buffer = (char *)malloc(1024);
 	int l = readlink(Option::mkfile::qmakespec, buffer, 1023);
diff --git a/qmake/project.h b/qmake/project.h
index 952cad4ca..9472f87f9 100644
--- a/qmake/project.h
+++ b/qmake/project.h
@@ -75,7 +75,7 @@ public:
     TQStringList &values(const TQString &v);
     TQString first(const TQString &v);
     TQMap<TQString, TQStringList> &variables();
-    bool isActiveConfig(const TQString &x, bool regex=false, TQMap<TQString, TQStringList> *place=NULL);
+    bool isActiveConfig(const TQString &x, bool regex=false, TQMap<TQString, TQStringList> *place=nullptr);
 
 protected:
     friend class MakefileGenerator;
diff --git a/qmake/property.cpp b/qmake/property.cpp
index 770ca445e..e756b5b35 100644
--- a/qmake/property.cpp
+++ b/qmake/property.cpp
@@ -46,14 +46,14 @@
 
 TQStringList qmake_mkspec_paths(); //project.cpp
 
-TQMakeProperty::TQMakeProperty() : sett(NULL)
+TQMakeProperty::TQMakeProperty() : sett(nullptr)
 {
 }
 
 TQMakeProperty::~TQMakeProperty()
 {
     delete sett;;
-    sett = NULL;
+    sett = nullptr;
 }
 
 
diff --git a/src/codecs/tqbig5codec.cpp b/src/codecs/tqbig5codec.cpp
index 09db78800..b1d8de897 100644
--- a/src/codecs/tqbig5codec.cpp
+++ b/src/codecs/tqbig5codec.cpp
@@ -11709,7 +11709,7 @@ static const Summary16 big5hkscs_uni2index_page2f8[30] = {
 
 int qt_UnicodeToBig5hkscs (uint wc, uchar *r)
 {
-    const Summary16 *summary = NULL;
+    const Summary16 *summary = nullptr;
     if (wc < 0x80) {
 	r[0] = (uchar) wc;
 	return 1;
diff --git a/src/kernel/tqaccessible.cpp b/src/kernel/tqaccessible.cpp
index 53caf49e8..02833d7e3 100644
--- a/src/kernel/tqaccessible.cpp
+++ b/src/kernel/tqaccessible.cpp
@@ -336,7 +336,7 @@ TQObject *TQAccessible::queryAccessibleObject(TQAccessibleInterface *o)
 		return (TQObject*)it.currentKey();
 	}
     }
-    return NULL;
+    return nullptr;
 }
 #endif
 
diff --git a/src/kernel/tqapplication.cpp b/src/kernel/tqapplication.cpp
index 1564b18aa..d708eac95 100644
--- a/src/kernel/tqapplication.cpp
+++ b/src/kernel/tqapplication.cpp
@@ -401,7 +401,7 @@ TQEventLoop* TQApplication::currentEventLoop() {
 			return thread->d->eventLoop;
 		}
 	}
-	return NULL;
+	return nullptr;
 #else
 	return TQApplication::eventloop;
 #endif
@@ -558,7 +558,7 @@ public:
         // of the application (even if TQCoreApplication goes away)
         d->running = true;
         d->finished = false;
-        d->eventLoop = NULL;
+        d->eventLoop = nullptr;
     }
 
     inline ~TQCoreApplicationThread()
diff --git a/src/kernel/tqapplication_x11.cpp b/src/kernel/tqapplication_x11.cpp
index 736eb3606..08603d96c 100644
--- a/src/kernel/tqapplication_x11.cpp
+++ b/src/kernel/tqapplication_x11.cpp
@@ -376,8 +376,8 @@ int tqt_xfocusout_grab_counter = 0;
 const int INVALID_EVENT = -1;
 const int TOTAL_XINPUT_EVENTS = 7;
 
-XDevice *devStylus = NULL;
-XDevice *devEraser = NULL;
+XDevice *devStylus = nullptr;
+XDevice *devEraser = nullptr;
 XEventClass event_list_stylus[TOTAL_XINPUT_EVENTS];
 XEventClass event_list_eraser[TOTAL_XINPUT_EVENTS];
 
@@ -2278,11 +2278,11 @@ void tqt_init_internal( int *argcptr, char **argv,
 	const TQString XFREENAMEERASER = "eraser";
 
 	devices = XListInputDevices( appDpy, &ndev);
-	if ( devices == NULL ) {
+	if ( !devices ) {
 	    tqWarning( "Failed to get list of devices" );
 	    ndev = -1;
 	}
-	dev = NULL;
+	dev = nullptr;
 	for ( devs = devices, i = 0; i < ndev; i++, devs++ ) {
 	    gotEraser = false;
 	    TQString devName = devs->name;
@@ -2305,7 +2305,7 @@ void tqt_init_internal( int *argcptr, char **argv,
 		    dev = devEraser;
 		    ev_class = event_list_eraser;
 		}
-		if ( dev == NULL ) {
+		if ( !dev ) {
 		    tqWarning( "Failed to open device" );
 		} else {
 		    if ( dev->num_classes > 0 ) {
@@ -2361,7 +2361,7 @@ void tqt_init_internal( int *argcptr, char **argv,
 		}
 		// at this point we are assuming there is only one
 		// wacom device...
-		    if ( devStylus != NULL && devEraser != NULL ) {
+		    if ( devStylus && devEraser ) {
 			break;
 		    }
 		}
@@ -2487,9 +2487,9 @@ void tqt_cleanup()
 #endif
 
 #if defined (QT_TABLET_SUPPORT)
-    if ( devStylus != NULL )
+    if ( devStylus )
 	XCloseDevice( appDpy, devStylus );
-    if ( devEraser != NULL )
+    if ( devEraser )
 	XCloseDevice( appDpy, devEraser );
 #endif
 
diff --git a/src/kernel/tqclipboard_x11.cpp b/src/kernel/tqclipboard_x11.cpp
index 0e7796506..87ea4041a 100644
--- a/src/kernel/tqclipboard_x11.cpp
+++ b/src/kernel/tqclipboard_x11.cpp
@@ -528,8 +528,8 @@ bool tqt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
         if( tqt_qclipboard_bailout_hack ) {
             XEvent dummy;
             selection_request_pending = false;
-            if ( owner != NULL )
-                XCheckIfEvent(dpy,&dummy,check_selection_request_pending,NULL);
+            if ( owner )
+                XCheckIfEvent(dpy,&dummy,check_selection_request_pending,nullptr);
             if( selection_request_pending )
 	        return true;
         }
@@ -822,12 +822,12 @@ static Atom send_string_selection(TQClipboardData *d, Atom target, Window window
 	TQByteArray data = d->source()->encodedData("text/plain");
 	if(data.resize(data.size() + 1))
 	    data[int(data.size() - 1)] = '\0';
-	char *list[] = { data.data(), NULL };
+	char *list[] = { data.data(), nullptr };
 
 	XICCEncodingStyle style =
 	    (target == xa_compound_text) ? XCompoundTextStyle : XStdICCTextStyle;
 	XTextProperty textprop;
-	if (list[0] != NULL
+	if (list[0]
 	    && XmbTextListToTextProperty(TQPaintDevice::x11AppDisplay(),
 					 list, 1, style, &textprop) == Success) {
 	    TQDEBUG("    textprop type %lx\n"
diff --git a/src/kernel/tqdnd_x11.cpp b/src/kernel/tqdnd_x11.cpp
index fcddda85e..a538c02f3 100644
--- a/src/kernel/tqdnd_x11.cpp
+++ b/src/kernel/tqdnd_x11.cpp
@@ -956,7 +956,7 @@ bool tqt_xdnd_another_movement()
     tqt_xdnd_was_move = false;
     tqt_xdnd_found = false;
     XEvent dummy;
-    XCheckIfEvent( tqt_xdisplay(), &dummy, tqt_xdnd_predicate, NULL );
+    XCheckIfEvent( tqt_xdisplay(), &dummy, tqt_xdnd_predicate, nullptr );
     return tqt_xdnd_was_move;
 }
 
diff --git a/src/kernel/tqdragobject.cpp b/src/kernel/tqdragobject.cpp
index 9444caf8b..73816323d 100644
--- a/src/kernel/tqdragobject.cpp
+++ b/src/kernel/tqdragobject.cpp
@@ -1599,7 +1599,7 @@ TQString TQUriDrag::uriToLocalFile(const char* uri)
     if ( !local && uri[0] == '/' && uri[2] != '/' ) {
 	// then move the pointer to after the 'hostname/' part of the uri
 	const char* hostname_end = strchr( uri+1, '/' );
-	if ( hostname_end != NULL ) {
+	if ( hostname_end ) {
 	    char hostname[ 257 ];
 	    if ( gethostname( hostname, 255 ) == 0 ) {
 		hostname[ 256 ] = '\0';
diff --git a/src/kernel/tqeventloop_x11_glib.cpp b/src/kernel/tqeventloop_x11_glib.cpp
index 4dd8fad58..d8331c6bb 100644
--- a/src/kernel/tqeventloop_x11_glib.cpp
+++ b/src/kernel/tqeventloop_x11_glib.cpp
@@ -73,9 +73,9 @@ static GSourceFuncs tqt_gsource_funcs = {
 	tqt_gsource_prepare,
 	tqt_gsource_check,
 	tqt_gsource_dispatch,
-	NULL,
-	NULL,
-	NULL
+	nullptr,
+	nullptr,
+	nullptr
 };
 
 // forward main loop callbacks to TQEventLoop methods!
diff --git a/src/kernel/tqfontdatabase.cpp b/src/kernel/tqfontdatabase.cpp
index 55a191583..502d150b1 100644
--- a/src/kernel/tqfontdatabase.cpp
+++ b/src/kernel/tqfontdatabase.cpp
@@ -688,7 +688,7 @@ static TQtFontStyle *bestStyle(TQtFontFoundry *foundry, const TQtFontStyle::Key
 
     FM_DEBUG( "          best style has distance 0x%x", dist );
     if (!foundry->count) {
-        TQtFontStyle *temp = NULL;
+        TQtFontStyle *temp = nullptr;
         return temp;
     }
     return foundry->styles[best];
@@ -966,7 +966,7 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp,
     if (script == TQFont::Han) {
         // modify script according to locale
         static TQFont::Script defaultHan;
-        TQCString locale = setlocale(LC_ALL, NULL);
+        TQCString locale = setlocale(LC_ALL, nullptr);
 
         if (locale.contains("ko"))
             defaultHan = TQFont::Han_Korean;
diff --git a/src/kernel/tqfontengine_p.h b/src/kernel/tqfontengine_p.h
index 428866ba7..b05b3386d 100644
--- a/src/kernel/tqfontengine_p.h
+++ b/src/kernel/tqfontengine_p.h
@@ -515,7 +515,7 @@ public:
 
     enum { WIDTH=0x01, DRAW=0x02, EXISTS=0x04 };
     int doTextTask(const TQChar *s, int pos, int use_len, int len, uchar task, int =-1, int y=-1,
-		   TQPaintDevice *dev=NULL, const TQRegion *rgn=NULL) const;
+		   TQPaintDevice *dev=nullptr, const TQRegion *rgn=nullptr) const;
 };
 
 #elif defined( TQ_WS_WIN )
diff --git a/src/kernel/tqjpegio.cpp b/src/kernel/tqjpegio.cpp
index 9e467e1bb..c16f0f68f 100644
--- a/src/kernel/tqjpegio.cpp
+++ b/src/kernel/tqjpegio.cpp
@@ -225,9 +225,9 @@ void read_jpeg_image(TQImageIO* iio)
 
 	    // Create TQImage's without allocating the data
 	    if ( cinfo.output_components == 3 || cinfo.output_components == 4) {
-		image = TQImage( NULL, cinfo.output_width, cinfo.output_height, 32, NULL, 0, TQImage::IgnoreEndian );
+		image = TQImage( nullptr, cinfo.output_width, cinfo.output_height, 32, nullptr, 0, TQImage::IgnoreEndian );
 	    } else if ( cinfo.output_components == 1 ) {
-		image = TQImage( NULL, cinfo.output_width, cinfo.output_height, 8, NULL, 0, TQImage::IgnoreEndian );
+		image = TQImage( nullptr, cinfo.output_width, cinfo.output_height, 8, nullptr, 0, TQImage::IgnoreEndian );
 	    } else {
 		// Unsupported format
 	    }
diff --git a/src/kernel/tqobject.cpp b/src/kernel/tqobject.cpp
index 58c3e1af7..8d3e248ef 100644
--- a/src/kernel/tqobject.cpp
+++ b/src/kernel/tqobject.cpp
@@ -98,12 +98,12 @@ public:
 #ifndef TQT_NO_USERDATA
     TQObjectPrivate( uint s ) : TQPtrVector<TQObjectUserData>(s) {
 #ifdef TQT_THREAD_SUPPORT
-        ownThread = NULL;
+        ownThread = nullptr;
         disableThreadPostedEvents = false;
 #endif
         setAutoDelete( true );
-        controlElementData = NULL;
-        controlElementDataPrivate = NULL;
+        controlElementData = nullptr;
+        controlElementDataPrivate = nullptr;
     }
     ~TQObjectPrivate() {
         delete controlElementData;
@@ -2865,7 +2865,7 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o )
 	        sol->listMutex->unlock();
 #endif // TQT_THREAD_SUPPORT
 		delete sol;
-		sol = NULL;
+		sol = nullptr;
 	    }
 	}
 #ifdef TQT_THREAD_SUPPORT
@@ -2940,7 +2940,7 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o )
 		    sol->listMutex->unlock();
 #endif // TQT_THREAD_SUPPORT
 		    delete sol;
-		    sol = NULL;
+		    sol = nullptr;
 		}
 	    }
 #ifdef TQT_THREAD_SUPPORT
diff --git a/src/kernel/tqpainter.h b/src/kernel/tqpainter.h
index 651b159e9..b7ad045bf 100644
--- a/src/kernel/tqpainter.h
+++ b/src/kernel/tqpainter.h
@@ -394,7 +394,7 @@ protected:
     uint	clip_serial;			// clipping serial number
 #elif defined(TQ_WS_MAC)
     TQt::HANDLE	hd;				// handle to drawable
-    void initPaintDevice(bool force=false, TQPoint *off=NULL, TQRegion *rgn=NULL);
+    void initPaintDevice(bool force=false, TQPoint *off=nullptr, TQRegion *rgn=nullptr);
     friend const TQRegion &tqt_mac_update_painter(TQPainter *, bool);
     friend class TQFontEngineMac;
     friend class TQMacPainter;
diff --git a/src/kernel/tqpixmap_x11.cpp b/src/kernel/tqpixmap_x11.cpp
index 28a182e20..78b8d3888 100644
--- a/src/kernel/tqpixmap_x11.cpp
+++ b/src/kernel/tqpixmap_x11.cpp
@@ -203,7 +203,7 @@ static XImage* tqt_XShmCreateImage( Display* dpy, Visual* visual, unsigned int d
     int /*bitmap_pad*/, int /*bytes_per_line*/, XShmSegmentInfo* shminfo )
 {
     if( width * height * depth < 100*100*32 )
-        return NULL;
+        return nullptr;
     static int shm_inited = -1;
     if( shm_inited == -1 ) {
         if( XShmQueryExtension( dpy ))
@@ -212,23 +212,23 @@ static XImage* tqt_XShmCreateImage( Display* dpy, Visual* visual, unsigned int d
             shm_inited = 0;
     }
     if( shm_inited == 0 )
-        return NULL;
-    XImage* xi = XShmCreateImage( dpy, visual, depth, format, NULL, shminfo, width,
+        return nullptr;
+    XImage* xi = XShmCreateImage( dpy, visual, depth, format, nullptr, shminfo, width,
         height );
-    if( xi == NULL )
-        return NULL;
+    if( !xi )
+        return nullptr;
     shminfo->shmid = shmget( IPC_PRIVATE, xi->bytes_per_line * xi->height,
         IPC_CREAT|0600);
     if( shminfo->shmid < 0 ) {
         XDestroyImage( xi );
-        return NULL;
+        return nullptr;
     }
     shminfo->readOnly = False;
     shminfo->shmaddr = (char*)shmat( shminfo->shmid, 0, 0 );
     if( shminfo->shmaddr == (char*)-1 ) {
         XDestroyImage( xi );
         shmctl( shminfo->shmid, IPC_RMID, 0 );
-        return NULL;
+        return nullptr;
     }
     xi->data = shminfo->shmaddr;
 #ifndef QT_MITSHM_RMID_IGNORES_REFCOUNT
@@ -249,7 +249,7 @@ static XImage* tqt_XShmCreateImage( Display* dpy, Visual* visual, unsigned int d
 #ifdef QT_MITSHM_RMID_IGNORES_REFCOUNT
             shmctl( shminfo->shmid, IPC_RMID, 0 );
 #endif    
-            return NULL;
+            return nullptr;
         }
     } else
         XShmAttach( dpy, shminfo );
@@ -271,11 +271,11 @@ static XImage* tqt_XShmGetImage( const TQPixmap* pix, int format,
 {
     XImage* xi = tqt_XShmCreateImage( pix->x11Display(), (Visual*)pix->x11Visual(),
         pix->depth(), format, 0, 0, pix->width(), pix->height(), 32, 0, shminfo );
-    if( xi == NULL )
-        return NULL;
+    if( !xi )
+        return nullptr;
     if( XShmGetImage( pix->x11Display(), pix->handle(), xi, 0, 0, AllPlanes ) == False ) {
         tqt_XShmDestroyImage( xi, shminfo );
-        return NULL;
+        return nullptr;
     }
     return xi;
 }
@@ -1271,7 +1271,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
 
 #ifdef QT_MITSHM_CONVERSIONS
 	xi = tqt_XShmCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0, &shminfo );
-	if( xi != NULL ) {
+	if( xi ) {
 	    mitshm_ximage = true;
 	    newbits = (uchar*)xi->data;
 	}
@@ -1280,7 +1280,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
 	xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 );
         if (!xi)
             return false;
-	if( newbits == NULL )
+	if( !newbits )
 	newbits = (uchar *)malloc( xi->bytes_per_line*h );
 	TQ_CHECK_PTR( newbits );
 	if ( !newbits )				// no memory
@@ -1730,7 +1730,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
     if ( !xi ) {				// X image not created
 #ifdef QT_MITSHM_CONVERSIONS
         xi = tqt_XShmCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0, &shminfo );
-        if( xi != NULL )
+        if( xi )
             mitshm_ximage = true;
         else
 #endif
@@ -1813,7 +1813,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
     data->h = h;
     data->d = dd;
 
-    XImage* axi = NULL;
+    XImage* axi = nullptr;
 #ifdef QT_MITSHM_CONVERSIONS
     bool mitshm_aximage = false;
     XShmSegmentInfo ashminfo;
@@ -1856,7 +1856,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
 #ifdef QT_MITSHM_CONVERSIONS
 	    axi = tqt_XShmCreateImage( x11Display(), (Visual*)x11Visual(),
 		    8, ZPixmap, 0, 0, w, h, 8, 0, &ashminfo );
-	    if( axi != NULL )
+	    if( axi )
 		mitshm_aximage = true;
 	    else
 #endif
@@ -1864,7 +1864,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
 				       8, ZPixmap, 0, 0, w, h, 8, 0);
 
 	    if (axi) {
-		if( axi->data==NULL ) {
+		if( !axi->data ) {
 		// the data is deleted by qSafeXDestroyImage
                 axi->data = (char *) malloc(h * axi->bytes_per_line);
 		TQ_CHECK_PTR( axi->data );
diff --git a/src/kernel/tqpngio.cpp b/src/kernel/tqpngio.cpp
index 998bdf11b..6da20c0e4 100644
--- a/src/kernel/tqpngio.cpp
+++ b/src/kernel/tqpngio.cpp
@@ -130,15 +130,15 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc
 	0, 0, 0);
 
 #if PNG_LIBPNG_VER>=10500
-    png_colorp info_ptr_palette = NULL;
+    png_colorp info_ptr_palette = nullptr;
     int info_ptr_num_palette = 0;
     if (png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE)) {
 	png_get_PLTE(png_ptr, info_ptr, &info_ptr_palette, &info_ptr_num_palette);
     }
 
-    png_bytep info_ptr_trans_alpha = NULL;
+    png_bytep info_ptr_trans_alpha = nullptr;
     int info_ptr_num_trans = 0;
-    png_color_16p info_ptr_trans_color = NULL;
+    png_color_16p info_ptr_trans_color = nullptr;
 
     if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
 	png_get_tRNS(png_ptr, info_ptr, &info_ptr_trans_alpha, &info_ptr_num_trans, &info_ptr_trans_color);
@@ -602,7 +602,7 @@ bool TQPNGImageWriter::writeImage(const TQImage& image, int quality_in, int off_
 	int* trans = new int[num_palette];
 	int num_trans = 0;
 #if PNG_LIBPNG_VER>=10500
-	png_colorp info_ptr_palette = NULL;
+	png_colorp info_ptr_palette = nullptr;
 	int tmp;
 	png_get_PLTE(png_ptr, info_ptr, &info_ptr_palette, &tmp);
 #endif /* LIBPNG 1.5 */
diff --git a/src/kernel/tqprocess_unix.cpp b/src/kernel/tqprocess_unix.cpp
index 2d4057751..2d0c60c84 100644
--- a/src/kernel/tqprocess_unix.cpp
+++ b/src/kernel/tqprocess_unix.cpp
@@ -243,7 +243,7 @@ int qnx6SocketPairReplacement (int socketFD[2]) {
 	if (errno != EINPROGRESS) { BAILOUT };
 
     // Accept connection
-    socketFD[0] = accept(tmpSocket, (struct sockaddr *)NULL, (size_t *)NULL);
+    socketFD[0] = accept(tmpSocket, (struct sockaddr *)nullptr, (size_t *)nullptr);
     if(socketFD[0] == -1) { BAILOUT };
 
     // We're done
diff --git a/src/kernel/tqpsprinter.cpp b/src/kernel/tqpsprinter.cpp
index d5dc4aee5..fd78c64b9 100644
--- a/src/kernel/tqpsprinter.cpp
+++ b/src/kernel/tqpsprinter.cpp
@@ -2538,7 +2538,7 @@ void TQPSPrinterFontTTF::download(TQTextStream& s,bool global)
         s << "%!PS-Adobe-3.0 Resource-Font\n";
     }     /* See RBIIp 641 */
 
-    if( Copyright != (char*)NULL ) {
+    if( Copyright ) {
         s << wrapDSC( "%%Copyright: " + Copyright );
     }
 
@@ -3770,7 +3770,7 @@ void TQPSPrinterFontTTF::subsetGlyph(int charindex,bool* glyphset)
 
   /* If the character is blank, it has no bounding box, */
   /* otherwise read the bounding box. */
-  if( glyph == (BYTE*)NULL ) {
+  if( !glyph ) {
     cd.num_ctr=0;
   } else {
     cd.num_ctr = getSHORT(glyph);
@@ -3949,7 +3949,7 @@ BYTE* TQPSPrinterFontTTF::charprocFindGlyphData(int charindex)
   if(length > 0)
     return glyf_table + off;
   else
-    return (BYTE*)NULL;
+    return (BYTE*)nullptr;
 }
 
 void TQPSPrinterFontTTF::charproc(int charindex, TQTextStream& s, bool *glyphSet )
@@ -3969,7 +3969,7 @@ void TQPSPrinterFontTTF::charproc(int charindex, TQTextStream& s, bool *glyphSet
 
   /* If the character is blank, it has no bounding box, */
   /* otherwise read the bounding box. */
-  if( glyph == (BYTE*)NULL ) {
+  if( !glyph ) {
     llx=lly=urx=ury=0;  /* A blank char has an all zero BoundingBox */
     cd.num_ctr=0;               /* Set this for later if()s */
   } else {
@@ -4055,7 +4055,7 @@ TQPSPrinterFontPFA::TQPSPrinterFontPFA(const TQFontEngine *f, TQByteArray& d)
   }
 
   char* fontnameptr = strstr(p+pos,"/FontName");
-  if (fontnameptr == NULL)
+  if (!fontnameptr)
     return;
 
   fontnameptr += strlen("/FontName") + 1;
@@ -4122,7 +4122,7 @@ TQPSPrinterFontPFB::TQPSPrinterFontPFB(const TQFontEngine *f, TQByteArray& d)
   //printf("font block type %d len %d\n",typ,len);
 
   char* fontnameptr = strstr((char*)p+pos,"/FontName");
-  if (fontnameptr == NULL)
+  if (!fontnameptr)
     return;
 
   fontnameptr += strlen("/FontName") + 1;
diff --git a/src/kernel/tqregion_x11.cpp b/src/kernel/tqregion_x11.cpp
index 0df69dd44..604adbf03 100644
--- a/src/kernel/tqregion_x11.cpp
+++ b/src/kernel/tqregion_x11.cpp
@@ -482,7 +482,7 @@ IntersectRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, TQRegionPrivate *n
         newReg->numRects = 0;
     else
 	miRegionOp (newReg, reg1, reg2,
-    		(voidProcp) miIntersectO, (voidProcp) NULL, (voidProcp) NULL);
+    		(voidProcp) miIntersectO, (voidProcp) nullptr, (voidProcp) nullptr);
 
     /*
      * Can't alter newReg's extents before we call miRegionOp because
@@ -794,7 +794,7 @@ miRegionOp(TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPrivate *reg2
 	    top = TQMAX(r1->top(),ybot+1);
 	    bot = TQMIN(r1->bottom(),r2->top()-1);
 
-	    if ((nonOverlap1Func != (voidProcp)NULL) && bot >= top)
+	    if (nonOverlap1Func && bot >= top)
 	    {
 		(* nonOverlap1Func) (newReg, r1, r1BandEnd, top, bot);
 	    }
@@ -806,7 +806,7 @@ miRegionOp(TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPrivate *reg2
 	    top = TQMAX(r2->top(),ybot+1);
 	    bot = TQMIN(r2->bottom(),r1->top()-1);
 
-	    if ((nonOverlap2Func != (voidProcp)NULL) && bot >= top)
+	    if (nonOverlap2Func && bot >= top)
 	    {
 		(* nonOverlap2Func) (newReg, r2, r2BandEnd, top, bot);
 	    }
@@ -866,7 +866,7 @@ miRegionOp(TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPrivate *reg2
     curBand = newReg->numRects;
     if (r1 != r1End)
     {
-	if (nonOverlap1Func != (voidProcp)NULL)
+	if (nonOverlap1Func)
 	{
 	    do
 	    {
@@ -881,7 +881,7 @@ miRegionOp(TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPrivate *reg2
 	    } while (r1 != r1End);
 	}
     }
-    else if ((r2 != r2End) && (nonOverlap2Func != (voidProcp)NULL))
+    else if ((r2 != r2End) && nonOverlap2Func)
     {
 	do
 	{
@@ -1296,7 +1296,7 @@ static void SubtractRegion(TQRegionPrivate *regM, TQRegionPrivate *regS, TQRegio
     }
 
     miRegionOp (regD, regM, regS, (voidProcp) miSubtractO,
-    		(voidProcp) miSubtractNonO1, (voidProcp) NULL);
+    		(voidProcp) miSubtractNonO1, (voidProcp) nullptr);
 
     /*
      * Can't alter newReg's extents before we call miRegionOp because
@@ -1825,14 +1825,14 @@ InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
             tmpSLLBlock =
 		  (ScanLineListBlock *)malloc(sizeof(ScanLineListBlock));
             (*SLLBlock)->next = tmpSLLBlock;
-            tmpSLLBlock->next = (ScanLineListBlock *)NULL;
+            tmpSLLBlock->next = (ScanLineListBlock *)nullptr;
             *SLLBlock = tmpSLLBlock;
             *iSLLBlock = 0;
         }
         pSLL = &((*SLLBlock)->SLLs[(*iSLLBlock)++]);
 
         pSLL->next = pPrevSLL->next;
-        pSLL->edgelist = (EdgeTableEntry *)NULL;
+        pSLL->edgelist = (EdgeTableEntry *)nullptr;
         pPrevSLL->next = pSLL;
     }
     pSLL->scanline = scanline;
@@ -1840,7 +1840,7 @@ InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
     /*
      * now insert the edge in the right bucket
      */
-    prev = (EdgeTableEntry *)NULL;
+    prev = (EdgeTableEntry *)nullptr;
     start = pSLL->edgelist;
     while (start && (start->bres.minor_axis < ETE->bres.minor_axis))
     {
@@ -1895,18 +1895,18 @@ CreateETandAET(int count, TQPoint *pts,
     /*
      *  initialize the Active Edge Table
      */
-    AET->next = (EdgeTableEntry *)NULL;
-    AET->back = (EdgeTableEntry *)NULL;
-    AET->nextWETE = (EdgeTableEntry *)NULL;
+    AET->next = (EdgeTableEntry *)nullptr;
+    AET->back = (EdgeTableEntry *)nullptr;
+    AET->nextWETE = (EdgeTableEntry *)nullptr;
     AET->bres.minor_axis = SMALL_COORDINATE;
 
     /*
      *  initialize the Edge Table.
      */
-    ET->scanlines.next = (ScanLineList *)NULL;
+    ET->scanlines.next = (ScanLineList *)nullptr;
     ET->ymax = SMALL_COORDINATE;
     ET->ymin = LARGE_COORDINATE;
-    pSLLBlock->next = (ScanLineListBlock *)NULL;
+    pSLLBlock->next = (ScanLineListBlock *)nullptr;
 
     PrevPt = &pts[count-1];
 
@@ -2022,7 +2022,7 @@ computeWAET(EdgeTableEntry *AET)
     int inside = 1;
     int isInside = 0;
 
-    AET->nextWETE = (EdgeTableEntry *)NULL;
+    AET->nextWETE = (EdgeTableEntry *)nullptr;
     pWETE = AET;
     AET = AET->next;
     while (AET)
@@ -2041,7 +2041,7 @@ computeWAET(EdgeTableEntry *AET)
         }
         AET = AET->next;
     }
-    pWETE->nextWETE = (EdgeTableEntry *)NULL;
+    pWETE->nextWETE = (EdgeTableEntry *)nullptr;
 }
 
 /*
@@ -2244,7 +2244,7 @@ static TQRegionPrivate *PolygonRegion(TQPoint *Pts, int Count, int rule)
              *  Add a new edge to the active edge table when we
              *  get to the next edge.
              */
-            if (pSLL != NULL && y == pSLL->scanline) {
+            if (pSLL && y == pSLL->scanline) {
                 loadAET(&AET, pSLL->edgelist);
                 pSLL = pSLL->next;
             }
@@ -2283,7 +2283,7 @@ static TQRegionPrivate *PolygonRegion(TQPoint *Pts, int Count, int rule)
              *  Add a new edge to the active edge table when we
              *  get to the next edge.
              */
-            if (pSLL != NULL && y == pSLL->scanline) {
+            if (pSLL && y == pSLL->scanline) {
                 loadAET(&AET, pSLL->edgelist);
                 computeWAET(&AET);
                 pSLL = pSLL->next;
diff --git a/src/kernel/tqsound_x11.cpp b/src/kernel/tqsound_x11.cpp
index 471ca34f2..25253a00a 100644
--- a/src/kernel/tqsound_x11.cpp
+++ b/src/kernel/tqsound_x11.cpp
@@ -70,7 +70,7 @@ public:
     {
 	if ( nas ) {
 	    AuSync(nas, false);
-	    AuDestroyBucket(nas, id, NULL);
+	    AuDestroyBucket(nas, id, nullptr);
 
 	    AuEvent ev;
 	    while (AuScanEvents(nas, AuEventsQueuedAfterFlush, true, eventPred, &flow, &ev))
@@ -114,9 +114,9 @@ private:
 TQAuServerNAS::TQAuServerNAS(TQObject* parent) :
     TQAuServer(parent,"Network Audio System")
 {
-    nas = AuOpenServer(NULL, 0, NULL, 0, NULL, NULL);
+    nas = AuOpenServer(nullptr, 0, nullptr, 0, nullptr, nullptr);
     if (nas) {
-	AuSetCloseDownMode(nas, AuCloseDownDestroy, NULL);
+	AuSetCloseDownMode(nas, AuCloseDownDestroy, nullptr);
 	// Ask TQt for async messages...
 	sn=new TQSocketNotifier(AuServerConnectionNumber(nas),
 		TQSocketNotifier::Read);
@@ -151,7 +151,7 @@ void TQAuServerNAS::play(const TQString& filename)
     if (nas) {
 	int iv=100;
 	AuFixedPoint volume=AuFixedPointFromFraction(iv,100);
-	AuSoundPlayFromFile(nas, filename, AuNone, volume, NULL, NULL, NULL, NULL, NULL, NULL);
+	AuSoundPlayFromFile(nas, filename, AuNone, volume, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr);
 	AuFlush(nas);
 	dataReceived();
 	AuFlush(nas);
@@ -201,7 +201,7 @@ void TQAuServerNAS::play(TQSound* s)
 	AuFixedPoint volume=AuFixedPointFromFraction(iv,100);
         TQAuBucketNAS *b = bucket(s);
         AuSoundPlayFromBucket(nas, b->id, AuNone, volume,
-                              callback, s, 0, &b->flow, NULL, NULL, NULL);
+                              callback, s, 0, &b->flow, nullptr, nullptr, nullptr);
 	AuFlush(nas);
 	dataReceived();
 	AuFlush(nas);
@@ -213,7 +213,7 @@ void TQAuServerNAS::stop(TQSound* s)
 {
     if (nas && !bucket(s)->stopped) {
 	bucket(s)->stopped = true;
-        AuStopFlow(nas, bucket(s)->flow, NULL);
+        AuStopFlow(nas, bucket(s)->flow, nullptr);
         AuFlush(nas);
 	dataReceived();
 	AuFlush(nas);
@@ -229,7 +229,7 @@ void TQAuServerNAS::init(TQSound* s)
     if ( nas ) {
         AuBucketID b_id =
             AuSoundCreateBucketFromFile(nas, s->fileName(),
-                                        0 /*AuAccessAllMasks*/, NULL, NULL);
+                                        0 /*AuAccessAllMasks*/, nullptr, nullptr);
 	setBucket(s, new TQAuBucketNAS(b_id));
     }
 }
diff --git a/src/kernel/tqstyle.cpp b/src/kernel/tqstyle.cpp
index ccf8fb66f..fdbf74091 100644
--- a/src/kernel/tqstyle.cpp
+++ b/src/kernel/tqstyle.cpp
@@ -64,109 +64,109 @@ public:
 
 TQStyleOption::TQStyleOption(StyleOptionDefault) :
 	def(true),
-	tb(NULL),
+	tb(nullptr),
 	i1(-1),
 	i2(-1),
 	i3(-1),
 	i4(-1),
 	i5(-1),
-	cli(NULL),
-	tbh(NULL) {
+	cli(nullptr),
+	tbh(nullptr) {
 	//
 }
 
 TQStyleOption::TQStyleOption(int in1) :
 	def(false),
-	tb(NULL),
+	tb(nullptr),
 	i1(in1),
 	i2(-1),
 	i3(-1),
 	i4(-1),
 	i5(-1),
-	cli(NULL),
-	tbh(NULL) {
+	cli(nullptr),
+	tbh(nullptr) {
 	//
 }
 
 TQStyleOption::TQStyleOption(int in1, int in2) :
 	def(false),
-	tb(NULL),
+	tb(nullptr),
 	i1(in1),
 	i2(in2),
 	i3(-1),
 	i4(-1),
 	i5(-1),
-	cli(NULL),
-	tbh(NULL) {
+	cli(nullptr),
+	tbh(nullptr) {
 	//
 }
 
 TQStyleOption::TQStyleOption(int in1, int in2, int in3, int in4) :
 	def(false),
-	tb(NULL),
+	tb(nullptr),
 	i1(in1),
 	i2(in2),
 	i3(in3),
 	i4(in4),
 	i5(-1),
-	cli(NULL),
-	tbh(NULL) {
+	cli(nullptr),
+	tbh(nullptr) {
 	//
 }
 
 TQStyleOption::TQStyleOption(TQMenuItem* m) :
 	def(false),
 	mi(m),
-	tb(NULL),
+	tb(nullptr),
 	i1(-1),
 	i2(-1),
 	i3(-1),
 	i4(-1),
 	i5(-1),
-	cli(NULL),
-	tbh(NULL) {
+	cli(nullptr),
+	tbh(nullptr) {
 	//
 }
 
 TQStyleOption::TQStyleOption(TQMenuItem* m, int in1) :
 	def(false),
 	mi(m),
-	tb(NULL),
+	tb(nullptr),
 	i1(in1),
 	i2(-1),
 	i3(-1),
 	i4(-1),
 	i5(-1),
-	cli(NULL),
-	tbh(NULL) {
+	cli(nullptr),
+	tbh(nullptr) {
 	//
 }
 
 TQStyleOption::TQStyleOption(TQMenuItem* m, int in1, int in2) :
 	def(false),
 	mi(m),
-	tb(NULL),
+	tb(nullptr),
 	i1(in1),
 	i2(in2),
 	i3(-1),
 	i4(-1),
 	i5(-1),
-	cli(NULL),
-	tbh(NULL) {
+	cli(nullptr),
+	tbh(nullptr) {
 	//
 }
 
 TQStyleOption::TQStyleOption(const TQColor& c) :
 	def(false),
-	tb(NULL),
+	tb(nullptr),
 	cl(&c),
 	i1(-1),
 	i2(-1),
 	i3(-1),
 	i4(-1),
 	i5(-1),
-	cli(NULL),
-	tbh(NULL) {
+	cli(nullptr),
+	tbh(nullptr) {
 	//
 }
 
@@ -178,75 +178,75 @@ TQStyleOption::TQStyleOption(TQTab* t) :
 	i3(-1),
 	i4(-1),
 	i5(-1),
-	cli(NULL),
-	tbh(NULL) {
+	cli(nullptr),
+	tbh(nullptr) {
 	//
 }
 
 TQStyleOption::TQStyleOption(TQListViewItem* i) :
 	def(false),
-	tb(NULL),
+	tb(nullptr),
 	li(i),
 	i1(-1),
 	i2(-1),
 	i3(-1),
 	i4(-1),
 	i5(-1),
-	cli(NULL),
-	tbh(NULL) {
+	cli(nullptr),
+	tbh(nullptr) {
 	//
 }
 
 TQStyleOption::TQStyleOption(TQCheckListItem* i) :
 	def(false),
-	tb(NULL),
+	tb(nullptr),
 	i1(-1),
 	i2(-1),
 	i3(-1),
 	i4(-1),
 	i5(-1),
 	cli(i),
-	tbh(NULL) {
+	tbh(nullptr) {
 	//
 }
 
 TQStyleOption::TQStyleOption(TQt::ArrowType a) :
 	def(false),
-	tb(NULL),
+	tb(nullptr),
 	i1((int)a),
 	i2(-1),
 	i3(-1),
 	i4(-1),
 	i5(-1),
-	cli(NULL),
-	tbh(NULL) {
+	cli(nullptr),
+	tbh(nullptr) {
 	//
 }
 
 TQStyleOption::TQStyleOption(const TQRect& r) :
 	def(false),
-	tb(NULL),
+	tb(nullptr),
 	i1(r.x()),
 	i2(r.y()),
 	i3(r.width()),
 	i4(r.height()),
 	i5(-1),
-	cli(NULL),
-	tbh(NULL) {
+	cli(nullptr),
+	tbh(nullptr) {
 	//
 }
 
 TQStyleOption::TQStyleOption(TQWidget *w) :
 	def(false),
-	tb(NULL),
+	tb(nullptr),
 	i1(-1),
 	i2(-1),
 	i3(-1),
 	i4(-1),
 	i5(-1),
-	cli(NULL),
+	cli(nullptr),
 	p1((void*)w),
-	tbh(NULL) {
+	tbh(nullptr) {
 	//
 }
 
@@ -588,10 +588,10 @@ TQStyleOption::TQStyleOption(TQWidget *w) :
 */
 TQStyle::TQStyle()
 {
-    m_eventHandlerInstallationHook = NULL;
-    m_eventHandlerRemovalHook = NULL;
-    m_widgetActionRequestHook = NULL;
-    m_applicationActionRequestHook = NULL;
+    m_eventHandlerInstallationHook = nullptr;
+    m_eventHandlerRemovalHook = nullptr;
+    m_widgetActionRequestHook = nullptr;
+    m_applicationActionRequestHook = nullptr;
     conditionalAcceleratorsEnabled = false;
     d = new TQStylePrivate;
 }
@@ -2559,7 +2559,7 @@ bool TQStyle::applicationActionRequest( const TQStyleControlElementData &ceData,
 }
 
 void TQStyle::acceleratorKeypressEventMonitor( TQObject *o, TQEvent *e ) {
-	if (styleHint(SH_HideUnderlineAcceleratorWhenAltUp, TQStyleControlElementData(), CEF_None, TQStyleOption::Default, NULL, NULL) != 0) {
+	if (styleHint(SH_HideUnderlineAcceleratorWhenAltUp, TQStyleControlElementData(), CEF_None, TQStyleOption::Default, nullptr, nullptr) != 0) {
 		TQWidget *widget = dynamic_cast<TQWidget*>(o);
 		if (widget) {
 			switch(e->type()) {
@@ -2586,7 +2586,7 @@ void TQStyle::acceleratorKeypressEventMonitor( TQObject *o, TQEvent *e ) {
 }
 
 bool TQStyle::acceleratorsShown() const {
-	if (styleHint(SH_HideUnderlineAcceleratorWhenAltUp, TQStyleControlElementData(), CEF_None, TQStyleOption::Default, NULL, NULL) != 0) {
+	if (styleHint(SH_HideUnderlineAcceleratorWhenAltUp, TQStyleControlElementData(), CEF_None, TQStyleOption::Default, nullptr, nullptr) != 0) {
 			return conditionalAcceleratorsEnabled;
 	}
 	else {
diff --git a/src/kernel/tqstyle.h b/src/kernel/tqstyle.h
index 54ea59cbe..ba0ea25ca 100644
--- a/src/kernel/tqstyle.h
+++ b/src/kernel/tqstyle.h
@@ -103,7 +103,7 @@ public:
     TQRect rect() const { return TQRect( i1, i2, i3, i4 ); }
     TQWidget* widget() const { return (TQWidget*)p1; }
 
-    TQStyleOption(TQTab* t, TQTab* h) : def(false), tb(t), cli(NULL), tbh(h) {}
+    TQStyleOption(TQTab* t, TQTab* h) : def(false), tb(t), cli(nullptr), tbh(h) {}
     TQTab* hoverTab() const { return tbh; }
 
 private:
diff --git a/src/kernel/tqthread_unix.cpp b/src/kernel/tqthread_unix.cpp
index 1c10d0780..81fe169ff 100644
--- a/src/kernel/tqthread_unix.cpp
+++ b/src/kernel/tqthread_unix.cpp
@@ -64,7 +64,7 @@ static pthread_once_t storage_key_once = PTHREAD_ONCE_INIT;
 static pthread_key_t storage_key;
 static void create_storage_key()
 {
-    pthread_key_create( &storage_key, NULL );
+    pthread_key_create( &storage_key, nullptr );
 }
 
 #if defined(Q_C_CALLBACKS)
@@ -84,7 +84,7 @@ void TQThreadInstance::setCurrentThread(TQThread *thread)
 
 TQThreadInstance *TQThreadInstance::current()
 {
-    TQThreadInstance *ret = NULL;
+    TQThreadInstance *ret = nullptr;
     pthread_once( &storage_key_once, create_storage_key );
     TQThread *thread = (TQThread *) pthread_getspecific( storage_key );
     if (thread) {
diff --git a/src/kernel/tqttdeintegration_x11.cpp b/src/kernel/tqttdeintegration_x11.cpp
index 48aeb0dc9..86e13a8b4 100644
--- a/src/kernel/tqttdeintegration_x11.cpp
+++ b/src/kernel/tqttdeintegration_x11.cpp
@@ -23,7 +23,7 @@ bool TQTDEIntegration::enabled()
 
 static TQCString findLibrary()
     {
-    if( getenv( "TQT_NO_TDE_INTEGRATION" ) == NULL
+    if( !getenv( "TQT_NO_TDE_INTEGRATION" )
         || getenv( "TQT_NO_TDE_INTEGRATION" )[ 0 ] == '0' )
         {
         return TQCString() + tqInstallPathPlugins() + "/integration/libtqttde";
@@ -33,12 +33,12 @@ static TQCString findLibrary()
 
 inline static long widgetToWinId( const TQWidget* w )
     {
-    return w != NULL ? w->winId() : 0;
+    return w ? w->winId() : 0;
     }
 
 inline static TQFont fontPtrToFontRef( const TQFont* f )
     {
-    return f != NULL ? *f : TQFont();
+    return f ? *f : TQFont();
     }
 
 // ---
@@ -74,7 +74,7 @@ void TQTDEIntegration::initLibrary()
             bool (*)( )
             )
             lib.resolve("initializeIntegration");
-        if( tqttde_initializeIntegration == NULL )
+        if( !tqttde_initializeIntegration )
             return;
         tqttde_getOpenFileNames = (
             TQStringList (*)( const TQString& filter, TQString* workingDirectory, long parent,
@@ -82,40 +82,40 @@ void TQTDEIntegration::initLibrary()
                 bool multiple )
             )
             lib.resolve("getOpenFileNames");
-        if( tqttde_getOpenFileNames == NULL )
+        if( !tqttde_getOpenFileNames )
             return;
         tqttde_getSaveFileName = (
             TQString (*)( const TQString& initialSelection, const TQString& filter, TQString* workingDirectory,
                 long parent, const TQCString& name, const TQString& caption, TQString* selectedFilter )
             )
             lib.resolve("getSaveFileName");
-        if( tqttde_getSaveFileName == NULL )
+        if( !tqttde_getSaveFileName )
             return;
         tqttde_getExistingDirectory = (
             TQString (*)( const TQString& initialDirectory, long parent, const TQCString& name,
                 const TQString& caption )
             )
             lib.resolve("getExistingDirectory");
-        if( tqttde_getExistingDirectory == NULL )
+        if( !tqttde_getExistingDirectory )
             return;
         tqttde_getColor = (
             TQColor (*)( const TQColor& color, long parent, const TQCString& name )
             )
             lib.resolve("getColor");
-        if( tqttde_getColor == NULL )
+        if( !tqttde_getColor )
             return;
         tqttde_getFont = (
             TQFont (*)( bool* ok, const TQFont& def, long parent, const TQCString& name )
             )
             lib.resolve("getFont");
-        if( tqttde_getFont == NULL )
+        if( !tqttde_getFont )
             return;
         tqttde_messageBox1 = (
             int (*)( int type, long parent, const TQString& caption, const TQString& text,
                 int button0, int button1, int button2 )
             )
             lib.resolve("messageBox1");
-        if( tqttde_messageBox1 == NULL )
+        if( !tqttde_messageBox1 )
             return;
         tqttde_messageBox2 = (
             int (*)( int type, long parent, const TQString& caption, const TQString& text,
@@ -123,7 +123,7 @@ void TQTDEIntegration::initLibrary()
                 int defaultButton, int escapeButton )
             )
             lib.resolve("messageBox2");
-        if( tqttde_messageBox2 == NULL )
+        if( !tqttde_messageBox2 )
             return;
         enable = tqttde_initializeIntegration();
         }
diff --git a/src/kernel/tqwidget.cpp b/src/kernel/tqwidget.cpp
index 15df9edea..683ab14f5 100644
--- a/src/kernel/tqwidget.cpp
+++ b/src/kernel/tqwidget.cpp
@@ -1187,7 +1187,7 @@ void TQWidget::createExtra()
 	extra->size_policy = TQSizePolicy( TQSizePolicy::Preferred,
 					  TQSizePolicy::Preferred );
 
-	extra->m_ceData = NULL;
+	extra->m_ceData = nullptr;
 
 	createSysExtra();
     }
@@ -3602,7 +3602,7 @@ bool TQWidget::isActiveWindow() const
     extra->m_ceData->widgetObjectTypes.clear();
     extra->m_ceData->allDataPopulated = false;
     //if(style().styleHint(TQStyle::SH_Widget_ShareActivation, *extra->m_ceData, getControlElementFlagsForObject(this, extra->m_ceData->widgetObjectTypes, TQStyleOption(), false), TQStyleOption(), NULL, this)) {
-    if(style().styleHint(TQStyle::SH_Widget_ShareActivation, *extra->m_ceData, TQStyle::CEF_None, TQStyleOption(), NULL, this)) {
+    if(style().styleHint(TQStyle::SH_Widget_ShareActivation, *extra->m_ceData, TQStyle::CEF_None, TQStyleOption(), nullptr, this)) {
         if((tlw->isDialog() || (tlw->testWFlags(TQt::WStyle_Tool) && !tlw->isPopup())) &&
            !tlw->testWFlags(TQt::WShowModal) &&
            (!tlw->parentWidget() || tlw->parentWidget()->isActiveWindow()))
diff --git a/src/kernel/tqwidget_x11.cpp b/src/kernel/tqwidget_x11.cpp
index 7404470ba..3806ecec4 100644
--- a/src/kernel/tqwidget_x11.cpp
+++ b/src/kernel/tqwidget_x11.cpp
@@ -1313,7 +1313,7 @@ void TQWidget::setIcon( const TQPixmap &pixmap )
     }
     Pixmap icon_pixmap = 0;
     Pixmap mask_pixmap = 0;
-    TQPixmap* pm = NULL;
+    TQPixmap* pm = nullptr;
     if ( !pixmap.isNull() ) {
 	if (pixmap.depth() == 24) {
 	    pm = new TQPixmap( pixmap );
@@ -1405,11 +1405,11 @@ void TQWidget::setMouseTracking( bool enable )
 	XSelectInput( x11Display(), winId(),
 		      m | stdWidgetEventMask );
 #if defined (QT_TABLET_SUPPORT)
- 	if ( devStylus != NULL ) {
+ 	if ( devStylus ) {
  	    XSelectExtensionEvent( x11Display(), winId(), event_list_stylus,
  				   tqt_curr_events_stylus );
  	}
-	if ( devEraser != NULL ) {
+	if ( devEraser ) {
 	    XSelectExtensionEvent( x11Display(), winId(), event_list_eraser,
 				   tqt_curr_events_eraser );
 	}
diff --git a/src/opengl/tqgl.cpp b/src/opengl/tqgl.cpp
index 8e085a5db..d46376ce5 100644
--- a/src/opengl/tqgl.cpp
+++ b/src/opengl/tqgl.cpp
@@ -1411,7 +1411,7 @@ TQGLWidget::~TQGLWidget()
 #if defined(TQ_WS_MAC)
     if(gl_pix) {
 	delete gl_pix;
-	gl_pix = NULL;
+	gl_pix = nullptr;
     }
 #endif
     cleanupColormaps();
@@ -2217,7 +2217,7 @@ void TQGLWidget::renderText( int x, int y, const TQString & str, const TQFont &
     glLoadIdentity();
 
     glRasterPos2i( 0, 0 );
-    glBitmap(0, 0, 0, 0, x, -y, NULL);
+    glBitmap(0, 0, 0, 0, x, -y, nullptr);
     glListBase( displayListBase( fnt, listBase ) );
     const char *cstr = str.latin1();
     glCallLists( tqstrlen(cstr), GL_UNSIGNED_BYTE, cstr );
diff --git a/src/opengl/tqgl.h b/src/opengl/tqgl.h
index 4befb1b83..c24d2a2b5 100644
--- a/src/opengl/tqgl.h
+++ b/src/opengl/tqgl.h
@@ -383,7 +383,7 @@ private:
     TQGLFormat req_format;
 
     void macInternalRecreateContext( TQGLContext *ctx,
-				     const TQGLContext* = NULL,
+				     const TQGLContext* = nullptr,
 				     bool update = true );
     bool macInternalDoubleBuffer( bool fix = true );
     virtual void setRegionDirty( bool );
diff --git a/src/sql/drivers/ibase/tqsql_ibase.cpp b/src/sql/drivers/ibase/tqsql_ibase.cpp
index f7e29999d..cc8f2705e 100644
--- a/src/sql/drivers/ibase/tqsql_ibase.cpp
+++ b/src/sql/drivers/ibase/tqsql_ibase.cpp
@@ -373,7 +373,7 @@ bool TQIBaseResultPrivate::transaction()
     }
     localTransaction = true;
     
-    isc_start_transaction(status, &trans, 1, &ibase, 0, NULL);
+    isc_start_transaction(status, &trans, 1, &ibase, 0, nullptr);
     if (isError("Could not start transaction", TQSqlError::Statement))
 	return false;
     
@@ -871,7 +871,7 @@ bool TQIBaseDriver::beginTransaction()
     if (d->trans)
 	return false;
     
-    isc_start_transaction(d->status, &d->trans, 1, &d->ibase, 0, NULL);    
+    isc_start_transaction(d->status, &d->trans, 1, &d->ibase, 0, nullptr);    
     return !d->isError("Could not start transaction", TQSqlError::Transaction);
 }
 
diff --git a/src/sql/drivers/mysql/tqsql_mysql.cpp b/src/sql/drivers/mysql/tqsql_mysql.cpp
index 47e3c6ff0..ce911a519 100644
--- a/src/sql/drivers/mysql/tqsql_mysql.cpp
+++ b/src/sql/drivers/mysql/tqsql_mysql.cpp
@@ -178,8 +178,8 @@ void TQMYSQLResult::cleanup()
     if ( d->result ) {
 	mysql_free_result( d->result );
     }
-    d->result = NULL;
-    d->row = NULL;
+    d->result = nullptr;
+    d->row = nullptr;
     setAt( -1 );
     setActive( false );
 }
@@ -291,7 +291,7 @@ TQVariant TQMYSQLResult::data( int field )
 
 bool TQMYSQLResult::isNull( int field )
 {
-    if ( d->row[field] == NULL )
+    if ( !d->row[field] )
 	return true;
     return false;
 }
@@ -557,7 +557,7 @@ bool TQMYSQLDriver::open( const TQString& db,
 				password,
 				db.isNull() ? TQString("") : db,
 				(port > -1) ? port : 0,
-				NULL,
+				nullptr,
 				clientOptionFlags ) )
     {
 	if ( !db.isEmpty() && mysql_select_db( d->mysql, db )) {
@@ -614,7 +614,7 @@ TQStringList TQMYSQLDriver::tables( const TQString& typeName ) const
     if ( !typeName.isEmpty() && !(typeName.toInt() & (int)TQSql::Tables) )
 	return tl;
 
-    MYSQL_RES* tableRes = mysql_list_tables( d->mysql, NULL );
+    MYSQL_RES* tableRes = mysql_list_tables( d->mysql, nullptr );
     MYSQL_ROW	row;
     int i = 0;
     while ( tableRes ) {
diff --git a/src/sql/drivers/odbc/tqsql_odbc.cpp b/src/sql/drivers/odbc/tqsql_odbc.cpp
index 61a8cad1f..367aa7152 100644
--- a/src/sql/drivers/odbc/tqsql_odbc.cpp
+++ b/src/sql/drivers/odbc/tqsql_odbc.cpp
@@ -1105,7 +1105,7 @@ bool TQODBCResult::exec()
 					  0,
 					  (void *) dt,
 					  (TQSQLLEN)0,
-					  *ind == SQL_NULL_DATA ? ind : NULL );
+					  *ind == SQL_NULL_DATA ? ind : nullptr );
 		    break; }
 		case TQVariant::Time: {
 		    TIME_STRUCT * dt = new TIME_STRUCT;
@@ -1123,7 +1123,7 @@ bool TQODBCResult::exec()
 					  0,
 					  (void *) dt,
 					  (TQSQLLEN)0,
-	        			  *ind == SQL_NULL_DATA ? ind : NULL );
+	        			  *ind == SQL_NULL_DATA ? ind : nullptr );
 		    break; }
 		case TQVariant::DateTime: {
 		    TIMESTAMP_STRUCT * dt = new TIMESTAMP_STRUCT;
@@ -1145,7 +1145,7 @@ bool TQODBCResult::exec()
 					  0,
 					  (void *) dt,
 					  (TQSQLLEN)0,
-					  *ind == SQL_NULL_DATA ? ind : NULL );
+					  *ind == SQL_NULL_DATA ? ind : nullptr );
 		    break; }
 	        case TQVariant::Int: {
 		    int * v = new int( val.toInt() );
@@ -1159,7 +1159,7 @@ bool TQODBCResult::exec()
 					  0,
 					  (void *) v,
 					  (TQSQLLEN)0,
-					  *ind == SQL_NULL_DATA ? ind : NULL );
+					  *ind == SQL_NULL_DATA ? ind : nullptr );
 		    break; }
 	        case TQVariant::Double: {
 		    double * v = new double( val.toDouble() );
@@ -1173,7 +1173,7 @@ bool TQODBCResult::exec()
 					  0,
 					  (void *) v,
 					  (TQSQLLEN)0,
-					  *ind == SQL_NULL_DATA ? ind : NULL );
+					  *ind == SQL_NULL_DATA ? ind : nullptr );
 		    break; }
 	        case TQVariant::ByteArray: {
 		    if ( *ind != SQL_NULL_DATA ) {
@@ -1452,7 +1452,7 @@ bool TQODBCDriver::open( const TQString & db,
     SQLSMALLINT cb;
     SQLTCHAR connOut[1024];
     r = SQLDriverConnect( d->hDbc,
-			  NULL,
+			  nullptr,
 #ifdef UNICODE
 			  (SQLWCHAR*)connTQStr.unicode(),
 #else
@@ -1549,7 +1549,7 @@ void TQODBCPrivate::checkUnicode()
 		    SQL_CONVERT_CHAR,
 		    (SQLPOINTER)&fFunc,
 		    sizeof(fFunc),
-		    NULL );
+		    nullptr );
     if ( ( r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO ) && ( fFunc & SQL_CVT_WCHAR ) ) {
 	sql_char_type = TQVariant::String;
 	unicode = true;
@@ -1559,7 +1559,7 @@ void TQODBCPrivate::checkUnicode()
 		    SQL_CONVERT_VARCHAR,
 		    (SQLPOINTER)&fFunc,
 		    sizeof(fFunc),
-		    NULL );
+		    nullptr );
     if ( ( r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO ) && ( fFunc & SQL_CVT_WVARCHAR ) ) {
 	sql_varchar_type = TQVariant::String;
 	unicode = true;
@@ -1569,7 +1569,7 @@ void TQODBCPrivate::checkUnicode()
 		    SQL_CONVERT_LONGVARCHAR,
 		    (SQLPOINTER)&fFunc,
 		    sizeof(fFunc),
-		    NULL );
+		    nullptr );
     if ( ( r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO ) && ( fFunc & SQL_CVT_WLONGVARCHAR ) ) {
 	sql_longvarchar_type = TQVariant::String;
 	unicode = true;
@@ -1648,7 +1648,7 @@ void TQODBCPrivate::checkSchemaUsage()
 		   SQL_SCHEMA_USAGE,
 		   (SQLPOINTER) &val,
 		   sizeof(val),
-		   NULL);
+		   nullptr);
     if (r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO)
 	useSchema = (val != 0);
 }
@@ -1761,11 +1761,11 @@ TQStringList TQODBCDriver::tables( const TQString& typeName ) const
     tableType.truncate( tableType.length() - 1 );
 
     r = SQLTables( hStmt,
-		   NULL,
+		   nullptr,
 		   0,
-		   NULL,
+		   nullptr,
 		   0,
-		   NULL,
+		   nullptr,
 		   0,
 #ifdef UNICODE
 		   (SQLWCHAR*)tableType.unicode(),
@@ -1822,15 +1822,15 @@ TQSqlIndex TQODBCDriver::primaryIndex( const TQString& tablename ) const
 			SQL_IS_UINTEGER );
     r = SQLPrimaryKeys( hStmt,
 #ifdef UNICODE
-			catalog.length() == 0 ? NULL : (SQLWCHAR*)catalog.unicode(),
+			catalog.length() == 0 ? nullptr : (SQLWCHAR*)catalog.unicode(),
 #else
-			catalog.length() == 0 ? NULL : (SQLCHAR*)catalog.latin1(),
+			catalog.length() == 0 ? nullptr : (SQLCHAR*)catalog.latin1(),
 #endif
 			catalog.length(),
 #ifdef UNICODE
-			schema.length() == 0 ? NULL : (SQLWCHAR*)schema.unicode(),
+			schema.length() == 0 ? nullptr : (SQLWCHAR*)schema.unicode(),
 #else
-			schema.length() == 0 ? NULL : (SQLCHAR*)schema.latin1(),
+			schema.length() == 0 ? nullptr : (SQLCHAR*)schema.latin1(),
 #endif
 			schema.length(),
 #ifdef UNICODE
@@ -1847,15 +1847,15 @@ TQSqlIndex TQODBCDriver::primaryIndex( const TQString& tablename ) const
 	    r = SQLSpecialColumns( hStmt,
 				   SQL_BEST_ROWID,
 #ifdef UNICODE
-				   catalog.length() == 0 ? NULL : (SQLWCHAR*)catalog.unicode(),
+				   catalog.length() == 0 ? nullptr : (SQLWCHAR*)catalog.unicode(),
 #else
-				   catalog.length() == 0 ? NULL : (SQLCHAR*)catalog.latin1(),
+				   catalog.length() == 0 ? nullptr : (SQLCHAR*)catalog.latin1(),
 #endif
 				   catalog.length(),
 #ifdef UNICODE
-				   schema.length() == 0 ? NULL : (SQLWCHAR*)schema.unicode(),
+				   schema.length() == 0 ? nullptr : (SQLWCHAR*)schema.unicode(),
 #else
-				   schema.length() == 0 ? NULL : (SQLCHAR*)schema.latin1(),
+				   schema.length() == 0 ? nullptr : (SQLCHAR*)schema.latin1(),
 #endif
 				   schema.length(),
 #ifdef UNICODE
@@ -1939,15 +1939,15 @@ TQSqlRecordInfo TQODBCDriver::recordInfo( const TQString& tablename ) const
 			SQL_IS_UINTEGER );
     r =  SQLColumns( hStmt,
 #ifdef UNICODE
-		     catalog.length() == 0 ? NULL : (SQLWCHAR*)catalog.unicode(),
+		     catalog.length() == 0 ? nullptr : (SQLWCHAR*)catalog.unicode(),
 #else
-		     catalog.length() == 0 ? NULL : (SQLCHAR*)catalog.latin1(),
+		     catalog.length() == 0 ? nullptr : (SQLCHAR*)catalog.latin1(),
 #endif
 		     catalog.length(),
 #ifdef UNICODE
-		     schema.length() == 0 ? NULL : (SQLWCHAR*)schema.unicode(),
+		     schema.length() == 0 ? nullptr : (SQLWCHAR*)schema.unicode(),
 #else
-		     schema.length() == 0 ? NULL : (SQLCHAR*)schema.latin1(),
+		     schema.length() == 0 ? nullptr : (SQLCHAR*)schema.latin1(),
 #endif
 		     schema.length(),
 #ifdef UNICODE
@@ -1956,7 +1956,7 @@ TQSqlRecordInfo TQODBCDriver::recordInfo( const TQString& tablename ) const
 		     (SQLCHAR*)table.latin1(),
 #endif
 		     table.length(),
-		     NULL,
+		     nullptr,
 		     0 );
 #ifdef QT_CHECK_RANGE
     if ( r != SQL_SUCCESS )
diff --git a/src/sql/drivers/psql/tqsql_psql.cpp b/src/sql/drivers/psql/tqsql_psql.cpp
index 625177c7b..4197ba816 100644
--- a/src/sql/drivers/psql/tqsql_psql.cpp
+++ b/src/sql/drivers/psql/tqsql_psql.cpp
@@ -687,7 +687,7 @@ bool TQPSQLDriver::ping()
         return false;
     }
 
-    PGresult *res = NULL;
+    PGresult *res = nullptr;
 
     // Send ping
     res = PQexec( d->connection, "" );
diff --git a/src/sql/tqsqlerror.cpp b/src/sql/tqsqlerror.cpp
index 55d98202d..37a338690 100644
--- a/src/sql/tqsqlerror.cpp
+++ b/src/sql/tqsqlerror.cpp
@@ -221,7 +221,7 @@ TQString TQSqlError::text() const
 void TQSqlError::showMessage( const TQString& msg ) const
 {
 #ifndef TQT_NO_MESSAGEBOX
-    TQMessageBox::warning( NULL, "SQL Error", msg + text(), 
+    TQMessageBox::warning( nullptr, "SQL Error", msg + text(), 
 			  TQMessageBox::Ok, TQMessageBox::NoButton ); 
 #endif // TQT_NO_MESSAGEBOX
 }
diff --git a/src/styles/tqcommonstyle.cpp b/src/styles/tqcommonstyle.cpp
index bf1001a7d..b07f913f8 100644
--- a/src/styles/tqcommonstyle.cpp
+++ b/src/styles/tqcommonstyle.cpp
@@ -164,7 +164,7 @@ static TQString TQTabWidget_static_string("TQTabWidget");
 static TQString TQFrame_static_string("TQFrame");
 static TQString TQWidget_static_string("TQWidget");
 
-static TQStyleControlElementData* TQStyleControlElementData_null = NULL;
+static TQStyleControlElementData* TQStyleControlElementData_null = nullptr;
 static void tqt_style_control_element_data_null_cleanup() {
     delete TQStyleControlElementData_null;
     TQStyleControlElementData_null =0;
@@ -1409,7 +1409,7 @@ void TQCommonStyle::drawControl( ControlElement element,
 #endif //TQT_NO_ICONSET
 		tf |= AlignHCenter;
 	    drawItem(p, ir, tf, cg,
-		     flags & Style_Enabled, (ceData.fgPixmap.isNull())?NULL:&ceData.fgPixmap, ceData.text,
+		     flags & Style_Enabled, (ceData.fgPixmap.isNull())?nullptr:&ceData.fgPixmap, ceData.text,
 		     ceData.text.length(), &(cg.buttonText()) );
 
 	    if (flags & Style_HasFocus)
@@ -1431,7 +1431,7 @@ void TQCommonStyle::drawControl( ControlElement element,
 		alignment |= NoAccel;
 
 	    drawItem(p, r, alignment | AlignVCenter | ShowPrefix, cg,
-		     flags & Style_Enabled, (ceData.fgPixmap.isNull())?NULL:&ceData.fgPixmap, ceData.text);
+		     flags & Style_Enabled, (ceData.fgPixmap.isNull())?nullptr:&ceData.fgPixmap, ceData.text);
 
 	    if (flags & Style_HasFocus) {
 		TQRect fr = visualRect(subRect(SR_CheckBoxFocusRect, ceData, elementFlags, widget), ceData, elementFlags);
@@ -1452,7 +1452,7 @@ void TQCommonStyle::drawControl( ControlElement element,
 	    if ((!styleHint(SH_UnderlineAccelerator, ceData, elementFlags, TQStyleOption::Default, 0, widget)) || ((styleHint(SH_HideUnderlineAcceleratorWhenAltUp, ceData, elementFlags, TQStyleOption::Default, 0, widget)) && (!acceleratorsShown())))
 		alignment |= NoAccel;
 	    drawItem(p, r, alignment | AlignVCenter | ShowPrefix, cg,
-		     flags & Style_Enabled, (ceData.fgPixmap.isNull())?NULL:&ceData.fgPixmap, ceData.text);
+		     flags & Style_Enabled, (ceData.fgPixmap.isNull())?nullptr:&ceData.fgPixmap, ceData.text);
 
 	    if (flags & Style_HasFocus) {
 		TQRect fr = visualRect(subRect(SR_RadioButtonFocusRect, ceData, elementFlags, widget), ceData, elementFlags);
@@ -1971,7 +1971,7 @@ TQRect TQCommonStyle::subRect(SubRect r, const TQStyleControlElementData &ceData
 	    rect = itemRect((activePainter ? activePainter : p),
 			    cr, AlignLeft | AlignVCenter | ShowPrefix,
 			    (elementFlags & CEF_IsEnabled),
-			    (ceData.fgPixmap.isNull())?NULL:&ceData.fgPixmap,
+			    (ceData.fgPixmap.isNull())?nullptr:&ceData.fgPixmap,
 			    ceData.text);
 
 	    delete p;
@@ -2015,7 +2015,7 @@ TQRect TQCommonStyle::subRect(SubRect r, const TQStyleControlElementData &ceData
 	    rect = itemRect((activePainter ? activePainter : p),
 			    cr, AlignLeft | AlignVCenter | ShowPrefix,
 			    (elementFlags & CEF_IsEnabled),
-			    (ceData.fgPixmap.isNull())?NULL:&ceData.fgPixmap,
+			    (ceData.fgPixmap.isNull())?nullptr:&ceData.fgPixmap,
 			    ceData.text);
 	    delete p;
 
@@ -2427,7 +2427,7 @@ void TQCommonStyle::drawComplexControl( ComplexControl control,
 	    if ( controls & SC_TitleBarSysMenu ) {
 		if ( !ceData.icon.isNull() ) {
 		    ir = visualRect( querySubControlMetrics( CC_TitleBar, ceData, elementFlags, SC_TitleBarSysMenu, TQStyleOption::Default, widget ), ceData, elementFlags );
-		    drawItem( p, ir, AlignCenter, ceData.colorGroup, true, (ceData.icon.isNull())?NULL:&ceData.icon, TQString::null );
+		    drawItem( p, ir, AlignCenter, ceData.colorGroup, true, (ceData.icon.isNull())?nullptr:&ceData.icon, TQString::null );
 		}
 	    }
 #endif
diff --git a/src/styles/tqcompactstyle.cpp b/src/styles/tqcompactstyle.cpp
index 83a6c8656..81dd8de54 100644
--- a/src/styles/tqcompactstyle.cpp
+++ b/src/styles/tqcompactstyle.cpp
@@ -328,7 +328,7 @@ void TQCompactStyle::drawPrimitive( PrimitiveElement pe,
 	switch (pe) {
 		case PE_MenuItemIndicatorFrame:
 			{
-				int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, NULL, NULL);
+				int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, nullptr, nullptr);
 
 				if ( act && !dis ) {
 					qDrawShadePanel( p, x, y, checkcol, h, cg, true, 1, &cg.brush( TQColorGroup::Button ) );
@@ -339,14 +339,14 @@ void TQCompactStyle::drawPrimitive( PrimitiveElement pe,
 			break;
 		case PE_MenuItemIndicatorIconFrame:
 			{
-				int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, NULL, NULL);
+				int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, nullptr, nullptr);
 
 				qDrawShadePanel( p, x, y, checkcol, h, cg, false,  1, &cg.brush( TQColorGroup::Button ) );
 			}
 			break;
 		case PE_MenuItemIndicatorCheck:
 			{
-				int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, NULL, NULL);
+				int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, nullptr, nullptr);
 
 				int mw = checkcol + motifItemFrame;
 				int mh = h - 2*motifItemFrame;
diff --git a/src/styles/tqmotifplusstyle.cpp b/src/styles/tqmotifplusstyle.cpp
index 8b13cb538..29b51c7f2 100644
--- a/src/styles/tqmotifplusstyle.cpp
+++ b/src/styles/tqmotifplusstyle.cpp
@@ -663,7 +663,7 @@ void TQMotifPlusStyle::drawPrimitive( PrimitiveElement pe,
 	    {
 		int x, y, w, h;
 		r.rect(&x, &y, &w, &h);
-		int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, NULL, NULL);
+		int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, nullptr, nullptr);
 
 		TQRect vrect = visualRect( TQRect( x+2, y+2, checkcol, h-2 ), r );
 
@@ -675,7 +675,7 @@ void TQMotifPlusStyle::drawPrimitive( PrimitiveElement pe,
 	    {
 		int x, y, w, h;
 		r.rect(&x, &y, &w, &h);
-		int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, NULL, NULL);
+		int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, nullptr, nullptr);
 
 		TQRect vrect = visualRect( TQRect( x+2, y+2, checkcol, h-2 ), r );
 
@@ -750,7 +750,7 @@ void TQMotifPlusStyle::drawControl( ControlElement element,
 
 	    int alignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft;
 	    drawItem(p, r, alignment | AlignVCenter | ShowPrefix, cg,
-		     flags & Style_Enabled, (ceData.fgPixmap.isNull())?NULL:&ceData.fgPixmap, ceData.text);
+		     flags & Style_Enabled, (ceData.fgPixmap.isNull())?nullptr:&ceData.fgPixmap, ceData.text);
 
 	    if (elementFlags & CEF_HasFocus) {
 		TQRect fr = visualRect(subRect(SR_CheckBoxFocusRect, ceData, elementFlags, widget), ceData, elementFlags);
@@ -773,7 +773,7 @@ void TQMotifPlusStyle::drawControl( ControlElement element,
 
 	    int alignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft;
 	    drawItem(p, r, alignment | AlignVCenter | ShowPrefix, cg,
-		     flags & Style_Enabled, (ceData.fgPixmap.isNull())?NULL:&ceData.fgPixmap, ceData.text);
+		     flags & Style_Enabled, (ceData.fgPixmap.isNull())?nullptr:&ceData.fgPixmap, ceData.text);
 
 	    if (elementFlags & CEF_HasFocus) {
 		TQRect fr = visualRect(subRect(SR_RadioButtonFocusRect, ceData, elementFlags, widget), ceData, elementFlags);
diff --git a/src/styles/tqmotifstyle.cpp b/src/styles/tqmotifstyle.cpp
index 2b80b1e12..88cbb0a7d 100644
--- a/src/styles/tqmotifstyle.cpp
+++ b/src/styles/tqmotifstyle.cpp
@@ -780,7 +780,7 @@ void TQMotifStyle::drawPrimitive( PrimitiveElement pe,
 	{
 	    int x, y, w, h;
 	    r.rect( &x, &y, &w, &h );
-	    int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, NULL, NULL);
+	    int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, nullptr, nullptr);
 
 	    TQRect vrect = visualRect( TQRect( x+motifItemFrame, y+motifItemFrame, checkcol, h-2*motifItemFrame ), r );
 	    int xvis = vrect.x();
@@ -793,7 +793,7 @@ void TQMotifStyle::drawPrimitive( PrimitiveElement pe,
 	{
 	    int x, y, w, h;
 	    r.rect( &x, &y, &w, &h );
-	    int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, NULL, NULL);
+	    int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, nullptr, nullptr);
 
 	    TQRect vrect = visualRect( TQRect( x+motifItemFrame, y+motifItemFrame, checkcol, h-2*motifItemFrame ), r );
 	    int xvis = vrect.x();
diff --git a/src/styles/tqplatinumstyle.cpp b/src/styles/tqplatinumstyle.cpp
index 71e9ae3ae..48293ce2a 100644
--- a/src/styles/tqplatinumstyle.cpp
+++ b/src/styles/tqplatinumstyle.cpp
@@ -912,7 +912,7 @@ void TQPlatinumStyle::drawControl( ControlElement element,
 	    drawItem( p, TQRect( x, y, w, h ),
 		      AlignCenter | ShowPrefix,
 		      ceData.colorGroup, ( elementFlags & CEF_IsEnabled ),
-		      (ceData.fgPixmap.isNull())?NULL:&ceData.fgPixmap, ceData.text, -1,
+		      (ceData.fgPixmap.isNull())?nullptr:&ceData.fgPixmap, ceData.text, -1,
 		      on ? &ceData.colorGroup.brightText()
 		      : &ceData.colorGroup.buttonText() );
 	    if ( elementFlags & CEF_HasFocus )
diff --git a/src/styles/tqsgistyle.cpp b/src/styles/tqsgistyle.cpp
index 0a78be86f..7395c3483 100644
--- a/src/styles/tqsgistyle.cpp
+++ b/src/styles/tqsgistyle.cpp
@@ -910,7 +910,7 @@ void TQSGIStyle::drawPrimitive( PrimitiveElement pe,
 	{
 	    int x, y, w, h;
 	    r.rect(&x, &y, &w, &h);
-	    int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, NULL, NULL);
+	    int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, nullptr, nullptr);
 
 	    drawPanel( p, x+sgiItemFrame, y+sgiItemFrame, checkcol, h-2*sgiItemFrame, cg, true, 1, &cg.brush( TQColorGroup::Light ) );
 	}
diff --git a/src/styles/tqwindowsstyle.cpp b/src/styles/tqwindowsstyle.cpp
index 38c126349..ba592bfaf 100644
--- a/src/styles/tqwindowsstyle.cpp
+++ b/src/styles/tqwindowsstyle.cpp
@@ -575,7 +575,7 @@ void TQWindowsStyle::drawPrimitive( PrimitiveElement pe,
 	{
 	    int x, y, w, h;
 	    r.rect( &x, &y, &w, &h );
-	    int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, NULL, NULL);
+	    int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, nullptr, nullptr);
 
 	    TQRect vrect = visualRect( TQRect( x, y, checkcol, h ), r );
 	    int xvis = vrect.x();
@@ -601,7 +601,7 @@ void TQWindowsStyle::drawPrimitive( PrimitiveElement pe,
 	{
 	    int x, y, w, h;
 	    r.rect( &x, &y, &w, &h );
-	    int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, NULL, NULL);
+	    int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, nullptr, nullptr);
 
 	    TQRect vrect = visualRect( TQRect( x, y, checkcol, h ), r );
 	    int xvis = vrect.x();
@@ -614,7 +614,7 @@ void TQWindowsStyle::drawPrimitive( PrimitiveElement pe,
 	{
 	    int x, y, w, h;
 	    r.rect( &x, &y, &w, &h );
-	    int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, NULL, NULL);
+	    int checkcol = styleHint(SH_MenuIndicatorColumnWidth, ceData, elementFlags, opt, nullptr, nullptr);
 
 	    int xp = x + windowsItemFrame;
 
diff --git a/src/tools/tqfile.cpp b/src/tools/tqfile.cpp
index 2ebb835f6..af35b04de 100644
--- a/src/tools/tqfile.cpp
+++ b/src/tools/tqfile.cpp
@@ -732,12 +732,12 @@ void TQFile::setErrorStringErrno( int errnum )
 	    {
 		unsigned short *string;
 		FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
-			       NULL,
+			       nullptr,
 			       errnum,
 			       MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
 			       (LPTSTR)&string,
 			       0,
-			       NULL );
+			       nullptr );
 		d->errorString = TQString::fromUcs2( string );
 	        LocalFree( (HLOCAL)string );
 	    }
diff --git a/src/tools/tqfileinfo_unix.cpp b/src/tools/tqfileinfo_unix.cpp
index c199ef578..7296593df 100644
--- a/src/tools/tqfileinfo_unix.cpp
+++ b/src/tools/tqfileinfo_unix.cpp
@@ -107,7 +107,7 @@ bool TQFileInfo::isSymLink() const
 #if defined(Q_OS_MAC)
     {
         FSRef fref;
-        if(FSPathMakeRef((const UInt8 *)TQFile::encodeName(fn).data(), &fref, NULL) == noErr) {
+        if(FSPathMakeRef((const UInt8 *)TQFile::encodeName(fn).data(), &fref, nullptr) == noErr) {
             Boolean isAlias, isFolder;
             if(FSIsAliasFile(&fref, &isAlias, &isFolder) == noErr)
                 return isAlias;
@@ -135,12 +135,12 @@ TQString TQFileInfo::readLink() const
 #if defined(Q_OS_UNIX) && !defined(Q_OS_OS2EMX)
 #if !defined(PATH_MAX)
     int size = 256;
-    char *s = NULL, *s2;
+    char *s = nullptr, *s2;
 
     while (1)
     {
         s2 = (char *) realloc (s, size);
-        if (s2 == NULL) {
+        if (!s2) {
             free( s );
             return TQString();
         }
@@ -170,7 +170,7 @@ TQString TQFileInfo::readLink() const
 #if defined(Q_OS_MAC)
     {
         FSRef fref;
-        if(FSPathMakeRef((const UInt8 *)TQFile::encodeName(fn).data(), &fref, NULL) == noErr) {
+        if(FSPathMakeRef((const UInt8 *)TQFile::encodeName(fn).data(), &fref, nullptr) == noErr) {
             Boolean isAlias, isFolder;
             if(FSResolveAliasFile(&fref, true, &isFolder, &isAlias) == noErr && isAlias) {
                 AliasHandle alias;
diff --git a/src/tools/tqglobal.cpp b/src/tools/tqglobal.cpp
index 6f8a1cd62..ffa8d338e 100644
--- a/src/tools/tqglobal.cpp
+++ b/src/tools/tqglobal.cpp
@@ -175,9 +175,9 @@ OSErr qt_mac_create_fsspec(const TQString &file, FSSpec *spec)
 {
     FSRef fref;
     TQCString utfs = file.utf8();
-    OSErr ret = FSPathMakeRef((const UInt8 *)utfs.data(), &fref, NULL);
+    OSErr ret = FSPathMakeRef((const UInt8 *)utfs.data(), &fref, nullptr);
     if(ret == noErr)
-	ret = FSGetCatalogInfo(&fref, kFSCatInfoNone, NULL, NULL, spec, NULL);
+	ret = FSGetCatalogInfo(&fref, kFSCatInfoNone, nullptr, nullptr, spec, nullptr);
     return ret;
 }
 
@@ -603,22 +603,22 @@ void tqSystemWarning( const char* msg, int code )
     unsigned short *string;
     QT_WA( {
 	FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
-		       NULL,
+		       nullptr,
 		       code,
 		       MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
 		       (LPTSTR)&string,
 		       0,
-		       NULL );
+		       nullptr );
 
 	tqWarning( "%s\n\tError code %d - %s", msg, code, TQString::fromUcs2(string).latin1() );
     }, {
 	FormatMessageA( FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
-			NULL,
+			nullptr,
 			code,
 			MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
 			(char*)&string,
 			0,
-			NULL );
+			nullptr );
 
 	tqWarning( "%s\n\tError code %d - %s", msg, code, (const char*)string );
     } );
diff --git a/src/tools/tqlocale.cpp b/src/tools/tqlocale.cpp
index cabc42ddf..25817d3bc 100644
--- a/src/tools/tqlocale.cpp
+++ b/src/tools/tqlocale.cpp
@@ -1849,7 +1849,7 @@ const char* TQLocalePrivate::systemLocaleName()
         return lang;
 
     char mac_ret[255];
-    if(!LocaleRefGetPartString(NULL, kLocaleLanguageMask | kLocaleRegionMask, 255, mac_ret))
+    if(!LocaleRefGetPartString(nullptr, kLocaleLanguageMask | kLocaleRegionMask, 255, mac_ret))
         lang = mac_ret;
 #endif
 
@@ -4998,7 +4998,7 @@ static double qstrtod(CONST char *s00, CONST char **se, bool *ok)
     Long L;
     ULong y, z;
     Bigint *bb1, *bd0;
-    Bigint *bb = NULL, *bd = NULL, *bs = NULL, *delta = NULL;/* pacify gcc */
+    Bigint *bb = nullptr, *bd = nullptr, *bs = nullptr, *delta = nullptr;/* pacify gcc */
 
     /*
       #ifndef KR_headers
@@ -5757,7 +5757,7 @@ static char *_qdtoa( NEEDS_VOLATILE double d, int mode, int ndigits, int *decpt,
     ULong x;
 #endif
     Bigint *b, *b1, *delta, *mhi, *S;
-    Bigint *mlo = NULL; /* pacify gcc */
+    Bigint *mlo = nullptr; /* pacify gcc */
     double d2;
     double ds, eps;
     char *s, *s0;
diff --git a/src/tools/tqstring.cpp b/src/tools/tqstring.cpp
index eb4b1fc07..6b5390c72 100644
--- a/src/tools/tqstring.cpp
+++ b/src/tools/tqstring.cpp
@@ -317,7 +317,7 @@ TQStringData::~TQStringData() {
 #if defined(TQT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
 	if ( mutex ) {
 		delete mutex;
-		mutex = NULL;
+		mutex = nullptr;
 	}
 #endif // TQT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
 }
@@ -910,7 +910,7 @@ TQString::~TQString()
 		d->mutex->unlock();
 #endif // TQT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
 		d->deleteSelf();
-		d = NULL;
+		d = nullptr;
 	}
 	else {
 #if defined(TQT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
diff --git a/src/tools/tqwaitcondition_unix.cpp b/src/tools/tqwaitcondition_unix.cpp
index 8067c4ace..814bbdbc9 100644
--- a/src/tools/tqwaitcondition_unix.cpp
+++ b/src/tools/tqwaitcondition_unix.cpp
@@ -149,7 +149,7 @@ TQWaitCondition::TQWaitCondition()
 {
     d = new TQWaitConditionPrivate;
 
-    int ret = pthread_cond_init(&d->cond, NULL);
+    int ret = pthread_cond_init(&d->cond, nullptr);
 
 #ifdef QT_CHECK_RANGE
     if (ret)
diff --git a/src/widgets/tqdialogbuttons.cpp b/src/widgets/tqdialogbuttons.cpp
index 8638dc0e3..cdf8432be 100644
--- a/src/widgets/tqdialogbuttons.cpp
+++ b/src/widgets/tqdialogbuttons.cpp
@@ -159,7 +159,7 @@ TQDialogButtons::visibleButtons() const
 void
 TQDialogButtons::addWidget(TQWidget *w)
 {
-    TQBoxLayout *lay = NULL;
+    TQBoxLayout *lay = nullptr;
     if(!d->custom) {
 	d->custom = new TQWidget(this, "dialog_custom_area");
 	if(orientation() == Horizontal)
@@ -375,7 +375,7 @@ TQDialogButtons::layoutButtons()
         TQStyle::SR_DialogButtonRetry,  TQStyle::SR_DialogButtonIgnore,
         TQStyle::SR_DialogButtonAbort };
     for(unsigned int i = 0; i < (sizeof(rects) / sizeof(rects[0])); i++) {
-	TQWidget *w = NULL;
+	TQWidget *w = nullptr;
 	if(rects[i] == TQStyle::SR_DialogButtonCustom) {
 	    w = d->custom;
 	} else {
@@ -441,7 +441,7 @@ TQDialogButtons::sizeHint() const
 TQSize
 TQDialogButtons::sizeHint(TQDialogButtons::Button button) const
 {
-    TQWidget *w = NULL;
+    TQWidget *w = nullptr;
     if(d->visible & button) {
 	if(!d->buttons.contains(button)) {
 	    TQDialogButtons *that = (TQDialogButtons*)this; //ick, constness..
diff --git a/src/widgets/tqdialogbuttons_p.h b/src/widgets/tqdialogbuttons_p.h
index f0c9225ee..c15a497f4 100644
--- a/src/widgets/tqdialogbuttons_p.h
+++ b/src/widgets/tqdialogbuttons_p.h
@@ -56,10 +56,10 @@ public:
     enum Button { None=0, Accept=0x01, Reject=0x02, Help=0x04, Apply=0x08, All=0x10, Abort=0x20, Retry=0x40, Ignore=0x80 };
 #ifndef TQT_NO_DIALOG
     TQDialogButtons(TQDialog *parent, bool autoConnect = true, TQ_UINT32 buttons = Accept | Reject,
-		   Orientation orient = Horizontal, const char *name = NULL);
+		   Orientation orient = Horizontal, const char *name = nullptr);
 #endif // TQT_NO_DIALOG
     TQDialogButtons(TQWidget *parent, TQ_UINT32 buttons = Accept | Reject, 
-		   Orientation orient = Horizontal, const char *name = NULL);
+		   Orientation orient = Horizontal, const char *name = nullptr);
     ~TQDialogButtons();
 
     void setQuestionMode(bool);
diff --git a/src/widgets/tqiconview.cpp b/src/widgets/tqiconview.cpp
index c2fa5dfbc..4e5027ea0 100644
--- a/src/widgets/tqiconview.cpp
+++ b/src/widgets/tqiconview.cpp
@@ -2892,7 +2892,7 @@ TQIconView::~TQIconView()
     d->toolTip = 0;
 #endif
     delete d;
-    d = NULL;
+    d = nullptr;
 }
 
 /*!
@@ -3160,7 +3160,7 @@ TQIconViewItem *TQIconView::firstItem() const
         return d->firstItem;
     }
     else {
-        return NULL;
+        return nullptr;
     }
 }
 
@@ -3177,7 +3177,7 @@ TQIconViewItem *TQIconView::lastItem() const
         return d->lastItem;
     }
     else {
-        return NULL;
+        return nullptr;
     }
 }
 
@@ -3194,7 +3194,7 @@ TQIconViewItem *TQIconView::currentItem() const
         return d->currentItem;
     }
     else {
-        return NULL;
+        return nullptr;
     }
 }
 
@@ -5317,7 +5317,7 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
 */
 TQIconViewItem* TQIconView::findItem(Direction dir, const TQIconViewItem *fromItem) const
 {
-    TQIconViewItem *closestItem=NULL;
+    TQIconViewItem *closestItem=nullptr;
     int distPri=0, distSec=0;
     int itemDistancePri=0, itemDistanceSec=0;
 
@@ -6097,7 +6097,7 @@ TQIconViewItem *TQIconView::makeRowLayout( TQIconViewItem *begin, int &y, bool &
 
 	    // now move the items
 	    item = begin;
-	    TQIconViewItem *prevVisibleItem = NULL;
+	    TQIconViewItem *prevVisibleItem = nullptr;
 	    for (;;) {
 		item->dirty = false;
 		if ( d->itemTextPos == Bottom ) {
diff --git a/src/widgets/tqpopupmenu.cpp b/src/widgets/tqpopupmenu.cpp
index 66da3a26a..4c210659e 100644
--- a/src/widgets/tqpopupmenu.cpp
+++ b/src/widgets/tqpopupmenu.cpp
@@ -567,12 +567,12 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint )
         x11SetWindowTransient( static_cast< TQPopupMenu* >( parentMenu ));
     if( !parentMenu ) {
         // hackish ... try to find the main window related to this popup
-        TQWidget* parent = parentWidget() ? parentWidget()->topLevelWidget() : NULL;
-        if( parent == NULL )
+        TQWidget* parent = parentWidget() ? parentWidget()->topLevelWidget() : nullptr;
+        if( !parent )
             parent = TQApplication::widgetAt( pos );
-        if( parent == NULL )
+        if( !parent )
             parent = tqApp->activeWindow();
-        if( parent != NULL )
+        if( parent )
             x11SetWindowTransient( parent );
     }
 #endif
@@ -615,7 +615,7 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint )
             h = height();
 	    if(indexAtPoint >= 0) { 
 		if(off_top) { //scroll to it
-		    TQMenuItem *mi = NULL;
+		    TQMenuItem *mi = nullptr;
 		    TQMenuItemListIt it(*mitems);
 		    for(int tmp_y = 0; tmp_y < off_top && (mi=it.current()); ) {
 			TQSize sz = style().sizeFromContents(TQStyle::CT_PopupMenuItem, this,
diff --git a/src/widgets/tqradiobutton.cpp b/src/widgets/tqradiobutton.cpp
index adf7e9def..ed6604bf0 100644
--- a/src/widgets/tqradiobutton.cpp
+++ b/src/widgets/tqradiobutton.cpp
@@ -261,7 +261,7 @@ void TQRadioButton::drawButton( TQPainter *paint )
 #if defined(SAVE_RADIOBUTTON_PIXMAPS)
     if ( use_pm ) {
 	pmpaint.end();
-	TQPainter::redirect(this, NULL);
+	TQPainter::redirect(this, nullptr);
 	if ( backgroundPixmap() || backgroundMode() == X11ParentRelative ) {
 	    TQBitmap bm( pm->size() );
 	    bm.fill( color0 );
diff --git a/src/widgets/tqtabbar.cpp b/src/widgets/tqtabbar.cpp
index 4d3bacbae..f8c5452c8 100644
--- a/src/widgets/tqtabbar.cpp
+++ b/src/widgets/tqtabbar.cpp
@@ -335,7 +335,7 @@ private:
 */
 
 TQTabBar::TQTabBar( TQWidget * parent, const char *name )
-    : TQWidget( parent, name, WNoAutoErase | WNoMousePropagation  ), l(NULL), hoverTab( 0 )
+    : TQWidget( parent, name, WNoAutoErase | WNoMousePropagation  ), l(nullptr), hoverTab( 0 )
 {
     d = new TQTabPrivate;
     d->pressed = 0;
diff --git a/src/workspace/tqworkspace.cpp b/src/workspace/tqworkspace.cpp
index 91e171f38..9bf7b8bb5 100644
--- a/src/workspace/tqworkspace.cpp
+++ b/src/workspace/tqworkspace.cpp
@@ -819,7 +819,7 @@ void TQWorkspace::handleUndock(TQDockWindow *w)
 		}
 	    }
 
-	    TQDockWindow *l, *nearest = NULL, *furthest;
+	    TQDockWindow *l, *nearest = nullptr, *furthest;
 	    for ( it.toFirst(); it.current(); ++it ) {
 		l = it.current();
 		if ( l != w && y == l->y() ) {
@@ -842,7 +842,7 @@ void TQWorkspace::handleUndock(TQDockWindow *w)
 		break;
 	    }
 
-	    TQDockWindow *o = NULL;
+	    TQDockWindow *o = nullptr;
 	    int overlap = 0;
 	    for( it.toFirst(); it.current(); ++it ) {
 		l = it.current();
@@ -1024,7 +1024,7 @@ void TQWorkspace::showEvent( TQShowEvent *e )
 	}
 	dockWindowsShow(); //now place and undock windows discovered
 
-	TQWidget *w = new TQWidget(NULL, "TQDoesNotExist",
+	TQWidget *w = new TQWidget(nullptr, "TQDoesNotExist",
 				 WType_Dialog | WStyle_Customize | WStyle_NoBorder);
 //	if(tqApp->mainWidget() == o)
 //	    TQObject::connect(tqApp, TQ_SIGNAL(lastWindowClosed()), tqApp, TQ_SLOT(quit()));
@@ -1036,7 +1036,7 @@ void TQWorkspace::showEvent( TQShowEvent *e )
 	    if(::tqt_cast<TQMainWindow*>(o))
 		mb = ((TQMainWindow *)o)->menuBar();
 	    if(!mb)
-		mb = (TQMenuBar*)o->child(NULL, "TQMenuBar");
+		mb = (TQMenuBar*)o->child(nullptr, "TQMenuBar");
 	    if(mb)
 		mb->reparent(w, TQPoint(0, 0));
 	}
diff --git a/tools/designer/designer/mainwindow.cpp b/tools/designer/designer/mainwindow.cpp
index 238a73fb2..1203f16eb 100644
--- a/tools/designer/designer/mainwindow.cpp
+++ b/tools/designer/designer/mainwindow.cpp
@@ -842,25 +842,25 @@ void MainWindow::helpRegister()
 #if defined(UNICODE)
     if ( TQApplication::winVersion() & TQt::WV_NT_based ) {
 	unsigned char data[256];
-	res = RegOpenKeyExW( HKEY_CLASSES_ROOT, NULL, 0, KEY_READ, &key );
+	res = RegOpenKeyExW( HKEY_CLASSES_ROOT, nullptr, 0, KEY_READ, &key );
 	res = RegOpenKeyExW( key, (TCHAR*)sub.ucs2(), 0, KEY_READ, &subkey );
-	res = RegQueryValueExW( subkey, NULL, NULL, &type, data, &size );
+	res = RegQueryValueExW( subkey, nullptr, nullptr, &type, data, &size );
 	command = tqt_winTQString( data ) + "\\command";
 	size = 255;
 	res = RegOpenKeyExW( subkey, (TCHAR*)command.ucs2(), 0, KEY_READ, &subkey );
-	res = RegQueryValueExW( subkey, NULL, NULL, &type, data, &size );
+	res = RegQueryValueExW( subkey, nullptr, nullptr, &type, data, &size );
 	command = tqt_winTQString( data );
     } else
 #endif
     {
 	unsigned char data[256];
-	res = RegOpenKeyExA( HKEY_CLASSES_ROOT, NULL, 0, KEY_READ, &key );
+	res = RegOpenKeyExA( HKEY_CLASSES_ROOT, nullptr, 0, KEY_READ, &key );
 	res = RegOpenKeyExA( key, sub.local8Bit(), 0, KEY_READ, &subkey );
-	res = RegQueryValueExA( subkey, NULL, NULL, &type, data, &size );
+	res = RegQueryValueExA( subkey, nullptr, nullptr, &type, data, &size );
 	command = TQString::fromLocal8Bit( (const char*) data ) + "\\command";
 	size = 255;
 	res = RegOpenKeyExA( subkey, command.local8Bit(), 0, KEY_READ, &subkey );
-	res = RegQueryValueExA( subkey, NULL, NULL, &type, data, &size );
+	res = RegQueryValueExA( subkey, nullptr, nullptr, &type, data, &size );
 	command = TQString::fromLocal8Bit( (const char*) data );
     }
 
-- 
cgit v1.2.3

