From 029f5d5058ffe10de206047602d91b1dbba4cf50 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 zero 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/aclock/aclock.h                           |   2 +-
 examples/action/application.cpp                    |   2 +-
 examples/addressbook/centralwidget.h               |   2 +-
 examples/addressbook/mainwindow.cpp                |   2 +-
 examples/application/application.cpp               |   2 +-
 examples/biff/biff.h                               |   2 +-
 examples/buttongroups/buttongroups.h               |   2 +-
 examples/canvas/canvas.cpp                         |  30 +--
 examples/canvas/canvas.h                           |   4 +-
 examples/chart/canvasview.cpp                      |   2 +-
 examples/chart/canvasview.h                        |   4 +-
 examples/chart/chartform.cpp                       |   4 +-
 examples/chart/optionsform.cpp                     |   8 +-
 examples/chart/optionsform.h                       |   2 +-
 examples/chart/setdataform.cpp                     |   2 +-
 examples/chart/setdataform.h                       |   2 +-
 examples/checklists/checklists.cpp                 |   2 +-
 examples/checklists/checklists.h                   |   2 +-
 examples/customlayout/border.cpp                   |  16 +-
 examples/customlayout/border.h                     |   6 +-
 examples/customlayout/card.cpp                     |  10 +-
 examples/customlayout/flow.cpp                     |   8 +-
 examples/customlayout/flow.h                       |   6 +-
 examples/dclock/dclock.h                           |   2 +-
 examples/demo/display.h                            |   6 +-
 examples/demo/dnd/dnd.h                            |   2 +-
 examples/demo/dnd/iconview.h                       |   2 +-
 examples/demo/dnd/listview.h                       |   2 +-
 examples/demo/dnd/styledbutton.h                   |   4 +-
 examples/demo/frame.cpp                            |   4 +-
 examples/demo/frame.h                              |   2 +-
 examples/demo/graph.cpp                            |   8 +-
 examples/demo/graph.h                              |   2 +-
 examples/demo/i18n/wrapper.h                       |   2 +-
 examples/demo/opengl/glbox.h                       |   2 +-
 examples/demo/opengl/glcontrolwidget.h             |   2 +-
 examples/demo/opengl/glgear.h                      |   2 +-
 examples/demo/opengl/glinfo_x11.cpp                |   2 +-
 examples/demo/opengl/gllandscape.h                 |   2 +-
 examples/demo/opengl/gltexobj.h                    |   2 +-
 examples/demo/opengl/glworkspace.h                 |   2 +-
 examples/demo/qasteroids/toplevel.h                |   2 +-
 examples/demo/qasteroids/view.cpp                  |   2 +-
 examples/demo/qasteroids/view.h                    |   2 +-
 examples/demo/qthumbwheel.h                        |   2 +-
 examples/demo/sql/sqlex.ui.h                       |   4 +-
 examples/demo/textdrawing/helpwindow.h             |   2 +-
 examples/demo/textdrawing/textedit.h               |   2 +-
 examples/desktop/desktop.cpp                       |   4 +-
 examples/dirview/dirview.cpp                       |  28 +--
 examples/dirview/dirview.h                         |   6 +-
 examples/distributor/distributor.ui.h              |   6 +-
 examples/dragdrop/dropsite.h                       |   2 +-
 examples/dragdrop/secret.h                         |   4 +-
 examples/drawdemo/drawdemo.cpp                     |   8 +-
 examples/drawlines/connect.cpp                     |   2 +-
 examples/fileiconview/tqfileiconview.cpp           |  26 +--
 examples/fileiconview/tqfileiconview.h             |   4 +-
 examples/forever/forever.h                         |   2 +-
 examples/hello/hello.h                             |   2 +-
 examples/helpdemo/helpdemo.cpp                     |   4 +-
 examples/helpdemo/helpdemo.h                       |   2 +-
 examples/helpsystem/tooltip.h                      |   4 +-
 examples/helpsystem/whatsthis.h                    |   2 +-
 examples/helpviewer/helpwindow.cpp                 |   2 +-
 examples/helpviewer/helpwindow.h                   |   2 +-
 examples/helpviewer/main.cpp                       |   2 +-
 examples/i18n/main.cpp                             |  18 +-
 examples/i18n/mywidget.cpp                         |   2 +-
 examples/i18n/mywidget.h                           |   2 +-
 examples/iconview/simple_dd/main.h                 |   4 +-
 examples/layout/layout.cpp                         |   2 +-
 examples/life/life.h                               |   2 +-
 examples/life/lifedlg.h                            |   2 +-
 examples/lineedits/lineedits.cpp                   |   2 +-
 examples/lineedits/lineedits.h                     |   2 +-
 examples/listbox/listbox.cpp                       |   4 +-
 examples/listboxcombo/listboxcombo.h               |   2 +-
 examples/listviews/listviews.cpp                   |   2 +-
 examples/listviews/listviews.h                     |   2 +-
 examples/mdi/application.cpp                       |   8 +-
 examples/menu/menu.h                               |   2 +-
 examples/movies/main.cpp                           |  12 +-
 examples/network/clientserver/server/server.cpp    |   4 +-
 examples/network/httpd/httpd.cpp                   |   2 +-
 .../network/infoprotocol/infoclient/client.cpp     |   2 +-
 examples/network/infoprotocol/infoclient/client.h  |   2 +-
 examples/network/infoprotocol/infoserver/main.cpp  |   2 +-
 .../network/infoprotocol/infoserver/server.cpp     |   2 +-
 examples/network/infoprotocol/infoserver/server.h  |   6 +-
 .../network/infoprotocol/infourlclient/client.cpp  |   2 +-
 .../network/infoprotocol/infourlclient/client.h    |   2 +-
 examples/network/mail/composer.h                   |   2 +-
 examples/network/networkprotocol/view.cpp          |   2 +-
 examples/network/remotecontrol/startup.cpp         |   4 +-
 examples/opengl/box/globjwin.h                     |   2 +-
 examples/opengl/gear/gear.cpp                      |   2 +-
 examples/opengl/glpixmap/glbox.h                   |   4 +-
 examples/opengl/glpixmap/globjwin.h                |   2 +-
 examples/opengl/overlay/globjwin.cpp               |   2 +-
 examples/opengl/overlay/globjwin.h                 |   2 +-
 examples/opengl/overlay/main.cpp                   |   2 +-
 examples/opengl/overlay_x11/gearwidget.h           |   2 +-
 examples/opengl/overlay_x11/rubberbandwidget.h     |   4 +-
 examples/opengl/sharedbox/glbox.h                  |   2 +-
 examples/opengl/sharedbox/globjwin.cpp             |   2 +-
 examples/opengl/sharedbox/globjwin.h               |   2 +-
 examples/opengl/texture/globjwin.h                 |   2 +-
 examples/picture/picture.cpp                       |   4 +-
 examples/popup/popup.cpp                           |   2 +-
 examples/popup/popup.h                             |   6 +-
 examples/process/process.cpp                       |   2 +-
 examples/progress/progress.cpp                     |   4 +-
 examples/progressbar/progressbar.h                 |   2 +-
 examples/qfd/fontdisplayer.h                       |   4 +-
 examples/qmag/qmag.cpp                             |   6 +-
 examples/qwerty/qwerty.cpp                         |   4 +-
 examples/qwerty/qwerty.h                           |   2 +-
 examples/rangecontrols/rangecontrols.h             |   2 +-
 examples/regexptester/regexptester.cpp             |   6 +-
 examples/regexptester/regexptester.h               |   2 +-
 examples/richtext/richtext.cpp                     |   4 +-
 examples/richtext/richtext.h                       |   2 +-
 examples/scribble/scribble.cpp                     |   2 +-
 examples/scribble/scribble.h                       |   4 +-
 examples/scrollview/scrollview.cpp                 |  16 +-
 examples/showimg/imagefip.h                        |   2 +-
 examples/showimg/imagetexteditor.h                 |   2 +-
 examples/showimg/main.cpp                          |   4 +-
 examples/showimg/showimg.cpp                       |  12 +-
 examples/showimg/showimg.h                         |   2 +-
 examples/splitter/splitter.cpp                     |   4 +-
 examples/sql/overview/custom1/main.h               |   2 +-
 examples/sql/overview/table3/main.h                |   2 +-
 examples/sql/overview/table4/main.h                |   4 +-
 examples/tabdialog/main.cpp                        |   2 +-
 examples/table/statistics/statistics.cpp           |   6 +-
 examples/tablet/canvas.h                           |   2 +-
 examples/tablet/scribble.h                         |   2 +-
 examples/tablet/tabletstats.h                      |   4 +-
 examples/tetrix/qtetrix.h                          |   4 +-
 examples/tetrix/qtetrixb.cpp                       |  12 +-
 examples/tetrix/qtetrixb.h                         |   2 +-
 examples/tetrix/tqdragapp.cpp                      |  18 +-
 examples/textedit/textedit.cpp                     |   2 +-
 examples/textedit/textedit.h                       |   2 +-
 examples/themes/metal.h                            |   6 +-
 examples/themes/themes.cpp                         |   4 +-
 examples/themes/themes.h                           |   2 +-
 examples/themes/wood.cpp                           |   4 +-
 examples/themes/wood.h                             |  10 +-
 examples/thread/prodcons/prodcons.cpp              |   8 +-
 examples/tictac/tictac.h                           |   4 +-
 examples/tooltip/tooltip.cpp                       |   2 +-
 examples/tooltip/tooltip.h                         |   2 +-
 examples/toplevel/options.ui.h                     |   4 +-
 examples/tqdir/tqdir.cpp                           |   6 +-
 examples/tux/tux.cpp                               |   4 +-
 examples/widgets/main.cpp                          |   2 +-
 examples/widgets/widgets.cpp                       |   2 +-
 examples/widgets/widgets.h                         |   6 +-
 examples/wizard/wizard.h                           |   2 +-
 examples/xform/xform.cpp                           |   6 +-
 examples/xml/outliner/outlinetree.cpp              |  10 +-
 examples/xml/outliner/outlinetree.h                |   2 +-
 plugins/src/accessible/widgets/main.cpp            |   4 +-
 .../src/accessible/widgets/tqaccessiblemenu.cpp    |   6 +-
 .../src/accessible/widgets/tqaccessiblewidget.cpp  |  38 ++--
 plugins/src/codecs/cn/main.cpp                     |   4 +-
 plugins/src/codecs/jp/main.cpp                     |   4 +-
 plugins/src/codecs/kr/main.cpp                     |   4 +-
 plugins/src/codecs/tw/main.cpp                     |   4 +-
 .../inputmethods/imsw-multi/qmultiinputcontext.cpp |  12 +-
 .../inputmethods/imsw-multi/qmultiinputcontext.h   |   2 +-
 .../imsw-none/qnoneinputcontextplugin.cpp          |   4 +-
 .../src/inputmethods/simple/qsimpleinputcontext.h  |   2 +-
 plugins/src/inputmethods/xim/qximinputcontext.h    |   2 +-
 .../src/inputmethods/xim/qximinputcontext_x11.cpp  |  54 ++---
 plugins/src/sqldrivers/ibase/main.cpp              |   2 +-
 plugins/src/sqldrivers/mysql/main.cpp              |   2 +-
 plugins/src/sqldrivers/odbc/main.cpp               |   2 +-
 plugins/src/sqldrivers/psql/main.cpp               |   2 +-
 plugins/src/sqldrivers/sqlite/smain.cpp            |   2 +-
 plugins/src/sqldrivers/sqlite3/smain.cpp           |   2 +-
 plugins/src/styles/cde/main.cpp                    |   2 +-
 plugins/src/styles/compact/main.cpp                |   2 +-
 plugins/src/styles/motif/main.cpp                  |   2 +-
 plugins/src/styles/motifplus/main.cpp              |   2 +-
 plugins/src/styles/platinum/main.cpp               |   2 +-
 plugins/src/styles/sgi/main.cpp                    |   2 +-
 plugins/src/styles/windows/main.cpp                |   2 +-
 qmake/examples/tutorial/hello.cpp                  |   2 +-
 qmake/generators/win32/msvc_objectmodel.cpp        |   2 +-
 src/canvas/tqcanvas.cpp                            |  86 +++----
 src/canvas/tqcanvas.h                              |  10 +-
 src/codecs/tqbig5codec.cpp                         |   4 +-
 src/codecs/tqeucjpcodec.cpp                        |   4 +-
 src/codecs/tqeuckrcodec.cpp                        |   2 +-
 src/codecs/tqfontjpcodec.cpp                       |   2 +-
 src/codecs/tqgb18030codec.cpp                      |   6 +-
 src/codecs/tqhebrewcodec.cpp                       |   2 +-
 src/codecs/tqjiscodec.cpp                          |   4 +-
 src/codecs/tqjpunicode.cpp                         |  62 ++---
 src/codecs/tqsjiscodec.cpp                         |   4 +-
 src/codecs/tqtextcodec.cpp                         |  96 ++++----
 src/codecs/tqtextcodecfactory.cpp                  |   8 +-
 src/codecs/tqtextcodecplugin.cpp                   |   2 +-
 src/dialogs/tqcolordialog.cpp                      |  28 +--
 src/dialogs/tqcolordialog.h                        |   8 +-
 src/dialogs/tqdialog.cpp                           |  14 +-
 src/dialogs/tqdialog.h                             |   2 +-
 src/dialogs/tqerrormessage.cpp                     |  10 +-
 src/dialogs/tqerrormessage.h                       |   2 +-
 src/dialogs/tqfiledialog.cpp                       | 152 ++++++-------
 src/dialogs/tqfiledialog.h                         |  46 ++--
 src/dialogs/tqfontdialog.cpp                       |   4 +-
 src/dialogs/tqfontdialog.h                         |   8 +-
 src/dialogs/tqinputdialog.cpp                      |   8 +-
 src/dialogs/tqinputdialog.h                        |  10 +-
 src/dialogs/tqmessagebox.cpp                       |  16 +-
 src/dialogs/tqmessagebox.h                         |   8 +-
 src/dialogs/tqprintdialog.cpp                      |  50 ++---
 src/dialogs/tqprintdialog.h                        |   4 +-
 src/dialogs/tqprogressdialog.cpp                   |   4 +-
 src/dialogs/tqprogressdialog.h                     |   4 +-
 src/dialogs/tqtabdialog.cpp                        |  26 +--
 src/dialogs/tqtabdialog.h                          |   2 +-
 src/dialogs/tqwizard.cpp                           |  16 +-
 src/dialogs/tqwizard.h                             |   2 +-
 src/inputmethod/tqinputcontextfactory.cpp          |   6 +-
 src/inputmethod/tqinputcontextplugin.cpp           |   2 +-
 src/kernel/tqabstractlayout.cpp                    |  28 +--
 src/kernel/tqaccel.cpp                             |  24 +-
 src/kernel/tqaccel.h                               |   4 +-
 src/kernel/tqaccessible.cpp                        |  16 +-
 src/kernel/tqapplication.cpp                       | 192 ++++++++--------
 src/kernel/tqapplication.h                         |  12 +-
 src/kernel/tqapplication_p.h                       |   2 +-
 src/kernel/tqapplication_x11.cpp                   | 214 +++++++++---------
 src/kernel/tqasyncimageio.cpp                      |  10 +-
 src/kernel/tqasyncio.cpp                           |   2 +-
 src/kernel/tqbitmap.h                              |   2 +-
 src/kernel/tqclipboard.h                           |   2 +-
 src/kernel/tqclipboard_x11.cpp                     |  70 +++---
 src/kernel/tqcolor.h                               |   2 +-
 src/kernel/tqcolor_x11.cpp                         |  20 +-
 src/kernel/tqconnection.cpp                        |   2 +-
 src/kernel/tqconnection.h                          |   2 +-
 src/kernel/tqcursor_x11.cpp                        |  12 +-
 src/kernel/tqdesktopwidget.h                       |   2 +-
 src/kernel/tqdesktopwidget_x11.cpp                 |  12 +-
 src/kernel/tqdnd_x11.cpp                           | 138 ++++++------
 src/kernel/tqdragobject.cpp                        |  42 ++--
 src/kernel/tqdragobject.h                          |  20 +-
 src/kernel/tqdrawutil.cpp                          |   2 +-
 src/kernel/tqdrawutil.h                            |  22 +-
 src/kernel/tqevent.cpp                             |   2 +-
 src/kernel/tqevent.h                               |   2 +-
 src/kernel/tqeventloop.cpp                         |   4 +-
 src/kernel/tqeventloop.h                           |   2 +-
 src/kernel/tqeventloop_unix.cpp                    |  28 +--
 src/kernel/tqeventloop_unix_glib.cpp               |  18 +-
 src/kernel/tqeventloop_x11.cpp                     |  12 +-
 src/kernel/tqeventloop_x11_glib.cpp                |   6 +-
 src/kernel/tqfont.cpp                              | 122 +++++-----
 src/kernel/tqfont_x11.cpp                          |  28 +--
 src/kernel/tqfontdata_p.h                          |   2 +-
 src/kernel/tqfontdatabase.cpp                      |  80 +++----
 src/kernel/tqfontdatabase_x11.cpp                  |  56 ++---
 src/kernel/tqfontengine_p.h                        |   8 +-
 src/kernel/tqfontengine_x11.cpp                    |  62 ++---
 src/kernel/tqfontmetrics.h                         |   4 +-
 src/kernel/tqgplugin.cpp                           |   2 +-
 src/kernel/tqguardedptr.cpp                        |   4 +-
 src/kernel/tqguardedptr.h                          |   8 +-
 src/kernel/tqiconset.cpp                           |  44 ++--
 src/kernel/tqimage.cpp                             |  74 +++---
 src/kernel/tqimage.h                               |  16 +-
 src/kernel/tqimageformatplugin.cpp                 |   2 +-
 src/kernel/tqinputcontext.cpp                      |  12 +-
 src/kernel/tqinputcontext.h                        |   4 +-
 src/kernel/tqinputcontext_p.h                      |   4 +-
 src/kernel/tqinternal.cpp                          |  56 ++---
 src/kernel/tqinternal_p.h                          |   4 +-
 src/kernel/tqjpegio.cpp                            |   6 +-
 src/kernel/tqkeysequence.cpp                       |   2 +-
 src/kernel/tqlayout.cpp                            |  54 ++---
 src/kernel/tqlayout.h                              |  36 +--
 src/kernel/tqlocalfs.cpp                           |   2 +-
 src/kernel/tqmetaobject.cpp                        |  88 ++++----
 src/kernel/tqmetaobject.h                          |   6 +-
 src/kernel/tqmime.cpp                              |  20 +-
 src/kernel/tqmngio.cpp                             |  18 +-
 src/kernel/tqmotifdnd_x11.cpp                      |  22 +-
 src/kernel/tqmovie.cpp                             |  28 +--
 src/kernel/tqmovie.h                               |   6 +-
 src/kernel/tqnetworkprotocol.cpp                   |  16 +-
 src/kernel/tqobject.cpp                            | 122 +++++-----
 src/kernel/tqobject.h                              |  16 +-
 src/kernel/tqobjectcleanuphandler.cpp              |   6 +-
 src/kernel/tqobjectdefs.h                          |   4 +-
 src/kernel/tqpaintdevice.h                         |   2 +-
 src/kernel/tqpaintdevice_x11.cpp                   |  32 +--
 src/kernel/tqpainter.cpp                           |  44 ++--
 src/kernel/tqpainter.h                             |  12 +-
 src/kernel/tqpainter_x11.cpp                       |  96 ++++----
 src/kernel/tqpalette.cpp                           |   4 +-
 src/kernel/tqpicture.cpp                           |   2 +-
 src/kernel/tqpicture.h                             |   8 +-
 src/kernel/tqpixmap.cpp                            |   8 +-
 src/kernel/tqpixmap.h                              |   8 +-
 src/kernel/tqpixmap_x11.cpp                        |  78 +++----
 src/kernel/tqpixmapcache.cpp                       |   8 +-
 src/kernel/tqpngio.cpp                             |  76 +++----
 src/kernel/tqpointarray.cpp                        |   6 +-
 src/kernel/tqpolygonscanner.cpp                    |  20 +-
 src/kernel/tqprinter.h                             |   2 +-
 src/kernel/tqprinter_unix.cpp                      |  24 +-
 src/kernel/tqprocess.cpp                           |  12 +-
 src/kernel/tqprocess.h                             |  12 +-
 src/kernel/tqprocess_unix.cpp                      |  94 ++++----
 src/kernel/tqpsprinter.cpp                         |  94 ++++----
 src/kernel/tqregion_x11.cpp                        |  26 +--
 src/kernel/tqrichtext.cpp                          | 210 ++++++++---------
 src/kernel/tqrichtext_p.cpp                        |  22 +-
 src/kernel/tqrichtext_p.h                          |  62 ++---
 src/kernel/tqscriptengine_x11.cpp                  | 102 ++++-----
 src/kernel/tqsignal.cpp                            |   2 +-
 src/kernel/tqsignal.h                              |   4 +-
 src/kernel/tqsignalmapper.h                        |   2 +-
 src/kernel/tqsignalslotimp.h                       |   2 +-
 src/kernel/tqsimplerichtext.cpp                    |   8 +-
 src/kernel/tqsimplerichtext.h                      |   6 +-
 src/kernel/tqsizegrip.cpp                          |   2 +-
 src/kernel/tqsizegrip.h                            |   2 +-
 src/kernel/tqsocketnotifier.h                      |   2 +-
 src/kernel/tqsound.cpp                             |   6 +-
 src/kernel/tqsound.h                               |   2 +-
 src/kernel/tqsound_x11.cpp                         |   4 +-
 src/kernel/tqstyle.cpp                             |  12 +-
 src/kernel/tqstyle.h                               |  36 +--
 src/kernel/tqstylesheet.cpp                        |  12 +-
 src/kernel/tqstylesheet.h                          |   2 +-
 src/kernel/tqtextengine_p.h                        |   4 +-
 src/kernel/tqtextlayout.cpp                        |   2 +-
 src/kernel/tqtextlayout_p.h                        |   6 +-
 src/kernel/tqthread_unix.cpp                       |  38 ++--
 src/kernel/tqtimer.cpp                             |   6 +-
 src/kernel/tqtimer.h                               |   2 +-
 src/kernel/tqtranslator.cpp                        |  56 ++---
 src/kernel/tqtranslator.h                          |   8 +-
 src/kernel/tqucomextra.cpp                         |   4 +-
 src/kernel/tqurl.cpp                               |   2 +-
 src/kernel/tqurlinfo.cpp                           |  12 +-
 src/kernel/tqurloperator.cpp                       |  34 +--
 src/kernel/tqurloperator.h                         |   2 +-
 src/kernel/tqvariant.cpp                           |   6 +-
 src/kernel/tqvariant.h                             |  12 +-
 src/kernel/tqwidget.cpp                            | 110 ++++-----
 src/kernel/tqwidget.h                              |   8 +-
 src/kernel/tqwidget_x11.cpp                        |  48 ++--
 src/kernel/tqwmatrix.h                             |   2 +-
 src/network/tqdns.cpp                              |  88 ++++----
 src/network/tqftp.cpp                              |  32 +--
 src/network/tqftp.h                                |   4 +-
 src/network/tqhttp.cpp                             |  52 ++---
 src/network/tqhttp.h                               |  14 +-
 src/network/tqserversocket.cpp                     |   6 +-
 src/network/tqserversocket.h                       |   6 +-
 src/network/tqsocket.cpp                           |  64 +++---
 src/network/tqsocket.h                             |   2 +-
 src/network/tqsocketdevice.cpp                     |   2 +-
 src/network/tqsocketdevice.h                       |   2 +-
 src/network/tqsocketdevice_unix.cpp                |   8 +-
 src/opengl/tqgl.cpp                                |   8 +-
 src/opengl/tqgl.h                                  |  22 +-
 src/opengl/tqgl_x11.cpp                            |  58 ++---
 src/opengl/tqglcolormap.cpp                        |  10 +-
 src/sql/drivers/cache/tqsqlcachedresult.cpp        |  10 +-
 src/sql/drivers/ibase/tqsql_ibase.cpp              |  24 +-
 src/sql/drivers/ibase/tqsql_ibase.h                |   4 +-
 src/sql/drivers/mysql/tqsql_mysql.cpp              |  12 +-
 src/sql/drivers/mysql/tqsql_mysql.h                |   4 +-
 src/sql/drivers/odbc/tqsql_odbc.cpp                |   8 +-
 src/sql/drivers/odbc/tqsql_odbc.h                  |   4 +-
 src/sql/drivers/psql/tqsql_psql.cpp                |   8 +-
 src/sql/drivers/psql/tqsql_psql.h                  |   4 +-
 src/sql/drivers/sqlite/tqsql_sqlite.cpp            |  36 +--
 src/sql/drivers/sqlite/tqsql_sqlite.h              |   4 +-
 src/sql/drivers/sqlite3/tqsql_sqlite3.cpp          |  20 +-
 src/sql/drivers/sqlite3/tqsql_sqlite3.h            |   4 +-
 src/sql/tqdatabrowser.h                            |   2 +-
 src/sql/tqdatatable.cpp                            |  42 ++--
 src/sql/tqdatatable.h                              |   6 +-
 src/sql/tqdataview.h                               |   2 +-
 src/sql/tqeditorfactory.cpp                        |  12 +-
 src/sql/tqeditorfactory.h                          |   2 +-
 src/sql/tqsqlcursor.cpp                            |  10 +-
 src/sql/tqsqlcursor.h                              |   2 +-
 src/sql/tqsqldatabase.cpp                          |  26 +--
 src/sql/tqsqldatabase.h                            |   4 +-
 src/sql/tqsqldriver.h                              |   2 +-
 src/sql/tqsqldriverplugin.cpp                      |   2 +-
 src/sql/tqsqleditorfactory.cpp                     |  14 +-
 src/sql/tqsqleditorfactory.h                       |   2 +-
 src/sql/tqsqlform.cpp                              |  22 +-
 src/sql/tqsqlform.h                                |   2 +-
 src/sql/tqsqlmanager_p.cpp                         |   4 +-
 src/sql/tqsqlpropertymap.cpp                       |   8 +-
 src/sql/tqsqlquery.cpp                             |   8 +-
 src/sql/tqsqlquery.h                               |   2 +-
 src/sql/tqsqlrecord.cpp                            |  12 +-
 src/sql/tqsqlselectcursor.h                        |  10 +-
 src/styles/tqcdestyle.h                            |   4 +-
 src/styles/tqcommonstyle.cpp                       |  78 +++----
 src/styles/tqcommonstyle.h                         |  18 +-
 src/styles/tqcompactstyle.h                        |   4 +-
 src/styles/tqinterlacestyle.cpp                    |   2 +-
 src/styles/tqinterlacestyle.h                      |   6 +-
 src/styles/tqmotifplusstyle.cpp                    |   4 +-
 src/styles/tqmotifplusstyle.h                      |  10 +-
 src/styles/tqmotifstyle.cpp                        |   2 +-
 src/styles/tqmotifstyle.h                          |  14 +-
 src/styles/tqplatinumstyle.h                       |   8 +-
 src/styles/tqsgistyle.cpp                          |   2 +-
 src/styles/tqsgistyle.h                            |  10 +-
 src/styles/tqstylefactory.cpp                      |  10 +-
 src/styles/tqstyleplugin.cpp                       |   2 +-
 src/styles/tqwindowsstyle.cpp                      |   2 +-
 src/styles/tqwindowsstyle.h                        |  12 +-
 src/table/tqtable.cpp                              | 104 ++++-----
 src/table/tqtable.h                                |   4 +-
 src/tools/tqasciidict.h                            |   2 +-
 src/tools/tqbuffer.cpp                             |   4 +-
 src/tools/tqcleanuphandler.h                       |  16 +-
 src/tools/tqcom_p.h                                |   2 +-
 src/tools/tqcomlibrary.cpp                         |  28 +--
 src/tools/tqcomponentfactory.cpp                   |  12 +-
 src/tools/tqcomponentfactory_p.h                   |   2 +-
 src/tools/tqcstring.cpp                            |  10 +-
 src/tools/tqcstring.h                              |  22 +-
 src/tools/tqdatastream.cpp                         |   6 +-
 src/tools/tqdatetime.cpp                           |  14 +-
 src/tools/tqdatetime.h                             |   2 +-
 src/tools/tqdict.h                                 |   4 +-
 src/tools/tqdir.cpp                                |  14 +-
 src/tools/tqdir_unix.cpp                           |   2 +-
 src/tools/tqfile.cpp                               |   6 +-
 src/tools/tqfile_unix.cpp                          |   2 +-
 src/tools/tqfileinfo.cpp                           |  22 +-
 src/tools/tqfileinfo_unix.cpp                      |   2 +-
 src/tools/tqgarray.cpp                             |  18 +-
 src/tools/tqgarray.h                               |   2 +-
 src/tools/tqgcache.cpp                             |  58 ++---
 src/tools/tqgdict.cpp                              | 100 ++++-----
 src/tools/tqgdict.h                                |  22 +-
 src/tools/tqglist.cpp                              | 100 ++++-----
 src/tools/tqglist.h                                |  16 +-
 src/tools/tqglobal.cpp                             |  10 +-
 src/tools/tqglobal.h                               |   2 +-
 src/tools/tqgpluginmanager.cpp                     |  18 +-
 src/tools/tqgvector.cpp                            |  42 ++--
 src/tools/tqintdict.h                              |   4 +-
 src/tools/tqlibrary.cpp                            |   8 +-
 src/tools/tqlibrary_unix.cpp                       |   6 +-
 src/tools/tqlocale.cpp                             |  84 +++----
 src/tools/tqlocale.h                               |  20 +-
 src/tools/tqmap.cpp                                |  28 +--
 src/tools/tqmap.h                                  |  38 ++--
 src/tools/tqmemarray.h                             |   2 +-
 src/tools/tqmutexpool.cpp                          |   8 +-
 src/tools/tqptrdict.h                              |   4 +-
 src/tools/tqptrlist.h                              |   2 +-
 src/tools/tqregexp.cpp                             |  58 ++---
 src/tools/tqregexp.h                               |   2 +-
 src/tools/tqsettings.h                             |  24 +-
 src/tools/tqstring.cpp                             |  70 +++---
 src/tools/tqstring.h                               |  22 +-
 src/tools/tqtextstream.cpp                         |  30 +--
 src/tools/tqthreadstorage_unix.cpp                 |   8 +-
 src/tools/tqucom.cpp                               |   8 +-
 src/tools/tqvaluelist.h                            |   4 +-
 src/tools/tqvaluevector.h                          |  24 +-
 src/tools/tqwaitcondition_unix.cpp                 |   4 +-
 src/widgets/tqaction.cpp                           |  46 ++--
 src/widgets/tqaction.h                             |  12 +-
 src/widgets/tqbutton.cpp                           |  12 +-
 src/widgets/tqbutton.h                             |   2 +-
 src/widgets/tqbuttongroup.cpp                      |  24 +-
 src/widgets/tqbuttongroup.h                        |   8 +-
 src/widgets/tqcheckbox.cpp                         |   2 +-
 src/widgets/tqcheckbox.h                           |   4 +-
 src/widgets/tqcombobox.cpp                         |  34 +--
 src/widgets/tqcombobox.h                           |   4 +-
 src/widgets/tqdatetimeedit.cpp                     |  24 +-
 src/widgets/tqdatetimeedit.h                       |  16 +-
 src/widgets/tqdial.h                               |   6 +-
 src/widgets/tqdockarea.cpp                         |  38 ++--
 src/widgets/tqdockarea.h                           |   6 +-
 src/widgets/tqdockwindow.cpp                       |  38 ++--
 src/widgets/tqdockwindow.h                         |   6 +-
 src/widgets/tqeffects.cpp                          |  14 +-
 src/widgets/tqframe.h                              |   2 +-
 src/widgets/tqgrid.h                               |   4 +-
 src/widgets/tqgridview.h                           |   2 +-
 src/widgets/tqgroupbox.cpp                         |  30 +--
 src/widgets/tqgroupbox.h                           |   8 +-
 src/widgets/tqhbox.h                               |   2 +-
 src/widgets/tqhbuttongroup.h                       |   4 +-
 src/widgets/tqheader.cpp                           |   6 +-
 src/widgets/tqheader.h                             |   4 +-
 src/widgets/tqhgroupbox.h                          |   4 +-
 src/widgets/tqiconview.cpp                         | 204 ++++++++---------
 src/widgets/tqiconview.h                           |  12 +-
 src/widgets/tqlabel.cpp                            |  44 ++--
 src/widgets/tqlabel.h                              |   6 +-
 src/widgets/tqlcdnumber.cpp                        |   6 +-
 src/widgets/tqlcdnumber.h                          |   6 +-
 src/widgets/tqlineedit.cpp                         |   8 +-
 src/widgets/tqlineedit.h                           |   6 +-
 src/widgets/tqlistbox.cpp                          | 114 +++++-----
 src/widgets/tqlistbox.h                            |   4 +-
 src/widgets/tqlistview.cpp                         | 250 ++++++++++-----------
 src/widgets/tqlistview.h                           |   2 +-
 src/widgets/tqmainwindow.cpp                       |  44 ++--
 src/widgets/tqmainwindow.h                         |   2 +-
 src/widgets/tqmenubar.cpp                          |  26 +--
 src/widgets/tqmenubar.h                            |   2 +-
 src/widgets/tqmenudata.cpp                         |  70 +++---
 src/widgets/tqmenudata.h                           |   4 +-
 src/widgets/tqmultilineedit.h                      |   2 +-
 src/widgets/tqpopupmenu.cpp                        |  64 +++---
 src/widgets/tqpopupmenu.h                          |   2 +-
 src/widgets/tqprogressbar.h                        |   4 +-
 src/widgets/tqpushbutton.cpp                       |  18 +-
 src/widgets/tqpushbutton.h                         |   6 +-
 src/widgets/tqradiobutton.h                        |   4 +-
 src/widgets/tqrangecontrol.cpp                     |   4 +-
 src/widgets/tqrangecontrol.h                       |   2 +-
 src/widgets/tqscrollbar.cpp                        |   6 +-
 src/widgets/tqscrollbar.h                          |   6 +-
 src/widgets/tqscrollview.cpp                       |  24 +-
 src/widgets/tqscrollview.h                         |   2 +-
 src/widgets/tqslider.cpp                           |   4 +-
 src/widgets/tqslider.h                             |   6 +-
 src/widgets/tqspinbox.cpp                          |   4 +-
 src/widgets/tqspinbox.h                            |   4 +-
 src/widgets/tqspinwidget.cpp                       |   4 +-
 src/widgets/tqsplashscreen.cpp                     |   2 +-
 src/widgets/tqsplitter.cpp                         |  18 +-
 src/widgets/tqsplitter.h                           |   6 +-
 src/widgets/tqstatusbar.cpp                        |  16 +-
 src/widgets/tqstatusbar.h                          |   2 +-
 src/widgets/tqsyntaxhighlighter.cpp                |  10 +-
 src/widgets/tqsyntaxhighlighter_p.h                |   4 +-
 src/widgets/tqtabbar.cpp                           |  62 ++---
 src/widgets/tqtabbar.h                             |   4 +-
 src/widgets/tqtabwidget.cpp                        |  10 +-
 src/widgets/tqtabwidget.h                          |   2 +-
 src/widgets/tqtextbrowser.cpp                      |   4 +-
 src/widgets/tqtextbrowser.h                        |   2 +-
 src/widgets/tqtextedit.cpp                         |  88 ++++----
 src/widgets/tqtextedit.h                           |  14 +-
 src/widgets/tqtextview.h                           |   4 +-
 src/widgets/tqtitlebar.cpp                         |  10 +-
 src/widgets/tqtitlebar_p.h                         |   2 +-
 src/widgets/tqtoolbar.cpp                          |  28 +--
 src/widgets/tqtoolbar.h                            |   6 +-
 src/widgets/tqtoolbox.cpp                          |  26 +--
 src/widgets/tqtoolbox.h                            |   2 +-
 src/widgets/tqtoolbutton.cpp                       |  12 +-
 src/widgets/tqtoolbutton.h                         |   6 +-
 src/widgets/tqtooltip.cpp                          |  62 ++---
 src/widgets/tqtooltip.h                            |   2 +-
 src/widgets/tqvalidator.h                          |  14 +-
 src/widgets/tqvbox.h                               |   2 +-
 src/widgets/tqvbuttongroup.h                       |   4 +-
 src/widgets/tqvgroupbox.h                          |   4 +-
 src/widgets/tqwhatsthis.cpp                        |  28 +--
 src/widgets/tqwhatsthis.h                          |   4 +-
 src/widgets/tqwidgetinterface_p.h                  |   2 +-
 src/widgets/tqwidgetplugin.cpp                     |   2 +-
 src/widgets/tqwidgetplugin.h                       |   2 +-
 src/widgets/tqwidgetresizehandler.cpp              |   2 +-
 src/widgets/tqwidgetresizehandler_p.h              |   2 +-
 src/widgets/tqwidgetstack.cpp                      |  20 +-
 src/widgets/tqwidgetstack.h                        |   2 +-
 src/workspace/tqworkspace.cpp                      | 124 +++++-----
 src/workspace/tqworkspace.h                        |   4 +-
 src/xml/tqdom.cpp                                  | 194 ++++++++--------
 src/xml/tqdom.h                                    |  20 +-
 src/xml/tqsvgdevice.cpp                            |  18 +-
 src/xml/tqsvgdevice_p.h                            |   2 +-
 src/xml/tqxml.cpp                                  | 112 ++++-----
 src/xml/tqxml.h                                    |   8 +-
 tools/assistant/config.cpp                         |   2 +-
 tools/assistant/finddialog.ui.h                    |   2 +-
 tools/assistant/helpdialogimpl.cpp                 |   4 +-
 tools/assistant/helpdialogimpl.h                   |   2 +-
 tools/assistant/helpwindow.h                       |   2 +-
 tools/assistant/index.cpp                          |   6 +-
 tools/assistant/lib/tqassistantclient.cpp          |   4 +-
 tools/assistant/lib/tqassistantclient.h            |   2 +-
 tools/assistant/main.cpp                           |   8 +-
 tools/assistant/mainwindow.ui.h                    |  10 +-
 tools/assistant/settingsdialogimpl.h               |   2 +-
 tools/assistant/tabbedbrowser.ui.h                 |   2 +-
 tools/designer/designer/actiondnd.cpp              |  44 ++--
 tools/designer/designer/actiondnd.h                |   8 +-
 tools/designer/designer/actioneditorimpl.cpp       |  14 +-
 tools/designer/designer/actioneditorimpl.h         |   2 +-
 tools/designer/designer/actionlistview.cpp         |   8 +-
 tools/designer/designer/actionlistview.h           |  10 +-
 tools/designer/designer/asciivalidator.h           |   6 +-
 tools/designer/designer/command.cpp                |  68 +++---
 tools/designer/designer/configtoolboxdialog.ui.h   |  10 +-
 tools/designer/designer/connectiondialog.ui.h      |   6 +-
 tools/designer/designer/connectionitems.cpp        |   6 +-
 tools/designer/designer/customwidgeteditorimpl.cpp |  18 +-
 tools/designer/designer/database.cpp               |   6 +-
 tools/designer/designer/dbconnectionimpl.h         |   4 +-
 tools/designer/designer/dbconnectionsimpl.cpp      |   2 +-
 tools/designer/designer/dbconnectionsimpl.h        |   4 +-
 tools/designer/designer/designerapp.cpp            |   8 +-
 tools/designer/designer/designerappiface.cpp       |  22 +-
 tools/designer/designer/designerappiface.h         |   2 +-
 tools/designer/designer/editfunctionsimpl.cpp      |   4 +-
 tools/designer/designer/finddialog.ui.h            |   4 +-
 tools/designer/designer/formfile.cpp               |  24 +-
 tools/designer/designer/formfile.h                 |   2 +-
 tools/designer/designer/formsettingsimpl.cpp       |   2 +-
 tools/designer/designer/formwindow.cpp             |  92 ++++----
 tools/designer/designer/formwindow.h               |   8 +-
 tools/designer/designer/gotolinedialog.ui.h        |   2 +-
 tools/designer/designer/hierarchyview.cpp          | 124 +++++-----
 tools/designer/designer/hierarchyview.h            |   2 +-
 tools/designer/designer/iconvieweditorimpl.cpp     |   6 +-
 tools/designer/designer/layout.cpp                 |  20 +-
 tools/designer/designer/listboxdnd.cpp             |   6 +-
 tools/designer/designer/listboxdnd.h               |   2 +-
 tools/designer/designer/listboxeditorimpl.cpp      |  12 +-
 tools/designer/designer/listboxrename.cpp          |   4 +-
 tools/designer/designer/listboxrename.h            |   2 +-
 tools/designer/designer/listdnd.cpp                |   2 +-
 tools/designer/designer/listdnd.h                  |   2 +-
 tools/designer/designer/listeditor.ui.h            |   6 +-
 tools/designer/designer/listviewdnd.cpp            |  18 +-
 tools/designer/designer/listviewdnd.h              |   2 +-
 tools/designer/designer/listvieweditorimpl.cpp     |  12 +-
 tools/designer/designer/mainwindow.cpp             | 142 ++++++------
 tools/designer/designer/mainwindow.h               |   4 +-
 tools/designer/designer/mainwindowactions.cpp      | 172 +++++++-------
 tools/designer/designer/menubareditor.cpp          |  30 +--
 tools/designer/designer/menubareditor.h            |  10 +-
 tools/designer/designer/metadatabase.cpp           |  36 +--
 tools/designer/designer/multilineeditorimpl.cpp    |   4 +-
 tools/designer/designer/multilineeditorimpl.h      |   2 +-
 tools/designer/designer/newformimpl.cpp            |  10 +-
 tools/designer/designer/outputwindow.cpp           |  12 +-
 .../designer/paletteeditoradvancedimpl.cpp         |   6 +-
 .../designer/designer/paletteeditoradvancedimpl.h  |   4 +-
 tools/designer/designer/paletteeditorimpl.h        |   4 +-
 tools/designer/designer/pixmapchooser.cpp          |  10 +-
 tools/designer/designer/pixmapchooser.h            |   4 +-
 .../designer/designer/pixmapcollectioneditor.ui.h  |   2 +-
 tools/designer/designer/popupmenueditor.cpp        |  78 +++----
 tools/designer/designer/popupmenueditor.h          |  12 +-
 tools/designer/designer/previewframe.h             |   4 +-
 tools/designer/designer/previewwidgetimpl.cpp      |   2 +-
 tools/designer/designer/previewwidgetimpl.h        |   2 +-
 tools/designer/designer/project.cpp                |  24 +-
 tools/designer/designer/project.h                  |  10 +-
 tools/designer/designer/projectsettingsimpl.h      |   2 +-
 tools/designer/designer/propertyeditor.cpp         | 180 +++++++--------
 tools/designer/designer/propertyeditor.h           |   2 +-
 tools/designer/designer/propertyobject.cpp         |   2 +-
 tools/designer/designer/replacedialog.ui.h         |   8 +-
 tools/designer/designer/resource.cpp               |  94 ++++----
 tools/designer/designer/resource.h                 |   8 +-
 tools/designer/designer/sizehandle.cpp             |   6 +-
 tools/designer/designer/sourceeditor.cpp           |  22 +-
 tools/designer/designer/sourcefile.cpp             |   6 +-
 tools/designer/designer/startdialogimpl.cpp        |   4 +-
 tools/designer/designer/styledbutton.cpp           |   8 +-
 tools/designer/designer/styledbutton.h             |   4 +-
 tools/designer/designer/syntaxhighlighter_html.cpp |   2 +-
 tools/designer/designer/tableeditorimpl.h          |   4 +-
 tools/designer/designer/tqcompletionedit.cpp       |   2 +-
 tools/designer/designer/tqcompletionedit.h         |   2 +-
 tools/designer/designer/variabledialogimpl.cpp     |   6 +-
 tools/designer/designer/variabledialogimpl.h       |   2 +-
 tools/designer/designer/widgetaction.cpp           |   2 +-
 tools/designer/designer/widgetaction.h             |   6 +-
 tools/designer/designer/widgetfactory.cpp          |  66 +++---
 tools/designer/designer/widgetfactory.h            |  14 +-
 tools/designer/designer/wizardeditorimpl.cpp       |   2 +-
 tools/designer/designer/workspace.cpp              |  20 +-
 tools/designer/editor/browser.cpp                  |   8 +-
 tools/designer/editor/cindent.cpp                  |   4 +-
 tools/designer/editor/completion.cpp               |  10 +-
 tools/designer/editor/editor.h                     |   4 +-
 tools/designer/editor/markerwidget.cpp             |  10 +-
 tools/designer/editor/viewmanager.cpp              |   2 +-
 tools/designer/editor/yyindent.cpp                 |  20 +-
 .../designer/examples/addressbook/addressbook.ui.h |   4 +-
 tools/designer/examples/colortool/mainform.ui.h    |   2 +-
 tools/designer/examples/credit/creditform.h        |   2 +-
 tools/designer/examples/credit/creditformbase.h    |   2 +-
 .../examples/filechooser/plugin/plugin.cpp         |   2 +-
 .../designer/examples/filechooser/plugin/plugin.h  |   2 +-
 .../examples/filechooser/widget/filechooser.h      |   2 +-
 tools/designer/examples/opengl/main.cpp            |   6 +-
 tools/designer/examples/sizeaware/main.cpp         |   2 +-
 tools/designer/examples/sizeaware/sizeaware.h      |   2 +-
 tools/designer/examples/vcr/vcr.cpp                |   8 +-
 tools/designer/examples/vcr/vcr.h                  |   2 +-
 tools/designer/interfaces/actioninterface.h        |   2 +-
 tools/designer/interfaces/designerinterface.h      |   2 +-
 tools/designer/plugins/cppeditor/common.cpp        |   2 +-
 tools/designer/plugins/cppeditor/cppcompletion.cpp |   4 +-
 tools/designer/plugins/cppeditor/cppeditor.cpp     |   4 +-
 .../plugins/cppeditor/editorinterfaceimpl.cpp      |   6 +-
 .../plugins/cppeditor/languageinterfaceimpl.cpp    |   8 +-
 .../plugins/cppeditor/languageinterfaceimpl.h      |   2 +-
 .../plugins/cppeditor/mainfilesettings.ui.h        |   2 +-
 .../plugins/cppeditor/preferenceinterfaceimpl.cpp  |   8 +-
 .../plugins/cppeditor/preferenceinterfaceimpl.h    |   2 +-
 .../plugins/cppeditor/projectsettings.ui.h         |   4 +-
 .../cppeditor/projectsettingsinterfaceimpl.cpp     |   8 +-
 .../cppeditor/projectsettingsinterfaceimpl.h       |   2 +-
 .../cppeditor/sourcetemplateinterfaceimpl.cpp      |   6 +-
 .../plugins/cppeditor/syntaxhighliter_cpp.cpp      |   6 +-
 tools/designer/plugins/cppeditor/yyreg.cpp         |   2 +-
 tools/designer/plugins/dlg/dlg2ui.cpp              | 102 ++++-----
 tools/designer/plugins/dlg/main.cpp                |   2 +-
 tools/designer/plugins/glade/glade2ui.cpp          |  24 +-
 tools/designer/plugins/glade/main.cpp              |   2 +-
 tools/designer/plugins/kdevdlg/kdevdlg2ui.cpp      |   4 +-
 tools/designer/plugins/kdevdlg/main.cpp            |   2 +-
 tools/designer/plugins/rc/main.cpp                 |   2 +-
 tools/designer/plugins/rc/rc2ui.cpp                |   6 +-
 tools/designer/plugins/wizards/main.cpp            |   6 +-
 .../designer/plugins/wizards/mainwindowwizard.ui.h |  32 +--
 .../designer/plugins/wizards/sqlformwizardimpl.cpp |   2 +-
 tools/designer/plugins/wizards/sqlformwizardimpl.h |   4 +-
 tools/designer/shared/globaldefs.h                 |   6 +-
 tools/designer/shared/uib.h                        |   2 +-
 tools/designer/shared/widgetdatabase.cpp           |  20 +-
 tools/designer/tools/tqtconv2ui/main.cpp           |   6 +-
 tools/designer/tquic/form.cpp                      |   4 +-
 tools/designer/tquic/main.cpp                      |  14 +-
 tools/designer/tquic/object.cpp                    |   4 +-
 tools/designer/tquic/tquic.cpp                     |   2 +-
 tools/designer/tquic/tquic.h                       |   6 +-
 tools/designer/uilib/tqwidgetfactory.cpp           | 180 +++++++--------
 tools/designer/uilib/tqwidgetfactory.h             |   8 +-
 tools/linguist/linguist/finddialog.cpp             |   6 +-
 tools/linguist/linguist/finddialog.h               |   2 +-
 tools/linguist/linguist/main.cpp                   |   4 +-
 tools/linguist/linguist/msgedit.cpp                |  12 +-
 tools/linguist/linguist/msgedit.h                  |  12 +-
 tools/linguist/linguist/phrase.cpp                 |   4 +-
 tools/linguist/linguist/phrasebookbox.cpp          |  22 +-
 tools/linguist/linguist/phrasebookbox.h            |   2 +-
 tools/linguist/linguist/phraselv.cpp               |   2 +-
 tools/linguist/linguist/trwindow.cpp               | 108 ++++-----
 tools/linguist/lupdate/fetchtr.cpp                 |  12 +-
 tools/linguist/shared/metatranslator.cpp           |  22 +-
 tools/linguist/tqm2ts/main.cpp                     |   4 +-
 tools/linguist/tutorial/tt1/main.cpp               |   4 +-
 tools/linguist/tutorial/tt2/arrowpad.h             |   2 +-
 tools/linguist/tutorial/tt2/main.cpp               |   2 +-
 tools/linguist/tutorial/tt2/mainwindow.h           |   2 +-
 tools/linguist/tutorial/tt3/main.cpp               |   2 +-
 tools/linguist/tutorial/tt3/mainwindow.h           |   2 +-
 tools/linguist/tutorial/tt3/printpanel.h           |   2 +-
 tools/msg2tqm/msg2tqm.cpp                          |   8 +-
 tools/qtconfig/colorbutton.h                       |   4 +-
 tools/qtconfig/mainwindow.cpp                      |  10 +-
 tools/qtconfig/paletteeditoradvanced.cpp           |   2 +-
 tools/qtconfig/paletteeditoradvanced.h             |   4 +-
 tools/qtconfig/previewframe.h                      |   4 +-
 tools/qtconfig/previewwidget.cpp                   |   2 +-
 tools/qtconfig/previewwidget.h                     |   2 +-
 tools/tqconfig/main.cpp                            |   2 +-
 tools/tqconfig/main.h                              |   2 +-
 tutorial/t1/main.cpp                               |   2 +-
 tutorial/t10/cannon.h                              |   2 +-
 tutorial/t10/lcdrange.h                            |   2 +-
 tutorial/t10/main.cpp                              |   2 +-
 tutorial/t11/cannon.h                              |   2 +-
 tutorial/t11/lcdrange.h                            |   2 +-
 tutorial/t11/main.cpp                              |   2 +-
 tutorial/t12/cannon.h                              |   2 +-
 tutorial/t12/lcdrange.h                            |   6 +-
 tutorial/t12/main.cpp                              |   2 +-
 tutorial/t13/cannon.h                              |   2 +-
 tutorial/t13/gamebrd.h                             |   2 +-
 tutorial/t13/lcdrange.h                            |   4 +-
 tutorial/t14/cannon.h                              |   2 +-
 tutorial/t14/gamebrd.h                             |   2 +-
 tutorial/t14/lcdrange.h                            |   4 +-
 tutorial/t15/main.cpp                              |   2 +-
 tutorial/t2/main.cpp                               |   2 +-
 tutorial/t4/main.cpp                               |   2 +-
 tutorial/t5/main.cpp                               |   2 +-
 tutorial/t6/main.cpp                               |   4 +-
 tutorial/t7/lcdrange.h                             |   2 +-
 tutorial/t7/main.cpp                               |   4 +-
 tutorial/t8/cannon.h                               |   2 +-
 tutorial/t8/lcdrange.h                             |   2 +-
 tutorial/t8/main.cpp                               |   2 +-
 tutorial/t9/cannon.h                               |   2 +-
 tutorial/t9/lcdrange.h                             |   2 +-
 tutorial/t9/main.cpp                               |   2 +-
 815 files changed, 6035 insertions(+), 6035 deletions(-)

diff --git a/examples/aclock/aclock.h b/examples/aclock/aclock.h
index a4c86c768..0bdbfded5 100644
--- a/examples/aclock/aclock.h
+++ b/examples/aclock/aclock.h
@@ -18,7 +18,7 @@ class AnalogClock : public TQWidget		// analog clock widget
 {
     TQ_OBJECT
 public:
-    AnalogClock( TQWidget *parent=0, const char *name=0 );
+    AnalogClock( TQWidget *parent=nullptr, const char *name=nullptr );
     void setAutoMask(bool b);
     
 protected:
diff --git a/examples/action/application.cpp b/examples/action/application.cpp
index e1bc08022..55c9df808 100644
--- a/examples/action/application.cpp
+++ b/examples/action/application.cpp
@@ -36,7 +36,7 @@
 
 
 ApplicationWindow::ApplicationWindow()
-    : TQMainWindow( 0, "example application main window", WDestructiveClose )
+    : TQMainWindow( nullptr, "example application main window", WDestructiveClose )
 {
     printer = new TQPrinter( TQPrinter::HighResolution );
 
diff --git a/examples/addressbook/centralwidget.h b/examples/addressbook/centralwidget.h
index 3e2aa3b22..73c424789 100644
--- a/examples/addressbook/centralwidget.h
+++ b/examples/addressbook/centralwidget.h
@@ -26,7 +26,7 @@ class ABCentralWidget : public TQWidget
     TQ_OBJECT
 
 public:
-    ABCentralWidget( TQWidget *parent, const char *name = 0 );
+    ABCentralWidget( TQWidget *parent, const char *name = nullptr );
 
     void save( const TQString &filename );
     void load( const TQString &filename );
diff --git a/examples/addressbook/mainwindow.cpp b/examples/addressbook/mainwindow.cpp
index 894458413..fab15a7af 100644
--- a/examples/addressbook/mainwindow.cpp
+++ b/examples/addressbook/mainwindow.cpp
@@ -19,7 +19,7 @@
 #include <tqfiledialog.h>
 
 ABMainWindow::ABMainWindow()
-    : TQMainWindow( 0, "example addressbook application" ),
+    : TQMainWindow( nullptr, "example addressbook application" ),
       filename( TQString::null )
 {
     setupMenuBar();
diff --git a/examples/application/application.cpp b/examples/application/application.cpp
index 0fa030e5b..b6f2733df 100644
--- a/examples/application/application.cpp
+++ b/examples/application/application.cpp
@@ -34,7 +34,7 @@
 #include "fileprint.xpm"
 
 ApplicationWindow::ApplicationWindow()
-    : TQMainWindow( 0, "example application main window", WDestructiveClose | WGroupLeader )
+    : TQMainWindow( nullptr, "example application main window", WDestructiveClose | WGroupLeader )
 {
     printer = new TQPrinter( TQPrinter::HighResolution );
     TQPixmap openIcon, saveIcon, printIcon;
diff --git a/examples/biff/biff.h b/examples/biff/biff.h
index 26495881a..3a1293759 100644
--- a/examples/biff/biff.h
+++ b/examples/biff/biff.h
@@ -19,7 +19,7 @@ class Biff : public TQWidget
 {
     TQ_OBJECT
 public:
-    Biff( TQWidget *parent=0, const char *name=0 );
+    Biff( TQWidget *parent=nullptr, const char *name=nullptr );
 
 protected:
     void	timerEvent( TQTimerEvent * );
diff --git a/examples/buttongroups/buttongroups.h b/examples/buttongroups/buttongroups.h
index f7dd27653..a6a2cf95c 100644
--- a/examples/buttongroups/buttongroups.h
+++ b/examples/buttongroups/buttongroups.h
@@ -20,7 +20,7 @@ class ButtonsGroups : public TQWidget
     TQ_OBJECT
 
 public:
-    ButtonsGroups( TQWidget *parent = 0, const char *name = 0 );
+    ButtonsGroups( TQWidget *parent = nullptr, const char *name = nullptr );
 
 protected:
     TQCheckBox *state;
diff --git a/examples/canvas/canvas.cpp b/examples/canvas/canvas.cpp
index 4b5566ecf..d70acd52a 100644
--- a/examples/canvas/canvas.cpp
+++ b/examples/canvas/canvas.cpp
@@ -15,8 +15,8 @@
 
 // We use a global variable to save memory - all the brushes and pens in
 // the mesh are shared.
-static TQBrush *tb = 0;
-static TQPen *tp = 0;
+static TQBrush *tb = nullptr;
+static TQPen *tp = nullptr;
 
 class EdgeItem;
 class NodeItem;
@@ -170,7 +170,7 @@ void FigureEditor::contentsMousePressEvent(TQMouseEvent* e)
 	moving_start = p;
 	return;
     }
-    moving = 0;
+    moving = nullptr;
 }
 
 void FigureEditor::clear()
@@ -195,10 +195,10 @@ void FigureEditor::contentsMouseMoveEvent(TQMouseEvent* e)
 }
 
 static uint bouncyLogoCount = 0;
-static TQCanvasPixmapArray *logoarr = 0;
+static TQCanvasPixmapArray *logoarr = nullptr;
 
 BouncyLogo::BouncyLogo(TQCanvas* canvas) :
-    TQCanvasSprite(0,canvas)
+    TQCanvasSprite(nullptr,canvas)
 {
     if ( !logoarr ) {
 	logoarr = new TQCanvasPixmapArray("qt-trans.xpm");
@@ -304,8 +304,8 @@ void BouncyLogo::advance(int stage)
 
 // Some objects to cache among different views
 static uint mainCount = 0;
-static TQImage *butterflyimg = 0;
-static TQImage *logoimg = 0;
+static TQImage *butterflyimg = nullptr;
+static TQImage *logoimg = nullptr;
 
 Main::Main(TQCanvas& c, TQWidget* parent, const char* name, WFlags f) :
     TQMainWindow(parent,name,f),
@@ -368,7 +368,7 @@ Main::Main(TQCanvas& c, TQWidget* parent, const char* name, WFlags f) :
 
     setCentralWidget(editor);
 
-    printer = 0;
+    printer = nullptr;
 
     mainCount++;
 
@@ -399,12 +399,12 @@ Main::~Main()
     delete printer;
     if ( !--mainCount ) {
 	delete[] butterflyimg;
-	butterflyimg = 0;
+	butterflyimg = nullptr;
 	delete[] logoimg;
-	logoimg = 0;
+	logoimg = nullptr;
 	if ( bouncyLogoCount == 0 ) {
 	    delete logoarr;
-	    logoarr = 0;
+	    logoarr = nullptr;
 	}
     }
 }
@@ -412,10 +412,10 @@ Main::~Main()
 void Main::newView()
 {
     // Open a new view... have it delete when closed.
-    Main *m = new Main(canvas, 0, 0, WDestructiveClose);
+    Main *m = new Main(canvas, nullptr, nullptr, WDestructiveClose);
     tqApp->setMainWidget(m);
     m->show();
-    tqApp->setMainWidget(0);
+    tqApp->setMainWidget(nullptr);
 }
 
 void Main::clear()
@@ -433,7 +433,7 @@ void Main::help()
 		"<li> Press ALT-L for some lines."
 		"<li> Drag the objects around."
 		"<li> Read the code!"
-	    "</ul>", TQMessageBox::Information, 1, 0, 0, this, 0, false );
+	    "</ul>", TQMessageBox::Information, 1, 0, 0, this, nullptr, false );
     about->setButtonText( 1, "Dismiss" );
     about->show();
 }
@@ -701,7 +701,7 @@ void Main::addMesh()
     TQMemArray<NodeItem*> lastRow(cols);
     for ( int j = 0; j < rows; j++ ) {
 	int n = j%2 ? cols-1 : cols;
-	NodeItem *prev = 0;
+	NodeItem *prev = nullptr;
 	for ( int i = 0; i < n; i++ ) {
 	    NodeItem *el = new NodeItem( &canvas );
 	    nodecount++;
diff --git a/examples/canvas/canvas.h b/examples/canvas/canvas.h
index 963e56e4f..877f1bd87 100644
--- a/examples/canvas/canvas.h
+++ b/examples/canvas/canvas.h
@@ -21,7 +21,7 @@ class FigureEditor : public TQCanvasView {
     TQ_OBJECT
 
 public:
-    FigureEditor(TQCanvas&, TQWidget* parent=0, const char* name=0, WFlags f=0);
+    FigureEditor(TQCanvas&, TQWidget* parent=nullptr, const char* name=nullptr, WFlags f=0);
     void clear();
 
 protected:
@@ -40,7 +40,7 @@ class Main : public TQMainWindow {
     TQ_OBJECT
 
 public:
-    Main(TQCanvas&, TQWidget* parent=0, const char* name=0, WFlags f=0);
+    Main(TQCanvas&, TQWidget* parent=nullptr, const char* name=nullptr, WFlags f=0);
     ~Main();
 
 public slots:
diff --git a/examples/chart/canvasview.cpp b/examples/chart/canvasview.cpp
index 8207bc4e5..e6b086c2d 100644
--- a/examples/chart/canvasview.cpp
+++ b/examples/chart/canvasview.cpp
@@ -29,7 +29,7 @@ void CanvasView::contentsMousePressEvent( TQMouseEvent *e )
 	    m_pos = e->pos();
 	    return;
 	}
-    m_movingItem = 0;
+    m_movingItem = nullptr;
 }
 
 
diff --git a/examples/chart/canvasview.h b/examples/chart/canvasview.h
index 0bb176275..200c2d6f8 100644
--- a/examples/chart/canvasview.h
+++ b/examples/chart/canvasview.h
@@ -15,9 +15,9 @@ class CanvasView : public TQCanvasView
     TQ_OBJECT
 public:
     CanvasView( TQCanvas *canvas, ElementVector *elements,
-		TQWidget* parent = 0, const char* name = "canvas view",
+		TQWidget* parent = nullptr, const char* name = "canvas view",
 		WFlags f = 0 )
-	: TQCanvasView( canvas, parent, name, f ), m_movingItem(0),
+	: TQCanvasView( canvas, parent, name, f ), m_movingItem(nullptr),
 	  m_elements( elements ) {}
 
 protected:
diff --git a/examples/chart/chartform.cpp b/examples/chart/chartform.cpp
index 98ac96f6b..93b31505f 100644
--- a/examples/chart/chartform.cpp
+++ b/examples/chart/chartform.cpp
@@ -39,7 +39,7 @@ const TQString APP_KEY = "/Chart/";
 
 
 ChartForm::ChartForm( const TQString& filename )
-    : TQMainWindow( 0, 0, WDestructiveClose )
+    : TQMainWindow( nullptr, nullptr, WDestructiveClose )
 {
     setIcon( TQPixmap( options_piechart ) );
 
@@ -184,7 +184,7 @@ ChartForm::ChartForm( const TQString& filename )
     helpMenu->insertItem( "About &TQt", this, TQ_SLOT(helpAboutTQt()) );
 
 
-    m_printer = 0;
+    m_printer = nullptr;
     m_elements.resize( MAX_ELEMENTS );
 
     TQSettings settings;
diff --git a/examples/chart/optionsform.cpp b/examples/chart/optionsform.cpp
index 2b65eaeec..3a7691f2c 100644
--- a/examples/chart/optionsform.cpp
+++ b/examples/chart/optionsform.cpp
@@ -25,7 +25,7 @@ OptionsForm::OptionsForm( TQWidget* parent, const char* name,
 
     optionsFormLayout = new TQVBoxLayout( this, 11, 6 );
 
-    chartTypeLayout = new TQHBoxLayout( 0, 0, 6 );
+    chartTypeLayout = new TQHBoxLayout( nullptr, 0, 6 );
 
     chartTypeTextLabel = new TQLabel( "&Chart Type", this );
     chartTypeLayout->addWidget( chartTypeTextLabel );
@@ -39,7 +39,7 @@ OptionsForm::OptionsForm( TQWidget* parent, const char* name,
     chartTypeLayout->addWidget( chartTypeComboBox );
     optionsFormLayout->addLayout( chartTypeLayout );
 
-    fontLayout = new TQHBoxLayout( 0, 0, 6 );
+    fontLayout = new TQHBoxLayout( nullptr, 0, 6 );
 
     fontPushButton = new TQPushButton( "&Font...", this );
     fontLayout->addWidget( fontPushButton );
@@ -77,7 +77,7 @@ OptionsForm::OptionsForm( TQWidget* parent, const char* name,
     addValuesButtonGroupLayout->addWidget( asPercentageRadioButton );
     addValuesFrameLayout->addWidget( addValuesButtonGroup );
 
-    decimalPlacesLayout = new TQHBoxLayout( 0, 0, 6 );
+    decimalPlacesLayout = new TQHBoxLayout( nullptr, 0, 6 );
 
     decimalPlacesTextLabel = new TQLabel( "&Decimal Places", addValuesFrame );
     decimalPlacesLayout->addWidget( decimalPlacesTextLabel );
@@ -91,7 +91,7 @@ OptionsForm::OptionsForm( TQWidget* parent, const char* name,
 
     optionsFormLayout->addWidget( addValuesFrame );
 
-    buttonsLayout = new TQHBoxLayout( 0, 0, 6 );
+    buttonsLayout = new TQHBoxLayout( nullptr, 0, 6 );
     spacer = new TQSpacerItem( 0, 0,
 			      TQSizePolicy::Expanding, TQSizePolicy::Minimum );
     buttonsLayout->addItem( spacer );
diff --git a/examples/chart/optionsform.h b/examples/chart/optionsform.h
index 709f3c1ef..4a9eded8a 100644
--- a/examples/chart/optionsform.h
+++ b/examples/chart/optionsform.h
@@ -19,7 +19,7 @@ class OptionsForm : public TQDialog
 {
     TQ_OBJECT
 public:
-    OptionsForm( TQWidget* parent = 0, const char* name = "options form",
+    OptionsForm( TQWidget* parent = nullptr, const char* name = "options form",
 		 bool modal = false, WFlags f = 0 );
     ~OptionsForm() {}
 
diff --git a/examples/chart/setdataform.cpp b/examples/chart/setdataform.cpp
index de357abd7..28571ffec 100644
--- a/examples/chart/setdataform.cpp
+++ b/examples/chart/setdataform.cpp
@@ -59,7 +59,7 @@ SetDataForm::SetDataForm( ElementVector *elements, int decimalPlaces,
     th->setLabel( 4, "Color" );
     tableButtonBox->addWidget( table );
 
-    buttonBox = new TQHBoxLayout( 0, 0, 6, "button box layout" );
+    buttonBox = new TQHBoxLayout( nullptr, 0, 6, "button box layout" );
 
     colorPushButton = new TQPushButton( this, "color button" );
     colorPushButton->setText( "&Color..." );
diff --git a/examples/chart/setdataform.h b/examples/chart/setdataform.h
index 4cf7a4f9b..13b3a3271 100644
--- a/examples/chart/setdataform.h
+++ b/examples/chart/setdataform.h
@@ -16,7 +16,7 @@ class SetDataForm: public TQDialog
     TQ_OBJECT
 public:
     SetDataForm( ElementVector *elements, int decimalPlaces,
-		 TQWidget *parent = 0, const char *name = "set data form",
+		 TQWidget *parent = nullptr, const char *name = "set data form",
 		 bool modal = true, WFlags f = 0 );
     ~SetDataForm() {}
 
diff --git a/examples/checklists/checklists.cpp b/examples/checklists/checklists.cpp
index b584c6744..02b908591 100644
--- a/examples/checklists/checklists.cpp
+++ b/examples/checklists/checklists.cpp
@@ -50,7 +50,7 @@ CheckLists::CheckLists( TQWidget *parent, const char *name )
     parentList.append( new TQCheckListItem( lv1, "Parent Item 3", TQCheckListItem::CheckBoxController ) );
     parentList.append( new TQCheckListItem( lv1, "Parent Item 4", TQCheckListItem::CheckBoxController ) );
 
-    TQListViewItem *item = 0;
+    TQListViewItem *item = nullptr;
     unsigned int num = 1;
     // go through the list of parent items...
     for ( TQValueList<TQListViewItem*>::Iterator it = parentList.begin(); it != parentList.end();
diff --git a/examples/checklists/checklists.h b/examples/checklists/checklists.h
index 86bbd507e..1b299fa44 100644
--- a/examples/checklists/checklists.h
+++ b/examples/checklists/checklists.h
@@ -20,7 +20,7 @@ class CheckLists : public TQWidget
     TQ_OBJECT
 
 public:
-    CheckLists( TQWidget *parent = 0, const char *name = 0 );
+    CheckLists( TQWidget *parent = nullptr, const char *name = nullptr );
 
 protected:
     TQListView *lv1, *lv2;
diff --git a/examples/customlayout/border.cpp b/examples/customlayout/border.cpp
index 9e08c41c0..41a97135b 100644
--- a/examples/customlayout/border.cpp
+++ b/examples/customlayout/border.cpp
@@ -39,12 +39,12 @@ uint BorderLayoutIterator::count() const
 
 TQLayoutItem *BorderLayoutIterator::current()
 {
-    return idx < (int)count() ? list->at( idx )->item : 0;
+    return idx < (int)count() ? list->at( idx )->item : nullptr;
 }
 
 BorderLayout::BorderLayoutStruct *BorderLayoutIterator::currentStruct()
 {
-    return idx < (int)count() ? list->at( idx ) : 0;
+    return idx < (int)count() ? list->at( idx ) : nullptr;
 }
 
 void BorderLayoutIterator::toFirst()
@@ -61,8 +61,8 @@ TQLayoutItem *BorderLayoutIterator::next()
 TQLayoutItem *BorderLayoutIterator::takeCurrent()
 {
     BorderLayout::BorderLayoutStruct *b
-	= idx < int( list->count() ) ? list->take(  idx  ) : 0;
-    TQLayoutItem *item =  b ? b->item : 0;
+	= idx < int( list->count() ) ? list->take(  idx  ) : nullptr;
+    TQLayoutItem *item =  b ? b->item : nullptr;
     delete b;
     return item;
 }
@@ -135,8 +135,8 @@ void BorderLayout::doLayout( const TQRect &rct, bool /*testonly*/ )
 
     BorderLayoutIterator it( &list );
     BorderLayoutStruct *o;
-    BorderLayoutStruct *center = 0;
-    while ( ( o = it.currentStruct() ) != 0 ) {
+    BorderLayoutStruct *center = nullptr;
+    while ( ( o = it.currentStruct() ) ) {
 	++it;
 
 	if ( o->pos == North ) {
@@ -157,7 +157,7 @@ void BorderLayout::doLayout( const TQRect &rct, bool /*testonly*/ )
     h = rct.height() - nh - sh;
 
     it.toFirst();
-    while ( ( o = it.currentStruct() ) != 0 ) {
+    while ( ( o = it.currentStruct() ) ) {
 	++it;
 
 	if ( o->pos == West ) {
@@ -187,7 +187,7 @@ void BorderLayout::calcSize( SizeType st )
 
     BorderLayoutIterator it( &list );
     BorderLayoutStruct *o;
-    while ( ( o = it.currentStruct() ) != 0 ) {
+    while ( ( o = it.currentStruct() ) ) {
 	++it;
 	if ( o->pos == North ||
 	     o->pos == South ) {
diff --git a/examples/customlayout/border.h b/examples/customlayout/border.h
index d427bf1c4..8a6cb3af5 100644
--- a/examples/customlayout/border.h
+++ b/examples/customlayout/border.h
@@ -57,17 +57,17 @@ public:
     };
 
     BorderLayout( TQWidget *parent, int border = 0, int autoBorder = -1,
-		  const char *name = 0 )
+		  const char *name = nullptr )
 	: TQLayout( parent, border, autoBorder, name ), cached( 0, 0 ), mcached( 0, 0 ),
 	  sizeDirty( true ), msizeDirty( true )
     {}
 
-    BorderLayout( TQLayout* parent, int autoBorder = -1, const char *name = 0 )
+    BorderLayout( TQLayout* parent, int autoBorder = -1, const char *name = nullptr )
 	: TQLayout( parent, autoBorder, name  ), cached( 0, 0 ), mcached( 0, 0 ),
 	  sizeDirty( true ), msizeDirty( true )
     {}
 
-    BorderLayout( int autoBorder = -1, const char *name = 0 )
+    BorderLayout( int autoBorder = -1, const char *name = nullptr )
 	: TQLayout( autoBorder, name ), cached( 0, 0 ), mcached( 0, 0 ),
 	  sizeDirty( true ), msizeDirty( true )
     {}
diff --git a/examples/customlayout/card.cpp b/examples/customlayout/card.cpp
index dc3964e82..b1106bdbb 100644
--- a/examples/customlayout/card.cpp
+++ b/examples/customlayout/card.cpp
@@ -28,7 +28,7 @@ private:
 
 TQLayoutItem *CardLayoutIterator::current()
 {
-    return idx < int( list->count() ) ? list->at( idx ) : 0;
+    return idx < int( list->count() ) ? list->at( idx ) : nullptr;
 }
 
 TQLayoutItem *CardLayoutIterator::next()
@@ -38,7 +38,7 @@ TQLayoutItem *CardLayoutIterator::next()
 
 TQLayoutItem *CardLayoutIterator::takeCurrent()
 {
-    return idx < int( list->count() ) ?list->take( idx ) : 0;
+    return idx < int( list->count() ) ?list->take( idx ) : nullptr;
 }
 
 
@@ -73,7 +73,7 @@ void CardLayout::setGeometry( const TQRect &rct )
     int w = rct.width() - ( list.count() - 1 ) * spacing();
     int h = rct.height() - ( list.count() - 1 ) * spacing();
 
-    while ( ( o=it.current() ) != 0 ) {
+    while ( ( o=it.current() ) ) {
 	++it;
 	TQRect geom( rct.x() + i * spacing(), rct.y() + i * spacing(),
 		    w, h  );
@@ -90,7 +90,7 @@ TQSize CardLayout::sizeHint() const
 	s = TQSize(100,70); //start with a nice default size
     TQPtrListIterator<TQLayoutItem> it(list);
     TQLayoutItem *o;
-    while ( (o=it.current()) != 0 ) {
+    while ( (o=it.current()) ) {
 	++it;
 	s = s.expandedTo( o->minimumSize() );
     }
@@ -103,7 +103,7 @@ TQSize CardLayout::minimumSize() const
     int n = list.count();
     TQPtrListIterator<TQLayoutItem> it(list);
     TQLayoutItem *o;
-    while ( (o=it.current()) != 0 ) {
+    while ( (o=it.current()) ) {
 	++it;
 	s = s.expandedTo( o->minimumSize() );
     }
diff --git a/examples/customlayout/flow.cpp b/examples/customlayout/flow.cpp
index 9b5e5bc4d..45919bd57 100644
--- a/examples/customlayout/flow.cpp
+++ b/examples/customlayout/flow.cpp
@@ -33,7 +33,7 @@ uint SimpleFlowIterator::count() const
 
 TQLayoutItem *SimpleFlowIterator::current()
 {
-    return idx < int(count()) ? list->at(idx) : 0;
+    return idx < int(count()) ? list->at(idx) : nullptr;
 }
 
 TQLayoutItem *SimpleFlowIterator::next()
@@ -43,7 +43,7 @@ TQLayoutItem *SimpleFlowIterator::next()
 
 TQLayoutItem *SimpleFlowIterator::takeCurrent()
 {
-    return idx < int(count()) ? list->take( idx ) : 0;
+    return idx < int(count()) ? list->take( idx ) : nullptr;
 }
 
 SimpleFlow::~SimpleFlow()
@@ -103,7 +103,7 @@ int SimpleFlow::doLayout( const TQRect &r, bool testonly )
     int h = 0;		//height of this line so far.
     TQPtrListIterator<TQLayoutItem> it(list);
     TQLayoutItem *o;
-    while ( (o=it.current()) != 0 ) {
+    while ( (o=it.current()) ) {
 	++it;
 	int nextX = x + o->sizeHint().width() + spacing();
 	if ( nextX - spacing() > r.right() && h > 0 ) {
@@ -125,7 +125,7 @@ TQSize SimpleFlow::minimumSize() const
     TQSize s(0,0);
     TQPtrListIterator<TQLayoutItem> it(list);
     TQLayoutItem *o;
-    while ( (o=it.current()) != 0 ) {
+    while ( (o=it.current()) ) {
 	++it;
 	s = s.expandedTo( o->minimumSize() );
     }
diff --git a/examples/customlayout/flow.h b/examples/customlayout/flow.h
index ff5bc14f8..3dde827e4 100644
--- a/examples/customlayout/flow.h
+++ b/examples/customlayout/flow.h
@@ -21,13 +21,13 @@ class SimpleFlow : public TQLayout
 {
 public:
     SimpleFlow( TQWidget *parent, int border=0, int space=-1,
-		const char *name=0 )
+		const char *name=nullptr )
 	: TQLayout( parent, border, space, name ),
 	cached_width(0) {}
-    SimpleFlow( TQLayout* parent, int space=-1, const char *name=0 )
+    SimpleFlow( TQLayout* parent, int space=-1, const char *name=nullptr )
 	: TQLayout( parent, space, name ),
 	cached_width(0) {}
-    SimpleFlow( int space=-1, const char *name=0 )
+    SimpleFlow( int space=-1, const char *name=nullptr )
 	: TQLayout( space, name ),
 	cached_width(0) {}
 
diff --git a/examples/dclock/dclock.h b/examples/dclock/dclock.h
index 4a0aded50..a9dfa37e3 100644
--- a/examples/dclock/dclock.h
+++ b/examples/dclock/dclock.h
@@ -17,7 +17,7 @@ class DigitalClock : public TQLCDNumber		// digital clock widget
 {
     TQ_OBJECT
 public:
-    DigitalClock( TQWidget *parent=0, const char *name=0 );
+    DigitalClock( TQWidget *parent=nullptr, const char *name=nullptr );
 
 protected:					// event handlers
     void	timerEvent( TQTimerEvent * );
diff --git a/examples/demo/display.h b/examples/demo/display.h
index b4b405ae3..802f730e7 100644
--- a/examples/demo/display.h
+++ b/examples/demo/display.h
@@ -26,7 +26,7 @@ class Curve;
 class DisplayWidget : public TQWidget {
     TQ_OBJECT
 public:
-    DisplayWidget( TQWidget *parent=0, const char *name=0 );
+    DisplayWidget( TQWidget *parent=nullptr, const char *name=nullptr );
 
     void run();
     void stop();
@@ -54,7 +54,7 @@ class Screen : public TQFrame {
     TQ_OBJECT
 public:
     enum { FrameWidth = 3 };
-    Screen( TQWidget *parent=0, const char *name=0 );
+    Screen( TQWidget *parent=nullptr, const char *name=nullptr );
     ~Screen();
     
     void animate();
@@ -77,7 +77,7 @@ class Curve : public TQFrame {
     TQ_OBJECT
     enum { FrameWidth = 3 };
 public:
-    Curve( TQWidget *parent=0, const char *name=0 );
+    Curve( TQWidget *parent=nullptr, const char *name=nullptr );
 
     void animate();
 public slots:
diff --git a/examples/demo/dnd/dnd.h b/examples/demo/dnd/dnd.h
index 96a86debc..8d6bb6493 100644
--- a/examples/demo/dnd/dnd.h
+++ b/examples/demo/dnd/dnd.h
@@ -26,7 +26,7 @@ class DnDDemo : public DnDDemoBase
     TQ_OBJECT
 
 public:
-    DnDDemo( TQWidget* parent = 0, const char* name = 0 );
+    DnDDemo( TQWidget* parent = nullptr, const char* name = nullptr );
     ~DnDDemo();
 
     IconItem findItem( const TQString& tag );
diff --git a/examples/demo/dnd/iconview.h b/examples/demo/dnd/iconview.h
index df27b2c51..ca4cca45f 100644
--- a/examples/demo/dnd/iconview.h
+++ b/examples/demo/dnd/iconview.h
@@ -21,7 +21,7 @@ class IconView : public TQIconView
     TQ_OBJECT
 
 public:
-    IconView( TQWidget* parent = 0, const char* name = 0 );
+    IconView( TQWidget* parent = nullptr, const char* name = nullptr );
     ~IconView();
 
     TQDragObject *dragObject();
diff --git a/examples/demo/dnd/listview.h b/examples/demo/dnd/listview.h
index 1b09e6b98..421443520 100644
--- a/examples/demo/dnd/listview.h
+++ b/examples/demo/dnd/listview.h
@@ -20,7 +20,7 @@ class ListView : public TQListView
     TQ_OBJECT
 
 public:
-    ListView( TQWidget* parent = 0, const char* name = 0 );
+    ListView( TQWidget* parent = nullptr, const char* name = nullptr );
     ~ListView();
 
     void dragEnterEvent( TQDragEnterEvent * );
diff --git a/examples/demo/dnd/styledbutton.h b/examples/demo/dnd/styledbutton.h
index ead8c6f40..15acb5a4a 100644
--- a/examples/demo/dnd/styledbutton.h
+++ b/examples/demo/dnd/styledbutton.h
@@ -54,8 +54,8 @@ class StyledButton : public TQButton
 public:
     enum EditorType { ColorEditor, PixmapEditor };
 
-    StyledButton( TQWidget* parent = 0, const char* name = 0 );
-    StyledButton( const TQBrush& b, TQWidget* parent = 0, const char* name = 0, WFlags f = 0 );
+    StyledButton( TQWidget* parent = nullptr, const char* name = nullptr );
+    StyledButton( const TQBrush& b, TQWidget* parent = nullptr, const char* name = nullptr, WFlags f = 0 );
     ~StyledButton();
 
     void setEditor( EditorType );
diff --git a/examples/demo/frame.cpp b/examples/demo/frame.cpp
index da87f184a..21ca2b5be 100644
--- a/examples/demo/frame.cpp
+++ b/examples/demo/frame.cpp
@@ -26,8 +26,8 @@
 #include <tqbuttongroup.h>
 #include <tqtoolbutton.h>
 
-static TQTranslator *translator = 0;
-static TQTranslator *qt_translator = 0;
+static TQTranslator *translator = nullptr;
+static TQTranslator *qt_translator = nullptr;
 
 Frame::Frame( TQWidget *parent, const char *name )
     : TQMainWindow( parent, name )
diff --git a/examples/demo/frame.h b/examples/demo/frame.h
index 12170d789..ba0e3741d 100644
--- a/examples/demo/frame.h
+++ b/examples/demo/frame.h
@@ -20,7 +20,7 @@ class Frame : public TQMainWindow
     TQ_OBJECT
 
 public:
-    Frame( TQWidget *parent=0, const char *name=0 );
+    Frame( TQWidget *parent=nullptr, const char *name=nullptr );
     void setCategories( const TQPtrList<CategoryInterface> &l );
 
     static void updateTranslators();
diff --git a/examples/demo/graph.cpp b/examples/demo/graph.cpp
index a228cbaf7..9b75ec399 100644
--- a/examples/demo/graph.cpp
+++ b/examples/demo/graph.cpp
@@ -12,8 +12,8 @@ const int bounce_rtti = 1234;
 
 // We use a global variable to save memory - all the brushes and pens in
 // the mesh are shared.
-static TQBrush *tb = 0;
-static TQPen *tp = 0;
+static TQBrush *tb = nullptr;
+static TQPen *tp = nullptr;
 
 class EdgeItem;
 class NodeItem;
@@ -188,7 +188,7 @@ void NodeItem::calcForce() {
 
 class FigureEditor : public TQCanvasView {
 public:
-    FigureEditor( GraphWidgetPrivate *g, TQWidget* parent=0, const char* name=0, WFlags f=0);
+    FigureEditor( GraphWidgetPrivate *g, TQWidget* parent=nullptr, const char* name=nullptr, WFlags f=0);
 
     TQSize sizeHint() const;
 
@@ -418,7 +418,7 @@ void FigureEditor::initialize()
 
     TQMemArray<NodeItem*> lastRow(cols);
     for ( int r = 0; r < rows; r++ ) {
-	NodeItem *prev = 0;
+	NodeItem *prev = nullptr;
 	for ( int c = 0; c < cols; c++ ) {
 	    NodeItem *ni = new NodeItem( graph );
 	    ni->setAnimated( true );
diff --git a/examples/demo/graph.h b/examples/demo/graph.h
index 541662678..acc7b45cf 100644
--- a/examples/demo/graph.h
+++ b/examples/demo/graph.h
@@ -19,7 +19,7 @@ class GraphWidget : public TQWidget
 {
     TQ_OBJECT
 public:
-    GraphWidget( TQWidget *parent=0, const char *name=0 );
+    GraphWidget( TQWidget *parent=nullptr, const char *name=nullptr );
     ~GraphWidget();
 
 private slots:
diff --git a/examples/demo/i18n/wrapper.h b/examples/demo/i18n/wrapper.h
index 155361ffa..2c05b1d5e 100644
--- a/examples/demo/i18n/wrapper.h
+++ b/examples/demo/i18n/wrapper.h
@@ -8,7 +8,7 @@
 class Wrapper : public TQVBox
 {
 public:
-    Wrapper(TQWidget *parent, int i, const char *name = 0)
+    Wrapper(TQWidget *parent, int i, const char *name = nullptr)
 	: TQVBox(parent, name, WDestructiveClose), translator(this), id(i)
     {
     }
diff --git a/examples/demo/opengl/glbox.h b/examples/demo/opengl/glbox.h
index d702665fb..9e9a0a446 100644
--- a/examples/demo/opengl/glbox.h
+++ b/examples/demo/opengl/glbox.h
@@ -24,7 +24,7 @@ class GLBox : public GLControlWidget
 
 public:
 
-    GLBox( TQWidget* parent = 0, const char* name = 0, WFlags f = 0 );
+    GLBox( TQWidget* parent = nullptr, const char* name = nullptr, WFlags f = 0 );
     ~GLBox();
 
 protected:
diff --git a/examples/demo/opengl/glcontrolwidget.h b/examples/demo/opengl/glcontrolwidget.h
index 97cd129eb..eed15f751 100644
--- a/examples/demo/opengl/glcontrolwidget.h
+++ b/examples/demo/opengl/glcontrolwidget.h
@@ -8,7 +8,7 @@ class GLControlWidget : public TQGLWidget
     TQ_OBJECT
 
 public:
-    GLControlWidget( TQWidget *parent, const char *name = 0, TQGLWidget *share = 0, WFlags f = 0 );
+    GLControlWidget( TQWidget *parent, const char *name = nullptr, TQGLWidget *share = nullptr, WFlags f = 0 );
 
     virtual void	transform();
 
diff --git a/examples/demo/opengl/glgear.h b/examples/demo/opengl/glgear.h
index 9e21a7539..85ee27cbe 100644
--- a/examples/demo/opengl/glgear.h
+++ b/examples/demo/opengl/glgear.h
@@ -8,7 +8,7 @@ class GLGear : public GLControlWidget
     TQ_OBJECT
 
 public:
-    GLGear( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+    GLGear( TQWidget *parent = nullptr, const char *name = nullptr, WFlags f = 0 );
 
 protected:
     void draw();
diff --git a/examples/demo/opengl/glinfo_x11.cpp b/examples/demo/opengl/glinfo_x11.cpp
index 2289adeba..581201f51 100644
--- a/examples/demo/opengl/glinfo_x11.cpp
+++ b/examples/demo/opengl/glinfo_x11.cpp
@@ -229,7 +229,7 @@ GLInfo::GLInfo()
     TQGLWidget gl((TQWidget *) 0);
     gl.makeCurrent();
     Display *dpy;
-    char *displayName = 0;
+    char *displayName = nullptr;
     int numScreens, scrNum;
 
     dpy = gl.x11Display();
diff --git a/examples/demo/opengl/gllandscape.h b/examples/demo/opengl/gllandscape.h
index 5288b5eba..0c54c1696 100644
--- a/examples/demo/opengl/gllandscape.h
+++ b/examples/demo/opengl/gllandscape.h
@@ -8,7 +8,7 @@ class GLLandscape : public TQGLWidget
     TQ_OBJECT
 
 public:
-    GLLandscape( TQWidget * parent = 0, const char * name = 0 );
+    GLLandscape( TQWidget * parent = nullptr, const char * name = nullptr );
     ~GLLandscape();
     
 public slots:
diff --git a/examples/demo/opengl/gltexobj.h b/examples/demo/opengl/gltexobj.h
index a5e48a32b..f22578be9 100644
--- a/examples/demo/opengl/gltexobj.h
+++ b/examples/demo/opengl/gltexobj.h
@@ -23,7 +23,7 @@ class GLTexobj : public GLControlWidget
     TQ_OBJECT
 
 public:
-    GLTexobj( TQWidget* parent, const char* name = 0, WFlags f = 0 );
+    GLTexobj( TQWidget* parent, const char* name = nullptr, WFlags f = 0 );
     ~GLTexobj();
 
 protected:
diff --git a/examples/demo/opengl/glworkspace.h b/examples/demo/opengl/glworkspace.h
index d83f2b60e..63f3526a3 100644
--- a/examples/demo/opengl/glworkspace.h
+++ b/examples/demo/opengl/glworkspace.h
@@ -10,7 +10,7 @@ class GLWorkspace : public TQMainWindow
 {
     TQ_OBJECT
 public:
-    GLWorkspace( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+    GLWorkspace( TQWidget *parent = nullptr, const char *name = nullptr, WFlags f = 0 );
     ~GLWorkspace();
 
 protected:
diff --git a/examples/demo/qasteroids/toplevel.h b/examples/demo/qasteroids/toplevel.h
index b86d45b17..89d1b2393 100644
--- a/examples/demo/qasteroids/toplevel.h
+++ b/examples/demo/qasteroids/toplevel.h
@@ -21,7 +21,7 @@ class KAstTopLevel : public TQMainWindow
 {
     TQ_OBJECT
 public:
-    KAstTopLevel( TQWidget *parent=0, const char *name=0 );
+    KAstTopLevel( TQWidget *parent=nullptr, const char *name=nullptr );
     virtual ~KAstTopLevel();
 
 private:
diff --git a/examples/demo/qasteroids/view.cpp b/examples/demo/qasteroids/view.cpp
index b96b47384..c9b0ff7a9 100644
--- a/examples/demo/qasteroids/view.cpp
+++ b/examples/demo/qasteroids/view.cpp
@@ -428,7 +428,7 @@ void KAsteroidsView::wrapSprite( TQCanvasItem *s )
 
 void KAsteroidsView::rockHit( TQCanvasItem *hit )
 {
-    KPowerup *nPup = 0;
+    KPowerup *nPup = nullptr;
     int rnd = int(randDouble()*30.0) % 30;
     switch( rnd )
     {
diff --git a/examples/demo/qasteroids/view.h b/examples/demo/qasteroids/view.h
index f7c1ce802..e4780cf6e 100644
--- a/examples/demo/qasteroids/view.h
+++ b/examples/demo/qasteroids/view.h
@@ -20,7 +20,7 @@ class KAsteroidsView : public TQWidget
 {
     TQ_OBJECT
 public:
-    KAsteroidsView( TQWidget *parent = 0, const char *name = 0 );
+    KAsteroidsView( TQWidget *parent = nullptr, const char *name = nullptr );
     virtual ~KAsteroidsView();
 
     int refreshRate;
diff --git a/examples/demo/qthumbwheel.h b/examples/demo/qthumbwheel.h
index 43a86bf39..d8fc39834 100644
--- a/examples/demo/qthumbwheel.h
+++ b/examples/demo/qthumbwheel.h
@@ -53,7 +53,7 @@ class TQThumbWheel : public TQFrame, public TQRangeControl
     TQ_OBJECT
 
 public:
-    TQThumbWheel( TQWidget *parent=0, const char *name=0 );
+    TQThumbWheel( TQWidget *parent=nullptr, const char *name=nullptr );
     ~TQThumbWheel();
 
     virtual void 	setOrientation( Orientation );
diff --git a/examples/demo/sql/sqlex.ui.h b/examples/demo/sql/sqlex.ui.h
index c59f6886b..52965f897 100644
--- a/examples/demo/sql/sqlex.ui.h
+++ b/examples/demo/sql/sqlex.ui.h
@@ -17,7 +17,7 @@
 #include <tqdatatable.h>
 #include "connect.h"
 
-static void showError( const TQSqlError& err, TQWidget* parent = 0 )
+static void showError( const TQSqlError& err, TQWidget* parent = nullptr )
 {
    TQString errStr ( "The database reported an error\n" );
     if ( !err.databaseText().isEmpty() )
@@ -27,7 +27,7 @@ static void showError( const TQSqlError& err, TQWidget* parent = 0 )
     TQMessageBox::warning( parent, "Error", errStr );
 }
 
-ConnectDialog* conDiag = 0;
+ConnectDialog* conDiag = nullptr;
 
 void SqlEx::init()
 {
diff --git a/examples/demo/textdrawing/helpwindow.h b/examples/demo/textdrawing/helpwindow.h
index 0bf41326d..6428ec660 100644
--- a/examples/demo/textdrawing/helpwindow.h
+++ b/examples/demo/textdrawing/helpwindow.h
@@ -23,7 +23,7 @@ class HelpWindow : public TQMainWindow
 {
     TQ_OBJECT
 public:
-    HelpWindow( const TQString& home_,  const TQString& path, TQWidget* parent = 0, const char *name=0 );
+    HelpWindow( const TQString& home_,  const TQString& path, TQWidget* parent = nullptr, const char *name=nullptr );
     ~HelpWindow();
 
 private slots:
diff --git a/examples/demo/textdrawing/textedit.h b/examples/demo/textdrawing/textedit.h
index ef03f0a01..e8c39595b 100644
--- a/examples/demo/textdrawing/textedit.h
+++ b/examples/demo/textdrawing/textedit.h
@@ -23,7 +23,7 @@ class TextEdit : public TQMainWindow
     TQ_OBJECT
 
 public:
-    TextEdit( TQWidget *parent = 0, const char *name = 0 );
+    TextEdit( TQWidget *parent = nullptr, const char *name = nullptr );
 
     TQTextEdit *currentEditor() const;
     void load( const TQString &f );
diff --git a/examples/desktop/desktop.cpp b/examples/desktop/desktop.cpp
index 963ac4cfd..a8bc3e6eb 100644
--- a/examples/desktop/desktop.cpp
+++ b/examples/desktop/desktop.cpp
@@ -188,7 +188,7 @@ void drawShadeText( TQPainter *p, int x, int y, const char *text,
 class DesktopWidget : public TQWidget, private TQDropSite
 {
 public:
-    DesktopWidget( const char *s, TQWidget *parent=0, const char *name=0 );
+    DesktopWidget( const char *s, TQWidget *parent=nullptr, const char *name=nullptr );
    ~DesktopWidget();
     void paintEvent( TQPaintEvent * );
 
@@ -226,7 +226,7 @@ DesktopWidget::DesktopWidget( const char *s, TQWidget *parent, const char *name
 	TQDropSite(this)
 {
     text = s;
-    pm	 = 0;
+    pm	 = nullptr;
 }
 
 DesktopWidget::~DesktopWidget()
diff --git a/examples/dirview/dirview.cpp b/examples/dirview/dirview.cpp
index c30a36b67..03cc4ed2a 100644
--- a/examples/dirview/dirview.cpp
+++ b/examples/dirview/dirview.cpp
@@ -136,10 +136,10 @@ static const char * pix_file []={
     ".....##aa#......",
     ".......##......."};
 
-TQPixmap *folderLocked = 0;
-TQPixmap *folderClosed = 0;
-TQPixmap *folderOpen = 0;
-TQPixmap *fileNormal = 0;
+TQPixmap *folderLocked = nullptr;
+TQPixmap *folderClosed = nullptr;
+TQPixmap *folderOpen = nullptr;
+TQPixmap *fileNormal = nullptr;
 
 /*****************************************************************************
  *
@@ -150,7 +150,7 @@ TQPixmap *fileNormal = 0;
 Directory::Directory( Directory * parent, const TQString& filename )
     : TQListViewItem( parent ), f(filename),
       showDirsOnly( parent->showDirsOnly ),
-      pix( 0 )
+      pix( nullptr )
 {
     p = parent;
     readable = TQDir( fullName() ).isReadable();
@@ -165,9 +165,9 @@ Directory::Directory( Directory * parent, const TQString& filename )
 Directory::Directory( TQListView * parent, const TQString& filename )
     : TQListViewItem( parent ), f(filename),
       showDirsOnly( ( (DirectoryView*)parent )->showDirsOnly() ),
-      pix( 0 )
+      pix( nullptr )
 {
-    p = 0;
+    p = nullptr;
     readable = TQDir( fullName() ).isReadable();
 }
 
@@ -185,7 +185,7 @@ void Directory::setPixmap( TQPixmap *px )
 const TQPixmap *Directory::pixmap( int i ) const
 {
     if ( i )
-	return 0;
+	return nullptr;
     return pix;
 }
 
@@ -210,7 +210,7 @@ void Directory::setOpen( bool o )
 	if ( files ) {
 	    TQFileInfoListIterator it( *files );
 	    TQFileInfo * fi;
-	    while( (fi=it.current()) != 0 ) {
+	    while( (fi=it.current()) ) {
 		++it;
 		if ( fi->fileName() == "." || fi->fileName() == ".." )
 		    ; // nothing
@@ -273,8 +273,8 @@ TQString Directory::text( int column ) const
  *****************************************************************************/
 
 DirectoryView::DirectoryView( TQWidget *parent, const char *name, bool sdo )
-    : TQListView( parent, name ), dirsOnly( sdo ), oldCurrent( 0 ),
-      dropItem( 0 ), mousePressed( false )
+    : TQListView( parent, name ), dirsOnly( sdo ), oldCurrent( nullptr ),
+      dropItem( nullptr ), mousePressed( false )
 {
     autoopen_timer = new TQTimer( this );
     if ( !folderLocked ) {
@@ -366,14 +366,14 @@ void DirectoryView::contentsDragMoveEvent( TQDragMoveEvent *e )
     } else {
 	e->ignore();
 	autoopen_timer->stop();
-	dropItem = 0;
+	dropItem = nullptr;
     }
 }
 
 void DirectoryView::contentsDragLeaveEvent( TQDragLeaveEvent * )
 {
     autoopen_timer->stop();
-    dropItem = 0;
+    dropItem = nullptr;
 
     setCurrentItem( oldCurrent );
     setSelected( oldCurrent, true );
@@ -527,6 +527,6 @@ void FileItem::setPixmap( TQPixmap *p )
 const TQPixmap *FileItem::pixmap( int i ) const
 {
     if ( i )
-	return 0;
+	return nullptr;
     return pix;
 }
diff --git a/examples/dirview/dirview.h b/examples/dirview/dirview.h
index 57e0dc9e2..f5197bcbc 100644
--- a/examples/dirview/dirview.h
+++ b/examples/dirview/dirview.h
@@ -26,7 +26,7 @@ class FileItem : public TQListViewItem
 {
 public:
     FileItem( TQListViewItem *parent, const TQString &s1, const TQString &s2 )
-	: TQListViewItem( parent, s1, s2 ), pix( 0 ) {}
+	: TQListViewItem( parent, s1, s2 ), pix( nullptr ) {}
 
     const TQPixmap *pixmap( int i ) const;
 #if !defined(Q_NO_USING_KEYWORD)
@@ -44,7 +44,7 @@ class Directory : public TQListViewItem
 public:
     Directory( TQListView * parent, const TQString& filename );
     Directory( Directory * parent, const TQString& filename, const TQString &col2 )
-	: TQListViewItem( parent, filename, col2 ), pix( 0 ) {}
+	: TQListViewItem( parent, filename, col2 ), pix( nullptr ) {}
     Directory( Directory * parent, const TQString& filename );
 
     TQString text( int column ) const;
@@ -74,7 +74,7 @@ class DirectoryView : public TQListView
     TQ_OBJECT
 
 public:
-    DirectoryView( TQWidget *parent = 0, const char *name = 0, bool sdo = false );
+    DirectoryView( TQWidget *parent = nullptr, const char *name = nullptr, bool sdo = false );
     bool showDirsOnly() { return dirsOnly; }
 
 public slots:
diff --git a/examples/distributor/distributor.ui.h b/examples/distributor/distributor.ui.h
index 10a39207d..4a28c3916 100644
--- a/examples/distributor/distributor.ui.h
+++ b/examples/distributor/distributor.ui.h
@@ -100,7 +100,7 @@ void Distributor::browseLibFilename()
 static char *find_pattern( char *h, const char *n, ulong hlen )
 {
     if ( ! h || ! n || hlen == 0 )
-	return 0;
+	return nullptr;
 
 #ifdef Q_OS_UNIX
     size_t nlen;
@@ -116,11 +116,11 @@ static char *find_pattern( char *h, const char *n, ulong hlen )
 	do {
 	    hc = *h++;
 	    if ( hlen-- < 1 )
-		return 0;
+		return nullptr;
 	} while ( hc != nc );
 
 	if ( nlen > hlen )
-	    return 0;
+	    return nullptr;
     } while ( tqstrncmp( h, n, nlen ) != 0 );
     return h + nlen;
 }
diff --git a/examples/dragdrop/dropsite.h b/examples/dragdrop/dropsite.h
index fa58eb25d..bb9b0514a 100644
--- a/examples/dragdrop/dropsite.h
+++ b/examples/dragdrop/dropsite.h
@@ -24,7 +24,7 @@ class DropSite: public TQLabel
 {
     TQ_OBJECT
 public:
-    DropSite( TQWidget * parent = 0, const char * name = 0 );
+    DropSite( TQWidget * parent = nullptr, const char * name = nullptr );
     ~DropSite();
 
 signals:
diff --git a/examples/dragdrop/secret.h b/examples/dragdrop/secret.h
index b7d9d257a..03e1fe673 100644
--- a/examples/dragdrop/secret.h
+++ b/examples/dragdrop/secret.h
@@ -19,7 +19,7 @@
 
 class SecretDrag: public TQStoredDrag {
 public:
-    SecretDrag( uchar, TQWidget * parent = 0, const char * name = 0 );
+    SecretDrag( uchar, TQWidget * parent = nullptr, const char * name = nullptr );
     ~SecretDrag() {};
 
     static bool canDecode( TQDragMoveEvent* e );
@@ -30,7 +30,7 @@ public:
 class SecretSource: public TQLabel
 {
 public:
-    SecretSource( int secret, TQWidget *parent = 0, const char * name = 0 );
+    SecretSource( int secret, TQWidget *parent = nullptr, const char * name = nullptr );
     ~SecretSource();
 
 protected:
diff --git a/examples/drawdemo/drawdemo.cpp b/examples/drawdemo/drawdemo.cpp
index 4aced2154..8a79645d7 100644
--- a/examples/drawdemo/drawdemo.cpp
+++ b/examples/drawdemo/drawdemo.cpp
@@ -59,7 +59,7 @@ void drawColorWheel( TQPainter *p )
 
 void drawFonts( TQPainter *p )
 {
-    static const char *fonts[] = { "Helvetica", "Courier", "Times", 0 };
+    static const char *fonts[] = { "Helvetica", "Courier", "Times", nullptr };
     static int	 sizes[] = { 10, 12, 18, 24, 36, 0 };
     int f = 0;
     int y = 0;
@@ -124,7 +124,7 @@ DrawThing ourDrawFunctions[] = {
     { drawColorWheel,	"Draw color wheel" },
     { drawFonts,	"Draw fonts" },
     { drawShapes,	"Draw shapes" },
-    { 0,		0 } };
+    { nullptr,		nullptr } };
 
 
 
@@ -174,7 +174,7 @@ DrawView::DrawView()
     // Find out the longest function description.
     // Here we make use of the last "0,0"-entry in the 
     // ourDrawFunctions-array.
-    for ( i=0; (n=ourDrawFunctions[i].name) != 0; i++ ) {
+    for ( i=0; (n=ourDrawFunctions[i].name); i++ ) {
         int w = fm.width( n );
         maxwidth = TQMAX(w,maxwidth); // TQMAX is a macro defined in tqglobal.h
                                      // and returns the biggest of to values.
@@ -184,7 +184,7 @@ DrawView::DrawView()
 
     maxwidth = maxwidth + 30;			// allow 30 pixels for radiobuttons
 
-    for ( i=0; (n=ourDrawFunctions[i].name) != 0; i++ ) {
+    for ( i=0; (n=ourDrawFunctions[i].name); i++ ) {
         TQRadioButton *rb = new TQRadioButton( n, bgroup );
         rb->setGeometry( 10, i*30+10, maxwidth, 30 );
 
diff --git a/examples/drawlines/connect.cpp b/examples/drawlines/connect.cpp
index 4ac5c965f..cbd13d5a4 100644
--- a/examples/drawlines/connect.cpp
+++ b/examples/drawlines/connect.cpp
@@ -24,7 +24,7 @@ const int MAXCOLORS = 40;
 class ConnectWidget : public TQWidget
 {
 public:
-    ConnectWidget( TQWidget *parent=0, const char *name=0 );
+    ConnectWidget( TQWidget *parent=nullptr, const char *name=nullptr );
    ~ConnectWidget();
 protected:
     void	paintEvent( TQPaintEvent * );
diff --git a/examples/fileiconview/tqfileiconview.cpp b/examples/fileiconview/tqfileiconview.cpp
index 20ac7b5e5..f33ed3664 100644
--- a/examples/fileiconview/tqfileiconview.cpp
+++ b/examples/fileiconview/tqfileiconview.cpp
@@ -216,14 +216,14 @@ static const char * folder_locked_icon[]={
     "....................##d#b###....",
     "......................####......"};
 
-static TQPixmap *iconFolderLockedLarge = 0;
-static TQPixmap *iconFolderLarge = 0;
-static TQPixmap *iconFileLarge = 0;
-static TQPixmap *iconLinkLarge = 0;
-static TQPixmap *iconFolderLockedSmall = 0;
-static TQPixmap *iconFolderSmall = 0;
-static TQPixmap *iconFileSmall = 0;
-static TQPixmap *iconLinkSmall = 0;
+static TQPixmap *iconFolderLockedLarge = nullptr;
+static TQPixmap *iconFolderLarge = nullptr;
+static TQPixmap *iconFileLarge = nullptr;
+static TQPixmap *iconLinkLarge = nullptr;
+static TQPixmap *iconFolderLockedSmall = nullptr;
+static TQPixmap *iconFolderSmall = nullptr;
+static TQPixmap *iconFileSmall = nullptr;
+static TQPixmap *iconLinkSmall = nullptr;
 
 static void cleanup()
 {
@@ -263,7 +263,7 @@ const char* TQtFileIconDrag::format( int i ) const
     else if ( i == 1 )
 	return "text/uri-list";
     else
-	return 0;
+	return nullptr;
 }
 
 TQByteArray TQtFileIconDrag::encodedData( const char* mime ) const
@@ -512,7 +512,7 @@ TQtFileIconView::TQtFileIconView( const TQString &dir, TQWidget *parent, const c
 
     setAutoArrange( true );
     setSorting( true );
-    openItem = 0;
+    openItem = nullptr;
 }
 
 void TQtFileIconView::openFolder()
@@ -608,7 +608,7 @@ void TQtFileIconView::readDir( const TQDir &dir )
     TQFileInfoListIterator it( *filist );
     TQFileInfo *fi;
     bool allowRename = false, allowRenameSet = false;
-    while ( ( fi = it.current() ) != 0 ) {
+    while ( ( fi = it.current() ) ) {
 	++it;
 	if ( fi && fi->fileName() == ".." && ( fi->dirPath() == "/" || fi->dirPath().isEmpty() ) )
 	    continue;
@@ -657,7 +657,7 @@ void TQtFileIconView::itemDoubleClicked( TQIconViewItem *i )
 TQDragObject *TQtFileIconView::dragObject()
 {
     if ( !currentItem() )
-	return 0;
+	return nullptr;
 
     TQPoint orig = viewportToContents( viewport()->mapFromGlobal( TQCursor::pos() ) );
     TQtFileIconDrag *drag = new TQtFileIconDrag( viewport() );
@@ -718,7 +718,7 @@ void TQtFileIconView::slotDropped( TQDropEvent *e, const TQValueList<TQIconDragI
     if ( e->action() == TQDropEvent::Move )
 	TQMessageBox::information( this, "Remove" , TQDir::convertSeparators(lst.join("\n")), "Not Implemented" );
     e->acceptAction();
-    openItem = 0;
+    openItem = nullptr;
 }
 
 void TQtFileIconView::viewLarge()
diff --git a/examples/fileiconview/tqfileiconview.h b/examples/fileiconview/tqfileiconview.h
index b5948011d..436931f26 100644
--- a/examples/fileiconview/tqfileiconview.h
+++ b/examples/fileiconview/tqfileiconview.h
@@ -33,7 +33,7 @@ class TQtFileIconDrag : public TQIconDrag
     TQ_OBJECT
 
 public:
-    TQtFileIconDrag( TQWidget * dragSource, const char* name = 0 );
+    TQtFileIconDrag( TQWidget * dragSource, const char* name = nullptr );
 
     const char* format( int i ) const;
     TQByteArray encodedData( const char* mime ) const;
@@ -56,7 +56,7 @@ class TQtFileIconView : public TQIconView
     TQ_OBJECT
 
 public:
-    TQtFileIconView( const TQString &dir, TQWidget *parent = 0, const char *name = 0 );
+    TQtFileIconView( const TQString &dir, TQWidget *parent = nullptr, const char *name = nullptr );
 
     enum ViewMode { Large, Small };
 
diff --git a/examples/forever/forever.h b/examples/forever/forever.h
index b976103c3..72c9951ee 100644
--- a/examples/forever/forever.h
+++ b/examples/forever/forever.h
@@ -24,7 +24,7 @@ class Forever : public TQWidget
 {
     TQ_OBJECT
 public:
-    Forever( TQWidget *parent=0, const char *name=0 );
+    Forever( TQWidget *parent=nullptr, const char *name=nullptr );
 protected:
     void	paintEvent( TQPaintEvent * );
     void	timerEvent( TQTimerEvent * );
diff --git a/examples/hello/hello.h b/examples/hello/hello.h
index 806b4c1e7..51ba821d6 100644
--- a/examples/hello/hello.h
+++ b/examples/hello/hello.h
@@ -17,7 +17,7 @@ class Hello : public TQWidget
 {
     TQ_OBJECT
 public:
-    Hello( const char *text, TQWidget *parent=0, const char *name=0 );
+    Hello( const char *text, TQWidget *parent=nullptr, const char *name=nullptr );
 signals:
     void clicked();
 protected:
diff --git a/examples/helpdemo/helpdemo.cpp b/examples/helpdemo/helpdemo.cpp
index d5208fe1e..f85e78ef6 100644
--- a/examples/helpdemo/helpdemo.cpp
+++ b/examples/helpdemo/helpdemo.cpp
@@ -51,12 +51,12 @@ TQWidget* HelpDemo::lookForWidget()
 {
     TQPtrDictIterator<char> it( widgets );
     TQWidget *w;
-    while ( (w = (TQWidget*)(it.currentKey())) != 0 ) {
+    while ( (w = (TQWidget*)(it.currentKey())) ) {
 	++it;
 	if ( w->hasMouse() )
 	    return w;
     }
-    return 0;
+    return nullptr;
 }
 
 void HelpDemo::showHelp()
diff --git a/examples/helpdemo/helpdemo.h b/examples/helpdemo/helpdemo.h
index 4c808adb9..0dd36241c 100644
--- a/examples/helpdemo/helpdemo.h
+++ b/examples/helpdemo/helpdemo.h
@@ -13,7 +13,7 @@ class HelpDemo : public HelpDemoBase
     TQ_OBJECT
 
 public:
-    HelpDemo( TQWidget *parent = 0, const char *name = 0 );
+    HelpDemo( TQWidget *parent = nullptr, const char *name = nullptr );
     ~HelpDemo();
 
 protected:
diff --git a/examples/helpsystem/tooltip.h b/examples/helpsystem/tooltip.h
index ab53a6f40..eb375934d 100644
--- a/examples/helpsystem/tooltip.h
+++ b/examples/helpsystem/tooltip.h
@@ -19,7 +19,7 @@ class TQHeader;
 class HeaderToolTip : public TQToolTip
 {
 public:
-    HeaderToolTip( TQHeader *header, TQToolTipGroup *group = 0 );
+    HeaderToolTip( TQHeader *header, TQToolTipGroup *group = nullptr );
     
 protected:
     void maybeTip ( const TQPoint &p );
@@ -28,7 +28,7 @@ protected:
 class TableToolTip : public TQToolTip
 {
 public:
-    TableToolTip( TQTable* table, TQToolTipGroup *group = 0  );
+    TableToolTip( TQTable* table, TQToolTipGroup *group = nullptr  );
     
 protected:
     void maybeTip( const TQPoint &p );
diff --git a/examples/helpsystem/whatsthis.h b/examples/helpsystem/whatsthis.h
index d9cda8ddc..4da157ba6 100644
--- a/examples/helpsystem/whatsthis.h
+++ b/examples/helpsystem/whatsthis.h
@@ -19,7 +19,7 @@ class WhatsThis : public TQObject, public TQWhatsThis
 {
     TQ_OBJECT
 public:
-    WhatsThis( TQWidget *w, TQWidget *watch = 0 );
+    WhatsThis( TQWidget *w, TQWidget *watch = nullptr );
 
     bool clicked( const TQString &link );
     TQWidget *parentWidget() const;
diff --git a/examples/helpviewer/helpwindow.cpp b/examples/helpviewer/helpwindow.cpp
index 9f935e9a1..74aa094f0 100644
--- a/examples/helpviewer/helpwindow.cpp
+++ b/examples/helpviewer/helpwindow.cpp
@@ -38,7 +38,7 @@
 HelpWindow::HelpWindow( const TQString& home_, const TQString& _path,
 			TQWidget* parent, const char *name )
     : TQMainWindow( parent, name, WDestructiveClose ),
-      pathCombo( 0 )
+      pathCombo( nullptr )
 {
     readHistory();
     readBookmarks();
diff --git a/examples/helpviewer/helpwindow.h b/examples/helpviewer/helpwindow.h
index 9b05c61e5..c592a41d9 100644
--- a/examples/helpviewer/helpwindow.h
+++ b/examples/helpviewer/helpwindow.h
@@ -23,7 +23,7 @@ class HelpWindow : public TQMainWindow
 {
     TQ_OBJECT
 public:
-    HelpWindow( const TQString& home_,  const TQString& path, TQWidget* parent = 0, const char *name=0 );
+    HelpWindow( const TQString& home_,  const TQString& path, TQWidget* parent = nullptr, const char *name=nullptr );
     ~HelpWindow();
 
 private slots:
diff --git a/examples/helpviewer/main.cpp b/examples/helpviewer/main.cpp
index ee2e7ad85..ae7023c75 100644
--- a/examples/helpviewer/main.cpp
+++ b/examples/helpviewer/main.cpp
@@ -26,7 +26,7 @@ int main( int argc, char ** argv )
 	home = TQDir( "../../doc/html/index.html" ).absPath();
     }
 
-    HelpWindow *help = new HelpWindow(home, ".", 0, "help viewer");
+    HelpWindow *help = new HelpWindow(home, ".", nullptr, "help viewer");
     help->setCaption("TQt Example - Helpviewer");
     if ( TQApplication::desktop()->width() > 400
 	 && TQApplication::desktop()->height() > 500 )
diff --git a/examples/i18n/main.cpp b/examples/i18n/main.cpp
index 36cb7cfb3..b4889d6c3 100644
--- a/examples/i18n/main.cpp
+++ b/examples/i18n/main.cpp
@@ -30,12 +30,12 @@
 
 class TQVDialog : public TQDialog {
 public:
-    TQVDialog(TQWidget *parent=0, const char *name=0, bool modal=false,
+    TQVDialog(TQWidget *parent=nullptr, const char *name=nullptr, bool modal=false,
              WFlags f=0) : TQDialog(parent,name,modal,f)
     {
 	TQVBoxLayout* vb = new TQVBoxLayout(this,8);
 	vb->setAutoAdd(true);
-	hb = 0;
+	hb = nullptr;
 	sm = new TQSignalMapper(this);
 	connect(sm,TQ_SIGNAL(mapped(int)),this,TQ_SLOT(done(int)));
     }
@@ -69,7 +69,7 @@ private:
 MyWidget* showLang(TQString lang)
 {
 
-    static TQTranslator *translator = 0;
+    static TQTranslator *translator = nullptr;
 
     tqApp->setPalette(TQPalette(TQColor(220-rand()%64,220-rand()%64,220-rand()%64)));
 
@@ -77,16 +77,16 @@ MyWidget* showLang(TQString lang)
     TQFileInfo fi( lang );
 
     if ( !fi.exists() ) {
-	TQMessageBox::warning( 0, "File error",
+	TQMessageBox::warning( nullptr, "File error",
 			      TQString("Cannot find translation for language: "+lang+
 				      "\n(try eg. 'de', 'ko' or 'no')") );
-	return 0;
+	return nullptr;
     }
     if ( translator ) {
 	tqApp->removeTranslator( translator );
 	delete translator;
     }
-    translator = new TQTranslator( 0 );
+    translator = new TQTranslator( nullptr );
     translator->load( lang, "." );
     tqApp->installTranslator( translator );
     MyWidget *m = new MyWidget;
@@ -99,7 +99,7 @@ int main( int argc, char** argv )
     TQApplication app( argc, argv );
 
     const char* qm[]=
-	{ "ar", "cs", "de", "el", "en", "eo", "fr", "it", "jp", "ko", "no", "ru", "sk", "zh", 0 };
+	{ "ar", "cs", "de", "el", "en", "eo", "fr", "it", "jp", "ko", "no", "ru", "sk", "zh", nullptr };
 
 #if defined(Q_OS_UNIX)
     srand( getpid() << 2 );
@@ -110,7 +110,7 @@ int main( int argc, char** argv )
         lang = argv[1];
 
     if ( argc != 2 || lang == "all" ) {
-	TQVDialog dlg(0,0,true);
+	TQVDialog dlg(nullptr,nullptr,true);
 	TQCheckBox* qmb[sizeof(qm)/sizeof(qm[0])];
 	int r;
 	if ( lang == "all" ) {
@@ -134,7 +134,7 @@ int main( int argc, char** argv )
 		if ( r == 2 || qmb[i]->isChecked() ) {
 		    MyWidget* w = showLang((const char*)qm[i]);
 
-		    if( w == 0 ) exit( 0 );
+		    if( !w ) exit( 0 );
 		    TQObject::connect(w, TQ_SIGNAL(closed()), tqApp, TQ_SLOT(quit()));
 		    w->setGeometry(x,y,197,356);
 		    w->show();
diff --git a/examples/i18n/mywidget.cpp b/examples/i18n/mywidget.cpp
index b0aec85bb..4b68aa020 100644
--- a/examples/i18n/mywidget.cpp
+++ b/examples/i18n/mywidget.cpp
@@ -56,7 +56,7 @@ static const char* choices[] = {
     TQT_TRANSLATE_NOOP( "MyWidget", "First" ),
     TQT_TRANSLATE_NOOP( "MyWidget", "Second" ),
     TQT_TRANSLATE_NOOP( "MyWidget", "Third" ),
-    0
+    nullptr
 }; 
 
 void MyWidget::initChoices(TQWidget* parent)
diff --git a/examples/i18n/mywidget.h b/examples/i18n/mywidget.h
index 9e781bf1c..b3087a18a 100644
--- a/examples/i18n/mywidget.h
+++ b/examples/i18n/mywidget.h
@@ -18,7 +18,7 @@ class MyWidget : public TQMainWindow
     TQ_OBJECT
 
 public:
-    MyWidget( TQWidget* parent=0, const char* name = 0 );
+    MyWidget( TQWidget* parent=nullptr, const char* name = nullptr );
 
 signals:
     void closed();
diff --git a/examples/iconview/simple_dd/main.h b/examples/iconview/simple_dd/main.h
index e3fcdf512..09588af64 100644
--- a/examples/iconview/simple_dd/main.h
+++ b/examples/iconview/simple_dd/main.h
@@ -22,7 +22,7 @@ class DDListBox : public TQListBox
 {
     TQ_OBJECT
 public:
-    DDListBox( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 );
+    DDListBox( TQWidget * parent = nullptr, const char * name = nullptr, WFlags f = 0 );
     // Low-level drag and drop
     void dragEnterEvent( TQDragEnterEvent *evt );
     void dropEvent( TQDropEvent *evt );
@@ -50,7 +50,7 @@ class DDIconView : public TQIconView
 {
     TQ_OBJECT
 public:
-    DDIconView( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) :
+    DDIconView( TQWidget * parent = nullptr, const char * name = nullptr, WFlags f = 0 ) :
 	TQIconView( parent, name, f ) {}
     // High-level drag and drop
     TQDragObject *dragObject();
diff --git a/examples/layout/layout.cpp b/examples/layout/layout.cpp
index 18fd487fe..c6804a8db 100644
--- a/examples/layout/layout.cpp
+++ b/examples/layout/layout.cpp
@@ -20,7 +20,7 @@
 class ExampleWidget : public TQWidget
 {
 public:
-    ExampleWidget( TQWidget *parent = 0, const char *name = 0 );
+    ExampleWidget( TQWidget *parent = nullptr, const char *name = nullptr );
     ~ExampleWidget();
 };
 
diff --git a/examples/life/life.h b/examples/life/life.h
index 07e0cd650..c1f58eca6 100644
--- a/examples/life/life.h
+++ b/examples/life/life.h
@@ -17,7 +17,7 @@ class LifeWidget : public TQFrame
 {
     TQ_OBJECT
 public:
-    LifeWidget( int s = 10, TQWidget *parent = 0, const char *name = 0 );
+    LifeWidget( int s = 10, TQWidget *parent = nullptr, const char *name = nullptr );
 
     void	setPoint( int i, int j );
 
diff --git a/examples/life/lifedlg.h b/examples/life/lifedlg.h
index e00724e7d..0fc852e5a 100644
--- a/examples/life/lifedlg.h
+++ b/examples/life/lifedlg.h
@@ -41,7 +41,7 @@ class LifeDialog : public TQWidget
 {
     TQ_OBJECT
 public:
-    LifeDialog( int scale = 10, TQWidget *parent = 0, const char *name = 0 );
+    LifeDialog( int scale = 10, TQWidget *parent = nullptr, const char *name = nullptr );
 public slots:
     void	getPattern( int );
 
diff --git a/examples/lineedits/lineedits.cpp b/examples/lineedits/lineedits.cpp
index d7358335b..93ff643f1 100644
--- a/examples/lineedits/lineedits.cpp
+++ b/examples/lineedits/lineedits.cpp
@@ -179,7 +179,7 @@ void LineEdits::slotValidatorChanged( int i )
 {
     switch ( i ) {
     case 0:
-	lined2->setValidator( 0 );
+	lined2->setValidator( nullptr );
         break;
     case 1:
 	lined2->setValidator( new TQIntValidator( lined2 ) );
diff --git a/examples/lineedits/lineedits.h b/examples/lineedits/lineedits.h
index 57c541e4f..3a15aba89 100644
--- a/examples/lineedits/lineedits.h
+++ b/examples/lineedits/lineedits.h
@@ -20,7 +20,7 @@ class LineEdits : public TQGroupBox
     TQ_OBJECT
 
 public:
-    LineEdits( TQWidget *parent = 0, const char *name = 0 );
+    LineEdits( TQWidget *parent = nullptr, const char *name = nullptr );
 
 protected:
     TQLineEdit *lined1, *lined2, *lined3, *lined4, *lined5;
diff --git a/examples/listbox/listbox.cpp b/examples/listbox/listbox.cpp
index 983e98498..c78ad9270 100644
--- a/examples/listbox/listbox.cpp
+++ b/examples/listbox/listbox.cpp
@@ -20,7 +20,7 @@
 
 
 ListBoxDemo::ListBoxDemo()
-    : TQWidget( 0, 0 )
+    : TQWidget( nullptr, nullptr )
 {
     TQGridLayout * g = new TQGridLayout( this, 2, 2, 6 );
 
@@ -35,7 +35,7 @@ ListBoxDemo::ListBoxDemo()
     g->addLayout( v, 1, 0 );
 
     TQRadioButton * b;
-    bg = new TQButtonGroup( 0 );
+    bg = new TQButtonGroup( nullptr );
 
     b = new TQRadioButton( "Fixed number of columns,\n"
                           "as many rows as needed.",
diff --git a/examples/listboxcombo/listboxcombo.h b/examples/listboxcombo/listboxcombo.h
index 03074b1c5..7706ba37c 100644
--- a/examples/listboxcombo/listboxcombo.h
+++ b/examples/listboxcombo/listboxcombo.h
@@ -20,7 +20,7 @@ class ListBoxCombo : public TQVBox
     TQ_OBJECT
 
 public:
-    ListBoxCombo( TQWidget *parent = 0, const char *name = 0 );
+    ListBoxCombo( TQWidget *parent = nullptr, const char *name = nullptr );
 
 protected:
     TQListBox *lb1, *lb2;
diff --git a/examples/listviews/listviews.cpp b/examples/listviews/listviews.cpp
index 73c52fdff..3c6fbf3de 100644
--- a/examples/listviews/listviews.cpp
+++ b/examples/listviews/listviews.cpp
@@ -165,7 +165,7 @@ void ListViews::initFolders()
     for ( unsigned int i = 1; i < 20; i++ ) {
 	TQString str;
 	str = TQString( "Folder %1" ).arg( i );
-	Folder *f = new Folder( 0, str );
+	Folder *f = new Folder( nullptr, str );
 	for ( unsigned int j = 1; j < 5; j++ ) {
 	    TQString str2;
 	    str2 = TQString( "Sub Folder %1" ).arg( j );
diff --git a/examples/listviews/listviews.h b/examples/listviews/listviews.h
index 510845228..83813b1d8 100644
--- a/examples/listviews/listviews.h
+++ b/examples/listviews/listviews.h
@@ -141,7 +141,7 @@ class ListViews : public TQSplitter
     TQ_OBJECT
 
 public:
-    ListViews( TQWidget *parent = 0, const char *name = 0 );
+    ListViews( TQWidget *parent = nullptr, const char *name = nullptr );
     ~ListViews()
     {}
 
diff --git a/examples/mdi/application.cpp b/examples/mdi/application.cpp
index 0bfee4d54..caf05f67b 100644
--- a/examples/mdi/application.cpp
+++ b/examples/mdi/application.cpp
@@ -50,7 +50,7 @@ const char * filePrintText = "Click this button to print the file you "
 "You can also select the Print command from the File menu.";
 
 ApplicationWindow::ApplicationWindow()
-    : TQMainWindow( 0, "example application main window", WDestructiveClose )
+    : TQMainWindow( nullptr, "example application main window", WDestructiveClose )
 {
     int id;
 
@@ -145,7 +145,7 @@ ApplicationWindow::~ApplicationWindow()
 
 MDIWindow* ApplicationWindow::newDoc()
 {
-    MDIWindow* w = new MDIWindow( ws, 0, WDestructiveClose );
+    MDIWindow* w = new MDIWindow( ws, nullptr, WDestructiveClose );
     connect( w, TQ_SIGNAL( message(const TQString&, int) ), statusBar(), TQ_SLOT( message(const TQString&, int )) );
     w->setCaption("unnamed document");
     w->setIcon( TQPixmap("document.xpm") );
@@ -285,7 +285,7 @@ void ApplicationWindow::closeEvent( TQCloseEvent *e )
 MDIWindow::MDIWindow( TQWidget* parent, const char* name, int wflags )
     : TQMainWindow( parent, name, wflags )
 {
-    mmovie = 0;
+    mmovie = nullptr;
     medit = new TQTextEdit( this );
     setFocusProxy( medit );
     setCentralWidget( medit );
@@ -341,7 +341,7 @@ void MDIWindow::load( const TQString& fn )
 	tmp->show();
 	mmovie=qm;
     } else {
-	mmovie = 0;
+	mmovie = nullptr;
 
 	TQTextStream t(&f);
 	TQString s = t.read();
diff --git a/examples/menu/menu.h b/examples/menu/menu.h
index 5bde69ec4..fea75f6a1 100644
--- a/examples/menu/menu.h
+++ b/examples/menu/menu.h
@@ -19,7 +19,7 @@ class MenuExample : public TQWidget
 {
     TQ_OBJECT
 public:
-    MenuExample( TQWidget *parent=0, const char *name=0 );
+    MenuExample( TQWidget *parent=nullptr, const char *name=nullptr );
 
 public slots:
     void open();
diff --git a/examples/movies/main.cpp b/examples/movies/main.cpp
index 552a4d80c..1629aefe3 100644
--- a/examples/movies/main.cpp
+++ b/examples/movies/main.cpp
@@ -24,7 +24,7 @@ class MovieScreen : public TQFrame {
     TQSize sh;
 
 public:
-    MovieScreen(const char* fname, TQMovie m, TQWidget* p=0, const char* name=0, WFlags f=0) :
+    MovieScreen(const char* fname, TQMovie m, TQWidget* p=nullptr, const char* name=nullptr, WFlags f=0) :
         TQFrame(p, name, f),
 	sh(100,100)
     {
@@ -82,7 +82,7 @@ protected:
 
         // The on-screen display
 
-        const char* message = 0;
+        const char* message = nullptr;
 
         if (movie.paused()) {
             message = "PAUSED";
@@ -197,7 +197,7 @@ private slots:
 class MoviePlayer : public TQVBox {
     MovieScreen* movie;
 public:
-    MoviePlayer(const char* fname, TQMovie m, TQWidget* p=0, const char* name=0, WFlags f=0) :
+    MoviePlayer(const char* fname, TQMovie m, TQWidget* p=nullptr, const char* name=nullptr, WFlags f=0) :
 	TQVBox(p,name,f)
     {
 	movie = new MovieScreen(fname, m, this);
@@ -244,7 +244,7 @@ MovieStarter::MovieStarter(const char *dir)
 void MovieStarter::startMovie(const TQString& filename)
 {
     if ( filename ) // Start a new movie - have it delete when closed.
-	(new MoviePlayer( filename, TQMovie(filename), 0, 0,
+	(new MoviePlayer( filename, TQMovie(filename), nullptr, nullptr,
 			       WDestructiveClose))->show();
 }
 
@@ -270,10 +270,10 @@ int main(int argc, char **argv)
 	    if ( TQString(argv[arg]) == "-i" )
 		gui = !gui;
 	    else if ( gui )
-		(void)new MoviePlayer(argv[arg], TQMovie(argv[arg]), 0, 0,
+		(void)new MoviePlayer(argv[arg], TQMovie(argv[arg]), nullptr, nullptr,
 				      TQt::WDestructiveClose);
 	    else
-		(void)new MovieScreen(argv[arg], TQMovie(argv[arg]), 0, 0,
+		(void)new MovieScreen(argv[arg], TQMovie(argv[arg]), nullptr, nullptr,
 				      TQt::WDestructiveClose);
 	}
         TQObject::connect(tqApp, TQ_SIGNAL(lastWindowClosed()), tqApp, TQ_SLOT(quit()));
diff --git a/examples/network/clientserver/server/server.cpp b/examples/network/clientserver/server/server.cpp
index 9f8d82a7f..fe31ff323 100644
--- a/examples/network/clientserver/server/server.cpp
+++ b/examples/network/clientserver/server/server.cpp
@@ -28,7 +28,7 @@ class ClientSocket : public TQSocket
 {
     TQ_OBJECT
 public:
-    ClientSocket( int sock, TQObject *parent=0, const char *name=0 ) :
+    ClientSocket( int sock, TQObject *parent=nullptr, const char *name=nullptr ) :
 	TQSocket( parent, name )
     {
 	line = 0;
@@ -75,7 +75,7 @@ class SimpleServer : public TQServerSocket
 {
     TQ_OBJECT
 public:
-    SimpleServer( TQObject* parent=0 ) :
+    SimpleServer( TQObject* parent=nullptr ) :
 	TQServerSocket( 4242, 1, parent )
     {
 	if ( !ok() ) {
diff --git a/examples/network/httpd/httpd.cpp b/examples/network/httpd/httpd.cpp
index dc65fb9e0..2fe7f2075 100644
--- a/examples/network/httpd/httpd.cpp
+++ b/examples/network/httpd/httpd.cpp
@@ -23,7 +23,7 @@ class HttpDaemon : public TQServerSocket
 {
     TQ_OBJECT
 public:
-    HttpDaemon( TQObject* parent=0 ) :
+    HttpDaemon( TQObject* parent=nullptr ) :
 	TQServerSocket(8080,1,parent)
     {
 	if ( !ok() ) {
diff --git a/examples/network/infoprotocol/infoclient/client.cpp b/examples/network/infoprotocol/infoclient/client.cpp
index 45d961136..e3e3347c5 100644
--- a/examples/network/infoprotocol/infoclient/client.cpp
+++ b/examples/network/infoprotocol/infoclient/client.cpp
@@ -20,7 +20,7 @@
 
 
 ClientInfo::ClientInfo( TQWidget *parent, const char *name ) :
-    ClientInfoBase( parent, name ), socket( 0 )
+    ClientInfoBase( parent, name ), socket( nullptr )
 {
     edHost->setText( "localhost" );
     edPort->setText( TQString::number( (uint)infoPort ) );
diff --git a/examples/network/infoprotocol/infoclient/client.h b/examples/network/infoprotocol/infoclient/client.h
index 544d28ae7..ed7d1ca12 100644
--- a/examples/network/infoprotocol/infoclient/client.h
+++ b/examples/network/infoprotocol/infoclient/client.h
@@ -24,7 +24,7 @@ class ClientInfo : public ClientInfoBase
 {
     TQ_OBJECT
 public:
-    ClientInfo( TQWidget *parent = 0, const char *name = 0 );
+    ClientInfo( TQWidget *parent = nullptr, const char *name = nullptr );
 
 private:
     enum Operation { List, Get };
diff --git a/examples/network/infoprotocol/infoserver/main.cpp b/examples/network/infoprotocol/infoserver/main.cpp
index b37776a7a..4e73b9566 100644
--- a/examples/network/infoprotocol/infoserver/main.cpp
+++ b/examples/network/infoprotocol/infoserver/main.cpp
@@ -15,7 +15,7 @@ int main( int argc, char** argv )
 {
     TQApplication app( argc, argv );
     TQ_UINT16 port = ( argc > 1 ) ? TQString( argv[ 1 ] ).toInt() : infoPort;
-    ServerInfo info( port, 0, "server info" );
+    ServerInfo info( port, nullptr, "server info" );
     app.setMainWidget( &info );
     info.show();
     return app.exec();
diff --git a/examples/network/infoprotocol/infoserver/server.cpp b/examples/network/infoprotocol/infoserver/server.cpp
index 3637a0195..3ed477f5e 100644
--- a/examples/network/infoprotocol/infoserver/server.cpp
+++ b/examples/network/infoprotocol/infoserver/server.cpp
@@ -36,7 +36,7 @@ SimpleServer::SimpleServer( TQ_UINT16 port, TQObject* parent, const char *name )
     TQServerSocket( port, 1, parent, name )
 {
     if ( !ok() ) {
-	TQMessageBox::critical( 0, tr( "Error" ), tr( "Failed to bind to port %1" ).arg( port ) );
+	TQMessageBox::critical( nullptr, tr( "Error" ), tr( "Failed to bind to port %1" ).arg( port ) );
 	exit(1);
     }
 }
diff --git a/examples/network/infoprotocol/infoserver/server.h b/examples/network/infoprotocol/infoserver/server.h
index c5662697f..a32aa7951 100644
--- a/examples/network/infoprotocol/infoserver/server.h
+++ b/examples/network/infoprotocol/infoserver/server.h
@@ -27,7 +27,7 @@ class ServerInfo : public ServerInfoBase
 {
     TQ_OBJECT
 public:
-    ServerInfo( TQ_UINT16 port = infoPort, TQWidget *parent = 0, const char *name = 0 );
+    ServerInfo( TQ_UINT16 port = infoPort, TQWidget *parent = nullptr, const char *name = nullptr );
 
 private slots:
     void newConnect();
@@ -38,7 +38,7 @@ class SimpleServer : public TQServerSocket
 {
     TQ_OBJECT
 public:
-    SimpleServer( TQ_UINT16 port = infoPort, TQObject* parent = 0, const char *name = 0 );
+    SimpleServer( TQ_UINT16 port = infoPort, TQObject* parent = nullptr, const char *name = nullptr );
     void newConnection( int socket );
 
 signals:
@@ -53,7 +53,7 @@ class ClientSocket : public TQSocket
 {
     TQ_OBJECT
 public:
-    ClientSocket( int sock, InfoData *i, TQObject *parent = 0, const char *name = 0 );
+    ClientSocket( int sock, InfoData *i, TQObject *parent = nullptr, const char *name = nullptr );
 
 private slots:
     void readClient();
diff --git a/examples/network/infoprotocol/infourlclient/client.cpp b/examples/network/infoprotocol/infourlclient/client.cpp
index a4fcec5dc..57fb58e82 100644
--- a/examples/network/infoprotocol/infourlclient/client.cpp
+++ b/examples/network/infoprotocol/infourlclient/client.cpp
@@ -43,7 +43,7 @@ TQString ClientInfo::getOpenFileName()
 {
     static TQString workingDirectory( "qip://localhost/" );
 
-    TQFileDialog dlg( workingDirectory, TQString::null, 0, 0, true );
+    TQFileDialog dlg( workingDirectory, TQString::null, nullptr, nullptr, true );
     dlg.setCaption( TQFileDialog::tr( "Open" ) );
     dlg.setMode( TQFileDialog::ExistingFile );
     TQString result;
diff --git a/examples/network/infoprotocol/infourlclient/client.h b/examples/network/infoprotocol/infourlclient/client.h
index ef8e01473..3ef63a66c 100644
--- a/examples/network/infoprotocol/infourlclient/client.h
+++ b/examples/network/infoprotocol/infourlclient/client.h
@@ -20,7 +20,7 @@ class ClientInfo : public ClientInfoBase
     TQ_OBJECT
 
 public:
-    ClientInfo( TQWidget *parent = 0, const char *name = 0 );
+    ClientInfo( TQWidget *parent = nullptr, const char *name = nullptr );
 
 private slots:
     void downloadFile();
diff --git a/examples/network/mail/composer.h b/examples/network/mail/composer.h
index 9e523a15f..e22396a01 100644
--- a/examples/network/mail/composer.h
+++ b/examples/network/mail/composer.h
@@ -24,7 +24,7 @@ class Composer : public TQWidget
     TQ_OBJECT
 
 public:
-    Composer( TQWidget *parent = 0 );
+    Composer( TQWidget *parent = nullptr );
 
 private slots:
     void sendMessage();
diff --git a/examples/network/networkprotocol/view.cpp b/examples/network/networkprotocol/view.cpp
index 939f802ff..7e1cce197 100644
--- a/examples/network/networkprotocol/view.cpp
+++ b/examples/network/networkprotocol/view.cpp
@@ -71,7 +71,7 @@ TQString View::getOpenFileName()
     static TQString workingDirectory = TQDir::currentDirPath();
 
     TQFileDialog *dlg = new TQFileDialog( workingDirectory,
-	    TQString::null, 0, 0, true );
+	    TQString::null, nullptr, nullptr, true );
     dlg->setCaption( TQFileDialog::tr( "Open" ) );
     dlg->setMode( TQFileDialog::ExistingFile );
     TQString result;
diff --git a/examples/network/remotecontrol/startup.cpp b/examples/network/remotecontrol/startup.cpp
index 8f86840f3..3c80b0e4c 100644
--- a/examples/network/remotecontrol/startup.cpp
+++ b/examples/network/remotecontrol/startup.cpp
@@ -10,8 +10,8 @@ static const TQ_UINT16 ipcPort = 54923;
 
 StartUp::StartUp()
 {
-    remoteCtrl = 0;
-    mainDialog = 0;
+    remoteCtrl = nullptr;
+    mainDialog = nullptr;
 
     socket = new TQSocket( this );
     connect( socket, TQ_SIGNAL(connected()), TQ_SLOT(startRemoteCtrl()) );
diff --git a/examples/opengl/box/globjwin.h b/examples/opengl/box/globjwin.h
index fcc8aa3b0..b07314f12 100644
--- a/examples/opengl/box/globjwin.h
+++ b/examples/opengl/box/globjwin.h
@@ -24,7 +24,7 @@ class GLObjectWindow : public TQWidget
 {
     TQ_OBJECT
 public:
-    GLObjectWindow( TQWidget* parent = 0, const char* name = 0 );
+    GLObjectWindow( TQWidget* parent = nullptr, const char* name = nullptr );
 
 };
 
diff --git a/examples/opengl/gear/gear.cpp b/examples/opengl/gear/gear.cpp
index a895e6465..6440cc718 100644
--- a/examples/opengl/gear/gear.cpp
+++ b/examples/opengl/gear/gear.cpp
@@ -195,7 +195,7 @@ static int timer_interval = 10;			// timer interval (millisec)
 class GearWidget : public TQGLWidget
 {
 public:
-    GearWidget( TQWidget *parent=0, const char *name=0 );
+    GearWidget( TQWidget *parent=nullptr, const char *name=nullptr );
 protected:
     void initializeGL();
     void resizeGL( int, int );
diff --git a/examples/opengl/glpixmap/glbox.h b/examples/opengl/glpixmap/glbox.h
index a4c7da131..b59840d38 100644
--- a/examples/opengl/glpixmap/glbox.h
+++ b/examples/opengl/glpixmap/glbox.h
@@ -25,9 +25,9 @@ class GLBox : public TQGLWidget
 
 public:
 
-    GLBox( TQWidget* parent, const char* name, const TQGLWidget* shareWidget=0 );
+    GLBox( TQWidget* parent, const char* name, const TQGLWidget* shareWidget=nullptr );
     GLBox( const TQGLFormat& format, TQWidget* parent, const char* name, 
-	   const TQGLWidget* shareWidget=0 );
+	   const TQGLWidget* shareWidget=nullptr );
     ~GLBox();
 
     void		copyRotation( const GLBox& fromBox );
diff --git a/examples/opengl/glpixmap/globjwin.h b/examples/opengl/glpixmap/globjwin.h
index 3d6077f05..ec403da7f 100644
--- a/examples/opengl/glpixmap/globjwin.h
+++ b/examples/opengl/glpixmap/globjwin.h
@@ -27,7 +27,7 @@ class GLObjectWindow : public TQWidget
 {
     TQ_OBJECT
 public:
-    GLObjectWindow( TQWidget* parent = 0, const char* name = 0 );
+    GLObjectWindow( TQWidget* parent = nullptr, const char* name = nullptr );
 
 protected slots:
 
diff --git a/examples/opengl/overlay/globjwin.cpp b/examples/opengl/overlay/globjwin.cpp
index 04ca2059c..2c3a31188 100644
--- a/examples/opengl/overlay/globjwin.cpp
+++ b/examples/opengl/overlay/globjwin.cpp
@@ -39,7 +39,7 @@ GLObjectWindow::GLObjectWindow( TQWidget* parent, const char* name )
 
     // Check if we obtained an overlay
     if ( !c->format().hasOverlay() ) {
-	TQMessageBox::warning( 0, tqApp->argv()[0], 
+	TQMessageBox::warning( nullptr, tqApp->argv()[0], 
 			      "Failed to get an OpenGL overlay",
 			      "OK" );
     }
diff --git a/examples/opengl/overlay/globjwin.h b/examples/opengl/overlay/globjwin.h
index b30de27f2..0f44f3b7e 100644
--- a/examples/opengl/overlay/globjwin.h
+++ b/examples/opengl/overlay/globjwin.h
@@ -24,7 +24,7 @@ class GLObjectWindow : public TQWidget
 {
     TQ_OBJECT
 public:
-    GLObjectWindow( TQWidget* parent = 0, const char* name = 0 );
+    GLObjectWindow( TQWidget* parent = nullptr, const char* name = nullptr );
 
 
 };
diff --git a/examples/opengl/overlay/main.cpp b/examples/opengl/overlay/main.cpp
index 5fb9e06bb..9b537572a 100644
--- a/examples/opengl/overlay/main.cpp
+++ b/examples/opengl/overlay/main.cpp
@@ -37,7 +37,7 @@ int main( int argc, char **argv )
 
     // Check for existence of overlays
     if ( !TQGLFormat::hasOpenGLOverlays() ) {
-	TQMessageBox::critical( 0, tqApp->argv()[0], 
+	TQMessageBox::critical( nullptr, tqApp->argv()[0], 
 			       "This system does not support OpenGL overlays",
 			       "Exit" );
 	return 1;
diff --git a/examples/opengl/overlay_x11/gearwidget.h b/examples/opengl/overlay_x11/gearwidget.h
index 4c04fcbc8..652b3b1b0 100644
--- a/examples/opengl/overlay_x11/gearwidget.h
+++ b/examples/opengl/overlay_x11/gearwidget.h
@@ -17,7 +17,7 @@
 class GearWidget : public TQGLWidget
 {
 public:
-    GearWidget( TQWidget *parent=0, const char *name=0 );
+    GearWidget( TQWidget *parent=nullptr, const char *name=nullptr );
 
 protected:
     void initializeGL();
diff --git a/examples/opengl/overlay_x11/rubberbandwidget.h b/examples/opengl/overlay_x11/rubberbandwidget.h
index aba6f8ce0..0b379c5df 100644
--- a/examples/opengl/overlay_x11/rubberbandwidget.h
+++ b/examples/opengl/overlay_x11/rubberbandwidget.h
@@ -19,8 +19,8 @@
 class RubberbandWidget : public TQWidget
 {
 public:
-    RubberbandWidget( TQColor transparentColor, TQWidget *parent=0, 
-		      const char *name=0, WFlags f=0 );
+    RubberbandWidget( TQColor transparentColor, TQWidget *parent=nullptr, 
+		      const char *name=nullptr, WFlags f=0 );
 
 protected:
     void mousePressEvent( TQMouseEvent* e );
diff --git a/examples/opengl/sharedbox/glbox.h b/examples/opengl/sharedbox/glbox.h
index 46696e5af..c23731530 100644
--- a/examples/opengl/sharedbox/glbox.h
+++ b/examples/opengl/sharedbox/glbox.h
@@ -25,7 +25,7 @@ class GLBox : public TQGLWidget
 
 public:
 
-    GLBox( TQWidget* parent, const char* name, const TQGLWidget* shareWidget=0 );
+    GLBox( TQWidget* parent, const char* name, const TQGLWidget* shareWidget=nullptr );
     ~GLBox();
 
 public slots:
diff --git a/examples/opengl/sharedbox/globjwin.cpp b/examples/opengl/sharedbox/globjwin.cpp
index cc85082e3..239a3ecb1 100644
--- a/examples/opengl/sharedbox/globjwin.cpp
+++ b/examples/opengl/sharedbox/globjwin.cpp
@@ -94,6 +94,6 @@ void GLObjectWindow::deleteFirstWidget()
     // Delete only c1; c2 will keep working and use the shared display list
     if ( c1 ) {
 	delete c1;
-	c1 = 0;
+	c1 = nullptr;
     }
 }
diff --git a/examples/opengl/sharedbox/globjwin.h b/examples/opengl/sharedbox/globjwin.h
index 745b01110..080cae10e 100644
--- a/examples/opengl/sharedbox/globjwin.h
+++ b/examples/opengl/sharedbox/globjwin.h
@@ -24,7 +24,7 @@ class GLObjectWindow : public TQWidget
 {
     TQ_OBJECT
 public:
-    GLObjectWindow( TQWidget* parent = 0, const char* name = 0 );
+    GLObjectWindow( TQWidget* parent = nullptr, const char* name = nullptr );
 
 protected slots:
 
diff --git a/examples/opengl/texture/globjwin.h b/examples/opengl/texture/globjwin.h
index fcc8aa3b0..b07314f12 100644
--- a/examples/opengl/texture/globjwin.h
+++ b/examples/opengl/texture/globjwin.h
@@ -24,7 +24,7 @@ class GLObjectWindow : public TQWidget
 {
     TQ_OBJECT
 public:
-    GLObjectWindow( TQWidget* parent = 0, const char* name = 0 );
+    GLObjectWindow( TQWidget* parent = nullptr, const char* name = nullptr );
 
 };
 
diff --git a/examples/picture/picture.cpp b/examples/picture/picture.cpp
index db8b164fe..070607a6c 100644
--- a/examples/picture/picture.cpp
+++ b/examples/picture/picture.cpp
@@ -66,7 +66,7 @@ PictureDisplay::PictureDisplay( const char *fileName )
     name = fileName;
     if ( !pict->load(fileName) ) {		// cannot load picture
 	delete pict;
-	pict = 0;
+	pict = nullptr;
 	name.sprintf( "Not able to load picture: %s", fileName );
     }
 }
@@ -117,7 +117,7 @@ int main( int argc, char **argv )
 	paint.end();				// painting done
 
 	pict.save( fileName );			// save picture
-	TQMessageBox::information(0, "TQt Example - Picture", "Saved.  Run me again!");
+	TQMessageBox::information(nullptr, "TQt Example - Picture", "Saved.  Run me again!");
 	return 0;
     } else {
 	PictureDisplay test( fileName );	// create picture display
diff --git a/examples/popup/popup.cpp b/examples/popup/popup.cpp
index c2b8bd7e6..f54b575a8 100644
--- a/examples/popup/popup.cpp
+++ b/examples/popup/popup.cpp
@@ -82,7 +82,7 @@ Frame::Frame(TQWidget* parent, const char* name): TQFrame(parent, name){
     //create a very simple popup: it is just composed with other
     //widget and will be shown after clicking on button1
 
-    popup1 = new TQFrame( this ,0, WType_Popup);
+    popup1 = new TQFrame( this ,nullptr, WType_Popup);
     popup1->setFrameStyle( WinPanel|Raised );
     popup1->resize(150,100);
     TQLineEdit *tmpE = new TQLineEdit( popup1 );
diff --git a/examples/popup/popup.h b/examples/popup/popup.h
index 819ca1e2f..abe2b1ee9 100644
--- a/examples/popup/popup.h
+++ b/examples/popup/popup.h
@@ -21,9 +21,9 @@ class FancyPopup : public TQLabel
 {
     TQ_OBJECT
 public:
-    FancyPopup( TQWidget* parent = 0, const char*  name=0);
+    FancyPopup( TQWidget* parent = nullptr, const char*  name=nullptr);
     
-    void popup( TQWidget* parent = 0);
+    void popup( TQWidget* parent = nullptr);
 protected:
     virtual void mouseMoveEvent( TQMouseEvent * );
     virtual void mouseReleaseEvent( TQMouseEvent * );
@@ -39,7 +39,7 @@ private:
  {
      TQ_OBJECT
  public:
-     Frame( TQWidget *parent=0, const char*  name=0);
+     Frame( TQWidget *parent=nullptr, const char*  name=nullptr);
 
  protected:
 
diff --git a/examples/process/process.cpp b/examples/process/process.cpp
index dcdc39e15..bb69e06d2 100644
--- a/examples/process/process.cpp
+++ b/examples/process/process.cpp
@@ -62,7 +62,7 @@ UicManager::UicManager()
 
     if ( !proc->start() ) {
 	// error handling
-	TQMessageBox::critical( 0,
+	TQMessageBox::critical( nullptr,
 		tr("Fatal error"),
 		tr("Could not start the tquic command."),
 		tr("Quit") );
diff --git a/examples/progress/progress.cpp b/examples/progress/progress.cpp
index 9654f1633..3cd9d4441 100644
--- a/examples/progress/progress.cpp
+++ b/examples/progress/progress.cpp
@@ -139,7 +139,7 @@ class CPUWaster : public TQWidget
 
 public:
     CPUWaster() :
-	pb(0)
+	pb(nullptr)
     {
 	menubar = new TQMenuBar( this, "menu" );
 	TQ_CHECK_PTR( menubar );
@@ -246,7 +246,7 @@ private:
 	    enableDrawingItems(true);
 	    killTimers();
 	    delete pb;
-	    pb = 0;
+	    pb = nullptr;
 	}
     }
 
diff --git a/examples/progressbar/progressbar.h b/examples/progressbar/progressbar.h
index d116a11b1..4451c807d 100644
--- a/examples/progressbar/progressbar.h
+++ b/examples/progressbar/progressbar.h
@@ -22,7 +22,7 @@ class ProgressBar : public TQButtonGroup
     TQ_OBJECT
 
 public:
-    ProgressBar( TQWidget *parent = 0, const char *name = 0 );
+    ProgressBar( TQWidget *parent = nullptr, const char *name = nullptr );
 
 protected:
     TQRadioButton *slow, *normal, *fast;
diff --git a/examples/qfd/fontdisplayer.h b/examples/qfd/fontdisplayer.h
index 39a3689b1..f488123fc 100644
--- a/examples/qfd/fontdisplayer.h
+++ b/examples/qfd/fontdisplayer.h
@@ -18,7 +18,7 @@ class TQSlider;
 class FontRowTable : public TQFrame {
     TQ_OBJECT
 public:
-    FontRowTable( TQWidget* parent=0, const char* name=0 );
+    FontRowTable( TQWidget* parent=nullptr, const char* name=nullptr );
 
     TQSize sizeHint() const;
 
@@ -41,7 +41,7 @@ private:
 class FontDisplayer : public TQMainWindow {
     TQ_OBJECT
 public:
-    FontDisplayer( TQWidget* parent=0, const char* name=0 );
+    FontDisplayer( TQWidget* parent=nullptr, const char* name=nullptr );
 };
 
 #endif
diff --git a/examples/qmag/qmag.cpp b/examples/qmag/qmag.cpp
index 6b4011a84..b6206fade 100644
--- a/examples/qmag/qmag.cpp
+++ b/examples/qmag/qmag.cpp
@@ -24,7 +24,7 @@ class MagWidget : public TQWidget
 {
     TQ_OBJECT
 public:
-    MagWidget( TQWidget *parent=0, const char *name=0 );
+    MagWidget( TQWidget *parent=nullptr, const char *name=nullptr );
 
 public slots:
     void	setZoom( int );
@@ -133,8 +133,8 @@ MagWidget::MagWidget( TQWidget *parent, const char *name )
     quitButton->setGeometry( multiSaveButton->geometry().right() + 2, 2,
 			     10+quitButton->fontMetrics().width("Quit"), 20 );
 #else
-    zoom = 0;
-    multiSaveButton = 0;
+    zoom = nullptr;
+    multiSaveButton = nullptr;
 #endif
 
     setRefresh(1);
diff --git a/examples/qwerty/qwerty.cpp b/examples/qwerty/qwerty.cpp
index 0a0c61ce6..2d05790e6 100644
--- a/examples/qwerty/qwerty.cpp
+++ b/examples/qwerty/qwerty.cpp
@@ -23,7 +23,7 @@
 
 const bool no_writing = false;
 
-static TQPtrList<TQTextCodec> *codecList = 0;
+static TQPtrList<TQTextCodec> *codecList = nullptr;
 
 enum { Uni = 0, MBug = 1, Lat1 = 2, Local = 3, Guess = 4, Codec = 5 };
 
@@ -229,7 +229,7 @@ void Editor::addEncoding()
 	    if (TQTextCodec::loadCharmap(&f)) {
 		rebuildCodecList();
 	    } else {
-		TQMessageBox::warning(0,"Charmap error",
+		TQMessageBox::warning(nullptr,"Charmap error",
 		    "The file did not contain a valid charmap.\n\n"
 		    "A charmap file should look like this:\n"
 		       "  <code_set_name> thename\n"
diff --git a/examples/qwerty/qwerty.h b/examples/qwerty/qwerty.h
index 6b5146f6f..4ac09b575 100644
--- a/examples/qwerty/qwerty.h
+++ b/examples/qwerty/qwerty.h
@@ -19,7 +19,7 @@ class Editor : public TQWidget
 {
     TQ_OBJECT
 public:
-    Editor( TQWidget *parent=0, const char *name="qwerty" );
+    Editor( TQWidget *parent=nullptr, const char *name="qwerty" );
    ~Editor();
 
     void load( const TQString& fileName, int code=-1 );
diff --git a/examples/rangecontrols/rangecontrols.h b/examples/rangecontrols/rangecontrols.h
index 6704b00b7..cb59a20c5 100644
--- a/examples/rangecontrols/rangecontrols.h
+++ b/examples/rangecontrols/rangecontrols.h
@@ -19,7 +19,7 @@ class RangeControls : public TQVBox
     TQ_OBJECT
 
 public:
-    RangeControls( TQWidget *parent = 0, const char *name = 0 );
+    RangeControls( TQWidget *parent = nullptr, const char *name = nullptr );
 
 private:
     TQCheckBox *notches, *wrapping;
diff --git a/examples/regexptester/regexptester.cpp b/examples/regexptester/regexptester.cpp
index 0c4e2f3e5..891718251 100644
--- a/examples/regexptester/regexptester.cpp
+++ b/examples/regexptester/regexptester.cpp
@@ -47,17 +47,17 @@ RegexpTester::RegexpTester(TQWidget* parent, const char* name, bool modal,
     gridLayout->addWidget(regexComboBox, 0, 1);
     gridLayout->addWidget(textLabel, 1, 0);
     gridLayout->addWidget(textComboBox, 1, 1);
-    TQHBoxLayout *checkboxLayout = new TQHBoxLayout(0, 6, 6);
+    TQHBoxLayout *checkboxLayout = new TQHBoxLayout(nullptr, 6, 6);
     checkboxLayout->addWidget(caseSensitiveCheckBox);
     checkboxLayout->addWidget(minimalCheckBox);
     checkboxLayout->addWidget(wildcardCheckBox);
     checkboxLayout->addStretch(1);
-    TQVBoxLayout *buttonLayout = new TQVBoxLayout(0, 6, 6);
+    TQVBoxLayout *buttonLayout = new TQVBoxLayout(nullptr, 6, 6);
     buttonLayout->addWidget(executePushButton);
     buttonLayout->addWidget(copyPushButton);
     buttonLayout->addWidget(quitPushButton);
     buttonLayout->addStretch(1);
-    TQHBoxLayout *middleLayout = new TQHBoxLayout(0, 6, 6);
+    TQHBoxLayout *middleLayout = new TQHBoxLayout(nullptr, 6, 6);
     middleLayout->addWidget(resultTable);
     middleLayout->addLayout(buttonLayout);
     TQVBoxLayout *mainLayout = new TQVBoxLayout(this, 6, 6);
diff --git a/examples/regexptester/regexptester.h b/examples/regexptester/regexptester.h
index 0dbb50d05..48e3f8971 100644
--- a/examples/regexptester/regexptester.h
+++ b/examples/regexptester/regexptester.h
@@ -15,7 +15,7 @@ class RegexpTester : public TQDialog
     TQ_OBJECT
 
 public:
-    RegexpTester(TQWidget* parent=0, const char* name=0, bool modal=false,
+    RegexpTester(TQWidget* parent=nullptr, const char* name=nullptr, bool modal=false,
 		 WFlags f=0);
 
     TQLabel *regexLabel;
diff --git a/examples/richtext/richtext.cpp b/examples/richtext/richtext.cpp
index d3483212f..9854555fe 100644
--- a/examples/richtext/richtext.cpp
+++ b/examples/richtext/richtext.cpp
@@ -70,7 +70,7 @@ static const char* sayings[] = {
     "what his grandson will be.</big><br><br>"
     "<center><i>-- Abraham Lincoln</i></center>",
 
-    0
+    nullptr
 };
 
 
@@ -83,7 +83,7 @@ MyRichText::MyRichText( TQWidget *parent, const char *name )
     view->setText( "This is a <b>Test</b> with <i>italic</i> <u>stuff</u>" );
     TQBrush paper;
     paper.setPixmap( TQPixmap( "../richtext/marble.png" ) );
-    if ( paper.pixmap() != 0 )
+    if ( paper.pixmap() )
 	view->setPaper( paper );
     else
 	view->setPaper( white );
diff --git a/examples/richtext/richtext.h b/examples/richtext/richtext.h
index cb1ca6a39..377280cfd 100644
--- a/examples/richtext/richtext.h
+++ b/examples/richtext/richtext.h
@@ -20,7 +20,7 @@ class MyRichText : public TQVBox
     TQ_OBJECT
 
 public:
-    MyRichText( TQWidget *parent = 0, const char *name = 0 );
+    MyRichText( TQWidget *parent = nullptr, const char *name = nullptr );
 
 protected:
     TQTextView *view;
diff --git a/examples/scribble/scribble.cpp b/examples/scribble/scribble.cpp
index 2d57c7305..f6af56c2e 100644
--- a/examples/scribble/scribble.cpp
+++ b/examples/scribble/scribble.cpp
@@ -146,7 +146,7 @@ Scribble::Scribble( TQWidget *parent, const char *name )
 
 void Scribble::slotSave()
 {
-    TQPopupMenu *menu = new TQPopupMenu( 0 );
+    TQPopupMenu *menu = new TQPopupMenu( nullptr );
     TQIntDict<TQString> formats;
     formats.setAutoDelete( true );
 
diff --git a/examples/scribble/scribble.h b/examples/scribble/scribble.h
index be302fc63..5cb968c7b 100644
--- a/examples/scribble/scribble.h
+++ b/examples/scribble/scribble.h
@@ -29,7 +29,7 @@ class Canvas : public TQWidget
     TQ_OBJECT
 
 public:
-    Canvas( TQWidget *parent = 0, const char *name = 0 );
+    Canvas( TQWidget *parent = nullptr, const char *name = nullptr );
 
     void setPenColor( const TQColor &c )
     { pen.setColor( c ); }
@@ -68,7 +68,7 @@ class Scribble : public TQMainWindow
     TQ_OBJECT
 
 public:
-    Scribble( TQWidget *parent = 0, const char *name = 0 );
+    Scribble( TQWidget *parent = nullptr, const char *name = nullptr );
 
 protected:
     Canvas* canvas;
diff --git a/examples/scrollview/scrollview.cpp b/examples/scrollview/scrollview.cpp
index 946b01d23..ea3a2490c 100644
--- a/examples/scrollview/scrollview.cpp
+++ b/examples/scrollview/scrollview.cpp
@@ -88,7 +88,7 @@ public:
 	bg.load("bg.ppm");
 	resizeContents(400000,300000);
 
-	dragging = 0;
+	dragging = nullptr;
     }
 
     void viewportMousePressEvent(TQMouseEvent* e)
@@ -104,7 +104,7 @@ public:
 
     void viewportMouseReleaseEvent(TQMouseEvent*)
     {
-	dragging = 0;
+	dragging = nullptr;
     }
 
     void viewportMouseMoveEvent(TQMouseEvent* e)
@@ -198,7 +198,7 @@ class ScrollViewExample : public TQWidget {
     TQ_OBJECT
 
 public:
-    ScrollViewExample(int technique, TQWidget* parent=0, const char* name=0) :
+    ScrollViewExample(int technique, TQWidget* parent=nullptr, const char* name=nullptr) :
 	TQWidget(parent,name)
     {
 	TQMenuBar* menubar = new TQMenuBar(this);
@@ -228,7 +228,7 @@ public:
 
 	if (technique == 1) {
 	    vp = new TQScrollView(this);
-	    BigShrinker *bs = new BigShrinker(0);//(vp->viewport());
+	    BigShrinker *bs = new BigShrinker(nullptr);//(vp->viewport());
 	    vp->addChild(bs);
 	    bs->setAcceptDrops(true);
 	    TQObject::connect(bs, TQ_SIGNAL(clicked(int,int)),
@@ -328,7 +328,7 @@ private slots:
 	    vp->setHScrollBarMode(TQScrollView::AlwaysOn);
 	} else if (id == corn_id) {
 	    bool corn = !vp->cornerWidget();
-	    vp->setCornerWidget(corn ? corner : 0);
+	    vp->setCornerWidget(corn ? corner : nullptr);
 	} else {
 	    return; // Not for us to process.
 	}
@@ -423,9 +423,9 @@ int main( int argc, char **argv )
 {
     TQApplication a( argc, argv );
 
-    ScrollViewExample ve1(1,0,"ve1");
-    ScrollViewExample ve2(2,0,"ve2");
-    ScrollViewExample ve3(3,0,"ve3");
+    ScrollViewExample ve1(1,nullptr,"ve1");
+    ScrollViewExample ve2(2,nullptr,"ve2");
+    ScrollViewExample ve3(3,nullptr,"ve3");
     ve1.setCaption("TQt Example - Scrollviews");
     ve1.show();
     ve2.setCaption("TQt Example - Scrollviews");
diff --git a/examples/showimg/imagefip.h b/examples/showimg/imagefip.h
index fad621681..b8aa473f5 100644
--- a/examples/showimg/imagefip.h
+++ b/examples/showimg/imagefip.h
@@ -21,7 +21,7 @@ class ImageIconProvider : public TQFileIconProvider
     TQPixmap imagepm;
 
 public:
-    ImageIconProvider( TQWidget *parent=0, const char *name=0 );
+    ImageIconProvider( TQWidget *parent=nullptr, const char *name=nullptr );
     ~ImageIconProvider();
 
     const TQPixmap * pixmap( const TQFileInfo &fi );
diff --git a/examples/showimg/imagetexteditor.h b/examples/showimg/imagetexteditor.h
index 7cc5c2489..7212d8404 100644
--- a/examples/showimg/imagetexteditor.h
+++ b/examples/showimg/imagetexteditor.h
@@ -22,7 +22,7 @@ class ImageTextEditor : public TQDialog
 {
     TQ_OBJECT
 public:
-    ImageTextEditor( TQImage& i, TQWidget *parent=0, const char *name=0, WFlags f=0 );
+    ImageTextEditor( TQImage& i, TQWidget *parent=nullptr, const char *name=nullptr, WFlags f=0 );
     ~ImageTextEditor();
     void accept();
 public slots:
diff --git a/examples/showimg/main.cpp b/examples/showimg/main.cpp
index c5ac5defc..fd2a93698 100644
--- a/examples/showimg/main.cpp
+++ b/examples/showimg/main.cpp
@@ -36,14 +36,14 @@ int main( int argc, char **argv )
     if ( argc <= 1 ) {
 	// Create a window which looks after its own existence.
 	ImageViewer *w =
-	    new ImageViewer(0, "new window", TQt::WDestructiveClose | TQt::WResizeNoErase );
+	    new ImageViewer(nullptr, "new window", TQt::WDestructiveClose | TQt::WResizeNoErase );
 	w->setCaption("TQt Example - Image Viewer");
 	w->show();
     } else {
 	for ( int i=1; i<argc; i++ ) {
 	    // Create a window which looks after its own existence.
 	    ImageViewer *w =
-		new ImageViewer(0, argv[i], TQt::WDestructiveClose | TQt::WResizeNoErase );
+		new ImageViewer(nullptr, argv[i], TQt::WDestructiveClose | TQt::WResizeNoErase );
 	    w->setCaption("TQt Example - Image Viewer");
 	    w->loadImage( argv[i] );
 	    w->show();
diff --git a/examples/showimg/showimg.cpp b/examples/showimg/showimg.cpp
index a7288d68d..8ea4426b4 100644
--- a/examples/showimg/showimg.cpp
+++ b/examples/showimg/showimg.cpp
@@ -29,7 +29,7 @@
 ImageViewer::ImageViewer( TQWidget *parent, const char *name, int wFlags )
     : TQWidget( parent, name, wFlags ),
       conversion_flags( PreferDither ),
-      helpmsg( 0 )
+      helpmsg( nullptr )
 {
     pickx = -1;
     picky = -1;
@@ -118,7 +118,7 @@ ImageViewer::~ImageViewer()
     if ( alloc_context )
 	TQColor::destroyAllocContext( alloc_context );
     if ( other == this )
-	other = 0;
+	other = nullptr;
 }
 
 /*
@@ -311,7 +311,7 @@ void ImageViewer::savePixmap( int item )
 
 void ImageViewer::newWindow()
 {
-    ImageViewer* that = new ImageViewer(0, "new window", WDestructiveClose);
+    ImageViewer* that = new ImageViewer(nullptr, "new window", WDestructiveClose);
     that->options->setItemChecked( that->cc, useColorContext() );
     that->show();
 }
@@ -345,7 +345,7 @@ bool ImageViewer::loadImage( const TQString& fileName )
     bool ok = false;
     if ( !filename.isEmpty() ) {
 	TQApplication::setOverrideCursor( waitCursor ); // this might take time
-	ok = image.load(filename, 0);
+	ok = image.load(filename, nullptr);
 	pickx = -1;
 	clickx = -1;
 	if ( ok )
@@ -550,7 +550,7 @@ void ImageViewer::giveHelp()
 	helptext += "</blockquote>";
 
 	helpmsg = new TQMessageBox( "Help", helptext,
-	    TQMessageBox::Information, TQMessageBox::Ok, 0, 0, 0, 0, false );
+	    TQMessageBox::Information, TQMessageBox::Ok, 0, 0, nullptr, nullptr, false );
     }
     helpmsg->show();
     helpmsg->raise();
@@ -578,7 +578,7 @@ void ImageViewer::copyFrom(ImageViewer* s)
 	repaint( image.hasAlphaBuffer() );
     }
 }
-ImageViewer* ImageViewer::other = 0;
+ImageViewer* ImageViewer::other = nullptr;
 
 void ImageViewer::hFlip()
 {
diff --git a/examples/showimg/showimg.h b/examples/showimg/showimg.h
index 70a22a8bc..e271a1c51 100644
--- a/examples/showimg/showimg.h
+++ b/examples/showimg/showimg.h
@@ -22,7 +22,7 @@ class ImageViewer : public TQWidget
 {
     TQ_OBJECT
 public:
-    ImageViewer( TQWidget *parent=0, const char *name=0, int wFlags=0 );
+    ImageViewer( TQWidget *parent=nullptr, const char *name=nullptr, int wFlags=0 );
     ~ImageViewer();
     bool	loadImage( const TQString& );
 protected:
diff --git a/examples/splitter/splitter.cpp b/examples/splitter/splitter.cpp
index 01873c6d1..9fe67b806 100644
--- a/examples/splitter/splitter.cpp
+++ b/examples/splitter/splitter.cpp
@@ -17,7 +17,7 @@
 
 class Test : public TQWidget {
 public:
-    Test(TQWidget* parent=0, const char* name=0, int f=0);
+    Test(TQWidget* parent=nullptr, const char* name=nullptr, int f=0);
     void paintEvent(TQPaintEvent* e);
 private:
 };
@@ -58,7 +58,7 @@ int main( int argc, char ** argv )
 {
     TQApplication a( argc, argv );
 
-    TQSplitter *s1 = new TQSplitter( TQSplitter::Vertical, 0 , "main" );
+    TQSplitter *s1 = new TQSplitter( TQSplitter::Vertical, nullptr , "main" );
 
     TQSplitter *s2 = new TQSplitter( TQSplitter::Horizontal, s1, "top" );
 
diff --git a/examples/sql/overview/custom1/main.h b/examples/sql/overview/custom1/main.h
index fe397c689..d4fc3d356 100644
--- a/examples/sql/overview/custom1/main.h
+++ b/examples/sql/overview/custom1/main.h
@@ -24,7 +24,7 @@ class CustomEdit : public TQLineEdit
     TQ_OBJECT
     TQ_PROPERTY( TQString upperLine READ upperLine WRITE setUpperLine )
     public:
-	CustomEdit( TQWidget *parent=0, const char *name=0 );
+	CustomEdit( TQWidget *parent=nullptr, const char *name=nullptr );
 	TQString upperLine() const;
 	void setUpperLine( const TQString &line );
     public slots:
diff --git a/examples/sql/overview/table3/main.h b/examples/sql/overview/table3/main.h
index 546600bd8..c6c38b359 100644
--- a/examples/sql/overview/table3/main.h
+++ b/examples/sql/overview/table3/main.h
@@ -21,7 +21,7 @@ class StatusPicker : public TQComboBox
     TQ_OBJECT
     TQ_PROPERTY( int statusid READ statusId WRITE setStatusId )
     public:
-	StatusPicker( TQWidget *parent=0, const char *name=0 );
+	StatusPicker( TQWidget *parent=nullptr, const char *name=nullptr );
 	int statusId() const;
 	void setStatusId( int id );
     private:
diff --git a/examples/sql/overview/table4/main.h b/examples/sql/overview/table4/main.h
index 28e3ba2c0..fdc3a107f 100644
--- a/examples/sql/overview/table4/main.h
+++ b/examples/sql/overview/table4/main.h
@@ -23,7 +23,7 @@ class StatusPicker : public TQComboBox
     TQ_OBJECT
     TQ_PROPERTY( int statusid READ statusId WRITE setStatusId )
 public:
-    StatusPicker( TQWidget *parent=0, const char *name=0 );
+    StatusPicker( TQWidget *parent=nullptr, const char *name=nullptr );
     int statusId() const;
     void setStatusId( int id );
 private:
@@ -37,7 +37,7 @@ class CustomTable : public TQDataTable
 public:
     CustomTable( 
 	    TQSqlCursor *cursor, bool autoPopulate = false, 
-	    TQWidget * parent = 0, const char * name = 0 ) : 
+	    TQWidget * parent = nullptr, const char * name = nullptr ) : 
 	TQDataTable( cursor, autoPopulate, parent, name ) {}
     void paintField(
 	    TQPainter * p, const TQSqlField* field, const TQRect & cr, bool );
diff --git a/examples/tabdialog/main.cpp b/examples/tabdialog/main.cpp
index 1cfd671b2..d5d4ae2df 100644
--- a/examples/tabdialog/main.cpp
+++ b/examples/tabdialog/main.cpp
@@ -16,7 +16,7 @@ int main( int argc, char **argv )
 
     TQApplication a( argc, argv );
 
-    TabDialog tabdialog( 0, "tabdialog", TQString( argc < 2 ? "." : argv[1] ) );
+    TabDialog tabdialog( nullptr, "tabdialog", TQString( argc < 2 ? "." : argv[1] ) );
     tabdialog.resize( 450, 350 );
     tabdialog.setCaption( "TQt Example - Tabbed Dialog" );
     a.setMainWidget( &tabdialog );
diff --git a/examples/table/statistics/statistics.cpp b/examples/table/statistics/statistics.cpp
index 4fc34eeb0..dfbac79a9 100644
--- a/examples/table/statistics/statistics.cpp
+++ b/examples/table/statistics/statistics.cpp
@@ -25,11 +25,11 @@ const char* dirs[] = {
     "network",
     "opengl",
     "canvas",
-    0
+    nullptr
 };
 
 Table::Table()
-    : TQTable( 10, 100, 0, "table" )
+    : TQTable( 10, 100, nullptr, "table" )
 {
     setSorting( true );
     horizontalHeader()->setLabel( 0, tr( "File" ) );
@@ -130,7 +130,7 @@ void TableItem::paint( TQPainter *p, const TQColorGroup &cg, const TQRect &cr, b
 
 
 ComboItem::ComboItem( TQTable *t, EditType et )
-    : TQTableItem( t, et, "Yes" ), cb( 0 )
+    : TQTableItem( t, et, "Yes" ), cb( nullptr )
 {
     // we do not want this item to be replaced
     setReplaceable( false );
diff --git a/examples/tablet/canvas.h b/examples/tablet/canvas.h
index c7752f861..5e403f50f 100644
--- a/examples/tablet/canvas.h
+++ b/examples/tablet/canvas.h
@@ -23,7 +23,7 @@ class Canvas : public TQWidget
     TQ_OBJECT
 
 public:
-    Canvas( TQWidget *parent = 0, const char *name = 0, WFlags fl = 0 );
+    Canvas( TQWidget *parent = nullptr, const char *name = nullptr, WFlags fl = 0 );
     virtual ~Canvas() {};
 
     void setPenColor( const TQColor &c )
diff --git a/examples/tablet/scribble.h b/examples/tablet/scribble.h
index 3c999bda6..248292a0f 100644
--- a/examples/tablet/scribble.h
+++ b/examples/tablet/scribble.h
@@ -30,7 +30,7 @@ class Scribble : public TQMainWindow
     TQ_OBJECT
 
 public:
-    Scribble( TQWidget *parent = 0, const char *name = 0 );
+    Scribble( TQWidget *parent = nullptr, const char *name = nullptr );
 
 protected:
     Canvas* canvas;
diff --git a/examples/tablet/tabletstats.h b/examples/tablet/tabletstats.h
index 4d580554a..2afc70f0d 100644
--- a/examples/tablet/tabletstats.h
+++ b/examples/tablet/tabletstats.h
@@ -21,7 +21,7 @@ class MyOrientation : public TQFrame
 {
     TQ_OBJECT
 public:
-    MyOrientation( TQWidget *parent = 0, const char *name = 0 );
+    MyOrientation( TQWidget *parent = nullptr, const char *name = nullptr );
     virtual ~MyOrientation();
 
 public slots:
@@ -33,7 +33,7 @@ class StatsCanvas : public Canvas
 {
     TQ_OBJECT
 public:
-    StatsCanvas( TQWidget *parent = 0, const char* name = 0 );
+    StatsCanvas( TQWidget *parent = nullptr, const char* name = nullptr );
     ~StatsCanvas();
 signals:
     void signalNewPressure( int );
diff --git a/examples/tetrix/qtetrix.h b/examples/tetrix/qtetrix.h
index 5a8666bd3..e3885cfdc 100644
--- a/examples/tetrix/qtetrix.h
+++ b/examples/tetrix/qtetrix.h
@@ -23,7 +23,7 @@ class ShowNextPiece : public TQFrame
     TQ_OBJECT
     friend class TQTetrix;
 public:
-    ShowNextPiece( TQWidget *parent=0, const char *name=0  );
+    ShowNextPiece( TQWidget *parent=nullptr, const char *name=nullptr  );
 public slots:
     void drawNextSquare( int x, int y,TQColor *color );
 signals:
@@ -41,7 +41,7 @@ class TQTetrix : public TQWidget
 {
     TQ_OBJECT
 public:
-    TQTetrix( TQWidget *parent=0, const char *name=0 );
+    TQTetrix( TQWidget *parent=nullptr, const char *name=nullptr );
     void startGame() { board->startGame(); }
 
 public slots:
diff --git a/examples/tetrix/qtetrixb.cpp b/examples/tetrix/qtetrixb.cpp
index 14d53ce89..97ad227c8 100644
--- a/examples/tetrix/qtetrixb.cpp
+++ b/examples/tetrix/qtetrixb.cpp
@@ -18,8 +18,8 @@ TQTetrixBoard::TQTetrixBoard( TQWidget *p, const char *name )
     : TQFrame( p, name )
 {
     setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
-    paint = 0;
-    paint_widget = 0;
+    paint = nullptr;
+    paint_widget = nullptr;
     timer = new TQTimer(this);
     connect( timer, TQ_SIGNAL(timeout()), TQ_SLOT(timeout()) );
 
@@ -74,7 +74,7 @@ void TQTetrixBoard::drawSquare(int x,int y,int value)
     const int X = xOffset  + x*blockWidth;
     const int Y = yOffset  + (y - 1)*blockHeight;
 
-    bool localPainter = paint == 0;
+    bool localPainter = !paint;
     TQPainter *p;
     TQWidget *w;
     if ( localPainter ) {
@@ -85,7 +85,7 @@ void TQTetrixBoard::drawSquare(int x,int y,int value)
 	w = paint_widget;
     }
     drawTetrixButton( p, X, Y, blockWidth, blockHeight,
-		      value == 0 ? 0 : &colors[value-1], w);
+		      value == 0 ? nullptr : &colors[value-1], w);
     /*
     if ( value != 0 ) {
 	TQColor tc, bc;
@@ -104,7 +104,7 @@ void TQTetrixBoard::drawSquare(int x,int y,int value)
 void TQTetrixBoard::drawNextSquare( int x, int y, int value )
 {
     if ( value == 0 )
-        emit drawNextSquareSignal (x, y, 0 );
+        emit drawNextSquareSignal (x, y, nullptr );
     else
         emit drawNextSquareSignal( x, y, &colors[value-1] );
 }
@@ -193,7 +193,7 @@ void TQTetrixBoard::drawContents( TQPainter *p )
         y2 = boardHeight() - 1;
 
     updateBoard( x1, y1, x2, y2, true );
-    paint = 0;				// reset widget painter
+    paint = nullptr;				// reset widget painter
     return;
 }
 
diff --git a/examples/tetrix/qtetrixb.h b/examples/tetrix/qtetrixb.h
index c01c7023f..f6d20a657 100644
--- a/examples/tetrix/qtetrixb.h
+++ b/examples/tetrix/qtetrixb.h
@@ -19,7 +19,7 @@ class TQTetrixBoard : public TQFrame, public GenericTetrix
 {
     TQ_OBJECT
 public:
-    TQTetrixBoard( TQWidget *parent=0, const char *name=0 );
+    TQTetrixBoard( TQWidget *parent=nullptr, const char *name=nullptr );
 
     void      gameOver();
     void      startGame(int gameType = 0,int fillRandomLines = 0);
diff --git a/examples/tetrix/tqdragapp.cpp b/examples/tetrix/tqdragapp.cpp
index 6c100ab79..fbd30b8aa 100644
--- a/examples/tetrix/tqdragapp.cpp
+++ b/examples/tetrix/tqdragapp.cpp
@@ -18,7 +18,7 @@
 #include "tqcursor.h"
 #include "tqobjectlist.h"
 
-TQWidget *cursorWidget( TQPoint * = 0 );
+TQWidget *cursorWidget( TQPoint * = nullptr );
 
 class TQDragger;
 
@@ -35,7 +35,7 @@ public:
 
 
 struct DropInfo {
-    DropInfo()	{ w=0; }
+    DropInfo()	{ w=nullptr; }
    ~DropInfo()  { delete w; }
     DropWindow *w;
     bool userOpened;
@@ -95,7 +95,7 @@ private:
 
 
 TQDragApplication::TQDragApplication( int &argc, char **argv )
-    : TQApplication( argc, argv ), dragger( 0 )
+    : TQApplication( argc, argv ), dragger( nullptr )
 {
     dragger = new TQDragger;
 }
@@ -130,7 +130,7 @@ void DropWindow::closeEvent( TQCloseEvent *e )
 
 TQDragger::TQDragger()
 {
-    dragInfo.w	 = 0;
+    dragInfo.w	 = nullptr;
     killingDrop	 = false;
     sendingChild = false;
     draggedDict.setAutoDelete( true );
@@ -245,7 +245,7 @@ bool TQDragger::dragEvent( TQWidget *w, TQMouseEvent *e )
 	case TQEvent::MouseButtonPress: {
 	    if ( !noWidgets( w ) || // has widget children
 		 isParentToDragged( w )	|| // has had widget children
-		 w->parentWidget() == 0 ) {       // is top level window
+		 !w->parentWidget() ) {       // is top level window
 		hostWidget = w;
 		menu->popup( w->mapToGlobal( e->pos() ) );
 		return true;
@@ -265,13 +265,13 @@ bool TQDragger::dragEvent( TQWidget *w, TQMouseEvent *e )
 	    clickOffset = e->pos();
 	    dragInfo.w  = w;
 	    TQPoint p    = w->mapToGlobal(TQPoint(0,0));
-	    w->reparent( 0, WType_Popup, p, true );
+	    w->reparent( nullptr, WType_Popup, p, true );
 
 	    return true;
 	}
 	case TQEvent::MouseButtonRelease:
 	case TQEvent::MouseMove: {
-	    if ( dragInfo.w != 0 ) {
+	    if ( dragInfo.w ) {
 		TQPoint p = TQCursor::pos() - clickOffset;
 		dragInfo.w->move( p );
 		if ( e->type() == TQEvent::MouseMove )
@@ -283,7 +283,7 @@ bool TQDragger::dragEvent( TQWidget *w, TQMouseEvent *e )
 		return false;
 	    if ( w != dragInfo.w )
 		w = dragInfo.w;
-	    dragInfo.w = 0;
+	    dragInfo.w = nullptr;
 	    w->hide();
 	    TQPoint pos;
 	    TQWidget *target = cursorWidget( &pos );
@@ -372,7 +372,7 @@ bool TQDragger::startGrab()
 {
     if ( !hostWidget )
 	return false;
-    clickedWidget = 0;
+    clickedWidget = nullptr;
     cursor	  = hostWidget->cursor();
     hostWidget->grabMouse();
     hostWidget->setCursor( TQCursor( CrossCursor ) );
diff --git a/examples/textedit/textedit.cpp b/examples/textedit/textedit.cpp
index c01e2cd59..73fefcf45 100644
--- a/examples/textedit/textedit.cpp
+++ b/examples/textedit/textedit.cpp
@@ -207,7 +207,7 @@ TQTextEdit *TextEdit::currentEditor() const
     if ( tabWidget->currentPage() &&
 	 tabWidget->currentPage()->inherits( "TQTextEdit" ) )
 	return (TQTextEdit*)tabWidget->currentPage();
-    return 0;
+    return nullptr;
 }
 
 void TextEdit::doConnections( TQTextEdit *e )
diff --git a/examples/textedit/textedit.h b/examples/textedit/textedit.h
index bfe0e9569..3287b4e7f 100644
--- a/examples/textedit/textedit.h
+++ b/examples/textedit/textedit.h
@@ -23,7 +23,7 @@ class TextEdit : public TQMainWindow
     TQ_OBJECT
 
 public:
-    TextEdit( TQWidget *parent = 0, const char *name = 0 );
+    TextEdit( TQWidget *parent = nullptr, const char *name = nullptr );
 
 private:
     void setupFileActions();
diff --git a/examples/themes/metal.h b/examples/themes/metal.h
index 80b05af69..1fbc39249 100644
--- a/examples/themes/metal.h
+++ b/examples/themes/metal.h
@@ -48,7 +48,7 @@ public:
 		      const TQColorGroup &cg,
 		      SFlags how = Style_Default,
 		      const TQStyleOption& = TQStyleOption::Default,
-		      const TQWidget *widget = 0 ) const;
+		      const TQWidget *widget = nullptr ) const;
 
     void drawComplexControl( ComplexControl cc,
 			     TQPainter *p,
@@ -60,8 +60,8 @@ public:
 			     SCFlags sub = SC_All,
 			     SCFlags subActive = SC_None,
 			     const TQStyleOption& = TQStyleOption::Default,
-			     const TQWidget *widget = 0 ) const;
-    int pixelMetric( PixelMetric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget * = 0 ) const;
+			     const TQWidget *widget = nullptr ) const;
+    int pixelMetric( PixelMetric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget * = nullptr ) const;
 
 
 private:
diff --git a/examples/themes/themes.cpp b/examples/themes/themes.cpp
index 16b9b1ff4..839c718ee 100644
--- a/examples/themes/themes.cpp
+++ b/examples/themes/themes.cpp
@@ -54,7 +54,7 @@ Themes::Themes( TQWidget *parent, const char *name, WFlags f )
     menuBar()->insertItem( "&Style" , style );
 
     style->setCheckable( true );
-    TQActionGroup *ag = new TQActionGroup( this, 0 );
+    TQActionGroup *ag = new TQActionGroup( this, nullptr );
     ag->setExclusive( true );
     TQSignalMapper *styleMapper = new TQSignalMapper( this );
     connect( styleMapper, TQ_SIGNAL( mapped( const TQString& ) ), this, TQ_SLOT( makeStyle( const TQString& ) ) );
@@ -80,7 +80,7 @@ Themes::Themes( TQWidget *parent, const char *name, WFlags f )
 	    stylesDict.insert(styleAccel.left(1), (const int *)1);
 	    styleAccel = "&"+styleAccel;
 	}
-	TQAction *a = new TQAction( styleStr, TQIconSet(), styleAccel, 0, ag, 0, ag->isExclusive() );
+	TQAction *a = new TQAction( styleStr, TQIconSet(), styleAccel, 0, ag, nullptr, ag->isExclusive() );
 	connect( a, TQ_SIGNAL( activated() ), styleMapper, TQ_SLOT(map()) );
 	styleMapper->setMapping( a, a->text() );
     }
diff --git a/examples/themes/themes.h b/examples/themes/themes.h
index 93e21dde3..d8d478a79 100644
--- a/examples/themes/themes.h
+++ b/examples/themes/themes.h
@@ -20,7 +20,7 @@ class Themes: public TQMainWindow
     TQ_OBJECT
 
 public:
-    Themes( TQWidget *parent = 0, const char *name = 0, WFlags f = WType_TopLevel );
+    Themes( TQWidget *parent = nullptr, const char *name = nullptr, WFlags f = WType_TopLevel );
 
 protected:
     TQTabWidget *tabwidget;
diff --git a/examples/themes/wood.cpp b/examples/themes/wood.cpp
index 2ca8fd7fc..4fb8f7a87 100644
--- a/examples/themes/wood.cpp
+++ b/examples/themes/wood.cpp
@@ -757,7 +757,7 @@ static void get_combo_parameters( const TQRect &r,
 				  int &ay, int &sh, int &dh,
 				  int &sy );
 
-static int get_combo_extra_width( int h, int *return_awh = 0 );
+static int get_combo_extra_width( int h, int *return_awh = nullptr );
 
 enum { PointUp, PointDown, PointLeft, PointRight };
 
@@ -1206,7 +1206,7 @@ TQRect NorwegianWoodStyle::querySubControlMetrics( ComplexControl control,
 	    case SC_ComboBoxEditField:
 		{
 		    rect = subRect( SR_PushButtonContents, ceData, elementFlags, widget );
-		    int ew = get_combo_extra_width( rect.height(), 0 );
+		    int ew = get_combo_extra_width( rect.height(), nullptr );
 		    rect.setRect( rect.x() + 1, rect.y() + 1,
 				  rect.width() - 2 - ew, rect.height() - 2 );
 		    break;
diff --git a/examples/themes/wood.h b/examples/themes/wood.h
index 6fd769a26..549992706 100644
--- a/examples/themes/wood.h
+++ b/examples/themes/wood.h
@@ -48,7 +48,7 @@ public:
 		      const TQColorGroup &cg,
 		      SFlags how = Style_Default,
 		      const TQStyleOption& = TQStyleOption::Default,
-		      const TQWidget *widget = 0 ) const;
+		      const TQWidget *widget = nullptr ) const;
 
     void drawControlMask( ControlElement element,
 			  TQPainter *p,
@@ -56,7 +56,7 @@ public:
 			  ControlElementFlags elementFlags,
 			  const TQRect &r,
 			  const TQStyleOption& = TQStyleOption::Default,
-			  const TQWidget *widget = 0 ) const;
+			  const TQWidget *widget = nullptr ) const;
 
     void drawComplexControl( ComplexControl cc,
 			     TQPainter *p,
@@ -68,7 +68,7 @@ public:
 			     SCFlags sub = SC_All,
 			     SCFlags subActive = SC_None,
 			     const TQStyleOption& = TQStyleOption::Default,
-			     const TQWidget *widget = 0 ) const;
+			     const TQWidget *widget = nullptr ) const;
 
     void drawComplexControlMask( ComplexControl control,
 				 TQPainter *p,
@@ -76,14 +76,14 @@ public:
 				 const ControlElementFlags elementFlags,
 				 const TQRect &r,
 				 const TQStyleOption& = TQStyleOption::Default,
-				 const TQWidget *widget = 0 ) const;
+				 const TQWidget *widget = nullptr ) const;
 
     TQRect querySubControlMetrics( ComplexControl control,
 				  const TQStyleControlElementData &ceData,
 				  ControlElementFlags elementFlags,
 				  SubControl sc,
 				  const TQStyleOption& = TQStyleOption::Default,
-				  const TQWidget *widget = 0 ) const;
+				  const TQWidget *widget = nullptr ) const;
 
     TQRect subRect( SubRect r, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget *widget ) const;
 
diff --git a/examples/thread/prodcons/prodcons.cpp b/examples/thread/prodcons/prodcons.cpp
index 30652ac72..0a549ad5d 100644
--- a/examples/thread/prodcons/prodcons.cpp
+++ b/examples/thread/prodcons/prodcons.cpp
@@ -250,8 +250,8 @@ private:
 
 
 ProdCons::ProdCons()
-    : TQWidget(0, "producer consumer widget"),
-      prod(0), cons(0), stopped(false), redraw(true)
+    : TQWidget(nullptr, "producer consumer widget"),
+      prod(nullptr), cons(nullptr), stopped(false), redraw(true)
 {
     startbutton = new TQPushButton("&Start", this);
     connect(startbutton, TQ_SIGNAL(clicked()), TQ_SLOT(go()));
@@ -285,12 +285,12 @@ ProdCons::~ProdCons()
 
     if (prod) {
 	delete prod;
-	prod = 0;
+	prod = nullptr;
     }
 
     if (cons) {
 	delete cons;
-	cons = 0;
+	cons = nullptr;
     }
 }
 
diff --git a/examples/tictac/tictac.h b/examples/tictac/tictac.h
index b14820281..ddce0bbdf 100644
--- a/examples/tictac/tictac.h
+++ b/examples/tictac/tictac.h
@@ -57,7 +57,7 @@ class TicTacGameBoard : public TQWidget
 {
     TQ_OBJECT
 public:
-    TicTacGameBoard( int n, TQWidget *parent=0, const char *name=0 );
+    TicTacGameBoard( int n, TQWidget *parent=nullptr, const char *name=nullptr );
    ~TicTacGameBoard();
     enum	State { Init, HumansTurn, HumanWon, ComputerWon, NobodyWon };
     State	state() const		{ return st; }
@@ -90,7 +90,7 @@ class TicTacToe : public TQWidget
 {
     TQ_OBJECT
 public:
-    TicTacToe( int boardSize=3, TQWidget *parent=0, const char *name=0 );
+    TicTacToe( int boardSize=3, TQWidget *parent=nullptr, const char *name=nullptr );
 private slots:
     void	newGameClicked();
     void	gameOver();
diff --git a/examples/tooltip/tooltip.cpp b/examples/tooltip/tooltip.cpp
index 897b7c654..d1aa62c15 100644
--- a/examples/tooltip/tooltip.cpp
+++ b/examples/tooltip/tooltip.cpp
@@ -52,7 +52,7 @@ TellMe::TellMe( TQWidget * parent , const char * name  )
 TellMe::~TellMe()
 {
     delete t;
-    t = 0;
+    t = nullptr;
 }
 
 
diff --git a/examples/tooltip/tooltip.h b/examples/tooltip/tooltip.h
index 40b738c57..74825a1f7 100644
--- a/examples/tooltip/tooltip.h
+++ b/examples/tooltip/tooltip.h
@@ -25,7 +25,7 @@ class TellMe : public TQWidget
 {
     TQ_OBJECT
 public:
-    TellMe( TQWidget * parent = 0, const char * name = 0 );
+    TellMe( TQWidget * parent = nullptr, const char * name = nullptr );
     ~TellMe();
 
     TQRect tip( const TQPoint & );
diff --git a/examples/toplevel/options.ui.h b/examples/toplevel/options.ui.h
index 225b3ca25..bb2d7c185 100644
--- a/examples/toplevel/options.ui.h
+++ b/examples/toplevel/options.ui.h
@@ -45,7 +45,7 @@ void OptionsDialog::apply()
 
     TQWidget *parent = this;
     if ( cbBehaviorTaskbar->isChecked() ) {
-	parent = 0;
+	parent = nullptr;
 	f |= WGroupLeader;
 	flagList += "WGroupLeader";
     }
@@ -72,7 +72,7 @@ void OptionsDialog::apply()
 	flagList.push_front("WStyle_Customize");
 
     if ( !widget ) {
-	widget = new TQVBox( parent, 0, f );
+	widget = new TQVBox( parent, nullptr, f );
 	widget->setMargin( 20 );
 	TQLabel *label = new TQLabel(flagList.join("&nbsp;| "), widget);
 	label->setTextFormat(RichText);
diff --git a/examples/tqdir/tqdir.cpp b/examples/tqdir/tqdir.cpp
index f0f8415ea..c76b93f10 100644
--- a/examples/tqdir/tqdir.cpp
+++ b/examples/tqdir/tqdir.cpp
@@ -183,11 +183,11 @@ void PreviewWidget::previewUrl( const TQUrl &u )
 // ****************************************************************************************************
 
 CustomFileDialog::CustomFileDialog()
-    :  TQFileDialog( 0, 0, true )
+    :  TQFileDialog( nullptr, nullptr, true )
 {
     setDir( "/" );
 
-    dirView = new DirectoryView( this, 0, true );
+    dirView = new DirectoryView( this, nullptr, true );
     dirView->addColumn( "" );
     dirView->header()->hide();
     ::Directory *root = new ::Directory( dirView, "/" );
@@ -333,7 +333,7 @@ int main( int argc, char ** argv )
 		    ? "Choose directory..." : "Choose file...";
 
     if ( !custom ) {
-	TQFileDialog fd( TQString::null, filter, 0, 0, true );
+	TQFileDialog fd( TQString::null, filter, nullptr, nullptr, true );
 	fd.setMode( mode );
 	if ( preview ) {
 	    fd.setContentsPreviewEnabled( true );
diff --git a/examples/tux/tux.cpp b/examples/tux/tux.cpp
index 36e116ec7..e76470933 100644
--- a/examples/tux/tux.cpp
+++ b/examples/tux/tux.cpp
@@ -10,7 +10,7 @@
 class MoveMe : public TQWidget
 {
 public:
-    MoveMe( TQWidget *parent=0, const char *name=0, WFlags f = 0)
+    MoveMe( TQWidget *parent=nullptr, const char *name=nullptr, WFlags f = 0)
 	:TQWidget(parent,name, f) {}
 
 protected:
@@ -57,7 +57,7 @@ int main( int argc, char **argv )
 	    bm = img.createHeuristicMask();
 	    p.setMask( bm );
 	}
-    MoveMe w(0,0,TQt::WStyle_Customize|TQt::WStyle_NoBorder);
+    MoveMe w(nullptr,nullptr,TQt::WStyle_Customize|TQt::WStyle_NoBorder);
     w.setBackgroundPixmap( p );
     w.setFixedSize( p.size() );
     if ( p.mask() )
diff --git a/examples/widgets/main.cpp b/examples/widgets/main.cpp
index 524c024d0..f98b37fdf 100644
--- a/examples/widgets/main.cpp
+++ b/examples/widgets/main.cpp
@@ -15,7 +15,7 @@ class MyWidgetView : public WidgetView
 {
     int s;
 public:
-    MyWidgetView( TQWidget *parent=0, const char *name=0 )
+    MyWidgetView( TQWidget *parent=nullptr, const char *name=nullptr )
 	:WidgetView(parent, name), s(0)
     {
 	setToolBarsMovable( true );
diff --git a/examples/widgets/widgets.cpp b/examples/widgets/widgets.cpp
index 7f18818cc..6f7ddf1f1 100644
--- a/examples/widgets/widgets.cpp
+++ b/examples/widgets/widgets.cpp
@@ -238,7 +238,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name )
     TQPixmap pm;
     bool pix = pm.load("qt.png");
     if ( !pix ) {
-	TQMessageBox::information( 0, "TQt Widgets Example",
+	TQMessageBox::information( nullptr, "TQt Widgets Example",
 				  "Could not load the file \"qt.png\", which\n"
 				  "contains an icon used...\n\n"
 				  "The text \"line 42\" will be substituted.",
diff --git a/examples/widgets/widgets.h b/examples/widgets/widgets.h
index 61c72e4aa..efc0aa86b 100644
--- a/examples/widgets/widgets.h
+++ b/examples/widgets/widgets.h
@@ -29,8 +29,8 @@ class MyListView : public TQListView
 {
     TQ_OBJECT
 public:
-    MyListView( TQWidget * parent = 0, const char *name = 0 )
-	: TQListView( parent, name ), selected(0)
+    MyListView( TQWidget * parent = nullptr, const char *name = nullptr )
+	: TQListView( parent, name ), selected(nullptr)
     {}
     ~MyListView()
     {}
@@ -66,7 +66,7 @@ class WidgetView : public TQMainWindow
 {
     TQ_OBJECT
 public:
-    WidgetView( TQWidget *parent=0, const char *name=0 );
+    WidgetView( TQWidget *parent=nullptr, const char *name=nullptr );
 
 public slots:
     void	setStatus(const TQString&);
diff --git a/examples/wizard/wizard.h b/examples/wizard/wizard.h
index 28366cb9a..bf3a1c357 100644
--- a/examples/wizard/wizard.h
+++ b/examples/wizard/wizard.h
@@ -22,7 +22,7 @@ class Wizard : public TQWizard
     TQ_OBJECT
 
 public:
-    Wizard( TQWidget *parent = 0, const char *name = 0 );
+    Wizard( TQWidget *parent = nullptr, const char *name = nullptr );
 
     void showPage(TQWidget* page);
 
diff --git a/examples/xform/xform.cpp b/examples/xform/xform.cpp
index 6360dcd56..7ba1449cf 100644
--- a/examples/xform/xform.cpp
+++ b/examples/xform/xform.cpp
@@ -41,7 +41,7 @@ class XFormControl : public TQVBox, public ModeNames
 {
     TQ_OBJECT
 public:
-    XFormControl( const TQFont &initialFont, TQWidget *parent=0, const char *name=0 );
+    XFormControl( const TQFont &initialFont, TQWidget *parent=nullptr, const char *name=nullptr );
    ~XFormControl() {}
 
     TQWMatrix matrix();
@@ -85,7 +85,7 @@ class ShowXForm : public TQWidget, public ModeNames
 {
     TQ_OBJECT
 public:
-    ShowXForm( const TQFont &f, TQWidget *parent=0, const char *name=0 );
+    ShowXForm( const TQFont &f, TQWidget *parent=nullptr, const char *name=nullptr );
    ~ShowXForm() {}
     void showIt();			// (Re)displays text or pixmap
 
@@ -436,7 +436,7 @@ class XFormCenter : public TQHBox, public ModeNames
 {
     TQ_OBJECT
 public:
-    XFormCenter( TQWidget *parent=0, const char *name=0 );
+    XFormCenter( TQWidget *parent=nullptr, const char *name=nullptr );
 public slots:
     void setFont( const TQFont &f ) { sx->setFont( f ); }
     void newMode( int );
diff --git a/examples/xml/outliner/outlinetree.cpp b/examples/xml/outliner/outlinetree.cpp
index 8142807bc..42d37e399 100644
--- a/examples/xml/outliner/outlinetree.cpp
+++ b/examples/xml/outliner/outlinetree.cpp
@@ -22,13 +22,13 @@ OutlineTree::OutlineTree( const TQString fileName, TQWidget *parent, const char
     // read the XML file and create DOM tree
     TQFile opmlFile( fileName );
     if ( !opmlFile.open( IO_ReadOnly ) ) {
-	TQMessageBox::critical( 0,
+	TQMessageBox::critical( nullptr,
 		tr( "Critical Error" ),
 		tr( "Cannot open file %1" ).arg( fileName ) );
 	return;
     }
     if ( !domTree.setContent( &opmlFile ) ) {
-	TQMessageBox::critical( 0,
+	TQMessageBox::critical( nullptr,
 		tr( "Critical Error" ),
 		tr( "Parsing error for file %1" ).arg( fileName ) );
 	opmlFile.close();
@@ -53,7 +53,7 @@ OutlineTree::OutlineTree( const TQString fileName, TQWidget *parent, const char
     while ( !node.isNull() ) {
 	if ( node.isElement() && node.nodeName() == "body" ) {
 	    TQDomElement body = node.toElement();
-	    buildTree( 0, body );
+	    buildTree( nullptr, body );
 	    break;
 	}
 	node = node.nextSibling();
@@ -85,12 +85,12 @@ void OutlineTree::getHeaderInformation( const TQDomElement &header )
 
 void OutlineTree::buildTree( TQListViewItem *parentItem, const TQDomElement &parentElement )
 {
-    TQListViewItem *thisItem = 0;
+    TQListViewItem *thisItem = nullptr;
     TQDomNode node = parentElement.firstChild();
     while ( !node.isNull() ) {
 	if ( node.isElement() && node.nodeName() == "outline" ) {
 	    // add a new list view item for the outline
-	    if ( parentItem == 0 )
+	    if ( !parentItem )
 		thisItem = new TQListViewItem( this, thisItem );
 	    else
 		thisItem = new TQListViewItem( parentItem, thisItem );
diff --git a/examples/xml/outliner/outlinetree.h b/examples/xml/outliner/outlinetree.h
index bb281bd15..ab3932e97 100644
--- a/examples/xml/outliner/outlinetree.h
+++ b/examples/xml/outliner/outlinetree.h
@@ -18,7 +18,7 @@ class OutlineTree : public TQListView
     TQ_OBJECT
 
 public:
-    OutlineTree( const TQString fileName, TQWidget *parent = 0, const char *name = 0 );
+    OutlineTree( const TQString fileName, TQWidget *parent = nullptr, const char *name = nullptr );
     ~OutlineTree();
 
 private:
diff --git a/plugins/src/accessible/widgets/main.cpp b/plugins/src/accessible/widgets/main.cpp
index 0a936b315..82dd92dee 100644
--- a/plugins/src/accessible/widgets/main.cpp
+++ b/plugins/src/accessible/widgets/main.cpp
@@ -27,7 +27,7 @@ AccessibleFactory::AccessibleFactory()
 
 TQRESULT AccessibleFactory::queryInterface( const TQUuid &iid, TQUnknownInterface **iface )
 {
-    *iface = 0;
+    *iface = nullptr;
     if ( iid == IID_QUnknown )
 	*iface = (TQUnknownInterface*)(TQFeatureListInterface*)(TQAccessibleFactoryInterface*)this;
     else if ( iid == IID_QFeatureList )
@@ -96,7 +96,7 @@ TQStringList AccessibleFactory::featureList() const
 
 TQRESULT AccessibleFactory::createAccessibleInterface( const TQString &classname, TQObject *object, TQAccessibleInterface **iface )
 {
-    *iface = 0;
+    *iface = nullptr;
 
     if ( classname == "TQLineEdit" ) {
 	*iface = new TQAccessibleText( object, EditableText );
diff --git a/plugins/src/accessible/widgets/tqaccessiblemenu.cpp b/plugins/src/accessible/widgets/tqaccessiblemenu.cpp
index c7d7670a6..d6cd1f45f 100644
--- a/plugins/src/accessible/widgets/tqaccessiblemenu.cpp
+++ b/plugins/src/accessible/widgets/tqaccessiblemenu.cpp
@@ -27,7 +27,7 @@ int TQAccessiblePopup::childCount() const
 
 TQRESULT TQAccessiblePopup::queryChild( int /*control*/, TQAccessibleInterface **iface ) const
 {
-    *iface = 0;
+    *iface = nullptr;
     return TQS_FALSE;
 }
 
@@ -78,7 +78,7 @@ TQString TQAccessiblePopup::text( Text t, int control ) const
 	return tx;
 
     int id;
-    TQMenuItem *item = 0;
+    TQMenuItem *item = nullptr;
     if ( control ) {
 	id = popupMenu()->idAt( control - 1 );
 	item = popupMenu()->findItem( id );
@@ -191,7 +191,7 @@ int TQAccessibleMenuBar::childCount() const
 
 TQRESULT TQAccessibleMenuBar::queryChild( int /*control*/, TQAccessibleInterface **iface ) const
 {
-    *iface = 0;
+    *iface = nullptr;
     return TQS_FALSE;
 }
 
diff --git a/plugins/src/accessible/widgets/tqaccessiblewidget.cpp b/plugins/src/accessible/widgets/tqaccessiblewidget.cpp
index 02c57eff8..71cbe01c2 100644
--- a/plugins/src/accessible/widgets/tqaccessiblewidget.cpp
+++ b/plugins/src/accessible/widgets/tqaccessiblewidget.cpp
@@ -33,7 +33,7 @@
 TQString buddyString( TQWidget *widget )
 {
     TQWidget *parent = widget->parentWidget();
-    TQObjectList *ol = parent->queryList( "TQLabel", 0, false, false );
+    TQObjectList *ol = parent->queryList( "TQLabel", nullptr, false, false );
     if ( !ol || !ol->count() ) {
 	delete ol;
 	return TQString::null;
@@ -139,13 +139,13 @@ int TQAccessibleWidget::controlAt( int x, int y ) const
 
     TQPoint rp = w->mapFromGlobal( TQPoint( x, y ) );
 
-    TQObjectList *list = w->queryList( "TQWidget", 0, false, false );
+    TQObjectList *list = w->queryList( "TQWidget", nullptr, false, false );
 
     if ( !list || list->isEmpty() )
 	return 0;
 
     TQObjectListIt it( *list );
-    TQWidget *child = 0;
+    TQWidget *child = nullptr;
     int index = 1;
     while ( ( child = (TQWidget*)it.current() ) ) {
 	if ( !child->isTopLevel() && !child->isHidden() && child->geometry().contains( rp ) ) {
@@ -187,14 +187,14 @@ int TQAccessibleWidget::navigate( NavDirection dir, int startControl ) const
     switch ( dir ) {
     case NavFirstChild:
 	{
-	    TQObjectList *list = w->queryList( "TQWidget", 0, false, false );
+	    TQObjectList *list = w->queryList( "TQWidget", nullptr, false, false );
 	    bool has = !list->isEmpty();
 	    delete list;
 	    return has ? 1 : -1;
 	}
     case NavLastChild:
 	{
-	    TQObjectList *list = w->queryList( "TQWidget", 0, false, false );
+	    TQObjectList *list = w->queryList( "TQWidget", nullptr, false, false );
 	    bool has = !list->isEmpty();
 	    delete list;
 	    return has ? childCount() : -1;
@@ -203,7 +203,7 @@ int TQAccessibleWidget::navigate( NavDirection dir, int startControl ) const
     case NavPrevious:
 	{
 	    TQWidget *parent = w->parentWidget();
-	    TQObjectList *sl = parent ? parent->queryList( "TQWidget", 0, false, false ) : 0;
+	    TQObjectList *sl = parent ? parent->queryList( "TQWidget", nullptr, false, false ) : nullptr;
 	    if ( !sl )
 		return -1;
 	    TQObject *sib;
@@ -243,7 +243,7 @@ int TQAccessibleWidget::navigate( NavDirection dir, int startControl ) const
 	    if ( !w2 )
 		return -1;
 
-	    TQObjectList *list = w->queryList( "TQWidget", 0, false, false );
+	    TQObjectList *list = w->queryList( "TQWidget", nullptr, false, false );
 	    int index = list->findRef( w2 );
 	    delete list;
 	    return ( index != -1 ) ? index+1 : -1;
@@ -258,7 +258,7 @@ int TQAccessibleWidget::navigate( NavDirection dir, int startControl ) const
 /*! \reimp */
 int TQAccessibleWidget::childCount() const
 {
-    TQObjectList *cl = widget()->queryList( "TQWidget", 0, false, false );
+    TQObjectList *cl = widget()->queryList( "TQWidget", nullptr, false, false );
     if ( !cl )
 	return 0;
 
@@ -270,12 +270,12 @@ int TQAccessibleWidget::childCount() const
 /*! \reimp */
 TQRESULT TQAccessibleWidget::queryChild( int control, TQAccessibleInterface **iface ) const
 {
-    *iface = 0;
-    TQObjectList *cl = widget()->queryList( "TQWidget", 0, false, false );
+    *iface = nullptr;
+    TQObjectList *cl = widget()->queryList( "TQWidget", nullptr, false, false );
     if ( !cl )
 	return TQS_FALSE;
 
-    TQObject *o = 0;
+    TQObject *o = nullptr;
     if ( cl->count() >= (uint)control )
 	o = cl->at( control-1 );
     delete cl;
@@ -719,7 +719,7 @@ int TQAccessibleSpinWidget::childCount() const
 /*! \reimp */
 TQRESULT TQAccessibleSpinWidget::queryChild( int /*control*/, TQAccessibleInterface **iface ) const
 {
-    *iface = 0;
+    *iface = nullptr;
     return TQS_FALSE;
 }
 
@@ -927,7 +927,7 @@ int TQAccessibleScrollBar::childCount() const
 /*! \reimp */
 TQRESULT	TQAccessibleScrollBar::queryChild( int /*control*/, TQAccessibleInterface **iface ) const
 {
-    *iface = 0;
+    *iface = nullptr;
     return TQS_FALSE;
 }
 
@@ -1111,7 +1111,7 @@ int TQAccessibleSlider::childCount() const
 /*! \reimp */
 TQRESULT	TQAccessibleSlider::queryChild( int /*control*/, TQAccessibleInterface **iface ) const
 {
-    *iface = 0;
+    *iface = nullptr;
     return TQS_FALSE;
 }
 
@@ -1392,7 +1392,7 @@ int TQAccessibleHeader::childCount() const
 /*! \reimp */
 TQRESULT TQAccessibleHeader::queryChild( int /*control*/, TQAccessibleInterface **iface ) const
 {
-    *iface = 0;
+    *iface = nullptr;
     return TQS_FALSE;
 }
 
@@ -1486,7 +1486,7 @@ TQRect TQAccessibleTabBar::rect( int control ) const
 /*! \reimp */
 TQRESULT	TQAccessibleTabBar::queryChild( int /*control*/, TQAccessibleInterface **iface ) const
 {
-    *iface = 0;
+    *iface = nullptr;
     return TQS_FALSE;
 }
 
@@ -1741,7 +1741,7 @@ int TQAccessibleComboBox::childCount() const
 /*! \reimp */
 TQRESULT	TQAccessibleComboBox::queryChild( int /*control*/, TQAccessibleInterface **iface ) const
 {
-    *iface = 0;
+    *iface = nullptr;
     return TQS_FALSE;
 }
 
@@ -1923,7 +1923,7 @@ int TQAccessibleTitleBar::childCount() const
 /*! \reimp */
 TQRESULT TQAccessibleTitleBar::queryChild( int /*control*/, TQAccessibleInterface **iface ) const
 {
-    *iface = 0;
+    *iface = nullptr;
     return TQS_FALSE;
 }
 
@@ -2046,7 +2046,7 @@ TQAccessibleViewport::TQAccessibleViewport( TQObject *o, TQObject *sv )
 
 TQAccessibleScrollView *TQAccessibleViewport::scrollView() const
 {
-    TQAccessibleInterface *iface = 0;
+    TQAccessibleInterface *iface = nullptr;
     queryAccessibleInterface( scrollview, &iface );
     Q_ASSERT(iface);
     return (TQAccessibleScrollView *)iface;
diff --git a/plugins/src/codecs/cn/main.cpp b/plugins/src/codecs/cn/main.cpp
index 3c9064c6a..4a6dbb332 100644
--- a/plugins/src/codecs/cn/main.cpp
+++ b/plugins/src/codecs/cn/main.cpp
@@ -32,7 +32,7 @@ TQTextCodec *CNTextCodecs::createForMib( int mib )
 	;
     }
 
-    return 0;
+    return nullptr;
 }
 
 
@@ -45,7 +45,7 @@ TQTextCodec *CNTextCodecs::createForName( const TQString &name )
     if (name == "gb2312.1980-0")
 	return new TQGb2312Codec;
 
-    return 0;
+    return nullptr;
 }
 
 
diff --git a/plugins/src/codecs/jp/main.cpp b/plugins/src/codecs/jp/main.cpp
index 8b0f8f941..7ee8887f9 100644
--- a/plugins/src/codecs/jp/main.cpp
+++ b/plugins/src/codecs/jp/main.cpp
@@ -34,7 +34,7 @@ TQTextCodec *JPTextCodecs::createForMib( int mib )
 	;
     }
 
-    return 0;
+    return nullptr;
 }
 
 
@@ -49,7 +49,7 @@ TQTextCodec *JPTextCodecs::createForName( const TQString &name )
     if (name == "jisx0208.1983-0")
 	return new TQFontJis0208Codec;
 
-    return 0;
+    return nullptr;
 }
 
 
diff --git a/plugins/src/codecs/kr/main.cpp b/plugins/src/codecs/kr/main.cpp
index fa76ad551..943343732 100644
--- a/plugins/src/codecs/kr/main.cpp
+++ b/plugins/src/codecs/kr/main.cpp
@@ -29,7 +29,7 @@ TQTextCodec *KRTextCodecs::createForMib( int mib )
 	;
     }
 
-    return 0;
+    return nullptr;
 }
 
 
@@ -40,7 +40,7 @@ TQTextCodec *KRTextCodecs::createForName( const TQString &name )
     if (name == "ksc5601.1987-0")
 	return new TQFontKsc5601Codec;
 
-    return 0;
+    return nullptr;
 }
 
 
diff --git a/plugins/src/codecs/tw/main.cpp b/plugins/src/codecs/tw/main.cpp
index 6991b33f1..b3b721a27 100644
--- a/plugins/src/codecs/tw/main.cpp
+++ b/plugins/src/codecs/tw/main.cpp
@@ -28,7 +28,7 @@ TQTextCodec *TWTextCodecs::createForMib( int mib )
 	;
     }
 
-    return 0;
+    return nullptr;
 }
 
 
@@ -39,7 +39,7 @@ TQTextCodec *TWTextCodecs::createForName( const TQString &name )
     if (name == "big5*-0")
 	return new TQFontBig5Codec;
 
-    return 0;
+    return nullptr;
 }
 
 
diff --git a/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp b/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp
index 96d6ba2cb..59206e77b 100644
--- a/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp
+++ b/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp
@@ -54,8 +54,8 @@
 #define TQT_NO_IM_QMULTIINPUTCONTEXT_IMINDEX
 
 TQMultiInputContext::TQMultiInputContext()
-    : TQInputContext(), _slave( 0 ), imIndex( 0 ), cachedFocus( false ),
-      cachedFocusWidget( 0 ), cachedHolderWidget( 0 ),
+    : TQInputContext(), _slave( nullptr ), imIndex( 0 ), cachedFocus( false ),
+      cachedFocusWidget( nullptr ), cachedHolderWidget( nullptr ),
       beIndirectlyConnected( false ), popup( nullptr ), currentIMKey( TQString::null )
 {
     keyDict.setAutoDelete( true );
@@ -173,7 +173,7 @@ void TQMultiInputContext::destroyInputContext()
 	    emit imEventGenerated( _slave->focusWidget(), terminator );
 	}
 	_slave->deleteLater();
-	_slave = 0;
+	_slave = nullptr;
     }
 }
 
@@ -192,12 +192,12 @@ void TQMultiInputContext::postIMEvent( TQObject *receiver, TQIMEvent *event )
 #if defined(TQ_WS_X11)
 TQWidget *TQMultiInputContext::focusWidget() const
 {
-    return ( slave() ) ? slave()->focusWidget() : 0;
+    return ( slave() ) ? slave()->focusWidget() : nullptr;
 }
 
 TQWidget *TQMultiInputContext::holderWidget() const
 {
-    return ( slave() ) ? slave()->holderWidget() : 0;
+    return ( slave() ) ? slave()->holderWidget() : nullptr;
 }
 
 
@@ -320,7 +320,7 @@ TQPtrList<TQInputContextMenu> *TQMultiInputContext::menus()
     TQPtrList<TQInputContextMenu> *result = new TQPtrList<TQInputContextMenu>;
     result->append( imSelMenu );
 
-    TQPtrList<TQInputContextMenu> *slaveMenus = ( slave() ) ? slave()->menus() : 0;
+    TQPtrList<TQInputContextMenu> *slaveMenus = ( slave() ) ? slave()->menus() : nullptr;
     if ( slaveMenus ) {
 	for ( TQPtrList<TQInputContextMenu>::Iterator it = slaveMenus->begin();
 	      it != slaveMenus->end();
diff --git a/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.h b/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.h
index aaf16506b..d1e8d0bb6 100644
--- a/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.h
+++ b/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.h
@@ -71,7 +71,7 @@ public:
 
     void setFocus();
     void unsetFocus();
-    void setMicroFocus( int x, int y, int w, int h, TQFont *f = 0 );
+    void setMicroFocus( int x, int y, int w, int h, TQFont *f = nullptr );
     void mouseHandler( int x, TQEvent::Type type,
 		       TQt::ButtonState button, TQt::ButtonState state );
     TQFont font() const;
diff --git a/plugins/src/inputmethods/imsw-none/qnoneinputcontextplugin.cpp b/plugins/src/inputmethods/imsw-none/qnoneinputcontextplugin.cpp
index d6f6e064c..4b354e73c 100644
--- a/plugins/src/inputmethods/imsw-none/qnoneinputcontextplugin.cpp
+++ b/plugins/src/inputmethods/imsw-none/qnoneinputcontextplugin.cpp
@@ -68,7 +68,7 @@ TQInputContext *TQNoneInputContextPlugin::create( const TQString &key )
 
     bool isIMSwitcher = key.startsWith( "imsw-" );
     if ( ! isIMSwitcher )
-	return 0;
+	return nullptr;
 
     if ( getenv( "TQT_IM_MODULE" ) ) {
         actuallySpecifiedKey = getenv( "TQT_IM_MODULE" );
@@ -77,7 +77,7 @@ TQInputContext *TQNoneInputContextPlugin::create( const TQString &key )
         actuallySpecifiedKey = settings.readEntry( "/qt/DefaultInputMethod", "xim" );
     }
 
-    return TQInputContextFactory::create( actuallySpecifiedKey, 0 );
+    return TQInputContextFactory::create( actuallySpecifiedKey, nullptr );
 }
 
 TQStringList TQNoneInputContextPlugin::languages( const TQString &key )
diff --git a/plugins/src/inputmethods/simple/qsimpleinputcontext.h b/plugins/src/inputmethods/simple/qsimpleinputcontext.h
index fb3faaefe..54da42fe7 100644
--- a/plugins/src/inputmethods/simple/qsimpleinputcontext.h
+++ b/plugins/src/inputmethods/simple/qsimpleinputcontext.h
@@ -73,7 +73,7 @@ public:
     virtual void reset();
     virtual void setFocus();
     virtual void unsetFocus();
-    virtual void setMicroFocus( int x, int y, int w, int h, TQFont *f = 0 );
+    virtual void setMicroFocus( int x, int y, int w, int h, TQFont *f = nullptr );
     virtual void mouseHandler( int x, TQEvent::Type type,
 			       TQt::ButtonState button, TQt::ButtonState state );
 
diff --git a/plugins/src/inputmethods/xim/qximinputcontext.h b/plugins/src/inputmethods/xim/qximinputcontext.h
index 3cef8dd81..f30815861 100644
--- a/plugins/src/inputmethods/xim/qximinputcontext.h
+++ b/plugins/src/inputmethods/xim/qximinputcontext.h
@@ -84,7 +84,7 @@ public:
 
     void setFocus();
     void unsetFocus();
-    void setMicroFocus( int x, int y, int w, int h, TQFont *f = 0 );
+    void setMicroFocus( int x, int y, int w, int h, TQFont *f = nullptr );
     void mouseHandler( int x, TQEvent::Type type,
 		       TQt::ButtonState button, TQt::ButtonState state );
     bool isPreeditRelocationEnabled();
diff --git a/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp b/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp
index c8fa3b76b..e1142a7bd 100644
--- a/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp
+++ b/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp
@@ -64,12 +64,12 @@ const int XKeyRelease = KeyRelease;
 // #define QT_XIM_DEBUG
 
 // from tqapplication_x11.cpp
-static XIM	tqt_xim = 0;
+static XIM	tqt_xim = nullptr;
 extern XIMStyle	tqt_xim_style;
 extern XIMStyle	tqt_xim_preferred_style;
 extern char    *tqt_ximServer;
 static bool isInitXIM = false;
-static TQPtrList<TQXIMInputContext> *ximContextList = 0;
+static TQPtrList<TQXIMInputContext> *ximContextList = nullptr;
 #endif
 extern int tqt_ximComposingKeycode;
 extern TQTextCodec * tqt_input_mapper;
@@ -97,8 +97,8 @@ extern "C" {
 	// tqDebug("xim_destroy_callback");
 	TQXIMInputContext::close_xim();
 	Display *dpy = TQPaintDevice::x11AppDisplay();
-	XRegisterIMInstantiateCallback(dpy, 0, 0, 0,
-				       (XIMProc) xim_create_callback, 0);
+	XRegisterIMInstantiateCallback(dpy, nullptr, nullptr, nullptr,
+				       (XIMProc) xim_create_callback, nullptr);
     }
 
 #endif // USE_X11R6_XIM
@@ -115,7 +115,7 @@ extern "C" {
    XFreeFontSet call, so we avoid creating and deletion of fontsets as
    much as possible
 */
-static XFontSet fontsetCache[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+static XFontSet fontsetCache[8] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
 static int fontsetCacheRefCount = 0;
 
 static const char * const fontsetnames[] = {
@@ -144,18 +144,18 @@ static XFontSet getFontSet( const TQFont &f )
 	Display* dpy = TQPaintDevice::x11AppDisplay();
 	int missCount;
 	char** missList;
-	fontsetCache[i] = XCreateFontSet(dpy, fontsetnames[i], &missList, &missCount, 0);
+	fontsetCache[i] = XCreateFontSet(dpy, fontsetnames[i], &missList, &missCount, nullptr);
 	if(missCount > 0)
 	    XFreeStringList(missList);
 	if ( !fontsetCache[i] ) {
-	    fontsetCache[i] = XCreateFontSet(dpy,  "-*-fixed-*-*-*-*-16-*", &missList, &missCount, 0);
+	    fontsetCache[i] = XCreateFontSet(dpy,  "-*-fixed-*-*-*-*-16-*", &missList, &missCount, nullptr);
 	    if(missCount > 0)
 		XFreeStringList(missList);
 	    if ( !fontsetCache[i] )
 		fontsetCache[i] = (XFontSet)-1;
 	}
     }
-    return (fontsetCache[i] == (XFontSet)-1) ? 0 : fontsetCache[i];
+    return (fontsetCache[i] == (XFontSet)-1) ? nullptr : fontsetCache[i];
 }
 
 
@@ -234,7 +234,7 @@ extern "C" {
 	}
 
 	if (text) {
-	    char *str = 0;
+	    char *str = nullptr;
 	    if (text->encoding_is_wchar) {
 		int l = wcstombs(nullptr, text->string.wide_char, text->length);
 		if (l != -1) {
@@ -339,7 +339,7 @@ extern "C" {
 
 
 TQXIMInputContext::TQXIMInputContext()
-    : TQInputContext(), ic(0), fontset(0)
+    : TQInputContext(), ic(nullptr), fontset(nullptr)
 {
     if(!isInitXIM)
 	TQXIMInputContext::init_xim();
@@ -374,7 +374,7 @@ void TQXIMInputContext::setHolderWidget( TQWidget *widget )
 
     XPoint spot;
     XRectangle rect;
-    XVaNestedList preedit_attr = 0;
+    XVaNestedList preedit_attr = nullptr;
     XIMCallback startcallback, drawcallback, donecallback;
 
     font = widget->font();
@@ -447,7 +447,7 @@ TQXIMInputContext::~TQXIMInputContext()
 	for ( int i = 0; i < 8; i++ ) {
 	    if ( fontsetCache[i] && fontsetCache[i] != (XFontSet)-1 ) {
 		XFreeFontSet(dpy, fontsetCache[i]);
-		fontsetCache[i] = 0;
+		fontsetCache[i] = nullptr;
 	    }
 	}
     }
@@ -459,17 +459,17 @@ TQXIMInputContext::~TQXIMInputContext()
 	    // XCloseIM( tqt_xim );
 	    // We prefer a less serious memory leak
 	    if( tqt_xim ) {
-		tqt_xim = 0;
+		tqt_xim = nullptr;
 		isInitXIM = false;
 	    }
 
 	    delete ximContextList;
-	    ximContextList = 0;
+	    ximContextList = nullptr;
 	}
     }
 #endif // !TQT_NO_XIM
 
-    ic = 0;
+    ic = nullptr;
 }
 
 void TQXIMInputContext::init_xim()
@@ -478,7 +478,7 @@ void TQXIMInputContext::init_xim()
     if(!isInitXIM)
 	isInitXIM = true;
 
-    tqt_xim = 0;
+    tqt_xim = nullptr;
     TQString ximServerName(tqt_ximServer);
     if (tqt_ximServer)
 	ximServerName.prepend("@im=");
@@ -489,15 +489,15 @@ void TQXIMInputContext::init_xim()
 	tqWarning("TQt: Locales not supported on X server");
 
 #ifdef USE_X11R6_XIM
-    else if ( XSetLocaleModifiers (ximServerName.ascii()) == 0 )
+    else if ( !XSetLocaleModifiers (ximServerName.ascii()) )
 	tqWarning( "TQt: Cannot set locale modifiers: %s",
 		  ximServerName.ascii());
     else {
 	Display *dpy = TQPaintDevice::x11AppDisplay();
 	XWindowAttributes attr; // XIM unselects all events on the root window
 	XGetWindowAttributes( dpy, TQPaintDevice::x11AppRootWindow(),&attr );
-	XRegisterIMInstantiateCallback(dpy, 0, 0, 0,
-				       (XIMProc) xim_create_callback, 0);
+	XRegisterIMInstantiateCallback(dpy, nullptr, nullptr, nullptr,
+				       (XIMProc) xim_create_callback, nullptr);
 	XSelectInput( dpy, TQPaintDevice::x11AppRootWindow(), attr.your_event_mask );
     }
 #else // !USE_X11R6_XIM
@@ -517,18 +517,18 @@ void TQXIMInputContext::create_xim()
 {
 #ifndef TQT_NO_XIM
     Display *appDpy = TQPaintDevice::x11AppDisplay();
-    tqt_xim = XOpenIM( appDpy, 0, 0, 0 );
+    tqt_xim = XOpenIM( appDpy, nullptr, nullptr, nullptr );
     if ( tqt_xim ) {
 
 #ifdef USE_X11R6_XIM
 	XIMCallback destroy;
 	destroy.callback = (XIMProc) xim_destroy_callback;
-	destroy.client_data = 0;
-	if ( XSetIMValues( tqt_xim, XNDestroyCallback, &destroy, (char *) 0 ) != 0 )
+	destroy.client_data = nullptr;
+	if ( XSetIMValues( tqt_xim, XNDestroyCallback, &destroy, (char *) 0 ) )
 	    tqWarning( "Xlib doesn't support destroy callback");
 #endif // USE_X11R6_XIM
 
-	XIMStyles *styles = 0;
+	XIMStyles *styles = nullptr;
 	XGetIMValues(tqt_xim, XNQueryInputStyle, &styles, (char *) 0, (char *) 0);
 	if ( styles ) {
 	    int i;
@@ -563,8 +563,8 @@ void TQXIMInputContext::create_xim()
 	if ( tqt_xim_style ) {
 
 #ifdef USE_X11R6_XIM
-	    XUnregisterIMInstantiateCallback(appDpy, 0, 0, 0,
-					     (XIMProc) xim_create_callback, 0);
+	    XUnregisterIMInstantiateCallback(appDpy, nullptr, nullptr, nullptr,
+					     (XIMProc) xim_create_callback, nullptr);
 #endif // USE_X11R6_XIM
 
 	} else {
@@ -590,7 +590,7 @@ void TQXIMInputContext::close_xim()
     // XCloseIM( tqt_xim );
     // We prefer a less serious memory leak
 
-    tqt_xim = 0;
+    tqt_xim = nullptr;
     if( ximContextList ) {
 	TQPtrList<TQXIMInputContext> contexts( *ximContextList );
 	TQPtrList<TQXIMInputContext>::Iterator it = contexts.begin();
@@ -752,7 +752,7 @@ void TQXIMInputContext::close( const TQString &errMsg )
 
 bool TQXIMInputContext::hasFocus() const
 {
-    return ( focusWidget() != 0 );
+    return ( focusWidget() );
 }
 
 
diff --git a/plugins/src/sqldrivers/ibase/main.cpp b/plugins/src/sqldrivers/ibase/main.cpp
index 7cca63c45..9158e8c4f 100644
--- a/plugins/src/sqldrivers/ibase/main.cpp
+++ b/plugins/src/sqldrivers/ibase/main.cpp
@@ -61,7 +61,7 @@ TQSqlDriver* TQIBaseDriverPlugin::create( const TQString &name )
 	TQIBaseDriver* driver = new TQIBaseDriver();
 	return driver;
     }
-    return 0;
+    return nullptr;
 }
 
 TQStringList TQIBaseDriverPlugin::keys() const
diff --git a/plugins/src/sqldrivers/mysql/main.cpp b/plugins/src/sqldrivers/mysql/main.cpp
index 214724393..3a02dbd56 100644
--- a/plugins/src/sqldrivers/mysql/main.cpp
+++ b/plugins/src/sqldrivers/mysql/main.cpp
@@ -61,7 +61,7 @@ TQSqlDriver* TQMYSQLDriverPlugin::create( const TQString &name )
 	TQMYSQLDriver* driver = new TQMYSQLDriver();
 	return driver;
     }
-    return 0;
+    return nullptr;
 }
 
 TQStringList TQMYSQLDriverPlugin::keys() const
diff --git a/plugins/src/sqldrivers/odbc/main.cpp b/plugins/src/sqldrivers/odbc/main.cpp
index 9b26ec984..80d3c35ee 100644
--- a/plugins/src/sqldrivers/odbc/main.cpp
+++ b/plugins/src/sqldrivers/odbc/main.cpp
@@ -61,7 +61,7 @@ TQSqlDriver* TQODBCDriverPlugin::create( const TQString &name )
 	TQODBCDriver* driver = new TQODBCDriver();
 	return driver;
     }
-    return 0;
+    return nullptr;
 }
 
 TQStringList TQODBCDriverPlugin::keys() const
diff --git a/plugins/src/sqldrivers/psql/main.cpp b/plugins/src/sqldrivers/psql/main.cpp
index a0c73b24b..d4b6d77b2 100644
--- a/plugins/src/sqldrivers/psql/main.cpp
+++ b/plugins/src/sqldrivers/psql/main.cpp
@@ -61,7 +61,7 @@ TQSqlDriver* TQPSQLDriverPlugin::create( const TQString &name )
 	TQPSQLDriver* driver = new TQPSQLDriver();
 	return driver;
     }
-    return 0;
+    return nullptr;
 }
 
 TQStringList TQPSQLDriverPlugin::keys() const
diff --git a/plugins/src/sqldrivers/sqlite/smain.cpp b/plugins/src/sqldrivers/sqlite/smain.cpp
index 40586e23a..14efdd584 100644
--- a/plugins/src/sqldrivers/sqlite/smain.cpp
+++ b/plugins/src/sqldrivers/sqlite/smain.cpp
@@ -61,7 +61,7 @@ TQSqlDriver* TQSQLiteDriverPlugin::create( const TQString &name )
 	TQSQLiteDriver* driver = new TQSQLiteDriver();
 	return driver;
     }
-    return 0;
+    return nullptr;
 }
 
 TQStringList TQSQLiteDriverPlugin::keys() const
diff --git a/plugins/src/sqldrivers/sqlite3/smain.cpp b/plugins/src/sqldrivers/sqlite3/smain.cpp
index 9ecee7f57..4af095438 100644
--- a/plugins/src/sqldrivers/sqlite3/smain.cpp
+++ b/plugins/src/sqldrivers/sqlite3/smain.cpp
@@ -57,7 +57,7 @@ TQSqlDriver* TQSQLite3DriverPlugin::create( const TQString &name )
 	TQSQLite3Driver* driver = new TQSQLite3Driver();
 	return driver;
     }
-    return 0;
+    return nullptr;
 }
 
 TQStringList TQSQLite3DriverPlugin::keys() const
diff --git a/plugins/src/styles/cde/main.cpp b/plugins/src/styles/cde/main.cpp
index a079a82df..f8757b357 100644
--- a/plugins/src/styles/cde/main.cpp
+++ b/plugins/src/styles/cde/main.cpp
@@ -27,7 +27,7 @@ TQStyle* CDEStyle::create( const TQString& s )
     if ( s.lower() == "cde" )
 	return new TQCDEStyle();
 
-    return 0;
+    return nullptr;
 }
 
 TQ_EXPORT_PLUGIN( CDEStyle )
diff --git a/plugins/src/styles/compact/main.cpp b/plugins/src/styles/compact/main.cpp
index 8d6358917..dc5313125 100644
--- a/plugins/src/styles/compact/main.cpp
+++ b/plugins/src/styles/compact/main.cpp
@@ -27,7 +27,7 @@ TQStyle* CompactStyle::create( const TQString& s )
     if ( s.lower() == "compact" )
         return new TQCompactStyle();
 
-    return 0;
+    return nullptr;
 }
 
 
diff --git a/plugins/src/styles/motif/main.cpp b/plugins/src/styles/motif/main.cpp
index 73e25e64a..2c060e461 100644
--- a/plugins/src/styles/motif/main.cpp
+++ b/plugins/src/styles/motif/main.cpp
@@ -27,7 +27,7 @@ TQStyle* MotifStyle::create( const TQString& s )
     if ( s.lower() == "motif" )
 	return new TQMotifStyle();
 
-    return 0;
+    return nullptr;
 }
 
 TQ_EXPORT_PLUGIN( MotifStyle )
diff --git a/plugins/src/styles/motifplus/main.cpp b/plugins/src/styles/motifplus/main.cpp
index 60b1e5395..a2941497f 100644
--- a/plugins/src/styles/motifplus/main.cpp
+++ b/plugins/src/styles/motifplus/main.cpp
@@ -28,7 +28,7 @@ TQStyle* MotifPlusStyle::create( const TQString& s )
     if ( s.lower() == "motifplus" )
 	return new TQMotifPlusStyle();
 
-    return 0;
+    return nullptr;
 }
 
 TQ_EXPORT_PLUGIN( MotifPlusStyle )
diff --git a/plugins/src/styles/platinum/main.cpp b/plugins/src/styles/platinum/main.cpp
index aaf168968..53698bbaf 100644
--- a/plugins/src/styles/platinum/main.cpp
+++ b/plugins/src/styles/platinum/main.cpp
@@ -27,7 +27,7 @@ TQStyle* PlatinumStyle::create( const TQString& s )
     if ( s.lower() == "platinum" )
         return new TQPlatinumStyle();
 
-    return 0;
+    return nullptr;
 }
 
 
diff --git a/plugins/src/styles/sgi/main.cpp b/plugins/src/styles/sgi/main.cpp
index 9e4331f82..3ab61e62b 100644
--- a/plugins/src/styles/sgi/main.cpp
+++ b/plugins/src/styles/sgi/main.cpp
@@ -27,7 +27,7 @@ TQStyle* SGIStyle::create( const TQString& s )
     if ( s.lower() == "sgi" )
         return new TQSGIStyle();
 
-    return 0;
+    return nullptr;
 }
 
 TQ_EXPORT_PLUGIN( SGIStyle )
diff --git a/plugins/src/styles/windows/main.cpp b/plugins/src/styles/windows/main.cpp
index efb82e432..a2d18bafb 100644
--- a/plugins/src/styles/windows/main.cpp
+++ b/plugins/src/styles/windows/main.cpp
@@ -27,7 +27,7 @@ TQStyle* WindowsStyle::create( const TQString& s )
     if ( s.lower() == "windows" )
 	return new TQWindowsStyle();
 
-    return 0;
+    return nullptr;
 }
 
 TQ_EXPORT_PLUGIN( WindowsStyle )
diff --git a/qmake/examples/tutorial/hello.cpp b/qmake/examples/tutorial/hello.cpp
index 8ab5e5a5a..3d2cd938d 100644
--- a/qmake/examples/tutorial/hello.cpp
+++ b/qmake/examples/tutorial/hello.cpp
@@ -1,7 +1,7 @@
 #include "hello.h"
 
 MyPushButton::MyPushButton( const TQString& text ) 
-    : TQPushButton( text, 0, "mypushbutton" )
+    : TQPushButton( text, nullptr, "mypushbutton" )
 {
     tqDebug( "My PushButton has been constructed" );
 }
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index d2e9bd8b5..3da940776 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -370,7 +370,7 @@ VCCLCompilerTool::VCCLCompilerTool()
 	WarnAsError( unset ),
 	WarningLevel( warningLevel_0 ),
 	WholeProgramOptimization( unset ),
-	config( 0 )
+	config( nullptr )
 {
 }
 
diff --git a/src/canvas/tqcanvas.cpp b/src/canvas/tqcanvas.cpp
index d3d4c6b70..a1cb78e63 100644
--- a/src/canvas/tqcanvas.cpp
+++ b/src/canvas/tqcanvas.cpp
@@ -279,7 +279,7 @@ const TQRect& TQCanvasClusterizer::operator[](int i)
 
 class TQM_EXPORT_CANVAS TQCanvasItemPtr {
 public:
-    TQCanvasItemPtr() : ptr(0) { }
+    TQCanvasItemPtr() : ptr(nullptr) { }
     TQCanvasItemPtr( TQCanvasItem* p ) : ptr(p) { }
 
     bool operator<=(const TQCanvasItemPtr& that) const
@@ -345,7 +345,7 @@ void TQCanvasItemList::sort()
 */
 void TQCanvasItemList::drawUnique( TQPainter& painter )
 {
-    TQCanvasItem* prev=0;
+    TQCanvasItem* prev=nullptr;
     for (Iterator it=fromLast(); it!=end(); --it) {
 	TQCanvasItem *g=*it;
 	if (g!=prev) {
@@ -608,9 +608,9 @@ void TQCanvas::init(int w, int h, int chunksze, int mxclusters)
     chwidth=(w+chunksize-1)/chunksize;
     chheight=(h+chunksize-1)/chunksize;
     chunks=new TQCanvasChunk[chwidth*chheight];
-    update_timer = 0;
+    update_timer = nullptr;
     bgcolor = white;
-    grid = 0;
+    grid = nullptr;
     htiles = 0;
     vtiles = 0;
     dblbuf = true;
@@ -670,8 +670,8 @@ TQCanvas::TQCanvas( TQPixmap p,
 
 void tqt_unview(TQCanvas* c)
 {
-    for (TQCanvasView* view=c->d->viewList.first(); view != 0; view=c->d->viewList.next()) {
-	view->viewing = 0;
+    for (TQCanvasView* view=c->d->viewList.first(); view; view=c->d->viewList.next()) {
+	view->viewing = nullptr;
     }
 }
 
@@ -752,7 +752,7 @@ void TQCanvas::resize(int w, int h)
     delete [] chunks;
     chunks=newchunks;
 
-    for (item=hidden.first(); item != 0; item=hidden.next()) {
+    for (item=hidden.first(); item; item=hidden.next()) {
 	item->show();
     }
 
@@ -828,7 +828,7 @@ void TQCanvas::retune(int chunksze, int mxclusters)
 	delete [] chunks;
 	chunks=newchunks;
 
-	for (TQCanvasItem* item=hidden.first(); item != 0; item=hidden.next()) {
+	for (TQCanvasItem* item=hidden.first(); item; item=hidden.next()) {
 	    item->show();
 	}
     }
@@ -1159,7 +1159,7 @@ void TQCanvas::update()
 
     TQPtrListIterator<TQCanvasView> it(d->viewList);
     TQCanvasView* view;
-    while( (view=it.current()) != 0 ) {
+    while( (view=it.current()) ) {
 	++it;
 #ifndef TQT_NO_TRANSFORMATIONS
 	TQWMatrix wm = view->worldMatrix();
@@ -1191,7 +1191,7 @@ void TQCanvas::update()
 	drawChanges(clusterizer[i]);
 
 #ifndef TQT_NO_TRANSFORMATIONS
-    for ( TQRect* r=doneareas.first(); r != 0; r=doneareas.next() )
+    for ( TQRect* r=doneareas.first(); r; r=doneareas.next() )
 	setUnchanged(*r);
 #endif
 }
@@ -1596,7 +1596,7 @@ void TQCanvas::setBackgroundColor( const TQColor& c )
     if ( bgcolor != c ) {
 	bgcolor = c;
 	TQCanvasView* view=d->viewList.first();
-	while ( view != 0 ) {
+	while ( view ) {
 	    /* XXX this doesn't look right. Shouldn't this
 	       be more like setBackgroundPixmap? : Ian */
 	    view->viewport()->setEraseColor( bgcolor );
@@ -1627,7 +1627,7 @@ void TQCanvas::setBackgroundPixmap( const TQPixmap& p )
 {
     setTiles(p, 1, 1, p.width(), p.height());
     TQCanvasView* view = d->viewList.first();
-    while ( view != 0 ) {
+    while ( view ) {
 	view->updateContents();
 	view = d->viewList.next();
     }
@@ -1757,7 +1757,7 @@ void TQCanvas::setTiles( TQPixmap p,
 	tilew = tilewidth;
 	tileh = tileheight;
     } else {
-	grid = 0;
+	grid = nullptr;
     }
     if ( h + v > 10 ) {
 	int s = scm(tilewidth,tileheight);
@@ -1949,7 +1949,7 @@ TQCanvasItem::TQCanvasItem(TQCanvas* canvas) :
     ena=0;
     act=0;
 
-    ext = 0;
+    ext = nullptr;
     if (cnv) cnv->addItem(this);
 }
 
@@ -2352,7 +2352,7 @@ bool tqt_testCollision(const TQCanvasSprite* s1, const TQCanvasSprite* s2)
 	t=x1; x1=x2; x2=t;
 	t=y1; x1=y2; y2=t;
 	s2image = s1image;
-	s1image = 0;
+	s1image = nullptr;
     }
 
     // s2image != 0
@@ -2540,7 +2540,7 @@ static bool collision_double_dispatch( const TQCanvasSprite* s1,
 */
 bool TQCanvasSprite::collidesWith( const TQCanvasItem* i ) const
 {
-    return i->collidesWith(this,0,0,0,0);
+    return i->collidesWith(this,nullptr,nullptr,nullptr,nullptr);
 }
 
 /*!
@@ -2555,7 +2555,7 @@ bool TQCanvasSprite::collidesWith( const TQCanvasSprite* s,
 				  const TQCanvasEllipse* e,
 				  const TQCanvasText* t ) const
 {
-    return collision_double_dispatch(s,p,r,e,t,this,0,0,0,0);
+    return collision_double_dispatch(s,p,r,e,t,this,nullptr,nullptr,nullptr,nullptr);
 }
 
 /*!
@@ -2563,7 +2563,7 @@ bool TQCanvasSprite::collidesWith( const TQCanvasSprite* s,
 */
 bool TQCanvasPolygonalItem::collidesWith( const TQCanvasItem* i ) const
 {
-    return i->collidesWith(0,this,0,0,0);
+    return i->collidesWith(nullptr,this,nullptr,nullptr,nullptr);
 }
 
 bool TQCanvasPolygonalItem::collidesWith(  const TQCanvasSprite* s,
@@ -2572,7 +2572,7 @@ bool TQCanvasPolygonalItem::collidesWith(  const TQCanvasSprite* s,
 				 const TQCanvasEllipse* e,
 				 const TQCanvasText* t ) const
 {
-    return collision_double_dispatch(s,p,r,e,t,0,this,0,0,0);
+    return collision_double_dispatch(s,p,r,e,t,nullptr,this,nullptr,nullptr,nullptr);
 }
 
 /*!
@@ -2580,7 +2580,7 @@ bool TQCanvasPolygonalItem::collidesWith(  const TQCanvasSprite* s,
 */
 bool TQCanvasRectangle::collidesWith( const TQCanvasItem* i ) const
 {
-    return i->collidesWith(0,this,this,0,0);
+    return i->collidesWith(nullptr,this,this,nullptr,nullptr);
 }
 
 bool TQCanvasRectangle::collidesWith(  const TQCanvasSprite* s,
@@ -2589,7 +2589,7 @@ bool TQCanvasRectangle::collidesWith(  const TQCanvasSprite* s,
 				 const TQCanvasEllipse* e,
 				 const TQCanvasText* t ) const
 {
-    return collision_double_dispatch(s,p,r,e,t,0,this,this,0,0);
+    return collision_double_dispatch(s,p,r,e,t,nullptr,this,this,nullptr,nullptr);
 }
 
 
@@ -2598,7 +2598,7 @@ bool TQCanvasRectangle::collidesWith(  const TQCanvasSprite* s,
 */
 bool TQCanvasEllipse::collidesWith( const TQCanvasItem* i ) const
 {
-    return i->collidesWith(0,this,0,this,0);
+    return i->collidesWith(nullptr,this,nullptr,this,nullptr);
 }
 
 bool TQCanvasEllipse::collidesWith(  const TQCanvasSprite* s,
@@ -2607,7 +2607,7 @@ bool TQCanvasEllipse::collidesWith(  const TQCanvasSprite* s,
 				 const TQCanvasEllipse* e,
 				 const TQCanvasText* t ) const
 {
-    return collision_double_dispatch(s,p,r,e,t,0,this,0,this,0);
+    return collision_double_dispatch(s,p,r,e,t,nullptr,this,nullptr,this,nullptr);
 }
 
 /*!
@@ -2615,7 +2615,7 @@ bool TQCanvasEllipse::collidesWith(  const TQCanvasSprite* s,
 */
 bool TQCanvasText::collidesWith( const TQCanvasItem* i ) const
 {
-    return i->collidesWith(0,0,0,0,this);
+    return i->collidesWith(nullptr,nullptr,nullptr,nullptr,this);
 }
 
 bool TQCanvasText::collidesWith(  const TQCanvasSprite* s,
@@ -2624,7 +2624,7 @@ bool TQCanvasText::collidesWith(  const TQCanvasSprite* s,
 				 const TQCanvasEllipse* e,
 				 const TQCanvasText* t ) const
 {
-    return collision_double_dispatch(s,p,r,e,t,0,0,0,0,this);
+    return collision_double_dispatch(s,p,r,e,t,nullptr,nullptr,nullptr,nullptr,this);
 }
 
 /*!
@@ -2882,7 +2882,7 @@ void TQCanvasPixmap::init(const TQImage& image)
 	collision_mask = new TQImage(i);
     } else
 #endif
-	collision_mask = 0;
+	collision_mask = nullptr;
 }
 
 void TQCanvasPixmap::init(const TQPixmap& pixmap, int hx, int hy)
@@ -2894,7 +2894,7 @@ void TQCanvasPixmap::init(const TQPixmap& pixmap, int hx, int hy)
 	TQImage i = mask()->convertToImage();
 	collision_mask = new TQImage(i);
     } else
-	collision_mask = 0;
+	collision_mask = nullptr;
 }
 
 /*!
@@ -2967,7 +2967,7 @@ TQCanvasPixmap::~TQCanvasPixmap()
     TQCanvasPixmapArray.
 */
 TQCanvasPixmapArray::TQCanvasPixmapArray()
-: framecount( 0 ), img( 0 )
+: framecount( 0 ), img( nullptr )
 {
 }
 
@@ -2994,7 +2994,7 @@ TQCanvasPixmapArray::TQCanvasPixmapArray()
 
 TQCanvasPixmapArray::TQCanvasPixmapArray( const TQString& datafilenamepattern,
 					int fc )
-: framecount( 0 ), img( 0 )
+: framecount( 0 ), img( nullptr )
 {
     readPixmaps(datafilenamepattern,fc);
 }
@@ -3015,7 +3015,7 @@ TQCanvasPixmapArray::TQCanvasPixmapArray(TQPtrList<TQPixmap> list, TQPtrList<TQP
     if (list.count() != hotspots.count()) {
 	tqWarning("TQCanvasPixmapArray: lists have different lengths");
 	reset();
-	img = 0;
+	img = nullptr;
     } else {
 	list.first();
 	hotspots.first();
@@ -3043,7 +3043,7 @@ TQCanvasPixmapArray::TQCanvasPixmapArray(TQValueList<TQPixmap> list, TQPointArra
     if (have_hotspots && list.count() != hotspots.count()) {
 	tqWarning("TQCanvasPixmapArray: lists have different lengths");
 	reset();
-	img = 0;
+	img = nullptr;
     } else {
 	TQValueList<TQPixmap>::iterator it;
 	it = list.begin();
@@ -3068,7 +3068,7 @@ void TQCanvasPixmapArray::reset()
     for (int i=0; i<framecount; i++)
 	delete img[i];
     delete [] img;
-    img = 0;
+    img = nullptr;
     framecount = 0;
 }
 
@@ -3175,7 +3175,7 @@ bool TQCanvasPixmapArray::readPixmaps( const TQString& datafilenamepattern,
 */
 bool TQCanvasPixmapArray::operator!()
 {
-    return img==0;
+    return !img;
 }
 
 /*!
@@ -3184,7 +3184,7 @@ bool TQCanvasPixmapArray::operator!()
 */
 bool TQCanvasPixmapArray::isValid() const
 {
-    return (img != 0);
+    return (img);
 }
 
 /*!
@@ -3533,8 +3533,8 @@ TQCanvasView::TQCanvasView(TQWidget* parent, const char* name, WFlags f) :
     TQScrollView(parent,name,f|WResizeNoErase|WStaticContents)
 {
     d = new TQCanvasViewData;
-    viewing = 0;
-    setCanvas(0);
+    viewing = nullptr;
+    setCanvas(nullptr);
     connect(this,TQ_SIGNAL(contentsMoving(int,int)),this,TQ_SLOT(cMoving(int,int)));
 }
 
@@ -3548,7 +3548,7 @@ TQCanvasView::TQCanvasView(TQCanvas* canvas, TQWidget* parent, const char* name,
     TQScrollView(parent,name,f|WResizeNoErase|WStaticContents)
 {
     d = new TQCanvasViewData;
-    viewing = 0;
+    viewing = nullptr;
     setCanvas(canvas);
 
     connect(this,TQ_SIGNAL(contentsMoving(int,int)),this,TQ_SLOT(cMoving(int,int)));
@@ -3560,8 +3560,8 @@ TQCanvasView::TQCanvasView(TQCanvas* canvas, TQWidget* parent, const char* name,
 TQCanvasView::~TQCanvasView()
 {
     delete d;
-    d = 0;
-    setCanvas(0);
+    d = nullptr;
+    setCanvas(nullptr);
 }
 
 /*!
@@ -3791,7 +3791,7 @@ TQSize TQCanvasView::sizeHint() const
 */
 static const TQPen& defaultPolygonPen()
 {
-    static TQPen* dp=0;
+    static TQPen* dp=nullptr;
     if ( !dp )
 	dp = new TQPen;
     return *dp;
@@ -3799,7 +3799,7 @@ static const TQPen& defaultPolygonPen()
 
 static const TQBrush& defaultPolygonBrush()
 {
-    static TQBrush* db=0;
+    static TQBrush* db=nullptr;
     if ( !db )
 	db = new TQBrush;
     return *db;
@@ -3892,8 +3892,8 @@ TQPointArray TQCanvasPolygonalItem::areaPointsAdvanced() const
 
 //#define TQCANVAS_POLYGONS_DEBUG
 #ifdef TQCANVAS_POLYGONS_DEBUG
-static TQWidget* dbg_wid=0;
-static TQPainter* dbg_ptr=0;
+static TQWidget* dbg_wid=nullptr;
+static TQPainter* dbg_ptr=nullptr;
 #endif
 
 class TQPolygonalProcessor {
diff --git a/src/canvas/tqcanvas.h b/src/canvas/tqcanvas.h
index d21ced05f..da9098462 100644
--- a/src/canvas/tqcanvas.h
+++ b/src/canvas/tqcanvas.h
@@ -220,7 +220,7 @@ class TQM_EXPORT_CANVAS TQCanvas : public TQObject
 {
     TQ_OBJECT
 public:
-    TQCanvas( TQObject* parent = 0, const char* name = 0 );
+    TQCanvas( TQObject* parent = nullptr, const char* name = nullptr );
     TQCanvas(int w, int h);
     TQCanvas( TQPixmap p, int h, int v, int tilewidth, int tileheight );
 
@@ -295,7 +295,7 @@ public:
     // These are for TQCanvasView to call
     virtual void addView(TQCanvasView*);
     virtual void removeView(TQCanvasView*);
-    void drawCanvasArea(const TQRect&, TQPainter* p=0, bool double_buffer=true);
+    void drawCanvasArea(const TQRect&, TQPainter* p=nullptr, bool double_buffer=true);
     void drawViewArea( TQCanvasView* view, TQPainter* p, const TQRect& r, bool dbuf );
 
     // These are for TQCanvasItem to call
@@ -366,8 +366,8 @@ class TQM_EXPORT_CANVAS TQCanvasView : public TQScrollView
     TQ_OBJECT
 public:
 
-    TQCanvasView(TQWidget* parent=0, const char* name=0, WFlags f=0);
-    TQCanvasView(TQCanvas* viewing, TQWidget* parent=0, const char* name=0, WFlags f=0);
+    TQCanvasView(TQWidget* parent=nullptr, const char* name=nullptr, WFlags f=0);
+    TQCanvasView(TQCanvas* viewing, TQWidget* parent=nullptr, const char* name=nullptr, WFlags f=0);
     ~TQCanvasView();
 
     TQCanvas* canvas() const
@@ -457,7 +457,7 @@ public:
     bool isValid() const;
 
     TQCanvasPixmap* image(int i) const
-	{ return img ? img[i] : 0; }
+	{ return img ? img[i] : nullptr; }
     void setImage(int i, TQCanvasPixmap* p);
     uint count() const
 	{ return (uint)framecount; }
diff --git a/src/codecs/tqbig5codec.cpp b/src/codecs/tqbig5codec.cpp
index b1d8de897..60d3a53d6 100644
--- a/src/codecs/tqbig5codec.cpp
+++ b/src/codecs/tqbig5codec.cpp
@@ -728,7 +728,7 @@ int TQBig5Codec::heuristicNameMatch(const char* hint) const
     const char *p;
     if (zh) {
 	p = strchr(hint, '.');
-        if (p == 0)
+        if (!p)
 	    return score;
         p++;
     } else {
@@ -975,7 +975,7 @@ int TQBig5hkscsCodec::heuristicNameMatch(const char* hint) const
     const char *p;
     if (zh) {
 	p = strchr(hint, '.');
-        if (p == 0)
+        if (!p)
 	    return score;
         p++;
     } else {
diff --git a/src/codecs/tqeucjpcodec.cpp b/src/codecs/tqeucjpcodec.cpp
index 0bfd69a92..7a06acbeb 100644
--- a/src/codecs/tqeucjpcodec.cpp
+++ b/src/codecs/tqeucjpcodec.cpp
@@ -140,7 +140,7 @@ TQEucJpCodec::TQEucJpCodec() : conv(TQJpUnicodeConv::newConverter( TQJpUnicodeCo
 TQEucJpCodec::~TQEucJpCodec()
 {
     delete (TQJpUnicodeConv*)conv;
-    conv = 0;
+    conv = nullptr;
 }
 
 /*!
@@ -312,7 +312,7 @@ int TQEucJpCodec::heuristicNameMatch(const char* hint) const
     const char *p;
     if (ja) {
 	p = strchr(hint, '.');
-	if (p == 0) {
+	if (!p) {
 	    return score;
 	}
 	p++;
diff --git a/src/codecs/tqeuckrcodec.cpp b/src/codecs/tqeuckrcodec.cpp
index 9b9192a80..48f938f19 100644
--- a/src/codecs/tqeuckrcodec.cpp
+++ b/src/codecs/tqeuckrcodec.cpp
@@ -223,7 +223,7 @@ int TQEucKrCodec::heuristicNameMatch(const char* hint) const
   const char *p;
   if (ko) {
     p = strchr(hint, '.');
-    if (p == 0) {
+    if (!p) {
       return score;
     }
     p++;
diff --git a/src/codecs/tqfontjpcodec.cpp b/src/codecs/tqfontjpcodec.cpp
index f910d8b16..319485b9b 100644
--- a/src/codecs/tqfontjpcodec.cpp
+++ b/src/codecs/tqfontjpcodec.cpp
@@ -151,7 +151,7 @@ TQFontJis0208Codec::TQFontJis0208Codec()
 TQFontJis0208Codec::~TQFontJis0208Codec()
 {
     delete convJP;
-    convJP = 0;
+    convJP = nullptr;
 }
 
 
diff --git a/src/codecs/tqgb18030codec.cpp b/src/codecs/tqgb18030codec.cpp
index e1010864c..c38a1f389 100644
--- a/src/codecs/tqgb18030codec.cpp
+++ b/src/codecs/tqgb18030codec.cpp
@@ -274,7 +274,7 @@ int TQGb18030Codec::heuristicNameMatch(const char* hint) const
     const char *p;
     if ( zh ) {
     	p = strchr(hint, '.');
-        if ( p == 0 )
+        if ( !p )
       	    return score;
         p++;
     } else {
@@ -485,7 +485,7 @@ int TQGbkCodec::heuristicNameMatch(const char* hint) const
     const char *p;
     if ( zh ) {
     	p = strchr(hint, '.');
-        if ( p == 0 )
+        if ( !p )
       	    return score;
         p++;
     } else {
@@ -679,7 +679,7 @@ int TQGb2312Codec::heuristicNameMatch(const char* hint) const
     const char *p;
     if ( zh ) {
     	p = strchr(hint, '.');
-        if ( p == 0 )
+        if ( !p )
       	    return score;
         p++;
     } else {
diff --git a/src/codecs/tqhebrewcodec.cpp b/src/codecs/tqhebrewcodec.cpp
index 928dc0035..c77fc940f 100644
--- a/src/codecs/tqhebrewcodec.cpp
+++ b/src/codecs/tqhebrewcodec.cpp
@@ -423,7 +423,7 @@ static TQString visualOrder(TQString logical, TQChar::Direction basicDir)
 {
     logical.replace(TQChar('\n'), TQChar(0x2028));
 
-    TQTextEngine e(logical, 0);
+    TQTextEngine e(logical, nullptr);
     e.direction = basicDir;
     e.itemize();
     TQ_UINT8 l[256];
diff --git a/src/codecs/tqjiscodec.cpp b/src/codecs/tqjiscodec.cpp
index b3be343f2..3bad37983 100644
--- a/src/codecs/tqjiscodec.cpp
+++ b/src/codecs/tqjiscodec.cpp
@@ -181,7 +181,7 @@ TQJisCodec::TQJisCodec() : conv(TQJpUnicodeConv::newConverter(TQJpUnicodeConv::D
 TQJisCodec::~TQJisCodec()
 {
     delete (TQJpUnicodeConv*)conv;
-    conv = 0;
+    conv = nullptr;
 }
 
 
@@ -404,7 +404,7 @@ int TQJisCodec::heuristicNameMatch(const char* hint) const
     const char *p;
     if (ja) {
 	p = strchr(hint, '.');
-	if (p == 0) {
+	if (!p) {
 	    return score - 2;
 	}
 	p++;
diff --git a/src/codecs/tqjpunicode.cpp b/src/codecs/tqjpunicode.cpp
index f333f4ccc..447cb89c8 100644
--- a/src/codecs/tqjpunicode.cpp
+++ b/src/codecs/tqjpunicode.cpp
@@ -765,8 +765,8 @@ uint TQJpUnicodeConv_Microsoft::unicodeToJisx0212(uint h, uint l) const
 /*! \internal */
 TQJpUnicodeConv *TQJpUnicodeConv::newConverter(int rule)
 {
-    const char * e = 0;
-    if ( rule == Default && (e=getenv("UNICODEMAP_JP")) != 0 ) {
+    const char * e = nullptr;
+    if ( rule == Default && (e=getenv("UNICODEMAP_JP")) ) {
 	TQCString env( e );
 	for (int i = 0; i < (int)env.length(); ) {
 	    int j = env.find(',', i);
@@ -5610,12 +5610,12 @@ static unsigned short const unicode_to_jisx0208_ff[] = {
 static unsigned short const * const unicode_to_jisx0208_map[0x100] = {
 	/* 0x00XX - 0x0fXX */
 	unicode_to_jisx0208_00,
-	0, 0,
+	nullptr, nullptr,
 	unicode_to_jisx0208_03,
 	unicode_to_jisx0208_04,
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	/* 0x10XX - 0x1fXX */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	/* 0x20XX - 0x2fXX */
 	unicode_to_jisx0208_20,
 	unicode_to_jisx0208_21,
@@ -5624,15 +5624,15 @@ static unsigned short const * const unicode_to_jisx0208_map[0x100] = {
 	unicode_to_jisx0208_24,
 	unicode_to_jisx0208_25,
 	unicode_to_jisx0208_26,
-	0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	/* 0x30XX - 0x3fXX */
 	unicode_to_jisx0208_30,
-	0,
+	nullptr,
 	unicode_to_jisx0208_32,
 	unicode_to_jisx0208_33,
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	/* 0x40XX - 0x4fXX */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	unicode_to_jisx0208_4e,
 	unicode_to_jisx0208_4f,
 	/* 0x50XX - 0x5fXX */
@@ -5721,17 +5721,17 @@ static unsigned short const * const unicode_to_jisx0208_map[0x100] = {
 	unicode_to_jisx0208_9e,
 	unicode_to_jisx0208_9f,
 	/* 0xa0XX - 0xafXX */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	/* 0xb0XX - 0xbfXX */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	/* 0xc0XX - 0xcfXX */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	/* 0xd0XX - 0xdfXX */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	/* 0xe0XX - 0xefXX */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	/* 0xf0XX - 0xffXX */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	unicode_to_jisx0208_ff,
 };
 
@@ -5740,7 +5740,7 @@ static uint unicode11ToJisx0208(uint h, uint l)
     unsigned short const *table;
 
     table = unicode_to_jisx0208_map[h];
-    if (table != 0) {
+    if (table) {
 	return table[l];
     }
     return 0x0000;
@@ -10321,19 +10321,19 @@ static unsigned short const * const unicode_to_jisx0212_map[0x100] = {
 	unicode_to_jisx0212_02,
 	unicode_to_jisx0212_03,
 	unicode_to_jisx0212_04,
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	/* 0x10XX - 0x1fXX */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	/* 0x20XX - 0x2fXX */
-	0,
+	nullptr,
 	unicode_to_jisx0212_21,
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	/* 0x30XX - 0x3fXX */
-	0, 0,
+	nullptr, nullptr,
 	unicode_to_jisx0212_32,
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	/* 0x40XX - 0x4fXX */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	unicode_to_jisx0212_4e,
 	unicode_to_jisx0212_4f,
 	/* 0x50XX - 0x5fXX */
@@ -10422,20 +10422,20 @@ static unsigned short const * const unicode_to_jisx0212_map[0x100] = {
 	unicode_to_jisx0212_9e,
 	unicode_to_jisx0212_9f,
 	/* 0xa0XX - 0xafXX */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	/* 0xb0XX - 0xbfXX */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	/* 0xc0XX - 0xcfXX */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	/* 0xd0XX - 0xdfXX */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	/* 0xe0XX - 0xefXX */
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	/* 0xf0XX - 0xffXX */
-	0, 0, 0, 0, 0, 0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 	unicode_to_jisx0212_f9,
 	unicode_to_jisx0212_fa,
-	0, 0, 0, 0,
+	nullptr, nullptr, nullptr, nullptr,
 	unicode_to_jisx0212_ff,
 };
 
@@ -10447,7 +10447,7 @@ static uint unicode11ToJisx0212(uint h, uint l)
     unsigned short const *table;
 
     table = unicode_to_jisx0212_map[h];
-    if (table != 0) {
+    if (table) {
 	return table[l];
     }
     return 0x0000;
diff --git a/src/codecs/tqsjiscodec.cpp b/src/codecs/tqsjiscodec.cpp
index 010ff9293..690ccd73b 100644
--- a/src/codecs/tqsjiscodec.cpp
+++ b/src/codecs/tqsjiscodec.cpp
@@ -119,7 +119,7 @@ TQSjisCodec::TQSjisCodec() : conv(TQJpUnicodeConv::newConverter(TQJpUnicodeConv:
 TQSjisCodec::~TQSjisCodec()
 {
     delete (TQJpUnicodeConv*)conv;
-    conv = 0;
+    conv = nullptr;
 }
 
 
@@ -259,7 +259,7 @@ int TQSjisCodec::heuristicNameMatch(const char* hint) const
     const char *p;
     if (ja) {
 	p = strchr(hint, '.');
-	if (p == 0) {
+	if (!p) {
 	    return score - 1;
 	}
 	p++;
diff --git a/src/codecs/tqtextcodec.cpp b/src/codecs/tqtextcodec.cpp
index e2767b51f..77dd15bf8 100644
--- a/src/codecs/tqtextcodec.cpp
+++ b/src/codecs/tqtextcodec.cpp
@@ -88,9 +88,9 @@
 #include <langinfo.h>
 #endif
 
-static TQValueList<TQTextCodec*> *all = 0;
+static TQValueList<TQTextCodec*> *all = nullptr;
 static bool codecs_destroyed = false;
-static TQTextCodec * localeMapper = 0;
+static TQTextCodec * localeMapper = nullptr;
 
 class TQTextCodecCleanup {
 public:
@@ -129,16 +129,16 @@ void TQTextCodec::deleteAllCodecs()
 #endif // TQT_THREAD_SUPPORT
 
     TQValueList<TQTextCodec*> *ball = all;
-    all = 0;
+    all = nullptr;
     TQValueList<TQTextCodec*>::Iterator it;
     for ( it = ball->begin(); it != ball->end(); ++it ) {
 	delete *it;
-	*it = 0;
+	*it = nullptr;
     }
     ball->clear();
     delete ball;
 
-    localeMapper = 0;
+    localeMapper = nullptr;
 }
 
 static void setup();
@@ -530,7 +530,7 @@ TQTextCodec* TQTextCodec::codecForIndex(int i)
     }
 
     setup();
-    return (uint)i >= all->count() ? 0 : *all->at(i);
+    return (uint)i >= all->count() ? nullptr : *all->at(i);
 }
 
 
@@ -547,7 +547,7 @@ TQTextCodec* TQTextCodec::codecForMib(int mib)
 
     setup();
     TQValueList<TQTextCodec*>::ConstIterator i;
-    TQTextCodec* result=0;
+    TQTextCodec* result=nullptr;
     for ( i = all->begin(); i != all->end(); ++i ) {
 	result = *i;
 	if ( result->mibEnum()==mib )
@@ -710,37 +710,37 @@ static const char * const iso8859_2locales[] = {
     "croatian", "cs", "cs_CS", "cs_CZ","cz", "cz_CZ", "czech", "hr",
     "hr_HR", "hu", "hu_HU", "hungarian", "pl", "pl_PL", "polish", "ro",
     "ro_RO", "rumanian", "serbocroatian", "sh", "sh_SP", "sh_YU", "sk",
-    "sk_SK", "sl", "sl_CS", "sl_SI", "slovak", "slovene", "sr_SP", 0 };
+    "sk_SK", "sl", "sl_CS", "sl_SI", "slovak", "slovene", "sr_SP", nullptr };
 
 static const char * const iso8859_3locales[] = {
-    "eo", 0 };
+    "eo", nullptr };
 
 static const char * const iso8859_4locales[] = {
-    "ee", "ee_EE", 0 };
+    "ee", "ee_EE", nullptr };
 
 static const char * const iso8859_5locales[] = {
-    "mk", "mk_MK", "sp", "sp_YU", 0 };
+    "mk", "mk_MK", "sp", "sp_YU", nullptr };
 
 static const char * const cp_1251locales[] = {
-    "be", "be_BY", "bg", "bg_BG", "bulgarian", 0 };
+    "be", "be_BY", "bg", "bg_BG", "bulgarian", nullptr };
 
 static const char * const pt_154locales[] = {
-    "ba_RU", "ky", "ky_KG", "kk", "kk_KZ", 0 };
+    "ba_RU", "ky", "ky_KG", "kk", "kk_KZ", nullptr };
 
 static const char * const iso8859_6locales[] = {
-    "ar_AA", "ar_SA", "arabic", 0 };
+    "ar_AA", "ar_SA", "arabic", nullptr };
 
 static const char * const iso8859_7locales[] = {
-    "el", "el_GR", "greek", 0 };
+    "el", "el_GR", "greek", nullptr };
 
 static const char * const iso8859_8locales[] = {
-    "hebrew", "he", "he_IL", "iw", "iw_IL", 0 };
+    "hebrew", "he", "he_IL", "iw", "iw_IL", nullptr };
 
 static const char * const iso8859_9locales[] = {
-    "tr", "tr_TR", "turkish", 0 };
+    "tr", "tr_TR", "turkish", nullptr };
 
 static const char * const iso8859_13locales[] = {
-    "lt", "lt_LT", "lv", "lv_LV", 0 };
+    "lt", "lt_LT", "lv", "lv_LV", nullptr };
 
 static const char * const iso8859_15locales[] = {
     "et", "et_EE",
@@ -749,23 +749,23 @@ static const char * const iso8859_15locales[] = {
     "es", "es_ES", "eu_ES", "fi", "fi_FI", "finnish", "fr", "fr_FR",
     "fr_BE", "fr_LU", "french", "ga_IE", "gl_ES", "it", "it_IT", "oc_FR",
     "nl", "nl_BE", "nl_NL", "pt", "pt_PT", "sv_FI", "wa_BE",
-    0 };
+    nullptr };
 
 static const char * const koi8_ulocales[] = {
-    "uk", "uk_UA", "ru_UA", "ukrainian", 0 };
+    "uk", "uk_UA", "ru_UA", "ukrainian", nullptr };
 
 static const char * const tis_620locales[] = {
-    "th", "th_TH", "thai", 0 };
+    "th", "th_TH", "thai", nullptr };
 
 static const char * const tcvnlocales[] = {
-    "vi", "vi_VN", 0 };
+    "vi", "vi_VN", nullptr };
 
 static bool try_locale_list( const char * const locale[], const char * lang )
 {
     int i;
     for( i=0; locale[i] && *locale[i] && strcmp(locale[i], lang); i++ )
 	;
-    return locale[i] != 0;
+    return locale[i];
 }
 
 // For the probably_koi8_locales we have to look. the standard says
@@ -780,10 +780,10 @@ static bool try_locale_list( const char * const locale[], const char * lang )
 // ru_RU.KOI8-R.
 
 static const char * const probably_koi8_rlocales[] = {
-    "ru", "ru_SU", "ru_RU", "russian", 0 };
+    "ru", "ru_SU", "ru_RU", "russian", nullptr };
 
 static TQTextCodec * ru_RU_hack( const char * i ) {
-    TQTextCodec * ru_RU_codec = 0;
+    TQTextCodec * ru_RU_codec = nullptr;
 
     TQCString origlocale = setlocale( LC_CTYPE, i );
     // unicode   koi8r   latin5   name
@@ -854,11 +854,11 @@ TQTextCodec* TQTextCodec::codecForName( const char* name, int accuracy )
     }
 
     if ( !name || !*name )
-	return 0;
+	return nullptr;
 
     setup();
     TQValueList<TQTextCodec*>::ConstIterator i;
-    TQTextCodec* result = 0;
+    TQTextCodec* result = nullptr;
     int best = accuracy;
     TQTextCodec* cursor;
     for ( i = all->begin(); i != all->end(); ++i ) {
@@ -901,7 +901,7 @@ TQTextCodec* TQTextCodec::codecForContent(const char* chars, int len)
 
     setup();
     TQValueList<TQTextCodec*>::ConstIterator i;
-    TQTextCodec* result = 0;
+    TQTextCodec* result = nullptr;
     int best=0;
     TQTextCodec* cursor;
     for ( i = all->begin(); i != all->end(); ++i ) {
@@ -1020,7 +1020,7 @@ TQTextEncoder* TQTextCodec::makeEncoder() const
 */
 TQString TQTextCodec::toUnicode(const char* chars, int len) const
 {
-    if ( chars == 0 )
+    if ( !chars )
 	return TQString::null;
     TQTextDecoder* i = makeDecoder();
     TQString result = i->toUnicode(chars,len);
@@ -1247,7 +1247,7 @@ TQTextDecoder::~TQTextDecoder()
 struct TQMultiByteUnicodeTable {
     // If multiByte, ignore unicode and index into multiByte
     //  with the next character.
-    TQMultiByteUnicodeTable() : unicode(0xfffd), multiByte(0) { }
+    TQMultiByteUnicodeTable() : unicode(0xfffd), multiByte(nullptr) { }
 
     ~TQMultiByteUnicodeTable()
     {
@@ -1305,10 +1305,10 @@ class TQTextCodecFromIOD : public TQTextCodec {
 public:
     TQTextCodecFromIOD(TQIODevice* iod)
     {
-	from_unicode_page = 0;
-	to_unicode_multiByte = 0;
-	to_unicode = 0;
-	from_unicode_page_multiByte = 0;
+	from_unicode_page = nullptr;
+	to_unicode_multiByte = nullptr;
+	to_unicode = nullptr;
+	from_unicode_page_multiByte = nullptr;
 	max_bytes_per_char = 1;
 
 	const int maxlen=100;
@@ -1329,7 +1329,7 @@ public:
 		if (!from_unicode_page) {
 		    from_unicode_page = new char*[256];
 		    for (int i=0; i<256; i++)
-			from_unicode_page[i]=0;
+			from_unicode_page[i]=nullptr;
 		}
 		if (!to_unicode) {
 		    to_unicode = new ushort[256];
@@ -1340,7 +1340,7 @@ public:
 	    else if (incmap) {
 		char* cursor = line;
 		int byte=-1,unicode=-1;
-		ushort* mb_unicode=0;
+		ushort* mb_unicode=nullptr;
 		const int maxmb=8; // more -> we'll need to improve datastructures
 		char mb[maxmb+1];
 		int nmb=0;
@@ -1363,10 +1363,10 @@ public:
 				for (int i=0; i<256; i++) {
 				    to_unicode_multiByte[i].unicode =
 					to_unicode[i];
-				    to_unicode_multiByte[i].multiByte = 0;
+				    to_unicode_multiByte[i].multiByte = nullptr;
 				}
 				delete [] to_unicode;
-				to_unicode = 0;
+				to_unicode = nullptr;
 			    }
 			    TQMultiByteUnicodeTable* mbut =
 				to_unicode_multiByte+byte;
@@ -1406,12 +1406,12 @@ public:
 			if (!from_unicode_page_multiByte) {
 			    from_unicode_page_multiByte = new char**[256];
 			    for (int i=0; i<256; i++)
-				from_unicode_page_multiByte[i]=0;
+				from_unicode_page_multiByte[i]=nullptr;
 			}
 			if (!from_unicode_page_multiByte[ch.row()]) {
 			    from_unicode_page_multiByte[ch.row()] = new char*[256];
 			    for (int i=0; i<256; i++)
-				from_unicode_page_multiByte[ch.row()][i] = 0;
+				from_unicode_page_multiByte[ch.row()][i] = nullptr;
 			}
 			mb[nmb++] = 0;
 			from_unicode_page_multiByte[ch.row()][ch.cell()]
@@ -1529,7 +1529,7 @@ public:
 	int rlen = lenInOut*max_bytes_per_char;
 	TQCString rstr(rlen+1);
 	char* cursor = rstr.data();
-	char* s=0;
+	char* s=nullptr;
 	int l = lenInOut;
 	int lout = 0;
 	for (int i=0; i<l; i++) {
@@ -2474,7 +2474,7 @@ private:
 
 TQString TQLatin1Codec::toUnicode(const char* chars, int len) const
 {
-    if ( chars == 0 )
+    if ( !chars )
 	return TQString::null;
 
     return TQString::fromLatin1(chars, len);
@@ -2575,7 +2575,7 @@ private:
 
 TQString TQLatin15Codec::toUnicode(const char* chars, int len) const
 {
-    if ( chars == 0 )
+    if ( !chars )
 	return TQString::null;
 
     TQString str = TQString::fromLatin1(chars, len);
@@ -2761,7 +2761,7 @@ static void setupLocaleMapper()
 	// First part is getting that locale name.  First try setlocale() which
 	// definitely knows it, but since we cannot fully trust it, get ready
 	// to fall back to environment variables.
-	char * ctype = tqstrdup( setlocale( LC_CTYPE, 0 ) );
+	char * ctype = tqstrdup( setlocale( LC_CTYPE, nullptr ) );
 
 	// Get the first nonempty value from $LC_ALL, $LC_CTYPE, and $LANG
 	// environment variables.
@@ -2785,12 +2785,12 @@ static void setupLocaleMapper()
 	// 7. guess locale from lang
 
 	// 1. CODESET from ctype if it contains a .CODESET part (e.g. en_US.ISO8859-15)
-	char * codeset = ctype ? strchr( ctype, '.' ) : 0;
+	char * codeset = ctype ? strchr( ctype, '.' ) : nullptr;
 	if ( codeset && *codeset == '.' )
 	    localeMapper = checkForCodec( codeset + 1 );
 
 	// 2. CODESET from lang if it contains a .CODESET part
-	codeset = lang ? strchr( lang, '.' ) : 0;
+	codeset = lang ? strchr( lang, '.' ) : nullptr;
 	if ( !localeMapper && codeset && *codeset == '.' ) 
 	    localeMapper = checkForCodec( codeset + 1 );
 
@@ -3093,8 +3093,8 @@ void TQTextCodec::fromUnicodeInternal( const TQChar *in, unsigned short *out, in
 */
 
 
-TQTextCodec *TQTextCodec::cftr = 0;
-TQTextCodec *TQTextCodec::cfcs = 0;
+TQTextCodec *TQTextCodec::cftr = nullptr;
+TQTextCodec *TQTextCodec::cfcs = nullptr;
 
 
 #endif // TQT_NO_TEXTCODEC
diff --git a/src/codecs/tqtextcodecfactory.cpp b/src/codecs/tqtextcodecfactory.cpp
index 476eaec5b..951c66085 100644
--- a/src/codecs/tqtextcodecfactory.cpp
+++ b/src/codecs/tqtextcodecfactory.cpp
@@ -55,7 +55,7 @@
 #include <stdlib.h>
 
 
-static TQPluginManager<TQTextCodecFactoryInterface> *manager = 0;
+static TQPluginManager<TQTextCodecFactoryInterface> *manager = nullptr;
 static TQSingleCleanupHandler< TQPluginManager<TQTextCodecFactoryInterface> > cleanup_manager;
 
 static void create_manager()
@@ -66,7 +66,7 @@ static void create_manager()
 #ifdef TQT_THREAD_SUPPORT
     // protect manager creation
     TQMutexLocker locker( tqt_global_mutexpool ?
-			 tqt_global_mutexpool->get( &manager ) : 0);
+			 tqt_global_mutexpool->get( &manager ) : nullptr);
 
     // we check the manager pointer again to make sure that another thread
     // has not created the manager before us.
@@ -88,7 +88,7 @@ static void create_manager()
 
 TQTextCodec *TQTextCodecFactory::createForName(const TQString &name)
 {
-    TQTextCodec *codec = 0;
+    TQTextCodec *codec = nullptr;
 
 #ifndef TQT_NO_COMPONENT
 
@@ -109,7 +109,7 @@ TQTextCodec *TQTextCodecFactory::createForName(const TQString &name)
 
 TQTextCodec *TQTextCodecFactory::createForMib(int mib)
 {
-    TQTextCodec *codec = 0;
+    TQTextCodec *codec = nullptr;
 
 #ifndef TQT_NO_COMPONENT
 
diff --git a/src/codecs/tqtextcodecplugin.cpp b/src/codecs/tqtextcodecplugin.cpp
index 046b009f7..1b6450983 100644
--- a/src/codecs/tqtextcodecplugin.cpp
+++ b/src/codecs/tqtextcodecplugin.cpp
@@ -129,7 +129,7 @@ TQTextCodecPluginPrivate::~TQTextCodecPluginPrivate()
 
 TQRESULT TQTextCodecPluginPrivate::queryInterface( const TQUuid &iid, TQUnknownInterface **iface )
 {
-    *iface = 0;
+    *iface = nullptr;
 
     if ( iid == IID_QUnknown )
 	*iface = this;
diff --git a/src/dialogs/tqcolordialog.cpp b/src/dialogs/tqcolordialog.cpp
index a80b63bc1..643568b27 100644
--- a/src/dialogs/tqcolordialog.cpp
+++ b/src/dialogs/tqcolordialog.cpp
@@ -78,7 +78,7 @@ class TQWellArray : public TQGridView
     TQ_PROPERTY( int selectedRow READ selectedRow )
 
 public:
-    TQWellArray( TQWidget* parent=0, const char* name=0, bool popup = false );
+    TQWellArray( TQWidget* parent=nullptr, const char* name=nullptr, bool popup = false );
 
     ~TQWellArray() {}
     TQString cellContent( int row, int col ) const;
@@ -149,7 +149,7 @@ TQWellArray::TQWellArray( TQWidget *parent, const char * name, bool popup )
     : TQGridView( parent, name,
 		 (popup ? (WStyle_Customize|WStyle_Tool|WStyle_NoBorder) : 0 ) )
 {
-    d = 0;
+    d = nullptr;
     setFocusPolicy( StrongFocus );
     setVScrollBarMode(AlwaysOff);
     setHScrollBarMode(AlwaysOff);
@@ -351,7 +351,7 @@ void TQWellArray::dimensionChange( int, int )
 	if ( d->brush )
 	    delete[] d->brush;
 	delete d;
-	d = 0;
+	d = nullptr;
     }
 }
 
@@ -634,7 +634,7 @@ class TQColorPicker : public TQFrame
 {
     TQ_OBJECT
 public:
-    TQColorPicker(TQWidget* parent=0, const char* name=0);
+    TQColorPicker(TQWidget* parent=nullptr, const char* name=nullptr);
     ~TQColorPicker();
 
 public slots:
@@ -668,7 +668,7 @@ class TQColorLuminancePicker : public TQWidget
 {
     TQ_OBJECT
 public:
-    TQColorLuminancePicker(TQWidget* parent=0, const char* name=0);
+    TQColorLuminancePicker(TQWidget* parent=nullptr, const char* name=nullptr);
     ~TQColorLuminancePicker();
 
 public slots:
@@ -714,7 +714,7 @@ TQColorLuminancePicker::TQColorLuminancePicker(TQWidget* parent,
     :TQWidget( parent, name )
 {
     hue = 100; val = 100; sat = 100;
-    pix = 0;
+    pix = nullptr;
     //    setBackgroundMode( NoBackground );
 }
 
@@ -737,7 +737,7 @@ void TQColorLuminancePicker::setVal( int v )
     if ( val == v )
 	return;
     val = TQMAX( 0, TQMIN(v,255));
-    delete pix; pix=0;
+    delete pix; pix=nullptr;
     repaint( false ); //###
     emit newHsv( hue, sat, val );
 }
@@ -788,7 +788,7 @@ void TQColorLuminancePicker::setCol( int h, int s , int v )
     val = v;
     hue = h;
     sat = s;
-    delete pix; pix=0;
+    delete pix; pix=nullptr;
     repaint( false );//####
 }
 
@@ -880,7 +880,7 @@ class TQColIntValidator: public TQIntValidator
 {
 public:
     TQColIntValidator( int bottom, int top,
-		   TQWidget * parent, const char *name = 0 )
+		   TQWidget * parent, const char *name = nullptr )
 	:TQIntValidator( bottom, top, parent, name ) {}
 
     TQValidator::State validate( TQString &, int & ) const;
@@ -909,7 +909,7 @@ TQValidator::State TQColIntValidator::validate( TQString &s, int &pos ) const
 class TQColNumLineEdit : public TQLineEdit
 {
 public:
-    TQColNumLineEdit( TQWidget *parent, const char* name=0 )
+    TQColNumLineEdit( TQWidget *parent, const char* name=nullptr )
 	: TQLineEdit( parent, name ) { setMaxLength( 3 );}
     TQSize sizeHint() const {
 	return TQSize( fontMetrics().width( "999" ) + 2 * ( margin() + frameWidth() ),
@@ -930,7 +930,7 @@ class TQColorShower : public TQWidget
 {
     TQ_OBJECT
 public:
-    TQColorShower( TQWidget *parent, const char *name=0 );
+    TQColorShower( TQWidget *parent, const char *name=nullptr );
 
     //things that don't emit signals
     void setHsv( int h, int s, int v );
@@ -1312,7 +1312,7 @@ TQColorDialogPrivate::TQColorDialogPrivate( TQColorDialog *dialog ) :
     if ( compact )
 	border = 6;
     TQHBoxLayout *topLay = new TQHBoxLayout( dialog, border, 6 );
-    TQVBoxLayout *leftLay = 0;
+    TQVBoxLayout *leftLay = nullptr;
 
     if ( !compact )
 	leftLay = new TQVBoxLayout( topLay );
@@ -1352,8 +1352,8 @@ TQColorDialogPrivate::TQColorDialogPrivate( TQColorDialog *dialog ) :
 	pWidth = 150;
 	pHeight = 100;
 
-        custom = 0;
-        standard = 0;
+        custom = nullptr;
+        standard = nullptr;
     }
 
     TQVBoxLayout *rightLay = new TQVBoxLayout( topLay );
diff --git a/src/dialogs/tqcolordialog.h b/src/dialogs/tqcolordialog.h
index 93b6daf19..a51f16455 100644
--- a/src/dialogs/tqcolordialog.h
+++ b/src/dialogs/tqcolordialog.h
@@ -54,9 +54,9 @@ class TQ_EXPORT TQColorDialog : public TQDialog
     TQ_OBJECT
 
 public:
-    static TQColor getColor( const TQColor& init = white, TQWidget* parent=0, const char* name=0 );
-    static TQRgb getRgba( TQRgb, bool* ok = 0,
-			 TQWidget* parent=0, const char* name=0 );
+    static TQColor getColor( const TQColor& init = white, TQWidget* parent=nullptr, const char* name=nullptr );
+    static TQRgb getRgba( TQRgb, bool* ok = nullptr,
+			 TQWidget* parent=nullptr, const char* name=nullptr );
 
     static int customCount();
     static TQRgb customColor( int );
@@ -65,7 +65,7 @@ public:
 
 private:
     ~TQColorDialog();
-    TQColorDialog( TQWidget* parent=0, const char* name=0, bool modal=false );
+    TQColorDialog( TQWidget* parent=nullptr, const char* name=nullptr, bool modal=false );
 
     void setColor( const TQColor& );
     TQColor color() const;
diff --git a/src/dialogs/tqdialog.cpp b/src/dialogs/tqdialog.cpp
index c9d83006b..462bc6f67 100644
--- a/src/dialogs/tqdialog.cpp
+++ b/src/dialogs/tqdialog.cpp
@@ -214,9 +214,9 @@ class TQDialogPrivate : public TQt
 public:
 
     TQDialogPrivate()
-	: mainDef(0), orientation(Horizontal),extension(0), doShowExtension(false)
+	: mainDef(nullptr), orientation(Horizontal),extension(nullptr), doShowExtension(false)
 #ifndef TQT_NO_SIZEGRIP
-	,resizer(0)
+	,resizer(nullptr)
 #endif
 	{
     }
@@ -314,7 +314,7 @@ void TQDialog::setDefault( TQPushButton *pushButton )
 void TQDialog::setMainDefault( TQPushButton *pushButton )
 {
 #ifndef TQT_NO_PUSHBUTTON
-    d->mainDef = 0;
+    d->mainDef = nullptr;
     setDefault(pushButton);
 #endif
 }
@@ -483,7 +483,7 @@ void TQDialog::done( int r )
 	    widget = list->next();
 	}
 	delete list;
-	if ( widget == 0 )
+	if ( !widget )
 	    emit tqApp->lastWindowClosed();
     }
     if ( isMain )
@@ -540,7 +540,7 @@ void TQDialog::contextMenuEvent( TQContextMenuEvent *e )
 	    w = w->parentWidget(true);
     }
     if ( !s.isEmpty() ) {
-	TQPopupMenu p(0,"qt_whats_this_menu");
+	TQPopupMenu p(nullptr,"qt_whats_this_menu");
 	p.insertItem( tr("What's This?"), 42 );
 	if ( p.exec( e->globalPos() ) >= 42 )
 	    TQWhatsThis::display( s, w->mapToGlobal( w->rect().center() ), w );
@@ -819,7 +819,7 @@ void TQDialog::adjustPositionInternal( TQWidget*w, bool useRelPos)
     TQWidgetList  *list = TQApplication::topLevelWidgets();
     TQWidgetListIt it( *list );
     while ( (extraw == 0 || extrah == 0) &&
-	    it.current() != 0 ) {
+	    it.current() ) {
 	int framew, frameh;
 	TQWidget * current = it.current();
 	++it;
@@ -1156,7 +1156,7 @@ void TQDialog::setSizeGripEnabled(bool enabled)
 	    d->resizer->show();
 	} else {
 	    delete d->resizer;
-	    d->resizer = 0;
+	    d->resizer = nullptr;
 	}
     }
 #endif //TQT_NO_SIZEGRIP
diff --git a/src/dialogs/tqdialog.h b/src/dialogs/tqdialog.h
index 35bd0e40c..9e046d9f5 100644
--- a/src/dialogs/tqdialog.h
+++ b/src/dialogs/tqdialog.h
@@ -60,7 +60,7 @@ friend class TQPushButton;
     TQ_PROPERTY( bool modal READ isModal WRITE setModal )
 
 public:
-    explicit TQDialog( TQWidget* parent=0, const char* name=0, bool modal=false,
+    explicit TQDialog( TQWidget* parent=nullptr, const char* name=nullptr, bool modal=false,
 	     WFlags f=0 );
     ~TQDialog();
 
diff --git a/src/dialogs/tqerrormessage.cpp b/src/dialogs/tqerrormessage.cpp
index e8431a345..f40971bd6 100644
--- a/src/dialogs/tqerrormessage.cpp
+++ b/src/dialogs/tqerrormessage.cpp
@@ -107,13 +107,13 @@ after seeing each message.
 \sa TQMessageBox TQStatusBar::message()
 */
 
-static TQErrorMessage * qtMessageHandler = 0;
+static TQErrorMessage * qtMessageHandler = nullptr;
 
 static void deleteStaticcTQErrorMessage() // post-routine
 {
     if ( qtMessageHandler ) {
 	delete qtMessageHandler;
-	qtMessageHandler = 0;
+	qtMessageHandler = nullptr;
     }
 }
 
@@ -188,8 +188,8 @@ the list of "do not show again" messages is deleted. */
 TQErrorMessage::~TQErrorMessage()
 {
     if ( this == qtMessageHandler ) {
-	qtMessageHandler = 0;
-	TQtMsgHandler tmp = qInstallMsgHandler( 0 );
+	qtMessageHandler = nullptr;
+	TQtMsgHandler tmp = qInstallMsgHandler( nullptr );
 	// in case someone else has later stuck in another...
 	if ( tmp != jump )
 	    qInstallMsgHandler( tmp );
@@ -223,7 +223,7 @@ isn't one already.
 TQErrorMessage * TQErrorMessage::qtHandler()
 {
     if ( !qtMessageHandler ) {
-	qtMessageHandler = new TQErrorMessage( 0, "automatic message handler" );
+	qtMessageHandler = new TQErrorMessage( nullptr, "automatic message handler" );
 	tqAddPostRoutine( deleteStaticcTQErrorMessage ); // clean up
 #ifndef TQT_NO_WIDGET_TOPEXTRA
 	if ( tqApp->mainWidget() )
diff --git a/src/dialogs/tqerrormessage.h b/src/dialogs/tqerrormessage.h
index 21e12a488..35002469f 100644
--- a/src/dialogs/tqerrormessage.h
+++ b/src/dialogs/tqerrormessage.h
@@ -57,7 +57,7 @@ template<class type> class TQDict;
 class TQ_EXPORT TQErrorMessage: public TQDialog {
     TQ_OBJECT
 public:
-    TQErrorMessage( TQWidget* parent, const char* name=0 );
+    TQErrorMessage( TQWidget* parent, const char* name=nullptr );
     ~TQErrorMessage();
 
     static TQErrorMessage * qtHandler();
diff --git a/src/dialogs/tqfiledialog.cpp b/src/dialogs/tqfiledialog.cpp
index 1257640c5..61605920c 100644
--- a/src/dialogs/tqfiledialog.cpp
+++ b/src/dialogs/tqfiledialog.cpp
@@ -453,25 +453,25 @@ static const char * const back_xpm [] = {
     "....##.......",
     ".....#......."};
 
-static TQPixmap * openFolderIcon = 0;
-static TQPixmap * closedFolderIcon = 0;
-static TQPixmap * detailViewIcon = 0;
-static TQPixmap * multiColumnListViewIcon = 0;
-static TQPixmap * cdToParentIcon = 0;
-static TQPixmap * newFolderIcon = 0;
-static TQPixmap * fifteenTransparentPixels = 0;
-static TQPixmap * symLinkDirIcon = 0;
-static TQPixmap * symLinkFileIcon = 0;
-static TQPixmap * fileIcon = 0;
-static TQPixmap * startCopyIcon = 0;
-static TQPixmap * endCopyIcon = 0;
-static TQPixmap * previewContentsViewIcon = 0;
-static TQPixmap * previewInfoViewIcon = 0;
-static TQPixmap *goBackIcon = 0;
-static TQFileIconProvider * fileIconProvider = 0;
+static TQPixmap * openFolderIcon = nullptr;
+static TQPixmap * closedFolderIcon = nullptr;
+static TQPixmap * detailViewIcon = nullptr;
+static TQPixmap * multiColumnListViewIcon = nullptr;
+static TQPixmap * cdToParentIcon = nullptr;
+static TQPixmap * newFolderIcon = nullptr;
+static TQPixmap * fifteenTransparentPixels = nullptr;
+static TQPixmap * symLinkDirIcon = nullptr;
+static TQPixmap * symLinkFileIcon = nullptr;
+static TQPixmap * fileIcon = nullptr;
+static TQPixmap * startCopyIcon = nullptr;
+static TQPixmap * endCopyIcon = nullptr;
+static TQPixmap * previewContentsViewIcon = nullptr;
+static TQPixmap * previewInfoViewIcon = nullptr;
+static TQPixmap *goBackIcon = nullptr;
+static TQFileIconProvider * fileIconProvider = nullptr;
 static int lastWidth = 0;
 static int lastHeight = 0;
-static TQString * workingDirectory = 0;
+static TQString * workingDirectory = nullptr;
 
 static bool bShowHiddenFiles = false;
 static int sortFilesBy = (int)TQDir::Name;
@@ -558,7 +558,7 @@ static void resolveLibs()
 class TQWindowsIconProvider : public TQFileIconProvider
 {
 public:
-    TQWindowsIconProvider( TQObject *parent=0, const char *name=0 );
+    TQWindowsIconProvider( TQObject *parent=nullptr, const char *name=nullptr );
     ~TQWindowsIconProvider();
 
     const TQPixmap * pixmap( const TQFileInfo &fi );
@@ -962,15 +962,15 @@ public:
     struct File: public TQListViewItem {
 	File( TQFileDialogPrivate * dlgp,
 	      const TQUrlInfo * fi, TQListViewItem * parent )
-	    : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( false )
+	    : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( nullptr ), hasMimePixmap( false )
 	{ setup(); dlgp->last = this; }
 	File( TQFileDialogPrivate * dlgp,
 	      const TQUrlInfo * fi, TQListView * parent )
-	    : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( false )
+	    : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( nullptr ), hasMimePixmap( false )
 	{ setup(); dlgp->last = this; }
 	File( TQFileDialogPrivate * dlgp,
 	      const TQUrlInfo * fi, TQListView * parent, TQListViewItem * after )
-	    : TQListViewItem( parent, after ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( false )
+	    : TQListViewItem( parent, after ), info( *fi ), d(dlgp), i( nullptr ), hasMimePixmap( false )
 	{ setup(); if ( !nextSibling() ) dlgp->last = this; }
 	~File();
 
@@ -1179,7 +1179,7 @@ void TQRenameEdit::slotReturnPressed()
 
 TQFileListBox::TQFileListBox( TQWidget *parent, TQFileDialog *dlg )
     : TQListBox( parent, "filelistbox" ), filedialog( dlg ),
-      renaming( false ), renameItem( 0 ), mousePressed( false ),
+      renaming( false ), renameItem( nullptr ), mousePressed( false ),
       firstMousePressEvent( true )
 {
     changeDirTimer = new TQTimer( this );
@@ -1201,7 +1201,7 @@ TQFileListBox::TQFileListBox( TQWidget *parent, TQFileDialog *dlg )
     connect( this, TQ_SIGNAL( contentsMoving(int,int) ),
 	     this, TQ_SLOT( contentsMoved(int,int) ) );
     viewport()->setAcceptDrops( true );
-    dragItem = 0;
+    dragItem = nullptr;
 }
 
 void TQFileListBox::show()
@@ -1222,7 +1222,7 @@ void TQFileListBox::keyPressEvent( TQKeyEvent *e )
     TQChar keyChar = keyPressed[0];
     bool handled = false;
     if ( keyChar.isLetterOrNumber() ) {
-	TQListBoxItem * i = 0;
+	TQListBoxItem * i = nullptr;
 	if ( currentItem() )
 	    i = item( currentItem() );
 	else
@@ -1296,7 +1296,7 @@ void TQFileListBox::viewportMousePressEvent( TQMouseEvent *e )
 
 void TQFileListBox::viewportMouseReleaseEvent( TQMouseEvent *e )
 {
-    dragItem = 0;
+    dragItem = nullptr;
     TQListBox::viewportMouseReleaseEvent( e );
     mousePressed = false;
 }
@@ -1315,7 +1315,7 @@ void TQFileListBox::viewportMouseMoveEvent( TQMouseEvent *e )
 #ifndef TQT_NO_DRAGANDDROP
     if (  ( pressPos - e->pos() ).manhattanLength() > TQApplication::startDragDistance() && mousePressed ) {
 	TQListBoxItem *item = dragItem;
-	dragItem = 0;
+	dragItem = nullptr;
 	if ( item ) {
 	    if ( !itemRect( item ).contains( e->pos() ) )
 		return;
@@ -1357,7 +1357,7 @@ void TQFileListBox::viewportDragEnterEvent( TQDragEnterEvent *e )
 {
     startDragUrl = filedialog->d->url;
     startDragDir = filedialog->dirPath();
-    currDropItem = 0;
+    currDropItem = nullptr;
 
     if ( !TQUriDrag::canDecode( e ) ) {
 	e->ignore();
@@ -1454,7 +1454,7 @@ void TQFileListBox::viewportDropEvent( TQDropEvent *e )
 
     // ##### what is supportAction for?
     e->acceptAction();
-    currDropItem = 0;
+    currDropItem = nullptr;
 }
 
 bool TQFileListBox::acceptDrop( const TQPoint &pnt, TQWidget *source )
@@ -1477,13 +1477,13 @@ void TQFileListBox::setCurrentDropItem( const TQPoint &pnt )
 {
     changeDirTimer->stop();
 
-    TQListBoxItem *item = 0;
+    TQListBoxItem *item = nullptr;
     if ( pnt != TQPoint( -1, -1 ) )
 	item = itemAt( pnt );
     if ( item && !TQUrlInfo( filedialog->d->url, item->text() ).isDir() )
-	item = 0;
+	item = nullptr;
     if ( item && !itemRect( item ).contains( pnt ) )
-	item = 0;
+	item = nullptr;
 
     currDropItem = item;
     if ( currDropItem )
@@ -1500,7 +1500,7 @@ void TQFileListBox::changeDirDuringDrag()
     changeDirTimer->stop();
     TQUrl u( filedialog->d->url, TQFileDialogPrivate::encodeFileName(currDropItem->text()) );
     filedialog->setDir( u );
-    currDropItem = 0;
+    currDropItem = nullptr;
 #endif
 }
 
@@ -1555,7 +1555,7 @@ void TQFileListBox::rename()
 
 void TQFileListBox::cancelRename()
 {
-    renameItem = 0;
+    renameItem = nullptr;
     lined->parentWidget()->hide();
     viewport()->setFocusProxy( this );
     renaming = false;
@@ -1579,7 +1579,7 @@ void TQFileListBox::contentsMoved( int, int )
  ************************************************************************/
 
 TQFileDialogTQFileListView::TQFileDialogTQFileListView( TQWidget *parent, TQFileDialog *dlg )
-    : TQListView( parent, "qt_filedlg_listview" ), renaming( false ), renameItem( 0 ),
+    : TQListView( parent, "qt_filedlg_listview" ), renaming( false ), renameItem( nullptr ),
     filedialog( dlg ), mousePressed( false ),
     firstMousePressEvent( true )
 {
@@ -1610,7 +1610,7 @@ TQFileDialogTQFileListView::TQFileDialogTQFileListView( TQWidget *parent, TQFile
     viewport()->setAcceptDrops( true );
     sortcolumn = 0;
     ascending = true;
-    dragItem = 0;
+    dragItem = nullptr;
 }
 
 void TQFileDialogTQFileListView::setSorting( int column, bool increasing )
@@ -1656,7 +1656,7 @@ void TQFileDialogTQFileListView::keyPressEvent( TQKeyEvent *e )
     TQString keyPressed = e->text().lower();
     TQChar keyChar = keyPressed[0];
     if ( keyChar.isLetterOrNumber() ) {
-	TQListViewItem * i = 0;
+	TQListViewItem * i = nullptr;
 	if ( currentItem() )
 	i = currentItem();
 	else
@@ -1734,7 +1734,7 @@ void TQFileDialogTQFileListView::viewportMouseReleaseEvent( TQMouseEvent *e )
 {
     TQListView::viewportMouseReleaseEvent( e );
     mousePressed = false;
-    dragItem = 0;
+    dragItem = nullptr;
 }
 
 void TQFileDialogTQFileListView::viewportMouseMoveEvent( TQMouseEvent *e )
@@ -1745,7 +1745,7 @@ void TQFileDialogTQFileListView::viewportMouseMoveEvent( TQMouseEvent *e )
 #ifndef TQT_NO_DRAGANDDROP
     if (  ( pressPos - e->pos() ).manhattanLength() > TQApplication::startDragDistance() && mousePressed ) {
 	TQListViewItem *item = dragItem;
-	dragItem = 0;
+	dragItem = nullptr;
 	if ( item ) {
 	    TQUriDrag* drag = new TQUriDrag( viewport() );
 	    TQStringList files;
@@ -1781,7 +1781,7 @@ void TQFileDialogTQFileListView::viewportDragEnterEvent( TQDragEnterEvent *e )
 {
     startDragUrl = filedialog->d->url;
     startDragDir = filedialog->dirPath();
-    currDropItem = 0;
+    currDropItem = nullptr;
 
     if ( !TQUriDrag::canDecode( e ) ) {
 	e->ignore();
@@ -1873,7 +1873,7 @@ void TQFileDialogTQFileListView::viewportDropEvent( TQDropEvent *e )
 
     // ##### what is supportAction for?
     e->acceptAction();
-    currDropItem = 0;
+    currDropItem = nullptr;
 }
 
 bool TQFileDialogTQFileListView::acceptDrop( const TQPoint &pnt, TQWidget *source )
@@ -1898,12 +1898,12 @@ void TQFileDialogTQFileListView::setCurrentDropItem( const TQPoint &pnt )
 
     TQListViewItem *item = itemAt( pnt );
     if ( pnt == TQPoint( -1, -1 ) )
-	item = 0;
+	item = nullptr;
     if ( item && !TQUrlInfo( filedialog->d->url, item->text( 0 ) ).isDir() )
-	item = 0;
+	item = nullptr;
 
     if ( item && !itemRect( item ).contains( pnt ) )
-	item = 0;
+	item = nullptr;
 
     currDropItem = item;
 
@@ -1922,7 +1922,7 @@ void TQFileDialogTQFileListView::changeDirDuringDrag()
     changeDirTimer->stop();
     TQUrl u( filedialog->d->url, TQFileDialogPrivate::encodeFileName(currDropItem->text( 0 ) ) );
     filedialog->setDir( u );
-    currDropItem = 0;
+    currDropItem = nullptr;
 #endif // TQT_NO_DRAGANDDROP
 }
 
@@ -1979,7 +1979,7 @@ void TQFileDialogTQFileListView::rename()
 
 void TQFileDialogTQFileListView::cancelRename()
 {
-    renameItem = 0;
+    renameItem = nullptr;
     lined->parentWidget()->hide();
     viewport()->setFocusProxy( this );
     renaming = false;
@@ -2059,7 +2059,7 @@ TQString TQFileDialogPrivate::File::text( int column ) const
 const TQPixmap * TQFileDialogPrivate::File::pixmap( int column ) const
 {
     if ( column ) {
-	return 0;
+	return nullptr;
     } else if ( TQListViewItem::pixmap( column ) ) {
 	return TQListViewItem::pixmap( column );
     } else if ( info.isSymLink() ) {
@@ -2466,14 +2466,14 @@ void TQFileDialog::init()
     setSizeGripEnabled( true );
     d = new TQFileDialogPrivate();
     d->mode = AnyFile;
-    d->last = 0;
-    d->lastEFSelected = 0;
-    d->moreFiles = 0;
+    d->last = nullptr;
+    d->lastEFSelected = nullptr;
+    d->moreFiles = nullptr;
     d->infoPreview = false;
     d->contentsPreview = false;
     d->hadDotDot = false;
     d->ignoreNextKeyPress = false;
-    d->progressDia = 0;
+    d->progressDia = nullptr;
     d->checkForFilter = false;
     d->ignoreNextRefresh = false;
     d->ignoreStop = false;
@@ -2488,7 +2488,7 @@ void TQFileDialog::init()
 
     d->url = TQUrlOperator( ::toRootIfNotExists( TQDir::currentDirPath() ) );
     d->oldUrl = d->url;
-    d->currListChildren = 0;
+    d->currListChildren = nullptr;
 
     connect( &d->url, TQ_SIGNAL( start(TQNetworkOperation*) ),
 	     this, TQ_SLOT( urlStart(TQNetworkOperation*) ) );
@@ -2574,7 +2574,7 @@ void TQFileDialog::init()
     TQFileInfo *fi;
     makeVariables();
 
-    while ( (fi = it.current()) != 0 ) {
+    while ( (fi = it.current()) ) {
 	++it;
 	d->paths->insertItem( *openFolderIcon, fi->absFilePath() );
     }
@@ -2633,7 +2633,7 @@ void TQFileDialog::init()
     connect( d->newFolder, TQ_SIGNAL(clicked()),
 	     this, TQ_SLOT(newFolderClicked()) );
 
-    d->modeButtons = new TQButtonGroup( 0, "invisible group" );
+    d->modeButtons = new TQButtonGroup( nullptr, "invisible group" );
     connect( d->modeButtons, TQ_SIGNAL(destroyed()),
 	     this, TQ_SLOT(modeButtonsDestroyed()) );
     d->modeButtons->setExclusive( true );
@@ -2720,7 +2720,7 @@ void TQFileDialog::init()
 
     d->infoPreviewWidget = new TQWidget( d->preview, "qt_preview_info" );
     d->contentsPreviewWidget = new TQWidget( d->preview, "qt_preview_contents" );
-    d->infoPreviewer = d->contentsPreviewer = 0;
+    d->infoPreviewer = d->contentsPreviewer = nullptr;
 
     h = new TQHBoxLayout( 0 );
     d->buttonLayout = h;
@@ -2926,7 +2926,7 @@ TQFileDialog::~TQFileDialog()
 #endif
 
     delete d;
-    d = 0;
+    d = nullptr;
 }
 
 
@@ -3252,7 +3252,7 @@ const TQDir *TQFileDialog::dir() const
     if ( d->url.isLocalFile() )
 	return  new TQDir( d->url.path() );
     else
-	return 0;
+	return nullptr;
 }
 
 /*!
@@ -3940,7 +3940,7 @@ r.setHeight( TQMAX(r.height(),t.height()) )
     d->mcView->setFixedSize( r );
     d->detailView->setFixedSize( r );
 
-    TQButton *b = 0;
+    TQButton *b = nullptr;
     if ( !d->toolButtons.isEmpty() ) {
 	for ( b = d->toolButtons.first(); b; b = d->toolButtons.next() )
 	    b->setFixedSize( b->sizeHint().width(), r.height() );
@@ -4048,7 +4048,7 @@ void TQFileDialog::listBoxSelectionChanged()
     nameEdit->clear();
     TQString str;
     TQListBoxItem * i = d->moreFiles->item( 0 );
-    TQListBoxItem * j = 0;
+    TQListBoxItem * j = nullptr;
     int index = 0;
     files->blockSignals( true );
     while( i ) {
@@ -4075,7 +4075,7 @@ void TQFileDialog::listBoxSelectionChanged()
 	if ( d->moreFiles->isSelected( i )
 	     && !( (TQFileDialogPrivate::File*)(mcitem)->i )->info.isDir() ) {
 	    str += TQString( "\"%1\" " ).arg( i->text() );
-	    if ( j == 0 )
+	    if ( !j )
 		j = i;
 	}
 	i = d->moreFiles->item( ++index );
@@ -4273,7 +4273,7 @@ void TQFileDialog::popupContextMenu( const TQString &filename, bool,
 
     bool glob = filename.isEmpty();
 
-    TQPopupMenu m( 0, "file dialog context menu" );
+    TQPopupMenu m( nullptr, "file dialog context menu" );
     m.setCheckable( true );
 
     if ( !glob ) {
@@ -4312,7 +4312,7 @@ void TQFileDialog::popupContextMenu( const TQString &filename, bool,
     } else {
 	int reload = m.insertItem( tr( "R&eload" ) );
 
-	TQPopupMenu m2( 0, "sort menu" );
+	TQPopupMenu m2( nullptr, "sort menu" );
 
 	int sname = m2.insertItem( tr( "Sort by &Name" ) );
 	//int stype = m2.insertItem( tr( "Sort by &Type" ) );
@@ -4535,7 +4535,7 @@ TQString TQFileDialog::getExistingDirectory( const TQString & dir,
         return winGetExistingDirectory( initialDir, parent, name, caption );
 #endif
 #if defined(TQ_WS_MAC)
-    TQString *initialDir = 0;
+    TQString *initialDir = nullptr;
     if (!dir.isEmpty()) {
         TQUrlOperator u(dir);
         if (TQFileInfo(u.path()).isDir())
@@ -5600,7 +5600,7 @@ void TQFileDialog::addFilter( const TQString &filter )
 void TQFileDialog::modeButtonsDestroyed()
 {
     if ( d )
-	d->modeButtons = 0;
+	d->modeButtons = nullptr;
 }
 
 
@@ -5834,7 +5834,7 @@ void TQFileDialog::urlStart( TQNetworkOperation *op )
 	    d->paths->insertItem( *openFolderIcon, s, -1 );
 	    d->paths->setCurrentItem( d->paths->count() - 1 );
 	}
-	d->last = 0;
+	d->last = nullptr;
 	d->hadDotDot = false;
 
 	if ( d->goBack && d->history.last() != d->url.toString() ) {
@@ -5866,7 +5866,7 @@ void TQFileDialog::urlFinished( TQNetworkOperation *op )
 	    d->ignoreStop = true;
 	    d->progressDia->close();
 	    delete d->progressDia;
-	    d->progressDia = 0;
+	    d->progressDia = nullptr;
 	}
 
 	int ecode = op->errorCode();
@@ -5900,7 +5900,7 @@ void TQFileDialog::urlFinished( TQNetworkOperation *op )
 		ui.setSize( 0 );
 		TQValueList<TQUrlInfo> lst;
 		lst << ui;
-		insertEntry( lst, 0 );
+		insertEntry( lst, nullptr );
 	    }
 	}
 	resortDir();
@@ -5912,7 +5912,7 @@ void TQFileDialog::urlFinished( TQNetworkOperation *op )
 	    d->progressDia->close();
 	}
 	delete d->progressDia;
-	d->progressDia = 0;
+	d->progressDia = nullptr;
     }
 
 #if defined(TQ_WS_WIN)
@@ -6011,8 +6011,8 @@ void TQFileDialog::insertEntry( const TQValueList<TQUrlInfo> &lst, TQNetworkOper
  	}
 #endif
 	if ( !d->url.isLocalFile() ) {
-	    TQFileDialogPrivate::File * i = 0;
-	    TQFileDialogPrivate::MCItem *i2 = 0;
+	    TQFileDialogPrivate::File * i = nullptr;
+	    TQFileDialogPrivate::MCItem *i2 = nullptr;
 	    i = new TQFileDialogPrivate::File( d, &inf, files );
 	    i2 = new TQFileDialogPrivate::MCItem( d->moreFiles, i );
 
@@ -6034,7 +6034,7 @@ void TQFileDialog::removeEntry( TQNetworkOperation *op )
     if ( !op )
 	return;
 
-    TQUrlInfo *i = 0;
+    TQUrlInfo *i = nullptr;
     TQListViewItemIterator it( files );
     bool ok1 = false, ok2 = false;
     for ( i = d->sortedList.first(); it.current(); ++it, i = d->sortedList.next() ) {
@@ -6061,7 +6061,7 @@ void TQFileDialog::itemChanged( TQNetworkOperation *op )
     if ( !op )
 	return;
 
-    TQUrlInfo *i = 0;
+    TQUrlInfo *i = nullptr;
     TQListViewItemIterator it1( files );
     bool ok1 = false, ok2 = false;
     // first check whether the new file replaces an existing file.
@@ -6080,7 +6080,7 @@ void TQFileDialog::itemChanged( TQNetworkOperation *op )
 	    break;
     }
 
-    i = 0;
+    i = nullptr;
     TQListViewItemIterator it( files );
     ok1 = false;
     ok2 = false;
@@ -6280,15 +6280,15 @@ void TQFileDialog::resortDir()
     d->mimeTypeTimer->stop();
     d->pendingItems.clear();
 
-    TQFileDialogPrivate::File *item = 0;
-    TQFileDialogPrivate::MCItem *item2 = 0;
+    TQFileDialogPrivate::File *item = nullptr;
+    TQFileDialogPrivate::MCItem *item2 = nullptr;
 
     d->sortedList.sort();
 
     if ( files->childCount() > 0 || d->moreFiles->count() > 0 ) {
 	d->moreFiles->clear();
 	files->clear();
-	d->last = 0;
+	d->last = nullptr;
 	files->setSorting( -1 );
     }
 
@@ -6340,7 +6340,7 @@ void TQFileDialog::removeProgressDia()
 {
     if ( d->progressDia )
 	delete d->progressDia;
-    d->progressDia = 0;
+    d->progressDia = nullptr;
 }
 
 /*!
diff --git a/src/dialogs/tqfiledialog.h b/src/dialogs/tqfiledialog.h
index 912c9a557..ad2eb6ae2 100644
--- a/src/dialogs/tqfiledialog.h
+++ b/src/dialogs/tqfiledialog.h
@@ -71,7 +71,7 @@ class TQ_EXPORT TQFileIconProvider : public TQObject
 {
     TQ_OBJECT
 public:
-    TQFileIconProvider( TQObject * parent = 0, const char* name = 0 );
+    TQFileIconProvider( TQObject * parent = nullptr, const char* name = nullptr );
     virtual const TQPixmap * pixmap( const TQFileInfo & );
 
 private:	// Disabled copy constructor and operator=
@@ -108,36 +108,36 @@ class TQ_EXPORT TQFileDialog : public TQDialog
 
 public:
     TQFileDialog( const TQString& dirName, const TQString& filter = TQString::null,
-		 TQWidget* parent=0, const char* name=0, bool modal = false );
-    TQFileDialog( TQWidget* parent=0, const char* name=0, bool modal = false );
+		 TQWidget* parent=nullptr, const char* name=nullptr, bool modal = false );
+    TQFileDialog( TQWidget* parent=nullptr, const char* name=nullptr, bool modal = false );
     ~TQFileDialog();
 
     // recommended static functions
 
     static TQString getOpenFileName( const TQString &initially = TQString::null,
 				    const TQString &filter = TQString::null,
-				    TQWidget *parent = 0, const char* name = 0,
+				    TQWidget *parent = nullptr, const char* name = nullptr,
 				    const TQString &caption = TQString::null,
-				    TQString *selectedFilter = 0,
+				    TQString *selectedFilter = nullptr,
 				    bool resolveSymlinks = true);
     static TQString getSaveFileName( const TQString &initially = TQString::null,
 				    const TQString &filter = TQString::null,
-				    TQWidget *parent = 0, const char* name = 0,
+				    TQWidget *parent = nullptr, const char* name = nullptr,
 				    const TQString &caption = TQString::null,
-				    TQString *selectedFilter = 0,
+				    TQString *selectedFilter = nullptr,
 				    bool resolveSymlinks = true);
     static TQString getExistingDirectory( const TQString &dir = TQString::null,
-					 TQWidget *parent = 0,
-					 const char* name = 0,
+					 TQWidget *parent = nullptr,
+					 const char* name = nullptr,
 					 const TQString &caption = TQString::null,
 					 bool dirOnly = true,
 					 bool resolveSymlinks = true);
     static TQStringList getOpenFileNames( const TQString &filter= TQString::null,
 					 const TQString &dir = TQString::null,
-					 TQWidget *parent = 0,
-					 const char* name = 0,
+					 TQWidget *parent = nullptr,
+					 const char* name = nullptr,
 					 const TQString &caption = TQString::null,
-					 TQString *selectedFilter = 0,
+					 TQString *selectedFilter = nullptr,
 					 bool resolveSymlinks = true);
 
     // other static functions
@@ -301,26 +301,26 @@ private:
     static TQString winGetOpenFileName( const TQString &initialSelection,
 				       const TQString &filter,
 				       TQString* workingDirectory,
-				       TQWidget *parent = 0,
-				       const char* name = 0,
+				       TQWidget *parent = nullptr,
+				       const char* name = nullptr,
 				       const TQString& caption = TQString::null,
-				       TQString* selectedFilter = 0 );
+				       TQString* selectedFilter = nullptr );
     static TQString winGetSaveFileName( const TQString &initialSelection,
 				       const TQString &filter,
 				       TQString* workingDirectory,
-				       TQWidget *parent = 0,
-				       const char* name = 0,
+				       TQWidget *parent = nullptr,
+				       const char* name = nullptr,
 				       const TQString& caption = TQString::null,
-    				       TQString* selectedFilter = 0 );
+    				       TQString* selectedFilter = nullptr );
     static TQStringList winGetOpenFileNames( const TQString &filter,
 					    TQString* workingDirectory,
-					    TQWidget *parent = 0,
-					    const char* name = 0,
+					    TQWidget *parent = nullptr,
+					    const char* name = nullptr,
 					    const TQString& caption = TQString::null,
-					    TQString* selectedFilter = 0 );
+					    TQString* selectedFilter = nullptr );
     static TQString winGetExistingDirectory( const TQString &initialDirectory,
-					    TQWidget* parent = 0,
-					    const char* name = 0,
+					    TQWidget* parent = nullptr,
+					    const char* name = nullptr,
 					    const TQString& caption = TQString::null);
     static TQString resolveLinkFile( const TQString& linkfile );
 #endif
diff --git a/src/dialogs/tqfontdialog.cpp b/src/dialogs/tqfontdialog.cpp
index 37d9b75da..4a9ed42ff 100644
--- a/src/dialogs/tqfontdialog.cpp
+++ b/src/dialogs/tqfontdialog.cpp
@@ -316,7 +316,7 @@ TQFontDialog::TQFontDialog( TQWidget *parent, const char *name,
 TQFontDialog::~TQFontDialog()
 {
     delete d;
-    d = 0;
+    d = nullptr;
 }
 
 /*!
@@ -388,7 +388,7 @@ TQFont TQFontDialog::getFont( bool *ok, const TQFont &initial,
 */
 TQFont TQFontDialog::getFont( bool *ok, TQWidget *parent,const char* name)
 {
-    return getFont( ok, 0, parent, name );
+    return getFont( ok, nullptr, parent, name );
 }
 
 extern bool tqt_use_native_dialogs;
diff --git a/src/dialogs/tqfontdialog.h b/src/dialogs/tqfontdialog.h
index 178781ee7..4ce675158 100644
--- a/src/dialogs/tqfontdialog.h
+++ b/src/dialogs/tqfontdialog.h
@@ -68,14 +68,14 @@ class TQ_EXPORT TQFontDialog: public TQDialog
 
 public:
     static TQFont getFont( bool *ok, const TQFont &def,
-			  TQWidget* parent=0, const char* name=0);
-    static TQFont getFont( bool *ok, TQWidget* parent=0, const char* name=0);
+			  TQWidget* parent=nullptr, const char* name=nullptr);
+    static TQFont getFont( bool *ok, TQWidget* parent=nullptr, const char* name=nullptr);
 
 private:
     static TQFont getFont( bool *ok, const TQFont *def,
-			  TQWidget* parent=0, const char* name=0);
+			  TQWidget* parent=nullptr, const char* name=nullptr);
 
-    TQFontDialog( TQWidget* parent=0, const char* name=0, bool modal=false,
+    TQFontDialog( TQWidget* parent=nullptr, const char* name=nullptr, bool modal=false,
 		 WFlags f=0 );
     ~TQFontDialog();
 
diff --git a/src/dialogs/tqinputdialog.cpp b/src/dialogs/tqinputdialog.cpp
index fb1d0823b..3b71067bd 100644
--- a/src/dialogs/tqinputdialog.cpp
+++ b/src/dialogs/tqinputdialog.cpp
@@ -129,9 +129,9 @@ TQInputDialog::TQInputDialog( const TQString &label, TQWidget* parent,
     : TQDialog( parent, name, modal )
 {
     d = new TQInputDialogPrivate;
-    d->lineEdit = 0;
-    d->spinBox = 0;
-    d->comboBox = 0;
+    d->lineEdit = nullptr;
+    d->spinBox = nullptr;
+    d->comboBox = nullptr;
 
     TQVBoxLayout *vbox = new TQVBoxLayout( this, 6, 6 );
 
@@ -215,7 +215,7 @@ TQComboBox *TQInputDialog::editableComboBox() const
 
 void TQInputDialog::setType( Type t )
 {
-    TQWidget *input = 0;
+    TQWidget *input = nullptr;
     switch ( t ) {
     case LineEdit:
 	input = d->lineEdit;
diff --git a/src/dialogs/tqinputdialog.h b/src/dialogs/tqinputdialog.h
index 0347efee9..29be34c34 100644
--- a/src/dialogs/tqinputdialog.h
+++ b/src/dialogs/tqinputdialog.h
@@ -60,7 +60,7 @@ class TQ_EXPORT TQInputDialog : public TQDialog
 private:
     enum Type { LineEdit, SpinBox, ComboBox, EditableComboBox };
 
-    TQInputDialog( const TQString &label, TQWidget* parent=0, const char* name=0,
+    TQInputDialog( const TQString &label, TQWidget* parent=nullptr, const char* name=nullptr,
 		 bool modal = true, Type type = LineEdit ); //### 4.0: widget flag!
     ~TQInputDialog();
 
@@ -75,16 +75,16 @@ private:
 public:
     //### 4.0: widget flag!
     static TQString getText( const TQString &caption, const TQString &label, TQLineEdit::EchoMode echo = TQLineEdit::Normal,
-			    const TQString &text = TQString::null, bool *ok = 0, TQWidget *parent = 0, const char *name = 0 );
+			    const TQString &text = TQString::null, bool *ok = nullptr, TQWidget *parent = nullptr, const char *name = nullptr );
     static int getInteger( const TQString &caption, const TQString &label, int value = 0, int minValue = -2147483647,
 			   int maxValue = 2147483647,
-			   int step = 1, bool *ok = 0, TQWidget *parent = 0, const char *name = 0 );
+			   int step = 1, bool *ok = nullptr, TQWidget *parent = nullptr, const char *name = nullptr );
     static double getDouble( const TQString &caption, const TQString &label, double value = 0,
 			     double minValue = -2147483647, double maxValue = 2147483647,
-			     int decimals = 1, bool *ok = 0, TQWidget *parent = 0, const char *name = 0 );
+			     int decimals = 1, bool *ok = nullptr, TQWidget *parent = nullptr, const char *name = nullptr );
     static TQString getItem( const TQString &caption, const TQString &label, const TQStringList &list,
 			    int current = 0, bool editable = true,
-			    bool *ok = 0, TQWidget *parent = 0, const char *name = 0 );
+			    bool *ok = nullptr, TQWidget *parent = nullptr, const char *name = nullptr );
 
 private slots:
     void textChanged( const TQString &s );
diff --git a/src/dialogs/tqmessagebox.cpp b/src/dialogs/tqmessagebox.cpp
index 436194325..01d850cff 100644
--- a/src/dialogs/tqmessagebox.cpp
+++ b/src/dialogs/tqmessagebox.cpp
@@ -457,7 +457,7 @@ static const char * const mb_texts[] = {
 #else
 const char * mb_texts[] = {
 #endif
-    0,
+    nullptr,
     TQT_TRANSLATE_NOOP("TQMessageBox","OK"),
     TQT_TRANSLATE_NOOP("TQMessageBox","Cancel"),
     TQT_TRANSLATE_NOOP("TQMessageBox","&Yes"),
@@ -467,7 +467,7 @@ const char * mb_texts[] = {
     TQT_TRANSLATE_NOOP("TQMessageBox","&Ignore"),
     TQT_TRANSLATE_NOOP("TQMessageBox","Yes to &All"),
     TQT_TRANSLATE_NOOP("TQMessageBox","N&o to All"),
-    0
+    nullptr
 };
 
 /*!
@@ -579,7 +579,7 @@ TQMessageBox::~TQMessageBox()
     delete mbd;
 }
 
-static TQString * translatedTextAboutTQt = 0;
+static TQString * translatedTextAboutTQt = nullptr;
 
 void TQMessageBox::init( int button0, int button1, int button2 )
 {
@@ -666,7 +666,7 @@ void TQMessageBox::init( int button0, int button1, int button2 )
     }
     for ( i=0; i<3; i++ ) {
         if ( i >= mbd->numButtons ) {
-            mbd->pb[i] = 0;
+            mbd->pb[i] = nullptr;
         } else {
             TQCString buttonName;
             buttonName.sprintf( "button%d", i+1 );
@@ -683,7 +683,7 @@ void TQMessageBox::init( int button0, int button1, int button2 )
         }
     }
     resizeButtons();
-    reserved1 = reserved2 = 0;
+    reserved1 = reserved2 = nullptr;
 }
 
 
@@ -1306,15 +1306,15 @@ void TQMessageBox::about( TQWidget *parent, const TQString &caption,
 				       WDestructiveClose);
     TQ_CHECK_PTR( mb );
 #ifndef TQT_NO_WIDGET_TOPEXTRA
-    const TQPixmap *pm = parent ? parent->icon() : 0;
+    const TQPixmap *pm = parent ? parent->icon() : nullptr;
     if ( pm && !pm->isNull() )
 	mb->setIconPixmap( *pm );
     else {
-	pm = parent ? parent->topLevelWidget()->icon() : 0;
+	pm = parent ? parent->topLevelWidget()->icon() : nullptr;
 	if ( pm && !pm->isNull() )
 	    mb->setIconPixmap( *pm );
 	else {
-	    pm = tqApp && tqApp->mainWidget() ? tqApp->mainWidget()->icon() : 0;
+	    pm = tqApp && tqApp->mainWidget() ? tqApp->mainWidget()->icon() : nullptr;
 	    if ( pm && !pm->isNull() )
 		mb->setIconPixmap( *pm );
 	}
diff --git a/src/dialogs/tqmessagebox.h b/src/dialogs/tqmessagebox.h
index 86a96fc2d..875d69ff6 100644
--- a/src/dialogs/tqmessagebox.h
+++ b/src/dialogs/tqmessagebox.h
@@ -64,10 +64,10 @@ public:
     enum Icon { NoIcon = 0, Information = 1, Warning = 2, Critical = 3,
 		Question = 4 };
 
-    TQMessageBox( TQWidget* parent=0, const char* name=0 );
+    TQMessageBox( TQWidget* parent=nullptr, const char* name=nullptr );
     TQMessageBox( const TQString& caption, const TQString &text, Icon icon,
 		 int button0, int button1, int button2,
-		 TQWidget* parent=0, const char* name=0, bool modal=true,
+		 TQWidget* parent=nullptr, const char* name=nullptr, bool modal=true,
 		 WFlags f=WStyle_DialogBorder  );
     ~TQMessageBox();
 
@@ -129,7 +129,7 @@ public:
     static int message( const TQString &caption,
 			const TQString& text,
 			const TQString& buttonText=TQString::null,
-			TQWidget *parent=0, const char * =0 ) {
+			TQWidget *parent=nullptr, const char * =nullptr ) {
 	return TQMessageBox::information( parent, caption, text,
 				     buttonText.isEmpty()
 				     ? tr("OK") : buttonText ) == 0;
@@ -140,7 +140,7 @@ public:
 		       const TQString& text,
 		       const TQString& yesButtonText=TQString::null,
 		       const TQString& noButtonText=TQString::null,
-		       TQWidget *parent=0, const char * = 0 ) {
+		       TQWidget *parent=nullptr, const char * = nullptr ) {
 	return TQMessageBox::information( parent, caption, text,
 				     yesButtonText.isEmpty()
 				     ? tr("OK") : yesButtonText,
diff --git a/src/dialogs/tqprintdialog.cpp b/src/dialogs/tqprintdialog.cpp
index 15272e8fa..03bc8920d 100644
--- a/src/dialogs/tqprintdialog.cpp
+++ b/src/dialogs/tqprintdialog.cpp
@@ -151,7 +151,7 @@ public:
 
 
 typedef void (*Q_PrintDialogHook)(TQListView *);
-static Q_PrintDialogHook addPrinterHook = 0;
+static Q_PrintDialogHook addPrinterHook = nullptr;
 
 void qt_set_printdialog_hook( Q_PrintDialogHook hook )
 {
@@ -290,7 +290,7 @@ static void parseEtcLpPrinters( TQListView * printers )
     TQFileInfoListIterator it( *dirs );
     TQFileInfo *printer;
     TQString tmp;
-    while ( (printer = it.current()) != 0 ) {
+    while ( (printer = it.current()) ) {
 	++it;
 	if ( printer->isDir() ) {
 	    tmp.sprintf( "/etc/lp/printers/%s/configuration",
@@ -351,13 +351,13 @@ static void parseEtcLpPrinters( TQListView * printers )
 
 
 // solaris 2.6
-static char * parsePrintersConf( TQListView * printers, bool *found = 0 )
+static char * parsePrintersConf( TQListView * printers, bool *found = nullptr )
 {
     TQFile pc( TQString::fromLatin1("/etc/printers.conf") );
     if ( !pc.open( IO_ReadOnly ) ) {
 	if ( found )
 	    *found = false;
-	return 0;
+	return nullptr;
     }
     if ( found )
 	*found = true;
@@ -368,7 +368,7 @@ static char * parsePrintersConf( TQListView * printers, bool *found = 0 )
     TQString printerDesc;
     int lineLength = 0;
 
-    char * defaultPrinter = 0;
+    char * defaultPrinter = nullptr;
 
     while ( !pc.atEnd() &&
 	    (lineLength=pc.readLine( line, 1024 )) > 0 ) {
@@ -518,18 +518,18 @@ static char *parseNsswitchPrintersEntry( TQListView * printers, char *line )
     while ( isspace((uchar) line[k]) ) \
 	k++
 
-    char *defaultPrinter = 0;
+    char *defaultPrinter = nullptr;
     bool stop = false;
     int lastStatus = NotFound;
 
     int k = 8;
     skipSpaces();
     if ( line[k] != ':' )
-	return 0;
+	return nullptr;
     k++;
 
     char *cp = strchr( line, '#' );
-    if ( cp != 0 )
+    if ( cp )
 	*cp = '\0';
 
     while ( line[k] != '\0' ) {
@@ -596,9 +596,9 @@ static char *parseNsswitchConf( TQListView * printers )
 {
     TQFile nc( TQString::fromLatin1("/etc/nsswitch.conf") );
     if ( !nc.open(IO_ReadOnly) )
-	return 0;
+	return nullptr;
 
-    char *defaultPrinter = 0;
+    char *defaultPrinter = nullptr;
 
     char *line = new char[1025];
     line[1024] = '\0';
@@ -630,7 +630,7 @@ static void parseEtcLpMember( TQListView * printers )
     TQFileInfoListIterator it( *dirs );
     TQFileInfo *printer;
     TQString tmp;
-    while ( (printer = it.current()) != 0 ) {
+    while ( (printer = it.current()) ) {
 	++it;
 	// I haven't found any real documentation, so I'm guessing that
 	// since lpstat uses /etc/lp/member rather than one of the
@@ -655,7 +655,7 @@ static void parseSpoolInterface( TQListView * printers )
 
     TQFileInfoListIterator it( *files );
     TQFileInfo *printer;
-    while ( (printer = it.current()) != 0) {
+    while ( (printer = it.current())) {
 	++it;
 
 	if ( !printer->isFile() )
@@ -790,7 +790,7 @@ static void parseQconfig( TQListView * printers )
 
 static char * parseCupsOutput( TQListView * printers )
 {
-    char * defaultPrinter = 0;
+    char * defaultPrinter = nullptr;
     int nd;
     cups_dest_t * d;
     TQLibrary lib( "cups" );
@@ -801,12 +801,12 @@ static char * parseCupsOutput( TQListView * printers )
     if ( _cupsGetDests ) {
 	nd = _cupsGetDests( &d );
 	if ( nd < 1 )
-	    return 0;
+	    return nullptr;
 
 	int n = 0;
 	while ( n < nd ) {
 	    perhapsAddPrinter( printers, d[n].name,
-			       TQPrintDialog::tr("Unknown Location"), 0 );
+			       TQPrintDialog::tr("Unknown Location"), nullptr );
 	    if ( d[n].is_default && !defaultPrinter )
 		defaultPrinter = tqstrdup( d[n].instance );
 	    n++;
@@ -819,13 +819,13 @@ static char * parseCupsOutput( TQListView * printers )
 }
 #endif
 
-static TQPrintDialog * globalPrintDialog = 0;
+static TQPrintDialog * globalPrintDialog = nullptr;
 
 static void qpd_cleanup_globaldialog()
 {
-    if ( globalPrintDialog != 0 )
+    if ( globalPrintDialog )
 	delete globalPrintDialog;
-    globalPrintDialog = 0;
+    globalPrintDialog = nullptr;
 }
 
 /*!
@@ -959,7 +959,7 @@ TQPrintDialog::TQPrintDialog( TQPrinter *prn, TQWidget *parent, const char *name
 TQPrintDialog::~TQPrintDialog()
 {
     if ( this == globalPrintDialog )
-	globalPrintDialog = 0;
+	globalPrintDialog = nullptr;
     delete d;
 }
 
@@ -1039,7 +1039,7 @@ TQGroupBox * TQPrintDialog::setupDestination()
     d->printers->addColumn( tr("Comment"), 150 );
 
 #if defined(Q_OS_UNIX)
-    char * etcLpDefault = 0;
+    char * etcLpDefault = nullptr;
 
 #ifndef TQT_NO_CUPS
     etcLpDefault = parseCupsOutput( d->printers );
@@ -1074,7 +1074,7 @@ TQGroupBox * TQPrintDialog::setupDestination()
 	    }
 	}
 
-	char * def = 0;
+	char * def = nullptr;
 	f.setFile( TQString::fromLatin1("/etc/nsswitch.conf") );
 	if ( f.isFile() ) {
 	    def = parseNsswitchConf( d->printers );
@@ -1375,7 +1375,7 @@ TQGroupBox * TQPrintDialog::setupPaper()
 bool TQPrintDialog::getPrinterSetup( TQPrinter * p, TQWidget* w  )
 {
     if ( !globalPrintDialog ) {
-	globalPrintDialog = new TQPrintDialog( 0, 0, "global print dialog" );
+	globalPrintDialog = new TQPrintDialog( nullptr, nullptr, "global print dialog" );
 #ifndef TQT_NO_WIDGET_TOPEXTRA
 	globalPrintDialog->setCaption( TQPrintDialog::tr( "Setup Printer" ) );
 #endif
@@ -1392,15 +1392,15 @@ bool TQPrintDialog::getPrinterSetup( TQPrinter * p, TQWidget* w  )
 	if ( pm && !pm->isNull() )
 	    globalPrintDialog->setIcon( *pm );
 	else {
-	    w = w ? w->topLevelWidget() : 0;
-	    pm = w ? w->icon() : 0;
+	    w = w ? w->topLevelWidget() : nullptr;
+	    pm = w ? w->icon() : nullptr;
 	    if ( pm && !pm->isNull() )
 		globalPrintDialog->setIcon( *pm );
 	}
     }
 #endif
     bool r = globalPrintDialog->exec() == TQDialog::Accepted;
-    globalPrintDialog->setPrinter( 0 );
+    globalPrintDialog->setPrinter( nullptr );
     return r;
 }
 
diff --git a/src/dialogs/tqprintdialog.h b/src/dialogs/tqprintdialog.h
index fa7ef36bb..bed42048b 100644
--- a/src/dialogs/tqprintdialog.h
+++ b/src/dialogs/tqprintdialog.h
@@ -55,10 +55,10 @@ class TQ_EXPORT TQPrintDialog : public TQDialog
 {
     TQ_OBJECT
 public:
-    TQPrintDialog( TQPrinter *, TQWidget* parent=0, const char* name=0 );
+    TQPrintDialog( TQPrinter *, TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQPrintDialog();
 
-    static bool getPrinterSetup( TQPrinter *, TQWidget* = 0 );
+    static bool getPrinterSetup( TQPrinter *, TQWidget* = nullptr );
     static void setGlobalPrintDialog( TQPrintDialog * );
 
     void setPrinter( TQPrinter *, bool = false );
diff --git a/src/dialogs/tqprogressdialog.cpp b/src/dialogs/tqprogressdialog.cpp
index 4f4319827..8fb1e48cc 100644
--- a/src/dialogs/tqprogressdialog.cpp
+++ b/src/dialogs/tqprogressdialog.cpp
@@ -73,7 +73,7 @@ public:
 		   int totalSteps ) :
 	creator( parent ),
 	label( new TQLabel(labelText,that,"label") ),
-	cancel( 0 ),
+	cancel( nullptr ),
 	bar( new TQProgressBar(totalSteps,that,"bar") ),
 	shown_once( false ),
 	cancellation_flag( false ),
@@ -437,7 +437,7 @@ void TQProgressDialog::setCancelButtonText( const TQString &cancelButtonText )
 	else
 	    setCancelButton(new TQPushButton(cancelButtonText, this, "cancel"));
     } else {
-	setCancelButton(0);
+	setCancelButton(nullptr);
     }
     int w = TQMAX( isVisible() ? width() : 0, sizeHint().width() );
     int h = TQMAX( isVisible() ? height() : 0, sizeHint().height() );
diff --git a/src/dialogs/tqprogressdialog.h b/src/dialogs/tqprogressdialog.h
index 6f65a7425..be44a4ead 100644
--- a/src/dialogs/tqprogressdialog.h
+++ b/src/dialogs/tqprogressdialog.h
@@ -66,10 +66,10 @@ class TQ_EXPORT TQProgressDialog : public TQDialog
     TQ_PROPERTY( TQString labelText READ labelText WRITE setLabelText )
 
 public:
-    TQProgressDialog( TQWidget* parent=0, const char* name=0, bool modal=false,
+    TQProgressDialog( TQWidget* parent=nullptr, const char* name=nullptr, bool modal=false,
 		     WFlags f=0 );
     TQProgressDialog( const TQString& labelText, const TQString &cancelButtonText,
-		     int totalSteps, TQWidget* parent=0, const char* name=0,
+		     int totalSteps, TQWidget* parent=nullptr, const char* name=nullptr,
 		     bool modal=false, WFlags f=0 );
     ~TQProgressDialog();
 
diff --git a/src/dialogs/tqtabdialog.cpp b/src/dialogs/tqtabdialog.cpp
index c0ad02698..cf806f063 100644
--- a/src/dialogs/tqtabdialog.cpp
+++ b/src/dialogs/tqtabdialog.cpp
@@ -171,9 +171,9 @@ public:
 };
 
 TQTabDialogPrivate::TQTabDialogPrivate()
-	: tw(0),
-	  ok(0), cb(0), db(0), hb(0), ab(0),
-	  tll(0)
+	: tw(nullptr),
+	  ok(nullptr), cb(nullptr), db(nullptr), hb(nullptr), ab(nullptr),
+	  tll(nullptr)
 { }
 
 /*!
@@ -251,7 +251,7 @@ void TQTabDialog::setFont( const TQFont & font )
 
 bool TQTabDialog::hasDefaultButton() const
 {
-     return d->db != 0;
+     return d->db;
 }
 
 
@@ -265,7 +265,7 @@ bool TQTabDialog::hasDefaultButton() const
 
 bool TQTabDialog::hasHelpButton() const
 {
-     return d->hb != 0;
+     return d->hb;
 }
 
 
@@ -293,7 +293,7 @@ bool TQTabDialog::hasHelpButton() const
 
 bool TQTabDialog::hasCancelButton() const
 {
-     return d->cb != 0;
+     return d->cb;
 }
 
 
@@ -331,7 +331,7 @@ bool TQTabDialog::hasCancelButton() const
 
 bool TQTabDialog::hasApplyButton() const
 {
-    return d->ab != 0;
+    return d->ab;
 }
 
 
@@ -345,7 +345,7 @@ bool TQTabDialog::hasApplyButton() const
 
 bool TQTabDialog::hasOkButton() const
 {
-    return d->ok != 0;
+    return d->ok;
 }
 
 
@@ -681,7 +681,7 @@ void TQTabDialog::setApplyButton( const TQString &text )
 {
     if ( !text && d->ab ) {
 	delete d->ab;
-	d->ab = 0;
+	d->ab = nullptr;
 	setSizes();
     } else {
 	if ( !d->ab ) {
@@ -725,7 +725,7 @@ void TQTabDialog::setHelpButton( const TQString &text )
 {
     if ( !text ) {
 	delete d->hb;
-	d->hb = 0;
+	d->hb = nullptr;
 	setSizes();
     } else {
 	if ( !d->hb ) {
@@ -772,7 +772,7 @@ void TQTabDialog::setDefaultButton( const TQString &text )
 {
     if ( !text ) {
 	delete d->db;
-	d->db = 0;
+	d->db = nullptr;
 	setSizes();
     } else {
 	if ( !d->db ) {
@@ -821,7 +821,7 @@ void TQTabDialog::setCancelButton( const TQString &text )
 {
     if ( !text ) {
 	delete d->cb;
-	d->cb = 0;
+	d->cb = nullptr;
 	setSizes();
     } else {
 	if ( !d->cb ) {
@@ -1046,7 +1046,7 @@ void TQTabDialog::setOkButton( const TQString &text )
 {
     if ( !text ) {
 	delete d->ok;
-	d->ok = 0;
+	d->ok = nullptr;
 	setSizes();
     } else {
 	if ( !d->ok ) {
diff --git a/src/dialogs/tqtabdialog.h b/src/dialogs/tqtabdialog.h
index de6d8bc2c..b08ba79da 100644
--- a/src/dialogs/tqtabdialog.h
+++ b/src/dialogs/tqtabdialog.h
@@ -56,7 +56,7 @@ class TQ_EXPORT TQTabDialog : public TQDialog
 {
     TQ_OBJECT
 public:
-    TQTabDialog( TQWidget* parent=0, const char* name=0, bool modal=false,
+    TQTabDialog( TQWidget* parent=nullptr, const char* name=nullptr, bool modal=false,
 		WFlags f=0 );
     ~TQTabDialog();
 
diff --git a/src/dialogs/tqwizard.cpp b/src/dialogs/tqwizard.cpp
index 5e2ebaff8..4a044d904 100644
--- a/src/dialogs/tqwizard.cpp
+++ b/src/dialogs/tqwizard.cpp
@@ -147,10 +147,10 @@ public:
     Page * page( const TQWidget * w )
     {
 	if ( !w )
-	    return 0;
+	    return nullptr;
 	int i = pages.count();
 	while( --i >= 0 && pages.at( i ) && pages.at( i )->w != w ) { }
-	return i >= 0 ? pages.at( i ) : 0;
+	return i >= 0 ? pages.at( i ) : nullptr;
     }
 
 };
@@ -166,7 +166,7 @@ TQWizard::TQWizard( TQWidget *parent, const char *name, bool modal,
     : TQDialog( parent, name, modal, f )
 {
     d = new TQWizardPrivate();
-    d->current = 0; // not quite true, but...
+    d->current = nullptr; // not quite true, but...
     d->ws = new TQWidgetStack( this, "qt_widgetstack" );
     d->pages.setAutoDelete( true );
     d->title = new TQLabel( this, "title label" );
@@ -180,9 +180,9 @@ TQWizard::TQWizard( TQWidget *parent, const char *name, bool modal,
 
     d->ws->installEventFilter( this );
 
-    d->v = 0;
-    d->hbar1 = 0;
-    d->hbar2 = 0;
+    d->v = nullptr;
+    d->hbar1 = nullptr;
+    d->hbar2 = nullptr;
 
     d->cancelButton->setText( tr( "&Cancel" ) );
     d->backButton->setText( tr( "< &Back" ) );
@@ -235,7 +235,7 @@ void TQWizard::show()
 	if ( pageCount() > 0 )
 	    showPage( d->pages.at( 0 )->w );
 	else
-	    showPage( 0 );
+	    showPage( nullptr );
     }
 
     TQDialog::show();
@@ -909,7 +909,7 @@ void TQWizard::removePage( TQWidget * page )
 TQWidget* TQWizard::page( int index ) const
 {
     if ( index >= pageCount() || index < 0 )
-      return 0;
+      return nullptr;
 
     return d->pages.at( index )->w;
 }
diff --git a/src/dialogs/tqwizard.h b/src/dialogs/tqwizard.h
index b9bb060f1..00ae16026 100644
--- a/src/dialogs/tqwizard.h
+++ b/src/dialogs/tqwizard.h
@@ -57,7 +57,7 @@ class TQ_EXPORT TQWizard : public TQDialog
     TQ_PROPERTY( TQFont titleFont READ titleFont WRITE setTitleFont )
 
 public:
-    TQWizard( TQWidget* parent=0, const char* name=0, bool modal=false,
+    TQWizard( TQWidget* parent=nullptr, const char* name=nullptr, bool modal=false,
 	     WFlags f=0 );
     ~TQWizard();
 
diff --git a/src/inputmethod/tqinputcontextfactory.cpp b/src/inputmethod/tqinputcontextfactory.cpp
index ec723bc92..898aedb8e 100644
--- a/src/inputmethod/tqinputcontextfactory.cpp
+++ b/src/inputmethod/tqinputcontextfactory.cpp
@@ -54,7 +54,7 @@
 #ifndef TQT_NO_COMPONENT
 
 
-static TQPluginManager<TQInputContextFactoryInterface> *manager = 0;
+static TQPluginManager<TQInputContextFactoryInterface> *manager = nullptr;
 static TQSingleCleanupHandler< TQPluginManager<TQInputContextFactoryInterface> > cleanup_manager;
 
 static void create_manager()
@@ -65,7 +65,7 @@ static void create_manager()
 #ifdef TQT_THREAD_SUPPORT
     // protect manager creation
     TQMutexLocker locker( tqt_global_mutexpool ?
-			 tqt_global_mutexpool->get( &manager ) : 0);
+			 tqt_global_mutexpool->get( &manager ) : nullptr);
 
     // we check the manager pointer again to make sure that another thread
     // has not created the manager before us.
@@ -90,7 +90,7 @@ static void create_manager()
 */
 TQInputContext *TQInputContextFactory::create( const TQString& key, TQWidget *widget )
 {
-    TQInputContext *ret = 0;
+    TQInputContext *ret = nullptr;
     TQString inputcontext = key;
 #ifndef TQT_NO_COMPONENT
     // make sure the manager is created
diff --git a/src/inputmethod/tqinputcontextplugin.cpp b/src/inputmethod/tqinputcontextplugin.cpp
index 7acdc9300..f80b858a8 100644
--- a/src/inputmethod/tqinputcontextplugin.cpp
+++ b/src/inputmethod/tqinputcontextplugin.cpp
@@ -161,7 +161,7 @@ private:
 
 TQRESULT TQInputContextPluginPrivate::queryInterface( const TQUuid &iid, TQUnknownInterface **iface )
 {
-    *iface = 0;
+    *iface = nullptr;
 
     if ( iid == IID_QUnknown )
 	*iface = this;
diff --git a/src/kernel/tqabstractlayout.cpp b/src/kernel/tqabstractlayout.cpp
index 094c21fa0..bd098f0da 100644
--- a/src/kernel/tqabstractlayout.cpp
+++ b/src/kernel/tqabstractlayout.cpp
@@ -223,7 +223,7 @@ void TQLayoutItem::invalidate()
 */
 TQLayout * TQLayoutItem::layout()
 {
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -232,7 +232,7 @@ TQLayout * TQLayoutItem::layout()
 */
 TQSpacerItem * TQLayoutItem::spacerItem()
 {
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -257,7 +257,7 @@ TQSpacerItem * TQSpacerItem::spacerItem()
 */
 TQWidget * TQLayoutItem::widget()
 {
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -291,7 +291,7 @@ bool TQLayoutItem::hasHeightForWidth() const
 */
 TQLayoutIterator TQLayoutItem::iterator()
 {
-    return TQLayoutIterator( 0 );
+    return TQLayoutIterator( nullptr );
 }
 
 /*!
@@ -635,9 +635,9 @@ void TQLayout::init()
     marginImpl = false;
     autoMinimum = false;
     autoResizeMode = true;
-    extraData = 0;
+    extraData = nullptr;
 #ifndef TQT_NO_MENUBAR
-    menubar = 0;
+    menubar = nullptr;
 #endif
 }
 
@@ -667,7 +667,7 @@ TQLayout::TQLayout( TQLayout *parentLayout, int spacing, const char *name )
     management will work.
 */
 TQLayout::TQLayout( int spacing, const char *name )
-    : TQObject( 0, name )
+    : TQObject( nullptr, name )
 {
     init();
     insideSpacing = spacing;
@@ -775,7 +775,7 @@ TQWidget *TQLayout::mainWidget()
 	    Q_ASSERT(parentLayout);
 	    return parentLayout->mainWidget();
 	} else {
-	    return 0;
+	    return nullptr;
 	}
     } else {
 	Q_ASSERT(parent() && parent()->isWidgetType());
@@ -824,7 +824,7 @@ static bool removeWidgetRecursively( TQLayoutItem *lay, TQWidget *w )
     bool didSomething = false;
     TQLayoutIterator it = lay->iterator();
     TQLayoutItem *child;
-    while ( (child = it.current()) != 0 ) {
+    while ( (child = it.current()) ) {
 	if ( child->widget() == w ) {
 	    it.deleteCurrent();
 	    lay->invalidate(); // maybe redundant
@@ -875,7 +875,7 @@ bool TQLayout::eventFilter( TQObject *o, TQEvent *e )
 		TQWidget *w = (TQWidget *)c->child();
 #ifndef TQT_NO_MENUBAR
 		if ( w == menubar )
-		    menubar = 0;
+		    menubar = nullptr;
 #endif
 		if ( removeWidgetRecursively( this, w ) ) {
 		    TQEvent *lh = new TQEvent( TQEvent::LayoutHint );
@@ -1041,7 +1041,7 @@ TQLayout::~TQLayout()
     */
     if ( isTopLevel() && parent() && parent()->isWidgetType() &&
 	 ((TQWidget*)parent())->layout() == this )
-	setWidgetLayout( (TQWidget*)parent(), 0 );
+	setWidgetLayout( (TQWidget*)parent(), nullptr );
 }
 
 /*!
@@ -1163,7 +1163,7 @@ static void invalidateRecursive( TQLayoutItem *lay )
     lay->invalidate();
     TQLayoutIterator it = lay->iterator();
     TQLayoutItem *child;
-    while ( (child = it.current()) != 0 ) {
+    while ( (child = it.current()) ) {
 	invalidateRecursive( child );
 	++it;
     }
@@ -1866,7 +1866,7 @@ void TQLayout::remove( TQWidget *widget )
 {
     TQLayoutIterator it = iterator();
     TQLayoutItem *child;
-    while ( (child = it.current()) != 0 ) {
+    while ( (child = it.current()) ) {
 	if ( child->widget() == widget ) {
 	    it.deleteCurrent();
 	    invalidate(); // maybe redundant
@@ -1891,7 +1891,7 @@ void TQLayout::removeItem( TQLayoutItem *item )
 {
     TQLayoutIterator it = iterator();
     TQLayoutItem *child;
-    while ( (child = it.current()) != 0 ) {
+    while ( (child = it.current()) ) {
 	if ( child == item ) {
 	    it.takeCurrent();
 	    invalidate(); // maybe redundant
diff --git a/src/kernel/tqaccel.cpp b/src/kernel/tqaccel.cpp
index 34b15a5bf..7d768c95e 100644
--- a/src/kernel/tqaccel.cpp
+++ b/src/kernel/tqaccel.cpp
@@ -142,7 +142,7 @@
 
 struct TQAccelItem {				// internal accelerator item
     TQAccelItem( const TQKeySequence &k, int i )
-	{ key=k; id=i; enabled=true; signal=0; }
+	{ key=k; id=i; enabled=true; signal=nullptr; }
    ~TQAccelItem()	       { delete signal; }
     int		    id;
     TQKeySequence    key;
@@ -179,7 +179,7 @@ public:
 
 private:
     TQAccelManager():currentState(TQt::NoMatch), clash(-1) { self_ptr = this; }
-    ~TQAccelManager() { self_ptr = 0; }
+    ~TQAccelManager() { self_ptr = nullptr; }
 
     bool correctSubWindow( TQWidget *w, TQAccelPrivate* d );
     SequenceMatch match( TQKeyEvent* e, TQAccelItem* item, TQKeySequence& temp );
@@ -191,7 +191,7 @@ private:
     TQKeySequence intermediate;
     int clash;
 };
-TQAccelManager* TQAccelManager::self_ptr = 0;
+TQAccelManager* TQAccelManager::self_ptr = nullptr;
 
 bool TQ_EXPORT tqt_tryAccelEvent( TQWidget* w, TQKeyEvent*  e){
     return TQAccelManager::self()->tryAccelEvent( w, e );
@@ -393,7 +393,7 @@ bool TQAccelManager::dispatchAccelEvent( TQWidget* w, TQKeyEvent* e )
 {
 #ifndef TQT_NO_STATUSBAR
     // Needs to be declared and used here because of "goto doclash"
-    TQStatusBar* mainStatusBar = 0;
+    TQStatusBar* mainStatusBar = nullptr;
 #endif
 
     // Modifiers can NOT be accelerators...
@@ -403,12 +403,12 @@ bool TQAccelManager::dispatchAccelEvent( TQWidget* w, TQKeyEvent* e )
 
     SequenceMatch result = TQt::NoMatch;
     TQKeySequence tocheck, partial;
-    TQAccelPrivate* accel = 0;
-    TQAccelItem* item = 0;
-    TQAccelPrivate* firstaccel = 0;
-    TQAccelItem* firstitem = 0;
-    TQAccelPrivate* lastaccel = 0;
-    TQAccelItem* lastitem = 0;
+    TQAccelPrivate* accel = nullptr;
+    TQAccelItem* item = nullptr;
+    TQAccelPrivate* firstaccel = nullptr;
+    TQAccelItem* firstitem = nullptr;
+    TQAccelPrivate* lastaccel = nullptr;
+    TQAccelItem* lastitem = nullptr;
     
     TQKeyEvent pe = *e;
     int n = -1;
@@ -460,7 +460,7 @@ bool TQAccelManager::dispatchAccelEvent( TQWidget* w, TQKeyEvent* e )
     } while ( hasShift-- && !matchFound && !identicalDisabled );
 
 #ifndef TQT_NO_STATUSBAR
-    mainStatusBar = (TQStatusBar*) w->topLevelWidget()->child( 0, "TQStatusBar" );
+    mainStatusBar = (TQStatusBar*) w->topLevelWidget()->child( nullptr, "TQStatusBar" );
 #endif
     if ( n < 0 ) { // no match found
 	currentState = partial.count() ? PartialMatch : NoMatch;
@@ -503,7 +503,7 @@ bool TQAccelManager::dispatchAccelEvent( TQWidget* w, TQKeyEvent* e )
  doclash: // found more than one match
 #ifndef TQT_NO_STATUSBAR
     if ( !mainStatusBar ) // if "goto doclash", we need to get statusbar again.
-	mainStatusBar = (TQStatusBar*) w->topLevelWidget()->child( 0, "TQStatusBar" );
+	mainStatusBar = (TQStatusBar*) w->topLevelWidget()->child( nullptr, "TQStatusBar" );
 #endif
 
     TQString message = TQAccel::tr( "Ambiguous \"%1\" not handled" ).arg( (TQString)tocheck );
diff --git a/src/kernel/tqaccel.h b/src/kernel/tqaccel.h
index c883ba2ff..d333b6a1c 100644
--- a/src/kernel/tqaccel.h
+++ b/src/kernel/tqaccel.h
@@ -54,8 +54,8 @@ class TQ_EXPORT TQAccel : public TQObject			// accelerator class
 {
     TQ_OBJECT
 public:
-    TQAccel( TQWidget *parent, const char *name=0 );
-    TQAccel( TQWidget* watch, TQObject *parent, const char *name=0 );
+    TQAccel( TQWidget *parent, const char *name=nullptr );
+    TQAccel( TQWidget* watch, TQObject *parent, const char *name=nullptr );
     ~TQAccel();
 
     bool isEnabled() const;
diff --git a/src/kernel/tqaccessible.cpp b/src/kernel/tqaccessible.cpp
index 02833d7e3..0183e3fec 100644
--- a/src/kernel/tqaccessible.cpp
+++ b/src/kernel/tqaccessible.cpp
@@ -290,7 +290,7 @@
     avoid unnecessary performance penalties if no client is listening.
 */
 
-static TQPluginManager<TQAccessibleFactoryInterface> *qAccessibleManager = 0;
+static TQPluginManager<TQAccessibleFactoryInterface> *qAccessibleManager = nullptr;
 
 class AccessibleCache : public TQObject, public TQPtrDict<TQAccessibleInterface>
 {
@@ -313,7 +313,7 @@ public slots:
 
 #include "tqaccessible.moc"
 
-static AccessibleCache *qAccessibleInterface = 0;
+static AccessibleCache *qAccessibleInterface = nullptr;
 static bool cleanupAdded = false;
 
 static void qAccessibleCleanup()
@@ -322,9 +322,9 @@ static void qAccessibleCleanup()
 	qAccessibleManager->setAutoUnload( false );
 
     delete qAccessibleInterface;
-    qAccessibleInterface = 0;
+    qAccessibleInterface = nullptr;
     delete qAccessibleManager;
-    qAccessibleManager = 0;
+    qAccessibleManager = nullptr;
 }
 
 #ifdef TQ_WS_MAC
@@ -348,7 +348,7 @@ void AccessibleCache::removeObject(TQObject *object)
     remove(object);
     if (!count()) {
         delete this;
-        qAccessibleInterface = 0;
+        qAccessibleInterface = nullptr;
     }
 }
 
@@ -390,7 +390,7 @@ TQRESULT TQAccessible::queryAccessibleInterface( TQObject *object, TQAccessibleI
 	}
     }
 
-    TQInterfacePtr<TQAccessibleFactoryInterface> factory = 0;
+    TQInterfacePtr<TQAccessibleFactoryInterface> factory = nullptr;
     TQMetaObject *mo = object->metaObject();
     while ( mo ) {
 	qAccessibleManager->queryInterface( mo->className(), &factory );
@@ -418,7 +418,7 @@ TQRESULT TQAccessible::queryAccessibleInterface( TQObject *object, TQAccessibleI
 */
 bool TQAccessible::isActive()
 {
-    return qAccessibleManager != 0;
+    return qAccessibleManager;
 }
 
 /*!
@@ -672,7 +672,7 @@ TQAccessibleObject::~TQAccessibleObject()
 	qAccessibleInterface->removeObject(object_);
 	if ( !qAccessibleInterface->count() ) {
 	    delete qAccessibleInterface;
-	    qAccessibleInterface = 0;
+	    qAccessibleInterface = nullptr;
 	}
     }
 }
diff --git a/src/kernel/tqapplication.cpp b/src/kernel/tqapplication.cpp
index d708eac95..d5471f2f7 100644
--- a/src/kernel/tqapplication.cpp
+++ b/src/kernel/tqapplication.cpp
@@ -323,27 +323,27 @@ void tqt_init( int *, char **, Display* dpy, TQt::HANDLE, TQt::HANDLE );
 #endif
 TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop );
 
-TQApplication *tqApp = 0;			// global application object
+TQApplication *tqApp = nullptr;			// global application object
 
-TQStyle   *TQApplication::app_style      = 0;	// default application style
+TQStyle   *TQApplication::app_style      = nullptr;	// default application style
 bool      tqt_explicit_app_style	       = false; // style explicitly set by programmer
 
 int	  TQApplication::app_cspec      = TQApplication::NormalColor;
 #ifndef TQT_NO_PALETTE
-TQPalette *TQApplication::app_pal	       = 0;	// default application palette
+TQPalette *TQApplication::app_pal	       = nullptr;	// default application palette
 #endif
-TQFont	 *TQApplication::app_font       = 0;	// default application font
+TQFont	 *TQApplication::app_font       = nullptr;	// default application font
 bool	  tqt_app_has_font	       = false;
 #ifndef TQT_NO_CURSOR
-TQCursor	 *TQApplication::app_cursor     = 0;	// default application cursor
+TQCursor	 *TQApplication::app_cursor     = nullptr;	// default application cursor
 #endif
 int	  TQApplication::app_tracking   = 0;	// global mouse tracking
 bool	  TQApplication::is_app_running = false;	// app starting up if false
 bool	  TQApplication::is_app_closing = false;	// app closing down if true
 int	  TQApplication::loop_level     = 0;	// event loop level
-TQWidget	 *TQApplication::main_widget    = 0;	// main application widget
-TQWidget	 *TQApplication::focus_widget   = 0;	// has keyboard input focus
-TQWidget	 *TQApplication::active_window  = 0;	// toplevel with keyboard focus
+TQWidget	 *TQApplication::main_widget    = nullptr;	// main application widget
+TQWidget	 *TQApplication::focus_widget   = nullptr;	// has keyboard input focus
+TQWidget	 *TQApplication::active_window  = nullptr;	// toplevel with keyboard focus
 bool	  TQApplication::obey_desktop_settings = true;	// use winsys resources
 int	  TQApplication::cursor_flash_time = 1000;	// text caret flash time
 int	  TQApplication::mouse_double_click_time = 400;	// mouse dbl click limit
@@ -368,18 +368,18 @@ bool	  TQApplication::animate_toolbox	= false;
 bool	  TQApplication::widgetCount	= false;
 TQApplication::Type tqt_appType=TQApplication::Tty;
 #ifndef TQT_NO_COMPONENT
-TQStringList *TQApplication::app_libpaths = 0;
+TQStringList *TQApplication::app_libpaths = nullptr;
 #endif
 bool	  TQApplication::metaComposeUnicode = false;
 int	  TQApplication::composedUnicode   = 0;
 
 #ifdef TQT_THREAD_SUPPORT
-TQMutex *TQApplication::tqt_mutex		= 0;
-TQMutex *tqt_sharedStringMutex			= 0;
-TQ_EXPORT TQMutex * tqt_sharedMetaObjectMutex	= 0;
+TQMutex *TQApplication::tqt_mutex		= nullptr;
+TQMutex *tqt_sharedStringMutex			= nullptr;
+TQ_EXPORT TQMutex * tqt_sharedMetaObjectMutex	= nullptr;
 
 #ifdef QT_USE_GLIBMAINLOOP
-TQMutex *tqt_timerListMutex			= 0;
+TQMutex *tqt_timerListMutex			= nullptr;
 #endif // QT_USE_GLIBMAINLOOP
 
 static TQt::HANDLE tqt_application_thread_id	= 0;
@@ -437,7 +437,7 @@ void tqt_setMaxWindowRect(const TQRect& r)
 
 typedef void (*VFPTR)();
 typedef TQValueList<VFPTR> TQVFuncList;
-static TQVFuncList *postRList = 0;		// list of post routines
+static TQVFuncList *postRList = nullptr;		// list of post routines
 
 /*!
   \relates TQApplication
@@ -524,19 +524,19 @@ TQ_EXPORT void tqRemovePostRoutine( TQtCleanUpFunction p )
 }
 
 // Default application palettes and fonts (per widget type)
-TQAsciiDict<TQPalette> *TQApplication::app_palettes = 0;
-TQAsciiDict<TQFont>    *TQApplication::app_fonts = 0;
+TQAsciiDict<TQPalette> *TQApplication::app_palettes = nullptr;
+TQAsciiDict<TQFont>    *TQApplication::app_fonts = nullptr;
 
 #ifndef TQT_NO_SESSIONMANAGER
-TQString *TQApplication::session_key = 0;		// ## session key. Should be a member in 4.0
+TQString *TQApplication::session_key = nullptr;		// ## session key. Should be a member in 4.0
 #endif
-TQWidgetList *TQApplication::popupWidgets = 0;	// has keyboard input focus
+TQWidgetList *TQApplication::popupWidgets = nullptr;	// has keyboard input focus
 
-TQDesktopWidget *tqt_desktopWidget = 0;		// root window widgets
+TQDesktopWidget *tqt_desktopWidget = nullptr;		// root window widgets
 #ifndef TQT_NO_CLIPBOARD
-TQClipboard	      *tqt_clipboard = 0;	// global clipboard object
+TQClipboard	      *tqt_clipboard = nullptr;	// global clipboard object
 #endif
-TQWidgetList * tqt_modal_stack=0;		// stack of modal widgets
+TQWidgetList * tqt_modal_stack=nullptr;		// stack of modal widgets
 
 #ifdef TQT_THREAD_SUPPORT
 
@@ -665,7 +665,7 @@ uint qGlobalPostedEventsCount()
 }
 
 #ifndef TQT_NO_PALETTE
-TQPalette *tqt_std_pal = 0;
+TQPalette *tqt_std_pal = nullptr;
 
 void tqt_create_std_palette()
 {
@@ -756,7 +756,7 @@ void TQApplication::process_cmdline( int* argcptr, char ** argv )
 	static char* empty = "\0";
 	argv[j] = empty;
 #else
-	argv[j] = 0;
+	argv[j] = nullptr;
 #endif
 	*argcptr = j;
     }
@@ -961,7 +961,7 @@ void TQApplication::construct( int &argc, char **argv, Type type, bool enable_sm
     tqt_is_gui_used = (type != Tty);
     init_precmdline();
     static const char *empty = "";
-    if ( argc == 0 || argv == 0 ) {
+    if ( argc == 0 || !argv ) {
 	argc = 0;
 	argv = (char **)&empty; // ouch! careful with TQApplication::argv()!
     }
@@ -1004,7 +1004,7 @@ TQApplication::TQApplication( Display* dpy, HANDLE visual, HANDLE colormap )
     // ### a string literal is a cont char*
     // ### using it as a char* is wrong and could lead to segfaults
     // ### if aargv is modified someday
-    static char *aargv[] = { (char*)"unknown", 0 };
+    static char *aargv[] = { (char*)"unknown", nullptr };
 
     app_argc = aargc;
     app_argv = aargv;
@@ -1094,7 +1094,7 @@ bool TQApplication::isCoreThread() {
 
 void TQApplication::init_precmdline()
 {
-    translators = 0;
+    translators = nullptr;
     is_app_closing = false;
 #ifndef TQT_NO_SESSIONMANAGER
     is_session_restored = false;
@@ -1140,7 +1140,7 @@ void TQApplication::initialize( int argc, char **argv, bool enable_sm )
 	session_manager = new TQSessionManager( tqApp, session_id, *session_key );
     }
     else {
-        session_manager = 0;
+        session_manager = nullptr;
     }
 #endif
 
@@ -1169,7 +1169,7 @@ void TQApplication::initialize( int argc, char **argv, bool enable_sm )
 
 TQWidget *TQApplication::activePopupWidget()
 {
-    return popupWidgets ? popupWidgets->getLast() : 0;
+    return popupWidgets ? popupWidgets->getLast() : nullptr;
 }
 
 
@@ -1189,7 +1189,7 @@ TQWidget *TQApplication::activePopupWidget()
 
 TQWidget *TQApplication::activeModalWidget()
 {
-    return tqt_modal_stack ? tqt_modal_stack->getFirst() : 0;
+    return tqt_modal_stack ? tqt_modal_stack->getFirst() : nullptr;
 }
 
 /*!
@@ -1217,14 +1217,14 @@ TQApplication::~TQApplication()
 	    it = postRList->begin();
 	}
 	delete postRList;
-	postRList = 0;
+	postRList = nullptr;
     }
 
     TQObject *tipmanager = child( "toolTipManager", "TQTipManager", false );
     delete tipmanager;
 
     delete tqt_desktopWidget;
-    tqt_desktopWidget = 0;
+    tqt_desktopWidget = nullptr;
     is_app_closing = true;
 
     // Due to hacks to speed up TQStyle engine (see git hash 523c1fd99) TQObjects now contain a
@@ -1235,28 +1235,28 @@ TQApplication::~TQApplication()
 
 #ifndef TQT_NO_CLIPBOARD
     delete tqt_clipboard;
-    tqt_clipboard = 0;
+    tqt_clipboard = nullptr;
 #endif
     TQWidget::destroyMapper();
 #ifndef TQT_NO_PALETTE
     delete tqt_std_pal;
-    tqt_std_pal = 0;
+    tqt_std_pal = nullptr;
     delete app_pal;
-    app_pal = 0;
+    app_pal = nullptr;
     delete app_palettes;
-    app_palettes = 0;
+    app_palettes = nullptr;
 #endif
     delete app_font;
-    app_font = 0;
+    app_font = nullptr;
     delete app_fonts;
-    app_fonts = 0;
+    app_fonts = nullptr;
 #ifndef TQT_NO_STYLE
     delete app_style;
-    app_style = 0;
+    app_style = nullptr;
 #endif
 #ifndef TQT_NO_CURSOR
     delete app_cursor;
-    app_cursor = 0;
+    app_cursor = nullptr;
 #endif
 #ifndef TQT_NO_TRANSLATION
     delete translators;
@@ -1271,18 +1271,18 @@ TQApplication::~TQApplication()
 
 #ifndef TQT_NO_COMPONENT
     delete app_libpaths;
-    app_libpaths = 0;
+    app_libpaths = nullptr;
 #endif
 
 #ifdef TQT_THREAD_SUPPORT
     delete tqt_mutex;
-    tqt_mutex = 0;
+    tqt_mutex = nullptr;
 #endif // TQT_THREAD_SUPPORT
 
     if( tqApp == this ) {
 	if ( postedEvents )
 	    removePostedEvents( this );
-	tqApp = 0;
+	tqApp = nullptr;
     }
     is_app_running = false;
 
@@ -1293,18 +1293,18 @@ TQApplication::~TQApplication()
     if ( session_manager ) {
 	delete session_manager;
     }
-    session_manager = 0;
+    session_manager = nullptr;
     if ( session_key ) {
 	delete session_key;
     }
-    session_key = 0;
+    session_key = nullptr;
 #endif //TQT_NO_SESSIONMANAGER
 
 #ifdef TQT_THREAD_SUPPORT
     delete tqt_sharedMetaObjectMutex;
-    tqt_sharedMetaObjectMutex = 0;
+    tqt_sharedMetaObjectMutex = nullptr;
     delete tqt_sharedStringMutex;
-    tqt_sharedStringMutex = 0;
+    tqt_sharedStringMutex = nullptr;
 #ifdef QT_USE_GLIBMAINLOOP
     delete tqt_timerListMutex;
     tqt_timerListMutex = 0;
@@ -1397,7 +1397,7 @@ TQApplication::~TQApplication()
 
 #ifndef TQT_NO_STYLE
 
-static TQString *tqt_style_override = 0;
+static TQString *tqt_style_override = nullptr;
 
 /*!
   Returns the application's style object.
@@ -1423,7 +1423,7 @@ TQStyle& TQApplication::style()
 	if ( tqt_style_override ) {
 	    style = *tqt_style_override;
 	    delete tqt_style_override;
-	    tqt_style_override = 0;
+	    tqt_style_override = nullptr;
 	} else {
 #  if defined(TQ_WS_WIN) && defined(Q_OS_TEMP)
 	    style = "PocketPC";
@@ -1581,11 +1581,11 @@ TQStyle* TQApplication::setStyle( const TQString& style )
 	    *tqt_style_override = style;
 	else
 	    tqt_style_override = new TQString(style);
-	return 0;
+	return nullptr;
     }
     TQStyle *s = TQStyleFactory::create( style );
     if ( !s )
-	return 0;
+	return nullptr;
 
     setStyle( s );
     return s;
@@ -2030,7 +2030,7 @@ TQPalette TQApplication::palette(const TQWidget* w)
 	    return *wp;
 	TQAsciiDictIterator<TQPalette> it( *app_palettes );
 	const char* name;
-	while ( (name=it.currentKey()) != 0 ) {
+	while ( (name=it.currentKey()) ) {
 	    if ( w->inherits( name ) )
 		return *it.current();
 	    ++it;
@@ -2060,7 +2060,7 @@ TQPalette TQApplication::palette(TQStringList objectTypeList)
 		}
 		TQAsciiDictIterator<TQPalette> it( *app_palettes );
 		const char* name;
-		while ( (name=it.currentKey()) != 0 ) {
+		while ( (name=it.currentKey()) ) {
 			if ( objectTypeList.contains(name) ) {
 				return *it.current();
 			}
@@ -2092,7 +2092,7 @@ void TQApplication::setPalette( const TQPalette &palette, bool informWidgets,
 			       const char* className )
 {
     TQPalette pal = palette;
-    TQPalette *oldpal = 0;
+    TQPalette *oldpal = nullptr;
 #ifndef TQT_NO_STYLE
     if ( !startingUp() ) // on startup this has been done already
 	tqApp->style().polish( pal );	// NB: non-const reference
@@ -2105,9 +2105,9 @@ void TQApplication::setPalette( const TQPalette &palette, bool informWidgets,
 	} else {
 	    *app_pal = pal;
 	}
-	all = app_palettes != 0;
+	all = app_palettes;
 	delete app_palettes;
-	app_palettes = 0;
+	app_palettes = nullptr;
 	tqt_fix_tooltips();
     } else {
 	if ( !app_palettes ) {
@@ -2149,7 +2149,7 @@ TQFont TQApplication::font( const TQWidget *w )
 	    return *wf;
 	TQAsciiDictIterator<TQFont> it( *app_fonts );
 	const char* name;
-	while ( (name=it.currentKey()) != 0 ) {
+	while ( (name=it.currentKey()) ) {
 	    if ( w->inherits( name ) )
 		return *it.current();
 	    ++it;
@@ -2196,9 +2196,9 @@ void TQApplication::setFont( const TQFont &font, bool informWidgets,
 	app_font->detach();
 	app_font->d->mask = TQFontPrivate::Complete;
 
-	all = app_fonts != 0;
+	all = app_fonts;
 	delete app_fonts;
-	app_fonts = 0;
+	app_fonts = nullptr;
     } else {
 	if (!app_fonts){
 	    app_fonts = new TQAsciiDict<TQFont>;
@@ -2551,7 +2551,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
 	return false;
     }
 
-    if ( receiver == 0 ) {			// serious error
+    if ( !receiver ) {			// serious error
 #if defined(QT_CHECK_NULL)
 	tqWarning( "TQApplication::notify: Unexpected null receiver" );
 #endif
@@ -2578,13 +2578,13 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
 		TQObject * c = ((TQChildEvent*)e)->child();
 		TQPostEvent * pe;
 		l->first();
-		while( ( pe = l->current()) != 0 ) {
+		while( ( pe = l->current()) ) {
 			if ( pe->event && pe->receiver == receiver &&
 				pe->event->type() == TQEvent::ChildInserted &&
 				((TQChildEvent*)pe->event)->child() == c ) {
 				pe->event->posted = false;
 				delete pe->event;
-				pe->event = 0;
+				pe->event = nullptr;
 				l->remove();
 				continue;
 			}
@@ -2821,7 +2821,7 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e)
     if ( eventFilters ) {
 	TQObjectListIt it( *eventFilters );
 	TQObject *obj;
-	while ( (obj=it.current()) != 0 ) {	// send to all filters
+	while ( (obj=it.current()) ) {	// send to all filters
 	    ++it;				//   until one returns true
 	    if ( obj->eventFilter(receiver,e) )
 		return true;
@@ -3258,7 +3258,7 @@ void TQApplication::installTranslator( TQTranslator * mf )
     TQWidgetList *list = topLevelWidgets();
     TQWidgetListIt it( *list );
     TQWidget *w;
-    while ( ( w=it.current() ) != 0 ) {
+    while ( ( w=it.current() ) ) {
 	++it;
 	if (!w->isDesktop())
 	    postEvent( w, new TQEvent( TQEvent::LanguageChange ) );
@@ -3285,7 +3285,7 @@ void TQApplication::removeTranslator( TQTranslator * mf )
 	TQWidgetList *list = topLevelWidgets();
 	TQWidgetListIt it( *list );
 	TQWidget *w;
-	while ( ( w=it.current() ) != 0 ) {
+	while ( ( w=it.current() ) ) {
 	    ++it;
 	    postEvent( w, new TQEvent( TQEvent::LanguageChange ) );
 	}
@@ -3380,7 +3380,7 @@ TQString TQApplication::translate( const char * context, const char * sourceText
 #ifndef TQT_NO_TEXTCODEC
     if ( encoding == UnicodeUTF8 )
 	return TQString::fromUtf8( sourceText );
-    else if ( TQTextCodec::codecForTr() != 0 )
+    else if ( TQTextCodec::codecForTr() )
 	return TQTextCodec::codecForTr()->toUnicode( sourceText );
     else
 #endif
@@ -3412,7 +3412,7 @@ TQString TQApplication::translate( const char * context, const char * sourceText
 
 void TQApplication::postEvent( TQObject *receiver, TQEvent *event )
 {
-    if ( receiver == 0 ) {
+    if ( !receiver ) {
 #if defined(QT_CHECK_NULL)
 	tqWarning( "TQApplication::postEvent: Unexpected null receiver" );
 #endif
@@ -3436,14 +3436,14 @@ void TQApplication::postEvent( TQObject *receiver, TQEvent *event )
 	 event->type() == TQEvent::Move ||
 	 event->type() == TQEvent::LanguageChange ) {
 	l->first();
-	TQPostEvent * cur = 0;
+	TQPostEvent * cur = nullptr;
 	for ( ;; ) {
-	    while ( (cur=l->current()) != 0 &&
+	    while ( (cur=l->current()) &&
 		    ( cur->receiver != receiver ||
-		      cur->event == 0 ||
+		      !cur->event ||
 		      cur->event->type() != event->type() ) )
 		l->next();
-	    if ( l->current() != 0 ) {
+	    if ( l->current() ) {
 		if ( cur->event->type() == TQEvent::Paint ) {
 		    TQPaintEvent * p = (TQPaintEvent*)(cur->event);
 		    if ( p->erase != ((TQPaintEvent*)event)->erase ) {
@@ -3478,15 +3478,15 @@ void TQApplication::postEvent( TQObject *receiver, TQEvent *event )
     // if this is one of the compressible IM events, do compression
     else if ( event->type() == TQEvent::IMCompose ) {
 	l->last();
-	TQPostEvent * cur = 0;
+	TQPostEvent * cur = nullptr;
 	for ( ;; ) {
-	    while ( (cur=l->current()) != 0 &&
+	    while ( (cur=l->current()) &&
 		    ( cur->receiver != receiver ||
-		      cur->event == 0 ||
+		      !cur->event ||
 		      cur->event->type() != event->type() || 
 		      cur->event->type() != TQEvent::IMStart ) )
 		l->prev();
-	    if ( l->current() != 0 ) {
+	    if ( l->current() ) {
 		// IMCompose must not be compressed with another one
 		// beyond its IMStart boundary
 		if ( cur->event->type() == TQEvent::IMStart ) {
@@ -3537,7 +3537,7 @@ void TQApplication::postEvent( TQObject *receiver, TQEvent *event )
 */
 void TQApplication::sendPostedEvents()
 {
-    sendPostedEvents( 0, 0 );
+    sendPostedEvents( nullptr, 0 );
 }
 
 
@@ -3558,8 +3558,8 @@ void TQApplication::sendPostedEvents( TQObject *receiver, int event_type )
 {
     // Make sure the object hierarchy is stable before processing events
     // to avoid endless loops
-    if ( receiver == 0 && event_type == 0 ) {
-	sendPostedEvents( 0, TQEvent::ChildInserted );
+    if ( !receiver && event_type == 0 ) {
+	sendPostedEvents( nullptr, TQEvent::ChildInserted );
     }
 
 #ifdef TQT_THREAD_SUPPORT
@@ -3582,11 +3582,11 @@ void TQApplication::sendPostedEvents( TQObject *receiver, int event_type )
 	// this, it looks the way it does for good reasons.
 	TQPostEventListIt it( *l );
 	TQPostEvent *pe;
-	while ( (pe=it.current()) != 0 ) {
+	while ( (pe=it.current()) ) {
 	    ++it;
 	    Q_ASSERT(pe->receiver);
 	    if ( pe->event // hasn't been sent yet
-		 && ( receiver == 0 // we send to all receivers
+		 && ( !receiver // we send to all receivers
 		      || receiver == pe->receiver ) // we send to THAT receiver
 		 && ( event_type == 0 // we send all types
 		      || event_type == pe->event->type() ) // we send THAT type
@@ -3601,7 +3601,7 @@ void TQApplication::sendPostedEvents( TQObject *receiver, int event_type )
 		pe->event->posted = false;
 		TQEvent * e = pe->event;
 		TQObject * r = pe->receiver;
-		pe->event = 0;
+		pe->event = nullptr;
 
 		// next, update the data structure so that we're ready
 		// for the next event.
@@ -3617,7 +3617,7 @@ void TQApplication::sendPostedEvents( TQObject *receiver, int event_type )
 		    // somewhere else if it isn't being used.
 		    if ( r->postedEvents->isEmpty() ) {
 			delete r->postedEvents;
-			r->postedEvents = 0;
+			r->postedEvents = nullptr;
 		    }
 		}
 
@@ -3650,7 +3650,7 @@ void TQApplication::sendPostedEvents( TQObject *receiver, int event_type )
 	// delivered.
 	if ( l == GlobalPostedEvents() ) {
 	    GlobalPostedEvents()->first();
-	    while( (pe=GlobalPostedEvents()->current()) != 0 ) {
+	    while( (pe=GlobalPostedEvents()->current()) ) {
 		if ( pe->event ) {
 		    GlobalPostedEvents()->next();
 		}
@@ -3714,12 +3714,12 @@ void TQApplication::removePostedEvents( TQObject *receiver, int event_type )
     TQPostEventList * l = receiver->postedEvents;
     l->first();
     TQPostEvent * pe;
-    while( (pe=l->current()) != 0 ) {
+    while( (pe=l->current()) ) {
 	if ( !event_type || pe->event->type() == event_type ) {
 	    if ( pe->event ) {
 		pe->event->posted = false;
 		delete pe->event;
-		pe->event = 0;
+		pe->event = nullptr;
 	    }
 	    l->remove();
 	} else {
@@ -3727,7 +3727,7 @@ void TQApplication::removePostedEvents( TQObject *receiver, int event_type )
 	}
     }
     if ( !event_type || !l->count() ) {
-	receiver->postedEvents = 0;
+	receiver->postedEvents = nullptr;
 	delete l;
     }
 }
@@ -3755,7 +3755,7 @@ void TQApplication::removePostedEvent( TQEvent *  event )
 
     TQPostEventListIt it( *GlobalPostedEvents() );
     TQPostEvent * pe;
-    while( (pe = it.current()) != 0 ) {
+    while( (pe = it.current()) ) {
 	++it;
 	if ( pe->event == event ) {
 #if defined(QT_DEBUG)
@@ -3832,7 +3832,7 @@ void TQApplication::removePostedEvent( TQEvent *  event )
 #endif
 	    event->posted = false;
 	    delete pe->event;
-	    pe->event = 0;
+	    pe->event = nullptr;
 	    return;
 	}
     }
@@ -3894,7 +3894,7 @@ void TQApplication::threadTerminationHandler( TQThread *originThread ) {
  */
 void TQApplication::setActiveWindow( TQWidget* act )
 {
-    TQWidget* window = act?act->topLevelWidget():0;
+    TQWidget* window = act?act->topLevelWidget():nullptr;
 
     if ( active_window == window )
 	return;
@@ -3915,7 +3915,7 @@ void TQApplication::setActiveWindow( TQWidget* act )
 	} else
 #endif
 	    deacts.append(active_window);
-	active_window = 0;
+	active_window = nullptr;
 	TQEvent e( TQEvent::WindowDeactivate );
 	for(TQWidget *w = deacts.first(); w; w = deacts.next())
 	    TQApplication::sendSpontaneousEvent( w, &e );
@@ -3947,7 +3947,7 @@ void TQApplication::setActiveWindow( TQWidget* act )
     if ( !active_window && focus_widget ) {
 	TQFocusEvent out( TQEvent::FocusOut );
 	TQWidget *tmp = focus_widget;
-	focus_widget = 0;
+	focus_widget = nullptr;
 #ifdef TQ_WS_WIN
 	TQInputContext::accept( tmp );
 #elif defined(TQ_WS_X11)
@@ -4040,12 +4040,12 @@ TQ_EXPORT void tqt_dispatchEnterLeave( TQWidget* enter, TQWidget* leave ) {
 
     TQEvent leaveEvent( TQEvent::Leave );
     for ( w = leaveList.first(); w; w = leaveList.next() ) {
-	if ( !tqApp->activeModalWidget() || tqt_tryModalHelper( w, 0 ))
+	if ( !tqApp->activeModalWidget() || tqt_tryModalHelper( w, nullptr ))
 	    TQApplication::sendEvent( w, &leaveEvent );
     }
     TQEvent enterEvent( TQEvent::Enter );
     for ( w = enterList.first(); w; w = enterList.next() ) {
-	if ( !tqApp->activeModalWidget() || tqt_tryModalHelper( w, 0 ))
+	if ( !tqApp->activeModalWidget() || tqt_tryModalHelper( w, nullptr ))
 	    TQApplication::sendEvent( w, &enterEvent );
     }
 }
@@ -4062,7 +4062,7 @@ extern TQWidget *tqt_tryModalHelperMac( TQWidget * top ); //tqapplication_mac.cp
   if the widget should accept the event.
  */
 TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
-    TQWidget *modal=0, *top=TQApplication::activeModalWidget();
+    TQWidget *modal=nullptr, *top=TQApplication::activeModalWidget();
     if ( rettop ) *rettop = top;
 
     if ( tqApp->activePopupWidget() )
@@ -4142,7 +4142,7 @@ TQDesktopWidget *TQApplication::desktop()
 */
 TQClipboard *TQApplication::clipboard()
 {
-    if ( tqt_clipboard == 0 ) {
+    if ( !tqt_clipboard ) {
 	tqt_clipboard = new TQClipboard;
 	TQ_CHECK_PTR( tqt_clipboard );
     }
@@ -4475,7 +4475,7 @@ void TQApplication::setReverseLayout( bool b )
     TQWidgetList *list = topLevelWidgets();
     TQWidgetListIt it( *list );
     TQWidget *w;
-    while ( ( w=it.current() ) != 0 ) {
+    while ( ( w=it.current() ) ) {
 	++it;
 	postEvent( w, new TQEvent( TQEvent::LayoutDirectionChange ) );
     }
@@ -4860,7 +4860,7 @@ public:
     TQSessionManager::RestartHint restartHint;
 };
 
-TQSessionManager* tqt_session_manager_self = 0;
+TQSessionManager* tqt_session_manager_self = nullptr;
 TQSessionManager::TQSessionManager( TQApplication * app, TQString &id, TQString &key )
     : TQObject( app, "tqt_sessionmanager" )
 {
diff --git a/src/kernel/tqapplication.h b/src/kernel/tqapplication.h
index ef1050774..ae83abd50 100644
--- a/src/kernel/tqapplication.h
+++ b/src/kernel/tqapplication.h
@@ -117,14 +117,14 @@ public:
     static bool	     hasGlobalMouseTracking();
     static void	     setGlobalMouseTracking( bool enable );
 #ifndef TQT_NO_PALETTE
-    static TQPalette  palette( const TQWidget* = 0 );
+    static TQPalette  palette( const TQWidget* = nullptr );
     static TQPalette  palette( TQStringList );
     static void	     setPalette( const TQPalette &, bool informWidgets=false,
-				 const char* className = 0 );
+				 const char* className = nullptr );
 #endif
-    static TQFont     font( const TQWidget* = 0 );
+    static TQFont     font( const TQWidget* = nullptr );
     static void	     setFont( const TQFont &, bool informWidgets=false,
-			      const char* className = 0 );
+			      const char* className = nullptr );
     static TQFontMetrics fontMetrics();
 
     TQWidget	    *mainWidget()  const;
@@ -188,7 +188,7 @@ public:
     enum Encoding { DefaultCodec, UnicodeUTF8 };
     TQString	     translate( const char * context,
 				const char * key,
-				const char * comment = 0,
+				const char * comment = nullptr,
 				Encoding encoding = DefaultCodec ) const;
 #ifndef TQT_NO_DIR
     TQString   applicationDirPath();
@@ -485,7 +485,7 @@ inline TQWidget *TQApplication::widgetAt( const TQPoint &p, bool child )
 
 inline bool TQApplication::inPopupMode() const
 {
-    return popupWidgets != 0;
+    return popupWidgets;
 }
 #ifndef TQT_NO_SESSIONMANAGER
 inline bool TQApplication::isSessionRestored() const
diff --git a/src/kernel/tqapplication_p.h b/src/kernel/tqapplication_p.h
index 3ba8b0846..2c28899d2 100644
--- a/src/kernel/tqapplication_p.h
+++ b/src/kernel/tqapplication_p.h
@@ -90,6 +90,6 @@ extern int tqt_ncols_option;
 
 
 extern void tqt_dispatchEnterLeave( TQWidget*, TQWidget* );
-extern bool tqt_tryModalHelper( TQWidget *, TQWidget ** = 0 );
+extern bool tqt_tryModalHelper( TQWidget *, TQWidget ** = nullptr );
 
 #endif
diff --git a/src/kernel/tqapplication_x11.cpp b/src/kernel/tqapplication_x11.cpp
index 08603d96c..918cfbac1 100644
--- a/src/kernel/tqapplication_x11.cpp
+++ b/src/kernel/tqapplication_x11.cpp
@@ -185,18 +185,18 @@ const int XKeyRelease = KeyRelease;
  *****************************************************************************/
 static const char *appName;			// application name
 static const char *appClass;			// application class
-static const char *appFont	= 0;		// application font
-static const char *appBGCol	= 0;		// application bg color
-static const char *appFGCol	= 0;		// application fg color
-static const char *appBTNCol	= 0;		// application btn color
-static const char *mwGeometry	= 0;		// main widget geometry
-static const char *mwTitle	= 0;		// main widget title
+static const char *appFont	= nullptr;		// application font
+static const char *appBGCol	= nullptr;		// application bg color
+static const char *appFGCol	= nullptr;		// application fg color
+static const char *appBTNCol	= nullptr;		// application btn color
+static const char *mwGeometry	= nullptr;		// main widget geometry
+static const char *mwTitle	= nullptr;		// main widget title
 //Ming-Che 10/10
-TQ_EXPORT char    *tqt_ximServer	= 0;		// XIM Server will connect to
+TQ_EXPORT char    *tqt_ximServer	= nullptr;		// XIM Server will connect to
 static bool	mwIconic	= false;	// main widget iconified
 //Ming-Che 10/10
-static Display *appDpy		= 0;		// X11 application display
-static char    *appDpyName	= 0;		// X11 display name
+static Display *appDpy		= nullptr;		// X11 application display
+static char    *appDpyName	= nullptr;		// X11 display name
 static bool	appForeignDpy	= false;        // we didn't create display
 static bool	appSync		= false;	// X11 synchronization
 #if defined(QT_DEBUG)
@@ -209,10 +209,10 @@ static bool	app_save_rootinfo = false;	// save root info
 static bool	app_do_modal	= false;	// modal mode
 static Window	curWin = 0;			// current window
 
-static GC*	app_gc_ro	= 0;		// read-only GC
-static GC*	app_gc_tmp	= 0;		// temporary GC
-static GC*	app_gc_ro_m	= 0;		// read-only GC (monochrome)
-static GC*	app_gc_tmp_m	= 0;		// temporary GC (monochrome)
+static GC*	app_gc_ro	= nullptr;		// read-only GC
+static GC*	app_gc_tmp	= nullptr;		// temporary GC
+static GC*	app_gc_ro_m	= nullptr;		// read-only GC (monochrome)
+static GC*	app_gc_tmp_m	= nullptr;		// temporary GC (monochrome)
 // symbols needed by extern TQXEmbed class
 TQ_EXPORT Atom	tqt_wm_protocols	= 0;	// window manager protocols
 TQ_EXPORT Atom	tqt_wm_delete_window	= 0;	// delete window protocol
@@ -296,9 +296,9 @@ Atom            tqt_net_wm_full_placement = 0; // KDE extension
 Atom		tqt_enlightenment_desktop	= 0;
 
 // window managers list of supported "stuff"
-Atom		*tqt_net_supported_list	= 0;
+Atom		*tqt_net_supported_list	= nullptr;
 // list of virtual root windows
-Window		*tqt_net_virtual_root_list	= 0;
+Window		*tqt_net_virtual_root_list	= nullptr;
 
 
 // X11 SYNC support
@@ -361,8 +361,8 @@ static bool	    ignoreNextMouseReleaseEvent = false; // ignore the next mouse re
 							 // event if return from a modal
 							 // widget
 
-static TQWidget     *popupButtonFocus = 0;
-static TQWidget     *popupOfPopupButtonFocus = 0;
+static TQWidget     *popupButtonFocus = nullptr;
+static TQWidget     *popupOfPopupButtonFocus = nullptr;
 static bool	    popupCloseDownMode = false;
 static bool	    popupGrabOk;
 
@@ -405,7 +405,7 @@ static uint appliedstamp = 0;
 typedef int (*QX11EventFilter) (XEvent*);
 QX11EventFilter tqt_set_x11_event_filter(QX11EventFilter filter);
 
-static QX11EventFilter tqt_x11_event_filter = 0;
+static QX11EventFilter tqt_x11_event_filter = nullptr;
 TQ_EXPORT QX11EventFilter tqt_set_x11_event_filter(QX11EventFilter filter)
 {
     QX11EventFilter old_filter = tqt_x11_event_filter;
@@ -431,7 +431,7 @@ static XIMStyle xim_default_style	= XIMPreeditCallbacks | XIMStatusNothing;
 #endif
 
 TQ_EXPORT int tqt_ximComposingKeycode=0;
-TQ_EXPORT TQTextCodec * tqt_input_mapper = 0;
+TQ_EXPORT TQTextCodec * tqt_input_mapper = nullptr;
 
 TQ_EXPORT Time	tqt_x_time = CurrentTime;
 TQ_EXPORT Time	tqt_x_user_time = CurrentTime;
@@ -465,7 +465,7 @@ bool	tqt_try_modal( TQWidget *, XEvent * );
 int		tqt_ncols_option  = 216;		// used in tqcolor_x11.cpp
 int		tqt_visual_option = -1;
 bool		tqt_cmap_option	 = false;
-TQWidget	       *tqt_button_down	 = 0;		// widget got last button-down
+TQWidget	       *tqt_button_down	 = nullptr;		// widget got last button-down
 
 extern bool tqt_tryAccelEvent( TQWidget*, TQKeyEvent* ); // def in tqaccel.cpp
 
@@ -478,7 +478,7 @@ struct TQScrollInProgress {
     int dx, dy;
 };
 long TQScrollInProgress::serial=0;
-static TQPtrList<TQScrollInProgress> *sip_list = 0;
+static TQPtrList<TQScrollInProgress> *sip_list = nullptr;
 
 
 // stuff in tqdnd_x11.cpp
@@ -528,11 +528,11 @@ extern void tqt_create_std_palette();
 
 void tqt_x11_intern_atom( const char *, Atom * );
 
-static TQPtrList<TQWidget>* deferred_map_list = 0;
+static TQPtrList<TQWidget>* deferred_map_list = nullptr;
 static void tqt_deferred_map_cleanup()
 {
     delete deferred_map_list;
-    deferred_map_list = 0;
+    deferred_map_list = nullptr;
 }
 void tqt_deferred_map_add( TQWidget* w)
 {
@@ -729,7 +729,7 @@ void TQApplication::create_xim()
     TQWidgetList *list= tqApp->topLevelWidgets();
     TQWidgetListIt it(*list);
     TQWidget * w;
-    while( (w=it.current()) != 0 ) {
+    while( (w=it.current()) ) {
 	++it;
 	w->createTLSysExtra();
     }
@@ -825,7 +825,7 @@ static int tqt_x_errhandler( Display *dpy, XErrorEvent *err )
 static int tqt_xio_errhandler( Display * )
 {
     tqWarning( "%s: Fatal IO error: client killed", appName );
-    tqApp = 0;
+    tqApp = nullptr;
     exit( 1 );
     //### give the application a chance for a proper shutdown instead,
     //### exit(1) doesn't help.
@@ -839,7 +839,7 @@ static int tqt_xio_errhandler( Display * )
 
 // Memory leak: if the app exits before tqt_init_internal(), this dict
 // isn't released correctly.
-static TQAsciiDict<Atom> *atoms_to_be_created = 0;
+static TQAsciiDict<Atom> *atoms_to_be_created = nullptr;
 static bool create_atoms_now = 0;
 
 /*****************************************************************************
@@ -909,7 +909,7 @@ static void tqt_x11_process_intern_atoms()
 	}
 #endif
 	delete atoms_to_be_created;
-	atoms_to_be_created = 0;
+	atoms_to_be_created = nullptr;
 	create_atoms_now = true;
     }
 }
@@ -927,7 +927,7 @@ bool TQApplication::x11_apply_settings()
     int format;
     long offset = 0;
     unsigned long nitems, after = 1;
-    unsigned char *data = 0;
+    unsigned char *data = nullptr;
     TQDateTime timestamp, settingsstamp;
     bool update_timestamp = false;
 
@@ -1218,8 +1218,8 @@ static void tqt_set_input_encoding()
 
 // set font, foreground and background from x11 resources. The
 // arguments may override the resource settings.
-static void tqt_set_x11_resources( const char* font = 0, const char* fg = 0,
-				  const char* bg = 0, const char* button = 0 )
+static void tqt_set_x11_resources( const char* font = nullptr, const char* fg = nullptr,
+				  const char* bg = nullptr, const char* button = nullptr )
 {
     if ( !tqt_std_pal )
 	tqt_create_std_palette();
@@ -1425,7 +1425,7 @@ static void tqt_detect_broken_window_manager()
     Atom type;
     int format;
     ulong nitems, after;
-    uchar *data = 0;
+    uchar *data = nullptr;
 
     // look for SGI's 4Dwm
     int e = XGetWindowProperty(appDpy, TQPaintDevice::x11AppRootWindow(),
@@ -1448,7 +1448,7 @@ void tqt_get_net_supported()
     int format;
     long offset = 0;
     unsigned long nitems, after;
-    unsigned char *data = 0;
+    unsigned char *data = nullptr;
 
     int e = XGetWindowProperty(appDpy, TQPaintDevice::x11AppRootWindow(),
 			       tqt_net_supported, 0, 0,
@@ -1458,7 +1458,7 @@ void tqt_get_net_supported()
 
     if (tqt_net_supported_list)
 	delete [] tqt_net_supported_list;
-    tqt_net_supported_list = 0;
+    tqt_net_supported_list = nullptr;
 
     if (e == Success && type == XA_ATOM && format == 32) {
 	TQBuffer ts;
@@ -1514,7 +1514,7 @@ void tqt_get_net_virtual_roots()
 {
     if (tqt_net_virtual_root_list)
 	delete [] tqt_net_virtual_root_list;
-    tqt_net_virtual_root_list = 0;
+    tqt_net_virtual_root_list = nullptr;
 
     if (! tqt_net_supports(tqt_net_virtual_roots))
 	return;
@@ -1693,7 +1693,7 @@ void tqt_init_internal( int *argcptr, char **argv,
 
 	// Set application name and class
 	appName = tqstrdup( "TQt-subapplication" );
-	char *app_class = 0;
+	char *app_class = nullptr;
 	if (argv) {
 	    const char* p = strrchr( argv[0], '/' );
 	    app_class = tqstrdup(p ? p + 1 : argv[0]);
@@ -1716,7 +1716,7 @@ void tqt_init_internal( int *argcptr, char **argv,
 	original_xio_errhandler = XSetIOErrorHandler( tqt_xio_errhandler );
 
 	// Set application name and class
-	char *app_class = 0;
+	char *app_class = nullptr;
 	if (argv) {
 	    const char *p = strrchr( argv[0], '/' );
 	    appName = p ? p + 1 : argv[0];
@@ -1846,10 +1846,10 @@ void tqt_init_internal( int *argcptr, char **argv,
 		// Connect to X server
 	
 		if( tqt_is_gui_used ) {
-		if ( ( appDpy = XOpenDisplay(appDpyName) ) == 0 ) {
+		if ( !( appDpy = XOpenDisplay(appDpyName) ) ) {
 			tqWarning( "%s: cannot connect to X server %s", appName,
 				XDisplayName(appDpyName) );
-			tqApp = 0;
+			tqApp = nullptr;
 			exit( 1 );
 		}
 	
@@ -1896,7 +1896,7 @@ void tqt_init_internal( int *argcptr, char **argv,
 	    TQPaintDevice::x_approotwindow_arr[ screen ] = RootWindow(appDpy, screen);
 
 	    // setup the visual and colormap for each screen
-	    Visual *vis = 0;
+	    Visual *vis = nullptr;
 	    if ( visual && screen == appScreen ) {
 		// use the provided visual on the default screen only
 		vis = (Visual *) visual;
@@ -1915,7 +1915,7 @@ void tqt_init_internal( int *argcptr, char **argv,
 		    XFree(vi);
 		} else {
 		    // couldn't get info about the visual, use the default instead
-		    vis = 0;
+		    vis = nullptr;
 		}
 	    }
 
@@ -2107,7 +2107,7 @@ void tqt_init_internal( int *argcptr, char **argv,
 	    XRenderPictFormat *format =
 		XRenderFindVisualFormat(appDpy,
 					(Visual *) TQPaintDevice::x_appvisual);
-	    tqt_use_xrender = (format != 0) && (TQPaintDevice::x_appdepth != 8);
+	    tqt_use_xrender = (format) && (TQPaintDevice::x_appdepth != 8);
 	}
 #endif // TQT_NO_XRENDER
 
@@ -2130,13 +2130,13 @@ void tqt_init_internal( int *argcptr, char **argv,
 #if !defined(TQT_NO_XFTFREETYPE)
 	// defined in tqfont_x11.cpp
 	extern bool tqt_has_xft;
-        tqt_has_xft = XftInit(0) && XftInitFtLibrary();
+        tqt_has_xft = XftInit(nullptr) && XftInitFtLibrary();
 
         if (tqt_has_xft) {
             char *dpi_str = XGetDefault(appDpy, "Xft", "dpi");
             if (dpi_str) {
                 // use a custom DPI
-                char *end = 0;
+                char *end = nullptr;
                 int dpi = strtol(dpi_str, &end, 0);
                 if (dpi_str != end) {
                     for (int s = 0; s < ScreenCount(appDpy); ++s) {
@@ -2416,7 +2416,7 @@ void TQApplication::x11_initialize_style()
 	if ( data ) XFree( (char *)data );
 	// twin is there. check if KDE's styles are available,
 	// otherwise use windows style
-	if ( (app_style = TQStyleFactory::create("highcolor") ) == 0 )
+	if ( !(app_style = TQStyleFactory::create("highcolor") ) )
 	    app_style = TQStyleFactory::create("windows");
     }
     if ( !app_style &&
@@ -2449,12 +2449,12 @@ void TQApplication::x11_initialize_style()
 
 void tqt_init( int *argcptr, char **argv, TQApplication::Type )
 {
-    tqt_init_internal( argcptr, argv, 0, 0, 0 );
+    tqt_init_internal( argcptr, argv, nullptr, 0, 0 );
 }
 
 void tqt_init( Display *display, TQt::HANDLE visual, TQt::HANDLE colormap )
 {
-    tqt_init_internal( 0, 0, display, visual, colormap );
+    tqt_init_internal( nullptr, nullptr, display, visual, colormap );
 }
 
 void tqt_init( int *argcptr, char **argv, Display *display, TQt::HANDLE visual, TQt::HANDLE colormap )
@@ -2510,7 +2510,7 @@ void tqt_cleanup()
 	}
     }
 
-#define QT_CLEANUP_GC(g) if (g) { for (int i=0;i<appScreenCount;i++){if(g[i])XFreeGC(appDpy,g[i]);} delete [] g; g = 0; }
+#define QT_CLEANUP_GC(g) if (g) { for (int i=0;i<appScreenCount;i++){if(g[i])XFreeGC(appDpy,g[i]);} delete [] g; g = nullptr; }
     QT_CLEANUP_GC(app_gc_ro);
     QT_CLEANUP_GC(app_gc_ro_m);
     QT_CLEANUP_GC(app_gc_tmp);
@@ -2518,7 +2518,7 @@ void tqt_cleanup()
 #undef QT_CLEANUP_GC
 
     delete sip_list;
-    sip_list = 0;
+    sip_list = nullptr;
 
     // Reset the error handlers
     XSetErrorHandler( original_x_errhandler );
@@ -2526,7 +2526,7 @@ void tqt_cleanup()
 
     if ( tqt_is_gui_used && !appForeignDpy )
 	XCloseDisplay( appDpy );		// close X display
-    appDpy = 0;
+    appDpy = nullptr;
 
     tqt_x11_wm_client_leader = 0;
 
@@ -2545,18 +2545,18 @@ void tqt_cleanup()
 
     if ( appForeignDpy ) {
 	delete [] (char *)appName;
-	appName = 0;
+	appName = nullptr;
 	delete [] (char *)appClass;
-	appClass = 0;
+	appClass = nullptr;
     }
 
     if (tqt_net_supported_list)
 	delete [] tqt_net_supported_list;
-    tqt_net_supported_list = 0;
+    tqt_net_supported_list = nullptr;
 
     if (tqt_net_virtual_root_list)
 	delete [] tqt_net_virtual_root_list;
-    tqt_net_virtual_root_list = 0;
+    tqt_net_virtual_root_list = nullptr;
 }
 
 
@@ -2661,11 +2661,11 @@ static GC create_gc( int scrn, bool monochrome )
     GC gc;
     if ( monochrome ) {
 	Pixmap pm = XCreatePixmap( appDpy, RootWindow( appDpy, scrn ), 8, 8, 1 );
-	gc = XCreateGC( appDpy, pm, 0, 0 );
+	gc = XCreateGC( appDpy, pm, 0, nullptr );
 	XFreePixmap( appDpy, pm );
     } else {
 	if ( TQPaintDevice::x11AppDefaultVisual( scrn ) ) {
-	    gc = XCreateGC( appDpy, RootWindow( appDpy, scrn ), 0, 0 );
+	    gc = XCreateGC( appDpy, RootWindow( appDpy, scrn ), 0, nullptr );
 	} else {
 	    Window w;
 	    XSetWindowAttributes a;
@@ -2676,7 +2676,7 @@ static GC create_gc( int scrn, bool monochrome )
 			       0, TQPaintDevice::x11AppDepth( scrn ), InputOutput,
 			       (Visual*)TQPaintDevice::x11AppVisual( scrn ),
 			       CWBackPixel|CWBorderPixel|CWColormap, &a );
-	    gc = XCreateGC( appDpy, w, 0, 0 );
+	    gc = XCreateGC( appDpy, w, 0, nullptr );
 	    XDestroyWindow( appDpy, w );
 	}
     }
@@ -2774,7 +2774,7 @@ void TQApplication::setMainWidget( TQWidget *mainWidget )
     main_widget = mainWidget;
     if ( main_widget ) {			// give WM command line
 	XSetWMProperties( main_widget->x11Display(), main_widget->winId(),
-			  0, 0, app_argv, app_argc, 0, 0, 0 );
+			  nullptr, nullptr, app_argv, app_argc, nullptr, nullptr, nullptr );
 	if ( mwTitle )
 	    XStoreName( main_widget->x11Display(), main_widget->winId(), (char*)mwTitle );
 	if ( mwGeometry ) {			// parse geometry
@@ -2818,7 +2818,7 @@ extern void tqt_x11_enforce_cursor( TQWidget * w );
 
 typedef TQPtrList<TQCursor> TQCursorList;
 
-static TQCursorList *cursorStack = 0;
+static TQCursorList *cursorStack = nullptr;
 
 /*!
     \fn TQCursor *TQApplication::overrideCursor()
@@ -2903,7 +2903,7 @@ void TQApplication::restoreOverrideCursor()
 	return;
     cursorStack->removeLast();
     app_cursor = cursorStack->last();
-    if ( TQWidget::mapper != 0 && !closingDown() ) {
+    if ( TQWidget::mapper && !closingDown() ) {
 	TQWidgetIntDictIt it( *((TQWidgetIntDict*)TQWidget::mapper) );
 	TQWidget *w;
 	while ( (w=it.current()) ) {		// set back to original cursors
@@ -2915,7 +2915,7 @@ void TQApplication::restoreOverrideCursor()
     }
     if ( !app_cursor ) {
 	delete cursorStack;
-	cursorStack = 0;
+	cursorStack = nullptr;
     }
 }
 
@@ -2998,7 +2998,7 @@ Window tqt_x11_findClientWindow( Window win, Atom property, bool leaf )
     int	   format, i;
     ulong  nitems, after;
     uchar *data;
-    Window root, parent, target=0, *children=0;
+    Window root, parent, target=0, *children=nullptr;
     uint   nchildren;
     if ( XGetWindowProperty( appDpy, win, property, 0, 0, false, AnyPropertyType,
 			     &type, &format, &nitems, &after, &data ) == Success ) {
@@ -3043,10 +3043,10 @@ TQWidget *TQApplication::widgetAt( int x, int y, bool child )
 				TQPaintDevice::x11AppRootWindow(screen),
 				TQPaintDevice::x11AppRootWindow(screen),
 				x, y, &lx, &ly, &target) ) {
-	return 0;
+	return nullptr;
     }
     if ( !target || target == TQPaintDevice::x11AppRootWindow(screen) )
-	return 0;
+	return nullptr;
     TQWidget *w, *c;
     w = TQWidget::find( (WId)target );
 
@@ -3054,7 +3054,7 @@ TQWidget *TQApplication::widgetAt( int x, int y, bool child )
 	tqt_ignore_badwindow();
 	target = tqt_x11_findClientWindow( target, tqt_wm_state, true );
 	if (tqt_badwindow() )
-	    return 0;
+	    return nullptr;
 	w = TQWidget::find( (WId)target );
 #if 0
 	if ( !w ) {
@@ -3164,7 +3164,7 @@ void TQApplication::beep()
   Special lookup functions for windows that have been reparented recently
  *****************************************************************************/
 
-static TQWidgetIntDict *wPRmapper = 0;		// alternative widget mapper
+static TQWidgetIntDict *wPRmapper = nullptr;		// alternative widget mapper
 
 void qPRCreate( const TQWidget *widget, Window oldwin )
 {						// TQWidget::reparent mechanism
@@ -3192,7 +3192,7 @@ void qPRCleanup( TQWidget *widget )
 	    wPRmapper->remove( key );// old window no longer needed
 	    if ( wPRmapper->count() == 0 ) {	// became empty
 		delete wPRmapper;		// then reset alt mapper
-		wPRmapper = 0;
+		wPRmapper = nullptr;
 		return;
 	    }
 	}
@@ -3201,7 +3201,7 @@ void qPRCleanup( TQWidget *widget )
 
 static TQETWidget *qPRFindWidget( Window oldwin )
 {
-    return wPRmapper ? (TQETWidget*)wPRmapper->find((long)oldwin) : 0;
+    return wPRmapper ? (TQETWidget*)wPRmapper->find((long)oldwin) : nullptr;
 }
 
 /*!
@@ -3324,7 +3324,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
     TQETWidget *widget = (TQETWidget*)TQWidget::find( (WId)event->xany.window );
 
     if ( wPRmapper ) {				// just did a widget reparent?
-	if ( widget == 0 ) {			// not in std widget mapper
+	if ( !widget ) {			// not in std widget mapper
 	    switch ( event->type ) {		// only for mouse/key events
 	    case ButtonPress:
 	    case ButtonRelease:
@@ -3339,7 +3339,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
 	    qPRCleanup( widget );		// remove from alt mapper
     }
 
-    TQETWidget *keywidget=0;
+    TQETWidget *keywidget=nullptr;
     bool grabbed=false;
     if ( event->type==XKeyPress || event->type==XKeyRelease ) {
 	keywidget = (TQETWidget*)TQWidget::keyboardGrabber();
@@ -3627,7 +3627,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
 	     event->xfocus.detail != NotifyNonlinear )
 	    break;
 	if ( !inPopupMode() && widget == active_window )
-	    setActiveWindow( 0 );
+	    setActiveWindow( nullptr );
 	break;
 
     case EnterNotify: {			// enter window
@@ -3662,7 +3662,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
 	if ( !widget->isDesktop() )
 	    widget->translateMouseEvent( event ); //we don't get MotionNotify, emulate it
 
-	TQWidget* enter = 0;
+	TQWidget* enter = nullptr;
 	XEvent ev;
 	while ( XCheckMaskEvent( widget->x11Display(), EnterWindowMask | LeaveWindowMask , &ev )
 		&& !tqt_x11EventFilter( &ev )) {
@@ -3693,11 +3693,11 @@ int TQApplication::x11ProcessEvent( XEvent* event )
 	     event->xcrossing.focus && widget == active_window &&
 	     tqt_focus_model == FocusModel_PointerRoot // PointerRoot mode
 	     ) {
-	    setActiveWindow( 0 );
+	    setActiveWindow( nullptr );
 	}
 
 	if ( !curWin )
-	    tqt_dispatchEnterLeave( widget, 0 );
+	    tqt_dispatchEnterLeave( widget, nullptr );
 
 	tqt_dispatchEnterLeave( enter, widget );
 	curWin = enter ? enter->winId() : 0;
@@ -3861,7 +3861,7 @@ void tqt_enter_modal( TQWidget *widget )
 	TQApplication::sendEvent(widget->parentWidget(), &e);
     }
 
-    tqt_dispatchEnterLeave( 0, TQWidget::find((WId)curWin) );
+    tqt_dispatchEnterLeave( nullptr, TQWidget::find((WId)curWin) );
     tqt_modal_stack->insert( 0, widget );
     app_do_modal = true;
     curWin = 0;
@@ -3874,14 +3874,14 @@ void tqt_leave_modal( TQWidget *widget )
     if ( tqt_modal_stack && tqt_modal_stack->removeRef(widget) ) {
 	if ( tqt_modal_stack->isEmpty() ) {
 	    delete tqt_modal_stack;
-	    tqt_modal_stack = 0;
+	    tqt_modal_stack = nullptr;
 	    TQPoint p( TQCursor::pos() );
 	    TQWidget* w = TQApplication::widgetAt( p.x(), p.y(), true );
 	    tqt_dispatchEnterLeave( w, TQWidget::find( curWin ) ); // send synthetic enter event
 	    curWin = w? w->winId() : 0;
 	}
     }
-    app_do_modal = tqt_modal_stack != 0;
+    app_do_modal = tqt_modal_stack;
     ignoreNextMouseReleaseEvent = true;
 
     if (widget->parentWidget()) {
@@ -3990,13 +3990,13 @@ void TQApplication::closePopup( TQWidget *popup )
 	return;
     popupWidgets->removeRef( popup );
     if (popup == popupOfPopupButtonFocus) {
-	popupButtonFocus = 0;
-	popupOfPopupButtonFocus = 0;
+	popupButtonFocus = nullptr;
+	popupOfPopupButtonFocus = nullptr;
     }
     if ( popupWidgets->count() == 0 ) {		// this was the last popup
 	popupCloseDownMode = true;		// control mouse events
 	delete popupWidgets;
-	popupWidgets = 0;
+	popupWidgets = nullptr;
 	if ( !tqt_nograb() && popupGrabOk ) {	// grabbing not disabled
 	    if ( mouseButtonState != 0
 		 || popup->geometry(). contains(TQPoint(mouseGlobalXPos, mouseGlobalYPos) ) )
@@ -4133,7 +4133,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
 	if ( tqt_button_down && (state & (LeftButton |
 					 MidButton |
 					 RightButton ) ) == 0 )
-	    tqt_button_down = 0;
+	    tqt_button_down = nullptr;
 
 	// throw away mouse move events that are sent multiple times to the same
 	// position
@@ -4157,7 +4157,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
 	if ( tqt_button_down && (state & (LeftButton |
 					 MidButton |
 					 RightButton ) ) == 0 )
-	    tqt_button_down = 0;
+	    tqt_button_down = nullptr;
 	if ( !tqt_button_down )
 	    state = state & ~(LeftButton | MidButton | RightButton );
     } else {					// button press or release
@@ -4265,8 +4265,8 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
 	TQWidget *popupTarget = popupChild ? popupChild : popup;
 
 	if (popup != popupOfPopupButtonFocus){
-	    popupButtonFocus = 0;
-	    popupOfPopupButtonFocus = 0;
+	    popupButtonFocus = nullptr;
+	    popupOfPopupButtonFocus = nullptr;
 	}
 
 	if ( !popupTarget->isEnabled() ) {
@@ -4297,8 +4297,8 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
 			   globalPos, button, state );
 	    TQApplication::sendSpontaneousEvent( popupButtonFocus, &e );
 	    if ( releaseAfter ) {
-		popupButtonFocus = 0;
-		popupOfPopupButtonFocus = 0;
+		popupButtonFocus = nullptr;
+		popupOfPopupButtonFocus = nullptr;
 	    }
 	} else if ( popupChild ) {
 	    TQMouseEvent e( type, popupChild->mapFromGlobal(globalPos),
@@ -4320,7 +4320,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
 	}
 
 	if ( releaseAfter )
-	    tqt_button_down = 0;
+	    tqt_button_down = nullptr;
 
 	if ( tqApp->inPopupMode() ) { // still in popup mode
 	    if ( popupGrabOk )
@@ -4358,7 +4358,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
 	     (state & (~button) & ( LeftButton |
 				    MidButton |
 				    RightButton)) == 0 ) {
-	    tqt_button_down = 0;
+	    tqt_button_down = nullptr;
 	}
 
 	int oldOpenPopupCount = openPopupCount;
@@ -4422,8 +4422,8 @@ bool TQETWidget::translateXinputEvent( const XEvent *ev )
     TQPair<int, int> tId;
     XEvent xinputMotionEvent;
     XEvent mouseMotionEvent;
-    const XDeviceMotionEvent *motion = 0;
-    XDeviceButtonEvent *button = 0;
+    const XDeviceMotionEvent *motion = nullptr;
+    XDeviceButtonEvent *button = nullptr;
     TQEvent::Type t;
 
     if ( ev->type == xinput_motion ) {
@@ -4528,7 +4528,7 @@ bool TQETWidget::translatePropertyEvent(const XEvent *event)
 
     Atom ret;
     int format, e;
-    unsigned char *data = 0;
+    unsigned char *data = nullptr;
     unsigned long nitems, after;
 
     if (event->xproperty.atom == tqt_net_wm_frame_strut) {
@@ -4933,17 +4933,17 @@ static const KeySym KeyTbl[] = {		// keyboard mapping table
 };
 
 
-static TQIntDict<void>    *keyDict  = 0;
-static TQIntDict<void>    *textDict = 0;
+static TQIntDict<void>    *keyDict  = nullptr;
+static TQIntDict<void>    *textDict = nullptr;
 
 static void deleteKeyDicts()
 {
     if ( keyDict )
 	delete keyDict;
-    keyDict = 0;
+    keyDict = nullptr;
     if ( textDict )
 	delete textDict;
-    textDict = 0;
+    textDict = nullptr;
 }
 
 #if !defined(TQT_NO_XIM)
@@ -5163,7 +5163,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
 #endif
 	if ( !mb ) {
 	    count = XLookupString( &xkeyevent,
-				   chars.data(), chars.size(), &key, 0 );
+				   chars.data(), chars.size(), &key, nullptr );
 	}
 	if ( count && !keycode ) {
 	    keycode = tqt_ximComposingKeycode;
@@ -5197,13 +5197,13 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
 	    case 11: // APL
 	    case 14: // Korean, no mapping
 		mib = -1; // manual conversion
-		mapper = 0;
+		mapper = nullptr;
 		converted = keysymToUnicode( byte3, key & 0xff );
 	    case 0x20:
 		// currency symbols
 		if ( key >= 0x20a0 && key <= 0x20ac ) {
 		    mib = -1; // manual conversion
-		    mapper = 0;
+		    mapper = nullptr;
 		    converted = (uint)key;
 		}
 		break;
@@ -5217,7 +5217,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
 	    }
 	} else if ( key >= 0x1000000 && key <= 0x100ffff ) {
 	    converted = (ushort) (key - 0x1000000);
-	    mapper = 0;
+	    mapper = nullptr;
 	}
 	if ( count < (int)chars.size()-1 )
 	    chars[count] = '\0';
@@ -6158,7 +6158,7 @@ class TQSmSocketReceiver : public TQObject
     TQ_OBJECT
 public:
     TQSmSocketReceiver( int socket )
-	: TQObject(0,0)
+	: TQObject(nullptr,nullptr)
 	{
 	    TQSocketNotifier* sn = new TQSocketNotifier( socket, TQSocketNotifier::Read, this );
 	    connect( sn, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( socketActivated(int) ) );
@@ -6169,7 +6169,7 @@ public slots:
 };
 
 
-static SmcConn smcConnection = 0;
+static SmcConn smcConnection = nullptr;
 static bool sm_interactionActive;
 static bool sm_smActive;
 static int sm_interactStyle;
@@ -6182,7 +6182,7 @@ static bool sm_isshutdown;
 static bool sm_phase2;
 static bool sm_in_phase2;
 
-static TQSmSocketReceiver* sm_receiver = 0;
+static TQSmSocketReceiver* sm_receiver = nullptr;
 
 static void resetSmState();
 static void sm_setProperty( const char* name, const char* type,
@@ -6294,7 +6294,7 @@ static void sm_performSaveYourself( TQSessionManagerData* smd )
 
     // generate a new session key
     timeval tv;
-    gettimeofday( &tv, 0 );
+    gettimeofday( &tv, nullptr );
     smd->sessionKey  = TQString::number( tv.tv_sec ) + "_" + TQString::number(tv.tv_usec);
 
     // tell the session manager about our program in best POSIX style
@@ -6408,7 +6408,7 @@ static void sm_saveYourselfPhase2Callback( SmcConn smcConn, SmPointer clientData
 
 void TQSmSocketReceiver::socketActivated(int)
 {
-    IceProcessMessages( SmcGetIceConnection( smcConnection ), 0, 0);
+    IceProcessMessages( SmcGetIceConnection( smcConnection ), nullptr, nullptr);
 }
 
 
@@ -6423,7 +6423,7 @@ TQSessionManager::TQSessionManager( TQApplication * app, TQString &id, TQString&
 
     resetSmState();
     char cerror[256];
-    char* myId = 0;
+    char* myId = nullptr;
     char* prevId = (char*)id.latin1(); // we know what we are doing
 
     SmcCallbacks cb;
@@ -6441,7 +6441,7 @@ TQSessionManager::TQSessionManager( TQApplication * app, TQString &id, TQString&
     if ( !session_manager || !session_manager[0] )
 	return;
 
-    smcConnection = SmcOpenConnection( 0, 0, 1, 0,
+    smcConnection = SmcOpenConnection( nullptr, nullptr, 1, 0,
 				       SmcSaveYourselfProcMask |
 				       SmcDieProcMask |
 				       SmcSaveCompleteProcMask |
@@ -6466,8 +6466,8 @@ TQSessionManager::TQSessionManager( TQApplication * app, TQString &id, TQString&
 TQSessionManager::~TQSessionManager()
 {
     if ( smcConnection )
-      SmcCloseConnection( smcConnection, 0, 0 );
-    smcConnection = 0;
+      SmcCloseConnection( smcConnection, 0, nullptr );
+    smcConnection = nullptr;
     delete sm_receiver;
     delete d;
 }
diff --git a/src/kernel/tqasyncimageio.cpp b/src/kernel/tqasyncimageio.cpp
index 42697d495..86adbb037 100644
--- a/src/kernel/tqasyncimageio.cpp
+++ b/src/kernel/tqasyncimageio.cpp
@@ -319,7 +319,7 @@ public:
     int count;
 };
 
-TQPtrList<TQImageFormatType> * TQImageDecoderPrivate::factories = 0;
+TQPtrList<TQImageFormatType> * TQImageDecoderPrivate::factories = nullptr;
 // See tqgif.h for important information regarding this option
 #if defined(QT_BUILTIN_GIF_READER) && QT_BUILTIN_GIF_READER == 1
 TQGIFFormatType * TQImageDecoderPrivate::gif_decoder_factory = 0;
@@ -329,7 +329,7 @@ TQGIFFormatType * TQImageDecoderPrivate::gif_decoder_factory = 0;
 void TQImageDecoderPrivate::cleanup()
 {
     delete factories;
-    factories = 0;
+    factories = nullptr;
 // See tqgif.h for important information regarding this option
 #if defined(QT_BUILTIN_GIF_READER) && QT_BUILTIN_GIF_READER == 1
     delete gif_decoder_factory;
@@ -348,7 +348,7 @@ TQImageDecoder::TQImageDecoder(TQImageConsumer* c)
     d = new TQImageDecoderPrivate;
     TQ_CHECK_PTR(d);
     consumer = c;
-    actual_decoder = 0;
+    actual_decoder = nullptr;
 }
 
 /*!
@@ -441,7 +441,7 @@ TQImageFormatType* TQImageDecoder::format( const char* name )
 	if ( tqstricmp(name,f->formatName())==0 )
 	    return f;
     }
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -455,7 +455,7 @@ const char* TQImageDecoder::formatName(const uchar* buffer, int length)
 {
     TQImageDecoderPrivate::ensureFactories();
 
-    const char* name = 0;
+    const char* name = nullptr;
     for (TQImageFormatType* f = TQImageDecoderPrivate::factories->first();
 	f && !name;
 	f = TQImageDecoderPrivate::factories->next())
diff --git a/src/kernel/tqasyncio.cpp b/src/kernel/tqasyncio.cpp
index aa3fff18a..8be01f268 100644
--- a/src/kernel/tqasyncio.cpp
+++ b/src/kernel/tqasyncio.cpp
@@ -70,7 +70,7 @@ TQAsyncIO::~TQAsyncIO()
 */
 void TQAsyncIO::connect(TQObject* obj, const char *member)
 {
-    signal.disconnect(0, 0);
+    signal.disconnect(nullptr, nullptr);
     signal.connect(obj, member);
 }
 
diff --git a/src/kernel/tqbitmap.h b/src/kernel/tqbitmap.h
index 6d862bfaf..8dadf7ff8 100644
--- a/src/kernel/tqbitmap.h
+++ b/src/kernel/tqbitmap.h
@@ -58,7 +58,7 @@ public:
     TQBitmap( const TQSize &, const uchar *bits, bool isXbitmap=false );
     TQBitmap( const TQBitmap & );
 #ifndef TQT_NO_IMAGEIO
-    TQBitmap( const TQString &fileName, const char *format=0 );
+    TQBitmap( const TQString &fileName, const char *format=nullptr );
 #endif
     TQBitmap &operator=( const TQBitmap & );
     TQBitmap &operator=( const TQPixmap & );
diff --git a/src/kernel/tqclipboard.h b/src/kernel/tqclipboard.h
index 32d715bb3..b4a05a43f 100644
--- a/src/kernel/tqclipboard.h
+++ b/src/kernel/tqclipboard.h
@@ -54,7 +54,7 @@ class TQ_EXPORT TQClipboard : public TQObject
 {
     TQ_OBJECT
 private:
-    TQClipboard( TQObject *parent=0, const char *name=0 );
+    TQClipboard( TQObject *parent=nullptr, const char *name=nullptr );
     ~TQClipboard();
 
 public:
diff --git a/src/kernel/tqclipboard_x11.cpp b/src/kernel/tqclipboard_x11.cpp
index 87ea4041a..8c97c9432 100644
--- a/src/kernel/tqclipboard_x11.cpp
+++ b/src/kernel/tqclipboard_x11.cpp
@@ -102,8 +102,8 @@ extern const char* tqt_xdnd_atom_to_str( Atom );
 
 static int clipboard_timeout = 5000; // 5s timeout on clipboard operations
 
-static TQWidget * owner = 0;
-static TQWidget *requestor = 0;
+static TQWidget * owner = nullptr;
+static TQWidget *requestor = nullptr;
 static bool inSelectionMode_obsolete = false; // ### remove 4.0
 static bool timer_event_clear = false;
 static int timer_id = 0;
@@ -122,15 +122,15 @@ static int capture_event_type = -1;
 static XEvent captured_event;
 
 class TQClipboardWatcher; // forward decl
-static TQClipboardWatcher *selection_watcher = 0;
-static TQClipboardWatcher *clipboard_watcher = 0;
+static TQClipboardWatcher *selection_watcher = nullptr;
+static TQClipboardWatcher *clipboard_watcher = nullptr;
 
 static void cleanup()
 {
     delete owner;
     delete requestor;
-    owner = 0;
-    requestor = 0;
+    owner = nullptr;
+    requestor = nullptr;
 }
 
 static
@@ -138,8 +138,8 @@ void setupOwner()
 {
     if ( owner )
 	return;
-    owner = new TQWidget( 0, "internal clipboard owner" );
-    requestor = new TQWidget(0, "internal clipboard requestor");
+    owner = new TQWidget( nullptr, "internal clipboard owner" );
+    requestor = new TQWidget(nullptr, "internal clipboard requestor");
     tqAddPostRoutine( cleanup );
 }
 
@@ -208,7 +208,7 @@ public:
 
 TQClipboardData::TQClipboardData()
 {
-    src = 0;
+    src = nullptr;
     timestamp = CurrentTime;
     tindex=0;
 }
@@ -220,23 +220,23 @@ void TQClipboardData::clear(bool destruct)
 {
     if(destruct)
 	delete src;
-    src = 0;
+    src = nullptr;
     timestamp = CurrentTime;
 }
 
 
-static TQClipboardData *internalCbData = 0;
-static TQClipboardData *internalSelData = 0;
+static TQClipboardData *internalCbData = nullptr;
+static TQClipboardData *internalSelData = nullptr;
 
 static void cleanupClipboardData()
 {
     delete internalCbData;
-    internalCbData = 0;
+    internalCbData = nullptr;
 }
 
 static TQClipboardData *clipboardData()
 {
-    if ( internalCbData == 0 ) {
+    if ( !internalCbData ) {
 	internalCbData = new TQClipboardData;
 	TQ_CHECK_PTR( internalCbData );
 	tqAddPostRoutine( cleanupClipboardData );
@@ -253,12 +253,12 @@ void tqt_clipboard_cleanup_mime_source(TQMimeSource *src)
 static void cleanupSelectionData()
 {
     delete internalSelData;
-    internalSelData = 0;
+    internalSelData = nullptr;
 }
 
 static TQClipboardData *selectionData()
 {
-    if (internalSelData == 0) {
+    if (!internalSelData) {
 	internalSelData = new TQClipboardData;
 	TQ_CHECK_PTR(internalSelData);
 	tqAddPostRoutine(cleanupSelectionData);
@@ -283,8 +283,8 @@ public:
 };
 
 typedef TQMap<Window,TQClipboardINCRTransaction*> TransactionMap;
-static TransactionMap *transactions = 0;
-static QX11EventFilter prev_x11_event_filter = 0;
+static TransactionMap *transactions = nullptr;
+static QX11EventFilter prev_x11_event_filter = nullptr;
 static int incr_timer_id = 0;
 
 static int tqt_xclb_transation_event_handler(XEvent *event)
@@ -340,7 +340,7 @@ TQClipboardINCRTransaction::~TQClipboardINCRTransaction(void)
     if (transactions->isEmpty()) {
 	VTQDEBUG("TQClipboard: no more INCR transations");
 	delete transactions;
-	transactions = 0;
+	transactions = nullptr;
 	(void)tqt_set_x11_event_filter(prev_x11_event_filter);
 
 	if (incr_timer_id != 0) {
@@ -387,7 +387,7 @@ int TQClipboardINCRTransaction::x11Event(XEvent *event)
 
 
 void TQClipboard::clear( Mode mode )
-{ setData(0, mode); }
+{ setData(nullptr, mode); }
 
 
 /*!
@@ -536,7 +536,7 @@ bool tqt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
 
         // process other clipboard events, since someone is probably requesting data from us
         XEvent e;
-        if (XCheckIfEvent(dpy, &e, checkForClipboardEvents, 0))
+        if (XCheckIfEvent(dpy, &e, checkForClipboardEvents, nullptr))
             tqApp->x11ProcessEvent(&e);
 
 	now = TQTime::currentTime();
@@ -552,7 +552,7 @@ bool tqt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
 	struct timeval usleep_tv;
 	usleep_tv.tv_sec = 0;
 	usleep_tv.tv_usec = 50000;
-	select(0, 0, 0, 0, &usleep_tv);
+	select(0, nullptr, nullptr, nullptr, &usleep_tv);
     } while ( started.msecsTo(now) < timeout );
 
     return false;
@@ -657,7 +657,7 @@ bool tqt_xclb_read_property( Display *dpy, Window win, Atom property,
  	    textprop.nitems = length;
  	    textprop.value = (unsigned char *) buffer->data();
 
- 	    char **list_ret = 0;
+ 	    char **list_ret = nullptr;
  	    int count;
 	    if ( XmbTextPropertyToTextList( dpy, &textprop, &list_ret,
 					    &count ) == Success &&
@@ -718,7 +718,7 @@ TQByteArray tqt_xclb_read_incremental_property( Display *dpy, Window win,
 	     event.xproperty.state != PropertyNewValue )
 	    continue;
 	if ( tqt_xclb_read_property(dpy, win, property, true, &tmp_buf,
-				   &length,0, 0, false) ) {
+				   &length,nullptr, nullptr, false) ) {
 	    if ( length == 0 ) {		// no more data, we're done
 		if ( nullterm ) {
 		    buf.resize( offset+1 );
@@ -746,7 +746,7 @@ TQByteArray tqt_xclb_read_incremental_property( Display *dpy, Window win,
     // timed out ... create a new requestor window, otherwise the requestor
     // could consider next request to be still part of this timed out request
     delete requestor;
-    requestor = new TQWidget( 0, "internal clipboard requestor" );
+    requestor = new TQWidget( nullptr, "internal clipboard requestor" );
 
     return TQByteArray();
 }
@@ -848,7 +848,7 @@ static Atom send_string_selection(TQClipboardData *d, Atom target, Window window
     }
 
     Atom xtarget = None;
-    const char *fmt = 0;
+    const char *fmt = nullptr;
     if (target == XA_STRING
 	|| (target == xa_text && TQTextCodec::codecForLocale()->mibEnum() == 4)) {
 	// the ICCCM states that STRING is latin1 plus newline and tab
@@ -1142,7 +1142,7 @@ bool TQClipboard::event( TQEvent *e )
 	    static Atom xa_multiple = *tqt_xdnd_str_to_atom("MULTIPLE");
 	    static Atom xa_timestamp = *tqt_xdnd_str_to_atom("TIMESTAMP");
 
-	    struct AtomPair { Atom target; Atom property; } *multi = 0;
+	    struct AtomPair { Atom target; Atom property; } *multi = nullptr;
 	    Atom multi_type = None;
 	    int multi_format = 0;
 	    int nmulti = 0;
@@ -1153,7 +1153,7 @@ bool TQClipboard::event( TQEvent *e )
 		TQByteArray multi_data;
 		if (req->property == None
 		    || !tqt_xclb_read_property(dpy, req->requestor, req->property,
-					      false, &multi_data, 0, &multi_type, &multi_format, 0)
+					      false, &multi_data, nullptr, &multi_type, &multi_format, 0)
 		    || multi_format != 32) {
 		    // MULTIPLE property not formatted correctly
 		    XSendEvent(dpy, req->requestor, False, NoEventMask, &event);
@@ -1273,9 +1273,9 @@ TQClipboardWatcher::TQClipboardWatcher( TQClipboard::Mode mode )
 TQClipboardWatcher::~TQClipboardWatcher()
 {
     if( selection_watcher == this )
-        selection_watcher = 0;
+        selection_watcher = nullptr;
     if( clipboard_watcher == this )
-        clipboard_watcher = 0;
+        clipboard_watcher = nullptr;
 }
 
 bool TQClipboardWatcher::empty() const
@@ -1296,7 +1296,7 @@ bool TQClipboardWatcher::empty() const
 const char* TQClipboardWatcher::format( int n ) const
 {
     if ( empty() )
-	return 0;
+	return nullptr;
 
     if (! formatList.count()) {
 	// get the list of targets from the current clipboard owner - we do this
@@ -1358,7 +1358,7 @@ const char* TQClipboardWatcher::format( int n ) const
 	return formatList[n];
     if (n == 0)
 	return "text/plain";
-    return 0;
+    return nullptr;
 }
 
 TQByteArray TQClipboardWatcher::encodedData( const char* fmt ) const
@@ -1391,7 +1391,7 @@ TQByteArray TQClipboardWatcher::encodedData( const char* fmt ) const
 		return TQByteArray( 0 );
 	    XGetGeometry(dpy,xpm, &r,&x,&y,&w,&h,&bw,&d);
 	    TQImageIO iio;
-	    GC gc = XCreateGC( dpy, xpm, 0, 0 );
+	    GC gc = XCreateGC( dpy, xpm, 0, nullptr );
 	    if ( d == 1 ) {
 		TQBitmap qbm(w,h);
 		XCopyArea(dpy,xpm,qbm.handle(),gc,0,0,w,h,0,0);
@@ -1449,7 +1449,7 @@ TQByteArray TQClipboardWatcher::getDataInFormat(Atom fmtatom) const
     XSelectInput(dpy, win, PropertyChangeMask);
 
     if ( tqt_xclb_read_property(dpy,win,tqt_selection_property,true,
-			       &buf,0,&type,0,false) ) {
+			       &buf,nullptr,&type,nullptr,false) ) {
 	if ( type == tqt_x_incr ) {
 	    int nbytes = buf.size() >= 4 ? *((int*)buf.data()) : 0;
 	    buf = tqt_xclb_read_incremental_property( dpy, win,
@@ -1477,7 +1477,7 @@ TQMimeSource* TQClipboard::data( Mode mode ) const
 #ifdef QT_CHECK_RANGE
 	tqWarning( "TQClipboard::data: invalid mode '%d'", mode );
 #endif // QT_CHECK_RANGE
-	return 0;
+	return nullptr;
     }
 
     if ( ! d->source() && ! timer_event_clear ) {
diff --git a/src/kernel/tqcolor.h b/src/kernel/tqcolor.h
index 96bb758bd..67aea5f16 100644
--- a/src/kernel/tqcolor.h
+++ b/src/kernel/tqcolor.h
@@ -131,7 +131,7 @@ public:
     static void destroyAllocContext( int );
 
 #if defined(TQ_WS_WIN)
-    static const TQRgb* palette( int* numEntries = 0 );
+    static const TQRgb* palette( int* numEntries = nullptr );
     static int setPaletteEntries( const TQRgb* entries, int numEntries,
 				  int base = -1 );
     static HPALETTE hPal()  { return hpal; }
diff --git a/src/kernel/tqcolor_x11.cpp b/src/kernel/tqcolor_x11.cpp
index 8ffd8205c..8328dd276 100644
--- a/src/kernel/tqcolor_x11.cpp
+++ b/src/kernel/tqcolor_x11.cpp
@@ -75,13 +75,13 @@ class TQColorScreenData {
 public:
     TQColorScreenData()
     {
-	colorDict = 0;
+	colorDict = nullptr;
 	colors_avail = true;
-	g_vis = 0;
-	g_carr = 0;
+	g_vis = nullptr;
+	g_carr = nullptr;
 	g_carr_fetch = true;
 	g_cells = 0;
-	g_our_alloc = 0;
+	g_our_alloc = nullptr;
 	color_reduce = false;
     }
 
@@ -102,7 +102,7 @@ public:
 };
 
 static int screencount = 0;
-static TQColorScreenData **screendata = 0; // array of screendata pointers
+static TQColorScreenData **screendata = nullptr; // array of screendata pointers
 
 
 /*
@@ -358,23 +358,23 @@ void TQColor::cleanup()
     for ( scr = 0; scr < screencount; scr++ ) {
 	if ( screendata[scr]->g_carr ) {
 	    delete [] screendata[scr]->g_carr;
-	    screendata[scr]->g_carr = 0;
+	    screendata[scr]->g_carr = nullptr;
 	}
 	if ( screendata[scr]->g_our_alloc ) {
 	    delete [] screendata[scr]->g_our_alloc;
-	    screendata[scr]->g_our_alloc = 0;
+	    screendata[scr]->g_our_alloc = nullptr;
 	}
 	if ( screendata[scr]->colorDict ) {
 	    screendata[scr]->colorDict->setAutoDelete( true );
 	    screendata[scr]->colorDict->clear();
 	    delete screendata[scr]->colorDict;
-	    screendata[scr]->colorDict = 0;
+	    screendata[scr]->colorDict = nullptr;
 	}
 	delete screendata[scr];
-	screendata[scr] = 0;
+	screendata[scr] = nullptr;
     }
     delete [] screendata;
-    screendata = 0;
+    screendata = nullptr;
     screencount = 0;
 }
 
diff --git a/src/kernel/tqconnection.cpp b/src/kernel/tqconnection.cpp
index 14c7ca41c..498c5515a 100644
--- a/src/kernel/tqconnection.cpp
+++ b/src/kernel/tqconnection.cpp
@@ -59,7 +59,7 @@ TQConnection::TQConnection( const TQObject *object, int member,
     mbr_name = memberName;
     mbr_type = memberType;
     nargs = 0;
-    if ( strstr(memberName,"()") == 0 ) {
+    if ( !strstr(memberName,"()") ) {
 	const char *p = memberName;
 	nargs++;
 	while ( *p ) {
diff --git a/src/kernel/tqconnection.h b/src/kernel/tqconnection.h
index 6b769484f..37a9837bb 100644
--- a/src/kernel/tqconnection.h
+++ b/src/kernel/tqconnection.h
@@ -51,7 +51,7 @@ public:
     TQConnection( const TQObject *, int, const char *memberName, int memberType );
    ~TQConnection() {}
 
-    bool     isConnected() const { return obj != 0; }
+    bool     isConnected() const { return obj; }
 
     TQObject *object() const  { return obj; }	// get object/member pointer
     int  member() const  { return mbr; }
diff --git a/src/kernel/tqcursor_x11.cpp b/src/kernel/tqcursor_x11.cpp
index d299bdd63..5a7d88216 100644
--- a/src/kernel/tqcursor_x11.cpp
+++ b/src/kernel/tqcursor_x11.cpp
@@ -74,7 +74,7 @@ TQCursorData::TQCursorData( int s )
 {
     cshape = s;
     hcurs = 0;
-    bm = bmm = 0;
+    bm = bmm = nullptr;
     hx = hy  = 0;
     pm = pmm = 0;
 }
@@ -126,7 +126,7 @@ const TQCursor & TQt::busyCursor = cursorTable[16];
 
 TQCursor *TQCursor::find_cur( int shape )		// find predefined cursor
 {
-    return (uint)shape <= LastCursor ? &cursorTable[shape] : 0;
+    return (uint)shape <= LastCursor ? &cursorTable[shape] : nullptr;
 }
 
 
@@ -147,7 +147,7 @@ void TQCursor::cleanup()
     for( shape = 0; shape <= LastCursor; shape++ ) {
 	if ( cursorTable[shape].data && cursorTable[shape].data->deref() )
 	    delete cursorTable[shape].data;
-	cursorTable[shape].data = 0;
+	cursorTable[shape].data = nullptr;
     }
     initialized = false;
 }
@@ -177,7 +177,7 @@ TQCursor::TQCursor()
 {
     if ( !initialized ) {
 	if ( tqApp->startingUp() ) {
-	    data = 0;
+	    data = nullptr;
 	    return;
 	}
 	initialize();
@@ -584,7 +584,7 @@ void TQCursor::update() const
     static const uchar *cursor_bits16[] = {
 	cur_ver_bits, mcur_ver_bits, cur_hor_bits, mcur_hor_bits,
 	cur_bdiag_bits, mcur_bdiag_bits, cur_fdiag_bits, mcur_fdiag_bits,
-	0, 0, cur_blank_bits, cur_blank_bits };
+	nullptr, nullptr, cur_blank_bits, cur_blank_bits };
 
     static const uchar vsplit_bits[] = {
 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -685,7 +685,7 @@ void TQCursor::update() const
 
     static const uchar * const cursor_bits32[] = {
 	vsplit_bits, vsplitm_bits, hsplit_bits, hsplitm_bits,
-	0, 0, 0, 0, whatsthis_bits, whatsthism_bits, busy_bits, busym_bits
+	nullptr, nullptr, nullptr, nullptr, whatsthis_bits, whatsthism_bits, busy_bits, busym_bits
     };
 
     static const uchar forbidden_bits[] = {
diff --git a/src/kernel/tqdesktopwidget.h b/src/kernel/tqdesktopwidget.h
index 4126e3c65..285cd1244 100644
--- a/src/kernel/tqdesktopwidget.h
+++ b/src/kernel/tqdesktopwidget.h
@@ -58,7 +58,7 @@ public:
     int numScreens() const;
     int primaryScreen() const;
 
-    int screenNumber( TQWidget *widget = 0 ) const; // ### 4.0: const TQWidget*
+    int screenNumber( TQWidget *widget = nullptr ) const; // ### 4.0: const TQWidget*
     int screenNumber( const TQPoint & ) const;
 
     TQWidget *screen( int screen = -1 );
diff --git a/src/kernel/tqdesktopwidget_x11.cpp b/src/kernel/tqdesktopwidget_x11.cpp
index 1e84d9112..5929aa60d 100644
--- a/src/kernel/tqdesktopwidget_x11.cpp
+++ b/src/kernel/tqdesktopwidget_x11.cpp
@@ -65,7 +65,7 @@ public:
 };
 
 TQSingleDesktopWidget::TQSingleDesktopWidget()
-    : TQWidget( 0, "desktop", WType_Desktop )
+    : TQWidget( nullptr, "desktop", WType_Desktop )
 {
 }
 
@@ -95,7 +95,7 @@ public:
 
 TQDesktopWidgetPrivate::TQDesktopWidgetPrivate()
     : use_xinerama(false), defaultScreen(0), screenCount(0),
-      screens( 0 ), rects( 0 ), workareas( 0 )
+      screens( nullptr ), rects( nullptr ), workareas( nullptr )
 {
 }
 
@@ -105,7 +105,7 @@ TQDesktopWidgetPrivate::~TQDesktopWidgetPrivate()
         for ( int i = 0; i < screenCount; ++i ) {
             if (i == defaultScreen) continue;
             delete screens[i];
-            screens[i] = 0;
+            screens[i] = nullptr;
         }
 
         free(screens);
@@ -121,7 +121,7 @@ void TQDesktopWidgetPrivate::init()
     int newScreenCount = ScreenCount(TQPaintDevice::x11AppDisplay());
 
 #ifndef TQT_NO_XINERAMA
-    XineramaScreenInfo *xinerama_screeninfo = 0;
+    XineramaScreenInfo *xinerama_screeninfo = nullptr;
 
     // we ignore the Xinerama extension when the display is using
     // traditional multi-screen (with multiple root windows)
@@ -203,7 +203,7 @@ void TQDesktopWidgetPrivate::init()
 // the TQDesktopWidget itself will be created on the default screen
 // as tqt_x11_create_desktop_on_screen defaults to -1
 TQDesktopWidget::TQDesktopWidget()
-    : TQWidget( 0, "desktop", WType_Desktop )
+    : TQWidget( nullptr, "desktop", WType_Desktop )
 {
     d = new TQDesktopWidgetPrivate();
 
@@ -281,7 +281,7 @@ const TQRect& TQDesktopWidget::availableGeometry( int screen ) const
             DefaultScreen(TQPaintDevice::x11AppDisplay()) : screen;
         Atom ret;
         int format, e;
-        unsigned char *data = 0;
+        unsigned char *data = nullptr;
         unsigned long nitems, after;
 
         e = XGetWindowProperty( TQPaintDevice::x11AppDisplay(),
diff --git a/src/kernel/tqdnd_x11.cpp b/src/kernel/tqdnd_x11.cpp
index a538c02f3..93d5fcba4 100644
--- a/src/kernel/tqdnd_x11.cpp
+++ b/src/kernel/tqdnd_x11.cpp
@@ -181,8 +181,8 @@ static Atom tqt_xdnd_dragsource_xid = 0;
 const int tqt_xdnd_max_type = 100;
 static Atom tqt_xdnd_types[tqt_xdnd_max_type];
 
-static TQIntDict<TQCString> * tqt_xdnd_drag_types = 0;
-static TQDict<Atom> * tqt_xdnd_atom_numbers = 0;
+static TQIntDict<TQCString> * tqt_xdnd_drag_types = nullptr;
+static TQDict<Atom> * tqt_xdnd_atom_numbers = nullptr;
 
 // timer used when target wants "continuous" move messages (eg. scroll)
 static int heartbeat = -1;
@@ -209,10 +209,10 @@ bool tqt_xdnd_dragging = false;
 static bool need_modifiers_check = false;
 
 // dict of payload data, sorted by type atom
-static TQIntDict<TQByteArray> * tqt_xdnd_target_data = 0;
+static TQIntDict<TQByteArray> * tqt_xdnd_target_data = nullptr;
 
 // first drag object, or 0
-static TQDragObject * tqt_xdnd_source_object = 0;
+static TQDragObject * tqt_xdnd_source_object = nullptr;
 
 // Motif dnd
 extern void tqt_motifdnd_enable( TQWidget *, bool );
@@ -228,16 +228,16 @@ static TQDropEvent::Action global_requested_action = TQDropEvent::Copy;
 static TQDropEvent::Action global_accepted_action = TQDropEvent::Copy;
 
 // for embedding only
-static TQWidget* current_embedding_widget  = 0;
+static TQWidget* current_embedding_widget  = nullptr;
 static XEvent last_enter_event;
 
 // cursors
-static TQCursor *noDropCursor = 0;
-static TQCursor *moveCursor = 0;
-static TQCursor *copyCursor = 0;
-static TQCursor *linkCursor = 0;
+static TQCursor *noDropCursor = nullptr;
+static TQCursor *moveCursor = nullptr;
+static TQCursor *copyCursor = nullptr;
+static TQCursor *linkCursor = nullptr;
 
-static TQPixmap *defaultPm = 0;
+static TQPixmap *defaultPm = nullptr;
 
 static const int default_pm_hotx = -2;
 static const int default_pm_hoty = -16;
@@ -262,7 +262,7 @@ class TQShapedPixmapWidget : public TQWidget {
 public:
     TQShapedPixmapWidget(int screen = -1) :
 	TQWidget(TQApplication::desktop()->screen( screen ),
-		0, WStyle_Customize | WStyle_Tool | WStyle_NoBorder | WX11BypassWM ), oldpmser( 0 ), oldbmser( 0 )
+		nullptr, WStyle_Customize | WStyle_Tool | WStyle_NoBorder | WX11BypassWM ), oldpmser( 0 ), oldbmser( 0 )
     {
     x11SetWindowType( X11WindowTypeDND );
     }
@@ -306,9 +306,9 @@ private:
     TQPoint oldhot;
 };
 
-static TQShapedPixmapWidget * tqt_xdnd_deco = 0;
+static TQShapedPixmapWidget * tqt_xdnd_deco = nullptr;
 
-static TQWidget* desktop_proxy = 0;
+static TQWidget* desktop_proxy = nullptr;
 
 class TQExtraWidget : public TQWidget
 {
@@ -321,7 +321,7 @@ public:
 static bool tqt_xdnd_enable( TQWidget* w, bool on )
 {
     if ( on ) {
-	TQWidget * xdnd_widget = 0;
+	TQWidget * xdnd_widget = nullptr;
 	if ( w->isDesktop() ) {
 	    if ( desktop_proxy ) // *WE* already have one.
 		return false;
@@ -339,7 +339,7 @@ static bool tqt_xdnd_enable( TQWidget* w, bool on )
 	    if ( type == XA_WINDOW && proxy_id_ptr ) {
 		proxy_id = *proxy_id_ptr;
 		XFree(proxy_id_ptr);
-		proxy_id_ptr = 0;
+		proxy_id_ptr = nullptr;
 		// Already exists. Real?
 		tqt_ignore_badwindow();
 		XGetWindowProperty( w->x11Display(), proxy_id,
@@ -384,7 +384,7 @@ static bool tqt_xdnd_enable( TQWidget* w, bool on )
 	    XDeleteProperty( w->x11Display(), w->winId(),
 			     tqt_xdnd_proxy );
 	    delete desktop_proxy;
-	    desktop_proxy = 0;
+	    desktop_proxy = nullptr;
 	}
 	return true;
     }
@@ -392,7 +392,7 @@ static bool tqt_xdnd_enable( TQWidget* w, bool on )
 
 const char* tqt_xdnd_atom_to_str( Atom a )
 {
-    if ( !a ) return 0;
+    if ( !a ) return nullptr;
 
     if ( a == XA_STRING )
 	return "text/plain"; // some Xdnd clients are dumb
@@ -405,7 +405,7 @@ const char* tqt_xdnd_atom_to_str( Atom a )
     if ( !(result=tqt_xdnd_drag_types->find( a )) ) {
 	const char* mimeType = XGetAtomName( TQPaintDevice::x11AppDisplay(), a );
 	if ( !mimeType )
-	    return 0; // only happens on protocol error
+	    return nullptr; // only happens on protocol error
 	result = new TQCString( mimeType );
 	tqt_xdnd_drag_types->insert( (long)a, result );
 	XFree((void*)mimeType);
@@ -416,7 +416,7 @@ const char* tqt_xdnd_atom_to_str( Atom a )
 Atom* tqt_xdnd_str_to_atom( const char *mimeType )
 {
     if ( !mimeType || !*mimeType )
-	return 0;
+	return nullptr;
     if ( !tqt_xdnd_atom_numbers ) {
 	tqt_xdnd_atom_numbers = new TQDict<Atom>( 17 );
 	tqt_xdnd_atom_numbers->setAutoDelete( true );
@@ -467,23 +467,23 @@ void tqt_xdnd_setup() {
 void tqt_xdnd_cleanup()
 {
     delete tqt_xdnd_drag_types;
-    tqt_xdnd_drag_types = 0;
+    tqt_xdnd_drag_types = nullptr;
     delete tqt_xdnd_atom_numbers;
-    tqt_xdnd_atom_numbers = 0;
+    tqt_xdnd_atom_numbers = nullptr;
     delete tqt_xdnd_target_data;
-    tqt_xdnd_target_data = 0;
+    tqt_xdnd_target_data = nullptr;
     delete noDropCursor;
-    noDropCursor = 0;
+    noDropCursor = nullptr;
     delete copyCursor;
-    copyCursor = 0;
+    copyCursor = nullptr;
     delete moveCursor;
-    moveCursor = 0;
+    moveCursor = nullptr;
     delete linkCursor;
-    linkCursor = 0;
+    linkCursor = nullptr;
     delete defaultPm;
-    defaultPm = 0;
+    defaultPm = nullptr;
     delete desktop_proxy;
-    desktop_proxy = 0;
+    desktop_proxy = nullptr;
 }
 
 
@@ -525,13 +525,13 @@ static bool checkEmbedded(TQWidget* w, const XEvent* xe)
     if (!w)
 	return false;
 
-    if (current_embedding_widget != 0 && current_embedding_widget != w) {
+    if (current_embedding_widget && current_embedding_widget != w) {
 	tqt_xdnd_current_target = ((TQExtraWidget*)current_embedding_widget)->extraData()->xDndProxy;
 	tqt_xdnd_current_proxy_target = tqt_xdnd_current_target;
 	tqt_xdnd_send_leave();
 	tqt_xdnd_current_target = 0;
 	tqt_xdnd_current_proxy_target = 0;
-	current_embedding_widget = 0;
+	current_embedding_widget = nullptr;
     }
 
     TQWExtra* extra = ((TQExtraWidget*)w)->extraData();
@@ -551,7 +551,7 @@ static bool checkEmbedded(TQWidget* w, const XEvent* xe)
 	tqt_xdnd_current_widget = w;
 	return true;
     }
-    current_embedding_widget = 0;
+    current_embedding_widget = nullptr;
     return false;
 }
 
@@ -680,7 +680,7 @@ void tqt_handle_xdnd_position( TQWidget *w, const XEvent * xe, bool passive )
 	}
 
 	if ( !c->acceptDrops() ) {
-	    tqt_xdnd_current_widget = 0;
+	    tqt_xdnd_current_widget = nullptr;
 	    answerRect = TQRect( p, TQSize( 1, 1 ) );
 	} else if ( xdndaction_to_qtaction(l[4]) < TQDropEvent::Private ) {
 	    tqt_xdnd_current_widget = c;
@@ -728,7 +728,7 @@ void tqt_handle_xdnd_position( TQWidget *w, const XEvent * xe, bool passive )
     TQWidget * source = TQWidget::find( tqt_xdnd_dragsource_xid );
 
     if ( source && source->isDesktop() && !source->acceptDrops() )
-	source = 0;
+	source = nullptr;
 
     if ( source )
 	tqt_handle_xdnd_status( source, (const XEvent *)&response, passive );
@@ -768,8 +768,8 @@ void tqt_handle_xdnd_leave( TQWidget *w, const XEvent * xe, bool /*passive*/ )
     }
 
     if (checkEmbedded(current_embedding_widget, xe)) {
-	current_embedding_widget = 0;
-	tqt_xdnd_current_widget = 0;
+	current_embedding_widget = nullptr;
+	tqt_xdnd_current_widget = nullptr;
 	return;
     }
 
@@ -782,13 +782,13 @@ void tqt_handle_xdnd_leave( TQWidget *w, const XEvent * xe, bool /*passive*/ )
 	// This often happens - leave other-process window quickly
 	//tqDebug( "xdnd drag leave from unexpected source (%08lx not %08lx",
 	       //l[0], tqt_xdnd_dragsource_xid );
-	tqt_xdnd_current_widget = 0;
+	tqt_xdnd_current_widget = nullptr;
 	return;
     }
 
     tqt_xdnd_dragsource_xid = 0;
     tqt_xdnd_types[0] = 0;
-    tqt_xdnd_current_widget = 0;
+    tqt_xdnd_current_widget = nullptr;
 }
 
 
@@ -811,7 +811,7 @@ void tqt_xdnd_send_leave()
     TQWidget * w = TQWidget::find( tqt_xdnd_current_proxy_target );
 
     if ( w && w->isDesktop() && !w->acceptDrops() )
-	w = 0;
+	w = nullptr;
 
     if ( w )
 	tqt_handle_xdnd_leave( w, (const XEvent *)&leave, false );
@@ -832,9 +832,9 @@ void tqt_handle_xdnd_drop( TQWidget *, const XEvent * xe, bool passive )
     }
 
     if (!passive && checkEmbedded(tqt_xdnd_current_widget, xe)){
-	current_embedding_widget = 0;
+	current_embedding_widget = nullptr;
 	tqt_xdnd_dragsource_xid = 0;
-	tqt_xdnd_current_widget = 0;
+	tqt_xdnd_current_widget = nullptr;
 	return;
     }
     const unsigned long *l = (const unsigned long *)xe->xclient.data.l;
@@ -878,7 +878,7 @@ void tqt_handle_xdnd_drop( TQWidget *, const XEvent * xe, bool passive )
 	TQApplication::sendEvent( tqt_xdnd_current_widget, &e );
     }
     tqt_xdnd_dragsource_xid = 0;
-    tqt_xdnd_current_widget = 0;
+    tqt_xdnd_current_widget = nullptr;
 
     // reset
     tqt_xdnd_target_current_time = CurrentTime;
@@ -894,11 +894,11 @@ void tqt_handle_xdnd_finished( TQWidget *, const XEvent * xe, bool passive )
 	//
 	if ( !passive )
 	    (void ) checkEmbedded( tqt_xdnd_current_widget, xe);
-	current_embedding_widget = 0;
+	current_embedding_widget = nullptr;
 	tqt_xdnd_current_target = 0;
 	tqt_xdnd_current_proxy_target = 0;
 	delete tqt_xdnd_source_object;
-	tqt_xdnd_source_object = 0;
+	tqt_xdnd_source_object = nullptr;
     }
 }
 
@@ -966,8 +966,8 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e)
 	if ( e->type() == TQEvent::KeyRelease &&
 	     ((TQKeyEvent*)e)->key() == Key_Escape ) {
 	    tqApp->removeEventFilter( this );
-	    object = 0;
-	    dragSource = 0;
+	    object = nullptr;
+	    dragSource = nullptr;
 	    beingCancelled = false;
 	    tqApp->exit_loop();
 	    return true; // block the key release
@@ -975,7 +975,7 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e)
 	return false;
     }
 
-    Q_ASSERT( object != 0 );
+    Q_ASSERT( object );
 
     if ( !o->isWidgetType() )
 	return false;
@@ -994,8 +994,8 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e)
 	    drop();
 	else
 	    cancel();
-	object = 0;
-	dragSource = 0;
+	object = nullptr;
+	dragSource = nullptr;
 	beingCancelled = false;
 	tqApp->exit_loop();
 	return true;
@@ -1020,8 +1020,8 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e)
 	if ( ke->key() == Key_Escape && e->type() == TQEvent::KeyPress ) {
 	    cancel();
 	    tqApp->removeEventFilter( this );
-	    object = 0;
-	    dragSource = 0;
+	    object = nullptr;
+	    dragSource = nullptr;
 	    beingCancelled = false;
 	    tqApp->exit_loop();
 	} else {
@@ -1064,7 +1064,7 @@ bool TQDragManager::updateMode( ButtonState newstate )
     if ( (newstate & both) == both ) {
 	global_requested_action = TQDropEvent::Link;
     } else {
-	bool local = tqt_xdnd_source_object != 0;
+	bool local = tqt_xdnd_source_object;
 	if ( drag_mode == TQDragObject::DragMove )
 	    global_requested_action = TQDropEvent::Move;
 	else if ( drag_mode == TQDragObject::DragCopy )
@@ -1136,7 +1136,7 @@ void TQDragManager::cancel( bool deleteSource )
     heartbeat = -1;
     if ( object ) {
 	beingCancelled = true;
-	object = 0;
+	object = nullptr;
     }
 
     if ( tqt_xdnd_current_target ) {
@@ -1152,9 +1152,9 @@ void TQDragManager::cancel( bool deleteSource )
 
     if ( deleteSource )
 	delete tqt_xdnd_source_object;
-    tqt_xdnd_source_object = 0;
+    tqt_xdnd_source_object = nullptr;
     delete tqt_xdnd_deco;
-    tqt_xdnd_deco = 0;
+    tqt_xdnd_deco = nullptr;
 
     dndCancelled = true;
 }
@@ -1270,7 +1270,7 @@ void TQDragManager::move( const TQPoint & globalPos )
 	    Atom type = None;
 	    int f;
 	    unsigned long n, a;
-	    unsigned char *data = 0;
+	    unsigned char *data = nullptr;
 	    XGetWindowProperty(TQPaintDevice::x11AppDisplay(), target, tqt_xdnd_aware, 0, 0, False,
                                AnyPropertyType, &type, &f,&n,&a,&data);
 	    if (data)
@@ -1294,9 +1294,9 @@ void TQDragManager::move( const TQPoint & globalPos )
     if ( target ) {
 	w = TQWidget::find( (WId)target );
 	if ( w && w->isDesktop() && !w->acceptDrops() )
-	    w = 0;
+	    w = nullptr;
     } else {
-	w = 0;
+	w = nullptr;
 	target = rootwin;
     }
 
@@ -1316,7 +1316,7 @@ void TQDragManager::move( const TQPoint & globalPos )
 	} else if ( type == XA_WINDOW && proxy_id ) {
 	    proxy_target = *proxy_id;
 	    XFree(proxy_id);
-	    proxy_id = 0;
+	    proxy_id = nullptr;
 	    r = XGetWindowProperty( tqt_xdisplay(), proxy_target, tqt_xdnd_proxy, 0,
 				    1, False, XA_WINDOW, &type, &f,&n,&a,(uchar**)&proxy_id );
 	    if ( ( r != Success ) || tqt_badwindow() || !type || !proxy_id || *proxy_id != proxy_target ) {
@@ -1425,7 +1425,7 @@ void TQDragManager::drop()
 	return;
 
     delete tqt_xdnd_deco;
-    tqt_xdnd_deco = 0;
+    tqt_xdnd_deco = nullptr;
 
     XClientMessageEvent drop;
     drop.type = ClientMessage;
@@ -1441,7 +1441,7 @@ void TQDragManager::drop()
     TQWidget * w = TQWidget::find( tqt_xdnd_current_proxy_target );
 
     if ( w && w->isDesktop() && !w->acceptDrops() )
-	w = 0;
+	w = nullptr;
 
     if ( w )
 	tqt_handle_xdnd_drop( w, (const XEvent *)&drop, false );
@@ -1465,9 +1465,9 @@ bool tqt_xdnd_handle_badwindow()
 	tqt_xdnd_current_target = 0;
 	tqt_xdnd_current_proxy_target = 0;
 	delete tqt_xdnd_source_object;
-	tqt_xdnd_source_object = 0;
+	tqt_xdnd_source_object = nullptr;
 	delete tqt_xdnd_deco;
-	tqt_xdnd_deco = 0;
+	tqt_xdnd_deco = nullptr;
 	return true;
     }
     if ( tqt_xdnd_dragsource_xid ) {
@@ -1475,7 +1475,7 @@ bool tqt_xdnd_handle_badwindow()
 	if ( tqt_xdnd_current_widget ) {
 	    TQDragLeaveEvent e;
 	    TQApplication::sendEvent( tqt_xdnd_current_widget, &e );
-	    tqt_xdnd_current_widget = 0;
+	    tqt_xdnd_current_widget = nullptr;
 	}
 	return true;
     }
@@ -1609,7 +1609,7 @@ static TQByteArray tqt_xdnd_obtain_data( const char *format )
 	    if ( tqt_xclb_read_property( TQPaintDevice::x11AppDisplay(),
 					tw->winId(),
 					tqt_xdnd_selection, true,
-					&result, 0, &type, 0, false ) ) {
+					&result, nullptr, &type, nullptr, false ) ) {
 		if ( type == tqt_incr_atom ) {
 		    int nbytes = result.size() >= 4 ? *((int*)result.data()) : 0;
 		    result = tqt_xclb_read_incremental_property( TQPaintDevice::x11AppDisplay(),
@@ -1722,11 +1722,11 @@ const char* TQDropEvent::format( int n ) const
     while( i<n && tqt_xdnd_types[i] )
 	i++;
     if ( i < n )
-	return 0;
+	return nullptr;
 
     const char* name = tqt_xdnd_atom_to_str( tqt_xdnd_types[i] );
     if ( !name )
-	return 0; // should never happen
+	return nullptr; // should never happen
 
     return name;
 }
@@ -1764,12 +1764,12 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode )
 	    struct timeval usleep_tv;
 	    usleep_tv.tv_sec = 0;
 	    usleep_tv.tv_usec = 50000;
-	    select(0, 0, 0, 0, &usleep_tv);
+	    select(0, nullptr, nullptr, nullptr, &usleep_tv);
 	} while ( tqt_xdnd_source_object && started.msecsTo(now) < 1000 );
     }
 
     tqt_xdnd_source_object = o;
-    tqt_xdnd_source_object->setTarget( 0 );
+    tqt_xdnd_source_object->setTarget( nullptr );
     tqt_xdnd_deco = new TQShapedPixmapWidget();
 
     willDrop = false;
@@ -1813,7 +1813,7 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode )
 #endif
 
     delete tqt_xdnd_deco;
-    tqt_xdnd_deco = 0;
+    tqt_xdnd_deco = nullptr;
     killTimer( heartbeat );
     heartbeat = -1;
     tqt_xdnd_current_screen = -1;
diff --git a/src/kernel/tqdragobject.cpp b/src/kernel/tqdragobject.cpp
index 73816323d..36e1b77a8 100644
--- a/src/kernel/tqdragobject.cpp
+++ b/src/kernel/tqdragobject.cpp
@@ -260,7 +260,7 @@ static const char * const link_xpm[] = {
 #ifndef TQT_NO_DRAGANDDROP
 
 // the universe's only drag manager
-TQDragManager * tqt_dnd_manager = 0;
+TQDragManager * tqt_dnd_manager = nullptr;
 
 
 TQDragManager::TQDragManager()
@@ -274,9 +274,9 @@ TQDragManager::TQDragManager()
 #if defined(TQ_WS_X11)
     createCursors(); // Xcursors cache can hold only 8 bitmaps (4 cursors)
 #endif
-    object = 0;
-    dragSource = 0;
-    dropWidget = 0;
+    object = nullptr;
+    dragSource = nullptr;
+    dropWidget = nullptr;
     if ( !tqt_dnd_manager )
 	tqt_dnd_manager = this;
     beingCancelled = false;
@@ -291,7 +291,7 @@ TQDragManager::~TQDragManager()
     if ( restoreCursor )
 	TQApplication::restoreOverrideCursor();
 #endif
-    tqt_dnd_manager = 0;
+    tqt_dnd_manager = nullptr;
     delete [] pm_cursor;
 }
 
@@ -310,7 +310,7 @@ TQDragObject::TQDragObject( TQWidget * dragSource, const char * name )
     : TQObject( dragSource, name )
 {
     d = new TQDragObjectData();
-    d->pm_cursor = 0;
+    d->pm_cursor = nullptr;
 #ifndef TQT_NO_DRAGANDDROP
     if ( !tqt_dnd_manager && tqApp )
 	(void)new TQDragManager();
@@ -564,7 +564,7 @@ TQWidget * TQDragObject::source()
     if ( parent() && parent()->isWidgetType() )
 	return (TQWidget *)parent();
     else
-	return 0;
+	return nullptr;
 }
 
 
@@ -628,7 +628,7 @@ const char * staticCharset(int i)
 	}
 	return localcharset;
     }
-    return 0;
+    return nullptr;
 }
 
 
@@ -745,7 +745,7 @@ void TQTextDrag::setText( const TQString &text )
 const char * TQTextDrag::format(int i) const
 {
     if ( i >= d->nfmt )
-	return 0;
+	return nullptr;
     return d->fmt[i];
 }
 
@@ -774,7 +774,7 @@ static TQTextCodec *codecForHTML(const TQCString &ba)
     // determine charset
     int mib = 0;
     int pos;
-    TQTextCodec *c = 0;
+    TQTextCodec *c = nullptr;
 
     if (ba.size() > 1 && (((uchar)ba[0] == 0xfe && (uchar)ba[1] == 0xff)
 			  || ((uchar)ba[0] == 0xff && (uchar)ba[1] == 0xfe))) {
@@ -810,7 +810,7 @@ static TQTextCodec *codecForHTML(const TQCString &ba)
 static
 TQTextCodec* findcodec(const TQMimeSource* e)
 {
-    TQTextCodec* r = 0;
+    TQTextCodec* r = nullptr;
     const char* f;
     int i;
     for ( i=0; (f=e->format(i)); i++ ) {
@@ -822,7 +822,7 @@ TQTextCodec* findcodec(const TQMimeSource* e)
 	if (r)
 	    return r;
     }
-    return 0;
+    return nullptr;
 }
 
 
@@ -873,7 +873,7 @@ bool TQTextDrag::canDecode( const TQMimeSource* e )
     const char* f;
     for (int i=0; (f=e->format(i)); i++) {
 	if ( 0==tqstrnicmp(f,"text/",5) ) {
-	    return findcodec(e) != 0;
+	    return findcodec(e);
 	}
     }
     return 0;
@@ -921,7 +921,7 @@ bool TQTextDrag::decode( const TQMimeSource* e, TQString& str, TQCString& subtyp
 	    TQCString foundst = m.mid(5,semi-5);
 	    if ( subtype.isNull() || foundst == subtype ) {
 		bool html = !tqstrnicmp(mime, "text/html", 9);
-		TQTextCodec* codec = 0;
+		TQTextCodec* codec = nullptr;
                 if (html) {
                     TQByteArray bytes = e->encodedData(mime);
 		    // search for the charset tag in the HTML
@@ -1012,7 +1012,7 @@ public:
 TQImageDrag::TQImageDrag( TQImage image,
 			TQWidget * dragSource, const char * name )
     : TQDragObject( dragSource, name ),
-	d(0)
+	d(nullptr)
 {
     setImage( image );
 }
@@ -1024,7 +1024,7 @@ TQImageDrag::TQImageDrag( TQImage image,
 
 TQImageDrag::TQImageDrag( TQWidget * dragSource, const char * name )
     : TQDragObject( dragSource, name ),
-	d(0)
+	d(nullptr)
 {
 }
 
@@ -1061,7 +1061,7 @@ void TQImageDrag::setImage( TQImage image )
     if(cacheType == TQMimeSource::NoCache) { //cache it
 	cacheType = TQMimeSource::Graphics;
 	cache.gfx.img = new TQImage( img );
-	cache.gfx.pix = 0;
+	cache.gfx.pix = nullptr;
     }
 }
 
@@ -1078,7 +1078,7 @@ const char * TQImageDrag::format(int i) const
 	    str = "image/ppm";
 	return str;
     } else {
-	return 0;
+	return nullptr;
     }
 }
 
@@ -1166,7 +1166,7 @@ bool TQImageDrag::decode( const TQMimeSource* e, TQImage& img )
     m->clearCache();
     m->cacheType = TQMimeSource::Graphics;
     m->cache.gfx.img = new TQImage( img );
-    m->cache.gfx.pix = 0;
+    m->cache.gfx.pix = nullptr;
     return true;
 }
 
@@ -1253,7 +1253,7 @@ const char * TQStoredDrag::format(int i) const
     if ( i==0 )
 	return d->fmt;
     else
-	return 0;
+	return nullptr;
 }
 
 
@@ -1698,7 +1698,7 @@ bool TQUriDrag::decodeToUnicodeUris( const TQMimeSource* e, TQStringList& l )
 */
 TQWidget* TQDropEvent::source() const
 {
-    return tqt_dnd_manager ? tqt_dnd_manager->dragSource : 0;
+    return tqt_dnd_manager ? tqt_dnd_manager->dragSource : nullptr;
 }
 #endif
 
diff --git a/src/kernel/tqdragobject.h b/src/kernel/tqdragobject.h
index a06e5ca2c..eb28067dc 100644
--- a/src/kernel/tqdragobject.h
+++ b/src/kernel/tqdragobject.h
@@ -57,7 +57,7 @@ class TQImageDragData;
 class TQ_EXPORT TQDragObject: public TQObject, public TQMimeSource {
     TQ_OBJECT
 public:
-    TQDragObject( TQWidget * dragSource = 0, const char * name = 0 );
+    TQDragObject( TQWidget * dragSource = nullptr, const char * name = nullptr );
     virtual ~TQDragObject();
 
 #ifndef TQT_NO_DRAGANDDROP
@@ -98,7 +98,7 @@ class TQ_EXPORT TQStoredDrag: public TQDragObject {
 
 public:
     TQStoredDrag( const char * mimeType,
-		 TQWidget * dragSource = 0, const char * name = 0 );
+		 TQWidget * dragSource = nullptr, const char * name = nullptr );
     ~TQStoredDrag();
 
     virtual void setEncodedData( const TQByteArray & );
@@ -118,8 +118,8 @@ class TQ_EXPORT TQTextDrag: public TQDragObject {
     TQTextDragPrivate* d;
 public:
     TQTextDrag( const TQString &,
-	       TQWidget * dragSource = 0, const char * name = 0 );
-    TQTextDrag( TQWidget * dragSource = 0, const char * name = 0 );
+	       TQWidget * dragSource = nullptr, const char * name = nullptr );
+    TQTextDrag( TQWidget * dragSource = nullptr, const char * name = nullptr );
     ~TQTextDrag();
 
     virtual void setText( const TQString &);
@@ -146,8 +146,8 @@ class TQ_EXPORT TQImageDrag: public TQDragObject {
     TQImageDragData* d;
 
 public:
-    TQImageDrag( TQImage image, TQWidget * dragSource = 0, const char * name = 0 );
-    TQImageDrag( TQWidget * dragSource = 0, const char * name = 0 );
+    TQImageDrag( TQImage image, TQWidget * dragSource = nullptr, const char * name = nullptr );
+    TQImageDrag( TQWidget * dragSource = nullptr, const char * name = nullptr );
     ~TQImageDrag();
 
     virtual void setImage( TQImage image );
@@ -171,8 +171,8 @@ class TQ_EXPORT TQUriDrag: public TQStoredDrag {
     TQ_OBJECT
 
 public:
-    TQUriDrag( TQStrList uris, TQWidget * dragSource = 0, const char * name = 0 );
-    TQUriDrag( TQWidget * dragSource = 0, const char * name = 0 );
+    TQUriDrag( TQStrList uris, TQWidget * dragSource = nullptr, const char * name = nullptr );
+    TQUriDrag( TQWidget * dragSource = nullptr, const char * name = nullptr );
     ~TQUriDrag();
 
     void setFilenames( const TQStringList & fnames ) { setFileNames( fnames ); }
@@ -202,8 +202,8 @@ class TQ_EXPORT TQColorDrag : public TQStoredDrag
     TQColor color;
 
 public:
-    TQColorDrag( const TQColor &col, TQWidget *dragsource = 0, const char *name = 0 );
-    TQColorDrag( TQWidget * dragSource = 0, const char * name = 0 );
+    TQColorDrag( const TQColor &col, TQWidget *dragsource = nullptr, const char *name = nullptr );
+    TQColorDrag( TQWidget * dragSource = nullptr, const char * name = nullptr );
     void setColor( const TQColor &col );
 
     static bool canDecode( TQMimeSource * );
diff --git a/src/kernel/tqdrawutil.cpp b/src/kernel/tqdrawutil.cpp
index a05908895..f95fe2391 100644
--- a/src/kernel/tqdrawutil.cpp
+++ b/src/kernel/tqdrawutil.cpp
@@ -887,7 +887,7 @@ static void qDrawMotifArrow( TQPainter *p, TQt::ArrowType type, bool down,
     }
 
     TQColor *cols[5];
-    cols[0] = 0;
+    cols[0] = nullptr;
     cols[1] = (TQColor *)&g.button();
     cols[2] = (TQColor *)&g.mid();
     cols[3] = (TQColor *)&g.light();
diff --git a/src/kernel/tqdrawutil.h b/src/kernel/tqdrawutil.h
index 78ffc0ac8..159070c20 100644
--- a/src/kernel/tqdrawutil.h
+++ b/src/kernel/tqdrawutil.h
@@ -69,42 +69,42 @@ TQ_EXPORT void qDrawShadeLine( TQPainter *p, const TQPoint &p1, const TQPoint &p
 TQ_EXPORT void qDrawShadeRect( TQPainter *p, int x, int y, int w, int h,
 			      const TQColorGroup &, bool sunken=false,
 			      int lineWidth = 1, int midLineWidth = 0,
-			      const TQBrush *fill = 0 );
+			      const TQBrush *fill = nullptr );
 
 TQ_EXPORT void qDrawShadeRect( TQPainter *p, const TQRect &r,
 			      const TQColorGroup &, bool sunken=false,
 			      int lineWidth = 1, int midLineWidth = 0,
-			      const TQBrush *fill = 0 );
+			      const TQBrush *fill = nullptr );
 
 TQ_EXPORT void qDrawShadePanel( TQPainter *p, int x, int y, int w, int h,
 			       const TQColorGroup &, bool sunken=false,
-			       int lineWidth = 1, const TQBrush *fill = 0 );
+			       int lineWidth = 1, const TQBrush *fill = nullptr );
 
 TQ_EXPORT void qDrawShadePanel( TQPainter *p, const TQRect &r,
 			       const TQColorGroup &, bool sunken=false,
-			       int lineWidth = 1, const TQBrush *fill = 0 );
+			       int lineWidth = 1, const TQBrush *fill = nullptr );
 
 TQ_EXPORT void qDrawWinButton( TQPainter *p, int x, int y, int w, int h,
 			      const TQColorGroup &g, bool sunken = false,
-			      const TQBrush *fill = 0 );
+			      const TQBrush *fill = nullptr );
 
 TQ_EXPORT void qDrawWinButton( TQPainter *p, const TQRect &r,
 			      const TQColorGroup &g, bool sunken = false,
-			      const TQBrush *fill = 0 );
+			      const TQBrush *fill = nullptr );
 
 TQ_EXPORT void qDrawWinPanel( TQPainter *p, int x, int y, int w, int h,
 			     const TQColorGroup &, bool sunken=false,
-			     const TQBrush *fill = 0 );
+			     const TQBrush *fill = nullptr );
 
 TQ_EXPORT void qDrawWinPanel( TQPainter *p, const TQRect &r,
 			     const TQColorGroup &, bool sunken=false,
-			     const TQBrush *fill = 0 );
+			     const TQBrush *fill = nullptr );
 
 TQ_EXPORT void qDrawPlainRect( TQPainter *p, int x, int y, int w, int h, const TQColor &,
-			      int lineWidth = 1, const TQBrush *fill = 0 );
+			      int lineWidth = 1, const TQBrush *fill = nullptr );
 
 TQ_EXPORT void qDrawPlainRect( TQPainter *p, const TQRect &r, const TQColor &,
-			      int lineWidth = 1, const TQBrush *fill = 0 );
+			      int lineWidth = 1, const TQBrush *fill = nullptr );
 
 
 //
@@ -118,7 +118,7 @@ TQ_EXPORT TQRect qItemRect( TQPainter *p, TQt::GUIStyle gs, int x, int y, int w,
 TQ_EXPORT void qDrawItem( TQPainter *p, TQt::GUIStyle gs, int x, int y, int w, int h,
 			 int flags, const TQColorGroup &g, bool enabled,
 			 const TQPixmap *pixmap, const TQString& text,
-			 int len=-1, const TQColor* penColor = 0 );
+			 int len=-1, const TQColor* penColor = nullptr );
 
 TQ_EXPORT void qDrawArrow( TQPainter *p, TQt::ArrowType type, TQt::GUIStyle style, bool down,
 			  int x, int y, int w, int h,
diff --git a/src/kernel/tqevent.cpp b/src/kernel/tqevent.cpp
index 053c00223..0deb5b381 100644
--- a/src/kernel/tqevent.cpp
+++ b/src/kernel/tqevent.cpp
@@ -2270,7 +2270,7 @@ TQTabletEvent::TQTabletEvent( Type t, const TQPoint &pos, const TQPoint &globalP
 */
 
 TQCustomEvent::TQCustomEvent( int type )
-    : TQEvent( (TQEvent::Type)type ), d( 0 )
+    : TQEvent( (TQEvent::Type)type ), d( nullptr )
 {
 }
 
diff --git a/src/kernel/tqevent.h b/src/kernel/tqevent.h
index 96205c0a7..017107abb 100644
--- a/src/kernel/tqevent.h
+++ b/src/kernel/tqevent.h
@@ -512,7 +512,7 @@ public:
     TQDropEvent( const TQPoint& pos, Type typ=Drop )
 	: TQEvent(typ), p(pos),
 	  act(0), accpt(0), accptact(0), resv(0),
-	  d(0)
+	  d(nullptr)
 	{}
     const TQPoint &pos() const	{ return p; }
     bool isAccepted() const	{ return accpt || accptact; }
diff --git a/src/kernel/tqeventloop.cpp b/src/kernel/tqeventloop.cpp
index 9b3d3cb2b..dc77c1ad5 100644
--- a/src/kernel/tqeventloop.cpp
+++ b/src/kernel/tqeventloop.cpp
@@ -140,7 +140,7 @@ TQEventLoop::~TQEventLoop()
     TQThread* thread = TQThread::currentThreadObject();
     if (thread) {
         if (thread->d) {
-            thread->d->eventLoop = 0;
+            thread->d->eventLoop = nullptr;
         }
     }
 #else
@@ -241,7 +241,7 @@ int TQEventLoop::enterLoop()
 	emit tqApp->aboutToQuit();
 
 	// send deferred deletes
-	TQApplication::sendPostedEvents( 0, TQEvent::DeferredDelete );
+	TQApplication::sendPostedEvents( nullptr, TQEvent::DeferredDelete );
     }
 
     return d->looplevel;
diff --git a/src/kernel/tqeventloop.h b/src/kernel/tqeventloop.h
index 8ae467f2b..b7d45dce5 100644
--- a/src/kernel/tqeventloop.h
+++ b/src/kernel/tqeventloop.h
@@ -69,7 +69,7 @@ class TQ_EXPORT TQEventLoop : public TQObject
     TQ_OBJECT
 
 public:
-    TQEventLoop( TQObject *parent = 0, const char *name = 0 );
+    TQEventLoop( TQObject *parent = nullptr, const char *name = nullptr );
     ~TQEventLoop();
 
     enum ProcessEvents {
diff --git a/src/kernel/tqeventloop_unix.cpp b/src/kernel/tqeventloop_unix.cpp
index 9c2c2fb43..56d37c5dc 100644
--- a/src/kernel/tqeventloop_unix.cpp
+++ b/src/kernel/tqeventloop_unix.cpp
@@ -91,13 +91,13 @@ struct TimerInfo {				// internal timer info
 typedef TQPtrList<TimerInfo> TimerList;	// list of TimerInfo structs
 
 static TQBitArray *timerBitVec;			// timer bit vector
-static TimerList *timerList	= 0;		// timer list
+static TimerList *timerList	= nullptr;		// timer list
 
 static void	initTimers();
 void cleanupTimers();
 static timeval	watchtime;			// watch if time is turned back
 timeval		*tqt_wait_timer();
-timeval	*tqt_wait_timer_max = 0;
+timeval	*tqt_wait_timer_max = nullptr;
 
 //
 // Internal operator functions for timevals
@@ -192,7 +192,7 @@ static void insertTimer( const TimerInfo *ti )	// insert timer info into list
 
 static inline void getTime( timeval &t )	// get time of day
 {
-    gettimeofday( &t, 0 );
+    gettimeofday( &t, nullptr );
     while ( t.tv_usec >= 1000000 ) {		// NTP-related fix
 	t.tv_usec -= 1000000;
 	t.tv_sec++;
@@ -257,7 +257,7 @@ timeval *tqt_wait_timer()
 	tm = *tqt_wait_timer_max;
 	return &tm;
     }
-    return 0;					// no timers
+    return nullptr;					// no timers
 }
 
 // Timer initialization
@@ -271,16 +271,16 @@ static void initTimers()			// initialize timers
     timerList = new TimerList;
     TQ_CHECK_PTR( timerList );
     timerList->setAutoDelete( true );
-    gettimeofday( &watchtime, 0 );
+    gettimeofday( &watchtime, nullptr );
 }
 
 // Timer cleanup
 void cleanupTimers()
 {
     delete timerList;
-    timerList = 0;
+    timerList = nullptr;
     delete timerBitVec;
-    timerBitVec = 0;
+    timerBitVec = nullptr;
 }
 
 // Main timer functions for starting and killing timers
@@ -345,7 +345,7 @@ bool qKillTimer( TQObject *obj )
  Socket notifier type
  *****************************************************************************/
 TQSockNotType::TQSockNotType()
-    : list( 0 )
+    : list( nullptr )
 {
     FD_ZERO( &select_fds );
     FD_ZERO( &enabled_fds );
@@ -356,7 +356,7 @@ TQSockNotType::~TQSockNotType()
 {
     if ( list )
 	delete list;
-    list = 0;
+    list = nullptr;
 }
 
 /*****************************************************************************
@@ -366,7 +366,7 @@ void TQEventLoop::registerSocketNotifier( TQSocketNotifier *notifier )
 {
     int sockfd = notifier->socket();
     int type = notifier->type();
-    if ( sockfd < 0 || sockfd >= FD_SETSIZE || type < 0 || type > 2 || notifier == 0 ) {
+    if ( sockfd < 0 || sockfd >= FD_SETSIZE || type < 0 || type > 2 || !notifier ) {
 #if defined(QT_CHECK_RANGE)
 	tqWarning( "TQSocketNotifier: Internal error" );
 #endif
@@ -418,7 +418,7 @@ void TQEventLoop::unregisterSocketNotifier( TQSocketNotifier *notifier )
 {
     int sockfd = notifier->socket();
     int type = notifier->type();
-    if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 ) {
+    if ( sockfd < 0 || type < 0 || type > 2 || !notifier ) {
 #if defined(QT_CHECK_RANGE)
 	tqWarning( "TQSocketNotifier: Internal error" );
 #endif
@@ -455,7 +455,7 @@ void TQEventLoop::setSocketNotifierPending( TQSocketNotifier *notifier )
 {
     int sockfd = notifier->socket();
     int type = notifier->type();
-    if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 ) {
+    if ( sockfd < 0 || type < 0 || type > 2 || !notifier ) {
 #if defined(QT_CHECK_RANGE)
 	tqWarning( "TQSocketNotifier: Internal error" );
 #endif
@@ -529,7 +529,7 @@ int TQEventLoop::activateTimers()
     bool first = true;
     timeval currentTime;
     int n_act = 0, maxCount = timerList->count();
-    TimerInfo *begin = 0;
+    TimerInfo *begin = nullptr;
     TimerInfo *t;
 
     for ( ;; ) {
@@ -565,7 +565,7 @@ int TQEventLoop::activateTimers()
 	if ( !timerList )	// sendEvent allows other threads to execute, therefore we must check for list existence when it returns!
 	    return 0;
 	if ( timerList->findRef( begin ) == -1 )
-	    begin = 0;
+	    begin = nullptr;
     }
     return n_act;
 }
diff --git a/src/kernel/tqeventloop_unix_glib.cpp b/src/kernel/tqeventloop_unix_glib.cpp
index 405723ad5..2e916afcf 100644
--- a/src/kernel/tqeventloop_unix_glib.cpp
+++ b/src/kernel/tqeventloop_unix_glib.cpp
@@ -103,13 +103,13 @@ struct TimerInfo {				// internal timer info
 typedef TQPtrList<TimerInfo> TimerList;		// list of TimerInfo structs
 
 static TQBitArray *timerBitVec;			// timer bit vector
-static TimerList  *timerList = 0;		// timer list
+static TimerList  *timerList = nullptr;		// timer list
 
 static void initTimers();
 void cleanupTimers();
 static timeval watchtime;			// watch if time is turned back
 timeval *tqt_wait_timer();
-timeval *tqt_wait_timer_max = 0;
+timeval *tqt_wait_timer_max = nullptr;
 
 //
 // Internal operator functions for timevals
@@ -324,9 +324,9 @@ static void initTimers()						// initialize timers
 void cleanupTimers()
 {
 	delete timerList;
-	timerList = 0;
+	timerList = nullptr;
 	delete timerBitVec;
-	timerBitVec = 0;
+	timerBitVec = nullptr;
 }
 
 // Main timer functions for starting and killing timers
@@ -467,7 +467,7 @@ void TQEventLoop::registerSocketNotifier( TQSocketNotifier *notifier )
 {
     int sockfd = notifier->socket();
     int type = notifier->type();
-    if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 ) {
+    if ( sockfd < 0 || type < 0 || type > 2 || !notifier ) {
 #if defined(QT_CHECK_RANGE)
          tqWarning( "TQSocketNotifier: Internal error" );
 #endif
@@ -522,7 +522,7 @@ void TQEventLoop::unregisterSocketNotifier( TQSocketNotifier *notifier )
 {
     int sockfd = notifier->socket();
     int type = notifier->type();
-    if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 ) {
+    if ( sockfd < 0 || type < 0 || type > 2 || !notifier ) {
 #if defined(QT_CHECK_RANGE)
          tqWarning( "TQSocketNotifier: Internal error" );
 #endif
@@ -558,7 +558,7 @@ void TQEventLoop::setSocketNotifierPending( TQSocketNotifier *notifier )
 {
     int sockfd = notifier->socket();
     int type = notifier->type();
-    if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 ) {
+    if ( sockfd < 0 || type < 0 || type > 2 || !notifier ) {
 #if defined(QT_CHECK_RANGE)
 	tqWarning( "TQSocketNotifier: Internal error" );
 #endif
@@ -642,7 +642,7 @@ int TQEventLoop::activateTimers()
 	bool first = true;
 	timeval currentTime;
 	int n_act = 0, maxCount = timerList->count();
-	TimerInfo *begin = 0;
+	TimerInfo *begin = nullptr;
 	TimerInfo *t;
 	
 	for ( ;; ) {
@@ -701,7 +701,7 @@ int TQEventLoop::activateTimers()
 		if (tqt_timerListMutex) tqt_timerListMutex->lock();
 #endif
 		if ( timerList->findRef( begin ) == -1 ) {
-			begin = 0;
+			begin = nullptr;
 		}
 	}
 #if defined(TQT_THREAD_SUPPORT)
diff --git a/src/kernel/tqeventloop_x11.cpp b/src/kernel/tqeventloop_x11.cpp
index ae6d636d9..0e4c23bbe 100644
--- a/src/kernel/tqeventloop_x11.cpp
+++ b/src/kernel/tqeventloop_x11.cpp
@@ -71,10 +71,10 @@ typedef void (*VFPTR)();
 typedef TQValueList<VFPTR> TQVFuncList;
 void tqt_install_preselect_handler( VFPTR );
 void tqt_remove_preselect_handler( VFPTR );
-static TQVFuncList *tqt_preselect_handler = 0;
+static TQVFuncList *tqt_preselect_handler = nullptr;
 void tqt_install_postselect_handler( VFPTR );
 void tqt_remove_postselect_handler( VFPTR );
-static TQVFuncList *tqt_postselect_handler = 0;
+static TQVFuncList *tqt_postselect_handler = nullptr;
 
 void tqt_install_preselect_handler( VFPTR handler )
 {
@@ -218,7 +218,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )
 
     // return the maximum time we can wait for an event.
     static timeval zerotm;
-    timeval *tm = 0;
+    timeval *tm = nullptr;
     if ( ! ( flags & ExcludeTimers ) ) {
 	if (TQApplication::isCoreThread()) {
 	    tm = tqt_wait_timer();			// wait for TQt timers
@@ -330,13 +330,13 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )
 		    do {
 			switch (type) {
 			case 0: // read
-			    ret = select(sn->fd + 1, &fdset, 0, 0, &zerotm);
+			    ret = select(sn->fd + 1, &fdset, nullptr, nullptr, &zerotm);
 			    break;
 			case 1: // write
-			    ret = select(sn->fd + 1, 0, &fdset, 0, &zerotm);
+			    ret = select(sn->fd + 1, nullptr, &fdset, nullptr, &zerotm);
 			    break;
 			case 2: // except
-			    ret = select(sn->fd + 1, 0, 0, &fdset, &zerotm);
+			    ret = select(sn->fd + 1, nullptr, nullptr, &fdset, &zerotm);
 			    break;
 			}
 		    } while (ret == -1 && (errno == EINTR || errno == EAGAIN));
diff --git a/src/kernel/tqeventloop_x11_glib.cpp b/src/kernel/tqeventloop_x11_glib.cpp
index d8331c6bb..e1429cd52 100644
--- a/src/kernel/tqeventloop_x11_glib.cpp
+++ b/src/kernel/tqeventloop_x11_glib.cpp
@@ -152,10 +152,10 @@ typedef void (*VFPTR)();
 typedef TQValueList<VFPTR> TQVFuncList;
 void tqt_install_preselect_handler( VFPTR );
 void tqt_remove_preselect_handler( VFPTR );
-static TQVFuncList *tqt_preselect_handler = 0;
+static TQVFuncList *tqt_preselect_handler = nullptr;
 void tqt_install_postselect_handler( VFPTR );
 void tqt_remove_postselect_handler( VFPTR );
-static TQVFuncList *tqt_postselect_handler = 0;
+static TQVFuncList *tqt_postselect_handler = nullptr;
 
 void tqt_install_preselect_handler( VFPTR handler )
 {
@@ -405,7 +405,7 @@ bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout)
 
 	// return the maximum time we can wait for an event.
 	static timeval zerotm;
-	timeval *tm = 0;
+	timeval *tm = nullptr;
 	if ( ! ( flags & ExcludeTimers ) ) {
 		if (TQApplication::isCoreThread()) {
 			tm = tqt_wait_timer();				// wait for TQt timers
diff --git a/src/kernel/tqfont.cpp b/src/kernel/tqfont.cpp
index fe4d16c57..dc31d1381 100644
--- a/src/kernel/tqfont.cpp
+++ b/src/kernel/tqfont.cpp
@@ -131,7 +131,7 @@ bool TQFontDef::operator==( const TQFontDef &other ) const
 
 
 TQFontPrivate::TQFontPrivate()
-    : engineData( 0 ), paintdevice( 0 ),
+    : engineData( nullptr ), paintdevice( nullptr ),
       rawMode( false ), underline( false ), overline( false ), strikeOut( false ),
       mask( 0 )
 {
@@ -143,7 +143,7 @@ TQFontPrivate::TQFontPrivate()
 }
 
 TQFontPrivate::TQFontPrivate( const TQFontPrivate &other )
-    : TQShared(), request( other.request ), engineData( 0 ),
+    : TQShared(), request( other.request ), engineData( nullptr ),
       paintdevice( other.paintdevice ), screen( other.screen ),
       rawMode( other.rawMode ), underline( other.underline ), overline( other.overline ),
       strikeOut( other.strikeOut ), mask( other.mask )
@@ -154,13 +154,13 @@ TQFontPrivate::~TQFontPrivate()
 {
     if ( engineData )
 	engineData->deref();
-    engineData = 0;
+    engineData = nullptr;
 }
 
 void TQFontPrivate::resolve( const TQFontPrivate *other )
 {
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( other != 0 );
+    Q_ASSERT( other );
 #endif
 
     if ( ( mask & Complete ) == Complete ) return;
@@ -224,7 +224,7 @@ TQFontEngineData::~TQFontEngineData()
     for ( int i = 0; i < TQFont::LastPrivateScript; i++ ) {
 	if ( engines[i] )
 	    engines[i]->deref();
-	engines[i] = 0;
+	engines[i] = nullptr;
     }
 #else
     if ( engine )
@@ -550,7 +550,7 @@ void TQFont::detach()
     if (d->count == 1) {
 	if ( d->engineData )
 	    d->engineData->deref();
-	d->engineData = 0;
+	d->engineData = nullptr;
 
 	return;
     }
@@ -643,7 +643,7 @@ TQFont::~TQFont()
 {
     if ( d->deref() )
 	delete d;
-    d = 0;
+    d = nullptr;
 }
 
 /*!
@@ -1255,7 +1255,7 @@ bool TQFont::exactMatch() const
 {
     TQFontEngine *engine = d->engineForScript( TQFont::NoScript );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
+    Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
 
     return d->rawMode ? engine->type() != TQFontEngine::Box
@@ -1376,7 +1376,7 @@ void TQFont::setDefaultFont( const TQFont &f )
  *****************************************************************************/
 
 typedef TQDict<TQStringList> TQFontSubst;
-static TQFontSubst *fontSubst = 0;
+static TQFontSubst *fontSubst = nullptr;
 static TQSingleCleanupHandler<TQFontSubst> tqfont_cleanup_fontsubst;
 
 
@@ -1396,7 +1396,7 @@ static void initFontSubst()
 	"helvetica",    "Arial",
 #endif
 
-	0,              0
+	nullptr,              nullptr
     };
 
     if (fontSubst)
@@ -1407,7 +1407,7 @@ static void initFontSubst()
     fontSubst->setAutoDelete( true );
     tqfont_cleanup_fontsubst.set(&fontSubst);
 
-    for ( int i=0; initTbl[i] != 0; i += 2 )
+    for ( int i=0; initTbl[i]; i += 2 )
 	TQFont::insertSubstitution(TQString::fromLatin1(initTbl[i]),
 				  TQString::fromLatin1(initTbl[i+1]));
 }
@@ -1550,7 +1550,7 @@ TQStringList TQFont::substitutions()
 static TQ_UINT8 get_font_bits( const TQFontPrivate *f )
 {
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( f != 0 );
+    Q_ASSERT( f );
 #endif
 
     TQ_UINT8 bits = 0;
@@ -1581,7 +1581,7 @@ static TQ_UINT8 get_font_bits( const TQFontPrivate *f )
 static void set_font_bits( TQ_UINT8 bits, TQFontPrivate *f )
 {
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( f != 0 );
+    Q_ASSERT( f );
 #endif
 
     f->request.italic        = (bits & 0x01) != 0;
@@ -1887,7 +1887,7 @@ TQDataStream &operator>>( TQDataStream &s, TQFont &font )
   that is not screen-compatible.
 */
 TQFontMetrics::TQFontMetrics( const TQFont &font )
-    : d( font.d ), painter( 0 ), fscript( TQFont::NoScript )
+    : d( font.d ), painter( nullptr ), fscript( TQFont::NoScript )
 {
     d->ref();
 }
@@ -1899,7 +1899,7 @@ TQFontMetrics::TQFontMetrics( const TQFont &font )
     script.
 */
 TQFontMetrics::TQFontMetrics( const TQFont &font, TQFont::Script script )
-    : d( font.d ), painter( 0 ), fscript( script )
+    : d( font.d ), painter( nullptr ), fscript( script )
 {
     d->ref();
 }
@@ -1938,7 +1938,7 @@ TQFontMetrics::TQFontMetrics( const TQPainter *p )
     Constructs a copy of \a fm.
 */
 TQFontMetrics::TQFontMetrics( const TQFontMetrics &fm )
-    : d( fm.d ), painter( 0 ),  fscript( fm.fscript )
+    : d( fm.d ), painter( nullptr ),  fscript( fm.fscript )
 {
     d->ref();
 }
@@ -1985,8 +1985,8 @@ int TQFontMetrics::ascent() const
     TQFontEngine *engine = d->engineForScript( (TQFont::Script) fscript );
     TQFontEngine *latin_engine = d->engineForScript( TQFont::Latin );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
-    Q_ASSERT( latin_engine != 0 );
+    Q_ASSERT( engine );
+    Q_ASSERT( latin_engine );
 #endif // QT_CHECK_STATE
 
     return TQMAX(engine->ascent(), latin_engine->ascent());
@@ -2009,8 +2009,8 @@ int TQFontMetrics::descent() const
     TQFontEngine *engine = d->engineForScript( (TQFont::Script) fscript );
     TQFontEngine *latin_engine = d->engineForScript( TQFont::Latin );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
-    Q_ASSERT( latin_engine != 0 );
+    Q_ASSERT( engine );
+    Q_ASSERT( latin_engine );
 #endif // QT_CHECK_STATE
 
     return TQMAX(engine->descent(), latin_engine->descent());
@@ -2029,8 +2029,8 @@ int TQFontMetrics::height() const
     TQFontEngine *engine = d->engineForScript( (TQFont::Script) fscript );
     TQFontEngine *latin_engine = d->engineForScript( TQFont::Latin );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
-    Q_ASSERT( latin_engine != 0 );
+    Q_ASSERT( engine );
+    Q_ASSERT( latin_engine );
 #endif // QT_CHECK_STATE
 
     return (TQMAX(engine->ascent(), latin_engine->ascent()) +
@@ -2049,8 +2049,8 @@ int TQFontMetrics::leading() const
     TQFontEngine *engine = d->engineForScript( (TQFont::Script) fscript );
     TQFontEngine *latin_engine = d->engineForScript( TQFont::Latin );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
-    Q_ASSERT( latin_engine != 0 );
+    Q_ASSERT( engine );
+    Q_ASSERT( latin_engine );
 #endif // QT_CHECK_STATE
 
     return TQMAX(engine->leading(), latin_engine->leading());
@@ -2068,8 +2068,8 @@ int TQFontMetrics::lineSpacing() const
     TQFontEngine *engine = d->engineForScript( (TQFont::Script) fscript );
     TQFontEngine *latin_engine = d->engineForScript( TQFont::Latin );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
-    Q_ASSERT( latin_engine != 0 );
+    Q_ASSERT( engine );
+    Q_ASSERT( latin_engine );
 #endif // QT_CHECK_STATE
 
     return (TQMAX(engine->leading(), latin_engine->leading()) +
@@ -2092,8 +2092,8 @@ int TQFontMetrics::minLeftBearing() const
     TQFontEngine *engine = d->engineForScript( (TQFont::Script) fscript );
     TQFontEngine *latin_engine = d->engineForScript( TQFont::Latin );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
-    Q_ASSERT( latin_engine != 0 );
+    Q_ASSERT( engine );
+    Q_ASSERT( latin_engine );
 #endif // QT_CHECK_STATE
 
     return TQMIN(engine->minLeftBearing(), latin_engine->minLeftBearing());
@@ -2114,8 +2114,8 @@ int TQFontMetrics::minRightBearing() const
     TQFontEngine *engine = d->engineForScript( (TQFont::Script) fscript );
     TQFontEngine *latin_engine = d->engineForScript( TQFont::Latin );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
-    Q_ASSERT( latin_engine != 0 );
+    Q_ASSERT( engine );
+    Q_ASSERT( latin_engine );
 #endif // QT_CHECK_STATE
 
     return TQMIN(engine->minRightBearing(), latin_engine->minRightBearing());
@@ -2129,8 +2129,8 @@ int TQFontMetrics::maxWidth() const
     TQFontEngine *engine = d->engineForScript( (TQFont::Script) fscript );
     TQFontEngine *lengine = d->engineForScript( TQFont::Latin );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
-    Q_ASSERT( lengine != 0 );
+    Q_ASSERT( engine );
+    Q_ASSERT( lengine );
 #endif // QT_CHECK_STATE
 
     return TQMAX(engine->maxCharWidth(), lengine->maxCharWidth());
@@ -2147,7 +2147,7 @@ bool TQFontMetrics::inFont(TQChar ch) const
 
     TQFontEngine *engine = d->engineForScript( script );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
+    Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
 
     if ( engine->type() == TQFontEngine::Box ) return false;
@@ -2174,14 +2174,14 @@ int TQFontMetrics::leftBearing(TQChar ch) const
 
     TQFontEngine *engine = d->engineForScript( script );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
+    Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
 
     if ( engine->type() == TQFontEngine::Box ) return 0;
 
     glyph_t glyphs[10];
     int nglyphs = 9;
-    engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, false );
+    engine->stringToCMap( &ch, 1, glyphs, nullptr, &nglyphs, false );
     // ### can nglyphs != 1 happen at all? Not currently I think
     glyph_metrics_t gi = engine->boundingBox( glyphs[0] );
     return gi.x;
@@ -2208,14 +2208,14 @@ int TQFontMetrics::rightBearing(TQChar ch) const
 
     TQFontEngine *engine = d->engineForScript( script );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
+    Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
 
     if ( engine->type() == TQFontEngine::Box ) return 0;
 
     glyph_t glyphs[10];
     int nglyphs = 9;
-    engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, false );
+    engine->stringToCMap( &ch, 1, glyphs, nullptr, &nglyphs, false );
     // ### can nglyphs != 1 happen at all? Not currently I think
     glyph_metrics_t gi = engine->boundingBox( glyphs[0] );
     return gi.xoff - gi.x - gi.width;
@@ -2260,7 +2260,7 @@ int TQFontMetrics::width( const TQString &str, int len ) const
             if ( ::category( *ch ) != TQChar::Mark_NonSpacing && !qIsZeroWidthChar(ch->unicode())) {
                 TQFontEngine *engine = d->engineForScript( script );
 #ifdef QT_CHECK_STATE
-                Q_ASSERT( engine != 0 );
+                Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
 
                 glyph_t glyphs[8];
@@ -2390,12 +2390,12 @@ TQRect TQFontMetrics::boundingRect( TQChar ch ) const
 
     TQFontEngine *engine = d->engineForScript( script );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
+    Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
 
     glyph_t glyphs[10];
     int nglyphs = 9;
-    engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, false );
+    engine->stringToCMap( &ch, 1, glyphs, nullptr, &nglyphs, false );
     glyph_metrics_t gi = engine->boundingBox( glyphs[0] );
     return TQRect( gi.x, gi.y, gi.width, gi.height );
 }
@@ -2478,7 +2478,7 @@ TQRect TQFontMetrics::boundingRect( int x, int y, int w, int h, int flgs,
     TQRect rb;
     TQRect r(x, y, w, h);
     tqt_format_text( TQFont( d, d->paintdevice ), r, flgs|TQt::DontPrint, str, len, &rb,
-		    tabstops, tabarray, tabarraylen, intern, 0 );
+		    tabstops, tabarray, tabarraylen, intern, nullptr );
 
     return rb;
 }
@@ -2529,7 +2529,7 @@ int TQFontMetrics::underlinePos() const
 {
     TQFontEngine *engine = d->engineForScript( (TQFont::Script) fscript );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
+    Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
 
     return engine->underlinePosition();
@@ -2569,7 +2569,7 @@ int TQFontMetrics::lineWidth() const
 {
     TQFontEngine *engine = d->engineForScript( (TQFont::Script) fscript );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
+    Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
 
     return engine->lineThickness();
@@ -2642,7 +2642,7 @@ int TQFontMetrics::lineWidth() const
     that is not screen-compatible.
 */
 TQFontInfo::TQFontInfo( const TQFont &font )
-    : d( font.d ), painter( 0 ), fscript( TQFont::NoScript )
+    : d( font.d ), painter( nullptr ), fscript( TQFont::NoScript )
 {
     d->ref();
 }
@@ -2652,7 +2652,7 @@ TQFontInfo::TQFontInfo( const TQFont &font )
     script.
 */
 TQFontInfo::TQFontInfo( const TQFont &font, TQFont::Script script )
-    : d( font.d ), painter( 0 ), fscript( script )
+    : d( font.d ), painter( nullptr ), fscript( script )
 {
     d->ref();
 }
@@ -2662,7 +2662,7 @@ TQFontInfo::TQFontInfo( const TQFont &font, TQFont::Script script )
   Constructs a font info object from the painter's font \a p.
 */
 TQFontInfo::TQFontInfo( const TQPainter *p )
-    : painter( 0 ), fscript( TQFont::NoScript )
+    : painter( nullptr ), fscript( TQFont::NoScript )
 {
     TQPainter *painter = (TQPainter *) p;
 
@@ -2686,7 +2686,7 @@ TQFontInfo::TQFontInfo( const TQPainter *p )
     Constructs a copy of \a fi.
 */
 TQFontInfo::TQFontInfo( const TQFontInfo &fi )
-    : d(fi.d), painter(0), fscript( fi.fscript )
+    : d(fi.d), painter(nullptr), fscript( fi.fscript )
 {
     d->ref();
 }
@@ -2711,7 +2711,7 @@ TQFontInfo &TQFontInfo::operator=( const TQFontInfo &fi )
 	d = fi.d;
 	d->ref();
     }
-    painter = 0;
+    painter = nullptr;
     fscript = fi.fscript;
     return *this;
 }
@@ -2725,7 +2725,7 @@ TQString TQFontInfo::family() const
 {
     TQFontEngine *engine = d->engineForScript( (TQFont::Script) fscript );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
+    Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
     return engine->fontDef.family;
 }
@@ -2739,7 +2739,7 @@ int TQFontInfo::pointSize() const
 {
     TQFontEngine *engine = d->engineForScript( (TQFont::Script) fscript );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
+    Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
     return ( engine->fontDef.pointSize + 5 ) / 10;
 }
@@ -2753,7 +2753,7 @@ int TQFontInfo::pixelSize() const
 {
     TQFontEngine *engine = d->engineForScript( (TQFont::Script) fscript );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
+    Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
     return engine->fontDef.pixelSize;
 }
@@ -2767,7 +2767,7 @@ bool TQFontInfo::italic() const
 {
     TQFontEngine *engine = d->engineForScript( (TQFont::Script) fscript );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
+    Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
     return engine->fontDef.italic;
 }
@@ -2781,7 +2781,7 @@ int TQFontInfo::weight() const
 {
     TQFontEngine *engine = d->engineForScript( (TQFont::Script) fscript );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
+    Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
     return engine->fontDef.weight;
 
@@ -2848,7 +2848,7 @@ bool TQFontInfo::fixedPitch() const
 {
     TQFontEngine *engine = d->engineForScript( (TQFont::Script) fscript );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
+    Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
 #ifdef Q_OS_MAC
     if (!engine->fontDef.fixedPitchComputed) {
@@ -2875,7 +2875,7 @@ TQFont::StyleHint TQFontInfo::styleHint() const
 {
     TQFontEngine *engine = d->engineForScript( (TQFont::Script) fscript );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
+    Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
     return (TQFont::StyleHint) engine->fontDef.styleHint;
 }
@@ -2905,7 +2905,7 @@ bool TQFontInfo::exactMatch() const
 {
     TQFontEngine *engine = d->engineForScript( (TQFont::Script) fscript );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
+    Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
 
     return d->rawMode ? engine->type() != TQFontEngine::Box
@@ -2928,7 +2928,7 @@ static const int fast_timeout =  10000; // 10s
 static const int slow_timeout = 300000; //  5m
 #endif // TQFONTCACHE_DEBUG
 
-TQFontCache *TQFontCache::instance = 0;
+TQFontCache *TQFontCache::instance = nullptr;
 const uint TQFontCache::min_cost = 4*1024; // 4mb
 
 static TQSingleCleanupHandler<TQFontCache> cleanup_fontcache;
@@ -2938,7 +2938,7 @@ TQFontCache::TQFontCache()
     : TQObject( tqApp, "global font cache" ), total_cost( 0 ), max_cost( min_cost ),
       current_timestamp( 0 ), fast( false ), timer_id( -1 )
 {
-    Q_ASSERT( instance == 0 );
+    Q_ASSERT( !instance );
     instance = this;
     cleanup_fontcache.set( &instance );
 }
@@ -2975,14 +2975,14 @@ TQFontCache::~TQFontCache()
 	}
 	++it;
     }
-    instance = 0;
+    instance = nullptr;
 }
 
 TQFontEngineData *TQFontCache::findEngineData( const Key &key ) const
 {
     EngineDataCache::ConstIterator it = engineDataCache.find( key ),
 				  end = engineDataCache.end();
-    if ( it == end ) return 0;
+    if ( it == end ) return nullptr;
 
     // found
     return it.data();
@@ -3000,7 +3000,7 @@ TQFontEngine *TQFontCache::findEngine( const Key &key )
 {
     EngineCache::Iterator it = engineCache.find( key ),
 			 end = engineCache.end();
-    if ( it == end ) return 0;
+    if ( it == end ) return nullptr;
 
     // found... update the hitcount and timestamp
     it.data().hits++;
diff --git a/src/kernel/tqfont_x11.cpp b/src/kernel/tqfont_x11.cpp
index 86d3507bf..41bd6429a 100644
--- a/src/kernel/tqfont_x11.cpp
+++ b/src/kernel/tqfont_x11.cpp
@@ -143,7 +143,7 @@ static TQCString tqt_fixXLFD( const TQCString &xlfd )
 }
 
 typedef TQMap<TQFont::Script,TQString> FallbackMap;
-static FallbackMap *fallbackMap = 0;
+static FallbackMap *fallbackMap = nullptr;
 static TQSingleCleanupHandler<FallbackMap> tqt_fallback_font_family_cleanup;
 
 static void ensure_fallback_map()
@@ -260,11 +260,11 @@ void TQFont::initialize()
 
     // get some sample text based on the users locale. we use this to determine the
     // default script for the font system
-    TQCString oldlctime = setlocale(LC_TIME, 0);
+    TQCString oldlctime = setlocale(LC_TIME, nullptr);
     TQCString lctime = setlocale(LC_TIME, "");
 
-    time_t ttmp = time(0);
-    struct tm *tt = 0;
+    time_t ttmp = time(nullptr);
+    struct tm *tt = nullptr;
     char samp[64];
     TQString sample;
 
@@ -277,7 +277,7 @@ void TQFont::initialize()
 	tt = localtime( &ttmp );
 #endif // TQT_THREAD_SUPPORT && _POSIX_THREAD_SAFE_FUNCTIONS
 
-	if ( tt != 0 && strftime( samp, 64, "%A%B", tt ) > 0 )
+	if ( tt && strftime( samp, 64, "%A%B", tt ) > 0 )
 	    if ( codec )
 		sample = codec->toUnicode( samp );
     }
@@ -312,7 +312,7 @@ void TQFont::cleanup()
 {
     // delete the global font cache
     delete TQFontCache::instance;
-    TQFontCache::instance = 0;
+    TQFontCache::instance = nullptr;
 }
 
 /*!
@@ -378,7 +378,7 @@ void TQFontPrivate::load( TQFont::Script script )
     if ( engineData->engines[script] ) return;
 
     // load the font
-    TQFontEngine *engine = 0;
+    TQFontEngine *engine = nullptr;
     //    double scale = 1.0; // ### TODO: fix the scale calculations
 
     // list of families to try
@@ -408,7 +408,7 @@ void TQFontPrivate::load( TQFont::Script script )
 		break;
 
 	    if ( ! req.family.isEmpty() )
-		engine = 0;
+		engine = nullptr;
 
 	    continue;
 	}
@@ -424,7 +424,7 @@ void TQFontPrivate::load( TQFont::Script script )
 */
 bool TQFont::dirty() const
 {
-    return d->engineData == 0;
+    return !d->engineData;
 }
 
 /*!
@@ -435,7 +435,7 @@ TQt::HANDLE TQFont::handle() const
 {
     TQFontEngine *engine = d->engineForScript( TQFontPrivate::defaultScript );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
+    Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
 
     switch ( engine->type() ) {
@@ -468,7 +468,7 @@ TQString TQFont::rawName() const
 {
     TQFontEngine *engine = d->engineForScript( TQFontPrivate::defaultScript );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
+    Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
 
     return TQString::fromLatin1( engine->name() );
@@ -578,7 +578,7 @@ static const char * const tryFonts[] = {
     "8x13",
     "9x15",
     "fixed",
-    0
+    nullptr
 };
 
 // Returns true if the font exists, false otherwise
@@ -660,7 +660,7 @@ int TQFontMetrics::width( TQChar ch ) const
 
     TQFontEngine *engine = d->engineForScript( script );
 #ifdef QT_CHECK_STATE
-    Q_ASSERT( engine != 0 );
+    Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
 
     glyph_t glyphs[8];
@@ -714,7 +714,7 @@ int TQFontMetrics::charWidth( const TQString &str, int pos ) const
     } else {
 	TQFontEngine *engine = d->engineForScript( script );
 #ifdef QT_CHECK_STATE
-	Q_ASSERT( engine != 0 );
+	Q_ASSERT( engine );
 #endif // QT_CHECK_STATE
 
 	glyph_t glyphs[8];
diff --git a/src/kernel/tqfontdata_p.h b/src/kernel/tqfontdata_p.h
index 89efd70d4..907f7fadd 100644
--- a/src/kernel/tqfontdata_p.h
+++ b/src/kernel/tqfontdata_p.h
@@ -242,7 +242,7 @@ public:
 
     // TQFontEngine cache
     struct Engine {
-	Engine() : data( 0 ), timestamp( 0 ), hits( 0 ) { }
+	Engine() : data( nullptr ), timestamp( 0 ), hits( 0 ) { }
 	Engine( TQFontEngine *d ) : data( d ), timestamp( 0 ), hits( 0 ) { }
 
 	TQFontEngine *data;
diff --git a/src/kernel/tqfontdatabase.cpp b/src/kernel/tqfontdatabase.cpp
index 502d150b1..26c52f9b5 100644
--- a/src/kernel/tqfontdatabase.cpp
+++ b/src/kernel/tqfontdatabase.cpp
@@ -79,9 +79,9 @@ static int ucstricmp( const TQString &as, const TQString &bs )
     const TQChar *b = bs.unicode();
     if ( a == b )
 	return 0;
-    if ( a == 0 )
+    if ( !a )
 	return 1;
-    if ( b == 0 )
+    if ( !b )
 	return -1;
     int l=TQMIN(as.length(),bs.length());
     while ( l-- && ::lower( *a ) == ::lower( *b ) )
@@ -159,7 +159,7 @@ TQtFontEncoding *TQtFontSize::encodingID( int id, uint xpoint, uint xres,
 	    return encodings + i;
     }
 
-    if ( !add ) return 0;
+    if ( !add ) return nullptr;
 
     if ( !(count % 4) )
 	encodings = ( TQtFontEncoding * )
@@ -206,10 +206,10 @@ struct TQtFontStyle
 
     TQtFontStyle( const Key &k )
 	: key( k ), bitmapScalable( false ), smoothScalable( false ),
-	  fakeOblique( false ), count( 0 ), pixelSizes( 0 )
+	  fakeOblique( false ), count( 0 ), pixelSizes( nullptr )
     {
 #if defined(TQ_WS_X11)
-	weightName = setwidthName = 0;
+	weightName = setwidthName = nullptr;
 #endif // TQ_WS_X11
     }
 
@@ -256,7 +256,7 @@ TQtFontSize *TQtFontStyle::pixelSize( unsigned short size, bool add )
 	    return pixelSizes + i;
     }
     if ( !add )
-	return 0;
+	return nullptr;
 
     if ( !(count % 8) )
 	pixelSizes = (TQtFontSize *)
@@ -265,14 +265,14 @@ TQtFontSize *TQtFontStyle::pixelSize( unsigned short size, bool add )
     pixelSizes[count].pixelSize = size;
 #ifdef TQ_WS_X11
     pixelSizes[count].count = 0;
-    pixelSizes[count].encodings = 0;
+    pixelSizes[count].encodings = nullptr;
 #endif
     return pixelSizes + (count++);
 }
 
 struct TQtFontFoundry
 {
-    TQtFontFoundry( const TQString &n ) : name( n ), count( 0 ), styles( 0 ) {}
+    TQtFontFoundry( const TQString &n ) : name( n ), count( 0 ), styles( nullptr ) {}
     ~TQtFontFoundry() {
 	while ( count-- )
 	    delete styles[count];
@@ -305,7 +305,7 @@ TQtFontStyle *TQtFontFoundry::style( const TQtFontStyle::Key &key, bool create )
 	pos = low;
     }
     if ( !create )
-	return 0;
+	return nullptr;
 
 //     tqDebug("adding key (weight=%d, italic=%d, oblique=%d stretch=%d) at %d",  key.weight, key.italic, key.oblique, key.stretch, pos );
     if ( !(count % 8) )
@@ -338,7 +338,7 @@ struct TQtFontFamily
 	fixedPitchComputed(false),
 #endif
 	fullyLoaded( false ),
-	  name( n ), count( 0 ), foundries( 0 ) {
+	  name( n ), count( 0 ), foundries( nullptr ) {
 	memset( scripts, 0, sizeof( scripts ) );
     }
     ~TQtFontFamily() {
@@ -391,7 +391,7 @@ TQtFontFoundry *TQtFontFamily::foundry( const TQString &f, bool create )
 	    return foundries[i];
     }
     if ( !create )
-	return 0;
+	return nullptr;
 
     if ( !(count % 8) )
 	foundries = (TQtFontFoundry **)
@@ -404,7 +404,7 @@ TQtFontFoundry *TQtFontFamily::foundry( const TQString &f, bool create )
 
 class TQFontDatabasePrivate {
 public:
-    TQFontDatabasePrivate() : count( 0 ), families( 0 ) { }
+    TQFontDatabasePrivate() : count( 0 ), families( nullptr ) { }
     ~TQFontDatabasePrivate() {
 	while ( count-- )
 	    delete families[count];
@@ -434,7 +434,7 @@ TQtFontFamily *TQFontDatabasePrivate::family( const TQString &f, bool create )
 	    return families[pos];
     }
     if ( !create )
-	return 0;
+	return nullptr;
 
     if ( res < 0 )
 	pos++;
@@ -645,7 +645,7 @@ static inline bool canRender( TQFontEngine *fe, TQFont::Script script )
 
 
 static TQSingleCleanupHandler<TQFontDatabasePrivate> tqfontdatabase_cleanup;
-static TQFontDatabasePrivate *db=0;
+static TQFontDatabasePrivate *db=nullptr;
 #define SMOOTH_SCALABLE 0xffff
 
 #if defined( TQ_WS_X11 )
@@ -698,7 +698,7 @@ static TQtFontStyle *bestStyle(TQtFontFoundry *foundry, const TQtFontStyle::Key
 static TQtFontEncoding *findEncoding(TQFont::Script script, int styleStrategy,
                                     TQtFontSize *size, int force_encoding_id)
 {
-    TQtFontEncoding *encoding = 0;
+    TQtFontEncoding *encoding = nullptr;
 
     if (force_encoding_id >= 0) {
         encoding = size->encodingID(force_encoding_id);
@@ -719,7 +719,7 @@ static TQtFontEncoding *findEncoding(TQFont::Script script, int styleStrategy,
 
     if (!encoding || !scripts_for_xlfd_encoding[encoding->encoding][script]) {
         // find the first encoding that supports the requested script
-        encoding = 0;
+        encoding = nullptr;
         for (int x = 0; !encoding && x < size->count; ++x) {
             const int enc = size->encodings[x].encoding;
             if (scripts_for_xlfd_encoding[enc][script]) {
@@ -768,7 +768,7 @@ unsigned int bestFoundry( TQFont::Script script, unsigned int score, int styleSt
 	}
 
 	int px = -1;
-	TQtFontSize *size = 0;
+	TQtFontSize *size = nullptr;
 
 	// 1. see if we have an exact matching size
 	if (! (styleStrategy & TQFont::ForceOutline)) {
@@ -798,7 +798,7 @@ unsigned int bestFoundry( TQFont::Script script, unsigned int score, int styleSt
 	}
 
 #ifdef TQ_WS_X11
-        TQtFontEncoding *encoding = 0;
+        TQtFontEncoding *encoding = nullptr;
 #endif
 
 	// 4. find closest size match
@@ -842,7 +842,7 @@ unsigned int bestFoundry( TQFont::Script script, unsigned int score, int styleSt
 #ifdef TQ_WS_X11
         if (size) {
             encoding = findEncoding(script, styleStrategy, size, force_encoding_id);
-            if (!encoding) size = 0;
+            if (!encoding) size = nullptr;
         }
 	if ( ! encoding ) {
 	    FM_DEBUG( "          foundry doesn't support the script we want" );
@@ -919,12 +919,12 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp,
     if ( !db )
 	initializeDb();
 
-    TQFontEngine *fe = 0;
+    TQFontEngine *fe = nullptr;
     if ( fp ) {
 	if ( fp->rawMode ) {
-	    fe = loadEngine( script, fp, request, 0, 0, 0
+	    fe = loadEngine( script, fp, request, nullptr, nullptr, nullptr
 #ifdef TQ_WS_X11
-			     , 0, 0, false
+			     , nullptr, nullptr, false
 #endif
 		);
 
@@ -1001,16 +1001,16 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp,
 	|| family_name == "Serif"
 	|| family_name == "Monospace") {
 	fe = loadFontConfigFont(fp, request, script);
-        usesFontConfig = (fe != 0);
+        usesFontConfig = (fe);
     }
     if (!fe)
     {
-	TQtFontFamily *best_family = 0;
-	TQtFontFoundry *best_foundry = 0;
-	TQtFontStyle *best_style = 0;
-	TQtFontSize *best_size = 0;
+	TQtFontFamily *best_family = nullptr;
+	TQtFontFoundry *best_foundry = nullptr;
+	TQtFontStyle *best_style = nullptr;
+	TQtFontSize *best_size = nullptr;
 #ifdef TQ_WS_X11
-	TQtFontEncoding *best_encoding = 0;
+	TQtFontEncoding *best_encoding = nullptr;
 #endif // TQ_WS_X11
 
 	unsigned int score = ~0;
@@ -1072,11 +1072,11 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp,
                     }
 	    }
 
-	    TQtFontFoundry *try_foundry = 0;
-	    TQtFontStyle *try_style = 0;
-	    TQtFontSize *try_size = 0;
+	    TQtFontFoundry *try_foundry = nullptr;
+	    TQtFontStyle *try_style = nullptr;
+	    TQtFontSize *try_size = nullptr;
 #ifdef TQ_WS_X11
-	    TQtFontEncoding *try_encoding = 0;
+	    TQtFontEncoding *try_encoding = nullptr;
 #endif // TQ_WS_X11
 
 	    // as we know the script is supported, we can be sure
@@ -1089,7 +1089,7 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp,
 			     , &try_encoding, force_encoding_id
 #endif
 		    );
-	    if ( try_foundry == 0 ) {
+	    if ( !try_foundry ) {
 		// the specific foundry was not found, so look for
 		// any foundry matching our requirements
 		newscore = bestFoundry( override_script, score, request.styleStrategy, try_family,
@@ -1116,9 +1116,9 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp,
 		break;
 	}
 
-	if ( best_family != 0 && best_foundry != 0 && best_style != 0
+	if ( best_family && best_foundry && best_style
 #ifdef TQ_WS_X11
-	     && best_size != 0 && best_encoding != 0
+	     && best_size && best_encoding
 #endif
 	    ) {
 	    FM_DEBUG( "  BEST:\n"
@@ -1177,7 +1177,7 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp,
 	    FM_DEBUG( "  WARN: font loaded cannot render a sample char" );
 
 	    delete fe;
-            fe = 0;
+            fe = nullptr;
 	} else if ( fp ) {
             TQFontDef def = request;
             if (def.family.isEmpty()) {
@@ -1209,7 +1209,7 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp,
 
     if (!fe) {
 	if ( !request.family.isEmpty() )
-            return 0;
+            return nullptr;
 
         FM_DEBUG( "returning box engine" );
 
@@ -1720,7 +1720,7 @@ TQValueList<int> TQFontDatabase::pointSizes( const TQString &family,
 
 		if (size->pixelSize != 0 && size->pixelSize != USHRT_MAX) {
 #ifdef TQ_WS_X11
-		    const uint pointSize = tqRound(tqt_pointSize(size->pixelSize, 0, -1));
+		    const uint pointSize = tqRound(tqt_pointSize(size->pixelSize, nullptr, -1));
 #else
 		    const uint pointSize = size->pixelSize; // embedded uses 72dpi
 #endif
@@ -1821,7 +1821,7 @@ TQValueList<int> TQFontDatabase::smoothSizes( const TQString &family,
 
 		if ( size->pixelSize != 0 && size->pixelSize != USHRT_MAX ) {
 #ifdef TQ_WS_X11
-		    const uint pointSize = tqRound(tqt_pointSize(size->pixelSize, 0, -1));
+		    const uint pointSize = tqRound(tqt_pointSize(size->pixelSize, nullptr, -1));
 #else
 		    const uint pointSize = size->pixelSize; // embedded uses 72dpi
 #endif
@@ -1965,7 +1965,7 @@ int TQFontDatabase::weight( const TQString &family,
 */
 TQString TQFontDatabase::scriptName(TQFont::Script script)
 {
-    const char *name = 0;
+    const char *name = nullptr;
 
     switch (script) {
     case TQFont::Latin:
diff --git a/src/kernel/tqfontdatabase_x11.cpp b/src/kernel/tqfontdatabase_x11.cpp
index d84e5c495..3377befc5 100644
--- a/src/kernel/tqfontdatabase_x11.cpp
+++ b/src/kernel/tqfontdatabase_x11.cpp
@@ -134,7 +134,7 @@ static const XlfdEncoding xlfd_encoding[] = {
     { "*-symbol", 34, 0, 0, make_tag('m','b','o','l') },
     { "*-fontspecific", 35, 0, 0, make_tag('i','f','i','c') },
     { "fontspecific-*", 36, 0, make_tag('f','o','n','t'), 0 },
-    { 0, 0, 0, 0, 0 }
+    { nullptr, 0, 0, 0, 0 }
 };
 
 static const char scripts_for_xlfd_encoding[37][61] = {
@@ -534,7 +534,7 @@ enum XLFDFieldNames {
 static bool parseXFontName( char *fontName, char **tokens )
 {
     if ( ! fontName || fontName[0] == '0' || fontName[0] != '-' ) {
-	tokens[0] = 0;
+	tokens[0] = nullptr;
 	return false;
     }
 
@@ -546,7 +546,7 @@ static bool parseXFontName( char *fontName, char **tokens )
 	    if ( *fontName == '-' )
 		break;
 	    if ( ! *fontName ) {
-		fontName = 0;
+		fontName = nullptr;
 		break;
 	    }
 	}
@@ -556,7 +556,7 @@ static bool parseXFontName( char *fontName, char **tokens )
 
     if ( i < NFontFields ) {
 	for ( int j = i ; j < NFontFields; ++j )
-	    tokens[j] = 0;
+	    tokens[j] = nullptr;
 	return false;
     }
 
@@ -632,10 +632,10 @@ bool tqt_fillFontDef( const TQCString &xlfd, TQFontDef *fd, int screen )
     if ( r && fd->pixelSize && TQPaintDevice::x11AppDpiY( screen ) &&
 	 r != TQPaintDevice::x11AppDpiY( screen ) ) {
 	// calculate actual pointsize for display DPI
-	fd->pointSize = tqRound(tqt_pointSize(fd->pixelSize, 0, screen) * 10.);
+	fd->pointSize = tqRound(tqt_pointSize(fd->pixelSize, nullptr, screen) * 10.);
     } else if ( fd->pixelSize == 0 && fd->pointSize ) {
 	// calculate pixel size from pointsize/dpi
-	fd->pixelSize = tqRound(tqt_pixelSize(fd->pointSize / 10., 0, screen));
+	fd->pixelSize = tqRound(tqt_pixelSize(fd->pointSize / 10., nullptr, screen));
     }
 
     return true;
@@ -707,7 +707,7 @@ static unsigned char encodingLoaded[numEncodings];
 
 static void loadXlfds( const char *reqFamily, int encoding_id )
 {
-    TQtFontFamily *fontFamily = reqFamily ? db->family( reqFamily ) : 0;
+    TQtFontFamily *fontFamily = reqFamily ? db->family( reqFamily ) : nullptr;
 
     // make sure we don't load twice
     if ( (encoding_id == -1 && xlfdsFullyLoaded) || (encoding_id != -1 && encodingLoaded[encoding_id]) )
@@ -850,7 +850,7 @@ static void loadXft()
 	{ "Serif", "serif", false },
 	{ "Sans Serif", "sans-serif", false },
         { "Monospace", "monospace", true },
-	{ 0, 0, false }
+	{ nullptr, nullptr, false }
     };
     const XftDefaultFont *f = defaults;
     while (f->qtname) {
@@ -934,7 +934,7 @@ static bool loadXftFont( FcPattern* font )
     int spacing_value;
     char *file_value;
     int index_value;
-    char *foundry_value = 0;
+    char *foundry_value = nullptr;
     FcBool scalable = FcTrue;
 
 	if (XftPatternGetString( font,
@@ -948,7 +948,7 @@ static bool loadXftFont( FcPattern* font )
 	slant_value = XFT_SLANT_ROMAN;
 	weight_value = XFT_WEIGHT_MEDIUM;
 	spacing_value = XFT_PROPORTIONAL;
-	file_value = 0;
+	file_value = nullptr;
 	index_value = 0;
 	XftPatternGetInteger (font, XFT_SLANT, 0, &slant_value);
 	XftPatternGetInteger (font, XFT_WEIGHT, 0, &weight_value);
@@ -956,13 +956,13 @@ static bool loadXftFont( FcPattern* font )
 	XftPatternGetString (font, XFT_FILE, 0, &file_value);
 	XftPatternGetInteger (font, XFT_INDEX, 0, &index_value);
 	FcPatternGetBool(font, FC_SCALABLE, 0, &scalable);
-	foundry_value = 0;
+	foundry_value = nullptr;
 	XftPatternGetString(font, FC_FOUNDRY, 0, &foundry_value);
 	TQtFontFamily *family = db->family( familyName, true );
 	family->rawName = rawName;
 	family->hasXft = true;
 
-	FcCharSet *charset = 0;
+	FcCharSet *charset = nullptr;
 	FcResult res = FcPatternGetCharSet(font, FC_CHARSET, 0, &charset);
 	if (res == FcResultMatch && FcCharSetCount(charset) > 1) {
 	    for (int i = 0; i < TQFont::LastPrivateScript; ++i) {
@@ -1063,11 +1063,11 @@ static void load( const TQString &family = TQString::null, int script = -1 )
             return;
 #endif // TQT_NO_XFTFREETYPE
 	if ( script == -1 )
-	    loadXlfds( 0, -1 );
+	    loadXlfds( nullptr, -1 );
 	else {
 	    for ( int i = 0; i < numEncodings; i++ ) {
 		if ( scripts_for_xlfd_encoding[i][script] )
-		    loadXlfds( 0, i );
+		    loadXlfds( nullptr, i );
 	    }
 	}
     } else {
@@ -1303,7 +1303,7 @@ TQFontEngine *loadEngine( TQFont::Script script,
 
 	XFontStruct *xfs;
 	if (! (xfs = XLoadQueryFont(TQPaintDevice::x11AppDisplay(), xlfd.data() ) ) )
-	    return 0;
+	    return nullptr;
 
 	TQFontEngine *fe = new TQFontEngineXLFD( xfs, xlfd.data(), 0 );
 	if ( ! tqt_fillFontDef( xfs, &fe->fontDef, TQPaintDevice::x11AppScreen() ) &&
@@ -1319,7 +1319,7 @@ TQFontEngine *loadEngine( TQFont::Script script,
 	FM_DEBUG( "    using Xft" );
 
 	XftPattern *pattern = XftPatternCreate();
-	if ( !pattern ) return 0;
+	if ( !pattern ) return nullptr;
 
 	bool symbol = (family->scripts[TQFont::UnknownScript] == TQtFontFamily::Supported);
 	if (!symbol && script != TQFont::Unicode) {
@@ -1370,7 +1370,7 @@ TQFontEngine *loadEngine( TQFont::Script script,
 	}
 	XftPatternDestroy(pattern);
 	if (!result)
-	    return 0;
+	    return nullptr;
 
         // somehow this gets lost in the XftMatch call, reset the anitaliasing property correctly.
         if (request.styleStrategy & (TQFont::PreferAntialias|TQFont::NoAntialias)) {
@@ -1385,7 +1385,7 @@ TQFontEngine *loadEngine( TQFont::Script script,
 	XftFont *xftfs = XftFontOpenPattern( TQPaintDevice::x11AppDisplay(), dup );
 
 	if ( ! xftfs ) // Xft couldn't find a font?
-	    return 0;
+	    return nullptr;
 
 	TQFontEngine *fe = new TQFontEngineXft( xftfs, result, symbol ? 1 : 0 );
 	if (fp->paintdevice
@@ -1450,9 +1450,9 @@ TQFontEngine *loadEngine( TQFont::Script script,
 
     XFontStruct *xfs;
     if (! (xfs = XLoadQueryFont(TQPaintDevice::x11AppDisplay(), xlfd.data() ) ) )
-	return 0;
+	return nullptr;
 
-    TQFontEngine *fe = 0;
+    TQFontEngine *fe = nullptr;
     const int mib = xlfd_encoding[ encoding->encoding ].mib;
     if (script == TQFont::Latin && encoding->encoding <= LAST_LATIN_ENCODING && !forced_encoding) {
 	fe = new TQFontEngineLatinXLFD( xfs, xlfd.data(), mib );
@@ -1488,7 +1488,7 @@ static void parseFontName(const TQString &name, TQString &foundry, TQString &fam
 static TQFontEngine *loadFontConfigFont(const TQFontPrivate *fp, const TQFontDef &request, TQFont::Script script)
 {
     if (!tqt_has_xft)
-	return 0;
+	return nullptr;
 
     TQStringList family_list;
     if (request.family.isEmpty()) {
@@ -1539,7 +1539,7 @@ static TQFontEngine *loadFontConfigFont(const TQFontPrivate *fp, const TQFontDef
 
     // XftFontMatch calls the right ConfigSubstitute variants, but as we use
     // FcFontMatch/Sort here we have to do it manually.
-    FcConfigSubstitute(0, pattern, FcMatchPattern);
+    FcConfigSubstitute(nullptr, pattern, FcMatchPattern);
     XftDefaultSubstitute(TQPaintDevice::x11AppDisplay(), TQPaintDevice::x11AppScreen(), pattern);
 
 //     tqDebug("1: pattern contains:");
@@ -1593,25 +1593,25 @@ static TQFontEngine *loadFontConfigFont(const TQFontPrivate *fp, const TQFontDef
 	FcPatternPrint(pattern);
 #endif
 
-    TQFontEngine *fe = 0;
+    TQFontEngine *fe = nullptr;
 
     for( int jj = (FcGetVersion() >= 20392 ? 0 : 1); jj < 2; ++jj ) {
         bool use_fontsort = ( jj == 1 );
 
     FcResult result;
-        FcFontSet *fs = 0;
-        FcPattern *fsp = 0;
+        FcFontSet *fs = nullptr;
+        FcPattern *fsp = nullptr;
 
     // Properly conform to fontconfig API. We need to call FcDefaultSubstitute()
     // before FcFontSort()/FcFontMatch().
     FcDefaultSubstitute(pattern);
 
         if( use_fontsort ) {
-            fs = FcFontSort(0, pattern, FcFalse, 0, &result);
+            fs = FcFontSort(nullptr, pattern, FcFalse, nullptr, &result);
     if (!fs)
                 continue;
         } else {
-            fsp = FcFontMatch(0, pattern, &result);
+            fsp = FcFontMatch(nullptr, pattern, &result);
             if (!fsp)
                 continue;
         }
@@ -1694,7 +1694,7 @@ static TQFontEngine *loadFontConfigFont(const TQFontPrivate *fp, const TQFontDef
 	    if ( script != TQFont::Unicode && !canRender(fe, script) ) {
 		FM_DEBUG( "  WARN: font loaded cannot render samples" );
 		delete fe;
-		fe = 0;
+		fe = nullptr;
 	    }else
 		FM_DEBUG( "  USE: %s", fe->fontDef.family.latin1() );
 	}
diff --git a/src/kernel/tqfontengine_p.h b/src/kernel/tqfontengine_p.h
index b05b3386d..1a314752f 100644
--- a/src/kernel/tqfontengine_p.h
+++ b/src/kernel/tqfontengine_p.h
@@ -87,7 +87,7 @@ public:
     TQFontEngine() {
 	count = 0; cache_count = 0;
 #ifdef TQ_WS_X11
-	transformed_fonts = 0;
+	transformed_fonts = nullptr;
 #endif
     }
     virtual ~TQFontEngine();
@@ -98,7 +98,7 @@ public:
 
 #ifdef TQ_WS_X11
     virtual int cmap() const { return -1; }
-    virtual TQOpenType *openType() const { return 0; }
+    virtual TQOpenType *openType() const { return nullptr; }
 #endif
 
     virtual void draw( TQPainter *p, int x, int y, const TQTextEngine *engine, const TQScriptItem *si, int textFlags ) = 0;
@@ -431,9 +431,9 @@ public:
         Q_ASSERT(script < TQFont::NScripts);
         return supported_scripts[script];
     }
-    void selectScript(unsigned int script, const Features *features = 0);
+    void selectScript(unsigned int script, const Features *features = nullptr);
 
-    bool shape(TQShaperItem *item, const unsigned int *properties = 0);
+    bool shape(TQShaperItem *item, const unsigned int *properties = nullptr);
     bool positionAndAdd(TQShaperItem *item, int availableGlyphs, bool doLogClusters = true);
 
     OTL_GlyphItem glyphs() const { return otl_buffer->in_string; }
diff --git a/src/kernel/tqfontengine_x11.cpp b/src/kernel/tqfontengine_x11.cpp
index 3d264742d..4d8b615a1 100644
--- a/src/kernel/tqfontengine_x11.cpp
+++ b/src/kernel/tqfontengine_x11.cpp
@@ -90,7 +90,7 @@ inline static void qSafeXDestroyImage( XImage *x )
 {
     if ( x->data ) {
 	free( x->data );
-	x->data = 0;
+	x->data = nullptr;
     }
     XDestroyImage( x );
 }
@@ -400,7 +400,7 @@ TQFontEngine::Type TQFontEngineBox::type() const
 
 static inline XCharStruct *charStruct( XFontStruct *xfs, uint ch )
 {
-    XCharStruct *xcs = 0;
+    XCharStruct *xcs = nullptr;
     unsigned char r = ch>>8;
     unsigned char c = ch&0xff;
     if ( r >= xfs->min_byte1 &&
@@ -415,14 +415,14 @@ static inline XCharStruct *charStruct( XFontStruct *xfs, uint ch )
 				    xfs->min_char_or_byte2 + 1)) +
 		  (c - xfs->min_char_or_byte2);
 	    if (xcs->width == 0 && xcs->ascent == 0 &&  xcs->descent == 0)
-		xcs = 0;
+		xcs = nullptr;
 	}
     }
     return xcs;
 }
 
 TQFontEngineXLFD::TQFontEngineXLFD( XFontStruct *fs, const char *name, int mib )
-    : _fs( fs ), _name( name ), _codec( 0 ), _scale( 1. ), _cmap( mib )
+    : _fs( fs ), _name( name ), _codec( nullptr ), _scale( 1. ), _cmap( mib )
 {
     if ( _cmap ) _codec = TQTextCodec::codecForMib( _cmap );
 
@@ -456,7 +456,7 @@ TQFontEngineXLFD::TQFontEngineXLFD( XFontStruct *fs, const char *name, int mib )
 TQFontEngineXLFD::~TQFontEngineXLFD()
 {
     XFreeFont( TQPaintDevice::x11AppDisplay(), _fs );
-    _fs = 0;
+    _fs = nullptr;
     TransformedFont *trf = transformed_fonts;
     while ( trf ) {
 	XUnloadFont( TQPaintDevice::x11AppDisplay(), trf->xlfd_font );
@@ -527,7 +527,7 @@ TQFontEngine::Error TQFontEngineXLFD::stringToCMap( const TQChar *str, int len,
 	    while ( g-- != glyphs ) {
 		unsigned int gl = *g;
 		xcs = (gl >= _fs->min_char_or_byte2 && gl <= _fs->max_char_or_byte2) ?
-		      base + gl : 0;
+		      base + gl : nullptr;
 		*(--a) = (!xcs || (!xcs->width && !xcs->ascent && !xcs->descent)) ? _fs->ascent : xcs->width;
 	    }
 	}
@@ -602,7 +602,7 @@ void TQFontEngineXLFD::draw( TQPainter *p, int x, int y, const TQTextEngine *eng
 
 	    // check if we have it cached
 	    TransformedFont *trf = transformed_fonts;
-	    TransformedFont *prev = 0;
+	    TransformedFont *prev = nullptr;
 	    int i = 0;
 	    while ( trf ) {
 		if ( trf->xx == mat[0] &&
@@ -942,9 +942,9 @@ bool TQFontEngineXLFD::canRender( const TQChar *string, int len )
     glyph_t glyphs[256];
     int nglyphs = 255;
     glyph_t *g = glyphs;
-    if ( stringToCMap( string, len, g, 0, &nglyphs, false ) == OutOfMemory ) {
+    if ( stringToCMap( string, len, g, nullptr, &nglyphs, false ) == OutOfMemory ) {
 	g = (glyph_t *)malloc( nglyphs*sizeof(glyph_t) );
-	stringToCMap( string, len, g, 0, &nglyphs, false );
+	stringToCMap( string, len, g, nullptr, &nglyphs, false );
     }
 
     bool allExist = true;
@@ -999,10 +999,10 @@ TQFontEngineLatinXLFD::~TQFontEngineLatinXLFD()
 {
     for ( int i = 0; i < _count; ++i ) {
 	delete _engines[i];
-	_engines[i] = 0;
+	_engines[i] = nullptr;
     }
     delete [] _engines;
-    _engines = 0;
+    _engines = nullptr;
 }
 
 void TQFontEngineLatinXLFD::findEngine( const TQChar &ch )
@@ -1024,7 +1024,7 @@ void TQFontEngineLatinXLFD::findEngine( const TQChar &ch )
     static const int mib_count = sizeof( alternate_encodings ) / sizeof( const char * );
 
     // see if one of the above mibs can map the char we want
-    TQTextCodec *codec = 0;
+    TQTextCodec *codec = nullptr;
     int which = -1;
     int i;
     for ( i = 0; i < mib_count; ++i ) {
@@ -1050,10 +1050,10 @@ void TQFontEngineLatinXLFD::findEngine( const TQChar &ch )
 
     const int enc_id = tqt_xlfd_encoding_id( alternate_encodings[which] );
     TQFontDef req = fontDef;
-    TQFontEngine *engine = TQFontDatabase::findFont( TQFont::Latin, 0, req, enc_id );
+    TQFontEngine *engine = TQFontDatabase::findFont( TQFont::Latin, nullptr, req, enc_id );
     if ( ! engine ) {
 	req.family = TQString::null;
-	engine = TQFontDatabase::findFont( TQFont::Latin, 0, req, enc_id );
+	engine = TQFontDatabase::findFont( TQFont::Latin, nullptr, req, enc_id );
 	if ( ! engine ) return;
     }
     engine->setScale( scale() );
@@ -1469,7 +1469,7 @@ static inline void unlockFTFace( XftFont *font )
 }
 
 TQFontEngineXft::TQFontEngineXft( XftFont *font, XftPattern *pattern, int cmap )
-    : _font( font ), _pattern( pattern ), _openType( 0 ), _cmap( cmap )
+    : _font( font ), _pattern( pattern ), _openType( nullptr ), _cmap( cmap )
 {
     _face = lockFTFace( _font );
 
@@ -1511,8 +1511,8 @@ TQFontEngineXft::~TQFontEngineXft()
 
     XftFontClose( TQPaintDevice::x11AppDisplay(),_font );
     XftPatternDestroy( _pattern );
-    _font = 0;
-    _pattern = 0;
+    _font = nullptr;
+    _pattern = nullptr;
     TransformedFont *trf = transformed_fonts;
     while ( trf ) {
 	XftFontClose( TQPaintDevice::x11AppDisplay(), trf->xft_font );
@@ -1558,8 +1558,8 @@ TQFontEngine::Error TQFontEngineXft::stringToCMap( const TQChar *str, int len, g
 	glyphs[glyph_pos] = uc < cmapCacheSize ? cmapCache[uc] : 0;
 	if ( !glyphs[glyph_pos] ) {
 	    glyph_t glyph = 0;
-	    if (XftCharExists(0, _font, uc)) {
-		glyph = XftCharIndex(0, _font, uc);
+	    if (XftCharExists(nullptr, _font, uc)) {
+		glyph = XftCharIndex(nullptr, _font, uc);
 	    }
 	    if ( !glyph && _cmap != -1 ) {
 		glyph = getAdobeCharIndex(_font, _cmap, uc);
@@ -1631,7 +1631,7 @@ void TQFontEngineXft::draw( TQPainter *p, int x, int y, const TQTextEngine *engi
 	    return;
 	}
 
-	XftMatrix *mat = 0;
+	XftMatrix *mat = nullptr;
 	XftPatternGetMatrix( _pattern, XFT_MATRIX, 0, &mat );
 	XftMatrix m2;
 	m2.xx = p->m11()*_scale;
@@ -1641,7 +1641,7 @@ void TQFontEngineXft::draw( TQPainter *p, int x, int y, const TQTextEngine *engi
 
 	// check if we have it cached
 	TransformedFont *trf = transformed_fonts;
-	TransformedFont *prev = 0;
+	TransformedFont *prev = nullptr;
 	int i = 0;
 	while ( trf ) {
 	    if ( trf->xx == (float)m2.xx &&
@@ -1948,7 +1948,7 @@ int TQFontEngineXft::minRightBearing() const
 	TQChar *ch = (TQChar *)char_table;
 	glyph_t glyphs[char_table_entries];
 	int ng = char_table_entries;
-	stringToCMap(ch, char_table_entries, glyphs, 0, &ng, false);
+	stringToCMap(ch, char_table_entries, glyphs, nullptr, &ng, false);
 	while (--ng) {
 	    if (glyphs[ng]) {
 		glyph_metrics_t gi = that->boundingBox( glyphs[ng] );
@@ -1985,7 +1985,7 @@ bool TQFontEngineXft::canRender( const TQChar *string, int len )
     if (_cmap != -1) {
 	for ( int i = 0; i < len; i++ ) {
 	    uint uc = getCodepoint(string, i, len);
-	    if (!XftCharExists(0, _font, uc)
+	    if (!XftCharExists(nullptr, _font, uc)
 		&& getAdobeCharIndex(_font, _cmap, uc) == 0) {
 		allExist = false;
 		break;
@@ -1994,7 +1994,7 @@ bool TQFontEngineXft::canRender( const TQChar *string, int len )
     } else {
 	for ( int i = 0; i < len; i++ ) {
 	    uint uc = getCodepoint(string, i, len);
-	    if (!XftCharExists(0, _font, uc)) {
+	    if (!XftCharExists(nullptr, _font, uc)) {
 		allExist = false;
 		break;
 	    }
@@ -2011,7 +2011,7 @@ TQOpenType *TQFontEngineXft::openType() const
 	return _openType;
 
     if ( !_face || ! FT_IS_SFNT( _face ) )
-	return 0;
+	return nullptr;
 
     TQFontEngineXft *that = (TQFontEngineXft *)this;
     that->_openType = new TQOpenType(that);
@@ -2194,23 +2194,23 @@ static const OTScripts ot_scripts [] = {
 };
 
 TQOpenType::TQOpenType(TQFontEngineXft *fe)
-    : fontEngine(fe), gdef(0), gsub(0), gpos(0), current_script(0)
+    : fontEngine(fe), gdef(nullptr), gsub(nullptr), gpos(nullptr), current_script(0)
 {
     face = fe->face();
     otl_buffer_new(face->memory, &otl_buffer);
-    tmpAttributes = 0;
-    tmpLogClusters = 0;
+    tmpAttributes = nullptr;
+    tmpLogClusters = nullptr;
 
     FT_Error error;
     if ((error = TT_Load_GDEF_Table(face, &gdef))) {
 #ifdef OT_DEBUG
         tqDebug("error loading gdef table: %d", error);
 #endif
-        gdef = 0;
+        gdef = nullptr;
     }
 
     if ((error = TT_Load_GSUB_Table(face, &gsub, gdef))) {
-        gsub = 0;
+        gsub = nullptr;
 #ifdef OT_DEBUG
         if (error != FT_Err_Table_Missing) {
             tqDebug("error loading gsub table: %d", error);
@@ -2221,7 +2221,7 @@ TQOpenType::TQOpenType(TQFontEngineXft *fe)
     }
 
     if ((error = TT_Load_GPOS_Table(face, &gpos, gdef))) {
-        gpos = 0;
+        gpos = nullptr;
 #ifdef OT_DEBUG
         tqDebug("error loading gpos table: %d", error);
 #endif
diff --git a/src/kernel/tqfontmetrics.h b/src/kernel/tqfontmetrics.h
index 35d09f5e8..4d8b20c4d 100644
--- a/src/kernel/tqfontmetrics.h
+++ b/src/kernel/tqfontmetrics.h
@@ -84,10 +84,10 @@ public:
     TQRect	boundingRect( TQChar ) const;
     TQRect	boundingRect( int x, int y, int w, int h, int flags,
 			      const TQString& str, int len=-1, int tabstops=0,
-			      int *tabarray=0, TQTextParag **intern=0 ) const;
+			      int *tabarray=nullptr, TQTextParag **intern=nullptr ) const;
     TQSize	size( int flags,
 		      const TQString& str, int len=-1, int tabstops=0,
-		      int *tabarray=0, TQTextParag **intern=0 ) const;
+		      int *tabarray=nullptr, TQTextParag **intern=nullptr ) const;
 
     int		underlinePos()	const;
     int         overlinePos()   const;
diff --git a/src/kernel/tqgplugin.cpp b/src/kernel/tqgplugin.cpp
index 606e856fb..a316ca1f3 100644
--- a/src/kernel/tqgplugin.cpp
+++ b/src/kernel/tqgplugin.cpp
@@ -43,7 +43,7 @@
 #include <private/tqcom_p.h>
 
 TQGPlugin::TQGPlugin()
-    : _iface( 0 )
+    : _iface( nullptr )
 {
 }
 
diff --git a/src/kernel/tqguardedptr.cpp b/src/kernel/tqguardedptr.cpp
index ab18f5ed2..762ecf85a 100644
--- a/src/kernel/tqguardedptr.cpp
+++ b/src/kernel/tqguardedptr.cpp
@@ -196,7 +196,7 @@
 
 
 TQGuardedPtrPrivate::TQGuardedPtrPrivate( TQObject* o)
-    : TQObject(0, "_ptrpriv" ), obj( o )
+    : TQObject(nullptr, "_ptrpriv" ), obj( o )
 {
     if ( obj )
 	connect( obj, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( objectDestroyed() ) );
@@ -222,5 +222,5 @@ void TQGuardedPtrPrivate::reconnect( TQObject *o )
 
 void TQGuardedPtrPrivate::objectDestroyed()
 {
-    obj = 0;
+    obj = nullptr;
 }
diff --git a/src/kernel/tqguardedptr.h b/src/kernel/tqguardedptr.h
index e31d6f0c2..576fe077e 100644
--- a/src/kernel/tqguardedptr.h
+++ b/src/kernel/tqguardedptr.h
@@ -71,7 +71,7 @@ template <class T>
 class TQGuardedPtr
 {
 public:
-    TQGuardedPtr() : priv( new TQGuardedPtrPrivate( 0 ) ) {}
+    TQGuardedPtr() : priv( new TQGuardedPtrPrivate( nullptr ) ) {}
 
     TQGuardedPtr( T* o) {
 	priv = new TQGuardedPtrPrivate( (TQObject*)o );
@@ -113,11 +113,11 @@ public:
 
     bool isNull() const { return !priv || !priv->object(); }
 
-    T* operator->() const { return (T*)(priv?priv->object():0); }
+    T* operator->() const { return (T*)(priv?priv->object():nullptr); }
 
-    T& operator*() const { return *((T*)(priv?priv->object():0)); }
+    T& operator*() const { return *((T*)(priv?priv->object():nullptr)); }
 
-    operator T*() const { return (T*)(priv?priv->object():0); }
+    operator T*() const { return (T*)(priv?priv->object():nullptr); }
 
 private:
 
diff --git a/src/kernel/tqiconset.cpp b/src/kernel/tqiconset.cpp
index 71b71ffee..efd4b1a29 100644
--- a/src/kernel/tqiconset.cpp
+++ b/src/kernel/tqiconset.cpp
@@ -50,7 +50,7 @@
 
 enum { NumSizes = 2, NumModes = 3, NumStates = 2 };
 
-static TQIconFactory *defaultFac = 0;
+static TQIconFactory *defaultFac = nullptr;
 static TQSingleCleanupHandler<TQIconFactory> q_cleanup_icon_factory;
 
 static short widths[2] = { 22, 32 };
@@ -71,10 +71,10 @@ struct TQIconSetIcon
 	TQPixmap *pixmap;
     };
 
-    TQIconSetIcon() : origin( Generated ) { pixmap = 0; }
+    TQIconSetIcon() : origin( Generated ) { pixmap = nullptr; }
     TQIconSetIcon( const TQIconSetIcon& other )
 	: origin( Generated ) {
-	pixmap = 0;
+	pixmap = nullptr;
 	operator=( other );
     }
     ~TQIconSetIcon() {
@@ -91,15 +91,15 @@ struct TQIconSetIcon
 	if ( pixmap && (origin == Manufactured || origin == Generated) ) {
 	    origin = Generated;
 	    delete pixmap;
-	    pixmap = 0;
+	    pixmap = nullptr;
 	}
     }
 };
 
 TQIconSetIcon& TQIconSetIcon::operator=( const TQIconSetIcon& other )
 {
-    TQPixmap *oldPixmap = 0;
-    TQString *oldFileName = 0;
+    TQPixmap *oldPixmap = nullptr;
+    TQString *oldFileName = nullptr;
     if ( origin == SuppliedFileName ) {
 	oldFileName = fileName;
     } else {
@@ -113,7 +113,7 @@ TQIconSetIcon& TQIconSetIcon::operator=( const TQIconSetIcon& other )
 	if ( other.pixmap ) {
 	    pixmap = new TQPixmap( *other.pixmap );
 	} else {
-	    pixmap = 0;
+	    pixmap = nullptr;
 	}
     }
     delete oldPixmap;
@@ -128,7 +128,7 @@ public:
     TQPixmap defaultPix;
     TQIconFactory *factory;
 
-    TQIconSetPrivate() : factory( 0 ) { }
+    TQIconSetPrivate() : factory( nullptr ) { }
     TQIconSetPrivate( const TQIconSetPrivate& other ) : TQShared() {
 	count = 1;
 	for ( int i = 0; i < NumSizes; i++ ) {
@@ -144,7 +144,7 @@ public:
 	    factory->ref();
     }
     ~TQIconSetPrivate() {
-	setFactory( 0 );
+	setFactory( nullptr );
     }
 
     TQIconSetIcon *icon( const TQIconSet *iconSet, TQIconSet::Size size,
@@ -172,7 +172,7 @@ TQIconSetIcon *TQIconSetPrivate::icon( const TQIconSet *iconSet,
 	    if ( newPixmap->isNull() ) {
 		delete newPixmap;
 		ik->origin = Generated;
-		ik->pixmap = 0;
+		ik->pixmap = nullptr;
 	    } else {
 		ik->origin = SuppliedPixmap;
 		ik->pixmap = newPixmap;
@@ -361,7 +361,7 @@ TQIconSetIcon *TQIconSetPrivate::icon( const TQIconSet *iconSet,
   \sa setPixmap(), reset()
 */
 TQIconSet::TQIconSet()
-    : d( 0 )
+    : d( nullptr )
 {
 }
 
@@ -378,7 +378,7 @@ TQIconSet::TQIconSet()
   \sa setIconSize() reset()
 */
 TQIconSet::TQIconSet( const TQPixmap& pixmap, Size size )
-    : d( 0 )
+    : d( nullptr )
 {
     reset( pixmap, size );
 }
@@ -388,7 +388,7 @@ TQIconSet::TQIconSet( const TQPixmap& pixmap, Size size )
   large icon.
 */
 TQIconSet::TQIconSet( const TQPixmap& smallPix, const TQPixmap& largePix )
-    : d( 0 )
+    : d( nullptr )
 {
     reset( smallPix, Small );
     reset( largePix, Large );
@@ -431,7 +431,7 @@ void TQIconSet::reset( const TQPixmap& pixmap, Size size )
     normalize( size, pixmap.size() );
     setPixmap( pixmap, size, Normal );
     d->defaultPix = pixmap;
-    d->setFactory( 0 );
+    d->setFactory( nullptr );
 }
 
 /*!
@@ -462,13 +462,13 @@ void TQIconSet::setPixmap( const TQPixmap& pixmap, Size size, Mode mode,
     detach();
     clearGenerated();
 
-    TQIconSetIcon *icon = d->icon( 0, size, mode, state );
+    TQIconSetIcon *icon = d->icon( nullptr, size, mode, state );
     if ( icon->origin == SuppliedFileName ) {
 	delete icon->fileName;
-	icon->pixmap = 0;
+	icon->pixmap = nullptr;
     }
     icon->origin = SuppliedPixmap;
-    if ( icon->pixmap == 0 ) {
+    if ( !icon->pixmap ) {
 	icon->pixmap = new TQPixmap( pixmap );
     } else {
 	*icon->pixmap = pixmap;
@@ -489,7 +489,7 @@ void TQIconSet::setPixmap( const TQString& fileName, Size size, Mode mode,
 	detach();
 	clearGenerated();
 
-	TQIconSetIcon *icon = d->icon( 0, size, mode, state );
+	TQIconSetIcon *icon = d->icon( nullptr, size, mode, state );
 	if ( icon->origin == SuppliedFileName ) {
 	    *icon->fileName = fileName;
 	} else {
@@ -780,7 +780,7 @@ void TQIconSet::normalize( Size& which, const TQSize& pixSize )
 TQPixmap *TQIconSet::createScaled( Size size, const TQPixmap *suppliedPix ) const
 {
     if ( !suppliedPix || suppliedPix->isNull() )
-	return 0;
+	return nullptr;
 
     TQImage img = suppliedPix->convertToImage();
     TQSize imgSize = iconSize( size );
@@ -809,10 +809,10 @@ TQPixmap *TQIconSet::createDisabled( Size size, State state ) const
 {
     TQPixmap normalPix = pixmap( size, Normal, state );
     if ( normalPix.isNull() )
-	return 0;
+	return nullptr;
 
     TQImage img;
-    TQPixmap *pixmap = 0;
+    TQPixmap *pixmap = nullptr;
     TQBitmap normalMask;
     if ( normalPix.mask() ) {
 	normalMask = *normalPix.mask();
@@ -891,7 +891,7 @@ TQPixmap *TQIconFactory::createPixmap( const TQIconSet& /* iconSet */,
 				     TQIconSet::Mode /* mode */,
 				     TQIconSet::State /* state */ )
 {
-    return 0;
+    return nullptr;
 }
 
 /*!
diff --git a/src/kernel/tqimage.cpp b/src/kernel/tqimage.cpp
index 9435b6909..ccfc13959 100644
--- a/src/kernel/tqimage.cpp
+++ b/src/kernel/tqimage.cpp
@@ -417,7 +417,7 @@ TQImage::TQImage( const char * const xpm[] )
 {
     init();
 #ifndef TQT_NO_IMAGEIO_XPM
-    read_xpm_image_or_array( 0, xpm, *this );
+    read_xpm_image_or_array( nullptr, xpm, *this );
 #else
     // We use a tqFatal rather than disabling the whole function, as this
     // constructor may be ambiguous.
@@ -603,7 +603,7 @@ TQImage TQImage::copy() const
 {
     if ( isNull() ) {
 	// maintain the fields of invalid TQImages when copied
-	return TQImage( 0, width(), height(), depth(), colorTable(), numColors(), bitOrder() );
+	return TQImage( nullptr, width(), height(), depth(), colorTable(), numColors(), bitOrder() );
     } else {
 	TQImage image;
 	image.create( width(), height(), depth(), numColors(), bitOrder() );
@@ -1086,7 +1086,7 @@ void TQImage::setNumColors( int numColors )
 		free( data->ctbl );
 	    else
 		data->ctbl_mine = true;
-	    data->ctbl = 0;
+	    data->ctbl = nullptr;
 	}
 	data->ncols = 0;
 	return;
@@ -1101,7 +1101,7 @@ void TQImage::setNumColors( int numColors )
         TQ_CHECK_PTR(data->ctbl);
 	data->ctbl_mine = true;
     }
-    data->ncols = data->ctbl == 0 ? 0 : numColors;
+    data->ncols = !data->ctbl ? 0 : numColors;
 }
 
 
@@ -1268,12 +1268,12 @@ void TQImage::reinit()
 {
     data->w = data->h = data->d = data->ncols = 0;
     data->nbytes = 0;
-    data->ctbl = 0;
-    data->bits = 0;
+    data->ctbl = nullptr;
+    data->bits = nullptr;
     data->bitordr = TQImage::IgnoreEndian;
     data->alpha = false;
 #ifndef TQT_NO_IMAGE_TEXT
-    data->misc = 0;
+    data->misc = nullptr;
 #endif
     data->dpmx = 0;
     data->dpmy = 0;
@@ -1289,7 +1289,7 @@ void TQImage::freeBits()
 {
     if ( data->bits ) {				// dealloc image bits
 	free( data->bits );
-	data->bits = 0;
+	data->bits = nullptr;
     }
 }
 
@@ -1314,7 +1314,7 @@ struct TQRgbMap {
     TQRgb  rgb;
 };
 
-static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_flags, TQRgb* palette=0, int palette_count=0 )
+static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_flags, TQRgb* palette=nullptr, int palette_count=0 )
 {
     TQRgb *p;
     uchar  *b;
@@ -2376,8 +2376,8 @@ bool TQImage::isGrayscale() const
 static
 void pnmscale(const TQImage& src, TQImage& dst)
 {
-    TQRgb* xelrow = 0;
-    TQRgb* tempxelrow = 0;
+    TQRgb* xelrow = nullptr;
+    TQRgb* tempxelrow = nullptr;
     TQRgb* xP;
     TQRgb* nxP;
     int rows, cols, rowsread, newrows, newcols;
@@ -2433,7 +2433,7 @@ void pnmscale(const TQImage& src, TQImage& dst)
 	for ( col = 0; col < cols; ++col )
 	    as[col] = HALFSCALE;
     } else {
-	as = 0;
+	as = nullptr;
     }
     rs = new long[cols];
     gs = new long[cols];
@@ -3061,11 +3061,11 @@ TQImage TQImage::createHeuristicMask( bool clipTight ) const
     while( !done ) {
 	done = true;
 	ypn = m.scanLine(0);
-	ypc = 0;
+	ypc = nullptr;
 	for ( y = 0; y < h; y++ ) {
 	    ypp = ypc;
 	    ypc = ypn;
-	    ypn = (y == h-1) ? 0 : m.scanLine(y+1);
+	    ypn = (y == h-1) ? nullptr : m.scanLine(y+1);
 	    TQRgb *p = (TQRgb *)scanLine(y);
 	    for ( x = 0; x < w; x++ ) {
 		// slowness here - it's possible to do six of these tests
@@ -3087,11 +3087,11 @@ TQImage TQImage::createHeuristicMask( bool clipTight ) const
 
     if ( !clipTight ) {
 	ypn = m.scanLine(0);
-	ypc = 0;
+	ypc = nullptr;
 	for ( y = 0; y < h; y++ ) {
 	    ypp = ypc;
 	    ypc = ypn;
-	    ypn = (y == h-1) ? 0 : m.scanLine(y+1);
+	    ypn = (y == h-1) ? nullptr : m.scanLine(y+1);
 	    TQRgb *p = (TQRgb *)scanLine(y);
 	    for ( x = 0; x < w; x++ ) {
 		if ( (*p & 0x00ffffff) != background ) {
@@ -3551,7 +3551,7 @@ TQDataStream &operator>>( TQDataStream &s, TQImage &image )
 	    return s;
 	}
     }
-    TQImageIO io( s.device(), 0 );
+    TQImageIO io( s.device(), nullptr );
     if ( io.read() )
 	image = io.image();
     return s;
@@ -3726,11 +3726,11 @@ TQImageIO::TQImageIO( const TQString &fileName, const char* format )
 void TQImageIO::init()
 {
     d = new TQImageIOData();
-    d->parameters = 0;
+    d->parameters = nullptr;
     d->quality = -1; // default quality of the current format
     d->gamma=0.0f;
     iostat = 0;
-    iodev  = 0;
+    iodev  = nullptr;
 }
 
 /*!
@@ -3777,11 +3777,11 @@ TQImageHandler::TQImageHandler( const char *f, const char *h, const TQCString& f
 }
 
 typedef TQPtrList<TQImageHandler> TQIHList;// list of image handlers
-static TQIHList *imageHandlers = 0;
+static TQIHList *imageHandlers = nullptr;
 #ifndef TQT_NO_COMPONENT
-static TQPluginManager<TQImageFormatInterface> *plugin_manager = 0;
+static TQPluginManager<TQImageFormatInterface> *plugin_manager = nullptr;
 #else
-static void *plugin_manager = 0;
+static void *plugin_manager = nullptr;
 #endif
 
 void tqt_init_image_plugins()
@@ -3809,10 +3809,10 @@ static void cleanup()
 {
     // make sure that image handlers are delete before plugin manager
     delete imageHandlers;
-    imageHandlers = 0;
+    imageHandlers = nullptr;
 #ifndef TQT_NO_COMPONENT
     delete plugin_manager;
-    plugin_manager = 0;
+    plugin_manager = nullptr;
 #endif
 }
 
@@ -3824,7 +3824,7 @@ void tqt_init_image_handlers()		// initialize image handlers
 	imageHandlers->setAutoDelete( true );
 	tqAddPostRoutine( cleanup );
 #ifndef TQT_NO_IMAGEIO_BMP
-	TQImageIO::defineIOHandler( "BMP", "^BM", 0,
+	TQImageIO::defineIOHandler( "BMP", "^BM", nullptr,
 				   read_bmp_image, write_bmp_image );
 #endif
 #ifndef TQT_NO_IMAGEIO_PPM
@@ -3871,7 +3871,7 @@ static TQImageHandler *get_image_handler( const char *format )
 	    return p;
 	p = imageHandlers->next();
     }
-    return 0;					// no such handler
+    return nullptr;					// no such handler
 }
 
 
@@ -4175,7 +4175,7 @@ const char* TQImageIO::imageFormat( const TQString &fileName )
 {
     TQFile file( fileName );
     if ( !file.open(IO_ReadOnly) )
-	return 0;
+	return nullptr;
     const char* format = imageFormat( &file );
     file.close();
     return format;
@@ -4207,11 +4207,11 @@ const char *TQImageIO::imageFormat( TQIODevice *d )
     int rdlen = d->readBlock( buf, buflen );	// read a few bytes
 
     if ( rdlen != buflen )
-	return 0;
+	return nullptr;
 
     memcpy( buf2, buf, buflen );
 
-    const char* format = 0;
+    const char* format = nullptr;
     for ( int n = 0; n < rdlen; n++ )
 	if ( buf[n] == '\0' )
 	    buf[n] = '\001';
@@ -4350,7 +4350,7 @@ bool TQImageIO::read()
 	if ( !image_format ) {
 	    if ( file.isOpen() ) {			// unknown format
 		file.close();
-		iodev = 0;
+		iodev = nullptr;
 	    }
 	    return false;
 	}
@@ -4383,7 +4383,7 @@ bool TQImageIO::read()
 
     if ( file.isOpen() ) {			// image was read using file
 	file.close();
-	iodev = 0;
+	iodev = nullptr;
     }
     return iostat == 0;				// image successfully read?
 }
@@ -4443,7 +4443,7 @@ bool TQImageIO::write()
     (*h->write_image)( this );
     if ( file.isOpen() ) {			// image was written using file
 	file.close();
-	iodev = 0;
+	iodev = nullptr;
     }
     return iostat == 0;				// image successfully written?
 }
@@ -5381,7 +5381,7 @@ static void read_async_image( TQImageIO *iio )
 	}
     }
 
-    consumer->decoder = 0;
+    consumer->decoder = nullptr;
     delete decoder;
     delete consumer;
 }
@@ -5456,7 +5456,7 @@ static void read_xbm_image( TQImageIO *iio )
 	    return;
 	}
 	buf[readBytes] = '\0';
-	if ( strstr(buf,"0x") != 0 )		// does line contain data?
+	if ( strstr(buf,"0x") )		// does line contain data?
 	    break;
     }
 
@@ -5643,14 +5643,14 @@ static void read_xpm_image_or_array( TQImageIO * iio, const char * const * sourc
 				     TQImage & image)
 {
     TQCString buf;
-    TQIODevice *d = 0;
+    TQIODevice *d = nullptr;
     buf.resize( 200 );
 
     int i, cpp, ncols, w, h, index = 0;
 
     if ( iio ) {
 	iio->setStatus( 1 );
-	d = iio ? iio->ioDevice() : 0;
+	d = iio ? iio->ioDevice() : nullptr;
 	d->readLine( buf.data(), buf.size() );	// "/* XPM */"
 	TQRegExp r( TQString::fromLatin1("/\\*.XPM.\\*/") );
 	if ( buf.find(r) == -1 )
@@ -5783,7 +5783,7 @@ static void read_xpm_image_or_array( TQImageIO * iio, const char * const * sourc
 static void read_xpm_image( TQImageIO * iio )
 {
     TQImage i;
-    (void)read_xpm_image_or_array( iio, 0, i );
+    (void)read_xpm_image_or_array( iio, nullptr, i );
     return;
 }
 
diff --git a/src/kernel/tqimage.h b/src/kernel/tqimage.h
index 41e8b717c..ede2f67cf 100644
--- a/src/kernel/tqimage.h
+++ b/src/kernel/tqimage.h
@@ -76,7 +76,7 @@ public:
     TQImage( const TQSize&, int depth, int numColors=0,
 	    Endian bitOrder=IgnoreEndian );
 #ifndef TQT_NO_IMAGEIO
-    TQImage( const TQString &fileName, const char* format=0 );
+    TQImage( const TQString &fileName, const char* format=nullptr );
     TQImage( const char * const xpm[] );
     TQImage( const TQByteArray &data );
 #endif
@@ -97,7 +97,7 @@ public:
 #ifndef TQT_NO_MIME
     static TQImage fromMimeSource( const TQString& abs_name );
 #endif
-    bool	isNull()	const	{ return data->bits == 0; }
+    bool	isNull()	const	{ return !data->bits; }
 
     int		width()		const	{ return data->w; }
     int		height()	const	{ return data->h; }
@@ -180,10 +180,10 @@ public:
     static TQStringList inputFormatList();
     static TQStringList outputFormatList();
 #endif
-    bool	load( const TQString &fileName, const char* format=0 );
+    bool	load( const TQString &fileName, const char* format=nullptr );
     bool	loadFromData( const uchar *buf, uint len,
-			      const char *format=0 );
-    bool	loadFromData( TQByteArray data, const char* format=0 );
+			      const char *format=nullptr );
+    bool	loadFromData( TQByteArray data, const char* format=nullptr );
     bool	save( const TQString &fileName, const char* format,
 		      int quality=-1 ) const;
     bool	save( TQIODevice * device, const char* format,
@@ -206,7 +206,7 @@ public:
     TQValueList<TQImageTextKeyLang> textList() const;
     TQStringList textLanguages() const;
     TQStringList textKeys() const;
-    TQString text(const char* key, const char* lang=0) const;
+    TQString text(const char* key, const char* lang=nullptr) const;
     TQString text(const TQImageTextKeyLang&) const;
     void setText(const char* key, const char* lang, const TQString&);
 #endif
@@ -341,7 +341,7 @@ inline bool TQImage::hasAlphaBuffer() const
 
 inline uchar *TQImage::bits() const
 {
-    return data->bits ? data->bits[0] : 0;
+    return data->bits ? data->bits[0] : nullptr;
 }
 
 inline uchar **TQImage::jumpTable() const
@@ -394,7 +394,7 @@ inline uchar *TQImage::scanLine( int i ) const
     if ( i >= data->h )
 	warningIndexRange( "scanLine", i );
 #endif
-    return data->bits ? data->bits[i] : 0;
+    return data->bits ? data->bits[i] : nullptr;
 }
 
 inline int TQImage::dotsPerMeterX() const
diff --git a/src/kernel/tqimageformatplugin.cpp b/src/kernel/tqimageformatplugin.cpp
index c7da8581d..9f7862c84 100644
--- a/src/kernel/tqimageformatplugin.cpp
+++ b/src/kernel/tqimageformatplugin.cpp
@@ -106,7 +106,7 @@ TQImageFormatPluginPrivate::~TQImageFormatPluginPrivate()
 
 TQRESULT TQImageFormatPluginPrivate::queryInterface( const TQUuid &iid, TQUnknownInterface **iface )
 {
-    *iface = 0;
+    *iface = nullptr;
 
     if ( iid == IID_QUnknown )
 	*iface = this;
diff --git a/src/kernel/tqinputcontext.cpp b/src/kernel/tqinputcontext.cpp
index 913b0da5f..9e6564d45 100644
--- a/src/kernel/tqinputcontext.cpp
+++ b/src/kernel/tqinputcontext.cpp
@@ -52,7 +52,7 @@ class TQInputContextPrivate
 {
 public:
     TQInputContextPrivate()
-	: holderWidget( 0 ), composingWidget( 0 ), hasFocus( false ),
+	: holderWidget( nullptr ), composingWidget( nullptr ), hasFocus( false ),
 	  isComposing( false ) 
 #if !defined(TQT_NO_IM_PREEDIT_RELOCATION)
 	  , preeditString( TQString::null ),
@@ -356,7 +356,7 @@ void TQInputContext::setHolderWidget( TQWidget *w )
 */
 TQWidget *TQInputContext::focusWidget() const
 {
-    return d->hasFocus ? d->composingWidget : 0;
+    return d->hasFocus ? d->composingWidget : nullptr;
 }
 
 
@@ -412,7 +412,7 @@ void TQInputContext::setFocusWidget( TQWidget *w )
 void TQInputContext::releaseComposingWidget( TQWidget *w )
 {
     if ( d->composingWidget == w ) {
-	d->composingWidget = 0;
+	d->composingWidget = nullptr;
 	d->hasFocus = false;
     }
 }
@@ -515,8 +515,8 @@ void TQInputContext::sendIMEventInternal( TQEvent::Type type,
 					 const TQString &text,
 					 int cursorPosition, int selLength )
 {
-    TQObject *receiver = 0;
-    TQIMEvent *event = 0;
+    TQObject *receiver = nullptr;
+    TQIMEvent *event = nullptr;
 
 #if defined(TQ_WS_X11)
     receiver = d->composingWidget;
@@ -810,7 +810,7 @@ TQString TQInputContext::language()
 */
 TQPtrList<TQInputContextMenu> *TQInputContext::menus()
 {
-    return 0;
+    return nullptr;
 }
 
 /*!
diff --git a/src/kernel/tqinputcontext.h b/src/kernel/tqinputcontext.h
index 06f72f206..90c78ad14 100644
--- a/src/kernel/tqinputcontext.h
+++ b/src/kernel/tqinputcontext.h
@@ -66,7 +66,7 @@ class TQ_EXPORT TQInputContext : public TQObject
 {
     TQ_OBJECT
 public:
-    TQInputContext( TQObject *parent = 0 );
+    TQInputContext( TQObject *parent = nullptr );
     virtual ~TQInputContext();
 
     virtual TQString identifierName();
@@ -80,7 +80,7 @@ public:
 
     virtual void setFocus();
     virtual void unsetFocus();
-    virtual void setMicroFocus( int x, int y, int w, int h, TQFont *f = 0 );
+    virtual void setMicroFocus( int x, int y, int w, int h, TQFont *f = nullptr );
     virtual void mouseHandler( int x, TQEvent::Type type,
 			       TQt::ButtonState button, TQt::ButtonState state );
     virtual TQFont font() const;
diff --git a/src/kernel/tqinputcontext_p.h b/src/kernel/tqinputcontext_p.h
index 9261ae909..7ff82a51a 100644
--- a/src/kernel/tqinputcontext_p.h
+++ b/src/kernel/tqinputcontext_p.h
@@ -104,10 +104,10 @@ public:
     static void setFont( const TQWidget *w, const TQFont & );
     static void setFocusHint( int x, int y, int w, int h, const TQWidget *widget );
     static bool startComposition();
-    static bool endComposition( TQWidget *fw = 0 );
+    static bool endComposition( TQWidget *fw = nullptr );
     static bool composition( LPARAM lparam );
 
-    static void accept( TQWidget *fw = 0 );
+    static void accept( TQWidget *fw = nullptr );
     static void enable( TQWidget *w, bool b );
 #endif
 };
diff --git a/src/kernel/tqinternal.cpp b/src/kernel/tqinternal.cpp
index 98524dfdd..6af17c485 100644
--- a/src/kernel/tqinternal.cpp
+++ b/src/kernel/tqinternal.cpp
@@ -49,9 +49,9 @@
 // Prevent drawing artifacts on such screens
 #define USE_HUGE_QT_SHARED_DOUBLE_BUFFERS 1
 
-static TQPixmap* qdb_shared_pixmap = 0;
-static TQPixmap *qdb_force_pixmap = 0;
-static TQSharedDoubleBuffer* qdb_owner = 0;
+static TQPixmap* qdb_shared_pixmap = nullptr;
+static TQPixmap *qdb_force_pixmap = nullptr;
+static TQSharedDoubleBuffer* qdb_owner = nullptr;
 
 TQCleanupHandler<TQPixmap> qdb_pixmap_cleanup;
 
@@ -134,7 +134,7 @@ private:
    started when creating the object.
 */
 TQSharedDoubleBufferCleaner::TQSharedDoubleBufferCleaner( void )
-    : TQObject( 0, "internal shared double buffer cleanup object" ),
+    : TQObject( nullptr, "internal shared double buffer cleanup object" ),
       timer_id( -1 )
 {
 }
@@ -164,7 +164,7 @@ void TQSharedDoubleBufferCleaner::doCleanup( void )
 {
     qdb_pixmap_cleanup.remove( &qdb_force_pixmap );
     delete qdb_force_pixmap;
-    qdb_force_pixmap = 0;
+    qdb_force_pixmap = nullptr;
 }
 
 /* \internal
@@ -192,7 +192,7 @@ bool TQSharedDoubleBufferCleaner::event( TQEvent *e )
 }
 
 // static instance
-static TQSharedDoubleBufferCleaner *static_cleaner = 0;
+static TQSharedDoubleBufferCleaner *static_cleaner = nullptr;
 TQSingleCleanupHandler<TQSharedDoubleBufferCleaner> cleanup_static_cleaner;
 
 inline static TQSharedDoubleBufferCleaner *staticCleaner()
@@ -249,8 +249,8 @@ inline static TQSharedDoubleBufferCleaner *staticCleaner()
    \sa DoubleBufferFlags
 */
 TQSharedDoubleBuffer::TQSharedDoubleBuffer( DBFlags f )
-    : wid( 0 ), rx( 0 ), ry( 0 ), rw( 0 ), rh( 0 ), flags( f ), state( 0 ),
-      p( 0 ), external_p( 0 ), pix( 0 )
+    : wid( nullptr ), rx( 0 ), ry( 0 ), rw( 0 ), rh( 0 ), flags( f ), state( 0 ),
+      p( nullptr ), external_p( nullptr ), pix( nullptr )
 {
 }
 
@@ -263,8 +263,8 @@ TQSharedDoubleBuffer::TQSharedDoubleBuffer( DBFlags f )
 TQSharedDoubleBuffer::TQSharedDoubleBuffer( TQWidget* widget,
 					  int x, int y, int w, int h,
 					  DBFlags f )
-    : wid( 0 ), rx( 0 ), ry( 0 ), rw( 0 ), rh( 0 ), flags( f ), state( 0 ),
-      p( 0 ), external_p( 0 ), pix( 0 )
+    : wid( nullptr ), rx( 0 ), ry( 0 ), rw( 0 ), rh( 0 ), flags( f ), state( 0 ),
+      p( nullptr ), external_p( nullptr ), pix( nullptr )
 {
     begin( widget, x, y, w, h );
 }
@@ -278,8 +278,8 @@ TQSharedDoubleBuffer::TQSharedDoubleBuffer( TQWidget* widget,
 TQSharedDoubleBuffer::TQSharedDoubleBuffer( TQPainter* painter,
 					  int x, int y, int w, int h,
 					  DBFlags f)
-    : wid( 0 ), rx( 0 ), ry( 0 ), rw( 0 ), rh( 0 ), flags( f ), state( 0 ),
-      p( 0 ), external_p( 0 ), pix( 0 )
+    : wid( nullptr ), rx( 0 ), ry( 0 ), rw( 0 ), rh( 0 ), flags( f ), state( 0 ),
+      p( nullptr ), external_p( nullptr ), pix( nullptr )
 {
     begin( painter, x, y, w, h );
 }
@@ -291,8 +291,8 @@ TQSharedDoubleBuffer::TQSharedDoubleBuffer( TQPainter* painter,
    \sa DoubleBufferFlags begin()
 */
 TQSharedDoubleBuffer::TQSharedDoubleBuffer( TQWidget *widget, const TQRect &r, DBFlags f )
-    : wid( 0 ), rx( 0 ), ry( 0 ), rw( 0 ), rh( 0 ), flags( f ), state( 0 ),
-      p( 0 ), external_p( 0 ), pix( 0 )
+    : wid( nullptr ), rx( 0 ), ry( 0 ), rw( 0 ), rh( 0 ), flags( f ), state( 0 ),
+      p( nullptr ), external_p( nullptr ), pix( nullptr )
 {
     begin( widget, r );
 }
@@ -304,8 +304,8 @@ TQSharedDoubleBuffer::TQSharedDoubleBuffer( TQWidget *widget, const TQRect &r, D
    \sa DoubleBufferFlags begin()
 */
 TQSharedDoubleBuffer::TQSharedDoubleBuffer( TQPainter *painter, const TQRect &r, DBFlags f )
-    : wid( 0 ), rx( 0 ), ry( 0 ), rw( 0 ), rh( 0 ), flags( f ), state( 0 ),
-      p( 0 ), external_p( 0 ), pix( 0 )
+    : wid( nullptr ), rx( 0 ), ry( 0 ), rw( 0 ), rh( 0 ), flags( f ), state( 0 ),
+      p( nullptr ), external_p( nullptr ), pix( nullptr )
 {
     begin( painter, r );
 }
@@ -464,13 +464,13 @@ bool TQSharedDoubleBuffer::end()
 	releasePixmap();
     }
 
-    wid = 0;
+    wid = nullptr;
     rx = ry = rw = rh = 0;
     // do not reset flags!
     state = 0;
 
-    p = external_p = 0;
-    pix = 0;
+    p = external_p = nullptr;
+    pix = nullptr;
 
     return true;
 }
@@ -521,19 +521,19 @@ TQPixmap *TQSharedDoubleBuffer::getPixmap()
 {
     if ( isDisabled() ) {
 	// double buffering disabled globally
-	return 0;
+	return nullptr;
     }
 
     if ( qdb_owner ) {
 	// shared pixmap already in use
-	return 0;
+	return nullptr;
     }
 
     if ( rw <= 0 || rh <= 0 ||
 	 ( hardLimitWidth > 0 && rw >= hardLimitWidth ) ||
 	 ( hardLimitHeight > 0 && rh >= hardLimitHeight ) ) {
 	// invalid size, or hard limit reached
-	return 0;
+	return nullptr;
     }
 
     if ( rw >= sharedLimitWidth || rh >= sharedLimitHeight ) {
@@ -559,7 +559,7 @@ TQPixmap *TQSharedDoubleBuffer::getPixmap()
 	}
 
 	// size is outside shared limit
-	return 0;
+	return nullptr;
     }
 
     if ( ! qdb_shared_pixmap ) {
@@ -592,7 +592,7 @@ void TQSharedDoubleBuffer::releasePixmap()
 	return;
     }
 
-    qdb_owner = 0;
+    qdb_owner = nullptr;
 }
 
 /* \internal
@@ -619,9 +619,9 @@ void TQSharedDoubleBuffer::cleanup()
     qdb_pixmap_cleanup.remove( &qdb_force_pixmap );
     delete qdb_shared_pixmap;
     delete qdb_force_pixmap;
-    qdb_shared_pixmap = 0;
-    qdb_force_pixmap = 0;
-    qdb_owner = 0;
+    qdb_shared_pixmap = nullptr;
+    qdb_force_pixmap = nullptr;
+    qdb_owner = nullptr;
 }
 
 /* \internal
@@ -721,7 +721,7 @@ bool TQMembuf::scanNewline( TQByteArray *store )
     if ( _size == 0 )
 	return false;
     int i = 0; // index into 'store'
-    TQByteArray *a = 0;
+    TQByteArray *a = nullptr;
     char *p;
     int n;
     for ( ;; ) {
diff --git a/src/kernel/tqinternal_p.h b/src/kernel/tqinternal_p.h
index d8c29cc67..4cc7bddf7 100644
--- a/src/kernel/tqinternal_p.h
+++ b/src/kernel/tqinternal_p.h
@@ -160,7 +160,7 @@ template <class T>
 T* qAutoDeleterData( TQAutoDeleter<T>* ad )
 {
     if ( !ad )
-	return 0;
+	return nullptr;
     return ad->data();
 }
 
@@ -205,7 +205,7 @@ inline TQByteArray TQMembuf::readAll()
 { TQByteArray ba(_size); consumeBytes(_size,ba.data()); return ba; }
 
 inline bool TQMembuf::canReadLine() const
-{ return ((TQMembuf*)this)->scanNewline( 0 ); }
+{ return ((TQMembuf*)this)->scanNewline( nullptr ); }
 
 inline TQIODevice::Offset TQMembuf::size() const
 { return _size; }
diff --git a/src/kernel/tqjpegio.cpp b/src/kernel/tqjpegio.cpp
index c16f0f68f..e17a740ea 100644
--- a/src/kernel/tqjpegio.cpp
+++ b/src/kernel/tqjpegio.cpp
@@ -445,7 +445,7 @@ void write_jpeg_image(TQImageIO* iio)
 
     struct jpeg_compress_struct cinfo;
     JSAMPROW row_pointer[1];
-    row_pointer[0] = 0;
+    row_pointer[0] = nullptr;
 
     struct my_jpeg_destination_mgr *iod_dest = new my_jpeg_destination_mgr(iio);
     struct my_error_mgr jerr;
@@ -462,7 +462,7 @@ void write_jpeg_image(TQImageIO* iio)
 	cinfo.image_width = image.width();
 	cinfo.image_height = image.height();
 
-	TQRgb* cmap=0;
+	TQRgb* cmap=nullptr;
 	bool gray=false;
 	switch ( image.depth() ) {
 	  case 1:
@@ -589,7 +589,7 @@ void qInitJpegIO()
 {
     // Not much to go on - just 3 bytes: 0xFF, M_SOI, 0xFF
     // Even the third is not strictly specified as required.
-    TQImageIO::defineIOHandler("JPEG", "^\377\330\377", 0, read_jpeg_image, write_jpeg_image);
+    TQImageIO::defineIOHandler("JPEG", "^\377\330\377", nullptr, read_jpeg_image, write_jpeg_image);
 }
 
 #endif
diff --git a/src/kernel/tqkeysequence.cpp b/src/kernel/tqkeysequence.cpp
index 2dead6397..0597a0231 100644
--- a/src/kernel/tqkeysequence.cpp
+++ b/src/kernel/tqkeysequence.cpp
@@ -180,7 +180,7 @@ static struct {
     { TQt::Key_Escape,      TQT_TRANSLATE_NOOP( "TQAccel", "Escape" ) },
     { TQt::Key_SysReq,      TQT_TRANSLATE_NOOP( "TQAccel", "System Request" ) },
 
-    { 0, 0 }
+    { 0, nullptr }
 };
 
 
diff --git a/src/kernel/tqlayout.cpp b/src/kernel/tqlayout.cpp
index 02e35d49c..ab09e2c7c 100644
--- a/src/kernel/tqlayout.cpp
+++ b/src/kernel/tqlayout.cpp
@@ -80,7 +80,7 @@ public:
     void setGeometry( const TQRect &r ) { item_->setGeometry( r ); }
     int alignment() const { return item_->alignment(); }
     TQLayoutItem *item() { return item_; }
-    TQLayoutItem *takeItem() { TQLayoutItem *i = item_; item_ = 0; return i; }
+    TQLayoutItem *takeItem() { TQLayoutItem *i = item_; item_ = nullptr; return i; }
 
     int hStretch() { return item_->widget() ?
 			 item_->widget()->sizePolicy().horStretch() : 0; }
@@ -232,10 +232,10 @@ void TQGridLayoutData::init()
 {
     addVertical = false;
     setDirty();
-    multi = 0;
+    multi = nullptr;
     rr = cc = 0;
     nextR = nextC = 0;
-    hfwData = 0;
+    hfwData = nullptr;
     things.setAutoDelete( true );
     hReversed = false;
     vReversed = false;
@@ -303,7 +303,7 @@ bool TQGridLayoutData::findWidget( TQWidget* w, int *row, int *col )
 {
     TQPtrListIterator<TQGridBox> it( things );
     TQGridBox * box;
-    while ( (box = it.current()) != 0 ) {
+    while ( (box = it.current()) ) {
 	++it;
 	if ( box->item()->widget() == w ) {
 	    if ( row )
@@ -316,7 +316,7 @@ bool TQGridLayoutData::findWidget( TQWidget* w, int *row, int *col )
     if ( multi ) {
 	TQPtrListIterator<TQGridMultiBox> it( *multi );
 	TQGridMultiBox * mbox;
-	while ( (mbox = it.current()) != 0 ) {
+	while ( (mbox = it.current()) ) {
 	    ++it;
 	    box = mbox->box();
 	    if ( box->item()->widget() == w ) {
@@ -423,7 +423,7 @@ void TQGridLayoutData::setSize( int r, int c )
 
     if ( hfwData && (int)hfwData->size() < r ) {
 	delete hfwData;
-	hfwData = 0;
+	hfwData = nullptr;
 	hfw_width = -1;
     }
     rr = r;
@@ -525,7 +525,7 @@ void TQGridLayoutData::addData( TQGridBox *box, bool r, bool c )
 		     box->expanding() & TQSizePolicy::Vertically );
     }
     if ( box->isEmpty() ) {
-	if ( box->item()->widget() != 0 ) {
+	if ( box->item()->widget() ) {
 	    /*
 	      Hidden widgets should behave exactly the same as if
 	      there were no widgets at all in the cell. We could have
@@ -626,7 +626,7 @@ void TQGridLayoutData::setupLayoutData( int spacing )
 
     TQPtrListIterator<TQGridBox> it( things );
     TQGridBox * box;
-    while ( (box = it.current()) != 0 ) {
+    while ( (box = it.current()) ) {
 	++it;
 	addData( box );
 	has_hfw = has_hfw || box->item()->hasHeightForWidth();
@@ -635,7 +635,7 @@ void TQGridLayoutData::setupLayoutData( int spacing )
     if ( multi ) {
 	TQPtrListIterator<TQGridMultiBox> it( *multi );
 	TQGridMultiBox * mbox;
-	while ( (mbox = it.current()) != 0 ) {
+	while ( (mbox = it.current()) ) {
 	    ++it;
 	    TQGridBox *box = mbox->box();
 	    int r1 = box->row;
@@ -708,14 +708,14 @@ void TQGridLayoutData::setupHfwLayoutData( int spacing )
     }
     TQPtrListIterator<TQGridBox> it( things );
     TQGridBox * box;
-    while ( (box=it.current()) != 0 ) {
+    while ( (box=it.current()) ) {
 	++it;
 	addHfwData( box, colData[box->col].size );
     }
     if ( multi ) {
 	TQPtrListIterator<TQGridMultiBox> it( *multi );
 	TQGridMultiBox * mbox;
-	while ( (mbox=it.current()) != 0 ) {
+	while ( (mbox=it.current()) ) {
 	    ++it;
 	    TQGridBox *box = mbox->box();
 	    int r1 = box->row;
@@ -771,7 +771,7 @@ void TQGridLayoutData::distribute( TQRect r, int spacing )
 
     TQPtrListIterator<TQGridBox> it( things );
     TQGridBox * box;
-    while ( (box=it.current()) != 0 ) {
+    while ( (box=it.current()) ) {
 	++it;
 	int x = colData[box->col].pos;
 	int y = rData[box->row].pos;
@@ -786,7 +786,7 @@ void TQGridLayoutData::distribute( TQRect r, int spacing )
     if ( multi ) {
 	TQPtrListIterator<TQGridMultiBox> it( *multi );
 	TQGridMultiBox * mbox;
-	while ( (mbox=it.current()) != 0 ) {
+	while ( (mbox=it.current()) ) {
 	    ++it;
 	    TQGridBox *box = mbox->box();
 	    int r2 = mbox->torow;
@@ -834,11 +834,11 @@ public:
     TQLayoutItem *current() {
 	if ( multi ) {
 	    if ( !data->multi || idx >= (int)data->multi->count() )
-		return 0;
+		return nullptr;
 	    return data->multi->at( idx )->box()->item();
 	} else {
 	    if ( idx >= (int)data->things.count() )
-		return 0;
+		return nullptr;
 	    return data->things.at( idx )->item();
 	}
     }
@@ -855,16 +855,16 @@ public:
 	return current();
     }
     TQLayoutItem *takeCurrent() {
-	TQLayoutItem *item = 0;
+	TQLayoutItem *item = nullptr;
 	if ( multi ) {
 	     if ( !data->multi || idx >= (int)data->multi->count() )
-		return 0;
+		return nullptr;
 	    TQGridMultiBox *b = data->multi->take( idx );
 	    item = b->takeItem();
 	    delete b;
 	} else {
 	    if ( idx >= (int)data->things.count() )
-		return 0;
+		return nullptr;
 	    TQGridBox *b = data->things.take( idx );
 	    item = b->takeItem();
 	    delete b;
@@ -1556,13 +1556,13 @@ struct TQBoxLayoutItem
 class TQBoxLayoutData
 {
 public:
-    TQBoxLayoutData() : geomArray( 0 ), hfwWidth( -1 ), dirty( true )
+    TQBoxLayoutData() : geomArray( nullptr ), hfwWidth( -1 ), dirty( true )
     { list.setAutoDelete( true ); }
 
     ~TQBoxLayoutData() { delete geomArray; }
     void setDirty() {
 	delete geomArray;
-	geomArray = 0;
+	geomArray = nullptr;
 	hfwWidth = -1;
 	hfwHeight = -1;
 	dirty = true;
@@ -1587,7 +1587,7 @@ public:
     TQBoxLayoutIterator( TQBoxLayoutData *d ) : data( d ), idx( 0 ) {}
     TQLayoutItem *current() {
 	if ( idx >= int(data->list.count()) )
-	    return 0;
+	    return nullptr;
 	return data->list.at(idx)->item;
     }
     TQLayoutItem *next() {
@@ -1595,12 +1595,12 @@ public:
 	return current();
     }
     TQLayoutItem *takeCurrent() {
-	TQLayoutItem *item = 0;
+	TQLayoutItem *item = nullptr;
 
 	TQBoxLayoutItem *b = data->list.take( idx );
 	if ( b ) {
 	    item = b->item;
-	    b->item = 0;
+	    b->item = nullptr;
 	    delete b;
 	}
 	data->setDirty();
@@ -2209,7 +2209,7 @@ bool TQBoxLayout::setStretchFactor( TQWidget *w, int stretch )
 {
     TQPtrListIterator<TQBoxLayoutItem> it( data->list );
     TQBoxLayoutItem *box;
-    while ( (box=it.current()) != 0 ) {
+    while ( (box=it.current()) ) {
 	++it;
 	if ( box->item->widget() == w ) {
 	    box->stretch = stretch;
@@ -2231,7 +2231,7 @@ bool TQBoxLayout::setStretchFactor( TQLayout *l, int stretch )
 {
     TQPtrListIterator<TQBoxLayoutItem> it( data->list );
     TQBoxLayoutItem *box;
-    while ( (box=it.current()) != 0 ) {
+    while ( (box=it.current()) ) {
 	++it;
 	if ( box->item->layout() == l ) {
 	    box->stretch = stretch;
@@ -2256,7 +2256,7 @@ void TQBoxLayout::setDirection( Direction direction )
 	//#### or even a TQSpacerItem::flip()
 	TQPtrListIterator<TQBoxLayoutItem> it( data->list );
 	TQBoxLayoutItem *box;
-	while ( (box=it.current()) != 0 ) {
+	while ( (box=it.current()) ) {
 	    ++it;
 	    if ( box->magic ) {
 		TQSpacerItem *sp = box->item->spacerItem();
@@ -2404,7 +2404,7 @@ void TQBoxLayout::calcHfw( int w )
 	TQPtrListIterator<TQBoxLayoutItem> it( data->list );
 	TQBoxLayoutItem *box;
 	bool first = true;
-	while ( (box = it.current()) != 0 ) {
+	while ( (box = it.current()) ) {
 	    ++it;
 	    bool empty = box->item->isEmpty();
 	    h += box->hfw( w );
diff --git a/src/kernel/tqlayout.h b/src/kernel/tqlayout.h
index c900c352d..4849a35c9 100644
--- a/src/kernel/tqlayout.h
+++ b/src/kernel/tqlayout.h
@@ -92,9 +92,9 @@ public:
 	it = i.it;
 	return *this;
     }
-    TQLayoutItem *operator++() { return it ? it->next() : 0; }
-    TQLayoutItem *current() { return it ? it->current() : 0; }
-    TQLayoutItem *takeCurrent() { return it ? it->takeCurrent() : 0; }
+    TQLayoutItem *operator++() { return it ? it->next() : nullptr; }
+    TQLayoutItem *current() { return it ? it->current() : nullptr; }
+    TQLayoutItem *takeCurrent() { return it ? it->takeCurrent() : nullptr; }
     void deleteCurrent();
 
 private:
@@ -189,9 +189,9 @@ public:
     enum ResizeMode { FreeResize, Minimum, Fixed, Auto };
 
     TQLayout( TQWidget *parent, int margin = 0, int spacing = -1,
-	     const char *name = 0 );
-    TQLayout( TQLayout *parentLayout, int spacing = -1, const char *name = 0 );
-    TQLayout( int spacing = -1, const char *name = 0 );
+	     const char *name = nullptr );
+    TQLayout( TQLayout *parentLayout, int spacing = -1, const char *name = nullptr );
+    TQLayout( int spacing = -1, const char *name = nullptr );
     ~TQLayout();
 
     int margin() const { return outsideBorder; }
@@ -293,11 +293,11 @@ class TQ_EXPORT TQGridLayout : public TQLayout
     TQ_OBJECT
 public:
     TQGridLayout( TQWidget *parent, int nRows = 1, int nCols = 1, int border = 0,
-		 int spacing = -1, const char *name = 0 );
+		 int spacing = -1, const char *name = nullptr );
     TQGridLayout( int nRows = 1, int nCols = 1, int spacing = -1,
-		 const char *name = 0 );
+		 const char *name = nullptr );
     TQGridLayout( TQLayout *parentLayout, int nRows = 1, int nCols = 1,
-		 int spacing = -1, const char *name = 0 );
+		 int spacing = -1, const char *name = nullptr );
     ~TQGridLayout();
 
     TQSize sizeHint() const;
@@ -373,10 +373,10 @@ public:
 		     Down = TopToBottom, Up = BottomToTop };
 
     TQBoxLayout( TQWidget *parent, Direction, int border = 0, int spacing = -1,
-		const char *name = 0 );
+		const char *name = nullptr );
     TQBoxLayout( TQLayout *parentLayout, Direction, int spacing = -1,
-		const char *name = 0 );
-    TQBoxLayout( Direction, int spacing = -1, const char *name = 0 );
+		const char *name = nullptr );
+    TQBoxLayout( Direction, int spacing = -1, const char *name = nullptr );
     ~TQBoxLayout();
 
     void addItem( TQLayoutItem * );
@@ -436,10 +436,10 @@ class TQ_EXPORT TQHBoxLayout : public TQBoxLayout
     TQ_OBJECT
 public:
     TQHBoxLayout( TQWidget *parent, int border = 0,
-		 int spacing = -1, const char *name = 0 );
+		 int spacing = -1, const char *name = nullptr );
     TQHBoxLayout( TQLayout *parentLayout,
-		 int spacing = -1, const char *name = 0 );
-    TQHBoxLayout( int spacing = -1, const char *name = 0 );
+		 int spacing = -1, const char *name = nullptr );
+    TQHBoxLayout( int spacing = -1, const char *name = nullptr );
 
     ~TQHBoxLayout();
 
@@ -455,10 +455,10 @@ class TQ_EXPORT TQVBoxLayout : public TQBoxLayout
     TQ_OBJECT
 public:
     TQVBoxLayout( TQWidget *parent, int border = 0,
-		 int spacing = -1, const char *name = 0 );
+		 int spacing = -1, const char *name = nullptr );
     TQVBoxLayout( TQLayout *parentLayout,
-		 int spacing = -1, const char *name = 0 );
-    TQVBoxLayout( int spacing = -1, const char *name = 0 );
+		 int spacing = -1, const char *name = nullptr );
+    TQVBoxLayout( int spacing = -1, const char *name = nullptr );
 
     ~TQVBoxLayout();
 
diff --git a/src/kernel/tqlocalfs.cpp b/src/kernel/tqlocalfs.cpp
index d4d14065a..c77666e0d 100644
--- a/src/kernel/tqlocalfs.cpp
+++ b/src/kernel/tqlocalfs.cpp
@@ -153,7 +153,7 @@ void TQLocalFs::operationListChildren( TQNetworkOperation *op )
     TQFileInfoListIterator it( *filist );
     TQFileInfo *fi;
     TQValueList<TQUrlInfo> infos;
-    while ( ( fi = it.current() ) != 0 ) {
+    while ( ( fi = it.current() ) ) {
 	++it;
 	infos << TQUrlInfo( fi->fileName(), convertPermissions(fi), fi->owner(), fi->group(),
 			   fi->size(), fi->lastModified(), fi->lastRead(), fi->isDir(), fi->isFile(),
diff --git a/src/kernel/tqmetaobject.cpp b/src/kernel/tqmetaobject.cpp
index 80c415b6e..956f68566 100644
--- a/src/kernel/tqmetaobject.cpp
+++ b/src/kernel/tqmetaobject.cpp
@@ -135,7 +135,7 @@ enum Flags  {
     StoredOverride 	= 0x00020000
 };
 
-static TQAsciiDict<void> *tqt_metaobjects = 0;
+static TQAsciiDict<void> *tqt_metaobjects = nullptr;
 static int tqt_metaobjects_count = 0;
 
 class TQMetaObjectPrivate
@@ -143,11 +143,11 @@ class TQMetaObjectPrivate
 public:
     TQMetaObjectPrivate() :
 #ifndef TQT_NO_PROPERTIES
-	enumData(0), numEnumData(0),
-	propData(0),numPropData(0),
-	tqt_static_property(0),
+	enumData(nullptr), numEnumData(0),
+	propData(nullptr),numPropData(0),
+	tqt_static_property(nullptr),
 #endif
-	classInfo(0), numClassInfo(0) {}
+	classInfo(nullptr), numClassInfo(0) {}
 #ifndef TQT_NO_PROPERTIES
     const TQMetaEnum *enumData;
     int numEnumData;
@@ -214,12 +214,12 @@ TQMetaObject::TQMetaObject( const char *const class_name, TQMetaObject *super_cl
 {
     classname = class_name;			// set meta data
     superclass = super_class;
-    superclassname = superclass ? superclass->className() : 0;
+    superclassname = superclass ? superclass->className() : nullptr;
     slotDict = init( slotData = slot_data, n_slots );
     signalDict = init( signalData = signal_data, n_signals );
 
     d = new TQMetaObjectPrivate;
-    reserved = 0;
+    reserved = nullptr;
 
 #ifndef TQT_NO_PROPERTIES
     d->propData = prop_data;
@@ -250,12 +250,12 @@ TQMetaObject::TQMetaObject( const char *const class_name, TQMetaObject *super_cl
 {
     classname = class_name;			// set meta data
     superclass = super_class;
-    superclassname = superclass ? superclass->className() : 0;
+    superclassname = superclass ? superclass->className() : nullptr;
     slotDict = init( slotData = slot_data, n_slots );
     signalDict = init( signalData = signal_data, n_signals );
 
     d = new TQMetaObjectPrivate;
-    reserved = 0;
+    reserved = nullptr;
 
     d->propData = prop_data;
     d->numPropData = n_props;
@@ -280,13 +280,13 @@ TQMetaObject::~TQMetaObject()
     delete d;
 #ifdef TQT_THREAD_SUPPORT
     TQMutexLocker locker( tqt_global_mutexpool ?
-                          tqt_global_mutexpool->get( &tqt_metaobjects ) : 0 );
+                          tqt_global_mutexpool->get( &tqt_metaobjects ) : nullptr );
 #endif // TQT_THREAD_SUPPORT
     if ( tqt_metaobjects ) {
 	tqt_metaobjects->remove( classname );
 	if ( tqt_metaobjects->isEmpty() ) {
 	    delete tqt_metaobjects;
-	    tqt_metaobjects = 0;
+	    tqt_metaobjects = nullptr;
 	}
     }
 
@@ -363,7 +363,7 @@ const TQMetaData* TQMetaObject::slot( int index, bool super ) const
 	return slotData + idx;
     }
     if ( !super || !superclass )
-	return 0;
+	return nullptr;
     return superclass->slot( index, super );
 }
 
@@ -381,7 +381,7 @@ const TQMetaData* TQMetaObject::signal( int index, bool super ) const
 	return signalData + idx;
     }
     if ( !super || !superclass )
-	return 0;
+	return nullptr;
     return superclass->signal( index, super );
 }
 
@@ -415,7 +415,7 @@ int TQMetaObject::findSignal( const char* n, bool super ) const
     int offset = -1;
 
     do {
-	const TQMetaData *md = mo->signalDict ? mo->signalDict->find( n ) : 0;
+	const TQMetaData *md = mo->signalDict ? mo->signalDict->find( n ) : nullptr;
 	if ( md ) {
 #if defined(QT_CHECK_RANGE)
 	    if ( offset != -1 ) {
@@ -450,7 +450,7 @@ int TQMetaObject::findSignal( const char* n, bool super ) const
  */
 int TQMetaObject::findSlot( const char* n, bool super ) const
 {
-    const TQMetaData *md = slotDict ? slotDict->find( n ) : 0;
+    const TQMetaData *md = slotDict ? slotDict->find( n ) : nullptr;
     if ( md )
 	return slotOffset() + ( md - slotData );
     if ( !super || !superclass)
@@ -505,7 +505,7 @@ TQMetaObject *TQMetaObject::new_metaobject( const char *classname,
 TQMemberDict *TQMetaObject::init( const TQMetaData * data, int n )
 {
     if ( n == 0 )				// nothing, then make no dict
-	return 0;
+	return nullptr;
     TQMemberDict *dict = new TQMemberDict( optDictSize(n), true, false );
     TQ_CHECK_PTR( dict );
     while ( n-- ) {				// put all members into dict
@@ -535,11 +535,11 @@ int TQMetaObject::numClassInfo( bool super ) const
 const TQClassInfo* TQMetaObject::classInfo( int index, bool super ) const
 {
     if ( index < 0 )
-	return 0;
+	return nullptr;
     if ( index < d->numClassInfo )
 	return &(d->classInfo[ index ]);
     if ( !super || !superclass )
-	return 0;
+	return nullptr;
     return superclass->classInfo( index - d->numClassInfo, super );
 }
 
@@ -557,7 +557,7 @@ const char* TQMetaObject::classInfo( const char* name, bool super ) const
 	    return d->classInfo[i].value;
     }
     if ( !super || !superclass )
-	return 0;
+	return nullptr;
     return superclass->classInfo( name, super );
 }
 
@@ -592,7 +592,7 @@ const TQMetaProperty* TQMetaObject::property( int index, bool super ) const
     if ( d->propData && idx >= 0 && idx < (int)d->numPropData )
 	return d->propData + idx;
     if ( !super || !superclass )
-	return 0;
+	return nullptr;
     return superclass->property( index, super );
 }
 
@@ -648,7 +648,7 @@ int TQMetaObject::indexOfProperty( const TQMetaProperty* prop, bool super ) cons
 const TQMetaProperty* TQMetaObject::resolveProperty( const TQMetaProperty* p ) const
 {
     if ( !superclass )
-	return 0;
+	return nullptr;
     return superclass->property( superclass->findProperty( p->n, true ), true );
 }
 
@@ -765,7 +765,7 @@ const TQMetaEnum* TQMetaObject::enumerator( const char* name, bool super ) const
 	if ( qstrcmp( d->enumData[i].name, name ) == 0 )
 	    return &(d->enumData[i]);
     if ( !super || !superclass )
-	return 0;
+	return nullptr;
     return superclass->enumerator( name, super );
 }
 
@@ -794,15 +794,15 @@ bool TQMetaObject::inherits( const char* clname ) const
 TQMetaObject *TQMetaObject::metaObject( const char *class_name )
 {
     if ( !tqt_metaobjects )
-	return 0;
+	return nullptr;
 #ifdef TQT_THREAD_SUPPORT
     TQMutexLocker locker( tqt_global_mutexpool ?
-                          tqt_global_mutexpool->get( &tqt_metaobjects ) : 0 );
+                          tqt_global_mutexpool->get( &tqt_metaobjects ) : nullptr );
 #endif // TQT_THREAD_SUPPORT
     TQtStaticMetaObjectFunction func = (TQtStaticMetaObjectFunction)tqt_metaobjects->find( class_name );
     if ( func )
 	return func();
-    return 0;
+    return nullptr;
 }
 
 /*! \internal */
@@ -812,7 +812,7 @@ bool TQMetaObject::hasMetaObject( const char *class_name )
 	return false;
 #ifdef TQT_THREAD_SUPPORT
     TQMutexLocker locker( tqt_global_mutexpool ?
-                          tqt_global_mutexpool->get( &tqt_metaobjects ) : 0 );
+                          tqt_global_mutexpool->get( &tqt_metaobjects ) : nullptr );
 #endif // TQT_THREAD_SUPPORT
     return !!tqt_metaobjects->find( class_name );
 }
@@ -879,7 +879,7 @@ TQStrList TQMetaProperty::enumKeys() const
 	ed = (*meta)->enumerator( t, true );
     if ( !ed )
 	return l;
-    if ( ed != 0 ) {
+    if ( ed ) {
 	for( uint i = 0; i < ed->count; ++i ) {
 	    uint j = 0;
 	    while ( j < i &&
@@ -926,12 +926,12 @@ const char* TQMetaProperty::valueToKey( int value ) const
     if ( !enumData && meta )
 	ed = (*meta)->enumerator( t, true );
     if ( !ed )
-	return 0;
+	return nullptr;
     for ( uint i = 0; i < ed->count; ++i ) {
 	if ( value == ed->items[i].value )
 	    return ed->items[i].key ;
     }
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -1018,9 +1018,9 @@ int TQMetaProperty::id() const
 */
 void TQMetaProperty::clear()
 {
-    t = n = 0;
-    meta = 0;
-    enumData = 0;
+    t = n = nullptr;
+    meta = nullptr;
+    enumData = nullptr;
     _id = -1;
     flags = 0;
 }
@@ -1043,7 +1043,7 @@ bool TQMetaProperty::isSetType() const
     const TQMetaEnum* ed = enumData;
     if ( !enumData && meta )
 	ed = (*meta)->enumerator( t, true );
-    return ( ed != 0 && ed->set );
+    return ( ed && ed->set );
 }
 
 bool TQMetaProperty::isEnumType() const
@@ -1112,7 +1112,7 @@ bool TQMetaProperty::designable( TQObject* o ) const
 	return false;
     if ( o ) {
 	int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, true );
-	return idx >= 0 && o->tqt_property( idx, 3, 0 );
+	return idx >= 0 && o->tqt_property( idx, 3, nullptr );
     }
     if ( testFlags( DesignableOverride ) ) {
 	const TQMetaObject* mo = (*meta);
@@ -1133,7 +1133,7 @@ bool TQMetaProperty::scriptable( TQObject* o ) const
 {
     if ( o ) {
 	int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, true );
-	return idx >= 0 && o->tqt_property( idx, 4, 0 );
+	return idx >= 0 && o->tqt_property( idx, 4, nullptr );
     }
     if ( testFlags( ScriptableOverride ) ) {
 	const TQMetaObject* mo = (*meta);
@@ -1156,7 +1156,7 @@ bool TQMetaProperty::stored( TQObject* o ) const
 	return false;
     if ( o ) {
 	int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, true );
-	return idx >= 0 && o->tqt_property( idx, 5, 0 );
+	return idx >= 0 && o->tqt_property( idx, 5, nullptr );
     }
     if ( testFlags( StoredOverride ) ) {
 	const TQMetaObject* mo = (*meta);
@@ -1181,7 +1181,7 @@ bool TQMetaProperty::reset( TQObject* o ) const
     int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, true );
     if ( idx < 0 )
 	return 0;
-    return o->tqt_property( idx, 2, 0 );
+    return o->tqt_property( idx, 2, nullptr );
 }
 
 
@@ -1198,11 +1198,11 @@ bool TQMetaProperty::reset( TQObject* o ) const
  * TQObject reference to the metaObj to NULL when it is destroyed.
  */
 TQMetaObjectCleanUp::TQMetaObjectCleanUp( const char *mo_name, TQtStaticMetaObjectFunction func )
-    : metaObject( 0 )
+    : metaObject( nullptr )
 {
 #ifdef TQT_THREAD_SUPPORT
     TQMutexLocker locker( tqt_global_mutexpool ?
-                          tqt_global_mutexpool->get( &tqt_metaobjects ) : 0 );
+                          tqt_global_mutexpool->get( &tqt_metaobjects ) : nullptr );
 #endif // TQT_THREAD_SUPPORT
     if ( !tqt_metaobjects )
 	tqt_metaobjects = new TQAsciiDict<void>( 257 );
@@ -1212,7 +1212,7 @@ TQMetaObjectCleanUp::TQMetaObjectCleanUp( const char *mo_name, TQtStaticMetaObje
 }
 
 TQMetaObjectCleanUp::TQMetaObjectCleanUp()
-    : metaObject( 0 )
+    : metaObject( nullptr )
 {
 }
 
@@ -1224,16 +1224,16 @@ TQMetaObjectCleanUp::~TQMetaObjectCleanUp()
 {
 #ifdef TQT_THREAD_SUPPORT
     TQMutexLocker locker( tqt_global_mutexpool ?
-                          tqt_global_mutexpool->get( &tqt_metaobjects ) : 0 );
+                          tqt_global_mutexpool->get( &tqt_metaobjects ) : nullptr );
 #endif // TQT_THREAD_SUPPORT
     if ( !--tqt_metaobjects_count ) {
 	delete tqt_metaobjects;
-	tqt_metaobjects = 0;
+	tqt_metaobjects = nullptr;
     }
     if ( metaObject ) {
 	delete *metaObject;
-	*metaObject = 0;
-	metaObject = 0;
+	*metaObject = nullptr;
+	metaObject = nullptr;
     }
 }
 
diff --git a/src/kernel/tqmetaobject.h b/src/kernel/tqmetaobject.h
index 4bdeedab8..c2a1a951d 100644
--- a/src/kernel/tqmetaobject.h
+++ b/src/kernel/tqmetaobject.h
@@ -97,9 +97,9 @@ public:
     int keysToValue( const TQStrList& keys ) const;
     TQStrList valueToKeys( int value ) const;
 
-    bool designable( TQObject* = 0 ) const;
-    bool scriptable( TQObject* = 0 ) const;
-    bool stored( TQObject* = 0 ) const;
+    bool designable( TQObject* = nullptr ) const;
+    bool scriptable( TQObject* = nullptr ) const;
+    bool stored( TQObject* = nullptr ) const;
 
     bool reset( TQObject* ) const;
 
diff --git a/src/kernel/tqmime.cpp b/src/kernel/tqmime.cpp
index fab43440f..c893f54ec 100644
--- a/src/kernel/tqmime.cpp
+++ b/src/kernel/tqmime.cpp
@@ -65,7 +65,7 @@
 */
 
 static int tqt_mime_serial_number = 0;
-static TQMimeSourceFactory* defaultfactory = 0;
+static TQMimeSourceFactory* defaultfactory = nullptr;
 static TQSingleCleanupHandler<TQMimeSourceFactory> tqmime_cleanup_factory;
 
 /*!
@@ -93,13 +93,13 @@ void TQMimeSource::clearCache()
     if ( cacheType == Text ) {
 	delete cache.txt.str;
 	delete cache.txt.subtype;
-	cache.txt.str = 0;
-	cache.txt.subtype = 0;
+	cache.txt.str = nullptr;
+	cache.txt.subtype = nullptr;
     } else if ( cacheType == Graphics ) {
 	delete cache.gfx.img;
 	delete cache.gfx.pix;
-	cache.gfx.img = 0;
-	cache.gfx.pix = 0;
+	cache.gfx.img = nullptr;
+	cache.gfx.pix = nullptr;
     }
     cacheType = NoCache;
 }
@@ -158,7 +158,7 @@ bool TQMimeSource::provides(const char* mimeType) const
 class TQMimeSourceFactoryData {
 public:
     TQMimeSourceFactoryData() :
-	last(0)
+	last(nullptr)
     {
     }
 
@@ -266,13 +266,13 @@ TQMimeSourceFactory::TQMimeSourceFactory() :
 TQMimeSourceFactory::~TQMimeSourceFactory()
 {
     if ( defaultFactory() == this )
-	defaultfactory = 0;
+	defaultfactory = nullptr;
     delete d;
 }
 
 TQMimeSource* TQMimeSourceFactory::dataInternal(const TQString& abs_name, const TQMap<TQString, TQString> &extensions ) const
 {
-    TQMimeSource* r = 0;
+    TQMimeSource* r = nullptr;
     TQFileInfo fi(abs_name);
     if ( fi.isReadable() ) {
 
@@ -360,7 +360,7 @@ const TQMimeSource* TQMimeSourceFactory::data(const TQString& abs_name) const
     if ( d->stored.contains(abs_name) )
 	return d->stored[abs_name];
 
-    TQMimeSource* r = 0;
+    TQMimeSource* r = nullptr;
     TQStringList::Iterator it;
     if ( abs_name[0] == '/'
 #ifdef TQ_WS_WIN
@@ -586,7 +586,7 @@ void TQMimeSourceFactory::setDefaultFactory( TQMimeSourceFactory* factory)
 TQMimeSourceFactory* TQMimeSourceFactory::takeDefaultFactory()
 {
     TQMimeSourceFactory *f = defaultfactory;
-    defaultfactory = 0;
+    defaultfactory = nullptr;
     return f;
 }
 
diff --git a/src/kernel/tqmngio.cpp b/src/kernel/tqmngio.cpp
index 7b309326e..66e8c47b9 100644
--- a/src/kernel/tqmngio.cpp
+++ b/src/kernel/tqmngio.cpp
@@ -245,7 +245,7 @@ TODO: decide on this point.  gIFg gives disposal types, so it can be done.
 
 TQImageFormat* TQMNGFormatType::decoderFor( const uchar* buffer, int length )
 {
-    if (length < 8) return 0;
+    if (length < 8) return nullptr;
 
     if ((buffer[0]==138 // MNG signature
      && buffer[1]=='M'
@@ -275,7 +275,7 @@ TQImageFormat* TQMNGFormatType::decoderFor( const uchar* buffer, int length )
 #endif
     )
 	return new TQMNGFormat;
-    return 0;
+    return nullptr;
 }
 
 const char* TQMNGFormatType::formatName() const
@@ -290,10 +290,10 @@ const char* TQMNGFormatType::formatName() const
 TQMNGFormat::TQMNGFormat()
 {
     state = MovieStart;
-    handle = 0;
+    handle = nullptr;
     nbuffer = 0;
     maxbuffer = 0;
-    buffer = 0;
+    buffer = nullptr;
     losttime = 0;
 }
 
@@ -304,7 +304,7 @@ TQMNGFormat::~TQMNGFormat()
 {
     // We're setting the consumer to 0 since it may have been
     // deleted by read_async_image in tqimage.cpp
-    consumer = 0;
+    consumer = nullptr;
     if (handle) mng_cleanup(&handle);
 }
 
@@ -386,7 +386,7 @@ int TQMNGFormat::decode( TQImage& img, TQImageConsumer* cons,
     ubuffer = 0;
 
     if ( state == MovieStart ) {
-        handle = mng_initialize( (mng_ptr)this, ::memalloc, ::memfree, 0 );
+        handle = mng_initialize( (mng_ptr)this, ::memalloc, ::memfree, nullptr );
 	mng_set_suspensionmode( handle, MNG_TRUE );
 	mng_setcb_openstream( handle, ::openstream );
 	mng_setcb_closestream( handle, ::closestream );
@@ -407,7 +407,7 @@ int TQMNGFormat::decode( TQImage& img, TQImageConsumer* cons,
 	mng_display_resume(handle);
     losingtimer.start();
 
-    image = 0;
+    image = nullptr;
 
     nbuffer -= ubuffer;
     if ( nbuffer ) {
@@ -424,7 +424,7 @@ int TQMNGFormat::decode( TQImage& img, TQImageConsumer* cons,
     return length;
 }
 
-static TQMNGFormatType* globalMngFormatTypeObject = 0;
+static TQMNGFormatType* globalMngFormatTypeObject = nullptr;
 
 #endif // TQT_NO_ASYNC_IMAGE_IO
 
@@ -433,7 +433,7 @@ void qCleanupMngIO()
 {
     if ( globalMngFormatTypeObject ) {
 	delete globalMngFormatTypeObject;
-	globalMngFormatTypeObject = 0;
+	globalMngFormatTypeObject = nullptr;
     }
 }
 #endif
diff --git a/src/kernel/tqmotifdnd_x11.cpp b/src/kernel/tqmotifdnd_x11.cpp
index 15bae236f..f562b3b2c 100644
--- a/src/kernel/tqmotifdnd_x11.cpp
+++ b/src/kernel/tqmotifdnd_x11.cpp
@@ -83,7 +83,7 @@ static Atom atom_motif_window, atom_target_list ;
 
 static bool in_drop_site = false;
 static Window cur_window = 0;
-static TQWidget *drop_widget = 0L;
+static TQWidget *drop_widget = nullptr;
 
 static Atom Dnd_transfer_success, Dnd_transfer_failure;
 
@@ -356,7 +356,7 @@ static void DndReadSourceProperty(Display * dpy,
 				  Window window, Atom dnd_selection,
 				  Atom ** targets, unsigned short * num_targets)
 {
-    DndSrcProp * src_prop = 0;
+    DndSrcProp * src_prop = nullptr;
     Atom type ;
     int format ;
     unsigned long bytesafter, lengthRtn;
@@ -536,7 +536,7 @@ static Window MotifWindow(Display *display )
     int             format;
     unsigned long   size;
     unsigned long   bytes_after;
-    Window         *property = 0;
+    Window         *property = nullptr;
     Window	    motif_window ;
 
     /* this version does no caching, so it's slow: round trip each time */
@@ -598,7 +598,7 @@ static DndTargetsTable TargetsTable(Display *display)
 			     (unsigned char **) &target_prop) != Success) ||
 	type == None) {
 	tqWarning("TQMotifDND: cannot get property on motif window");
-	return 0;
+	return nullptr;
     }
 
     if (target_prop->protocol_version != DND_PROTOCOL_VERSION) {
@@ -691,7 +691,7 @@ static int _DndIndexToTargets(Display * display,
 const char *tqt_motifdnd_format( int n )
 {
     if ( ! tqt_motifdnd_active )
-	return 0; // should not happen
+	return nullptr; // should not happen
 
     if ( n == 0 )
 	return "text/plain";
@@ -700,7 +700,7 @@ const char *tqt_motifdnd_format( int n )
     n -= 2;
 
     if ( n >= num_src_targets )
-	return 0;
+	return nullptr;
 
     Atom target = src_targets[n];
 
@@ -776,7 +776,7 @@ TQByteArray tqt_motifdnd_obtain_data( const char *mimeType )
 	if ( tqt_xclb_read_property( tqt_xdisplay(),
 				    tw->winId(),
 				    Dnd_selection, true,
-				    &result, 0, &type, 0, true ) ) {
+				    &result, nullptr, &type, nullptr, true ) ) {
 	}
     }
 
@@ -839,9 +839,9 @@ void tqt_motifdnd_handle_msg( TQWidget * /* w */ , const XEvent * xe, bool /* pa
 	    TQDropEvent::Action accepted_action = TQDropEvent::Copy;
 	    me.setAction(accepted_action);
 
-	    if ( c != 0L && c->acceptDrops() ) {
+	    if ( c && c->acceptDrops() ) {
 
-		if ( drop_widget != 0L && drop_widget->acceptDrops() &&
+		if ( drop_widget && drop_widget->acceptDrops() &&
 		     drop_widget != c ) {
 		    TQDragLeaveEvent e;
 		    TQApplication::sendEvent( drop_widget, &e );
@@ -942,7 +942,7 @@ void tqt_motifdnd_handle_msg( TQWidget * /* w */ , const XEvent * xe, bool /* pa
 			       dnd_data.property, cur_window, dnd_data.time);
 	    TQDragLeaveEvent e;
 	    TQApplication::sendEvent( drop_widget, &e );
-	    drop_widget = 0;
+	    drop_widget = nullptr;
 	    return;
 	}
 
@@ -969,7 +969,7 @@ void tqt_motifdnd_handle_msg( TQWidget * /* w */ , const XEvent * xe, bool /* pa
 	if (in_drop_site)
 	    in_drop_site = False ;
 
-	drop_widget = 0;
+	drop_widget = nullptr;
 	cur_window = 0;
 	break;
     }   //  end of switch ( dnd_data.reason )
diff --git a/src/kernel/tqmovie.cpp b/src/kernel/tqmovie.cpp
index 76e676144..03e7be3db 100644
--- a/src/kernel/tqmovie.cpp
+++ b/src/kernel/tqmovie.cpp
@@ -214,11 +214,11 @@ public:
 TQMoviePrivate::TQMoviePrivate()
 {
     dirty_cache = false;
-    buffer = 0;
-    pump = 0;
-    source = 0;
-    decoder = 0;
-    display_widget=0;
+    buffer = nullptr;
+    pump = nullptr;
+    source = nullptr;
+    decoder = nullptr;
+    display_widget=nullptr;
     buf_size = 0;
     init(false);
 }
@@ -229,14 +229,14 @@ TQMoviePrivate::TQMoviePrivate(TQDataSource* src, TQMovie* movie, int bufsize) :
     buf_size(bufsize)
 {
     frametimer = new TQTimer(this);
-    pump = src ? new TQDataPump(src, this) : 0;
+    pump = src ? new TQDataPump(src, this) : nullptr;
     TQObject::connect(frametimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(refresh()));
     dirty_cache = false;
     source = src;
-    buffer = 0;
-    decoder = 0;
+    buffer = nullptr;
+    decoder = nullptr;
     speed = 100;
-    display_widget=0;
+    display_widget=nullptr;
     init(true);
 }
 
@@ -270,12 +270,12 @@ void TQMoviePrivate::init(bool fully)
     buf_usage = buf_r = buf_w = 0;
     if ( buffer )				// Avoid purify complaint
 	delete [] buffer;
-    buffer = fully ? new uchar[buf_size] : 0;
+    buffer = fully ? new uchar[buf_size] : nullptr;
     if ( buffer )
 	memset( buffer, 0, buf_size );
 
     delete decoder;
-    decoder = fully ? new TQImageDecoder(this) : 0;
+    decoder = fully ? new TQImageDecoder(this) : nullptr;
 
 #ifdef AVOID_OPEN_FDS
     if ( source && !source->isOpen() )
@@ -557,10 +557,10 @@ void TQMoviePrivate::eof()
 	movie_ended = false;
     } else {
 	delete decoder;
-	decoder = 0;
+	decoder = nullptr;
 	if ( buffer )				// Avoid purify complaint
 	    delete [] buffer;
-	buffer = 0;
+	buffer = nullptr;
 	emit dataStatus(TQMovie::EndOfMovie);
 #ifdef AVOID_OPEN_FDS
 	if ( source )
@@ -629,7 +629,7 @@ TQMovie::TQMovie()
 */
 TQMovie::TQMovie(int bufsize)
 {
-    d = new TQMoviePrivate(0, this, bufsize);
+    d = new TQMoviePrivate(nullptr, this, bufsize);
 }
 
 /*!
diff --git a/src/kernel/tqmovie.h b/src/kernel/tqmovie.h
index c340590e8..2955a4df9 100644
--- a/src/kernel/tqmovie.h
+++ b/src/kernel/tqmovie.h
@@ -91,10 +91,10 @@ public:
     void setSpeed(int);
 
     void connectResize(TQObject* receiver, const char *member);
-    void disconnectResize(TQObject* receiver, const char *member=0);
+    void disconnectResize(TQObject* receiver, const char *member=nullptr);
 
     void connectUpdate(TQObject* receiver, const char *member);
-    void disconnectUpdate(TQObject* receiver, const char *member=0);
+    void disconnectUpdate(TQObject* receiver, const char *member=nullptr);
 
     enum Status { SourceEmpty=-2,
 		  UnrecognizedFormat=-1,
@@ -104,7 +104,7 @@ public:
 		  EndOfMovie=4,
 		  SpeedChanged=5 };
     void connectStatus(TQObject* receiver, const char *member);
-    void disconnectStatus(TQObject* receiver, const char *member=0);
+    void disconnectStatus(TQObject* receiver, const char *member=nullptr);
 
 private:
     TQMoviePrivate *d;
diff --git a/src/kernel/tqnetworkprotocol.cpp b/src/kernel/tqnetworkprotocol.cpp
index b562d7dd4..6f66e0b02 100644
--- a/src/kernel/tqnetworkprotocol.cpp
+++ b/src/kernel/tqnetworkprotocol.cpp
@@ -53,15 +53,15 @@
 
 extern TQ_EXPORT TQNetworkProtocolDict *tqNetworkProtocolRegister;
 
-TQNetworkProtocolDict *tqNetworkProtocolRegister = 0;
+TQNetworkProtocolDict *tqNetworkProtocolRegister = nullptr;
 
 class TQNetworkProtocolPrivate
 {
 public:
     TQNetworkProtocolPrivate( TQNetworkProtocol *p )
     {
-	url = 0;
-	opInProgress = 0;
+	url = nullptr;
+	opInProgress = nullptr;
 	opStartTimer = new TQTimer( p );
 	removeTimer = new TQTimer( p );
 	operationQueue.setAutoDelete( false );
@@ -610,13 +610,13 @@ TQNetworkProtocol *TQNetworkProtocol::getNetworkProtocol( const TQString &protoc
     }
 
     if ( protocol.isNull() )
-	return 0;
+	return nullptr;
 
     TQNetworkProtocolFactoryBase *factory = tqNetworkProtocolRegister->find( protocol );
     if ( factory )
 	return factory->createObject();
 
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -647,7 +647,7 @@ void TQNetworkProtocol::startOps()
 #ifdef TQNETWORKPROTOCOL_DEBUG
     tqDebug( "TQNetworkOperation: start processing operations" );
 #endif
-    processNextOperation( 0 );
+    processNextOperation( nullptr );
 }
 
 /*!
@@ -844,7 +844,7 @@ void TQNetworkProtocol::processNextOperation( TQNetworkOperation *old )
 	d->oldOps.append( d->opInProgress );
 
     if ( d->operationQueue.isEmpty() ) {
-	d->opInProgress = 0;
+	d->opInProgress = nullptr;
 	if ( d->autoDelete )
 	    d->removeTimer->start( d->removeInterval, true );
 	return;
@@ -914,7 +914,7 @@ void TQNetworkProtocol::stop()
 	op->setState( StStopped );
 	op->setProtocolDetail( tr( "Operation stopped by the user" ) );
 	emit finished( op );
-	setUrl( 0 );
+	setUrl( nullptr );
 	op->free();
     }
 }
diff --git a/src/kernel/tqobject.cpp b/src/kernel/tqobject.cpp
index 8d3e248ef..8bbf684a2 100644
--- a/src/kernel/tqobject.cpp
+++ b/src/kernel/tqobject.cpp
@@ -136,9 +136,9 @@ TQStyleControlElementDataPrivate* TQObject::controlElementDataPrivateObject() {
 
 void TQObject::cleanupControlElementData() {
     delete d->controlElementData;
-    d->controlElementData = 0;
+    d->controlElementData = nullptr;
     delete d->controlElementDataPrivate;
-    d->controlElementDataPrivate = 0;
+    d->controlElementDataPrivate = nullptr;
 }
 
 #if defined(TQT_THREAD_SUPPORT)
@@ -266,7 +266,7 @@ class TQSenderObjectList : public TQObjectList, public TQShared
 #endif
 };
 
-TQSenderObjectList::TQSenderObjectList() : currentSender( 0 ) {
+TQSenderObjectList::TQSenderObjectList() : currentSender( nullptr ) {
 #ifdef TQT_THREAD_SUPPORT
 	listMutex = new TQMutex( true );
 #endif
@@ -496,7 +496,7 @@ void *tqt_find_obj_child( TQObject *parent, const char *type, const char *name )
 		return obj;
 	}
     }
-    return 0;
+    return nullptr;
 }
 
 #ifdef TQT_THREAD_SUPPORT
@@ -519,8 +519,8 @@ TQThread* TQObject::contextThreadObject() const
 /*
   Preliminary signal spy
  */
-TQ_EXPORT TQObject* tqt_preliminary_signal_spy = 0;
-static TQObject* tqt_spy_signal_sender = 0;
+TQ_EXPORT TQObject* tqt_preliminary_signal_spy = nullptr;
+static TQObject* tqt_spy_signal_sender = nullptr;
 
 static void tqt_spy_signal( TQObject* sender, int signal, TQUObject* o )
 {
@@ -542,7 +542,7 @@ static void tqt_spy_signal( TQObject* sender, int signal, TQUObject* o )
 	    // protect access to tqt_spy_signal_sender
 	    void * const address = &tqt_spy_signal_sender;
 	    TQMutexLocker locker( tqt_global_mutexpool ?
-				 tqt_global_mutexpool->get( address ) : 0 );
+				 tqt_global_mutexpool->get( address ) : nullptr );
 #endif // TQT_THREAD_SUPPORT
 
 	    TQObject* old_sender = tqt_spy_signal_sender;
@@ -560,19 +560,19 @@ static void tqt_spy_signal( TQObject* sender, int signal, TQUObject* o )
  */
 #endif // TQT_NO_PRELIMINARY_SIGNAL_SPY
 
-static TQObjectList* object_trees = 0;
+static TQObjectList* object_trees = nullptr;
 
 #ifdef TQT_THREAD_SUPPORT
-static TQMutex *obj_trees_mutex = 0;
+static TQMutex *obj_trees_mutex = nullptr;
 #endif
 
 static void cleanup_object_trees()
 {
     delete object_trees;
-    object_trees = 0;
+    object_trees = nullptr;
 #ifdef TQT_THREAD_SUPPORT
     delete obj_trees_mutex;
-    obj_trees_mutex = 0;
+    obj_trees_mutex = nullptr;
 #endif
 }
 
@@ -662,14 +662,14 @@ TQObject::TQObject( TQObject *parent, const char *name )
     blockSig( false ),      			// not blocking signals
     wasDeleted( false ),       			// double-delete catcher
     isTree( false ), 				// no tree yet
-    objname( name ? tqstrdup(name) : 0 ),        // set object name
-    parentObj( 0 ),				// no parent yet. It is set by insertChild()
-    childObjects( 0 ), 				// no children yet
-    connections( 0 ),				// no connections yet
-    senderObjects( 0 ),        			// no signals connected yet
-    eventFilters( 0 ), 				// no filters installed
-    postedEvents( 0 ), 				// no events posted
-    d( 0 )
+    objname( name ? tqstrdup(name) : nullptr ),        // set object name
+    parentObj( nullptr ),				// no parent yet. It is set by insertChild()
+    childObjects( nullptr ), 				// no children yet
+    connections( nullptr ),				// no connections yet
+    senderObjects( nullptr ),        			// no signals connected yet
+    eventFilters( nullptr ), 				// no filters installed
+    postedEvents( nullptr ), 				// no events posted
+    d( nullptr )
 {
     if ( !d ) {
 	d = new TQObjectPrivate(0);
@@ -734,7 +734,7 @@ TQObject::~TQObject()
     if ( objname ) {
 	delete [] (char*)objname;
     }
-    objname = 0;
+    objname = nullptr;
     if ( pendTimer ) {				// might be pending timers
 	qKillTimer( this );
     }
@@ -751,7 +751,7 @@ TQObject::~TQObject()
     TQObject *obj;
     if ( senderObjects ) {			// disconnect from senders
 	TQSenderObjectList *tmp = senderObjects;
-	senderObjects = 0;
+	senderObjects = nullptr;
 	obj = tmp->first();
 	while ( obj ) {				// for all senders...
 	    obj->disconnect( this );
@@ -775,17 +775,17 @@ TQObject::~TQObject()
 	    }
 	}
 	delete connections;
-	connections = 0;
+	connections = nullptr;
     }
     if ( eventFilters ) {
 	delete eventFilters;
-	eventFilters = 0;
+	eventFilters = nullptr;
     }
     if ( childObjects ) {			// delete children objects
 	TQObjectListIt it(*childObjects);
 	while ( (obj=it.current()) ) {
 	    ++it;
-	    obj->parentObj = 0;
+	    obj->parentObj = nullptr;
 	    childObjects->removeRef( obj );
 	    delete obj;
 	}
@@ -890,14 +890,14 @@ bool TQObject::inherits( const char *clname ) const
 void *tqt_inheritedBy( TQMetaObject *superClass, const TQObject *object )
 {
     if (!object)
-	return 0;
+	return nullptr;
     TQMetaObject *mo = object->metaObject();
     while (mo) {
 	if (mo == superClass)
 	    return (void*)object;
 	mo = mo->superClass();
     }
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -939,7 +939,7 @@ void TQObject::setName( const char *name )
 {
     if ( objname )
 	delete [] (char*) objname;
-    objname = name ? tqstrdup(name) : 0;
+    objname = name ? tqstrdup(name) : nullptr;
 }
 
 /*!
@@ -973,7 +973,7 @@ TQObject* TQObject::child( const char *objName, const char *inheritsClass,
 {
     const TQObjectList *list = children();
     if ( !list )
-	return 0;
+	return nullptr;
 
     bool onlyWidgets = ( inheritsClass && qstrcmp( inheritsClass, "TQWidget" ) == 0 );
     TQObjectListIt it( *list );
@@ -1056,7 +1056,7 @@ void destroyDeepCopiedTQUObjectArray(TQUObject* uArray)
 bool TQObject::event( TQEvent *e )
 {
 #if defined(QT_CHECK_NULL)
-    if ( e == 0 ) {
+    if ( !e ) {
 	tqWarning( "TQObject::event: Null events are not permitted" );
     }
 #endif
@@ -1578,12 +1578,12 @@ TQObjectList *TQObject::queryList( const char *inheritsClass,
     if ( regexpMatch && objName ) {		// regexp matching
 	TQRegExp rx(TQString::fromLatin1(objName));
 	objSearch( list, (TQObjectList *)children(), inheritsClass, onlyWidgets,
-		   0, &rx, recursiveSearch );
+		   nullptr, &rx, recursiveSearch );
     } else
 #endif
 	{
 	objSearch( list, (TQObjectList *)children(), inheritsClass, onlyWidgets,
-		   objName, 0, recursiveSearch );
+		   objName, nullptr, recursiveSearch );
     }
     return list;
 }
@@ -1604,7 +1604,7 @@ TQConnectionList *TQObject::receivers( const char* signal ) const
 	    return receivers( metaObject()->findSignal(signal, true ) );
 	}
     }
-    return 0;
+    return nullptr;
 }
 
 /*! \internal
@@ -1632,7 +1632,7 @@ TQConnectionList *TQObject::receivers( int signal ) const
 #endif
     if ( connections && signal >= 0 )
 	return connections->at( signal );
-    return 0;
+    return nullptr;
 }
 
 
@@ -1700,14 +1700,14 @@ void TQObject::removeChild( TQObject *obj )
 #endif // TQT_THREAD_SUPPORT
 
     if ( childObjects && childObjects->removeRef(obj) ) {
-	obj->parentObj = 0;
+	obj->parentObj = nullptr;
 	if ( !obj->wasDeleted ) {
 	    insert_tree( obj );			// it's a root object now
 	    obj->isTree = true;
 	}
 	if ( childObjects->isEmpty() ) {
 	    delete childObjects;		// last child removed
-	    childObjects = 0;			// reset children list
+	    childObjects = nullptr;			// reset children list
 	}
 
 	// remove events must be sent, not posted!!!
@@ -1815,7 +1815,7 @@ void TQObject::removeEventFilter( const TQObject *obj )
     if ( eventFilters && eventFilters->removeRef(obj) ) {
 	if ( eventFilters->isEmpty() ) {	// last event filter removed
 	    delete eventFilters;
-	    eventFilters = 0;			// reset event filter list
+	    eventFilters = nullptr;			// reset event filter list
 	}
 	disconnect( obj,  TQ_SIGNAL(destroyed(TQObject*)),
 		    this, TQ_SLOT(cleanupEventFilter(TQObject*)) );
@@ -1859,12 +1859,12 @@ static bool check_member_code( int code, const TQObject *object,
 static void err_member_notfound( int code, const TQObject *object,
 				 const char *member, const char *func )
 {
-    const char *type = 0;
+    const char *type = nullptr;
     switch ( code ) {
 	case TQ_SLOT_CODE:   type = "slot";   break;
 	case TQ_SIGNAL_CODE: type = "signal"; break;
     }
-    if ( strchr(member,')') == 0 )		// common typing mistake
+    if ( !strchr(member,')') )		// common typing mistake
 	tqWarning( "TQObject::%s: Parentheses expected, %s %s::%s",
 		 func, type, object->className(), member );
     else
@@ -1896,7 +1896,7 @@ static void err_info_about_candidates( int code,
 	while ( (p=newname.find("const char*")) >= 0 ) {
 	    newname.replace(p, 11, "const TQString&");
 	}
-	const TQMetaData *rm = 0;
+	const TQMetaData *rm = nullptr;
 	switch ( code ) {
 	case TQ_SLOT_CODE:
 	    rm = mo->slot( mo->findSlot( newname, true ), true );
@@ -1939,7 +1939,7 @@ const TQObject *TQObject::sender()
 	// protect access to tqt_spy_signal_sender
 	void * const address = &tqt_spy_signal_sender;
 	TQMutexLocker locker( tqt_global_mutexpool ?
-			     tqt_global_mutexpool->get( address ) : 0 );
+			     tqt_global_mutexpool->get( address ) : nullptr );
 #  endif // TQT_THREAD_SUPPORT
 	return tqt_spy_signal_sender;
     }
@@ -1955,7 +1955,7 @@ const TQObject *TQObject::sender()
 
 	 senderObjects->findRef( senderObjects->currentSender ) != -1 )
 	return senderObjects->currentSender;
-    return 0;
+    return nullptr;
 }
 
 
@@ -2129,7 +2129,7 @@ bool TQObject::connect( const TQObject *sender,	const char *signal,
 		       const TQObject *receiver, const char *member )
 {
 #if defined(QT_CHECK_NULL)
-    if ( sender == 0 || receiver == 0 || signal == 0 || member == 0 ) {
+    if ( !sender || !receiver || !signal || !member ) {
 	tqWarning( "TQObject::connect: Cannot connect %s::%s to %s::%s",
 		 sender ? sender->className() : "(null)",
 		 signal ? signal+1 : "(null)",
@@ -2269,7 +2269,7 @@ void TQObject::connectInternal( const TQObject *sender, int signal_index, const
     }
 
     TQMetaObject *rmeta = r->metaObject();
-    const TQMetaData *rm = 0;
+    const TQMetaData *rm = nullptr;
 
     switch ( membcode ) {			// get receiver member
 	case TQ_SLOT_CODE:
@@ -2386,7 +2386,7 @@ bool TQObject::disconnect( const TQObject *sender,   const char *signal,
 			  const TQObject *receiver, const char *member )
 {
 #if defined(QT_CHECK_NULL)
-    if ( sender == 0 || (receiver == 0 && member != 0) ) {
+    if ( !sender || (!receiver && member) ) {
 	tqWarning( "TQObject::disconnect: Unexpected null parameter" );
 	return false;
     }
@@ -2435,9 +2435,9 @@ bool TQObject::disconnect( const TQObject *sender,   const char *signal,
 	}
     }
 
-    if ( signal == 0 ) {			// any/all signals
+    if ( !signal ) {			// any/all signals
 	if ( disconnectInternal( s, -1, r, membcode, member_index ) )
-	    s->disconnectNotify( 0 );
+	    s->disconnectNotify( nullptr );
 	else
 	    return false;
     } else {					// specific signal
@@ -2506,7 +2506,7 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index,
 		continue;
 	    c = clist->first();
 	    while ( c ) {			// for all receivers...
-		if ( r == 0 ) {			// remove all receivers
+		if ( !r ) {			// remove all receivers
 #ifdef TQT_THREAD_SUPPORT
 		    if (c->object()->senderObjects) c->object()->senderObjects->listMutex->lock();
 #endif // TQT_THREAD_SUPPORT
@@ -2533,8 +2533,8 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index,
 		    c = clist->next();
 		}
 	    }
-	    if ( r == 0 )			// disconnect all receivers
-		s->connections->insert( i, 0 );
+	    if ( !r )			// disconnect all receivers
+		s->connections->insert( i, nullptr );
 	}
     } else {
 	clist = s->connections->at( signal_index );
@@ -2543,7 +2543,7 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index,
 
 	c = clist->first();
 	while ( c ) {				// for all receivers...
-	    if ( r == 0 ) {			// remove all receivers
+	    if ( !r ) {			// remove all receivers
 #ifdef TQT_THREAD_SUPPORT
 		    if (c->object()->senderObjects) c->object()->senderObjects->listMutex->lock();
 #endif // TQT_THREAD_SUPPORT
@@ -2570,8 +2570,8 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index,
 		c = clist->next();
 	    }
 	}
-	if ( r == 0 ) {				// disconnect all receivers
-	    s->connections->insert( signal_index, 0 );
+	if ( !r ) {				// disconnect all receivers
+	    s->connections->insert( signal_index, nullptr );
 	}
     }
     return success;
@@ -2667,7 +2667,7 @@ static TQMetaObjectCleanUp cleanUp_TQt = TQMetaObjectCleanUp( "TQObject", &TQObj
 
 TQMetaObject* TQObject::staticTQtMetaObject()
 {
-    static TQMetaObject* qtMetaObject = 0;
+    static TQMetaObject* qtMetaObject = nullptr;
     if ( qtMetaObject )
 	return qtMetaObject;
 
@@ -2733,14 +2733,14 @@ TQMetaObject* TQObject::staticTQtMetaObject()
     };
 #endif
 
-    qtMetaObject = new TQMetaObject( "TQt", 0,
-			  0, 0,
-			  0, 0,
+    qtMetaObject = new TQMetaObject( "TQt", nullptr,
+			  nullptr, 0,
+			  nullptr, 0,
 #ifndef TQT_NO_PROPERTIES
-			  0, 0,
+			  nullptr, 0,
 			  enum_tbl, 5,
 #endif
-			  0, 0 );
+			  nullptr, 0 );
     cleanUp_TQt.setMetaObject( qtMetaObject );
 
     return qtMetaObject;
@@ -2800,7 +2800,7 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o )
 
     TQObject *object;
     TQSenderObjectList* sol;
-    TQObject* oldSender = 0;
+    TQObject* oldSender = nullptr;
     TQConnection *c;
     if ( clist->count() == 1 ) { // save iterator
 	c = clist->first();
@@ -2872,7 +2872,7 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o )
 	if (sol) sol->listMutex->unlock();
 #endif // TQT_THREAD_SUPPORT
     } else {
-	TQConnection *cd = 0;
+	TQConnection *cd = nullptr;
 	TQConnectionListIt it(*clist);
 	while ( (c=it.current()) ) {
 	    ++it;
@@ -3249,7 +3249,7 @@ TQObjectUserData* TQObject::userData( uint id ) const
 {
     if ( d && id < d->size() )
 	return d->at( id );
-    return 0;
+    return nullptr;
 }
 
 #endif // TQT_NO_USERDATA
diff --git a/src/kernel/tqobject.h b/src/kernel/tqobject.h
index 44eb188c3..e168eab5c 100644
--- a/src/kernel/tqobject.h
+++ b/src/kernel/tqobject.h
@@ -77,7 +77,7 @@ class TQ_EXPORT TQObject: public TQt
     TQ_PROPERTY( TQCString name READ name WRITE setName )
 
 public:
-    TQObject( TQObject *parent=0, const char *name=0 );
+    TQObject( TQObject *parent=nullptr, const char *name=nullptr );
     virtual ~TQObject();
 
 #ifdef Q_QDOC
@@ -107,7 +107,7 @@ public:
     void	 killTimer( int id );
     void	 killTimers();
 
-    TQObject           *child( const char *objName, const char *inheritsClass = 0, bool recursiveSearch = true ); //### const in 4.0
+    TQObject           *child( const char *objName, const char *inheritsClass = nullptr, bool recursiveSearch = true ); //### const in 4.0
     const TQObjectList *children() const { return childObjects; }
     TQObjectList childrenListObject();
     const TQObjectList childrenListObject() const;
@@ -115,8 +115,8 @@ public:
     static const TQObjectList *objectTrees();
     static const TQObjectList objectTreesListObject();
 
-    TQObjectList	      *queryList( const char *inheritsClass = 0,
-				  const char *objName = 0,
+    TQObjectList	      *queryList( const char *inheritsClass = nullptr,
+				  const char *objName = nullptr,
 				  bool regexpMatch = true,
 				  bool recursiveSearch = true ) const;
 
@@ -132,9 +132,9 @@ public:
 			  const char *member ) const;
     static bool  disconnect( const TQObject *sender, const char *signal,
 			     const TQObject *receiver, const char *member );
-    bool	 disconnect( const char *signal=0,
-			     const TQObject *receiver=0, const char *member=0 );
-    bool	 disconnect( const TQObject *receiver, const char *member=0 );
+    bool	 disconnect( const char *signal=nullptr,
+			     const TQObject *receiver=nullptr, const char *member=nullptr );
+    bool	 disconnect( const TQObject *receiver, const char *member=nullptr );
     static void 	 connectInternal( const TQObject *sender, int signal_index,
 			  const TQObject *receiver, int membcode, int member_index );
     static bool 	 disconnectInternal( const TQObject *sender, int signal_index,
@@ -269,7 +269,7 @@ inline bool TQObject::disconnect( const char *signal,
 
 inline bool TQObject::disconnect( const TQObject *receiver, const char *member )
 {
-    return disconnect( this, 0, receiver, member );
+    return disconnect( this, nullptr, receiver, member );
 }
 
 
diff --git a/src/kernel/tqobjectcleanuphandler.cpp b/src/kernel/tqobjectcleanuphandler.cpp
index 452e4cad9..bec30975d 100644
--- a/src/kernel/tqobjectcleanuphandler.cpp
+++ b/src/kernel/tqobjectcleanuphandler.cpp
@@ -96,7 +96,7 @@
     Constructs an empty TQObjectCleanupHandler.
 */
 TQObjectCleanupHandler::TQObjectCleanupHandler()
-: TQObject(), cleanupObjects( 0 )
+: TQObject(), cleanupObjects( nullptr )
 {
 }
 
@@ -116,7 +116,7 @@ TQObjectCleanupHandler::~TQObjectCleanupHandler()
 TQObject* TQObjectCleanupHandler::add( TQObject* object )
 {
     if ( !object )
-	return 0;
+	return nullptr;
 
     if ( !cleanupObjects ) {
 	cleanupObjects = new TQObjectList;
@@ -157,7 +157,7 @@ bool TQObjectCleanupHandler::isEmpty() const
 void TQObjectCleanupHandler::clear()
 {
     delete cleanupObjects;
-    cleanupObjects = 0;
+    cleanupObjects = nullptr;
 }
 
 void TQObjectCleanupHandler::objectDestroyed( TQObject*object )
diff --git a/src/kernel/tqobjectdefs.h b/src/kernel/tqobjectdefs.h
index 871ba47a3..de7299687 100644
--- a/src/kernel/tqobjectdefs.h
+++ b/src/kernel/tqobjectdefs.h
@@ -50,8 +50,8 @@
 # ifndef TQT_NO_TEXTCODEC
 // full set of tr functions
 #  define TQT_TR_FUNCTIONS \
-    static TQString tr( const char *, const char * = 0 ); \
-    static TQString trUtf8( const char *, const char * = 0 );
+    static TQString tr( const char *, const char * = nullptr ); \
+    static TQString trUtf8( const char *, const char * = nullptr );
 # else
 // no TQTextCodec, no utf8
 #  define TQT_TR_FUNCTIONS \
diff --git a/src/kernel/tqpaintdevice.h b/src/kernel/tqpaintdevice.h
index ebb0c6a5a..2665ffbcc 100644
--- a/src/kernel/tqpaintdevice.h
+++ b/src/kernel/tqpaintdevice.h
@@ -220,7 +220,7 @@ protected:
 
     virtual bool cmd( int, TQPainter *, TQPDevCmdParam * );
     virtual int	 metric( int ) const;
-    virtual int	 fontMet( TQFont *, int, const char * = 0, int = 0 ) const;
+    virtual int	 fontMet( TQFont *, int, const char * = nullptr, int = 0 ) const;
     virtual int	 fontInf( TQFont *, int ) const;
 
     ushort	devFlags;			// device flags
diff --git a/src/kernel/tqpaintdevice_x11.cpp b/src/kernel/tqpaintdevice_x11.cpp
index dd6251e2a..9df9489e7 100644
--- a/src/kernel/tqpaintdevice_x11.cpp
+++ b/src/kernel/tqpaintdevice_x11.cpp
@@ -99,7 +99,7 @@
 // Some global variables - these are initialized by TQColor::initialize()
 //
 
-Display *TQPaintDevice::x_appdisplay = 0;
+Display *TQPaintDevice::x_appdisplay = nullptr;
 int	 TQPaintDevice::x_appscreen;
 
 int	  TQPaintDevice::x_appdepth;
@@ -142,7 +142,7 @@ TQPaintDevice::TQPaintDevice( uint devflags )
     painters = 0;
     hd = 0;
     rendhd = 0;
-    x11Data = 0;
+    x11Data = nullptr;
 }
 
 /*!
@@ -158,7 +158,7 @@ TQPaintDevice::~TQPaintDevice()
 #endif
     if ( x11Data && x11Data->deref() ) {
 	delete x11Data;
-	x11Data = 0;
+	x11Data = nullptr;
     }
 }
 
@@ -171,7 +171,7 @@ TQPaintDevice::~TQPaintDevice()
 
 void TQPaintDevice::copyX11Data( const TQPaintDevice *fromDevice )
 {
-    setX11Data( fromDevice ? fromDevice->x11Data : 0 );
+    setX11Data( fromDevice ? fromDevice->x11Data : nullptr );
 }
 
 /*
@@ -188,7 +188,7 @@ void TQPaintDevice::cloneX11Data( const TQPaintDevice *fromDevice )
 	d->count = 0;
 	setX11Data( d );
     } else {
-	setX11Data( 0 );
+	setX11Data( nullptr );
     }
 }
 
@@ -222,7 +222,7 @@ void TQPaintDevice::setX11Data( const TQPaintDeviceX11Data* d )
 
 TQPaintDeviceX11Data* TQPaintDevice::getX11Data( bool def ) const
 {
-    TQPaintDeviceX11Data* res = 0;
+    TQPaintDeviceX11Data* res = nullptr;
     if ( def ) {
 	res = new TQPaintDeviceX11Data;
 	res->x_display = x11AppDisplay();
@@ -513,7 +513,7 @@ TQt::HANDLE TQPaintDevice::x11RenderHandle() const
     (X11 only). Using this function is not portable.
 */
 
-static int *dpisX=0, *dpisY=0;
+static int *dpisX=nullptr, *dpisY=nullptr;
 static void create_dpis()
 {
     if ( dpisX )
@@ -785,12 +785,12 @@ static GC cache_mask_gc( Display *dpy, Drawable hd, int mask_no, Pixmap mask )
 	init_mask_gc = true;
 	tqAddPostRoutine( cleanup_mask_gc );
 	for ( int i=0; i<max_mask_gcs; i++ )
-	    gc_vec[i].gc = 0;
+	    gc_vec[i].gc = nullptr;
     }
     mask_gc *p = &gc_vec[mask_no % max_mask_gcs];
     if ( !p->gc || p->mask_no != mask_no ) {	// not a perfect match
 	if ( !p->gc ) {				// no GC
-	    p->gc = XCreateGC( dpy, hd, 0, 0 );
+	    p->gc = XCreateGC( dpy, hd, 0, nullptr );
 	    XSetGraphicsExposures( dpy, p->gc, False );
 	}
 	XSetClipMask( dpy, p->gc, mask );
@@ -836,8 +836,8 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
 {
     if ( !src || !dst ) {
 #if defined(QT_CHECK_NULL)
-	Q_ASSERT( src != 0 );
-	Q_ASSERT( dst != 0 );
+	Q_ASSERT( src );
+	Q_ASSERT( dst );
 #endif
 	return;
     }
@@ -898,7 +898,7 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
     TQRect r(dx, dy, pm->width(), pm->height());
 	param[0].rect	= &r;
 	param[1].pixmap = pm;
-	dst->cmd( TQPaintDevice::PdcDrawPixmap, 0, param );
+	dst->cmd( TQPaintDevice::PdcDrawPixmap, nullptr, param );
 	if ( tmp_pm )
 	    delete pm;
 	return;
@@ -959,11 +959,11 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
     	if ( src_pm->x11Screen() != dst->x11Screen() )
     	    src_pm->x11SetScreen( dst->x11Screen() );
 	mono_src = src_pm->depth() == 1;
-	mask = ignoreMask ? 0 : src_pm->data->mask;
+	mask = ignoreMask ? nullptr : src_pm->data->mask;
     } else {
-	src_pm = 0;
+	src_pm = nullptr;
 	mono_src = false;
-	mask = 0;
+	mask = nullptr;
 	include_inferiors = ((TQWidget*)src)->testWFlags(TQt::WPaintUnclipped);
 	graphics_exposure = td == TQInternal::Widget;
     }
@@ -1033,7 +1033,7 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
 		// Create a new mask GC. If BestOptim, we store the mask GC
 		// with the mask (not at the pixmap). This way, many pixmaps
 		// which have a common mask will be optimized at no extra cost.
-		gc = XCreateGC( dpy, dst->handle(), 0, 0 );
+		gc = XCreateGC( dpy, dst->handle(), 0, nullptr );
 		XSetGraphicsExposures( dpy, gc, False );
 		XSetClipMask( dpy, gc, mask->handle() );
 		if ( src_pm->optimization() == TQPixmap::BestOptim ) {
diff --git a/src/kernel/tqpainter.cpp b/src/kernel/tqpainter.cpp
index d60225a5c..4a74bf915 100644
--- a/src/kernel/tqpainter.cpp
+++ b/src/kernel/tqpainter.cpp
@@ -590,7 +590,7 @@ TQPainter::~TQPainter()
 
 bool TQPainter::begin( const TQPaintDevice *pd, const TQWidget *copyAttributes, bool unclipped )
 {
-    if ( copyAttributes == 0 ) {
+    if ( !copyAttributes ) {
 #if defined(QT_CHECK_NULL)
 	tqWarning( "TQPainter::begin: The widget to copy attributes from cannot "
 		 "be null" );
@@ -679,7 +679,7 @@ void TQPainter::killPStack()
 		  "end() was called" );
 #endif
     delete (TQPStateStack *)ps_stack;
-    ps_stack = 0;
+    ps_stack = nullptr;
 }
 
 /*!
@@ -699,10 +699,10 @@ void TQPainter::save()
 	    updatePen();
 	if ( testf(DirtyBrush) )
 	    updateBrush();
-	pdev->cmd( TQPaintDevice::PdcSave, this, 0 );
+	pdev->cmd( TQPaintDevice::PdcSave, this, nullptr );
     }
     TQPStateStack *pss = (TQPStateStack *)ps_stack;
-    if ( pss == 0 ) {
+    if ( !pss ) {
 	pss = new TQPtrStack<TQPState>;
 	TQ_CHECK_PTR( pss );
 	pss->setAutoDelete( true );
@@ -733,7 +733,7 @@ void TQPainter::save()
     ps->ts    = tabstops;
     ps->ta    = tabarray;
     ps->wm_stack = wm_stack;
-    wm_stack = 0;
+    wm_stack = nullptr;
     pss->push( ps );
 }
 
@@ -747,12 +747,12 @@ void TQPainter::save()
 void TQPainter::restore()
 {
     if ( testf(ExtDev) ) {
-	pdev->cmd( TQPaintDevice::PdcRestore, this, 0 );
+	pdev->cmd( TQPaintDevice::PdcRestore, this, nullptr );
 	if ( pdev->devType() == TQInternal::Picture )
 	    block_ext = true;
     }
     TQPStateStack *pss = (TQPStateStack *)ps_stack;
-    if ( pss == 0 || pss->isEmpty() ) {
+    if ( !pss || pss->isEmpty() ) {
 #if defined(QT_CHECK_STATE)
 	tqWarning( "TQPainter::restore: Empty stack error" );
 #endif
@@ -812,7 +812,7 @@ void TQPainter::restore()
 }
 
 typedef TQPtrDict<TQPaintDevice> TQPaintDeviceDict;
-static TQPaintDeviceDict *pdev_dict = 0;
+static TQPaintDeviceDict *pdev_dict = nullptr;
 
 /*!
     Redirects all paint commands for a paint device, \a pdev, to
@@ -825,14 +825,14 @@ static TQPaintDeviceDict *pdev_dict = 0;
 
 void TQPainter::redirect( TQPaintDevice *pdev, TQPaintDevice *replacement )
 {
-    if ( pdev_dict == 0 ) {
-        if ( replacement == 0 )
+    if ( !pdev_dict ) {
+        if ( !replacement )
             return;
         pdev_dict = new TQPaintDeviceDict;
         TQ_CHECK_PTR( pdev_dict );
     }
 #if defined(QT_CHECK_NULL)
-    if ( pdev == 0 )
+    if ( !pdev )
         tqWarning( "TQPainter::redirect: The pdev argument cannot be 0" );
 #endif
     if ( replacement ) {
@@ -841,7 +841,7 @@ void TQPainter::redirect( TQPaintDevice *pdev, TQPaintDevice *replacement )
         pdev_dict->remove( pdev );
         if ( pdev_dict->count() == 0 ) {
             delete pdev_dict;
-            pdev_dict = 0;
+            pdev_dict = nullptr;
         }
     }
 }
@@ -852,7 +852,7 @@ void TQPainter::redirect( TQPaintDevice *pdev, TQPaintDevice *replacement )
 */
 TQPaintDevice *TQPainter::redirect( TQPaintDevice *pdev )
 {
-    return pdev_dict ? pdev_dict->find( pdev ) : 0;
+    return pdev_dict ? pdev_dict->find( pdev ) : nullptr;
 }
 
 /*!
@@ -1031,7 +1031,7 @@ void TQPainter::setBrush( BrushStyle style )
     d->color = TQt::black;
     if ( d->pixmap ) {
 	delete d->pixmap;
-	d->pixmap = 0;
+	d->pixmap = nullptr;
     }
     updateBrush();
 }
@@ -1062,7 +1062,7 @@ void TQPainter::setBrush( const TQColor &color )
     d->color = color;
     if ( d->pixmap ) {
 	delete d->pixmap;
-	d->pixmap = 0;
+	d->pixmap = nullptr;
     }
     updateBrush();
 }
@@ -1171,7 +1171,7 @@ void TQPainter::setTabArray( int *ta )
 	    tabarray = new int[tabarraylen];	// duplicate ta
 	    memcpy( tabarray, ta, sizeof(int)*tabarraylen );
 	} else {
-	    tabarray = 0;
+	    tabarray = nullptr;
 	}
     }
     if ( isActive() && testf(ExtDev) ) {	// tell extended device
@@ -1464,7 +1464,7 @@ void TQPainter::setWorldMatrix( const TQWMatrix &m, bool combine )
 void TQPainter::saveWorldMatrix()
 {
     TQWMatrixStack *stack = (TQWMatrixStack *)wm_stack;
-    if ( stack == 0 ) {
+    if ( !stack ) {
 	stack  = new TQPtrStack<TQWMatrix>;
 	TQ_CHECK_PTR( stack );
 	stack->setAutoDelete( true );
@@ -1482,7 +1482,7 @@ void TQPainter::saveWorldMatrix()
 void TQPainter::restoreWorldMatrix()
 {
     TQWMatrixStack *stack = (TQWMatrixStack *)wm_stack;
-    if ( stack == 0 || stack->isEmpty() ) {
+    if ( !stack || stack->isEmpty() ) {
 #if defined(QT_CHECK_STATE)
 	tqWarning( "TQPainter::restoreWorldMatrix: Empty stack error" );
 #endif
@@ -3566,7 +3566,7 @@ void TQBrush::init( const TQColor &color, BrushStyle style )
     TQ_CHECK_PTR( data );
     data->style	 = style;
     data->color	 = color;
-    data->pixmap = 0;
+    data->pixmap = nullptr;
 }
 
 /*!
@@ -3576,13 +3576,13 @@ void TQBrush::init( const TQColor &color, BrushStyle style )
 
 TQBrush::TQBrush()
 {
-    static TQBrushData* defBrushData = 0;
+    static TQBrushData* defBrushData = nullptr;
     if ( !defBrushData ) {
 	static TQSharedCleanupHandler<TQBrushData> defBrushCleanup;
 	defBrushData = new TQBrushData;
 	defBrushData->style = NoBrush;
 	defBrushData->color = TQt::black;
-	defBrushData->pixmap = 0;
+	defBrushData->pixmap = nullptr;
 	defBrushCleanup.set( &defBrushData );
     }
     data = defBrushData;
@@ -3803,7 +3803,7 @@ void TQBrush::setPixmap( const TQPixmap &pixmap )
 	delete data->pixmap;
     if ( pixmap.isNull() ) {
 	data->style  = NoBrush;
-	data->pixmap = 0;
+	data->pixmap = nullptr;
     } else {
 	data->style = CustomPattern;
 	data->pixmap = new TQPixmap( pixmap );
diff --git a/src/kernel/tqpainter.h b/src/kernel/tqpainter.h
index b7ad045bf..9db836fa6 100644
--- a/src/kernel/tqpainter.h
+++ b/src/kernel/tqpainter.h
@@ -253,19 +253,19 @@ public:
     void     drawText( const TQPoint &p, const TQString &, int pos, int len, TextDirection dir = Auto );
 
     void	drawText( int x, int y, int w, int h, int flags,
-			  const TQString&, int len = -1, TQRect *br=0,
-			  TQTextParag **intern=0 );
+			  const TQString&, int len = -1, TQRect *br=nullptr,
+			  TQTextParag **intern=nullptr );
     void	drawText( const TQRect &, int flags,
-			  const TQString&, int len = -1, TQRect *br=0,
-			  TQTextParag **intern=0 );
+			  const TQString&, int len = -1, TQRect *br=nullptr,
+			  TQTextParag **intern=nullptr );
 
     void drawTextItem( int x, int y, const TQTextItem &ti, int textflags = 0 );
     void drawTextItem( const TQPoint& p, const TQTextItem &ti, int textflags = 0 );
 
     TQRect	boundingRect( int x, int y, int w, int h, int flags,
-			      const TQString&, int len = -1, TQTextParag **intern=0 );
+			      const TQString&, int len = -1, TQTextParag **intern=nullptr );
     TQRect	boundingRect( const TQRect &, int flags,
-			      const TQString&, int len = -1, TQTextParag **intern=0 );
+			      const TQString&, int len = -1, TQTextParag **intern=nullptr );
 
     int		tabStops() const;
     void	setTabStops( int );
diff --git a/src/kernel/tqpainter_x11.cpp b/src/kernel/tqpainter_x11.cpp
index 3ff19ff70..0801d02df 100644
--- a/src/kernel/tqpainter_x11.cpp
+++ b/src/kernel/tqpainter_x11.cpp
@@ -58,8 +58,8 @@
 #include <math.h>
 
 // paintevent magic to provide Windows semantics on X11
-static TQRegion* paintEventClipRegion = 0;
-static TQPaintDevice* paintEventDevice = 0;
+static TQRegion* paintEventClipRegion = nullptr;
+static TQPaintDevice* paintEventDevice = nullptr;
 
 void tqt_set_paintevent_clipping( TQPaintDevice* dev, const TQRegion& region)
 {
@@ -73,8 +73,8 @@ void tqt_set_paintevent_clipping( TQPaintDevice* dev, const TQRegion& region)
 void tqt_clear_paintevent_clipping()
 {
     delete paintEventClipRegion;
-    paintEventClipRegion = 0;
-    paintEventDevice = 0;
+    paintEventClipRegion = nullptr;
+    paintEventDevice = nullptr;
 }
 
 class TQWFlagWidget : public TQWidget
@@ -170,7 +170,7 @@ static inline void x11ClearClipRegion(Display *dpy, GC gc, GC gc2, TQt::HANDLE d
 
 #ifndef TQT_NO_XFTFREETYPE
     if (draw) {
-	XftDrawSetClip((XftDraw *) draw, None);
+	XftDrawSetClip((XftDraw *) draw, nullptr);
     }
 #else
     Q_UNUSED(draw);
@@ -316,7 +316,7 @@ static GC alloc_gc( Display *dpy, int scrn, Drawable hd, bool monochrome=false,
     privateGC = true;                           // will be slower
 #endif
     if ( privateGC ) {
-        GC gc = XCreateGC( dpy, hd, 0, 0 );
+        GC gc = XCreateGC( dpy, hd, 0, nullptr );
         XSetGraphicsExposures( dpy, gc, False );
         return gc;
     }
@@ -326,7 +326,7 @@ static GC alloc_gc( Display *dpy, int scrn, Drawable hd, bool monochrome=false,
         init_gc_array();
     while ( i-- ) {
         if ( !p->gc ) {                         // create GC (once)
-            p->gc = XCreateGC( dpy, hd, 0, 0 );
+            p->gc = XCreateGC( dpy, hd, 0, nullptr );
             p->scrn = scrn;
             XSetGraphicsExposures( dpy, p->gc, False );
             p->in_use = false;
@@ -341,7 +341,7 @@ static GC alloc_gc( Display *dpy, int scrn, Drawable hd, bool monochrome=false,
 #if defined(QT_CHECK_NULL)
     tqWarning( "TQPainter: Internal error; no available GC" );
 #endif
-    GC gc = XCreateGC( dpy, hd, 0, 0 );
+    GC gc = XCreateGC( dpy, hd, 0, nullptr );
     XSetGraphicsExposures( dpy, gc, False );
     return gc;
 }
@@ -352,7 +352,7 @@ static void free_gc( Display *dpy, GC gc, bool privateGC = false )
     privateGC = true;                           // will be slower
 #endif
     if ( privateGC ) {
-        Q_ASSERT( dpy != 0 );
+        Q_ASSERT( dpy );
         XFreeGC( dpy, gc );
         return;
     }
@@ -473,7 +473,7 @@ static bool obtain_gc( void **ref, GC *gc, uint pix, Display *dpy, int scrn,
 
     int   k = (pix % gc_cache_size) * 4;
     TQGCC *g = gc_cache[k];
-    TQGCC *prev = 0;
+    TQGCC *prev = nullptr;
 
 #define NOMATCH (g->gc && (g->pix != pix || g->scrn != scrn || \
                  (g->clip_serial > 0 && g->clip_serial != painter_clip_serial)))
@@ -504,7 +504,7 @@ static bool obtain_gc( void **ref, GC *gc, uint pix, Display *dpy, int scrn,
 #if defined(GC_CACHE_STAT)
                         g_numfaults++;
 #endif
-                        *ref = 0;
+                        *ref = nullptr;
                         return false;
                     }
                 }
@@ -590,23 +590,23 @@ void TQPainter::destroy()
 
 void TQPainter::init()
 {
-    d = 0;
+    d = nullptr;
     flags = IsStartingUp;
     bg_col = white;                             // default background color
     bg_mode = TransparentMode;                  // default background mode
     rop = CopyROP;                                // default ROP
     tabstops = 0;                               // default tabbing
-    tabarray = 0;
+    tabarray = nullptr;
     tabarraylen = 0;
-    ps_stack = 0;
-    wm_stack = 0;
-    gc = gc_brush = 0;
-    pdev = 0;
-    dpy  = 0;
+    ps_stack = nullptr;
+    wm_stack = nullptr;
+    gc = gc_brush = nullptr;
+    pdev = nullptr;
+    dpy  = nullptr;
     txop = txinv = 0;
-    penRef = brushRef = 0;
+    penRef = brushRef = nullptr;
     clip_serial = 0;
-    pfont = 0;
+    pfont = nullptr;
     block_ext = false;
 }
 
@@ -698,7 +698,7 @@ void TQPainter::updatePen()
         if ( gc ) {
             if ( penRef ) {
                 release_gc( penRef );
-                penRef = 0;
+                penRef = nullptr;
                 gc = alloc_gc( dpy, scrn, hd, testf(MonoDev) );
             } else {
                 internclipok = true;
@@ -711,13 +711,13 @@ void TQPainter::updatePen()
     if ( !internclipok ) {
         if ( pdev == paintEventDevice && paintEventClipRegion ) {
             if ( penRef &&((TQGCC*)penRef)->clip_serial < gc_cache_clip_serial ) {
-		x11SetClipRegion( dpy, gc, 0, rendhd, *paintEventClipRegion );
+		x11SetClipRegion( dpy, gc, nullptr, rendhd, *paintEventClipRegion );
                 ((TQGCC*)penRef)->clip_serial = gc_cache_clip_serial;
             } else if ( !penRef ) {
-		x11SetClipRegion( dpy, gc, 0, rendhd, *paintEventClipRegion );
+		x11SetClipRegion( dpy, gc, nullptr, rendhd, *paintEventClipRegion );
             }
         } else if (penRef && ((TQGCC*)penRef)->clip_serial ) {
-            x11ClearClipRegion(dpy, gc, 0, rendhd);
+            x11ClearClipRegion(dpy, gc, nullptr, rendhd);
             ((TQGCC*)penRef)->clip_serial = 0;
         }
     }
@@ -905,7 +905,7 @@ void TQPainter::updateBrush()
         if ( gc_brush ) {
             if ( brushRef ) {
                 release_gc( brushRef );
-                brushRef = 0;
+                brushRef = nullptr;
                 gc_brush = alloc_gc( dpy, scrn, hd, testf(MonoDev) );
             } else {
                 internclipok = true;
@@ -918,13 +918,13 @@ void TQPainter::updateBrush()
     if ( !internclipok ) {
         if ( pdev == paintEventDevice && paintEventClipRegion ) {
             if ( brushRef &&((TQGCC*)brushRef)->clip_serial < gc_cache_clip_serial ) {
-		x11SetClipRegion( dpy, gc_brush, 0, rendhd, *paintEventClipRegion );
+		x11SetClipRegion( dpy, gc_brush, nullptr, rendhd, *paintEventClipRegion );
                 ((TQGCC*)brushRef)->clip_serial = gc_cache_clip_serial;
             } else if ( !brushRef ){
-		x11SetClipRegion( dpy, gc_brush, 0, rendhd, *paintEventClipRegion );
+		x11SetClipRegion( dpy, gc_brush, nullptr, rendhd, *paintEventClipRegion );
             }
         } else if (brushRef && ((TQGCC*)brushRef)->clip_serial ) {
-            x11ClearClipRegion(dpy, gc_brush, 0, rendhd);
+            x11ClearClipRegion(dpy, gc_brush, nullptr, rendhd);
             ((TQGCC*)brushRef)->clip_serial = 0;
         }
     }
@@ -932,7 +932,7 @@ void TQPainter::updateBrush()
     if ( obtained )
         return;
 
-    const uchar *pat = 0;                             // pattern
+    const uchar *pat = nullptr;                             // pattern
     int d = 0;                                  // defalt pattern size: d*d
     int s  = FillSolid;
     if ( bs >= Dense1Pattern && bs <= DiagCrossPattern ) {
@@ -1017,7 +1017,7 @@ bool TQPainter::begin( const TQPaintDevice *pd, bool unclipped )
 #endif
         return false;
     }
-    if ( pd == 0 ) {
+    if ( !pd ) {
 #if defined(QT_CHECK_NULL)
         tqWarning( "TQPainter::begin: Paint device cannot be null" );
 #endif
@@ -1026,7 +1026,7 @@ bool TQPainter::begin( const TQPaintDevice *pd, bool unclipped )
 
     TQPixmap::x11SetDefaultScreen( pd->x11Screen() );
 
-    const TQWidget *copyFrom = 0;
+    const TQWidget *copyFrom = nullptr;
     pdev = redirect( (TQPaintDevice*)pd );
     if ( pdev ) {				    // redirected paint device?
 	if ( pd->devType() == TQInternal::Widget )
@@ -1060,13 +1060,13 @@ bool TQPainter::begin( const TQPaintDevice *pd, bool unclipped )
     rendhd = pdev->rendhd;
 
     if ( testf(ExtDev) ) {                      // external device
-        if ( !pdev->cmd( TQPaintDevice::PdcBegin, this, 0 ) ) {
+        if ( !pdev->cmd( TQPaintDevice::PdcBegin, this, nullptr ) ) {
             // could not begin painting
             if ( reinit )
                 clearf( IsActive | DirtyFont );
             else
                 flags = IsStartingUp;
-            pdev = 0;
+            pdev = nullptr;
             return false;
         }
         if ( tabstops )                         // update tabstops for device
@@ -1206,43 +1206,43 @@ bool TQPainter::end()                            // end painting
     if ( gc_brush ) {                           // restore brush gc
         if ( brushRef ) {
             release_gc( brushRef );
-            brushRef = 0;
+            brushRef = nullptr;
         } else {
             free_gc( dpy, gc_brush, testf(UsePrivateCx) );
         }
-        gc_brush = 0;
+        gc_brush = nullptr;
 
     }
     if ( gc ) {                                 // restore pen gc
         if ( penRef ) {
             release_gc( penRef );
-            penRef = 0;
+            penRef = nullptr;
         } else {
             free_gc( dpy, gc, testf(UsePrivateCx) );
         }
-        gc = 0;
+        gc = nullptr;
     }
 
     if ( testf(ExtDev) )
-        pdev->cmd( TQPaintDevice::PdcEnd, this, 0 );
+        pdev->cmd( TQPaintDevice::PdcEnd, this, nullptr );
 
 #ifndef TQT_NO_XFTFREETYPE
     if (rendhd) {
         // reset clipping/subwindow mode on our render picture
-        XftDrawSetClip((XftDraw *) rendhd, None);
+        XftDrawSetClip((XftDraw *) rendhd, nullptr);
         XftDrawSetSubwindowMode((XftDraw *) rendhd, ClipByChildren);
     }
 #endif // TQT_NO_XFTFREETYPE
 
     if ( pfont ) {
 	delete pfont;
-	pfont = 0;
+	pfont = nullptr;
     }
 
     flags = 0;
     pdev->painters--;
-    pdev = 0;
-    dpy  = 0;
+    pdev = nullptr;
+    dpy  = nullptr;
     return true;
 }
 
@@ -1279,7 +1279,7 @@ void TQPainter::flush(const TQRegion &rgn, CoordinateMode m)
 void TQPainter::flush()
 {
     if ( testf(ExtDev) ) {
-        pdev->cmd( TQPaintDevice::PdcFlush, this, 0 );
+        pdev->cmd( TQPaintDevice::PdcFlush, this, nullptr );
         return;
     }
 
@@ -2680,9 +2680,9 @@ void TQPainter::drawPixmap( int x, int y, const TQPixmap &pixmap,
             XSetFillStyle( dpy, gc, FillSolid );
             if ( !selfmask ) {
                 if ( pdev == paintEventDevice && paintEventClipRegion ) {
-                    x11SetClipRegion( dpy, gc, 0, rendhd, *paintEventClipRegion );
+                    x11SetClipRegion( dpy, gc, nullptr, rendhd, *paintEventClipRegion );
 		} else {
-                    x11ClearClipRegion(dpy, gc, 0, rendhd);
+                    x11ClearClipRegion(dpy, gc, nullptr, rendhd);
 		}
             }
         } else {
@@ -2846,7 +2846,7 @@ void TQPainter::drawTiledPixmap( int x, int y, int w, int h,
     */
     TQBitmap *mask = (TQBitmap *)pixmap.mask();
     if ( !testf(ExtDev) && txop <= TxTranslate && pixmap.depth() > 1 &&
-         mask == 0 ) {
+         !mask ) {
         if ( txop == TxTranslate )
             map( x, y, &x, &y );
 
@@ -3121,7 +3121,7 @@ void TQPainter::drawText( int x, int y, const TQString &str, int pos, int len, T
 
 	drawTextItem( x, y - ascent, ti, textFlags );
     }
-    layout.d = 0;
+    layout.d = nullptr;
 }
 
 
@@ -3155,7 +3155,7 @@ void TQPainter::drawTextItem( int x,  int y, const TQTextItem &ti, int textFlags
 
     engine->shape( ti.item );
     TQFontEngine *fe = si->fontEngine;
-    assert( fe != 0 );
+    assert( fe );
 
     x += si->x;
     y += si->y;
diff --git a/src/kernel/tqpalette.cpp b/src/kernel/tqpalette.cpp
index 1e4dfab89..9797c4621 100644
--- a/src/kernel/tqpalette.cpp
+++ b/src/kernel/tqpalette.cpp
@@ -193,7 +193,7 @@ public:
 
 TQColorGroup::TQColorGroup()
 {
-    static TQColorGroupPrivate* defColorGroupData = 0;
+    static TQColorGroupPrivate* defColorGroupData = nullptr;
     if ( !defColorGroupData ) {
 	static TQSharedCleanupHandler<TQColorGroupPrivate> defColorGroupCleanup;
 	defColorGroupData = new TQColorGroupPrivate;
@@ -577,7 +577,7 @@ static int palette_count = 1;
 
 TQPalette::TQPalette()
 {
-    static TQPalData *defPalData = 0;
+    static TQPalData *defPalData = nullptr;
     if ( !defPalData ) {                // create common palette data
 	defPalData = new TQPalData;      //   for the default palette
 	static TQSharedCleanupHandler<TQPalData> defPalCleanup;
diff --git a/src/kernel/tqpicture.cpp b/src/kernel/tqpicture.cpp
index 692e9087a..a2d66a62f 100644
--- a/src/kernel/tqpicture.cpp
+++ b/src/kernel/tqpicture.cpp
@@ -609,7 +609,7 @@ bool TQPicture::exec( TQPainter *painter, TQDataStream &s, int nrecords )
 	    case PdcSetTabArray:
 		s >> i_16;
 		if ( i_16 == 0 ) {
-		    painter->setTabArray( 0 );
+		    painter->setTabArray( nullptr );
 		} else {
 		    int *ta = new int[i_16];
 		    TQ_CHECK_PTR( ta );
diff --git a/src/kernel/tqpicture.h b/src/kernel/tqpicture.h
index 28512b61f..20582fbd8 100644
--- a/src/kernel/tqpicture.h
+++ b/src/kernel/tqpicture.h
@@ -63,10 +63,10 @@ public:
 
     bool	play( TQPainter * );
 
-    bool	load( TQIODevice *dev, const char *format = 0 );
-    bool	load( const TQString &fileName, const char *format = 0 );
-    bool	save( TQIODevice *dev, const char *format = 0 );
-    bool	save( const TQString &fileName, const char *format = 0 );
+    bool	load( TQIODevice *dev, const char *format = nullptr );
+    bool	load( const TQString &fileName, const char *format = nullptr );
+    bool	save( TQIODevice *dev, const char *format = nullptr );
+    bool	save( const TQString &fileName, const char *format = nullptr );
 
     TQRect boundingRect() const;
     void setBoundingRect( const TQRect &r );
diff --git a/src/kernel/tqpixmap.cpp b/src/kernel/tqpixmap.cpp
index 4bb55b98d..49b24ceb0 100644
--- a/src/kernel/tqpixmap.cpp
+++ b/src/kernel/tqpixmap.cpp
@@ -361,7 +361,7 @@ TQPixmap::TQPixmap( const TQPixmap &pixmap )
     : TQPaintDevice( TQInternal::Pixmap )
 {
     if ( pixmap.paintingActive() ) {		// make a deep copy
-	data = 0;
+	data = nullptr;
 	operator=( pixmap.copy() );
     } else {
 	data = pixmap.data;
@@ -736,7 +736,7 @@ void TQPixmap::setMask( const TQBitmap &newmask )
 	    data->selfmask = false;
 
 	    delete data->mask;
-	    data->mask = 0;
+	    data->mask = nullptr;
 	}
 	return;
     }
@@ -754,7 +754,7 @@ void TQPixmap::setMask( const TQBitmap &newmask )
 #if defined(TQ_WS_MAC) || (defined(TQ_WS_X11) && !defined(TQT_NO_XFTFREETYPE))
     // when setting the mask, we get rid of the alpha channel completely
     delete data->alphapm;
-    data->alphapm = 0;
+    data->alphapm = nullptr;
 #endif // TQ_WS_X11 && !TQT_NO_XFTFREETYPE
 
     delete data->mask;
@@ -1127,7 +1127,7 @@ static TQPixmap grabChildWidgets( TQWidget * w )
 	TQPainter p( &res );
 	TQObjectListIt it( *children );
 	TQObject * child;
-	while( (child=it.current()) != 0 ) {
+	while( (child=it.current()) ) {
 	    ++it;
 	    if ( child->isWidgetType() &&
 		 !((TQWidget *)child)->isHidden() &&
diff --git a/src/kernel/tqpixmap.h b/src/kernel/tqpixmap.h
index 8370f8edb..152df67cd 100644
--- a/src/kernel/tqpixmap.h
+++ b/src/kernel/tqpixmap.h
@@ -68,7 +68,7 @@ public:
     TQPixmap( int w, int h,  int depth = -1, Optimization = DefaultOptim );
     TQPixmap( const TQSize &, int depth = -1, Optimization = DefaultOptim );
 #ifndef TQT_NO_IMAGEIO
-    TQPixmap( const TQString& fileName, const char *format=0,
+    TQPixmap( const TQString& fileName, const char *format=nullptr,
 	     ColorMode mode=Auto );
     TQPixmap( const TQString& fileName, const char *format,
 	     int conversion_flags );
@@ -121,18 +121,18 @@ public:
     bool	convertFromImage( const TQImage &, int conversion_flags );
 #ifndef TQT_NO_IMAGEIO
     static const char* imageFormat( const TQString &fileName );
-    bool	load( const TQString& fileName, const char *format=0,
+    bool	load( const TQString& fileName, const char *format=nullptr,
 		      ColorMode mode=Auto );
     bool	load( const TQString& fileName, const char *format,
 		      int conversion_flags );
     bool	loadFromData( const uchar *buf, uint len,
-			      const char* format=0,
+			      const char* format=nullptr,
 			      ColorMode mode=Auto );
     bool	loadFromData( const uchar *buf, uint len,
 			      const char* format,
 			      int conversion_flags );
     bool	loadFromData( const TQByteArray &data,
-			      const char* format=0,
+			      const char* format=nullptr,
 			      int conversion_flags=0 );
     bool	save( const TQString& fileName, const char* format, int quality = -1 ) const;
     bool	save( TQIODevice* device, const char* format, int quality = -1 ) const;
diff --git a/src/kernel/tqpixmap_x11.cpp b/src/kernel/tqpixmap_x11.cpp
index 78b8d3888..ba6c868ca 100644
--- a/src/kernel/tqpixmap_x11.cpp
+++ b/src/kernel/tqpixmap_x11.cpp
@@ -95,7 +95,7 @@ inline static void qSafeXDestroyImage( XImage *x )
 {
     if ( x->data ) {
 	free( x->data );
-	x->data = 0;
+	x->data = nullptr;
     }
     XDestroyImage( x );
 }
@@ -109,7 +109,7 @@ inline static void qSafeXDestroyImage( XImage *x )
 
 static bool	       xshminit = false;
 static XShmSegmentInfo xshminfo;
-static XImage	      *xshmimg = 0;
+static XImage	      *xshmimg = nullptr;
 static Pixmap	       xshmpm  = 0;
 
 static void tqt_cleanup_mitshm()
@@ -224,17 +224,17 @@ static XImage* tqt_XShmCreateImage( Display* dpy, Visual* visual, unsigned int d
         return nullptr;
     }
     shminfo->readOnly = False;
-    shminfo->shmaddr = (char*)shmat( shminfo->shmid, 0, 0 );
+    shminfo->shmaddr = (char*)shmat( shminfo->shmid, nullptr, 0 );
     if( shminfo->shmaddr == (char*)-1 ) {
         XDestroyImage( xi );
-        shmctl( shminfo->shmid, IPC_RMID, 0 );
+        shmctl( shminfo->shmid, IPC_RMID, nullptr );
         return nullptr;
     }
     xi->data = shminfo->shmaddr;
 #ifndef QT_MITSHM_RMID_IGNORES_REFCOUNT
     // mark as deleted to automatically free the memory in case
     // of a crash (but this doesn't work e.g. on Solaris)
-    shmctl( shminfo->shmid, IPC_RMID, 0 );
+    shmctl( shminfo->shmid, IPC_RMID, nullptr );
 #endif
     if( shm_inited == 1 ) { // first time
         XErrorHandler old_h = XSetErrorHandler( tqt_mitshm_errorhandler );
@@ -270,7 +270,7 @@ static XImage* tqt_XShmGetImage( const TQPixmap* pix, int format,
     XShmSegmentInfo* shminfo )
 {
     XImage* xi = tqt_XShmCreateImage( pix->x11Display(), (Visual*)pix->x11Visual(),
-        pix->depth(), format, 0, 0, pix->width(), pix->height(), 32, 0, shminfo );
+        pix->depth(), format, 0, nullptr, pix->width(), pix->height(), 32, 0, shminfo );
     if( !xi )
         return nullptr;
     if( XShmGetImage( pix->x11Display(), pix->handle(), xi, 0, 0, AllPlanes ) == False ) {
@@ -331,9 +331,9 @@ static uint n_bits( uint v )
     return i;
 }
 
-static uint *red_scale_table   = 0;
-static uint *green_scale_table = 0;
-static uint *blue_scale_table  = 0;
+static uint *red_scale_table   = nullptr;
+static uint *green_scale_table = nullptr;
+static uint *blue_scale_table  = nullptr;
 
 static void cleanup_scale_tables()
 {
@@ -504,7 +504,7 @@ TQPixmap::TQPixmap( int w, int h, const uchar *bits, bool isXbitmap)
     data->d = 1;
     uchar *flipped_bits;
     if ( isXbitmap ) {
-	flipped_bits = 0;
+	flipped_bits = nullptr;
     } else {					// not X bitmap -> flip bits
 	flipped_bits = flip_bits( bits, ((w+7)/8)*h );
 	bits = flipped_bits;
@@ -553,11 +553,11 @@ void TQPixmap::detach()
     // reset cached data
     if ( data->ximage ) {
         qSafeXDestroyImage( (XImage*)data->ximage );
-        data->ximage = 0;
+        data->ximage = nullptr;
     }
     if ( data->maskgc ) {
         XFreeGC( x11Display(), (GC)data->maskgc );
-        data->maskgc = 0;
+        data->maskgc = nullptr;
     }
 }
 
@@ -619,7 +619,7 @@ void TQPixmap::setOptimization( Optimization optimization )
 	    defOptim : optimization;
     if ( data->optim == MemoryOptim && data->ximage ) {
 	qSafeXDestroyImage( (XImage*)data->ximage );
-	data->ximage = 0;
+	data->ximage = nullptr;
     }
 }
 
@@ -757,7 +757,7 @@ TQImage TQPixmap::convertToImage() const
         else
 #endif
         qSafeXDestroyImage( xi );
-	((TQPixmap*)this)->data->ximage = 0;
+	((TQPixmap*)this)->data->ximage = nullptr;
 	return image;
     }
 
@@ -842,7 +842,7 @@ TQImage TQPixmap::convertToImage() const
 	    bppc++;
 
 	for ( int y=0; y<h; y++ ) {
-	    uchar* asrc = alf || msk ? alpha.scanLine( y ) : 0;
+	    uchar* asrc = alf || msk ? alpha.scanLine( y ) : nullptr;
 	    dst = (TQRgb *)image.scanLine( y );
 	    src = (uchar *)xi->data + xi->bytes_per_line*y;
 	    for ( int x=0; x<w; x++ ) {
@@ -942,7 +942,7 @@ TQImage TQPixmap::convertToImage() const
         else
 #endif
 	qSafeXDestroyImage( xi );
-	((TQPixmap*)this)->data->ximage = 0;
+	((TQPixmap*)this)->data->ximage = nullptr;
 	return image;
     }
 
@@ -1054,12 +1054,12 @@ TQImage TQPixmap::convertToImage() const
         else
 #endif
 	qSafeXDestroyImage( xi );
-	((TQPixmap*)this)->data->ximage = 0;
+	((TQPixmap*)this)->data->ximage = nullptr;
     } else {					// keep ximage data
 #ifdef QT_MITSHM_CONVERSIONS
         if( mitshm_ximage ) { // copy the XImage?
             tqt_XShmDestroyImage( xi, &shminfo );
-            xi = 0;
+            xi = nullptr;
         }
 #endif
 	((TQPixmap*)this)->data->ximage = xi;
@@ -1111,11 +1111,11 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
 
     // get rid of the mask
     delete data->mask;
-    data->mask = 0;
+    data->mask = nullptr;
 
     // get rid of alpha pixmap
     delete data->alphapm;
-    data->alphapm = 0;
+    data->alphapm = nullptr;
 
     // must be monochrome
     if ( force_mono ) {
@@ -1207,7 +1207,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
 	    }
 	} else {
 	    bits = (char *)image.bits();
-	    tmp_bits = 0;
+	    tmp_bits = nullptr;
 	}
 	hd = (HANDLE)XCreateBitmapFromData( x11Display(),
 					    RootWindow(x11Display(), x11Screen() ),
@@ -1232,10 +1232,10 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
 
     Display *dpy   = x11Display();
     Visual *visual = (Visual *)x11Visual();
-    XImage *xi	   = 0;
+    XImage *xi	   = nullptr;
     bool    trucol = (visual->c_class == TrueColor || visual->c_class == DirectColor);
     int	    nbytes = image.numBytes();
-    uchar  *newbits= 0;
+    uchar  *newbits= nullptr;
 #ifdef QT_MITSHM_CONVERSIONS
     int newbits_size = 0;
     bool mitshm_ximage = false;
@@ -1270,14 +1270,14 @@ 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 );
+	xi = tqt_XShmCreateImage( dpy, visual, dd, ZPixmap, 0, nullptr, w, h, 32, 0, &shminfo );
 	if( xi ) {
 	    mitshm_ximage = true;
 	    newbits = (uchar*)xi->data;
 	}
 	else
 #endif
-	xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 );
+	xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, nullptr, w, h, 32, 0 );
         if (!xi)
             return false;
 	if( !newbits )
@@ -1729,12 +1729,12 @@ 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 );
+        xi = tqt_XShmCreateImage( dpy, visual, dd, ZPixmap, 0, nullptr, w, h, 32, 0, &shminfo );
         if( xi )
             mitshm_ximage = true;
         else
 #endif
-	xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 );
+	xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, nullptr, w, h, 32, 0 );
 	if ( xi->bits_per_pixel == 16 ) {	// convert 8 bpp ==> 16 bpp
 	    ushort *p2;
 	    int	    p2inc = xi->bytes_per_line/sizeof(ushort);
@@ -1855,13 +1855,13 @@ 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 );
+		    8, ZPixmap, 0, nullptr, w, h, 8, 0, &ashminfo );
 	    if( axi )
 		mitshm_aximage = true;
 	    else
 #endif
 		axi = XCreateImage(x11Display(), (Visual *) x11Visual(),
-				       8, ZPixmap, 0, 0, w, h, 8, 0);
+				       8, ZPixmap, 0, nullptr, w, h, 8, 0);
 
 	    if (axi) {
 		if( !axi->data ) {
@@ -1894,7 +1894,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
                     }
                 }
 
-                GC gc = XCreateGC(x11Display(), data->alphapm->hd, 0, 0);
+                GC gc = XCreateGC(x11Display(), data->alphapm->hd, 0, nullptr);
  #ifdef QT_MITSHM_CONVERSIONS
 		if( mitshm_aximage )
 		    XShmPutImage( dpy, data->alphapm->hd, gc, axi, 0, 0, 0, 0, w, h, False );
@@ -1919,12 +1919,12 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
         else
 #endif
      qSafeXDestroyImage( xi );
-     data->ximage = 0;
+     data->ximage = nullptr;
     } else {      // keep ximage that we created
 #ifdef QT_MITSHM_CONVERSIONS
         if( mitshm_ximage ) { // copy the XImage?
             tqt_XShmDestroyImage( xi, &shminfo );
-            xi = 0;
+            xi = nullptr;
         }
 #endif
      data->ximage = xi;
@@ -2195,7 +2195,7 @@ TQPixmap TQPixmap::xForm( const TQWMatrix &matrix ) const
 
     if ( data->optim == NoOptim ) {		// throw away ximage
 	qSafeXDestroyImage( xi );
-	data->ximage = 0;
+	data->ximage = nullptr;
     } else {					// keep ximage that we fetched
 	data->ximage = xi;
     }
@@ -2234,7 +2234,7 @@ TQPixmap TQPixmap::xForm( const TQWMatrix &matrix ) const
 
 #ifndef TQT_NO_XFTFREETYPE
 	if ( tqt_use_xrender && tqt_has_xft && data->alphapm ) { // xform the alpha channel
-	    XImage *axi = 0;
+	    XImage *axi = nullptr;
 	    if ((axi = XGetImage(x11Display(), data->alphapm->handle(),
 				 0, 0, ws, hs, AllPlanes, ZPixmap))) {
 		sbpl = axi->bytes_per_line;
@@ -2274,7 +2274,7 @@ TQPixmap TQPixmap::xForm( const TQWMatrix &matrix ) const
 
 		    if (axi2) {
 			// the data is deleted by qSafeXDestroyImage
-			GC gc = XCreateGC(x11Display(), pm.data->alphapm->hd, 0, 0);
+			GC gc = XCreateGC(x11Display(), pm.data->alphapm->hd, 0, nullptr);
 			XPutImage(dpy, pm.data->alphapm->hd, gc, axi2, 0, 0, 0, 0, w, h);
 			XFreeGC(x11Display(), gc);
 			qSafeXDestroyImage(axi2);
@@ -2362,7 +2362,7 @@ bool TQPixmap::hasAlpha() const
 */
 bool TQPixmap::hasAlphaChannel() const
 {
-    return data->alphapm != 0;
+    return data->alphapm;
 }
 
 /*!
@@ -2390,8 +2390,8 @@ TQ_EXPORT void copyBlt( TQPixmap *dst, int dx, int dy,
 {
     if ( ! dst || ! src || sw == 0 || sh == 0 || dst->depth() != src->depth() ) {
 #ifdef QT_CHECK_NULL
-	Q_ASSERT( dst != 0 );
-	Q_ASSERT( src != 0 );
+	Q_ASSERT( dst );
+	Q_ASSERT( src );
 #endif
 	return;
     }
@@ -2457,7 +2457,7 @@ TQ_EXPORT void copyBlt( TQPixmap *dst, int dx, int dy,
 					     dst->data->alphapm->hd, 8 );
     }
 
-    GC gc = XCreateGC(dst->x11Display(), dst->data->alphapm->hd, 0, 0);
+    GC gc = XCreateGC(dst->x11Display(), dst->data->alphapm->hd, 0, nullptr);
 
     if ( do_init ) {
 	// the alphapm was just created, make it fully opaque
diff --git a/src/kernel/tqpixmapcache.cpp b/src/kernel/tqpixmapcache.cpp
index 0976554fe..3d355f3ff 100644
--- a/src/kernel/tqpixmapcache.cpp
+++ b/src/kernel/tqpixmapcache.cpp
@@ -105,7 +105,7 @@ class TQPMCache: public TQObject, public TQCache<TQPixmap>
 {
 public:
     TQPMCache():
-	TQObject( 0, "global pixmap cache" ),
+	TQObject( nullptr, "global pixmap cache" ),
 	TQCache<TQPixmap>( cache_limit * 1024, cache_size ),
 	id( 0 ), ps( 0 ), t( false )
 	{
@@ -160,7 +160,7 @@ bool TQPMCache::insert( const TQString& k, const TQPixmap *d, int c, int p )
     return r;
 }
 
-static TQPMCache *pm_cache = 0;			// global pixmap cache
+static TQPMCache *pm_cache = nullptr;			// global pixmap cache
 
 static TQSingleCleanupHandler<TQPMCache> qpm_cleanup_cache;
 
@@ -189,7 +189,7 @@ static TQSingleCleanupHandler<TQPMCache> qpm_cleanup_cache;
 
 TQPixmap *TQPixmapCache::find( const TQString &key )
 {
-    return pm_cache ? pm_cache->find(key) : 0;
+    return pm_cache ? pm_cache->find(key) : nullptr;
 }
 
 
@@ -213,7 +213,7 @@ TQPixmap *TQPixmapCache::find( const TQString &key )
 
 bool TQPixmapCache::find( const TQString &key, TQPixmap& pm )
 {
-    TQPixmap* p = pm_cache ? pm_cache->find(key) : 0;
+    TQPixmap* p = pm_cache ? pm_cache->find(key) : nullptr;
     if ( p ) pm = *p;
     return !!p;
 }
diff --git a/src/kernel/tqpngio.cpp b/src/kernel/tqpngio.cpp
index 6da20c0e4..457d5bd7c 100644
--- a/src/kernel/tqpngio.cpp
+++ b/src/kernel/tqpngio.cpp
@@ -127,7 +127,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc
     int bit_depth;
     int color_type;
     png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
-	0, 0, 0);
+	nullptr, nullptr, nullptr);
 
 #if PNG_LIBPNG_VER>=10500
     png_colorp info_ptr_palette = nullptr;
@@ -211,7 +211,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc
 	    png_set_packing( png_ptr );
 	png_read_update_info( png_ptr, info_ptr );
 	png_get_IHDR(png_ptr, info_ptr,
-	    &width, &height, &bit_depth, &color_type, 0, 0, 0);
+	    &width, &height, &bit_depth, &color_type, nullptr, nullptr, nullptr);
 #if PNG_LIBPNG_VER>=10500
 	if (!image.create(width, height, bit_depth, info_ptr_num_palette,
 #else /* LIBPNG 1.5 */
@@ -325,24 +325,24 @@ void read_png_image(TQImageIO* iio)
     png_infop end_info;
     png_bytep* row_pointers;
 
-    png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,0,0,0);
+    png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,nullptr,nullptr,nullptr);
     if (!png_ptr) {
 	iio->setStatus(-1);
 	return;
     }
 
-    png_set_error_fn(png_ptr, 0, 0, tqt_png_warning);
+    png_set_error_fn(png_ptr, nullptr, nullptr, tqt_png_warning);
 
     info_ptr = png_create_info_struct(png_ptr);
     if (!info_ptr) {
-	png_destroy_read_struct(&png_ptr, 0, 0);
+	png_destroy_read_struct(&png_ptr, nullptr, nullptr);
 	iio->setStatus(-2);
 	return;
     }
 
     end_info = png_create_info_struct(png_ptr);
     if (!end_info) {
-	png_destroy_read_struct(&png_ptr, &info_ptr, 0);
+	png_destroy_read_struct(&png_ptr, &info_ptr, nullptr);
 	iio->setStatus(-3);
 	return;
     }
@@ -373,7 +373,7 @@ void read_png_image(TQImageIO* iio)
     int bit_depth;
     int color_type;
     png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
-	0, 0, 0);
+	nullptr, nullptr, nullptr);
 
     uchar** jt = image.jumpTable();
     row_pointers=new png_bytep[height];
@@ -416,7 +416,7 @@ png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)
     int num_text=0;
     png_get_text(png_ptr,info_ptr,&text_ptr,&num_text);
     while (num_text--) {
-	image.setText(text_ptr->key,0,text_ptr->text);
+	image.setText(text_ptr->key,nullptr,text_ptr->text);
 	text_ptr++;
     }
 #endif
@@ -529,16 +529,16 @@ bool TQPNGImageWriter::writeImage(const TQImage& image, int quality_in, int off_
     png_infop info_ptr;
     png_bytep* row_pointers;
 
-    png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,0,0,0);
+    png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,nullptr,nullptr,nullptr);
     if (!png_ptr) {
 	return false;
     }
 
-    png_set_error_fn(png_ptr, 0, 0, tqt_png_warning);
+    png_set_error_fn(png_ptr, nullptr, nullptr, tqt_png_warning);
 
     info_ptr = png_create_info_struct(png_ptr);
     if (!info_ptr) {
-	png_destroy_write_struct(&png_ptr, 0);
+	png_destroy_write_struct(&png_ptr, nullptr);
 	return false;
     }
 
@@ -592,8 +592,8 @@ bool TQPNGImageWriter::writeImage(const TQImage& image, int quality_in, int off_
     if (image.depth() == 1 && image.bitOrder() == TQImage::LittleEndian)
        png_set_packswap(png_ptr);
 
-    png_colorp palette = 0;
-    png_bytep copy_trans = 0;
+    png_colorp palette = nullptr;
+    png_bytep copy_trans = nullptr;
     if (image.numColors()) {
 	// Paletted
         int num_palette = image.numColors();
@@ -631,7 +631,7 @@ bool TQPNGImageWriter::writeImage(const TQImage& image, int quality_in, int off_
 	    copy_trans = new png_byte[num_trans];
 	    for (int i=0; i<num_trans; i++)
 		copy_trans[i] = trans[i];
-	    png_set_tRNS(png_ptr, info_ptr, copy_trans, num_trans, 0);
+	    png_set_tRNS(png_ptr, info_ptr, copy_trans, num_trans, nullptr);
 	}
 	delete [] trans;
     }
@@ -712,7 +712,7 @@ bool TQPNGImageWriter::writeImage(const TQImage& image, int quality_in, int off_
     int bit_depth;
     int color_type;
     png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
-	0, 0, 0);
+	nullptr, nullptr, nullptr);
 
     uchar** jt = image.jumpTable();
     row_pointers=new png_bytep[height];
@@ -1016,7 +1016,7 @@ class TQPNGFormatType : public TQImageFormatType
 TQImageFormat* TQPNGFormatType::decoderFor(
     const uchar* buffer, int length)
 {
-    if (length < 8) return 0;
+    if (length < 8) return nullptr;
     if (buffer[0]==137
      && buffer[1]=='P'
      && buffer[2]=='N'
@@ -1026,7 +1026,7 @@ TQImageFormat* TQPNGFormatType::decoderFor(
      && buffer[6]==26
      && buffer[7]==10)
 	return new TQPNGFormat;
-    return 0;
+    return nullptr;
 }
 
 const char* TQPNGFormatType::formatName() const
@@ -1086,8 +1086,8 @@ TQPNGFormat::TQPNGFormat()
     first_frame = 1;
     base_offx = 0;
     base_offy = 0;
-    png_ptr = 0;
-    info_ptr = 0;
+    png_ptr = nullptr;
+    info_ptr = nullptr;
 }
 
 
@@ -1097,7 +1097,7 @@ TQPNGFormat::TQPNGFormat()
 TQPNGFormat::~TQPNGFormat()
 {
     if ( png_ptr )
-        png_destroy_read_struct(&png_ptr, &info_ptr, 0);
+        png_destroy_read_struct(&png_ptr, &info_ptr, nullptr);
 }
 
 
@@ -1113,20 +1113,20 @@ int TQPNGFormat::decode(TQImage& img, TQImageConsumer* cons,
     image = &img;
 
     if ( state != Inside ) {
-	png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0);
+	png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr);
 	if (!png_ptr) {
-	    info_ptr = 0;
-	    image = 0;
+	    info_ptr = nullptr;
+	    image = nullptr;
 		return -1;
 	}
 
-	png_set_error_fn(png_ptr, 0, 0, tqt_png_warning);
+	png_set_error_fn(png_ptr, nullptr, nullptr, tqt_png_warning);
 	png_set_compression_level(png_ptr, 9);
 
 	info_ptr = png_create_info_struct(png_ptr);
 	if (!info_ptr) {
-	    png_destroy_read_struct(&png_ptr, &info_ptr, 0);
-	    image = 0;
+	    png_destroy_read_struct(&png_ptr, &info_ptr, nullptr);
+	    image = nullptr;
 	    return -1;
 	}
 
@@ -1135,8 +1135,8 @@ int TQPNGFormat::decode(TQImage& img, TQImageConsumer* cons,
 #else /* LIBPNG 1.5 */
 	if (setjmp((png_ptr)->jmpbuf)) {
 #endif /* LIBPNG 1.5 */
-	    png_destroy_read_struct(&png_ptr, &info_ptr, 0);
-	    image = 0;
+	    png_destroy_read_struct(&png_ptr, &info_ptr, nullptr);
+	    image = nullptr;
 	    return -1;
 	}
 
@@ -1166,8 +1166,8 @@ int TQPNGFormat::decode(TQImage& img, TQImageConsumer* cons,
 #else /* LIBPNG 1.5 */
     if (setjmp(png_ptr->jmpbuf)) {
 #endif /* LIBPNG 1.5 */
-	png_destroy_read_struct(&png_ptr, &info_ptr, 0);
-	image = 0;
+	png_destroy_read_struct(&png_ptr, &info_ptr, nullptr);
+	image = nullptr;
 	state = MovieStart;
 	return -1;
     }
@@ -1179,10 +1179,10 @@ int TQPNGFormat::decode(TQImage& img, TQImageConsumer* cons,
 
     if ( state != Inside ) {
 	if ( png_ptr )
-	    png_destroy_read_struct(&png_ptr, &info_ptr, 0);
+	    png_destroy_read_struct(&png_ptr, &info_ptr, nullptr);
     }
 
-    image = 0;
+    image = nullptr;
     return l;
 }
 
@@ -1217,7 +1217,7 @@ void TQPNGFormat::end(png_structp png, png_infop info)
     int num_text=0;
     png_get_text(png,info,&text_ptr,&num_text);
     while (num_text--) {
-	image->setText(text_ptr->key,0,text_ptr->text);
+	image->setText(text_ptr->key,nullptr,text_ptr->text);
 	text_ptr++;
     }
 #endif
@@ -1313,7 +1313,7 @@ int TQPNGFormat::user_chunk(png_structp png,
 #endif
 
 
-static TQPNGFormatType* globalPngFormatTypeObject = 0;
+static TQPNGFormatType* globalPngFormatTypeObject = nullptr;
 
 #endif // TQT_NO_ASYNC_IMAGE_IO
 
@@ -1323,7 +1323,7 @@ void qCleanupPngIO()
 #ifndef TQT_NO_ASYNC_IMAGE_IO
     if ( globalPngFormatTypeObject ) {
 	delete globalPngFormatTypeObject;
-	globalPngFormatTypeObject = 0;
+	globalPngFormatTypeObject = nullptr;
     }
 #endif
     done = false;
@@ -1333,7 +1333,7 @@ void qInitPngIO()
 {
     if ( !done ) {
 	done = true;
-	TQImageIO::defineIOHandler( "PNG", "^.PNG\r", 0, read_png_image,
+	TQImageIO::defineIOHandler( "PNG", "^.PNG\r", nullptr, read_png_image,
 				   write_png_image);
 #ifndef TQT_NO_ASYNC_IMAGE_IO
 	globalPngFormatTypeObject = new TQPNGFormatType;
@@ -1344,8 +1344,8 @@ void qInitPngIO()
 
 void tqt_zlib_compression_hack()
 {
-    compress(0,0,0,0);
-    uncompress(0,0,0,0);
+    compress(nullptr,nullptr,nullptr,0);
+    uncompress(nullptr,nullptr,nullptr,0);
 }
 
 #endif // TQT_NO_IMAGEIO_PNG
diff --git a/src/kernel/tqpointarray.cpp b/src/kernel/tqpointarray.cpp
index 4a1e35f8c..844059e00 100644
--- a/src/kernel/tqpointarray.cpp
+++ b/src/kernel/tqpointarray.cpp
@@ -1058,7 +1058,7 @@ struct TQShortPoint {			// Binary compatible with XPoint
 };
 
 uint TQPointArray::splen = 0;
-void* TQPointArray::sp = 0;		// Really a TQShortPoint*
+void* TQPointArray::sp = nullptr;		// Really a TQShortPoint*
 
 /*!
   \internal
@@ -1073,7 +1073,7 @@ void* TQPointArray::shortPoints( int index, int nPoints ) const
 {
 
     if ( isNull() || !nPoints )
-	return 0;
+	return nullptr;
     TQPoint* p = data();
     p += index;
     uint i = nPoints < 0 ? size() : nPoints;
@@ -1104,6 +1104,6 @@ void TQPointArray::cleanBuffers()
 {
     if ( sp )
 	delete[] ((TQShortPoint*)sp);
-    sp = 0;
+    sp = nullptr;
     splen = 0;
 }
diff --git a/src/kernel/tqpolygonscanner.cpp b/src/kernel/tqpolygonscanner.cpp
index 54a075c66..db23e4c0d 100644
--- a/src/kernel/tqpolygonscanner.cpp
+++ b/src/kernel/tqpolygonscanner.cpp
@@ -434,14 +434,14 @@ miInsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE,
 	    if (!tmpSLLBlock)
 		return false;
             (*SLLBlock)->next = tmpSLLBlock;
-            tmpSLLBlock->next = 0;
+            tmpSLLBlock->next = nullptr;
             *SLLBlock = tmpSLLBlock;
             *iSLLBlock = 0;
         }
         pSLL = &((*SLLBlock)->SLLs[(*iSLLBlock)++]);
 
         pSLL->next = pPrevSLL->next;
-        pSLL->edgelist = 0;
+        pSLL->edgelist = nullptr;
         pPrevSLL->next = pSLL;
     }
     pSLL->scanline = scanline;
@@ -449,7 +449,7 @@ miInsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE,
     /*
      * now insert the edge in the right bucket
      */
-    prev = 0;
+    prev = nullptr;
     start = pSLL->edgelist;
     while (start && (start->bres.minor < ETE->bres.minor))
     {
@@ -530,18 +530,18 @@ miCreateETandAET(int count, DDXPointPtr pts, EdgeTable *ET,
     /*
      *  initialize the Active Edge Table
      */
-    AET->next = 0;
-    AET->back = 0;
-    AET->nextWETE = 0;
+    AET->next = nullptr;
+    AET->back = nullptr;
+    AET->nextWETE = nullptr;
     AET->bres.minor = MININT;
 
     /*
      *  initialize the Edge Table.
      */
-    ET->scanlines.next = 0;
+    ET->scanlines.next = nullptr;
     ET->ymax = MININT;
     ET->ymin = MAXINT;
-    pSLLBlock->next = 0;
+    pSLLBlock->next = nullptr;
 
     PrevPt = &pts[count-1];
 
@@ -660,7 +660,7 @@ micomputeWAET(EdgeTableEntry *AET)
     int inside = 1;
     int isInside = 0;
 
-    AET->nextWETE = 0;
+    AET->nextWETE = nullptr;
     pWETE = AET;
     AET = AET->next;
     while (AET)
@@ -679,7 +679,7 @@ micomputeWAET(EdgeTableEntry *AET)
         }
         AET = AET->next;
     }
-    pWETE->nextWETE = 0;
+    pWETE->nextWETE = nullptr;
 }
 
 /*
diff --git a/src/kernel/tqprinter.h b/src/kernel/tqprinter.h
index de561901a..ed1887d65 100644
--- a/src/kernel/tqprinter.h
+++ b/src/kernel/tqprinter.h
@@ -153,7 +153,7 @@ public:
     bool        abort();
     bool        aborted()       const;
 
-    bool        setup( TQWidget *parent = 0 );
+    bool        setup( TQWidget *parent = nullptr );
 
     PaperSource paperSource()   const;
     virtual void setPaperSource( PaperSource );
diff --git a/src/kernel/tqprinter_unix.cpp b/src/kernel/tqprinter_unix.cpp
index 0558a1d8b..3ef090ce6 100644
--- a/src/kernel/tqprinter_unix.cpp
+++ b/src/kernel/tqprinter_unix.cpp
@@ -100,7 +100,7 @@ struct PrinterDefaults {
     int numCopies;
 };
 
-static PrinterDefaults * globalPrinterDefaults = 0;
+static PrinterDefaults * globalPrinterDefaults = nullptr;
 
 /*!
     Constructs a printer paint device with mode \a m.
@@ -111,7 +111,7 @@ static PrinterDefaults * globalPrinterDefaults = 0;
 TQPrinter::TQPrinter( PrinterMode m )
     : TQPaintDevice( TQInternal::Printer | TQInternal::ExternalDevice )
 {
-    pdrv = 0;
+    pdrv = nullptr;
     pid = 0;
     orient = Portrait;
     page_size = A4;
@@ -153,7 +153,7 @@ TQPrinter::~TQPrinter()
     delete pdrv;
     if ( pid ) {
 	(void)::kill( pid, 6 );
-	(void)::wait( 0 );
+	(void)::wait( nullptr );
 	pid = 0;
     }
     delete d;
@@ -168,7 +168,7 @@ TQPrinter::~TQPrinter()
 bool TQPrinter::newPage()
 {
     if ( state == PST_ACTIVE && pdrv )
-	return ((TQPSPrinter*)pdrv)->cmd( TQPSPrinter::NewPage, 0, 0 );
+	return ((TQPSPrinter*)pdrv)->cmd( TQPSPrinter::NewPage, nullptr, nullptr );
     return false;
 }
 
@@ -183,11 +183,11 @@ bool TQPrinter::newPage()
 bool TQPrinter::abort()
 {
     if ( state == PST_ACTIVE && pdrv ) {
-	((TQPSPrinter*)pdrv)->cmd( TQPSPrinter::AbortPrinting, 0, 0 );
+	((TQPSPrinter*)pdrv)->cmd( TQPSPrinter::AbortPrinting, nullptr, nullptr );
 	state = PST_ABORTED;
 	if ( pid ) {
 	    (void)::kill( pid, 6 );
-	    (void)::wait( 0 );
+	    (void)::wait( nullptr );
 	    pid = 0;
 	}
     }
@@ -232,7 +232,7 @@ void TQPrinter::setPrinterName( const TQString &name )
 static void deleteGlobalPrinterDefaults()
 {
     delete globalPrinterDefaults;
-    globalPrinterDefaults = 0;
+    globalPrinterDefaults = nullptr;
 }
 
 /*!
@@ -298,7 +298,7 @@ static const char * const psToStr[TQPrinter::NPageSize+1] =
 { "A4", "B5", "Letter", "Legal", "Executive",
   "A0", "A1", "A2", "A3", "A5", "A6", "A7", "A8", "A9", "B0", "B1",
   "B10", "B2", "B3", "B4", "B6", "B7", "B8", "B9", "C5E", "Comm10E",
-  "DLE", "Folio", "Ledger", "Tabloid", 0
+  "DLE", "Folio", "Ledger", "Tabloid", nullptr
 };
 
 
@@ -420,12 +420,12 @@ bool TQPrinter::cmd( int c, TQPainter *paint, TQPDevCmdParam *p )
                             media += psToStr[page_size];
                             lpargs[++i] = (char *)media.ascii();
                         }
-                        lpargs[++i] = 0;
+                        lpargs[++i] = nullptr;
                         char **lprargs = new char *[lprhack.size()+1];
                         lprargs[0] = (char *)"lpr";
                         for (uint x = 0; x < lprhack.size(); ++x)
                             lprargs[x+1] = (char *)lprhack[x].ascii();
-                        lprargs[lprhack.size() + 1] = 0;
+                        lprargs[lprhack.size() + 1] = nullptr;
 			(void)execvp( "lp", lpargs );
 			(void)execvp( "lpr", lprargs );
 			(void)execv( "/bin/lp", lpargs);
@@ -459,9 +459,9 @@ bool TQPrinter::cmd( int c, TQPainter *paint, TQPDevCmdParam *p )
 	    if ( c == PdcEnd ) {
 		state = PST_IDLE;
 		delete pdrv;
-		pdrv = 0;
+		pdrv = nullptr;
 		if ( pid ) {
-		    (void)::waitpid( pid, 0, 0 );
+		    (void)::waitpid( pid, nullptr, 0 );
 		    pid = 0;
 		}
 	    }
diff --git a/src/kernel/tqprocess.cpp b/src/kernel/tqprocess.cpp
index 58b0bdbaf..c7421ece5 100644
--- a/src/kernel/tqprocess.cpp
+++ b/src/kernel/tqprocess.cpp
@@ -512,7 +512,7 @@ TQString TQProcess::readLineStdout()
     }
 
     uint size = a.size();
-    buf->consumeBytes( size, 0 );
+    buf->consumeBytes( size, nullptr );
 
     // get rid of terminating \n or \r\n
     if ( size>0 && a.at( size - 1 ) == '\n' ) {
@@ -548,7 +548,7 @@ TQString TQProcess::readLineStderr()
     }
 
     uint size = a.size();
-    buf->consumeBytes( size, 0 );
+    buf->consumeBytes( size, nullptr );
 
     // get rid of terminating \n or \r\n
     if ( size>0 && a.at( size - 1 ) == '\n' ) {
@@ -781,21 +781,21 @@ void TQProcess::connectNotify( const char * signal )
 void TQProcess::disconnectNotify( const char * )
 {
     if ( ioRedirection &&
-	    receivers( TQ_SIGNAL(readyReadStdout()) ) ==0 &&
-	    receivers( TQ_SIGNAL(readyReadStderr()) ) ==0
+	    !receivers( TQ_SIGNAL(readyReadStdout()) ) &&
+	    !receivers( TQ_SIGNAL(readyReadStderr()) )
 	    ) {
 #if defined(QT_QPROCESS_DEBUG)
 	tqDebug( "TQProcess::disconnectNotify(): set ioRedirection to false" );
 #endif
 	setIoRedirection( false );
     }
-    if ( notifyOnExit && receivers( TQ_SIGNAL(processExited()) ) == 0 ) {
+    if ( notifyOnExit && !receivers( TQ_SIGNAL(processExited()) ) ) {
 #if defined(QT_QPROCESS_DEBUG)
 	tqDebug( "TQProcess::disconnectNotify(): set notifyOnExit to false" );
 #endif
 	setNotifyOnExit( false );
     }
-    if ( wroteToStdinConnected && receivers( TQ_SIGNAL(wroteToStdin()) ) == 0 ) {
+    if ( wroteToStdinConnected && !receivers( TQ_SIGNAL(wroteToStdin()) ) ) {
 #if defined(QT_QPROCESS_DEBUG)
 	tqDebug( "TQProcess::disconnectNotify(): set wroteToStdinConnected to false" );
 #endif
diff --git a/src/kernel/tqprocess.h b/src/kernel/tqprocess.h
index 40b6c11a5..9aad40be3 100644
--- a/src/kernel/tqprocess.h
+++ b/src/kernel/tqprocess.h
@@ -57,9 +57,9 @@ class TQ_EXPORT TQProcess : public TQObject
 {
     TQ_OBJECT
 public:
-    TQProcess( TQObject *parent=0, const char *name=0 );
-    TQProcess( const TQString& arg0, TQObject *parent=0, const char *name=0 );
-    TQProcess( const TQStringList& args, TQObject *parent=0, const char *name=0 );
+    TQProcess( TQObject *parent=nullptr, const char *name=nullptr );
+    TQProcess( const TQString& arg0, TQObject *parent=nullptr, const char *name=nullptr );
+    TQProcess( const TQStringList& args, TQObject *parent=nullptr, const char *name=nullptr );
     ~TQProcess();
 
     // set and get the arguments and working directory
@@ -78,9 +78,9 @@ public:
     int communication() const;
 
     // start the execution
-    virtual bool start( TQStringList *env=0 );
-    virtual bool launch( const TQString& buf, TQStringList *env=0  );
-    virtual bool launch( const TQByteArray& buf, TQStringList *env=0  );
+    virtual bool start( TQStringList *env=nullptr );
+    virtual bool launch( const TQString& buf, TQStringList *env=nullptr  );
+    virtual bool launch( const TQByteArray& buf, TQStringList *env=nullptr  );
 
     // inquire the status
     bool isRunning() const;
diff --git a/src/kernel/tqprocess_unix.cpp b/src/kernel/tqprocess_unix.cpp
index 2d0c60c84..9af9acf32 100644
--- a/src/kernel/tqprocess_unix.cpp
+++ b/src/kernel/tqprocess_unix.cpp
@@ -131,7 +131,7 @@ public:
 class TQProc
 {
 public:
-    TQProc( pid_t p, TQProcess *proc=0 ) : pid(p), process(proc)
+    TQProc( pid_t p, TQProcess *proc=nullptr ) : pid(p), process(proc)
     {
 #if defined(QT_QPROCESS_DEBUG)
 	tqDebug( "TQProc: Constructor for pid %d and TQProcess %p", pid, process );
@@ -152,7 +152,7 @@ public:
 		process->d->notifierStdout->setEnabled( false );
 	    if ( process->d->notifierStderr )
 		process->d->notifierStderr->setEnabled( false );
-	    process->d->proc = 0;
+	    process->d->proc = nullptr;
 	}
 	if( socketStdin )
 	    ::close( socketStdin );
@@ -204,7 +204,7 @@ private:
 static void tqprocess_cleanup()
 {
     delete TQProcessPrivate::procManager;
-    TQProcessPrivate::procManager = 0;
+    TQProcessPrivate::procManager = nullptr;
 }
 
 #ifdef Q_OS_QNX6
@@ -256,7 +256,7 @@ int qnx6SocketPairReplacement (int socketFD[2]) {
 #undef BAILOUT
 #endif
 
-TQProcessManager::TQProcessManager() : sn(0)
+TQProcessManager::TQProcessManager() : sn(nullptr)
 {
     procList = new TQPtrList<TQProc>;
     procList->setAutoDelete( true );
@@ -322,13 +322,13 @@ TQProcessManager::~TQProcessManager()
 #if defined(QT_QPROCESS_DEBUG)
     tqDebug( "TQProcessManager: restore old sigchild handler" );
 #endif
-    if ( sigaction( SIGCHLD, &oldactChld, 0 ) != 0 )
+    if ( sigaction( SIGCHLD, &oldactChld, nullptr ) != 0 )
 	tqWarning( "Error restoring SIGCHLD handler" );
 
 #if defined(QT_QPROCESS_DEBUG)
     tqDebug( "TQProcessManager: restore old sigpipe handler" );
 #endif
-    if ( sigaction( SIGPIPE, &oldactPipe, 0 ) != 0 )
+    if ( sigaction( SIGPIPE, &oldactPipe, nullptr ) != 0 )
 	tqWarning( "Error restoring SIGPIPE handler" );
 }
 
@@ -360,7 +360,7 @@ void TQProcessManager::removeMe()
 {
     if ( procList->count() == 0 ) {
 	tqRemovePostRoutine(tqprocess_cleanup);
-	TQProcessPrivate::procManager = 0;
+	TQProcessPrivate::procManager = nullptr;
 	delete this;
     }
 }
@@ -389,10 +389,10 @@ void TQProcessManager::sigchldHnd( int fd )
     TQProcess *process;
     bool removeProc;
     proc = procList->first();
-    while ( proc != 0 ) {
+    while ( proc ) {
 	removeProc = false;
 	process = proc->process;
-	if ( process != 0 ) {
+	if ( process ) {
 	    if ( !process->isRunning() ) {
 #if defined(QT_QPROCESS_DEBUG)
 		tqDebug( "TQProcessManager::sigchldHnd() (PID: %d): process exited (TQProcess available)", proc->pid );
@@ -477,7 +477,7 @@ void TQProcessManager::sigchldHnd( int fd )
  * TQProcessPrivate
  *
  **********************************************************************/
-TQProcessManager *TQProcessPrivate::procManager = 0;
+TQProcessManager *TQProcessPrivate::procManager = nullptr;
 
 TQProcessPrivate::TQProcessPrivate()
 {
@@ -486,14 +486,14 @@ TQProcessPrivate::TQProcessPrivate()
 #endif
     stdinBufRead = 0;
 
-    notifierStdin = 0;
-    notifierStdout = 0;
-    notifierStderr = 0;
+    notifierStdin = nullptr;
+    notifierStdout = nullptr;
+    notifierStderr = nullptr;
 
     exitValuesCalculated = false;
     socketReadCalled = false;
 
-    proc = 0;
+    proc = nullptr;
 }
 
 TQProcessPrivate::~TQProcessPrivate()
@@ -502,12 +502,12 @@ TQProcessPrivate::~TQProcessPrivate()
     tqDebug( "TQProcessPrivate: Destructor" );
 #endif
 
-    if ( proc != 0 ) {
+    if ( proc ) {
 	if ( proc->socketStdin != 0 ) {
 	    ::close( proc->socketStdin );
 	    proc->socketStdin = 0;
 	}
-	proc->process = 0;
+	proc->process = nullptr;
     }
 
     while ( !stdinBuf.isEmpty() ) {
@@ -525,14 +525,14 @@ TQProcessPrivate::~TQProcessPrivate()
 */
 void TQProcessPrivate::closeOpenSocketsForChild()
 {
-    if ( procManager != 0 ) {
+    if ( procManager ) {
 	if ( procManager->sigchldFd[0] != 0 )
 	    ::close( procManager->sigchldFd[0] );
 	if ( procManager->sigchldFd[1] != 0 )
 	    ::close( procManager->sigchldFd[1] );
 
 	// close also the sockets from other TQProcess instances
-	for ( TQProc *p=procManager->procList->first(); p!=0; p=procManager->procList->next() ) {
+	for ( TQProc *p=procManager->procList->first(); p; p=procManager->procList->next() ) {
 	    ::close( p->socketStdin );
 	    ::close( p->socketStdout );
 	    ::close( p->socketStderr );
@@ -543,7 +543,7 @@ void TQProcessPrivate::closeOpenSocketsForChild()
 void TQProcessPrivate::newProc( pid_t pid, TQProcess *process )
 {
     proc = new TQProc( pid, process );
-    if ( procManager == 0 ) {
+    if ( !procManager ) {
 	procManager = new TQProcessManager;
 	tqAddPostRoutine(tqprocess_cleanup);
     }
@@ -558,7 +558,7 @@ void TQProcessPrivate::newProc( pid_t pid, TQProcess *process )
  **********************************************************************/
 QT_SIGNAL_RETTYPE tqt_C_sigchldHnd( QT_SIGNAL_ARGS )
 {
-    if ( TQProcessPrivate::procManager == 0 )
+    if ( !TQProcessPrivate::procManager )
 	return;
     if ( TQProcessPrivate::procManager->sigchldFd[0] == 0 )
 	return;
@@ -786,11 +786,11 @@ bool TQProcess::start( TQStringList *env )
 	}
     }
 #endif
-    arglist[i] = 0;
+    arglist[i] = nullptr;
 
     // Must make sure signal handlers are installed before exec'ing
     // in case the process exits quickly.
-    if ( d->procManager == 0 ) {
+    if ( !d->procManager ) {
 	d->procManager = new TQProcessManager;
 	tqAddPostRoutine(tqprocess_cleanup);
     }
@@ -826,7 +826,7 @@ bool TQProcess::start( TQStringList *env )
 	if ( fd[1] )
 	    ::fcntl( fd[1], F_SETFD, FD_CLOEXEC ); // close on exec shows sucess
 
-	if ( env == 0 ) { // inherit environment and start process
+	if ( !env ) { // inherit environment and start process
 #ifndef Q_OS_QNX4
 	    ::execvp( arglist[0], (char*const*)arglist ); // ### cast not nice
 #else
@@ -842,7 +842,7 @@ bool TQProcess::start( TQStringList *env )
 #endif
 	    bool setLibraryPath =
 		env->grep( TQRegExp( "^" + ld_library_path + "=" ) ).empty() &&
-		getenv( ld_library_path ) != 0;
+		getenv( ld_library_path );
 	    if ( setLibraryPath )
 		numEntries++;
 	    TQCString *envlistQ = new TQCString[ numEntries + 1 ];
@@ -858,10 +858,10 @@ bool TQProcess::start( TQStringList *env )
 		envlist[i] = envlistQ[i];
 		i++;
 	    }
-	    envlist[i] = 0;
+	    envlist[i] = nullptr;
 
 	    // look for the executable in the search path
-	    if ( _arguments.count()>0 && getenv("PATH")!=0 ) {
+	    if ( _arguments.count()>0 && getenv("PATH") ) {
 		TQString command = _arguments[0];
 		if ( !command.contains( '/' ) ) {
 		    TQStringList pathList = TQStringList::split( ':', getenv( "PATH" ) );
@@ -916,12 +916,12 @@ bool TQProcess::start( TQStringList *env )
 	    int n = ::read( fd[0], &buf, 1 );
 	    if ( n==1 ) {
 		// socket was not closed => error
-		if ( ::waitpid( pid, 0, WNOHANG ) != pid ) {
+		if ( ::waitpid( pid, nullptr, WNOHANG ) != pid ) {
 		    // The wait did not succeed yet, so try again when we get
 		    // the sigchild (to avoid zombies).
-		    d->newProc( pid, 0 );
+		    d->newProc( pid, nullptr );
 		}
-		d->proc = 0;
+		d->proc = nullptr;
 		goto error;
 	    } else if ( n==-1 ) {
 		if ( errno==EAGAIN || errno==EINTR )
@@ -1014,7 +1014,7 @@ error:
 */
 void TQProcess::tryTerminate() const
 {
-    if ( d->proc != 0 )
+    if ( d->proc )
 	::kill( d->proc->pid, SIGTERM );
 }
 
@@ -1045,7 +1045,7 @@ void TQProcess::tryTerminate() const
 */
 void TQProcess::kill() const
 {
-    if ( d->proc != 0 )
+    if ( d->proc )
 	::kill( d->proc->pid, SIGKILL );
 }
 
@@ -1062,7 +1062,7 @@ bool TQProcess::isRunning() const
 #endif
 	return false;
     }
-    if ( d->proc == 0 )
+    if ( !d->proc )
 	return false;
     int status;
     if ( ::waitpid( d->proc->pid, &status, WNOHANG ) == d->proc->pid ) {
@@ -1083,7 +1083,7 @@ bool TQProcess::isRunning() const
 	    FD_SET( d->procManager->sigchldFd[1], &fds );
 	    tv.tv_sec = 0;
 	    tv.tv_usec = 0;
-	    if ( ::select( d->procManager->sigchldFd[1]+1, &fds, 0, 0, &tv ) > 0 )
+	    if ( ::select( d->procManager->sigchldFd[1]+1, &fds, nullptr, nullptr, &tv ) > 0 )
 		d->procManager->sigchldHnd( d->procManager->sigchldFd[1] );
 	}
 
@@ -1110,7 +1110,7 @@ bool TQProcess::canReadLineStdout() const
 	return d->bufStdout.size() != 0;
 
     TQProcess *that = (TQProcess*)this;
-    return that->membufStdout()->scanNewline( 0 );
+    return that->membufStdout()->scanNewline( nullptr );
 }
 
 /*!
@@ -1125,7 +1125,7 @@ bool TQProcess::canReadLineStderr() const
 	return d->bufStderr.size() != 0;
 
     TQProcess *that = (TQProcess*)this;
-    return that->membufStderr()->scanNewline( 0 );
+    return that->membufStderr()->scanNewline( nullptr );
 }
 
 /*!
@@ -1153,7 +1153,7 @@ void TQProcess::writeToStdin( const TQByteArray& buf )
 //    tqDebug( "TQProcess::writeToStdin(): write to stdin (%d)", d->socketStdin );
 #endif
     d->stdinBuf.enqueue( new TQByteArray(buf) );
-    if ( d->notifierStdin != 0 )
+    if ( d->notifierStdin )
 	d->notifierStdin->setEnabled( true );
 }
 
@@ -1168,14 +1168,14 @@ void TQProcess::writeToStdin( const TQByteArray& buf )
 */
 void TQProcess::closeStdin()
 {
-    if ( d->proc == 0 )
+    if ( !d->proc )
 	return;
     if ( d->proc->socketStdin !=0 ) {
 	while ( !d->stdinBuf.isEmpty() ) {
 	    delete d->stdinBuf.dequeue();
 	}
 	delete d->notifierStdin;
-	d->notifierStdin = 0;
+	d->notifierStdin = nullptr;
 	if ( ::close( d->proc->socketStdin ) != 0 ) {
 	    tqWarning( "Could not close stdin of child process" );
 	}
@@ -1207,7 +1207,7 @@ void TQProcess::socketRead( int fd )
 	return;
     if ( !d->proc )
 	return;
-    TQMembuf *buffer = 0;
+    TQMembuf *buffer = nullptr;
     int n;
     if ( fd == d->proc->socketStdout ) {
 	buffer = &d->bufStdout;
@@ -1228,10 +1228,10 @@ void TQProcess::socketRead( int fd )
     if ( n > 0 ) {
 	ba->resize( n );
 	buffer->append( ba );
-	ba = 0;
+	ba = nullptr;
     } else {
 	delete ba;
-	ba = 0;
+	ba = nullptr;
     }
     // eof or error?
     if ( n == 0 || n == -1 ) {
@@ -1241,7 +1241,7 @@ void TQProcess::socketRead( int fd )
 #endif
 	    d->notifierStdout->setEnabled( false );
 	    delete d->notifierStdout;
-	    d->notifierStdout = 0;
+	    d->notifierStdout = nullptr;
 	    ::close( d->proc->socketStdout );
 	    d->proc->socketStdout = 0;
 	    return;
@@ -1251,7 +1251,7 @@ void TQProcess::socketRead( int fd )
 #endif
 	    d->notifierStderr->setEnabled( false );
 	    delete d->notifierStderr;
-	    d->notifierStderr = 0;
+	    d->notifierStderr = nullptr;
 	    ::close( d->proc->socketStderr );
 	    d->proc->socketStderr = 0;
 	    return;
@@ -1265,7 +1265,7 @@ void TQProcess::socketRead( int fd )
 	FD_SET( fd, &fds );
 	tv.tv_sec = 0;
 	tv.tv_usec = 0;
-	while ( ::select( fd+1, &fds, 0, 0, &tv ) > 0 ) {
+	while ( ::select( fd+1, &fds, nullptr, nullptr, &tv ) > 0 ) {
 	    // prepare for the next round
 	    FD_ZERO( &fds );
 	    FD_SET( fd, &fds );
@@ -1275,10 +1275,10 @@ void TQProcess::socketRead( int fd )
 	    if ( n > 0 ) {
 		ba->resize( n );
 		buffer->append( ba );
-		ba = 0;
+		ba = nullptr;
 	    } else {
 		delete ba;
-		ba = 0;
+		ba = nullptr;
 		break;
 	    }
 	}
@@ -1409,7 +1409,7 @@ void TQProcess::setWroteStdinConnected( bool value )
 */
 TQProcess::PID TQProcess::processIdentifier()
 {
-    if ( d->proc == 0 )
+    if ( !d->proc )
 	return -1;
     return d->proc->pid;
 }
diff --git a/src/kernel/tqpsprinter.cpp b/src/kernel/tqpsprinter.cpp
index fd78c64b9..196eb6f5d 100644
--- a/src/kernel/tqpsprinter.cpp
+++ b/src/kernel/tqpsprinter.cpp
@@ -1131,7 +1131,7 @@ static const struct {
     { 0xFB35, "afii57723" },  // HEBREW LETTER VAV WITH DAGESH
     { 0xFB4B, "afii57700" },  // HEBREW LETTER VAV WITH HOLAM
     // end of stuff from glyphlist.txt
-    { 0xFFFF, 0 }
+    { 0xFFFF, nullptr }
 };
 
 // ---------------------------------------------------------------------
@@ -1271,19 +1271,19 @@ static const psfont Utopia [] = { // ###
 };
 
 static const psfont * const SansSerifReplacements[] = {
-    Helvetica, 0
+    Helvetica, nullptr
         };
 static const psfont * const SerifReplacements[] = {
-    Times, 0
+    Times, nullptr
         };
 static const psfont * const FixedReplacements[] = {
-    Courier, 0
+    Courier, nullptr
         };
 static const psfont * const TahomaReplacements[] = {
-    Verdana, AvantGarde, Helvetica, 0
+    Verdana, AvantGarde, Helvetica, nullptr
         };
 static const psfont * const VerdanaReplacements[] = {
-    Tahoma, AvantGarde, Helvetica, 0
+    Tahoma, AvantGarde, Helvetica, nullptr
         };
 
 static const struct {
@@ -1299,12 +1299,12 @@ static const struct {
     { "charter", Charter, SansSerifReplacements },
     { "bitstreamcharter", Charter, SansSerifReplacements },
         { "bitstreamcyberbit", Times, SerifReplacements }, // ###
-    { "courier", Courier, 0 },
-    { "couriernew", Courier, 0 },
-    { "fixed", Courier, 0 },
+    { "courier", Courier, nullptr },
+    { "couriernew", Courier, nullptr },
+    { "fixed", Courier, nullptr },
     { "garamond", Garamond, SerifReplacements },
     { "gillsans", GillSans, SansSerifReplacements },
-    { "helvetica", Helvetica, 0 },
+    { "helvetica", Helvetica, nullptr },
     { "letter", Letter, FixedReplacements },
     { "lucida", LucidaSans, SansSerifReplacements },
     { "lucidasans", LucidaSans, SansSerifReplacements },
@@ -1314,14 +1314,14 @@ static const struct {
     { "luciduxserif", LucidaBright, SerifReplacements },
     { "luciduxmono", LucidaSansTT, FixedReplacements },
     { "palatino", Palatino, SerifReplacements },
-    { "symbol", Symbol, 0 },
+    { "symbol", Symbol, nullptr },
     { "tahoma", Tahoma, TahomaReplacements },
-    { "terminal", Courier, 0 },
-    { "times", Times, 0 },
-    { "timesnewroman", Times, 0 },
+    { "terminal", Courier, nullptr },
+    { "times", Times, nullptr },
+    { "timesnewroman", Times, nullptr },
     { "verdana", Verdana, VerdanaReplacements },
     { "utopia", Utopia, SerifReplacements },
-    { 0, 0, 0 }
+    { nullptr, nullptr, nullptr }
 };
 
 
@@ -1443,7 +1443,7 @@ public:
                            const TQString &text, TQPSPrinterPrivate *d, TQPainter *paint);
     virtual unsigned short mapUnicode( unsigned short unicode );
     void downloadMapping( TQTextStream &s, bool global );
-    TQString glyphName( unsigned short glyphindex, bool *glyphSet = 0 );
+    TQString glyphName( unsigned short glyphindex, bool *glyphSet = nullptr );
     virtual void restore();
 
     virtual unsigned short unicode_for_glyph(int glyphindex) { return glyphindex; }
@@ -1492,7 +1492,7 @@ static int getPsFontType( const TQFontEngine *fe )
     return type;
 }
 
-static int addPsFontNameExtension( const TQFontEngine *fe, TQString &ps, const psfont *psf = 0 )
+static int addPsFontNameExtension( const TQFontEngine *fe, TQString &ps, const psfont *psf = nullptr )
 {
     int type = getPsFontType( fe );
 
@@ -1517,7 +1517,7 @@ static int addPsFontNameExtension( const TQFontEngine *fe, TQString &ps, const p
     return type;
 }
 
-static TQString makePSFontName( const TQFontEngine *fe, int *listpos = 0, int *ftype = 0 )
+static TQString makePSFontName( const TQFontEngine *fe, int *listpos = nullptr, int *ftype = nullptr )
 {
   TQString ps;
   int i;
@@ -2874,7 +2874,7 @@ BYTE* TQPSPrinterFontTTF::getTable(const char* name)
         ptr += 16;
     }
 
-    return 0;
+    return nullptr;
 }
 
 void TQPSPrinterFontTTF::uni2glyphSetup()
@@ -4245,7 +4245,7 @@ class TQPSPrinterFontAsian
   : public TQPSPrinterFontPrivate {
 public:
       TQPSPrinterFontAsian()
-	  : TQPSPrinterFontPrivate(), codec( 0 ) {}
+	  : TQPSPrinterFontPrivate(), codec( nullptr ) {}
       void download(TQTextStream& s, bool global);
       TQString defineFont( TQTextStream &stream, const TQString &ps, const TQFont &f, const TQString &key,
                           TQPSPrinterPrivate *d );
@@ -4482,10 +4482,10 @@ static const psfont WadaMinAdobe [] = {
 
 
 static const psfont * const Japanese1Replacements[] = {
-    Japanese1, Japanese1a, WadaMin, WadaGo, WadaMinAdobe, WadaGoAdobe, 0
+    Japanese1, Japanese1a, WadaMin, WadaGo, WadaMinAdobe, WadaGoAdobe, nullptr
 };
 static const psfont * const Japanese2Replacements[] = {
-    Japanese2, Japanese2a, WadaMin, WadaGo, WadaMinAdobe, WadaGoAdobe, 0
+    Japanese2, Japanese2a, WadaMin, WadaGo, WadaMinAdobe, WadaGoAdobe, nullptr
 };
 
 class TQPSPrinterFontJapanese
@@ -4585,7 +4585,7 @@ static const psfont BaekmukGulim [] = {
 
 static const psfont * const KoreanReplacements[] = {
     BaekmukGulim, SMGothic, Munhwa, MunhwaGothic, MKai, MunhwaGungSeo,
-    MunhwaGungSeoHeulim, MunhwaHoonMin, Helvetica, 0
+    MunhwaGungSeoHeulim, MunhwaHoonMin, Helvetica, nullptr
 };
 
 class TQPSPrinterFontKorean
@@ -4706,7 +4706,7 @@ static const psfont MOEKai [] = {
 
 static const psfont * const TraditionalReplacements[] = {
     MOESung, SongB5, ShanHeiSun, MingB5, MSung, FangSongB5, KaiB5, ZenKai, HeiB5,
-    LinGothic, YenRound, MOEKai, Helvetica, 0
+    LinGothic, YenRound, MOEKai, Helvetica, nullptr
 	};
 
 #if 0 // ### these are never used?
@@ -4826,7 +4826,7 @@ static const psfont GBZenKai [] = {
 
 static const psfont * const SimplifiedReplacements[] = {
     SongGBK2K, FangSongGBK2K, KaiGBK2K, HeiGBK2K,
-    Simplified, MSungGBK, FangSong, BousungEG, GBZenKai, Helvetica, 0
+    Simplified, MSungGBK, FangSong, BousungEG, GBZenKai, Helvetica, nullptr
 	};
 #if 0
 static const psfont * const SongGBK2KReplacements[] = {
@@ -4834,13 +4834,13 @@ static const psfont * const SongGBK2KReplacements[] = {
 	};
 #endif
 static const psfont * const FangSongGBK2KReplacements[] = {
-    FangSongGBK2K, FangSong, Courier, 0
+    FangSongGBK2K, FangSong, Courier, nullptr
 	};
 static const psfont * const KaiGBK2KReplacements[] = {
-    KaiGBK2K, GBZenKai, Times, 0
+    KaiGBK2K, GBZenKai, Times, nullptr
 	};
 static const psfont * const HeiGBK2KReplacements[] = {
-    HeiGBK2K, LucidaSans, 0
+    HeiGBK2K, LucidaSans, nullptr
 	};
 
 class TQPSPrinterFontSimplifiedChinese
@@ -4905,7 +4905,7 @@ TQPSPrinterFont::~TQPSPrinterFont()
 
 
 TQPSPrinterFont::TQPSPrinterFont(const TQFont &f, int script, TQPSPrinterPrivate *priv)
-    : p(0)
+    : p(nullptr)
 {
     TQString fontfilename;
     TQString fontname;
@@ -4922,7 +4922,7 @@ TQPSPrinterFont::TQPSPrinterFont(const TQFont &f, int script, TQPSPrinterPrivate
 #ifndef TQT_NO_XFTFREETYPE
     if ( tqt_has_xft && engine && engine->type() == TQFontEngine::Xft ) {
         XftPattern *pattern = static_cast<TQFontEngineXft *>( engine )->pattern();
-        char *filename = 0;
+        char *filename = nullptr;
         XftPatternGetString (pattern, XFT_FILE, 0, &filename);
         //tqDebug("filename for font is '%s'", filename);
         if ( filename ) {
@@ -5139,10 +5139,10 @@ TQPSPrinterFont::TQPSPrinterFont(const TQFont &f, int script, TQPSPrinterPrivate
 
 
 TQPSPrinterPrivate::TQPSPrinterPrivate( TQPrinter *prt, int filedes )
-    : buffer( 0 ), outDevice( 0 ), fd( filedes ), pageBuffer( 0 ), fonts(27, false), fontBuffer(0), savedImage( 0 ),
+    : buffer( nullptr ), outDevice( nullptr ), fd( filedes ), pageBuffer( nullptr ), fonts(27, false), fontBuffer(nullptr), savedImage( nullptr ),
       dirtypen( false ), dirtybrush( false ), dirtyBkColor( false ), bkMode( TQt::TransparentMode ), dirtyBkMode( false ),
 #ifndef TQT_NO_TEXTCODEC
-      currentFontCodec( 0 ),
+      currentFontCodec( nullptr ),
 #endif
       fm( TQFont() ), textY( 0 )
 {
@@ -5150,7 +5150,7 @@ TQPSPrinterPrivate::TQPSPrinterPrivate( TQPrinter *prt, int filedes )
     headerFontNames.setAutoDelete( true );
     pageFontNames.setAutoDelete( true );
     fonts.setAutoDelete( true );
-    currentFontFile = 0;
+    currentFontFile = nullptr;
     scale = 1.;
     scriptUsed = -1;
 
@@ -5272,7 +5272,7 @@ void TQPSPrinterPrivate::setFont( const TQFont & fnt, int script )
         fontsUsed += ps;
 
 #ifndef TQT_NO_TEXTCODEC
-    TQTextCodec * codec = 0;
+    TQTextCodec * codec = nullptr;
 // ###
 // #ifndef TQT_NO_TEXTCODEC
 //     i = 0;
@@ -6028,10 +6028,10 @@ void TQPSPrinterPrivate::emitHeader( bool finished )
                           buffer->buffer().size() );
 
     delete buffer;
-    buffer = 0;
+    buffer = nullptr;
     fontStream.unsetDevice();
     delete fontBuffer;
-    fontBuffer = 0;
+    fontBuffer = nullptr;
 }
 
 
@@ -6051,7 +6051,7 @@ void TQPSPrinterPrivate::resetDrawingTools( TQPainter *paint )
 
     //currentUsed = currentSet;
     //setFont( currentSet );
-    currentFontFile = 0;
+    currentFontFile = nullptr;
 
     TQBrush b = paint->brush();
     if ( b != defaultBrush ) {
@@ -6142,7 +6142,7 @@ void TQPSPrinterPrivate::initPage(TQPainter *paint)
     pageStream.setEncoding( TQTextStream::Latin1 );
     pageStream.setDevice( pageBuffer );
     delete savedImage;
-    savedImage = 0;
+    savedImage = nullptr;
     textY = 0;
     dirtyClipping   = true;
     firstClipOnPage = true;
@@ -6157,7 +6157,7 @@ void TQPSPrinterPrivate::flushPage( bool last )
 {
     if ( last && !pageBuffer )
 	return;
-    bool pageFonts = ( buffer == 0 );
+    bool pageFonts = ( !buffer );
     if ( buffer &&
 //         ( last || pagesInBuffer++ > -1 ||
 //           ( pagesInBuffer > 4 && buffer->size() > 262144 ) ) )
@@ -6213,10 +6213,10 @@ TQPSPrinter::~TQPSPrinter()
 
 static void ignoreSigPipe(bool b)
 {
-    static struct sigaction *users_sigpipe_handler = 0;
+    static struct sigaction *users_sigpipe_handler = nullptr;
 
     if (b) {
-	if (users_sigpipe_handler != 0)
+	if (users_sigpipe_handler)
     	    return; // already ignoring sigpipe
 
 	users_sigpipe_handler = new struct sigaction;
@@ -6227,18 +6227,18 @@ static void ignoreSigPipe(bool b)
 
 	if (sigaction(SIGPIPE, &tmp_sigpipe_handler, users_sigpipe_handler) == -1) {
     	    delete users_sigpipe_handler;
-	    users_sigpipe_handler = 0;
+	    users_sigpipe_handler = nullptr;
 	}
     }
     else {
-	if (users_sigpipe_handler == 0)
+	if (!users_sigpipe_handler)
     	    return; // not ignoring sigpipe
 
-	if (sigaction(SIGPIPE, users_sigpipe_handler, 0) == -1)
+	if (sigaction(SIGPIPE, users_sigpipe_handler, nullptr) == -1)
 	    tqWarning("TQPSPrinter: could not restore SIGPIPE handler");
 
 	delete users_sigpipe_handler;
-	users_sigpipe_handler = 0;
+	users_sigpipe_handler = nullptr;
     }
 }
 
@@ -6270,7 +6270,7 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
     }
 
     if ( c == PdcEnd ) {                        // painting done
-        bool pageCountAtEnd = (d->buffer != 0);
+        bool pageCountAtEnd = (d->buffer);
 
     	// we're writing to lp/lpr through a pipe, we don't want to crash with SIGPIPE
 	// if lp/lpr dies
@@ -6290,7 +6290,7 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
             ::close( d->fd );
         d->fd = -1;
         delete d->outDevice;
-        d->outDevice = 0;
+        d->outDevice = nullptr;
     }
 
     if ( c >= PdcDrawFirst && c <= PdcDrawLast ) {
diff --git a/src/kernel/tqregion_x11.cpp b/src/kernel/tqregion_x11.cpp
index 604adbf03..a522bd882 100644
--- a/src/kernel/tqregion_x11.cpp
+++ b/src/kernel/tqregion_x11.cpp
@@ -2199,7 +2199,7 @@ static TQRegionPrivate *PolygonRegion(TQPoint *Pts, int Count, int rule)
     int numFullPtBlocks = 0;
 
     if ( !(region = new TQRegionPrivate) )
-	return 0;
+	return nullptr;
 
     /* special case a rectangle */
     pts = Pts;
@@ -2228,7 +2228,7 @@ static TQRegionPrivate *PolygonRegion(TQPoint *Pts, int Count, int rule)
 
     if (! (pETEs = (EdgeTableEntry *)
 	   malloc((unsigned) (sizeof(EdgeTableEntry) * Count))))
-	return 0;
+	return nullptr;
 
     pts = FirstPtBlock.pts;
     CreateETandAET(Count, Pts, &ET, &AET, pETEs, &SLLBlock);
@@ -2415,12 +2415,12 @@ TQRegionPrivate *tqt_bitmapToRegion(const TQBitmap& bitmap)
 
 // NOT REVISED
 
-static TQRegion *empty_region = 0;
+static TQRegion *empty_region = nullptr;
 
 static void cleanup_empty_region()
 {
     delete empty_region;
-    empty_region = 0;
+    empty_region = nullptr;
 }
 
 
@@ -2451,8 +2451,8 @@ TQRegion::TQRegion( bool is_null )
     TQ_CHECK_PTR( data );
     data->region = new TQRegionPrivate;
     data->is_null = is_null;
-    data->rgn = 0;
-    data->xrectangles = 0;
+    data->rgn = nullptr;
+    data->xrectangles = nullptr;
 }
 
 /*!
@@ -2479,8 +2479,8 @@ TQRegion::TQRegion( const TQRect &r, RegionType t )
 	data = new TQRegionData;
 	TQ_CHECK_PTR( data );
 	data->is_null = false;
-	data->rgn = 0;
-	data->xrectangles = 0;
+	data->rgn = nullptr;
+	data->xrectangles = nullptr;
 	if ( t == Rectangle ) {			// rectangular region
 	    data->region = new TQRegionPrivate( r );
 	} else if ( t == Ellipse ) {		// elliptic region
@@ -2510,8 +2510,8 @@ TQRegion::TQRegion( const TQPointArray &a, bool winding )
 	data = new TQRegionData;
 	TQ_CHECK_PTR( data );
 	data->is_null = false;
-	data->rgn = 0;
-	data->xrectangles = 0;
+	data->rgn = nullptr;
+	data->xrectangles = nullptr;
 	data->region = PolygonRegion( (TQPoint*)a.data(), a.size(),
 				    winding ? WindingRule : EvenOddRule );
     } else {
@@ -2561,8 +2561,8 @@ TQRegion::TQRegion( const TQBitmap & bm )
 	data = new TQRegionData;
 	TQ_CHECK_PTR( data );
 	data->is_null = false;
-	data->rgn = 0;
-	data->xrectangles = 0;
+	data->rgn = nullptr;
+	data->xrectangles = nullptr;
 	data->region = tqt_bitmapToRegion(bm);
     }
 }
@@ -2700,7 +2700,7 @@ void TQRegion::translate( int dx, int dy )
     OffsetRegion( data->region, dx, dy );
     if ( data->xrectangles ) {
 	free( data->xrectangles );
-	data->xrectangles = 0;
+	data->xrectangles = nullptr;
     }
 }
 
diff --git a/src/kernel/tqrichtext.cpp b/src/kernel/tqrichtext.cpp
index 427434b37..c23fc2ec3 100644
--- a/src/kernel/tqrichtext.cpp
+++ b/src/kernel/tqrichtext.cpp
@@ -67,8 +67,8 @@
 
 #include <stdlib.h>
 
-static TQTextCursor* richTextExportStart = 0;
-static TQTextCursor* richTextExportEnd = 0;
+static TQTextCursor* richTextExportStart = nullptr;
+static TQTextCursor* richTextExportEnd = nullptr;
 
 class TQTextFormatCollection;
 
@@ -149,7 +149,7 @@ TQTextCursor *TQTextCommandHistory::undo( TQTextCursor *c )
 	--current;
 	return c2;
     }
-    return 0;
+    return nullptr;
 }
 
 TQTextCursor *TQTextCommandHistory::redo( TQTextCursor *c )
@@ -165,7 +165,7 @@ TQTextCursor *TQTextCommandHistory::redo( TQTextCursor *c )
 	    return history.at( current )->execute( c );
 	}
     }
-    return 0;
+    return nullptr;
 }
 
 bool TQTextCommandHistory::isUndoAvailable()
@@ -182,7 +182,7 @@ bool TQTextCommandHistory::isRedoAvailable()
 
 TQTextDeleteCommand::TQTextDeleteCommand( TQTextDocument *d, int i, int idx, const TQMemArray<TQTextStringChar> &str,
 					const TQByteArray& oldStyleInfo )
-    : TQTextCommand( d ), id( i ), index( idx ), parag( 0 ), text( str ), styleInformation( oldStyleInfo )
+    : TQTextCommand( d ), id( i ), index( idx ), parag( nullptr ), text( str ), styleInformation( oldStyleInfo )
 {
     for ( int j = 0; j < (int)text.size(); ++j ) {
 	if ( text[ j ].format() )
@@ -191,7 +191,7 @@ TQTextDeleteCommand::TQTextDeleteCommand( TQTextDocument *d, int i, int idx, con
 }
 
 TQTextDeleteCommand::TQTextDeleteCommand( TQTextParagraph *p, int idx, const TQMemArray<TQTextStringChar> &str )
-    : TQTextCommand( 0 ), id( -1 ), index( idx ), parag( p ), text( str )
+    : TQTextCommand( nullptr ), id( -1 ), index( idx ), parag( p ), text( str )
 {
     for ( int i = 0; i < (int)text.size(); ++i ) {
 	if ( text[ i ].format() )
@@ -213,7 +213,7 @@ TQTextCursor *TQTextDeleteCommand::execute( TQTextCursor *c )
     TQTextParagraph *s = doc ? doc->paragAt( id ) : parag;
     if ( !s ) {
 	tqWarning( "can't locate parag at %d, last parag: %d", id, doc->lastParagraph()->paragId() );
-	return 0;
+	return nullptr;
     }
 
     cursor.setParagraph( s );
@@ -248,7 +248,7 @@ TQTextCursor *TQTextDeleteCommand::unexecute( TQTextCursor *c )
     TQTextParagraph *s = doc ? doc->paragAt( id ) : parag;
     if ( !s ) {
 	tqWarning( "can't locate parag at %d, last parag: %d", id, doc->lastParagraph()->paragId() );
-	return 0;
+	return nullptr;
     }
 
     cursor.setParagraph( s );
@@ -333,7 +333,7 @@ TQTextCursor *TQTextFormatCommand::unexecute( TQTextCursor *c )
     TQTextParagraph *sp = doc->paragAt( startId );
     TQTextParagraph *ep = doc->paragAt( endId );
     if ( !sp || !ep )
-	return 0;
+	return nullptr;
 
     int idx = startIndex;
     int fIndex = 0;
@@ -431,7 +431,7 @@ TQTextCursor::TQTextCursor( TQTextDocument *d )
     : idx( 0 ), tmpX( -1 ), ox( 0 ), oy( 0 ),
       valid( true )
 {
-    para = d ? d->firstParagraph() : 0;
+    para = d ? d->firstParagraph() : nullptr;
 }
 
 TQTextCursor::TQTextCursor( const TQTextCursor &c )
@@ -705,7 +705,7 @@ bool TQTextCursor::place( const TQPoint &p, TQTextParagraph *s, bool link, bool
     setParagraph( s );
     int y = s->rect().y();
     int lines = s->lines();
-    TQTextStringChar *chr = 0;
+    TQTextStringChar *chr = nullptr;
     int index = 0;
     int i = 0;
     int cy = 0;
@@ -1155,7 +1155,7 @@ void TQTextCursor::splitAndInsertEmptyParagraph( bool ind, bool updateIds )
     if ( !para->document() )
 	return;
     tmpX = -1;
-    TQTextFormat *f = 0;
+    TQTextFormat *f = nullptr;
     if ( para->document()->useFormatCollection() ) {
 	f = para->at( idx )->format();
 	if ( idx == para->length() - 1 && idx > 0 )
@@ -1303,7 +1303,7 @@ void TQTextCursor::fixCursorPosition()
 	return;
 
     int lineIdx;
-    TQTextStringChar *start = para->lineStartOfChar( idx, &lineIdx, 0 );
+    TQTextStringChar *start = para->lineStartOfChar( idx, &lineIdx, nullptr );
     int x = para->string()->at( idx ).x;
     int diff = TQABS(start->x - x);
     int best = lineIdx;
@@ -1330,11 +1330,11 @@ void TQTextCursor::fixCursorPosition()
 // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 TQTextDocument::TQTextDocument( TQTextDocument *p )
-    : par( p ), parentPar( 0 )
+    : par( p ), parentPar( nullptr )
 #ifndef TQT_NO_TEXTCUSTOMITEM
-    , tc( 0 )
+    , tc( nullptr )
 #endif
-    , tArray( 0 ), tStopWidth( 0 )
+    , tArray( nullptr ), tStopWidth( 0 )
 {
     fCollection = par ? par->fCollection : new TQTextFormatCollection;
     init();
@@ -1346,18 +1346,18 @@ void TQTextDocument::init()
     mightHaveCustomItems = false;
     if ( par )
 	par->insertChild( this );
-    pProcessor = 0;
+    pProcessor = nullptr;
     useFC = true;
-    pFormatter = 0;
-    indenter = 0;
-    fParag = 0;
+    pFormatter = nullptr;
+    indenter = nullptr;
+    fParag = nullptr;
     txtFormat = TQt::AutoText;
     preferRichText = false;
     pages = false;
-    focusIndicator.parag = 0;
+    focusIndicator.parag = nullptr;
     minw = 0;
     wused = 0;
-    minwParag = curParag = 0;
+    minwParag = curParag = nullptr;
     align = AlignAuto;
     nSelections = 1;
 
@@ -1368,8 +1368,8 @@ void TQTextDocument::init()
     contxt = TQString::null;
 
     underlLinks = par ? par->underlLinks : true;
-    backBrush = 0;
-    buf_pixmap = 0;
+    backBrush = nullptr;
+    buf_pixmap = nullptr;
     nextDoubleBuffered = false;
 
     if ( par )
@@ -1377,7 +1377,7 @@ void TQTextDocument::init()
     else
 	withoutDoubleBuffer = false;
 
-    lParag = fParag = createParagraph( this, 0, 0 );
+    lParag = fParag = createParagraph( this, nullptr, nullptr );
 
     cx = 0;
     cy = 2;
@@ -1427,10 +1427,10 @@ void TQTextDocument::clear( bool createEmptyParag )
     }
     if ( flow_ )
 	flow_->clear();
-    fParag = lParag = 0;
+    fParag = lParag = nullptr;
     if ( createEmptyParag )
 	fParag = lParag = createParagraph( this );
-    focusIndicator.parag = 0;
+    focusIndicator.parag = nullptr;
     selections.clear();
     oText = TQString::null;
     oTextValid = false;
@@ -1462,7 +1462,7 @@ bool TQTextDocument::setMinimumWidth( int needed, int used, TQTextParagraph *p )
     if ( needed == -1 ) {
 	minw = 0;
 	wused = 0;
-	p = 0;
+	p = nullptr;
     }
     if ( p == minwParag ) {
 	if (minw > needed) {
@@ -1498,7 +1498,7 @@ void TQTextDocument::setPlainText( const TQString &text )
     int lastNl = 0;
     int nl = text.find( '\n' );
     if ( nl == -1 ) {
-	lParag = createParagraph( this, lParag, 0 );
+	lParag = createParagraph( this, lParag, nullptr );
 	if ( !fParag )
 	    fParag = lParag;
 	TQString s = text;
@@ -1509,7 +1509,7 @@ void TQTextDocument::setPlainText( const TQString &text )
 	}
     } else {
 	for (;;) {
-	    lParag = createParagraph( this, lParag, 0 );
+	    lParag = createParagraph( this, lParag, nullptr );
 	    if ( !fParag )
 		fParag = lParag;
 	    int l = nl - lastNl;
@@ -1528,7 +1528,7 @@ void TQTextDocument::setPlainText( const TQString &text )
 	}
     }
     if ( !lParag )
-	lParag = fParag = createParagraph( this, 0, 0 );
+	lParag = fParag = createParagraph( this, nullptr, nullptr );
 }
 
 struct TQ_EXPORT TQTextDocumentTag {
@@ -1573,7 +1573,7 @@ struct TQ_EXPORT TQTextDocumentTag {
 #define NEWPAR       do{ if ( !hasNewPar) { \
 		    if ( !textEditMode && curpar && curpar->length()>1 && curpar->at( curpar->length()-2)->c == TQChar_linesep ) \
 			curpar->remove( curpar->length()-2, 1 ); \
-		    curpar = createParagraph( this, curpar, curpar->next() ); styles.append( vec ); vec = 0;} \
+		    curpar = createParagraph( this, curpar, curpar->next() ); styles.append( vec ); vec = nullptr;} \
 		    hasNewPar = true; \
 		    curpar->rtext = true;  \
 		    curpar->align = curtag.alignment; \
@@ -1599,7 +1599,7 @@ void TQTextDocument::setRichText( const TQString &text, const TQString &context,
     fParag = lParag = createParagraph( this );
     oTextValid = true;
     oText = text;
-    setRichTextInternal( text, 0, initialFormat );
+    setRichTextInternal( text, nullptr, initialFormat );
     fParag->rtext = true;
 }
 
@@ -1627,7 +1627,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
 
     // style sheet handling for margin and line spacing calculation below
     TQTextParagraph* stylesPar = curpar;
-    TQPtrVector<TQStyleSheetItem>* vec = 0;
+    TQPtrVector<TQStyleSheetItem>* vec = nullptr;
     TQPtrList< TQPtrVector<TQStyleSheetItem> > styles;
     styles.setAutoDelete( true );
 
@@ -1707,7 +1707,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
 		}
 
 #ifndef TQT_NO_TEXTCUSTOMITEM
-		TQTextCustomItem* custom =  0;
+		TQTextCustomItem* custom =  nullptr;
 #else
 		bool custom = false;
 #endif
@@ -1778,7 +1778,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
 				    }
 				}
 			    }
-			    nstyle = 0; // ignore body in textEditMode
+			    nstyle = nullptr; // ignore body in textEditMode
 			}
 			// end qt- and body-tag handling
 		    } else if ( tagname == "meta" ) {
@@ -2096,7 +2096,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
 void TQTextDocument::setRichTextMarginsInternal( TQPtrList< TQPtrVector<TQStyleSheetItem> >& styles, TQTextParagraph* stylesPar )
 {
     // margin and line spacing calculation
-    TQPtrVector<TQStyleSheetItem>* prevStyle = 0;
+    TQPtrVector<TQStyleSheetItem>* prevStyle = nullptr;
     TQPtrVector<TQStyleSheetItem>* curStyle = styles.first();
     TQPtrVector<TQStyleSheetItem>* nextStyle = styles.next();
     while ( stylesPar ) {
@@ -2109,7 +2109,7 @@ void TQTextDocument::setRichTextMarginsInternal( TQPtrList< TQPtrVector<TQStyleS
 	}
 
 	int i, mar;
-	TQStyleSheetItem* mainStyle = curStyle->size() ? (*curStyle)[curStyle->size()-1] : 0;
+	TQStyleSheetItem* mainStyle = curStyle->size() ? (*curStyle)[curStyle->size()-1] : nullptr;
 	if ( mainStyle && mainStyle->displayMode() == TQStyleSheetItem::DisplayListItem )
 	    stylesPar->setListItem( true );
 	int numLists = 0;
@@ -2254,7 +2254,7 @@ void TQTextDocument::setRichTextMarginsInternal( TQPtrList< TQPtrVector<TQStyleS
 
 void TQTextDocument::setText( const TQString &text, const TQString &context )
 {
-    focusIndicator.parag = 0;
+    focusIndicator.parag = nullptr;
     selections.clear();
     if ( ( txtFormat == TQt::AutoText && TQStyleSheet::mightBeRichText( text ) ) ||
 	 txtFormat == TQt::RichText )
@@ -2732,7 +2732,7 @@ bool TQTextDocument::removeSelection( int id )
 
     TQTextCursor start = sel.swapped ? sel.endCursor : sel.startCursor;
     TQTextCursor end = sel.swapped ? sel.startCursor : sel.endCursor;
-    TQTextParagraph* p = 0;
+    TQTextParagraph* p = nullptr;
     while ( start != end ) {
 	if ( p != start.paragraph() ) {
 	    p = start.paragraph();
@@ -2814,7 +2814,7 @@ TQString TQTextDocument::selectedText( int id, bool asRichText ) const
 	    if ( from <= to )
 		sel = "<!--StartFragment-->" + prevspan + sel.mid( from, to - from );
 	}
-	richTextExportStart = richTextExportEnd = 0;
+	richTextExportStart = richTextExportEnd = nullptr;
 	return sel;
     }
 
@@ -3030,7 +3030,7 @@ TQTextCursor *TQTextDocument::redo( TQTextCursor *c )
 bool TQTextDocument::find( TQTextCursor& cursor, const TQString &expr, bool cs, bool wo, bool forward )
 {
     removeSelection( Standard );
-    TQTextParagraph *p = 0;
+    TQTextParagraph *p = nullptr;
     if ( expr.isEmpty() )
 	return false;
     for (;;) {
@@ -3137,8 +3137,8 @@ void TQTextDocument::doLayout( TQPainter *p, int w )
 {
     minw = wused = 0;
     if ( !is_printer( p ) )
-	p = 0;
-    withoutDoubleBuffer = ( p != 0 );
+	p = nullptr;
+    withoutDoubleBuffer = ( p != nullptr );
     TQPainter * oldPainter = TQTextFormat::painter();
     TQTextFormat::setPainter( p );
     tStopWidth = formatCollection()->defaultFormat()->width( 'x' ) * 8;
@@ -3197,9 +3197,9 @@ void TQTextDocument::draw( TQPainter *p, const TQRect &rect, const TQColorGroup
 	}
 	p->translate( 0, y );
 	if ( rect.isValid() )
-	    parag->paint( *p, cg, 0, false, rect.x(), rect.y(), rect.width(), rect.height() );
+	    parag->paint( *p, cg, nullptr, false, rect.x(), rect.y(), rect.width(), rect.height() );
 	else
-	    parag->paint( *p, cg, 0, false );
+	    parag->paint( *p, cg, nullptr, false );
 	p->translate( 0, -y );
 	parag = parag->next();
 	if ( !flow()->isEmpty() )
@@ -3212,7 +3212,7 @@ void TQTextDocument::drawParagraph( TQPainter *p, TQTextParagraph *parag, int cx
 			       TQPixmap *&doubleBuffer, const TQColorGroup &cg,
 			       bool drawCursor, TQTextCursor *cursor, bool resetChanged )
 {
-    TQPainter *painter = 0;
+    TQPainter *painter = nullptr;
     if ( resetChanged )
 	parag->setChanged( false );
     TQRect ir( parag->rect() );
@@ -3250,11 +3250,11 @@ void TQTextDocument::drawParagraph( TQPainter *p, TQTextParagraph *parag, int cx
 
     painter->translate( -( ir.x() - parag->rect().x() ),
 			-( ir.y() - parag->rect().y() ) );
-    parag->paint( *painter, cg, drawCursor ? cursor : 0, true, cx, cy, cw, ch );
+    parag->paint( *painter, cg, drawCursor ? cursor : nullptr, true, cx, cy, cw, ch );
 
     if ( uDoubleBuffer ) {
 	delete painter;
-	painter = 0;
+	painter = nullptr;
 	p->drawPixmap( ir.topLeft(), *doubleBuffer, TQRect( TQPoint( 0, 0 ), ir.size() ) );
     } else {
 	painter->translate( -ir.x(), -ir.y() );
@@ -3270,12 +3270,12 @@ TQTextParagraph *TQTextDocument::draw( TQPainter *p, int cx, int cy, int cw, int
 	withoutDoubleBuffer = true;
 	TQRect r;
 	draw( p, r, cg );
-	return 0;
+	return nullptr;
     }
     withoutDoubleBuffer = false;
 
     if ( !firstParagraph() )
-	return 0;
+	return nullptr;
 
     TQPainter * oldPainter = TQTextFormat::painter();
     TQTextFormat::setPainter( p );
@@ -3289,10 +3289,10 @@ TQTextParagraph *TQTextDocument::draw( TQPainter *p, int cx, int cy, int cw, int
 	ch = height();
     }
 
-    TQTextParagraph *lastFormatted = 0;
+    TQTextParagraph *lastFormatted = nullptr;
     TQTextParagraph *parag = firstParagraph();
 
-    TQPixmap *doubleBuffer = 0;
+    TQPixmap *doubleBuffer = nullptr;
 
     while ( parag ) {
 	lastFormatted = parag;
@@ -3332,7 +3332,7 @@ TQTextParagraph *TQTextDocument::draw( TQPainter *p, int cx, int cy, int cw, int
 
     if ( buf_pixmap && buf_pixmap->height() > 300 ) {
 	delete buf_pixmap;
-	buf_pixmap = 0;
+	buf_pixmap = nullptr;
     }
 
     TQTextFormat::setPainter(oldPainter);
@@ -3380,7 +3380,7 @@ void TQTextDocument::registerCustomItem( TQTextCustomItem *i, TQTextParagraph *p
 void TQTextDocument::unregisterCustomItem( TQTextCustomItem *i, TQTextParagraph *p )
 {
     p->unregisterFloatingItem( i );
-    i->setParagraph( 0 );
+    i->setParagraph( nullptr );
     flow_->unregisterFloatingItem( i );
 }
 #endif
@@ -3560,7 +3560,7 @@ bool TQTextDocument::focusNextPrevChild( bool next )
 	}
     }
 
-    focusIndicator.parag = 0;
+    focusIndicator.parag = nullptr;
 
     return false;
 }
@@ -3692,7 +3692,7 @@ void TQTextString::insert( int index, const TQChar *unicode, int len, TQTextForm
     for ( int i = 0; i < len; ++i ) {
 	ch->x = 0;
 	ch->lineStart = 0;
-	ch->d.format = 0;
+	ch->d.format = nullptr;
 	ch->nobreak = false;
 	ch->type = TQTextStringChar::Regular;
  	ch->d.format = f;
@@ -3721,7 +3721,7 @@ void TQTextString::insert( int index, TQTextStringChar *c, bool doAddRefFormat
     ch.x = 0;
     ch.lineStart = 0;
     ch.rightToLeft = 0;
-    ch.d.format = 0;
+    ch.d.format = nullptr;
     ch.type = TQTextStringChar::Regular;
     ch.nobreak = false;
     if ( doAddRefFormat && c->format() )
@@ -3762,7 +3762,7 @@ int TQTextString::appendParagraphs( TQTextParagraph *start, TQTextParagraph *end
         d[i].lineStart = 0;
         d[i].nobreak = false;
         d[i].type = TQTextStringChar::Regular;
-        d[i].d.format = 0;
+        d[i].d.format = nullptr;
         d[i].rightToLeft = 0;
         d[i].c = '\n';
         d += p->length();
@@ -3785,7 +3785,7 @@ void TQTextString::truncate( int index )
 		if ( ch.d.custom->format )
 		    ch.d.custom->format->removeRef();
 		delete ch.d.custom;
-		ch.d.custom = 0;
+		ch.d.custom = nullptr;
 	    } else
 #endif
 		if ( ch.format() ) {
@@ -3807,7 +3807,7 @@ void TQTextString::remove( int index, int len )
 	    if ( ch.d.custom->format )
 		ch.d.custom->format->removeRef();
 	    delete ch.d.custom;
-	    ch.d.custom = 0;
+	    ch.d.custom = nullptr;
 	} else
 #endif
 	    if ( ch.format() ) {
@@ -3831,7 +3831,7 @@ void TQTextString::clear()
 	    if ( ch.d.custom->format )
 		ch.d.custom->format->removeRef();
 	    delete ch.d.custom;
-	    ch.d.custom = 0;
+	    ch.d.custom = nullptr;
 	} else
 #endif
 	    if ( ch.format() ) {
@@ -3867,7 +3867,7 @@ void TQTextString::checkBidi() const
 
 
     // determines the properties we need for layouting
-    TQTextEngine textEngine( toString(), 0 );
+    TQTextEngine textEngine( toString(), nullptr );
     textEngine.direction = (TQChar::Direction) dir;
     textEngine.itemize(TQTextEngine::SingleLine);
     const TQCharAttributes *ca = textEngine.attributes() + length-1;
@@ -3945,7 +3945,7 @@ void TQTextStringChar::setFormat( TQTextFormat *f )
 #ifndef TQT_NO_TEXTCUSTOMITEM
  	if ( !d.custom ) {
  	    d.custom = new CustomData;
- 	    d.custom->custom = 0;
+ 	    d.custom->custom = nullptr;
  	}
  	d.custom->format = f;
 #endif
@@ -3970,12 +3970,12 @@ void TQTextStringChar::loseCustomItem()
 {
     if ( type == Custom ) {
 	TQTextFormat *f = d.custom->format;
-	d.custom->custom = 0;
+	d.custom->custom = nullptr;
 	delete d.custom;
 	type = Regular;
 	d.format = f;
     } else if ( type == CustomAnchor ) {
-	d.custom->custom = 0;
+	d.custom->custom = nullptr;
 	type = Anchor;
     }
 }
@@ -4004,7 +4004,7 @@ void TQTextStringChar::setAnchor( const TQString& name, const TQString& href )
 	TQTextFormat *f = format();
 	d.custom = new CustomData;
 #ifndef TQT_NO_TEXTCUSTOMITEM
-	d.custom->custom = 0;
+	d.custom->custom = nullptr;
 #endif
 	d.custom->format = f;
 	type = Anchor;
@@ -4051,20 +4051,20 @@ TQTextParagraph::TQTextParagraph( TQTextDocument *d, TQTextParagraph *pr, TQText
     : p( pr ), n( nx ), docOrPseudo( d ),
       changed(false), firstFormat(true), firstPProcess(true), needPreProcess(false), fullWidth(true),
       lastInFrame(false), visible(true), breakable(true), movedDown(false),
-      mightHaveCustomItems(false), hasdoc( d != 0 ), litem(false), rtext(false),
-      align( 0 ), lstyle( TQStyleSheetItem::ListDisc ), invalid( 0 ), mSelections( 0 ),
+      mightHaveCustomItems(false), hasdoc( !!d ), litem(false), rtext(false),
+      align( 0 ), lstyle( TQStyleSheetItem::ListDisc ), invalid( 0 ), mSelections( nullptr ),
 #ifndef TQT_NO_TEXTCUSTOMITEM
-      mFloatingItems( 0 ),
+      mFloatingItems( nullptr ),
 #endif
       utm( 0 ), ubm( 0 ), ulm( 0 ), urm( 0 ), uflm( 0 ), ulinespacing( 0 ),
-      tabStopWidth(0), minwidth(0), tArray(0), eData( 0 ), ldepth( 0 )
+      tabStopWidth(0), minwidth(0), tArray(nullptr), eData( nullptr ), ldepth( 0 )
 {
     lstyle = TQStyleSheetItem::ListDisc;
     if ( !hasdoc )
 	docOrPseudo = new TQTextParagraphPseudoDocument;
-    bgcol = 0;
+    bgcol = nullptr;
     list_val = -1;
-    paintdevice = 0;
+    paintdevice = nullptr;
     TQTextFormat* defFormat = formatCollection()->defaultFormat();
     if ( !hasdoc ) {
 	tabStopWidth = defFormat->width( 'x' ) * 8;
@@ -4107,11 +4107,11 @@ TQTextParagraph::~TQTextParagraph()
     if ( hasdoc ) {
 	TQTextDocument *doc = document();
 	if ( this == doc->minwParag ) {
-	    doc->minwParag = 0;
+	    doc->minwParag = nullptr;
 	    doc->minw = 0;
 	}
 	if ( this == doc->curParag )
-	    doc->curParag = 0;
+	    doc->curParag = nullptr;
     } else {
 	delete pseudoDocument();
     }
@@ -4249,7 +4249,7 @@ void TQTextParagraph::join( TQTextParagraph *s )
 
     if ( !extraData() && s->extraData() ) {
 	setExtraData( s->extraData() );
-	s->setExtraData( 0 );
+	s->setExtraData( nullptr );
     } else if ( extraData() && s->extraData() ) {
 	extraData()->join( s->extraData() );
     }
@@ -4456,7 +4456,7 @@ TQTextStringChar *TQTextParagraph::lineStartOfChar( int i, int *index, int *line
     }
 
     tqWarning( "TQTextParagraph::lineStartOfChar: couldn't find %d", i );
-    return 0;
+    return nullptr;
 }
 
 int TQTextParagraph::lines() const
@@ -4483,7 +4483,7 @@ TQTextStringChar *TQTextParagraph::lineStartOfLine( int line, int *index ) const
     }
 
     tqWarning( "TQTextParagraph::lineStartOfLine: couldn't find %d", line );
-    return 0;
+    return nullptr;
 }
 
 int TQTextParagraph::leftGap() const
@@ -4523,7 +4523,7 @@ void TQTextParagraph::setFormat( int index, int len, TQTextFormat *f, bool useCo
     if ( index + len >= str->length() )
 	len = str->length() - index;
 
-    TQTextFormatCollection *fc = 0;
+    TQTextFormatCollection *fc = nullptr;
     if ( useCollection )
 	fc = formatCollection();
     TQTextFormat *of;
@@ -4572,7 +4572,7 @@ void TQTextParagraph::paint( TQPainter &painter, const TQColorGroup &cg, TQTextC
     int i, y, h, baseLine, xstart, xend = 0;
     i = y =h = baseLine = 0;
     TQRect cursorRect;
-    drawSelections &= ( mSelections != 0 );
+    drawSelections &= ( mSelections != nullptr );
     // macintosh full-width selection style
     bool fullWidthStyle = TQApplication::style().styleHint(TQStyle::SH_RichText_FullWidthSelection);
     int fullSelectionWidth = 0;
@@ -4592,7 +4592,7 @@ void TQTextParagraph::paint( TQPainter &painter, const TQColorGroup &cg, TQTextC
 
     int line = -1;
     int paintStart = 0;
-    TQTextStringChar *chr = 0;
+    TQTextStringChar *chr = nullptr;
     TQTextStringChar *nextchr = at( 0 );
     for ( i = 0; i < length(); i++ ) {
 	chr = nextchr;
@@ -5120,7 +5120,7 @@ TQTextFormatCollection *TQTextParagraph::formatCollection() const
 TQString TQTextParagraph::richText() const
 {
     TQString s;
-    TQTextStringChar *formatChar = 0;
+    TQTextStringChar *formatChar = nullptr;
     TQString spaces;
     bool doStart = richTextExportStart && richTextExportStart->paragraph() == this;
     bool doEnd = richTextExportEnd && richTextExportEnd->paragraph() == this;
@@ -5144,7 +5144,7 @@ TQString TQTextParagraph::richText() const
 	}
 	if ( !formatChar ) {
 	    s += c->format()->makeFormatChangeTags( formatCollection()->defaultFormat(),
-						    0, TQString::null, c->anchorHref() );
+						    nullptr, TQString::null, c->anchorHref() );
 	    formatChar = c;
 	} else if ( ( formatChar->format()->key() != c->format()->key() ) ||
 		  (c->anchorHref() != formatChar->anchorHref() ) )  {
@@ -5593,8 +5593,8 @@ int TQTextFormatterBreakInWords::format( TQTextDocument *doc,TQTextParagraph *pa
     // make sure bidi information is correct.
     (void )parag->string()->isBidi();
 
-    TQTextStringChar *c = 0;
-    TQTextStringChar *firstChar = 0;
+    TQTextStringChar *c = nullptr;
+    TQTextStringChar *firstChar = nullptr;
     int left = doc ? parag->leftMargin() + doc->leftMargin() : 0;
     int x = left + ( doc ? parag->firstLineMargin() : 0 );
     int dw = parag->documentVisibleWidth() - ( doc ? doc->rightMargin() : 0 );
@@ -5729,8 +5729,8 @@ int TQTextFormatterBreakWords::format( TQTextDocument *doc, TQTextParagraph *par
     // make sure bidi information is correct.
     (void )parag->string()->isBidi();
 
-    TQTextStringChar *c = 0;
-    TQTextStringChar *firstChar = 0;
+    TQTextStringChar *c = nullptr;
+    TQTextStringChar *firstChar = nullptr;
     TQTextString *string = parag->string();
     int left = doc ? parag->leftMargin() + doc->leftMargin() : 0;
     int x = left + ( doc ? parag->firstLineMargin() : 0 );
@@ -6063,14 +6063,14 @@ TQTextIndent::TQTextIndent()
 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 TQTextFormatCollection::TQTextFormatCollection()
-    : cKey( 307 ), paintdevice( 0 )
+    : cKey( 307 ), paintdevice( nullptr )
 {
     defFormat = new TQTextFormat( TQApplication::font(),
 				 TQApplication::palette().color( TQPalette::Active, TQColorGroup::Text ) );
-    lastFormat = cres = 0;
+    lastFormat = cres = nullptr;
     cflags = -1;
     cKey.setAutoDelete( true );
-    cachedFormat = 0;
+    cachedFormat = nullptr;
 }
 
 TQTextFormatCollection::~TQTextFormatCollection()
@@ -6090,7 +6090,7 @@ void TQTextFormatCollection::setPaintDevice( TQPaintDevice *pd )
 
     TQDictIterator<TQTextFormat> it( cKey );
     TQTextFormat *format;
-    while ( ( format = it.current() ) != 0 ) {
+    while ( ( format = it.current() ) ) {
 	++it;
 	format->fn.x11SetScreen( scr );
 	format->update();
@@ -6206,11 +6206,11 @@ TQTextFormat *TQTextFormatCollection::format( const TQFont &f, const TQColor &c
 void TQTextFormatCollection::remove( TQTextFormat *f )
 {
     if ( lastFormat == f )
-	lastFormat = 0;
+	lastFormat = nullptr;
     if ( cres == f )
-	cres = 0;
+	cres = nullptr;
     if ( cachedFormat == f )
-	cachedFormat = 0;
+	cachedFormat = nullptr;
     if (cKey.find(f->key()) == f)
 	cKey.remove( f->key() );
 }
@@ -6584,7 +6584,7 @@ struct TQPixmapInt
     int	    ref;
 };
 
-static TQMap<TQString, TQPixmapInt> *pixmap_map = 0;
+static TQMap<TQString, TQPixmapInt> *pixmap_map = nullptr;
 
 TQTextImage::TQTextImage( TQTextDocument *p, const TQMap<TQString, TQString> &attr, const TQString& context,
 			TQMimeSourceFactory &factory )
@@ -6596,7 +6596,7 @@ TQTextImage::TQTextImage( TQTextDocument *p, const TQMap<TQString, TQString> &at
     if ( attr.contains("height") )
 	height = attr["height"].toInt();
 
-    reg = 0;
+    reg = nullptr;
     TQString imageName = attr["src"];
 
     if (!imageName)
@@ -6684,7 +6684,7 @@ TQTextImage::~TQTextImage()
 	    pixmap_map->remove( imgId );
 	    if ( pixmap_map->isEmpty() ) {
 		delete pixmap_map;
-		pixmap_map = 0;
+		pixmap_map = nullptr;
 	    }
 	}
     }
@@ -6716,7 +6716,7 @@ void TQTextImage::adjustToPainter( TQPainter* p )
 #if !defined(TQ_WS_X11)
 #include <tqbitmap.h>
 #include <tqcleanuphandler.h>
-static TQPixmap *qrt_selection = 0;
+static TQPixmap *qrt_selection = nullptr;
 static TQSingleCleanupHandler<TQPixmap> qrt_cleanup_pixmap;
 static void qrt_createSelectionPixmap( const TQColorGroup &cg )
 {
@@ -7238,11 +7238,11 @@ static const Entity entitylist [] = {
 
 
 
-static TQMap<TQString, TQChar> *html_map = 0;
+static TQMap<TQString, TQChar> *html_map = nullptr;
 static void tqt_cleanup_html_map()
 {
     delete html_map;
-    html_map = 0;
+    html_map = nullptr;
 }
 
 static TQMap<TQString, TQChar> *htmlMap()
@@ -8118,7 +8118,7 @@ TQTextTableCell::TQTextTableCell( TQTextTable* table,
     if ( attr.contains("rowspan") )
 	rowspan_ = attr["rowspan"].toInt();
 
-    background = 0;
+    background = nullptr;
     if ( attr.contains("bgcolor") ) {
 	background = new TQBrush(TQColor( attr["bgcolor"] ));
     }
@@ -8148,9 +8148,9 @@ TQTextTableCell::TQTextTableCell( TQTextTable* table,
 TQTextTableCell::~TQTextTableCell()
 {
     delete background;
-    background = 0;
+    background = nullptr;
     delete richtext;
-    richtext = 0;
+    richtext = nullptr;
 }
 
 TQSize TQTextTableCell::sizeHint() const
@@ -8267,9 +8267,9 @@ void TQTextTableCell::draw( TQPainter* p, int x, int y, int cx, int cy, int cw,
     if ( cx >= 0 && cy >= 0 )
 	richtext->draw( p, cx - ( x + horizontalAlignmentOffset() + geom.x() ),
 			cy - ( y + geom.y() + verticalAlignmentOffset() ),
-			cw, ch, g, false, false, 0 );
+			cw, ch, g, false, false, nullptr );
     else
-	richtext->draw( p, -1, -1, -1, -1, g, false, false, 0 );
+	richtext->draw( p, -1, -1, -1, -1, g, false, false, nullptr );
 
     p->restore();
 }
diff --git a/src/kernel/tqrichtext_p.cpp b/src/kernel/tqrichtext_p.cpp
index 13dba99c6..21e82720d 100644
--- a/src/kernel/tqrichtext_p.cpp
+++ b/src/kernel/tqrichtext_p.cpp
@@ -138,7 +138,7 @@ int TQTextCursor::globalY() const { return totalOffsetY() + para->rect().y() + y
 
 TQTextDocument *TQTextCursor::document() const
 {
-    return para ? para->document() : 0;
+    return para ? para->document() : nullptr;
 }
 
 void TQTextCursor::gotoPosition( TQTextParagraph* p, int index )
@@ -210,7 +210,7 @@ TQTextFormat::TQTextFormat()
 
     missp = false;
     ha = AlignNormal;
-    collection = 0;
+    collection = nullptr;
 }
 
 TQTextFormat::TQTextFormat( const TQStyleSheetItem *style )
@@ -226,7 +226,7 @@ TQTextFormat::TQTextFormat( const TQStyleSheetItem *style )
 
     missp = false;
     ha = AlignNormal;
-    collection = 0;
+    collection = nullptr;
     fn = TQFont( style->fontFamily(),
 		style->fontSize(),
 		style->fontWeight(),
@@ -274,7 +274,7 @@ TQTextFormat::TQTextFormat( const TQTextFormat &f )
     : fm( f.fm )
 {
     ref = 0;
-    collection = 0;
+    collection = nullptr;
     fn = f.fn;
     col = f.col;
     leftBearing = f.leftBearing;
@@ -330,8 +330,8 @@ void TQTextFormat::update()
 }
 
 
-TQPainter* TQTextFormat::pntr = 0;
-TQFontMetrics* TQTextFormat::pntr_fm = 0;
+TQPainter* TQTextFormat::pntr = nullptr;
+TQFontMetrics* TQTextFormat::pntr_fm = nullptr;
 int TQTextFormat::pntr_ldg=-1;
 int TQTextFormat::pntr_asc=-1;
 int TQTextFormat::pntr_hei=-1;
@@ -339,11 +339,11 @@ int TQTextFormat::pntr_dsc=-1;
 
 void TQTextFormat::cleanupPrivateData() {
     delete TQTextFormat::pntr_fm;
-    TQTextFormat::pntr_fm = 0;
-    TQTextFormat::pntr = 0;
+    TQTextFormat::pntr_fm = nullptr;
+    TQTextFormat::pntr = nullptr;
 
     // Not really necessary, but better to tidy-up everything
-    TQTextFormat::pntr_fm = 0;
+    TQTextFormat::pntr_fm = nullptr;
     TQTextFormat::pntr_ldg=-1;
     TQTextFormat::pntr_asc=-1;
     TQTextFormat::pntr_hei=-1;
@@ -454,7 +454,7 @@ TQString TQTextString::toString( const TQMemArray<TQTextStringChar> &data )
 {
     TQString s;
     int l = data.size();
-    s.setUnicode( 0, l );
+    s.setUnicode( nullptr, l );
     TQTextStringChar *c = data.data();
     TQChar *uc = (TQChar *)s.unicode();
     while ( l-- )
@@ -648,7 +648,7 @@ TQTextStringChar::~TQTextStringChar()
 	delete d.custom;
 }
 
-TQTextParagraphPseudoDocument::TQTextParagraphPseudoDocument():pFormatter(0),commandHistory(0), minw(0),wused(0),collection(){}
+TQTextParagraphPseudoDocument::TQTextParagraphPseudoDocument():pFormatter(nullptr),commandHistory(nullptr), minw(0),wused(0),collection(){}
 TQTextParagraphPseudoDocument::~TQTextParagraphPseudoDocument(){ delete pFormatter; delete commandHistory; }
 
 
diff --git a/src/kernel/tqrichtext_p.h b/src/kernel/tqrichtext_p.h
index d2219b562..b633ea05a 100644
--- a/src/kernel/tqrichtext_p.h
+++ b/src/kernel/tqrichtext_p.h
@@ -103,7 +103,7 @@ class TQ_EXPORT TQTextStringChar
 
 public:
     // this is never called, initialize variables in TQTextString::insert()!!!
-    TQTextStringChar() : nobreak(false), lineStart( 0 ), type( Regular ) {d.format=0;}
+    TQTextStringChar() : nobreak(false), lineStart( 0 ), type( Regular ) {d.format=nullptr;}
     ~TQTextStringChar();
 
     struct CustomData
@@ -210,9 +210,9 @@ public:
 
     TQMemArray<TQTextStringChar> rawData() const { return data.copy(); }
 
-    void operator=( const TQString &s ) { clear(); insert( 0, s, 0 ); }
-    void operator+=( const TQString &s ) { insert( length(), s, 0 ); }
-    void prepend( const TQString &s ) { insert( 0, s, 0 ); }
+    void operator=( const TQString &s ) { clear(); insert( 0, s, nullptr ); }
+    void operator+=( const TQString &s ) { insert( length(), s, nullptr ); }
+    void prepend( const TQString &s ) { insert( 0, s, nullptr ); }
     int appendParagraphs( TQTextParagraph *start, TQTextParagraph *end );
 
     // return next and previous valid cursor positions.
@@ -309,7 +309,7 @@ Q_TEMPLATE_EXTERN template class TQ_EXPORT TQValueStack<bool>;
 class TQ_EXPORT TQTextCursor
 {
 public:
-    TQTextCursor( TQTextDocument *d = 0 );
+    TQTextCursor( TQTextDocument *d = nullptr );
     TQTextCursor( const TQTextCursor &c );
     TQTextCursor &operator=( const TQTextCursor &c );
     virtual ~TQTextCursor() {}
@@ -343,7 +343,7 @@ public:
     void gotoWordLeft();
     void gotoWordRight();
 
-    void insert( const TQString &s, bool checkNewLine, TQMemArray<TQTextStringChar> *formatting = 0 );
+    void insert( const TQString &s, bool checkNewLine, TQMemArray<TQTextStringChar> *formatting = nullptr );
     void splitAndInsertEmptyParagraph( bool ind = true, bool updateIds = true );
     bool remove();
     bool removePreviousChar();
@@ -814,7 +814,7 @@ public:
     int height() const;
     void setWidth( int w );
     int minimumWidth() const;
-    bool setMinimumWidth( int needed, int used = -1, TQTextParagraph *parag = 0 );
+    bool setMinimumWidth( int needed, int used = -1, TQTextParagraph *parag = nullptr );
 
     void setY( int y );
     int leftMargin() const;
@@ -862,8 +862,8 @@ public:
     TQTextParagraph *paragAt( int i ) const;
 
     void addCommand( TQTextCommand *cmd );
-    TQTextCursor *undo( TQTextCursor *c = 0 );
-    TQTextCursor *redo( TQTextCursor *c  = 0 );
+    TQTextCursor *undo( TQTextCursor *c = nullptr );
+    TQTextCursor *redo( TQTextCursor *c  = nullptr );
     TQTextCommandHistory *commands() const { return commandHistory; }
 
     TQTextFormatCollection *formatCollection() const;
@@ -895,14 +895,14 @@ public:
     TQBrush *paper() const { return backBrush; }
 
     void doLayout( TQPainter *p, int w );
-    void draw( TQPainter *p, const TQRect& rect, const TQColorGroup &cg, const TQBrush *paper = 0 );
+    void draw( TQPainter *p, const TQRect& rect, const TQColorGroup &cg, const TQBrush *paper = nullptr );
     bool useDoubleBuffer( TQTextParagraph *parag, TQPainter *p );
 
     void drawParagraph( TQPainter *p, TQTextParagraph *parag, int cx, int cy, int cw, int ch,
 		    TQPixmap *&doubleBuffer, const TQColorGroup &cg,
 		    bool drawCursor, TQTextCursor *cursor, bool resetChanged = true );
     TQTextParagraph *draw( TQPainter *p, int cx, int cy, int cw, int ch, const TQColorGroup &cg,
-		      bool onlyChanged = false, bool drawCursor = false, TQTextCursor *cursor = 0,
+		      bool onlyChanged = false, bool drawCursor = false, TQTextCursor *cursor = nullptr,
 		      bool resetChanged = true );
 
 #ifndef TQT_NO_TEXTCUSTOMITEM
@@ -925,7 +925,7 @@ public:
 #endif
 
     void setPlainText( const TQString &text );
-    void setRichText( const TQString &text, const TQString &context, const TQTextFormat *initialFormat = 0 );
+    void setRichText( const TQString &text, const TQString &context, const TQTextFormat *initialFormat = nullptr );
     TQString richText() const;
     TQString plainText() const;
 
@@ -945,7 +945,7 @@ public:
     int length() const;
     void clear( bool createEmptyParag = false );
 
-    virtual TQTextParagraph *createParagraph( TQTextDocument *d, TQTextParagraph *pr = 0, TQTextParagraph *nx = 0, bool updateIds = true );
+    virtual TQTextParagraph *createParagraph( TQTextDocument *d, TQTextParagraph *pr = nullptr, TQTextParagraph *nx = nullptr, bool updateIds = true );
     void insertChild( TQObject *o ) { TQObject::insertChild( o ); }
     void removeChild( TQObject *o ) { TQObject::removeChild( o ); }
     void insertChild( TQTextDocument *d ) { childList.append( d ); }
@@ -978,7 +978,7 @@ private:
     TQChar parseHTMLSpecialChar(const TQChar* doc, int length, int& pos);
     TQString parseWord(const TQChar* doc, int length, int& pos, bool lower = true);
     TQChar parseChar(const TQChar* doc, int length, int& pos, TQStyleSheetItem::WhiteSpaceMode wsm );
-    void setRichTextInternal( const TQString &text, TQTextCursor* cursor = 0, const TQTextFormat *initialFormat = 0 );
+    void setRichTextInternal( const TQString &text, TQTextCursor* cursor = nullptr, const TQTextFormat *initialFormat = nullptr );
     void setRichTextMarginsInternal( TQPtrList< TQPtrVector<TQStyleSheetItem> >& styles, TQTextParagraph* stylesPar );
 
 private:
@@ -1168,7 +1168,7 @@ class TQ_EXPORT TQTextParagraph
     friend class TQSyntaxHighlighter;
 
 public:
-    TQTextParagraph( TQTextDocument *d, TQTextParagraph *pr = 0, TQTextParagraph *nx = 0, bool updateIds = true );
+    TQTextParagraph( TQTextDocument *d, TQTextParagraph *pr = nullptr, TQTextParagraph *nx = nullptr, bool updateIds = true );
     ~TQTextParagraph();
 
     TQTextString *string() const;
@@ -1191,7 +1191,7 @@ public:
 
     inline TQTextDocument *document() const {
 	if (hasdoc) return (TQTextDocument*) docOrPseudo;
-	return 0;
+	return nullptr;
     }
     TQTextParagraphPseudoDocument *pseudoDocument() const;
 
@@ -1222,10 +1222,10 @@ public:
     bool hasChanged() const;
     void setChanged( bool b, bool recursive = false );
 
-    int lineHeightOfChar( int i, int *bl = 0, int *y = 0 ) const;
-    TQTextStringChar *lineStartOfChar( int i, int *index = 0, int *line = 0 ) const;
+    int lineHeightOfChar( int i, int *bl = nullptr, int *y = nullptr ) const;
+    TQTextStringChar *lineStartOfChar( int i, int *index = nullptr, int *line = nullptr ) const;
     int lines() const;
-    TQTextStringChar *lineStartOfLine( int line, int *index = 0 ) const;
+    TQTextStringChar *lineStartOfLine( int line, int *index = nullptr ) const;
     int lineY( int l ) const;
     int lineBaseLine( int l ) const;
     int lineHeight( int l ) const;
@@ -1248,7 +1248,7 @@ public:
     bool firstPreProcess() const;
     void setFirstPreProcess( bool b );
 
-    void indent( int *oldIndent = 0, int *newIndent = 0 );
+    void indent( int *oldIndent = nullptr, int *newIndent = nullptr );
 
     void setExtraData( TQTextParagraphData *data );
     TQTextParagraphData *extraData() const;
@@ -1260,7 +1260,7 @@ public:
     void setAlignment( int a );
     int alignment() const;
 
-    void paint( TQPainter &painter, const TQColorGroup &cg, TQTextCursor *cursor = 0, bool drawSelections = false,
+    void paint( TQPainter &painter, const TQColorGroup &cg, TQTextCursor *cursor = nullptr, bool drawSelections = false,
 			int clipx = -1, int clipy = -1, int clipw = -1, int cliph = -1 );
 
     int topMargin() const;
@@ -1304,8 +1304,8 @@ public:
     TQString richText() const;
 
     void addCommand( TQTextCommand *cmd );
-    TQTextCursor *undo( TQTextCursor *c = 0 );
-    TQTextCursor *redo( TQTextCursor *c  = 0 );
+    TQTextCursor *undo( TQTextCursor *c = nullptr );
+    TQTextCursor *redo( TQTextCursor *c  = nullptr );
     TQTextCommandHistory *commands() const;
     void copyParagData( TQTextParagraph *parag );
 
@@ -1456,7 +1456,7 @@ public:
     TQTextIndent();
     virtual ~TQTextIndent() {}
 
-    virtual void indent( TQTextDocument *doc, TQTextParagraph *parag, int *oldIndent = 0, int *newIndent = 0 ) = 0;
+    virtual void indent( TQTextDocument *doc, TQTextParagraph *parag, int *oldIndent = nullptr, int *newIndent = nullptr ) = 0;
 
 };
 
@@ -1506,7 +1506,7 @@ public:
     virtual ~TQTextFormat();
 
     TQTextFormat( const TQStyleSheetItem *s );
-    TQTextFormat( const TQFont &f, const TQColor &c, TQTextFormatCollection *parent = 0 );
+    TQTextFormat( const TQFont &f, const TQColor &c, TQTextFormatCollection *parent = nullptr );
     TQTextFormat( const TQTextFormat &fm );
     TQTextFormat makeTextFormat( const TQStyleSheetItem *style, const TQMap<TQString,TQString>& attr, double scaleFontsFactor ) const;
     TQTextFormat& operator=( const TQTextFormat &fm );
@@ -1843,7 +1843,7 @@ inline void TQTextDocument::setFlow( TQTextFlow *f )
 
 inline void TQTextDocument::takeFlow()
 {
-    flow_ = 0;
+    flow_ = nullptr;
 }
 
 inline bool TQTextDocument::useDoubleBuffer( TQTextParagraph *parag, TQPainter *p )
@@ -1934,7 +1934,7 @@ inline void TQTextParagraph::setBackgroundColor( const TQColor & c )
 
 inline void TQTextParagraph::clearBackgroundColor()
 {
-    delete bgcol; bgcol = 0; setChanged( true );
+    delete bgcol; bgcol = nullptr; setChanged( true );
 }
 
 inline void TQTextParagraph::append( const TQString &s, bool reallyAtEnd )
@@ -2007,7 +2007,7 @@ inline TQTextString *TQTextParagraph::string() const
 inline TQTextParagraphPseudoDocument *TQTextParagraph::pseudoDocument() const
 {
     if ( hasdoc )
-	return 0;
+	return nullptr;
     return (TQTextParagraphPseudoDocument*) docOrPseudo;
 }
 
@@ -2015,7 +2015,7 @@ inline TQTextParagraphPseudoDocument *TQTextParagraph::pseudoDocument() const
 #ifndef TQT_NO_TEXTCUSTOMITEM
 inline TQTextTableCell *TQTextParagraph::tableCell() const
 {
-    return hasdoc ? document()->tableCell () : 0;
+    return hasdoc ? document()->tableCell () : nullptr;
 }
 #endif
 
@@ -2045,7 +2045,7 @@ inline void TQTextParagraph::unregisterFloatingItem( TQTextCustomItem *i )
 inline TQBrush *TQTextParagraph::background() const
 {
 #ifndef TQT_NO_TEXTCUSTOMITEM
-    return tableCell() ? tableCell()->backGround() : 0;
+    return tableCell() ? tableCell()->backGround() : nullptr;
 #else
     return 0;
 #endif
@@ -2104,7 +2104,7 @@ inline TQTextFormat *TQTextStringChar::format() const
 #ifndef TQT_NO_TEXTCUSTOMITEM
 inline TQTextCustomItem *TQTextStringChar::customItem() const
 {
-    return isCustom() ? d.custom->custom : 0;
+    return isCustom() ? d.custom->custom : nullptr;
 }
 #endif
 
diff --git a/src/kernel/tqscriptengine_x11.cpp b/src/kernel/tqscriptengine_x11.cpp
index ced11e93f..748dff903 100644
--- a/src/kernel/tqscriptengine_x11.cpp
+++ b/src/kernel/tqscriptengine_x11.cpp
@@ -1825,7 +1825,7 @@ static bool indic_shape(TQShaperItem *item)
     if (openType)
         openType->selectScript(item->script, indic_features);
 #else
-    TQOpenType *openType = 0;
+    TQOpenType *openType = nullptr;
 #endif
     unsigned short *logClusters = item->log_clusters;
 
@@ -1912,14 +1912,14 @@ static void thaiWordBreaks(const TQChar *string, const int len, TQCharAttributes
 #ifndef TQT_NO_TEXTCODEC
     typedef int (*th_brk_def)(const char*, int[], int);
     static TQTextCodec *thaiCodec = TQTextCodec::codecForMib(2259);
-    static th_brk_def th_brk = 0;
+    static th_brk_def th_brk = nullptr;
 
 #ifndef TQT_NO_LIBRARY
     /* load libthai dynamically */
     if (!th_brk && thaiCodec) {
         th_brk = (th_brk_def)TQLibrary::resolve("thai", "th_brk");
         if (!th_brk)
-            thaiCodec = 0;
+            thaiCodec = nullptr;
     }
 #endif
 
@@ -2143,9 +2143,9 @@ static bool tibetan_shape(TQShaperItem *item)
 #ifndef TQT_NO_XFTFREETYPE
     TQOpenType *openType = item->font->openType();
     if (openType && !openType->supportsScript(item->script))
-        openType = 0;
+        openType = nullptr;
 #else
-    TQOpenType *openType = 0;
+    TQOpenType *openType = nullptr;
 #endif
     unsigned short *logClusters = item->log_clusters;
 
@@ -2775,9 +2775,9 @@ static bool khmer_shape(TQShaperItem *item)
 #ifndef TQT_NO_XFTFREETYPE
     TQOpenType *openType = item->font->openType();
     if (openType && !openType->supportsScript(item->script))
-        openType = 0;
+        openType = nullptr;
 #else
-    TQOpenType *openType = 0;
+    TQOpenType *openType = nullptr;
 #endif
     unsigned short *logClusters = item->log_clusters;
 
@@ -3285,9 +3285,9 @@ static bool myanmar_shape(TQShaperItem *item)
 #ifndef TQT_NO_XFTFREETYPE
     TQOpenType *openType = item->font->openType();
     if (openType && !openType->supportsScript(item->script))
-        openType = 0;
+        openType = nullptr;
 #else
-    TQOpenType *openType = 0;
+    TQOpenType *openType = nullptr;
 #endif
     unsigned short *logClusters = item->log_clusters;
 
@@ -3563,11 +3563,11 @@ static bool hangul_shape(TQShaperItem *item)
 #ifndef TQT_NO_XFTFREETYPE
         TQOpenType *openType = item->font->openType();
         if (openType && !openType->supportsScript(item->script))
-            openType = 0;
+            openType = nullptr;
         if (openType)
             openType->selectScript(TQFont::Hangul, hangul_features);
 #else
-        TQOpenType *openType = 0;
+        TQOpenType *openType = nullptr;
 #endif
 
         unsigned short *logClusters = item->log_clusters;
@@ -3637,33 +3637,33 @@ static void hangul_attributes(int script, const TQString &text, int from, int le
 
 const q_scriptEngine scriptEngines[] = {
 	// Latin,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// Greek,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// Cyrillic,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// Armenian,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// Georgian,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// Runic,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// Ogham,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// SpacingModifiers,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// CombiningMarks,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 
 	// // Middle Eastern Scripts
 	// Hebrew,
-    { hebrew_shape, 0 },
+    { hebrew_shape, nullptr },
 	// Arabic,
-    { arabic_shape, 0 },
+    { arabic_shape, nullptr },
 	// Syriac,
-    { syriac_shape, 0 },
+    { syriac_shape, nullptr },
 	// Thaana,
-    { thaana_shape, 0 },
+    { thaana_shape, nullptr },
 
 	// // South and Southeast Asian Scripts
 	// Devanagari,
@@ -3689,7 +3689,7 @@ const q_scriptEngine scriptEngines[] = {
 	// Thai,
     { basic_shape, thai_attributes },
 	// Lao,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// Tibetan,
     { tibetan_shape, tibetan_attributes },
 	// Myanmar,
@@ -3699,62 +3699,62 @@ const q_scriptEngine scriptEngines[] = {
 
 	// // East Asian Scripts
 	// Han,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// Hiragana,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// Katakana,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// Hangul,
     { hangul_shape, hangul_attributes },
 	// Bopomofo,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// Yi,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 
 	// // Additional Scripts
 	// Ethiopic,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// Cherokee,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// CanadianAboriginal,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// Mongolian,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 
 	// // Symbols
 	// CurrencySymbols,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// LetterlikeSymbols,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// NumberForms,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// MathematicalOperators,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// TechnicalSymbols,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// GeometricSymbols,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// MiscellaneousSymbols,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// EnclosedAndSquare,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 	// Braille,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
 
 	// Unicode,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
     //Tagalog,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
     //Hanunoo,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
     //Buhid,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
     //Tagbanwa,
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
     // KatakanaHalfWidth
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
     // Limbu
-    { basic_shape, 0 },
+    { basic_shape, nullptr },
     // TaiLe
-    { basic_shape, 0 }
+    { basic_shape, nullptr }
 };
diff --git a/src/kernel/tqsignal.cpp b/src/kernel/tqsignal.cpp
index f8f918bb2..6b0f6cc94 100644
--- a/src/kernel/tqsignal.cpp
+++ b/src/kernel/tqsignal.cpp
@@ -163,7 +163,7 @@ bool TQSignal::connect( const TQObject *receiver, const char *member )
 bool TQSignal::disconnect( const TQObject *receiver, const char *member )
 {
     if (!member)
-	return TQObject::disconnect( (TQObject *)this, 0, receiver, member);
+	return TQObject::disconnect( (TQObject *)this, nullptr, receiver, member);
 #ifndef TQT_NO_VARIANT
     if ( intSignature( member ) )
 #endif
diff --git a/src/kernel/tqsignal.h b/src/kernel/tqsignal.h
index 116081362..f04640c32 100644
--- a/src/kernel/tqsignal.h
+++ b/src/kernel/tqsignal.h
@@ -52,11 +52,11 @@ class TQ_EXPORT TQSignal : public TQObject
     TQ_OBJECT
 
 public:
-    TQSignal( TQObject *parent=0, const char *name=0 );
+    TQSignal( TQObject *parent=nullptr, const char *name=nullptr );
     ~TQSignal();
 
     bool	connect( const TQObject *receiver, const char *member );
-    bool	disconnect( const TQObject *receiver, const char *member=0 );
+    bool	disconnect( const TQObject *receiver, const char *member=nullptr );
 
     void	activate();
 
diff --git a/src/kernel/tqsignalmapper.h b/src/kernel/tqsignalmapper.h
index aed7e72d4..a6f3dc638 100644
--- a/src/kernel/tqsignalmapper.h
+++ b/src/kernel/tqsignalmapper.h
@@ -52,7 +52,7 @@ struct TQSignalMapperRec;
 class TQ_EXPORT TQSignalMapper : public TQObject {
     TQ_OBJECT
 public:
-    TQSignalMapper( TQObject* parent, const char* name=0 );
+    TQSignalMapper( TQObject* parent, const char* name=nullptr );
     ~TQSignalMapper();
 
     virtual void setMapping( const TQObject* sender, int identifier );
diff --git a/src/kernel/tqsignalslotimp.h b/src/kernel/tqsignalslotimp.h
index 3b8080766..e9d4d9e05 100644
--- a/src/kernel/tqsignalslotimp.h
+++ b/src/kernel/tqsignalslotimp.h
@@ -83,7 +83,7 @@ public:
     TQSignalVec &operator=(const TQSignalVec &dict)
 	{ return (TQSignalVec&)TQPtrVector<TQConnectionList>::operator=(dict); }
     TQConnectionList* at( uint index ) const  {
-	return index >= size()? 0 : TQPtrVector<TQConnectionList>::at(index);
+	return index >= size()? nullptr : TQPtrVector<TQConnectionList>::at(index);
     }
     bool  insert( uint index, const TQConnectionList* d ) {
 	if (index >= size() )
diff --git a/src/kernel/tqsimplerichtext.cpp b/src/kernel/tqsimplerichtext.cpp
index c210f91e9..362caf287 100644
--- a/src/kernel/tqsimplerichtext.cpp
+++ b/src/kernel/tqsimplerichtext.cpp
@@ -51,7 +51,7 @@ public:
     TQFont font;
     int cachedWidth;
     bool cachedWidthWithPainter;
-    void adjustSize(TQPainter *p = 0);
+    void adjustSize(TQPainter *p = nullptr);
 };
 
 // Pull this private function in from tqglobal.cpp
@@ -140,7 +140,7 @@ TQSimpleRichText::TQSimpleRichText( const TQString& text, const TQFont& fnt,
     d->cachedWidth = -1;
     d->cachedWidthWithPainter = false;
     d->font = fnt;
-    d->doc = new TQTextDocument( 0 );
+    d->doc = new TQTextDocument( nullptr );
     d->doc->setTextFormat( TQt::RichText );
     d->doc->setLeftMargin( 0 );
     d->doc->setRightMargin( 0 );
@@ -186,7 +186,7 @@ TQSimpleRichText::TQSimpleRichText( const TQString& text, const TQFont& fnt,
     d->cachedWidth = -1;
     d->cachedWidthWithPainter = false;
     d->font = fnt;
-    d->doc = new TQTextDocument( 0 );
+    d->doc = new TQTextDocument( nullptr );
     d->doc->setTextFormat( TQt::RichText );
     d->doc->setFormatter( new TQTextFormatterBreakWords );
     d->doc->setStyleSheet( (TQStyleSheet*)sheet );
@@ -225,7 +225,7 @@ void TQSimpleRichText::setWidth( int w )
     d->doc->formatter()->setAllowBreakInWords( d->doc->isPageBreakEnabled() );
     d->cachedWidth = w;
     d->cachedWidthWithPainter = false;
-    d->doc->doLayout( 0, w );
+    d->doc->doLayout( nullptr, w );
 }
 
 /*!
diff --git a/src/kernel/tqsimplerichtext.h b/src/kernel/tqsimplerichtext.h
index 9fcae3649..d917522ae 100644
--- a/src/kernel/tqsimplerichtext.h
+++ b/src/kernel/tqsimplerichtext.h
@@ -60,7 +60,7 @@ class TQ_EXPORT TQSimpleRichText
 {
 public:
     TQSimpleRichText( const TQString& text, const TQFont& fnt,
-		     const TQString& context = TQString::null, const TQStyleSheet* sheet = 0);
+		     const TQString& context = TQString::null, const TQStyleSheet* sheet = nullptr);
     TQSimpleRichText( const TQString& text, const TQFont& fnt,
 		     const TQString& context,  const TQStyleSheet* sheet,
 		     const TQMimeSourceFactory* factory, int pageBreak = -1,
@@ -76,11 +76,11 @@ public:
     void adjustSize();
 
     void draw( TQPainter* p,  int x, int y, const TQRect& clipRect,
-	       const TQColorGroup& cg, const TQBrush* paper = 0) const;
+	       const TQColorGroup& cg, const TQBrush* paper = nullptr) const;
 
     // obsolete
     void draw( TQPainter* p,  int x, int y, const TQRegion& clipRegion,
-	       const TQColorGroup& cg, const TQBrush* paper = 0) const {
+	       const TQColorGroup& cg, const TQBrush* paper = nullptr) const {
 	draw( p, x, y, clipRegion.boundingRect(), cg, paper );
     }
 
diff --git a/src/kernel/tqsizegrip.cpp b/src/kernel/tqsizegrip.cpp
index 3728688bd..613f4a8b9 100644
--- a/src/kernel/tqsizegrip.cpp
+++ b/src/kernel/tqsizegrip.cpp
@@ -71,7 +71,7 @@ static TQWidget *tqt_sizegrip_workspace( TQWidget* w )
 {
     while ( w && !w->inherits("TQWorkspace" ) ) {
 	if ( w->isTopLevel() )
-	    return 0;
+	    return nullptr;
 	w = w->parentWidget();
     }
     return w;
diff --git a/src/kernel/tqsizegrip.h b/src/kernel/tqsizegrip.h
index 624fb6498..1c30e6fd8 100644
--- a/src/kernel/tqsizegrip.h
+++ b/src/kernel/tqsizegrip.h
@@ -51,7 +51,7 @@ class TQ_EXPORT TQSizeGrip: public TQWidget
 {
     TQ_OBJECT
 public:
-    TQSizeGrip( TQWidget* parent, const char* name=0 );
+    TQSizeGrip( TQWidget* parent, const char* name=nullptr );
     ~TQSizeGrip();
 
     TQSize sizeHint() const;
diff --git a/src/kernel/tqsocketnotifier.h b/src/kernel/tqsocketnotifier.h
index 717be3898..85bc5e83d 100644
--- a/src/kernel/tqsocketnotifier.h
+++ b/src/kernel/tqsocketnotifier.h
@@ -52,7 +52,7 @@ class TQ_EXPORT TQSocketNotifier : public TQObject
 public:
     enum Type { Read, Write, Exception };
 
-    TQSocketNotifier( int socket, Type, TQObject *parent=0, const char *name=0 );
+    TQSocketNotifier( int socket, Type, TQObject *parent=nullptr, const char *name=nullptr );
    ~TQSocketNotifier();
 
     int		 socket()	const;
diff --git a/src/kernel/tqsound.cpp b/src/kernel/tqsound.cpp
index 07da8bf4f..d657367ad 100644
--- a/src/kernel/tqsound.cpp
+++ b/src/kernel/tqsound.cpp
@@ -44,7 +44,7 @@
 
 #include "tqptrlist.h"
 
-static TQPtrList<TQAuServer> *servers=0;
+static TQPtrList<TQAuServer> *servers=nullptr;
 
 TQAuServer::TQAuServer(TQObject* parent, const char* name) :
     TQObject(parent,name)
@@ -61,7 +61,7 @@ TQAuServer::~TQAuServer()
     servers->remove(this);
     if ( servers->count() == 0 ) {
 	delete servers;
-	servers = 0;
+	servers = nullptr;
     }
 }
 
@@ -82,7 +82,7 @@ static TQAuServer& server()
 class TQSoundData {
 public:
     TQSoundData(const TQString& fname) :
-	filename(fname), bucket(0), looprem(0), looptotal(1)
+	filename(fname), bucket(nullptr), looprem(0), looptotal(1)
     {
     }
 
diff --git a/src/kernel/tqsound.h b/src/kernel/tqsound.h
index d3ba92ed3..dcc33dcd5 100644
--- a/src/kernel/tqsound.h
+++ b/src/kernel/tqsound.h
@@ -54,7 +54,7 @@ public:
     static bool isAvailable();
     static void play(const TQString& filename);
 
-    TQSound(const TQString& filename, TQObject* parent=0, const char* name=0);
+    TQSound(const TQString& filename, TQObject* parent=nullptr, const char* name=nullptr);
     ~TQSound();
 
     /* Coming soon...
diff --git a/src/kernel/tqsound_x11.cpp b/src/kernel/tqsound_x11.cpp
index 25253a00a..3226a31fd 100644
--- a/src/kernel/tqsound_x11.cpp
+++ b/src/kernel/tqsound_x11.cpp
@@ -52,7 +52,7 @@
 #include <audio/audiolib.h>
 #include <audio/soundlib.h>
 
-static AuServer *nas=0;
+static AuServer *nas=nullptr;
 
 static AuBool eventPred(AuServer *, AuEvent *e, AuPointer p)
 {
@@ -135,7 +135,7 @@ TQAuServerNAS::~TQAuServerNAS()
     nas = 0;
 }
 
-static TQPtrDict<void> *inprogress=0;
+static TQPtrDict<void> *inprogress=nullptr;
 
 void TQAuServerNAS::soundDestroyed(TQObject *o)
 {
diff --git a/src/kernel/tqstyle.cpp b/src/kernel/tqstyle.cpp
index fdbf74091..3d15119b7 100644
--- a/src/kernel/tqstyle.cpp
+++ b/src/kernel/tqstyle.cpp
@@ -602,7 +602,7 @@ TQStyle::TQStyle()
 TQStyle::~TQStyle()
 {
     delete d;
-    d = 0;
+    d = nullptr;
 }
 
 /*
@@ -2476,13 +2476,13 @@ bool TQStyle::widgetActionRequest( const TQStyleControlElementData &ceData, Cont
 				TQWidgetList *list = TQApplication::topLevelWidgets();
 				TQWidgetListIt it( *list );
 				TQWidget * widget;
-				while ((widget=it.current()) != 0) {
+				while ((widget=it.current())) {
 					++it;
 
 					TQObjectList *l = widget->queryList("TQWidget");
 					TQObjectListIt it2( *l );
 					TQWidget *w;
-					while ( (w = (TQWidget*)it2.current()) != 0 ) {
+					while ( (w = (TQWidget*)it2.current()) ) {
 						++it2;
 						if (w->isTopLevel() || !w->isVisible() || w->style().styleHint(SH_UnderlineAccelerator, TQStyleControlElementData(), CEF_None, w)) {
 							l->removeRef(w);
@@ -2491,7 +2491,7 @@ bool TQStyle::widgetActionRequest( const TQStyleControlElementData &ceData, Cont
 
 					// Repaint all relevant widgets
 					it2.toFirst();
-					while ( (w = (TQWidget*)it2.current()) != 0 ) {
+					while ( (w = (TQWidget*)it2.current()) ) {
 						++it2;
 						w->repaint(false);
 					}
@@ -2637,7 +2637,7 @@ void TQStyle::drawPrimitive( PrimitiveElement pe,
 				  SFlags flags,
 				  const TQStyleOption& opt ) const
 {
-	const TQWidget* widget = 0;
+	const TQWidget* widget = nullptr;
 
 	// Determine if the request needs widget information and set widget appropriately
 	// FIXME
@@ -2832,7 +2832,7 @@ TQSize TQStyle::scrollBarExtent() const
 
 TQStyleControlElementData::TQStyleControlElementData() {
 	isNull = true;
-	activePainter = 0;
+	activePainter = nullptr;
 	tickMarkSetting = 0;
 	comboBoxLineEditFlags = 0;
 	frameStyle = 0;
diff --git a/src/kernel/tqstyle.h b/src/kernel/tqstyle.h
index ba0ea25ca..760ecf452 100644
--- a/src/kernel/tqstyle.h
+++ b/src/kernel/tqstyle.h
@@ -302,8 +302,8 @@ class TQ_EXPORT TQStyleWidgetActionRequestData {
 	public:
 		TQStyleWidgetActionRequestData();
 		TQStyleWidgetActionRequestData(int metric1, int metric2=0);
-		TQStyleWidgetActionRequestData(TQPalette palette, bool informWidgets = false, const char* className = 0);
-		TQStyleWidgetActionRequestData(TQFont font, bool informWidgets = false, const char* className = 0);
+		TQStyleWidgetActionRequestData(TQPalette palette, bool informWidgets = false, const char* className = nullptr);
+		TQStyleWidgetActionRequestData(TQFont font, bool informWidgets = false, const char* className = nullptr);
 		TQStyleWidgetActionRequestData(TQRect rect);
 		TQStyleWidgetActionRequestData(TQPaintEvent* paintEvent);
 		~TQStyleWidgetActionRequestData();
@@ -407,7 +407,7 @@ public:
     virtual void drawItem( TQPainter *p, const TQRect &r,
 			   int flags, const TQColorGroup &g, bool enabled,
 			   const TQPixmap *pixmap, const TQString &text,
-			   int len = -1, const TQColor *penColor = 0 ) const;
+			   int len = -1, const TQColor *penColor = nullptr ) const;
 
     enum PrimitiveElement {
 	PE_ButtonCommand,
@@ -589,7 +589,7 @@ public:
 			      const TQColorGroup &cg,
 			      SFlags how = Style_Default,
 			      const TQStyleOption& = TQStyleOption::Default,
-			      const TQWidget *widget = 0 /* compat, will likely go away */ ) const = 0;
+			      const TQWidget *widget = nullptr /* compat, will likely go away */ ) const = 0;
 
     // Old API
     // DEPRECATED
@@ -606,7 +606,7 @@ public:
 				  ControlElementFlags elementFlags,
 				  const TQRect &r,
 				  const TQStyleOption& = TQStyleOption::Default,
-				  const TQWidget *widget = 0 /* compat, will likely go away */ ) const = 0;
+				  const TQWidget *widget = nullptr /* compat, will likely go away */ ) const = 0;
 
     enum SubRect {
 	SR_PushButtonContents,
@@ -747,7 +747,7 @@ public:
 #endif
 				     SCFlags subActive = SC_None,
 				     const TQStyleOption& = TQStyleOption::Default,
-				     const TQWidget *widget = 0 ) const = 0;
+				     const TQWidget *widget = nullptr ) const = 0;
 
     // Old API
     // DEPRECATED
@@ -764,7 +764,7 @@ public:
 					 const ControlElementFlags elementFlags,
 					 const TQRect &r,
 					 const TQStyleOption& = TQStyleOption::Default,
-					 const TQWidget *widget = 0 ) const = 0;
+					 const TQWidget *widget = nullptr ) const = 0;
 
     // Old API
     // DEPRECATED
@@ -779,7 +779,7 @@ public:
 					  ControlElementFlags elementFlags,
 					  SubControl sc,
 					  const TQStyleOption& = TQStyleOption::Default,
-					  const TQWidget *widget = 0 ) const = 0;
+					  const TQWidget *widget = nullptr ) const = 0;
 
     // Old API
     // DEPRECATED
@@ -794,7 +794,7 @@ public:
 					ControlElementFlags elementFlags,
 					const TQPoint &pos,
 					const TQStyleOption& = TQStyleOption::Default,
-					const TQWidget *widget = 0 ) const = 0;
+					const TQWidget *widget = nullptr ) const = 0;
 
 
     enum PixelMetric {
@@ -875,13 +875,13 @@ public:
     // Old API
     // DEPRECATED
     virtual int pixelMetric( PixelMetric metric,
-			     const TQWidget *widget = 0 ) const;
+			     const TQWidget *widget = nullptr ) const;
 
     // New API
     virtual int pixelMetric( PixelMetric metric,
 			     const TQStyleControlElementData &ceData,
 			     ControlElementFlags elementFlags,
-			     const TQWidget *widget = 0 ) const = 0;
+			     const TQWidget *widget = nullptr ) const = 0;
 
 
     enum ContentsType {
@@ -920,7 +920,7 @@ public:
 				    ControlElementFlags elementFlags,
 				    const TQSize &contentsSize,
 				    const TQStyleOption& = TQStyleOption::Default,
-				    const TQWidget *widget = 0 ) const = 0;
+				    const TQWidget *widget = nullptr ) const = 0;
 
     enum StyleHint  {
 	// ...
@@ -1095,9 +1095,9 @@ public:
     // Old API
     // DEPRECATED
     virtual int styleHint( StyleHint stylehint,
-			   const TQWidget *widget = 0,
+			   const TQWidget *widget = nullptr,
 			   const TQStyleOption& = TQStyleOption::Default,
-			   TQStyleHintReturn* returnData = 0
+			   TQStyleHintReturn* returnData = nullptr
 			   ) const;
 
     // New API
@@ -1105,8 +1105,8 @@ public:
 			   const TQStyleControlElementData &ceData,
 			   ControlElementFlags elementFlags,
 			   const TQStyleOption& = TQStyleOption::Default,
-			   TQStyleHintReturn* returnData = 0,
-			   const TQWidget *widget = 0
+			   TQStyleHintReturn* returnData = nullptr,
+			   const TQWidget *widget = nullptr
 			   ) const = 0;
 
 
@@ -1130,14 +1130,14 @@ public:
     // Old API
     // DEPRECATED
     virtual TQPixmap stylePixmap( StylePixmap stylepixmap,
-				 const TQWidget *widget = 0,
+				 const TQWidget *widget = nullptr,
 				 const TQStyleOption& = TQStyleOption::Default ) const;
 
     virtual TQPixmap stylePixmap( StylePixmap stylepixmap,
 				 const TQStyleControlElementData &ceData,
 				 ControlElementFlags elementFlags,
 				 const TQStyleOption& = TQStyleOption::Default,
-				 const TQWidget *widget = 0 ) const = 0;
+				 const TQWidget *widget = nullptr ) const = 0;
 
 
     // Old API
diff --git a/src/kernel/tqstylesheet.cpp b/src/kernel/tqstylesheet.cpp
index afa9fa057..7aacf0ef3 100644
--- a/src/kernel/tqstylesheet.cpp
+++ b/src/kernel/tqstylesheet.cpp
@@ -1285,7 +1285,7 @@ void TQStyleSheet::init()
 
 
 
-static TQStyleSheet* defaultsheet = 0;
+static TQStyleSheet* defaultsheet = nullptr;
 static TQSingleCleanupHandler<TQStyleSheet> tqt_cleanup_stylesheet;
 
 /*!
@@ -1343,7 +1343,7 @@ void TQStyleSheet::insert( TQStyleSheetItem* style )
 TQStyleSheetItem* TQStyleSheet::item( const TQString& name)
 {
     if ( name.isNull() )
-	return 0;
+	return nullptr;
     return styles[name];
 }
 
@@ -1356,7 +1356,7 @@ TQStyleSheetItem* TQStyleSheet::item( const TQString& name)
 const TQStyleSheetItem* TQStyleSheet::item( const TQString& name) const
 {
     if ( name.isNull() )
-	return 0;
+	return nullptr;
     return styles[name];
 }
 
@@ -1390,12 +1390,12 @@ TQTextCustomItem* TQStyleSheet::tag(  const TQString& name,
     const TQStyleSheetItem* style = item( name );
     // first some known  tags
     if ( !style )
-	return 0;
+	return nullptr;
     if ( style->name() == "img" )
 	return new TQTextImage( doc, attr, context, (TQMimeSourceFactory&)factory );
     if ( style->name() == "hr" )
 	return new TQTextHorizontalLine( doc, attr, context, (TQMimeSourceFactory&)factory  );
-   return 0;
+   return nullptr;
 }
 #endif
 
@@ -1543,7 +1543,7 @@ bool TQStyleSheet::mightBeRichText( const TQString& text)
 		else if ( !text[i].isSpace() && (!tag.isEmpty() || text[i] != '!' ) )
 		    return false; // that's not a tag
 	    }
-	    return defaultSheet()->item( tag.lower() ) != 0;
+	    return defaultSheet()->item( tag.lower() );
 	}
     }
     return false;
diff --git a/src/kernel/tqstylesheet.h b/src/kernel/tqstylesheet.h
index 4880726a0..56edc3909 100644
--- a/src/kernel/tqstylesheet.h
+++ b/src/kernel/tqstylesheet.h
@@ -209,7 +209,7 @@ class TQ_EXPORT TQStyleSheet : public TQObject
 {
     TQ_OBJECT
 public:
-    TQStyleSheet( TQObject *parent=0, const char *name=0 );
+    TQStyleSheet( TQObject *parent=nullptr, const char *name=nullptr );
     virtual ~TQStyleSheet();
 
     static TQStyleSheet* defaultSheet();
diff --git a/src/kernel/tqtextengine_p.h b/src/kernel/tqtextengine_p.h
index 4ba2ed942..6073e2eb9 100644
--- a/src/kernel/tqtextengine_p.h
+++ b/src/kernel/tqtextengine_p.h
@@ -201,7 +201,7 @@ struct TQScriptItem
 			   isObject( false ), hasPositioning( false ),
 			   descent( -1 ), ascent( -1 ), width( -1 ),
 			   x( 0 ), y( 0 ), num_glyphs( 0 ), glyph_data_offset( 0 ),
-			   fontEngine( 0 ) { }
+			   fontEngine( nullptr ) { }
     int position;
     TQScriptAnalysis analysis;
     unsigned short isSpace  : 1;
@@ -231,7 +231,7 @@ struct TQScriptItemArrayPrivate
 class TQScriptItemArray
 {
 public:
-    TQScriptItemArray() : d( 0 ) {}
+    TQScriptItemArray() : d( nullptr ) {}
     ~TQScriptItemArray();
 
     inline TQScriptItem &operator[] (int i) const {return d->items[i];   }
diff --git a/src/kernel/tqtextlayout.cpp b/src/kernel/tqtextlayout.cpp
index 5d424f423..9e72d43e0 100644
--- a/src/kernel/tqtextlayout.cpp
+++ b/src/kernel/tqtextlayout.cpp
@@ -214,7 +214,7 @@ bool TQTextItem::isTab() const
 
 
 TQTextLayout::TQTextLayout()
-    :d(0) {}
+    :d(nullptr) {}
 
 TQTextLayout::TQTextLayout( const TQString& string, TQPainter *p )
 {
diff --git a/src/kernel/tqtextlayout_p.h b/src/kernel/tqtextlayout_p.h
index a95f28e78..28d0ff25f 100644
--- a/src/kernel/tqtextlayout_p.h
+++ b/src/kernel/tqtextlayout_p.h
@@ -49,7 +49,7 @@ class TQFont;
 class TQ_EXPORT TQTextItem
 {
 public:
-    inline TQTextItem() : item(0), engine(0) {}
+    inline TQTextItem() : item(0), engine(nullptr) {}
     inline bool isValid() const { return (bool)engine; }
 
     TQRect rect() const;
@@ -102,7 +102,7 @@ class TQ_EXPORT TQTextLayout
 public:
     // does itemization
     TQTextLayout();
-    TQTextLayout( const TQString& string, TQPainter * = 0 );
+    TQTextLayout( const TQString& string, TQPainter * = nullptr );
     TQTextLayout( const TQString& string, const TQFont& fnt );
     ~TQTextLayout();
 
@@ -149,7 +149,7 @@ public:
     /* Note: if ascent and descent are used they must be initialized to the minimum ascent/descent
        acceptable for the line. TQFontMetrics::ascent/descent() is usually the right choice */
     Result endLine( int x = 0, int y = 0, int alignment = TQt::AlignLeft,
-		    int *ascent = 0, int *descent = 0, int *left = 0, int *right = 0 );
+		    int *ascent = nullptr, int *descent = nullptr, int *left = nullptr, int *right = nullptr );
     void endLayout();
 
     enum CursorMode {
diff --git a/src/kernel/tqthread_unix.cpp b/src/kernel/tqthread_unix.cpp
index 81fe169ff..589dfba11 100644
--- a/src/kernel/tqthread_unix.cpp
+++ b/src/kernel/tqthread_unix.cpp
@@ -52,7 +52,7 @@ typedef pthread_mutex_t Q_MUTEX_T;
 #include <errno.h>
 #include <sched.h>
 
-static TQMutexPool *tqt_thread_mutexpool = 0;
+static TQMutexPool *tqt_thread_mutexpool = nullptr;
 
 #if defined(Q_C_CALLBACKS)
 extern "C" {
@@ -96,8 +96,8 @@ TQThreadInstance *TQThreadInstance::current()
 void TQThreadInstance::init(unsigned int stackSize)
 {
     stacksize = stackSize;
-    args[0] = args[1] = 0;
-    thread_storage = 0;
+    args[0] = args[1] = nullptr;
+    thread_storage = nullptr;
     finished = false;
     running = false;
     orphan = false;
@@ -106,7 +106,7 @@ void TQThreadInstance::init(unsigned int stackSize)
     pthread_cond_init(&thread_done, nullptr);
     thread_id = 0;
 
-    eventLoop = 0;
+    eventLoop = nullptr;
     cleanupType = TQThread::CleanupMergeObjects;
 
     // threads have not been initialized yet, do it now
@@ -133,7 +133,7 @@ void *TQThreadInstance::start( void *_arg )
     ( (TQThread *) arg[0] )->run();
 
     pthread_cleanup_pop( true );
-    return 0;
+    return nullptr;
 }
 
 void TQThreadInstance::finish( void * )
@@ -156,11 +156,11 @@ void TQThreadInstance::finish( void * )
     TQMutexLocker locker( d->mutex() );
     d->running = false;
     d->finished = true;
-    d->args[0] = d->args[1] = 0;
+    d->args[0] = d->args[1] = nullptr;
 
 
     TQThreadStorageData::finish( d->thread_storage );
-    d->thread_storage = 0;
+    d->thread_storage = nullptr;
 
     d->thread_id = 0;
     pthread_cond_broadcast(&d->thread_done);
@@ -173,12 +173,12 @@ void TQThreadInstance::finish( void * )
 
 void TQThreadInstance::finishCoreThread(TQThreadInstance *d) {
     TQThreadStorageData::finish( d->thread_storage );
-    d->thread_storage = 0;
+    d->thread_storage = nullptr;
 }
 
 TQMutex *TQThreadInstance::mutex() const
 {
-    return tqt_thread_mutexpool ? tqt_thread_mutexpool->get( (void *) this ) : 0;
+    return tqt_thread_mutexpool ? tqt_thread_mutexpool->get( (void *) this ) : nullptr;
 }
 
 void TQThreadInstance::terminate()
@@ -222,8 +222,8 @@ void TQThread::cleanup()
 {
     delete tqt_global_mutexpool;
     delete tqt_thread_mutexpool;
-    tqt_global_mutexpool = 0;
-    tqt_thread_mutexpool = 0;
+    tqt_global_mutexpool = nullptr;
+    tqt_thread_mutexpool = nullptr;
 }
 
 /*!
@@ -232,7 +232,7 @@ void TQThread::cleanup()
 */
 void TQThread::exit()
 {
-    pthread_exit( 0 );
+    pthread_exit( nullptr );
 }
 
 /*  \internal
@@ -244,8 +244,8 @@ static void thread_sleep( struct timespec *ti )
     pthread_mutex_t mtx;
     pthread_cond_t cnd;
 
-    pthread_mutex_init(&mtx, 0);
-    pthread_cond_init(&cnd, 0);
+    pthread_mutex_init(&mtx, nullptr);
+    pthread_cond_init(&cnd, nullptr);
 
     pthread_mutex_lock( &mtx );
     (void) pthread_cond_timedwait( &cnd, &mtx, ti );
@@ -262,7 +262,7 @@ static void thread_sleep( struct timespec *ti )
 void TQThread::sleep( unsigned long secs )
 {
     struct timeval tv;
-    gettimeofday( &tv, 0 );
+    gettimeofday( &tv, nullptr );
     struct timespec ti;
     ti.tv_sec = tv.tv_sec + secs;
     ti.tv_nsec = ( tv.tv_usec * 1000 );
@@ -276,7 +276,7 @@ void TQThread::sleep( unsigned long secs )
 void TQThread::msleep( unsigned long msecs )
 {
     struct timeval tv;
-    gettimeofday( &tv, 0 );
+    gettimeofday( &tv, nullptr );
     struct timespec ti;
 
     ti.tv_nsec = ( tv.tv_usec + ( msecs % 1000 ) * 1000 ) * 1000;
@@ -292,7 +292,7 @@ void TQThread::msleep( unsigned long msecs )
 void TQThread::usleep( unsigned long usecs )
 {
     struct timeval tv;
-    gettimeofday( &tv, 0 );
+    gettimeofday( &tv, nullptr );
     struct timespec ti;
 
     ti.tv_nsec = ( tv.tv_usec + ( usecs % 1000000 ) ) * 1000;
@@ -419,7 +419,7 @@ void TQThread::start(Priority priority)
 
 	d->running = false;
 	d->finished = false;
-	d->args[0] = d->args[1] = 0;
+	d->args[0] = d->args[1] = nullptr;
     }
 }
 
@@ -464,7 +464,7 @@ bool TQThread::wait( unsigned long time )
     int ret;
     if (time != ULONG_MAX) {
 	struct timeval tv;
-	gettimeofday(&tv, 0);
+	gettimeofday(&tv, nullptr);
 
 	timespec ti;
 	ti.tv_nsec = (tv.tv_usec + (time % 1000) * 1000) * 1000;
diff --git a/src/kernel/tqtimer.cpp b/src/kernel/tqtimer.cpp
index 1244a4690..f27051ac9 100644
--- a/src/kernel/tqtimer.cpp
+++ b/src/kernel/tqtimer.cpp
@@ -230,14 +230,14 @@ bool TQTimer::event( TQEvent *e )
   and kills itself when it gets the timeout.
 */
 
-static TQObjectList *sst_list = 0;		// list of single shot timers
+static TQObjectList *sst_list = nullptr;		// list of single shot timers
 
 static void sst_cleanup()
 {
     if ( sst_list ) {
 	sst_list->setAutoDelete( true );
 	delete sst_list;
-	sst_list = 0;
+	sst_list = nullptr;
     }
 }
 
@@ -287,7 +287,7 @@ bool TQSingleShotTimer::event( TQEvent * )
 {
     qKillTimer( timerId );			// no more timeouts
     signal.activate();				// emit the signal
-    signal.disconnect( 0, 0 );
+    signal.disconnect( nullptr, nullptr );
     timerId = 0;                                // mark as inactive
     return true;
 }
diff --git a/src/kernel/tqtimer.h b/src/kernel/tqtimer.h
index 461a2e486..64b573e36 100644
--- a/src/kernel/tqtimer.h
+++ b/src/kernel/tqtimer.h
@@ -50,7 +50,7 @@ class TQ_EXPORT TQTimer : public TQObject
 {
     TQ_OBJECT
 public:
-    TQTimer( TQObject *parent=0, const char *name=0 );
+    TQTimer( TQObject *parent=nullptr, const char *name=nullptr );
    ~TQTimer();
 
     bool	isActive() const;
diff --git a/src/kernel/tqtranslator.cpp b/src/kernel/tqtranslator.cpp
index 2cfaa1a06..0749c866d 100644
--- a/src/kernel/tqtranslator.cpp
+++ b/src/kernel/tqtranslator.cpp
@@ -102,7 +102,7 @@ static const uchar magic[MagicLength] = {
 static bool match( const char* found, const char* target )
 {
     // 0 means anything, "" means empty
-    return found == 0 || qstrcmp( found, target ) == 0;
+    return !found || qstrcmp( found, target ) == 0;
 }
 
 #if defined(Q_C_CALLBACKS)
@@ -189,10 +189,10 @@ public:
     enum { Contexts = 0x2f, Hashes = 0x42, Messages = 0x69 };
 
     TQTranslatorPrivate() :
-	unmapPointer( 0 ), unmapLength( 0 ),
-	messageArray( 0 ), offsetArray( 0 ), contextArray( 0 )
+	unmapPointer( nullptr ), unmapLength( 0 ),
+	messageArray( nullptr ), offsetArray( nullptr ), contextArray( nullptr )
 #ifndef TQT_NO_TRANSLATION_BUILDER
-	, messages( 0 )
+	, messages( nullptr )
 #endif
     { }
     // TQTranslator must finalize this before deallocating it
@@ -501,7 +501,7 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory,
 	return false;
     }
     char * tmp;
-    tmp = (char*)mmap( 0, st.st_size, // any address, whole file
+    tmp = (char*)mmap( nullptr, st.st_size, // any address, whole file
 		       PROT_READ, // read-only memory
 		       MAP_FILE | MAP_PRIVATE, // swap-backed map from file
 		       f, 0 ); // from offset 0 of f
@@ -623,19 +623,19 @@ bool TQTranslator::save( const TQString & filename, SaveMode mode )
 	s.writeRawBytes( (const char *)magic, MagicLength );
 	TQ_UINT8 tag;
 
-	if ( d->offsetArray != 0 ) {
+	if ( d->offsetArray ) {
 	    tag = (TQ_UINT8) TQTranslatorPrivate::Hashes;
 	    TQ_UINT32 oas = (TQ_UINT32) d->offsetArray->size();
 	    s << tag << oas;
 	    s.writeRawBytes( d->offsetArray->data(), oas );
 	}
-	if ( d->messageArray != 0 ) {
+	if ( d->messageArray ) {
 	    tag = (TQ_UINT8) TQTranslatorPrivate::Messages;
 	    TQ_UINT32 mas = (TQ_UINT32) d->messageArray->size();
 	    s << tag << mas;
 	    s.writeRawBytes( d->messageArray->data(), mas );
 	}
-	if ( d->contextArray != 0 ) {
+	if ( d->contextArray ) {
 	    tag = (TQ_UINT8) TQTranslatorPrivate::Contexts;
 	    TQ_UINT32 cas = (TQ_UINT32) d->contextArray->size();
 	    s << tag << cas;
@@ -662,7 +662,7 @@ void TQTranslator::clear()
 #else
 	delete [] d->unmapPointer;
 #endif
-	d->unmapPointer = 0;
+	d->unmapPointer = nullptr;
 	d->unmapLength = 0;
     }
 
@@ -670,23 +670,23 @@ void TQTranslator::clear()
 	d->messageArray->resetRawData( d->messageArray->data(),
 				       d->messageArray->size() );
 	delete d->messageArray;
-	d->messageArray = 0;
+	d->messageArray = nullptr;
     }
     if ( d->offsetArray ) {
 	d->offsetArray->resetRawData( d->offsetArray->data(),
 				      d->offsetArray->size() );
 	delete d->offsetArray;
-	d->offsetArray = 0;
+	d->offsetArray = nullptr;
     }
     if ( d->contextArray ) {
 	d->contextArray->resetRawData( d->contextArray->data(),
 				       d->contextArray->size() );
 	delete d->contextArray;
-	d->contextArray = 0;
+	d->contextArray = nullptr;
     }
 #ifndef TQT_NO_TRANSLATION_BUILDER
     delete d->messages;
-    d->messages = 0;
+    d->messages = nullptr;
 #endif
 
     if ( tqApp ) {
@@ -695,7 +695,7 @@ void TQTranslator::clear()
 	TQWidgetList *list = TQApplication::topLevelWidgets();
 	TQWidgetListIt it( *list );
 	TQWidget *w;
-	while ( ( w=it.current() ) != 0 ) {
+	while ( ( w=it.current() ) ) {
 	    ++it;
 	    if (!w->isDesktop())
 		tqApp->postEvent( w, new TQEvent( TQEvent::LanguageChange ) );
@@ -727,7 +727,7 @@ void TQTranslator::squeeze( SaveMode mode )
 
     TQMap<TQTranslatorMessage, void *> * messages = d->messages;
 
-    d->messages = 0;
+    d->messages = nullptr;
     clear();
 
     d->messageArray = new TQByteArray;
@@ -779,7 +779,7 @@ void TQTranslator::squeeze( SaveMode mode )
 
 	TQIntDict<char> hDict( hTableSize );
 	TQAsciiDictIterator<int> c = contextSet;
-	while ( c.current() != 0 ) {
+	while ( c.current() ) {
 	    hDict.insert( (long) (elfHash(c.currentKey()) % hTableSize),
 			  c.currentKey() );
 	    ++c;
@@ -820,7 +820,7 @@ void TQTranslator::squeeze( SaveMode mode )
 
 	for ( int i = 0; i < hTableSize; i++ ) {
 	    const char *con = hDict.find( i );
-	    if ( con == 0 ) {
+	    if ( !con ) {
 		hTable[i] = 0;
 	    } else {
 		hTable[i] = (TQ_UINT16) ( upto >> 1 );
@@ -831,7 +831,7 @@ void TQTranslator::squeeze( SaveMode mode )
 		    t.writeRawBytes( con, len );
 		    upto += 1 + len;
 		    hDict.remove( i );
-		} while ( (con = hDict.find(i)) != 0 );
+		} while ( (con = hDict.find(i)) );
 		do {
 		    t << (TQ_UINT8) 0; // empty string (at least one)
 		    upto++;
@@ -846,7 +846,7 @@ void TQTranslator::squeeze( SaveMode mode )
 	if ( upto > 131072 ) {
 	    tqWarning( "TQTranslator::squeeze: Too many contexts" );
 	    delete d->contextArray;
-	    d->contextArray = 0;
+	    d->contextArray = nullptr;
 	}
     }
     delete messages;
@@ -965,11 +965,11 @@ TQTranslatorMessage TQTranslator::findMessage( const char* context,
 					     const char* sourceText,
 					     const char* comment ) const
 {
-    if ( context == 0 )
+    if ( !context )
 	context = "";
-    if ( sourceText == 0 )
+    if ( !sourceText )
 	sourceText = "";
-    if ( comment == 0 )
+    if ( !comment )
 	comment = "";
 
 #ifndef TQT_NO_TRANSLATION_BUILDER
@@ -1037,7 +1037,7 @@ TQTranslatorMessage TQTranslator::findMessage( const char* context,
 				    2 * sizeof(TQ_UINT32),
 				    systemBigEndian ? cmp_uint32_big
 				    : cmp_uint32_little );
-	if ( r != 0 ) {
+	if ( r ) {
 	    // go back on equal key
 	    while ( r != d->offsetArray->data() &&
 		    cmp_uint32_big(r - 8, r) == 0 )
@@ -1111,7 +1111,7 @@ TQValueList<TQTranslatorMessage> TQTranslator::messages() const
     ((TQTranslator *) this)->unsqueeze();
     TQValueList<TQTranslatorMessage> result = d->messages->keys();
     delete d->messages;
-    d->messages = 0;
+    d->messages = nullptr;
     return result;
 }
 
@@ -1221,7 +1221,7 @@ TQTranslatorMessage::TQTranslatorMessage( TQDataStream & stream )
 	case Tag_Context:
 	    stream >> cx;
 	    if ( cx == "" ) // for compatibility
-		cx = 0;
+		cx = nullptr;
 	    break;
 	case Tag_Comment:
 	    stream >> cm;
@@ -1231,9 +1231,9 @@ TQTranslatorMessage::TQTranslatorMessage( TQDataStream & stream )
 	    break;
 	default:
 	    h = 0;
-	    st = 0;
-	    cx = 0;
-	    cm = 0;
+	    st = nullptr;
+	    cx = nullptr;
+	    cm = nullptr;
 	    tn = TQString::null;
 	    return;
 	}
diff --git a/src/kernel/tqtranslator.h b/src/kernel/tqtranslator.h
index 634b37dd5..adef69350 100644
--- a/src/kernel/tqtranslator.h
+++ b/src/kernel/tqtranslator.h
@@ -106,16 +106,16 @@ class TQ_EXPORT TQTranslator: public TQObject
 {
     TQ_OBJECT
 public:
-    TQTranslator( TQObject * parent = 0, const char * name = 0 );
+    TQTranslator( TQObject * parent = nullptr, const char * name = nullptr );
     ~TQTranslator();
 
 #ifndef TQT_NO_COMPAT
-    TQString find( const char *context, const char *sourceText, const char * comment = 0 ) const {
+    TQString find( const char *context, const char *sourceText, const char * comment = nullptr ) const {
 	return findMessage( context, sourceText, comment ).translation();
     }
 #endif
     virtual TQTranslatorMessage findMessage( const char *, const char *,
-					    const char * = 0 ) const;
+					    const char * = nullptr ) const;
 
     bool load( const TQString & filename,
 	       const TQString & directory = TQString::null,
@@ -141,7 +141,7 @@ public:
     void remove( const char *context, const char *sourceText ) {
 	remove( TQTranslatorMessage(context, sourceText, "") );
     }
-    bool contains( const char *, const char *, const char * comment = 0 ) const;
+    bool contains( const char *, const char *, const char * comment = nullptr ) const;
 
     void squeeze( SaveMode = Everything );
     void unsqueeze();
diff --git a/src/kernel/tqucomextra.cpp b/src/kernel/tqucomextra.cpp
index b92552fd7..3b6300baf 100644
--- a/src/kernel/tqucomextra.cpp
+++ b/src/kernel/tqucomextra.cpp
@@ -79,7 +79,7 @@ bool TQUType_TQVariant::canConvertTo( TQUObject * /*o*/, TQUType * /*t*/ )
 
 bool TQUType_TQVariant::convertFrom( TQUObject *o, TQUType *t )
 {
-    TQVariant *var = 0;
+    TQVariant *var = nullptr;
     if ( isEqual( o->type, &static_QUType_TQString ) )
 	var = new TQVariant( static_QUType_TQString.get( o ) );
     else if ( isEqual( o->type, &static_QUType_int ) )
@@ -107,7 +107,7 @@ bool TQUType_TQVariant::convertTo( TQUObject * /*o*/, TQUType * /*t*/ )
 void TQUType_TQVariant::clear( TQUObject *o )
 {
     delete (TQVariant*)o->payload.ptr;
-    o->payload.ptr = 0;
+    o->payload.ptr = nullptr;
 }
 
 int TQUType_TQVariant::serializeTo( TQUObject *, TQUBuffer * )
diff --git a/src/kernel/tqurl.cpp b/src/kernel/tqurl.cpp
index ae5d7c992..c7283f389 100644
--- a/src/kernel/tqurl.cpp
+++ b/src/kernel/tqurl.cpp
@@ -323,7 +323,7 @@ TQUrl::TQUrl( const TQUrl& url, const TQString& relUrl, bool checkSlash )
 TQUrl::~TQUrl()
 {
     delete d;
-    d = 0;
+    d = nullptr;
 }
 
 /*!
diff --git a/src/kernel/tqurlinfo.cpp b/src/kernel/tqurlinfo.cpp
index 4beca83bf..0101fb790 100644
--- a/src/kernel/tqurlinfo.cpp
+++ b/src/kernel/tqurlinfo.cpp
@@ -125,7 +125,7 @@ public:
 
 TQUrlInfo::TQUrlInfo()
 {
-    d = 0;
+    d = nullptr;
 }
 
 /*!
@@ -155,7 +155,7 @@ TQUrlInfo::TQUrlInfo( const TQUrlOperator &path, const TQString &file )
 	d = new TQUrlInfoPrivate;
 	*d = *inf.d;
     } else {
-	d = 0;
+	d = nullptr;
     }
 }
 
@@ -169,7 +169,7 @@ TQUrlInfo::TQUrlInfo( const TQUrlInfo &ui )
 	d = new TQUrlInfoPrivate;
 	*d = *ui.d;
     } else {
-	d = 0;
+	d = nullptr;
     }
 }
 
@@ -460,7 +460,7 @@ TQUrlInfo &TQUrlInfo::operator=( const TQUrlInfo &ui )
 	*d = *ui.d;
     } else {
 	delete d;
-	d = 0;
+	d = nullptr;
     }
     return *this;
 }
@@ -702,7 +702,7 @@ bool TQUrlInfo::equal( const TQUrlInfo &i1, const TQUrlInfo &i2,
 bool TQUrlInfo::operator==( const TQUrlInfo &i ) const
 {
     if ( !d )
-	return i.d == 0;
+	return !i.d;
     if ( !i.d )
 	return false;
 
@@ -733,7 +733,7 @@ bool TQUrlInfo::operator==( const TQUrlInfo &i ) const
 */
 bool TQUrlInfo::isValid() const
 {
-    return d != 0;
+    return d;
 }
 
 #endif // TQT_NO_NETWORKPROTOCOL
diff --git a/src/kernel/tqurloperator.cpp b/src/kernel/tqurloperator.cpp
index 2cb656aa2..0ef918df8 100644
--- a/src/kernel/tqurloperator.cpp
+++ b/src/kernel/tqurloperator.cpp
@@ -57,9 +57,9 @@ public:
     TQUrlOperatorPrivate()
     {
 	oldOps.setAutoDelete( false );
-	networkProtocol = 0;
+	networkProtocol = nullptr;
 	nameFilter = "*";
-	currPut = 0;
+	currPut = nullptr;
     }
 
     ~TQUrlOperatorPrivate()
@@ -328,10 +328,10 @@ TQUrlOperator::TQUrlOperator( const TQUrlOperator& url )
     d = new TQUrlOperatorPrivate;
     *d = *url.d;
 
-    d->networkProtocol = 0;
+    d->networkProtocol = nullptr;
     getNetworkProtocol();
     d->nameFilter = "*";
-    d->currPut = 0;
+    d->currPut = nullptr;
 }
 
 /*!
@@ -351,9 +351,9 @@ TQUrlOperator::TQUrlOperator( const TQUrlOperator& url, const TQString& relUrl,
     if ( relUrl == "." )
 	*d = *url.d;
 
-    d->networkProtocol = 0;
+    d->networkProtocol = nullptr;
     getNetworkProtocol();
-    d->currPut = 0;
+    d->currPut = nullptr;
 }
 
 /*!
@@ -421,7 +421,7 @@ const TQNetworkOperation *TQUrlOperator::startOperation( TQNetworkOperation *op
     op->setErrorCode( (int)TQNetworkProtocol::ErrUnsupported );
     emit finished( op );
     deleteOperation( op );
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -447,7 +447,7 @@ const TQNetworkOperation *TQUrlOperator::startOperation( TQNetworkOperation *op
 const TQNetworkOperation *TQUrlOperator::listChildren()
 {
     if ( !checkValid() )
-	return 0;
+	return nullptr;
 
     TQNetworkOperation *res = new TQNetworkOperation( TQNetworkProtocol::OpListChildren, TQString::null, TQString::null, TQString::null );
     return startOperation( res );
@@ -476,7 +476,7 @@ const TQNetworkOperation *TQUrlOperator::listChildren()
 const TQNetworkOperation *TQUrlOperator::mkdir( const TQString &dirname )
 {
     if ( !checkValid() )
-	return 0;
+	return nullptr;
 
     TQNetworkOperation *res = new TQNetworkOperation( TQNetworkProtocol::OpMkDir, dirname, TQString::null, TQString::null );
     return startOperation( res );
@@ -504,7 +504,7 @@ const TQNetworkOperation *TQUrlOperator::mkdir( const TQString &dirname )
 const TQNetworkOperation *TQUrlOperator::remove( const TQString &filename )
 {
     if ( !checkValid() )
-	return 0;
+	return nullptr;
 
     TQNetworkOperation *res = new TQNetworkOperation( TQNetworkProtocol::OpRemove, filename, TQString::null, TQString::null );
     return startOperation( res );
@@ -532,7 +532,7 @@ const TQNetworkOperation *TQUrlOperator::remove( const TQString &filename )
 const TQNetworkOperation *TQUrlOperator::rename( const TQString &oldname, const TQString &newname )
 {
     if ( !checkValid() )
-	return 0;
+	return nullptr;
 
     TQNetworkOperation *res = new TQNetworkOperation( TQNetworkProtocol::OpRename, oldname, newname, TQString::null );
     return startOperation( res );
@@ -781,7 +781,7 @@ const TQNetworkOperation *TQUrlOperator::get( const TQString &location )
 	u = TQUrl( *this, location );
 
     if ( !u.isValid() )
-	return 0;
+	return nullptr;
 
     if ( !d->networkProtocol ) {
 	setProtocol( u.protocol() );
@@ -838,7 +838,7 @@ const TQNetworkOperation *TQUrlOperator::put( const TQByteArray &data, const TQS
 	u = TQUrl( *this, location );
 
     if ( !u.isValid() )
-	return 0;
+	return nullptr;
 
     if ( !d->networkProtocol ) {
 	setProtocol( u.protocol() );
@@ -929,7 +929,7 @@ void TQUrlOperator::getNetworkProtocol()
     delete d->networkProtocol;
     TQNetworkProtocol *p = TQNetworkProtocol::getNetworkProtocol( protocol() );
     if ( !p ) {
-	d->networkProtocol = 0;
+	d->networkProtocol = nullptr;
 	return;
     }
 
@@ -947,7 +947,7 @@ void TQUrlOperator::deleteNetworkProtocol()
 {
     if (d->networkProtocol) {
         d->networkProtocol->deleteLater();
-        d->networkProtocol = 0;
+        d->networkProtocol = nullptr;
     }
 }
 
@@ -1011,7 +1011,7 @@ TQUrlOperator& TQUrlOperator::operator=( const TQUrlOperator &url )
     d->getOpGetProtMap = getOpGetProtMap;
     d->getOpRemoveOpMap = getOpRemoveOpMap;
 
-    d->networkProtocol = 0;
+    d->networkProtocol = nullptr;
     getNetworkProtocol();
     return *this;
 }
@@ -1168,7 +1168,7 @@ void TQUrlOperator::stop()
     if ( d->currPut ) {
 	d->currPut->stop();
 	delete (TQNetworkProtocol *) d->currPut;
-	d->currPut = 0;
+	d->currPut = nullptr;
     }
     d->waitingCopies.clear();
     if ( d->networkProtocol )
diff --git a/src/kernel/tqurloperator.h b/src/kernel/tqurloperator.h
index 0099885fb..a045d6293 100644
--- a/src/kernel/tqurloperator.h
+++ b/src/kernel/tqurloperator.h
@@ -78,7 +78,7 @@ public:
     virtual const TQNetworkOperation *put( const TQByteArray &data, const TQString &location = TQString::null  );
     virtual TQPtrList<TQNetworkOperation> copy( const TQString &from, const TQString &to, bool move = false, bool toPath = true );
     virtual void copy( const TQStringList &files, const TQString &dest, bool move = false );
-    virtual bool isDir( bool *ok = 0 );
+    virtual bool isDir( bool *ok = nullptr );
 
     virtual void setNameFilter( const TQString &nameFilter );
     TQString nameFilter() const;
diff --git a/src/kernel/tqvariant.cpp b/src/kernel/tqvariant.cpp
index af0e3183b..b311deeeb 100644
--- a/src/kernel/tqvariant.cpp
+++ b/src/kernel/tqvariant.cpp
@@ -556,7 +556,7 @@ TQVariant::TQVariant( const TQCString& val )
 TQVariant::TQVariant( const char* val )
 {
     d = new Private;
-    if ( val == 0 )
+    if ( !val )
 	return;
     d->typ = CString;
     d->value.ptr = new TQCString( val );
@@ -992,7 +992,7 @@ void TQVariant::clear()
 static const int ntypes = 35;
 static const char* const type_map[ntypes] =
 {
-    0,
+    nullptr,
     "TQMap<TQString,TQVariant>",
     "TQValueList<TQVariant>",
     "TQString",
@@ -1037,7 +1037,7 @@ static const char* const type_map[ntypes] =
 const char* TQVariant::typeToName( Type typ )
 {
     if ( typ >= ntypes )
-	return 0;
+	return nullptr;
     return type_map[typ];
 }
 
diff --git a/src/kernel/tqvariant.h b/src/kernel/tqvariant.h
index ad753a8c8..fbe14f72e 100644
--- a/src/kernel/tqvariant.h
+++ b/src/kernel/tqvariant.h
@@ -222,12 +222,12 @@ public:
     const TQKeySequence toKeySequence() const;
 #endif
     const TQPen toPen() const;
-    int toInt( bool * ok=0 ) const;
-    uint toUInt( bool * ok=0 ) const;
-    TQ_LLONG toLongLong( bool * ok=0 ) const;
-    TQ_ULLONG toULongLong( bool * ok=0 ) const;
+    int toInt( bool * ok=nullptr ) const;
+    uint toUInt( bool * ok=nullptr ) const;
+    TQ_LLONG toLongLong( bool * ok=nullptr ) const;
+    TQ_ULLONG toULongLong( bool * ok=nullptr ) const;
     bool toBool() const;
-    double toDouble( bool * ok=0 ) const;
+    double toDouble( bool * ok=nullptr ) const;
 #ifndef TQT_NO_TEMPLATE_VARIANT
     const TQValueList<TQVariant> toList() const;
     const TQMap<TQString,TQVariant> toMap() const;
@@ -320,7 +320,7 @@ private:
     Private* d;
 
 public:
-    void* rawAccess( void* ptr = 0, Type typ = Invalid, bool deepCopy = false );
+    void* rawAccess( void* ptr = nullptr, Type typ = Invalid, bool deepCopy = false );
 };
 
 inline TQVariant::Type TQVariant::type() const
diff --git a/src/kernel/tqwidget.cpp b/src/kernel/tqwidget.cpp
index 683ab14f5..6ab285584 100644
--- a/src/kernel/tqwidget.cpp
+++ b/src/kernel/tqwidget.cpp
@@ -471,13 +471,13 @@ private:
     TQWidget *cur_widget;
 };
 
-TQWidgetMapper *TQWidget::mapper = 0;		// app global widget mapper
+TQWidgetMapper *TQWidget::mapper = nullptr;		// app global widget mapper
 
 
 TQWidgetMapper::TQWidgetMapper() : TQWidgetIntDict(WDictSize)
 {
     cur_id = 0;
-    cur_widget = 0;
+    cur_widget = nullptr;
 }
 
 TQWidgetMapper::~TQWidgetMapper()
@@ -506,7 +506,7 @@ inline bool TQWidgetMapper::remove( WId id )
 {
     if ( cur_id == id ) {			// reset current widget
 	cur_id = 0;
-	cur_widget = 0;
+	cur_widget = nullptr;
     }
     return TQWidgetIntDict::remove((long)id);
 }
@@ -906,9 +906,9 @@ TQWidget::TQWidget( TQWidget *parent, const char *name, WFlags f, NFlags n )
     is_closing = 0;
     im_enabled = false;
 #ifndef TQT_NO_LAYOUT
-    lay_out = 0;
+    lay_out = nullptr;
 #endif
-    extra = 0;					// no extra widget info
+    extra = nullptr;					// no extra widget info
 #ifndef TQT_NO_PALETTE
     bg_col = pal.active().background();		// default background color
 #endif
@@ -977,7 +977,7 @@ TQWidget::~TQWidget()
     --instanceCounter;
 
     if ( TQApplication::main_widget == this ) {	// reset main widget
-	TQApplication::main_widget = 0;
+	TQApplication::main_widget = nullptr;
 	if (tqApp)
 	    tqApp->quit();
     }
@@ -994,12 +994,12 @@ TQWidget::~TQWidget()
 	TQObject *obj;
 	while ( (obj=it.current()) ) {
 	    ++it;
-	    obj->parentObj = 0;
+	    obj->parentObj = nullptr;
 	    childObjects->removeRef( obj );
 	    delete obj;
 	}
 	delete childObjects;
-	childObjects = 0;
+	childObjects = nullptr;
     }
 
     if ( tqApp )
@@ -1040,7 +1040,7 @@ void TQWidget::destroyMapper()
 	return;
     TQWidgetIntDictIt it( *((TQWidgetIntDict*)mapper) );
     TQWidgetMapper * myMapper = mapper;
-    mapper = 0;
+    mapper = nullptr;
     TQWidget *w;
     while ( (w=it.current()) ) {		// remove parents widgets
 	++it;
@@ -1140,9 +1140,9 @@ void TQWidget::createTLExtra()
 	x->opacity = 255;
 #endif
 #ifndef TQT_NO_WIDGET_TOPEXTRA
-	x->icon = 0;
+	x->icon = nullptr;
 #endif
-	x->focusData = 0;
+	x->focusData = nullptr;
 	x->fleft = x->fright = x->ftop = x->fbottom = 0;
 	x->incw = x->inch = 0;
 	x->basew = x->baseh = 0;
@@ -1172,17 +1172,17 @@ void TQWidget::createExtra()
 	TQ_CHECK_PTR( extra );
 	extra->minw = extra->minh = 0;
 	extra->maxw = extra->maxh = TQWIDGETSIZE_MAX;
-	extra->bg_pix = 0;
-	extra->focus_proxy = 0;
+	extra->bg_pix = nullptr;
+	extra->focus_proxy = nullptr;
 #ifndef TQT_NO_CURSOR
-	extra->curs = 0;
+	extra->curs = nullptr;
 #endif
-	extra->topextra = 0;
+	extra->topextra = nullptr;
 	extra->bg_mode = PaletteBackground;
 	extra->bg_mode_visual = PaletteBackground;
 	extra->bg_origin = WidgetOrigin;
 #ifndef TQT_NO_STYLE
-	extra->style = 0;
+	extra->style = nullptr;
 #endif
 	extra->size_policy = TQSizePolicy( TQSizePolicy::Preferred,
 					  TQSizePolicy::Preferred );
@@ -1218,7 +1218,7 @@ void TQWidget::deleteExtra()
 	}
 	delete extra;
 	// extra->xic destroyed in TQWidget::destroy()
-	extra = 0;
+	extra = nullptr;
     }
 }
 
@@ -1234,7 +1234,7 @@ void TQWidget::deactivateWidgetCleanup()
 {
     // If this was the active application window, reset it
     if ( this == TQApplication::active_window )
-	tqApp->setActiveWindow( 0 );
+	tqApp->setActiveWindow( nullptr );
     // If the is the active mouse press widget, reset it
 #ifdef TQ_WS_MAC
     extern TQGuardedPtr<TQWidget> tqt_button_down;
@@ -1242,7 +1242,7 @@ void TQWidget::deactivateWidgetCleanup()
     extern TQWidget *tqt_button_down;
 #endif
     if ( this == (TQWidget *)tqt_button_down )
-	tqt_button_down = 0;
+	tqt_button_down = nullptr;
 }
 
 
@@ -1257,7 +1257,7 @@ void TQWidget::deactivateWidgetCleanup()
 
 TQWidget *TQWidget::find( WId id )
 {
-    return mapper ? mapper->find( id ) : 0;
+    return mapper ? mapper->find( id ) : nullptr;
 }
 
 /*!
@@ -1727,7 +1727,7 @@ void TQWidget::setEnabled( bool enable )
 	    if ( children() ) {
 		TQObjectListIt it( *children() );
 		TQWidget *w;
-		while( (w = (TQWidget *)it.current()) != 0 ) {
+		while( (w = (TQWidget *)it.current()) ) {
 		    ++it;
 		    if ( w->isWidgetType() &&
 			 !w->testWState( WState_ForceDisabled ) )
@@ -1748,7 +1748,7 @@ void TQWidget::setEnabled( bool enable )
 	    if ( children() ) {
 		TQObjectListIt it( *children() );
 		TQWidget *w;
-		while( (w = (TQWidget *)it.current()) != 0 ) {
+		while( (w = (TQWidget *)it.current()) ) {
 		    ++it;
 		    if ( w->isWidgetType() && w->isEnabled() ) {
 			w->setEnabled( false );
@@ -2209,7 +2209,7 @@ TQSize TQWidget::sizeIncrement() const
 
 TQSize TQWidget::baseSize() const
 {
-    return ( extra != 0 && extra->topextra != 0 )
+    return ( extra && extra->topextra )
 	? TQSize( extra->topextra->basew, extra->topextra->baseh )
 	: TQSize( 0, 0 );
 }
@@ -2467,7 +2467,7 @@ void TQWidget::setEraseColor( const TQColor & color )
 */
 const TQPixmap *TQWidget::erasePixmap() const
 {
-    return ( extra && extra->bg_pix ) ? extra->bg_pix : 0;
+    return ( extra && extra->bg_pix ) ? extra->bg_pix : nullptr;
 }
 
 /*!
@@ -2918,7 +2918,7 @@ void TQWidget::setPalette( const TQPalette &palette )
 	TQEvent e( TQEvent::ParentPaletteChange );
 	TQObjectListIt it( *children() );
 	TQWidget *w;
-	while( (w=(TQWidget *)it.current()) != 0 ) {
+	while( (w=(TQWidget *)it.current()) ) {
 	    ++it;
 	    if ( w->isWidgetType() )
 		TQApplication::sendEvent( w, &e );
@@ -2998,7 +2998,7 @@ void TQWidget::setFont( const TQFont &font )
 	TQEvent e( TQEvent::ParentFontChange );
 	TQObjectListIt it( *children() );
 	TQWidget *w;
-	while( (w=(TQWidget *)it.current()) != 0 ) {
+	while( (w=(TQWidget *)it.current()) ) {
 	    ++it;
 	    if ( w->isWidgetType() )
 		TQApplication::sendEvent( w, &e );
@@ -3125,7 +3125,7 @@ TQString TQWidget::caption() const
 */
 const TQPixmap *TQWidget::icon() const
 {
-    return ( extra && extra->topextra ) ? extra->topextra->icon : 0;
+    return ( extra && extra->topextra ) ? extra->topextra->icon : nullptr;
 }
 
 /*!
@@ -3195,7 +3195,7 @@ void TQWidget::setFocusProxy( TQWidget * w )
     if ( extra->focus_proxy ) {
 	disconnect( extra->focus_proxy, TQ_SIGNAL(destroyed()),
 		    this, TQ_SLOT(focusProxyDestroyed()) );
-	extra->focus_proxy = 0;
+	extra->focus_proxy = nullptr;
     }
 
     if ( w ) {
@@ -3215,7 +3215,7 @@ void TQWidget::setFocusProxy( TQWidget * w )
 
 TQWidget * TQWidget::focusProxy() const
 {
-    return extra ? extra->focus_proxy : 0;
+    return extra ? extra->focus_proxy : nullptr;
 }
 
 
@@ -3230,7 +3230,7 @@ TQWidget * TQWidget::focusProxy() const
 void TQWidget::focusProxyDestroyed()
 {
     if ( extra )
-	extra->focus_proxy = 0;
+	extra->focus_proxy = nullptr;
     setFocusPolicy( NoFocus );
 }
 
@@ -3389,7 +3389,7 @@ void TQWidget::clearFocus()
 #endif
 	TQWidget* w = tqApp->focusWidget();
 	// clear active focus
-	tqApp->focus_widget = 0;
+	tqApp->focus_widget = nullptr;
 	TQFocusEvent out( TQEvent::FocusOut );
 	TQApplication::sendEvent( w, &out );
 #if defined(TQ_WS_WIN)
@@ -3444,7 +3444,7 @@ bool TQWidget::focusNextPrevChild( bool next )
     TQFocusData *f = focusData( true );
 
     TQWidget *startingPoint = f->it.current();
-    TQWidget *candidate = 0;
+    TQWidget *candidate = nullptr;
     TQWidget *w = next ? f->focusWidgets.last() : f->focusWidgets.first();
     extern bool tqt_tab_all_widgets;
     uint focus_flag = tqt_tab_all_widgets ? TabFocus : StrongFocus;
@@ -3473,9 +3473,9 @@ TQWidget *TQWidget::focusWidget() const
 {
     TQWidget *that = (TQWidget *)this;		// mutable
     TQFocusData *f = that->focusData( false );
-    if ( f && f->focusWidgets.count() && f->it.current() == 0 )
+    if ( f && f->focusWidgets.count() && !f->it.current() )
 	f->it.toFirst();
-    return ( f && f->it.current() ) ? f->it.current() : 0;
+    return ( f && f->it.current() ) ? f->it.current() : nullptr;
 }
 
 
@@ -3507,7 +3507,7 @@ TQFocusData * TQWidget::focusData( bool create )
     TQWExtra * ed = tlw->extraData();
     if ( !ed || !ed->topextra ) {
 	if ( !create )
-	    return 0;
+	    return nullptr;
 	tlw->createTLExtra();
 	ed = tlw->extraData();
     }
@@ -3721,7 +3721,7 @@ void TQWidget::reparentFocusWidgets( TQWidget * oldtlw )
     if ( oldtlw == topLevelWidget() )
 	return; // nothing to do
 
-    TQFocusData * from = oldtlw ? oldtlw->topData()->focusData : 0;
+    TQFocusData * from = oldtlw ? oldtlw->topData()->focusData : nullptr;
     TQFocusData * to;
     to = focusData();
 
@@ -3752,7 +3752,7 @@ void TQWidget::reparentFocusWidgets( TQWidget * oldtlw )
 	// this widget is no longer a top-level widget, so get rid
 	// of old focus data
 	delete extra->topextra->focusData;
-	extra->topextra->focusData = 0;
+	extra->topextra->focusData = nullptr;
     }
 }
 
@@ -4040,7 +4040,7 @@ void TQWidget::show()
 
     // Required for Mac, not sure whether we should always do that
     if( isTopLevel() )
-	TQApplication::sendPostedEvents(0, TQEvent::LayoutHint);
+	TQApplication::sendPostedEvents(nullptr, TQEvent::LayoutHint);
 
     // On Windows, show the popup now so that our own focus handling
     // stores the correct old focus widget even if it's stolen in the showevent
@@ -4233,17 +4233,17 @@ void TQWidget::polish()
 	const TQPixmap *pm = icon();
 	if ( !pm || pm->isNull() ) {
 	    TQWidget *mw = (TQWidget *)parent();
-	    pm = mw ? mw->icon() : 0;
+	    pm = mw ? mw->icon() : nullptr;
 	    if ( pm && !pm->isNull() )
 		setIcon( *pm );
 	    else {
-		mw = mw ? mw->topLevelWidget() : 0;
-		pm = mw ? mw->icon() : 0;
+		mw = mw ? mw->topLevelWidget() : nullptr;
+		pm = mw ? mw->icon() : nullptr;
 		if ( pm && !pm->isNull() )
 		    setIcon( *pm );
 		else {
-		    mw = tqApp ? tqApp->mainWidget() : 0;
-		    pm = mw ? mw->icon() : 0;
+		    mw = tqApp ? tqApp->mainWidget() : nullptr;
+		    pm = mw ? mw->icon() : nullptr;
 		    if ( pm && !pm->isNull() )
 			setIcon( *pm );
 		}
@@ -4339,7 +4339,7 @@ bool TQWidget::close( bool alsoDelete )
 	    widget = list->next();
 	}
 	delete list;
-	if ( widget == 0 )
+	if ( !widget )
 	    emit tqApp->lastWindowClosed();
     }
     if ( isMain )
@@ -4521,8 +4521,8 @@ TQRegion TQWidget::clipRegion() const
 
 void TQWidget::adjustSize()
 {
-    TQApplication::sendPostedEvents( 0, TQEvent::ChildInserted );
-    TQApplication::sendPostedEvents( 0, TQEvent::LayoutHint );
+    TQApplication::sendPostedEvents( nullptr, TQEvent::ChildInserted );
+    TQApplication::sendPostedEvents( nullptr, TQEvent::LayoutHint );
     if ( !testWState(WState_Polished) )
 	polish();
     TQSize s = sizeHint();
@@ -4918,7 +4918,7 @@ bool TQWidget::event( TQEvent *e )
 	    if ( children() ) {
 		TQObjectListIt it( *children() );
 		TQObject *o;
-		while( ( o = it.current() ) != 0 ) {
+		while( ( o = it.current() ) ) {
 		    ++it;
 		    if ( o->isWidgetType() &&
 			 ((TQWidget*)o)->isVisible() &&
@@ -4933,7 +4933,7 @@ bool TQWidget::event( TQEvent *e )
 	    if ( children() ) {
 		TQObjectListIt it( *children() );
 		TQObject *o;
-		while( ( o = it.current() ) != 0 ) {
+		while( ( o = it.current() ) ) {
 		    ++it;
 		    TQApplication::sendEvent( o, e );
 		}
@@ -4941,7 +4941,7 @@ bool TQWidget::event( TQEvent *e )
 	    if ( e->type() == TQEvent::LanguageChange ) {
 		int index = metaObject()->findSlot( "languageChange()", true );
 		if ( index >= 0 )
-		    tqt_invoke( index, 0 );
+		    tqt_invoke( index, nullptr );
 	    }
 	    update();
 	    break;
@@ -4950,10 +4950,10 @@ bool TQWidget::event( TQEvent *e )
 	    if ( layout() ) {
 		layout()->activate();
 	    } else {
-		TQObjectList* llist = queryList( "TQLayout", 0, true, true );
+		TQObjectList* llist = queryList( "TQLayout", nullptr, true, true );
 		TQObjectListIt lit( *llist );
 		TQLayout *lay;
-		while ( ( lay = (TQLayout*)lit.current() ) != 0 ) {
+		while ( ( lay = (TQLayout*)lit.current() ) ) {
 		    ++lit;
 		    lay->activate();
 		}
@@ -4984,7 +4984,7 @@ bool TQWidget::event( TQEvent *e )
 	if ( children() ) {
 	    TQObjectListIt it( *children() );
 	    TQObject *o;
-	    while( ( o = it.current() ) != 0 ) {
+	    while( ( o = it.current() ) ) {
 		++it;
                 TQWidget *w = ::tqt_cast<TQWidget*>(o);
                 if (w && !w->testWFlags(TQt::WShowModal))
@@ -5897,12 +5897,12 @@ bool TQWidget::customWhatsThis() const
 TQWidget  *TQWidget::childAt( int x, int y, bool includeThis ) const
 {
     if ( !rect().contains( x, y ) )
-	return 0;
+	return nullptr;
     if ( children() ) {
 	TQObjectListIt it( *children() );
 	it.toLast();
 	TQWidget *w, *t;
-	while( (w=(TQWidget *)it.current()) != 0 ) {
+	while( (w=(TQWidget *)it.current()) ) {
 	    --it;
 	    if ( w->isWidgetType() && !w->isTopLevel() && !w->isHidden() ) {
 		if ( ( t = w->childAt( x - w->x(), y - w->y(), true ) ) )
@@ -5912,7 +5912,7 @@ TQWidget  *TQWidget::childAt( int x, int y, bool includeThis ) const
     }
     if ( includeThis )
 	return (TQWidget*)this;
-    return 0;
+    return nullptr;
 }
 
 /*!
diff --git a/src/kernel/tqwidget.h b/src/kernel/tqwidget.h
index 933ac9313..bfe7ece3d 100644
--- a/src/kernel/tqwidget.h
+++ b/src/kernel/tqwidget.h
@@ -139,7 +139,7 @@ class TQ_EXPORT TQWidget : public TQObject, public TQPaintDevice
     TQ_PROPERTY( double windowOpacity READ windowOpacity WRITE setWindowOpacity DESIGNABLE false )
 
 public:
-    explicit TQWidget( TQWidget* parent=0, const char* name=0, WFlags f=0, NFlags n=0 );
+    explicit TQWidget( TQWidget* parent=nullptr, const char* name=nullptr, WFlags f=0, NFlags n=0 );
     ~TQWidget();
 
     WId		 winId() const;
@@ -579,7 +579,7 @@ protected:
     TQFocusData	*focusData();
 
     virtual void setKeyCompression(bool);
-    virtual void setMicroFocusHint(int x, int y, int w, int h, bool text=true, TQFont *f = 0);
+    virtual void setMicroFocusHint(int x, int y, int w, int h, bool text=true, TQFont *f = nullptr);
 
 #if defined(TQ_WS_MAC)
     void dirtyClippedRegion(bool);
@@ -595,7 +595,7 @@ private slots:
 #endif
 
 private:
-    void	 setFontSys( TQFont *f = 0 );
+    void	 setFontSys( TQFont *f = nullptr );
 #if defined(TQ_WS_X11)
     void	 createInputContext();
     void	 focusInputContext();
@@ -865,7 +865,7 @@ inline void TQWidget::drawText( const TQPoint &p, const TQString &s )
 inline TQWidget *TQWidget::parentWidget( bool sameWindow ) const
 {
     if ( sameWindow )
-	return isTopLevel() ? 0 : (TQWidget *)TQObject::parent();
+	return isTopLevel() ? nullptr : (TQWidget *)TQObject::parent();
     return (TQWidget *)TQObject::parent();
 }
 
diff --git a/src/kernel/tqwidget_x11.cpp b/src/kernel/tqwidget_x11.cpp
index 3806ecec4..7cf5140b0 100644
--- a/src/kernel/tqwidget_x11.cpp
+++ b/src/kernel/tqwidget_x11.cpp
@@ -82,8 +82,8 @@ extern void tqt_deferred_map_add( TQWidget* );
 extern void tqt_deferred_map_take( TQWidget* );
 extern bool tqt_deferred_map_contains(TQWidget *);
 
-static TQWidget *mouseGrb    = 0;
-static TQWidget *keyboardGrb = 0;
+static TQWidget *mouseGrb    = nullptr;
+static TQWidget *keyboardGrb = nullptr;
 
 // defined in tqapplication_x11.cpp
 extern Time tqt_x_time;
@@ -264,9 +264,9 @@ static void tqt_net_change_wm_state(const TQWidget* w, bool set, Atom one, Atom
     } else {
         Atom ret;
 	int format = 0, status;
-	unsigned char *data = 0;
+	unsigned char *data = nullptr;
 	unsigned long nitems = 0, after = 0;
-	Atom *old_states = 0;
+	Atom *old_states = nullptr;
 	status = XGetWindowProperty(w->x11Display(), w->winId(),
 				    tqt_net_wm_state, 0, 1024, False,
 				    XA_ATOM, &ret, &format, &nitems,
@@ -674,7 +674,7 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
 	class_hint.res_name = (char *) tqAppName(); // application name
 	class_hint.res_class = (char *) tqAppClass();	// application class
 
-       	XSetWMProperties( dpy, id, 0, 0, 0, 0, &size_hints, &wm_hints, &class_hint );
+       	XSetWMProperties( dpy, id, nullptr, nullptr, nullptr, 0, &size_hints, &wm_hints, &class_hint );
 
 	XResizeWindow( dpy, id, crect.width(), crect.height() );
 	XStoreName( dpy, id, tqAppName() );
@@ -1150,7 +1150,7 @@ void TQWidget::setBackgroundColorDirect( const TQColor &color )
     bg_col = color;
     if ( extra && extra->bg_pix ) {		// kill the background pixmap
 	delete extra->bg_pix;
-	extra->bg_pix = 0;
+	extra->bg_pix = nullptr;
     }
     XSetWindowBackground( x11Display(), winId(), bg_col.pixel(x11Screen()) );
 }
@@ -1167,7 +1167,7 @@ void TQWidget::setBackgroundPixmapDirect( const TQPixmap &pixmap )
 	XSetWindowBackground( x11Display(), winId(), bg_col.pixel(x11Screen()) );
 	if ( extra && extra->bg_pix ) {
 	    delete extra->bg_pix;
-	    extra->bg_pix = 0;
+	    extra->bg_pix = nullptr;
 	}
     } else {
 	TQPixmap pm = pixmap;
@@ -1229,7 +1229,7 @@ void TQWidget::unsetCursor()
 {
     if ( extra ) {
 	delete extra->curs;
-	extra->curs = 0;
+	extra->curs = nullptr;
     }
     if ( !isTopLevel() )
 	clearWState( WState_OwnCursor );
@@ -1240,13 +1240,13 @@ void TQWidget::unsetCursor()
 static XTextProperty*
 tqstring_to_xtp( const TQString& s )
 {
-    static XTextProperty tp = { 0, 0, 0, 0 };
+    static XTextProperty tp = { nullptr, 0, 0, 0 };
     static bool free_prop = true; // we can't free tp.value in case it references
     // the data of the static TQCString below.
     if ( tp.value ) {
 	if ( free_prop )
 	    XFree( tp.value );
-	tp.value = 0;
+	tp.value = nullptr;
 	free_prop = true;
     }
 
@@ -1256,7 +1256,7 @@ tqstring_to_xtp( const TQString& s )
 	TQCString mapped = mapper->fromUnicode(s);
 	char* tl[2];
 	tl[0] = mapped.data();
-	tl[1] = 0;
+	tl[1] = nullptr;
 	errCode = XmbTextListToTextProperty( TQPaintDevice::x11AppDisplay(),
 					     tl, 1, XStdICCTextStyle, &tp );
 #if defined(QT_DEBUG)
@@ -1307,7 +1307,7 @@ void TQWidget::setIcon( const TQPixmap &pixmap )
 {
     if ( extra && extra->topextra ) {
 	delete extra->topextra->icon;
-	extra->topextra->icon = 0;
+	extra->topextra->icon = nullptr;
     } else {
 	createTLExtra();
     }
@@ -1330,7 +1330,7 @@ void TQWidget::setIcon( const TQPixmap &pixmap )
 	    GC gc;
 	    pm->detach();
 	    TQt::HANDLE pmHandle = pm->handle();
-	    gc = XCreateGC(x11Display(), pmHandle, 0, 0);
+	    gc = XCreateGC(x11Display(), pmHandle, 0, nullptr);
 	    for (int y = 0; y < h; ++y) {
 		TQRgb *ls = (TQRgb *)iconImage.scanLine( y );
 		for (int x = 0; x < w; ++x) {
@@ -1356,7 +1356,7 @@ void TQWidget::setIcon( const TQPixmap &pixmap )
     }
     XWMHints *h = XGetWMHints( x11Display(), winId() );
     XWMHints  wm_hints;
-    bool got_hints = h != 0;
+    bool got_hints = h;
     if ( !got_hints ) {
 	h = &wm_hints;
 	h->flags = 0;
@@ -1528,7 +1528,7 @@ void TQWidget::releaseMouse()
     if ( !tqt_nograb() && mouseGrb == this ) {
 	XUngrabPointer( x11Display(),  tqt_x_time );
 	XFlush( x11Display() );
-	mouseGrb = 0;
+	mouseGrb = nullptr;
     }
 }
 
@@ -1573,7 +1573,7 @@ void TQWidget::releaseKeyboard()
 {
     if ( !tqt_nograb() && keyboardGrb == this ) {
 	XUngrabKeyboard( x11Display(), tqt_x_time );
-	keyboardGrb = 0;
+	keyboardGrb = nullptr;
     }
 }
 
@@ -1868,7 +1868,7 @@ void TQWidget::setWindowState(uint newstate)
                     const TQRect normalGeometry = TQRect(pos(), size());
 
 		    top->savedFlags = getWFlags();
-                    reparent(0, WType_TopLevel | WStyle_Customize | WStyle_NoBorder |
+                    reparent(nullptr, WType_TopLevel | WStyle_Customize | WStyle_NoBorder |
 			     // preserve some widget flags
 			     (getWFlags() & 0xffff0000),
 			     mapToGlobal(TQPoint(0, 0)));
@@ -1879,7 +1879,7 @@ void TQWidget::setWindowState(uint newstate)
                     if ( top->normalGeometry.width() < 0 )
 			top->normalGeometry = normalGeometry;
                 } else {
-		    reparent( 0, top->savedFlags, mapToGlobal(TQPoint(0, 0)) );
+		    reparent( nullptr, top->savedFlags, mapToGlobal(TQPoint(0, 0)) );
 
                     if (newstate & WindowMaximized) {
                         // from fullscreen to maximized
@@ -1952,7 +1952,7 @@ void TQWidget::showWindow()
     if ( isTopLevel()  ) {
 	XWMHints *h = XGetWMHints( x11Display(), winId() );
 	XWMHints  wm_hints;
-	bool got_hints = h != 0;
+	bool got_hints = h;
 	if ( !got_hints ) {
 	    h = &wm_hints;
 	    h->flags = 0;
@@ -2616,7 +2616,7 @@ void TQWidget::createTLSysExtra()
 {
 #if defined(TQT_NO_IM_EXTENSIONS)
     // created lazily
-    extra->topextra->xic = 0;
+    extra->topextra->xic = nullptr;
 #endif
 #ifndef TQT_NO_XSYNC
     extra->topextra->syncCounter = 0;
@@ -2854,7 +2854,7 @@ void TQWidget::updateFrameStrut() const
 
 	// if the parent window is the root window, an Enlightenment virtual root or
 	// a NET WM virtual root window, stop here
-	data_ret = 0;
+	data_ret = nullptr;
 	if (p == r ||
 	    (XGetWindowProperty(TQPaintDevice::x11AppDisplay(), p,
 				tqt_enlightenment_desktop, 0, 1, False, XA_CARDINAL,
@@ -2932,7 +2932,7 @@ TQWidget *TQWidget::icHolderWidget()
 */
 TQInputContext *TQWidget::getInputContext()
 {
-    TQInputContext *qic = 0;
+    TQInputContext *qic = nullptr;
 
 #ifndef TQT_NO_IM
 // #if !defined(TQT_NO_IM_EXTENSIONS)
@@ -3048,7 +3048,7 @@ void TQWidget::destroyInputContext()
     if( *qicp )
 	delete *qicp;
 
-    *qicp = 0;
+    *qicp = nullptr;
 #endif // TQT_NO_IM
 }
 
@@ -3131,7 +3131,7 @@ void TQWidget::unfocusInputContext()
     if ( qic ) {
 	// may be caused reset() in some input methods
 	qic->unsetFocus();
-	qic->setFocusWidget( 0 );
+	qic->setFocusWidget( nullptr );
     }
 #endif // TQT_NO_IM
 }
diff --git a/src/kernel/tqwmatrix.h b/src/kernel/tqwmatrix.h
index dc437c008..5f4ff3653 100644
--- a/src/kernel/tqwmatrix.h
+++ b/src/kernel/tqwmatrix.h
@@ -90,7 +90,7 @@ public:
     bool isInvertible() const { return (_m11*_m22 - _m12*_m21) != 0; }
     double det() const { return _m11*_m22 - _m12*_m21; }
 
-    TQWMatrix	invert( bool * = 0 ) const;
+    TQWMatrix	invert( bool * = nullptr ) const;
 
     bool	operator==( const TQWMatrix & ) const;
     bool	operator!=( const TQWMatrix & ) const;
diff --git a/src/network/tqdns.cpp b/src/network/tqdns.cpp
index 4e5038657..c3d090766 100644
--- a/src/network/tqdns.cpp
+++ b/src/network/tqdns.cpp
@@ -87,7 +87,7 @@
 static TQ_UINT16 id; // ### seeded started by now()
 
 
-static TQDateTime * originOfTime = 0;
+static TQDateTime * originOfTime = nullptr;
 
 static TQCleanupHandler<TQDateTime> tqdns_cleanup_time;
 
@@ -107,8 +107,8 @@ static TQ_UINT32 now()
 #else
 #endif
 
-static TQPtrList<TQHostAddress> * ns = 0;
-static TQStrList * domains = 0;
+static TQPtrList<TQHostAddress> * ns = nullptr;
+static TQStrList * domains = nullptr;
 static bool ipv6support = false;
 
 #if defined(Q_MODERN_RES_API)
@@ -135,7 +135,7 @@ static int tqdns_res_init()
 
 class TQDnsPrivate {
 public:
-    TQDnsPrivate() : queryTimer( 0 ), noNames(false)
+    TQDnsPrivate() : queryTimer( nullptr ), noNames(false)
     {
 #if defined(Q_DNS_SYNCHRONOUS)
 #if defined(Q_OS_UNIX)
@@ -213,7 +213,7 @@ public:
 
     void sweep( TQ_UINT32 thisSweep );
 
-    bool isEmpty() const { return rrs == 0 || rrs->isEmpty(); }
+    bool isEmpty() const { return !rrs || rrs->isEmpty(); }
 
     TQString name() const { return l; }
 
@@ -280,7 +280,7 @@ private:
 
 
 TQDnsRR::TQDnsRR( const TQString & label )
-    : domain( 0 ), t( TQDns::None ),
+    : domain( nullptr ), t( TQDns::None ),
       nxdomain( false ), current( false ),
       expireTime( 0 ), deleteTime( 0 ),
       priority( 0 ), weight( 0 ), port( 0 )
@@ -301,7 +301,7 @@ TQDnsAnswer::TQDnsAnswer( TQDnsQuery * query_ )
 {
     ok = true;
 
-    answer = 0;
+    answer = nullptr;
     size = 0;
     query = query_;
     pp = 0;
@@ -310,7 +310,7 @@ TQDnsAnswer::TQDnsAnswer( TQDnsQuery * query_ )
     next = size;
     ttl = 0;
     label = TQString::null;
-    rr = 0;
+    rr = nullptr;
 
     TQDnsRR * newrr = new TQDnsRR( query->l );
     newrr->t = query->t;
@@ -336,7 +336,7 @@ TQDnsAnswer::TQDnsAnswer( const TQByteArray& answer_,
     next = size;
     ttl = 0;
     label = TQString::null;
-    rr = 0;
+    rr = nullptr;
 }
 
 
@@ -345,7 +345,7 @@ TQDnsAnswer::~TQDnsAnswer()
     if ( !ok && rrs ) {
 	TQPtrListIterator<TQDnsRR> it( *rrs );
 	TQDnsRR * tmprr;
-	while( (tmprr=it.current()) != 0 ) {
+	while( (tmprr=it.current()) ) {
 	    ++it;
 	    tmprr->t = TQDns::None; // will be deleted soonish
 	}
@@ -701,7 +701,7 @@ void TQDnsAnswer::parse()
 #endif
 	} else {
             next = pp + rdlength;
-	    rr = 0;
+	    rr = nullptr;
 	    switch( type ) {
 	    case 1:
 		parseA();
@@ -767,24 +767,24 @@ void TQDnsAnswer::parse()
     rrs->first();
     TQDict<void> used( 17 );
     used.setAutoDelete( false );
-    while( (rr=rrs->current()) != 0 ) {
+    while( (rr=rrs->current()) ) {
 	rrs->next();
 	if ( rr->target.length() && rr->deleteTime > 0 && rr->current )
 	    used.insert( rr->target, (void*)42 );
 	if ( ( rr->t == TQDns::A || rr->t == TQDns::Aaaa ) &&
-	     used.find( rr->domain->name() ) != 0 )
+	     used.find( rr->domain->name() ) )
 	    rr->deleteTime = rr->expireTime;
     }
 
     // next, for each RR, delete any older RRs that are equal to it
     rrs->first();
-    while( (rr=rrs->current()) != 0 ) {
+    while( (rr=rrs->current()) ) {
 	rrs->next();
 	if ( rr && rr->domain && rr->domain->rrs ) {
 	    TQPtrList<TQDnsRR> * drrs = rr->domain->rrs;
 	    drrs->first();
 	    TQDnsRR * older;
-	    while( (older=drrs->current()) != 0 ) {
+	    while( (older=drrs->current()) ) {
 		if ( older != rr &&
 		     older->t == rr->t &&
 		     older->nxdomain == rr->nxdomain &&
@@ -837,9 +837,9 @@ void TQDnsAnswer::notify()
     TQPtrDictIterator<void> it( *query->dns );
     TQDns * dns;
     it.toFirst();
-    while( (dns=(TQDns*)(it.current())) != 0 ) {
+    while( (dns=(TQDns*)(it.current())) ) {
 	++it;
-	if ( notified.find( (void*)dns ) == 0 ) {
+	if ( !notified.find( (void*)dns ) ) {
 	    notified.insert( (void*)dns, (void*)42 );
 	    if ( rrs->count() == 0 ) {
 #if defined(TQDNS_DEBUG)
@@ -898,12 +898,12 @@ public:
 
 
 
-static TQDnsManager * globalManager = 0;
+static TQDnsManager * globalManager = nullptr;
 
 static void cleanupDns()
 {
     delete globalManager;
-    globalManager = 0;
+    globalManager = nullptr;
 }
 
 TQDnsManager * TQDnsManager::manager()
@@ -977,9 +977,9 @@ TQDnsManager::TQDnsManager()
 
     ::ns->first();
     TQHostAddress * h;
-    while( (h=::ns->current()) != 0 ) {
+    while( (h=::ns->current()) ) {
 	ns->first();
-	while( ns->current() != 0 && !(*ns->current() == *h) )
+	while( ns->current() && !(*ns->current() == *h) )
 	    ns->next();
 	if ( !ns->current() ) {
 	    ns->append( new TQHostAddress(*h) );
@@ -1000,9 +1000,9 @@ TQDnsManager::TQDnsManager()
 
     ::domains->first();
     const char * s;
-    while( (s=::domains->current()) != 0 ) {
+    while( (s=::domains->current()) ) {
 	domains->first();
-	while( domains->current() != 0 && qstrcmp( domains->current(), s ) )
+	while( domains->current() && qstrcmp( domains->current(), s ) )
 	    domains->next();
 	if ( !domains->current() ) {
 	    domains->append( s );
@@ -1024,7 +1024,7 @@ TQDnsManager::TQDnsManager()
 TQDnsManager::~TQDnsManager()
 {
     if ( globalManager )
-	globalManager = 0;
+	globalManager = nullptr;
     queries.setAutoDelete( true );
     cache.setAutoDelete( true );
     delete ipv4Socket;
@@ -1046,7 +1046,7 @@ void TQDnsManager::cleanCache()
 	   thisSweep, lastSweep );
 #endif
 
-    while( (d=it.current()) != 0 ) {
+    while( (d=it.current()) ) {
 	++it;
 	d->sweep( thisSweep ); // after this, d may be empty
 	if ( !again )
@@ -1061,7 +1061,7 @@ void TQDnsManager::cleanCache()
 void TQDnsManager::retransmit()
 {
     const TQObject * o = sender();
-    if ( o == 0 || globalManager == 0 || this != globalManager )
+    if ( !o || !globalManager || this != globalManager )
 	return;
     uint q = 0;
     while( q < queries.size() && queries[q] != o )
@@ -1139,7 +1139,7 @@ void TQDnsManager::transmitQuery( TQDnsQuery * query_ )
 	return;
 
     uint i = 0;
-    while( i < queries.size() && queries[i] != 0 )
+    while( i < queries.size() && queries[i] )
 	i++;
     if ( i == queries.size() )
 	queries.resize( i+1 );
@@ -1160,7 +1160,7 @@ void TQDnsManager::transmitQuery( int i )
 	TQDnsAnswer answer( q );
 	answer.notify();
 
-        if (globalManager == 0)
+        if (!globalManager)
             return;
 
 	// and then get rid of the query
@@ -1288,7 +1288,7 @@ void TQDnsManager::transmitQuery( int i )
 	// name servers too.
 	p[2] = 0;
 	TQHostAddress * server;
-	while( (server=ns->next()) != 0 ) {
+	while( (server=ns->next()) ) {
 	    if (server->isIPv4Address())
 		ipv4Socket->writeBlock( p.data(), pp, *server, 53 );
 #if !defined (TQT_NO_IPV6)
@@ -1334,14 +1334,14 @@ TQDnsDomain * TQDnsManager::domain( const TQString & label )
 TQDnsDomain::TQDnsDomain( const TQString & label )
 {
     l = label;
-    rrs = 0;
+    rrs = nullptr;
 }
 
 
 TQDnsDomain::~TQDnsDomain()
 {
     delete rrs;
-    rrs = 0;
+    rrs = nullptr;
 }
 
 
@@ -1426,7 +1426,7 @@ TQPtrList<TQDnsRR> * TQDnsDomain::cached( const TQDns * r )
 	    d->rrs->first();
 	TQDnsRR * rr;
 	bool answer = false;
-	while( d->rrs && (rr=d->rrs->current()) != 0 ) {
+	while( d->rrs && (rr=d->rrs->current()) ) {
 	    if ( rr->t == TQDns::Cname && r->recordType() != TQDns::Cname &&
 		 !rr->nxdomain && cnamecount < 16 ) {
 		// cname.  if the code is ugly, that may just
@@ -1504,7 +1504,7 @@ TQPtrList<TQDnsRR> * TQDnsDomain::cached( const TQDns * r )
 	    // we need to transmit a query.
 	    uint q = 0;
 	    while ( q < m->queries.size() &&
-		    ( m->queries[q] == 0 ||
+		    ( !m->queries[q] ||
 		      m->queries[q]->t != r->recordType() ||
 		      m->queries[q]->l != s ) )
 		q++;
@@ -1541,7 +1541,7 @@ void TQDnsDomain::sweep( TQ_UINT32 thisSweep )
 
     TQDnsRR * rr;
     rrs->first();
-    while( (rr=rrs->current()) != 0 ) {
+    while( (rr=rrs->current()) ) {
 	if ( !rr->deleteTime )
 	    rr->deleteTime = thisSweep; // will hit next time around
 
@@ -1562,7 +1562,7 @@ void TQDnsDomain::sweep( TQ_UINT32 thisSweep )
 
     if ( rrs->isEmpty() ) {
 	delete rrs;
-	rrs = 0;
+	rrs = nullptr;
     }
 }
 
@@ -1725,7 +1725,7 @@ TQDns::~TQDns()
     }
 
     delete d;
-    d = 0;
+    d = nullptr;
 }
 
 
@@ -1764,7 +1764,7 @@ void TQDns::setLabel( const TQString & label )
 	    (void)TQDnsManager::manager(); // create a TQDnsManager, if it is not already there
 	    TQStrListIterator it( *domains );
 	    const char * dom;
-	    while( (dom=it.current()) != 0 ) {
+	    while( (dom=it.current()) ) {
 		++it;
 		n.append( l.lower() + "." + dom );
 	    }
@@ -1984,7 +1984,7 @@ bool TQDns::isWorking() const
 
     TQPtrList<TQDnsRR> * ll = TQDnsDomain::cached( this );
     TQ_LONG queries = n.count();
-    while( ll->current() != 0 ) {
+    while( ll->current() ) {
 	if ( ll->current()->nxdomain ) {
 	    queries--;
 	} else {
@@ -2036,7 +2036,7 @@ TQValueList<TQHostAddress> TQDns::addresses() const
     TQPtrList<TQDnsRR> * cached = TQDnsDomain::cached( this );
 
     TQDnsRR * rr;
-    while( (rr=cached->current()) != 0 ) {
+    while( (rr=cached->current()) ) {
 	if ( rr->current && !rr->nxdomain )
 	    result.append( rr->address );
 	cached->next();
@@ -2090,7 +2090,7 @@ TQValueList<TQDns::MailServer> TQDns::mailServers() const
     TQPtrList<TQDnsRR> * cached = TQDnsDomain::cached( this );
 
     TQDnsRR * rr;
-    while( (rr=cached->current()) != 0 ) {
+    while( (rr=cached->current()) ) {
 	if ( rr->current && !rr->nxdomain ) {
 	    MailServer ms( rr->target, rr->priority );
 	    result.append( ms );
@@ -2147,7 +2147,7 @@ TQValueList<TQDns::Server> TQDns::servers() const
     TQPtrList<TQDnsRR> * cached = TQDnsDomain::cached( this );
 
     TQDnsRR * rr;
-    while( (rr=cached->current()) != 0 ) {
+    while( (rr=cached->current()) ) {
 	if ( rr->current && !rr->nxdomain ) {
 	    Server s( rr->target, rr->priority, rr->weight, rr->port );
 	    result.append( s );
@@ -2186,7 +2186,7 @@ TQStringList TQDns::hostNames() const
     TQPtrList<TQDnsRR> * cached = TQDnsDomain::cached( this );
 
     TQDnsRR * rr;
-    while( (rr=cached->current()) != 0 ) {
+    while( (rr=cached->current()) ) {
 	if ( rr->current && !rr->nxdomain ) {
 	    TQString str( rr->target );
 	    result.append( str );
@@ -2224,7 +2224,7 @@ TQStringList TQDns::texts() const
     TQPtrList<TQDnsRR> * cached = TQDnsDomain::cached( this );
 
     TQDnsRR * rr;
-    while( (rr=cached->current()) != 0 ) {
+    while( (rr=cached->current()) ) {
 	if ( rr->current && !rr->nxdomain ) {
 	    TQString str( rr->text );
 	    result.append( str );
@@ -2262,7 +2262,7 @@ TQString TQDns::canonicalName() const
     that->t = oldType;
 
     TQDnsRR * rr;
-    while( (rr=cached->current()) != 0 ) {
+    while( (rr=cached->current()) ) {
 	if ( rr->current && !rr->nxdomain && rr->domain ) {
 	    delete cached;
 	    return rr->target;
diff --git a/src/network/tqftp.cpp b/src/network/tqftp.cpp
index 93bdfc6fb..d1e2c45e2 100644
--- a/src/network/tqftp.cpp
+++ b/src/network/tqftp.cpp
@@ -75,7 +75,7 @@ public:
 	CsConnectionRefused
     };
 
-    TQFtpDTP( TQFtpPI *p, TQObject *parent=0, const char *name=0 );
+    TQFtpDTP( TQFtpPI *p, TQObject *parent=nullptr, const char *name=nullptr );
 
     void setData( TQByteArray * );
     void setDevice( TQIODevice * );
@@ -137,7 +137,7 @@ private:
     void clearData()
     {
 	is_ba = false;
-	data.dev = 0;
+	data.dev = nullptr;
     }
 
     TQSocket socket;
@@ -161,7 +161,7 @@ class TQFtpPI : public TQObject
     TQ_OBJECT
 
 public:
-    TQFtpPI( TQObject *parent = 0 );
+    TQFtpPI( TQObject *parent = nullptr );
 
     void connectToHost( const TQString &host, TQ_UINT16 port );
 
@@ -261,7 +261,7 @@ TQFtpCommand::TQFtpCommand( TQFtp::Command cmd, TQStringList raw )
     : command(cmd), rawCmds(raw), is_ba(false)
 {
     id = ++idCounter;
-    data.dev = 0;
+    data.dev = nullptr;
 }
 
 TQFtpCommand::TQFtpCommand( TQFtp::Command cmd, TQStringList raw, const TQByteArray &ba )
@@ -291,7 +291,7 @@ TQFtpCommand::~TQFtpCommand()
  *********************************************************************/
 TQFtpDTP::TQFtpDTP( TQFtpPI *p, TQObject *parent, const char *name ) :
     TQObject( parent, name ),
-    socket( 0, "TQFtpDTP_socket" ),
+    socket( nullptr, "TQFtpDTP_socket" ),
     pi( p ),
     callWriteData( false )
 {
@@ -629,7 +629,7 @@ TQFtpPI::TQFtpPI( TQObject *parent ) :
     TQObject( parent ),
     rawCommand(false),
     dtp( this ),
-    commandSocket( 0, "TQFtpPI_socket" ),
+    commandSocket( nullptr, "TQFtpPI_socket" ),
     state( Begin ), abortState( None ),
     currentCmd( TQString::null ),
     waitForDtpToConnect( false ),
@@ -934,7 +934,7 @@ bool TQFtpPI::processReply()
 }
 
 #ifndef TQT_NO_TEXTCODEC
-TQM_EXPORT_FTP TQTextCodec *tqt_ftp_filename_codec = 0;
+TQM_EXPORT_FTP TQTextCodec *tqt_ftp_filename_codec = nullptr;
 #endif
 
 /*
@@ -1029,11 +1029,11 @@ public:
     bool npWaitForLoginDone;
 };
 
-static TQPtrDict<TQFtpPrivate> *d_ptr = 0;
+static TQPtrDict<TQFtpPrivate> *d_ptr = nullptr;
 static void cleanup_d_ptr()
 {
     delete d_ptr;
-    d_ptr = 0;
+    d_ptr = nullptr;
 }
 static TQFtpPrivate* d( const TQFtp* foo )
 {
@@ -1838,7 +1838,7 @@ int TQFtp::currentId() const
 {
     TQFtpPrivate *d = ::d( this );
     TQFtpCommand *c = d->pending.getFirst();
-    if ( c == 0 )
+    if ( !c )
 	return 0;
     return c->id;
 }
@@ -1853,7 +1853,7 @@ TQFtp::Command TQFtp::currentCommand() const
 {
     TQFtpPrivate *d = ::d( this );
     TQFtpCommand *c = d->pending.getFirst();
-    if ( c == 0 )
+    if ( !c )
 	return None;
     return c->command;
 }
@@ -1873,9 +1873,9 @@ TQIODevice* TQFtp::currentDevice() const
     TQFtpPrivate *d = ::d( this );
     TQFtpCommand *c = d->pending.getFirst();
     if ( !c )
-	return 0;
+	return nullptr;
     if ( c->is_ba )
-	return 0;
+	return nullptr;
     return c->data.dev;
 }
 
@@ -1904,7 +1904,7 @@ bool TQFtp::hasPendingCommands() const
 void TQFtp::clearPendingCommands()
 {
     TQFtpPrivate *d = ::d( this );
-    TQFtpCommand *c = 0;
+    TQFtpCommand *c = nullptr;
     if ( d->pending.count() > 0 )
 	c = d->pending.take( 0 );
     d->pending.clear();
@@ -1971,7 +1971,7 @@ void TQFtp::startNextCommand()
     TQFtpPrivate *d = ::d( this );
 
     TQFtpCommand *c = d->pending.getFirst();
-    if ( c == 0 )
+    if ( !c )
 	return;
 
     d->error = NoError;
@@ -2013,7 +2013,7 @@ void TQFtp::piFinished( const TQString& )
 {
     TQFtpPrivate *d = ::d( this );
     TQFtpCommand *c = d->pending.getFirst();
-    if ( c == 0 )
+    if ( !c )
 	return;
 
     if ( c->command == Close ) {
diff --git a/src/network/tqftp.h b/src/network/tqftp.h
index 593b21fc0..b78de2901 100644
--- a/src/network/tqftp.h
+++ b/src/network/tqftp.h
@@ -65,7 +65,7 @@ class TQM_EXPORT_FTP TQFtp : public TQNetworkProtocol
 
 public:
     TQFtp(); // ### TQt 4.0: get rid of this overload
-    TQFtp( TQObject *parent, const char *name=0 );
+    TQFtp( TQObject *parent, const char *name=nullptr );
     virtual ~TQFtp();
 
     int supportedOperations() const;
@@ -107,7 +107,7 @@ public:
     int close();
     int list( const TQString &dir=TQString::null );
     int cd( const TQString &dir );
-    int get( const TQString &file, TQIODevice *dev=0 );
+    int get( const TQString &file, TQIODevice *dev=nullptr );
     int put( const TQByteArray &data, const TQString &file );
     int put( TQIODevice *dev, const TQString &file );
     int remove( const TQString &file );
diff --git a/src/network/tqhttp.cpp b/src/network/tqhttp.cpp
index bea20e42b..50f268bf8 100644
--- a/src/network/tqhttp.cpp
+++ b/src/network/tqhttp.cpp
@@ -63,8 +63,8 @@ public:
 	error( TQHttp::NoError ),
 	hostname( TQString::null ),
 	port( 0 ),
-	toDevice( 0 ),
-	postDevice( 0 ),
+	toDevice( nullptr ),
+	postDevice( nullptr ),
 	bytesDone( 0 ),
 	chunkedSize( -1 ),
 	idleTimer( 0 )
@@ -193,7 +193,7 @@ void TQHttpNormalRequest::start( TQHttp *http )
 	if ( http->d->buffer.size() > 0 )
 	    http->d->header.setContentLength( http->d->buffer.size() );
 
-	http->d->postDevice = 0;
+	http->d->postDevice = nullptr;
     } else {
 	http->d->buffer = TQByteArray();
 
@@ -202,14 +202,14 @@ void TQHttpNormalRequest::start( TQHttp *http )
 	    if ( http->d->postDevice->size() > 0 )
 		http->d->header.setContentLength( http->d->postDevice->size() );
 	} else {
-	    http->d->postDevice = 0;
+	    http->d->postDevice = nullptr;
 	}
     }
 
     if ( to && ( to->isOpen() || to->open(IO_WriteOnly) ) )
 	http->d->toDevice = to;
     else
-	http->d->toDevice = 0;
+	http->d->toDevice = nullptr;
 
     http->sendRequest();
 }
@@ -227,7 +227,7 @@ TQHttpRequestHeader TQHttpNormalRequest::requestHeader()
 TQIODevice* TQHttpNormalRequest::sourceDevice()
 {
     if ( is_ba )
-	return 0;
+	return nullptr;
     return data.dev;
 }
 
@@ -285,9 +285,9 @@ public:
     void start( TQHttp * );
 
     TQIODevice* sourceDevice()
-    { return 0; }
+    { return nullptr; }
     TQIODevice* destinationDevice()
-    { return 0; }
+    { return nullptr; }
 
 private:
     TQString hostname;
@@ -315,9 +315,9 @@ public:
     void start( TQHttp * );
 
     TQIODevice* sourceDevice()
-    { return 0; }
+    { return nullptr; }
     TQIODevice* destinationDevice()
-    { return 0; }
+    { return nullptr; }
 };
 
 void TQHttpCloseRequest::start( TQHttp *http )
@@ -1417,7 +1417,7 @@ TQHttp::~TQHttp()
 void TQHttp::abort()
 {
     TQHttpRequest *r = d->pending.getFirst();
-    if ( r == 0 )
+    if ( !r )
 	return;
 
     finishedWithError( tr("Request aborted"), Aborted );
@@ -1448,7 +1448,7 @@ TQ_ULONG TQHttp::bytesAvailable() const
 */
 TQ_LONG TQHttp::readBlock( char *data, TQ_ULONG maxlen )
 {
-    if ( data == 0 && maxlen != 0 ) {
+    if ( !data && maxlen != 0 ) {
 #if defined(QT_CHECK_NULL)
 	tqWarning( "TQHttp::readBlock: Null pointer error" );
 #endif
@@ -1488,7 +1488,7 @@ TQByteArray TQHttp::readAll()
 int TQHttp::currentId() const
 {
     TQHttpRequest *r = d->pending.getFirst();
-    if ( r == 0 )
+    if ( !r )
 	return 0;
     return r->id;
 }
@@ -1504,7 +1504,7 @@ int TQHttp::currentId() const
 TQHttpRequestHeader TQHttp::currentRequest() const
 {
     TQHttpRequest *r = d->pending.getFirst();
-    if ( r != 0 && r->hasRequestHeader() )
+    if ( r && r->hasRequestHeader() )
 	return r->requestHeader();
     return TQHttpRequestHeader();
 }
@@ -1523,7 +1523,7 @@ TQIODevice* TQHttp::currentSourceDevice() const
 {
     TQHttpRequest *r = d->pending.getFirst();
     if ( !r )
-	return 0;
+	return nullptr;
     return r->sourceDevice();
 }
 
@@ -1541,7 +1541,7 @@ TQIODevice* TQHttp::currentDestinationDevice() const
 {
     TQHttpRequest *r = d->pending.getFirst();
     if ( !r )
-	return 0;
+	return nullptr;
     return r->destinationDevice();
 }
 
@@ -1568,7 +1568,7 @@ bool TQHttp::hasPendingRequests() const
 */
 void TQHttp::clearPendingRequests()
 {
-    TQHttpRequest *r = 0;
+    TQHttpRequest *r = nullptr;
     if ( d->pending.count() > 0 )
 	r = d->pending.take( 0 );
     d->pending.clear();
@@ -1698,7 +1698,7 @@ int TQHttp::head( const TQString& path )
 {
     TQHttpRequestHeader header( "HEAD", path );
     header.setValue( "Connection", "Keep-Alive" );
-    return addRequest( new TQHttpPGHRequest( header, (TQIODevice*)0, 0 ) );
+    return addRequest( new TQHttpPGHRequest( header, (TQIODevice*)0, nullptr ) );
 }
 
 /*!
@@ -1786,7 +1786,7 @@ int TQHttp::addRequest( TQHttpRequest *req )
 void TQHttp::startNextRequest()
 {
     TQHttpRequest *r = d->pending.getFirst();
-    if ( r == 0 )
+    if ( !r )
 	return;
 
     d->error = NoError;
@@ -1822,7 +1822,7 @@ void TQHttp::sendRequest()
 void TQHttp::finishedWithSuccess()
 {
     TQHttpRequest *r = d->pending.getFirst();
-    if ( r == 0 )
+    if ( !r )
 	return;
 
     emit requestFinished( r->id, false );
@@ -1837,7 +1837,7 @@ void TQHttp::finishedWithSuccess()
 void TQHttp::finishedWithError( const TQString& detail, int errorCode )
 {
     TQHttpRequest *r = d->pending.getFirst();
-    if ( r == 0 )
+    if ( !r )
 	return;
 
     d->error = (Error)errorCode;
@@ -1864,7 +1864,7 @@ void TQHttp::slotClosed()
 	finishedWithError( tr("Server closed connection unexpectedly"), UnexpectedClose );
     }
 
-    d->postDevice = 0;
+    d->postDevice = nullptr;
     setState( Closing );
     d->idleTimer = startTimer( 0 );
 }
@@ -1894,7 +1894,7 @@ void TQHttp::slotConnected()
 
 void TQHttp::slotError( int err )
 {
-    d->postDevice = 0;
+    d->postDevice = nullptr;
 
     if ( d->state == Connecting || d->state == Reading || d->state == Sending ) {
 	switch ( err ) {
@@ -1932,7 +1932,7 @@ void TQHttp::slotBytesWritten( int written )
 	    return;
 	}
 	if ( d->postDevice->atEnd() ) {
-	    d->postDevice = 0;
+	    d->postDevice = nullptr;
 	}
 
 	d->socket.writeBlock( arr.data(), max );
@@ -1999,7 +1999,7 @@ void TQHttp::slotReadyRead()
 	    everythingRead = true;
 	} else {
 	    TQ_ULONG n = d->socket.bytesAvailable();
-	    TQByteArray *arr = 0;
+	    TQByteArray *arr = nullptr;
 	    if ( d->chunkedSize != -1 ) {
 		// transfer-encoding is chunked
 		for ( ;; ) {
@@ -2197,7 +2197,7 @@ void TQHttp::close()
     if ( d->state == Closing || d->state == Unconnected )
 	return;
 
-    d->postDevice = 0;
+    d->postDevice = nullptr;
     setState( Closing );
 
     // Already closed ?
diff --git a/src/network/tqhttp.h b/src/network/tqhttp.h
index 2abf714f1..9846d70a9 100644
--- a/src/network/tqhttp.h
+++ b/src/network/tqhttp.h
@@ -172,8 +172,8 @@ class TQM_EXPORT_HTTP TQHttp : public TQNetworkProtocol
 
 public:
     TQHttp();
-    TQHttp( TQObject* parent, const char* name = 0 ); // ### TQt 4.0: make parent=0 and get rid of the TQHttp() constructor
-    TQHttp( const TQString &hostname, TQ_UINT16 port=80, TQObject* parent=0, const char* name = 0 );
+    TQHttp( TQObject* parent, const char* name = nullptr ); // ### TQt 4.0: make parent=0 and get rid of the TQHttp() constructor
+    TQHttp( const TQString &hostname, TQ_UINT16 port=80, TQObject* parent=nullptr, const char* name = nullptr );
     virtual ~TQHttp();
 
     int supportedOperations() const;
@@ -192,12 +192,12 @@ public:
 
     int setHost(const TQString &hostname, TQ_UINT16 port=80 );
 
-    int get( const TQString& path, TQIODevice* to=0 );
-    int post( const TQString& path, TQIODevice* data, TQIODevice* to=0  );
-    int post( const TQString& path, const TQByteArray& data, TQIODevice* to=0 );
+    int get( const TQString& path, TQIODevice* to=nullptr );
+    int post( const TQString& path, TQIODevice* data, TQIODevice* to=nullptr  );
+    int post( const TQString& path, const TQByteArray& data, TQIODevice* to=nullptr );
     int head( const TQString& path );
-    int request( const TQHttpRequestHeader &header, TQIODevice *device=0, TQIODevice *to=0 );
-    int request( const TQHttpRequestHeader &header, const TQByteArray &data, TQIODevice *to=0 );
+    int request( const TQHttpRequestHeader &header, TQIODevice *device=nullptr, TQIODevice *to=nullptr );
+    int request( const TQHttpRequestHeader &header, const TQByteArray &data, TQIODevice *to=nullptr );
 
     int closeConnection();
 
diff --git a/src/network/tqserversocket.cpp b/src/network/tqserversocket.cpp
index d65eac0ad..f41756cef 100644
--- a/src/network/tqserversocket.cpp
+++ b/src/network/tqserversocket.cpp
@@ -46,7 +46,7 @@
 
 class TQServerSocketPrivate {
 public:
-    TQServerSocketPrivate(): s(0), n(0) {}
+    TQServerSocketPrivate(): s(nullptr), n(nullptr) {}
     ~TQServerSocketPrivate() { delete n; delete s; }
     TQSocketDevice *s;
     TQSocketNotifier *n;
@@ -178,7 +178,7 @@ void TQServerSocket::init( const TQHostAddress & address, TQ_UINT16 port, int ba
     } else {
 	tqWarning( "TQServerSocket: failed to bind or listen to the socket" );
 	delete d->s;
-	d->s = 0;
+	d->s = nullptr;
     }
 }
 
@@ -270,7 +270,7 @@ TQHostAddress TQServerSocket::address() const
 TQSocketDevice *TQServerSocket::socketDevice()
 {
     if ( !d )
-	return 0;
+	return nullptr;
 
     return d->s;
 }
diff --git a/src/network/tqserversocket.h b/src/network/tqserversocket.h
index 2ceefb41e..a7d4b9b6a 100644
--- a/src/network/tqserversocket.h
+++ b/src/network/tqserversocket.h
@@ -62,10 +62,10 @@ class TQM_EXPORT_NETWORK TQServerSocket : public TQObject
     TQ_OBJECT
 public:
     TQServerSocket( TQ_UINT16 port, int backlog = 1,
-		   TQObject *parent=0, const char *name=0 );
+		   TQObject *parent=nullptr, const char *name=nullptr );
     TQServerSocket( const TQHostAddress & address, TQ_UINT16 port, int backlog = 1,
-		   TQObject *parent=0, const char *name=0 );
-    TQServerSocket( TQObject *parent=0, const char *name=0 );
+		   TQObject *parent=nullptr, const char *name=nullptr );
+    TQServerSocket( TQObject *parent=nullptr, const char *name=nullptr );
     virtual ~TQServerSocket();
 
     bool ok() const;
diff --git a/src/network/tqsocket.cpp b/src/network/tqsocket.cpp
index 91d48cec2..56bab5ce3 100644
--- a/src/network/tqsocket.cpp
+++ b/src/network/tqsocket.cpp
@@ -146,11 +146,11 @@ TQPtrList<TQSocket> TQSocketPrivate::sn_read_alreadyCalled;
 
 TQSocketPrivate::TQSocketPrivate()
     : state(TQSocket::Idle), host(TQString::fromLatin1("")), port(0),
-      socket(0), rsn(0), wsn(0), readBufferSize(0), wsize(0), windex(0)
+      socket(nullptr), rsn(nullptr), wsn(nullptr), readBufferSize(0), wsize(0), windex(0)
 {
 #ifndef TQT_NO_DNS
-    dns4 = 0;
-    dns6 = 0;
+    dns4 = nullptr;
+    dns6 = nullptr;
 #endif
     wba.setAutoDelete( true );
 }
@@ -171,9 +171,9 @@ void TQSocketPrivate::closeSocket()
     // before the socket does, otherwise libc or the kernel will
     // become unhappy.
     delete rsn;
-    rsn = 0;
+    rsn = nullptr;
     delete wsn;
-    wsn = 0;
+    wsn = nullptr;
     if ( socket )
 	socket->close();
 }
@@ -306,7 +306,7 @@ TQSocket::TQSocket( TQObject *parent, const char *name )
     : TQObject( parent, name )
 {
     d = new TQSocketPrivate;
-    setSocketDevice( 0 );
+    setSocketDevice( nullptr );
     setFlags( IO_Direct );
     resetStatus();
 }
@@ -325,7 +325,7 @@ TQSocket::~TQSocket()
 #endif
     if ( state() != Idle )
 	close();
-    Q_ASSERT( d != 0 );
+    Q_ASSERT( d );
     delete d;
 }
 
@@ -457,7 +457,7 @@ void TQSocket::tryConnecting()
 		    name(), d->host.ascii(), d->port, d->l4.count() );
 #endif
 	    delete d->dns4;
-	    d->dns4 = 0;
+	    d->dns4 = nullptr;
 	}
     }
 
@@ -470,7 +470,7 @@ void TQSocket::tryConnecting()
 		    name(), d->host.ascii(), d->port, d->l6.count() );
 #endif
 	    delete d->dns6;
-	    d->dns6 = 0;
+	    d->dns6 = nullptr;
 	}
     }
 
@@ -521,11 +521,11 @@ void TQSocket::tryConnecting()
 			name(), d->socket->peerAddress().toString().ascii() );
 #endif
 		delete d->wsn;
-		d->wsn = 0;
+		d->wsn = nullptr;
 		delete d->rsn;
-		d->rsn = 0;
+		d->rsn = nullptr;
 		delete d->socket;
-		d->socket = 0;
+		d->socket = nullptr;
 
                 if(d->addresses.isEmpty()) {
                     emit error( ErrConnectionRefused );
@@ -533,10 +533,10 @@ void TQSocket::tryConnecting()
                 }
             }
 	    // if the host has more addresses, try another some.
-	    if ( d->socket == 0 && !d->addresses.isEmpty() ) {
+	    if ( !d->socket && !d->addresses.isEmpty() ) {
 		d->addr = *d->addresses.begin();
 		d->addresses.remove( d->addresses.begin() );
-		d->setSocketDevice( this, 0 );
+		d->setSocketDevice( this, nullptr );
 		stuck = true;
 #if defined(TQSOCKET_DEBUG)
 		tqDebug( "TQSocket (%s)::tryConnecting: Trying IP address %s",
@@ -860,7 +860,7 @@ bool TQSocket::at( Offset index )
 {
     if ( index > d->rba.size() )
 	return false;
-    d->rba.consumeBytes( (TQ_ULONG)index, 0 );			// throw away data 0..index-1
+    d->rba.consumeBytes( (TQ_ULONG)index, nullptr );			// throw away data 0..index-1
     // After we read data from our internal buffer, if we use the
     // setReadBufferSize() to limit our buffer, we might now be able to
     // read more data in our buffer. So enable the read socket notifier,
@@ -880,7 +880,7 @@ bool TQSocket::at( Offset index )
 
 bool TQSocket::atEnd() const
 {
-    if ( d->socket == 0 )
+    if ( !d->socket )
 	return true;
     TQSocket * that = (TQSocket *)this;
     if ( that->d->socket->bytesAvailable() )	// a little slow, perhaps...
@@ -901,7 +901,7 @@ bool TQSocket::atEnd() const
 
 TQ_ULONG TQSocket::bytesAvailable() const
 {
-    if ( d->socket == 0 )
+    if ( !d->socket )
 	return 0;
     TQSocket * that = (TQSocket *)this;
     if ( that->d->socket->bytesAvailable() ) // a little slow, perhaps...
@@ -931,7 +931,7 @@ TQ_ULONG TQSocket::bytesAvailable() const
 
 TQ_ULONG TQSocket::waitForMore( int msecs, bool *timeout ) const
 {
-    if ( d->socket == 0 )
+    if ( !d->socket )
 	return 0;
     TQSocket * that = (TQSocket *)this;
     if ( that->d->socket->waitForMore( msecs, timeout ) > 0 )
@@ -944,7 +944,7 @@ TQ_ULONG TQSocket::waitForMore( int msecs, bool *timeout ) const
 
 TQ_ULONG TQSocket::waitForMore( int msecs ) const
 {
-    return waitForMore( msecs, 0 );
+    return waitForMore( msecs, nullptr );
 }
 
 /*!
@@ -979,7 +979,7 @@ void TQSocket::clearPendingData()
 
 TQ_LONG TQSocket::readBlock( char *data, TQ_ULONG maxlen )
 {
-    if ( data == 0 && maxlen != 0 ) {
+    if ( !data && maxlen != 0 ) {
 #if defined(QT_CHECK_NULL)
 	tqWarning( "TQSocket::readBlock: Null pointer error" );
 #endif
@@ -1018,7 +1018,7 @@ TQ_LONG TQSocket::readBlock( char *data, TQ_ULONG maxlen )
 TQ_LONG TQSocket::writeBlock( const char *data, TQ_ULONG len )
 {
 #if defined(QT_CHECK_NULL)
-    if ( data == 0 && len != 0 ) {
+    if ( !data && len != 0 ) {
 	tqWarning( "TQSocket::writeBlock: Null pointer error" );
     }
 #endif
@@ -1147,10 +1147,10 @@ int TQSocket::ungetch( int ch )
 
 bool TQSocket::canReadLine() const
 {
-    if ( ((TQSocket*)this)->d->rba.scanNewline( 0 ) )
+    if ( ((TQSocket*)this)->d->rba.scanNewline( nullptr ) )
 	return true;
     return ( bytesAvailable() > 0 &&
-	     ((TQSocket*)this)->d->rba.scanNewline( 0 ) );
+	     ((TQSocket*)this)->d->rba.scanNewline( nullptr ) );
 }
 
 /*!
@@ -1216,7 +1216,7 @@ void TQSocket::sn_read( bool force )
     char buf[4096];
     TQ_LONG nbytes = d->socket->bytesAvailable();
     TQ_LONG nread;
-    TQByteArray *a = 0;
+    TQByteArray *a = nullptr;
 
     if ( state() == Connecting ) {
 	if ( nbytes > 0 ) {
@@ -1279,7 +1279,7 @@ void TQSocket::sn_read( bool force )
 	    a = new TQByteArray( nbytes );
 	    nread = d->socket->readBlock( a->data(), maxToRead ? TQMIN(nbytes,maxToRead) : nbytes );
 	} else {
-	    a = 0;
+	    a = nullptr;
 	    nread = d->socket->readBlock( buf, maxToRead ? TQMIN((TQ_LONG)sizeof(buf),maxToRead) : sizeof(buf) );
 	    if ( nread > 0 ) {
 		// ##### could setRawData
@@ -1376,7 +1376,7 @@ void TQSocket::tryConnection()
 
 int TQSocket::socket() const
 {
-    if ( d->socket == 0 )
+    if ( !d->socket )
 	return -1;
     return d->socket->socket();
 }
@@ -1432,9 +1432,9 @@ void TQSocket::setSocketIntern( int socket )
     d->port = 0;
 #ifndef TQT_NO_DNS
     delete d->dns4;
-    d->dns4 = 0;
+    d->dns4 = nullptr;
     delete d->dns6;
-    d->dns6 = 0;
+    d->dns6 = nullptr;
 #endif
 }
 
@@ -1445,7 +1445,7 @@ void TQSocket::setSocketIntern( int socket )
 
 TQ_UINT16 TQSocket::port() const
 {
-    if ( d->socket == 0 )
+    if ( !d->socket )
 	return 0;
     return d->socket->port();
 }
@@ -1462,7 +1462,7 @@ TQ_UINT16 TQSocket::port() const
 
 TQ_UINT16 TQSocket::peerPort() const
 {
-    if ( d->socket == 0 )
+    if ( !d->socket )
 	return 0;
     return d->socket->peerPort();
 }
@@ -1476,7 +1476,7 @@ TQ_UINT16 TQSocket::peerPort() const
 
 TQHostAddress TQSocket::address() const
 {
-    if ( d->socket == 0 ) {
+    if ( !d->socket ) {
 	TQHostAddress tmp;
 	return tmp;
     }
@@ -1491,7 +1491,7 @@ TQHostAddress TQSocket::address() const
 
 TQHostAddress TQSocket::peerAddress() const
 {
-    if ( d->socket == 0 ) {
+    if ( !d->socket ) {
 	TQHostAddress tmp;
 	return tmp;
     }
diff --git a/src/network/tqsocket.h b/src/network/tqsocket.h
index b6e050051..cc07d6ede 100644
--- a/src/network/tqsocket.h
+++ b/src/network/tqsocket.h
@@ -68,7 +68,7 @@ public:
 	ErrSocketRead
     };
 
-    TQSocket( TQObject *parent=0, const char *name=0 );
+    TQSocket( TQObject *parent=nullptr, const char *name=nullptr );
     virtual ~TQSocket();
 
     enum State { Idle, HostLookup, Connecting,
diff --git a/src/network/tqsocketdevice.cpp b/src/network/tqsocketdevice.cpp
index 8ae73f61a..ca1429781 100644
--- a/src/network/tqsocketdevice.cpp
+++ b/src/network/tqsocketdevice.cpp
@@ -229,7 +229,7 @@ TQSocketDevice::~TQSocketDevice()
 {
     close();
     delete d;
-    d = 0;
+    d = nullptr;
 #if defined(TQSOCKETDEVICE_DEBUG)
     tqDebug( "TQSocketDevice: Destroyed TQSocketDevice %p", this );
 #endif
diff --git a/src/network/tqsocketdevice.h b/src/network/tqsocketdevice.h
index b87dbc07d..9ff900046 100644
--- a/src/network/tqsocketdevice.h
+++ b/src/network/tqsocketdevice.h
@@ -102,7 +102,7 @@ public:
     virtual int	 accept();
 
     TQ_LONG	 bytesAvailable() const;
-    TQ_LONG	 waitForMore( int msecs, bool *timeout=0 ) const;
+    TQ_LONG	 waitForMore( int msecs, bool *timeout=nullptr ) const;
     TQ_LONG	 readBlock( char *data, TQ_ULONG maxlen );
     TQ_LONG	 writeBlock( const char *data, TQ_ULONG len );
     virtual TQ_LONG  writeBlock( const char *data, TQ_ULONG len,
diff --git a/src/network/tqsocketdevice_unix.cpp b/src/network/tqsocketdevice_unix.cpp
index eaf9e1bf3..6f8b223b3 100644
--- a/src/network/tqsocketdevice_unix.cpp
+++ b/src/network/tqsocketdevice_unix.cpp
@@ -733,7 +733,7 @@ TQ_LONG TQSocketDevice::waitForMore( int msecs, bool *timeout ) const
     tv.tv_sec = msecs / 1000;
     tv.tv_usec = (msecs % 1000) * 1000;
 
-    int rv = select( fd+1, &fds, 0, 0, msecs < 0 ? 0 : &tv );
+    int rv = select( fd+1, &fds, nullptr, nullptr, msecs < 0 ? nullptr : &tv );
 
     if ( rv < 0 )
 	return -1;
@@ -759,7 +759,7 @@ TQ_LONG TQSocketDevice::waitForMore( int msecs, bool *timeout ) const
 TQ_LONG TQSocketDevice::readBlock( char *data, TQ_ULONG maxlen )
 {
 #if defined(QT_CHECK_NULL)
-    if ( data == 0 && maxlen != 0 ) {
+    if ( !data && maxlen != 0 ) {
 	tqWarning( "TQSocketDevice::readBlock: Null pointer error" );
     }
 #endif
@@ -849,7 +849,7 @@ TQ_LONG TQSocketDevice::readBlock( char *data, TQ_ULONG maxlen )
 */
 TQ_LONG TQSocketDevice::writeBlock( const char *data, TQ_ULONG len )
 {
-    if ( data == 0 && len != 0 ) {
+    if ( !data && len != 0 ) {
 #if defined(QT_CHECK_NULL) || defined(TQSOCKETDEVICE_DEBUG)
 	tqWarning( "TQSocketDevice::writeBlock: Null pointer error" );
 #endif
@@ -944,7 +944,7 @@ TQ_LONG TQSocketDevice::writeBlock( const char * data, TQ_ULONG len,
 	return -1; // for now - later we can do t/tcp
     }
 
-    if ( data == 0 && len != 0 ) {
+    if ( !data && len != 0 ) {
 #if defined(QT_CHECK_NULL) || defined(TQSOCKETDEVICE_DEBUG)
 	tqWarning( "TQSocketDevice::sendBlock: Null pointer error" );
 #endif
diff --git a/src/opengl/tqgl.cpp b/src/opengl/tqgl.cpp
index d46376ce5..b4e8b4ff3 100644
--- a/src/opengl/tqgl.cpp
+++ b/src/opengl/tqgl.cpp
@@ -45,8 +45,8 @@
 #include "tqcleanuphandler.h"
 #include "tqptrdict.h"
 
-static TQGLFormat* qgl_default_format = 0;
-static TQGLFormat* qgl_default_overlay_format = 0;
+static TQGLFormat* qgl_default_format = nullptr;
+static TQGLFormat* qgl_default_overlay_format = nullptr;
 
 #if defined(TQ_WS_X11)
 #include "private/tqt_x11_p.h"
@@ -731,7 +731,7 @@ bool operator!=( const TQGLFormat& a, const TQGLFormat& b )
   TQGLContext implementation
  *****************************************************************************/
 
-TQGLContext* TQGLContext::currentCtx = 0;
+TQGLContext* TQGLContext::currentCtx = nullptr;
 
 /*!
     \class TQGLContext tqgl.h
@@ -1267,7 +1267,7 @@ public:
     TQMap<TQString, int> displayListCache;
 };
 
-static TQPtrDict<TQGLWidgetPrivate> * qgl_d_ptr = 0;
+static TQPtrDict<TQGLWidgetPrivate> * qgl_d_ptr = nullptr;
 static TQSingleCleanupHandler< TQPtrDict<TQGLWidgetPrivate> > qgl_cleanup_d_ptr;
 
 static TQGLWidgetPrivate * qgl_d( const TQGLWidget * w )
diff --git a/src/opengl/tqgl.h b/src/opengl/tqgl.h
index c24d2a2b5..d1acf4ccf 100644
--- a/src/opengl/tqgl.h
+++ b/src/opengl/tqgl.h
@@ -56,7 +56,7 @@
 #define TQGL_VERSION	450
 #define TQGL_VERSION_STR	"4.5"
 TQM_EXPORT_OPENGL inline const char *qGLVersion() {
-    tqObsolete( 0, "qGLVersion", "qVersion" );
+    tqObsolete( nullptr, "qGLVersion", "qVersion" );
     return TQGL_VERSION_STR;
 }
 #endif
@@ -180,7 +180,7 @@ public:
     TQGLContext( const TQGLFormat& format );
     virtual ~TQGLContext();
 
-    virtual bool create( const TQGLContext* shareContext = 0 );
+    virtual bool create( const TQGLContext* shareContext = nullptr );
     bool isValid() const;
     bool isSharing() const;
     virtual void reset();
@@ -199,7 +199,7 @@ public:
     static const TQGLContext* currentContext();
 
 protected:
-    virtual bool chooseContext( const TQGLContext* shareContext = 0 );
+    virtual bool chooseContext( const TQGLContext* shareContext = nullptr );
     virtual void doneCurrent(); // ### 4.0: make this public - needed for multithreading stuff
 
 #if defined(TQ_WS_WIN)
@@ -243,7 +243,7 @@ protected:
     static TQGLContext*	currentCtx;
 
 private:
-    void init( TQPaintDevice *dev = 0 );
+    void init( TQPaintDevice *dev = nullptr );
     class Private {
     public:
 	bool valid;
@@ -276,12 +276,12 @@ class TQM_EXPORT_OPENGL TQGLWidget : public TQWidget, public TQGL
 {
     TQ_OBJECT
 public:
-    TQGLWidget( TQWidget* parent=0, const char* name=0,
-	       const TQGLWidget* shareWidget = 0, WFlags f=0 );
-    TQGLWidget( TQGLContext *context, TQWidget* parent, const char* name=0,
-	       const TQGLWidget* shareWidget = 0, WFlags f=0 );
-    TQGLWidget( const TQGLFormat& format, TQWidget* parent=0, const char* name=0,
-	       const TQGLWidget* shareWidget = 0, WFlags f=0 );
+    TQGLWidget( TQWidget* parent=nullptr, const char* name=nullptr,
+	       const TQGLWidget* shareWidget = nullptr, WFlags f=0 );
+    TQGLWidget( TQGLContext *context, TQWidget* parent, const char* name=nullptr,
+	       const TQGLWidget* shareWidget = nullptr, WFlags f=0 );
+    TQGLWidget( const TQGLFormat& format, TQWidget* parent=nullptr, const char* name=nullptr,
+	       const TQGLWidget* shareWidget = nullptr, WFlags f=0 );
     ~TQGLWidget();
 
     void qglColor( const TQColor& c ) const;
@@ -303,7 +303,7 @@ public:
     const TQGLContext* context() const;
 #ifndef Q_QDOC
     virtual void setContext( TQGLContext* context,
-			     const TQGLContext* shareContext = 0,
+			     const TQGLContext* shareContext = nullptr,
 			     bool deleteOldContext = true );
 #endif
 
diff --git a/src/opengl/tqgl_x11.cpp b/src/opengl/tqgl_x11.cpp
index 3fab89393..efb5b0d17 100644
--- a/src/opengl/tqgl_x11.cpp
+++ b/src/opengl/tqgl_x11.cpp
@@ -216,21 +216,21 @@ CMapEntry::~CMapEntry()
 	XFreeColormap( TQPaintDevice::x11AppDisplay(), cmap );
 }
 
-static TQIntDict<CMapEntry> *cmap_dict = 0;
+static TQIntDict<CMapEntry> *cmap_dict = nullptr;
 static bool		    mesa_gl   = false;
-static TQIntDict< TQMap<int, TQRgb> > *qglcmap_dict = 0;
+static TQIntDict< TQMap<int, TQRgb> > *qglcmap_dict = nullptr;
 
 static void cleanup_cmaps()
 {
     if (cmap_dict) {
 	cmap_dict->setAutoDelete(true);
 	delete cmap_dict;
-	cmap_dict = 0;
+	cmap_dict = nullptr;
     }
     if (qglcmap_dict) {
 	qglcmap_dict->setAutoDelete(true);
 	delete qglcmap_dict;
-	qglcmap_dict = 0;
+	qglcmap_dict = nullptr;
     }
 }
 
@@ -240,7 +240,7 @@ static Colormap choose_cmap( Display *dpy, XVisualInfo *vi )
 	cmap_dict = new TQIntDict<CMapEntry>;
 	const char *v = glXQueryServerString( dpy, vi->screen, GLX_VERSION );
 	if ( v )
-	    mesa_gl = strstr(v,"Mesa") != 0;
+	    mesa_gl = strstr(v,"Mesa");
 	tqAddPostRoutine( cleanup_cmaps );
     }
 
@@ -362,7 +362,7 @@ static void find_trans_colors()
 	int actualFormat;
 	ulong nItems;
 	ulong bytesAfter;
-	OverlayProp* overlayProps = 0;
+	OverlayProp* overlayProps = nullptr;
 	int res = XGetWindowProperty( appDisplay, rootWin->winId(),
 				      overlayVisualsAtom, 0, 10000, False,
 				      overlayVisualsAtom, &actualType,
@@ -399,7 +399,7 @@ bool TQGLFormat::hasOpenGL()
 {
     if (!tqt_resolve_gl_symbols(false))
 	return false;
-    return glXQueryExtension(tqt_xdisplay(),0,0) != 0;
+    return glXQueryExtension(tqt_xdisplay(),nullptr,nullptr) != 0;
 }
 
 
@@ -468,7 +468,7 @@ bool TQGLContext::chooseContext( const TQGLContext* shareContext )
 #if defined(QT_CHECK_NULL)
 	    tqWarning("TQGLContext::chooseContext(): Cannot share with invalid context");
 #endif
-	    shareContext = 0;
+	    shareContext = nullptr;
     }
 
     // 1. Sharing between rgba and color-index will give wrong colors.
@@ -477,9 +477,9 @@ bool TQGLContext::chooseContext( const TQGLContext* shareContext )
     if ( shareContext && (format().rgba() != shareContext->format().rgba() ||
 			  (deviceIsPixmap() &&
 			   glXIsDirect( disp, (GLXContext)shareContext->cx ))))
-	shareContext = 0;
+	shareContext = nullptr;
 
-    cx = 0;
+    cx = nullptr;
     if ( shareContext ) {
 	cx = glXCreateContext( disp, (XVisualInfo *)vi,
 			       (GLXContext)shareContext->cx, direct );
@@ -487,7 +487,7 @@ bool TQGLContext::chooseContext( const TQGLContext* shareContext )
 	    d->sharing = true;
     }
     if ( !cx )
-	cx = glXCreateContext( disp, (XVisualInfo *)vi, None, direct );
+	cx = glXCreateContext( disp, (XVisualInfo *)vi, nullptr, direct );
     if ( !cx )
 	return false;
     glFormat.setDirectRendering( glXIsDirect( disp, (GLXContext)cx ) );
@@ -523,7 +523,7 @@ void *TQGLContext::chooseVisual()
 {
     static int bufDepths[] = { 8, 4, 2, 1 };	// Try 16, 12 also?
     //todo: if pixmap, also make sure that vi->depth == pixmap->depth
-    void* vis = 0;
+    void* vis = nullptr;
     int i = 0;
     bool fail = false;
     TQGLFormat fmt = format();
@@ -689,8 +689,8 @@ void TQGLContext::reset()
     glXDestroyContext( d->paintDevice->x11Display(), (GLXContext)cx );
     if ( vi )
 	XFree( vi );
-    vi = 0;
-    cx = 0;
+    vi = nullptr;
+    cx = nullptr;
     d->crWin = false;
     d->sharing = false;
     d->valid = false;
@@ -728,8 +728,8 @@ void TQGLContext::makeCurrent()
 
 void TQGLContext::doneCurrent()
 {
-    glXMakeCurrent( d->paintDevice->x11Display(), 0, 0 );
-    currentCtx = 0;
+    glXMakeCurrent( d->paintDevice->x11Display(), 0, nullptr );
+    currentCtx = nullptr;
 }
 
 
@@ -800,7 +800,7 @@ uint TQGLContext::colorIndex( const TQColor& c ) const
 		qglcmap_dict = new TQIntDict< TQMap<int, TQRgb> >;
 	    }
 	    TQMap<int, TQRgb> *cmap;
-	    if ((cmap = qglcmap_dict->find((long) info->visualid)) == 0) {
+	    if (!(cmap = qglcmap_dict->find((long) info->visualid))) {
 		cmap = new TQMap<int, TQRgb>;
 		qglcmap_dict->insert((long) info->visualid, cmap);
 	    }
@@ -893,8 +893,8 @@ void qgl_use_font(TQFontEngineXft *engine, int first, int count, int listBase)
 	dx = face->glyph->metrics.horiAdvance >> 6;
 	dy = 0;
  	int sz = bm.pitch * bm.rows;
-	uint *aa_glyph = 0;
-	uchar *ua_glyph = 0;
+	uint *aa_glyph = nullptr;
+	uchar *ua_glyph = nullptr;
 
 	if (antialiased)
 	    aa_glyph = new uint[sz];
@@ -920,9 +920,9 @@ void qgl_use_font(TQFontEngineXft *engine, int first, int count, int listBase)
 	if (antialiased) {
 	    // calling glBitmap() is just a trick to move the current
 	    // raster pos, since glGet*() won't work in display lists
-	    glBitmap(0, 0, 0, 0, x0, -y0, 0);
+	    glBitmap(0, 0, 0, 0, x0, -y0, nullptr);
 	    glDrawPixels(bm.pitch, bm.rows, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, aa_glyph);
-	    glBitmap(0, 0, 0, 0, dx-x0, y0, 0);
+	    glBitmap(0, 0, 0, 0, dx-x0, y0, nullptr);
 	} else {
 	    glBitmap(bm.pitch*8, bm.rows, -x0, y0, dx, dy, ua_glyph);
 	}
@@ -971,7 +971,7 @@ class TQGLOverlayWidget : public TQGLWidget
     TQ_OBJECT
 public:
     TQGLOverlayWidget( const TQGLFormat& format, TQGLWidget* parent,
-		      const char* name=0, const TQGLWidget* shareWidget=0 );
+		      const char* name=nullptr, const TQGLWidget* shareWidget=nullptr );
 
 protected:
     void		initializeGL();
@@ -992,7 +992,7 @@ private:	// Disabled copy constructor and operator=
 TQGLOverlayWidget::TQGLOverlayWidget( const TQGLFormat& format, TQGLWidget* parent,
 				    const char* name,
 				    const TQGLWidget* shareWidget )
-    : TQGLWidget( format, parent, name, shareWidget ? shareWidget->olw : 0 )
+    : TQGLWidget( format, parent, name, shareWidget ? shareWidget->olw : nullptr )
 {
     realWidget = parent;
 }
@@ -1032,8 +1032,8 @@ void TQGLWidget::init( TQGLContext *context, const TQGLWidget *shareWidget )
 {
     tqt_resolve_gl_symbols();
 
-    glcx = 0;
-    olw = 0;
+    glcx = nullptr;
+    olw = nullptr;
     autoSwap = true;
     if ( !context->device() )
 	context->setDevice( this );
@@ -1055,7 +1055,7 @@ void TQGLWidget::init( TQGLContext *context, const TQGLWidget *shareWidget )
 	}
 	else {
 	    delete olw;
-	    olw = 0;
+	    olw = nullptr;
 	    glcx->glFormat.setOverlay( false );
 	}
     }
@@ -1099,7 +1099,7 @@ const TQGLContext* TQGLWidget::overlayContext() const
     if ( olw )
 	return olw->context();
     else
-	return 0;
+	return nullptr;
 }
 
 
@@ -1120,7 +1120,7 @@ void TQGLWidget::setContext( TQGLContext *context,
 			    const TQGLContext* shareContext,
 			    bool deleteOldContext )
 {
-    if ( context == 0 ) {
+    if ( !context ) {
 #if defined(QT_CHECK_NULL)
 	tqWarning( "TQGLWidget::setContext: Cannot set null context" );
 #endif
@@ -1202,7 +1202,7 @@ void TQGLWidget::setContext( TQGLContext *context,
 #endif
     if ( deleteOldContext )
 	delete oldcx;
-    oldcx = 0;
+    oldcx = nullptr;
 
     create( w );
 
diff --git a/src/opengl/tqglcolormap.cpp b/src/opengl/tqglcolormap.cpp
index 8765a6d55..f81bff60b 100644
--- a/src/opengl/tqglcolormap.cpp
+++ b/src/opengl/tqglcolormap.cpp
@@ -106,7 +106,7 @@
 */
 TQGLColormap::TQGLColormap()
 {
-    d = 0;
+    d = nullptr;
 }
 
 
@@ -128,7 +128,7 @@ TQGLColormap::~TQGLColormap()
 {
     if ( d && d->deref() ) {
 	delete d;
-	d = 0;
+	d = nullptr;
     }
 }
 
@@ -137,7 +137,7 @@ TQGLColormap::~TQGLColormap()
 */
 TQGLColormap & TQGLColormap::operator=( const TQGLColormap & map )
 {
-    if ( map.d != 0 )
+    if ( map.d )
 	map.d->ref();
 
     if ( d && d->deref() )
@@ -239,7 +239,7 @@ TQColor TQGLColormap::entryColor( int idx ) const
 */
 bool TQGLColormap::isEmpty() const
 {
-    return (d == 0) || (d->cells.size() == 0)  || (d->cmapHandle == 0);
+    return (!d) || (d->cells.size() == 0)  || (d->cmapHandle == 0);
 }
 
 
@@ -248,7 +248,7 @@ bool TQGLColormap::isEmpty() const
 */
 int TQGLColormap::size() const
 {
-    return d != 0 ? d->cells.size() : 0;
+    return d ? d->cells.size() : 0;
 }
 
 /*!
diff --git a/src/sql/drivers/cache/tqsqlcachedresult.cpp b/src/sql/drivers/cache/tqsqlcachedresult.cpp
index b22c56b28..a5ac63430 100644
--- a/src/sql/drivers/cache/tqsqlcachedresult.cpp
+++ b/src/sql/drivers/cache/tqsqlcachedresult.cpp
@@ -61,7 +61,7 @@ public:
 };
 
 TQtSqlCachedResultPrivate::TQtSqlCachedResultPrivate():
-    cache(0), current(0), rowCacheEnd(0), colCount(0), forwardOnly(false)
+    cache(nullptr), current(nullptr), rowCacheEnd(0), colCount(0), forwardOnly(false)
 {
 }
 
@@ -71,11 +71,11 @@ void TQtSqlCachedResultPrivate::cleanup()
 	for (int i = 0; i < rowCacheEnd; ++i)
 	    delete (*cache)[i];
 	delete cache;
-	cache = 0;
+	cache = nullptr;
     }
     if (forwardOnly)
 	delete current;
-    current = 0;
+    current = nullptr;
     forwardOnly = false;
     colCount = 0;
     rowCacheEnd = 0;
@@ -121,7 +121,7 @@ void TQtSqlCachedResultPrivate::revertLast()
 	return;
     --rowCacheEnd;
     delete current;
-    current = 0;
+    current = nullptr;
 }
 
 //////////////
@@ -152,7 +152,7 @@ bool TQtSqlCachedResult::fetch(int i)
 	if (at() > i || at() == TQSql::AfterLast)
 	    return false;
 	while(at() < i - 1) {
-	    if (!gotoNext(0))
+	    if (!gotoNext(nullptr))
 		return false;
 	    setAt(at() + 1);
 	}
diff --git a/src/sql/drivers/ibase/tqsql_ibase.cpp b/src/sql/drivers/ibase/tqsql_ibase.cpp
index cc8f2705e..eb21c05c0 100644
--- a/src/sql/drivers/ibase/tqsql_ibase.cpp
+++ b/src/sql/drivers/ibase/tqsql_ibase.cpp
@@ -61,8 +61,8 @@ static void createDA(XSQLDA *&sqlda)
     sqlda->sqln = 1;
     sqlda->sqld = 0;
     sqlda->version = SQLDA_VERSION1;
-    sqlda->sqlvar[0].sqlind = 0;
-    sqlda->sqlvar[0].sqldata = 0;
+    sqlda->sqlvar[0].sqlind = nullptr;
+    sqlda->sqlvar[0].sqldata = nullptr;
 }
 
 static void enlargeDA(XSQLDA *&sqlda, int n)
@@ -94,14 +94,14 @@ static void initDA(XSQLDA *sqlda)
 	    break;
 	default:
 	    // not supported - do not bind.
-	    sqlda->sqlvar[i].sqldata = 0;
+	    sqlda->sqlvar[i].sqldata = nullptr;
 	    break;
 	}
 	if (sqlda->sqlvar[i].sqltype & 1) {
 	    sqlda->sqlvar[i].sqlind = (short*)malloc(sizeof(short));
 	    *(sqlda->sqlvar[i].sqlind) = 0;
 	} else {
-	    sqlda->sqlvar[i].sqlind = 0;
+	    sqlda->sqlvar[i].sqlind = nullptr;
 	}
     }
 }
@@ -115,7 +115,7 @@ static void delDA(XSQLDA *&sqlda)
 	free(sqlda->sqlvar[i].sqldata);
     }
     free(sqlda);
-    sqlda = 0;    
+    sqlda = nullptr;    
 }
 
 static TQVariant::Type qIBaseTypeName(int iType)
@@ -280,7 +280,7 @@ public:
 };
 
 TQIBaseResultPrivate::TQIBaseResultPrivate(TQIBaseResult *d, const TQIBaseDriver *ddb):
-    q(d), db(ddb), trans(0), stmt(0), ibase(ddb->d->ibase), sqlda(0), inda(0), queryType(-1)
+    q(d), db(ddb), trans(0), stmt(0), ibase(ddb->d->ibase), sqlda(nullptr), inda(nullptr), queryType(-1)
 {
     localTransaction = (ddb->d->ibase == 0);
 }
@@ -307,7 +307,7 @@ void TQIBaseResultPrivate::writeBlob(int i, const TQByteArray &ba)
 {
     isc_blob_handle handle = 0;
     ISC_QUAD *bId = (ISC_QUAD*)inda->sqlvar[i].sqldata;
-    isc_create_blob2(status, &ibase, &trans, &handle, bId, 0, 0);
+    isc_create_blob2(status, &ibase, &trans, &handle, bId, 0, nullptr);
     if (!isError("Unable to create BLOB", TQSqlError::Statement)) {
 	uint i = 0;
 	while (i < ba.size()) {
@@ -324,7 +324,7 @@ TQVariant TQIBaseResultPrivate::fetchBlob(ISC_QUAD *bId)
 {
     isc_blob_handle handle = 0;
 
-    isc_open_blob2(status, &ibase, &trans, &handle, bId, 0, 0);
+    isc_open_blob2(status, &ibase, &trans, &handle, bId, 0, nullptr);
     if (isError("Unable to open BLOB", TQSqlError::Statement))
 	return TQVariant();
 
@@ -455,7 +455,7 @@ bool TQIBaseResult::prepare(const TQString& query)
     setSelect(d->isSelect());
     if (!isSelect()) {
 	free(d->sqlda);
-	d->sqlda = 0;
+	d->sqlda = nullptr;
     }
 
     return true;
@@ -550,7 +550,7 @@ bool TQIBaseResult::exec()
     }
     if (d->sqlda)
 	init(d->sqlda->sqld);
-    isc_dsql_execute2(d->status, &d->trans, &d->stmt, 1, d->inda, 0);
+    isc_dsql_execute2(d->status, &d->trans, &d->stmt, 1, d->inda, nullptr);
     if (d->isError("Unable to execute query"))
 	return false;
 
@@ -599,10 +599,10 @@ bool TQIBaseResult::reset (const TQString& query)
 	init(d->sqlda->sqld);
     } else {
 	free(d->sqlda);
-	d->sqlda = 0;
+	d->sqlda = nullptr;
     }
     
-    isc_dsql_execute(d->status, &d->trans, &d->stmt, 1, 0);
+    isc_dsql_execute(d->status, &d->trans, &d->stmt, 1, nullptr);
     if (d->isError("Unable to execute query"))
 	return false;
 
diff --git a/src/sql/drivers/ibase/tqsql_ibase.h b/src/sql/drivers/ibase/tqsql_ibase.h
index 74eb58509..db80f9fc5 100644
--- a/src/sql/drivers/ibase/tqsql_ibase.h
+++ b/src/sql/drivers/ibase/tqsql_ibase.h
@@ -78,8 +78,8 @@ class TQIBaseDriver : public TQSqlDriver
     friend class TQIBaseResultPrivate;
     friend class TQIBaseResult;
 public:
-    TQIBaseDriver(TQObject *parent = 0, const char *name = 0);
-    TQIBaseDriver(void *connection, TQObject *parent = 0, const char *name = 0);
+    TQIBaseDriver(TQObject *parent = nullptr, const char *name = nullptr);
+    TQIBaseDriver(void *connection, TQObject *parent = nullptr, const char *name = nullptr);
     virtual ~TQIBaseDriver();
     bool hasFeature(DriverFeature f) const;
     bool open(const TQString & db,
diff --git a/src/sql/drivers/mysql/tqsql_mysql.cpp b/src/sql/drivers/mysql/tqsql_mysql.cpp
index ce911a519..27d5e8c21 100644
--- a/src/sql/drivers/mysql/tqsql_mysql.cpp
+++ b/src/sql/drivers/mysql/tqsql_mysql.cpp
@@ -89,14 +89,14 @@ bool TQMYSQLOpenExtension::open( const TQString& db,
 class TQMYSQLDriverPrivate
 {
 public:
-    TQMYSQLDriverPrivate() : mysql(0) {}
+    TQMYSQLDriverPrivate() : mysql(nullptr) {}
     MYSQL*     mysql;
 };
 
 class TQMYSQLResultPrivate : public TQMYSQLDriverPrivate
 {
 public:
-    TQMYSQLResultPrivate() : TQMYSQLDriverPrivate(), result(0) {}
+    TQMYSQLResultPrivate() : TQMYSQLDriverPrivate(), result(nullptr) {}
     MYSQL_RES* result;
     MYSQL_ROW  row;
     TQValueVector<TQVariant::Type> fieldTypes;
@@ -371,7 +371,7 @@ static void qServerInit()
 
     if (
 # if (MYSQL_VERSION_ID >= 40110 && MYSQL_VERSION_ID < 50000) || MYSQL_VERSION_ID >= 50003
-        mysql_library_init(0, 0, 0)
+        mysql_library_init(0, nullptr, nullptr)
 # else
         mysql_server_init(0, 0, 0)
 # endif
@@ -416,7 +416,7 @@ void TQMYSQLDriver::init()
 {
     tqSqlOpenExtDict()->insert( this, new TQMYSQLOpenExtension(this) );
     d = new TQMYSQLDriverPrivate();
-    d->mysql = 0;
+    d->mysql = nullptr;
     qMySqlConnectionCount++;
 }
 
@@ -653,7 +653,7 @@ TQSqlRecord TQMYSQLDriver::record( const TQString& tablename ) const
     TQSqlRecord fil;
     if ( !isOpen() )
 	return fil;
-    MYSQL_RES* r = mysql_list_fields( d->mysql, tablename.local8Bit().data(), 0);
+    MYSQL_RES* r = mysql_list_fields( d->mysql, tablename.local8Bit().data(), nullptr);
     if ( !r ) {
 	return fil;
     }
@@ -694,7 +694,7 @@ TQSqlRecordInfo TQMYSQLDriver::recordInfo( const TQString& tablename ) const
     TQSqlRecordInfo info;
     if ( !isOpen() )
 	return info;
-    MYSQL_RES* r = mysql_list_fields( d->mysql, tablename.local8Bit().data(), 0);
+    MYSQL_RES* r = mysql_list_fields( d->mysql, tablename.local8Bit().data(), nullptr);
     if ( !r ) {
 	return info;
     }
diff --git a/src/sql/drivers/mysql/tqsql_mysql.h b/src/sql/drivers/mysql/tqsql_mysql.h
index 880fa804f..6e5175e91 100644
--- a/src/sql/drivers/mysql/tqsql_mysql.h
+++ b/src/sql/drivers/mysql/tqsql_mysql.h
@@ -90,8 +90,8 @@ class TQ_EXPORT_SQLDRIVER_MYSQL TQMYSQLDriver : public TQSqlDriver
 {
     friend class TQMYSQLResult;
 public:
-    TQMYSQLDriver( TQObject * parent=0, const char * name=0 );
-    TQMYSQLDriver( MYSQL * con, TQObject * parent=0, const char * name=0 );
+    TQMYSQLDriver( TQObject * parent=nullptr, const char * name=nullptr );
+    TQMYSQLDriver( MYSQL * con, TQObject * parent=nullptr, const char * name=nullptr );
     ~TQMYSQLDriver();
     bool		hasFeature( DriverFeature f ) const;
     bool		open( const TQString & db,
diff --git a/src/sql/drivers/odbc/tqsql_odbc.cpp b/src/sql/drivers/odbc/tqsql_odbc.cpp
index 367aa7152..f896befd7 100644
--- a/src/sql/drivers/odbc/tqsql_odbc.cpp
+++ b/src/sql/drivers/odbc/tqsql_odbc.cpp
@@ -81,7 +81,7 @@ class TQODBCPrivate
 {
 public:
     TQODBCPrivate()
-    : hEnv(0), hDbc(0), hStmt(0), useSchema(false)
+    : hEnv(nullptr), hDbc(nullptr), hStmt(nullptr), useSchema(false)
     {
 	sql_char_type = sql_varchar_type = sql_longvarchar_type = TQVariant::CString;
 	unicode = false;
@@ -849,7 +849,7 @@ bool TQODBCResult::fetchLast()
 			SQL_ROW_NUMBER,
 			&currRow,
 			SQL_IS_INTEGER,
-			0 );
+			nullptr );
     if ( r != SQL_SUCCESS )
 	return false;
     setAt( currRow-1 );
@@ -1518,7 +1518,7 @@ void TQODBCDriver::cleanup()
 	if ( r != SQL_SUCCESS )
 	    qSqlWarning( "TQODBCDriver::cleanup: Unable to free connection handle", d );
 #endif
-	d->hDbc = 0;
+	d->hDbc = nullptr;
     }
 
     if ( d->hEnv ) {
@@ -1527,7 +1527,7 @@ void TQODBCDriver::cleanup()
 	if ( r != SQL_SUCCESS )
 	    qSqlWarning( "TQODBCDriver::cleanup: Unable to free environment handle", d );
 #endif
-	d->hEnv = 0;
+	d->hEnv = nullptr;
     }
 }
 
diff --git a/src/sql/drivers/odbc/tqsql_odbc.h b/src/sql/drivers/odbc/tqsql_odbc.h
index 9a1a377f1..440f10882 100644
--- a/src/sql/drivers/odbc/tqsql_odbc.h
+++ b/src/sql/drivers/odbc/tqsql_odbc.h
@@ -110,8 +110,8 @@ private:
 class TQ_EXPORT_SQLDRIVER_ODBC TQODBCDriver : public TQSqlDriver
 {
 public:
-    TQODBCDriver( TQObject * parent=0, const char * name=0 );
-    TQODBCDriver( SQLHANDLE env, SQLHANDLE con, TQObject * parent=0, const char * name=0 );
+    TQODBCDriver( TQObject * parent=nullptr, const char * name=nullptr );
+    TQODBCDriver( SQLHANDLE env, SQLHANDLE con, TQObject * parent=nullptr, const char * name=nullptr );
     ~TQODBCDriver();
     bool		hasFeature( DriverFeature f ) const;
     bool		open( const TQString & db,
diff --git a/src/sql/drivers/psql/tqsql_psql.cpp b/src/sql/drivers/psql/tqsql_psql.cpp
index 4197ba816..99b770d8a 100644
--- a/src/sql/drivers/psql/tqsql_psql.cpp
+++ b/src/sql/drivers/psql/tqsql_psql.cpp
@@ -70,7 +70,7 @@ TQPtrDict<TQSqlOpenExtension> *tqSqlOpenExtDict();
 class TQPSQLPrivate
 {
 public:
-  TQPSQLPrivate():connection(0), result(0), isUtf8(false) {}
+  TQPSQLPrivate():connection(nullptr), result(nullptr), isUtf8(false) {}
     PGconn	*connection;
     PGresult	*result;
     bool        isUtf8;
@@ -228,7 +228,7 @@ void TQPSQLResult::cleanup()
 {
     if ( d->result )
 	PQclear( d->result );
-    d->result = 0;
+    d->result = nullptr;
     setAt( -1 );
     currentSize = 0;
     setActive( false );
@@ -377,7 +377,7 @@ TQVariant TQPSQLResult::data( int i )
 	    while ( i < len ) {
 		if ( val.at( i ) == backslash ) {
 		    if ( val.at( i + 1 ).isDigit() ) {
-			ba[ index++ ] = (char)(val.mid( i + 1, 3 ).toInt( 0, 8 ));
+			ba[ index++ ] = (char)(val.mid( i + 1, 3 ).toInt( nullptr, 8 ));
 			i += 4;
 		    } else {
 			ba[ index++ ] = val.at( i + 1 );
@@ -675,7 +675,7 @@ void TQPSQLDriver::close()
     if ( isOpen() ) {
         if (d->connection)
 	    PQfinish( d->connection );
-	d->connection = 0;
+	d->connection = nullptr;
 	setOpen( false );
 	setOpenError( false );
     }
diff --git a/src/sql/drivers/psql/tqsql_psql.h b/src/sql/drivers/psql/tqsql_psql.h
index b2326d312..744448478 100644
--- a/src/sql/drivers/psql/tqsql_psql.h
+++ b/src/sql/drivers/psql/tqsql_psql.h
@@ -88,8 +88,8 @@ public:
 	Version73 = 9
     };
 
-    TQPSQLDriver( TQObject * parent=0, const char * name=0 );
-    TQPSQLDriver( PGconn * conn, TQObject * parent=0, const char * name=0 );
+    TQPSQLDriver( TQObject * parent=nullptr, const char * name=nullptr );
+    TQPSQLDriver( PGconn * conn, TQObject * parent=nullptr, const char * name=nullptr );
     ~TQPSQLDriver();
     bool		hasFeature( DriverFeature f ) const;
     bool		open( const TQString & db,
diff --git a/src/sql/drivers/sqlite/tqsql_sqlite.cpp b/src/sql/drivers/sqlite/tqsql_sqlite.cpp
index a0e78db91..e03e8b2bf 100644
--- a/src/sql/drivers/sqlite/tqsql_sqlite.cpp
+++ b/src/sql/drivers/sqlite/tqsql_sqlite.cpp
@@ -48,7 +48,7 @@ public:
     bool utf8;
 };
 
-TQSQLiteDriverPrivate::TQSQLiteDriverPrivate() : access(0)
+TQSQLiteDriverPrivate::TQSQLiteDriverPrivate() : access(nullptr)
 {
     utf8 = (qstrcmp(sqlite_encoding, "UTF-8") == 0);
 }
@@ -61,7 +61,7 @@ public:
     bool fetchNext(TQtSqlCachedResult::RowCache *row);
     bool isSelect();
     // initializes the recordInfo and the cache
-    void init(const char **cnames, int numCols, TQtSqlCachedResult::RowCache **row = 0);
+    void init(const char **cnames, int numCols, TQtSqlCachedResult::RowCache **row = nullptr);
     void finalize();
 
     TQSQLiteResult* q;
@@ -81,8 +81,8 @@ public:
 
 static const uint initial_cache_size = 128;
 
-TQSQLiteResultPrivate::TQSQLiteResultPrivate(TQSQLiteResult* res) : q(res), access(0), currentTail(0),
-    currentMachine(0), skippedStatus(false), skipRow(0), utf8(false)
+TQSQLiteResultPrivate::TQSQLiteResultPrivate(TQSQLiteResult* res) : q(res), access(nullptr), currentTail(nullptr),
+    currentMachine(nullptr), skippedStatus(false), skipRow(nullptr), utf8(false)
 {
 }
 
@@ -90,11 +90,11 @@ void TQSQLiteResultPrivate::cleanup()
 {
     finalize();
     rInf.clear();
-    currentTail = 0;
-    currentMachine = 0;
+    currentTail = nullptr;
+    currentMachine = nullptr;
     skippedStatus = false;
     delete skipRow;
-    skipRow = 0;
+    skipRow = nullptr;
     q->setAt(TQSql::BeforeFirst);
     q->setActive(false);
     q->cleanup();
@@ -105,13 +105,13 @@ void TQSQLiteResultPrivate::finalize()
     if (!currentMachine)
         return;
 
-    char* err = 0;
+    char* err = nullptr;
     int res = sqlite_finalize(currentMachine, &err);
     if (err) {
         q->setLastError(TQSqlError("Unable to fetch results", err, TQSqlError::Statement, res));
         sqlite_freemem(err);
     }
-    currentMachine = 0;
+    currentMachine = nullptr;
 }
 
 // called on first fetch
@@ -150,7 +150,7 @@ bool TQSQLiteResultPrivate::fetchNext(TQtSqlCachedResult::RowCache* row)
 	if (row)
 	    *row = *skipRow;
 	delete skipRow;
-	skipRow = 0;
+	skipRow = nullptr;
 	return skippedStatus;
     }
 
@@ -226,7 +226,7 @@ bool TQSQLiteResult::reset (const TQString& query)
 
     // Um, ok.  callback based so.... pass private static function for this.
     setSelect(false);
-    char *err = 0;
+    char *err = nullptr;
     int res = sqlite_compile(d->access,
                                 d->utf8 ? (const char*)query.utf8().data() : query.ascii(),
                                 &(d->currentTail),
@@ -243,7 +243,7 @@ bool TQSQLiteResult::reset (const TQString& query)
     }
     // we have to fetch one row to find out about
     // the structure of the result set
-    d->skippedStatus = d->fetchNext(0);
+    d->skippedStatus = d->fetchNext(nullptr);
     setSelect(!d->rInf.isEmpty());
     if (isSelect())
 	init(d->rInf.count());
@@ -316,12 +316,12 @@ bool TQSQLiteDriver::open(const TQString & db, const TQString &, const TQString
     if (db.isEmpty())
 	return false;
 
-    char* err = 0;
+    char* err = nullptr;
     d->access = sqlite_open(TQFile::encodeName(db), 0, &err);
     if (err) {
         setLastError(TQSqlError("Error to open database", err, TQSqlError::Connection));
         sqlite_freemem(err);
-        err = 0;
+        err = nullptr;
     }
 
     if (d->access) {
@@ -337,7 +337,7 @@ void TQSQLiteDriver::close()
 {
     if (isOpen()) {
         sqlite_close(d->access);
-        d->access = 0;
+        d->access = nullptr;
         setOpen(false);
         setOpenError(false);
     }
@@ -365,7 +365,7 @@ bool TQSQLiteDriver::beginTransaction()
         return false;
 
     char* err;
-    int res = sqlite_exec(d->access, "BEGIN", 0, this, &err);
+    int res = sqlite_exec(d->access, "BEGIN", nullptr, this, &err);
 
     if (res == SQLITE_OK)
         return true;
@@ -381,7 +381,7 @@ bool TQSQLiteDriver::commitTransaction()
         return false;
 
     char* err;
-    int res = sqlite_exec(d->access, "COMMIT", 0, this, &err);
+    int res = sqlite_exec(d->access, "COMMIT", nullptr, this, &err);
 
     if (res == SQLITE_OK)
         return true;
@@ -397,7 +397,7 @@ bool TQSQLiteDriver::rollbackTransaction()
         return false;
 
     char* err;
-    int res = sqlite_exec(d->access, "ROLLBACK", 0, this, &err);
+    int res = sqlite_exec(d->access, "ROLLBACK", nullptr, this, &err);
 
     if (res == SQLITE_OK)
         return true;
diff --git a/src/sql/drivers/sqlite/tqsql_sqlite.h b/src/sql/drivers/sqlite/tqsql_sqlite.h
index d1b66df22..ae77c0dd6 100644
--- a/src/sql/drivers/sqlite/tqsql_sqlite.h
+++ b/src/sql/drivers/sqlite/tqsql_sqlite.h
@@ -56,8 +56,8 @@ class TQSQLiteDriver : public TQSqlDriver
 {
     friend class TQSQLiteResult;
 public:
-    TQSQLiteDriver(TQObject *parent = 0, const char *name = 0);
-    TQSQLiteDriver(sqlite *connection, TQObject *parent = 0, const char *name = 0);
+    TQSQLiteDriver(TQObject *parent = nullptr, const char *name = nullptr);
+    TQSQLiteDriver(sqlite *connection, TQObject *parent = nullptr, const char *name = nullptr);
     ~TQSQLiteDriver();
     bool hasFeature(DriverFeature f) const;
     bool open(const TQString & db,
diff --git a/src/sql/drivers/sqlite3/tqsql_sqlite3.cpp b/src/sql/drivers/sqlite3/tqsql_sqlite3.cpp
index a3ce63e35..c102a6b64 100644
--- a/src/sql/drivers/sqlite3/tqsql_sqlite3.cpp
+++ b/src/sql/drivers/sqlite3/tqsql_sqlite3.cpp
@@ -59,7 +59,7 @@ public:
     bool utf8;
 };
 
-TQSQLite3DriverPrivate::TQSQLite3DriverPrivate() : access(0)
+TQSQLite3DriverPrivate::TQSQLite3DriverPrivate() : access(nullptr)
 {
     utf8 = true;
 }
@@ -72,7 +72,7 @@ public:
     bool fetchNext(TQtSqlCachedResult::RowCache *row);
     bool isSelect();
     // initializes the recordInfo and the cache
-    void initColumns(TQtSqlCachedResult::RowCache **row = 0);
+    void initColumns(TQtSqlCachedResult::RowCache **row = nullptr);
     void finalize();
 
     TQSQLite3Result* q;
@@ -89,8 +89,8 @@ public:
 
 static const uint initial_cache_size = 128;
 
-TQSQLite3ResultPrivate::TQSQLite3ResultPrivate(TQSQLite3Result* res) : q(res), access(0),
-    stmt(0), skippedStatus(false), skipRow(0), utf8(false)
+TQSQLite3ResultPrivate::TQSQLite3ResultPrivate(TQSQLite3Result* res) : q(res), access(nullptr),
+    stmt(nullptr), skippedStatus(false), skipRow(nullptr), utf8(false)
 {
 }
 
@@ -100,7 +100,7 @@ void TQSQLite3ResultPrivate::cleanup()
     rInf.clear();
     skippedStatus = false;
     delete skipRow;
-    skipRow = 0;
+    skipRow = nullptr;
     q->setAt(TQSql::BeforeFirst);
     q->setActive(false);
     q->cleanup();
@@ -112,7 +112,7 @@ void TQSQLite3ResultPrivate::finalize()
         return;
 
     sqlite3_finalize(stmt);
-    stmt = 0;
+    stmt = nullptr;
 }
 
 // called on first fetch
@@ -151,7 +151,7 @@ bool TQSQLite3ResultPrivate::fetchNext(TQtSqlCachedResult::RowCache* row)
 	if (row)
 	    *row = *skipRow;
 	delete skipRow;
-	skipRow = 0;
+	skipRow = nullptr;
 	return skippedStatus;
     }
 
@@ -226,7 +226,7 @@ bool TQSQLite3Result::reset (const TQString &query)
     setSelect(false);
 
     int res = sqlite3_prepare(d->access, query.utf8().data(), (query.length() + 1) * sizeof(TQChar),
-                                &d->stmt, 0);
+                                &d->stmt, nullptr);
 
     if (res != SQLITE_OK) {
         setLastError(qMakeError(d->access, "Unable to execute statement", TQSqlError::Statement, res));
@@ -234,7 +234,7 @@ bool TQSQLite3Result::reset (const TQString &query)
         return false;
     }
 
-    d->skippedStatus = d->fetchNext(0);
+    d->skippedStatus = d->fetchNext(nullptr);
 
     setSelect(!d->rInf.isEmpty());
     setActive(true);
@@ -322,7 +322,7 @@ void TQSQLite3Driver::close()
         if (sqlite3_close(d->access) != SQLITE_OK)
             setLastError(qMakeError(d->access, "Error closing database",
                                     TQSqlError::Connection));
-        d->access = 0;
+        d->access = nullptr;
         setOpen(false);
         setOpenError(false);
     }
diff --git a/src/sql/drivers/sqlite3/tqsql_sqlite3.h b/src/sql/drivers/sqlite3/tqsql_sqlite3.h
index a9f1d711a..8be9dca4c 100644
--- a/src/sql/drivers/sqlite3/tqsql_sqlite3.h
+++ b/src/sql/drivers/sqlite3/tqsql_sqlite3.h
@@ -56,8 +56,8 @@ class TQSQLite3Driver : public TQSqlDriver
 {
     friend class TQSQLite3Result;
 public:
-    TQSQLite3Driver(TQObject *parent = 0, const char *name = 0);
-    TQSQLite3Driver(sqlite3 *connection, TQObject *parent = 0, const char *name = 0);
+    TQSQLite3Driver(TQObject *parent = nullptr, const char *name = nullptr);
+    TQSQLite3Driver(sqlite3 *connection, TQObject *parent = nullptr, const char *name = nullptr);
     ~TQSQLite3Driver();
     bool hasFeature(DriverFeature f) const;
     bool open(const TQString & db,
diff --git a/src/sql/tqdatabrowser.h b/src/sql/tqdatabrowser.h
index 3fd8e9756..1c9308cf2 100644
--- a/src/sql/tqdatabrowser.h
+++ b/src/sql/tqdatabrowser.h
@@ -71,7 +71,7 @@ class TQ_EXPORT TQDataBrowser : public TQWidget
     TQ_PROPERTY( bool autoEdit READ autoEdit WRITE setAutoEdit )
 
 public:
-    TQDataBrowser( TQWidget* parent=0, const char* name=0, WFlags fl = 0 );
+    TQDataBrowser( TQWidget* parent=nullptr, const char* name=nullptr, WFlags fl = 0 );
     ~TQDataBrowser();
 
     enum Boundary {
diff --git a/src/sql/tqdatatable.cpp b/src/sql/tqdatatable.cpp
index cef756b00..cc88aba38 100644
--- a/src/sql/tqdatatable.cpp
+++ b/src/sql/tqdatatable.cpp
@@ -64,13 +64,13 @@ public:
 	: nullTxtChanged( false ),
 	  haveAllRows( false ),
 	  continuousEdit( false ),
-	  editorFactory( 0 ),
-	  propertyMap( 0 ),
+	  editorFactory( nullptr ),
+	  propertyMap( nullptr ),
 	  editRow( -1 ),
 	  editCol( -1 ),
 	  insertRowLast( -1 ),
 	  insertPreRows( -1 ),
-	  editBuffer( 0 ),
+	  editBuffer( nullptr ),
 	  cancelMode( false ),
 	  cancelInsert( false ),
 	  cancelUpdate( false )
@@ -627,15 +627,15 @@ bool TQDataTable::confirmCancels() const
 TQWidget * TQDataTable::createEditor( int , int col, bool initFromCell ) const
 {
     if ( d->dat.mode() == TQSql::None )
-	return 0;
+	return nullptr;
 
-    TQSqlEditorFactory * f = (d->editorFactory == 0) ?
+    TQSqlEditorFactory * f = (!d->editorFactory) ?
 		     TQSqlEditorFactory::defaultFactory() : d->editorFactory;
 
-    TQSqlPropertyMap * m = (d->propertyMap == 0) ?
+    TQSqlPropertyMap * m = (!d->propertyMap) ?
 			  TQSqlPropertyMap::defaultMap() : d->propertyMap;
 
-    TQWidget * w = 0;
+    TQWidget * w = nullptr;
     if( initFromCell && d->editBuffer ){
 	w = f->createEditor( viewport(), d->editBuffer->field( indexOf( col ) ) );
 	if ( w )
@@ -826,11 +826,11 @@ TQWidget* TQDataTable::beginEdit ( int row, int col, bool replace )
     d->editRow = -1;
     d->editCol = -1;
     if ( !sqlCursor() )
-	return 0;
+	return nullptr;
     if ( d->dat.mode() == TQSql::Insert && !sqlCursor()->canInsert() )
-	return 0;
+	return nullptr;
     if ( d->dat.mode() == TQSql::Update && !sqlCursor()->canUpdate() )
-	return 0;
+	return nullptr;
     d->editRow = row;
     d->editCol = col;
     if ( d->continuousEdit ) {
@@ -843,7 +843,7 @@ TQWidget* TQDataTable::beginEdit ( int row, int col, bool replace )
     }
     if ( d->dat.mode() == TQSql::None && sqlCursor()->canUpdate() && sqlCursor()->primaryIndex().count() > 0 )
 	return beginUpdate( row, col, replace );
-    return 0;
+    return nullptr;
 }
 
 /*! \reimp */
@@ -857,7 +857,7 @@ void TQDataTable::endEdit( int row, int col, bool, bool )
     if ( d->cancelMode )
 	return;
     if ( d->dat.mode() != TQSql::None && d->editBuffer ) {
-	TQSqlPropertyMap * m = (d->propertyMap == 0) ?
+	TQSqlPropertyMap * m = (!d->propertyMap) ?
 			      TQSqlPropertyMap::defaultMap() : d->propertyMap;
 	d->editBuffer->setValue( indexOf( col ),  m->property( editor ) );
 	clearCellWidget( row, col );
@@ -918,7 +918,7 @@ void TQDataTable::endInsert()
     if ( d->dat.mode() != TQSql::Insert )
 	return;
     d->dat.setMode( TQSql::None );
-    d->editBuffer = 0;
+    d->editBuffer = nullptr;
     verticalHeader()->setLabel( d->editRow, TQString::number( d->editRow +1 ) );
     d->editRow = -1;
     d->editCol = -1;
@@ -936,7 +936,7 @@ void TQDataTable::endInsert()
 void TQDataTable::endUpdate()
 {
     d->dat.setMode( TQSql::None );
-    d->editBuffer = 0;
+    d->editBuffer = nullptr;
     updateRow( d->editRow );
     d->editRow = -1;
     d->editCol = -1;
@@ -1016,7 +1016,7 @@ bool TQDataTable::beginInsert()
 TQWidget* TQDataTable::beginUpdate ( int row, int col, bool replace )
 {
     if ( !sqlCursor() || isReadOnly() || isColumnReadOnly( col ) )
-	return 0;
+	return nullptr;
     setCurrentCell( row, col );
     d->dat.setMode( TQSql::Update );
     if ( sqlCursor()->seek( row ) ) {
@@ -1025,7 +1025,7 @@ TQWidget* TQDataTable::beginUpdate ( int row, int col, bool replace )
 	emit primeUpdate( d->editBuffer );
 	return TQTable::beginEdit( row, col, replace );
     }
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -1846,7 +1846,7 @@ void TQDataTable::setSize( TQSqlCursor* sql )
 void TQDataTable::setSqlCursor( TQSqlCursor* cursor, bool autoPopulate, bool autoDelete )
 {
     setUpdatesEnabled( false );
-    d->cur.setCursor( 0 );
+    d->cur.setCursor( nullptr );
     if ( cursor ) {
 	d->cur.setCursor( cursor, autoDelete );
 	if ( autoPopulate ) {
@@ -1919,7 +1919,7 @@ void TQDataTable::resizeData ( int )
 
 TQTableItem * TQDataTable::item ( int, int ) const
 {
-    return 0;
+    return nullptr;
 }
 
 /*!  \reimp
@@ -2019,9 +2019,9 @@ void TQDataTable::updateCurrentSelection()
 TQSqlRecord* TQDataTable::currentRecord() const
 {
     if ( !sqlCursor() || currentRow() < 0 )
-	return 0;
+	return nullptr;
     if ( !sqlCursor()->seek( currentRow() ) )
-	return 0;
+	return nullptr;
     return sqlCursor();
 }
 
@@ -2082,7 +2082,7 @@ void TQDataTable::refresh( TQDataTable::Refresh mode )
 	setNumCols( 0 );
 	d->colIndex.clear();
 	if ( d->fld.count() ) {
-	    TQSqlField* field = 0;
+	    TQSqlField* field = nullptr;
 	    int i;
 	    int fpos = -1;
 	    for ( i = 0; i < (int)d->fld.count(); ++i ) {
diff --git a/src/sql/tqdatatable.h b/src/sql/tqdatatable.h
index c287ec042..c56239aad 100644
--- a/src/sql/tqdatatable.h
+++ b/src/sql/tqdatatable.h
@@ -85,8 +85,8 @@ class TQM_EXPORT_SQL TQDataTable : public TQTable
     TQ_PROPERTY( int numRows READ numRows )
 
 public:
-    TQDataTable ( TQWidget* parent=0, const char* name=0 );
-    TQDataTable ( TQSqlCursor* cursor, bool autoPopulate = false, TQWidget* parent=0, const char* name=0 );
+    TQDataTable ( TQWidget* parent=nullptr, const char* name=nullptr );
+    TQDataTable ( TQSqlCursor* cursor, bool autoPopulate = false, TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQDataTable();
 
     virtual void addColumn( const TQString& fieldName,
@@ -113,7 +113,7 @@ public:
     TQString      filter() const;
     TQStringList  sort() const;
 
-    virtual void setSqlCursor( TQSqlCursor* cursor = 0,
+    virtual void setSqlCursor( TQSqlCursor* cursor = nullptr,
 			    bool autoPopulate = false, bool autoDelete = false );
     TQSqlCursor* sqlCursor() const;
 
diff --git a/src/sql/tqdataview.h b/src/sql/tqdataview.h
index 3763b70da..8d3035f4c 100644
--- a/src/sql/tqdataview.h
+++ b/src/sql/tqdataview.h
@@ -62,7 +62,7 @@ class TQM_EXPORT_SQL TQDataView : public TQWidget
     TQ_OBJECT
 
 public:
-    TQDataView( TQWidget* parent=0, const char* name=0, WFlags fl = 0 );
+    TQDataView( TQWidget* parent=nullptr, const char* name=nullptr, WFlags fl = 0 );
     ~TQDataView();
 
     virtual void setForm( TQSqlForm* form );
diff --git a/src/sql/tqeditorfactory.cpp b/src/sql/tqeditorfactory.cpp
index 6c1cf4a60..b14c4fb18 100644
--- a/src/sql/tqeditorfactory.cpp
+++ b/src/sql/tqeditorfactory.cpp
@@ -87,7 +87,7 @@ TQEditorFactory::~TQEditorFactory()
 
 }
 
-static TQEditorFactory * defaultfactory = 0;
+static TQEditorFactory * defaultfactory = nullptr;
 static TQCleanupHandler< TQEditorFactory > q_cleanup_editor_factory;
 
 /*!
@@ -96,7 +96,7 @@ static TQCleanupHandler< TQEditorFactory > q_cleanup_editor_factory;
 
 TQEditorFactory * TQEditorFactory::defaultFactory()
 {
-    if( defaultfactory == 0 ){
+    if( !defaultfactory ){
 	defaultfactory = new TQEditorFactory();
 	q_cleanup_editor_factory.add( &defaultfactory );
     }
@@ -112,9 +112,9 @@ TQEditorFactory * TQEditorFactory::defaultFactory()
 
 void TQEditorFactory::installDefaultFactory( TQEditorFactory * factory )
 {
-    if( factory == 0 || factory == defaultfactory ) return;
+    if( !factory || factory == defaultfactory ) return;
 
-    if( defaultfactory != 0 ){
+    if( defaultfactory ){
 	q_cleanup_editor_factory.remove( &defaultfactory );
 	delete defaultfactory;
     }
@@ -130,10 +130,10 @@ void TQEditorFactory::installDefaultFactory( TQEditorFactory * factory )
 
 TQWidget * TQEditorFactory::createEditor( TQWidget * parent, const TQVariant & v )
 {
-    TQWidget * w = 0;
+    TQWidget * w = nullptr;
     switch( v.type() ){
 	case TQVariant::Invalid:
-	    w = 0;
+	    w = nullptr;
 	    break;
 	case TQVariant::Bool:
 	    w = new TQComboBox( parent, "qt_editor_bool" );
diff --git a/src/sql/tqeditorfactory.h b/src/sql/tqeditorfactory.h
index fe290ad85..19908efd3 100644
--- a/src/sql/tqeditorfactory.h
+++ b/src/sql/tqeditorfactory.h
@@ -57,7 +57,7 @@
 class TQM_EXPORT_SQL TQEditorFactory : public TQObject
 {
 public:
-    TQEditorFactory ( TQObject * parent = 0, const char * name = 0 );
+    TQEditorFactory ( TQObject * parent = nullptr, const char * name = nullptr );
     ~TQEditorFactory();
     
     virtual TQWidget * createEditor( TQWidget * parent, const TQVariant & v );
diff --git a/src/sql/tqsqlcursor.cpp b/src/sql/tqsqlcursor.cpp
index 5950b79e9..d2530bfa3 100644
--- a/src/sql/tqsqlcursor.cpp
+++ b/src/sql/tqsqlcursor.cpp
@@ -53,7 +53,7 @@ class TQSqlCursorPrivate
 public:
 
     TQSqlCursorPrivate( const TQString& name, TQSqlDatabase* sdb )
-	: lastAt( TQSql::BeforeFirst ), nm( name ), srt( name ), md( 0 ), db( sdb ), q( 0 )
+	: lastAt( TQSql::BeforeFirst ), nm( name ), srt( name ), md( 0 ), db( sdb ), q( nullptr )
     {}
     ~TQSqlCursorPrivate()
     {
@@ -63,7 +63,7 @@ public:
     TQSqlQuery* query()
     {
 	if ( !q )
-	    q = new TQSqlQuery( 0, db );
+	    q = new TQSqlQuery( nullptr, db );
 	return q;
     }
     
@@ -301,7 +301,7 @@ TQSqlCursor::TQSqlCursor( const TQSqlCursor & other )
     d->priIndx = other.d->priIndx;
     d->editBuffer = other.d->editBuffer;
     d->infoBuffer = other.d->infoBuffer;
-    d->q = 0; // do not share queries
+    d->q = nullptr; // do not share queries
     setMode( other.mode() );
 }
 
@@ -331,7 +331,7 @@ TQSqlCursor& TQSqlCursor::operator=( const TQSqlCursor& other )
     d->priIndx = other.d->priIndx;
     d->editBuffer = other.d->editBuffer;
     d->infoBuffer = other.d->infoBuffer;
-    d->q = 0; // do not share queries
+    d->q = nullptr; // do not share queries
     setMode( other.mode() );
     return *this;
 }
@@ -1351,7 +1351,7 @@ int TQSqlCursor::apply( const TQString& q, bool invalidate )
 int TQSqlCursor::applyPrepared( const TQString& q, bool invalidate )
 {
     int ar = 0;
-    TQSqlQuery* sql = 0;
+    TQSqlQuery* sql = nullptr;
     
     if ( invalidate ) {
 	sql = (TQSqlQuery*)this;
diff --git a/src/sql/tqsqlcursor.h b/src/sql/tqsqlcursor.h
index 35a06daef..bc5e2a5ae 100644
--- a/src/sql/tqsqlcursor.h
+++ b/src/sql/tqsqlcursor.h
@@ -62,7 +62,7 @@ class TQSqlCursorPrivate;
 class TQM_EXPORT_SQL TQSqlCursor : public TQSqlRecord, public TQSqlQuery
 {
 public:
-    TQSqlCursor( const TQString & name = TQString::null, bool autopopulate = true, TQSqlDatabase* db = 0 );
+    TQSqlCursor( const TQString & name = TQString::null, bool autopopulate = true, TQSqlDatabase* db = nullptr );
     TQSqlCursor( const TQSqlCursor & other );
     TQSqlCursor& operator=( const TQSqlCursor& other );
     ~TQSqlCursor();
diff --git a/src/sql/tqsqldatabase.cpp b/src/sql/tqsqldatabase.cpp
index 4734c2d09..f7abf0a7a 100644
--- a/src/sql/tqsqldatabase.cpp
+++ b/src/sql/tqsqldatabase.cpp
@@ -89,8 +89,8 @@
 
 const char * const TQSqlDatabase::defaultConnection = "qt_sql_default_connection";
 
-TQPtrDict<TQSqlDriverExtension> *qt_driver_extension_dict = 0;
-TQPtrDict<TQSqlOpenExtension> *qt_open_extension_dict = 0;
+TQPtrDict<TQSqlDriverExtension> *qt_driver_extension_dict = nullptr;
+TQPtrDict<TQSqlOpenExtension> *qt_open_extension_dict = nullptr;
 
 static TQSingleCleanupHandler< TQPtrDict<TQSqlDriverExtension> > qt_driver_ext_cleanup;
 static TQSingleCleanupHandler< TQPtrDict<TQSqlOpenExtension> > qt_open_ext_cleanup;
@@ -159,7 +159,7 @@ typedef TQDict<TQSqlDriverCreatorBase> TQDriverDict;
 class TQSqlDatabaseManager : public TQObject
 {
 public:
-    TQSqlDatabaseManager( TQObject * parent = 0, const char * name = 0 );
+    TQSqlDatabaseManager( TQObject * parent = nullptr, const char * name = nullptr );
     ~TQSqlDatabaseManager();
     static TQSqlDatabase* database( const TQString& name, bool open );
     static TQSqlDatabase* addDatabase( TQSqlDatabase* db, const TQString & name );
@@ -179,7 +179,7 @@ protected:
 */
 
 TQSqlDatabaseManager::TQSqlDatabaseManager( TQObject * parent, const char * name )
-    : TQObject( parent, name ), dbDict( 1 ), drDict( 0 )
+    : TQObject( parent, name ), dbDict( 1 ), drDict( nullptr )
 {
 }
 
@@ -219,12 +219,12 @@ TQDriverDict* TQSqlDatabaseManager::driverDict()
 */
 TQSqlDatabaseManager* TQSqlDatabaseManager::instance()
 {
-    static TQGuardedPtr<TQSqlDatabaseManager> sqlConnection = 0;
+    static TQGuardedPtr<TQSqlDatabaseManager> sqlConnection = nullptr;
     if ( !sqlConnection ) {
-	if( tqApp == 0 ){
+	if( !tqApp ){
 	    tqFatal( "TQSqlDatabaseManager: A TQApplication object has to be "
 		    "instantiated in order to use the SQL module." );
-	    return 0;
+	    return nullptr;
 	}
 	sqlConnection = new TQSqlDatabaseManager( tqApp, "database manager" );
     }
@@ -240,7 +240,7 @@ TQSqlDatabaseManager* TQSqlDatabaseManager::instance()
 TQSqlDatabase* TQSqlDatabaseManager::database( const TQString& name, bool open )
 {
     if ( !contains( name ) )
-	return 0;
+	return nullptr;
 
     TQSqlDatabaseManager* sqlConnection = instance();
     TQSqlDatabase* db = sqlConnection->dbDict.find( name );
@@ -288,8 +288,8 @@ bool TQSqlDatabaseManager::contains( const TQString& name )
 TQSqlDatabase* TQSqlDatabaseManager::addDatabase( TQSqlDatabase* db, const TQString & name )
 {
     TQSqlDatabaseManager* sqlConnection = instance();
-    if( sqlConnection == 0 )
-	return 0;
+    if( !sqlConnection )
+	return nullptr;
     if ( contains( name ) )
 	sqlConnection->removeDatabase( name );
     sqlConnection->dbDict.insert( name, db );
@@ -344,9 +344,9 @@ class TQSqlDatabasePrivate
 {
 public:
     TQSqlDatabasePrivate():
-	driver(0),
+	driver(nullptr),
 #ifndef TQT_NO_COMPONENT
-	plugIns(0),
+	plugIns(nullptr),
 #endif
 	port(-1) {}
     ~TQSqlDatabasePrivate()
@@ -700,7 +700,7 @@ void TQSqlDatabase::init( const TQString& type, const TQString& )
 	d->plugIns =
 	    new TQPluginManager<TQSqlDriverFactoryInterface>( IID_QSqlDriverFactory, TQApplication::libraryPaths(), "/sqldrivers" );
 
-	TQInterfacePtr<TQSqlDriverFactoryInterface> iface = 0;
+	TQInterfacePtr<TQSqlDriverFactoryInterface> iface = nullptr;
 	d->plugIns->queryInterface( type, &iface );
 	if( iface )
 	    d->driver = iface->create( type );
diff --git a/src/sql/tqsqldatabase.h b/src/sql/tqsqldatabase.h
index 1629b8ad4..649a4eaa5 100644
--- a/src/sql/tqsqldatabase.h
+++ b/src/sql/tqsqldatabase.h
@@ -143,8 +143,8 @@ public:
     static bool 	 isDriverAvailable( const TQString& name );
     
 protected:
-    TQSqlDatabase( const TQString& type, const TQString& name, TQObject * parent=0, const char * objname=0 );
-    TQSqlDatabase( TQSqlDriver* driver, TQObject * parent=0, const char * objname=0 );
+    TQSqlDatabase( const TQString& type, const TQString& name, TQObject * parent=nullptr, const char * objname=nullptr );
+    TQSqlDatabase( TQSqlDriver* driver, TQObject * parent=nullptr, const char * objname=nullptr );
 private:
     void 	init( const TQString& type, const TQString& name );
     TQSqlDatabasePrivate* d;
diff --git a/src/sql/tqsqldriver.h b/src/sql/tqsqldriver.h
index 2d041d9ca..cfd400a89 100644
--- a/src/sql/tqsqldriver.h
+++ b/src/sql/tqsqldriver.h
@@ -73,7 +73,7 @@ public:
     enum DriverFeature { Transactions, QuerySize, BLOB, Unicode, PreparedQueries,
 			 NamedPlaceholders, PositionalPlaceholders };
 
-    TQSqlDriver( TQObject * parent=0, const char * name=0 );
+    TQSqlDriver( TQObject * parent=nullptr, const char * name=nullptr );
     ~TQSqlDriver();
     bool			isOpen() const;
     bool			isOpenError() const;
diff --git a/src/sql/tqsqldriverplugin.cpp b/src/sql/tqsqldriverplugin.cpp
index 9d0bb7090..7b7e4544d 100644
--- a/src/sql/tqsqldriverplugin.cpp
+++ b/src/sql/tqsqldriverplugin.cpp
@@ -111,7 +111,7 @@ TQSqlDriverPluginPrivate::~TQSqlDriverPluginPrivate()
 
 TQRESULT TQSqlDriverPluginPrivate::queryInterface( const TQUuid &iid, TQUnknownInterface **iface )
 {
-    *iface = 0;
+    *iface = nullptr;
 
     if ( iid == IID_QUnknown )
 	*iface = this;
diff --git a/src/sql/tqsqleditorfactory.cpp b/src/sql/tqsqleditorfactory.cpp
index 0f8d202c6..bae1c6ff0 100644
--- a/src/sql/tqsqleditorfactory.cpp
+++ b/src/sql/tqsqleditorfactory.cpp
@@ -92,7 +92,7 @@ TQSqlEditorFactory::~TQSqlEditorFactory()
 
 }
 
-static TQSqlEditorFactory * defaultfactory = 0;
+static TQSqlEditorFactory * defaultfactory = nullptr;
 static TQCleanupHandler< TQSqlEditorFactory > tqsql_cleanup_editor_factory;
 
 /*!
@@ -101,7 +101,7 @@ static TQCleanupHandler< TQSqlEditorFactory > tqsql_cleanup_editor_factory;
 
 TQSqlEditorFactory * TQSqlEditorFactory::defaultFactory()
 {
-    if( defaultfactory == 0 ){
+    if( !defaultfactory ){
 	defaultfactory = new TQSqlEditorFactory();
 	tqsql_cleanup_editor_factory.add( &defaultfactory );
     }
@@ -118,9 +118,9 @@ TQSqlEditorFactory * TQSqlEditorFactory::defaultFactory()
 
 void TQSqlEditorFactory::installDefaultFactory( TQSqlEditorFactory * factory )
 {
-    if( factory == 0 ) return;
+    if( !factory ) return;
 
-    if( defaultfactory != 0 ){
+    if( defaultfactory ){
 	tqsql_cleanup_editor_factory.remove( &defaultfactory );
 	delete defaultfactory;
     }
@@ -153,13 +153,13 @@ TQWidget * TQSqlEditorFactory::createEditor( TQWidget * parent,
 					   const TQSqlField * field )
 {    
     if ( !field ) {
-	return 0;
+	return nullptr;
     }
     
-    TQWidget * w = 0;
+    TQWidget * w = nullptr;
     switch( field->type() ){
 	case TQVariant::Invalid:
-	    w = 0;
+	    w = nullptr;
 	    break;
 	case TQVariant::Bool:
 	    w = new TQComboBox( parent, "qt_editor_bool" );
diff --git a/src/sql/tqsqleditorfactory.h b/src/sql/tqsqleditorfactory.h
index f80eb47fd..cca6665b4 100644
--- a/src/sql/tqsqleditorfactory.h
+++ b/src/sql/tqsqleditorfactory.h
@@ -58,7 +58,7 @@ class TQSqlField;
 class TQM_EXPORT_SQL TQSqlEditorFactory : public TQEditorFactory
 {
 public:
-    TQSqlEditorFactory ( TQObject * parent = 0, const char * name = 0 );
+    TQSqlEditorFactory ( TQObject * parent = nullptr, const char * name = nullptr );
     ~TQSqlEditorFactory();
     virtual TQWidget * createEditor( TQWidget * parent, const TQVariant & variant );
     virtual TQWidget * createEditor( TQWidget * parent, const TQSqlField * field );
diff --git a/src/sql/tqsqlform.cpp b/src/sql/tqsqlform.cpp
index 741df3a7a..c1184f7e7 100644
--- a/src/sql/tqsqlform.cpp
+++ b/src/sql/tqsqlform.cpp
@@ -52,7 +52,7 @@
 class TQSqlFormPrivate
 {
 public:
-    TQSqlFormPrivate() : propertyMap( 0 ), buf( 0 ), dirty( false ) {}
+    TQSqlFormPrivate() : propertyMap( nullptr ), buf( nullptr ), dirty( false ) {}
     ~TQSqlFormPrivate() { if ( propertyMap ) delete propertyMap; }
     TQStringList fld;
     TQDict<TQWidget> wgt;
@@ -270,12 +270,12 @@ TQWidget * TQSqlForm::widget( uint i ) const
     TQMap< TQWidget *, TQSqlField * >::ConstIterator it;
     uint cnt = 0;
 
-    if( i > d->map.count() ) return 0;
+    if( i > d->map.count() ) return nullptr;
     for( it = d->map.begin(); it != d->map.end(); ++it ){
 	if( cnt++ == i )
 	    return it.key();
     }
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -288,7 +288,7 @@ TQWidget * TQSqlForm::fieldToWidget( TQSqlField * field ) const
 	if( *it == field )
 	    return it.key();
     }
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -299,7 +299,7 @@ TQSqlField * TQSqlForm::widgetToField( TQWidget * widget ) const
     if( d->map.contains( widget ) )
 	return d->map[widget];
     else
-	return 0;
+	return nullptr;
 }
 
 /*!
@@ -311,7 +311,7 @@ void TQSqlForm::readFields()
     sync();
     TQSqlField * f;
     TQMap< TQWidget *, TQSqlField * >::Iterator it;
-    TQSqlPropertyMap * pmap = (d->propertyMap == 0) ?
+    TQSqlPropertyMap * pmap = (!d->propertyMap) ?
 			     TQSqlPropertyMap::defaultMap() : d->propertyMap;
     for(it = d->map.begin() ; it != d->map.end(); ++it ){
 	f = widgetToField( it.key() );
@@ -332,7 +332,7 @@ void TQSqlForm::writeFields()
     sync();
     TQSqlField * f;
     TQMap< TQWidget *, TQSqlField * >::Iterator it;
-    TQSqlPropertyMap * pmap = (d->propertyMap == 0) ?
+    TQSqlPropertyMap * pmap = (!d->propertyMap) ?
 			     TQSqlPropertyMap::defaultMap() : d->propertyMap;
 
     for(it = d->map.begin() ; it != d->map.end(); ++it ){
@@ -351,8 +351,8 @@ void TQSqlForm::writeFields()
 void TQSqlForm::readField( TQWidget * widget )
 {
     sync();
-    TQSqlField * field = 0;
-    TQSqlPropertyMap * pmap = (d->propertyMap == 0) ?
+    TQSqlField * field = nullptr;
+    TQSqlPropertyMap * pmap = (!d->propertyMap) ?
 			     TQSqlPropertyMap::defaultMap() : d->propertyMap;
     field = widgetToField( widget );
     if( field )
@@ -367,8 +367,8 @@ void TQSqlForm::readField( TQWidget * widget )
 void TQSqlForm::writeField( TQWidget * widget )
 {
     sync();
-    TQSqlField * field = 0;
-    TQSqlPropertyMap * pmap = (d->propertyMap == 0) ?
+    TQSqlField * field = nullptr;
+    TQSqlPropertyMap * pmap = (!d->propertyMap) ?
 			     TQSqlPropertyMap::defaultMap() : d->propertyMap;
     field = widgetToField( widget );
     if( field )
diff --git a/src/sql/tqsqlform.h b/src/sql/tqsqlform.h
index 35fc0228f..7721a1e8e 100644
--- a/src/sql/tqsqlform.h
+++ b/src/sql/tqsqlform.h
@@ -65,7 +65,7 @@ class TQM_EXPORT_SQL TQSqlForm : public TQObject
 {
     TQ_OBJECT
 public:
-    TQSqlForm( TQObject * parent = 0, const char * name = 0 );
+    TQSqlForm( TQObject * parent = nullptr, const char * name = nullptr );
     ~TQSqlForm();
 
     virtual void insert( TQWidget * widget, const TQString& field );
diff --git a/src/sql/tqsqlmanager_p.cpp b/src/sql/tqsqlmanager_p.cpp
index 75f37d239..7e2901266 100644
--- a/src/sql/tqsqlmanager_p.cpp
+++ b/src/sql/tqsqlmanager_p.cpp
@@ -57,7 +57,7 @@ class TQSqlCursorManagerPrivate
 {
 public:
     TQSqlCursorManagerPrivate()
-	: cur( 0 ), autoDelete( false )
+	: cur( nullptr ), autoDelete( false )
     {}
 
     TQString ftr;
@@ -475,7 +475,7 @@ bool TQSqlCursorManager::findBuffer( const TQSqlIndex& idx, int atHint )
 class TQSqlFormManagerPrivate
 {
 public:
-    TQSqlFormManagerPrivate() : frm(0), rcd(0) {}
+    TQSqlFormManagerPrivate() : frm(nullptr), rcd(nullptr) {}
     TQSqlForm* frm;
     TQSqlRecord* rcd;
 };
diff --git a/src/sql/tqsqlpropertymap.cpp b/src/sql/tqsqlpropertymap.cpp
index 55a9f6843..35a89edef 100644
--- a/src/sql/tqsqlpropertymap.cpp
+++ b/src/sql/tqsqlpropertymap.cpp
@@ -267,7 +267,7 @@ void TQSqlPropertyMap::remove( const TQString & classname )
     d->propertyMap.remove( classname );
 }
 
-static TQSqlPropertyMap * defaultmap = 0;
+static TQSqlPropertyMap * defaultmap = nullptr;
 static TQCleanupHandler< TQSqlPropertyMap > tqsql_cleanup_property_map;
 
 /*!
@@ -275,7 +275,7 @@ static TQCleanupHandler< TQSqlPropertyMap > tqsql_cleanup_property_map;
 */
 TQSqlPropertyMap * TQSqlPropertyMap::defaultMap()
 {
-    if( defaultmap == 0 ){
+    if( !defaultmap ){
 	defaultmap = new TQSqlPropertyMap();
 	tqsql_cleanup_property_map.add( &defaultmap );
     }
@@ -291,9 +291,9 @@ TQSqlPropertyMap * TQSqlPropertyMap::defaultMap()
 */
 void TQSqlPropertyMap::installDefaultMap( TQSqlPropertyMap * map )
 {
-    if( map == 0 ) return;
+    if( !map ) return;
 
-    if( defaultmap != 0 ){
+    if( defaultmap ){
 	tqsql_cleanup_property_map.remove( &defaultmap );
 	delete defaultmap;
     }
diff --git a/src/sql/tqsqlquery.cpp b/src/sql/tqsqlquery.cpp
index 394532d6e..7d41ab88d 100644
--- a/src/sql/tqsqlquery.cpp
+++ b/src/sql/tqsqlquery.cpp
@@ -77,7 +77,7 @@ In case a plugin gets unloaded the pointer to the sqlResult gets invalid
 void TQSqlResultShared::slotResultDestroyed()
 {
     delete sqlResult;
-    sqlResult = 0;
+    sqlResult = nullptr;
 }
 
 /*!
@@ -285,7 +285,7 @@ TQSqlQuery::TQSqlQuery( TQSqlDatabase* db )
 
 void TQSqlQuery::init( const TQString& query, TQSqlDatabase* db )
 {
-    d = new TQSqlResultShared( 0 );
+    d = new TQSqlResultShared( nullptr );
     TQSqlDatabase* database = db;
     if ( !database )
 	database = TQSqlDatabase::database( TQSqlDatabase::defaultConnection, false );
@@ -445,7 +445,7 @@ TQString TQSqlQuery::lastQuery() const
 const TQSqlDriver* TQSqlQuery::driver() const
 {
     if ( !d->sqlResult )
-	return 0;
+	return nullptr;
     return d->sqlResult->driver();
 }
 
@@ -871,7 +871,7 @@ void TQSqlQuery::deref()
 {
     if ( d->deref() ) {
 	delete d;
-	d = 0;
+	d = nullptr;
     }
 }
 
diff --git a/src/sql/tqsqlquery.h b/src/sql/tqsqlquery.h
index bfd36941f..297fd9d3b 100644
--- a/src/sql/tqsqlquery.h
+++ b/src/sql/tqsqlquery.h
@@ -73,7 +73,7 @@ class TQ_EXPORT TQSqlQuery
 {
 public:
     TQSqlQuery( TQSqlResult * r );
-    TQSqlQuery( const TQString& query = TQString::null, TQSqlDatabase* db = 0 );
+    TQSqlQuery( const TQString& query = TQString::null, TQSqlDatabase* db = nullptr );
     explicit TQSqlQuery( TQSqlDatabase* db );
     TQSqlQuery( const TQSqlQuery& other );
     TQSqlQuery& operator=( const TQSqlQuery& other );
diff --git a/src/sql/tqsqlrecord.cpp b/src/sql/tqsqlrecord.cpp
index ad8773a9d..feb5cb3ff 100644
--- a/src/sql/tqsqlrecord.cpp
+++ b/src/sql/tqsqlrecord.cpp
@@ -130,7 +130,7 @@ public:
     {
 	if ( i < (int)fi.count() )
 	    return &fi[i];
-	return 0;
+	return nullptr;
     }
     uint count() const
     {
@@ -212,7 +212,7 @@ void TQSqlRecord::deref()
 {
     if ( sh->deref() ) {
 	delete sh;
-	sh = 0;
+	sh = nullptr;
     }
 }
 
@@ -318,7 +318,7 @@ TQSqlField* TQSqlRecord::field( int i )
 #ifdef QT_CHECK_RANGE
 	tqWarning( "TQSqlRecord::field: index out of range: %d", i );
 #endif
-	return 0;
+	return nullptr;
     }
     return &sh->d->fieldInfo( i )->field;
 }
@@ -334,7 +334,7 @@ TQSqlField* TQSqlRecord::field( const TQString& name )
 {
     checkDetach();
     if ( !sh->d->contains( position( name ) ) )
-	return 0;
+	return nullptr;
     return &sh->d->fieldInfo( position( name ) )->field;
 }
 
@@ -349,7 +349,7 @@ const TQSqlField* TQSqlRecord::field( int i ) const
 #ifdef QT_CHECK_RANGE
 	tqWarning( "TQSqlRecord::field: index out of range: %d", i  );
 #endif // QT_CHECK_RANGE
-	return 0;
+	return nullptr;
     }
     return &sh->d->fieldInfo( i )->field;
 }
@@ -364,7 +364,7 @@ const TQSqlField* TQSqlRecord::field( int i ) const
 const TQSqlField* TQSqlRecord::field( const TQString& name ) const
 {
     if( !sh->d->contains( position( name ) ) )
-	return 0;
+	return nullptr;
     return &sh->d->fieldInfo( position( name ) )->field;
 }
 
diff --git a/src/sql/tqsqlselectcursor.h b/src/sql/tqsqlselectcursor.h
index 37a3b9190..f990060c0 100644
--- a/src/sql/tqsqlselectcursor.h
+++ b/src/sql/tqsqlselectcursor.h
@@ -58,7 +58,7 @@ class TQSqlSelectCursorPrivate;
 class TQM_EXPORT_SQL TQSqlSelectCursor : public TQSqlCursor
 {
 public:
-    TQSqlSelectCursor( const TQString& query = TQString::null, TQSqlDatabase* db = 0 );
+    TQSqlSelectCursor( const TQString& query = TQString::null, TQSqlDatabase* db = nullptr );
     TQSqlSelectCursor( const TQSqlSelectCursor& other );
     ~TQSqlSelectCursor();
     bool exec( const TQString& query );
@@ -76,10 +76,10 @@ protected:
     void clear() {}
     void setGenerated( const TQString&, bool ) {}
     void setGenerated( int, bool ) {}
-    TQSqlRecord*	editBuffer( bool = false ) { return 0; }
-    TQSqlRecord*	primeInsert() { return 0; }
-    TQSqlRecord*	primeUpdate() { return 0; }
-    TQSqlRecord*	primeDelete() { return 0; }
+    TQSqlRecord*	editBuffer( bool = false ) { return nullptr; }
+    TQSqlRecord*	primeInsert() { return nullptr; }
+    TQSqlRecord*	primeUpdate() { return nullptr; }
+    TQSqlRecord*	primeDelete() { return nullptr; }
     int	insert( bool = true ) { return 0; }
     int	update( bool = true ) { return 0; }
     int	del( bool = true ) { return 0; }
diff --git a/src/styles/tqcdestyle.h b/src/styles/tqcdestyle.h
index c31559ea7..a4241e42e 100644
--- a/src/styles/tqcdestyle.h
+++ b/src/styles/tqcdestyle.h
@@ -62,7 +62,7 @@ public:
     TQCDEStyle( bool useHighlightCols = false );
     virtual ~TQCDEStyle();
 
-    int pixelMetric( PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = 0 ) const;
+    int pixelMetric( PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = nullptr ) const;
 
     void drawControl( ControlElement element,
 		      TQPainter *p,
@@ -72,7 +72,7 @@ public:
 		      const TQColorGroup &cg,
 		      SFlags how = Style_Default,
 		      const TQStyleOption& = TQStyleOption::Default,
-		      const TQWidget *widget = 0 ) const;
+		      const TQWidget *widget = nullptr ) const;
 
     void drawPrimitive( PrimitiveElement pe,
 			TQPainter *p,
diff --git a/src/styles/tqcommonstyle.cpp b/src/styles/tqcommonstyle.cpp
index b07f913f8..762e9fbcb 100644
--- a/src/styles/tqcommonstyle.cpp
+++ b/src/styles/tqcommonstyle.cpp
@@ -100,20 +100,20 @@
 // the active painter, if any... this is used as an optimzation to
 // avoid creating a painter if we have an active one (since
 // TQStyle::itemRect() needs a painter to operate correctly
-static TQPainter *activePainter = 0;
+static TQPainter *activePainter = nullptr;
 
 /*!
     Constructs a TQCommonStyle.
 */
 TQCommonStyle::TQCommonStyle() : TQStyle()
 {
-    activePainter = 0;
+    activePainter = nullptr;
 }
 
 /*! \reimp */
 TQCommonStyle::~TQCommonStyle()
 {
-    activePainter = 0;
+    activePainter = nullptr;
 }
 
 
@@ -167,7 +167,7 @@ static TQString TQWidget_static_string("TQWidget");
 static TQStyleControlElementData* TQStyleControlElementData_null = nullptr;
 static void tqt_style_control_element_data_null_cleanup() {
     delete TQStyleControlElementData_null;
-    TQStyleControlElementData_null =0;
+    TQStyleControlElementData_null =nullptr;
 }
 
 #include <tqmetaobject.h>
@@ -401,8 +401,8 @@ const TQStyleControlElementData &populateControlElementDataFromWidget(const TQWi
 			if (ceDataPrivate->isTQPushButton) {
 				const TQPushButton *button = static_cast<const TQPushButton*>(widget);
 				if (button) {
-					TQIconSet* iconSet = 0;
-					const TQPixmap* fgPixmap = 0;
+					TQIconSet* iconSet = nullptr;
+					const TQPixmap* fgPixmap = nullptr;
 					iconSet = button->iconSet();
 					fgPixmap = button->pixmap();
 					if (iconSet) {
@@ -419,7 +419,7 @@ const TQStyleControlElementData &populateControlElementDataFromWidget(const TQWi
 			if (ceDataPrivate->isTQToolButton) {
 				const TQToolButton *button = static_cast<const TQToolButton*>(widget);
 				if (button) {
-					const TQPixmap* fgPixmap = 0;
+					const TQPixmap* fgPixmap = nullptr;
 					ceData.iconSet = button->iconSet();
 					fgPixmap = button->pixmap();
 					if (fgPixmap) {
@@ -433,7 +433,7 @@ const TQStyleControlElementData &populateControlElementDataFromWidget(const TQWi
 			if (ceDataPrivate->isTQCheckBox) {
 				const TQCheckBox *button = static_cast<const TQCheckBox*>(widget);
 				if (button) {
-					const TQPixmap* fgPixmap = 0;
+					const TQPixmap* fgPixmap = nullptr;
 					fgPixmap = button->pixmap();
 					if (fgPixmap) {
 						ceData.fgPixmap = *fgPixmap;
@@ -443,7 +443,7 @@ const TQStyleControlElementData &populateControlElementDataFromWidget(const TQWi
 			if (ceDataPrivate->isTQRadioButton) {
 				const TQRadioButton *button = static_cast<const TQRadioButton*>(widget);
 				if (button) {
-					const TQPixmap* fgPixmap = 0;
+					const TQPixmap* fgPixmap = nullptr;
 					fgPixmap = button->pixmap();
 					if (fgPixmap) {
 						ceData.fgPixmap = *fgPixmap;
@@ -454,7 +454,7 @@ const TQStyleControlElementData &populateControlElementDataFromWidget(const TQWi
 				const TQButton *button = static_cast<const TQButton*>(widget);
 				if (button) {
 					ceData.text = button->text();
-					const TQPixmap* paletteBgPixmap = 0;
+					const TQPixmap* paletteBgPixmap = nullptr;
 					paletteBgPixmap = button->paletteBackgroundPixmap();
 					if (paletteBgPixmap) {
 						ceData.paletteBgPixmap = *paletteBgPixmap;
@@ -539,7 +539,7 @@ const TQStyleControlElementData &populateControlElementDataFromWidget(const TQWi
 				const TQHeader *header = static_cast<const TQHeader*>(widget);
 				if (header) {
 					int section = opt.headerSection();
-					TQIconSet* iconSet = 0;
+					TQIconSet* iconSet = nullptr;
 					iconSet = header->iconSet(section);
 					ceData.textLabel = header->label(section);
 					if (iconSet) {
@@ -963,7 +963,7 @@ void TQCommonStyle::drawPrimitive( PrimitiveElement pe,
 	break;
 
     case PE_StatusBarSection:
-	qDrawShadeRect( p, r, cg, true, 1, 0, 0 );
+	qDrawShadeRect( p, r, cg, true, 1, 0, nullptr );
 	break;
 
     case PE_ButtonCommand:
@@ -982,7 +982,7 @@ void TQCommonStyle::drawPrimitive( PrimitiveElement pe,
 	break;
 
     case PE_FocusRect: {
-	const TQColor *bg = 0;
+	const TQColor *bg = nullptr;
 
 	if (!opt.isDefault())
 	    bg = &opt.color();
@@ -1010,7 +1010,7 @@ void TQCommonStyle::drawPrimitive( PrimitiveElement pe,
     case PE_SpinWidgetPlus:
     case PE_SpinWidgetMinus: {
 	p->save();
-	int fw = pixelMetric( PM_DefaultFrameWidth, ceData, elementFlags, 0 );
+	int fw = pixelMetric( PM_DefaultFrameWidth, ceData, elementFlags, nullptr );
 	TQRect br;
 	br.setRect( r.x() + fw, r.y() + fw, r.width() - fw*2,
 		    r.height() - fw*2 );
@@ -1041,7 +1041,7 @@ void TQCommonStyle::drawPrimitive( PrimitiveElement pe,
 
     case PE_SpinWidgetUp:
     case PE_SpinWidgetDown: {
-	int fw = pixelMetric( PM_DefaultFrameWidth, ceData, elementFlags, 0 );
+	int fw = pixelMetric( PM_DefaultFrameWidth, ceData, elementFlags, nullptr );
 	TQRect br;
 	br.setRect( r.x() + fw, r.y() + fw, r.width() - fw*2,
 		    r.height() - fw*2 );
@@ -1121,17 +1121,17 @@ void TQCommonStyle::drawPrimitive( PrimitiveElement pe,
 	    int x = r.width() / 3;
 	    if ( r.height() > 4 ) {
 		qDrawShadePanel( p, x, 2, 3, r.height() - 4,
-				 cg, highlight, 1, 0 );
+				 cg, highlight, 1, nullptr );
 		qDrawShadePanel( p, x+3, 2, 3, r.height() - 4,
-				 cg, highlight, 1, 0 );
+				 cg, highlight, 1, nullptr );
 	    }
 	} else {
 	    if ( r.width() > 4 ) {
 		int y = r.height() / 3;
 		qDrawShadePanel( p, 2, y, r.width() - 4, 3,
-				 cg, highlight, 1, 0 );
+				 cg, highlight, 1, nullptr );
 		qDrawShadePanel( p, 2, y+3, r.width() - 4, 3,
-				 cg, highlight, 1, 0 );
+				 cg, highlight, 1, nullptr );
 	    }
 	}
 	p->restore();
@@ -1285,7 +1285,7 @@ void TQCommonStyle::drawPrimitive( PrimitiveElement pe,
 	break;
     }
 
-    activePainter = 0;
+    activePainter = nullptr;
 }
 
 void qt_style_erase_region(TQPainter* p, const TQRegion& region, const TQStyleControlElementData &ceData) {
@@ -1374,7 +1374,7 @@ void TQCommonStyle::drawControl( ControlElement element,
 	    }
 
 	    int tf=AlignVCenter | ShowPrefix;
-	    if ((!styleHint(SH_UnderlineAccelerator, ceData, elementFlags, TQStyleOption::Default, 0, widget)) || ((styleHint(SH_HideUnderlineAcceleratorWhenAltUp, ceData, elementFlags, TQStyleOption::Default, 0, widget)) && (!acceleratorsShown())))
+	    if ((!styleHint(SH_UnderlineAccelerator, ceData, elementFlags, TQStyleOption::Default, nullptr, widget)) || ((styleHint(SH_HideUnderlineAcceleratorWhenAltUp, ceData, elementFlags, TQStyleOption::Default, nullptr, widget)) && (!acceleratorsShown())))
 		tf |= NoAccel;
 
 #ifndef TQT_NO_ICONSET
@@ -1427,7 +1427,7 @@ void TQCommonStyle::drawControl( ControlElement element,
 	{
 #ifndef TQT_NO_CHECKBOX
 	    int alignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft;
-	    if ((!styleHint(SH_UnderlineAccelerator, ceData, elementFlags, TQStyleOption::Default, 0, widget)) || ((styleHint(SH_HideUnderlineAcceleratorWhenAltUp, ceData, elementFlags, TQStyleOption::Default, 0, widget)) && (!acceleratorsShown())))
+	    if ((!styleHint(SH_UnderlineAccelerator, ceData, elementFlags, TQStyleOption::Default, nullptr, widget)) || ((styleHint(SH_HideUnderlineAcceleratorWhenAltUp, ceData, elementFlags, TQStyleOption::Default, nullptr, widget)) && (!acceleratorsShown())))
 		alignment |= NoAccel;
 
 	    drawItem(p, r, alignment | AlignVCenter | ShowPrefix, cg,
@@ -1449,7 +1449,7 @@ void TQCommonStyle::drawControl( ControlElement element,
 	{
 #ifndef TQT_NO_RADIOBUTTON
 	    int alignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft;
-	    if ((!styleHint(SH_UnderlineAccelerator, ceData, elementFlags, TQStyleOption::Default, 0, widget)) || ((styleHint(SH_HideUnderlineAcceleratorWhenAltUp, ceData, elementFlags, TQStyleOption::Default, 0, widget)) && (!acceleratorsShown())))
+	    if ((!styleHint(SH_UnderlineAccelerator, ceData, elementFlags, TQStyleOption::Default, nullptr, widget)) || ((styleHint(SH_HideUnderlineAcceleratorWhenAltUp, ceData, elementFlags, TQStyleOption::Default, nullptr, widget)) && (!acceleratorsShown())))
 		alignment |= NoAccel;
 	    drawItem(p, r, alignment | AlignVCenter | ShowPrefix, cg,
 		     flags & Style_Enabled, (ceData.fgPixmap.isNull())?nullptr:&ceData.fgPixmap, ceData.text);
@@ -1516,10 +1516,10 @@ void TQCommonStyle::drawControl( ControlElement element,
 			      pixelMetric( TQStyle::PM_DefaultFrameWidth, ceData, elementFlags, widget ) );
 
 	    int alignment = AlignCenter | ShowPrefix;
-	    if ((!styleHint(SH_UnderlineAccelerator, ceData, elementFlags, TQStyleOption::Default, 0, widget)) || ((styleHint(SH_HideUnderlineAcceleratorWhenAltUp, ceData, elementFlags, TQStyleOption::Default, 0, widget)) && (!acceleratorsShown())))
+	    if ((!styleHint(SH_UnderlineAccelerator, ceData, elementFlags, TQStyleOption::Default, nullptr, widget)) || ((styleHint(SH_HideUnderlineAcceleratorWhenAltUp, ceData, elementFlags, TQStyleOption::Default, nullptr, widget)) && (!acceleratorsShown())))
 		alignment |= NoAccel;
 	    drawItem( p, tr, alignment, cg,
-		      flags & Style_Enabled, 0, t->text() );
+		      flags & Style_Enabled, nullptr, t->text() );
 
 	    if ( (flags & Style_HasFocus) && !t->text().isEmpty() )
 		drawPrimitive( PE_FocusRect, p, ceData, elementFlags, r, cg );
@@ -1631,11 +1631,11 @@ void TQCommonStyle::drawControl( ControlElement element,
     case CE_ProgressBarLabel:
 	{
 	    TQColor penColor = cg.highlightedText();
-	    TQColor *pcolor = 0;
+	    TQColor *pcolor = nullptr;
 	    if ( (elementFlags & CEF_CenterIndicator) && !(elementFlags & CEF_IndicatorFollowsStyle) &&
 		 ceData.currentStep*2 >= ceData.totalSteps )
 		pcolor = &penColor;
-	    drawItem(p, r, AlignCenter | SingleLine, cg, flags & Style_Enabled, 0,
+	    drawItem(p, r, AlignCenter | SingleLine, cg, flags & Style_Enabled, nullptr,
 		     ceData.progressText, -1, pcolor );
 	}
 	break;
@@ -1649,7 +1649,7 @@ void TQCommonStyle::drawControl( ControlElement element,
 
 	    TQMenuItem *mi = opt.menuItem();
 	    int alignment = AlignCenter|ShowPrefix|DontClip|SingleLine;
-	    if ((!styleHint(SH_UnderlineAccelerator, ceData, elementFlags, TQStyleOption::Default, 0, widget)) || ((styleHint(SH_HideUnderlineAcceleratorWhenAltUp, ceData, elementFlags, TQStyleOption::Default, 0, widget)) && (!acceleratorsShown())))
+	    if ((!styleHint(SH_UnderlineAccelerator, ceData, elementFlags, TQStyleOption::Default, nullptr, widget)) || ((styleHint(SH_HideUnderlineAcceleratorWhenAltUp, ceData, elementFlags, TQStyleOption::Default, nullptr, widget)) && (!acceleratorsShown())))
 		alignment |= NoAccel;
 	    drawItem( p, r, alignment, cg,
 		      flags & Style_Enabled, mi->pixmap(), mi->text(), -1,
@@ -1691,12 +1691,12 @@ void TQCommonStyle::drawControl( ControlElement element,
 		    ! ceData.text.isNull() &&
 		    ! (elementFlags & CEF_UsesTextLabel)) {
 		    int alignment = AlignCenter | ShowPrefix;
-		    if ((!styleHint(SH_UnderlineAccelerator, ceData, elementFlags, TQStyleOption::Default, 0, widget)) || ((styleHint(SH_HideUnderlineAcceleratorWhenAltUp, ceData, elementFlags, TQStyleOption::Default, 0, widget)) && (!acceleratorsShown())))
+		    if ((!styleHint(SH_UnderlineAccelerator, ceData, elementFlags, TQStyleOption::Default, nullptr, widget)) || ((styleHint(SH_HideUnderlineAcceleratorWhenAltUp, ceData, elementFlags, TQStyleOption::Default, nullptr, widget)) && (!acceleratorsShown())))
 			alignment |= NoAccel;
 
 		    rect.moveBy(shiftX, shiftY);
 		    drawItem(p, rect, alignment, cg,
-			     flags & Style_Enabled, 0, ceData.text,
+			     flags & Style_Enabled, nullptr, ceData.text,
 			     ceData.text.length(), &btext);
 		} else {
 		    TQPixmap pm;
@@ -1718,7 +1718,7 @@ void TQCommonStyle::drawControl( ControlElement element,
 			p->setFont( ceData.font );
 			TQRect pr = rect, tr = rect;
 			int alignment = ShowPrefix;
-			if ((!styleHint(SH_UnderlineAccelerator, ceData, elementFlags, TQStyleOption::Default, 0, widget)) || ((styleHint(SH_HideUnderlineAcceleratorWhenAltUp, ceData, elementFlags, TQStyleOption::Default, 0, widget)) && (!acceleratorsShown())))
+			if ((!styleHint(SH_UnderlineAccelerator, ceData, elementFlags, TQStyleOption::Default, nullptr, widget)) || ((styleHint(SH_HideUnderlineAcceleratorWhenAltUp, ceData, elementFlags, TQStyleOption::Default, nullptr, widget)) && (!acceleratorsShown())))
 			    alignment |= NoAccel;
 
 			if ( ceData.toolButtonTextPosition == TQToolButton::Under ) {
@@ -1739,7 +1739,7 @@ void TQCommonStyle::drawControl( ControlElement element,
 
 			tr.moveBy(shiftX, shiftY);
 			drawItem( p, tr, alignment, cg,
-				  flags & Style_Enabled, 0, ceData.textLabel,
+				  flags & Style_Enabled, nullptr, ceData.textLabel,
 				  ceData.textLabel.length(), &btext);
 		    } else {
 			rect.moveBy(shiftX, shiftY);
@@ -1777,14 +1777,14 @@ void TQCommonStyle::drawControl( ControlElement element,
 
             if (rect.isValid())
                 drawItem ( p, rect, AlignVCenter, cg, flags & Style_Enabled,
-                           0, ceData.textLabel, -1, &(cg.buttonText()) );
+                           nullptr, ceData.textLabel, -1, &(cg.buttonText()) );
 	}
 #endif // TQT_NO_HEADER
     default:
 	break;
     }
 
-    activePainter = 0;
+    activePainter = nullptr;
 }
 
 /*! \reimp */
@@ -1822,7 +1822,7 @@ void TQCommonStyle::drawControlMask( ControlElement control,
 	break;
     }
 
-    activePainter = 0;
+    activePainter = nullptr;
 }
 
 /*! \reimp */
@@ -1965,7 +1965,7 @@ TQRect TQCommonStyle::subRect(SubRect r, const TQStyleControlElementData &ceData
 	    TQRect cr = subRect(SR_CheckBoxContents, ceData, elementFlags, widget);
 
 	    // don't create a painter if we have an active one
-	    TQPainter *p = 0;
+	    TQPainter *p = nullptr;
 	    if (! activePainter)
 		p = new TQPainter(widget);
 	    rect = itemRect((activePainter ? activePainter : p),
@@ -2009,7 +2009,7 @@ TQRect TQCommonStyle::subRect(SubRect r, const TQStyleControlElementData &ceData
 	    TQRect cr = subRect(SR_RadioButtonContents, ceData, elementFlags, widget);
 
 	    // don't create a painter if we have an active one
-	    TQPainter *p = 0;
+	    TQPainter *p = nullptr;
 	    if (! activePainter)
 		p = new TQPainter(widget);
 	    rect = itemRect((activePainter ? activePainter : p),
@@ -2551,7 +2551,7 @@ void TQCommonStyle::drawComplexControl( ComplexControl control,
 	break;
     }
 
-    activePainter = 0;
+    activePainter = nullptr;
 }
 
 /*! \reimp */
@@ -3245,7 +3245,7 @@ TQSize TQCommonStyle::sizeFromContents(ContentsType contents,
 		else
 		    h = TQMAX(h, TQFontMetrics(ceData.font).height() + 8);
 
-		if (mi->iconSet() != 0)
+		if (mi->iconSet())
 		    h = TQMAX(h, mi->iconSet()->pixmap(TQIconSet::Small,
 						      TQIconSet::Normal).height() + 4);
 	    }
diff --git a/src/styles/tqcommonstyle.h b/src/styles/tqcommonstyle.h
index 705177d71..14769dbf8 100644
--- a/src/styles/tqcommonstyle.h
+++ b/src/styles/tqcommonstyle.h
@@ -74,7 +74,7 @@ public:
 			const TQColorGroup &cg,
 			SFlags how = Style_Default,
 			const TQStyleOption& = TQStyleOption::Default,
-			const TQWidget *widget = 0 ) const;
+			const TQWidget *widget = nullptr ) const;
 
     // New API
     void drawControlMask( ControlElement element,
@@ -83,7 +83,7 @@ public:
 			ControlElementFlags elementFlags,
 			const TQRect &r,
 			const TQStyleOption& = TQStyleOption::Default,
-			const TQWidget *widget = 0 ) const;
+			const TQWidget *widget = nullptr ) const;
 
     // New API
     TQRect subRect( SubRect r, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget *widget ) const;
@@ -103,7 +103,7 @@ public:
 #endif
 			     SCFlags subActive = SC_None,
 			     const TQStyleOption& = TQStyleOption::Default,
-			     const TQWidget *widget = 0 ) const;
+			     const TQWidget *widget = nullptr ) const;
 
     // New API
     void drawComplexControlMask( ComplexControl control,
@@ -112,7 +112,7 @@ public:
 				 const ControlElementFlags elementFlags,
 				 const TQRect &r,
 				 const TQStyleOption& = TQStyleOption::Default,
-				 const TQWidget *widget = 0 ) const;
+				 const TQWidget *widget = nullptr ) const;
 
     // New API
     TQRect querySubControlMetrics( ComplexControl control,
@@ -120,7 +120,7 @@ public:
 				  ControlElementFlags elementFlags,
 				  SubControl sc,
 				  const TQStyleOption& = TQStyleOption::Default,
-				  const TQWidget *widget = 0 ) const;
+				  const TQWidget *widget = nullptr ) const;
 
     // New API
     SubControl querySubControl( ComplexControl control,
@@ -128,10 +128,10 @@ public:
 				ControlElementFlags elementFlags,
 				const TQPoint &pos,
 				const TQStyleOption& = TQStyleOption::Default,
-				const TQWidget *widget = 0 ) const;
+				const TQWidget *widget = nullptr ) const;
 
     // New API
-    int pixelMetric( PixelMetric m, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = 0 ) const;
+    int pixelMetric( PixelMetric m, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = nullptr ) const;
 
     // New API
     TQSize sizeFromContents( ContentsType s,
@@ -139,7 +139,7 @@ public:
 			    ControlElementFlags elementFlags,
 			    const TQSize &contentsSize,
 			    const TQStyleOption& = TQStyleOption::Default,
-			    const TQWidget *widget = 0 ) const;
+			    const TQWidget *widget = nullptr ) const;
 
     // New API
     int styleHint(StyleHint sh, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption &, TQStyleHintReturn *, const TQWidget * w) const;
@@ -149,7 +149,7 @@ public:
 			 const TQStyleControlElementData &ceData,
 			 ControlElementFlags elementFlags,
 			 const TQStyleOption& = TQStyleOption::Default,
-			 const TQWidget *widget = 0 ) const;
+			 const TQWidget *widget = nullptr ) const;
 
 private:
     // Disabled copy constructor and operator=
diff --git a/src/styles/tqcompactstyle.h b/src/styles/tqcompactstyle.h
index e0b2337e3..0a801364e 100644
--- a/src/styles/tqcompactstyle.h
+++ b/src/styles/tqcompactstyle.h
@@ -58,7 +58,7 @@ class TQ_EXPORT_STYLE_COMPACT TQCompactStyle : public TQWindowsStyle
 public:
     TQCompactStyle();
 
-    int pixelMetric( PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = 0 );
+    int pixelMetric( PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = nullptr );
 
     void drawPrimitive( PrimitiveElement pe,
 			TQPainter *p,
@@ -70,7 +70,7 @@ public:
 			const TQStyleOption& = TQStyleOption::Default ) const;
 
     void drawControl( ControlElement element, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r,
-		      const TQColorGroup &cg, SFlags how = Style_Default, const TQStyleOption& = TQStyleOption::Default, const TQWidget *w = 0 );
+		      const TQColorGroup &cg, SFlags how = Style_Default, const TQStyleOption& = TQStyleOption::Default, const TQWidget *w = nullptr );
 
     int styleHint(StyleHint sh, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption &, TQStyleHintReturn *, const TQWidget *) const;
 
diff --git a/src/styles/tqinterlacestyle.cpp b/src/styles/tqinterlacestyle.cpp
index 01e166a7a..815a69662 100644
--- a/src/styles/tqinterlacestyle.cpp
+++ b/src/styles/tqinterlacestyle.cpp
@@ -459,7 +459,7 @@ void TQInterlaceStyle::drawExclusiveIndicatorMask( TQPainter *p, int x, int y, i
     p->drawEllipse( x, y, w, h );
 }
 
-static int get_combo_extra_width( int h, int *return_awh=0 )
+static int get_combo_extra_width( int h, int *return_awh=nullptr )
 {
     int awh;
     if ( h < 8 ) {
diff --git a/src/styles/tqinterlacestyle.h b/src/styles/tqinterlacestyle.h
index 115e0d2ec..d5ad7e410 100644
--- a/src/styles/tqinterlacestyle.h
+++ b/src/styles/tqinterlacestyle.h
@@ -62,14 +62,14 @@ public:
     int defaultFrameWidth() const;
     TQRect pushButtonContentsRect( TQPushButton *btn );
 
-    void drawFocusRect ( TQPainter *, const TQRect &, const TQColorGroup &, const TQColor * bg = 0, bool = false );
+    void drawFocusRect ( TQPainter *, const TQRect &, const TQColorGroup &, const TQColor * bg = nullptr, bool = false );
     void drawButton( TQPainter *p, int x, int y, int w, int h,
 			     const TQColorGroup &g, bool sunken = false,
-			     const TQBrush *fill = 0 );
+			     const TQBrush *fill = nullptr );
     void drawButtonMask ( TQPainter * p, int x, int y, int w, int h );
     void drawBevelButton( TQPainter *p, int x, int y, int w, int h,
 			  const TQColorGroup &g, bool sunken = false,
-			  const TQBrush *fill = 0 );
+			  const TQBrush *fill = nullptr );
 
     void drawPushButton( TQPushButton* btn, TQPainter *p);
     TQSize indicatorSize () const;
diff --git a/src/styles/tqmotifplusstyle.cpp b/src/styles/tqmotifplusstyle.cpp
index 29b51c7f2..91f6c3d09 100644
--- a/src/styles/tqmotifplusstyle.cpp
+++ b/src/styles/tqmotifplusstyle.cpp
@@ -74,14 +74,14 @@ struct TQMotifPlusStylePrivate
     TQPoint mousePos;
 };
 
-static TQMotifPlusStylePrivate * singleton = 0;
+static TQMotifPlusStylePrivate * singleton = nullptr;
 
 
 static void drawMotifPlusShade(TQPainter *p,
 			       const TQRect &r,
 			       const TQColorGroup &g,
 			       bool sunken, bool mouseover,
-			       const TQBrush *fill = 0)
+			       const TQBrush *fill = nullptr)
 {
     TQPen oldpen = p->pen();
     TQPointArray a(4);
diff --git a/src/styles/tqmotifplusstyle.h b/src/styles/tqmotifplusstyle.h
index df2bce409..380496034 100644
--- a/src/styles/tqmotifplusstyle.h
+++ b/src/styles/tqmotifplusstyle.h
@@ -86,7 +86,7 @@ public:
 		      const TQColorGroup &cg,
 		      SFlags how = Style_Default,
 		      const TQStyleOption& = TQStyleOption::Default,
-		      const TQWidget *widget = 0 ) const;
+		      const TQWidget *widget = nullptr ) const;
 
     TQRect subRect(SubRect r, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget) const;
 
@@ -104,19 +104,19 @@ public:
 #endif
 			    SCFlags active = SC_None,
 			    const TQStyleOption& = TQStyleOption::Default,
-			    const TQWidget *widget = 0 ) const;
+			    const TQWidget *widget = nullptr ) const;
 
     TQRect querySubControlMetrics(ComplexControl control,
 				 const TQStyleControlElementData &ceData,
 				 ControlElementFlags elementFlags,
 				 SubControl subcontrol,
 				 const TQStyleOption& = TQStyleOption::Default,
-				 const TQWidget *widget = 0) const;
+				 const TQWidget *widget = nullptr) const;
 
-    int pixelMetric(PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = 0) const;
+    int pixelMetric(PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = nullptr) const;
 
     int styleHint(StyleHint sh, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption & = TQStyleOption::Default,
-		  TQStyleHintReturn* = 0, const TQWidget * = 0) const;
+		  TQStyleHintReturn* = nullptr, const TQWidget * = nullptr) const;
 
     bool objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e );
 
diff --git a/src/styles/tqmotifstyle.cpp b/src/styles/tqmotifstyle.cpp
index 88cbb0a7d..627b70b4d 100644
--- a/src/styles/tqmotifstyle.cpp
+++ b/src/styles/tqmotifstyle.cpp
@@ -1206,7 +1206,7 @@ void TQMotifStyle::drawControl( ControlElement element,
     }
 }
 
-static int get_combo_extra_width( int h, int w, int *return_awh=0 )
+static int get_combo_extra_width( int h, int w, int *return_awh=nullptr )
 {
     int awh,
 	tmp;
diff --git a/src/styles/tqmotifstyle.h b/src/styles/tqmotifstyle.h
index eaca499a6..fd43ad048 100644
--- a/src/styles/tqmotifstyle.h
+++ b/src/styles/tqmotifstyle.h
@@ -90,7 +90,7 @@ public:
 		      const TQColorGroup &cg,
 		      SFlags how = Style_Default,
 		      const TQStyleOption& = TQStyleOption::Default,
-		      const TQWidget *widget = 0 ) const;
+		      const TQWidget *widget = nullptr ) const;
 
     void drawComplexControl( ComplexControl control,
 			     TQPainter *p,
@@ -106,30 +106,30 @@ public:
 #endif
 			     SCFlags subActive = SC_None,
 			     const TQStyleOption& = TQStyleOption::Default,
-			     const TQWidget* widget = 0 ) const;
+			     const TQWidget* widget = nullptr ) const;
 
     TQRect querySubControlMetrics( ComplexControl control,
 				  const TQStyleControlElementData &ceData,
 				  ControlElementFlags elementFlags,
 				  SubControl sc,
 				  const TQStyleOption& = TQStyleOption::Default,
-				  const TQWidget *widget = 0 ) const;
+				  const TQWidget *widget = nullptr ) const;
 
-    int pixelMetric( PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = 0 ) const;
+    int pixelMetric( PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = nullptr ) const;
 
     TQSize sizeFromContents( ContentsType contents,
 			    const TQStyleControlElementData &ceData,
 			    ControlElementFlags elementFlags,
 			    const TQSize &contentsSize,
 			    const TQStyleOption& = TQStyleOption::Default,
-			    const TQWidget *widget = 0 ) const;
+			    const TQWidget *widget = nullptr ) const;
 
     TQRect subRect( SubRect r, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget ) const;
 
-    TQPixmap stylePixmap(StylePixmap, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption& = TQStyleOption::Default, const TQWidget * = 0) const;
+    TQPixmap stylePixmap(StylePixmap, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption& = TQStyleOption::Default, const TQWidget * = nullptr) const;
 
     int styleHint(StyleHint sh, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption & = TQStyleOption::Default,
-		  TQStyleHintReturn* = 0, const TQWidget * = 0) const;
+		  TQStyleHintReturn* = nullptr, const TQWidget * = nullptr) const;
 
 private:
     bool highlightCols;
diff --git a/src/styles/tqplatinumstyle.h b/src/styles/tqplatinumstyle.h
index a2028d7c9..d8d8bb7f0 100644
--- a/src/styles/tqplatinumstyle.h
+++ b/src/styles/tqplatinumstyle.h
@@ -80,7 +80,7 @@ public:
 		      const TQColorGroup &cg,
 		      SFlags how = Style_Default,
 		      const TQStyleOption& = TQStyleOption::Default,
-		      const TQWidget *widget = 0 ) const;
+		      const TQWidget *widget = nullptr ) const;
 
     void drawComplexControl( ComplexControl control,
 			     TQPainter *p,
@@ -96,16 +96,16 @@ public:
 #endif
 			     SCFlags subActive = SC_None,
 			     const TQStyleOption& = TQStyleOption::Default,
-			     const TQWidget *widget = 0 ) const;
+			     const TQWidget *widget = nullptr ) const;
 
     TQRect querySubControlMetrics( ComplexControl control,
 				  const TQStyleControlElementData &ceData,
 				  ControlElementFlags elementFlags,
 				  SubControl sc,
 				  const TQStyleOption& = TQStyleOption::Default,
-				  const TQWidget *widget = 0 ) const;
+				  const TQWidget *widget = nullptr ) const;
 
-    int pixelMetric( PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = 0 ) const;
+    int pixelMetric( PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = nullptr ) const;
 
     TQRect subRect( SubRect r, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget ) const;
 
diff --git a/src/styles/tqsgistyle.cpp b/src/styles/tqsgistyle.cpp
index 7395c3483..6b45596b5 100644
--- a/src/styles/tqsgistyle.cpp
+++ b/src/styles/tqsgistyle.cpp
@@ -515,7 +515,7 @@ static void drawSGIPrefix( TQPainter *p, int x, int y, TQString* miText )
     }
 }
 
-static int get_combo_extra_width( int h, int *return_awh=0 )
+static int get_combo_extra_width( int h, int *return_awh=nullptr )
 {
     int awh;
     if ( h < 8 ) {
diff --git a/src/styles/tqsgistyle.h b/src/styles/tqsgistyle.h
index 0b65f3681..a94f748bf 100644
--- a/src/styles/tqsgistyle.h
+++ b/src/styles/tqsgistyle.h
@@ -89,7 +89,7 @@ public:
 		      const TQColorGroup &cg,
 		      SFlags how = Style_Default,
 		      const TQStyleOption& = TQStyleOption::Default,
-		      const TQWidget *widget = 0 ) const;
+		      const TQWidget *widget = nullptr ) const;
 
     void drawComplexControl( ComplexControl control,
 			     TQPainter *p,
@@ -105,16 +105,16 @@ public:
 #endif
 			     SCFlags subActive = SC_None,
 			     const TQStyleOption& = TQStyleOption::Default,
-			     const TQWidget* widget = 0 ) const;
+			     const TQWidget* widget = nullptr ) const;
 
-    int pixelMetric( PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = 0 ) const;
+    int pixelMetric( PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget = nullptr ) const;
 
     TQSize sizeFromContents( ContentsType contents,
 			    const TQStyleControlElementData &ceData,
 			    ControlElementFlags elementFlags,
 			    const TQSize &contentsSize,
 			    const TQStyleOption& = TQStyleOption::Default,
-			    const TQWidget *widget = 0 ) const;
+			    const TQWidget *widget = nullptr ) const;
 
     TQRect subRect( SubRect r, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget ) const;
     TQRect querySubControlMetrics( ComplexControl control,
@@ -122,7 +122,7 @@ public:
 				  ControlElementFlags elementFlags,
 				  SubControl sc,
 				  const TQStyleOption& = TQStyleOption::Default,
-				  const TQWidget *widget = 0 ) const;
+				  const TQWidget *widget = nullptr ) const;
 
     int styleHint(StyleHint sh, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption &, TQStyleHintReturn *, const TQWidget *) const;
 
diff --git a/src/styles/tqstylefactory.cpp b/src/styles/tqstylefactory.cpp
index 8f5280264..c326aff26 100644
--- a/src/styles/tqstylefactory.cpp
+++ b/src/styles/tqstylefactory.cpp
@@ -79,8 +79,8 @@ public:
     static TQPluginManager<TQStyleFactoryInterface> *manager;
 };
 
-static TQStyleFactoryPrivate *instance = 0;
-TQPluginManager<TQStyleFactoryInterface> *TQStyleFactoryPrivate::manager = 0;
+static TQStyleFactoryPrivate *instance = nullptr;
+TQPluginManager<TQStyleFactoryInterface> *TQStyleFactoryPrivate::manager = nullptr;
 
 TQStyleFactoryPrivate::TQStyleFactoryPrivate()
 : TQObject( tqApp )
@@ -91,9 +91,9 @@ TQStyleFactoryPrivate::TQStyleFactoryPrivate()
 TQStyleFactoryPrivate::~TQStyleFactoryPrivate()
 {
     delete manager;
-    manager = 0;
+    manager = nullptr;
 
-    instance = 0;
+    instance = nullptr;
 }
 
 #endif //TQT_NO_COMPONENT
@@ -122,7 +122,7 @@ TQStyleFactoryPrivate::~TQStyleFactoryPrivate()
 */
 TQStyle *TQStyleFactory::create( const TQString& key )
 {
-    TQStyle *ret = 0;
+    TQStyle *ret = nullptr;
     TQString style = key.lower();
 #ifndef TQT_NO_STYLE_WINDOWS
     if ( style == "windows" )
diff --git a/src/styles/tqstyleplugin.cpp b/src/styles/tqstyleplugin.cpp
index 9edadfc24..e56813a2c 100644
--- a/src/styles/tqstyleplugin.cpp
+++ b/src/styles/tqstyleplugin.cpp
@@ -111,7 +111,7 @@ private:
 
 TQRESULT TQStylePluginPrivate::queryInterface( const TQUuid &iid, TQUnknownInterface **iface )
 {
-    *iface = 0;
+    *iface = nullptr;
 
     if ( iid == IID_QUnknown )
 	*iface = (TQStyleFactoryInterface*)this;
diff --git a/src/styles/tqwindowsstyle.cpp b/src/styles/tqwindowsstyle.cpp
index ba592bfaf..ef17268c6 100644
--- a/src/styles/tqwindowsstyle.cpp
+++ b/src/styles/tqwindowsstyle.cpp
@@ -1628,7 +1628,7 @@ void TQWindowsStyle::drawComplexControl( ComplexControl ctrl, TQPainter *p,
 		}
 		p->setPen( cg.text() );
 
-		static TQBitmap *verticalLine = 0, *horizontalLine = 0;
+		static TQBitmap *verticalLine = nullptr, *horizontalLine = 0;
 		static TQCleanupHandler<TQBitmap> qlv_cleanup_bitmap;
 		if ( !verticalLine ) {
 		    // make 128*1 and 1*128 bitmaps that can be used for
diff --git a/src/styles/tqwindowsstyle.h b/src/styles/tqwindowsstyle.h
index 1258a9ee5..83b2f0f2a 100644
--- a/src/styles/tqwindowsstyle.h
+++ b/src/styles/tqwindowsstyle.h
@@ -89,7 +89,7 @@ public:
 		      const TQColorGroup &cg,
 		      SFlags flags = Style_Default,
 		      const TQStyleOption& = TQStyleOption::Default,
-		      const TQWidget *widget = 0 ) const;
+		      const TQWidget *widget = nullptr ) const;
 
     void drawComplexControl( ComplexControl control,
 			     TQPainter* p,
@@ -105,28 +105,28 @@ public:
 #endif
 			     SCFlags subActive = SC_None,
 			     const TQStyleOption& = TQStyleOption::Default,
-			     const TQWidget* widget = 0 ) const;
+			     const TQWidget* widget = nullptr ) const;
 
     int pixelMetric( PixelMetric metric,
 		     const TQStyleControlElementData &ceData,
 		     ControlElementFlags elementFlags,
-		     const TQWidget *widget = 0 ) const;
+		     const TQWidget *widget = nullptr ) const;
 
     TQSize sizeFromContents( ContentsType contents,
 			    const TQStyleControlElementData &ceData,
 			    ControlElementFlags elementFlags,
 			    const TQSize &contentsSize,
 			    const TQStyleOption& = TQStyleOption::Default,
-			    const TQWidget *widget = 0 ) const;
+			    const TQWidget *widget = nullptr ) const;
 
     int styleHint(StyleHint sh, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption & = TQStyleOption::Default,
-		  TQStyleHintReturn* = 0, const TQWidget* = 0) const;
+		  TQStyleHintReturn* = nullptr, const TQWidget* = nullptr) const;
 
     TQPixmap stylePixmap( StylePixmap stylepixmap,
 			 const TQStyleControlElementData &ceData,
 			 ControlElementFlags elementFlags,
 			 const TQStyleOption& = TQStyleOption::Default,
-			 const TQWidget *widget = 0 ) const;
+			 const TQWidget *widget = nullptr ) const;
 
     TQRect subRect( SubRect r, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget *widget ) const;
 
diff --git a/src/table/tqtable.cpp b/src/table/tqtable.cpp
index 28fe17cf2..31cedcd56 100644
--- a/src/table/tqtable.cpp
+++ b/src/table/tqtable.cpp
@@ -84,7 +84,7 @@ public:
 	Selected
     };
 
-    TQTableHeader( int, TQTable *t, TQWidget* parent=0, const char* name=0 );
+    TQTableHeader( int, TQTable *t, TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQTableHeader() {};
     void addLabel( const TQString &s, int size );
     void setLabel( int section, const TQString & s, int size = -1 );
@@ -1194,8 +1194,8 @@ bool TQTableItem::isEnabled() const
     \sa TQCheckTableItem TQTableItem TQComboBox
 */
 
-TQComboBox *TQComboTableItem::fakeCombo = 0;
-TQWidget *TQComboTableItem::fakeComboWidget = 0;
+TQComboBox *TQComboTableItem::fakeCombo = nullptr;
+TQWidget *TQComboTableItem::fakeComboWidget = nullptr;
 int TQComboTableItem::fakeRef = 0;
 
 /*!
@@ -1215,8 +1215,8 @@ TQComboTableItem::TQComboTableItem( TQTable *table, const TQStringList &list, bo
 {
     setReplaceable( false );
     if ( !TQComboTableItem::fakeCombo ) {
-	TQComboTableItem::fakeComboWidget = new TQWidget( 0, 0 );
-	TQComboTableItem::fakeCombo = new TQComboBox( false, TQComboTableItem::fakeComboWidget, 0 );
+	TQComboTableItem::fakeComboWidget = new TQWidget( nullptr, nullptr );
+	TQComboTableItem::fakeCombo = new TQComboBox( false, TQComboTableItem::fakeComboWidget, nullptr );
 	TQComboTableItem::fakeCombo->hide();
     }
     ++TQComboTableItem::fakeRef;
@@ -1231,8 +1231,8 @@ TQComboTableItem::~TQComboTableItem()
 {
     if (--TQComboTableItem::fakeRef <= 0) {
 	delete TQComboTableItem::fakeComboWidget;
-	TQComboTableItem::fakeComboWidget = 0;
-	TQComboTableItem::fakeCombo = 0;
+	TQComboTableItem::fakeComboWidget = nullptr;
+	TQComboTableItem::fakeCombo = nullptr;
     }
 }
 
@@ -2026,8 +2026,8 @@ TQSize TQCheckTableItem::sizeHint() const
 
 TQTable::TQTable( TQWidget *parent, const char *name )
     : TQScrollView( parent, name, WNoAutoErase | WStaticContents ),
-      leftHeader( 0 ), topHeader( 0 ),
-      currentSel( 0 ), lastSortCol( -1 ), sGrid( true ), mRows( false ), mCols( false ),
+      leftHeader( nullptr ), topHeader( nullptr ),
+      currentSel( nullptr ), lastSortCol( -1 ), sGrid( true ), mRows( false ), mCols( false ),
       asc( true ), doSort( true ), readOnly( false )
 {
     init( 0, 0 );
@@ -2047,8 +2047,8 @@ TQTable::TQTable( TQWidget *parent, const char *name )
 
 TQTable::TQTable( int numRows, int numCols, TQWidget *parent, const char *name )
     : TQScrollView( parent, name, WNoAutoErase | WStaticContents ),
-      leftHeader( 0 ), topHeader( 0 ),
-      currentSel( 0 ), lastSortCol( -1 ), sGrid( true ), mRows( false ), mCols( false ),
+      leftHeader( nullptr ), topHeader( nullptr ),
+      currentSel( nullptr ), lastSortCol( -1 ), sGrid( true ), mRows( false ), mCols( false ),
       asc( true ), doSort( true ), readOnly( false )
 {
     init( numRows, numCols );
@@ -2274,7 +2274,7 @@ bool TQTable::isReadOnly() const
 
 bool TQTable::isRowReadOnly( int row ) const
 {
-    return (roRows.find( row ) != 0);
+    return (roRows.find( row ));
 }
 
 /*!
@@ -2290,7 +2290,7 @@ bool TQTable::isRowReadOnly( int row ) const
 
 bool TQTable::isColumnReadOnly( int col ) const
 {
-    return (roCols.find( col ) != 0);
+    return (roCols.find( col ));
 }
 
 void TQTable::setSelectionMode( SelectionMode mode )
@@ -2304,7 +2304,7 @@ void TQTable::setSelectionMode( SelectionMode mode )
 	selections.append( currentSel );
 	currentSel->init( curRow, 0 );
 	currentSel->expandTo( curRow, numCols() - 1 );
-	repaintSelections( 0, currentSel );
+	repaintSelections( nullptr, currentSel );
     }
 }
 
@@ -2360,7 +2360,7 @@ void TQTable::updateHeaderStates()
 
     TQPtrListIterator<TQTableSelection> it( selections );
     TQTableSelection *s;
-    while ( ( s = it.current() ) != 0 ) {
+    while ( ( s = it.current() ) ) {
 	++it;
 	if ( s->isActive() ) {
 	    if ( s->leftCol() == 0 &&
@@ -2782,7 +2782,7 @@ void TQTable::drawContents( TQPainter *p, int cx, int cy, int cw, int ch )
 
     TQPtrListIterator<TQTableSelection> it( selections );
     TQTableSelection *s;
-    while ( ( s = it.current() ) != 0 ) {
+    while ( ( s = it.current() ) ) {
 	++it;
 	if ( s->isActive() &&
 	     curRow >= s->topRow() &&
@@ -3069,7 +3069,7 @@ TQTableItem *TQTable::item( int row, int col ) const
 {
     if ( row < 0 || col < 0 || row > numRows() - 1 ||
 	 col > numCols() - 1 || row * col >= (int)contents.size() )
-	return 0;
+	return nullptr;
 
     return contents[ indexOf( row, col ) ];	// contents array lookup
 }
@@ -3301,7 +3301,7 @@ void TQTable::setCurrentCell( int row, int col, bool updateSelections, bool ensu
 	selections.append( currentSel );
 	currentSel->init( curRow, 0 );
 	currentSel->expandTo( curRow, numCols() - 1 );
-	repaintSelections( 0, currentSel );
+	repaintSelections( nullptr, currentSel );
     }
 }
 
@@ -3340,7 +3340,7 @@ bool TQTable::isSelected( int row, int col, bool includeCurrent ) const
 {
     TQPtrListIterator<TQTableSelection> it( selections );
     TQTableSelection *s;
-    while ( ( s = it.current() ) != 0 ) {
+    while ( ( s = it.current() ) ) {
 	++it;
 	if ( s->isActive() &&
 	     row >= s->topRow() &&
@@ -3369,7 +3369,7 @@ bool TQTable::isRowSelected( int row, bool full ) const
     if ( !full ) {
 	TQPtrListIterator<TQTableSelection> it( selections );
 	TQTableSelection *s;
-	while ( ( s = it.current() ) != 0 ) {
+	while ( ( s = it.current() ) ) {
 	    ++it;
 	    if ( s->isActive() &&
 		 row >= s->topRow() &&
@@ -3381,7 +3381,7 @@ bool TQTable::isRowSelected( int row, bool full ) const
     } else {
 	TQPtrListIterator<TQTableSelection> it( selections );
 	TQTableSelection *s;
-	while ( ( s = it.current() ) != 0 ) {
+	while ( ( s = it.current() ) ) {
 	    ++it;
 	    if ( s->isActive() &&
 		 row >= s->topRow() &&
@@ -3410,7 +3410,7 @@ bool TQTable::isColumnSelected( int col, bool full ) const
     if ( !full ) {
 	TQPtrListIterator<TQTableSelection> it( selections );
 	TQTableSelection *s;
-	while ( ( s = it.current() ) != 0 ) {
+	while ( ( s = it.current() ) ) {
 	    ++it;
 	    if ( s->isActive() &&
 		 col >= s->leftCol() &&
@@ -3422,7 +3422,7 @@ bool TQTable::isColumnSelected( int col, bool full ) const
     } else {
 	TQPtrListIterator<TQTableSelection> it( selections );
 	TQTableSelection *s;
-	while ( ( s = it.current() ) != 0 ) {
+	while ( ( s = it.current() ) ) {
 	    ++it;
 	    if ( s->isActive() &&
 		 col >= s->leftCol() &&
@@ -3485,7 +3485,7 @@ int TQTable::addSelection( const TQTableSelection &s )
 
     selections.append( sel );
 
-    repaintSelections( 0, sel, true, true );
+    repaintSelections( nullptr, sel, true, true );
 
     emit selectionChanged();
 
@@ -3505,9 +3505,9 @@ void TQTable::removeSelection( const TQTableSelection &s )
     for ( TQTableSelection *sel = selections.first(); sel; sel = selections.next() ) {
 	if ( s == *sel ) {
 	    selections.removeRef( sel );
-	    repaintSelections( sel, 0, true, true );
+	    repaintSelections( sel, nullptr, true, true );
 	    if ( sel == currentSel )
-		currentSel = 0;
+		currentSel = nullptr;
 	    delete sel;
 	}
     }
@@ -3530,7 +3530,7 @@ void TQTable::removeSelection( int num )
 
     TQTableSelection *s = selections.at( num );
     if ( s == currentSel )
-	currentSel = 0;
+	currentSel = nullptr;
     selections.removeRef( s );
     repaintContents( false );
 }
@@ -3581,7 +3581,7 @@ void TQTable::selectRow( int row )
 	return;
     bool isDataTable = false;
 #ifndef TQT_NO_SQL
-    isDataTable = ::tqt_cast<TQDataTable*>(this) != 0;
+    isDataTable = ::tqt_cast<TQDataTable*>(this);
 #endif
     if ( isDataTable || selectionMode() == SingleRow ) {
 	setCurrentCell( row, currentColumn() );
@@ -3681,7 +3681,7 @@ void TQTable::contentsMousePressEventEx( TQMouseEvent* e )
 		} else {
 		    currentSel->init( tmpRow, 0 );
 		    currentSel->expandTo( tmpRow, numCols() - 1 );
-		    repaintSelections( 0, currentSel );
+		    repaintSelections( nullptr, currentSel );
 		}
 		emit selectionChanged();
 	    }
@@ -3716,7 +3716,7 @@ void TQTable::contentsMousePressEventEx( TQMouseEvent* e )
 		} else {
 		    currentSel->init( tmpRow, 0 );
 		    currentSel->expandTo( tmpRow, numCols() - 1 );
-		    repaintSelections( 0, currentSel );
+		    repaintSelections( nullptr, currentSel );
 		}
 		emit selectionChanged();
 	    }
@@ -3870,13 +3870,13 @@ void TQTable::doAutoScroll()
 		selections.append( currentSel );
 		currentSel->init( tmpRow, 0 );
 		currentSel->expandTo( tmpRow, numCols() - 1 );
-		repaintSelections( 0, currentSel );
+		repaintSelections( nullptr, currentSel );
 	    } else {
 		currentSel->expandTo( tmpRow, numCols() - 1 );
 	    }
 	}
 	setCurrentCell( tmpRow, tmpCol, false, true );
-	repaintSelections( useOld ? &oldSelection : 0, currentSel );
+	repaintSelections( useOld ? &oldSelection : nullptr, currentSel );
 	if ( currentSel && oldSelection != *currentSel )
 	    emit selectionChanged();
     } else {
@@ -3911,7 +3911,7 @@ void TQTable::contentsMouseReleaseEvent( TQMouseEvent *e )
 	    } else {
 		currentSel->init( tmpRow, 0 );
 		currentSel->expandTo( tmpRow, numCols() - 1 );
-		repaintSelections( 0, currentSel );
+		repaintSelections( nullptr, currentSel );
 	    }
 	    emit selectionChanged();
 	}
@@ -4240,7 +4240,7 @@ void TQTable::keyPressEvent( TQKeyEvent* e )
 		currentSel->expandTo( tmpRow, tmpCol );
 	    else
 		currentSel->expandTo( tmpRow, numCols() - 1 );
-	    repaintSelections( justCreated ? 0 : &oldSelection, currentSel );
+	    repaintSelections( justCreated ? nullptr : &oldSelection, currentSel );
 	    emit selectionChanged();
 	} else {
 	    setCurrentCell( tmpRow, tmpCol, false, true );
@@ -4268,7 +4268,7 @@ void TQTable::keyPressEvent( TQKeyEvent* e )
 		    selections.append( currentSel );
 		    currentSel->init( tmpRow, 0 );
 		    currentSel->expandTo( tmpRow, numCols() - 1 );
-		    repaintSelections( hasOldSel ? &oldSelection : 0, currentSel, !hasOldSel );
+		    repaintSelections( hasOldSel ? &oldSelection : nullptr, currentSel, !hasOldSel );
 		    emit selectionChanged();
 		}
 	    }
@@ -4788,14 +4788,14 @@ void TQTable::saveContents( TQPtrVector<TQTableItem> &tmp,
 	if ( item && ( item->row() * nCols) + item->col() == i )
 	    tmp.insert( i, item );
 	else
-	    tmp.insert( i, 0 );
+	    tmp.insert( i, nullptr );
     }
     for ( i = 0; i < (int)tmp2.size(); ++i ) {
 	TQWidget *w = widgets[ i ];
 	if ( w )
 	    tmp2.insert( i, new TableWidget( w, i / nCols, i % nCols ) );
 	else
-	    tmp2.insert( i, 0 );
+	    tmp2.insert( i, nullptr );
     }
 }
 
@@ -5048,20 +5048,20 @@ void TQTable::setColumnLabels( const TQStringList &labels )
 TQWidget *TQTable::createEditor( int row, int col, bool initFromCell ) const
 {
     if ( isReadOnly() || isRowReadOnly( row ) || isColumnReadOnly( col ) )
-	return 0;
+	return nullptr;
 
-    TQWidget *e = 0;
+    TQWidget *e = nullptr;
 
     // the current item in the cell should be edited if possible
     TQTableItem *i = item( row, col );
     if ( initFromCell || ( i && !i->isReplaceable() ) ) {
 	if ( i ) {
 	    if ( i->editType() == TQTableItem::Never )
-		return 0;
+		return nullptr;
 
 	    e = i->createEditor();
 	    if ( !e )
-		return 0;
+		return nullptr;
 	}
     }
 
@@ -5091,19 +5091,19 @@ TQWidget *TQTable::createEditor( int row, int col, bool initFromCell ) const
 TQWidget *TQTable::beginEdit( int row, int col, bool replace )
 {
     if ( isReadOnly() || isRowReadOnly( row ) || isColumnReadOnly( col ) )
-	return 0;
+	return nullptr;
     if ( row < 0 || row >= numRows() || col < 0 || col >= numCols() )
-        return 0;
+        return nullptr;
 
     TQTableItem *itm = item( row, col );
     if ( itm && !itm->isEnabled() )
-	return 0;
+	return nullptr;
     if ( cellWidget( row, col ) )
-	return 0;
+	return nullptr;
     ensureCellVisible( row, col );
     TQWidget *e = createEditor( row, col, !replace );
     if ( !e )
-	return 0;
+	return nullptr;
     setCellWidget( row, col, e );
     e->setActiveWindow();
     e->setFocus();
@@ -5273,7 +5273,7 @@ void TQTable::repaintSelections( TQTableSelection *oldSelection,
     if ( oldSelection && newSelection && *oldSelection == *newSelection )
 	return;
     if ( oldSelection && !oldSelection->isActive() )
- 	oldSelection = 0;
+ 	oldSelection = nullptr;
 
     bool optimizeOld = false;
     bool optimizeNew = false;
@@ -5421,7 +5421,7 @@ void TQTable::clearSelection( bool repaint )
 				    s->rightCol(), b ) );
     }
 
-    currentSel = 0;
+    currentSel = nullptr;
     selections.clear();
 
     if ( needRepaint && repaint )
@@ -5952,7 +5952,7 @@ void TQTable::takeItem( TQTableItem *i )
     i->setRow( -1 );
     i->setCol( -1 );
     i->updateEditor( orow, ocol );
-    i->t = 0;
+    i->t = nullptr;
 }
 
 /*!
@@ -6032,7 +6032,7 @@ void TQTable::insertWidget( int row, int col, TQWidget *w )
 TQWidget *TQTable::cellWidget( int row, int col ) const
 {
     if ( row < 0 || col < 0 || row > numRows() - 1 || col > numCols() - 1 )
-	return 0;
+	return nullptr;
 
     if ( (int)widgets.size() != numRows() * numCols() )
 	( (TQTable*)this )->widgets.resize( numRows() * numCols() );
@@ -6419,7 +6419,7 @@ void TQTable::contentsDropEvent( TQDropEvent *e )
 
 TQDragObject *TQTable::dragObject()
 {
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -6512,7 +6512,7 @@ TQTableHeader::TQTableHeader( int i, TQTable *t,
       numStretches( 0 )
 {
     setIsATableHeader( true );
-    d = 0;
+    d = nullptr;
     states.resize( i );
     stretchable.resize( i );
     states.fill( Normal, -1 );
diff --git a/src/table/tqtable.h b/src/table/tqtable.h
index d26c06642..d1be11b50 100644
--- a/src/table/tqtable.h
+++ b/src/table/tqtable.h
@@ -262,9 +262,9 @@ class TQM_EXPORT_TABLE TQTable : public TQScrollView
     friend class TQTableItem;
 
 public:
-    TQTable( TQWidget* parent=0, const char* name=0 );
+    TQTable( TQWidget* parent=nullptr, const char* name=nullptr );
     TQTable( int numRows, int numCols,
-            TQWidget* parent=0, const char* name=0 );
+            TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQTable();
 
     TQHeader *horizontalHeader() const;
diff --git a/src/tools/tqasciidict.h b/src/tools/tqasciidict.h
index e6d607be4..f6e85f8d0 100644
--- a/src/tools/tqasciidict.h
+++ b/src/tools/tqasciidict.h
@@ -71,7 +71,7 @@ public:
     bool  remove( const char *k )	{ return TQGDict::remove_ascii(k); }
     type *take( const char *k )		{ return (type *)TQGDict::take_ascii(k); }
     type *find( const char *k ) const
-		{ return (type *)((TQGDict*)this)->TQGDict::look_ascii(k,0,0); }
+		{ return (type *)((TQGDict*)this)->TQGDict::look_ascii(k,nullptr,0); }
     type *operator[]( const char *k ) const
 		{ return (type *)((TQGDict*)this)->TQGDict::look_ascii(k,0,0); }
 
diff --git a/src/tools/tqbuffer.cpp b/src/tools/tqbuffer.cpp
index 3bf7f2f7f..c82bfb30b 100644
--- a/src/tools/tqbuffer.cpp
+++ b/src/tools/tqbuffer.cpp
@@ -332,7 +332,7 @@ TQ_LONG TQBuffer::writeBlock( const char *p, TQ_ULONG len )
         return 0;
 
 #if defined(QT_CHECK_NULL)
-    if ( p == 0 ) {
+    if ( !p ) {
         tqWarning( "TQBuffer::writeBlock: Null pointer error" );
         return -1;
     }
@@ -375,7 +375,7 @@ TQ_LONG TQBuffer::writeBlock( const char *p, TQ_ULONG len )
 TQ_LONG TQBuffer::readLine( char *p, TQ_ULONG maxlen )
 {
 #if defined(QT_CHECK_NULL)
-    if ( p == 0 ) {
+    if ( !p ) {
         tqWarning( "TQBuffer::readLine: Null pointer error" );
         return -1;
     }
diff --git a/src/tools/tqcleanuphandler.h b/src/tools/tqcleanuphandler.h
index 9a6f5029c..b49784b6e 100644
--- a/src/tools/tqcleanuphandler.h
+++ b/src/tools/tqcleanuphandler.h
@@ -47,7 +47,7 @@ template<class Type>
 class TQCleanupHandler
 {
 public:
-    TQCleanupHandler() : cleanupObjects( 0 ) {}
+    TQCleanupHandler() : cleanupObjects( nullptr ) {}
     ~TQCleanupHandler() { clear(); }
 
     Type* add( Type **object ) {
@@ -75,11 +75,11 @@ public:
 	Type **object;
 	while ( ( object = it.current() ) ) {
 	    delete *object;
-	    *object = 0;
+	    *object = nullptr;
 	    cleanupObjects->remove( object );
 	}
 	delete cleanupObjects;
-	cleanupObjects = 0;
+	cleanupObjects = nullptr;
     }
 
 private:
@@ -90,18 +90,18 @@ template<class Type>
 class TQSingleCleanupHandler
 {
 public:
-    TQSingleCleanupHandler() : object( 0 ) {}
+    TQSingleCleanupHandler() : object( nullptr ) {}
     ~TQSingleCleanupHandler() {
 	if ( object ) {
 	    delete *object;
-	    *object = 0;
+	    *object = nullptr;
 	}
     }
     Type* set( Type **o ) {
 	object = o;
 	return *object;
     }
-    void reset() { object = 0; }
+    void reset() { object = nullptr; }
 private:
     Type **object;
 };
@@ -110,12 +110,12 @@ template<class Type>
 class TQSharedCleanupHandler
 {
 public:
-    TQSharedCleanupHandler() : object( 0 ) {}
+    TQSharedCleanupHandler() : object( nullptr ) {}
     ~TQSharedCleanupHandler() {
 	if ( object ) {
 	    if ( (*object)->deref() )
 		delete *object;
-	    *object = 0;
+	    *object = nullptr;
 	}
     }
     Type* set( Type **o ) {
diff --git a/src/tools/tqcom_p.h b/src/tools/tqcom_p.h
index 7e9304df6..fa46cb21e 100644
--- a/src/tools/tqcom_p.h
+++ b/src/tools/tqcom_p.h
@@ -306,7 +306,7 @@ public:		   \
 #ifndef Q_CREATE_INSTANCE
 #    define Q_CREATE_INSTANCE( IMPLEMENTATION )		\
 	IMPLEMENTATION *i = new IMPLEMENTATION;		\
-	TQUnknownInterface* iface = 0; 			\
+	TQUnknownInterface* iface = nullptr; 			\
 	i->queryInterface( IID_QUnknown, &iface );	\
 	return iface;
 #endif // Q_CREATE_INSTANCE
diff --git a/src/tools/tqcomlibrary.cpp b/src/tools/tqcomlibrary.cpp
index dba1c83da..4e9c96108 100644
--- a/src/tools/tqcomlibrary.cpp
+++ b/src/tools/tqcomlibrary.cpp
@@ -60,7 +60,7 @@
 
 
 TQComLibrary::TQComLibrary( const TQString &filename )
-    : TQLibrary( filename ), entry( 0 ), libiface( 0 ), tqt_version( 0 )
+    : TQLibrary( filename ), entry( nullptr ), libiface( nullptr ), tqt_version( 0 )
 {
 }
 
@@ -77,7 +77,7 @@ TQComLibrary::~TQComLibrary()
 bool TQComLibrary::unload()
 {
     int refs = entry ? entry->release() : 0;
-    entry = 0;
+    entry = nullptr;
     if (refs || !libiface)
 	return false;
 
@@ -85,7 +85,7 @@ bool TQComLibrary::unload()
     if ( !libiface->canUnload() )
 	return false;
     libiface->release();
-    libiface = 0;
+    libiface = nullptr;
 
     return TQLibrary::unload();
 }
@@ -135,7 +135,7 @@ struct qt_token_info
     qt_token_info( const char *f, const ulong fc )
 	: fields( f ), field_count( fc ), results( fc ), lengths( fc )
     {
-	results.fill( 0 );
+	results.fill( nullptr );
 	lengths.fill( 0 );
     }
 
@@ -332,11 +332,11 @@ static bool qt_unix_query( const TQString &library, uint *version, uint *flags,
     }
 
     TQByteArray data;
-    char *filedata = 0;
+    char *filedata = nullptr;
     ulong fdlen = 0;
 
 #ifdef USE_MMAP
-    char *mapaddr = 0;
+    char *mapaddr = nullptr;
     size_t maplen = file.size();
     mapaddr = (char *) mmap( mapaddr, maplen, PROT_READ, MAP_PRIVATE, file.handle(), 0 );
     if ( mapaddr != MAP_FAILED ) {
@@ -378,7 +378,7 @@ static bool qt_unix_query( const TQString &library, uint *version, uint *flags,
 #endif // Q_OS_UNIX
 
 
-static TQSettings *cache = 0;
+static TQSettings *cache = nullptr;
 static TQSingleCleanupHandler<TQSettings> cleanup_cache;
 
 void TQComLibrary::createInstanceInternal()
@@ -400,7 +400,7 @@ void TQComLibrary::createInstanceInternal()
 
 #ifdef TQT_THREAD_SUPPORT
     TQMutexLocker locker( tqt_global_mutexpool ?
-			 tqt_global_mutexpool->get( &cache ) : 0 );
+			 tqt_global_mutexpool->get( &cache ) : nullptr );
 #endif // TQT_THREAD_SUPPORT
 
     if ( ! cache ) {
@@ -413,8 +413,8 @@ void TQComLibrary::createInstanceInternal()
     if ( reg.count() == 4 ) {
 	// check timestamp
 	if ( lastModified == reg[3] ) {
-	    tqt_version = reg[0].toUInt(0, 16);
-	    flags = reg[1].toUInt(0, 16);
+	    tqt_version = reg[0].toUInt(nullptr, 16);
+	    flags = reg[1].toUInt(nullptr, 16);
 	    key = reg[2].latin1();
 
 	    query_done = true;
@@ -465,7 +465,7 @@ void TQComLibrary::createInstanceInternal()
 	cache->writeEntry( regkey, queried );
 	// delete the cache, which forces the settings to be written
 	delete cache;
-	cache = 0;
+	cache = nullptr;
     }
 
     if ( ! query_done ) {
@@ -481,7 +481,7 @@ void TQComLibrary::createInstanceInternal()
 	unload();
 	return;
     } else if ( !isLoaded() ) {
-	Q_ASSERT( entry == 0 );
+	Q_ASSERT( !entry );
 	if ( !load() )
 	    return;
     }
@@ -493,13 +493,13 @@ void TQComLibrary::createInstanceInternal()
     if ( !ucmInstanceProc )
 	tqWarning( "%s: Not a UCOM library.", (const char*) TQFile::encodeName(library()) );
 #endif
-    entry = ucmInstanceProc ? ucmInstanceProc() : 0;
+    entry = ucmInstanceProc ? ucmInstanceProc() : nullptr;
 
     if ( entry ) {
 	if ( entry->queryInterface( IID_QLibrary, (TQUnknownInterface**)&libiface ) == TQS_OK ) {
 	    if ( libiface && !libiface->init() ) {
 		libiface->release();
-		libiface = 0;
+		libiface = nullptr;
 		unload();
 		return;
 	    }
diff --git a/src/tools/tqcomponentfactory.cpp b/src/tools/tqcomponentfactory.cpp
index c8b8e6e6d..3b40b878c 100644
--- a/src/tools/tqcomponentfactory.cpp
+++ b/src/tools/tqcomponentfactory.cpp
@@ -103,12 +103,12 @@
 */
 
 
-static TQPtrList<TQComLibrary> *libraries = 0;
+static TQPtrList<TQComLibrary> *libraries = nullptr;
 
 static void cleanup()
 {
     delete libraries;
-    libraries = 0;
+    libraries = nullptr;
 }
 
 static TQPtrList<TQComLibrary> *liblist()
@@ -170,7 +170,7 @@ TQRESULT TQComponentFactory::createInstance( const TQString &cid, const TQUuid &
     TQComLibrary *library = new TQComLibrary( file );
     library->setAutoUnload( false );
 
-    TQComponentFactoryInterface *cfIface =0;
+    TQComponentFactoryInterface *cfIface =nullptr;
     library->queryInterface( IID_QComponentFactory, (TQUnknownInterface**)&cfIface );
 
     if ( cfIface ) {
@@ -179,7 +179,7 @@ TQRESULT TQComponentFactory::createInstance( const TQString &cid, const TQUuid &
     } else {
 	res = library->queryInterface( iid, iface );
     }
-    TQLibraryInterface *libiface = 0;
+    TQLibraryInterface *libiface = nullptr;
     if ( library->queryInterface( IID_QLibrary, (TQUnknownInterface**)&libiface ) != TQS_OK || !tqApp ) {
 	delete library; // only deletes the object, thanks to TQLibrary::Manual
     } else {
@@ -203,7 +203,7 @@ TQRESULT TQComponentFactory::registerServer( const TQString &filename )
 {
     TQComLibrary lib( filename );
     lib.load();
-    TQComponentRegistrationInterface *iface = 0;
+    TQComponentRegistrationInterface *iface = nullptr;
     TQRESULT res = lib.queryInterface( IID_QComponentRegistration, (TQUnknownInterface**)&iface );
     if ( res != TQS_OK )
 	return res;
@@ -226,7 +226,7 @@ TQRESULT TQComponentFactory::unregisterServer( const TQString &filename )
 {
     TQComLibrary lib( filename );
     lib.load();
-    TQComponentRegistrationInterface *iface = 0;
+    TQComponentRegistrationInterface *iface = nullptr;
     TQRESULT res = lib.queryInterface( IID_QComponentRegistration, (TQUnknownInterface**)&iface );
     if ( res != TQS_OK )
 	return res;
diff --git a/src/tools/tqcomponentfactory_p.h b/src/tools/tqcomponentfactory_p.h
index ea45d7455..389c80d66 100644
--- a/src/tools/tqcomponentfactory_p.h
+++ b/src/tools/tqcomponentfactory_p.h
@@ -62,7 +62,7 @@
 class TQ_EXPORT TQComponentFactory
 {
 public:
-    static TQRESULT createInstance( const TQString &cid, const TQUuid &iid, TQUnknownInterface** instance, TQUnknownInterface *outer = 0 );
+    static TQRESULT createInstance( const TQString &cid, const TQUuid &iid, TQUnknownInterface** instance, TQUnknownInterface *outer = nullptr );
     static TQRESULT registerServer( const TQString &filename );
     static TQRESULT unregisterServer( const TQString &filename );
 
diff --git a/src/tools/tqcstring.cpp b/src/tools/tqcstring.cpp
index f18506bc4..2e7a303e7 100644
--- a/src/tools/tqcstring.cpp
+++ b/src/tools/tqcstring.cpp
@@ -103,7 +103,7 @@ void *tqmemmove( void *dst, const void *src, uint len )
 char *tqstrdup( const char *src )
 {
     if ( !src )
-	return 0;
+	return nullptr;
     char *dst = new char[strlen(src)+1];
     TQ_CHECK_PTR( dst );
     return strcpy( dst, src );
@@ -136,7 +136,7 @@ char *tqstrdup( const char *src )
 char *tqstrncpy( char *dst, const char *src, uint len )
 {
     if ( !src || !dst )
-	return 0;
+	return nullptr;
     strncpy( dst, src, len );
     if ( len > 0 )
 	dst[len-1] = '\0';
@@ -721,7 +721,7 @@ TQCString::TQCString( const char *str )
 
 TQCString::TQCString( const char *str, uint maxsize )
 {
-    if ( str == 0 )
+    if ( !str )
 	return;
     uint len; // index of first '\0'
     for ( len = 0; len < maxsize - 1; len++ ) {
@@ -949,7 +949,7 @@ int TQCString::find( char c, int index, bool cs ) const
 	while ( *d && tolower((uchar) *d) != c )
 	    d++;
 	if ( !*d && c )				// not found
-	    d = 0;
+	    d = nullptr;
     }
     return d ? (int)(d - data()) : -1;
 }
@@ -2064,7 +2064,7 @@ double TQCString::toDouble( bool *ok ) const
     char *end;
     double val = strtod( data() ? data() : "", &end );
     if ( ok )
-	*ok = ( data() && *data() && ( end == 0 || *end == '\0' ) );
+	*ok = ( data() && *data() && ( !end || *end == '\0' ) );
     return val;
 }
 
diff --git a/src/tools/tqcstring.h b/src/tools/tqcstring.h
index d9559b920..3b8f794a4 100644
--- a/src/tools/tqcstring.h
+++ b/src/tools/tqcstring.h
@@ -61,7 +61,7 @@ TQ_EXPORT inline uint tqstrlen( const char *str )
 { return str ? (uint)strlen(str) : 0u; }
 
 TQ_EXPORT inline char *qstrcpy( char *dst, const char *src )
-{ return src ? strcpy(dst, src) : 0; }
+{ return src ? strcpy(dst, src) : nullptr; }
 
 TQ_EXPORT char *tqstrncpy( char *dst, const char *src, uint len );
 
@@ -197,14 +197,14 @@ public:
     TQCString    &replace( const char *, const char * );
     TQCString    &replace( char, char );
 
-    short	toShort( bool *ok=0 )	const;
-    ushort	toUShort( bool *ok=0 )	const;
-    int		toInt( bool *ok=0 )	const;
-    uint	toUInt( bool *ok=0 )	const;
-    long	toLong( bool *ok=0 )	const;
-    ulong	toULong( bool *ok=0 )	const;
-    float	toFloat( bool *ok=0 )	const;
-    double	toDouble( bool *ok=0 )	const;
+    short	toShort( bool *ok=nullptr )	const;
+    ushort	toUShort( bool *ok=nullptr )	const;
+    int		toInt( bool *ok=nullptr )	const;
+    uint	toUInt( bool *ok=nullptr )	const;
+    long	toLong( bool *ok=nullptr )	const;
+    ulong	toULong( bool *ok=nullptr )	const;
+    float	toFloat( bool *ok=nullptr )	const;
+    double	toDouble( bool *ok=nullptr )	const;
 
     TQCString    &setStr( const char *s );
     TQCString    &setNum( short );
@@ -245,10 +245,10 @@ inline TQCString &TQCString::operator=( const char *str )
 { return (TQCString&)duplicate( str, tqstrlen(str)+1 ); }
 
 inline bool TQCString::isNull() const
-{ return data() == 0; }
+{ return !data(); }
 
 inline bool TQCString::isEmpty() const
-{ return data() == 0 || *data() == '\0'; }
+{ return !data() || *data() == '\0'; }
 
 inline uint TQCString::length() const
 { return tqstrlen( data() ); }
diff --git a/src/tools/tqdatastream.cpp b/src/tools/tqdatastream.cpp
index 8db36f92c..29b62d625 100644
--- a/src/tools/tqdatastream.cpp
+++ b/src/tools/tqdatastream.cpp
@@ -249,7 +249,7 @@ TQDataStream::TQDataStream()
 {
     if ( systemWordSize == 0 )			// get system features
 	tqSysInfo( &systemWordSize, &systemBigEndian );
-    dev	      = 0;				// no device set
+    dev	      = nullptr;				// no device set
     owndev    = false;
     byteorder = BigEndian;			// default byte order
     printable = false;
@@ -361,7 +361,7 @@ void TQDataStream::setDevice(TQIODevice *d )
 
 void TQDataStream::unsetDevice()
 {
-    setDevice( 0 );
+    setDevice( nullptr );
 }
 
 
@@ -810,7 +810,7 @@ TQDataStream &TQDataStream::readBytes( char *&s, uint &l )
     *this >> len;				// first read length spec
     l = (uint)len;
     if ( len == 0 || eof() ) {
-	s = 0;
+	s = nullptr;
 	return *this;
     } else {
 	s = new char[len];			// create char array
diff --git a/src/tools/tqdatetime.cpp b/src/tools/tqdatetime.cpp
index 87529851a..b03a11313 100644
--- a/src/tools/tqdatetime.cpp
+++ b/src/tools/tqdatetime.cpp
@@ -75,7 +75,7 @@ static const char * const qt_shortMonthNames[] = {
  *****************************************************************************/
 
 // Replaces tokens by their value. See TQDateTime::toString() for a list of valid tokens
-static TQString getFmtString( const TQString& f, const TQTime* dt = 0, const TQDate* dd = 0, bool am_pm = false )
+static TQString getFmtString( const TQString& f, const TQTime* dt = nullptr, const TQDate* dd = nullptr, bool am_pm = false )
 {
     if ( f.isEmpty() )
 	return TQString::null;
@@ -146,7 +146,7 @@ static TQString getFmtString( const TQString& f, const TQTime* dt = 0, const TQD
 }
 
 // Parses the format string and uses getFmtString to get the values for the tokens. Ret
-static TQString fmtDateTime( const TQString& f, const TQTime* dt = 0, const TQDate* dd = 0 )
+static TQString fmtDateTime( const TQString& f, const TQTime* dt = nullptr, const TQDate* dd = nullptr )
 {
     if ( f.isEmpty() ) {
 	return TQString::null;
@@ -486,7 +486,7 @@ int TQDate::weekNumber( int *yearNumber ) const
 	--year;
 	yday += leapYear(year) ? 366 : 365;
     }
-    if (yearNumber != 0)
+    if (yearNumber)
     	*yearNumber = year;
     return w;
 }
@@ -828,7 +828,7 @@ TQString TQDate::toString( TQt::DateFormat f ) const
 */
 TQString TQDate::toString( const TQString& format ) const
 {
-    return fmtDateTime( format, 0, this );
+    return fmtDateTime( format, nullptr, this );
 }
 #endif //TQT_NO_DATESTRING
 
@@ -1475,7 +1475,7 @@ TQString TQTime::toString( TQt::DateFormat f ) const
 */
 TQString TQTime::toString( const TQString& format ) const
 {
-    return fmtDateTime( format, this, 0 );
+    return fmtDateTime( format, this, nullptr );
 }
 #endif //TQT_NO_DATESTRING
 /*!
@@ -1725,7 +1725,7 @@ bool TQTime::currentTime( TQTime *ct, TQt::TimeSpec ts )
 #elif defined(Q_OS_UNIX)
     // posix compliant system
     struct timeval tv;
-    gettimeofday( &tv, 0 );
+    gettimeofday( &tv, nullptr );
     time_t ltime = tv.tv_sec;
     tm *t;
 
@@ -2040,7 +2040,7 @@ void TQDateTime::setTime_t( time_t secsSince1Jan1970UTC )
 void TQDateTime::setTime_t( time_t secsSince1Jan1970UTC, TQt::TimeSpec ts )
 {
     time_t tmp = secsSince1Jan1970UTC;
-    tm *brokenDown = 0;
+    tm *brokenDown = nullptr;
 
 #if defined(Q_OS_UNIX) && defined(TQT_THREAD_SUPPORT) && defined(_POSIX_THREAD_SAFE_FUNCTIONS)
     // posix compliant system
diff --git a/src/tools/tqdatetime.h b/src/tools/tqdatetime.h
index 874246bf8..455f19948 100644
--- a/src/tools/tqdatetime.h
+++ b/src/tools/tqdatetime.h
@@ -68,7 +68,7 @@ public:
     int dayOfYear() const;
     int daysInMonth() const;
     int daysInYear() const;
-    int weekNumber( int *yearNum = 0 ) const;
+    int weekNumber( int *yearNum = nullptr ) const;
 
 #ifndef TQT_NO_TEXTDATE
 #ifndef TQT_NO_COMPAT
diff --git a/src/tools/tqdict.h b/src/tools/tqdict.h
index 1d7bfd694..a5751fa11 100644
--- a/src/tools/tqdict.h
+++ b/src/tools/tqdict.h
@@ -71,9 +71,9 @@ public:
     bool  remove( const TQString &k )	{ return TQGDict::remove_string(k); }
     type *take( const TQString &k )	{ return (type *)TQGDict::take_string(k); }
     type *find( const TQString &k ) const
-		{ return (type *)((TQGDict*)this)->TQGDict::look_string(k,0,0); }
+		{ return (type *)((TQGDict*)this)->TQGDict::look_string(k,nullptr,0); }
     type *operator[]( const TQString &k ) const
-		{ return (type *)((TQGDict*)this)->TQGDict::look_string(k,0,0); }
+		{ return (type *)((TQGDict*)this)->TQGDict::look_string(k,nullptr,0); }
 
     void  clear()			{ TQGDict::clear(); }
     void  resize( uint n )		{ TQGDict::resize(n); }
diff --git a/src/tools/tqdir.cpp b/src/tools/tqdir.cpp
index 76347b810..120f3386b 100644
--- a/src/tools/tqdir.cpp
+++ b/src/tools/tqdir.cpp
@@ -236,8 +236,8 @@ TQDir::TQDir( const TQString &path, const TQString &nameFilter,
 TQDir::TQDir( const TQDir &d )
 {
     dPath = d.dPath;
-    fList = 0;
-    fiList = 0;
+    fList = nullptr;
+    fiList = nullptr;
     nameFilt = d.nameFilt;
     dirty = true;
     allDirs = d.allDirs;
@@ -256,8 +256,8 @@ void TQDir::refresh() const
 
 void TQDir::init()
 {
-    fList = 0;
-    fiList = 0;
+    fList = nullptr;
+    fiList = nullptr;
     nameFilt = TQString::fromLatin1("*");
     dirty = true;
     allDirs = false;
@@ -915,7 +915,7 @@ const TQFileInfoList *TQDir::entryInfoList( const TQString &nameFilter,
     if ( that->readDirEntries(nameFilter, filterSpec, sortSpec) )
 	return that->fiList;
     else
-	return 0;
+	return nullptr;
 }
 
 /*!
@@ -967,9 +967,9 @@ TQDir &TQDir::operator=( const TQDir &d )
 {
     dPath    = d.dPath;
     delete fList;
-    fList    = 0;
+    fList    = nullptr;
     delete fiList;
-    fiList   = 0;
+    fiList   = nullptr;
     nameFilt = d.nameFilt;
     dirty    = true;
     allDirs  = d.allDirs;
diff --git a/src/tools/tqdir_unix.cpp b/src/tools/tqdir_unix.cpp
index bead1b1d5..6fba46cce 100644
--- a/src/tools/tqdir_unix.cpp
+++ b/src/tools/tqdir_unix.cpp
@@ -308,7 +308,7 @@ const TQFileInfoList * TQDir::drives()
 {
     // at most one instance of TQFileInfoList is leaked, and this variable
     // points to that list
-    static TQFileInfoList * knownMemoryLeak = 0;
+    static TQFileInfoList * knownMemoryLeak = nullptr;
 
     if ( !knownMemoryLeak ) {
 
diff --git a/src/tools/tqfile.cpp b/src/tools/tqfile.cpp
index af35b04de..e3af0d908 100644
--- a/src/tools/tqfile.cpp
+++ b/src/tools/tqfile.cpp
@@ -161,7 +161,7 @@ extern bool qt_file_access( const TQString& fn, int t );
 */
 
 TQFile::TQFile()
-: d(0)
+: d(nullptr)
 {
     init();
 }
@@ -173,7 +173,7 @@ TQFile::TQFile()
 */
 
 TQFile::TQFile( const TQString &name )
-    : fn(name), d(0)
+    : fn(name), d(nullptr)
 {
     init();
 }
@@ -202,7 +202,7 @@ void TQFile::init()
     setFlags( IO_Direct );
     setStatus( IO_Ok );
     setErrorString( qt_fileerr_unknown );
-    fh	   = 0;
+    fh	   = nullptr;
     fd	   = 0;
     length = 0;
     ioIndex = 0;
diff --git a/src/tools/tqfile_unix.cpp b/src/tools/tqfile_unix.cpp
index b5b34eae9..558c6a679 100644
--- a/src/tools/tqfile_unix.cpp
+++ b/src/tools/tqfile_unix.cpp
@@ -620,7 +620,7 @@ TQ_LONG TQFile::writeBlock( const char *p, TQ_ULONG len )
 	return 0;
 
 #if defined(QT_CHECK_NULL)
-    if ( p == 0 && len != 0 )
+    if ( !p && len != 0 )
 	tqWarning( "TQFile::writeBlock: Null pointer error" );
 #endif
 #if defined(QT_CHECK_STATE)
diff --git a/src/tools/tqfileinfo.cpp b/src/tools/tqfileinfo.cpp
index 1a50b7713..6a92ab1a9 100644
--- a/src/tools/tqfileinfo.cpp
+++ b/src/tools/tqfileinfo.cpp
@@ -141,7 +141,7 @@ extern bool qt_file_access( const TQString& fn, int t );
 
 TQFileInfo::TQFileInfo()
 {
-    fic	  = 0;
+    fic	  = nullptr;
     cache = true;
 #if defined(Q_OS_UNIX)
     symLink = false;
@@ -162,7 +162,7 @@ TQFileInfo::TQFileInfo( const TQString &file )
 {
     fn	  = file;
     slashify( fn );
-    fic	  = 0;
+    fic	  = nullptr;
     cache = true;
 #if defined(Q_OS_UNIX)
     symLink = false;
@@ -183,7 +183,7 @@ TQFileInfo::TQFileInfo( const TQFile &file )
 {
     fn	  = file.name();
     slashify( fn );
-    fic	  = 0;
+    fic	  = nullptr;
     cache = true;
 #if defined(Q_OS_UNIX)
     symLink = false;
@@ -204,7 +204,7 @@ TQFileInfo::TQFileInfo( const TQDir &d, const TQString &fileName )
 {
     fn	  = d.filePath( fileName );
     slashify( fn );
-    fic	  = 0;
+    fic	  = nullptr;
     cache = true;
 #if defined(Q_OS_UNIX)
     symLink = false;
@@ -222,7 +222,7 @@ TQFileInfo::TQFileInfo( const TQFileInfo &fi )
 	fic = new TQFileInfoCache;
 	*fic = *fi.fic;
     } else {
-	fic = 0;
+	fic = nullptr;
     }
     cache = fi.cache;
 #if defined(Q_OS_UNIX)
@@ -249,7 +249,7 @@ TQFileInfo &TQFileInfo::operator=( const TQFileInfo &fi )
     fn = fi.fn;
     if ( !fi.fic ) {
 	delete fic;
-	fic = 0;
+	fic = nullptr;
     } else {
 	if ( !fic ) {
 	    fic = new TQFileInfoCache;
@@ -298,7 +298,7 @@ void TQFileInfo::setFile( const TQString &file )
     fn = file;
     slashify( fn );
     delete fic;
-    fic = 0;
+    fic = nullptr;
 }
 
 /*!
@@ -318,7 +318,7 @@ void TQFileInfo::setFile( const TQFile &file )
     fn	= file.name();
     slashify( fn );
     delete fic;
-    fic = 0;
+    fic = nullptr;
 }
 
 /*!
@@ -338,7 +338,7 @@ void TQFileInfo::setFile( const TQDir &d, const TQString &fileName )
     fn	= d.filePath( fileName );
     slashify( fn );
     delete fic;
-    fic = 0;
+    fic = nullptr;
 }
 #endif
 
@@ -362,7 +362,7 @@ void TQFileInfo::refresh() const
 {
     TQFileInfo *that = (TQFileInfo*)this;		// Mutable function
     delete that->fic;
-    that->fic = 0;
+    that->fic = nullptr;
 }
 
 /*!
@@ -393,7 +393,7 @@ void TQFileInfo::setCaching( bool enable )
     cache = enable;
     if ( cache ) {
 	delete fic;
-	fic = 0;
+	fic = nullptr;
     }
 }
 
diff --git a/src/tools/tqfileinfo_unix.cpp b/src/tools/tqfileinfo_unix.cpp
index 7296593df..8ef6887ac 100644
--- a/src/tools/tqfileinfo_unix.cpp
+++ b/src/tools/tqfileinfo_unix.cpp
@@ -347,7 +347,7 @@ void TQFileInfo::doStat() const
     int r = ::stat( TQFile::encodeName(fn), b );
     if ( r != 0 && !that->symLink ) {
 	delete that->fic;
-	that->fic = 0;
+	that->fic = nullptr;
     }
 }
 
diff --git a/src/tools/tqgarray.cpp b/src/tools/tqgarray.cpp
index 17dfdc8f2..a69e7a507 100644
--- a/src/tools/tqgarray.cpp
+++ b/src/tools/tqgarray.cpp
@@ -173,7 +173,7 @@ TQGArray::~TQGArray()
 	if ( shd->data )			// is lost
 	    DELETE(shd->data);
 	deleteData( shd );
-	shd = 0;
+	shd = nullptr;
     }
 }
 
@@ -248,7 +248,7 @@ bool TQGArray::resize( uint newsize, Optimization optim )
     if ( newsize == 0 ) {			// remove array
 	if ( shd->data )
 	    DELETE(shd->data);
-	shd->data = 0;
+	shd->data = nullptr;
 	shd->len = 0;
 #ifdef QT_QGARRAY_SPEED_OPTIM
 	shd->maxl = 0;
@@ -405,13 +405,13 @@ TQGArray &TQGArray::duplicate( const TQGArray &a )
 		if ( n->data )
 		    memcpy( n->data, shd->data, n->len );
 	    } else {
-		n->data = 0;
+		n->data = nullptr;
 	    }
 	    shd = n;
 	}
 	return *this;
     }
-    char *oldptr = 0;
+    char *oldptr = nullptr;
     if ( shd->count > 1 ) {			// disconnect this
 	shd->count--;
 	shd = newData();
@@ -425,7 +425,7 @@ TQGArray &TQGArray::duplicate( const TQGArray &a )
 	if ( shd->data )
 	    memcpy( shd->data, a.shd->data, a.shd->len );
     } else {
-	shd->data = 0;
+	shd->data = nullptr;
     }
     shd->len =
 #ifdef QT_QGARRAY_SPEED_OPTIM
@@ -448,8 +448,8 @@ TQGArray &TQGArray::duplicate( const TQGArray &a )
 TQGArray &TQGArray::duplicate( const char *d, uint len )
 {
     char *data;
-    if ( d == 0 || len == 0 ) {
-	data = 0;
+    if ( !d || len == 0 ) {
+	data = nullptr;
 	len  = 0;
     } else {
 	if ( shd->count == 1 && shd->len == len ) {
@@ -558,7 +558,7 @@ void TQGArray::store( const char *d, uint len )
 
 TQGArray &TQGArray::setRawData( const char *d, uint len )
 {
-    duplicate( 0, 0 );				// set null data
+    duplicate( nullptr, 0 );				// set null data
     shd->data = (char *)d;
     shd->len  = len;
     return *this;
@@ -579,7 +579,7 @@ void TQGArray::resetRawData( const char *d, uint len )
 #endif
 	return;
     }
-    shd->data = 0;
+    shd->data = nullptr;
     shd->len  = 0;
 }
 
diff --git a/src/tools/tqgarray.h b/src/tools/tqgarray.h
index 6340f7ccb..28c6f8265 100644
--- a/src/tools/tqgarray.h
+++ b/src/tools/tqgarray.h
@@ -53,7 +53,7 @@ public:
     // do not use this, even though this is public
     // ### make protected or private in TQt 4.0 beta?
     struct array_data : public TQShared {	// shared array
-	array_data():data(0),len(0)
+	array_data():data(nullptr),len(0)
 #ifdef QT_QGARRAY_SPEED_OPTIM
 		    ,maxl(0)
 #endif
diff --git a/src/tools/tqgcache.cpp b/src/tools/tqgcache.cpp
index f0728b4f9..31dda7684 100644
--- a/src/tools/tqgcache.cpp
+++ b/src/tools/tqgcache.cpp
@@ -65,7 +65,7 @@
 struct TQCacheItem
 {
     TQCacheItem( void *k, TQPtrCollection::Item d, int c, short p )
-	: priority(p), skipPriority(p), cost(c), key(k), data(d), node(0) {}
+	: priority(p), skipPriority(p), cost(c), key(k), data(d), node(nullptr) {}
     short	priority;
     short	skipPriority;
     int		cost;
@@ -135,7 +135,7 @@ void TQCList::insert( TQCacheItem *ci )
     else
 	append( ci );
 #if defined(QT_DEBUG)
-    Q_ASSERT( ci->node == 0 );
+    Q_ASSERT( !ci->node );
 #endif
     ci->node = currentNode();
 }
@@ -144,7 +144,7 @@ inline void TQCList::insert( int i, TQCacheItem *ci )
 {
     TQPtrList<TQCacheItem>::insert( i, ci );
 #if defined(QT_DEBUG)
-    Q_ASSERT( ci->node == 0 );
+    Q_ASSERT( !ci->node );
 #endif
     ci->node = currentNode();
 }
@@ -154,10 +154,10 @@ void TQCList::take( TQCacheItem *ci )
 {
     if ( ci ) {
 #if defined(QT_DEBUG)
-	Q_ASSERT( ci->node != 0 );
+	Q_ASSERT( ci->node );
 #endif
 	takeNode( ci->node );
-	ci->node = 0;
+	ci->node = nullptr;
     }
 }
 
@@ -165,7 +165,7 @@ void TQCList::take( TQCacheItem *ci )
 inline void TQCList::reference( TQCacheItem *ci )
 {
 #if defined(QT_DEBUG)
-    Q_ASSERT( ci != 0 && ci->node != 0 );
+    Q_ASSERT( ci && ci->node );
 #endif
     ci->skipPriority = ci->priority;
     relinkNode( ci->node );			// relink as first item
@@ -200,11 +200,11 @@ public:
     void clear() { TQGDict::clear(); }
 
     TQCacheItem *find_string(const TQString &key) const
-	{ return (TQCacheItem*)((TQCDict*)this)->look_string(key, 0, 0); }
+	{ return (TQCacheItem*)((TQCDict*)this)->look_string(key, nullptr, 0); }
     TQCacheItem *find_ascii(const char *key) const
-	{ return (TQCacheItem*)((TQCDict*)this)->look_ascii(key, 0, 0); }
+	{ return (TQCacheItem*)((TQCDict*)this)->look_ascii(key, nullptr, 0); }
     TQCacheItem *find_int(long key) const
-	{ return (TQCacheItem*)((TQCDict*)this)->look_int(key, 0, 0); }
+	{ return (TQCacheItem*)((TQCDict*)this)->look_int(key, nullptr, 0); }
 
     TQCacheItem *take_string(const TQString &key)
 	{ return (TQCacheItem*)TQGDict::take_string(key); }
@@ -214,11 +214,11 @@ public:
 	{ return (TQCacheItem*)TQGDict::take_int(key); }
 
     bool  insert_string( const TQString &key, const TQCacheItem *ci )
-	{ return TQGDict::look_string(key,(Item)ci,1)!=0;}
+	{ return TQGDict::look_string(key,(Item)ci,1);}
     bool  insert_ascii( const char *key, const TQCacheItem *ci )
-	{ return TQGDict::look_ascii(key,(Item)ci,1)!=0;}
+	{ return TQGDict::look_ascii(key,(Item)ci,1);}
     bool  insert_int( long key, const TQCacheItem *ci )
-	{ return TQGDict::look_int(key,(Item)ci,1)!=0;}
+	{ return TQGDict::look_int(key,(Item)ci,1);}
 
     bool  remove_string( TQCacheItem *item )
 	{ return TQGDict::remove_string(*((TQString*)(item->key)),item); }
@@ -441,7 +441,7 @@ bool TQGCache::remove_string( const TQString &key )
     Item d = take_string( key );
     if ( d )
 	deleteItem( d );
-    return d != 0;
+    return d;
 }
 
 bool TQGCache::remove_other( const char *key )
@@ -449,7 +449,7 @@ bool TQGCache::remove_other( const char *key )
     Item d = take_other( key );
     if ( d )
 	deleteItem( d );
-    return d != 0;
+    return d;
 }
 
 
@@ -469,7 +469,7 @@ TQPtrCollection::Item TQGCache::take_string( const TQString &key )
 	delete (TQString*)ci->key;
 	delete ci;
     } else {
-	d = 0;
+	d = nullptr;
     }
     return d;
 }
@@ -495,7 +495,7 @@ TQPtrCollection::Item TQGCache::take_other( const char *key )
 	    delete [] (char *)ci->key;
 	delete ci;
     } else {
-	d = 0;
+	d = nullptr;
     }
     return d;
 }
@@ -551,7 +551,7 @@ TQPtrCollection::Item TQGCache::find_string( const TQString &key, bool ref ) con
 	    lruList->reference( ci );
 	return ci->data;
     }
-    return 0;
+    return nullptr;
 }
 
 
@@ -575,7 +575,7 @@ TQPtrCollection::Item TQGCache::find_other( const char *key, bool ref ) const
 	    lruList->reference( ci );
 	return ci->data;
     }
-    return 0;
+    return nullptr;
 }
 
 
@@ -693,7 +693,7 @@ TQGCacheIterator::TQGCacheIterator( const TQGCache &c )
 {
     it = new TQCListIt( c.lruList );
 #if defined(QT_DEBUG)
-    Q_ASSERT( it != 0 );
+    Q_ASSERT( it );
 #endif
 }
 
@@ -705,7 +705,7 @@ TQGCacheIterator::TQGCacheIterator( const TQGCacheIterator &ci )
 {
     it = new TQCListIt( ci.it );
 #if defined(QT_DEBUG)
-    Q_ASSERT( it != 0 );
+    Q_ASSERT( it );
 #endif
 }
 
@@ -762,7 +762,7 @@ bool TQGCacheIterator::atLast() const
 TQPtrCollection::Item TQGCacheIterator::toFirst()
 {
     TQCacheItem *item = it->toFirst();
-    return item ? item->data : 0;
+    return item ? item->data : nullptr;
 }
 
 /*!
@@ -772,7 +772,7 @@ TQPtrCollection::Item TQGCacheIterator::toFirst()
 TQPtrCollection::Item TQGCacheIterator::toLast()
 {
     TQCacheItem *item = it->toLast();
-    return item ? item->data : 0;
+    return item ? item->data : nullptr;
 }
 
 /*!
@@ -782,7 +782,7 @@ TQPtrCollection::Item TQGCacheIterator::toLast()
 TQPtrCollection::Item TQGCacheIterator::get() const
 {
     TQCacheItem *item = it->current();
-    return item ? item->data : 0;
+    return item ? item->data : nullptr;
 }
 
 /*!
@@ -802,7 +802,7 @@ TQString TQGCacheIterator::getKeyString() const
 const char *TQGCacheIterator::getKeyAscii() const
 {
     TQCacheItem *item = it->current();
-    return item ? (const char *)item->key : 0;
+    return item ? (const char *)item->key : nullptr;
 }
 
 /*!
@@ -822,7 +822,7 @@ long TQGCacheIterator::getKeyInt() const
 TQPtrCollection::Item TQGCacheIterator::operator()()
 {
     TQCacheItem *item = it->operator()();
-    return item ? item->data : 0;
+    return item ? item->data : nullptr;
 }
 
 /*!
@@ -832,7 +832,7 @@ TQPtrCollection::Item TQGCacheIterator::operator()()
 TQPtrCollection::Item TQGCacheIterator::operator++()
 {
     TQCacheItem *item = it->operator++();
-    return item ? item->data : 0;
+    return item ? item->data : nullptr;
 }
 
 /*!
@@ -842,7 +842,7 @@ TQPtrCollection::Item TQGCacheIterator::operator++()
 TQPtrCollection::Item TQGCacheIterator::operator+=( uint jump )
 {
     TQCacheItem *item = it->operator+=(jump);
-    return item ? item->data : 0;
+    return item ? item->data : nullptr;
 }
 
 /*!
@@ -852,7 +852,7 @@ TQPtrCollection::Item TQGCacheIterator::operator+=( uint jump )
 TQPtrCollection::Item TQGCacheIterator::operator--()
 {
     TQCacheItem *item = it->operator--();
-    return item ? item->data : 0;
+    return item ? item->data : nullptr;
 }
 
 /*!
@@ -862,5 +862,5 @@ TQPtrCollection::Item TQGCacheIterator::operator--()
 TQPtrCollection::Item TQGCacheIterator::operator-=( uint jump )
 {
     TQCacheItem *item = it->operator-=(jump);
-    return item ? item->data : 0;
+    return item ? item->data : nullptr;
 }
diff --git a/src/tools/tqgdict.cpp b/src/tools/tqgdict.cpp
index b587eb9fb..1e0e9b904 100644
--- a/src/tools/tqgdict.cpp
+++ b/src/tools/tqgdict.cpp
@@ -126,7 +126,7 @@ int TQGDict::hashKeyString( const TQString &key )
 int TQGDict::hashKeyAscii( const char *key )
 {
 #if defined(QT_CHECK_NULL)
-    if ( key == 0 )
+    if ( !key )
 	tqWarning( "TQGDict::hashAsciiKey: Invalid null key" );
 #endif
     const char *k = key;
@@ -168,7 +168,7 @@ int TQGDict::hashKeyAscii( const char *key )
 
 TQDataStream& TQGDict::read( TQDataStream &s, TQPtrCollection::Item &item )
 {
-    item = 0;
+    item = nullptr;
     return s;
 }
 
@@ -213,7 +213,7 @@ void TQGDict::init( uint len, KeyType kt, bool caseSensitive, bool copyKeys )
     TQ_CHECK_PTR( vec );
     memset( (char*)vec, 0, vlen*sizeof(TQBaseBucket*) );
     numItems  = 0;
-    iterators = 0;
+    iterators = nullptr;
     // The caseSensitive and copyKey options don't make sense for
     // all dict types.
     switch ( (keytype = (uint)kt) ) {
@@ -274,7 +274,7 @@ TQGDict::~TQGDict()
 	return;
     TQGDictIterator *i = iterators->first();
     while ( i ) {				// notify all iterators that
-	i->dict = 0;				// this dict is deleted
+	i->dict = nullptr;				// this dict is deleted
 	i = iterators->next();
     }
     delete iterators;
@@ -331,12 +331,12 @@ TQGDict &TQGDict::operator=( const TQGDict &dict )
 TQPtrCollection::Item TQGDict::look_string( const TQString &key, TQPtrCollection::Item d,
 				       int op )
 {
-    TQStringBucket *n = 0;
+    TQStringBucket *n = nullptr;
     int	index = hashKeyString(key) % vlen;
     if ( op == op_find ) {			// find
 	if ( cases ) {
 	    n = (TQStringBucket*)vec[index];
-	    while( n != 0 ) {
+	    while( n ) {
 		if ( key == n->getKey() )
 		    return n->getData();	// item found
 		n = (TQStringBucket*)n->getNext();
@@ -344,23 +344,23 @@ TQPtrCollection::Item TQGDict::look_string( const TQString &key, TQPtrCollection
 	} else {
 	    TQString k = key.lower();
 	    n = (TQStringBucket*)vec[index];
-	    while( n != 0 ) {
+	    while( n ) {
 		if ( k == n->getKey().lower() )
 		    return n->getData();	// item found
 		n = (TQStringBucket*)n->getNext();
 	    }
 	}
-	return 0;				// not found
+	return nullptr;				// not found
     }
     if ( op == op_replace ) {			// replace
-	if ( vec[index] != 0 )			// maybe something there
+	if ( vec[index] )			// maybe something there
 	    remove_string( key );
     }
     // op_insert or op_replace
     n = new TQStringBucket(key,newItem(d),vec[index]);
     TQ_CHECK_PTR( n );
 #if defined(QT_CHECK_NULL)
-    if ( n->getData() == 0 )
+    if ( !n->getData() )
 	tqWarning( "TQDict: Cannot insert null item" );
 #endif
     vec[index] = n;
@@ -386,17 +386,17 @@ TQPtrCollection::Item TQGDict::look_ascii( const char *key, TQPtrCollection::Ite
 		    return n->getData();	// item found
 	    }
 	}
-	return 0;				// not found
+	return nullptr;				// not found
     }
     if ( op == op_replace ) {			// replace
-	if ( vec[index] != 0 )			// maybe something there
+	if ( vec[index] )			// maybe something there
 	    remove_ascii( key );
     }
     // op_insert or op_replace
     n = new TQAsciiBucket(copyk ? tqstrdup(key) : key,newItem(d),vec[index]);
     TQ_CHECK_PTR( n );
 #if defined(QT_CHECK_NULL)
-    if ( n->getData() == 0 )
+    if ( !n->getData() )
 	tqWarning( "TQAsciiDict: Cannot insert null item" );
 #endif
     vec[index] = n;
@@ -414,17 +414,17 @@ TQPtrCollection::Item TQGDict::look_int( long key, TQPtrCollection::Item d, int
 	    if ( n->getKey() == key )
 		return n->getData();		// item found
 	}
-	return 0;				// not found
+	return nullptr;				// not found
     }
     if ( op == op_replace ) {			// replace
-	if ( vec[index] != 0 )			// maybe something there
+	if ( vec[index] )			// maybe something there
 	    remove_int( key );
     }
     // op_insert or op_replace
     n = new TQIntBucket(key,newItem(d),vec[index]);
     TQ_CHECK_PTR( n );
 #if defined(QT_CHECK_NULL)
-    if ( n->getData() == 0 )
+    if ( !n->getData() )
 	tqWarning( "TQIntDict: Cannot insert null item" );
 #endif
     vec[index] = n;
@@ -442,17 +442,17 @@ TQPtrCollection::Item TQGDict::look_ptr( void *key, TQPtrCollection::Item d, int
 	    if ( n->getKey() == key )
 		return n->getData();		// item found
 	}
-	return 0;				// not found
+	return nullptr;				// not found
     }
     if ( op == op_replace ) {			// replace
-	if ( vec[index] != 0 )			// maybe something there
+	if ( vec[index] )			// maybe something there
 	    remove_ptr( key );
     }
     // op_insert or op_replace
     n = new TQPtrBucket(key,newItem(d),vec[index]);
     TQ_CHECK_PTR( n );
 #if defined(QT_CHECK_NULL)
-    if ( n->getData() == 0 )
+    if ( !n->getData() )
 	tqWarning( "TQPtrDict: Cannot insert null item" );
 #endif
     vec[index] = n;
@@ -568,9 +568,9 @@ void TQGDict::unlink_common( int index, TQBaseBucket *node, TQBaseBucket *prev )
 TQStringBucket *TQGDict::unlink_string( const TQString &key, TQPtrCollection::Item d )
 {
     if ( numItems == 0 )			// nothing in dictionary
-	return 0;
+	return nullptr;
     TQStringBucket *n;
-    TQStringBucket *prev = 0;
+    TQStringBucket *prev = nullptr;
     int index = hashKeyString(key) % vlen;
     if ( cases ) {
 	for ( n=(TQStringBucket*)vec[index]; n;
@@ -598,15 +598,15 @@ TQStringBucket *TQGDict::unlink_string( const TQString &key, TQPtrCollection::It
 	    prev = n;
 	}
     }
-    return 0;
+    return nullptr;
 }
 
 TQAsciiBucket *TQGDict::unlink_ascii( const char *key, TQPtrCollection::Item d )
 {
     if ( numItems == 0 )			// nothing in dictionary
-	return 0;
+	return nullptr;
     TQAsciiBucket *n;
-    TQAsciiBucket *prev = 0;
+    TQAsciiBucket *prev = nullptr;
     int index = hashKeyAscii(key) % vlen;
     for ( n=(TQAsciiBucket *)vec[index]; n; n=(TQAsciiBucket *)n->getNext() ) {
 	bool found = (cases ? qstrcmp(n->getKey(),key)
@@ -619,15 +619,15 @@ TQAsciiBucket *TQGDict::unlink_ascii( const char *key, TQPtrCollection::Item d )
 	}
 	prev = n;
     }
-    return 0;
+    return nullptr;
 }
 
 TQIntBucket *TQGDict::unlink_int( long key, TQPtrCollection::Item d )
 {
     if ( numItems == 0 )			// nothing in dictionary
-	return 0;
+	return nullptr;
     TQIntBucket *n;
-    TQIntBucket *prev = 0;
+    TQIntBucket *prev = nullptr;
     int index = (int)((ulong)key % vlen);
     for ( n=(TQIntBucket *)vec[index]; n; n=(TQIntBucket *)n->getNext() ) {
 	bool found = (n->getKey() == key);
@@ -639,15 +639,15 @@ TQIntBucket *TQGDict::unlink_int( long key, TQPtrCollection::Item d )
 	}
 	prev = n;
     }
-    return 0;
+    return nullptr;
 }
 
 TQPtrBucket *TQGDict::unlink_ptr( void *key, TQPtrCollection::Item d )
 {
     if ( numItems == 0 )			// nothing in dictionary
-	return 0;
+	return nullptr;
     TQPtrBucket *n;
-    TQPtrBucket *prev = 0;
+    TQPtrBucket *prev = nullptr;
     int index = (int)((ulong)key % vlen);
     for ( n=(TQPtrBucket *)vec[index]; n; n=(TQPtrBucket *)n->getNext() ) {
 	bool found = (n->getKey() == key);
@@ -659,7 +659,7 @@ TQPtrBucket *TQGDict::unlink_ptr( void *key, TQPtrCollection::Item d )
 	}
 	prev = n;
     }
-    return 0;
+    return nullptr;
 }
 
 
@@ -690,7 +690,7 @@ bool TQGDict::remove_ascii( const char *key, TQPtrCollection::Item item )
 	deleteItem( n->getData() );
 	delete n;
     }
-    return n != 0;
+    return n;
 }
 
 bool TQGDict::remove_int( long key, TQPtrCollection::Item item )
@@ -700,7 +700,7 @@ bool TQGDict::remove_int( long key, TQPtrCollection::Item item )
 	deleteItem( n->getData() );
 	delete n;
     }
-    return n != 0;
+    return n;
 }
 
 bool TQGDict::remove_ptr( void *key, TQPtrCollection::Item item )
@@ -710,7 +710,7 @@ bool TQGDict::remove_ptr( void *key, TQPtrCollection::Item item )
 	deleteItem( n->getData() );
 	delete n;
     }
-    return n != 0;
+    return n;
 }
 
 TQPtrCollection::Item TQGDict::take_string( const TQString &key )
@@ -721,7 +721,7 @@ TQPtrCollection::Item TQGDict::take_string( const TQString &key )
 	d = n->getData();
 	delete n;
     } else {
-	d = 0;
+	d = nullptr;
     }
     return d;
 }
@@ -736,7 +736,7 @@ TQPtrCollection::Item TQGDict::take_ascii( const char *key )
 	d = n->getData();
 	delete n;
     } else {
-	d = 0;
+	d = nullptr;
     }
     return d;
 }
@@ -749,7 +749,7 @@ TQPtrCollection::Item TQGDict::take_int( long key )
 	d = n->getData();
 	delete n;
     } else {
-	d = 0;
+	d = nullptr;
     }
     return d;
 }
@@ -762,7 +762,7 @@ TQPtrCollection::Item TQGDict::take_ptr( void *key )
 	d = n->getData();
 	delete n;
     } else {
-	d = 0;
+	d = nullptr;
     }
     return d;
 }
@@ -825,13 +825,13 @@ void TQGDict::clear()
 		    }
 		    break;
 	    }
-	    vec[j] = 0;				// detach list of buckets
+	    vec[j] = nullptr;				// detach list of buckets
 	}
     }
     if ( iterators && iterators->count() ) {	// invalidate all iterators
 	TQGDictIterator *i = iterators->first();
 	while ( i ) {
-	    i->curNode = 0;
+	    i->curNode = nullptr;
 	    i = iterators->next();
 	}
     }
@@ -1070,11 +1070,11 @@ TQPtrCollection::Item TQGDictIterator::toFirst()
 #if defined(QT_CHECK_NULL)
 	tqWarning( "TQGDictIterator::toFirst: Dictionary has been deleted" );
 #endif
-	return 0;
+	return nullptr;
     }
     if ( dict->count() == 0 ) {			// empty dictionary
-	curNode = 0;
-	return 0;
+	curNode = nullptr;
+	return nullptr;
     }
     uint i = 0;
     TQBaseBucket **v = dict->vec;
@@ -1096,10 +1096,10 @@ TQPtrCollection::Item TQGDictIterator::operator()()
 #if defined(QT_CHECK_NULL)
 	tqWarning( "TQGDictIterator::operator(): Dictionary has been deleted" );
 #endif
-	return 0;
+	return nullptr;
     }
     if ( !curNode )
-	return 0;
+	return nullptr;
     TQPtrCollection::Item d = curNode->getData();
     this->operator++();
     return d;
@@ -1115,10 +1115,10 @@ TQPtrCollection::Item TQGDictIterator::operator++()
 #if defined(QT_CHECK_NULL)
 	tqWarning( "TQGDictIterator::operator++: Dictionary has been deleted" );
 #endif
-	return 0;
+	return nullptr;
     }
     if ( !curNode )
-	return 0;
+	return nullptr;
     curNode = curNode->getNext();
     if ( !curNode ) {				// no next bucket
 	uint i = curIndex + 1;		// look from next vec element
@@ -1126,8 +1126,8 @@ TQPtrCollection::Item TQGDictIterator::operator++()
 	while ( i < dict->size() && !(*v++) )
 	    i++;
 	if ( i == dict->size() ) {		// nothing found
-	    curNode = 0;
-	    return 0;
+	    curNode = nullptr;
+	    return nullptr;
 	}
 	curNode = dict->vec[i];
 	curIndex = i;
@@ -1143,5 +1143,5 @@ TQPtrCollection::Item TQGDictIterator::operator+=( uint jumps )
 {
     while ( curNode && jumps-- )
 	operator++();
-    return curNode ? curNode->getData() : 0;
+    return curNode ? curNode->getData() : nullptr;
 }
diff --git a/src/tools/tqgdict.h b/src/tools/tqgdict.h
index 9a941ecb7..df8f1b298 100644
--- a/src/tools/tqgdict.h
+++ b/src/tools/tqgdict.h
@@ -127,10 +127,10 @@ protected:
 
     TQGDict     &operator=( const TQGDict & );
 
-    bool	remove_string( const TQString &key, TQPtrCollection::Item item=0 );
-    bool	remove_ascii( const char *key, TQPtrCollection::Item item=0 );
-    bool	remove_int( long key, TQPtrCollection::Item item=0 );
-    bool	remove_ptr( void *key, TQPtrCollection::Item item=0 );
+    bool	remove_string( const TQString &key, TQPtrCollection::Item item=nullptr );
+    bool	remove_ascii( const char *key, TQPtrCollection::Item item=nullptr );
+    bool	remove_int( long key, TQPtrCollection::Item item=nullptr );
+    bool	remove_ptr( void *key, TQPtrCollection::Item item=nullptr );
     TQPtrCollection::Item take_string( const TQString &key );
     TQPtrCollection::Item take_ascii( const char *key );
     TQPtrCollection::Item take_int( long key );
@@ -158,10 +158,10 @@ private:
     TQGDItList  *iterators;
     void	   unlink_common( int, TQBaseBucket *, TQBaseBucket * );
     TQStringBucket *unlink_string( const TQString &,
-				  TQPtrCollection::Item item = 0 );
-    TQAsciiBucket  *unlink_ascii( const char *, TQPtrCollection::Item item = 0 );
-    TQIntBucket    *unlink_int( long, TQPtrCollection::Item item = 0 );
-    TQPtrBucket    *unlink_ptr( void *, TQPtrCollection::Item item = 0 );
+				  TQPtrCollection::Item item = nullptr );
+    TQAsciiBucket  *unlink_ascii( const char *, TQPtrCollection::Item item = nullptr );
+    TQIntBucket    *unlink_int( long, TQPtrCollection::Item item = nullptr );
+    TQPtrBucket    *unlink_ptr( void *, TQPtrCollection::Item item = nullptr );
     void	init( uint, KeyType, bool, bool );
     friend class TQGDictIterator;
 };
@@ -198,7 +198,7 @@ private:
 
 inline TQPtrCollection::Item TQGDictIterator::get() const
 {
-    return curNode ? curNode->getData() : 0;
+    return curNode ? curNode->getData() : nullptr;
 }
 
 inline TQString TQGDictIterator::getKeyString() const
@@ -208,7 +208,7 @@ inline TQString TQGDictIterator::getKeyString() const
 
 inline const char *TQGDictIterator::getKeyAscii() const
 {
-    return curNode ? ((TQAsciiBucket*)curNode)->getKey() : 0;
+    return curNode ? ((TQAsciiBucket*)curNode)->getKey() : nullptr;
 }
 
 inline long TQGDictIterator::getKeyInt() const
@@ -218,7 +218,7 @@ inline long TQGDictIterator::getKeyInt() const
 
 inline void *TQGDictIterator::getKeyPtr() const
 {
-    return curNode ? ((TQPtrBucket*)curNode)->getKey() : 0;
+    return curNode ? ((TQPtrBucket*)curNode)->getKey() : nullptr;
 }
 
 
diff --git a/src/tools/tqglist.cpp b/src/tools/tqglist.cpp
index 1da131e69..c4c80cb16 100644
--- a/src/tools/tqglist.cpp
+++ b/src/tools/tqglist.cpp
@@ -103,7 +103,7 @@ class TQGListIteratorList
 {
 public:
     TQGListIteratorList()
-	: list(0), iterator(0) {
+	: list(nullptr), iterator(nullptr) {
     }
     ~TQGListIteratorList() {
 	notifyClear( true );
@@ -123,12 +123,12 @@ public:
 
     void remove( TQGListIterator* i ) {
 	if ( iterator == i ) {
-	    iterator = 0;
+	    iterator = nullptr;
 	} else if ( list ) {
 	    list->remove( i );
 	    if ( list->isEmpty() ) {
 		delete list;
-		list = 0;
+		list = nullptr;
 	    }
 	}
     }
@@ -136,14 +136,14 @@ public:
     void notifyClear( bool zeroList ) {
 	if ( iterator ) {
 	    if ( zeroList )
-		iterator->list = 0;
-	    iterator->curNode = 0;
+		iterator->list = nullptr;
+	    iterator->curNode = nullptr;
 	}
 	if ( list ) {
 	    for ( TQValueList<TQGListIterator*>::Iterator i = list->begin(); i != list->end(); ++i ) {
 		if ( zeroList )
-		    (*i)->list = 0;
-		(*i)->curNode = 0;
+		    (*i)->list = nullptr;
+		(*i)->curNode = nullptr;
 	    }
 	}
     }
@@ -195,7 +195,7 @@ int TQGList::compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item it
 
 TQDataStream &TQGList::read( TQDataStream &s, TQPtrCollection::Item &item )
 {
-    item = 0;
+    item = nullptr;
     return s;
 }
 
@@ -228,10 +228,10 @@ TQGList::TQGList()
 #if defined(TQT_THREAD_SUPPORT)
     //mutex = new TQMutex(true);
 #endif
-    firstNode = lastNode = curNode = 0;		// initialize list
+    firstNode = lastNode = curNode = nullptr;		// initialize list
     numNodes  = 0;
     curIndex  = -1;
-    iterators = 0;				// initialize iterator list
+    iterators = nullptr;				// initialize iterator list
 }
 
 /*!
@@ -244,10 +244,10 @@ TQGList::TQGList( const TQGList & list )
 #if defined(TQT_THREAD_SUPPORT)
     //mutex = new TQMutex(true);
 #endif
-    firstNode = lastNode = curNode = 0;		// initialize list
+    firstNode = lastNode = curNode = nullptr;		// initialize list
     numNodes  = 0;
     curIndex  = -1;
-    iterators = 0;				// initialize iterator list
+    iterators = nullptr;				// initialize iterator list
     TQLNode *n = list.firstNode;
     while ( n ) {				// copy all items from list
 	append( n->data );
@@ -267,7 +267,7 @@ TQGList::~TQGList()
     // instances twice on the same address and therefore tries to destruct
     // twice on the same address! This is insane but let's try not to crash
     // here.
-    iterators = 0;
+    iterators = nullptr;
 #if defined(TQT_THREAD_SUPPORT)
     //delete mutex;
 #endif
@@ -358,7 +358,7 @@ TQLNode *TQGList::locate( uint index )
 #if defined(TQT_THREAD_SUPPORT)
 	//mutex->unlock();
 #endif
-	return 0;
+	return nullptr;
     }
 
     if ( distance < 0 ) {
@@ -428,7 +428,7 @@ void TQGList::prepend( TQPtrCollection::Item d )
 #endif
     TQLNode *n = new TQLNode( newItem(d) );
     TQ_CHECK_PTR( n );
-    n->prev = 0;
+    n->prev = nullptr;
     if ( (n->next = firstNode) )		// list is not empty
 	firstNode->prev = n;
     else					// initialize list
@@ -453,7 +453,7 @@ void TQGList::append( TQPtrCollection::Item d )
 #endif
     TQLNode *n = new TQLNode( newItem(d) );
     TQ_CHECK_PTR( n );
-    n->next = 0;
+    n->next = nullptr;
     if ( (n->prev = lastNode) ) {		// list is not empty
 	lastNode->next = n;
     }
@@ -533,7 +533,7 @@ void TQGList::relinkNode( TQLNode *n )
     }
     curNode = n;
     unlink();
-    n->prev = 0;
+    n->prev = nullptr;
     if ( (n->next = firstNode) ) {		// list is not empty
 	firstNode->prev = n;
     }
@@ -558,24 +558,24 @@ TQLNode *TQGList::unlink()
 #if defined(TQT_THREAD_SUPPORT)
     //mutex->lock();
 #endif
-    if ( curNode == 0 ) {			// null current node
+    if ( !curNode ) {			// null current node
 #if defined(TQT_THREAD_SUPPORT)
 	//mutex->unlock();
 #endif
-	return 0;
+	return nullptr;
     }
     TQLNode *n = curNode;		// unlink this node
     if ( n == firstNode ) {			// removing first node ?
 	if ( (firstNode = n->next) ) {
-	    firstNode->prev = 0;
+	    firstNode->prev = nullptr;
 	} else {
-	    lastNode = curNode = 0;		// list becomes empty
+	    lastNode = curNode = nullptr;		// list becomes empty
 	    curIndex = -1;
 	}
     } else {
 	if ( n == lastNode ) {			// removing last node ?
 	    lastNode = n->prev;
-	    lastNode->next = 0;
+	    lastNode->next = nullptr;
 	} else {				// neither last nor first node
 	    n->prev->next = n->next;
 	    n->next->prev = n->prev;
@@ -610,7 +610,7 @@ bool TQGList::removeNode( TQLNode *n )
     //mutex->lock();
 #endif
 #if defined(QT_CHECK_NULL)
-    if ( n == 0 || (n->prev && n->prev->next != n) ||
+    if ( !n || (n->prev && n->prev->next != n) ||
 	 (n->next && n->next->prev != n) ) {
 	tqWarning( "TQGList::removeNode: Corrupted node" );
 	return false;
@@ -770,13 +770,13 @@ TQPtrCollection::Item TQGList::takeNode( TQLNode *n )
     //mutex->lock();
 #endif
 #if defined(QT_CHECK_NULL)
-    if ( n == 0 || (n->prev && n->prev->next != n) ||
+    if ( !n || (n->prev && n->prev->next != n) ||
 	 (n->next && n->next->prev != n) ) {
 	tqWarning( "TQGList::takeNode: Corrupted node" );
 #if defined(TQT_THREAD_SUPPORT)
 	//mutex->unlock();
 #endif
-	return 0;
+	return nullptr;
     }
 #endif
     curNode = n;
@@ -801,7 +801,7 @@ TQPtrCollection::Item TQGList::take()
     //mutex->lock();
 #endif
     TQLNode *n = unlink();			// unlink node
-    Item d = n ? n->data : 0;
+    Item d = n ? n->data : nullptr;
     delete n;					// delete node, keep contents
 #if defined(TQT_THREAD_SUPPORT)
     //mutex->unlock();
@@ -822,10 +822,10 @@ TQPtrCollection::Item TQGList::takeAt( uint index )
 #if defined(TQT_THREAD_SUPPORT)
 	//mutex->unlock();
 #endif
-	return 0;
+	return nullptr;
     }
     TQLNode *n = unlink();			// unlink node
-    Item d = n ? n->data : 0;
+    Item d = n ? n->data : nullptr;
     delete n;					// delete node, keep contents
 #if defined(TQT_THREAD_SUPPORT)
     //mutex->unlock();
@@ -844,7 +844,7 @@ TQPtrCollection::Item TQGList::takeFirst()
 #endif
     first();
     TQLNode *n = unlink();			// unlink node
-    Item d = n ? n->data : 0;
+    Item d = n ? n->data : nullptr;
     delete n;
 #if defined(TQT_THREAD_SUPPORT)
     //mutex->unlock();
@@ -863,7 +863,7 @@ TQPtrCollection::Item TQGList::takeLast()
 #endif
     last();
     TQLNode *n = unlink();			// unlink node
-    Item d = n ? n->data : 0;
+    Item d = n ? n->data : nullptr;
     delete n;
 #if defined(TQT_THREAD_SUPPORT)
     //mutex->unlock();
@@ -883,7 +883,7 @@ void TQGList::clear()
 #endif
     TQLNode *n = firstNode;
 
-    firstNode = lastNode = curNode = 0;		// initialize list
+    firstNode = lastNode = curNode = nullptr;		// initialize list
     numNodes = 0;
     curIndex = -1;
 
@@ -1071,7 +1071,7 @@ TQPtrCollection::Item TQGList::first()
 #if defined(TQT_THREAD_SUPPORT)
     //mutex->unlock();
 #endif
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -1093,7 +1093,7 @@ TQPtrCollection::Item TQGList::last()
 #if defined(TQT_THREAD_SUPPORT)
     //mutex->unlock();
 #endif
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -1115,12 +1115,12 @@ TQPtrCollection::Item TQGList::next()
 	    return curNode->data;
 	}
 	curIndex = -1;
-	curNode = 0;
+	curNode = nullptr;
     }
 #if defined(TQT_THREAD_SUPPORT)
     //mutex->unlock();
 #endif
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -1142,12 +1142,12 @@ TQPtrCollection::Item TQGList::prev()
 	    return curNode->data;
 	}
 	curIndex = -1;
-	curNode = 0;
+	curNode = nullptr;
     }
 #if defined(TQT_THREAD_SUPPORT)
     //mutex->unlock();
 #endif
-    return 0;
+    return nullptr;
 }
 
 
@@ -1250,7 +1250,7 @@ void TQGList::sort()
     TQPtrCollection::Item* heap = realheap - 1;
     int size = 0;
     TQLNode* insert = firstNode;
-    for( ; insert != 0; insert = insert->next ) {
+    for( ; insert; insert = insert->next ) {
 	heap[++size] = insert->data;
 	int i = size;
 	while( i > 1 && compareItems( heap[i], heap[ i / 2 ] ) < 0 ) {
@@ -1316,7 +1316,7 @@ TQDataStream &TQGList::read( TQDataStream &s )
 	TQ_CHECK_PTR( n );
 	if ( !n )				// no memory
 	    break;
-	n->next = 0;
+	n->next = nullptr;
 	if ( (n->prev = lastNode) )		// list is not empty
 	    lastNode->next = n;
 	else					// initialize list
@@ -1472,9 +1472,9 @@ TQPtrCollection::Item TQGListIterator::toFirst()
 #if defined(QT_CHECK_NULL)
 	tqWarning( "TQGListIterator::toFirst: List has been deleted" );
 #endif
-	return 0;
+	return nullptr;
     }
-    return list->firstNode ? (curNode = list->firstNode)->getData() : 0;
+    return list->firstNode ? (curNode = list->firstNode)->getData() : nullptr;
 }
 
 /*!
@@ -1488,9 +1488,9 @@ TQPtrCollection::Item TQGListIterator::toLast()
 #if defined(QT_CHECK_NULL)
 	tqWarning( "TQGListIterator::toLast: List has been deleted" );
 #endif
-	return 0;
+	return nullptr;
     }
-    return list->lastNode ? (curNode = list->lastNode)->getData() : 0;
+    return list->lastNode ? (curNode = list->lastNode)->getData() : nullptr;
 }
 
 
@@ -1509,7 +1509,7 @@ TQPtrCollection::Item TQGListIterator::toLast()
 TQPtrCollection::Item TQGListIterator::operator()()
 {
     if ( !curNode )
-	return 0;
+	return nullptr;
     TQPtrCollection::Item d = curNode->getData();
     curNode = curNode->next;
     return  d;
@@ -1523,9 +1523,9 @@ TQPtrCollection::Item TQGListIterator::operator()()
 TQPtrCollection::Item TQGListIterator::operator++()
 {
     if ( !curNode )
-	return 0;
+	return nullptr;
     curNode = curNode->next;
-    return curNode ? curNode->getData() : 0;
+    return curNode ? curNode->getData() : nullptr;
 }
 
 /*!
@@ -1537,7 +1537,7 @@ TQPtrCollection::Item TQGListIterator::operator+=( uint jumps )
 {
     while ( curNode && jumps-- )
 	curNode = curNode->next;
-    return curNode ? curNode->getData() : 0;
+    return curNode ? curNode->getData() : nullptr;
 }
 
 /*!
@@ -1548,9 +1548,9 @@ TQPtrCollection::Item TQGListIterator::operator+=( uint jumps )
 TQPtrCollection::Item TQGListIterator::operator--()
 {
     if ( !curNode )
-	return 0;
+	return nullptr;
     curNode = curNode->prev;
-    return curNode ? curNode->getData() : 0;
+    return curNode ? curNode->getData() : nullptr;
 }
 
 /*!
@@ -1562,5 +1562,5 @@ TQPtrCollection::Item TQGListIterator::operator-=( uint jumps )
 {
     while ( curNode && jumps-- )
 	curNode = curNode->prev;
-    return curNode ? curNode->getData() : 0;
+    return curNode ? curNode->getData() : nullptr;
 }
diff --git a/src/tools/tqglist.h b/src/tools/tqglist.h
index a06340018..9c11851ad 100644
--- a/src/tools/tqglist.h
+++ b/src/tools/tqglist.h
@@ -88,8 +88,8 @@ protected:
     bool insertAt( uint index, TQPtrCollection::Item ); // add item at i'th position
     void relinkNode( TQLNode * );		// relink as first item
     bool removeNode( TQLNode * );		// remove node
-    bool remove( TQPtrCollection::Item = 0 );	// remove item (0=current)
-    bool removeRef( TQPtrCollection::Item = 0 );	// remove item (0=current)
+    bool remove( TQPtrCollection::Item = nullptr );	// remove item (0=current)
+    bool removeRef( TQPtrCollection::Item = nullptr );	// remove item (0=current)
     bool removeFirst();				// remove first item
     bool removeLast();				// remove last item
     bool removeAt( uint );			// remove item at i'th position
@@ -132,7 +132,7 @@ protected:
 #endif
 
     TQLNode* begin() const { return firstNode; }
-    TQLNode* end() const { return 0; }
+    TQLNode* end() const { return nullptr; }
     TQLNode* erase( TQLNode* it );
 
 private:
@@ -183,7 +183,7 @@ inline int TQGList::at() const
 inline TQPtrCollection::Item TQGList::at( uint index )
 {
     TQLNode *n = locate( index );
-    return n ? n->data : 0;
+    return n ? n->data : nullptr;
 }
 
 inline TQLNode *TQGList::currentNode() const
@@ -193,17 +193,17 @@ inline TQLNode *TQGList::currentNode() const
 
 inline TQPtrCollection::Item TQGList::get() const
 {
-    return curNode ? curNode->data : 0;
+    return curNode ? curNode->data : nullptr;
 }
 
 inline TQPtrCollection::Item TQGList::cfirst() const
 {
-    return firstNode ? firstNode->data : 0;
+    return firstNode ? firstNode->data : nullptr;
 }
 
 inline TQPtrCollection::Item TQGList::clast() const
 {
-    return lastNode ? lastNode->data : 0;
+    return lastNode ? lastNode->data : nullptr;
 }
 
 
@@ -262,7 +262,7 @@ inline bool TQGListIterator::atLast() const
 
 inline TQPtrCollection::Item TQGListIterator::get() const
 {
-    return curNode ? curNode->data : 0;
+    return curNode ? curNode->data : nullptr;
 }
 
 class TQ_EXPORT TQGListStdIterator
diff --git a/src/tools/tqglobal.cpp b/src/tools/tqglobal.cpp
index ffa8d338e..421c03b56 100644
--- a/src/tools/tqglobal.cpp
+++ b/src/tools/tqglobal.cpp
@@ -103,8 +103,8 @@ static bool si_bigEndian;
 bool tqSysInfo( int *wordSize, bool *bigEndian )
 {
 #if defined(QT_CHECK_NULL)
-    Q_ASSERT( wordSize != 0 );
-    Q_ASSERT( bigEndian != 0 );
+    Q_ASSERT( wordSize );
+    Q_ASSERT( bigEndian );
 #endif
 
     if ( si_alreadyDone ) {			// run it only once
@@ -443,7 +443,7 @@ TQt::WindowsVersion tqt_winver = (TQt::WindowsVersion)qWinVersion();
 */
 
 
-static TQtMsgHandler handler = 0;		// pointer to debug handler
+static TQtMsgHandler handler = nullptr;		// pointer to debug handler
 static const int QT_BUFFER_LENGTH = 8196;	// internal buffer length
 
 
@@ -709,7 +709,7 @@ bool tqt_check_pointer( bool c, const char *n, int l )
 
 static bool firstObsoleteWarning(const char *obj, const char *oldfunc )
 {
-    static TQAsciiDict<int> *obsoleteDict = 0;
+    static TQAsciiDict<int> *obsoleteDict = nullptr;
     if ( !obsoleteDict ) {			// first time func is called
 	obsoleteDict = new TQAsciiDict<int>;
 #if defined(QT_DEBUG)
@@ -722,7 +722,7 @@ static bool firstObsoleteWarning(const char *obj, const char *oldfunc )
     TQCString s( obj );
     s += "::";
     s += oldfunc;
-    if ( obsoleteDict->find(s.data()) == 0 ) {
+    if ( !obsoleteDict->find(s.data()) ) {
 	obsoleteDict->insert( s.data(), (int*)1 );	// anything different from 0
 	return true;
     }
diff --git a/src/tools/tqglobal.h b/src/tools/tqglobal.h
index 84b348e81..bfea02528 100644
--- a/src/tools/tqglobal.h
+++ b/src/tools/tqglobal.h
@@ -746,7 +746,7 @@ TQ_EXPORT void tqSystemWarning( const char *, int code = -1 );
 TQ_EXPORT bool tqt_check_pointer( bool c, const char *, int );
 
 #if defined(QT_CHECK_NULL)
-#  define TQ_CHECK_PTR(p) (tqt_check_pointer((p)==0,__FILE__,__LINE__))
+#  define TQ_CHECK_PTR(p) (tqt_check_pointer(!(p),__FILE__,__LINE__))
 #else
 #  define TQ_CHECK_PTR(p)
 #endif
diff --git a/src/tools/tqgpluginmanager.cpp b/src/tools/tqgpluginmanager.cpp
index e38e8e84c..59bfe6d53 100644
--- a/src/tools/tqgpluginmanager.cpp
+++ b/src/tools/tqgpluginmanager.cpp
@@ -339,10 +339,10 @@ void TQGPluginManager::addLibraryPath( const TQString& path )
 const TQLibrary* TQGPluginManager::library( const TQString& feature ) const
 {
     if ( !enabled() || feature.isEmpty() )
-	return 0;
+	return nullptr;
 
     // We already have a TQLibrary object for this feature
-    TQLibrary *library = 0;
+    TQLibrary *library = nullptr;
     if ( ( library = plugDict[feature] ) )
 	return library;
 
@@ -367,7 +367,7 @@ const TQLibrary* TQGPluginManager::library( const TQString& feature ) const
     }
 
     if ( map.isEmpty() )
-	return 0; // no libraries to add
+	return nullptr; // no libraries to add
 
     // Start with the best match to get the library object
     TQGPluginManager *that = (TQGPluginManager*)this;
@@ -396,7 +396,7 @@ const TQLibrary* TQGPluginManager::library( const TQString& feature ) const
 		for ( TQStringList::ConstIterator bit = sameBasename.begin();
 		      bit != sameBasename.end(); ++bit )
 		    same.append( new TQComLibrary( *bit ) );
-		TQComLibrary* bestMatch = 0;
+		TQComLibrary* bestMatch = nullptr;
 		for ( TQComLibrary* candidate = same.first(); candidate; candidate = same.next() )
 		    if ( candidate->qtVersion() && candidate->qtVersion() <= TQT_VERSION
 			 && ( !bestMatch || candidate->qtVersion() > bestMatch->qtVersion() ) )
@@ -411,7 +411,7 @@ const TQLibrary* TQGPluginManager::library( const TQString& feature ) const
 		return library;
 	}
     }
-    return 0;
+    return nullptr;
 }
 
 TQStringList TQGPluginManager::featureList() const
@@ -461,11 +461,11 @@ bool TQGPluginManager::addLibrary( TQLibrary* lib )
     TQComLibrary* plugin = (TQComLibrary*)lib;
     bool useful = false;
 
-    TQUnknownInterface* iFace = 0;
+    TQUnknownInterface* iFace = nullptr;
     plugin->queryInterface( interfaceId, &iFace );
     if ( iFace ) {
-	TQFeatureListInterface *fliFace = 0;
-	TQComponentInformationInterface *cpiFace = 0;
+	TQFeatureListInterface *fliFace = nullptr;
+	TQComponentInformationInterface *cpiFace = nullptr;
 	iFace->queryInterface( IID_QFeatureList, (TQUnknownInterface**)&fliFace );
 	if ( !fliFace )
 	    plugin->queryInterface( IID_QFeatureList, (TQUnknownInterface**)&fliFace );
@@ -542,7 +542,7 @@ bool TQGPluginManager::enabled() const
 
 TQRESULT TQGPluginManager::queryUnknownInterface(const TQString& feature, TQUnknownInterface** iface) const
 {
-    TQComLibrary* plugin = 0;
+    TQComLibrary* plugin = nullptr;
     plugin = (TQComLibrary*)library( feature );
     return plugin ? plugin->queryInterface( interfaceId, (TQUnknownInterface**)iface ) : TQE_NOINTERFACE;
 }
diff --git a/src/tools/tqgvector.cpp b/src/tools/tqgvector.cpp
index 67434110f..875ed65e3 100644
--- a/src/tools/tqgvector.cpp
+++ b/src/tools/tqgvector.cpp
@@ -134,7 +134,7 @@ int TQGVector::compareItems( Item d1, Item d2 )
 
 TQDataStream &TQGVector::read( TQDataStream &s, Item &d )
 {						// read item from stream
-    d = 0;
+    d = nullptr;
     return s;
 }
 
@@ -159,7 +159,7 @@ TQDataStream &TQGVector::write( TQDataStream &s, Item ) const
 
 TQGVector::TQGVector()				// create empty vector
 {
-    vec = 0;
+    vec = nullptr;
     len = numItems = 0;
 }
 
@@ -168,7 +168,7 @@ TQGVector::TQGVector( uint size )			// create vectors with nullptrs
     len = size;
     numItems = 0;
     if ( len == 0 ) {				// zero length
-	vec = 0;
+	vec = nullptr;
 	return;
     }
     vec = NEW(Item,len);
@@ -182,7 +182,7 @@ TQGVector::TQGVector( const TQGVector &a )		// make copy of other vector
     len = a.len;
     numItems = a.numItems;
     if ( len == 0 ) {
-	vec = 0;
+	vec = nullptr;
 	return;
     }
     vec = NEW( Item, len );
@@ -192,7 +192,7 @@ TQGVector::TQGVector( const TQGVector &a )		// make copy of other vector
 	    vec[i] = newItem( a.vec[i] );
 	    TQ_CHECK_PTR( vec[i] );
 	} else {
-	    vec[i] = 0;
+	    vec[i] = nullptr;
 	}
     }
 }
@@ -211,7 +211,7 @@ TQGVector& TQGVector::operator=( const TQGVector &v )
     len = v.len;
     numItems = v.numItems;
     if ( len == 0 ) {
-	vec = 0;
+	vec = nullptr;
 	return *this;
     }
     vec = NEW( Item, len );
@@ -221,7 +221,7 @@ TQGVector& TQGVector::operator=( const TQGVector &v )
 	    vec[i] = newItem( v.vec[i] );
 	    TQ_CHECK_PTR( vec[i] );
 	} else {
-	    vec[i] = 0;
+	    vec[i] = nullptr;
 	}
     }
     return *this;
@@ -244,9 +244,9 @@ bool TQGVector::insert( uint index, Item d )	// insert item at index
 	vec[index] = newItem( d );
 	TQ_CHECK_PTR( vec[index] );
 	numItems++;
-	return vec[index] != 0;
+	return vec[index];
     } else {
-	vec[index] = 0;				// reset item
+	vec[index] = nullptr;				// reset item
     }
     return true;
 }
@@ -261,7 +261,7 @@ bool TQGVector::remove( uint index )		// remove item at index
 #endif
     if ( vec[index] ) {				// valid item
 	deleteItem( vec[index] );		// delete it
-	vec[index] = 0;				// reset pointer
+	vec[index] = nullptr;				// reset pointer
 	numItems--;
     }
     return true;
@@ -272,13 +272,13 @@ TQPtrCollection::Item TQGVector::take( uint index )		// take out item
 #if defined(QT_CHECK_RANGE)
     if ( index >= len ) {			// range error
 	tqWarning( "TQGVector::take: Index %d out of range", index );
-	return 0;
+	return nullptr;
     }
 #endif
     Item d = vec[index];				// don't delete item
     if ( d )
 	numItems--;
-    vec[index] = 0;
+    vec[index] = nullptr;
     return d;
 }
 
@@ -290,7 +290,7 @@ void TQGVector::clear()				// clear vector
 		deleteItem( vec[i] );
 	}
 	DELETE(vec);
-	vec = 0;
+	vec = nullptr;
 	len = numItems = 0;
     }
 }
@@ -312,7 +312,7 @@ bool TQGVector::resize( uint newsize )		// resize array
 	}
 	if ( newsize == 0 ) {			// vector becomes empty
 	    DELETE(vec);
-	    vec = 0;
+	    vec = nullptr;
 	    len = numItems = 0;
 	    return true;
 	}
@@ -359,7 +359,7 @@ bool TQGVector::fill( Item d, int flen )		// resize and fill vector
 }
 
 
-static TQGVector *sort_vec=0;			// current sort vector
+static TQGVector *sort_vec=nullptr;			// current sort vector
 
 
 #if defined(Q_C_CALLBACKS)
@@ -388,9 +388,9 @@ void TQGVector::sort()				// sort vector
     Item *end	= &vec[len-1];
     Item tmp;
     for (;;) {				// put all zero elements behind
-	while ( start < end && *start != 0 )
+	while ( start < end && *start )
 	    start++;
-	while ( end > start && *end == 0 )
+	while ( end > start && !*end )
 	    end--;
 	if ( start < end ) {
 	    tmp = *start;
@@ -408,7 +408,7 @@ void TQGVector::sort()				// sort vector
 
     sort_vec = (TQGVector*)this;
     qsort( vec, count(), sizeof(Item), cmp_vec );
-    sort_vec = 0;
+    sort_vec = nullptr;
 }
 
 int TQGVector::bsearch( Item d ) const		// binary search; when sorted
@@ -428,7 +428,7 @@ int TQGVector::bsearch( Item d ) const		// binary search; when sorted
     while ( n1 <= n2 ) {
 	int  res;
 	mid = (n1 + n2)/2;
-	if ( vec[mid] == 0 )			// null item greater
+	if ( !vec[mid] )			// null item greater
 	    res = -1;
 	else
 	    res = ((TQGVector*)this)->compareItems( d, vec[mid] );
@@ -473,7 +473,7 @@ int TQGVector::find( Item d, uint index ) const	// find equal item in vector
     }
 #endif
     for ( uint i=index; i<len; i++ ) {
-	if ( vec[i] == 0 && d == 0 )		// found null item
+	if ( !vec[i] && !d )		// found null item
 	    return i;
 	if ( vec[i] && ((TQGVector*)this)->compareItems( vec[i], d ) == 0 )
 	    return i;
@@ -495,7 +495,7 @@ uint TQGVector::contains( Item d ) const		// get number of equal matches
 {
     uint count = 0;
     for ( uint i=0; i<len; i++ ) {
-	if ( vec[i] == 0 && d == 0 )		// count null items
+	if ( !vec[i] && !d )		// count null items
 	    count++;
 	if ( vec[i] && ((TQGVector*)this)->compareItems( vec[i], d ) == 0 )
 	    count++;
diff --git a/src/tools/tqintdict.h b/src/tools/tqintdict.h
index 2b5d62d8e..5e5783ca5 100644
--- a/src/tools/tqintdict.h
+++ b/src/tools/tqintdict.h
@@ -69,9 +69,9 @@ public:
     bool  remove( long k )		{ return TQGDict::remove_int(k); }
     type *take( long k )		{ return (type*)TQGDict::take_int(k); }
     type *find( long k ) const
-		{ return (type *)((TQGDict*)this)->TQGDict::look_int(k,0,0); }
+		{ return (type *)((TQGDict*)this)->TQGDict::look_int(k,nullptr,0); }
     type *operator[]( long k ) const
-		{ return (type *)((TQGDict*)this)->TQGDict::look_int(k,0,0); }
+		{ return (type *)((TQGDict*)this)->TQGDict::look_int(k,nullptr,0); }
     void  clear()			{ TQGDict::clear(); }
     void  resize( uint n )		{ TQGDict::resize(n); }
     void  statistics() const		{ TQGDict::statistics(); }
diff --git a/src/tools/tqlibrary.cpp b/src/tools/tqlibrary.cpp
index d2b038af8..551229614 100644
--- a/src/tools/tqlibrary.cpp
+++ b/src/tools/tqlibrary.cpp
@@ -62,7 +62,7 @@
 #endif
 
 TQLibraryPrivate::TQLibraryPrivate( TQLibrary *lib )
-    : pHnd( 0 ), library( lib )
+    : pHnd( nullptr ), library( lib )
 {
 }
 
@@ -229,7 +229,7 @@ void *TQLibrary::resolve( const char* symb )
     if ( !d->pHnd )
 	load();
     if ( !d->pHnd )
-	return 0;
+	return nullptr;
 
     void *address = d->resolveSymbol( symb );
 
@@ -282,7 +282,7 @@ void *TQLibrary::resolve( const TQString &filename, const char *symb )
 */
 bool TQLibrary::isLoaded() const
 {
-    return d->pHnd != 0;
+    return d->pHnd != nullptr;
 }
 
 /*!
@@ -349,7 +349,7 @@ bool TQLibrary::unload()
 # if defined(QT_DEBUG_COMPONENT) && QT_DEBUG_COMPONENT == 2
     tqWarning( "%s has been unloaded", (const char*) TQFile::encodeName(library()) );
 # endif
-    d->pHnd = 0;
+    d->pHnd = nullptr;
 #endif
     return true;
 }
diff --git a/src/tools/tqlibrary_unix.cpp b/src/tools/tqlibrary_unix.cpp
index f7122d381..1be4a51e3 100644
--- a/src/tools/tqlibrary_unix.cpp
+++ b/src/tools/tqlibrary_unix.cpp
@@ -73,7 +73,7 @@ bool TQLibraryPrivate::loadLibrary()
     if ( !pHnd )
 	tqWarning( "%s", DL_PREFIX(dlerror)() );
 #endif
-    return pHnd != 0;
+    return pHnd != nullptr;
 }
 
 bool TQLibraryPrivate::freeLibrary()
@@ -88,14 +88,14 @@ bool TQLibraryPrivate::freeLibrary()
 	return false;
     }
 
-    pHnd = 0;
+    pHnd = nullptr;
     return true;
 }
 
 void* TQLibraryPrivate::resolveSymbol( const char* symbol )
 {
     if ( !pHnd )
-	return 0;
+	return nullptr;
 
 #if defined(QT_AOUT_UNDERSCORE)
     // older a.out systems add an underscore in front of symbols
diff --git a/src/tools/tqlocale.cpp b/src/tools/tqlocale.cpp
index 25817d3bc..69394dd65 100644
--- a/src/tools/tqlocale.cpp
+++ b/src/tools/tqlocale.cpp
@@ -1674,7 +1674,7 @@ static TQString countryToCode(TQLocale::Country country)
     return code;
 }
 
-const TQLocalePrivate *TQLocale::default_d = 0;
+const TQLocalePrivate *TQLocale::default_d = nullptr;
 
 TQString TQLocalePrivate::infinity() const
 {
@@ -2510,7 +2510,7 @@ TQLocale::TQLocale(const TQString &name)
 
 TQLocale::TQLocale()
 {
-    if (default_d == 0)
+    if (!default_d)
         default_d = system().d;
 
     d = default_d;
@@ -2541,7 +2541,7 @@ TQLocale::TQLocale(Language language, Country country)
 
     // If not found, should default to system
     if (d->languageId() == TQLocale::C && language != TQLocale::C) {
-        if (default_d == 0)
+        if (!default_d)
             default_d = system().d;
 
         d = default_d;
@@ -2674,7 +2674,7 @@ short TQLocale::toShort(const TQString &s, bool *ok) const
 {
     TQ_LLONG i = toLongLong(s, ok);
     if (i < SHRT_MIN || i > SHRT_MAX) {
-        if (ok != 0)
+        if (ok)
             *ok = false;
         return 0;
     }
@@ -2697,7 +2697,7 @@ ushort TQLocale::toUShort(const TQString &s, bool *ok) const
 {
     TQ_ULLONG i = toULongLong(s, ok);
     if (i > USHRT_MAX) {
-        if (ok != 0)
+        if (ok)
             *ok = false;
         return 0;
     }
@@ -2720,7 +2720,7 @@ int TQLocale::toInt(const TQString &s, bool *ok) const
 {
     TQ_LLONG i = toLongLong(s, ok);
     if (i < INT_MIN || i > INT_MAX) {
-        if (ok != 0)
+        if (ok)
             *ok = false;
         return 0;
     }
@@ -2743,7 +2743,7 @@ uint TQLocale::toUInt(const TQString &s, bool *ok) const
 {
     TQ_ULLONG i = toULongLong(s, ok);
     if (i > UINT_MAX) {
-        if (ok != 0)
+        if (ok)
             *ok = false;
         return 0;
     }
@@ -2766,7 +2766,7 @@ TQ_LONG TQLocale::toLong(const TQString &s, bool *ok) const
 {
     TQ_LLONG i = toLongLong(s, ok);
     if (i < LONG_MIN || i > LONG_MAX) {
-        if (ok != 0)
+        if (ok)
             *ok = false;
         return 0;
     }
@@ -2789,7 +2789,7 @@ TQ_ULONG TQLocale::toULong(const TQString &s, bool *ok) const
 {
     TQ_ULLONG i = toULongLong(s, ok);
     if (i > ULONG_MAX) {
-        if (ok != 0)
+        if (ok)
             *ok = false;
         return 0;
     }
@@ -2851,11 +2851,11 @@ float TQLocale::toFloat(const TQString &s, bool *ok) const
     bool myOk;
     double d = toDouble(s, &myOk);
     if (!myOk || d > QT_MAX_FLOAT || d < -QT_MAX_FLOAT) {
-        if (ok != 0)
+        if (ok)
             *ok = false;
         return 0.0;
     }
-    if (ok != 0)
+    if (ok)
         *ok = true;
     return (float) d;
 }
@@ -2987,9 +2987,9 @@ TQLocale TQLocale::system()
 {
 #ifdef Q_OS_UNIX
     const char *s = getenv("LC_NUMERIC");
-    if (s == 0)
+    if (!s)
         s = getenv("LC_ALL");
-    if (s != 0)
+    if (s)
             return TQLocale(s);
 #endif
     return TQLocale(TQLocalePrivate::systemLocaleName());
@@ -3290,10 +3290,10 @@ TQString TQLocalePrivate::doubleToString(double d,
         if (form == DFExponent)
             ++pr;
 
-        char *rve = 0;
-        char *buff = 0;
+        char *rve = nullptr;
+        char *buff = nullptr;
         digits = qdtoa(d, mode, pr, &decpt, &sign, &rve, &buff);
-        if (buff != 0)
+        if (buff)
             free(buff);
 #endif // QT_QLOCALE_USES_FCVT
 
@@ -3659,12 +3659,12 @@ double TQLocalePrivate::stringToDouble(TQString num,
                                         GroupSeparatorMode group_sep_mode) const
 {
     if (!numberToCLocale(num, group_sep_mode)) {
-        if (ok != 0)
+        if (ok)
             *ok = false;
         return 0.0;
     }
 
-    if (ok != 0)
+    if (ok)
         *ok = true;
 
     if (num == "nan")
@@ -3690,7 +3690,7 @@ double TQLocalePrivate::stringToDouble(TQString num,
 #endif
 
     if (!_ok || *endptr != '\0') {
-        if (ok != 0)
+        if (ok)
             *ok = false;
         return 0.0;
     }
@@ -3703,7 +3703,7 @@ TQ_LLONG TQLocalePrivate::stringToLongLong(TQString num, int base,
                                     GroupSeparatorMode group_sep_mode) const
 {
     if (!numberToCLocale(num, group_sep_mode)) {
-        if (ok != 0)
+        if (ok)
             *ok = false;
         return 0;
     }
@@ -3714,12 +3714,12 @@ TQ_LLONG TQLocalePrivate::stringToLongLong(TQString num, int base,
     TQ_LLONG l = qstrtoll(num_buff, &endptr, base, &_ok);
 
     if (!_ok || *endptr != '\0') {
-        if (ok != 0)
+        if (ok)
             *ok = false;
         return 0;
     }
 
-    if (ok != 0)
+    if (ok)
         *ok = true;
     return l;
 }
@@ -3729,7 +3729,7 @@ TQ_ULLONG TQLocalePrivate::stringToUnsLongLong(TQString num, int base,
                                     GroupSeparatorMode group_sep_mode) const
 {
     if (!numberToCLocale(num, group_sep_mode)) {
-        if (ok != 0)
+        if (ok)
             *ok = false;
         return 0;
     }
@@ -3740,12 +3740,12 @@ TQ_ULLONG TQLocalePrivate::stringToUnsLongLong(TQString num, int base,
     TQ_ULLONG l = qstrtoull(num_buff, &endptr, base, &_ok);
 
     if (!_ok || *endptr != '\0') {
-        if (ok != 0)
+        if (ok)
             *ok = false;
         return 0;
     }
 
-    if (ok != 0)
+    if (ok)
         *ok = true;
     return l;
 }
@@ -3800,7 +3800,7 @@ static TQ_ULLONG qstrtoull(const char *nptr, const char **endptr, int base, bool
     TQ_ULLONG qbase, cutoff;
     int neg, any, cutlim;
 
-    if (ok != 0)
+    if (ok)
         *ok = true;
 
     /*
@@ -3811,9 +3811,9 @@ static TQ_ULLONG qstrtoull(const char *nptr, const char **endptr, int base, bool
         c = *s++;
     } while (isspace(c));
     if (c == '-') {
-        if (ok != 0)
+        if (ok)
             *ok = false;
-        if (endptr != 0)
+        if (endptr)
             *endptr = s - 1;
         return 0;
     } else {
@@ -3853,12 +3853,12 @@ static TQ_ULLONG qstrtoull(const char *nptr, const char **endptr, int base, bool
     }
     if (any < 0) {
         acc = ULLONG_MAX;
-        if (ok != 0)
+        if (ok)
             *ok = false;
     }
     else if (neg)
         acc = (~acc) + 1;
-    if (endptr != 0)
+    if (endptr)
         *endptr = (char *)(any ? s - 1 : nptr);
     return (acc);
 }
@@ -3881,7 +3881,7 @@ static TQ_LLONG qstrtoll(const char *nptr, const char **endptr, int base, bool *
     TQ_ULLONG qbase, cutoff;
     int neg, any, cutlim;
 
-    if (ok != 0)
+    if (ok)
         *ok = true;
 
     /*
@@ -3954,12 +3954,12 @@ static TQ_LLONG qstrtoll(const char *nptr, const char **endptr, int base, bool *
     }
     if (any < 0) {
         acc = neg ? LLONG_MIN : LLONG_MAX;
-        if (ok != 0)
+        if (ok)
             *ok = false;
     } else if (neg) {
         acc = (~acc) + 1;
     }
-    if (endptr != 0)
+    if (endptr)
         *endptr = (char *)(any ? s - 1 : nptr);
     return (acc);
 }
@@ -4545,7 +4545,7 @@ static Bigint *pow5mult(Bigint *b, int k)
     if (!(p5 = p5s)) {
         /* first time */
         p5 = p5s = i2b(625);
-        p5->next = 0;
+        p5->next = nullptr;
     }
     for(;;) {
         if (k & 1) {
@@ -4557,7 +4557,7 @@ static Bigint *pow5mult(Bigint *b, int k)
             break;
         if (!(p51 = p5->next)) {
             p51 = p5->next = mult(p5,p5);
-            p51->next = 0;
+            p51->next = nullptr;
         }
         p5 = p51;
     }
@@ -5006,7 +5006,7 @@ static double qstrtod(CONST char *s00, CONST char **se, bool *ok)
       #else
       CONST char decimal_point = '.';
       #endif */
-    if (ok != 0)
+    if (ok)
         *ok = true;
 
     CONST char decimal_point = '.';
@@ -5132,7 +5132,7 @@ static double qstrtod(CONST char *s00, CONST char **se, bool *ok)
     rv = y;
     if (k > 9)
         rv = tens[k - 9] * rv + z;
-    bd0 = 0;
+    bd0 = nullptr;
     if (nd <= DBL_DIG
 #ifndef RND_PRODQUOT
         && FLT_ROUNDS == 1
@@ -5191,7 +5191,7 @@ static double qstrtod(CONST char *s00, CONST char **se, bool *ok)
             if (e1 > DBL_MAX_10_EXP) {
             ovfl:
                 //                                errno = ERANGE;
-                if (ok != 0)
+                if (ok)
                     *ok = false;
 #ifdef __STDC__
                 rv = HUGE_VAL;
@@ -5254,7 +5254,7 @@ static double qstrtod(CONST char *s00, CONST char **se, bool *ok)
                         undfl:
                             rv = 0.;
                             //                                        errno = ERANGE;
-                            if (ok != 0)
+                            if (ok)
                                 *ok = false;
                             if (bd0)
                                 goto retfree;
@@ -5970,7 +5970,7 @@ static char *_qdtoa( NEEDS_VOLATILE double d, int mode, int ndigits, int *decpt,
         eps = ieps*d + 7.;
         setWord0(&eps, getWord0(eps) - (P-1)*Exp_msk1);
         if (ilim == 0) {
-            S = mhi = 0;
+            S = mhi = nullptr;
             d -= 5.;
             if (d > eps)
                 goto one_digit;
@@ -6033,7 +6033,7 @@ static char *_qdtoa( NEEDS_VOLATILE double d, int mode, int ndigits, int *decpt,
         /* Yes. */
         ds = tens[k];
         if (ndigits < 0 && ilim <= 0) {
-            S = mhi = 0;
+            S = mhi = nullptr;
             if (ilim < 0 || d <= 5*ds)
                 goto no_digits;
             goto one_digit;
@@ -6071,7 +6071,7 @@ static char *_qdtoa( NEEDS_VOLATILE double d, int mode, int ndigits, int *decpt,
 
     m2 = b2;
     m5 = b5;
-    mhi = mlo = 0;
+    mhi = mlo = nullptr;
     if (leftright) {
         if (mode < 2) {
             i =
diff --git a/src/tools/tqlocale.h b/src/tools/tqlocale.h
index d3a578d1c..a51f98c48 100644
--- a/src/tools/tqlocale.h
+++ b/src/tools/tqlocale.h
@@ -448,16 +448,16 @@ public:
     Country country() const;
     TQString name() const;
 
-    short toShort(const TQString &s, bool *ok = 0) const;
-    ushort toUShort(const TQString &s, bool *ok = 0) const;
-    int toInt(const TQString &s, bool *ok = 0) const;
-    uint toUInt(const TQString &s, bool *ok = 0) const;
-    TQ_LONG toLong(const TQString &s, bool *ok = 0) const;
-    TQ_ULONG toULong(const TQString &s, bool *ok = 0) const;
-    TQ_LLONG toLongLong(const TQString &s, bool *ok = 0) const;
-    TQ_ULLONG toULongLong(const TQString &s, bool *ok = 0) const;
-    float toFloat(const TQString &s, bool *ok = 0) const;
-    double toDouble(const TQString &s, bool *ok = 0) const;
+    short toShort(const TQString &s, bool *ok = nullptr) const;
+    ushort toUShort(const TQString &s, bool *ok = nullptr) const;
+    int toInt(const TQString &s, bool *ok = nullptr) const;
+    uint toUInt(const TQString &s, bool *ok = nullptr) const;
+    TQ_LONG toLong(const TQString &s, bool *ok = nullptr) const;
+    TQ_ULONG toULong(const TQString &s, bool *ok = nullptr) const;
+    TQ_LLONG toLongLong(const TQString &s, bool *ok = nullptr) const;
+    TQ_ULLONG toULongLong(const TQString &s, bool *ok = nullptr) const;
+    float toFloat(const TQString &s, bool *ok = nullptr) const;
+    double toDouble(const TQString &s, bool *ok = nullptr) const;
 
     TQString toString(short i) const
     { return toString((TQ_LLONG)i); }
diff --git a/src/tools/tqmap.cpp b/src/tools/tqmap.cpp
index cbc874c63..4f562d0dd 100644
--- a/src/tools/tqmap.cpp
+++ b/src/tools/tqmap.cpp
@@ -48,7 +48,7 @@ void TQMapPrivateBase::rotateLeft( NodePtr x, NodePtr& root)
 {
     NodePtr y = x->right;
     x->right = y->left;
-    if (y->left !=0)
+    if (y->left)
 	y->left->parent = x;
     y->parent = x->parent;
     if (x == root)
@@ -66,7 +66,7 @@ void TQMapPrivateBase::rotateRight( NodePtr x, NodePtr& root )
 {
     NodePtr y = x->left;
     x->left = y->right;
-    if (y->right != 0)
+    if (y->right)
 	y->right->parent = x;
     y->parent = x->parent;
     if (x == root)
@@ -129,15 +129,15 @@ NodePtr TQMapPrivateBase::removeAndRebalance( NodePtr z, NodePtr& root,
     NodePtr y = z;
     NodePtr x;
     NodePtr x_parent;
-    if (y->left == 0) {
+    if (!y->left) {
 	x = y->right;
     } else {
-	if (y->right == 0)
+	if (!y->right)
 	    x = y->left;
 	else
 	    {
 		y = y->right;
-		while (y->left != 0)
+		while (y->left)
 		    y = y->left;
 		x = y->right;
 	    }
@@ -178,20 +178,20 @@ NodePtr TQMapPrivateBase::removeAndRebalance( NodePtr z, NodePtr& root,
 	else
 	    z->parent->right = x;
 	if ( leftmost == z ) {
-	    if (z->right == 0)
+	    if (!z->right)
 		leftmost = z->parent;
 	    else
 		leftmost = x->minimum();
 	}
 	if (rightmost == z) {
-	    if (z->left == 0)
+	    if (!z->left)
 		rightmost = z->parent;  
 	    else
 		rightmost = x->maximum();
 	}
     }
     if (y->color != Node::Red) { 
-	while (x != root && (x == 0 || x->color == Node::Black)) {
+	while (x != root && (!x || x->color == Node::Black)) {
 	    if (x == x_parent->left) {
 		NodePtr w = x_parent->right;
 		if (w->color == Node::Red) {
@@ -200,13 +200,13 @@ NodePtr TQMapPrivateBase::removeAndRebalance( NodePtr z, NodePtr& root,
 		    rotateLeft(x_parent, root);
 		    w = x_parent->right;
 		}
-		if ((w->left == 0 || w->left->color == Node::Black) &&
-		    (w->right == 0 || w->right->color == Node::Black)) {
+		if ((!w->left || w->left->color == Node::Black) &&
+		    (!w->right || w->right->color == Node::Black)) {
 		    w->color = Node::Red;
 		    x = x_parent;
 		    x_parent = x_parent->parent;
 		} else {
-		    if (w->right == 0 || w->right->color == Node::Black) {
+		    if (!w->right || w->right->color == Node::Black) {
 			if (w->left)
 			    w->left->color = Node::Black;
 			w->color = Node::Red;
@@ -228,13 +228,13 @@ NodePtr TQMapPrivateBase::removeAndRebalance( NodePtr z, NodePtr& root,
 		    rotateRight(x_parent, root);
 		    w = x_parent->left;
 		}
-		if ((w->right == 0 || w->right->color == Node::Black) &&
-		    (w->left == 0 || w->left->color == Node::Black)) {
+		if ((!w->right || w->right->color == Node::Black) &&
+		    (!w->left || w->left->color == Node::Black)) {
 		    w->color = Node::Red;
 		    x = x_parent;
 		    x_parent = x_parent->parent;
 		} else {
-		    if (w->left == 0 || w->left->color == Node::Black) {
+		    if (!w->left || w->left->color == Node::Black) {
 			if (w->right) 
 			    w->right->color = Node::Black;
 			w->color = Node::Red;
diff --git a/src/tools/tqmap.h b/src/tools/tqmap.h
index 9b1888856..7acb5f585 100644
--- a/src/tools/tqmap.h
+++ b/src/tools/tqmap.h
@@ -123,7 +123,7 @@ class TQMapIterator
     /**
      * Functions
      */
-    TQMapIterator() : node( 0 ) {}
+    TQMapIterator() : node( nullptr ) {}
     TQMapIterator( TQMapNode<K,T>* p ) : node( p ) {}
     TQMapIterator( const TQMapIterator<K,T>& it ) : node( it.node ) {}
 
@@ -194,7 +194,7 @@ int TQMapIterator<K,T>::dec()
     if (tmp->color == TQMapNodeBase::Red &&
 	tmp->parent->parent == tmp ) {
 	tmp = tmp->right;
-    } else if (tmp->left != 0) {
+    } else if (tmp->left) {
 	TQMapNodeBase* y = tmp->left;
 	while ( y->right )
 	    y = y->right;
@@ -240,7 +240,7 @@ class TQMapConstIterator
     /**
      * Functions
      */
-    TQMapConstIterator() : node( 0 ) {}
+    TQMapConstIterator() : node( nullptr ) {}
     TQMapConstIterator( TQMapNode<K,T>* p ) : node( p ) {}
     TQMapConstIterator( const TQMapConstIterator<K,T>& it ) : node( it.node ) {}
     TQMapConstIterator( const TQMapIterator<K,T>& it ) : node( it.node ) {}
@@ -310,7 +310,7 @@ int TQMapConstIterator<K,T>::dec()
     if (tmp->color == TQMapNodeBase::Red &&
 	tmp->parent->parent == tmp ) {
 	tmp = tmp->right;
-    } else if (tmp->left != 0) {
+    } else if (tmp->left) {
 	TQMapNodeBase* y = tmp->left;
 	while ( y->right )
 	    y = y->right;
@@ -392,7 +392,7 @@ public:
     }
 
 #ifdef QT_QMAP_DEBUG
-    void inorder( TQMapNodeBase* x = 0, int level = 0 ){
+    void inorder( TQMapNodeBase* x = nullptr, int level = 0 ){
 	if ( !x )
 	    x = header->parent;
 	if ( x->left )
@@ -435,15 +435,15 @@ template <class Key, class T>
 TQMapPrivate<Key,T>::TQMapPrivate() {
     header = new Node;
     header->color = TQMapNodeBase::Red; // Mark the header
-    header->parent = 0;
+    header->parent = nullptr;
     header->left = header->right = header;
 }
 template <class Key, class T>
 TQMapPrivate<Key,T>::TQMapPrivate( const TQMapPrivate< Key, T >* _map ) : TQMapPrivateBase( _map ) {
     header = new Node;
     header->color = TQMapNodeBase::Red; // Mark the header
-    if ( _map->header->parent == 0 ) {
-	header->parent = 0;
+    if ( !_map->header->parent ) {
+	header->parent = nullptr;
 	header->left = header->right = header;
     } else {
 	header->parent = copy( (NodePtr)(_map->header->parent) );
@@ -457,20 +457,20 @@ template <class Key, class T>
 TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr TQMapPrivate<Key,T>::copy( TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr p )
 {
     if ( !p )
-	return 0;
+	return nullptr;
     NodePtr n = new Node( *p );
     n->color = p->color;
     if ( p->left ) {
 	n->left = copy( (NodePtr)(p->left) );
 	n->left->parent = n;
     } else {
-	n->left = 0;
+	n->left = nullptr;
     }
     if ( p->right ) {
 	n->right = copy( (NodePtr)(p->right) );
 	n->right->parent = n;
     } else {
-	n->right = 0;
+	n->right = nullptr;
     }
     return n;
 }
@@ -480,7 +480,7 @@ void TQMapPrivate<Key,T>::clear()
 {
     clear( (NodePtr)(header->parent) );
     header->color = TQMapNodeBase::Red;
-    header->parent = 0;
+    header->parent = nullptr;
     header->left = header->right = header;
     node_count = 0;
 }
@@ -488,7 +488,7 @@ void TQMapPrivate<Key,T>::clear()
 template <class Key, class T>
 void TQMapPrivate<Key,T>::clear( TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr p )
 {
-    while ( p != 0 ) {
+    while ( p ) {
 	clear( (NodePtr)p->right );
 	NodePtr y = (NodePtr)p->left;
 	delete p;
@@ -502,7 +502,7 @@ TQ_TYPENAME TQMapPrivate<Key,T>::ConstIterator TQMapPrivate<Key,T>::find(const K
     TQMapNodeBase* y = header;        // Last node
     TQMapNodeBase* x = header->parent; // Root node.
 
-    while ( x != 0 ) {
+    while ( x ) {
 	// If as k <= key(x) go left
 	if ( !( key(x) < k ) ) {
 	    y = x;
@@ -526,7 +526,7 @@ TQ_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T>::insertSingle( con
     TQMapNodeBase* y = header;
     TQMapNodeBase* x = header->parent;
     bool result = true;
-    while ( x != 0 ) {
+    while ( x ) {
 	result = ( k < key(x) );
 	y = x;
 	x = result ? x->left : x->right;
@@ -554,7 +554,7 @@ template <class Key, class T>
 TQ_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T>::insert( TQMapNodeBase* x, TQMapNodeBase* y, const Key& k )
 {
     NodePtr z = new Node( k );
-    if (y == header || x != 0 || k < key(y) ) {
+    if (y == header || x || k < key(y) ) {
 	y->left = z;                // also makes leftmost = z when y == header
 	if ( y == header ) {
 	    header->parent = z;
@@ -567,8 +567,8 @@ TQ_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T>::insert( TQMapNode
 	    header->right = z;          // maintain rightmost pointing to max node
     }
     z->parent = y;
-    z->left = 0;
-    z->right = 0;
+    z->left = nullptr;
+    z->right = nullptr;
     rebalance( z, header->parent );
     ++node_count;
     return Iterator(z);
@@ -647,7 +647,7 @@ public:
 	if ( sh ) {
 	    if ( sh->deref() ) {
 		delete sh;
-		sh = 0L;
+		sh = nullptr;
 	    }
 	}
     }
diff --git a/src/tools/tqmemarray.h b/src/tools/tqmemarray.h
index 2f7aab38c..fd1bc978f 100644
--- a/src/tools/tqmemarray.h
+++ b/src/tools/tqmemarray.h
@@ -69,7 +69,7 @@ public:
     uint  size()    const	{ return TQGArray::size()/sizeof(type); }
     uint  count()   const	{ return size(); }
     bool  isEmpty() const	{ return TQGArray::size() == 0; }
-    bool  isNull()  const	{ return TQGArray::data() == 0; }
+    bool  isNull()  const	{ return !TQGArray::data(); }
     bool  resize( uint size )	{ return TQGArray::resize(size*sizeof(type)); }
     bool  resize( uint size, Optimization optim ) { return TQGArray::resize(size*sizeof(type), optim); }
     bool  truncate( uint pos )	{ return TQGArray::resize(pos*sizeof(type)); }
diff --git a/src/tools/tqmutexpool.cpp b/src/tools/tqmutexpool.cpp
index 74e5926dc..553774cc4 100644
--- a/src/tools/tqmutexpool.cpp
+++ b/src/tools/tqmutexpool.cpp
@@ -42,7 +42,7 @@
 
 #include <tqthread.h>
 
-TQ_EXPORT TQMutexPool *tqt_global_mutexpool = 0;
+TQ_EXPORT TQMutexPool *tqt_global_mutexpool = nullptr;
 
 
 /*!
@@ -111,7 +111,7 @@ TQMutexPool::TQMutexPool( bool recursive, int size )
 {
     mutexes = new TQMutex*[count];
     for ( int index = 0; index < count; ++index ) {
-	mutexes[index] = 0;
+	mutexes[index] = nullptr;
     }
 }
 
@@ -124,10 +124,10 @@ TQMutexPool::~TQMutexPool()
     TQMutexLocker locker( &mutex );
     for ( int index = 0; index < count; ++index ) {
 	delete mutexes[index];
-	mutexes[index] = 0;
+	mutexes[index] = nullptr;
     }
     delete [] mutexes;
-    mutexes = 0;
+    mutexes = nullptr;
 }
 
 /*!
diff --git a/src/tools/tqptrdict.h b/src/tools/tqptrdict.h
index 999f9f8cb..aac2ee1d9 100644
--- a/src/tools/tqptrdict.h
+++ b/src/tools/tqptrdict.h
@@ -69,9 +69,9 @@ public:
     bool  remove( void *k )		{ return TQGDict::remove_ptr(k); }
     type *take( void *k )		{ return (type*)TQGDict::take_ptr(k); }
     type *find( void *k ) const
-		{ return (type *)((TQGDict*)this)->TQGDict::look_ptr(k,0,0); }
+		{ return (type *)((TQGDict*)this)->TQGDict::look_ptr(k,nullptr,0); }
     type *operator[]( void *k ) const
-		{ return (type *)((TQGDict*)this)->TQGDict::look_ptr(k,0,0); }
+		{ return (type *)((TQGDict*)this)->TQGDict::look_ptr(k,nullptr,0); }
     void  clear()			{ TQGDict::clear(); }
     void  resize( uint n )		{ TQGDict::resize(n); }
     void  statistics() const		{ TQGDict::statistics(); }
diff --git a/src/tools/tqptrlist.h b/src/tools/tqptrlist.h
index b43dd7c18..72621727a 100644
--- a/src/tools/tqptrlist.h
+++ b/src/tools/tqptrlist.h
@@ -48,7 +48,7 @@ class TQPtrListStdIterator : public TQGListStdIterator
 {
 public:
     inline TQPtrListStdIterator( TQLNode* n ): TQGListStdIterator(n) {}
-    type *operator*() { return node ? (type *)node->getData() : 0; }
+    type *operator*() { return node ? (type *)node->getData() : nullptr; }
     inline TQPtrListStdIterator<type> operator++()
     { node = next(); return *this; }
     inline TQPtrListStdIterator<type> operator++(int)
diff --git a/src/tools/tqregexp.cpp b/src/tools/tqregexp.cpp
index 5eddb8e0c..f8e63a48b 100644
--- a/src/tools/tqregexp.cpp
+++ b/src/tools/tqregexp.cpp
@@ -991,7 +991,7 @@ private:
 
 #ifndef TQT_NO_REGEXP_CAPTURE
 	State( int a, int m )
-	    : atom( a ), match( m ), reenter( 0 ), anchors( 0 ) { }
+	    : atom( a ), match( m ), reenter( nullptr ), anchors( nullptr ) { }
 #else
 	State( int m )
 	    : match( m ), reenter( 0 ), anchors( 0 ) { }
@@ -1292,7 +1292,7 @@ void TQRegExpEngine::match( const TQString& str, int pos, bool minimal,
     {
 	mmStr = &str;
 	mmIn = str.unicode();
-	if ( mmIn == 0 )
+	if ( !mmIn )
 	    mmIn = &TQChar::null;
 	mmPos = pos;
 	mmCaretPos = caretIndex;
@@ -1402,7 +1402,7 @@ void TQRegExpEngine::addPlusTransitions( const TQMemArray<int>& from,
 	TQMemArray<int> oldOuts = st->outs.copy();
 	mergeInto( &st->outs, to );
 	if ( f[atom].capture >= 0 ) {
-	    if ( st->reenter == 0 )
+	    if ( !st->reenter )
 		st->reenter = new TQMap<int, int>;
 	    for ( int j = 0; j < (int) to.size(); j++ ) {
 		if ( !st->reenter->contains(to[j]) &&
@@ -1458,7 +1458,7 @@ int TQRegExpEngine::anchorConcatenation( int a, int b )
 void TQRegExpEngine::addAnchors( int from, int to, int a )
 {
     State *st = s[from];
-    if ( st->anchors == 0 )
+    if ( !st->anchors )
 	st->anchors = new TQMap<int, int>;
     if ( st->anchors->contains(to) )
 	a = anchorAlternation( (*st->anchors)[to], a );
@@ -1543,9 +1543,9 @@ void TQRegExpEngine::dump() const
 	for ( j = 0; j < (int) s[i]->outs.size(); j++ ) {
 	    int next = s[i]->outs[j];
 	    tqDebug( "    -> %d", next );
-	    if ( s[i]->reenter != 0 && s[i]->reenter->contains(next) )
+	    if ( s[i]->reenter && s[i]->reenter->contains(next) )
 		tqDebug( "       [reenter %d]", (*s[i]->reenter)[next] );
-	    if ( s[i]->anchors != 0 && at(*s[i]->anchors, next) != 0 )
+	    if ( s[i]->anchors && at(*s[i]->anchors, next) != 0 )
 		tqDebug( "       [anchors 0x%.8x]", (*s[i]->anchors)[next] );
 	}
     }
@@ -1853,7 +1853,7 @@ bool TQRegExpEngine::matchHere()
 #endif
 
 #ifndef TQT_NO_REGEXP_BACKREF
-    int *zzZ = 0;
+    int *zzZ = nullptr;
 
     while ( (ncur > 0 || !mmSleeping.isEmpty()) && i <= mmLen - mmPos &&
 	    !stop )
@@ -1877,7 +1877,7 @@ bool TQRegExpEngine::matchHere()
 		/*
 		  First, check if the anchors are anchored properly.
 		*/
-		if ( scur->anchors != 0 ) {
+		if ( scur->anchors ) {
 		    int a = at( *scur->anchors, next );
 		    if ( a != 0 && !testAnchor(i, a, mmCurCapBegin + j * ncap) )
 			in = false;
@@ -2018,7 +2018,7 @@ bool TQRegExpEngine::matchHere()
 			  If we are reentering an atom, we empty all
 			  capture zones inside it.
 			*/
-			if ( scur->reenter != 0 &&
+			if ( scur->reenter &&
 			     (q = at(*scur->reenter, next)) != 0 ) {
 			    TQBitArray b;
 			    b.fill( false, nf );
@@ -2134,7 +2134,7 @@ bool TQRegExpEngine::matchHere()
 	  It's time to wake up the sleepers.
 	*/
 	if ( !mmSleeping.isEmpty() ) {
-	    while ( (zzZ = mmSleeping.take(i)) != 0 ) {
+	    while ( (zzZ = mmSleeping.take(i)) ) {
 		int next = zzZ[0];
 		int *capBegin = zzZ + 1;
 		int *capEnd = zzZ + 1 + ncap;
@@ -2613,7 +2613,7 @@ int TQRegExpEngine::getEscape()
 #ifndef TQT_NO_REGEXP_ESCAPE
     if ( (prevCh & ~0xff) == 0 ) {
 	const char *p = strchr( tab, prevCh );
-	if ( p != 0 )
+	if ( p )
 	    return Tok_Char | backTab[p - tab];
     }
 #endif
@@ -2951,7 +2951,7 @@ int TQRegExpEngine::parse( const TQChar *pattern, int len )
     box.cat( middleBox );
     box.cat( rightBox );
     delete yyCharClass;
-    yyCharClass = 0;
+    yyCharClass = nullptr;
 
     officialncap = ncap;
 #ifndef TQT_NO_REGEXP_BACKREF
@@ -2992,7 +2992,7 @@ int TQRegExpEngine::parse( const TQChar *pattern, int len )
 
 #ifndef TQT_NO_REGEXP_OPTIM
     State *sinit = s[InitialState];
-    caretAnchored = ( sinit->anchors != 0 );
+    caretAnchored = ( sinit->anchors );
     if ( caretAnchored ) {
 	TQMap<int, int>& anchors = *sinit->anchors;
 	TQMap<int, int>::ConstIterator a;
@@ -3014,7 +3014,7 @@ int TQRegExpEngine::parse( const TQChar *pattern, int len )
 void TQRegExpEngine::parseAtom( Box *box )
 {
 #ifndef TQT_NO_REGEXP_LOOKAHEAD
-    TQRegExpEngine *eng = 0;
+    TQRegExpEngine *eng = nullptr;
     bool neg;
     int len;
 #endif
@@ -3213,7 +3213,7 @@ struct TQRegExpPrivate
 #ifndef TQT_NO_REGEXP_OPTIM
 static TQSingleCleanupHandler<TQCache<TQRegExpEngine> > cleanup_cache;
 #  ifndef TQT_THREAD_SUPPORT
-static TQCache<TQRegExpEngine> *engineCache = 0;
+static TQCache<TQRegExpEngine> *engineCache = nullptr;
 #  endif // TQT_THREAD_SUPPORT
 #endif // TQT_NO_REGEXP_OPTIM
 
@@ -3222,7 +3222,7 @@ static void regexpEngine( TQRegExpEngine *&eng, const TQString &pattern,
 {
 #  ifdef TQT_THREAD_SUPPORT
     static TQThreadStorage<TQCache<TQRegExpEngine> *> engineCaches;
-    TQCache<TQRegExpEngine> *engineCache = 0;
+    TQCache<TQRegExpEngine> *engineCache = nullptr;
     TQThreadInstance *currentThread = TQThreadInstance::current();
     if (currentThread)
         engineCache = engineCaches.localData();
@@ -3234,9 +3234,9 @@ static void regexpEngine( TQRegExpEngine *&eng, const TQString &pattern,
         if ( currentThread )
 #  endif
             {
-                if ( engineCache != 0 ) {
+                if ( engineCache ) {
                     eng = engineCache->take( pattern );
-                    if ( eng == 0 || eng->caseSensitive() != caseSensitive ) {
+                    if ( !eng || eng->caseSensitive() != caseSensitive ) {
                         delete eng;
                     } else {
                         eng->ref();
@@ -3255,7 +3255,7 @@ static void regexpEngine( TQRegExpEngine *&eng, const TQString &pattern,
         if ( currentThread )
 #  endif
             {
-                if ( engineCache == 0 ) {
+                if ( !engineCache ) {
                     engineCache = new TQCache<TQRegExpEngine>;
                     engineCache->setAutoDelete( true );
 #  ifdef TQT_THREAD_SUPPORT
@@ -3272,7 +3272,7 @@ static void regexpEngine( TQRegExpEngine *&eng, const TQString &pattern,
 	Q_UNUSED( pattern );
 #endif // TQT_NO_REGEXP_OPTIM
 	delete eng;
-	eng = 0;
+	eng = nullptr;
     }
 }
 
@@ -3298,7 +3298,7 @@ static void regexpEngine( TQRegExpEngine *&eng, const TQString &pattern,
     \sa isValid() errorString()
 */
 TQRegExp::TQRegExp()
-    : eng( 0 )
+    : eng( nullptr )
 {
     priv = new TQRegExpPrivate;
 #ifndef TQT_NO_REGEXP_WILDCARD
@@ -3318,7 +3318,7 @@ TQRegExp::TQRegExp()
     \sa setPattern() setCaseSensitive() setWildcard() setMinimal()
 */
 TQRegExp::TQRegExp( const TQString& pattern, bool caseSensitive, bool wildcard )
-    : eng( 0 )
+    : eng( nullptr )
 {
     priv = new TQRegExpPrivate;
     priv->pattern = pattern;
@@ -3335,7 +3335,7 @@ TQRegExp::TQRegExp( const TQString& pattern, bool caseSensitive, bool wildcard )
     \sa operator=()
 */
 TQRegExp::TQRegExp( const TQRegExp& rx )
-    : eng( 0 )
+    : eng( nullptr )
 {
     priv = new TQRegExpPrivate;
     operator=( rx );
@@ -3358,7 +3358,7 @@ TQRegExp::~TQRegExp()
 TQRegExp& TQRegExp::operator=( const TQRegExp& rx )
 {
     TQRegExpEngine *otherEng = rx.eng;
-    if ( otherEng != 0 )
+    if ( otherEng )
 	otherEng->ref();
     invalidateEngine();
     eng = otherEng;
@@ -3621,7 +3621,7 @@ int TQRegExp::match( const TQString& str, int index, int *len,
 		    bool indexIsStart ) const
 {
     int pos = search( str, index, indexIsStart ? CaretAtOffset : CaretAtZero );
-    if ( len != 0 )
+    if ( len )
 	*len = matchedLength();
     return pos;
 }
@@ -3937,7 +3937,7 @@ TQString TQRegExp::escape( const TQString& str )
     int i = 0;
 
     while ( i < (int) quoted.length() ) {
-	if ( strchr(meta, quoted[i].latin1()) != 0 )
+	if ( strchr(meta, quoted[i].latin1()) )
 	    quoted.insert( i++, "\\" );
 	i++;
     }
@@ -3946,7 +3946,7 @@ TQString TQRegExp::escape( const TQString& str )
 
 void TQRegExp::prepareEngine() const
 {
-    if ( eng == 0 ) {
+    if ( !eng ) {
 #ifndef TQT_NO_REGEXP_WILDCARD
 	if ( priv->wc )
 	    priv->rxpattern = wc2rx( priv->pattern );
@@ -3975,10 +3975,10 @@ void TQRegExp::prepareEngineForMatch( const TQString& str ) const
 
 void TQRegExp::invalidateEngine()
 {
-    if ( eng != 0 ) {
+    if ( eng ) {
 	regexpEngine( eng, priv->rxpattern, priv->cs, true );
 	priv->rxpattern = TQString();
-	eng = 0;
+	eng = nullptr;
     }
 }
 
diff --git a/src/tools/tqregexp.h b/src/tools/tqregexp.h
index d656259ad..8943e0e69 100644
--- a/src/tools/tqregexp.h
+++ b/src/tools/tqregexp.h
@@ -79,7 +79,7 @@ public:
 
     bool exactMatch( const TQString& str ) const;
 #ifndef TQT_NO_COMPAT
-    int match( const TQString& str, int index = 0, int *len = 0,
+    int match( const TQString& str, int index = 0, int *len = nullptr,
 	       bool indexIsStart = true ) const;
 #endif
 
diff --git a/src/tools/tqsettings.h b/src/tools/tqsettings.h
index 440e16d6f..042ea8c45 100644
--- a/src/tools/tqsettings.h
+++ b/src/tools/tqsettings.h
@@ -85,42 +85,42 @@ public:
     TQStringList subkeyList(const TQString &) const;
 
     //### remove non const versions in 4.0
-    TQStringList readListEntry( const TQString &, bool * = 0 );
-    TQStringList readListEntry( const TQString &, const TQChar& sep, bool * = 0 );
-    TQString	readEntry( const TQString &, const TQString &def = TQString::null, bool * = 0 );
-    int		readNumEntry( const TQString &, int def = 0, bool * = 0 );
-    double	readDoubleEntry( const TQString &, double def = 0, bool * = 0 );
-    bool	readBoolEntry( const TQString &, bool def = false, bool * = 0 );
+    TQStringList readListEntry( const TQString &, bool * = nullptr );
+    TQStringList readListEntry( const TQString &, const TQChar& sep, bool * = nullptr );
+    TQString	readEntry( const TQString &, const TQString &def = TQString::null, bool * = nullptr );
+    int		readNumEntry( const TQString &, int def = 0, bool * = nullptr );
+    double	readDoubleEntry( const TQString &, double def = 0, bool * = nullptr );
+    bool	readBoolEntry( const TQString &, bool def = false, bool * = nullptr );
 
     //### make those non-inlined in 4.0
-    TQStringList readListEntry( const TQString &key, bool *ok = 0 ) const
+    TQStringList readListEntry( const TQString &key, bool *ok = nullptr ) const
     {
 	TQSettings *that = (TQSettings*)this;
 	return that->readListEntry( key, ok );
     }
-    TQStringList readListEntry( const TQString &key, const TQChar& sep, bool *ok = 0 ) const
+    TQStringList readListEntry( const TQString &key, const TQChar& sep, bool *ok = nullptr ) const
     {
 	TQSettings *that = (TQSettings*)this;
 	return that->readListEntry( key, sep, ok );
     }
     TQString	readEntry( const TQString &key, const TQString &def = TQString::null,
-			   bool *ok = 0 ) const
+			   bool *ok = nullptr ) const
     {
 	TQSettings *that = (TQSettings*)this;
 	return that->readEntry( key, def, ok );
     }
-    int		readNumEntry( const TQString &key, int def = 0, bool *ok = 0 ) const
+    int		readNumEntry( const TQString &key, int def = 0, bool *ok = nullptr ) const
     {
 	TQSettings *that = (TQSettings*)this;
 	return that->readNumEntry( key, def, ok );
     }
 
-    double	readDoubleEntry( const TQString &key, double def = 0, bool *ok = 0 ) const
+    double	readDoubleEntry( const TQString &key, double def = 0, bool *ok = nullptr ) const
     {
 	TQSettings *that = (TQSettings*)this;
 	return that->readDoubleEntry( key, def, ok );
     }
-    bool	readBoolEntry( const TQString &key, bool def = false, bool *ok = 0 ) const
+    bool	readBoolEntry( const TQString &key, bool def = false, bool *ok = nullptr ) const
     {
 	TQSettings *that = (TQSettings*)this;
 	return that->readBoolEntry( key, def, ok );
diff --git a/src/tools/tqstring.cpp b/src/tools/tqstring.cpp
index 6b5390c72..b631e1c28 100644
--- a/src/tools/tqstring.cpp
+++ b/src/tools/tqstring.cpp
@@ -105,9 +105,9 @@ static int ucstrcmp( const TQString &as, const TQString &bs )
     const TQChar *b = bs.unicode();
     if ( a == b )
 	return 0;
-    if ( a == 0 )
+    if ( !a )
 	return 1;
-    if ( b == 0 )
+    if ( !b )
 	return -1;
     int l=TQMIN(as.length(),bs.length());
     while ( l-- && *a == *b )
@@ -190,7 +190,7 @@ TQLigature::TQLigature( TQChar c )
 {
     int pos = TQUnicodeTables::ligature_info[c.row()];
     if( !pos )
-	ligatures = 0;
+	ligatures = nullptr;
     else
     {
 	pos = TQUnicodeTables::ligature_info[(pos<<8)+c.cell()];
@@ -271,14 +271,14 @@ static inline bool format(TQChar::Decomposition tag, TQString & str,
 } // format()
 
 TQStringData::TQStringData() : TQShared(),
-	unicode(0),
-	ascii(0),
+	unicode(nullptr),
+	ascii(nullptr),
 	len(0),
 	issimpletext(true),
 	maxl(0),
 	islatin1(false),
 	security_unpaged(false),
-	cString(0) {
+	cString(nullptr) {
 #if defined(TQT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
 	mutex = new TQMutex(false);
 #endif // TQT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
@@ -287,13 +287,13 @@ TQStringData::TQStringData() : TQShared(),
 
 TQStringData::TQStringData(TQChar *u, uint l, uint m) : TQShared(),
 	unicode(u),
-	ascii(0),
+	ascii(nullptr),
 	len(l),
 	issimpletext(false),
 	maxl(m),
 	islatin1(false),
 	security_unpaged(false),
-	cString(0) {
+	cString(nullptr) {
 #if defined(TQT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
 	mutex = new TQMutex(false);
 #endif // TQT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
@@ -325,11 +325,11 @@ TQStringData::~TQStringData() {
 void TQStringData::setDirty() {
 	if ( ascii ) {
 		delete [] ascii;
-		ascii = 0;
+		ascii = nullptr;
 	}
 	if (cString) {
 		delete cString;
-		cString = 0;
+		cString = nullptr;
 	}
 	issimpletext = false;
 }
@@ -416,7 +416,7 @@ TQChar* TQString::latin1ToUnicode( const TQByteArray& ba, uint* len )
 {
     if ( ba.isNull() ) {
 	*len = 0;
-	return 0;
+	return nullptr;
     }
     int l = 0;
     while ( l < (int)ba.size() && ba[l] )
@@ -435,7 +435,7 @@ static TQChar* internalLatin1ToUnicode( const TQByteArray& ba, uint* len )
 {
     if ( ba.isNull() ) {
 	*len = 0;
-	return 0;
+	return nullptr;
     }
     int l = 0;
     while ( l < (int)ba.size() && ba[l] )
@@ -463,7 +463,7 @@ static TQChar* internalLatin1ToUnicode( const TQByteArray& ba, uint* len )
 
 TQChar* TQString::latin1ToUnicode( const char *str, uint* len, uint maxlen )
 {
-    TQChar* result = 0;
+    TQChar* result = nullptr;
     uint l = 0;
     if ( str ) {
 	if ( maxlen != (uint)-1 ) {
@@ -486,7 +486,7 @@ TQChar* TQString::latin1ToUnicode( const char *str, uint* len, uint maxlen )
 
 static TQChar* internalLatin1ToUnicode( const char *str, uint* len, uint maxlen = (uint)-1 )
 {
-    TQChar* result = 0;
+    TQChar* result = nullptr;
     uint l = 0;
     if ( str ) {
 	if ( maxlen != (uint)-1 ) {
@@ -531,7 +531,7 @@ char* TQString::unicodeToLatin1(const TQChar *uc, uint l)
 char* TQString::unicodeToLatin1(const TQChar *uc, uint l, bool unpaged)
 {
     if (!uc) {
-	return 0;
+	return nullptr;
     }
     char *a = new char[l+1];
     char *result = a;
@@ -678,7 +678,7 @@ char* TQString::unicodeToLatin1(const TQChar *uc, uint l, bool unpaged)
     flags.
 
 */
-TQ_EXPORT TQStringData *TQString::shared_null = 0;
+TQ_EXPORT TQStringData *TQString::shared_null = nullptr;
 const TQString TQString::null;
 
 TQStringData* TQString::makeSharedNull()
@@ -721,7 +721,7 @@ TQStringData* TQString::makeSharedNull()
 // Is this still true?
 
 TQString::TQString() :
-    d(0)
+    d(nullptr)
 {
 	d = shared_null ? shared_null : makeSharedNull();
 }
@@ -785,7 +785,7 @@ TQString::TQString( const TQByteArray& ba )
 {
 #ifndef TQT_NO_TEXTCODEC
     if ( TQTextCodec::codecForCStrings() ) {
-	d = 0;
+	d = nullptr;
 	*this = fromAscii( ba.data(), ba.size() );
 	return;
     }
@@ -846,7 +846,7 @@ TQString::TQString( const char *str )
 {
 #ifndef TQT_NO_TEXTCODEC
     if ( TQTextCodec::codecForCStrings() ) {
-	d = 0;
+	d = nullptr;
 	*this = fromAscii( str );
 	return;
     }
@@ -947,7 +947,7 @@ void TQString::deref()
 			if ( d != shared_null ) {
 				delete d;
 			}
-			d = 0;
+			d = nullptr;
 		}
 		else {
 #if defined(TQT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
@@ -4192,14 +4192,14 @@ TQ_LLONG TQString::toLongLong( bool *ok, int base ) const
     TQLocale def_locale;
     TQ_LLONG result = def_locale.d->stringToLongLong(*this, base, &my_ok, TQLocalePrivate::FailOnGroupSeparators);
     if (my_ok) {
-    	if (ok != 0)
+    	if (ok)
 	    *ok = true;
 	return result;
     }
 
     // If the default was not "C", try the "C" locale
     if (def_locale.language() == TQLocale::C) {
-    	if (ok != 0)
+    	if (ok)
 	    *ok = false;
 	return 0;
     }
@@ -4282,14 +4282,14 @@ TQ_ULLONG TQString::toULongLong( bool *ok, int base ) const
     TQLocale def_locale;
     TQ_ULLONG result = def_locale.d->stringToUnsLongLong(*this, base, &my_ok, TQLocalePrivate::FailOnGroupSeparators);
     if (my_ok) {
-    	if (ok != 0)
+    	if (ok)
 	    *ok = true;
 	return result;
     }
 
     // If the default was not "C", try the "C" locale
     if (def_locale.language() == TQLocale::C) {
-    	if (ok != 0)
+    	if (ok)
 	    *ok = false;
 	return 0;
     }
@@ -4525,7 +4525,7 @@ double TQString::toDouble( bool *ok ) const
     // result anyway to preserve behavour of pervious versions of TQt
     if (length() > 0 && unicode()[length() - 1].isSpace()) {
         TQString tmp = stripWhiteSpace();
-    	if (ok != 0)
+    	if (ok)
 	    *ok = false;
     	return tmp.toDouble();
     }
@@ -4535,14 +4535,14 @@ double TQString::toDouble( bool *ok ) const
     TQLocale def_locale;
     double result = def_locale.d->stringToDouble(*this, &my_ok, TQLocalePrivate::FailOnGroupSeparators);
     if (my_ok) {
-    	if (ok != 0)
+    	if (ok)
 	    *ok = true;
 	return result;
     }
 
     // If the default was not "C", try the "C" locale
     if (def_locale.language() == TQLocale::C) {
-    	if (ok != 0)
+    	if (ok)
 	    *ok = false;
 	return 0.0;
     }
@@ -4576,11 +4576,11 @@ float TQString::toFloat( bool *ok ) const
     bool myOk;
     double d = toDouble(&myOk);
     if (!myOk || d > QT_MAX_FLOAT || d < -QT_MAX_FLOAT) {
-        if (ok != 0)
+        if (ok)
             *ok = false;
         return 0.0;
     }
-    if (ok != 0)
+    if (ok)
         *ok = true;
     return (float) d;
 }
@@ -5172,7 +5172,7 @@ const char* TQString::ascii() const
 		}
                 memcpy(d->ascii, s.data(), s.length() + 1);
 	    } else {
-		d->ascii = 0;
+		d->ascii = nullptr;
 	    }
 	    d->islatin1 = false;
 	}
@@ -5567,7 +5567,7 @@ TQString TQString::fromLocal8Bit( const char* local8Bit, int len )
 const unsigned short *TQString::ucs2() const
 {
     if ( ! d->unicode )
-	return 0;
+	return nullptr;
     unsigned int len = d->len;
     if ( d->maxl < len + 1 ) {
 	// detach, grow or shrink
@@ -5853,14 +5853,14 @@ TQString &TQString::setAscii( const char *str, int len )
 
 TQString &TQString::setLatin1( const char *str, int len )
 {
-    if ( str == 0 )
-	return setUnicode(0,0);
+    if ( !str )
+	return setUnicode(nullptr,0);
     if ( len < 0 )
 	len = int(strlen( str ));
     if ( len == 0 ) {                           // won't make a null string
 	*this = TQString::fromLatin1( "" );
     } else {
-	setUnicode( 0, len );                   // resize but not copy
+	setUnicode( nullptr, len );                   // resize but not copy
 	TQChar *p = d->unicode;
 	while ( len-- )
 	    *p++ = *str++;
@@ -6506,7 +6506,7 @@ TQConstString::~TQConstString()
 	d->unicode = cp;
     }
     else {
-	d->unicode = 0;
+	d->unicode = nullptr;
     }
 
     // The original d->unicode is now unlinked.
diff --git a/src/tools/tqstring.h b/src/tools/tqstring.h
index 8dfb66a00..4ad45d223 100644
--- a/src/tools/tqstring.h
+++ b/src/tools/tqstring.h
@@ -315,16 +315,16 @@ public:
 #endif
     TQString    &replace( TQChar, TQChar );
 
-    short       toShort( bool *ok=0, int base=10 )      const;
-    ushort      toUShort( bool *ok=0, int base=10 )     const;
-    int         toInt( bool *ok=0, int base=10 )        const;
-    uint        toUInt( bool *ok=0, int base=10 )       const;
-    long        toLong( bool *ok=0, int base=10 )       const;
-    ulong       toULong( bool *ok=0, int base=10 )      const;
-    TQ_LLONG     toLongLong( bool *ok=0, int base=10 )   const;
-    TQ_ULLONG    toULongLong( bool *ok=0, int base=10 )  const;
-    float       toFloat( bool *ok=0 )   const;
-    double      toDouble( bool *ok=0 )  const;
+    short       toShort( bool *ok=nullptr, int base=10 )      const;
+    ushort      toUShort( bool *ok=nullptr, int base=10 )     const;
+    int         toInt( bool *ok=nullptr, int base=10 )        const;
+    uint        toUInt( bool *ok=nullptr, int base=10 )       const;
+    long        toLong( bool *ok=nullptr, int base=10 )       const;
+    ulong       toULong( bool *ok=nullptr, int base=10 )      const;
+    TQ_LLONG     toLongLong( bool *ok=nullptr, int base=10 )   const;
+    TQ_ULLONG    toULongLong( bool *ok=nullptr, int base=10 )  const;
+    float       toFloat( bool *ok=nullptr )   const;
+    double      toDouble( bool *ok=nullptr )  const;
 
     TQString    &setNum( short, int base=10 );
     TQString    &setNum( ushort, int base=10 );
@@ -588,7 +588,7 @@ inline TQString &TQString::operator=( char c )
 { *this = TQString(TQChar(c)); return *this; }
 
 inline bool TQString::isNull() const
-{ return unicode() == 0; }
+{ return !unicode(); }
 
 inline bool TQString::operator!() const
 { return isNull(); }
diff --git a/src/tools/tqtextstream.cpp b/src/tools/tqtextstream.cpp
index 2d4079ae5..50fb38e39 100644
--- a/src/tools/tqtextstream.cpp
+++ b/src/tools/tqtextstream.cpp
@@ -224,7 +224,7 @@ class TQTextStreamPrivate {
 public:
 #ifndef TQT_NO_TEXTCODEC
     TQTextStreamPrivate()
-	: decoder( 0 ), encoder( 0 ), sourceType( NotSet ) { }
+	: decoder( nullptr ), encoder( nullptr ), sourceType( NotSet ) { }
     ~TQTextStreamPrivate() {
 	delete decoder;
 	delete encoder;
@@ -253,9 +253,9 @@ TQChar TQTextStream::eat_ws()
 void TQTextStream::init()
 {
     // ### ungetcBuf = TQEOF;
-    dev = 0;
+    dev = nullptr;
     owndev = false;
-    mapper = 0;
+    mapper = nullptr;
     d = new TQTextStreamPrivate;
     doUnicodeHeader = true; // autodetect
     latin1 = true; // should use locale?
@@ -423,7 +423,7 @@ TQ_LONG TQStringBuffer::readBlock( char *p, TQ_ULONG len )
 TQ_LONG TQStringBuffer::writeBlock( const char *p, TQ_ULONG len )
 {
 #if defined(QT_CHECK_NULL)
-    if ( p == 0 && len != 0 )
+    if ( !p && len != 0 )
 	tqWarning( "TQStringBuffer::writeBlock: Null pointer error" );
 #endif
 #if defined(QT_CHECK_STATE)
@@ -676,12 +676,12 @@ uint TQTextStream::ts_getbuf( TQChar* buf, uint len )
 	    return rnum;
 	int c2 = dev->getch();
 	if ( c1 == 0xfe && c2 == 0xff ) {
-	    mapper = 0;
+	    mapper = nullptr;
 	    latin1 = false;
 	    internalOrder = TQChar::networkOrdered();
 	    networkOrder = true;
 	} else if ( c1 == 0xff && c2 == 0xfe ) {
-	    mapper = 0;
+	    mapper = nullptr;
 	    latin1 = false;
 	    internalOrder = !TQChar::networkOrdered();
 	    networkOrder = false;
@@ -1173,7 +1173,7 @@ void TQTextStream::setDevice( TQIODevice *iod )
 
 void TQTextStream::unsetDevice()
 {
-    setDevice( 0 );
+    setDevice( nullptr );
     d->sourceType = TQTextStreamPrivate::NotSet;
 }
 
@@ -1649,7 +1649,7 @@ TQTextStream &TQTextStream::operator>>( TQString &str )
 TQTextStream &TQTextStream::operator>>( TQCString &str )
 {
     CHECK_STREAM_PRECOND
-    TQCString  *dynbuf = 0;
+    TQCString  *dynbuf = nullptr;
     const int buflen = 256;
     char      buffer[buflen];
     char     *s = buffer;
@@ -2522,7 +2522,7 @@ void TQTextStream::setEncoding( Encoding e )
 
     switch ( e ) {
     case Unicode:
-	mapper = 0;
+	mapper = nullptr;
 	latin1 = false;
 	doUnicodeHeader = true;
 	internalOrder = true;
@@ -2542,21 +2542,21 @@ void TQTextStream::setEncoding( Encoding e )
 #endif
 	break;
     case UnicodeNetworkOrder:
-	mapper = 0;
+	mapper = nullptr;
 	latin1 = false;
 	doUnicodeHeader = true;
 	internalOrder = TQChar::networkOrdered();
 	networkOrder = true;
 	break;
     case UnicodeReverse:
-	mapper = 0;
+	mapper = nullptr;
 	latin1 = false;
 	doUnicodeHeader = true;
 	internalOrder = !TQChar::networkOrdered();
 	networkOrder = false;
 	break;
     case RawUnicode:
-	mapper = 0;
+	mapper = nullptr;
 	latin1 = false;
 	doUnicodeHeader = false;
 	internalOrder = true;
@@ -2573,12 +2573,12 @@ void TQTextStream::setEncoding( Encoding e )
 #endif
 	if ( mapper && mapper->mibEnum() == 4 )
 #endif
-	    mapper = 0;
+	    mapper = nullptr;
 
 	doUnicodeHeader = true; // If it reads as Unicode, accept it
 	break;
     case Latin1:
-	mapper = 0;
+	mapper = nullptr;
 	doUnicodeHeader = false;
 	latin1 = true;
 	break;
@@ -2604,7 +2604,7 @@ void TQTextStream::setCodec( TQTextCodec *codec )
     mapper = codec;
     latin1 = ( codec->mibEnum() == 4 );
     if ( latin1 )
-	mapper = 0;
+	mapper = nullptr;
     doUnicodeHeader = false;
 }
 
diff --git a/src/tools/tqthreadstorage_unix.cpp b/src/tools/tqthreadstorage_unix.cpp
index b982590f9..a376e4292 100644
--- a/src/tools/tqthreadstorage_unix.cpp
+++ b/src/tools/tqthreadstorage_unix.cpp
@@ -107,7 +107,7 @@ TQThreadStorageData::~TQThreadStorageData()
 
     pthread_mutex_lock( &thread_storage_mutex );
     thread_storage_usage[id].used = false;
-    thread_storage_usage[id].func = 0;
+    thread_storage_usage[id].func = nullptr;
 
 #ifdef TQTHREADSTORAGE_DEBUG
     tqDebug( "TQThreadStorageData: released id %d", id );
@@ -121,10 +121,10 @@ void **TQThreadStorageData::get() const
     TQThreadInstance *d = TQThreadInstance::current();
     if (!d) {
         tqWarning("TQThreadStorage can only be used with threads started with TQThread");
-        return 0;
+        return nullptr;
     }
     TQMutexLocker locker( d->mutex() );
-    return d->thread_storage && d->thread_storage[id] ? &d->thread_storage[id] : 0;
+    return d->thread_storage && d->thread_storage[id] ? &d->thread_storage[id] : nullptr;
 }
 
 void **TQThreadStorageData::set( void *p )
@@ -132,7 +132,7 @@ void **TQThreadStorageData::set( void *p )
     TQThreadInstance *d = TQThreadInstance::current();
     if (!d) {
         tqWarning("TQThreadStorage can only be used with threads started with TQThread");
-        return 0;
+        return nullptr;
     }
     TQMutexLocker locker( d->mutex() );
     if ( !d->thread_storage ) {
diff --git a/src/tools/tqucom.cpp b/src/tools/tqucom.cpp
index ae99cfb22..ac84f1a3e 100644
--- a/src/tools/tqucom.cpp
+++ b/src/tools/tqucom.cpp
@@ -418,7 +418,7 @@ void TQUType_charstar::set( TQUObject *o, const char* v, bool take )
 	    o->payload.charstar.ptr = new char[ strlen(v) + 1 ];
 	    strcpy( o->payload.charstar.ptr, v );
 	} else {
-	    o->payload.charstar.ptr = 0;
+	    o->payload.charstar.ptr = nullptr;
 	}
 	o->payload.charstar.owner = true;
     } else {
@@ -452,7 +452,7 @@ void TQUType_charstar::clear( TQUObject *o )
 {
     if ( o->payload.charstar.owner )
 	delete [] o->payload.charstar.ptr;
-    o->payload.charstar.ptr = 0;
+    o->payload.charstar.ptr = nullptr;
 }
 
 int TQUType_charstar::serializeTo( TQUObject *, TQUBuffer * )
@@ -499,7 +499,7 @@ bool TQUType_TQString::canConvertTo( TQUObject * /*o*/, TQUType *t )
 
 bool TQUType_TQString::convertFrom( TQUObject *o, TQUType *t )
 {
-    TQString *str = 0;
+    TQString *str = nullptr;
     if ( isEqual( t, &static_QUType_charstar ) )
 	str = new TQString( o->payload.charstar.ptr );
     else if ( isEqual( t, &static_QUType_double ) )
@@ -548,7 +548,7 @@ int TQUType_TQString::serializeFrom( TQUObject *, TQUBuffer * )
 void TQUType_TQString::clear( TQUObject *o )
 {
     delete (TQString*)o->payload.ptr;
-    o->payload.ptr = 0;
+    o->payload.ptr = nullptr;
 }
 
 TQUObject* TQUObject::deepCopy(TQUObject* newLocation) {
diff --git a/src/tools/tqvaluelist.h b/src/tools/tqvaluelist.h
index f770214b7..942a476c6 100644
--- a/src/tools/tqvaluelist.h
+++ b/src/tools/tqvaluelist.h
@@ -100,7 +100,7 @@ class TQValueListIterator
     /**
      * Functions
      */
-    TQValueListIterator() : node( 0 ) {}
+    TQValueListIterator() : node( nullptr ) {}
     TQValueListIterator( NodePtr p ) : node( p ) {}
     TQValueListIterator( const TQValueListIterator<T>& it ) : node( it.node ) {}
 
@@ -176,7 +176,7 @@ class TQValueListConstIterator
     /**
      * Functions
      */
-    TQValueListConstIterator() : node( 0 ) {}
+    TQValueListConstIterator() : node( nullptr ) {}
     TQValueListConstIterator( NodePtr p ) : node( p ) {}
     TQValueListConstIterator( const TQValueListConstIterator<T>& it ) : node( it.node ) {}
     TQValueListConstIterator( const TQValueListIterator<T>& it ) : node( it.node ) {}
diff --git a/src/tools/tqvaluevector.h b/src/tools/tqvaluevector.h
index 791095b93..72560c729 100644
--- a/src/tools/tqvaluevector.h
+++ b/src/tools/tqvaluevector.h
@@ -59,7 +59,7 @@ public:
     typedef T* pointer;
 
     TQValueVectorPrivate()
-	: start( 0 ), finish( 0 ), end( 0 )
+	: start( nullptr ), finish( nullptr ), end( nullptr )
     {
     }
 
@@ -103,9 +103,9 @@ public:
     void clear()
     {
 	delete[] start;
-	start = 0;
-	finish = 0;
-	end = 0;
+	start = nullptr;
+	finish = nullptr;
+	end = nullptr;
     }
 
 
@@ -135,9 +135,9 @@ TQValueVectorPrivate<T>::TQValueVectorPrivate( const TQValueVectorPrivate<T>& x
 	tqCopy( x.start, x.finish, start );
 #endif
     } else {
-	start = 0;
-	finish = 0;
-	end = 0;
+	start = nullptr;
+	finish = nullptr;
+	end = nullptr;
     }
 }
 
@@ -149,9 +149,9 @@ TQValueVectorPrivate<T>::TQValueVectorPrivate( size_t size )
 	finish = start + size;
 	end = start + size;
     } else {
-	start = 0;
-	finish = 0;
-	end = 0;
+	start = nullptr;
+	finish = nullptr;
+	end = nullptr;
     }
 }
 
@@ -342,7 +342,7 @@ public:
 	return sh->finish;
     }
 
-    reference at( size_type i, bool* ok = 0 )
+    reference at( size_type i, bool* ok = nullptr )
     {
 	detach();
 	if ( ok )
@@ -350,7 +350,7 @@ public:
 	return *( begin() + i );
     }
 
-    const_reference at( size_type i, bool* ok = 0 ) const
+    const_reference at( size_type i, bool* ok = nullptr ) const
     {
 	if ( ok )
 	    *ok = ( i < size() );
diff --git a/src/tools/tqwaitcondition_unix.cpp b/src/tools/tqwaitcondition_unix.cpp
index 814bbdbc9..db727dc54 100644
--- a/src/tools/tqwaitcondition_unix.cpp
+++ b/src/tools/tqwaitcondition_unix.cpp
@@ -233,7 +233,7 @@ bool TQWaitCondition::wait(unsigned long time)
     int ret;
     if (time != ULONG_MAX) {
 	struct timeval tv;
-	gettimeofday(&tv, 0);
+	gettimeofday(&tv, nullptr);
 
 	timespec ti;
 	ti.tv_nsec = ( tv.tv_usec + ( time % 1000 ) * 1000 ) * 1000;
@@ -294,7 +294,7 @@ bool TQWaitCondition::wait(TQMutex *mutex, unsigned long time)
     int ret;
     if (time != ULONG_MAX) {
 	struct timeval tv;
-	gettimeofday(&tv, 0);
+	gettimeofday(&tv, nullptr);
 
 	timespec ti;
 	ti.tv_nsec = ( tv.tv_usec + ( time % 1000 ) * 1000 ) * 1000;
diff --git a/src/widgets/tqaction.cpp b/src/widgets/tqaction.cpp
index 8a590cced..e70f2d92d 100644
--- a/src/widgets/tqaction.cpp
+++ b/src/widgets/tqaction.cpp
@@ -152,7 +152,7 @@ public:
     TQAction *action;
 
     struct MenuItem {
-	MenuItem():popup(0),id(0){}
+	MenuItem():popup(nullptr),id(0){}
 	TQPopupMenu* popup;
 	int id;
     };
@@ -160,7 +160,7 @@ public:
     // in dropdown/exclusive actiongroups. The actiongroup
     // will clean this up
     struct ComboItem {
-	ComboItem():combo(0), id(0) {}
+	ComboItem():combo(nullptr), id(0) {}
 	TQComboBox *combo;
 	int id;
     };
@@ -177,16 +177,16 @@ public:
 };
 
 TQActionPrivate::TQActionPrivate(TQAction *act)
-    : iconset( 0 ),
+    : iconset( nullptr ),
 #ifndef TQT_NO_ACCEL
-      key( 0 ), accel( 0 ), accelid( 0 ),
+      key( 0 ), accel( nullptr ), accelid( 0 ),
 #endif
       enabled( true ), visible( true ), toggleaction( false ), on( false ),
       forceDisabled( false ), forceInvisible( false ),
 #ifndef TQT_NO_TOOLTIP
-      tipGroup( 0 ),
+      tipGroup( nullptr ),
 #endif
-      d_group( 0 ), action(act)
+      d_group( nullptr ), action(act)
 {
     menuitems.setAutoDelete( true );
     comboitems.setAutoDelete( true );
@@ -221,7 +221,7 @@ TQActionPrivate::~TQActionPrivate()
 	TQComboBox* combo = ci->combo;
 	combo->clear();
 	TQActionGroup *group = ::tqt_cast<TQActionGroup*>(action->parent());
-	TQObjectList *siblings = group ? group->queryList("TQAction") : 0;
+	TQObjectList *siblings = group ? group->queryList("TQAction") : nullptr;
 	if (siblings) {
 	    TQObjectListIt it(*siblings);
 	    while (it.current()) {
@@ -257,7 +257,7 @@ public:
     TQAction* separatorAction;
 
     struct MenuItem {
-	MenuItem():popup(0),id(0){}
+	MenuItem():popup(nullptr),id(0){}
 	TQPopupMenu* popup;
 	int id;
     };
@@ -601,7 +601,7 @@ void TQAction::setIconSet( const TQIconSet& icon )
     if ( !icon.isNull() )
 	d->iconset = new TQIconSet( icon );
     else
-	d->iconset = 0;
+	d->iconset = nullptr;
     delete i;
     d->update( TQActionPrivate::Icons );
 }
@@ -768,7 +768,7 @@ void TQAction::setAccel( const TQKeySequence& key )
 
     d->key = key;
     delete d->accel;
-    d->accel = 0;
+    d->accel = nullptr;
 
     if ( !(int)key ) {
 	d->update();
@@ -1103,7 +1103,7 @@ void TQAction::showStatusText( const TQString& text )
 {
 #ifndef TQT_NO_STATUSBAR
     // find out whether we are clearing the status bar by the popup that actually set the text
-    static TQPopupMenu *lastmenu = 0;
+    static TQPopupMenu *lastmenu = nullptr;
     TQObject *s = (TQObject*)sender();
     if ( s ) {
 	TQPopupMenu *menu = (TQPopupMenu*)s->tqt_cast( "TQPopupMenu" );
@@ -1112,16 +1112,16 @@ void TQAction::showStatusText( const TQString& text )
 	else if ( menu && text.isEmpty() ) {
 	    if ( lastmenu && menu != lastmenu )
 		return;
-	    lastmenu = 0;
+	    lastmenu = nullptr;
 	}
     }
 
     TQObject* par = parent();
-    TQObject* lpar = 0;
-    TQStatusBar *bar = 0;
+    TQObject* lpar = nullptr;
+    TQStatusBar *bar = nullptr;
     while ( par && !bar ) {
 	lpar = par;
-	bar = (TQStatusBar*)par->child( 0, "TQStatusBar", false );
+	bar = (TQStatusBar*)par->child( nullptr, "TQStatusBar", false );
 	par = par->parent();
     }
     if ( !bar && lpar ) {
@@ -1441,8 +1441,8 @@ TQActionGroup::TQActionGroup( TQObject* parent, const char* name )
     d = new TQActionGroupPrivate;
     d->exclusive = true;
     d->dropdown = false;
-    d->selected = 0;
-    d->separatorAction = 0;
+    d->selected = nullptr;
+    d->separatorAction = nullptr;
     TQAction::d->d_group = d;
 
     connect( this, TQ_SIGNAL(selected(TQAction*)), TQ_SLOT(internalToggle(TQAction*)) );
@@ -1462,8 +1462,8 @@ TQActionGroup::TQActionGroup( TQObject* parent, const char* name, bool exclusive
     d = new TQActionGroupPrivate;
     d->exclusive = exclusive;
     d->dropdown = false;
-    d->selected = 0;
-    d->separatorAction = 0;
+    d->selected = nullptr;
+    d->separatorAction = nullptr;
     TQAction::d->d_group = d;
 
     connect( this, TQ_SIGNAL(selected(TQAction*)), TQ_SLOT(internalToggle(TQAction*)) );
@@ -1617,7 +1617,7 @@ void TQActionGroup::add( TQAction* action )
 void TQActionGroup::addSeparator()
 {
     if ( !d->separatorAction )
-	d->separatorAction = new TQAction( 0, "qt_separator_action" );
+	d->separatorAction = new TQAction( nullptr, "qt_separator_action" );
     d->actions.append( d->separatorAction );
 }
 
@@ -1853,7 +1853,7 @@ void TQActionGroup::childDestroyed()
 {
     d->actions.removeRef( (TQAction*) sender() );
     if ( d->selected == sender() )
-	d->selected = 0;
+	d->selected = nullptr;
 }
 
 /*! \reimp
@@ -1998,7 +1998,7 @@ void TQActionGroup::childEvent( TQChildEvent *e )
 */
 void TQActionGroup::internalComboBoxActivated( int index )
 {
-    TQAction *a = 0;
+    TQAction *a = nullptr;
     for ( int i = 0; i <= index && i < (int)d->actions.count(); ++i ) {
 	a = d->actions.at( i );
 	if ( a && !qstrcmp( a->name(), "qt_separator_action" ) )
@@ -2031,7 +2031,7 @@ void TQActionGroup::internalComboBoxActivated( int index )
 */
 void TQActionGroup::internalComboBoxHighlighted( int index )
 {
-    TQAction *a = 0;
+    TQAction *a = nullptr;
     for ( int i = 0; i <= index && i < (int)d->actions.count(); ++i ) {
 	a = d->actions.at( i );
 	if ( a && !qstrcmp( a->name(), "qt_separator_action" ) )
diff --git a/src/widgets/tqaction.h b/src/widgets/tqaction.h
index 1916157e5..af1ac0e96 100644
--- a/src/widgets/tqaction.h
+++ b/src/widgets/tqaction.h
@@ -74,17 +74,17 @@ class TQ_EXPORT TQAction : public TQObject
     TQ_PROPERTY( bool visible READ isVisible WRITE setVisible )
 
 public:
-    TQAction( TQObject* parent, const char* name = 0 );
+    TQAction( TQObject* parent, const char* name = nullptr );
 #ifndef TQT_NO_ACCEL
     TQAction( const TQString& menuText, TQKeySequence accel,
-	     TQObject* parent, const char* name = 0 );
+	     TQObject* parent, const char* name = nullptr );
     TQAction( const TQIconSet& icon, const TQString& menuText, TQKeySequence accel,
-	     TQObject* parent, const char* name = 0 );
+	     TQObject* parent, const char* name = nullptr );
 
     TQAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, TQKeySequence accel,
-	     TQObject* parent, const char* name = 0, bool toggle = false ); // obsolete
+	     TQObject* parent, const char* name = nullptr, bool toggle = false ); // obsolete
     TQAction( const TQString& text, const TQString& menuText, TQKeySequence accel, TQObject* parent,
-	     const char* name = 0, bool toggle = false ); // obsolete
+	     const char* name = nullptr, bool toggle = false ); // obsolete
 #endif
     TQAction( TQObject* parent, const char* name , bool toggle ); // obsolete
     ~TQAction();
@@ -158,7 +158,7 @@ class TQ_EXPORT TQActionGroup : public TQAction
     TQ_PROPERTY( bool usesDropDown READ usesDropDown WRITE setUsesDropDown )
 
 public:
-    TQActionGroup( TQObject* parent, const char* name = 0 );
+    TQActionGroup( TQObject* parent, const char* name = nullptr );
     TQActionGroup( TQObject* parent, const char* name , bool exclusive  ); // obsolete
     ~TQActionGroup();
     void setExclusive( bool );
diff --git a/src/widgets/tqbutton.cpp b/src/widgets/tqbutton.cpp
index 6ffea91e3..5caf35c1e 100644
--- a/src/widgets/tqbutton.cpp
+++ b/src/widgets/tqbutton.cpp
@@ -64,10 +64,10 @@ class TQButtonData
 public:
     TQButtonData() {
 #ifndef TQT_NO_BUTTONGROUP
-	group = 0;
+	group = nullptr;
 #endif
 #ifndef TQT_NO_ACCEL
-	a = 0;
+	a = nullptr;
 #endif
     }
 #ifndef TQT_NO_BUTTONGROUP
@@ -102,7 +102,7 @@ void TQButton::ensureData()
 TQButtonGroup *TQButton::group() const
 {
 #ifndef TQT_NO_BUTTONGROUP
-    return d ? d->group : 0;
+    return d ? d->group : nullptr;
 #else
     return 0;
 #endif
@@ -372,7 +372,7 @@ TQTimer *TQButton::timer()
 TQButton::TQButton( TQWidget *parent, const char *name, WFlags f )
     : TQWidget( parent, name, f )
 {
-    bpixmap    = 0;
+    bpixmap    = nullptr;
     toggleTyp  = SingleShot;			// button is simple
     buttonDown = false;				// button is up
     stat       = Off;				// button is off
@@ -380,7 +380,7 @@ TQButton::TQButton( TQWidget *parent, const char *name, WFlags f )
     autoresize = false;				// not auto resizing
     animation  = false;				// no pending animateClick
     repeat     = false;				// not in autorepeat mode
-    d	       = 0;
+    d	       = nullptr;
 #ifndef TQT_NO_BUTTONGROUP
     if ( ::tqt_cast<TQButtonGroup*>(parent) ) {
 	setGroup((TQButtonGroup*)parent);
@@ -474,7 +474,7 @@ void TQButton::setText( const TQString &text )
 
     if ( bpixmap ) {
 	delete bpixmap;
-	bpixmap = 0;
+	bpixmap = nullptr;
     }
 
     if ( autoresize )
diff --git a/src/widgets/tqbutton.h b/src/widgets/tqbutton.h
index 52b4f6597..647ac805f 100644
--- a/src/widgets/tqbutton.h
+++ b/src/widgets/tqbutton.h
@@ -69,7 +69,7 @@ class TQ_EXPORT TQButton : public TQWidget
     TQ_PROPERTY( bool exclusiveToggle READ isExclusiveToggle )
 
 public:
-    TQButton( TQWidget* parent=0, const char* name=0, WFlags f=0 );
+    TQButton( TQWidget* parent=nullptr, const char* name=nullptr, WFlags f=0 );
     ~TQButton();
 
     TQString text() const;
diff --git a/src/widgets/tqbuttongroup.cpp b/src/widgets/tqbuttongroup.cpp
index 44567ffc6..3378377c0 100644
--- a/src/widgets/tqbuttongroup.cpp
+++ b/src/widgets/tqbuttongroup.cpp
@@ -208,9 +208,9 @@ TQButtonGroup::~TQButtonGroup()
 {
     TQButtonList * tmp = buttons;
     TQButtonItem *bi = tmp->first();
-    buttons = 0;
+    buttons = nullptr;
     while( bi ) {
-	bi->button->setGroup(0);
+	bi->button->setGroup(nullptr);
 	bi = tmp->next();
     }
     delete tmp;
@@ -302,11 +302,11 @@ void TQButtonGroup::remove( TQButton *button )
 
     TQButtonListIt it( *buttons );
     TQButtonItem *i;
-    while ( (i=it.current()) != 0 ) {
+    while ( (i=it.current()) ) {
 	++it;
 	if ( i->button == button ) {
 	    buttons->remove( i );
-	    button->setGroup(0);
+	    button->setGroup(nullptr);
 	    button->disconnect( this );
 	    return;
 	}
@@ -325,7 +325,7 @@ TQButton *TQButtonGroup::find( int id ) const
     for ( TQButtonItem *i=buttons->first(); i; i=buttons->next() )
 	if ( i->id == id )
 	    return i->button;
-    return 0;
+    return nullptr;
 }
 
 
@@ -447,7 +447,7 @@ void TQButtonGroup::buttonToggled( bool on )
     TQButtonItem * i = buttons->first();
     bool hasTabFocus = false;
 
-    while( i != 0 && hasTabFocus == false ) {
+    while( i && hasTabFocus == false ) {
 	if ( ( excl_grp || ::tqt_cast<TQRadioButton*>(i->button) ) &&
 	     (i->button->focusPolicy() & TabFocus) )
 	    hasTabFocus = true;
@@ -509,7 +509,7 @@ void TQButtonGroup::moveFocus( int key )
     if ( !i || !i->button )
 	return;
 
-    TQWidget * candidate = 0;
+    TQWidget * candidate = nullptr;
     int bestScore = -1;
 
     TQPoint goal( f->mapToGlobal( f->geometry().center() ) );
@@ -609,16 +609,16 @@ void TQButtonGroup::moveFocus( int key )
 TQButton * TQButtonGroup::selected() const
 {
     if ( !buttons )
-	return 0;
+	return nullptr;
     TQButtonListIt it( *buttons );
     TQButtonItem *i;
-    TQButton *candidate = 0;
+    TQButton *candidate = nullptr;
 
-    while ( (i = it.current()) != 0 ) {
+    while ( (i = it.current()) ) {
 	++it;
 	if ( i->button && i->button->isToggleButton() && i->button->isOn() ) {
-	    if ( candidate != 0 )
-		return 0;
+	    if ( candidate )
+		return nullptr;
 	    candidate = i->button;
 	}
     }
diff --git a/src/widgets/tqbuttongroup.h b/src/widgets/tqbuttongroup.h
index ee27d9db7..fd9f1ee2a 100644
--- a/src/widgets/tqbuttongroup.h
+++ b/src/widgets/tqbuttongroup.h
@@ -60,13 +60,13 @@ class TQ_EXPORT TQButtonGroup : public TQGroupBox
     TQ_PROPERTY( int selectedId READ selectedId WRITE setButton )
 
 public:
-    TQButtonGroup( TQWidget* parent=0, const char* name=0 );
+    TQButtonGroup( TQWidget* parent=nullptr, const char* name=nullptr );
     TQButtonGroup( const TQString &title,
-		  TQWidget* parent=0, const char* name=0 );
+		  TQWidget* parent=nullptr, const char* name=nullptr );
     TQButtonGroup( int columns, Orientation o,
-		  TQWidget* parent=0, const char* name=0 );
+		  TQWidget* parent=nullptr, const char* name=nullptr );
     TQButtonGroup( int columns, Orientation o, const TQString &title,
-		  TQWidget* parent=0, const char* name=0 );
+		  TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQButtonGroup();
 
     bool	isExclusive() const;
diff --git a/src/widgets/tqcheckbox.cpp b/src/widgets/tqcheckbox.cpp
index 488e187dc..84ca378d4 100644
--- a/src/widgets/tqcheckbox.cpp
+++ b/src/widgets/tqcheckbox.cpp
@@ -258,7 +258,7 @@ void TQCheckBox::drawButton( TQPainter *paint )
 #if defined(SAVE_CHECKBOX_PIXMAPS)
     if ( use_pm ) {
 	pmpaint.end();
-	TQPainter::redirect( this, 0 );
+	TQPainter::redirect( this, nullptr );
 	if ( backgroundPixmap() || backgroundMode() == X11ParentRelative ) {
 	    TQBitmap bm( pm->size() );
 	    bm.fill( color0 );
diff --git a/src/widgets/tqcheckbox.h b/src/widgets/tqcheckbox.h
index cd0450ab6..eeb259503 100644
--- a/src/widgets/tqcheckbox.h
+++ b/src/widgets/tqcheckbox.h
@@ -55,8 +55,8 @@ class TQ_EXPORT TQCheckBox : public TQButton
     TQ_OVERRIDE( bool autoMask DESIGNABLE true SCRIPTABLE true )
 
 public:
-    TQCheckBox( TQWidget *parent, const char* name=0 );
-    TQCheckBox( const TQString &text, TQWidget *parent, const char* name=0 );
+    TQCheckBox( TQWidget *parent, const char* name=nullptr );
+    TQCheckBox( const TQString &text, TQWidget *parent, const char* name=nullptr );
 
     bool    isChecked() const;
 
diff --git a/src/widgets/tqcombobox.cpp b/src/widgets/tqcombobox.cpp
index b5c2593f0..f6f7736dc 100644
--- a/src/widgets/tqcombobox.cpp
+++ b/src/widgets/tqcombobox.cpp
@@ -342,7 +342,7 @@
 class TQComboBoxPopup : public TQPopupMenu
 {
 public:
-    TQComboBoxPopup( TQWidget *parent=0, const char *name=0 )
+    TQComboBoxPopup( TQWidget *parent=nullptr, const char *name=nullptr )
 	: TQPopupMenu( parent, name )
     {
     }
@@ -382,7 +382,7 @@ void TQComboBoxPopupItem::paint( TQPainter* p, const TQColorGroup&, bool,
 class TQComboBoxData
 {
 public:
-    TQComboBoxData( TQComboBox *cb ): ed( 0 ), usingLBox( false ), pop( 0 ), lBox( 0 ), combo( cb )
+    TQComboBoxData( TQComboBox *cb ): ed( nullptr ), usingLBox( false ), pop( nullptr ), lBox( nullptr ), combo( cb )
     {
 	duplicatesEnabled = true;
 	cb->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
@@ -432,7 +432,7 @@ void TQComboBoxData::updateLinedGeometry()
     TQRect r = TQStyle::visualRect( combo->style().querySubControlMetrics(TQStyle::CC_ComboBox, combo,
 								       TQStyle::SC_ComboBoxEditField), combo );
 
-    const TQPixmap *pix = current < combo->count() ? combo->pixmap( current ) : 0;
+    const TQPixmap *pix = current < combo->count() ? combo->pixmap( current ) : nullptr;
     if ( pix && pix->width() < r.width() )
 	r.setLeft( r.left() + pix->width() + 4 );
     if ( r != ed->geometry() )
@@ -528,7 +528,7 @@ TQComboBox::TQComboBox( TQWidget *parent, const char *name )
     } else {
 	setUpListBox();
     }
-    d->ed                    = 0;
+    d->ed                    = nullptr;
     d->current               = 0;
     d->maxCount              = INT_MAX;
     d->sizeLimit	     = 10;
@@ -585,7 +585,7 @@ TQComboBox::TQComboBox( bool rw, TQWidget *parent, const char *name )
 
     setFocusPolicy( StrongFocus );
 
-    d->ed = 0;
+    d->ed = nullptr;
     if ( rw )
 	setUpLineEdit();
     setBackgroundMode( PaletteButton, PaletteBase );
@@ -650,7 +650,7 @@ void TQComboBox::insertStrList( const TQStrList *list, int index )
 {
     if ( !list ) {
 #if defined(QT_CHECK_NULL)
-	Q_ASSERT( list != 0 );
+	Q_ASSERT( list );
 #endif
 	return;
     }
@@ -727,14 +727,14 @@ void TQComboBox::insertStrList( const char **strings, int numStrings, int index)
 {
     if ( !strings ) {
 #if defined(QT_CHECK_NULL)
-	Q_ASSERT( strings != 0 );
+	Q_ASSERT( strings );
 #endif
 	return;
     }
     if ( index < 0 )
 	index = count();
     int i = 0;
-    while ( (numStrings<0 && strings[i]!=0) || i<numStrings ) {
+    while ( (numStrings<0 && strings[i]) || i<numStrings ) {
 	if ( d->usingListBox() )
 	    d->listBox()->insertItem( TQString::fromLatin1(strings[i]), index );
 	else
@@ -968,7 +968,7 @@ TQString TQComboBox::text( int index ) const
 const TQPixmap *TQComboBox::pixmap( int index ) const
 {
     if ( !checkIndex( "pixmap", name(), count(), index ) )
-	return 0;
+	return nullptr;
     if ( d->usingListBox() )
 	return d->listBox()->pixmap( index );
     else
@@ -1625,7 +1625,7 @@ void TQComboBox::popup()
 	lb->raise();
 	bool block = lb->signalsBlocked();
 	lb->blockSignals( true );
-	TQListBoxItem* currentLBItem = 0;
+	TQListBoxItem* currentLBItem = nullptr;
 	if ( editable() && currentText() != text( currentItem() ) )
 	    currentLBItem = lb->findItem( currentText() );
 
@@ -2092,7 +2092,7 @@ void TQComboBox::setValidator( const TQValidator * v )
 
 const TQValidator * TQComboBox::validator() const
 {
-    return d && d->ed ? d->ed->validator() : 0;
+    return d && d->ed ? d->ed->validator() : nullptr;
 }
 
 
@@ -2103,7 +2103,7 @@ const TQValidator * TQComboBox::validator() const
 void TQComboBox::clearValidator()
 {
     if ( d && d->ed )
-	d->ed->setValidator( 0 );
+	d->ed->setValidator( nullptr );
 }
 
 
@@ -2125,7 +2125,7 @@ void TQComboBox::setListBox( TQListBox * newListBox )
 	delete d->listBox();
     } else {
 	delete d->popup();
-        d->setPopupMenu(0, false);
+        d->setPopupMenu(nullptr, false);
     }
 
     newListBox->reparent( this, WType_Popup, TQPoint(0,0), false );
@@ -2155,7 +2155,7 @@ void TQComboBox::setListBox( TQListBox * newListBox )
 
 TQListBox * TQComboBox::listBox() const
 {
-    return d && d->usingListBox() ? d->listBox() : 0;
+    return d && d->usingListBox() ? d->listBox() : nullptr;
 }
 
 /*!
@@ -2232,7 +2232,7 @@ void TQComboBox::styleChange( TQStyle& s )
 
 bool TQComboBox::editable() const
 {
-    return d->ed != 0;
+    return d->ed;
 }
 
 void TQComboBox::setEditable( bool y )
@@ -2248,7 +2248,7 @@ void TQComboBox::setEditable( bool y )
 	    setEditText( currentText() );
     } else {
 	delete d->ed;
-	d->ed = 0;
+	d->ed = nullptr;
     }
 
     setFocusPolicy( StrongFocus );
@@ -2289,7 +2289,7 @@ void TQComboBox::setLineEdit( TQLineEdit *edit )
 {
     if ( !edit ) {
 #if defined(QT_CHECK_NULL)
-	Q_ASSERT( edit != 0 );
+	Q_ASSERT( edit );
 #endif
 	return;
     }
diff --git a/src/widgets/tqcombobox.h b/src/widgets/tqcombobox.h
index 296148549..9771f9bec 100644
--- a/src/widgets/tqcombobox.h
+++ b/src/widgets/tqcombobox.h
@@ -73,8 +73,8 @@ class TQ_EXPORT TQComboBox : public TQWidget
     TQ_OVERRIDE( bool autoMask DESIGNABLE true SCRIPTABLE true )
 
 public:
-    TQComboBox( TQWidget* parent=0, const char* name=0 );
-    TQComboBox( bool rw, TQWidget* parent=0, const char* name=0 );
+    TQComboBox( TQWidget* parent=nullptr, const char* name=nullptr );
+    TQComboBox( bool rw, TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQComboBox();
 
     int		count() const;
diff --git a/src/widgets/tqdatetimeedit.cpp b/src/widgets/tqdatetimeedit.cpp
index aa533ebf5..15b4650a4 100644
--- a/src/widgets/tqdatetimeedit.cpp
+++ b/src/widgets/tqdatetimeedit.cpp
@@ -77,24 +77,24 @@ private:
     bool sep	 :1;
 };
 
-static TQString	*lDateSep = 0;
-static TQString	*lTimeSep = 0;
+static TQString	*lDateSep = nullptr;
+static TQString	*lTimeSep = nullptr;
 static bool	lAMPM	  = false;
-static TQString	*lAM	  = 0;
-static TQString	*lPM	  = 0;
+static TQString	*lAM	  = nullptr;
+static TQString	*lPM	  = nullptr;
 static TQDateEdit::Order	lOrder = TQDateEdit::YMD;
 static int refcount = 0;
 
 static void cleanup()
 {
     delete lDateSep;
-    lDateSep = 0;
+    lDateSep = nullptr;
     delete lTimeSep;
-    lTimeSep = 0;
+    lTimeSep = nullptr;
     delete lAM;
-    lAM = 0;
+    lAM = nullptr;
     delete lPM;
-    lPM = 0;
+    lPM = nullptr;
 }
 
 /*!
@@ -217,11 +217,11 @@ class TQDateTimeEditorPrivate
 public:
     TQDateTimeEditorPrivate()
 	: frm( true ),
-	  parag( new TQTextParagraph( 0, 0, 0, false ) ),
+	  parag( new TQTextParagraph( nullptr, nullptr, nullptr, false ) ),
 	  focusSec(0)
     {
 	parag->formatter()->setWrapEnabled( false );
-	cursor = new TQTextCursor( 0 );
+	cursor = new TQTextCursor( nullptr );
 	cursor->setParagraph( parag );
 	offset = 0;
 	sep = localDateSep();
@@ -339,7 +339,7 @@ public:
 	    yoff = 0;
 
 	p.translate( xoff, yoff );
-	parag->paint( p, cg, 0, true );
+	parag->paint( p, cg, nullptr, true );
 	if ( frm )
 	    p.translate( -xoff, -yoff );
     }
@@ -381,7 +381,7 @@ class TQDateTimeEditor : public TQWidget
     TQ_OBJECT
 public:
     TQDateTimeEditor( TQDateTimeEditBase * widget, TQWidget *parent,
-		       const char * name=0 );
+		       const char * name=nullptr );
     ~TQDateTimeEditor();
 
     void setControlWidget( TQDateTimeEditBase * widget );
diff --git a/src/widgets/tqdatetimeedit.h b/src/widgets/tqdatetimeedit.h
index 334e24d56..17ac3ebdf 100644
--- a/src/widgets/tqdatetimeedit.h
+++ b/src/widgets/tqdatetimeedit.h
@@ -53,7 +53,7 @@ class TQ_EXPORT TQDateTimeEditBase : public TQWidget
 {
     TQ_OBJECT
 public:
-    TQDateTimeEditBase( TQWidget* parent=0, const char* name=0 )
+    TQDateTimeEditBase( TQWidget* parent=nullptr, const char* name=nullptr )
 	: TQWidget( parent, name ) {}
     
     virtual bool setFocusSection( int sec ) = 0;
@@ -85,8 +85,8 @@ class TQ_EXPORT TQDateEdit : public TQDateTimeEditBase
     TQ_PROPERTY( TQDate minValue READ minValue WRITE setMinValue )
 
 public:
-    TQDateEdit( TQWidget* parent=0,  const char* name=0 );
-    TQDateEdit( const TQDate& date, TQWidget* parent=0,  const char* name=0 );
+    TQDateEdit( TQWidget* parent=nullptr,  const char* name=nullptr );
+    TQDateEdit( const TQDate& date, TQWidget* parent=nullptr,  const char* name=nullptr );
     ~TQDateEdit();
 
     enum Order { DMY, MDY, YMD, YDM };
@@ -173,8 +173,8 @@ public:
 	AMPM	= 0x10
     };
 
-    TQTimeEdit( TQWidget* parent=0,  const char* name=0 );
-    TQTimeEdit( const TQTime& time, TQWidget* parent=0,  const char* name=0 );
+    TQTimeEdit( TQWidget* parent=nullptr,  const char* name=nullptr );
+    TQTimeEdit( const TQTime& time, TQWidget* parent=nullptr,  const char* name=nullptr );
     ~TQTimeEdit();
 
     TQSize sizeHint() const;
@@ -244,9 +244,9 @@ class TQ_EXPORT TQDateTimeEdit : public TQWidget
     TQ_PROPERTY( TQDateTime dateTime READ dateTime WRITE setDateTime )
 
 public:
-    TQDateTimeEdit( TQWidget* parent=0, const char* name=0 );
-    TQDateTimeEdit( const TQDateTime& datetime, TQWidget* parent=0,
-		   const char* name=0 );
+    TQDateTimeEdit( TQWidget* parent=nullptr, const char* name=nullptr );
+    TQDateTimeEdit( const TQDateTime& datetime, TQWidget* parent=nullptr,
+		   const char* name=nullptr );
     ~TQDateTimeEdit();
 
     TQSize sizeHint() const;
diff --git a/src/widgets/tqdial.h b/src/widgets/tqdial.h
index ae3689705..b2cc8000d 100644
--- a/src/widgets/tqdial.h
+++ b/src/widgets/tqdial.h
@@ -66,9 +66,9 @@ class TQ_EXPORT TQDial: public TQWidget, public TQRangeControl
     TQ_PROPERTY( int value READ value WRITE setValue )
 	
 public:
-    TQDial( TQWidget* parent=0, const char* name=0, WFlags f = 0 );
+    TQDial( TQWidget* parent=nullptr, const char* name=nullptr, WFlags f = 0 );
     TQDial( int minValue, int maxValue, int pageStep, int value,
-	   TQWidget* parent=0, const char* name=0 );
+	   TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQDial();
 
     bool tracking() const;
@@ -128,7 +128,7 @@ protected:
     void valueChange();
     void rangeChange();
 
-    virtual void repaintScreen( const TQRect *cr = 0 );
+    virtual void repaintScreen( const TQRect *cr = nullptr );
 
 private:
     TQDialPrivate * d;
diff --git a/src/widgets/tqdockarea.cpp b/src/widgets/tqdockarea.cpp
index 9a2e429cc..a859b35aa 100644
--- a/src/widgets/tqdockarea.cpp
+++ b/src/widgets/tqdockarea.cpp
@@ -54,7 +54,7 @@
 
 struct TQ_EXPORT DockData
 {
-    DockData() : w( 0 ), rect() {}
+    DockData() : w( nullptr ), rect() {}
     DockData( TQDockWindow *dw, const TQRect &r ) : w( dw ), rect( r ) {}
     TQDockWindow *w;
     TQRect rect;
@@ -95,7 +95,7 @@ void TQDockAreaLayout::setGeometry( const TQRect &r )
 
 TQLayoutIterator TQDockAreaLayout::iterator()
 {
-    return 0;
+    return nullptr;
 }
 
 TQSize TQDockAreaLayout::sizeHint() const
@@ -111,13 +111,13 @@ TQSize TQDockAreaLayout::sizeHint() const
     int w = 0;
     int h = 0;
     TQPtrListIterator<TQDockWindow> it( *dockWindows );
-    TQDockWindow *dw = 0;
+    TQDockWindow *dw = nullptr;
     it.toFirst();
     int y = -1;
     int x = -1;
     int ph = 0;
     int pw = 0;
-    while ( ( dw = it.current() ) != 0 ) {
+    while ( ( dw = it.current() ) ) {
 	int plush = 0, plusw = 0;
 	++it;
 	if ( dw->isHidden() )
@@ -255,7 +255,7 @@ static void shrink_extend( TQDockWindow *dw, int &dockExtend, int /*spaceLeft*/,
 
 static void place_line( TQValueList<DockData> &lastLine, TQt::Orientation o, int linestrut, int fullextent, int tbstrut, int maxsize, TQDockAreaLayout * )
 {
-    TQDockWindow *last = 0;
+    TQDockWindow *last = nullptr;
     TQRect lastRect;
     for ( TQValueList<DockData>::Iterator it = lastLine.begin(); it != lastLine.end(); ++it ) {
 	if ( tbstrut != -1 && ::tqt_cast<TQToolBar*>((*it).w) )
@@ -302,8 +302,8 @@ TQSize TQDockAreaLayout::minimumSize() const
     int s = 0;
 
     TQPtrListIterator<TQDockWindow> it( *dockWindows );
-    TQDockWindow *dw = 0;
-    while ( ( dw = it.current() ) != 0 ) {
+    TQDockWindow *dw = nullptr;
+    while ( ( dw = it.current() ) ) {
 	++it;
 	if ( dw->isHidden() )
 	    continue;
@@ -331,7 +331,7 @@ int TQDockAreaLayout::layoutItems( const TQRect &rect, bool testonly )
     lines.clear();
     ls.clear();
     TQPtrListIterator<TQDockWindow> it( *dockWindows );
-    TQDockWindow *dw = 0;
+    TQDockWindow *dw = nullptr;
     int start = start_pos( r, orientation() );
     int pos = start;
     int sectionpos = 0;
@@ -342,7 +342,7 @@ int TQDockAreaLayout::layoutItems( const TQRect &rect, bool testonly )
     int visibleWindows = 0;
 
     // go through all widgets in the dock
-    while ( ( dw = it.current() ) != 0 ) {
+    while ( ( dw = it.current() ) ) {
 	++it;
 	if ( dw->isHidden() )
 	    continue;
@@ -409,7 +409,7 @@ int TQDockAreaLayout::layoutItems( const TQRect &rect, bool testonly )
 
     it.toFirst();
     bool hadResizable = false;
-    while ( ( dw = it.current() ) != 0 ) {
+    while ( ( dw = it.current() ) ) {
 	++it;
 	if ( !dw->isVisibleTo( parentWidget ) )
 	    continue;
@@ -557,7 +557,7 @@ int TQDockAreaLayout::widthForHeight( int h ) const
 */
 
 TQDockArea::TQDockArea( Orientation o, HandlePosition h, TQWidget *parent, const char *name )
-    : TQWidget( parent, name ), orient( o ), layout( 0 ), hPos( h )
+    : TQWidget( parent, name ), orient( o ), layout( nullptr ), hPos( h )
 {
     dockWindows = new TQPtrList<TQDockWindow>;
     layout = new TQDockAreaLayout( this, o, dockWindows, 0, 0, "toollayout" );
@@ -580,7 +580,7 @@ TQDockArea::~TQDockArea()
 {
     dockWindows->setAutoDelete( true );
     delete dockWindows;
-    dockWindows = 0;
+    dockWindows = nullptr;
 }
 
 /*!
@@ -593,7 +593,7 @@ TQDockArea::~TQDockArea()
 void TQDockArea::moveDockWindow( TQDockWindow *w, int index )
 {
     invalidateFixedSizes();
-    TQDockWindow *dockWindow = 0;
+    TQDockWindow *dockWindow = nullptr;
     int dockWindowIndex = findDockWindow( w );
     if ( dockWindowIndex == -1 ) {
 	dockWindow = w;
@@ -682,7 +682,7 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
 	    mse = TQMAX( w->fixedExtent().height(), mse );
     }
 
-    TQDockWindow *dockWindow = 0;
+    TQDockWindow *dockWindow = nullptr;
     int dockWindowIndex = findDockWindow( w );
     TQPtrList<TQDockWindow> lineStarts = layout->lineStarts();
     TQValueList<TQRect> lines = layout->lineList();
@@ -769,7 +769,7 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
 	tqDebug( "insert in line %d, and insert that line: %d", dockLine, insertLine );
 	tqDebug( "     (btw, we have %d lines)", lines.count() );
 #endif
-	TQDockWindow *dw = 0;
+	TQDockWindow *dw = nullptr;
 	if ( dockLine >= (int)lines.count() ) { // insert after last line
 	    dockWindows->append( dockWindow );
 	    dockWindow->setNewLine( true );
@@ -889,7 +889,7 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
 void TQDockArea::removeDockWindow( TQDockWindow *w, bool makeFloating, bool swap, bool fixNewLines )
 {
     w->removeEventFilter( this );
-    TQDockWindow *dockWindow = 0;
+    TQDockWindow *dockWindow = nullptr;
     int i = findDockWindow( w );
     if ( i == -1 )
 	return;
@@ -1003,7 +1003,7 @@ TQDockArea::DockWindowData *TQDockArea::dockWindowData( TQDockWindow *w )
     data->index = findDockWindow( w );
     if ( data->index == -1 ) {
 	delete data;
-	return 0;
+	return nullptr;
     }
     TQPtrList<TQDockWindow> lineStarts = layout->lineStarts();
     int i = -1;
@@ -1134,7 +1134,7 @@ int TQDockArea::maxSpace( int hint, TQDockWindow *dw )
 	return dw->height();
     }
 
-    TQDockWindow *w = 0;
+    TQDockWindow *w = nullptr;
     int i = 0;
     do {
 	w = dockWindows->at( index + (++i) );
@@ -1207,7 +1207,7 @@ bool TQDockArea::isLastDockWindow( TQDockWindow *dw )
     int i = dockWindows->find( dw );
     if ( i == -1 || i >= (int)dockWindows->count() - 1 )
 	return true;
-    TQDockWindow *w = 0;
+    TQDockWindow *w = nullptr;
     if ( ( w = dockWindows->at( ++i ) ) ) {
 	if ( orientation() == Horizontal && dw->y() < w->y() )
 	    return true;
diff --git a/src/widgets/tqdockarea.h b/src/widgets/tqdockarea.h
index ef92e0726..2865689c8 100644
--- a/src/widgets/tqdockarea.h
+++ b/src/widgets/tqdockarea.h
@@ -66,7 +66,7 @@ class TQ_EXPORT TQDockAreaLayout : public TQLayout
     friend class TQDockArea;
 
 public:
-    TQDockAreaLayout( TQWidget* parent, TQt::Orientation o, TQPtrList<TQDockWindow> *wl, int space = -1, int margin = -1, const char *name = 0 )
+    TQDockAreaLayout( TQWidget* parent, TQt::Orientation o, TQPtrList<TQDockWindow> *wl, int space = -1, int margin = -1, const char *name = nullptr )
 	: TQLayout( parent, space, margin, name ), orient( o ), dockWindows( wl ), parentWidget( parent ) { init(); }
     ~TQDockAreaLayout() {}
 
@@ -119,13 +119,13 @@ class TQ_EXPORT TQDockArea : public TQWidget
 public:
     enum HandlePosition { Normal, Reverse };
 
-    TQDockArea( Orientation o, HandlePosition h = Normal, TQWidget* parent=0, const char* name=0 );
+    TQDockArea( Orientation o, HandlePosition h = Normal, TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQDockArea();
 
     void moveDockWindow( TQDockWindow *w, const TQPoint &globalPos, const TQRect &rect, bool swap );
     void removeDockWindow( TQDockWindow *w, bool makeFloating, bool swap, bool fixNewLines = true );
     void moveDockWindow( TQDockWindow *w, int index = -1 );
-    bool hasDockWindow( TQDockWindow *w, int *index = 0 );
+    bool hasDockWindow( TQDockWindow *w, int *index = nullptr );
 
     void invalidNextOffset( TQDockWindow *dw );
 
diff --git a/src/widgets/tqdockwindow.cpp b/src/widgets/tqdockwindow.cpp
index a0d71ec8c..90d9a3dfd 100644
--- a/src/widgets/tqdockwindow.cpp
+++ b/src/widgets/tqdockwindow.cpp
@@ -75,7 +75,7 @@ class TQDockWindowResizeHandle : public TQWidget
     TQ_OBJECT
 
 public:
-    TQDockWindowResizeHandle( TQt::Orientation o, TQWidget *parent, TQDockWindow *w, const char* /*name*/=0 );
+    TQDockWindowResizeHandle( TQt::Orientation o, TQWidget *parent, TQDockWindow *w, const char* /*name*/=nullptr );
     void setOrientation( TQt::Orientation o );
     TQt::Orientation orientation() const { return orient; }
 
@@ -103,7 +103,7 @@ private:
 
 TQDockWindowResizeHandle::TQDockWindowResizeHandle( TQt::Orientation o, TQWidget *parent,
 						  TQDockWindow *w, const char * )
-    : TQWidget( parent, "qt_dockwidget_internal" ), mousePressed( false ), unclippedPainter( 0 ), dockWindow( w )
+    : TQWidget( parent, "qt_dockwidget_internal" ), mousePressed( false ), unclippedPainter( nullptr ), dockWindow( w )
 {
     setOrientation( o );
 }
@@ -270,7 +270,7 @@ void TQDockWindowResizeHandle::endLineDraw()
     if ( !unclippedPainter )
 	return;
     delete unclippedPainter;
-    unclippedPainter = 0;
+    unclippedPainter = nullptr;
 }
 
 void TQDockWindowResizeHandle::drawLine( const TQPoint &globalPos )
@@ -388,7 +388,7 @@ private:
 
 TQDockWindowHandle::TQDockWindowHandle( TQDockWindow *dw )
     : TQWidget( dw, "qt_dockwidget_internal", WNoAutoErase ), dockWindow( dw ),
-      closeButton( 0 ), opaque( default_opaque ), mousePressed( false )
+      closeButton( nullptr ), opaque( default_opaque ), mousePressed( false )
 {
     ctrlDown = false;
     timer = new TQTimer( this );
@@ -571,7 +571,7 @@ void TQDockWindowHandle::mouseDoubleClickEvent( TQMouseEvent *e )
 }
 
 TQDockWindowTitleBar::TQDockWindowTitleBar( TQDockWindow *dw )
-    : TQTitleBar( 0, dw, "qt_dockwidget_internal" ), dockWindow( dw ),
+    : TQTitleBar( nullptr, dw, "qt_dockwidget_internal" ), dockWindow( dw ),
       mousePressed( false ), hadDblClick( false ), opaque( default_opaque )
 {
     setWFlags( getWFlags() | WStyle_Tool );
@@ -968,10 +968,10 @@ public:
 
 void TQDockWindow::init()
 {
-    wid = 0;
-    unclippedPainter = 0;
-    dockArea = 0;
-    tmpDockArea = 0;
+    wid = nullptr;
+    unclippedPainter = nullptr;
+    dockArea = nullptr;
+    tmpDockArea = nullptr;
     resizeEnabled = false;
     moveEnabled = true;
     nl = false;
@@ -979,7 +979,7 @@ void TQDockWindow::init()
     cMode = Never;
     offs = 0;
     fExtent = TQSize( -1, -1 );
-    dockWindowData = 0;
+    dockWindowData = nullptr;
     lastPos = TQPoint( -1, -1 );
     lastSize = TQSize( -1, -1 );
 
@@ -1123,7 +1123,7 @@ TQDockWindow::~TQDockWindow()
     TQDockArea *a = area();
     if ( !a && dockWindowData )
 	a = ( (TQDockArea::DockWindowData*)dockWindowData )->area;
-    TQMainWindow *mw = a ? ::tqt_cast<TQMainWindow*>(a->parentWidget()) : 0;
+    TQMainWindow *mw = a ? ::tqt_cast<TQMainWindow*>(a->parentWidget()) : nullptr;
     if ( mw )
 	mw->removeDockWindow( this );
 
@@ -1146,7 +1146,7 @@ void TQDockWindow::swapRect( TQRect &r, TQt::Orientation o, const TQPoint &offse
     bl->setDirection( o == Horizontal ? TQBoxLayout::LeftToRight : TQBoxLayout::TopToBottom );
     bl->activate();
     r.setSize( bl->sizeHint() );
-    bl->data = 0;
+    bl->data = nullptr;
     delete bl;
     bool reverse = TQApplication::reverseLayout();
     if ( o == TQt::Horizontal )
@@ -1177,7 +1177,7 @@ TQWidget *TQDockWindow::areaAt( const TQPoint &gp )
 	}
 	w = w->parentWidget( true );
     }
-    return 0;
+    return nullptr;
 }
 
 void TQDockWindow::handleMove( const TQPoint &pos, const TQPoint &gp, bool drawRect )
@@ -1195,7 +1195,7 @@ void TQDockWindow::handleMove( const TQPoint &pos, const TQPoint &gp, bool drawR
     currRect = TQRect( realWidgetPos( this ), size() );
     TQWidget *w = areaAt( gp );
     if ( titleBar->ctrlDown || horHandle->ctrlDown || verHandle->ctrlDown )
-	w = 0;
+	w = nullptr;
     currRect.moveBy( pos.x(), pos.y() );
     if ( !::tqt_cast<TQDockArea*>(w) ) {
         if ( startOrientation != Horizontal && ::tqt_cast<TQToolBar*>(this) )
@@ -1405,7 +1405,7 @@ void TQDockWindow::updatePosition( const TQPoint &globalPos )
 	    dockArea->removeDockWindow( this, true,
                                         startOrientation != Horizontal && ::tqt_cast<TQToolBar*>(this) );
 	}
-	dockArea = 0;
+	dockArea = nullptr;
 	TQPoint topLeft = currRect.topLeft();
 	TQRect screen = tqApp->desktop()->availableGeometry( topLeft );
 	if ( !screen.contains( topLeft ) ) {
@@ -1428,7 +1428,7 @@ void TQDockWindow::updatePosition( const TQPoint &globalPos )
     }
     if ( doOrientationChange )
 	emit orientationChanged( orientation() );
-    tmpDockArea = 0;
+    tmpDockArea = nullptr;
     if ( doAdjustSize ) {
 	TQApplication::sendPostedEvents( this, TQEvent::LayoutHint );
 	if ( ::tqt_cast<TQToolBar*>(this) )
@@ -1506,7 +1506,7 @@ void TQDockWindow::endRectDraw( bool drawRect )
 	unclippedPainter->drawRect( dr );
     }
     delete unclippedPainter;
-    unclippedPainter = 0;
+    unclippedPainter = nullptr;
 }
 
 /*!
@@ -1859,7 +1859,7 @@ TQSize TQDockWindow::minimumSizeHint() const
 /*! \internal */
 void TQDockWindow::undock( TQWidget *w )
 {
-    TQMainWindow *mw = 0;
+    TQMainWindow *mw = nullptr;
     if ( area() )
 	mw = ::tqt_cast<TQMainWindow*>(area()->parentWidget());
     if ( mw && !mw->isDockEnabled( this, DockTornOff ) )
@@ -1875,7 +1875,7 @@ void TQDockWindow::undock( TQWidget *w )
 	dockWindowData = dockArea->dockWindowData( this );
 	dockArea->removeDockWindow( this, true, orientation() != Horizontal && ::tqt_cast<TQToolBar*>(this) );
     }
-    dockArea = 0;
+    dockArea = nullptr;
     if ( lastPos != TQPoint( -1, -1 ) && lastPos.x() > 0 && lastPos.y() > 0 )
 	move( lastPos );
     else
diff --git a/src/widgets/tqdockwindow.h b/src/widgets/tqdockwindow.h
index 4b1247f6b..6c09dac3e 100644
--- a/src/widgets/tqdockwindow.h
+++ b/src/widgets/tqdockwindow.h
@@ -90,8 +90,8 @@ public:
     enum Place { InDock, OutsideDock };
     enum CloseMode { Never = 0, Docked = 1, Undocked = 2, Always = Docked | Undocked };
 
-    TQDockWindow( Place p = InDock, TQWidget* parent=0, const char* name=0, WFlags f = 0 );
-    TQDockWindow( TQWidget* parent, const char* name=0, WFlags f = 0 );
+    TQDockWindow( Place p = InDock, TQWidget* parent=nullptr, const char* name=nullptr, WFlags f = 0 );
+    TQDockWindow( TQWidget* parent, const char* name=nullptr, WFlags f = 0 );
     ~TQDockWindow();
 
     virtual void setWidget( TQWidget *w );
@@ -154,7 +154,7 @@ signals:
 
 public slots:
     virtual void undock( TQWidget *w );
-    virtual void undock() { undock( 0 ); }
+    virtual void undock() { undock( nullptr ); }
     virtual void dock();
     virtual void setOrientation( Orientation o );
     void setCaption( const TQString &s );
diff --git a/src/widgets/tqeffects.cpp b/src/widgets/tqeffects.cpp
index c249c8f2f..14e76b21c 100644
--- a/src/widgets/tqeffects.cpp
+++ b/src/widgets/tqeffects.cpp
@@ -58,7 +58,7 @@ class TQAccessWidget : public TQWidget
     friend class TQAlphaWidget;
     friend class TQRollEffect;
 public:
-    TQAccessWidget( TQWidget* parent=0, const char* name=0, WFlags f = 0 )
+    TQAccessWidget( TQWidget* parent=nullptr, const char* name=nullptr, WFlags f = 0 )
 	: TQWidget( parent, name, f ) {}
 };
 
@@ -100,7 +100,7 @@ private:
     TQTime checkTime;
 };
 
-static TQAlphaWidget* q_blend = 0;
+static TQAlphaWidget* q_blend = nullptr;
 
 /*
   Constructs a TQAlphaWidget.
@@ -285,7 +285,7 @@ void TQAlphaWidget::render()
 		widget->show();
 	    }
 	}
-	q_blend = 0;
+	q_blend = nullptr;
 	deleteLater();
     } else {
 	if (widget)
@@ -372,7 +372,7 @@ private:
     TQPixmap pm;
 };
 
-static TQRollEffect* q_roll = 0;
+static TQRollEffect* q_roll = nullptr;
 
 /*
   Construct a TQRollEffect widget.
@@ -611,7 +611,7 @@ void TQRollEffect::scroll()
 		}
 	    }
 	}
-	q_roll = 0;
+	q_roll = nullptr;
 	deleteLater();
     }
 }
@@ -630,7 +630,7 @@ void qScrollEffect( TQWidget* w, TQEffects::DirFlags orient, int time )
 {
     if ( q_roll ) {
 	delete q_roll;
-	q_roll = 0;
+	q_roll = nullptr;
     }
 
     tqApp->sendPostedEvents( w, TQEvent::Move );
@@ -654,7 +654,7 @@ void qFadeEffect( TQWidget* w, int time )
 {
     if ( q_blend ) {
 	delete q_blend;
-	q_blend = 0;
+	q_blend = nullptr;
     }
 
     tqApp->sendPostedEvents( w, TQEvent::Move );
diff --git a/src/widgets/tqframe.h b/src/widgets/tqframe.h
index 19901013f..8a4a4efd3 100644
--- a/src/widgets/tqframe.h
+++ b/src/widgets/tqframe.h
@@ -61,7 +61,7 @@ class TQ_EXPORT TQFrame : public TQWidget
     TQ_PROPERTY( TQRect frameRect READ frameRect WRITE setFrameRect DESIGNABLE false )
 
 public:
-    TQFrame( TQWidget* parent=0, const char* name=0, WFlags f=0 );
+    TQFrame( TQWidget* parent=nullptr, const char* name=nullptr, WFlags f=0 );
 
     int         frameStyle()    const;
     virtual void setFrameStyle( int );
diff --git a/src/widgets/tqgrid.h b/src/widgets/tqgrid.h
index 991a765e9..79e62e9b4 100644
--- a/src/widgets/tqgrid.h
+++ b/src/widgets/tqgrid.h
@@ -49,8 +49,8 @@ class TQ_EXPORT TQGrid : public TQFrame
 {
     TQ_OBJECT
 public:
-    TQGrid( int n, TQWidget* parent=0, const char* name=0, WFlags f = 0 );
-    TQGrid( int n, Orientation orient, TQWidget* parent=0, const char* name=0,
+    TQGrid( int n, TQWidget* parent=nullptr, const char* name=nullptr, WFlags f = 0 );
+    TQGrid( int n, Orientation orient, TQWidget* parent=nullptr, const char* name=nullptr,
 	   WFlags f = 0 );
 
     void setSpacing( int );
diff --git a/src/widgets/tqgridview.h b/src/widgets/tqgridview.h
index bb18ee508..5e9aa1da7 100644
--- a/src/widgets/tqgridview.h
+++ b/src/widgets/tqgridview.h
@@ -58,7 +58,7 @@ class TQ_EXPORT TQGridView : public TQScrollView
     TQ_PROPERTY( int cellHeight READ cellHeight WRITE setCellHeight )
 public:
 
-    TQGridView( TQWidget *parent=0, const char *name=0, WFlags f=0 );
+    TQGridView( TQWidget *parent=nullptr, const char *name=nullptr, WFlags f=0 );
    ~TQGridView();
 
     int numRows() const;
diff --git a/src/widgets/tqgroupbox.cpp b/src/widgets/tqgroupbox.cpp
index 845c689ad..09bfadf13 100644
--- a/src/widgets/tqgroupbox.cpp
+++ b/src/widgets/tqgroupbox.cpp
@@ -99,8 +99,8 @@ class TQGroupBoxPrivate
 {
 public:
     TQGroupBoxPrivate():
-	spacer( 0 ),
-	checkbox( 0 ) {}
+	spacer( nullptr ),
+	checkbox( nullptr ) {}
 
     TQSpacerItem *spacer;
     TQCheckBox *checkbox;
@@ -189,10 +189,10 @@ void TQGroupBox::init()
     align = AlignAuto;
     setFrameStyle( TQFrame::GroupBoxPanel | TQFrame::Sunken );
 #ifndef TQT_NO_ACCEL
-    accel = 0;
+    accel = nullptr;
 #endif
-    vbox = 0;
-    grid = 0;
+    vbox = nullptr;
+    grid = nullptr;
     d = new TQGroupBoxPrivate();
     lenvisible = 0;
     nCols = nRows = 0;
@@ -248,7 +248,7 @@ void TQGroupBox::setTitle( const TQString &title )
 #ifndef TQT_NO_ACCEL
     if ( accel )
 	delete accel;
-    accel = 0;
+    accel = nullptr;
     int s = TQAccel::shortcutKey( title );
     if ( s ) {
 	accel = new TQAccel( this, "automatic focus-change accelerator" );
@@ -368,7 +368,7 @@ void TQGroupBox::paintEvent( TQPaintEvent *event )
 	    va |= NoAccel;
 	}
 	style().drawItem( &paint, r, ShowPrefix | AlignHCenter | va, colorGroup(),
-			  isEnabled(), 0, str, -1, ownPalette() ? 0 : &pen );
+			  isEnabled(), nullptr, str, -1, ownPalette() ? nullptr : &pen );
 	paint.setClipRegion( event->region().subtract( r ) ); // clip everything but title
 #ifndef TQT_NO_CHECKBOX
     } else if ( d->checkbox ) {
@@ -533,8 +533,8 @@ void TQGroupBox::setColumnLayout(int strips, Orientation direction)
     if ( layout() )
 	delete layout();
 
-    vbox = 0;
-    grid = 0;
+    vbox = nullptr;
+    grid = nullptr;
 
     if ( strips < 0 ) // if 0, we create the vbox but not the grid. See below.
 	return;
@@ -578,7 +578,7 @@ void TQGroupBox::setColumnLayout(int strips, Orientation direction)
     if ( children() ) {
 	TQObjectListIt it( *children() );
 	TQWidget *w;
-	while( (w=(TQWidget *)it.current()) != 0 ) {
+	while( (w=(TQWidget *)it.current()) ) {
 	    ++it;
 	    if ( w->isWidgetType()
 #ifndef TQT_NO_CHECKBOX
@@ -667,8 +667,8 @@ void TQGroupBox::fixFocus()
 {
     TQFocusData * fd = focusData();
     TQWidget * orig = fd->home();
-    TQWidget * best = 0;
-    TQWidget * candidate = 0;
+    TQWidget * best = nullptr;
+    TQWidget * candidate = nullptr;
     TQWidget * w = orig;
     do {
 	TQWidget * p = w;
@@ -836,7 +836,7 @@ void TQGroupBox::setFlat( bool b )
 #ifndef TQT_NO_CHECKBOX
 void TQGroupBox::setCheckable( bool b )
 {
-    if ( (d->checkbox != 0) == b )
+    if ( (!!d->checkbox) == b )
 	return;
 
     if ( b ) {
@@ -856,7 +856,7 @@ void TQGroupBox::setCheckable( bool b )
     } else {
 	setChildrenEnabled( true );
 	delete d->checkbox;
-	d->checkbox = 0;
+	d->checkbox = nullptr;
     }
     calculateFrame();
     setTextSpacer();
@@ -867,7 +867,7 @@ void TQGroupBox::setCheckable( bool b )
 bool TQGroupBox::isCheckable() const
 {
 #ifndef TQT_NO_CHECKBOX
-    return ( d->checkbox != 0 );
+    return ( d->checkbox );
 #else
     return false;
 #endif
diff --git a/src/widgets/tqgroupbox.h b/src/widgets/tqgroupbox.h
index 14198de3e..aa943e64e 100644
--- a/src/widgets/tqgroupbox.h
+++ b/src/widgets/tqgroupbox.h
@@ -67,13 +67,13 @@ class TQ_EXPORT TQGroupBox : public TQFrame
     TQ_PROPERTY( bool checked READ isChecked WRITE setChecked )
 #endif
 public:
-    TQGroupBox( TQWidget* parent=0, const char* name=0 );
+    TQGroupBox( TQWidget* parent=nullptr, const char* name=nullptr );
     TQGroupBox( const TQString &title,
-	       TQWidget* parent=0, const char* name=0 );
+	       TQWidget* parent=nullptr, const char* name=nullptr );
     TQGroupBox( int strips, Orientation o,
-	       TQWidget* parent=0, const char* name=0 );
+	       TQWidget* parent=nullptr, const char* name=nullptr );
     TQGroupBox( int strips, Orientation o, const TQString &title,
-	       TQWidget* parent=0, const char* name=0 );
+	       TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQGroupBox();
 
     virtual void setColumnLayout(int strips, Orientation o);
diff --git a/src/widgets/tqhbox.h b/src/widgets/tqhbox.h
index fec6a33cd..4d73267db 100644
--- a/src/widgets/tqhbox.h
+++ b/src/widgets/tqhbox.h
@@ -52,7 +52,7 @@ class TQ_EXPORT TQHBox : public TQFrame
 {
     TQ_OBJECT
 public:
-    TQHBox( TQWidget* parent=0, const char* name=0, WFlags f=0 );
+    TQHBox( TQWidget* parent=nullptr, const char* name=nullptr, WFlags f=0 );
 
     void setSpacing( int );
     bool setStretchFactor( TQWidget*, int stretch );
diff --git a/src/widgets/tqhbuttongroup.h b/src/widgets/tqhbuttongroup.h
index ab53a0824..6a7395259 100644
--- a/src/widgets/tqhbuttongroup.h
+++ b/src/widgets/tqhbuttongroup.h
@@ -51,8 +51,8 @@ class TQ_EXPORT TQHButtonGroup : public TQButtonGroup
 {
     TQ_OBJECT
 public:
-    TQHButtonGroup( TQWidget* parent=0, const char* name=0 );
-    TQHButtonGroup( const TQString &title, TQWidget* parent=0, const char* name=0 );
+    TQHButtonGroup( TQWidget* parent=nullptr, const char* name=nullptr );
+    TQHButtonGroup( const TQString &title, TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQHButtonGroup();
 
 private:	// Disabled copy constructor and operator=
diff --git a/src/widgets/tqheader.cpp b/src/widgets/tqheader.cpp
index 9ea079d8e..6098542cd 100644
--- a/src/widgets/tqheader.cpp
+++ b/src/widgets/tqheader.cpp
@@ -247,7 +247,7 @@ TQHeader::TQHeader( int n,  TQWidget *parent, const char *name )
 TQHeader::~TQHeader()
 {
     delete d;
-    d = 0;
+    d = nullptr;
 }
 
 /*! \reimp
@@ -1017,7 +1017,7 @@ TQString TQHeader::label( int section ) const
 TQIconSet *TQHeader::iconSet( int section ) const
 {
     if ( section < 0 || section >= count() )
-	return 0;
+	return nullptr;
     return d->iconsets[ section ];
 }
 
@@ -1094,7 +1094,7 @@ TQSize TQHeader::sectionSizeHint( int section, const TQFontMetrics& fm ) const
 {
     int iw = 0;
     int ih = 0;
-    if ( d->iconsets[section] != 0 ) {
+    if ( d->iconsets[section] ) {
 	TQSize isize = d->iconsets[section]->pixmap( TQIconSet::Small,
 						    TQIconSet::Normal ).size();
 	iw = isize.width() + 2;
diff --git a/src/widgets/tqheader.h b/src/widgets/tqheader.h
index 1489f143b..84195842f 100644
--- a/src/widgets/tqheader.h
+++ b/src/widgets/tqheader.h
@@ -68,8 +68,8 @@ class TQ_EXPORT TQHeader : public TQWidget
     TQ_PROPERTY( bool stretching READ isStretchEnabled WRITE setStretchEnabled )
 
 public:
-    TQHeader( TQWidget* parent=0, const char* name=0 );
-    TQHeader( int, TQWidget* parent=0, const char* name=0 );
+    TQHeader( TQWidget* parent=nullptr, const char* name=nullptr );
+    TQHeader( int, TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQHeader();
 
     int		addLabel( const TQString &, int size = -1 );
diff --git a/src/widgets/tqhgroupbox.h b/src/widgets/tqhgroupbox.h
index 67865c062..ffa9272e2 100644
--- a/src/widgets/tqhgroupbox.h
+++ b/src/widgets/tqhgroupbox.h
@@ -51,8 +51,8 @@ class TQ_EXPORT TQHGroupBox : public TQGroupBox
 {
     TQ_OBJECT
 public:
-    TQHGroupBox( TQWidget* parent=0, const char* name=0 );
-    TQHGroupBox( const TQString &title, TQWidget* parent=0, const char* name=0 );
+    TQHGroupBox( TQWidget* parent=nullptr, const char* name=nullptr );
+    TQHGroupBox( const TQString &title, TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQHGroupBox();
 
 private:	// Disabled copy constructor and operator=
diff --git a/src/widgets/tqiconview.cpp b/src/widgets/tqiconview.cpp
index 4e5027ea0..a4ae53fc1 100644
--- a/src/widgets/tqiconview.cpp
+++ b/src/widgets/tqiconview.cpp
@@ -118,10 +118,10 @@ static const char * const unknown_xpm[] = {
     "....................##d#b###....",
     "......................####......"};
 
-static TQPixmap *unknown_icon = 0;
-static TQPixmap *qiv_buffer_pixmap = 0;
+static TQPixmap *unknown_icon = nullptr;
+static TQPixmap *qiv_buffer_pixmap = nullptr;
 #if !defined(TQ_WS_X11)
-static TQPixmap *qiv_selection = 0;
+static TQPixmap *qiv_selection = nullptr;
 #endif
 static bool optimize_layout = false;
 
@@ -368,7 +368,7 @@ class TQIconViewItemLineEdit : public TQTextEdit
     friend class TQIconViewItem;
 
 public:
-    TQIconViewItemLineEdit( const TQString &text, TQWidget *parent, TQIconViewItem *theItem, const char* name=0 );
+    TQIconViewItemLineEdit( const TQString &text, TQWidget *parent, TQIconViewItem *theItem, const char* name=nullptr );
 
 protected:
     void keyPressEvent( TQKeyEvent *e );
@@ -606,7 +606,7 @@ const char* TQIconDrag::format( int i ) const
 {
     if ( i == 0 )
 	return "application/x-qiconlist";
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -826,7 +826,7 @@ TQIconViewItem::TQIconViewItem( TQIconView *parent )
 
 TQIconViewItem::TQIconViewItem( TQIconView *parent, TQIconViewItem *after )
     : view( parent ), itemText(), itemIcon( unknown_icon ),
-      prev( 0 ), next( 0 )
+      prev( nullptr ), next( nullptr )
 {
     init( after );
 }
@@ -839,7 +839,7 @@ TQIconViewItem::TQIconViewItem( TQIconView *parent, TQIconViewItem *after )
 TQIconViewItem::TQIconViewItem( TQIconView *parent, const TQString &text )
     : view( parent ), itemText( text ), itemIcon( unknown_icon )
 {
-    init( 0 );
+    init( nullptr );
 }
 
 /*!
@@ -865,7 +865,7 @@ TQIconViewItem::TQIconViewItem( TQIconView *parent, const TQString &text,
     : view( parent ),
       itemText( text ), itemIcon( new TQPixmap( icon ) )
 {
-    init( 0 );
+    init( nullptr );
 }
 
 
@@ -892,9 +892,9 @@ TQIconViewItem::TQIconViewItem( TQIconView *parent, TQIconViewItem *after,
 #ifndef TQT_NO_PICTURE
 TQIconViewItem::TQIconViewItem( TQIconView *parent, const TQString &text,
 			      const TQPicture &picture )
-    : view( parent ), itemText( text ), itemIcon( 0 )
+    : view( parent ), itemText( text ), itemIcon( nullptr )
 {
-    init( 0, new TQPicture( picture ) );
+    init( nullptr, new TQPicture( picture ) );
 }
 
 /*!
@@ -905,7 +905,7 @@ TQIconViewItem::TQIconViewItem( TQIconView *parent, const TQString &text,
 
 TQIconViewItem::TQIconViewItem( TQIconView *parent, TQIconViewItem *after,
 			      const TQString &text, const TQPicture &picture )
-    : view( parent ), itemText( text ), itemIcon( 0 )
+    : view( parent ), itemText( text ), itemIcon( nullptr )
 {
     init( after, new TQPicture( picture ) );
 }
@@ -923,9 +923,9 @@ void TQIconViewItem::init( TQIconViewItem *after
 			  )
 {
     d = new TQIconViewItemPrivate;
-    d->container1 = 0;
-    d->container2 = 0;
-    prev = next = 0;
+    d->container1 = nullptr;
+    d->container2 = nullptr;
+    prev = next = nullptr;
     allow_rename = false;
     allow_drag = true;
     allow_drop = true;
@@ -933,7 +933,7 @@ void TQIconViewItem::init( TQIconViewItem *after
     selected = false;
     selectable = true;
 #ifndef TQT_NO_TEXTEDIT
-    renameBox = 0;
+    renameBox = nullptr;
 #endif
 #ifndef TQT_NO_PICTURE
     itemPic = pic;
@@ -960,7 +960,7 @@ TQIconViewItem::~TQIconViewItem()
 #endif
     if ( view && !view->d->clearing )
 	view->takeItem( this );
-    view = 0;
+    view = nullptr;
     if ( itemIcon && itemIcon->serialNumber() != unknown_icon->serialNumber() )
 	delete itemIcon;
 #ifndef TQT_NO_PICTURE
@@ -1075,7 +1075,7 @@ void TQIconViewItem::setPixmap( const TQPixmap &icon )
 	return;
 
     if ( itemIcon && itemIcon == unknown_icon )
-	itemIcon = 0;
+	itemIcon = nullptr;
 
     if ( itemIcon )
 	*itemIcon = icon;
@@ -1107,10 +1107,10 @@ void TQIconViewItem::setPicture( const TQPicture &icon )
     // clear assigned pixmap if any
     if ( itemIcon ) {
 	if ( itemIcon == unknown_icon ) {
-	    itemIcon = 0;
+	    itemIcon = nullptr;
 	} else {
 	    delete itemIcon;
-	    itemIcon = 0;
+	    itemIcon = nullptr;
 	}
     }
     if ( itemPic )
@@ -1176,7 +1176,7 @@ void TQIconViewItem::setPixmap( const TQPixmap &icon, bool recalc, bool redraw )
 	return;
 
     if ( itemIcon && itemIcon == unknown_icon )
-	itemIcon = 0;
+	itemIcon = nullptr;
 
     if ( itemIcon )
 	*itemIcon = icon;
@@ -1742,7 +1742,7 @@ void TQIconViewItem::rename()
     view->viewport()->setFocusProxy( renameBox );
     renameBox->setFocus();
     renameBox->show();
-    Q_ASSERT( view->d->renamingItem == 0L );
+    Q_ASSERT( !view->d->renamingItem );
     view->d->renamingItem = this;
 }
 #endif
@@ -1828,13 +1828,13 @@ void TQIconViewItem::removeRenameBox()
     bool resetFocus = view->viewport()->focusProxy() == renameBox;
     renameBox->hide();
     renameBox->deleteLater();
-    renameBox = 0;
+    renameBox = nullptr;
     if ( resetFocus ) {
 	view->viewport()->setFocusProxy( view );
 	view->setFocus();
     }
     Q_ASSERT( view->d->renamingItem == this );
-    view->d->renamingItem = 0L;
+    view->d->renamingItem = nullptr;
 }
 #endif
 
@@ -2720,19 +2720,19 @@ TQIconView::TQIconView( TQWidget *parent, const char *name, WFlags f )
 
     d = new TQIconViewPrivate;
     d->dragging = false;
-    d->firstItem = 0;
-    d->lastItem = 0;
+    d->firstItem = nullptr;
+    d->lastItem = nullptr;
     d->count = 0;
     d->mousePressed = false;
     d->selectionMode = Single;
-    d->currentItem = 0;
-    d->highlightedItem = 0;
-    d->rubber = 0;
+    d->currentItem = nullptr;
+    d->highlightedItem = nullptr;
+    d->rubber = nullptr;
     d->canStartRubber = false;
-    d->backBuffer = 0;
-    d->scrollTimer = 0;
-    d->startDragItem = 0;
-    d->tmpCurrentItem = 0;
+    d->backBuffer = nullptr;
+    d->scrollTimer = nullptr;
+    d->startDragItem = nullptr;
+    d->tmpCurrentItem = nullptr;
     d->rastX = d->rastY = -1;
     d->spacing = 5;
     d->cleared = false;
@@ -2770,14 +2770,14 @@ TQIconView::TQIconView( TQWidget *parent, const char *name, WFlags f )
     d->fm = new TQFontMetrics( font() );
     d->minLeftBearing = d->fm->minLeftBearing();
     d->minRightBearing = d->fm->minRightBearing();
-    d->firstContainer = d->lastContainer = 0;
+    d->firstContainer = d->lastContainer = nullptr;
     d->containerUpdateLocked = false;
     d->firstSizeHint = false;
-    d->selectAnchor = 0;
-    d->renamingItem = 0;
+    d->selectAnchor = nullptr;
+    d->renamingItem = nullptr;
     d->drawActiveSelection = true;
     d->drawDragShapes = false;
-    d->backrubber = 0;    
+    d->backrubber = nullptr;    
 
     connect( d->adjustTimer, TQ_SIGNAL( timeout() ),
 	     this, TQ_SLOT( adjustItems() ) );
@@ -2884,12 +2884,12 @@ TQIconView::~TQIconView()
 	item = tmp;
     }
     delete d->backBuffer;
-    d->backBuffer = 0;
+    d->backBuffer = nullptr;
     delete d->fm;
-    d->fm = 0;
+    d->fm = nullptr;
 #ifndef TQT_NO_TOOLTIP
     delete d->toolTip;
-    d->toolTip = 0;
+    d->toolTip = nullptr;
 #endif
     delete d;
     d = nullptr;
@@ -2920,13 +2920,13 @@ void TQIconView::insertItem( TQIconViewItem *item, TQIconViewItem *after )
 
     if ( !d->firstItem ) {
 	d->firstItem = d->lastItem = item;
-	item->prev = 0;
-	item->next = 0;
+	item->prev = nullptr;
+	item->next = nullptr;
     } else {
 	if ( !after || after == d->lastItem ) {
 	    d->lastItem->next = item;
 	    item->prev = d->lastItem;
-	    item->next = 0;
+	    item->next = nullptr;
 	    d->lastItem = item;
 	} else {
 	    TQIconViewItem *i = d->firstItem;
@@ -3062,8 +3062,8 @@ void TQIconView::takeItem( TQIconViewItem *item )
 	item->d->container1->items.removeRef( item );
     if ( item->d->container2 )
 	item->d->container2->items.removeRef( item );
-    item->d->container2 = 0;
-    item->d->container1 = 0;
+    item->d->container2 = nullptr;
+    item->d->container1 = nullptr;
 
     bool block = signalsBlocked();
     blockSignals( d->clearing );
@@ -3080,7 +3080,7 @@ void TQIconView::takeItem( TQIconViewItem *item )
 	    emit currentChanged( d->currentItem );
 	    repaintItem( d->currentItem );
 	} else {
-	    d->currentItem = 0;
+	    d->currentItem = nullptr;
 	    emit currentChanged( d->currentItem );
 	}
     }
@@ -3092,11 +3092,11 @@ void TQIconView::takeItem( TQIconViewItem *item )
     if ( item == d->firstItem ) {
 	d->firstItem = d->firstItem->next;
 	if ( d->firstItem )
-	    d->firstItem->prev = 0;
+	    d->firstItem->prev = nullptr;
     } else if ( item == d->lastItem ) {
 	d->lastItem = d->lastItem->prev;
 	if ( d->lastItem )
-	    d->lastItem->next = 0;
+	    d->lastItem->next = nullptr;
     } else {
 	TQIconViewItem *i = item;
 	if ( i ) {
@@ -3113,9 +3113,9 @@ void TQIconView::takeItem( TQIconViewItem *item )
     if ( !d->clearing )
 	repaintContents( r.x(), r.y(), r.width(), r.height(), true );
 
-    item->view = 0;
-    item->prev = 0;
-    item->next = 0;
+    item->view = nullptr;
+    item->prev = nullptr;
+    item->next = nullptr;
     d->count--;
 
     blockSignals( block );
@@ -3339,7 +3339,7 @@ void TQIconView::doAutoScroll()
     blockSignals( block );
 
     // static bool drawAll;
-    if ( d->backrubber == 0 ) {
+    if ( !d->backrubber ) {
         d->backrubber = new TQPixmap( viewport()->rect().size() );
         d->backrubber->fill( viewport(), viewport()->rect().topLeft() );
         // drawAll = true;
@@ -3424,7 +3424,7 @@ void TQIconView::doAutoScroll()
 		    this, TQ_SLOT( doAutoScroll() ) );
 	d->scrollTimer->stop();
 	delete d->scrollTimer;
-	d->scrollTimer = 0;
+	d->scrollTimer = nullptr;
     }
 
 }
@@ -3724,7 +3724,7 @@ TQIconView::SelectionMode TQIconView::selectionMode() const
 TQIconViewItem *TQIconView::findItem( const TQPoint &pos ) const
 {
     if ( !d->firstItem )
-	return 0;
+	return nullptr;
 
     TQIconViewPrivate::ItemContainer *c = d->lastContainer;
     for ( ; c; c = c->p ) {
@@ -3736,7 +3736,7 @@ TQIconViewItem *TQIconView::findItem( const TQPoint &pos ) const
 	}
     }
 
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -3751,7 +3751,7 @@ TQIconViewItem *TQIconView::findItem( const TQPoint &pos ) const
 TQIconViewItem *TQIconView::findItem( const TQString &text, ComparisonFlags compare ) const
 {
     if ( !d->firstItem )
-	return 0;
+	return nullptr;
 
     if ( compare == CaseSensitive || compare == 0 )
 	compare |= ExactMatch;
@@ -3767,9 +3767,9 @@ TQIconViewItem *TQIconView::findItem( const TQString &text, ComparisonFlags comp
     else
 	item = d->firstItem;
 
-    TQIconViewItem *beginsWithItem = 0;
-    TQIconViewItem *endsWithItem = 0;
-    TQIconViewItem *containsItem = 0;
+    TQIconViewItem *beginsWithItem = nullptr;
+    TQIconViewItem *endsWithItem = nullptr;
+    TQIconViewItem *containsItem = nullptr;
 
     if ( item ) {
 	for ( ; item; item = item->next ) {
@@ -3815,7 +3815,7 @@ TQIconViewItem *TQIconView::findItem( const TQString &text, ComparisonFlags comp
 	return endsWithItem;
     else if ( containsItem )
 	return containsItem;
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -3989,7 +3989,7 @@ void TQIconView::ensureItemVisible( TQIconViewItem *item )
 TQIconViewItem* TQIconView::findFirstVisibleItem( const TQRect &r ) const
 {
     TQIconViewPrivate::ItemContainer *c = d->firstContainer;
-    TQIconViewItem *i = 0;
+    TQIconViewItem *i = nullptr;
     bool alreadyIntersected = false;
     for ( ; c; c = c->n ) {
 	if ( c->rect.intersects( r ) ) {
@@ -4030,7 +4030,7 @@ TQIconViewItem* TQIconView::findFirstVisibleItem( const TQRect &r ) const
 TQIconViewItem* TQIconView::findLastVisibleItem( const TQRect &r ) const
 {
     TQIconViewPrivate::ItemContainer *c = d->firstContainer;
-    TQIconViewItem *i = 0;
+    TQIconViewItem *i = nullptr;
     bool alreadyIntersected = false;
     for ( ; c; c = c->n ) {
 	if ( c->rect.intersects( r ) ) {
@@ -4073,7 +4073,7 @@ void TQIconView::clear()
     clearSelection();
     blockSignals( block );
     setContentsPos( 0, 0 );
-    d->currentItem = 0;
+    d->currentItem = nullptr;
 
     if ( !d->firstItem ) {
 	d->clearing = false;
@@ -4081,7 +4081,7 @@ void TQIconView::clear()
     }
 
     TQIconViewItem *item = d->firstItem, *tmp;
-    d->firstItem = 0;
+    d->firstItem = nullptr;
     while ( item ) {
 	tmp = item->next;
 	delete item;
@@ -4093,13 +4093,13 @@ void TQIconView::clear()
 	delete c;
 	c = tmpc;
     }
-    d->firstContainer = d->lastContainer = 0;
+    d->firstContainer = d->lastContainer = nullptr;
 
     d->count = 0;
-    d->lastItem = 0;
-    setCurrentItem( 0 );
-    d->highlightedItem = 0;
-    d->tmpCurrentItem = 0;
+    d->lastItem = nullptr;
+    setCurrentItem( nullptr );
+    d->highlightedItem = nullptr;
+    d->tmpCurrentItem = nullptr;
     d->drawDragShapes = false;
 
     resizeContents( 0, 0 );
@@ -4454,19 +4454,19 @@ void TQIconView::contentsMousePressEventEx( TQMouseEvent *e )
     if ( d->rubber ) {
         TQRect r( d->rubber->normalize() );
         delete d->rubber;
-        d->rubber = 0;  
+        d->rubber = nullptr;  
    
         repaintContents( r, false );
         d->dragging = false;
 
 	delete d->backrubber;
-	d->backrubber = 0;
+	d->backrubber = nullptr;
 
 	if ( d->scrollTimer ) {
 	    disconnect( d->scrollTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( doAutoScroll() ) );
 	    d->scrollTimer->stop();
 	    delete d->scrollTimer;
-	    d->scrollTimer = 0;
+	    d->scrollTimer = nullptr;
 	}
     }
 
@@ -4490,7 +4490,7 @@ void TQIconView::contentsMousePressEventEx( TQMouseEvent *e )
     if (item && item->dragEnabled())
 	d->startDragItem = item;
     else
-	d->startDragItem = 0;
+	d->startDragItem = nullptr;
 
     if ( e->button() == LeftButton && !( e->state() & ShiftButton ) &&
 	 !( e->state() & ControlButton ) && item && item->isSelected() &&
@@ -4632,7 +4632,7 @@ void TQIconView::contentsMouseReleaseEvent( TQMouseEvent *e )
 
     bool emitClicked = true;
     d->mousePressed = false;
-    d->startDragItem = 0;
+    d->startDragItem = nullptr;
 
     d->canStartRubber = false;
     if ( d->rubber ) {
@@ -4642,13 +4642,13 @@ void TQIconView::contentsMouseReleaseEvent( TQMouseEvent *e )
 	     TQApplication::startDragDistance() )
 	    emitClicked = false;
 	delete d->rubber;
-    	d->rubber = 0;
+    	d->rubber = nullptr;
 	repaintContents(r, false);
 	d->dragging = false;
 	delete d->backrubber;
-	d->backrubber = 0;      
+	d->backrubber = nullptr;      
 	d->currentItem = d->tmpCurrentItem;
-	d->tmpCurrentItem = 0;
+	d->tmpCurrentItem = nullptr;
 	if ( d->currentItem )
 	    repaintItem( d->currentItem );
     }
@@ -4657,7 +4657,7 @@ void TQIconView::contentsMouseReleaseEvent( TQMouseEvent *e )
 	disconnect( d->scrollTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( doAutoScroll() ) );
 	d->scrollTimer->stop();
 	delete d->scrollTimer;
-	d->scrollTimer = 0;
+	d->scrollTimer = nullptr;
     }
 
     if ( d->selectionMode == Extended &&
@@ -4673,7 +4673,7 @@ void TQIconView::contentsMouseReleaseEvent( TQMouseEvent *e )
 	}
 	emit selectionChanged();
     }
-    d->pressedItem = 0;
+    d->pressedItem = nullptr;
 
     if ( emitClicked ) {
 	emit mouseButtonClicked( e->button(), item, e->globalPos() );
@@ -4724,7 +4724,7 @@ void TQIconView::contentsMouseMoveEvent( TQMouseEvent *e )
 	if ( d->canStartRubber ) {
 	    d->canStartRubber = false;
 	    d->tmpCurrentItem = d->currentItem;
-	    d->currentItem = 0;
+	    d->currentItem = nullptr;
 	    repaintItem( d->tmpCurrentItem );
 	    delete d->rubber;
 	    d->rubber = new TQRect( d->rubberStartX, d->rubberStartY, 0, 0 );
@@ -4763,7 +4763,7 @@ void TQIconView::contentsDragEnterEvent( TQDragEnterEvent *e )
 {
     d->dragging = true;
     d->drawDragShapes = true;
-    d->tmpCurrentItem = 0;
+    d->tmpCurrentItem = nullptr;
     initDragEnter( e );
     d->oldDragPos = e->pos();
     d->oldDragAcceptAction = false;
@@ -4789,7 +4789,7 @@ void TQIconView::contentsDragMoveEvent( TQDragMoveEvent *e )
     d->dragging = false;
 
     TQIconViewItem *old = d->tmpCurrentItem;
-    d->tmpCurrentItem = 0;
+    d->tmpCurrentItem = nullptr;
 
     TQIconViewItem *item = findItem( e->pos() );
 
@@ -4845,7 +4845,7 @@ void TQIconView::contentsDragLeaveEvent( TQDragLeaveEvent * )
 	d->tmpCurrentItem->dragLeft();
     }
 
-    d->tmpCurrentItem = 0;
+    d->tmpCurrentItem = nullptr;
     d->isIconDrag = false;
     d->iconDragData.clear();
 }
@@ -5046,7 +5046,7 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
 
 	selectCurrent = false;
 
-	TQIconViewItem *item = 0;
+	TQIconViewItem *item = nullptr;
 	TQIconViewPrivate::ItemContainer *c = d->firstContainer;
 	while ( !item && c ) {
 	    TQPtrList<TQIconViewItem> &list = c->items;
@@ -5091,7 +5091,7 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
 
 	selectCurrent = false;
 
-	TQIconViewItem *item = 0;
+	TQIconViewItem *item = nullptr;
 	TQIconViewPrivate::ItemContainer *c = d->lastContainer;
 	while ( !item && c ) {
 	    TQPtrList<TQIconViewItem> &list = c->items;
@@ -5569,7 +5569,7 @@ void TQIconView::drawRubber( TQPainter *p )
 TQDragObject *TQIconView::dragObject()
 {
     if ( !d->currentItem )
-	return 0;
+	return nullptr;
 
     TQPoint orig = d->dragStartPos;
 
@@ -5617,9 +5617,9 @@ void TQIconView::startDrag()
     TQPoint orig = d->dragStartPos;
     d->dragStart = TQPoint( orig.x() - d->startDragItem->x(),
 			   orig.y() - d->startDragItem->y() );
-    d->startDragItem = 0;
+    d->startDragItem = nullptr;
     d->mousePressed = false;
-    d->pressedItem = 0;
+    d->pressedItem = nullptr;
     d->pressedSelected = 0;
 
     TQDragObject *drag = dragObject();
@@ -5883,7 +5883,7 @@ TQSize TQIconView::minimumSizeHint() const
 TQIconViewItem* TQIconView::findItemByName( TQIconViewItem *start )
 {
     if ( !start )
-	return 0;
+	return nullptr;
     TQString match = d->currInputString.lower();
     if ( match.length() < 1 )
 	return start;
@@ -5897,7 +5897,7 @@ TQIconViewItem* TQIconView::findItemByName( TQIconViewItem *start )
 	if ( !i )
 	    i = d->firstItem;
     } while ( i != start );
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -5913,7 +5913,7 @@ TQIconViewItem* TQIconView::findItemByName( TQIconViewItem *start )
 
 TQIconViewItem *TQIconView::makeRowLayout( TQIconViewItem *begin, int &y, bool &changed )
 {
-    TQIconViewItem *end = 0;
+    TQIconViewItem *end = nullptr;
 
     // Find the first visible item
     while (begin->next && (begin->isVisible() == false)) {
@@ -6185,8 +6185,8 @@ void TQIconView::sort( bool ascending )
 
     qsort( items, count(), sizeof( TQIconViewPrivate::SortableItem ), cmpIconViewItems );
 
-    TQIconViewItem *prev = 0;
-    item = 0;
+    TQIconViewItem *prev = nullptr;
+    item = nullptr;
     if ( ascending ) {
 	for ( i = 0; i < (int)count(); ++i ) {
 	    item = items[ i ].item;
@@ -6194,7 +6194,7 @@ void TQIconView::sort( bool ascending )
 		item->prev = prev;
 		if ( item->prev )
 		    item->prev->next = item;
-		item->next = 0;
+		item->next = nullptr;
 	    }
 	    if ( i == 0 )
 		d->firstItem = item;
@@ -6209,7 +6209,7 @@ void TQIconView::sort( bool ascending )
 		item->prev = prev;
 		if ( item->prev )
 		    item->prev->next = item;
-		item->next = 0;
+		item->next = nullptr;
 	    }
 	    if ( i == (int)count() - 1 )
 		d->firstItem = item;
@@ -6289,7 +6289,7 @@ void TQIconView::updateItemContainer( TQIconViewItem *item )
 	else
 	    item->d->container1->items.removeRef( item );
     }
-    item->d->container1 = 0;
+    item->d->container1 = nullptr;
     if ( item->d->container2 && d->firstContainer ) {
 	//Special-case to check if we can use removeLast otherwise use removeRef (slower)
 	if (item->d->container2->items.last() == item)
@@ -6297,7 +6297,7 @@ void TQIconView::updateItemContainer( TQIconViewItem *item )
 	else
 	    item->d->container2->items.removeRef( item );
     }
-    item->d->container2 = 0;
+    item->d->container2 = nullptr;
 
     TQIconViewPrivate::ItemContainer *c = d->firstContainer;
     if ( !c ) {
@@ -6360,15 +6360,15 @@ void TQIconView::appendItemContainer()
 	s = TQSize( RECT_EXTENSION, INT_MAX - 1 );
 
     if ( !d->firstContainer ) {
-	d->firstContainer = new TQIconViewPrivate::ItemContainer( 0, 0, TQRect( TQPoint( 0, 0 ), s ) );
+	d->firstContainer = new TQIconViewPrivate::ItemContainer( nullptr, nullptr, TQRect( TQPoint( 0, 0 ), s ) );
 	d->lastContainer = d->firstContainer;
     } else {
 	if ( d->arrangement == LeftToRight )
 	    d->lastContainer = new TQIconViewPrivate::ItemContainer(
-		d->lastContainer, 0, TQRect( d->lastContainer->rect.bottomLeft(), s ) );
+		d->lastContainer, nullptr, TQRect( d->lastContainer->rect.bottomLeft(), s ) );
 	else
 	    d->lastContainer = new TQIconViewPrivate::ItemContainer(
-		d->lastContainer, 0, TQRect( d->lastContainer->rect.topRight(), s ) );
+		d->lastContainer, nullptr, TQRect( d->lastContainer->rect.topRight(), s ) );
     }
 }
 
@@ -6388,7 +6388,7 @@ void TQIconView::rebuildContainers()
 	delete c;
 	c = tmpc;
     }
-    d->firstContainer = d->lastContainer = 0;
+    d->firstContainer = d->lastContainer = nullptr;
 
     TQIconViewItem *item = d->firstItem;
     appendItemContainer();
@@ -6397,7 +6397,7 @@ void TQIconView::rebuildContainers()
         if (item->isVisible()) {
 	    if ( c->rect.contains( item->rect() ) ) {
 	        item->d->container1 = c;
-	        item->d->container2 = 0;
+	        item->d->container2 = nullptr;
 	        c->items.append( item );
 	        item = item->next;
 	    } else if ( c->rect.intersects( item->rect() ) ) {
@@ -6527,7 +6527,7 @@ void TQIconView::handleItemChange( TQIconViewItem *old, bool shift,
 		}
 
 		// finding contained items and selecting them
-		TQIconViewItem *item = 0;
+		TQIconViewItem *item = nullptr;
 		bool changed = false;
 		bool midValid = midRect.isValid();
 		bool topValid = topRect.isValid();
diff --git a/src/widgets/tqiconview.h b/src/widgets/tqiconview.h
index 8f0b58661..55ff918af 100644
--- a/src/widgets/tqiconview.h
+++ b/src/widgets/tqiconview.h
@@ -90,7 +90,7 @@ class TQ_EXPORT TQIconDrag : public TQDragObject
 {
     TQ_OBJECT
 public:
-    TQIconDrag( TQWidget * dragSource, const char* name = 0 );
+    TQIconDrag( TQWidget * dragSource, const char* name = nullptr );
     virtual ~TQIconDrag();
 
     void append( const TQIconDragItem &item, const TQRect &pr, const TQRect &tr );
@@ -224,9 +224,9 @@ protected:
     TQString tempText() const;
 
 private:
-    void init( TQIconViewItem *after = 0
+    void init( TQIconViewItem *after = nullptr
 #ifndef TQT_NO_PICTURE
-	       , TQPicture *pic = 0
+	       , TQPicture *pic = nullptr
 #endif
 	       );
 #ifndef TQT_NO_TEXTEDIT
@@ -310,10 +310,10 @@ public:
 	Right
     };
 
-    TQIconView( TQWidget* parent=0, const char* name=0, WFlags f = 0 );
+    TQIconView( TQWidget* parent=nullptr, const char* name=nullptr, WFlags f = 0 );
     virtual ~TQIconView();
 
-    virtual void insertItem( TQIconViewItem *item, TQIconViewItem *after = 0L );
+    virtual void insertItem( TQIconViewItem *item, TQIconViewItem *after = nullptr );
     virtual void takeItem( TQIconViewItem *item );
 
     int index( const TQIconViewItem *item ) const;
@@ -461,7 +461,7 @@ protected:
     virtual void insertInGrid( TQIconViewItem *item );
     virtual void drawBackground( TQPainter *p, const TQRect &r );
 
-    void emitSelectionChanged( TQIconViewItem * i = 0 );
+    void emitSelectionChanged( TQIconViewItem * i = nullptr );
     void emitRenamed( TQIconViewItem *item );
 
     TQIconViewItem *makeRowLayout( TQIconViewItem *begin, int &y, bool &changed );
diff --git a/src/widgets/tqlabel.cpp b/src/widgets/tqlabel.cpp
index c2b89f77b..3b6986987 100644
--- a/src/widgets/tqlabel.cpp
+++ b/src/widgets/tqlabel.cpp
@@ -56,7 +56,7 @@ class TQLabelPrivate
 {
 public:
     TQLabelPrivate()
-	:img(0), pix(0), valid_hints( -1 )
+	:img(nullptr), pix(nullptr), valid_hints( -1 )
     {}
     TQImage* img; // for scaled contents
     TQPixmap* pix; // for scaled contents
@@ -215,17 +215,17 @@ TQLabel::~TQLabel()
 
 void TQLabel::init()
 {
-    lpixmap = 0;
+    lpixmap = nullptr;
 #ifndef TQT_NO_MOVIE
-    lmovie = 0;
+    lmovie = nullptr;
 #endif
 #ifndef TQT_NO_ACCEL
-    lbuddy = 0;
-    accel = 0;
+    lbuddy = nullptr;
+    accel = nullptr;
 #endif
-    lpixmap = 0;
+    lpixmap = nullptr;
 #ifndef TQT_NO_PICTURE
-    lpicture = 0;
+    lpicture = nullptr;
 #endif
     align = AlignAuto | AlignVCenter | ExpandTabs;
     extraMargin = -1;
@@ -233,7 +233,7 @@ void TQLabel::init()
     scaledcontents = false;
     textformat = TQt::AutoText;
 #ifndef TQT_NO_RICHTEXT
-    doc = 0;
+    doc = nullptr;
 #endif
 
     setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ) );
@@ -274,7 +274,7 @@ void TQLabel::setText( const TQString &text )
 	return;
     TQSize osh = sizeHint();
 #ifndef TQT_NO_RICHTEXT
-    bool hadRichtext = doc != 0;
+    bool hadRichtext = doc;
 #endif
     clearContents();
     ltext = text;
@@ -782,7 +782,7 @@ void TQLabel::drawContents( TQPainter *p )
 	    style().styleHint(TQStyle::SH_EtchDisabledText, this)) {
 	    TQColorGroup cg = colorGroup();
 	    cg.setColor( TQColorGroup::Text, cg.light() );
-	    doc->draw(p, cr.x()+1, cr.y()+yo+1, cr, cg, 0);
+	    doc->draw(p, cr.x()+1, cr.y()+yo+1, cr, cg, nullptr);
 	}
 
 	// TQSimpleRichText always draws with TQColorGroup::Text as with
@@ -793,7 +793,7 @@ void TQLabel::drawContents( TQPainter *p )
 	if ( backgroundMode() != PaletteBase && isEnabled() )
 	    cg.setColor( TQColorGroup::Text, paletteForegroundColor() );
 
-	doc->draw(p, cr.x(), cr.y()+yo, cr, cg, 0);
+	doc->draw(p, cr.x(), cr.y()+yo, cr, cg, nullptr);
     } else
 #endif
 #ifndef TQT_NO_PICTURE
@@ -903,7 +903,7 @@ void TQLabel::acceleratorSlot()
 #ifndef TQT_NO_ACCEL
 void TQLabel::buddyDied() // I can't remember if I cried.
 {
-    lbuddy = 0;
+    lbuddy = nullptr;
 }
 
 /*!
@@ -992,12 +992,12 @@ void TQLabel::movieUpdated(const TQRect& rect)
     TQMovie *mov = movie();
     if ( mov && !mov->isNull() ) {
 	TQRect r = contentsRect();
-	r = style().itemRect( 0, r, align, isEnabled(), &(mov->framePixmap()),
+	r = style().itemRect( nullptr, r, align, isEnabled(), &(mov->framePixmap()),
 			      TQString::null );
 	r.moveBy(rect.x(), rect.y());
 	r.setWidth(TQMIN(r.width(), rect.width()));
 	r.setHeight(TQMIN(r.height(), rect.height()));
-	repaint( r, mov->framePixmap().mask() != 0 );
+	repaint( r, mov->framePixmap().mask() );
     }
 }
 
@@ -1046,19 +1046,19 @@ void TQLabel::clearContents()
 {
 #ifndef TQT_NO_RICHTEXT
     delete doc;
-    doc = 0;
+    doc = nullptr;
 #endif
 
     delete lpixmap;
-    lpixmap = 0;
+    lpixmap = nullptr;
 #ifndef TQT_NO_PICTURE
     delete lpicture;
-    lpicture = 0;
+    lpicture = nullptr;
 #endif
     delete d->img;
-    d->img = 0;
+    d->img = nullptr;
     delete d->pix;
-    d->pix = 0;
+    d->pix = nullptr;
 
     ltext = TQString::null;
 #ifndef TQT_NO_ACCEL
@@ -1070,7 +1070,7 @@ void TQLabel::clearContents()
 	lmovie->disconnectResize(this, TQ_SLOT(movieResized(const TQSize&)));
 	lmovie->disconnectUpdate(this, TQ_SLOT(movieUpdated(const TQRect&)));
 	delete lmovie;
-	lmovie = 0;
+	lmovie = nullptr;
     }
 #endif
 }
@@ -1170,9 +1170,9 @@ void TQLabel::setScaledContents( bool enable )
     scaledcontents = enable;
     if ( !enable ) {
 	delete d->img;
-	d->img = 0;
+	d->img = nullptr;
 	delete d->pix;
-	d->pix = 0;
+	d->pix = nullptr;
     }
     update( contentsRect() );
 }
diff --git a/src/widgets/tqlabel.h b/src/widgets/tqlabel.h
index e859245d2..08b87a517 100644
--- a/src/widgets/tqlabel.h
+++ b/src/widgets/tqlabel.h
@@ -62,11 +62,11 @@ class TQ_EXPORT TQLabel : public TQFrame
     TQ_OVERRIDE( BackgroundMode backgroundMode DESIGNABLE true)
 
 public:
-    TQLabel( TQWidget *parent, const char* name=0, WFlags f=0 );
-    TQLabel( const TQString &text, TQWidget *parent, const char* name=0,
+    TQLabel( TQWidget *parent, const char* name=nullptr, WFlags f=0 );
+    TQLabel( const TQString &text, TQWidget *parent, const char* name=nullptr,
 	    WFlags f=0 );
     TQLabel( TQWidget *buddy, const TQString &,
-	    TQWidget *parent, const char* name=0, WFlags f=0 );
+	    TQWidget *parent, const char* name=nullptr, WFlags f=0 );
     ~TQLabel();
 
     TQString	 text()		const	{ return ltext; }
diff --git a/src/widgets/tqlcdnumber.cpp b/src/widgets/tqlcdnumber.cpp
index ca768057a..30d0943fe 100644
--- a/src/widgets/tqlcdnumber.cpp
+++ b/src/widgets/tqlcdnumber.cpp
@@ -192,7 +192,7 @@ static TQString double2string( double num, int base, int ndigits, bool *oflow )
                 *oflow = true;
             return s;
         }
-        s = int2string( (int)num, base, ndigits, 0 );
+        s = int2string( (int)num, base, ndigits, nullptr );
     } else {                                    // decimal base
         int nd = ndigits;
         do {
@@ -347,7 +347,7 @@ void TQLCDNumber::init()
     smallPoint = false;
     setNumDigits( ndigits );
     setSegmentStyle( Outline );
-    d = 0;
+    d = nullptr;
     setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
 }
 
@@ -653,7 +653,7 @@ void TQLCDNumber::drawContents( TQPainter *p )
     if ( smallPoint )
         drawString( digitStr, *p, &points, false );
     else
-        drawString( digitStr, *p, 0, false );
+        drawString( digitStr, *p, nullptr, false );
 }
 
 
diff --git a/src/widgets/tqlcdnumber.h b/src/widgets/tqlcdnumber.h
index f178a3423..a3a9383e7 100644
--- a/src/widgets/tqlcdnumber.h
+++ b/src/widgets/tqlcdnumber.h
@@ -63,8 +63,8 @@ class TQ_EXPORT TQLCDNumber : public TQFrame		// LCD number widget
     TQ_PROPERTY( int intValue READ intValue WRITE display )
 
 public:
-    TQLCDNumber( TQWidget* parent=0, const char* name=0 );
-    TQLCDNumber( uint numDigits, TQWidget* parent=0, const char* name=0 );
+    TQLCDNumber( TQWidget* parent=nullptr, const char* name=nullptr );
+    TQLCDNumber( uint numDigits, TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQLCDNumber();
 
     enum Mode { Hex, Dec, Oct, Bin, HEX = Hex, DEC = Dec, OCT = Oct,
@@ -110,7 +110,7 @@ private:
     void    init();
     void    internalDisplay( const TQString &);
     void    internalSetString( const TQString& s );
-    void    drawString( const TQString& s, TQPainter &, TQBitArray * = 0,
+    void    drawString( const TQString& s, TQPainter &, TQBitArray * = nullptr,
 			bool = true );
     //void    drawString( const TQString &, TQPainter &, TQBitArray * = 0 ) const;
     void    drawDigit( const TQPoint &, TQPainter &, int, char,
diff --git a/src/widgets/tqlineedit.cpp b/src/widgets/tqlineedit.cpp
index 8f7e944d0..b44389fe4 100644
--- a/src/widgets/tqlineedit.cpp
+++ b/src/widgets/tqlineedit.cpp
@@ -92,7 +92,7 @@ struct TQLineEditPrivate : public TQt
 	  direction(TQChar::DirON), dragEnabled(1), alignment(0),
 	  echoMode(0), textDirty(0), selDirty(0), validInput(1),
 	  ascent(0), maxLength(32767), menuId(0),
-	  hscroll(0), validator(0), maskData(0),
+	  hscroll(0), validator(nullptr), maskData(nullptr),
 	  undoState(0), selstart(0), selend(0),
 	  imstart(0), imend(0), imselstart(0), imselend(0)
 #ifndef TQT_NO_DRAGANDDROP
@@ -1221,7 +1221,7 @@ void TQLineEdit::deselect()
 
 void TQLineEdit::clearValidator()
 {
-    setValidator( 0 );
+    setValidator( nullptr );
 }
 
 /*!
@@ -1357,7 +1357,7 @@ void TQLineEditPrivate::copy( bool clipboard ) const
 {
     TQString t = q->selectedText();
     if ( !t.isEmpty() && echoMode == TQLineEdit::Normal ) {
-	q->disconnect( TQApplication::clipboard(), TQ_SIGNAL(selectionChanged()), q, 0);
+	q->disconnect( TQApplication::clipboard(), TQ_SIGNAL(selectionChanged()), q, nullptr);
 	TQApplication::clipboard()->setText( t, clipboard ? TQClipboard::Clipboard : TQClipboard::Selection );
 	q->connect( TQApplication::clipboard(), TQ_SIGNAL(selectionChanged()),
 		 q, TQ_SLOT(clipboardChanged()) );
@@ -2637,7 +2637,7 @@ void TQLineEditPrivate::parseInputMask( const TQString &maskFields )
     if ( maskFields.isEmpty() || maskFields.section( ';', 0, 0 ).isEmpty() ) {
 	if ( maskData ) {
 	    delete [] maskData;
-	    maskData = 0;
+	    maskData = nullptr;
 	    maxLength = 32767;
 	    q->setText( TQString::null );
 	}
diff --git a/src/widgets/tqlineedit.h b/src/widgets/tqlineedit.h
index 38b1481c7..eef9d3c35 100644
--- a/src/widgets/tqlineedit.h
+++ b/src/widgets/tqlineedit.h
@@ -79,9 +79,9 @@ class TQ_EXPORT TQLineEdit : public TQFrame
     TQ_PROPERTY( bool acceptableInput READ hasAcceptableInput )
 
 public:
-    TQLineEdit( TQWidget* parent, const char* name=0 );
-    TQLineEdit( const TQString &, TQWidget* parent, const char* name=0 );
-    TQLineEdit( const TQString &, const TQString &, TQWidget* parent, const char* name=0 );
+    TQLineEdit( TQWidget* parent, const char* name=nullptr );
+    TQLineEdit( const TQString &, TQWidget* parent, const char* name=nullptr );
+    TQLineEdit( const TQString &, const TQString &, TQWidget* parent, const char* name=nullptr );
     ~TQLineEdit();
 
     TQString text() const;
diff --git a/src/widgets/tqlistbox.cpp b/src/widgets/tqlistbox.cpp
index e32fd57f1..f03872062 100644
--- a/src/widgets/tqlistbox.cpp
+++ b/src/widgets/tqlistbox.cpp
@@ -63,14 +63,14 @@ class TQListBoxPrivate
 {
 public:
     TQListBoxPrivate( TQListBox *lb ):
-	head( 0 ), last( 0 ), cache( 0 ), cacheIndex( -1 ), current( 0 ),
-	highlighted( 0 ), tmpCurrent( 0 ), columnPos( 1 ), rowPos( 1 ), rowPosCache( 0 ),
+	head( nullptr ), last( nullptr ), cache( nullptr ), cacheIndex( -1 ), current( nullptr ),
+	highlighted( nullptr ), tmpCurrent( nullptr ), columnPos( 1 ), rowPos( 1 ), rowPosCache( 0 ),
 	columnPosOne( 0 ), rowMode( TQListBox::FixedNumber ),
 	columnMode( TQListBox::FixedNumber ), numRows( 1 ), numColumns( 1 ),
 	currentRow( 0 ), currentColumn( 0 ),
 	mousePressRow( -1 ), mousePressColumn( -1 ),
 	mouseMoveRow( -1 ), mouseMoveColumn( -1 ), mouseInternalPress( false ),
-	scrollTimer( 0 ), updateTimer( 0 ), visibleTimer( 0 ),
+	scrollTimer( nullptr ), updateTimer( nullptr ), visibleTimer( nullptr ),
 	selectionMode( TQListBox::Single ),
 	count( 0 ),
 	listBox( lb ), currInputString( TQString::null ),
@@ -351,7 +351,7 @@ TQListBoxItem::TQListBoxItem( TQListBox* listbox )
     s = false;
     dirty = true;
     custom_highlight = false;
-    p = n = 0;
+    p = n = nullptr;
 
     // just something that'll look noticeable in the debugger
     x = y = 42;
@@ -372,7 +372,7 @@ TQListBoxItem::TQListBoxItem( TQListBox* listbox, TQListBoxItem *after )
     s = false;
     dirty = true;
     custom_highlight = false;
-    p = n = 0;
+    p = n = nullptr;
 
     // just something that'll be noticeable in the debugger
     x = y = 42;
@@ -469,7 +469,7 @@ TQString TQListBoxItem::text() const
 */
 const TQPixmap *TQListBoxItem::pixmap() const
 {
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -1008,10 +1008,10 @@ TQListBox::TQListBox( TQWidget *parent, const char *name, WFlags f )
     d->inputTimer = new TQTimer( this, "listbox input timer" );
     d->resizeTimer = new TQTimer( this, "listbox resize timer" );
     d->clearing = false;
-    d->pressedItem = 0;
-    d->selectAnchor = 0;
+    d->pressedItem = nullptr;
+    d->selectAnchor = nullptr;
     d->select = false;
-    d->rubber = 0;
+    d->rubber = nullptr;
     d->selectable.setAutoDelete( true );
 
     setMouseTracking( true );
@@ -1030,7 +1030,7 @@ TQListBox::TQListBox( TQWidget *parent, const char *name, WFlags f )
 }
 
 
-TQListBox * TQListBox::changedListBox = 0;
+TQListBox * TQListBox::changedListBox = nullptr;
 
 /*!
     Destroys the list box. Deletes all list box items.
@@ -1039,10 +1039,10 @@ TQListBox * TQListBox::changedListBox = 0;
 TQListBox::~TQListBox()
 {
     if ( changedListBox == this )
-	changedListBox = 0;
+	changedListBox = nullptr;
     clear();
     delete d;
-    d = 0;
+    d = nullptr;
 }
 
 /*!
@@ -1307,7 +1307,7 @@ void TQListBox::insertStrList( const TQStrList *list, int index )
 {
     if ( !list ) {
 #if defined(QT_CHECK_NULL)
-	Q_ASSERT( list != 0 );
+	Q_ASSERT( list );
 #endif
 	return;
     }
@@ -1402,14 +1402,14 @@ void TQListBox::insertStrList( const char **strings, int numStrings, int index )
 {
     if ( !strings ) {
 #if defined(QT_CHECK_NULL)
-	Q_ASSERT( strings != 0 );
+	Q_ASSERT( strings );
 #endif
 	return;
     }
     if ( index < 0 )
 	index = count();
     int i = 0;
-    while ( (numStrings<0 && strings[i]!=0) || i<numStrings ) {
+    while ( (numStrings<0 && strings[i]) || i<numStrings ) {
 	insertItem( new TQListBoxText( TQString::fromLatin1(strings[i])),
 		    index + i );
 	i++;
@@ -1430,7 +1430,7 @@ void TQListBox::insertStrList( const char **strings, int numStrings, int index )
 void TQListBox::insertItem( const TQListBoxItem *lbi, int index )
 {
 #if defined ( QT_CHECK_NULL )
-    Q_ASSERT( lbi != 0 );
+    Q_ASSERT( lbi );
 #else
     if ( !lbi )
 	return;
@@ -1446,12 +1446,12 @@ void TQListBox::insertItem( const TQListBoxItem *lbi, int index )
 
     TQListBoxItem * item = (TQListBoxItem *)lbi;
     d->count++;
-    d->cache = 0;
+    d->cache = nullptr;
 
     item->lbox = this;
     if ( !d->head || index == 0 ) {
 	item->n = d->head;
-	item->p = 0;
+	item->p = nullptr;
 	d->head = item;
 	item->dirty = true;
 	if ( item->n )
@@ -1470,7 +1470,7 @@ void TQListBox::insertItem( const TQListBoxItem *lbi, int index )
 	} else {
 	    i->n = item;
 	    item->p = i;
-	    item->n = 0;
+	    item->n = nullptr;
 	}
     }
 
@@ -1497,7 +1497,7 @@ void TQListBox::insertItem( const TQListBoxItem *lbi, int index )
 void TQListBox::insertItem( const TQListBoxItem *lbi, const TQListBoxItem *after )
 {
 #if defined ( QT_CHECK_NULL )
-    Q_ASSERT( lbi != 0 );
+    Q_ASSERT( lbi );
 #else
     if ( !lbi )
 	return;
@@ -1505,12 +1505,12 @@ void TQListBox::insertItem( const TQListBoxItem *lbi, const TQListBoxItem *after
 
     TQListBoxItem * item = (TQListBoxItem*)lbi;
     d->count++;
-    d->cache = 0;
+    d->cache = nullptr;
 
     item->lbox = this;
     if ( !d->head || !after ) {
 	item->n = d->head;
-	item->p = 0;
+	item->p = nullptr;
 	d->head = item;
 	item->dirty = true;
 	if ( item->n )
@@ -1622,13 +1622,13 @@ void TQListBox::clear()
     bool blocked = signalsBlocked();
     blockSignals( true );
     d->clearing = true;
-    d->current = 0;
-    d->tmpCurrent = 0;
+    d->current = nullptr;
+    d->tmpCurrent = nullptr;
     TQListBoxItem * i = d->head;
-    d->head = 0;
+    d->head = nullptr;
     while ( i ) {
 	TQListBoxItem * n = i->n;
-	i->n = i->p = 0;
+	i->n = i->p = nullptr;
 	delete i;
 	i = n;
     }
@@ -1645,7 +1645,7 @@ void TQListBox::clear()
     clearSelection();
     blockSignals( blocked );
     triggerUpdate( true );
-    d->last = 0;
+    d->last = nullptr;
     d->clearing = false;
 }
 
@@ -1678,7 +1678,7 @@ const TQPixmap *TQListBox::pixmap( int index ) const
     TQListBoxItem * i = item( index );
     if ( i )
 	return i->pixmap();
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -1907,7 +1907,7 @@ void TQListBox::setCurrentItem( TQListBoxItem * i )
 TQListBoxItem *TQListBox::item( int index ) const
 {
     if ( index < 0 || index > d->count -1 )
-	return 0;
+	return nullptr;
 
     TQListBoxItem * i = d->head;
 
@@ -1958,7 +1958,7 @@ int TQListBox::index( const TQListBoxItem * lbi ) const
     }
     TQListBoxItem* i_p = i_n;
     int c_p = c_n;
-    while ( ( i_n != 0 || i_p != 0 ) && i_n != lbi && i_p != lbi ) {
+    while ( ( i_n || i_p ) && i_n != lbi && i_p != lbi ) {
 	if ( i_n ) {
 	    c_n++;
 	    i_n = i_n->n;
@@ -2111,11 +2111,11 @@ void TQListBox::mousePressEventEx( TQMouseEvent *e )
 	    if ( d->selectionMode == Multi ||
 		 d->selectionMode == Extended ) {
 		d->tmpCurrent = d->current;
-		d->current = 0;
+		d->current = nullptr;
 		updateItem( d->tmpCurrent );
 		if ( d->rubber )
 		    delete d->rubber;
-		d->rubber = 0;
+		d->rubber = nullptr;
 		d->rubber = new TQRect( e->x(), e->y(), 0, 0 );
 
 		if ( d->selectionMode == Extended && !( e->state() & ControlButton ) )
@@ -2130,7 +2130,7 @@ void TQListBox::mousePressEventEx( TQMouseEvent *e )
 
     // for sanity, in case people are event-filtering or whatnot
     delete d->scrollTimer;
-    d->scrollTimer = 0;
+    d->scrollTimer = nullptr;
     if ( i ) {
 	d->mousePressColumn = d->currentColumn;
 	d->mousePressRow = d->currentRow;
@@ -2165,14 +2165,14 @@ void TQListBox::mouseReleaseEvent( TQMouseEvent *e )
     if ( d->rubber ) {
 	drawRubber();
 	delete d->rubber;
-	d->rubber = 0;
+	d->rubber = nullptr;
 	d->current = d->tmpCurrent;
 	updateItem( d->current );
     }
     if ( d->scrollTimer )
 	mouseMoveEvent( e );
     delete d->scrollTimer;
-    d->scrollTimer = 0;
+    d->scrollTimer = nullptr;
     d->ignoreMoves = false;
 
     if ( d->selectionMode == Extended &&
@@ -2189,7 +2189,7 @@ void TQListBox::mouseReleaseEvent( TQMouseEvent *e )
     TQListBoxItem * i = itemAt( e->pos() );
     bool emitClicked = ( d->mousePressColumn != -1 && d->mousePressRow != -1 ) || !d->pressedItem;
     emitClicked = emitClicked && d->pressedItem == i;
-    d->pressedItem = 0;
+    d->pressedItem = nullptr;
     d->mousePressRow = -1;
     d->mousePressColumn = -1;
     d->mouseInternalPress = false;
@@ -2340,7 +2340,7 @@ void TQListBox::updateSelection()
 		    d->dirtyDrag = false;
 		else
 		    clearSelection(); // dont reset drag-selected items
-		d->pressedItem = 0;
+		d->pressedItem = nullptr;
 		if ( i && i->isSelectable() ) {
 		    bool block = signalsBlocked();
 		    blockSignals( true );
@@ -2987,10 +2987,10 @@ this function returns 0.
 TQListBoxItem* TQListBox::selectedItem() const
 {
     if ( d->selectionMode != Single )
-	return 0;
+	return nullptr;
     if ( isSelected( currentItem() ) )
 	return  d->current;
-    return 0;
+    return nullptr;
 }
 
 
@@ -3520,7 +3520,7 @@ TQListBoxItem * TQListBox::itemAt( const TQPoint& p ) const
     // take into acount frame margin to get to viewport
     np -= viewport()->pos();
     if (!viewport()->rect().contains(np))
-	return 0;
+	return nullptr;
 
     // take into account contents position
     np = viewportToContents( np );
@@ -3530,7 +3530,7 @@ TQListBoxItem * TQListBox::itemAt( const TQPoint& p ) const
 
     // return 0 when y is below the last row
     if ( y > d->rowPos[ numRows() ] )
-	return 0;
+	return nullptr;
 
     int col = columnAt( x );
     int row = rowAt( y );
@@ -3543,7 +3543,7 @@ TQListBoxItem * TQListBox::itemAt( const TQPoint& p ) const
 	if ( d->columnPos[ col + 1 ] >= x )
 	    return i;
     }
-    return 0;
+    return nullptr;
 }
 
 
@@ -3628,7 +3628,7 @@ void TQListBox::doAutoScroll()
 
     if ( d->scrollPos == TQPoint( 0, 0 ) ) {
 	delete d->scrollTimer;
-	d->scrollTimer = 0;
+	d->scrollTimer = nullptr;
     }
 }
 
@@ -4227,7 +4227,7 @@ void TQListBox::takeItem( const TQListBoxItem * item )
 {
     if ( !item || d->clearing )
 	return;
-    d->cache = 0;
+    d->cache = nullptr;
     d->count--;
     if ( item == d->last )
 	d->last = d->last->p;
@@ -4260,7 +4260,7 @@ void TQListBox::takeItem( const TQListBoxItem * item )
 
     if ( item->s )
 	emit selectionChanged();
-    ((TQListBoxItem *)item)->lbox = 0;
+    ((TQListBoxItem *)item)->lbox = nullptr;
     triggerUpdate( true );
 }
 
@@ -4313,7 +4313,7 @@ void TQListBox::clearInputString()
 TQListBoxItem *TQListBox::findItem( const TQString &text, ComparisonFlags compare ) const
 {
     if ( text.isEmpty() )
-	return 0;
+	return nullptr;
 
     if ( compare == CaseSensitive || compare == 0 )
 	compare |= ExactMatch;
@@ -4329,9 +4329,9 @@ TQListBoxItem *TQListBox::findItem( const TQString &text, ComparisonFlags compar
     else
 	item = d->head;
 
-    TQListBoxItem *beginsWithItem = 0;
-    TQListBoxItem *endsWithItem = 0;
-    TQListBoxItem *containsItem = 0;
+    TQListBoxItem *beginsWithItem = nullptr;
+    TQListBoxItem *endsWithItem = nullptr;
+    TQListBoxItem *containsItem = nullptr;
 
     if ( item ) {
 	for ( ; item; item = item->n ) {
@@ -4377,7 +4377,7 @@ TQListBoxItem *TQListBox::findItem( const TQString &text, ComparisonFlags compar
 	return endsWithItem;
     else if ( containsItem )
 	return containsItem;
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -4439,7 +4439,7 @@ void TQListBox::doRubberSelection( const TQRect &old, const TQRect &rubber )
 
 bool TQListBox::isRubberSelecting() const
 {
-    return d->rubber != 0;
+    return d->rubber;
 }
 
 
@@ -4513,7 +4513,7 @@ void TQListBox::sort( bool ascending )
     if ( count() == 0 )
 	return;
 
-    d->cache = 0;
+    d->cache = nullptr;
 
     TQListBoxPrivate::SortableItem *items = new TQListBoxPrivate::SortableItem[ count() ];
 
@@ -4524,8 +4524,8 @@ void TQListBox::sort( bool ascending )
 
     qsort( items, count(), sizeof( TQListBoxPrivate::SortableItem ), cmpListBoxItems );
 
-    TQListBoxItem *prev = 0;
-    item = 0;
+    TQListBoxItem *prev = nullptr;
+    item = nullptr;
     if ( ascending ) {
 	for ( i = 0; i < (int)count(); ++i ) {
 	    item = items[ i ].item;
@@ -4534,7 +4534,7 @@ void TQListBox::sort( bool ascending )
 		item->dirty = true;
 		if ( item->p )
 		    item->p->n = item;
-		item->n = 0;
+		item->n = nullptr;
 	    }
 	    if ( i == 0 )
 		d->head = item;
@@ -4548,7 +4548,7 @@ void TQListBox::sort( bool ascending )
 		item->dirty = true;
 		if ( item->p )
 		    item->p->n = item;
-		item->n = 0;
+		item->n = nullptr;
 	    }
 	    if ( i == (int)count() - 1 )
 		d->head = item;
@@ -4594,7 +4594,7 @@ void TQListBox::selectRange( TQListBoxItem *from, TQListBoxItem *to, bool invert
 	return;
     if ( from == to && !includeFirst )
 	return;
-    TQListBoxItem *i = 0;
+    TQListBoxItem *i = nullptr;
     int index =0;
     int f_idx = -1, t_idx = -1;
     for ( i = d->head; i; i = i->n, index++ ) {
diff --git a/src/widgets/tqlistbox.h b/src/widgets/tqlistbox.h
index cb8de82d4..2b357633f 100644
--- a/src/widgets/tqlistbox.h
+++ b/src/widgets/tqlistbox.h
@@ -78,7 +78,7 @@ class TQ_EXPORT TQListBox : public TQScrollView
     TQ_PROPERTY( bool variableHeight READ variableHeight WRITE setVariableHeight )
 
 public:
-    TQListBox( TQWidget* parent=0, const char* name=0, WFlags f=0  );
+    TQListBox( TQWidget* parent=nullptr, const char* name=nullptr, WFlags f=0  );
     ~TQListBox();
 
     virtual void setFont( const TQFont & );
@@ -318,7 +318,7 @@ private:	// Disabled copy constructor and operator=
 class TQ_EXPORT TQListBoxItem
 {
 public:
-    TQListBoxItem( TQListBox* listbox = 0 );
+    TQListBoxItem( TQListBox* listbox = nullptr );
     TQListBoxItem( TQListBox* listbox, TQListBoxItem *after );
     virtual ~TQListBoxItem();
 
diff --git a/src/widgets/tqlistview.cpp b/src/widgets/tqlistview.cpp
index 3144d8f99..bdd7f492a 100644
--- a/src/widgets/tqlistview.cpp
+++ b/src/widgets/tqlistview.cpp
@@ -82,7 +82,7 @@ struct TQListViewItemIteratorPrivate
     uint flags;
 };
 
-static TQPtrDict<TQListViewItemIteratorPrivate> *qt_iteratorprivate_dict = 0;
+static TQPtrDict<TQListViewItemIteratorPrivate> *qt_iteratorprivate_dict = nullptr;
 
 struct TQListViewPrivate
 {
@@ -157,7 +157,7 @@ struct TQListViewPrivate
 
     class ItemColumnInfo {
     public:
-	ItemColumnInfo(): pm( 0 ), next( 0 ), truncated( false ), dirty( false ), allow_rename( false ), width( 0 ) {}
+	ItemColumnInfo(): pm( nullptr ), next( nullptr ), truncated( false ), dirty( false ), allow_rename( false ), width( 0 ) {}
 	~ItemColumnInfo() { delete pm; delete next; }
 	TQString text, tmpText;
 	TQPixmap * pm;
@@ -170,7 +170,7 @@ struct TQListViewPrivate
 
     class ViewColumnInfo {
     public:
-	ViewColumnInfo(): align(TQt::AlignAuto), sortable(true), next( 0 ) {}
+	ViewColumnInfo(): align(TQt::AlignAuto), sortable(true), next( nullptr ) {}
 	~ViewColumnInfo() { delete next; }
 	int align;
 	bool sortable;
@@ -321,7 +321,7 @@ static int indexOfItem( TQListViewItem *item )
     if ( !TQAccessible::isActive() )
 	return 0;
 
-    static TQListViewItem *lastItem = 0;
+    static TQListViewItem *lastItem = nullptr;
     static int lastIndex = 0;
 
     if ( !item || !item->listView() )
@@ -740,10 +740,10 @@ void TQListViewItem::init()
     open = false;
 
     nChildren = 0;
-    parentItem = 0;
-    siblingItem = childItem = 0;
+    parentItem = nullptr;
+    siblingItem = childItem = nullptr;
 
-    columns = 0;
+    columns = nullptr;
 
     selected = 0;
 
@@ -756,7 +756,7 @@ void TQListViewItem::init()
     allow_drag = false;
     allow_drop = false;
     visible = true;
-    renameBox = 0;
+    renameBox = nullptr;
     enabled = true;
     mlenabled = false;
 }
@@ -961,7 +961,7 @@ void TQListViewItem::removeRenameBox()
     const bool resetFocus = lv->viewport()->focusProxy() == renameBox;
     const bool renameBoxHadFocus = renameBox->hasFocus();
     delete renameBox;
-    renameBox = 0;
+    renameBox = nullptr;
     if ( resetFocus )
 	lv->viewport()->setFocusProxy( lv );
     if (renameBoxHadFocus)
@@ -1015,14 +1015,14 @@ TQListViewItem::~TQListViewItem()
 {
     if ( renameBox ) {
 	delete renameBox;
-	renameBox = 0;
+	renameBox = nullptr;
     }
 
     TQListView *lv = listView();
 
     if ( lv ) {
 	if ( lv->d->oldFocusItem == this )
-	    lv->d->oldFocusItem = 0;
+	    lv->d->oldFocusItem = nullptr;
 	if ( lv->d->iterators ) {
 	    TQListViewItemIterator *i = lv->d->iterators->first();
 	    while ( i ) {
@@ -1036,9 +1036,9 @@ TQListViewItem::~TQListViewItem()
     if ( parentItem )
 	parentItem->takeItem( this );
     TQListViewItem * i = childItem;
-    childItem = 0;
+    childItem = nullptr;
     while ( i ) {
-	i->parentItem = 0;
+	i->parentItem = nullptr;
 	TQListViewItem * n = i->siblingItem;
 	delete i;
 	i = n;
@@ -1257,7 +1257,7 @@ void TQListViewItem::takeItem( TQListViewItem * item )
     bool emit_changed = false;
     if ( lv && !lv->d->clearing ) {
 	if ( lv->d->oldFocusItem == this )
-	    lv->d->oldFocusItem = 0;
+	    lv->d->oldFocusItem = nullptr;
 
 	if ( lv->d->iterators ) {
 	    TQListViewItemIterator *i = lv->d->iterators->first();
@@ -1272,13 +1272,13 @@ void TQListViewItem::takeItem( TQListViewItem * item )
 
 	if ( lv->d && lv->d->drawables ) {
 	    delete lv->d->drawables;
-	    lv->d->drawables = 0;
+	    lv->d->drawables = nullptr;
 	}
 
 	if ( lv->d->dirtyItems ) {
 	    if ( item->childItem ) {
 		delete lv->d->dirtyItems;
-		lv->d->dirtyItems = 0;
+		lv->d->dirtyItems = nullptr;
 		lv->d->dirtyItemTimer->stop();
 		lv->triggerUpdate();
 	    } else {
@@ -1302,7 +1302,7 @@ void TQListViewItem::takeItem( TQListViewItem * item )
 		else if ( item->itemAbove() )
 		    lv->d->focusItem = item->itemAbove();
 		else
-		    lv->d->focusItem = 0;
+		    lv->d->focusItem = nullptr;
 		emit_changed = true;
 	    }
 	}
@@ -1319,19 +1319,19 @@ void TQListViewItem::takeItem( TQListViewItem * item )
         while (ptr && ptr != item)
             ptr = ptr->parentItem;
 	if (ptr == item)
-	    lv->d->startDragItem = 0;
+	    lv->d->startDragItem = nullptr;
 
         ptr = lv->d->pressedItem;
         while (ptr && ptr != item)
             ptr = ptr->parentItem;
 	if (ptr == item)
-	    lv->d->pressedItem = 0;
+	    lv->d->pressedItem = nullptr;
 
         ptr = lv->d->highlighted;
         while (ptr && ptr != item)
             ptr = ptr->parentItem;
 	if (ptr == item)
-	    lv->d->highlighted = 0;
+	    lv->d->highlighted = nullptr;
     }
 
     nChildren--;
@@ -1342,8 +1342,8 @@ void TQListViewItem::takeItem( TQListViewItem * item )
 
     if ( nextChild && item == *nextChild )
 	*nextChild = (*nextChild)->siblingItem;
-    item->parentItem = 0;
-    item->siblingItem = 0;
+    item->parentItem = nullptr;
+    item->siblingItem = nullptr;
     item->ownHeight = 0;
     item->maybeTotalHeight = -1;
     item->configured = false;
@@ -1435,7 +1435,7 @@ void TQListViewItem::sortChildItems( int column, bool ascending )
     const int nColumns = ( listView() ? listView()->columns() : 0 );
 
     // only sort if the item have more than one child.
-    if ( column > nColumns || childItem == 0 || (childItem->siblingItem == 0 && childItem->childItem == 0))
+    if ( column > nColumns || !childItem || (!childItem->siblingItem && !childItem->childItem))
 	return;
 
     // make an array for qHeapSort()
@@ -1461,12 +1461,12 @@ void TQListViewItem::sortChildItems( int column, bool ascending )
     if ( ascending ) {
 	for( i = 0; i < nChildren - 1; i++ )
 	    siblings[i].item->siblingItem = siblings[i+1].item;
-	siblings[nChildren-1].item->siblingItem = 0;
+	siblings[nChildren-1].item->siblingItem = nullptr;
 	childItem = siblings[0].item;
     } else {
 	for( i = nChildren - 1; i > 0; i-- )
 	    siblings[i].item->siblingItem = siblings[i-1].item;
-	siblings[0].item->siblingItem = 0;
+	siblings[0].item->siblingItem = nullptr;
 	childItem = siblings[nChildren-1].item;
     }
     for ( i = 0; i < nChildren; i++ ) {
@@ -1569,7 +1569,7 @@ void TQListViewItem::setOpen( bool o )
 	    }
 	    l->configured = true;
 	    l->setup();
-	    l = (l == this) ? 0 : l->siblingItem;
+	    l = (l == this) ? nullptr : l->siblingItem;
 	    if ( !l && !s.isEmpty() )
 		l = s.pop();
 	}
@@ -1833,7 +1833,7 @@ int TQListViewItem::totalHeight() const
 	return that->ownHeight;
 
     TQListViewItem * child = that->childItem;
-    while ( child != 0 ) {
+    while ( child ) {
 	that->maybeTotalHeight += child->totalHeight();
 	child = child->siblingItem;
     }
@@ -1961,7 +1961,7 @@ void TQListViewItem::setPixmap( int column, const TQPixmap & pm )
 
     if ( pm.isNull() ) {
 	delete l->pm;
-	l->pm = 0;
+	l->pm = nullptr;
     } else {
 	if ( l->pm )
 	    *(l->pm) = pm;
@@ -2006,7 +2006,7 @@ const TQPixmap * TQListViewItem::pixmap( int column ) const
 	column--;
     }
 
-    return (l && l->pm) ? l->pm : 0;
+    return (l && l->pm) ? l->pm : nullptr;
 }
 
 
@@ -2059,7 +2059,7 @@ void TQListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg,
     TQString t = text( column );
 
     if ( columns ) {
-	TQListViewPrivate::ItemColumnInfo *ci = 0;
+	TQListViewPrivate::ItemColumnInfo *ci = nullptr;
 	// try until we have a column info....
 	while ( !ci ) {
 	    ci = (TQListViewPrivate::ItemColumnInfo*)columns;
@@ -2068,7 +2068,7 @@ void TQListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg,
 
 	    if ( !ci ) {
 		setText( column, t );
-		ci = 0;
+		ci = nullptr;
 	    }
 	}
 
@@ -2636,17 +2636,17 @@ TQListView::TQListView( TQWidget * parent, const char *name, WFlags f )
 void TQListView::init()
 {
     d = new TQListViewPrivate;
-    d->vci = 0;
+    d->vci = nullptr;
     d->timer = new TQTimer( this );
     d->levelWidth = 20;
-    d->r = 0;
+    d->r = nullptr;
     d->rootIsExpandable = 0;
     d->h = new TQHeader( this, "list view header" );
     d->h->installEventFilter( this );
-    d->focusItem = 0;
-    d->oldFocusItem = 0;
-    d->drawables = 0;
-    d->dirtyItems = 0;
+    d->focusItem = nullptr;
+    d->oldFocusItem = nullptr;
+    d->drawables = nullptr;
+    d->dirtyItems = nullptr;
     d->dirtyItemTimer = new TQTimer( this );
     d->visibleTimer = new TQTimer( this );
     d->renameTimer = new TQTimer( this );
@@ -2661,19 +2661,19 @@ void TQListView::init()
     d->buttonDown = false;
     d->ignoreDoubleClick = false;
     d->column.setAutoDelete( true );
-    d->iterators = 0;
-    d->scrollTimer = 0;
+    d->iterators = nullptr;
+    d->scrollTimer = nullptr;
     d->sortIndicator = false;
     d->clearing = false;
     d->minLeftBearing = fontMetrics().minLeftBearing();
     d->minRightBearing = fontMetrics().minRightBearing();
     d->ellipsisWidth = fontMetrics().width( "..." ) * 2;
-    d->highlighted = 0;
-    d->pressedItem = 0;
-    d->selectAnchor = 0;
+    d->highlighted = nullptr;
+    d->pressedItem = nullptr;
+    d->selectAnchor = nullptr;
     d->select = true;
     d->useDoubleBuffer = false;
-    d->startDragItem = 0;
+    d->startDragItem = nullptr;
     d->toolTips = true;
 #ifndef TQT_NO_TOOLTIP
     d->toolTip = new TQListViewToolTip( viewport(), this );
@@ -2816,28 +2816,28 @@ TQListView::~TQListView()
     if ( d->iterators ) {
 	TQListViewItemIterator *i = d->iterators->first();
 	while ( i ) {
-	    i->listView = 0;
+	    i->listView = nullptr;
 	    i = d->iterators->next();
 	}
 	delete d->iterators;
-	d->iterators = 0;
+	d->iterators = nullptr;
     }
 
-    d->focusItem = 0;
+    d->focusItem = nullptr;
     delete d->r;
-    d->r = 0;
+    d->r = nullptr;
     delete d->dirtyItems;
-    d->dirtyItems = 0;
+    d->dirtyItems = nullptr;
     delete d->drawables;
-    d->drawables = 0;
+    d->drawables = nullptr;
     delete d->vci;
-    d->vci = 0;
+    d->vci = nullptr;
 #ifndef TQT_NO_TOOLTIP
     delete d->toolTip;
-    d->toolTip = 0;
+    d->toolTip = nullptr;
 #endif
     delete d;
-    d = 0;
+    d = nullptr;
 }
 
 
@@ -2868,7 +2868,7 @@ void TQListView::drawContentsOffset( TQPainter * p, int ox, int oy,
 	TQRect br( cx - ox, cy - oy, cw, ch );
 	TQPtrDictIterator<void> it( *(d->dirtyItems) );
 	TQListViewItem * i;
-	while( (i = (TQListViewItem *)(it.currentKey())) != 0 ) {
+	while( (i = (TQListViewItem *)(it.currentKey())) ) {
 	    ++it;
 	    TQRect ir = itemRect( i ).intersect( viewport()->rect() );
 	    if ( ir.isEmpty() || br.contains( ir ) )
@@ -2881,7 +2881,7 @@ void TQListView::drawContentsOffset( TQPainter * p, int ox, int oy,
 	} else {
 	    // we're painting all items that need to be painted
 	    delete d->dirtyItems;
-	    d->dirtyItems = 0;
+	    d->dirtyItems = nullptr;
 	    d->dirtyItemTimer->stop();
 	}
     }
@@ -2895,7 +2895,7 @@ void TQListView::drawContentsOffset( TQPainter * p, int ox, int oy,
     int tx = -1;
     TQListViewPrivate::DrawableItem * current;
 
-    while ( (current = it.current()) != 0 ) {
+    while ( (current = it.current()) ) {
 	++it;
 	if ( !current->i->isVisible() )
 	    continue;
@@ -3233,7 +3233,7 @@ void TQListView::clear()
     if ( d->iterators ) {
 	TQListViewItemIterator *i = d->iterators->first();
 	while ( i ) {
-	    i->curr = 0;
+	    i->curr = nullptr;
 	    i = d->iterators->next();
 	}
     }
@@ -3241,14 +3241,14 @@ void TQListView::clear()
     if ( d->drawables )
 	d->drawables->clear();
     delete d->dirtyItems;
-    d->dirtyItems = 0;
+    d->dirtyItems = nullptr;
     d->dirtyItemTimer->stop();
 
-    d->focusItem = 0;
-    d->selectAnchor = 0;
-    d->pressedItem = 0;
-    d->highlighted = 0;
-    d->startDragItem = 0;
+    d->focusItem = nullptr;
+    d->selectAnchor = nullptr;
+    d->pressedItem = nullptr;
+    d->highlighted = nullptr;
+    d->startDragItem = nullptr;
 
     // if it's down its downness makes no sense, so undown it
     d->buttonDown = false;
@@ -3262,7 +3262,7 @@ void TQListView::clear()
     }
     resizeContents( d->h->sizeHint().width(), contentsHeight() );
     delete d->r;
-    d->r = 0;
+    d->r = nullptr;
     TQListViewPrivate::Root * r = new TQListViewPrivate::Root( this );
     r->is_root = true;
     d->r = r;
@@ -3355,7 +3355,7 @@ void TQListView::removeColumn( int index )
 	return;
 
     if ( d->vci ) {
-	TQListViewPrivate::ViewColumnInfo *vi = d->vci, *prev = 0, *next = 0;
+	TQListViewPrivate::ViewColumnInfo *vi = d->vci, *prev = nullptr, *next = nullptr;
 	for ( int i = 0; i < index; ++i ) {
 	    if ( vi ) {
 		prev = vi;
@@ -3366,7 +3366,7 @@ void TQListView::removeColumn( int index )
 	    next = vi->next;
 	    if ( prev )
 		prev->next = next;
-	    vi->next = 0;
+	    vi->next = nullptr;
 	    delete vi;
 	    if ( index == 0 )
 		d->vci = next;
@@ -3377,7 +3377,7 @@ void TQListView::removeColumn( int index )
     for ( ; it.current(); ++it ) {
 	TQListViewPrivate::ItemColumnInfo *ci = (TQListViewPrivate::ItemColumnInfo*)it.current()->columns;
 	if ( ci ) {
-	    TQListViewPrivate::ItemColumnInfo *prev = 0, *next = 0;
+	    TQListViewPrivate::ItemColumnInfo *prev = nullptr, *next = nullptr;
 	    for ( int i = 0; i < index; ++i ) {
 		if ( ci ) {
 		    prev = ci;
@@ -3388,7 +3388,7 @@ void TQListView::removeColumn( int index )
 		next = ci->next;
 		if ( prev )
 		    prev->next = next;
-		ci->next = 0;
+		ci->next = nullptr;
 		delete ci;
 		if ( index == 0 )
 		    it.current()->columns = next;
@@ -3625,7 +3625,7 @@ void TQListView::updateContents()
     }
     if ( d->drawables ) {
 	delete d->drawables;
-	d->drawables = 0;
+	d->drawables = nullptr;
     }
     viewport()->setUpdatesEnabled( false );
     updateGeometries();
@@ -3732,7 +3732,7 @@ void TQListView::updateDirtyItems()
     TQRect ir;
     TQPtrDictIterator<void> it( *(d->dirtyItems) );
     TQListViewItem * i;
-    while( (i = (TQListViewItem *)(it.currentKey())) != 0 ) {
+    while( (i = (TQListViewItem *)(it.currentKey())) ) {
 	++it;
 	ir = ir.unite( itemRect(i) );
     }
@@ -3896,7 +3896,7 @@ TQListView * TQListViewItem::listView() const
     while ( c && !c->is_root )
 	c = c->parentItem;
     if ( !c )
-	return 0;
+	return nullptr;
     return ((TQListViewPrivate::Root*)c)->theListView();
 }
 
@@ -3929,7 +3929,7 @@ int TQListViewItem::depth() const
 TQListViewItem * TQListViewItem::itemAbove()
 {
     if ( !parentItem )
-	return 0;
+	return nullptr;
 
     TQListViewItem * c = parentItem;
     if ( c->childItem != this ) {
@@ -3937,7 +3937,7 @@ TQListViewItem * TQListViewItem::itemAbove()
 	while( c && c->siblingItem != this )
 	    c = c->siblingItem;
 	if ( !c )
-	    return 0;
+	    return nullptr;
 	while( c->isOpen() && c->childItem ) {
 	    c = c->childItem;
 	    while( c->siblingItem )
@@ -3966,7 +3966,7 @@ TQListViewItem * TQListViewItem::itemAbove()
 
 TQListViewItem * TQListViewItem::itemBelow()
 {
-    TQListViewItem * c = 0;
+    TQListViewItem * c = nullptr;
     if ( isOpen() && childItem ) {
 	c = childItem;
     } else if ( siblingItem ) {
@@ -4021,7 +4021,7 @@ TQListViewItem* TQListViewItem::firstChild() const
 
 TQListViewItem* TQListViewItem::parent() const
 {
-    if ( !parentItem || parentItem->is_root ) return 0;
+    if ( !parentItem || parentItem->is_root ) return nullptr;
     return parentItem;
 }
 
@@ -4269,7 +4269,7 @@ void TQListView::contentsMousePressEventEx( TQMouseEvent * e )
 	    currentItem()->okRename( currentItem()->renameCol );
     }
 
-    d->startDragItem = 0;
+    d->startDragItem = nullptr;
     d->dragStartPos = e->pos();
     TQPoint vp = contentsToViewport( e->pos() );
 
@@ -4419,7 +4419,7 @@ void TQListView::contentsMousePressEventEx( TQMouseEvent * e )
 
     if ( i && !d->buttonDown &&
 	 vp.x() + contentsX() < itemMargin() + ( i->depth() + ( rootIsDecorated() ? 1 : 0 ) ) * treeStepSize() )
-	i = 0;
+	i = nullptr;
     d->pressedItem = i;
 
     int c = i ? d->h->mapToLogical( d->h->cellAt( vp.x() ) ) : -1;
@@ -4478,7 +4478,7 @@ void TQListView::contentsMouseReleaseEvent( TQMouseEvent * e )
 
 void TQListView::contentsMouseReleaseEventEx( TQMouseEvent * e )
 {
-    d->startDragItem = 0;
+    d->startDragItem = nullptr;
     bool emitClicked = !d->pressedItem || d->buttonDown;
     d->buttonDown = false;
     // delete and disconnect autoscroll timer, if we have one
@@ -4487,7 +4487,7 @@ void TQListView::contentsMouseReleaseEventEx( TQMouseEvent * e )
 		    this, TQ_SLOT(doAutoScroll()) );
 	d->scrollTimer->stop();
 	delete d->scrollTimer;
-	d->scrollTimer = 0;
+	d->scrollTimer = nullptr;
     }
 
     if ( !e )
@@ -4570,11 +4570,11 @@ void TQListView::contentsMouseReleaseEventEx( TQMouseEvent * e )
     int rootColumnPos = d->h->sectionPos( 0 );
     if ( i && vp.x() + contentsX() < rootColumnPos + itemMargin() + ( i->depth() + ( rootIsDecorated() ? 1 : 0 ) ) * treeStepSize()
          && vp.x() + contentsX() > rootColumnPos ) {
-        i = 0;
+        i = nullptr;
     }
     emitClicked = emitClicked && d->pressedItem == i;
-    d->pressedItem = 0;
-    d->highlighted = 0;
+    d->pressedItem = nullptr;
+    d->highlighted = nullptr;
 
     if ( emitClicked ) {
 	if ( !i || ( i && i->isEnabled() ) ) {
@@ -4588,7 +4588,7 @@ void TQListView::contentsMouseReleaseEventEx( TQMouseEvent * e )
 	    if ( !i ) {
  		if ( !(e->state() & ControlButton) )
 		    clearSelection();
-		emit rightButtonClicked( 0, viewport()->mapToGlobal( vp ), -1 );
+		emit rightButtonClicked( nullptr, viewport()->mapToGlobal( vp ), -1 );
 		return;
 	    }
 
@@ -4721,7 +4721,7 @@ void TQListView::contentsMouseMoveEvent( TQMouseEvent * e )
 			this, TQ_SLOT(doAutoScroll()) );
 	    d->scrollTimer->stop();
 	    delete d->scrollTimer;
-	    d->scrollTimer = 0;
+	    d->scrollTimer = nullptr;
 	}
 	// call this to select an item ( using the pos from the event )
 	doAutoScroll( vp );
@@ -4759,7 +4759,7 @@ void TQListView::doAutoScroll( const TQPoint &cursorPos )
     else if ( pos.y() < 0 )
 	g = contentsY();
 
-    TQListViewItem *c = d->focusItem, *old = 0;
+    TQListViewItem *c = d->focusItem, *old = nullptr;
     TQListViewItem *oldCurrent = c;
     if ( down ) {
 	int y = itemRect( d->focusItem ).y() + contentsY();
@@ -4956,14 +4956,14 @@ void TQListView::keyPressEvent( TQKeyEvent * e )
 	    if ( i2 )
 		i = i2;
 	    int left = visibleHeight();
-	    while( (i2 = i->itemBelow()) != 0 && left > i2->height() ) {
+	    while( (i2 = i->itemBelow()) && left > i2->height() ) {
 		left -= i2->height();
 		i = i2;
 	    }
 	} else {
 	    if ( !i2 ) {
 		// list is shorter than the view, goto last item
-		while( (i2 = i->itemBelow()) != 0 )
+		while( (i2 = i->itemBelow()) )
 		    i = i2;
 	    } else {
 		i = i2;
@@ -4978,7 +4978,7 @@ void TQListView::keyPressEvent( TQKeyEvent * e )
 	    if ( i2 )
 		i = i2;
 	    int left = visibleHeight();
-	    while( (i2 = i->itemAbove()) != 0 && left > i2->height() ) {
+	    while( (i2 = i->itemAbove()) && left > i2->height() ) {
 		left -= i2->height();
 		i = i2;
 	    }
@@ -5090,7 +5090,7 @@ void TQListView::keyPressEvent( TQKeyEvent * e )
 			    d->currentPrefixTime = now;
 			    i = keyItem;
 				// nonoptimal double-break...
-			    keyItem = 0;
+			    keyItem = nullptr;
 			    input.truncate( 0 );
 			    tryFirst = false;
 			}
@@ -5179,7 +5179,7 @@ void TQListView::keyPressEvent( TQKeyEvent * e )
 TQListViewItem * TQListView::itemAt( const TQPoint & viewPos ) const
 {
     if ( viewPos.x() > contentsWidth() - contentsX() ) {
-	return 0;
+	return nullptr;
     }
 
     if ( !d->drawables || d->drawables->isEmpty() ) {
@@ -5194,7 +5194,7 @@ TQListViewItem * TQListView::itemAt( const TQPoint & viewPos ) const
 			  ( c->i->parent() && !c->i->parent()->isVisible() ) ) )
 	c = d->drawables->next();
 
-    TQListViewItem *i = (c && c->y <= g) ? c->i : 0;
+    TQListViewItem *i = (c && c->y <= g) ? c->i : nullptr;
     return i;
 }
 
@@ -5445,10 +5445,10 @@ bool TQListView::isSelected( const TQListViewItem * i ) const
 TQListViewItem * TQListView::selectedItem() const
 {
     if ( d->selectionMode != Single )
-	return 0;
+	return nullptr;
     if ( d->focusItem && d->focusItem->isSelected() )
 	return d->focusItem;
-    return 0;
+    return nullptr;
 }
 
 
@@ -5946,7 +5946,7 @@ bool TQListView::allColumnsShowFocus() const
 TQListViewItem * TQListView::firstChild() const
 {
     if ( !d->r )
-	return 0;
+	return nullptr;
 
     d->r->enforceSortOrder();
     return d->r->childItem;
@@ -6005,9 +6005,9 @@ void TQListView::repaintItem( const TQListViewItem * item ) const
 struct TQCheckListItemPrivate
 {
     TQCheckListItemPrivate():
-	exclusive( 0 ),
+	exclusive( nullptr ),
 	currentState( TQCheckListItem::Off ),
-	statesDict( 0 ),
+	statesDict( nullptr ),
 	tristate( false ) {}
 
     TQCheckListItem *exclusive;
@@ -6235,11 +6235,11 @@ TQCheckListItem::~TQCheckListItem()
 	 && d->exclusive && d->exclusive->d
 	 && d->exclusive->d->exclusive == this )
 	d->exclusive->turnOffChild();
-    d->exclusive = 0; // so the children won't try to access us.
+    d->exclusive = nullptr; // so the children won't try to access us.
     if ( d->statesDict )
 	delete d->statesDict;
     delete d;
-    d = 0;
+    d = nullptr;
 }
 
 /*!
@@ -6395,7 +6395,7 @@ void TQCheckListItem::setState( ToggleState s, bool update, bool store)
 		d->exclusive->d->exclusive = this;
 	} else {
 	    if ( d->exclusive && d->exclusive->d->exclusive == this )
-		d->exclusive->d->exclusive = 0;
+		d->exclusive->d->exclusive = nullptr;
 	    setCurrentState( Off );
 	}
 	stateChange( state() );
@@ -6613,7 +6613,7 @@ void TQCheckListItem::updateController( bool update , bool store )
     if ( myType != CheckBoxController )
 	return;
 
-    TQCheckListItem *controller = 0;
+    TQCheckListItem *controller = nullptr;
     // checks if this CheckBoxController has another CheckBoxController as parent
     if ( parent() && parent()->rtti() == 1
 	 && ((TQCheckListItem*)parent())->type() == CheckBoxController )
@@ -6910,7 +6910,7 @@ void TQListView::setOpen( TQListViewItem * item, bool open )
 	(open && !item->childCount() && !item->isExpandable()) )
 	return;
 
-    TQListViewItem* nextParent = 0;
+    TQListViewItem* nextParent = nullptr;
     if ( open )
 	nextParent = item->itemBelow();
 
@@ -7130,7 +7130,7 @@ void TQListView::showEvent( TQShowEvent * )
     if ( d->drawables )
 	d->drawables->clear();
     delete d->dirtyItems;
-    d->dirtyItems = 0;
+    d->dirtyItems = nullptr;
     d->dirtyItemTimer->stop();
     d->fullRepaintOnComlumnChange = true;
 
@@ -7157,7 +7157,7 @@ int TQListViewItem::itemPos() const
     }
 
     int a = 0;
-    TQListViewItem * p = 0;
+    TQListViewItem * p = nullptr;
     while( s.count() ) {
 	i = s.pop();
 	if ( p ) {
@@ -7269,7 +7269,7 @@ void TQListView::contentsDragLeaveEvent( TQDragLeaveEvent * )
 	d->focusItem->dragLeft();
 
     setCurrentItem( d->oldFocusItem );
-    d->oldFocusItem = 0;
+    d->oldFocusItem = nullptr;
 }
 
 /*! \reimp */
@@ -7301,7 +7301,7 @@ void TQListView::contentsDropEvent( TQDropEvent *e )
 
 TQDragObject *TQListView::dragObject()
 {
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -7313,7 +7313,7 @@ void TQListView::startDrag()
     if ( !d->startDragItem )
 	return;
 
-    d->startDragItem = 0;
+    d->startDragItem = nullptr;
     d->buttonDown = false;
 
     TQDragObject *drag = dragObject();
@@ -7443,7 +7443,7 @@ bool TQListView::isRenaming() const
 */
 
 TQListViewItemIterator::TQListViewItemIterator()
-    :  curr( 0 ), listView( 0 )
+    :  curr( nullptr ), listView( nullptr )
 {
     init( 0 );
 }
@@ -7454,7 +7454,7 @@ TQListViewItemIterator::TQListViewItemIterator()
 */
 
 TQListViewItemIterator::TQListViewItemIterator( TQListViewItem *item )
-    :  curr( item ), listView( 0 )
+    :  curr( item ), listView( nullptr )
 {
     init( 0 );
 
@@ -7475,7 +7475,7 @@ TQListViewItemIterator::TQListViewItemIterator( TQListViewItem *item )
 */
 
 TQListViewItemIterator::TQListViewItemIterator( TQListViewItem *item, int iteratorFlags )
-    :  curr( item ), listView( 0 )
+    :  curr( item ), listView( nullptr )
 {
     init( iteratorFlags );
 
@@ -7550,7 +7550,7 @@ TQListViewItemIterator &TQListViewItemIterator::operator=( const TQListViewItemI
 	if ( listView->d->iterators->removeRef( this ) ) {
 	    if ( listView->d->iterators->count() == 0 ) {
 		delete listView->d->iterators;
-		listView->d->iterators = 0;
+		listView->d->iterators = nullptr;
 	    }
 	}
     }
@@ -7580,7 +7580,7 @@ TQListViewItemIterator::~TQListViewItemIterator()
 	if ( listView->d->iterators->removeRef( this ) ) {
 	    if ( listView->d->iterators->count() == 0 ) {
 		delete listView->d->iterators;
-		listView->d->iterators = 0;
+		listView->d->iterators = nullptr;
 	    }
 	}
     }
@@ -7590,7 +7590,7 @@ TQListViewItemIterator::~TQListViewItemIterator()
 	qt_iteratorprivate_dict->remove( this );
 	if ( qt_iteratorprivate_dict->isEmpty() ) {
 	    delete qt_iteratorprivate_dict;
-	    qt_iteratorprivate_dict = 0;
+	    qt_iteratorprivate_dict = nullptr;
 	}
     }
 }
@@ -7609,9 +7609,9 @@ TQListViewItemIterator &TQListViewItemIterator::operator++()
 
 	TQListViewItem *item = curr->firstChild();
 	if ( !item ) {
-	    while ( (item = curr->nextSibling()) == 0  ) {
+	    while ( !(item = curr->nextSibling())  ) {
 		curr = curr->parent();
-		if ( curr == 0 )
+		if ( !curr )
 		    break;
 	    }
 	}
@@ -7684,7 +7684,7 @@ TQListViewItemIterator &TQListViewItemIterator::operator--()
 		return *this;
 	    } else {
 		//we are already the first child of the list view, so it's over
-		curr = 0;
+		curr = nullptr;
 		return *this;
 	    }
 	} else
@@ -7758,7 +7758,7 @@ TQListViewItemIterator &TQListViewItemIterator::operator-=( int j )
 
 TQListViewItem* TQListViewItemIterator::operator*()
 {
-    if ( curr != 0 && !matchesFlags( curr ) )
+    if ( curr && !matchesFlags( curr ) )
 	tqWarning( "TQListViewItemIterator::operator*() curr out of sync" );
     return curr;
 }
@@ -7769,7 +7769,7 @@ TQListViewItem* TQListViewItemIterator::operator*()
 
 TQListViewItem *TQListViewItemIterator::current() const
 {
-    if ( curr != 0 && !matchesFlags( curr ) )
+    if ( curr && !matchesFlags( curr ) )
 	tqWarning( "TQListViewItemIterator::current() curr out of sync" );
     return curr;
 }
@@ -7777,7 +7777,7 @@ TQListViewItem *TQListViewItemIterator::current() const
 TQListViewItemIteratorPrivate* TQListViewItemIterator::d() const
 {
     return qt_iteratorprivate_dict ?
-	qt_iteratorprivate_dict->find( (void *)this ) : 0;
+	qt_iteratorprivate_dict->find( (void *)this ) : nullptr;
 }
 
 void TQListViewItemIterator::init( int iteratorFlags )
@@ -7829,7 +7829,7 @@ void TQListViewItemIterator::currentRemoved()
 	      listView->firstChild() != curr )
 	curr = listView->firstChild();
     else
-	curr = 0;
+	curr = nullptr;
 }
 
 /*
@@ -8038,7 +8038,7 @@ bool TQListView::selectRange( TQListViewItem *newItem, TQListViewItem *oldItem,
     int  anchorPos = anchorItem ? anchorItem->itemPos() : 0,
 	 oldPos    = oldItem ? oldItem->itemPos() : 0,
 	 newPos    = newItem->itemPos();
-    TQListViewItem *top=0, *bottom=0;
+    TQListViewItem *top=nullptr, *bottom=nullptr;
     if ( anchorPos > newPos ) {
 	top = newItem;
 	bottom = anchorItem;
@@ -8090,7 +8090,7 @@ TQListViewItem *TQListView::findItem( const TQString& text, int column,
 				    ComparisonFlags compare ) const
 {
     if (text.isEmpty() && !(compare & ExactMatch))
-	return 0;
+	return nullptr;
 
     if ( compare == CaseSensitive || compare == 0 )
 	compare |= ExactMatch;
@@ -8101,11 +8101,11 @@ TQListViewItem *TQListView::findItem( const TQString& text, int column,
 	comtxt = comtxt.lower();
 
     TQListViewItemIterator it( d->focusItem ? d->focusItem : firstChild() );
-    TQListViewItem *sentinel = 0;
+    TQListViewItem *sentinel = nullptr;
     TQListViewItem *item;
-    TQListViewItem *beginsWithItem = 0;
-    TQListViewItem *endsWithItem = 0;
-    TQListViewItem *containsItem = 0;
+    TQListViewItem *beginsWithItem = nullptr;
+    TQListViewItem *endsWithItem = nullptr;
+    TQListViewItem *containsItem = nullptr;
 
     for ( int pass = 0; pass < 2; pass++ ) {
 	while ( (item = it.current()) != sentinel ) {
@@ -8135,7 +8135,7 @@ TQListViewItem *TQListView::findItem( const TQString& text, int column,
 	return endsWithItem;
     else if ( containsItem )
 	return containsItem;
-    return 0;
+    return nullptr;
 }
 
 /*! \reimp */
diff --git a/src/widgets/tqlistview.h b/src/widgets/tqlistview.h
index 1985b4d3f..9d9ded709 100644
--- a/src/widgets/tqlistview.h
+++ b/src/widgets/tqlistview.h
@@ -257,7 +257,7 @@ class TQ_EXPORT TQListView: public TQScrollView
     TQ_PROPERTY( RenameAction defaultRenameAction READ defaultRenameAction WRITE setDefaultRenameAction )
 
 public:
-    TQListView( TQWidget* parent=0, const char* name=0, WFlags f = 0 );
+    TQListView( TQWidget* parent=nullptr, const char* name=nullptr, WFlags f = 0 );
     ~TQListView();
 
     int treeStepSize() const;
diff --git a/src/widgets/tqmainwindow.cpp b/src/widgets/tqmainwindow.cpp
index 2eebbe782..6978d9c92 100644
--- a/src/widgets/tqmainwindow.cpp
+++ b/src/widgets/tqmainwindow.cpp
@@ -73,7 +73,7 @@ class TQMainWindowPrivate
 {
 public:
     TQMainWindowPrivate()
-	:  mb(0), sb(0), ttg(0), mc(0), tll(0), mwl(0), ubp( false ), utl( false ),
+	:  mb(nullptr), sb(nullptr), ttg(nullptr), mc(nullptr), tll(nullptr), mwl(nullptr), ubp( false ), utl( false ),
 	   justify( false ), movable( true ), opaque( false ), dockMenu( true )
     {
 	docks.insert( TQt::DockTop, true );
@@ -131,7 +131,7 @@ class TQMainWindowLayout : public TQLayout
     TQ_OBJECT
 
 public:
-    TQMainWindowLayout( TQMainWindow *mw, TQLayout* parent = 0 );
+    TQMainWindowLayout( TQMainWindow *mw, TQLayout* parent = nullptr );
     ~TQMainWindowLayout() {}
 
     void addItem( TQLayoutItem * );
@@ -208,7 +208,7 @@ TQSize TQMainWindowLayout::minimumSize() const
 }
 
 TQMainWindowLayout::TQMainWindowLayout( TQMainWindow *mw, TQLayout* parent )
-    : TQLayout( parent ), left( 0 ), right( 0 ), central( 0 )
+    : TQLayout( parent ), left( nullptr ), right( nullptr ), central( nullptr )
 {
     mainWindow = mw;
 }
@@ -277,7 +277,7 @@ void TQMainWindowLayout::addItem( TQLayoutItem * /* item */ )
 
 TQLayoutIterator TQMainWindowLayout::iterator()
 {
-    return 0;
+    return nullptr;
 }
 
 
@@ -956,7 +956,7 @@ TQMenuBar * TQMainWindow::menuBar() const
 	return d->mb;
 
     TQObjectList * l
-	= ((TQObject*)this)->queryList( "TQMenuBar", 0, false, false );
+	= ((TQObject*)this)->queryList( "TQMenuBar", nullptr, false, false );
     TQMenuBar * b;
     if ( l && l->count() ) {
 	b = (TQMenuBar *)l->first();
@@ -1019,7 +1019,7 @@ TQStatusBar * TQMainWindow::statusBar() const
 	return d->sb;
 
     TQObjectList * l
-	= ((TQObject*)this)->queryList( "TQStatusBar", 0, false, false );
+	= ((TQObject*)this)->queryList( "TQStatusBar", nullptr, false, false );
     TQStatusBar * s;
     if ( l && l->count() ) {
 	s = (TQStatusBar *)l->first();
@@ -1430,7 +1430,7 @@ void TQMainWindow::setUpLayout()
     if ( !d->mb ) {
 	// slightly evil hack here.  reconsider this
 	TQObjectList * l
-	    = ((TQObject*)this)->queryList( "TQMenuBar", 0, false, false );
+	    = ((TQObject*)this)->queryList( "TQMenuBar", nullptr, false, false );
 	if ( l && l->count() )
 	    d->mb = menuBar();
 	delete l;
@@ -1439,7 +1439,7 @@ void TQMainWindow::setUpLayout()
     if ( !d->sb ) {
 	// as above.
 	TQObjectList * l
-	    = ((TQObject*)this)->queryList( "TQStatusBar", 0, false, false );
+	    = ((TQObject*)this)->queryList( "TQStatusBar", nullptr, false, false );
 	if ( l && l->count() )
 	    d->sb = statusBar();
 	delete l;
@@ -1449,7 +1449,7 @@ void TQMainWindow::setUpLayout()
         d->tll = new TQBoxLayout( this, TQBoxLayout::Down );
         d->tll->setResizeMode( minimumSize().isNull() ? TQLayout::Minimum : TQLayout::FreeResize );
     } else {
-        d->tll->setMenuBar( 0 );
+        d->tll->setMenuBar( nullptr );
         TQLayoutIterator it = d->tll->iterator();
         TQLayoutItem *item;
         while ( (item = it.takeCurrent()) )
@@ -1642,19 +1642,19 @@ bool TQMainWindow::eventFilter( TQObject* o, TQEvent *e )
 void TQMainWindow::childEvent( TQChildEvent* e)
 {
     if ( e->type() == TQEvent::ChildRemoved ) {
-	if ( e->child() == 0 ||
+	if ( !e->child() ||
 	     !e->child()->isWidgetType() ||
 	     ((TQWidget*)e->child())->testWFlags( WType_TopLevel ) ) {
 	    // nothing
 	} else if ( e->child() == d->sb ) {
-	    d->sb = 0;
+	    d->sb = nullptr;
 	    triggerLayout();
 	} else if ( e->child() == d->mb ) {
-	    d->mb = 0;
+	    d->mb = nullptr;
 	    triggerLayout();
 	} else if ( e->child() == d->mc ) {
-	    d->mc = 0;
-	    d->mwl->setCentralWidget( 0 );
+	    d->mc = nullptr;
+	    d->mwl->setCentralWidget( nullptr );
 	    triggerLayout();
 	} else if ( ::tqt_cast<TQDockWindow*>(e->child()) ) {
 	    removeDockWindow( (TQDockWindow *)(e->child()) );
@@ -1682,8 +1682,8 @@ bool TQMainWindow::event( TQEvent * e )
 {
     if ( e->type() == TQEvent::ChildRemoved && ( (TQChildEvent*)e )->child() == d->mc ) {
 	d->mc->removeEventFilter( this );
-	d->mc = 0;
-	d->mwl->setCentralWidget( 0 );
+	d->mc = nullptr;
+	d->mwl->setCentralWidget( nullptr );
     }
 
     return TQWidget::event( e );
@@ -2156,7 +2156,7 @@ TQPopupMenu *TQMainWindow::createDockWindowMenu( DockWindows dockWindows ) const
     TQObjectList *l = queryList( "TQDockWindow" );
 
     if ( !l || l->isEmpty() )
-	return 0;
+	return nullptr;
 
     delete l;
 
@@ -2194,7 +2194,7 @@ void TQMainWindow::menuAboutToShow()
     bool empty = true;
     if ( l && !l->isEmpty() ) {
 
-	TQObject *o = 0;
+	TQObject *o = nullptr;
 	if ( dockWindows == AllDockWindows || dockWindows == NoToolBars ) {
 	    for ( o = l->first(); o; o = l->next() ) {
 		TQDockWindow *dw = (TQDockWindow*)o;
@@ -2303,7 +2303,7 @@ TQDockArea *TQMainWindow::dockingArea( const TQPoint &p )
 	return d->topDock;
     if ( p.y() >= height() - sh - 100 && p.y() <= height() + 5 && p.x() >= 0 && p.x() <= width() )
 	return d->bottomDock;
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -2469,7 +2469,7 @@ static void saveDockArea( TQTextStream &ts, TQDockArea *a )
 TQTextStream &operator<<( TQTextStream &ts, const TQMainWindow &mainWindow )
 {
     TQPtrList<TQDockWindow> l = mainWindow.dockWindows( TQt::DockMinimized );
-    TQDockWindow *dw = 0;
+    TQDockWindow *dw = nullptr;
     for ( dw = l.first(); dw; dw = l.next() ) {
 	ts << dw->caption();
 	ts << ",";
@@ -2586,11 +2586,11 @@ TQTextStream &operator>>( TQTextStream &ts, TQMainWindow &mainWindow )
 
     TQString s = ts.readLine();
     TQStringList names = TQStringList::split( ',', s );
-    loadDockArea( names, 0, TQt::DockMinimized, l, &mainWindow, ts );
+    loadDockArea( names, nullptr, TQt::DockMinimized, l, &mainWindow, ts );
 
     s = ts.readLine();
     names = TQStringList::split( ',', s );
-    loadDockArea( names, 0, TQt::DockTornOff, l, &mainWindow, ts );
+    loadDockArea( names, nullptr, TQt::DockTornOff, l, &mainWindow, ts );
 
     int i = 0;
     TQDockArea *areas[] = { mainWindow.topDock(), mainWindow.bottomDock(), mainWindow.rightDock(), mainWindow.leftDock() };
diff --git a/src/widgets/tqmainwindow.h b/src/widgets/tqmainwindow.h
index 121392b0f..8d7386f6c 100644
--- a/src/widgets/tqmainwindow.h
+++ b/src/widgets/tqmainwindow.h
@@ -67,7 +67,7 @@ class TQ_EXPORT TQMainWindow: public TQWidget
     TQ_PROPERTY( bool opaqueMoving READ opaqueMoving WRITE setOpaqueMoving )
 
 public:
-    TQMainWindow( TQWidget* parent=0, const char* name=0, WFlags f = WType_TopLevel );
+    TQMainWindow( TQWidget* parent=nullptr, const char* name=nullptr, WFlags f = WType_TopLevel );
     ~TQMainWindow();
 
 #ifndef TQT_NO_MENUBAR
diff --git a/src/widgets/tqmenubar.cpp b/src/widgets/tqmenubar.cpp
index aa1f9c368..445720c28 100644
--- a/src/widgets/tqmenubar.cpp
+++ b/src/widgets/tqmenubar.cpp
@@ -272,9 +272,9 @@ TQMenuBar::TQMenuBar( TQWidget *parent, const char *name )
 #endif
     isMenuBar = true;
 #ifndef TQT_NO_ACCEL
-    autoaccel = 0;
+    autoaccel = nullptr;
 #endif
-    irects    = 0;
+    irects    = nullptr;
     rightSide = 0; // Right of here is rigth-aligned content
     mseparator = 0;
     waitforalt = 0;
@@ -603,7 +603,7 @@ bool TQMenuBar::eventFilter( TQObject *object, TQEvent *event )
 #endif
     // look for Alt release
     if ( ((TQWidget*)object)->focusWidget() == object ||
-	 (object->parent() == 0 && ((TQWidget*)object)->focusWidget() == 0) ) {
+	 (!object->parent() && !((TQWidget*)object)->focusWidget()) ) {
 	if ( waitforalt && event->type() == TQEvent::KeyRelease &&
 	    ( ke->key() == Key_Alt || ke->key() == Key_Meta )
 #if defined(TQ_WS_X11)
@@ -683,7 +683,7 @@ void TQMenuBar::accelActivated( int id )
 #ifndef TQT_NO_ACCEL
 void TQMenuBar::accelDestroyed()
 {
-    autoaccel = 0;				// don't delete it twice!
+    autoaccel = nullptr;				// don't delete it twice!
 }
 #endif
 
@@ -766,7 +766,7 @@ void TQMenuBar::openActPopup()
     if ( popup->isVisible() )
 	return;
 
-    Q_ASSERT( popup->parentMenu == 0 );
+    Q_ASSERT( !popup->parentMenu );
     popup->parentMenu = this;			// set parent menu
 
     popup->snapToMouse = false;
@@ -905,7 +905,7 @@ int TQMenuBar::calculateRects( int max_width )
 	delete [] irects;
 	int i = mitems->count();
 	if ( i == 0 ) {
-	    irects = 0;
+	    irects = nullptr;
 	} else {
 	    irects = new TQRect[ i ];
 	    TQ_CHECK_PTR( irects );
@@ -1303,7 +1303,7 @@ void TQMenuBar::keyPressEvent( TQKeyEvent *e )
     if ( actItem < 0 )
 	return;
 
-    TQMenuItem  *mi = 0;
+    TQMenuItem  *mi = nullptr;
     int dx = 0;
 
     if ( e->state() & TQt::ControlButton &&
@@ -1358,9 +1358,9 @@ void TQMenuBar::keyPressEvent( TQKeyEvent *e )
 	TQChar c = e->text()[0].upper();
 
 	TQMenuItemListIt it(*mitems);
-	TQMenuItem* first = 0;
-	TQMenuItem* currentSelected = 0;
-	TQMenuItem* firstAfterCurrent = 0;
+	TQMenuItem* first = nullptr;
+	TQMenuItem* currentSelected = nullptr;
+	TQMenuItem* firstAfterCurrent = nullptr;
 
 	TQMenuItem *m;
 	int indx = 0;
@@ -1427,7 +1427,7 @@ void TQMenuBar::setActiveItem( int i, bool show, bool activate_first_item )
     if ( i == actItem && (uint)show == popupvisible )
 	return;
 
-    TQMenuItem* mi = 0;
+    TQMenuItem* mi = nullptr;
     if ( i >= 0 )
 	mi = mitems->at( i );
     if ( mi && !mi->isEnabledAndVisible() )
@@ -1519,7 +1519,7 @@ void TQMenuBar::setAltMode( bool enable )
 	int actId = idAt( actItem );
 	actItem = -1;
 	updateItem( actId );
-	TQMenuData::d->aWidget = 0;
+	TQMenuData::d->aWidget = nullptr;
     }
 }
 
@@ -1531,7 +1531,7 @@ void TQMenuBar::setAltMode( bool enable )
 void TQMenuBar::setupAccelerators()
 {
     delete autoaccel;
-    autoaccel = 0;
+    autoaccel = nullptr;
 
     TQMenuItemListIt it(*mitems);
     TQMenuItem *mi;
diff --git a/src/widgets/tqmenubar.h b/src/widgets/tqmenubar.h
index 5d988fe01..fe6f09131 100644
--- a/src/widgets/tqmenubar.h
+++ b/src/widgets/tqmenubar.h
@@ -59,7 +59,7 @@ class TQ_EXPORT TQMenuBar : public TQFrame, public TQMenuData
     TQ_PROPERTY( bool defaultUp READ isDefaultUp WRITE setDefaultUp )
 
 public:
-    TQMenuBar( TQWidget* parent=0, const char* name=0 );
+    TQMenuBar( TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQMenuBar();
 
     void	updateItem( int id );
diff --git a/src/widgets/tqmenudata.cpp b/src/widgets/tqmenudata.cpp
index 6cc3c554b..c61b509db 100644
--- a/src/widgets/tqmenudata.cpp
+++ b/src/widgets/tqmenudata.cpp
@@ -109,9 +109,9 @@ TQMenuDataData::TQMenuDataData()
  *****************************************************************************/
 
 TQMenuItem::TQMenuItem()
-    :ident( -1 ), iconset_data( 0 ), pixmap_data( 0 ), popup_menu( 0 ),
-     widget_item( 0 ), signal_data( 0 ), is_separator( false ), is_enabled( true ),
-     is_checked( false ), is_dirty( true ), is_visible( true ), d( 0)
+    :ident( -1 ), iconset_data( nullptr ), pixmap_data( nullptr ), popup_menu( nullptr ),
+     widget_item( nullptr ), signal_data( nullptr ), is_separator( false ), is_enabled( true ),
+     is_checked( false ), is_dirty( true ), is_visible( true ), d( nullptr)
 {}
 
 TQMenuItem::~TQMenuItem()
@@ -138,7 +138,7 @@ TQMenuItemData* TQMenuItem::extra()
 
 TQCustomMenuItem *TQMenuItem::custom() const
 {
-    if ( !d ) return 0;
+    if ( !d ) return nullptr;
     return d->custom_item;
 }
 
@@ -160,7 +160,7 @@ TQMenuData::TQMenuData()
     mitems = new TQMenuItemList;			// create list of menu items
     TQ_CHECK_PTR( mitems );
     mitems->setAutoDelete( true );
-    parentMenu = 0;				// assume top level
+    parentMenu = nullptr;				// assume top level
     isPopupMenu = false;
     isMenuBar = false;
     mouseBtDn = false;
@@ -263,15 +263,15 @@ int TQMenuData::insertAny( const TQString *text, const TQPixmap *pixmap,
     TQMenuItem *mi = new TQMenuItem;
     TQ_CHECK_PTR( mi );
     mi->ident = id;
-    if ( widget != 0 ) {
+    if ( widget ) {
 	mi->widget_item = widget;
 	mi->is_separator = !widget->isFocusEnabled();
-    } else if ( custom != 0 ) {
+    } else if ( custom ) {
 	mi->extra()->custom_item = custom;
 	mi->is_separator = custom->isSeparator();
 	if ( iconset && !iconset->isNull() )
 	    mi->iconset_data = new TQIconSet( *iconset );
-    } else if ( text == 0 && pixmap == 0 && popup == 0 ) {
+    } else if ( !text && !pixmap && !popup ) {
 	mi->is_separator = true;		// separator
     } else {
 #ifndef Q_OS_TEMP
@@ -331,7 +331,7 @@ void TQMenuData::removePopup( TQPopupMenu *popup )
     int index = 0;
     TQMenuItem *mi = findPopup( popup, &index );
     if ( mi ) {
-	mi->popup_menu = 0;
+	mi->popup_menu = nullptr;
 	removeItemAt( index );
     }
 }
@@ -422,7 +422,7 @@ int TQMenuData::insertItem( const TQString &text,
 			   const TQObject *receiver, const char* member,
 			   const TQKeySequence& accel, int id, int index )
 {
-    int actualID = insertAny( &text, 0, 0, 0, id, index );
+    int actualID = insertAny( &text, nullptr, nullptr, nullptr, id, index );
     connectItem( actualID, receiver, member );
 #ifndef TQT_NO_ACCEL
     if ( accel )
@@ -450,7 +450,7 @@ int TQMenuData::insertItem( const TQIconSet& icon,
 			   const TQObject *receiver, const char* member,
 			   const TQKeySequence& accel, int id, int index )
 {
-    int actualID = insertAny( &text, 0, 0, &icon, id, index );
+    int actualID = insertAny( &text, nullptr, nullptr, &icon, id, index );
     connectItem( actualID, receiver, member );
 #ifndef TQT_NO_ACCEL
     if ( accel )
@@ -479,7 +479,7 @@ int TQMenuData::insertItem( const TQPixmap &pixmap,
 			   const TQObject *receiver, const char* member,
 			   const TQKeySequence& accel, int id, int index )
 {
-    int actualID = insertAny( 0, &pixmap, 0, 0, id, index );
+    int actualID = insertAny( nullptr, &pixmap, nullptr, nullptr, id, index );
     connectItem( actualID, receiver, member );
 #ifndef TQT_NO_ACCEL
     if ( accel )
@@ -512,7 +512,7 @@ int TQMenuData::insertItem( const TQIconSet& icon,
 			   const TQObject *receiver, const char* member,
 			   const TQKeySequence& accel, int id, int index )
 {
-    int actualID = insertAny( 0, &pixmap, 0, &icon, id, index );
+    int actualID = insertAny( nullptr, &pixmap, nullptr, &icon, id, index );
     connectItem( actualID, receiver, member );
 #ifndef TQT_NO_ACCEL
     if ( accel )
@@ -536,7 +536,7 @@ int TQMenuData::insertItem( const TQIconSet& icon,
 
 int TQMenuData::insertItem( const TQString &text, int id, int index )
 {
-    return insertAny( &text, 0, 0, 0, id, index );
+    return insertAny( &text, nullptr, nullptr, nullptr, id, index );
 }
 
 /*!
@@ -554,7 +554,7 @@ int TQMenuData::insertItem( const TQString &text, int id, int index )
 int TQMenuData::insertItem( const TQIconSet& icon,
 			   const TQString &text, int id, int index )
 {
-    return insertAny( &text, 0, 0, &icon, id, index );
+    return insertAny( &text, nullptr, nullptr, &icon, id, index );
 }
 
 /*!
@@ -575,7 +575,7 @@ int TQMenuData::insertItem( const TQIconSet& icon,
 int TQMenuData::insertItem( const TQString &text, TQPopupMenu *popup,
 			   int id, int index )
 {
-    return insertAny( &text, 0, popup, 0, id, index );
+    return insertAny( &text, nullptr, popup, nullptr, id, index );
 }
 
 /*!
@@ -598,7 +598,7 @@ int TQMenuData::insertItem( const TQIconSet& icon,
 			   const TQString &text, TQPopupMenu *popup,
 			   int id, int index )
 {
-    return insertAny( &text, 0, popup, &icon, id, index );
+    return insertAny( &text, nullptr, popup, &icon, id, index );
 }
 
 /*!
@@ -617,7 +617,7 @@ int TQMenuData::insertItem( const TQIconSet& icon,
 
 int TQMenuData::insertItem( const TQPixmap &pixmap, int id, int index )
 {
-    return insertAny( 0, &pixmap, 0, 0, id, index );
+    return insertAny( nullptr, &pixmap, nullptr, nullptr, id, index );
 }
 
 /*!
@@ -635,7 +635,7 @@ int TQMenuData::insertItem( const TQPixmap &pixmap, int id, int index )
 int TQMenuData::insertItem( const TQIconSet& icon,
 			   const TQPixmap &pixmap, int id, int index )
 {
-    return insertAny( 0, &pixmap, 0, &icon, id, index );
+    return insertAny( nullptr, &pixmap, nullptr, &icon, id, index );
 }
 
 
@@ -657,7 +657,7 @@ int TQMenuData::insertItem( const TQIconSet& icon,
 int TQMenuData::insertItem( const TQPixmap &pixmap, TQPopupMenu *popup,
 			   int id, int index )
 {
-    return insertAny( 0, &pixmap, popup, 0, id, index );
+    return insertAny( nullptr, &pixmap, popup, nullptr, id, index );
 }
 
 
@@ -681,7 +681,7 @@ int TQMenuData::insertItem( const TQIconSet& icon,
 			   const TQPixmap &pixmap, TQPopupMenu *popup,
 			   int id, int index )
 {
-    return insertAny( 0, &pixmap, popup, &icon, id, index );
+    return insertAny( nullptr, &pixmap, popup, &icon, id, index );
 }
 
 
@@ -727,7 +727,7 @@ int TQMenuData::insertItem( const TQIconSet& icon,
 */
 int TQMenuData::insertItem( TQWidget* widget, int id, int index )
 {
-    return insertAny( 0, 0, 0, 0, id, index, widget );
+    return insertAny( nullptr, nullptr, nullptr, nullptr, id, index, widget );
 }
 
 
@@ -748,7 +748,7 @@ int TQMenuData::insertItem( TQWidget* widget, int id, int index )
 */
 int TQMenuData::insertItem( TQCustomMenuItem* custom, int id, int index )
 {
-    return insertAny( 0, 0, 0, 0, id, index, 0, custom );
+    return insertAny( nullptr, nullptr, nullptr, nullptr, id, index, nullptr, custom );
 }
 
 /*!
@@ -768,7 +768,7 @@ int TQMenuData::insertItem( TQCustomMenuItem* custom, int id, int index )
 */
 int TQMenuData::insertItem( const TQIconSet& icon, TQCustomMenuItem* custom, int id, int index )
 {
-    return insertAny( 0, 0, 0, &icon, id, index, 0, custom );
+    return insertAny( nullptr, nullptr, nullptr, &icon, id, index, nullptr, custom );
 }
 
 
@@ -785,7 +785,7 @@ int TQMenuData::insertItem( const TQIconSet& icon, TQCustomMenuItem* custom, int
 */
 int TQMenuData::insertSeparator( int index )
 {
-    return insertAny( 0, 0, 0, 0, -1, index );
+    return insertAny( nullptr, nullptr, nullptr, nullptr, -1, index );
 }
 
 /*!
@@ -943,7 +943,7 @@ void TQMenuData::setAccel( const TQKeySequence& key, int id )
 TQIconSet* TQMenuData::iconSet( int id ) const
 {
     TQMenuItem *mi = findItem( id );
-    return mi ? mi->iconSet() : 0;
+    return mi ? mi->iconSet() : nullptr;
 }
 
 /*!
@@ -969,7 +969,7 @@ TQString TQMenuData::text( int id ) const
 TQPixmap *TQMenuData::pixmap( int id ) const
 {
     TQMenuItem *mi = findItem( id );
-    return mi ? mi->pixmap() : 0;
+    return mi ? mi->pixmap() : nullptr;
 }
 
 /*!
@@ -1016,7 +1016,7 @@ void TQMenuData::changeItem( int id, const TQString &text )
 	    return;
 	if ( mi->pixmap_data ) {		// delete pixmap
 	    delete mi->pixmap_data;
-	    mi->pixmap_data = 0;
+	    mi->pixmap_data = nullptr;
 	}
 	mi->text_data = text;
 #ifndef TQT_NO_ACCEL
@@ -1042,7 +1042,7 @@ void TQMenuData::changeItem( int id, const TQPixmap &pixmap )
     TQMenuItem *mi = findItem( id, &parent );
     if ( mi ) {					// item found
 	TQPixmap *i = mi->pixmap_data;
-	bool fast_refresh = i != 0 &&
+	bool fast_refresh = i &&
 	    i->width() == pixmap.width() &&
 	    i->height() == pixmap.height() &&
 	    !mi->text();
@@ -1051,7 +1051,7 @@ void TQMenuData::changeItem( int id, const TQPixmap &pixmap )
 	if ( !pixmap.isNull() )
 	    mi->pixmap_data = new TQPixmap( pixmap );
 	else
-	    mi->pixmap_data = 0;
+	    mi->pixmap_data = nullptr;
 	delete i; // old mi->pixmap_data, could be &pixmap
 	if ( fast_refresh )
 	    parent->updateItem( id );
@@ -1104,11 +1104,11 @@ void TQMenuData::changeItemIconSet( int id, const TQIconSet &icon )
     TQMenuItem *mi = findItem( id, &parent );
     if ( mi ) {					// item found
 	TQIconSet *i = mi->iconset_data;
-	bool fast_refresh = i != 0;
+	bool fast_refresh = i;
 	if ( !icon.isNull() )
 	    mi->iconset_data = new TQIconSet( icon );
 	else
-	    mi->iconset_data = 0;
+	    mi->iconset_data = nullptr;
 	delete i; // old mi->iconset_data, could be &icon
 	if ( fast_refresh )
 	    parent->updateItem( id );
@@ -1244,7 +1244,7 @@ void TQMenuData::setItemVisible( int id, bool visible )
 
 TQMenuItem *TQMenuData::findItem( int id ) const
 {
-    return findItem( id, 0 );
+    return findItem( id, nullptr );
 }
 
 
@@ -1269,7 +1269,7 @@ TQMenuItem * TQMenuData::findItem( int id, TQMenuData ** parent ) const
 	*parent = (TQMenuData *)this;		// ###
 
     if ( id == -1 )				// bad identifier
-	return 0;
+	return nullptr;
     TQMenuItemListIt it( *mitems );
     TQMenuItem *mi;
     while ( (mi=it.current()) ) {		// search this menu
@@ -1293,7 +1293,7 @@ TQMenuItem * TQMenuData::findItem( int id, TQMenuData ** parent ) const
 	}
 #endif
     }
-    return 0;					// not found
+    return nullptr;					// not found
 }
 
 /*!
diff --git a/src/widgets/tqmenudata.h b/src/widgets/tqmenudata.h
index 24e5d9788..a87c52d30 100644
--- a/src/widgets/tqmenudata.h
+++ b/src/widgets/tqmenudata.h
@@ -260,7 +260,7 @@ public:
 
     TQMenuItem  *findItem( int id )	const;
     TQMenuItem  *findItem( int id, TQMenuData ** parent )	const;
-    TQMenuItem * findPopup( TQPopupMenu *, int *index = 0 );
+    TQMenuItem * findPopup( TQPopupMenu *, int *index = nullptr );
 
     virtual void activateItemAt( int index );
 
@@ -281,7 +281,7 @@ protected:
 
 private:
     int		insertAny( const TQString *, const TQPixmap *, TQPopupMenu *,
-			   const TQIconSet*, int, int, TQWidget* = 0, TQCustomMenuItem* = 0);
+			   const TQIconSet*, int, int, TQWidget* = nullptr, TQCustomMenuItem* = nullptr);
     void	removePopup( TQPopupMenu * );
     void	changeItemIconSet( int id, const TQIconSet &icon );
 
diff --git a/src/widgets/tqmultilineedit.h b/src/widgets/tqmultilineedit.h
index 670396f16..abeda64ed 100644
--- a/src/widgets/tqmultilineedit.h
+++ b/src/widgets/tqmultilineedit.h
@@ -61,7 +61,7 @@ class TQ_EXPORT TQMultiLineEdit : public TQTextEdit
     TQ_PROPERTY( bool edited READ edited WRITE setEdited DESIGNABLE false )
 
 public:
-    TQMultiLineEdit( TQWidget* parent=0, const char* name=0 );
+    TQMultiLineEdit( TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQMultiLineEdit();
 
     TQString textLine( int line ) const;
diff --git a/src/widgets/tqpopupmenu.cpp b/src/widgets/tqpopupmenu.cpp
index 4c210659e..6a65f7a81 100644
--- a/src/widgets/tqpopupmenu.cpp
+++ b/src/widgets/tqpopupmenu.cpp
@@ -92,21 +92,21 @@ static const int gtkArrowVMargin	= 0;	// arrow vertical margin
 #endif
 
 // used for internal communication
-static TQPopupMenu * syncMenu = 0;
+static TQPopupMenu * syncMenu = nullptr;
 static int syncMenuId = 0;
 
 // Used to detect motion prior to mouse-release
 static int motion;
 
 // used to provide ONE single-shot timer
-static TQTimer * singleSingleShot = 0;
+static TQTimer * singleSingleShot = nullptr;
 
 static bool supressAboutToShow = false;
 
 static void cleanup()
 {
     delete singleSingleShot;
-    singleSingleShot = 0;
+    singleSingleShot = nullptr;
 }
 
 static void popupSubMenuLater( int msec, TQPopupMenu * receiver ) {
@@ -125,7 +125,7 @@ static bool preventAnimation = false;
 
 #ifndef TQT_NO_WHATSTHIS
 extern void tqWhatsThisBDH();
-static TQMenuItem* whatsThisItem = 0;
+static TQMenuItem* whatsThisItem = nullptr;
 #endif
 
 /*!
@@ -262,7 +262,7 @@ public:
     TQPoint ignoremousepos;
 };
 
-static TQPopupMenu* active_popup_menu = 0;
+static TQPopupMenu* active_popup_menu = nullptr;
 
 /*!
     Constructs a popup menu called \a name with parent \a parent.
@@ -278,11 +278,11 @@ TQPopupMenu::TQPopupMenu( TQWidget *parent, const char *name )
     d = new TQPopupMenuPrivate;
     d->scroll.scrollableSize = d->scroll.topScrollableIndex = 0;
     d->scroll.scrollable = TQPopupMenuPrivate::Scroll::ScrollNone;
-    d->scroll.scrolltimer = 0;
+    d->scroll.scrolltimer = nullptr;
     d->hasmouse = 0;
     isPopupMenu	  = true;
 #ifndef TQT_NO_ACCEL
-    autoaccel	  = 0;
+    autoaccel	  = nullptr;
     accelDisabled = false;
 #endif
     popupActive	  = -1;
@@ -316,14 +316,14 @@ TQPopupMenu::~TQPopupMenu()
 {
     if ( syncMenu == this && tqApp ) {
 	tqApp->exit_loop();
-	syncMenu = 0;
+	syncMenu = nullptr;
     }
 
     if(d->scroll.scrolltimer)
 	delete d->scroll.scrolltimer;
 
     if ( isVisible() ) {
-        parentMenu = 0;
+        parentMenu = nullptr;
         hidePopups();
     }
 
@@ -391,7 +391,7 @@ void TQPopupMenu::performDelayedContentsChanged()
     // if performDelayedStateChanged() will be called too,
     // it will call updateAccel() too, no need to do it twice
     if( !pendingDelayedStateChanges )
-        updateAccel( 0 );
+        updateAccel( nullptr );
 #endif
     if ( isVisible() ) {
 	if ( tornOff )
@@ -425,7 +425,7 @@ void TQPopupMenu::performDelayedStateChanged()
     pendingDelayedStateChanges = 0;
     // here the part that can be delayed
 #ifndef TQT_NO_ACCEL
-    updateAccel( 0 ); // ### when we have a good solution for the accel vs. focus widget problem, remove that. That is only a workaround
+    updateAccel( nullptr ); // ### when we have a good solution for the accel vs. focus widget problem, remove that. That is only a workaround
     // if you remove this, see performDelayedContentsChanged()
 #endif
     update();
@@ -733,7 +733,7 @@ void TQPopupMenu::accelActivated( int id )
 
 void TQPopupMenu::accelDestroyed()		// accel about to be deleted
 {
-    autoaccel = 0;				// don't delete it twice!
+    autoaccel = nullptr;				// don't delete it twice!
 }
 #endif //TQT_NO_ACCEL
 
@@ -817,7 +817,7 @@ void TQPopupMenu::hideAllPopups()
 #ifndef TQT_NO_WHATSTHIS
     if (whatsThisItem) {
 	tqWhatsThisBDH();
-	whatsThisItem = 0;
+	whatsThisItem = nullptr;
     }
 #endif
 
@@ -1054,7 +1054,7 @@ TQSize TQPopupMenu::updateSize(bool force_update, bool do_resize)
 
     if(badSize || force_update) {
 #ifndef TQT_NO_ACCEL
-	updateAccel( 0 );
+	updateAccel( nullptr );
 #endif
 	int height = 0;
 	int max_width = 0, max_height = 0;
@@ -1075,7 +1075,7 @@ TQSize TQPopupMenu::updateSize(bool force_update, bool do_resize)
 	    }
 	    if ( mi->custom() )
 		mi->custom()->setFont( font() );
-	    if ( mi->iconSet() != 0)
+	    if ( mi->iconSet())
 		maxPMWidth = TQMAX( maxPMWidth,
 				   mi->iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4 );
 	}
@@ -1246,7 +1246,7 @@ void TQPopupMenu::updateAccel( TQWidget *parent )
 
     if ( parent ) {
 	delete autoaccel;
-	autoaccel = 0;
+	autoaccel = nullptr;
     } else if ( !autoaccel ) {
 	// we have no parent. Rather than ignoring any accelerators we try to find this popup's main window
 	if ( tornOff ) {
@@ -1261,7 +1261,7 @@ void TQPopupMenu::updateAccel( TQWidget *parent )
 	}
     }
 
-    if ( parent == 0 && autoaccel == 0 )
+    if ( !parent && !autoaccel )
  	return;
 
     if ( autoaccel )				// build it from scratch
@@ -1390,7 +1390,7 @@ void TQPopupMenu::hide()
 {
     if ( syncMenu == this && tqApp ) {
 	tqApp->exit_loop();
-	syncMenu = 0;
+	syncMenu = nullptr;
     }
 
     if ( !isVisible() ) {
@@ -1413,7 +1413,7 @@ void TQPopupMenu::hide()
     if( top->isMenuBar )
         x11SetWindowType( X11WindowTypePopup ); // reset
 #endif
-    parentMenu = 0;
+    parentMenu = nullptr;
     hidePopups();
     TQWidget::hide();
 }
@@ -1448,7 +1448,7 @@ int TQPopupMenu::itemHeight( TQMenuItem *mi ) const
     else                     // text height
         h = fm.height();
 
-    if ( !mi->isSeparator() && mi->iconSet() != 0 )
+    if ( !mi->isSeparator() && mi->iconSet() )
         h = TQMAX(h, mi->iconSet()->pixmap( TQIconSet::Small,
 					   TQIconSet::Normal ).height());
     if ( mi->custom() )
@@ -1496,7 +1496,7 @@ void TQPopupMenu::drawItem( TQPainter* p, int tab_, TQMenuItem* mi,
 void TQPopupMenu::drawContents( TQPainter* p )
 {
     TQMenuItemListIt it(*mitems);
-    TQMenuItem *mi = 0;
+    TQMenuItem *mi = nullptr;
     int row = 0;
     int x = contentsRect().x();
     int y = contentsRect().y();
@@ -1722,7 +1722,7 @@ void TQPopupMenu::mouseReleaseEvent( TQMouseEvent *e )
 		actSig( mi->id(), b );
 		if ( signal && !b )
 		    signal->activate();
-		active_popup_menu = 0;
+		active_popup_menu = nullptr;
 	    }
 	}
     }
@@ -1861,7 +1861,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
       - }
     */
 
-    TQMenuItem  *mi = 0;
+    TQMenuItem  *mi = nullptr;
     TQPopupMenu *popup;
     int dy = 0;
     bool ok_key = true;
@@ -1986,7 +1986,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
 		    actSig( mi->id(), b );
 		    if ( signal && !b )
 			signal->activate();
-		    active_popup_menu = 0;
+		    active_popup_menu = nullptr;
 		}
 	    }
 	}
@@ -2014,12 +2014,12 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
 	TQChar c = e->text()[0].upper();
 
 	TQMenuItemListIt it(*mitems);
-	TQMenuItem* first = 0;
-	TQMenuItem* currentSelected = 0;
-	TQMenuItem* firstAfterCurrent = 0;
+	TQMenuItem* first = nullptr;
+	TQMenuItem* currentSelected = nullptr;
+	TQMenuItem* firstAfterCurrent = nullptr;
 
 	TQMenuItem *m;
-	mi = 0;
+	mi = nullptr;
 	int indx = 0;
 	int clashCount = 0;
 	while ( (m=it.current()) ) {
@@ -2071,7 +2071,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
 		    actSig( mi->id(), b );
 		    if ( signal && !b  )
 			signal->activate();
-		    active_popup_menu = 0;
+		    active_popup_menu = nullptr;
 		}
 	    }
 	} else if ( clashCount > 1 ) { // Clashes, highlight next...
@@ -2325,7 +2325,7 @@ void TQPopupMenu::subMenuTimer() {
     if ( popup->isVisible() )
 	return;
 
-    Q_ASSERT( popup->parentMenu == 0 );
+    Q_ASSERT( !popup->parentMenu );
     popup->parentMenu = this;			// set parent menu
 
     emit popup->aboutToShow();
@@ -2807,7 +2807,7 @@ void TQPopupMenu::activateItemAt( int index )
 		    actSig( mi->id(), b );
 		    if ( signal && !b )
 			signal->activate();
-		    active_popup_menu = 0;
+		    active_popup_menu = nullptr;
 		}
 	    }
 	}
@@ -2885,7 +2885,7 @@ int TQPopupMenu::menuItemHeight( TQMenuItem *mi, TQFontMetrics fm )
     else                     // text height
         h = fm.height();
 
-    if ( !mi->isSeparator() && mi->iconSet() != 0 )
+    if ( !mi->isSeparator() && mi->iconSet() )
         h = TQMAX(h, mi->iconSet()->pixmap( TQIconSet::Small,
 					   TQIconSet::Normal ).height());
     if ( mi->custom() )
diff --git a/src/widgets/tqpopupmenu.h b/src/widgets/tqpopupmenu.h
index 330a69ce9..eb4892951 100644
--- a/src/widgets/tqpopupmenu.h
+++ b/src/widgets/tqpopupmenu.h
@@ -54,7 +54,7 @@ class TQ_EXPORT TQPopupMenu : public TQFrame, public TQMenuData
     TQ_OBJECT
     TQ_PROPERTY( bool checkable READ isCheckable WRITE setCheckable )
 public:
-    TQPopupMenu( TQWidget* parent=0, const char* name=0 );
+    TQPopupMenu( TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQPopupMenu();
 
     void	popup( const TQPoint & pos, int indexAtPoint = -1 ); // open
diff --git a/src/widgets/tqprogressbar.h b/src/widgets/tqprogressbar.h
index a93756ab4..18f865eea 100644
--- a/src/widgets/tqprogressbar.h
+++ b/src/widgets/tqprogressbar.h
@@ -63,8 +63,8 @@ class TQ_EXPORT TQProgressBar : public TQFrame
     TQ_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
 
 public:
-    TQProgressBar( TQWidget* parent=0, const char* name=0, WFlags f=0 );
-    TQProgressBar( int totalSteps, TQWidget* parent=0, const char* name=0, WFlags f=0 );
+    TQProgressBar( TQWidget* parent=nullptr, const char* name=nullptr, WFlags f=0 );
+    TQProgressBar( int totalSteps, TQWidget* parent=nullptr, const char* name=nullptr, WFlags f=0 );
     virtual ~TQProgressBar();
 
     int		totalSteps() const;
diff --git a/src/widgets/tqpushbutton.cpp b/src/widgets/tqpushbutton.cpp
index 942d1b857..6659faa37 100644
--- a/src/widgets/tqpushbutton.cpp
+++ b/src/widgets/tqpushbutton.cpp
@@ -256,7 +256,7 @@ class TQPushButtonPrivate
 {
 public:
     TQPushButtonPrivate()
-	:iconset( 0 )
+	:iconset( nullptr )
     {}
     ~TQPushButtonPrivate()
     {
@@ -329,13 +329,13 @@ TQPushButton::~TQPushButton()
 
 void TQPushButton::init()
 {
-    d = 0;
+    d = nullptr;
     defButton = false;
     lastEnabled = false;
     hasMenuArrow = false;
     flt = false;
 #ifndef TQT_NO_DIALOG
-    autoDefButton = ::tqt_cast<TQDialog*>(topLevelWidget()) != 0;
+    autoDefButton = !!::tqt_cast<TQDialog*>(topLevelWidget());
 #else
     autoDefButton = false;
 #endif
@@ -630,7 +630,7 @@ void TQPushButton::focusOutEvent( TQFocusEvent *e )
 #ifndef TQT_NO_DIALOG
     if ( defButton && autoDefButton ) {
 	if ( ::tqt_cast<TQDialog*>(topLevelWidget()) )
-	    ((TQDialog*)topLevelWidget())->setDefault( 0 );
+	    ((TQDialog*)topLevelWidget())->setDefault( nullptr );
     }
 #endif
 
@@ -660,7 +660,7 @@ void TQPushButton::setPopup( TQPopupMenu* popup )
 	connect( this, TQ_SIGNAL( pressed() ), this, TQ_SLOT( popupPressed() ) );
 
     d->popup = popup;
-    setIsMenuButton( popup != 0 );
+    setIsMenuButton( popup );
 }
 #endif //TQT_NO_POPUPMENU
 #ifndef TQT_NO_ICONSET
@@ -675,7 +675,7 @@ void TQPushButton::setIconSet( const TQIconSet& icon )
 	    d->iconset = new TQIconSet( icon );
     } else if ( d->iconset) {
 	delete d->iconset;
-	d->iconset = 0;
+	d->iconset = nullptr;
     }
 
     update();
@@ -685,7 +685,7 @@ void TQPushButton::setIconSet( const TQIconSet& icon )
 
 TQIconSet* TQPushButton::iconSet() const
 {
-    return d ? d->iconset : 0;
+    return d ? d->iconset : nullptr;
 }
 #endif // TQT_NO_ICONSET
 #ifndef TQT_NO_POPUPMENU
@@ -697,12 +697,12 @@ TQIconSet* TQPushButton::iconSet() const
 */
 TQPopupMenu* TQPushButton::popup() const
 {
-    return d ? (TQPopupMenu*)d->popup : 0;
+    return d ? (TQPopupMenu*)d->popup : nullptr;
 }
 
 void TQPushButton::popupPressed()
 {
-    TQPopupMenu* popup = d ? (TQPopupMenu*) d->popup : 0;
+    TQPopupMenu* popup = d ? (TQPopupMenu*) d->popup : nullptr;
     TQGuardedPtr<TQPushButton> that = this;
     if ( isDown() && popup ) {
 	bool horizontal = true;
diff --git a/src/widgets/tqpushbutton.h b/src/widgets/tqpushbutton.h
index 6712ce111..d8ba52300 100644
--- a/src/widgets/tqpushbutton.h
+++ b/src/widgets/tqpushbutton.h
@@ -64,10 +64,10 @@ class TQ_EXPORT TQPushButton : public TQButton
     TQ_OVERRIDE( bool autoMask DESIGNABLE true SCRIPTABLE true )
 
 public:
-    TQPushButton( TQWidget *parent, const char* name=0 );
-    TQPushButton( const TQString &text, TQWidget *parent, const char* name=0 );
+    TQPushButton( TQWidget *parent, const char* name=nullptr );
+    TQPushButton( const TQString &text, TQWidget *parent, const char* name=nullptr );
 #ifndef TQT_NO_ICONSET
-    TQPushButton( const TQIconSet& icon, const TQString &text, TQWidget *parent, const char* name=0 );
+    TQPushButton( const TQIconSet& icon, const TQString &text, TQWidget *parent, const char* name=nullptr );
 #endif
     ~TQPushButton();
 
diff --git a/src/widgets/tqradiobutton.h b/src/widgets/tqradiobutton.h
index 64410b739..c6f8a49c4 100644
--- a/src/widgets/tqradiobutton.h
+++ b/src/widgets/tqradiobutton.h
@@ -54,8 +54,8 @@ class TQ_EXPORT TQRadioButton : public TQButton
     TQ_OVERRIDE( bool autoMask DESIGNABLE true SCRIPTABLE true )
 
 public:
-    TQRadioButton( TQWidget *parent, const char* name=0 );
-    TQRadioButton( const TQString &text, TQWidget *parent, const char* name=0 );
+    TQRadioButton( TQWidget *parent, const char* name=nullptr );
+    TQRadioButton( const TQString &text, TQWidget *parent, const char* name=nullptr );
 
     bool    isChecked() const;
 
diff --git a/src/widgets/tqrangecontrol.cpp b/src/widgets/tqrangecontrol.cpp
index 03d9cecd0..9ba8607c2 100644
--- a/src/widgets/tqrangecontrol.cpp
+++ b/src/widgets/tqrangecontrol.cpp
@@ -126,7 +126,7 @@ TQRangeControl::TQRangeControl()
     page    = 10;
     val	    = 0;
     prevVal = -1;
-    d	    = 0;
+    d	    = nullptr;
 }
 
 /*!
@@ -147,7 +147,7 @@ TQRangeControl::TQRangeControl( int minValue, int maxValue,
     page    = TQABS( pageStep );
     prevVal = minVal - 1;
     val	    = bound( value );
-    d	    = 0;
+    d	    = nullptr;
 }
 
 /*!
diff --git a/src/widgets/tqrangecontrol.h b/src/widgets/tqrangecontrol.h
index 39f2e2abc..b983a8211 100644
--- a/src/widgets/tqrangecontrol.h
+++ b/src/widgets/tqrangecontrol.h
@@ -131,7 +131,7 @@ class TQ_EXPORT TQSpinWidget : public TQWidget
 {
     TQ_OBJECT
 public:
-    TQSpinWidget( TQWidget* parent=0, const char* name=0 );
+    TQSpinWidget( TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQSpinWidget();
 
     void 	setEditWidget( TQWidget * widget );
diff --git a/src/widgets/tqscrollbar.cpp b/src/widgets/tqscrollbar.cpp
index 80b2723e8..7d2450f54 100644
--- a/src/widgets/tqscrollbar.cpp
+++ b/src/widgets/tqscrollbar.cpp
@@ -293,7 +293,7 @@ void TQScrollBar::init()
     clickedAt = false;
     setFocusPolicy( NoFocus );
 
-    repeater = 0;
+    repeater = nullptr;
 
     setBackgroundMode((TQt::BackgroundMode)
 		      style().styleHint(TQStyle::SH_ScrollBar_BackgroundMode));
@@ -495,7 +495,7 @@ void TQScrollBar::startAutoRepeat()
 void TQScrollBar::stopAutoRepeat()
 {
     delete repeater;
-    repeater = 0;
+    repeater = nullptr;
 }
 
 
@@ -506,7 +506,7 @@ void TQScrollBar::stopAutoRepeat()
 void TQScrollBar::wheelEvent( TQWheelEvent *e )
 {
     static float offset = 0;
-    static TQScrollBar* offset_owner = 0;
+    static TQScrollBar* offset_owner = nullptr;
     if (offset_owner != this){
 	offset_owner = this;
 	offset = 0;
diff --git a/src/widgets/tqscrollbar.h b/src/widgets/tqscrollbar.h
index e0a7a4195..e09faf6fc 100644
--- a/src/widgets/tqscrollbar.h
+++ b/src/widgets/tqscrollbar.h
@@ -63,10 +63,10 @@ class TQ_EXPORT TQScrollBar : public TQWidget, public TQRangeControl
     TQ_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
 
 public:
-    TQScrollBar( TQWidget *parent, const char* name = 0 );
-    TQScrollBar( Orientation, TQWidget *parent, const char* name = 0 );
+    TQScrollBar( TQWidget *parent, const char* name = nullptr );
+    TQScrollBar( Orientation, TQWidget *parent, const char* name = nullptr );
     TQScrollBar( int minValue, int maxValue, int lineStep, int pageStep,
-		int value, Orientation, TQWidget *parent, const char* name = 0 );
+		int value, Orientation, TQWidget *parent, const char* name = nullptr );
     ~TQScrollBar();
 
     virtual void setOrientation( Orientation );
diff --git a/src/widgets/tqscrollview.cpp b/src/widgets/tqscrollview.cpp
index b3c1db768..7316509ed 100644
--- a/src/widgets/tqscrollview.cpp
+++ b/src/widgets/tqscrollview.cpp
@@ -104,7 +104,7 @@ class TQViewportWidget : public TQWidget
     TQ_OBJECT
 
 public:
-    TQViewportWidget( TQScrollView* parent=0, const char* name=0, WFlags f = 0 )
+    TQViewportWidget( TQScrollView* parent=nullptr, const char* name=nullptr, WFlags f = 0 )
 	: TQWidget( parent, name, f ) {}
 };
 
@@ -113,7 +113,7 @@ class TQClipperWidget : public TQWidget
     TQ_OBJECT
 
 public:
-    TQClipperWidget( TQWidget * parent=0, const char * name=0, WFlags f=0 )
+    TQClipperWidget( TQWidget * parent=nullptr, const char * name=nullptr, WFlags f=0 )
         : TQWidget ( parent,name,f) {}
 };
 
@@ -125,7 +125,7 @@ public:
         hbar( new TQScrollBar( TQScrollBar::Horizontal, parent, "qt_hbar" ) ),
         vbar( new TQScrollBar( TQScrollBar::Vertical, parent, "qt_vbar" ) ),
         viewport( new TQViewportWidget( parent, "qt_viewport", vpwflags ) ),
-        clipped_viewport( 0 ),
+        clipped_viewport( nullptr ),
         flags( vpwflags ),
         vx( 0 ), vy( 0 ), vwidth( 1 ), vheight( 1 ),
 #ifndef TQT_NO_DRAGANDDROP
@@ -141,7 +141,7 @@ public:
 	viewport->setBackgroundOrigin( TQWidget::WidgetOrigin );
 	vMode = TQScrollView::Auto;
 	hMode = TQScrollView::Auto;
-	corner = 0;
+	corner = nullptr;
 	defaultCorner = new TQWidget( parent, "qt_default_corner" );
 	defaultCorner->hide();
 	vbar->setSteps( 20, 1/*set later*/ );
@@ -233,12 +233,12 @@ TQSVChildRec* TQScrollViewData::ancestorRec(TQWidget* w)
     if ( clipped_viewport ) {
 	while (w->parentWidget() != clipped_viewport) {
 	    w = w->parentWidget();
-	    if (!w) return 0;
+	    if (!w) return nullptr;
 	}
     } else {
 	while (w->parentWidget() != viewport) {
 	    w = w->parentWidget();
-	    if (!w) return 0;
+	    if (!w) return nullptr;
 	}
     }
     return rec(w);
@@ -627,13 +627,13 @@ TQScrollView::~TQScrollView()
     // order is important
     // ~TQWidget may cause a WM_ERASEBKGND on Windows
     delete d->vbar;
-    d->vbar = 0;
+    d->vbar = nullptr;
     delete d->hbar;
-    d->hbar = 0;
+    d->hbar = nullptr;
     delete d->viewport;
-    d->viewport = 0;
+    d->viewport = nullptr;
     delete d;
-    d = 0;
+    d = nullptr;
 }
 
 /*!
@@ -2528,7 +2528,7 @@ bool TQScrollView::focusNextPrevChild( bool next )
     // first set things up for the scan
     TQFocusData *f = focusData();
     TQWidget *startingPoint = f->home();
-    TQWidget *candidate = 0;
+    TQWidget *candidate = nullptr;
     TQWidget *w = next ? f->next() : f->prev();
     TQSVChildRec *r;
     extern bool tqt_tab_all_widgets;
@@ -2594,7 +2594,7 @@ void TQScrollView::enableClipper(bool y)
 	d->clipped_viewport->show();
     } else {
 	delete d->clipped_viewport;
-	d->clipped_viewport = 0;
+	d->clipped_viewport = nullptr;
     }
 }
 
diff --git a/src/widgets/tqscrollview.h b/src/widgets/tqscrollview.h
index 318ff2a37..614ddcb07 100644
--- a/src/widgets/tqscrollview.h
+++ b/src/widgets/tqscrollview.h
@@ -67,7 +67,7 @@ class TQ_EXPORT TQScrollView : public TQFrame
 #endif
 
 public:
-    TQScrollView(TQWidget* parent=0, const char* name=0, WFlags f=0);
+    TQScrollView(TQWidget* parent=nullptr, const char* name=nullptr, WFlags f=0);
     ~TQScrollView();
 
     enum ResizePolicy { Default, Manual, AutoOne, AutoOneFit };
diff --git a/src/widgets/tqslider.cpp b/src/widgets/tqslider.cpp
index f56ff7248..8dae03d7e 100644
--- a/src/widgets/tqslider.cpp
+++ b/src/widgets/tqslider.cpp
@@ -177,7 +177,7 @@ TQSlider::~TQSlider()
 void TQSlider::init()
 {
     d = new TQSliderPrivate;
-    timer = 0;
+    timer = nullptr;
     sliderPos = 0;
     sliderVal = 0;
     clickOffset = 0;
@@ -518,7 +518,7 @@ void TQSlider::wheelEvent( TQWheelEvent * e )
 	return;
 
     static float offset = 0;
-    static TQSlider* offset_owner = 0;
+    static TQSlider* offset_owner = nullptr;
     if (offset_owner != this){
 	offset_owner = this;
 	offset = 0;
diff --git a/src/widgets/tqslider.h b/src/widgets/tqslider.h
index 37eef3027..a77ee0129 100644
--- a/src/widgets/tqslider.h
+++ b/src/widgets/tqslider.h
@@ -70,10 +70,10 @@ public:
     enum TickSetting { NoMarks = 0, Above = 1, Left = Above,
 		       Below = 2, Right = Below, Both = 3 };
 
-    TQSlider( TQWidget *parent, const char* name = 0 );
-    TQSlider( Orientation, TQWidget *parent, const char* name = 0 );
+    TQSlider( TQWidget *parent, const char* name = nullptr );
+    TQSlider( Orientation, TQWidget *parent, const char* name = nullptr );
     TQSlider( int minValue, int maxValue, int pageStep, int value, Orientation,
-	     TQWidget *parent, const char* name = 0 );
+	     TQWidget *parent, const char* name = nullptr );
     ~TQSlider();
 
     virtual void	setOrientation( Orientation );
diff --git a/src/widgets/tqspinbox.cpp b/src/widgets/tqspinbox.cpp
index bfd4a255d..7b301c05e 100644
--- a/src/widgets/tqspinbox.cpp
+++ b/src/widgets/tqspinbox.cpp
@@ -715,7 +715,7 @@ void TQSpinBox::wheelEvent( TQWheelEvent * e )
 {
     e->accept();
     static float offset = 0;
-    static TQSpinBox* offset_owner = 0;
+    static TQSpinBox* offset_owner = nullptr;
     if (offset_owner != this) {
 	offset_owner = this;
 	offset = 0;
@@ -790,7 +790,7 @@ void TQSpinBox::setValidator( const TQValidator* v )
 
 const TQValidator * TQSpinBox::validator() const
 {
-    return vi ? vi->validator() : 0;
+    return vi ? vi->validator() : nullptr;
 }
 
 /*!
diff --git a/src/widgets/tqspinbox.h b/src/widgets/tqspinbox.h
index 390c6bbd2..a717885d7 100644
--- a/src/widgets/tqspinbox.h
+++ b/src/widgets/tqspinbox.h
@@ -69,9 +69,9 @@ class TQ_EXPORT TQSpinBox: public TQWidget, public TQRangeControl
     TQ_PROPERTY( int value READ value WRITE setValue )
 
 public:
-    TQSpinBox( TQWidget* parent=0, const char* name=0 );
+    TQSpinBox( TQWidget* parent=nullptr, const char* name=nullptr );
     TQSpinBox( int minValue, int maxValue, int step = 1,
-	      TQWidget* parent=0, const char* name=0 );
+	      TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQSpinBox();
 
     TQString		text() const;
diff --git a/src/widgets/tqspinwidget.cpp b/src/widgets/tqspinwidget.cpp
index b2f685a4d..092903ff4 100644
--- a/src/widgets/tqspinwidget.cpp
+++ b/src/widgets/tqspinwidget.cpp
@@ -55,7 +55,7 @@ public:
 	  buttonDown( 0 ),
 	  timerUp( 0 ),
 	  bsyms( TQSpinWidget::UpDownArrows ),
-	  ed ( 0 ) {}
+	  ed ( nullptr ) {}
     uint upEnabled :1;
     uint downEnabled :1;
     uint theButton :2;
@@ -297,7 +297,7 @@ void TQSpinWidget::wheelEvent( TQWheelEvent *e )
 {
     e->accept();
     static float offset = 0;
-    static TQSpinWidget* offset_owner = 0;
+    static TQSpinWidget* offset_owner = nullptr;
     if ( offset_owner != this ) {
 	offset_owner = this;
 	offset = 0;
diff --git a/src/widgets/tqsplashscreen.cpp b/src/widgets/tqsplashscreen.cpp
index ba7b765a6..1e78f6f61 100644
--- a/src/widgets/tqsplashscreen.cpp
+++ b/src/widgets/tqsplashscreen.cpp
@@ -130,7 +130,7 @@ public:
     perhaps \c WDestructiveClose or \c WStyle_StaysOnTop.
 */
 TQSplashScreen::TQSplashScreen( const TQPixmap &pixmap, WFlags f )
-    : TQWidget( 0, 0, WStyle_Customize | WStyle_Splash | f )
+    : TQWidget( nullptr, nullptr, WStyle_Customize | WStyle_Splash | f )
 {
     d = new TQSplashScreenPrivate();
     d->pixmap = pixmap;
diff --git a/src/widgets/tqsplitter.cpp b/src/widgets/tqsplitter.cpp
index 378beb6a4..ae374f316 100644
--- a/src/widgets/tqsplitter.cpp
+++ b/src/widgets/tqsplitter.cpp
@@ -368,7 +368,7 @@ TQSplitterLayoutStruct *TQSplitter::findWidget( TQWidget *w )
 TQSplitterLayoutStruct *TQSplitter::addWidget( TQWidget *w, bool prepend )
 {
     TQSplitterLayoutStruct *s;
-    TQSplitterHandle *newHandle = 0;
+    TQSplitterHandle *newHandle = nullptr;
     if ( d->list.count() > 0 ) {
 	s = new TQSplitterLayoutStruct;
 	s->resizeMode = KeepSize;
@@ -421,7 +421,7 @@ void TQSplitter::childEvent( TQChildEvent *c )
 	addWidget( (TQWidget*)c->child() );
 	recalc( isVisible() );
     } else if ( c->type() == TQEvent::ChildRemoved ) {
-	TQSplitterLayoutStruct *prev = 0;
+	TQSplitterLayoutStruct *prev = nullptr;
 	if ( d->list.count() > 1 )
 	    prev = d->list.at( 1 );  // yes, this is correct
 	TQSplitterLayoutStruct *curr = d->list.first();
@@ -719,7 +719,7 @@ void TQSplitter::getRange( int id, int *farMin, int *min, int *max, int *farMax
 
 void TQSplitter::getRange( int id, int *min, int *max )
 {
-    getRange( id, min, 0, 0, max );
+    getRange( id, min, nullptr, nullptr, max );
 }
 
 
@@ -872,7 +872,7 @@ void TQSplitter::recalc( bool update )
     for ( int i = 0; i < n; i++ ) {
 	TQSplitterLayoutStruct *s = d->list.at( i );
 	if ( !s->isHandle ) {
-	    TQSplitterLayoutStruct *p = 0;
+	    TQSplitterLayoutStruct *p = nullptr;
 	    if ( i > 0 )
 		p = d->list.at( i - 1 );
 
@@ -1062,7 +1062,7 @@ TQSize TQSplitter::sizeHint() const
 	TQObjectListIt it( *c );
 	TQObject * o;
 
-	while( (o = it.current()) != 0 ) {
+	while( (o = it.current()) ) {
 	    ++it;
 	    if ( o->isWidgetType() && !((TQWidget*)o)->isHidden() ) {
 		TQSize s = ((TQWidget*)o)->sizeHint();
@@ -1091,7 +1091,7 @@ TQSize TQSplitter::minimumSizeHint() const
 	TQObjectListIt it( *c );
 	TQObject * o;
 
-	while ( (o = it.current()) != 0 ) {
+	while ( (o = it.current()) ) {
 	    ++it;
 	    if ( o->isWidgetType() && !((TQWidget*)o)->isHidden() ) {
 		TQSize s = qSmartMinSize( (TQWidget*)o );
@@ -1287,7 +1287,7 @@ TQTextStream& operator<<( TQTextStream& ts, const TQSplitter& splitter )
     bool first = true;
     ts << "[";
 
-    while ( s != 0 ) {
+    while ( s ) {
 	if ( !s->isHandle ) {
 	    if ( !first )
 		ts << ",";
@@ -1334,9 +1334,9 @@ TQTextStream& operator>>( TQTextStream& ts, TQSplitter& splitter )
 	i++;
 	SKIP_SPACES();
 	while ( line[i] != ']' ) {
-	    while ( s != 0 && s->isHandle )
+	    while ( s && s->isHandle )
 		s = splitter.d->list.next();
-	    if ( s == 0 )
+	    if ( !s )
 		break;
 
 	    if ( line[i].upper() == 'H' ) {
diff --git a/src/widgets/tqsplitter.h b/src/widgets/tqsplitter.h
index cc2ac7d40..68f0b5bc6 100644
--- a/src/widgets/tqsplitter.h
+++ b/src/widgets/tqsplitter.h
@@ -95,8 +95,8 @@ public:
     // ### TQt 4.0: remove Auto from public API
     enum ResizeMode { Stretch, KeepSize, FollowSizeHint, Auto };
 
-    TQSplitter( TQWidget* parent = 0, const char* name = 0 );
-    TQSplitter( Orientation, TQWidget* parent = 0, const char* name = 0 );
+    TQSplitter( TQWidget* parent = nullptr, const char* name = nullptr );
+    TQSplitter( Orientation, TQWidget* parent = nullptr, const char* name = nullptr );
     ~TQSplitter();
 
     virtual void setOrientation( Orientation );
@@ -195,7 +195,7 @@ class TQ_EXPORT TQSplitterHandle : public TQWidget
     TQ_OBJECT
 public:
     TQSplitterHandle( Orientation o,
-		     TQSplitter *parent, const char* name=0 );
+		     TQSplitter *parent, const char* name=nullptr );
     void setOrientation( Orientation o );
     Orientation orientation() const { return orient; }
 
diff --git a/src/widgets/tqstatusbar.cpp b/src/widgets/tqstatusbar.cpp
index 1fdab1f4c..798221ad7 100644
--- a/src/widgets/tqstatusbar.cpp
+++ b/src/widgets/tqstatusbar.cpp
@@ -146,11 +146,11 @@ TQStatusBar::TQStatusBar( TQWidget * parent, const char *name )
 {
     d = new TQStatusBarPrivate;
     d->items.setAutoDelete( true );
-    d->box = 0;
-    d->timer = 0;
+    d->box = nullptr;
+    d->timer = nullptr;
 
 #ifndef TQT_NO_SIZEGRIP
-    d->resizer = 0;
+    d->resizer = nullptr;
     setSizeGripEnabled(true); // causes reformat()
 #else
     reformat();
@@ -165,7 +165,7 @@ TQStatusBar::TQStatusBar( TQWidget * parent, const char *name )
 TQStatusBar::~TQStatusBar()
 {
     delete d;
-    d = 0;
+    d = nullptr;
 }
 
 
@@ -275,7 +275,7 @@ void TQStatusBar::setSizeGripEnabled(bool enabled)
 	    d->resizer = new TQSizeGrip( this, "TQStatusBar::resizer" );
 	} else {
 	    delete d->resizer;
-	    d->resizer = 0;
+	    d->resizer = nullptr;
 	}
 	reformat();
 	if ( d->resizer && isVisible() )
@@ -358,7 +358,7 @@ void TQStatusBar::message( const TQString &message )
     d->tempItem = message;
     if ( d->timer ) {
 	delete d->timer;
-	d->timer = 0;
+	d->timer = nullptr;
     }
     hideOrShow();
 }
@@ -383,7 +383,7 @@ void TQStatusBar::message( const TQString &message, int ms )
 	d->timer->start( ms );
     } else if ( d->timer ) {
 	delete d->timer;
-	d->timer = 0;
+	d->timer = nullptr;
     }
 
     hideOrShow();
@@ -402,7 +402,7 @@ void TQStatusBar::clear()
 	return;
     if ( d->timer ) {
 	delete d->timer;
-	d->timer = 0;
+	d->timer = nullptr;
     }
     d->tempItem = TQString::null;
     hideOrShow();
diff --git a/src/widgets/tqstatusbar.h b/src/widgets/tqstatusbar.h
index 1a0b52280..cde1476fd 100644
--- a/src/widgets/tqstatusbar.h
+++ b/src/widgets/tqstatusbar.h
@@ -57,7 +57,7 @@ class TQ_EXPORT TQStatusBar: public TQWidget
     TQ_PROPERTY( bool sizeGripEnabled READ isSizeGripEnabled WRITE setSizeGripEnabled )
 
 public:
-    TQStatusBar( TQWidget* parent=0, const char* name=0 );
+    TQStatusBar( TQWidget* parent=nullptr, const char* name=nullptr );
     virtual ~TQStatusBar();
 
     virtual void addWidget( TQWidget *, int stretch = 0, bool = false );
diff --git a/src/widgets/tqsyntaxhighlighter.cpp b/src/widgets/tqsyntaxhighlighter.cpp
index 428be11ef..762a78ba4 100644
--- a/src/widgets/tqsyntaxhighlighter.cpp
+++ b/src/widgets/tqsyntaxhighlighter.cpp
@@ -78,7 +78,7 @@
 */
 
 TQSyntaxHighlighter::TQSyntaxHighlighter( TQTextEdit *textEdit )
-    : para( 0 ), edit( textEdit ), d( new TQSyntaxHighlighterPrivate )
+    : para( nullptr ), edit( textEdit ), d( new TQSyntaxHighlighterPrivate )
 {
     textEdit->document()->setPreProcessor( new TQSyntaxHighlighterInternal( this ) );
     textEdit->document()->invalidate();
@@ -92,7 +92,7 @@ TQSyntaxHighlighter::TQSyntaxHighlighter( TQTextEdit *textEdit )
 TQSyntaxHighlighter::~TQSyntaxHighlighter()
 {
     delete d;
-    textEdit()->document()->setPreProcessor( 0 );
+    textEdit()->document()->setPreProcessor( nullptr );
 }
 
 /*!
@@ -152,7 +152,7 @@ void TQSyntaxHighlighter::setFormat( int start, int count, const TQFont &font, c
 {
     if ( !para || count <= 0 )
 	return;
-    TQTextFormat *f = 0;
+    TQTextFormat *f = nullptr;
     f = para->document()->formatCollection()->format( font, color );
     para->setFormat( start, count, f );
     f->removeRef();
@@ -164,7 +164,7 @@ void TQSyntaxHighlighter::setFormat( int start, int count, const TQColor &color
 {
     if ( !para || count <= 0 )
 	return;
-    TQTextFormat *f = 0;
+    TQTextFormat *f = nullptr;
     TQFont fnt = textEdit()->TQWidget::font();
     f = para->document()->formatCollection()->format( fnt, color );
     para->setFormat( start, count, f );
@@ -177,7 +177,7 @@ void TQSyntaxHighlighter::setFormat( int start, int count, const TQFont &font )
 {
     if ( !para || count <= 0 )
 	return;
-    TQTextFormat *f = 0;
+    TQTextFormat *f = nullptr;
     TQColor c = textEdit()->viewport()->paletteForegroundColor();
     f = para->document()->formatCollection()->format( font, c );
     para->setFormat( start, count, f );
diff --git a/src/widgets/tqsyntaxhighlighter_p.h b/src/widgets/tqsyntaxhighlighter_p.h
index 4a732667a..6739b9a3e 100644
--- a/src/widgets/tqsyntaxhighlighter_p.h
+++ b/src/widgets/tqsyntaxhighlighter_p.h
@@ -70,7 +70,7 @@ public:
 	highlighter->d->currentParagraph = p->paragId();
 	p->setEndState( highlighter->highlightParagraph( text, endState ) );
 	highlighter->d->currentParagraph = -1;
-	highlighter->para = 0;
+	highlighter->para = nullptr;
 
 	p->setFirstPreProcess( false );
 	TQTextParagraph *op = p;
@@ -85,7 +85,7 @@ public:
 	    }
 	}
     }
-    TQTextFormat *format( int ) { return 0; }
+    TQTextFormat *format( int ) { return nullptr; }
 
 private:
     TQSyntaxHighlighter *highlighter;
diff --git a/src/widgets/tqtabbar.cpp b/src/widgets/tqtabbar.cpp
index f8c5452c8..dc97b03e1 100644
--- a/src/widgets/tqtabbar.cpp
+++ b/src/widgets/tqtabbar.cpp
@@ -76,8 +76,8 @@
 TQTab::TQTab()
     : enabled( true ),
       id ( 0 ),
-      iconset( 0 ),
-      tb( 0 )
+      iconset( nullptr ),
+      tb( nullptr )
 {
 }
 
@@ -89,8 +89,8 @@ TQTab::TQTab( const TQString &text )
     : label( text ),
       enabled( true ),
       id( 0 ),
-      iconset( 0 ),
-      tb( 0 )
+      iconset( nullptr ),
+      tb( nullptr )
 {
 }
 
@@ -103,7 +103,7 @@ TQTab::TQTab( const TQIconSet& icon, const TQString& text )
       enabled( true ),
       id( 0 ),
       iconset( new TQIconSet(icon) ),
-      tb( 0 )
+      tb( nullptr )
 {
 }
 
@@ -165,7 +165,7 @@ TQTab::TQTab( const TQIconSet& icon, const TQString& text )
 TQTab::~TQTab()
 {
     delete iconset;
-    tb = 0;
+    tb = nullptr;
 }
 
 /*!
@@ -335,13 +335,13 @@ private:
 */
 
 TQTabBar::TQTabBar( TQWidget * parent, const char *name )
-    : TQWidget( parent, name, WNoAutoErase | WNoMousePropagation  ), l(nullptr), hoverTab( 0 )
+    : TQWidget( parent, name, WNoAutoErase | WNoMousePropagation  ), l(nullptr), hoverTab( nullptr )
 {
     d = new TQTabPrivate;
-    d->pressed = 0;
+    d->pressed = nullptr;
     d->id = 0;
     d->focus = 0;
-    d->toolTips = 0;
+    d->toolTips = nullptr;
 #ifndef TQT_NO_ACCEL
     d->a = new TQAccel( this, "tab accelerators" );
     connect( d->a, TQ_SIGNAL(activated(int)), this, TQ_SLOT(setCurrentTab(int)) );
@@ -375,11 +375,11 @@ TQTabBar::~TQTabBar()
 	delete d->toolTips;
 #endif
     delete d;
-    d = 0;
+    d = nullptr;
     delete l;
-    l = 0;
+    l = nullptr;
     delete lstatic;
-    lstatic = 0;
+    lstatic = nullptr;
 }
 
 
@@ -461,8 +461,8 @@ void TQTabBar::removeTab( TQTab * t )
     bool updateFocus = t->id == d->focus;
     // remove the TabBar Reference
     if(d->pressed == t)
-	d->pressed = 0;
-    t->setTabBar( 0 );
+	d->pressed = nullptr;
+    t->setTabBar( nullptr );
     l->remove( t );
     lstatic->remove( t );
     layoutTabs();
@@ -552,7 +552,7 @@ TQSize TQTabBar::sizeHint() const
     TQSize sz(0, 0);
     if ( TQTab * t = l->first() ) {
 	TQRect r( t->r );
-	while ( (t = l->next()) != 0 )
+	while ( (t = l->next()) )
 	    r = r.unite( t->r );
 	sz = r.size();
     }
@@ -607,7 +607,7 @@ void TQTabBar::paint( TQPainter * p, TQTab * t, bool selected ) const
 
 	int iw = 0;
 	int ih = 0;
-	if ( t->iconset != 0 ) {
+	if ( t->iconset ) {
 		iw = t->iconset->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4;
 		ih = t->iconset->pixmap( TQIconSet::Small, TQIconSet::Normal ).height();
 	}
@@ -699,10 +699,10 @@ void TQTabBar::paintEvent( TQPaintEvent * e )
     do {
 	TQTab * n = l->next();
 	if ( t && t->r.intersects( e->rect() ) ) {
-	    paint( buffer.painter(), t, n == 0 );
+	    paint( buffer.painter(), t, !n );
 	}
 	t = n;
-    } while ( t != 0 );
+    } while ( t );
 
     if ( d->scrolls && lstatic->first()->r.left() < 0 ) {
 	TQPointArray a;
@@ -740,7 +740,7 @@ void TQTabBar::paintEvent( TQPaintEvent * e )
 
 TQTab * TQTabBar::selectTab( const TQPoint & p ) const
 {
-    TQTab * selected = 0;
+    TQTab * selected = nullptr;
     bool moreThanOne = false;
 
     TQPtrListIterator<TQTab> i( *l );
@@ -756,7 +756,7 @@ TQTab * TQTabBar::selectTab( const TQPoint & p ) const
 	}
     }
 
-    return moreThanOne ? 0 : selected;
+    return moreThanOne ? nullptr : selected;
 }
 
 
@@ -831,8 +831,8 @@ void TQTabBar::mouseReleaseEvent( TQMouseEvent *e )
 	}
 	
 	if (d->pressed) {
-		TQTab *t = selectTab( e->pos() ) == d->pressed ? d->pressed : 0;
-		d->pressed = 0;
+		TQTab *t = selectTab( e->pos() ) == d->pressed ? d->pressed : nullptr;
+		d->pressed = nullptr;
 		if(t && t->enabled && e->type() == style().styleHint( TQStyle::SH_TabBar_SelectMouseType, this )) {
 			setCurrentTab( t );
 		}
@@ -841,12 +841,12 @@ void TQTabBar::mouseReleaseEvent( TQMouseEvent *e )
 
 void TQTabBar::enterEvent( TQEvent * )
 {
-	hoverTab = 0;
+	hoverTab = nullptr;
 }
 
 void TQTabBar::leaveEvent( TQEvent * )
 {
-	hoverTab = 0;
+	hoverTab = nullptr;
 }
 
 /*!
@@ -880,7 +880,7 @@ void TQTabBar::show()
 
 int TQTabBar::currentTab() const
 {
-    const TQTab * t = 0;
+    const TQTab * t = nullptr;
     if (l) {
         t = l->getLast();
     }
@@ -1015,7 +1015,7 @@ TQTab * TQTabBar::tab( int id ) const
 	    if ( t && t->id == id )
 		return t;
     }
-    return 0;
+    return nullptr;
 }
 
 
@@ -1123,7 +1123,7 @@ void TQTabBar::layoutTabs()
     TQSize oldSh(0, 0);
     if ( TQTab * t = l->first() ) {
 	TQRect r( t->r );
-	while ( (t = l->next()) != 0 )
+	while ( (t = l->next()) )
 	    r = r.unite( t->r );
 	oldSh = r.size();
     }
@@ -1150,7 +1150,7 @@ void TQTabBar::layoutTabs()
 	lw += t->label.contains("&&") * fm.width('&');
 	int iw = 0;
 	int ih = 0;
-	if ( t->iconset != 0 ) {
+	if ( t->iconset ) {
 	    iw = t->iconset->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4;
 	    ih = t->iconset->pixmap( TQIconSet::Small, TQIconSet::Normal ).height();
 	}
@@ -1247,8 +1247,8 @@ void TQTabBar::resizeEvent( TQResizeEvent * )
 
 void TQTabBar::scrollTabs()
 {
-    TQTab* left = 0;
-    TQTab* right = 0;
+    TQTab* left = nullptr;
+    TQTab* right = nullptr;
     for ( TQTab* t = lstatic->first(); t; t = lstatic->next() ) {
 	if ( t->r.left() < 0 && t->r.right() > 0 )
 	    left = t;
@@ -1352,7 +1352,7 @@ void TQTabBar::setToolTip( int index, const TQString & tip )
     TQTab * tab = tabAt( index );
     if ( !tab )
 	return;
-    if ( d->toolTips == 0 )
+    if ( !d->toolTips )
 	d->toolTips = new TQTabBarToolTip( this );
     d->toolTips->add( tab, tip );
 #endif
diff --git a/src/widgets/tqtabbar.h b/src/widgets/tqtabbar.h
index b9abccde0..6e5e5d9a0 100644
--- a/src/widgets/tqtabbar.h
+++ b/src/widgets/tqtabbar.h
@@ -95,7 +95,7 @@ class TQ_EXPORT TQTabBar: public TQWidget
     TQ_PROPERTY( int keyboardFocusTab READ keyboardFocusTab )
 
 public:
-    TQTabBar( TQWidget* parent=0, const char* name=0 );
+    TQTabBar( TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQTabBar();
 
     enum Shape { RoundedAbove, RoundedBelow,
@@ -166,7 +166,7 @@ private slots:
 private:
     TQPtrList<TQTab> * l;
     TQPtrList<TQTab> * lstatic;
-    void makeVisible( TQTab* t = 0 );
+    void makeVisible( TQTab* t = nullptr );
     void updateArrowButtons();
     TQTabPrivate * d;
 
diff --git a/src/widgets/tqtabwidget.cpp b/src/widgets/tqtabwidget.cpp
index 15383cbdf..58a72b413 100644
--- a/src/widgets/tqtabwidget.cpp
+++ b/src/widgets/tqtabwidget.cpp
@@ -175,7 +175,7 @@
 class TQTabBarBase : public TQWidget
 {
 public:
-    TQTabBarBase( TQTabWidget* parent=0, const char* name=0 )
+    TQTabBarBase( TQTabWidget* parent=nullptr, const char* name=nullptr )
         : TQWidget( parent, name ) {};
 protected:
     void paintEvent( TQPaintEvent * )
@@ -203,9 +203,9 @@ class TQTabWidgetData
 {
 public:
     TQTabWidgetData()
-        : tabs(0), tabBase(0), stack(0), dirty( true ),
+        : tabs(nullptr), tabBase(nullptr), stack(nullptr), dirty( true ),
           pos( TQTabWidget::Top ), shape( TQTabWidget::Rounded ),
-	  leftCornerWidget(0), rightCornerWidget(0) {};
+	  leftCornerWidget(nullptr), rightCornerWidget(nullptr) {};
     ~TQTabWidgetData(){};
     TQTabBar* tabs;
     TQTabBarBase* tabBase;
@@ -416,7 +416,7 @@ void TQTabWidget::changeTab( TQWidget *w, const TQIconSet& iconset, const TQStri
         return;
     if ( t->iconset ) {
         delete t->iconset;
-        t->iconset = 0;
+        t->iconset = nullptr;
     }
     // this will update the accelerators
     t->iconset = new TQIconSet( iconset );
@@ -989,7 +989,7 @@ TQWidget *TQTabWidget::page( int index ) const
     if ( t )
 	return d->stack->widget( t->id );
     // else
-    return 0;
+    return nullptr;
 }
 
 /*!
diff --git a/src/widgets/tqtabwidget.h b/src/widgets/tqtabwidget.h
index 6a6a75b65..2ce70ab48 100644
--- a/src/widgets/tqtabwidget.h
+++ b/src/widgets/tqtabwidget.h
@@ -67,7 +67,7 @@ class TQ_EXPORT TQTabWidget : public TQWidget
     TQ_OVERRIDE( bool autoMask DESIGNABLE true SCRIPTABLE true )
 
 public:
-    TQTabWidget( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+    TQTabWidget( TQWidget *parent = nullptr, const char *name = nullptr, WFlags f = 0 );
     ~TQTabWidget();
 
     virtual void addTab( TQWidget *, const TQString & ); // ### make these inline in 4.0
diff --git a/src/widgets/tqtextbrowser.cpp b/src/widgets/tqtextbrowser.cpp
index 9ff64703e..c0df709c6 100644
--- a/src/widgets/tqtextbrowser.cpp
+++ b/src/widgets/tqtextbrowser.cpp
@@ -439,7 +439,7 @@ class TQTextDetailPopup : public TQWidget
 {
 public:
     TQTextDetailPopup()
-	: TQWidget ( 0, "automatic TQText detail widget", WType_Popup | WDestructiveClose )
+	: TQWidget ( nullptr, "automatic TQText detail widget", WType_Popup | WDestructiveClose )
 	{
 	}
 
@@ -499,7 +499,7 @@ void TQTextBrowser::popupDetail( const TQString& contents, const TQPoint& pos )
     p.drawRect( 1, 1, w-2, h-2 );
     p.setPen( black );
 
-    doc->draw( &p, hMargin, vMargin, r, popup->colorGroup(), 0 );
+    doc->draw( &p, hMargin, vMargin, r, popup->colorGroup(), nullptr );
     delete doc;
 
     p.drawPoint( w + 5, 6 );
diff --git a/src/widgets/tqtextbrowser.h b/src/widgets/tqtextbrowser.h
index 0c09e2e66..91c3186dc 100644
--- a/src/widgets/tqtextbrowser.h
+++ b/src/widgets/tqtextbrowser.h
@@ -63,7 +63,7 @@ class TQ_EXPORT TQTextBrowser : public TQTextEdit
     TQ_OVERRIDE( bool undoRedoEnabled DESIGNABLE false SCRIPTABLE false )
 
 public:
-    TQTextBrowser( TQWidget* parent=0, const char* name=0 );
+    TQTextBrowser( TQWidget* parent=nullptr, const char* name=nullptr );
     ~TQTextBrowser();
 
     TQString source() const;
diff --git a/src/widgets/tqtextedit.cpp b/src/widgets/tqtextedit.cpp
index 75da02e01..a1666e404 100644
--- a/src/widgets/tqtextedit.cpp
+++ b/src/widgets/tqtextedit.cpp
@@ -103,7 +103,7 @@ public:
 	 clipboard_mode( TQClipboard::Clipboard ),
 #endif
 #ifdef QT_TEXTEDIT_OPTIMIZATION
-	 od(0), optimMode(false),
+	 od(nullptr), optimMode(false),
 	 maxLogLines(-1),
 	 logOffset(0),
 #endif
@@ -140,7 +140,7 @@ public:
 class TQRichTextDrag : public TQTextDrag
 {
 public:
-    TQRichTextDrag( TQWidget *dragSource = 0, const char *name = 0 );
+    TQRichTextDrag( TQWidget *dragSource = nullptr, const char *name = nullptr );
 
     void setPlainText( const TQString &txt ) { setText( txt ); }
     void setRichText( const TQString &txt ) { richTxt = txt; }
@@ -204,7 +204,7 @@ const char* TQRichTextDrag::format( int i ) const
 	return TQTextDrag::format( i );
     if ( TQTextDrag::format( i-1 ) )
 	return "application/x-qrichtext";
-    return 0;
+    return nullptr;
 }
 
 #endif
@@ -896,7 +896,7 @@ static bool block_set_alignment = false;
 
 TQTextEdit::TQTextEdit( TQWidget *parent, const char *name )
     : TQScrollView( parent, name, WStaticContents | WNoAutoErase ),
-      doc( new TQTextDocument( 0 ) ), undoRedoInfo( doc )
+      doc( new TQTextDocument( nullptr ) ), undoRedoInfo( doc )
 {
     init();
 }
@@ -924,7 +924,7 @@ TQTextEdit::TQTextEdit( TQWidget *parent, const char *name )
 TQTextEdit::TQTextEdit( const TQString& text, const TQString& context,
 		      TQWidget *parent, const char *name)
     : TQScrollView( parent, name, WStaticContents | WNoAutoErase ),
-      doc( new TQTextDocument( 0 ) ), undoRedoInfo( doc )
+      doc( new TQTextDocument( nullptr ) ), undoRedoInfo( doc )
 {
     init();
     setText( text, context );
@@ -937,7 +937,7 @@ TQTextEdit::TQTextEdit( const TQString& text, const TQString& context,
 TQTextEdit::~TQTextEdit()
 {
     delete undoRedoInfo.d;
-    undoRedoInfo.d = 0;
+    undoRedoInfo.d = nullptr;
     delete cursor;
     delete doc;
 #ifdef QT_TEXTEDIT_OPTIMIZATION
@@ -1946,7 +1946,7 @@ void TQTextEdit::removeSelectedText( int selNum )
 
     doc->removeSelectedText( selNum, cursor );
     if ( cursor->isValid() ) {
-	lastFormatted = 0; // make sync a noop
+	lastFormatted = nullptr; // make sync a noop
 	ensureCursorVisible();
 	lastFormatted = cursor->paragraph();
 	formatMore();
@@ -2203,7 +2203,7 @@ void TQTextEdit::drawCursor( bool visible )
     TQRect r( cursor->topParagraph()->rect() );
     cursor->paragraph()->setChanged( true );
     p.translate( -contentsX() + cursor->totalOffsetX(), -contentsY() + cursor->totalOffsetY() );
-    TQPixmap *pix = 0;
+    TQPixmap *pix = nullptr;
     TQColorGroup cg( colorGroup() );
     const TQColorGroup::ColorRole backRole = TQPalette::backgroundRoleFromMode(backgroundMode());
     if ( cursor->paragraph()->background() )
@@ -2423,7 +2423,7 @@ void TQTextEdit::copyToClipboard()
 	d->clipboard_mode = TQClipboard::Selection;
 
 	// don't listen to selection changes
-	disconnect( TQApplication::clipboard(), TQ_SIGNAL(selectionChanged()), this, 0);
+	disconnect( TQApplication::clipboard(), TQ_SIGNAL(selectionChanged()), this, nullptr);
 	copy();
 	// listen to selection changes
 	connect( TQApplication::clipboard(), TQ_SIGNAL(selectionChanged()),
@@ -2788,7 +2788,7 @@ void TQTextEdit::contentsContextMenuEvent( TQContextMenuEvent *e )
 	    d->clipboard_mode = TQClipboard::Selection;
 
             // don't listen to selection changes
-            disconnect( TQApplication::clipboard(), TQ_SIGNAL(selectionChanged()), this, 0);
+            disconnect( TQApplication::clipboard(), TQ_SIGNAL(selectionChanged()), this, nullptr);
 	    copy();
             // listen to selection changes
             connect( TQApplication::clipboard(), TQ_SIGNAL(selectionChanged()),
@@ -3310,7 +3310,7 @@ void TQTextEdit::undo()
 	drawCursor( true );
 	return;
     }
-    lastFormatted = 0;
+    lastFormatted = nullptr;
     repaintChanged();
     ensureCursorVisible();
     drawCursor( true );
@@ -3361,7 +3361,7 @@ void TQTextEdit::redo()
 	drawCursor( true );
 	return;
     }
-    lastFormatted = 0;
+    lastFormatted = nullptr;
     ensureCursorVisible();
     repaintChanged();
     ensureCursorVisible();
@@ -3437,7 +3437,7 @@ TQTextDrag *TQTextEdit::dragObject( TQWidget *parent ) const
 {
     if ( !doc->hasSelection( TQTextDocument::Standard ) ||
 	 doc->selectedText( TQTextDocument::Standard ).isEmpty() )
-	return 0;
+	return nullptr;
     if ( textFormat() != RichText )
 	return new TQTextDrag( doc->selectedText( TQTextDocument::Standard ), parent );
     TQRichTextDrag *drag = new TQRichTextDrag( parent );
@@ -3958,7 +3958,7 @@ void TQTextEdit::setText( const TQString &text, const TQString &context )
     undoRedoInfo.clear();
     doc->commands()->clear();
 
-    lastFormatted = 0;
+    lastFormatted = nullptr;
     int oldCursorPos = cursor->index();
     int oldCursorPar = cursor->paragraph()->paragId();
     cursor->restoreState();
@@ -4769,7 +4769,7 @@ TQMimeSourceFactory* TQTextEdit::mimeSourceFactory() const
 int TQTextEdit::heightForWidth( int w ) const
 {
     int oldw = doc->width();
-    doc->doLayout( 0, w );
+    doc->doLayout( nullptr, w );
     int h = doc->height();
     doc->setWidth( oldw );
     doc->invalidate();
@@ -5076,7 +5076,7 @@ void TQTextEdit::updateStyles()
 
 void TQTextEdit::setDocument( TQTextDocument *dc )
 {
-    if ( dc == 0 ) {
+    if ( !dc ) {
         tqWarning( "Q3TextEdit::setDocument() called with null Q3TextDocument pointer" );
         return;
     }
@@ -5088,7 +5088,7 @@ void TQTextEdit::setDocument( TQTextDocument *dc )
     cursor = new TQTextCursor( doc );
     clearUndoRedo();
     undoRedoInfo.doc = doc;
-    lastFormatted = 0;
+    lastFormatted = nullptr;
 }
 
 #ifndef TQT_NO_CLIPBOARD
@@ -5453,7 +5453,7 @@ void TQTextEdit::setWrapPolicy( WrapPolicy policy )
 	formatter = new TQTextFormatterBreakInWords;
     }
     formatter->setWrapAtColumn( document()->formatter()->wrapAtColumn() );
-    formatter->setWrapEnabled( document()->formatter()->isWrapEnabled( 0 ) );
+    formatter->setWrapEnabled( document()->formatter()->isWrapEnabled( nullptr ) );
     document()->setFormatter( formatter );
     doc->invalidate();
     updateContents();
@@ -5490,7 +5490,7 @@ void TQTextEdit::clear()
 	doc->clear( true );
 	delete cursor;
 	cursor = new TQTextCursor( doc );
-	lastFormatted = 0;
+	lastFormatted = nullptr;
     }
     updateContents();
 
@@ -5712,7 +5712,7 @@ TQPopupMenu *TQTextEdit::createPopupMenu( const TQPoint& pos )
 
 TQPopupMenu *TQTextEdit::createPopupMenu()
 {
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -6147,7 +6147,7 @@ void TQTextEdit::clipboardChanged()
 {
 #ifndef TQT_NO_CLIPBOARD
     // don't listen to selection changes
-    disconnect( TQApplication::clipboard(), TQ_SIGNAL(selectionChanged()), this, 0);
+    disconnect( TQApplication::clipboard(), TQ_SIGNAL(selectionChanged()), this, nullptr);
 #endif
     selectAll(false);
 }
@@ -6213,7 +6213,7 @@ bool TQTextEdit::checkOptimMode()
 	    connect( formatTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( formatMore() ) );
 	    setText( optimText() );
 	    delete d->od;
-	    d->od = 0;
+	    d->od = nullptr;
 	}
     }
     return d->optimMode;
@@ -6231,7 +6231,7 @@ TQString TQTextEdit::optimText() const
     int i;
     int offset;
     TQMapConstIterator<int,TQTextEditOptimPrivate::Tag *> it;
-    TQTextEditOptimPrivate::Tag * ftag = 0;
+    TQTextEditOptimPrivate::Tag * ftag = nullptr;
     for ( i = 0; i < d->od->numLines; i++ ) {
 	if ( d->od->lines[ LOGOFFSET(i) ].isEmpty() ) { // CR lines are empty
 	    str += "\n";
@@ -6289,18 +6289,18 @@ TQTextEditOptimPrivate::Tag * TQTextEdit::optimAppendTag( int index, const TQStr
 {
     TQTextEditOptimPrivate::Tag * t = new TQTextEditOptimPrivate::Tag, * tmp;
 
-    if ( d->od->tags == 0 )
+    if ( !d->od->tags )
 	d->od->tags = t;
     t->bold = t->italic = t->underline = false;
     t->line  = d->od->numLines;
     t->index = index;
     t->tag   = tag;
-    t->leftTag = 0;
-    t->parent  = 0;
+    t->leftTag = nullptr;
+    t->parent  = nullptr;
     t->prev = d->od->lastTag;
     if ( d->od->lastTag )
 	d->od->lastTag->next = t;
-    t->next = 0;
+    t->next = nullptr;
     d->od->lastTag = t;
     tmp = d->od->tagIndex[ LOGOFFSET(t->line) ];
     if ( !tmp || (tmp && tmp->index > t->index) ) {
@@ -6318,16 +6318,16 @@ TQTextEditOptimPrivate::Tag *TQTextEdit::optimInsertTag(int line, int index, con
 {
     TQTextEditOptimPrivate::Tag *t = new TQTextEditOptimPrivate::Tag, *tmp;
 
-    if (d->od->tags == 0)
+    if (!d->od->tags)
 	d->od->tags = t;
     t->bold = t->italic = t->underline = false;
     t->line  = line;
     t->index = index;
     t->tag   = tag;
-    t->leftTag = 0;
-    t->parent  = 0;
-    t->next = 0;
-    t->prev = 0;
+    t->leftTag = nullptr;
+    t->parent  = nullptr;
+    t->next = nullptr;
+    t->prev = nullptr;
 
     // find insertion pt. in tag struct.
     TQMap<int,TQTextEditOptimPrivate::Tag *>::ConstIterator it;
@@ -6344,11 +6344,11 @@ TQTextEditOptimPrivate::Tag *TQTextEdit::optimInsertTag(int line, int index, con
 	while (tmp && tmp->next && tmp->next->line < line)
 	    tmp = tmp->next;
 	if (tmp == d->od->tags)
-	    tmp = 0;
+	    tmp = nullptr;
     }
 
     t->prev = tmp;
-    t->next = tmp ? tmp->next : 0;
+    t->next = tmp ? tmp->next : nullptr;
     if (t->next)
 	t->next->prev = t;
     if (tmp)
@@ -6693,7 +6693,7 @@ void TQTextEdit::optimInsert(const TQString& text, int line, int index)
 
     TQStringList strl = TQStringList::split('\n', text, true);
     int numNewLines = (int)strl.count() - 1;
-    TQTextEditOptimPrivate::Tag *tag = 0;
+    TQTextEditOptimPrivate::Tag *tag = nullptr;
     TQMap<int,TQTextEditOptimPrivate::Tag *>::ConstIterator ii;
     int x;
 
@@ -6810,7 +6810,7 @@ void TQTextEdit::optimInsert(const TQString& text, int line, int index)
  */
 TQTextEditOptimPrivate::Tag * TQTextEdit::optimPreviousLeftTag( int line )
 {
-    TQTextEditOptimPrivate::Tag * ftag = 0;
+    TQTextEditOptimPrivate::Tag * ftag = nullptr;
     TQMapConstIterator<int,TQTextEditOptimPrivate::Tag *> it;
     if ( (it = d->od->tagIndex.find( LOGOFFSET(line) )) != d->od->tagIndex.end() )
 	ftag = it.data();
@@ -6818,7 +6818,7 @@ TQTextEditOptimPrivate::Tag * TQTextEdit::optimPreviousLeftTag( int line )
 	// start searching for an open tag
 	ftag = d->od->tags;
 	while ( ftag ) {
-	    if ( ftag->line > line || ftag->next == 0 ) {
+	    if ( ftag->line > line || !ftag->next ) {
 		if ( ftag->line > line )
 		    ftag = ftag->prev;
 		break;
@@ -6833,7 +6833,7 @@ TQTextEditOptimPrivate::Tag * TQTextEdit::optimPreviousLeftTag( int line )
 	if ( ftag && ftag->parent ) // use the open parent tag
 	    ftag = ftag->parent;
 	else if ( ftag && ftag->leftTag ) // this is a right-tag with no parent
-	    ftag = 0;
+	    ftag = nullptr;
     }
     return ftag;
 }
@@ -6919,7 +6919,7 @@ void TQTextEdit::optimDrawContents( TQPainter * p, int clipx, int clipy,
     for ( i = startLine; i < (startLine + nLines); i++ )
 	str.append( d->od->lines[ LOGOFFSET(i) ] + "\n" );
 
-    TQTextDocument * td = new TQTextDocument( 0 );
+    TQTextDocument * td = new TQTextDocument( nullptr );
     td->setDefaultFormat( TQScrollView::font(), TQColor() );
     td->setPlainText( str );
     td->setFormatter( new TQTextFormatterBreakWords ); // deleted by TQTextDoc
@@ -6939,7 +6939,7 @@ void TQTextEdit::optimDrawContents( TQPainter * p, int clipx, int clipy,
     if ( d->od->tags ) {
 	int i = startLine;
 	TQMapConstIterator<int,TQTextEditOptimPrivate::Tag *> it;
-	TQTextEditOptimPrivate::Tag * tag = 0, * tmp = 0;
+	TQTextEditOptimPrivate::Tag * tag = nullptr, * tmp = nullptr;
 	TQTextCursor cur( td );
 	// Step 1 - find previous left-tag
 	tmp = optimPreviousLeftTag( i );
@@ -6949,7 +6949,7 @@ void TQTextEdit::optimDrawContents( TQPainter * p, int clipx, int clipy,
 	    // Step 2 - iterate over tags on the current line
 	    int lastIndex = 0;
 	    while ( tag && tag->line == i ) {
-		tmp = 0;
+		tmp = nullptr;
 		if ( tag->prev && !tag->prev->leftTag ) {
 		    tmp = tag->prev;
 		} else if ( tag->prev && tag->prev->parent ) {
@@ -7421,9 +7421,9 @@ void TQTextEdit::optimCheckLimit( const TQString& str )
 	while ( itr ){
 	    for ( tmp = lst.first(); tmp; tmp = lst.next() ) {
 		if ( itr->parent == tmp )
-		    itr->parent = 0;
+		    itr->parent = nullptr;
 		if ( itr->leftTag == tmp )
-		    itr->leftTag = 0;
+		    itr->leftTag = nullptr;
 	    }
 	    itr = itr->next;
 	}
@@ -7477,7 +7477,7 @@ TQSyntaxHighlighter * TQTextEdit::syntaxHighlighter() const
     if (document()->preProcessor())
 	return ((TQSyntaxHighlighterInternal *) document()->preProcessor())->highlighter;
     else
-	return 0;
+	return nullptr;
 }
 
 #endif //TQT_NO_TEXTEDIT
diff --git a/src/widgets/tqtextedit.h b/src/widgets/tqtextedit.h
index 27846637a..194cbb0aa 100644
--- a/src/widgets/tqtextedit.h
+++ b/src/widgets/tqtextedit.h
@@ -101,7 +101,7 @@ public:
 	selStart.line = selStart.index = -1;
 	selEnd.line = selEnd.index = -1;
 	search.line = search.index = 0;
-	tags = lastTag = 0;
+	tags = lastTag = nullptr;
     }
     void clearTags()
     {
@@ -111,7 +111,7 @@ public:
 	    tags = tags->next;
 	    delete itr;
 	}
-	tags = lastTag = 0;
+	tags = lastTag = nullptr;
 	tagIndex.clear();
     }
     ~TQTextEditOptimPrivate()
@@ -220,8 +220,8 @@ public:
     };
 
     TQTextEdit( const TQString& text, const TQString& context = TQString::null,
-	       TQWidget* parent=0, const char* name=0);
-    TQTextEdit( TQWidget* parent=0, const char* name=0 );
+	       TQWidget* parent=nullptr, const char* name=nullptr);
+    TQTextEdit( TQWidget* parent=nullptr, const char* name=nullptr );
     virtual ~TQTextEdit();
     void setPalette( const TQPalette & );
 
@@ -234,7 +234,7 @@ public:
     void getSelection( int *paraFrom, int *indexFrom,
 		    int *paraTo, int *indexTo, int selNum = 0 ) const;
     virtual bool find( const TQString &expr, bool cs, bool wo, bool forward = true,
-		       int *para = 0, int *index = 0 );
+		       int *para = nullptr, int *index = nullptr );
 
     int paragraphs() const;
     int lines() const;
@@ -371,7 +371,7 @@ public slots:
     virtual void setUndoDepth( int d );
     virtual void setFormat( TQTextFormat *f, int flags );
     virtual void ensureCursorVisible();
-    virtual void placeCursor( const TQPoint &pos, TQTextCursor *c = 0 );
+    virtual void placeCursor( const TQPoint &pos, TQTextCursor *c = nullptr );
     virtual void moveCursor( CursorAction action, bool select );
     virtual void doKeyboardAction( KeyboardAction action );
     virtual void removeSelectedText( int selNum = 0 );
@@ -504,7 +504,7 @@ private:
     void copyToClipboard();
 #ifndef TQT_NO_MIME
     TQCString pickSpecial(TQMimeSource* ms, bool always_ask, const TQPoint&);
-    TQTextDrag *dragObject( TQWidget *parent = 0 ) const;
+    TQTextDrag *dragObject( TQWidget *parent = nullptr ) const;
 #endif
 #ifndef TQT_NO_MIMECLIPBOARD
     void pasteSpecial(const TQPoint&);
diff --git a/src/widgets/tqtextview.h b/src/widgets/tqtextview.h
index 8970d10c8..7b0059326 100644
--- a/src/widgets/tqtextview.h
+++ b/src/widgets/tqtextview.h
@@ -58,8 +58,8 @@ class TQ_EXPORT TQTextView : public TQTextEdit
 
 public:
     TQTextView( const TQString& text, const TQString& context = TQString::null,
-	       TQWidget* parent=0, const char* name=0);
-    TQTextView( TQWidget* parent=0, const char* name=0 );
+	       TQWidget* parent=nullptr, const char* name=nullptr);
+    TQTextView( TQWidget* parent=nullptr, const char* name=nullptr );
 
     virtual ~TQTextView();
 
diff --git a/src/widgets/tqtitlebar.cpp b/src/widgets/tqtitlebar.cpp
index 2611c36b7..63541146a 100644
--- a/src/widgets/tqtitlebar.cpp
+++ b/src/widgets/tqtitlebar.cpp
@@ -136,7 +136,7 @@ class TQTitleBarPrivate
 {
 public:
     TQTitleBarPrivate()
-	: toolTip( 0 ), act( 0 ), window( 0 ), movable( 1 ), pressed( 0 ), autoraise(0)
+	: toolTip( nullptr ), act( 0 ), window( nullptr ), movable( 1 ), pressed( 0 ), autoraise(0)
     {
     }
 
@@ -188,7 +188,7 @@ TQTitleBar::~TQTitleBar()
 #endif
 
     delete d;
-    d = 0;
+    d = nullptr;
 }
 
 #ifdef TQ_WS_WIN
@@ -257,8 +257,8 @@ void TQTitleBar::mousePressEvent( TQMouseEvent * e)
 	case TQStyle::SC_TitleBarSysMenu:
 	    if ( testWFlags( WStyle_SysMenu ) && !testWFlags( WStyle_Tool ) ) {
 		d->buttonDown = TQStyle::SC_None;
-		static TQTime* t = 0;
-		static TQTitleBar* tc = 0;
+		static TQTime* t = nullptr;
+		static TQTitleBar* tc = nullptr;
 		if ( !t )
 		    t = new TQTime;
 		if ( tc != this || t->elapsed() > TQApplication::doubleClickInterval() ) {
@@ -266,7 +266,7 @@ void TQTitleBar::mousePressEvent( TQMouseEvent * e)
 		    t->start();
 		    tc = this;
 		} else {
-		    tc = 0;
+		    tc = nullptr;
 		    emit doClose();
 		    return;
 		}
diff --git a/src/widgets/tqtitlebar_p.h b/src/widgets/tqtitlebar_p.h
index e3d20023e..5ccdb1456 100644
--- a/src/widgets/tqtitlebar_p.h
+++ b/src/widgets/tqtitlebar_p.h
@@ -73,7 +73,7 @@ class TQ_EXPORT TQTitleBar : public TQWidget
     TQ_PROPERTY( bool movable READ isMovable WRITE setMovable )
 
 public:
-    TQTitleBar (TQWidget* w, TQWidget* parent, const char* name=0);
+    TQTitleBar (TQWidget* w, TQWidget* parent, const char* name=nullptr);
     ~TQTitleBar();
 
     bool isActive() const;
diff --git a/src/widgets/tqtoolbar.cpp b/src/widgets/tqtoolbar.cpp
index f571ffad8..982575e70 100644
--- a/src/widgets/tqtoolbar.cpp
+++ b/src/widgets/tqtoolbar.cpp
@@ -102,7 +102,7 @@ class TQToolBarSeparator : public TQWidget
 {
     TQ_OBJECT
 public:
-    TQToolBarSeparator( Orientation, TQToolBar *parent, const char* name=0 );
+    TQToolBarSeparator( Orientation, TQToolBar *parent, const char* name=nullptr );
 
     TQSize sizeHint() const;
     Orientation orientation() const { return orient; }
@@ -375,9 +375,9 @@ TQToolBar::TQToolBar( TQMainWindow * parent, const char * name )
 void TQToolBar::init()
 {
     d = new TQToolBarPrivate;
-    d->extension = 0;
-    d->extensionPopup = 0;
-    sw = 0;
+    d->extension = nullptr;
+    d->extensionPopup = nullptr;
+    sw = nullptr;
 
     setBackgroundMode( PaletteButton);
     setFocusPolicy( NoFocus );
@@ -392,7 +392,7 @@ void TQToolBar::init()
 TQToolBar::~TQToolBar()
 {
     delete d;
-    d = 0;
+    d = nullptr;
 }
 
 /*!
@@ -406,7 +406,7 @@ void TQToolBar::setOrientation( Orientation o )
 	d->extension->setOrientation( o );
     TQObjectList *childs = queryList( "TQToolBarSeparator" );
     if ( childs ) {
-        TQObject *ob = 0;
+        TQObject *ob = nullptr;
 	for ( ob = childs->first(); ob; ob = childs->next() ) {
 	    TQToolBarSeparator* w = (TQToolBarSeparator*)ob;
 	    w->setOrientation( o );
@@ -432,7 +432,7 @@ void TQToolBar::styleChange( TQStyle& )
 {
     TQObjectList *childs = queryList( "TQWidget" );
     if ( childs ) {
-        TQObject *ob = 0;
+        TQObject *ob = nullptr;
 	for ( ob = childs->first(); ob; ob = childs->next() ) {
 	    TQWidget *w = (TQWidget*)ob;
             if ( ::tqt_cast<TQToolButton*>(w) || ::tqt_cast<TQToolBarSeparator*>(w) )
@@ -568,7 +568,7 @@ void TQToolBar::clear()
 	return;
     TQObjectListIt it( *children() );
     TQObject * obj;
-    while( (obj=it.current()) != 0 ) {
+    while( (obj=it.current()) ) {
 	++it;
 	if ( obj->isWidgetType() &&
 	     qstrcmp( "qt_dockwidget_internal", obj->name() ) != 0 )
@@ -614,11 +614,11 @@ void TQToolBar::createPopup()
 
     d->extensionPopup->clear();
     // clear doesn't delete submenus, so do this explicitly
-    TQObjectList *childlist = d->extensionPopup->queryList( "TQPopupMenu", 0, false, true );
+    TQObjectList *childlist = d->extensionPopup->queryList( "TQPopupMenu", nullptr, false, true );
     childlist->setAutoDelete(true);
     delete childlist;
 
-    childlist = queryList( "TQWidget", 0, false, true );
+    childlist = queryList( "TQWidget", nullptr, false, true );
     TQObjectListIt it( *childlist );
     bool hide = false;
     bool doHide = false;
@@ -746,15 +746,15 @@ void TQToolBar::checkForExtension( const TQSize &sz )
 	    d->extension->raise();
 	} else {
 	    delete d->extension;
-	    d->extension = 0;
+	    d->extension = nullptr;
 	    delete d->extensionPopup;
-	    d->extensionPopup = 0;
+	    d->extensionPopup = nullptr;
 	}
     } else {
 	delete d->extension;
-	d->extension = 0;
+	d->extension = nullptr;
 	delete d->extensionPopup;
-	d->extensionPopup = 0;
+	d->extensionPopup = nullptr;
     }
 }
 
diff --git a/src/widgets/tqtoolbar.h b/src/widgets/tqtoolbar.h
index 4e450075e..d9e4a9343 100644
--- a/src/widgets/tqtoolbar.h
+++ b/src/widgets/tqtoolbar.h
@@ -60,10 +60,10 @@ class TQ_EXPORT TQToolBar: public TQDockWindow
 public:
     TQToolBar( const TQString &label,
 	      TQMainWindow *, ToolBarDock = DockTop,
-	      bool newLine = false, const char* name=0 );
+	      bool newLine = false, const char* name=nullptr );
     TQToolBar( const TQString &label, TQMainWindow *, TQWidget *,
-	      bool newLine = false, const char* name=0, WFlags f = 0 );
-    TQToolBar( TQMainWindow* parent=0, const char* name=0 );
+	      bool newLine = false, const char* name=nullptr, WFlags f = 0 );
+    TQToolBar( TQMainWindow* parent=nullptr, const char* name=nullptr );
     ~TQToolBar();
 
     void addSeparator();
diff --git a/src/widgets/tqtoolbox.cpp b/src/widgets/tqtoolbox.cpp
index d99033358..562216dae 100644
--- a/src/widgets/tqtoolbox.cpp
+++ b/src/widgets/tqtoolbox.cpp
@@ -113,7 +113,7 @@ public:
     typedef TQValueList<Page> PageList;
 
     inline TQToolBoxPrivate()
-	: currentPage( 0 )
+	: currentPage( nullptr )
     {
     }
 
@@ -130,24 +130,24 @@ public:
 TQToolBoxPrivate::Page *TQToolBoxPrivate::page( TQWidget *widget )
 {
     if ( !widget )
-	return 0;
+	return nullptr;
 
     for ( PageList::ConstIterator i = pageList.constBegin(); i != pageList.constEnd(); ++i )
 	if ( (*i).widget == widget )
 	    return (Page*) &(*i);
-    return 0;
+    return nullptr;
 }
 
 TQToolBoxPrivate::Page *TQToolBoxPrivate::page( int index )
 {
     if (index >= 0 && index < (int)pageList.size() )
 	return &*pageList.at(index);
-    return 0;
+    return nullptr;
 }
 
 void TQToolBoxPrivate::updateTabs()
 {
-    TQToolBoxButton *lastButton = currentPage ? currentPage->button : 0;
+    TQToolBoxButton *lastButton = currentPage ? currentPage->button : nullptr;
     bool after = false;
     for ( PageList::ConstIterator i = pageList.constBegin(); i != pageList.constEnd(); ++i ) {
 	if (after) {
@@ -233,7 +233,7 @@ void TQToolBoxButton::drawButton( TQPainter *p )
 
     TQToolBox *tb = (TQToolBox*)parentWidget();
 
-    const TQColor* fill = 0;
+    const TQColor* fill = nullptr;
     if ( selected &&
 	 style().styleHint( TQStyle::SH_ToolBox_SelectedPageTitleBold ) &&
 	 tb->backgroundMode() != NoBackground )
@@ -244,7 +244,7 @@ void TQToolBoxButton::drawButton( TQPainter *p )
 	alignment |= NoAccel;
     }
     style().drawItem( p, tr, alignment, cg,
-		      isEnabled(), 0, txt, -1, fill );
+		      isEnabled(), nullptr, txt, -1, fill );
 
     if ( !txt.isEmpty() && hasFocus() )
 	style().drawPrimitive( TQStyle::PE_FocusRect, p, tr, cg );
@@ -379,7 +379,7 @@ int TQToolBox::insertItem( int index, TQWidget *item, const TQIconSet &iconSet,
 	    TQWidget *current = d->currentPage->widget;
 	    int oldindex = indexOf(current);
 	    if ( index <= oldindex ) {
-		d->currentPage = 0; // trigger change
+		d->currentPage = nullptr; // trigger change
 		setCurrentIndex(oldindex);
 	    }
 	}
@@ -395,7 +395,7 @@ int TQToolBox::insertItem( int index, TQWidget *item, const TQIconSet &iconSet,
 void TQToolBox::buttonClicked()
 {
     TQToolBoxButton *tb = ::tqt_cast<TQToolBoxButton*>(sender());
-    TQWidget* item = 0;
+    TQWidget* item = nullptr;
     for ( TQToolBoxPrivate::PageList::ConstIterator i = d->pageList.constBegin(); i != d->pageList.constEnd(); ++i )
 	if ( (*i).button == tb ) {
 	    item = (*i).widget;
@@ -469,10 +469,10 @@ void TQToolBox::itemDestroyed(TQObject *object)
     d->pageList.remove( *c );
 
     if ( !d->pageList.count() ) {
-	d->currentPage = 0;
+	d->currentPage = nullptr;
 	emit currentChanged(-1);
     } else if ( removeCurrent ) {
-	d->currentPage = 0;
+	d->currentPage = nullptr;
 	setCurrentIndex(0);
     }
 }
@@ -503,7 +503,7 @@ int TQToolBox::removeItem( TQWidget *item )
 
 TQWidget *TQToolBox::currentItem() const
 {
-    return d->currentPage ? d->currentPage->widget : 0;
+    return d->currentPage ? d->currentPage->widget : nullptr;
 }
 
 /*!
@@ -526,7 +526,7 @@ int TQToolBox::currentIndex() const
 TQWidget *TQToolBox::item( int index ) const
 {
     if ( index < 0 || index >= (int) d->pageList.size() )
-	return 0;
+	return nullptr;
     return (*d->pageList.at( index )).widget;
 }
 
diff --git a/src/widgets/tqtoolbox.h b/src/widgets/tqtoolbox.h
index 752266d19..715df31d2 100644
--- a/src/widgets/tqtoolbox.h
+++ b/src/widgets/tqtoolbox.h
@@ -58,7 +58,7 @@ class TQ_EXPORT TQToolBox : public TQFrame
     TQ_PROPERTY( int count READ count )
 
 public:
-    TQToolBox( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+    TQToolBox( TQWidget *parent = nullptr, const char *name = nullptr, WFlags f = 0 );
     ~TQToolBox();
 
     int addItem( TQWidget *item, const TQString &label );
diff --git a/src/widgets/tqtoolbutton.cpp b/src/widgets/tqtoolbutton.cpp
index 176059290..fb5693acf 100644
--- a/src/widgets/tqtoolbutton.cpp
+++ b/src/widgets/tqtoolbutton.cpp
@@ -193,8 +193,8 @@ void TQToolButton::init()
     d->textPos = Under;
 #ifndef TQT_NO_POPUPMENU
     d->delay = 600;
-    d->popup = 0;
-    d->popupTimer = 0;
+    d->popup = nullptr;
+    d->popupTimer = nullptr;
 #endif
     d->autoraise = false;
     d->arrow = LeftArrow;
@@ -207,7 +207,7 @@ void TQToolButton::init()
     ubp = true;
     hasArrow = false;
 
-    s = 0;
+    s = nullptr;
 
     setFocusPolicy( NoFocus );
     setBackgroundMode( PaletteButton);
@@ -271,8 +271,8 @@ TQToolButton::TQToolButton( const TQIconSet& iconSet, const TQString &textLabel,
 TQToolButton::~TQToolButton()
 {
 #ifndef TQT_NO_POPUPMENU
-    d->popupTimer = 0;
-    d->popup = 0;
+    d->popupTimer = nullptr;
+    d->popup = nullptr;
 #endif
     delete d;
     delete s;
@@ -920,7 +920,7 @@ void TQToolButton::setText( const TQString &txt )
     TQButton::setText( txt );
     if ( !text().isEmpty() ) {
 	delete s;
-	s = 0;
+	s = nullptr;
     }
 }
 
diff --git a/src/widgets/tqtoolbutton.h b/src/widgets/tqtoolbutton.h
index 34842590e..83e8efbd1 100644
--- a/src/widgets/tqtoolbutton.h
+++ b/src/widgets/tqtoolbutton.h
@@ -79,14 +79,14 @@ public:
 	Right = BesideIcon, // obsolete
 	Under = BelowIcon // obsolete
     };
-    TQToolButton( TQWidget * parent, const char* name=0 );
+    TQToolButton( TQWidget * parent, const char* name=nullptr );
 #ifndef TQT_NO_TOOLBAR
     TQToolButton( const TQIconSet& s, const TQString &textLabel,
 		 const TQString& grouptext,
 		 TQObject * receiver, const char* slot,
-		 TQToolBar * parent, const char* name=0 );
+		 TQToolBar * parent, const char* name=nullptr );
 #endif
-    TQToolButton( ArrowType type, TQWidget *parent, const char* name=0 );
+    TQToolButton( ArrowType type, TQWidget *parent, const char* name=nullptr );
     ~TQToolButton();
 
     TQSize sizeHint() const;
diff --git a/src/widgets/tqtooltip.cpp b/src/widgets/tqtooltip.cpp
index 8599a611d..6fa41ed32 100644
--- a/src/widgets/tqtooltip.cpp
+++ b/src/widgets/tqtooltip.cpp
@@ -144,7 +144,7 @@ private:
 
 // We have a global, internal TQTipManager object
 
-static TQTipManager *tipManager	  = 0;
+static TQTipManager *tipManager	  = nullptr;
 
 static void initTipManager()
 {
@@ -160,9 +160,9 @@ TQTipManager::TQTipManager()
 {
     wakeUpDelay = 700;
     tips = new TQPtrDict<TQTipManager::Tip>( 313 );
-    currentTip = 0;
-    previousTip = 0;
-    label = 0;
+    currentTip = nullptr;
+    previousTip = nullptr;
+    label = nullptr;
     preventAnimation = false;
     isApplicationFilter = false;
     connect( &wakeUp, TQ_SIGNAL(timeout()), TQ_SLOT(showTip()) );
@@ -179,13 +179,13 @@ TQTipManager::~TQTipManager()
     }
 
     delete label;
-    label = 0;
+    label = nullptr;
 
     if ( tips ) {
 	TQPtrDictIterator<TQTipManager::Tip> i( *tips );
 	TQTipManager::Tip *t, *n;
 	void *k;
-	while( (t = i.current()) != 0 ) {
+	while( (t = i.current()) ) {
 	    k = i.currentKey();
 	    ++i;
 	    tips->take( k );
@@ -198,7 +198,7 @@ TQTipManager::~TQTipManager()
 	delete tips;
     }
 
-    tipManager = 0;
+    tipManager = nullptr;
 }
 
 void TQTipManager::add( const TQRect &gm, TQWidget *w,
@@ -259,7 +259,7 @@ void TQTipManager::add( TQWidget *w, const TQRect &r, const TQString &s,
 void TQTipManager::remove( TQWidget *w, const TQRect & r, bool delayhide )
 {
     TQTipManager::Tip *t = (*tips)[ w ];
-    if ( t == 0 )
+    if ( !t )
 	return;
 
     if ( t == currentTip ) {
@@ -270,7 +270,7 @@ void TQTipManager::remove( TQWidget *w, const TQRect & r, bool delayhide )
 	}
 
     if ( t == previousTip )
-	previousTip = 0;
+	previousTip = nullptr;
 
     if ( ( currentTip != t || !delayhide ) && t->rect == r ) {
 	tips->take( w );
@@ -287,7 +287,7 @@ void TQTipManager::remove( TQWidget *w, const TQRect & r, bool delayhide )
 	}
     }
 
-    if ( (*tips)[ w ] == 0 )
+    if ( !(*tips)[ w ] )
 	disconnect( w, TQ_SIGNAL(destroyed()), this, TQ_SLOT(clientWidgetDestroyed()) );
 #if 0 // not needed, leads sometimes to crashes
     if ( tips->isEmpty() ) {
@@ -305,7 +305,7 @@ void TQTipManager::remove( TQWidget *w, const TQRect & r, bool delayhide )
 
 void TQTipManager::labelDestroyed()
 {
-    label = 0;
+    label = nullptr;
 }
 
 
@@ -324,7 +324,7 @@ void TQTipManager::clientWidgetDestroyed()
 void TQTipManager::remove( TQWidget *w )
 {
     TQTipManager::Tip *t = (*tips)[ w ];
-    if ( t == 0 )
+    if ( !t )
 	return;
 
     tips->take( w );
@@ -351,14 +351,14 @@ void TQTipManager::removeFromGroup( TQToolTipGroup *g )
 {
     TQPtrDictIterator<TQTipManager::Tip> i( *tips );
     TQTipManager::Tip *t;
-    while( (t = i.current()) != 0 ) {
+    while( (t = i.current()) ) {
 	++i;
 	while ( t ) {
 	    if ( t->group == g ) {
 		if ( t->group )
 		    disconnect( removeTimer, TQ_SIGNAL( timeout() ),
 				t->group, TQ_SIGNAL( removeTip() ) );
-		t->group = 0;
+		t->group = nullptr;
 	    }
 	    t = t->next;
 	}
@@ -392,11 +392,11 @@ bool TQTipManager::eventFilter( TQObject *obj, TQEvent *e )
 	return false;
     }
 
-    TQTipManager::Tip *t = 0;
+    TQTipManager::Tip *t = nullptr;
     while( w && !t ) {
 	t = (*tips)[ w ];
 	if ( !t )
-	    w = w->isTopLevel() ? 0 : w->parentWidget();
+	    w = w->isTopLevel() ? nullptr : w->parentWidget();
     }
     if ( !w )
 	return false;
@@ -440,7 +440,7 @@ bool TQTipManager::eventFilter( TQObject *obj, TQEvent *e )
 		    if ( fallAsleep.isActive() ) {
 			wakeUp.start( 1, true );
 		    } else {
-			previousTip = 0;
+			previousTip = nullptr;
 			wakeUp.start( wakeUpDelay, true );
 		    }
 		    if ( t->group && t->group->ena &&
@@ -484,7 +484,7 @@ void TQTipManager::showTip()
     TQTipManager::Tip *t = (*tips)[ widget ];
     while ( t && !t->rect.contains( pos ) )
 	t = t->next;
-    if ( t == 0 )
+    if ( !t )
 	return;
 
     if ( t == currentTip && label && label->isVisible() )
@@ -592,7 +592,7 @@ void TQTipManager::showTip()
     }
 
     currentTip = t;
-    previousTip = 0;
+    previousTip = nullptr;
 }
 
 
@@ -617,10 +617,10 @@ void TQTipManager::hideTip()
     }
 
     previousTip = currentTip;
-    currentTip = 0;
+    currentTip = nullptr;
     if ( previousTip && previousTip->autoDelete )
 	remove( widget, previousTip->rect );
-    widget = 0;
+    widget = nullptr;
 }
 
 void  TQTipManager::hideTipAndSleep()
@@ -749,7 +749,7 @@ void TQTipManager::setWakeUpDelay ( int i )
 
 TQFont TQToolTip::font()
 {
-    TQTipLabel l(0,"");
+    TQTipLabel l(nullptr,"");
     return TQApplication::font( &l );
 }
 
@@ -774,7 +774,7 @@ void TQToolTip::setFont( const TQFont &font )
 
 TQPalette TQToolTip::palette()
 {
-    TQTipLabel l(0,"");
+    TQTipLabel l(nullptr,"");
     return TQApplication::palette( &l );
 }
 
@@ -842,7 +842,7 @@ void TQToolTip::add( TQWidget *widget, const TQString &text )
 {
     initTipManager();
     tipManager->add( widget, entireWidget(),
-		     text, 0, TQString::null, 0, false );
+		     text, nullptr, TQString::null, nullptr, false );
 }
 
 
@@ -862,7 +862,7 @@ void TQToolTip::add( TQWidget *widget, const TQString &text,
 		    TQToolTipGroup *group, const TQString& longText )
 {
     initTipManager();
-    tipManager->add( widget, entireWidget(), text, group, longText, 0, false );
+    tipManager->add( widget, entireWidget(), text, group, longText, nullptr, false );
 }
 
 
@@ -889,7 +889,7 @@ void TQToolTip::remove( TQWidget * widget )
 void TQToolTip::add( TQWidget * widget, const TQRect & rect, const TQString &text )
 {
     initTipManager();
-    tipManager->add( widget, rect, text, 0, TQString::null, 0, false );
+    tipManager->add( widget, rect, text, nullptr, TQString::null, nullptr, false );
 }
 
 
@@ -912,7 +912,7 @@ void TQToolTip::add( TQWidget *widget, const TQRect &rect,
 		    TQToolTipGroup *group, const TQString& groupText )
 {
     initTipManager();
-    tipManager->add( widget, rect, text, group, groupText, 0, false );
+    tipManager->add( widget, rect, text, group, groupText, nullptr, false );
 }
 
 
@@ -1003,7 +1003,7 @@ void TQToolTip::hide()
 void TQToolTip::tip( const TQRect & rect, const TQString &text )
 {
     initTipManager();
-    tipManager->add( parentWidget(), rect, text, 0, TQString::null, 0, true );
+    tipManager->add( parentWidget(), rect, text, nullptr, TQString::null, nullptr, true );
 }
 
 /*!
@@ -1022,7 +1022,7 @@ void TQToolTip::tip( const TQRect & rect, const TQString &text,
 		    const TQString& groupText )
 {
     initTipManager();
-    tipManager->add( parentWidget(), rect, text, group(), groupText, 0, true );
+    tipManager->add( parentWidget(), rect, text, group(), groupText, nullptr, true );
 }
 
 /*!
@@ -1042,7 +1042,7 @@ void TQToolTip::tip( const TQRect & rect, const TQString &text,
 void TQToolTip::tip( const TQRect &rect, const TQString &text, const TQRect &geometry )
 {
     initTipManager();
-    tipManager->add( geometry, parentWidget(), rect, text, 0, TQString::null, 0, true );
+    tipManager->add( geometry, parentWidget(), rect, text, nullptr, TQString::null, nullptr, true );
 }
 
 /*!
@@ -1063,7 +1063,7 @@ void TQToolTip::tip( const TQRect &rect, const TQString &text, const TQRect &geo
 void TQToolTip::tip( const TQRect &rect, const TQString &text, const TQString& groupText, const TQRect &geometry )
 {
     initTipManager();
-    tipManager->add( geometry, parentWidget(), rect, text, group(), groupText, 0, true );
+    tipManager->add( geometry, parentWidget(), rect, text, group(), groupText, nullptr, true );
 }
 
 
diff --git a/src/widgets/tqtooltip.h b/src/widgets/tqtooltip.h
index 3058ed0e0..f5dcd918b 100644
--- a/src/widgets/tqtooltip.h
+++ b/src/widgets/tqtooltip.h
@@ -60,7 +60,7 @@ class TQ_EXPORT TQToolTipGroup: public TQObject
     TQ_PROPERTY( bool enabled READ enabled WRITE setEnabled )
 
 public:
-    TQToolTipGroup( TQObject *parent, const char *name = 0 );
+    TQToolTipGroup( TQObject *parent, const char *name = nullptr );
    ~TQToolTipGroup();
 
     bool delay() const;
diff --git a/src/widgets/tqvalidator.h b/src/widgets/tqvalidator.h
index d167334d7..fd19adf4b 100644
--- a/src/widgets/tqvalidator.h
+++ b/src/widgets/tqvalidator.h
@@ -54,7 +54,7 @@ class TQ_EXPORT TQValidator : public TQObject
 {
     TQ_OBJECT
 public:
-    TQValidator( TQObject * parent, const char *name = 0 );
+    TQValidator( TQObject * parent, const char *name = nullptr );
     ~TQValidator();
 
     enum State { Invalid, Intermediate, Valid=Intermediate, Acceptable };
@@ -77,9 +77,9 @@ class TQ_EXPORT TQIntValidator : public TQValidator
     TQ_PROPERTY( int top READ top WRITE setTop )
 
 public:
-    TQIntValidator( TQObject * parent, const char *name = 0 );
+    TQIntValidator( TQObject * parent, const char *name = nullptr );
     TQIntValidator( int bottom, int top,
-		   TQObject * parent, const char *name = 0 );
+		   TQObject * parent, const char *name = nullptr );
     ~TQIntValidator();
 
     TQValidator::State validate( TQString &, int & ) const;
@@ -110,9 +110,9 @@ class TQ_EXPORT TQDoubleValidator : public TQValidator
     TQ_PROPERTY( int decimals READ decimals WRITE setDecimals )
 
 public:
-    TQDoubleValidator( TQObject * parent, const char *name = 0 );
+    TQDoubleValidator( TQObject * parent, const char *name = nullptr );
     TQDoubleValidator( double bottom, double top, int decimals,
-		      TQObject * parent, const char *name = 0 );
+		      TQObject * parent, const char *name = nullptr );
     ~TQDoubleValidator();
 
     TQValidator::State validate( TQString &, int & ) const;
@@ -143,9 +143,9 @@ class TQ_EXPORT TQRegExpValidator : public TQValidator
     // TQ_PROPERTY( TQRegExp regExp READ regExp WRITE setRegExp )
 
 public:
-    TQRegExpValidator( TQObject *parent, const char *name = 0 );
+    TQRegExpValidator( TQObject *parent, const char *name = nullptr );
     TQRegExpValidator( const TQRegExp& rx, TQObject *parent,
-		      const char *name = 0 );
+		      const char *name = nullptr );
     ~TQRegExpValidator();
 
     virtual TQValidator::State validate( TQString& input, int& pos ) const;
diff --git a/src/widgets/tqvbox.h b/src/widgets/tqvbox.h
index 7eed7460f..e939a7655 100644
--- a/src/widgets/tqvbox.h
+++ b/src/widgets/tqvbox.h
@@ -51,7 +51,7 @@ class TQ_EXPORT TQVBox : public TQHBox
 {
     TQ_OBJECT
 public:
-    TQVBox( TQWidget* parent=0, const char* name=0, WFlags f=0 );
+    TQVBox( TQWidget* parent=nullptr, const char* name=nullptr, WFlags f=0 );
 
 private:	// Disabled copy constructor and operator=
 #if defined(TQ_DISABLE_COPY)
diff --git a/src/widgets/tqvbuttongroup.h b/src/widgets/tqvbuttongroup.h
index a8050bc76..eefd59aa1 100644
--- a/src/widgets/tqvbuttongroup.h
+++ b/src/widgets/tqvbuttongroup.h
@@ -51,8 +51,8 @@ class TQ_EXPORT TQVButtonGroup : public TQButtonGroup
 {
     TQ_OBJECT
 public:
-    TQVButtonGroup( TQWidget* parent=0, const char* name=0 );
-    TQVButtonGroup( const TQString &title, TQWidget* parent=0, const char* name=0 );
+    TQVButtonGroup( TQWidget* parent=nullptr, const char* name=nullptr );
+    TQVButtonGroup( const TQString &title, TQWidget* parent=nullptr, const char* name=nullptr );
 
     ~TQVButtonGroup();
 
diff --git a/src/widgets/tqvgroupbox.h b/src/widgets/tqvgroupbox.h
index e98c993d3..0abe5fdab 100644
--- a/src/widgets/tqvgroupbox.h
+++ b/src/widgets/tqvgroupbox.h
@@ -51,8 +51,8 @@ class TQ_EXPORT TQVGroupBox : public TQGroupBox
 {
     TQ_OBJECT
 public:
-    TQVGroupBox( TQWidget* parent=0, const char* name=0 );
-    TQVGroupBox( const TQString &title, TQWidget* parent=0, const char* name=0 );
+    TQVGroupBox( TQWidget* parent=nullptr, const char* name=nullptr );
+    TQVGroupBox( const TQString &title, TQWidget* parent=nullptr, const char* name=nullptr );
 
     ~TQVGroupBox();
 
diff --git a/src/widgets/tqwhatsthis.cpp b/src/widgets/tqwhatsthis.cpp
index 08d7396d7..e05e9f166 100644
--- a/src/widgets/tqwhatsthis.cpp
+++ b/src/widgets/tqwhatsthis.cpp
@@ -152,7 +152,7 @@ public:
 
 public slots:
     void hide();
-    inline void widgetDestroyed() { widget = 0; }
+    inline void widgetDestroyed() { widget = nullptr; }
 
 protected:
     void mousePressEvent( TQMouseEvent* );
@@ -180,7 +180,7 @@ public:
     // an item for storing texts
     struct WhatsThisItem: public TQShared
     {
-	WhatsThisItem(): TQShared() { whatsthis = 0; }
+	WhatsThisItem(): TQShared() { whatsthis = nullptr; }
 	~WhatsThisItem();
 	TQString s;
 	TQWhatsThis* whatsthis;
@@ -225,7 +225,7 @@ private slots:
 };
 
 // static, but static the less-typing way
-static TQWhatsThisPrivate * wt = 0;
+static TQWhatsThisPrivate * wt = nullptr;
 
 // shadowWidth not const, for XP drop-shadow-fu turns it to 0
 static int shadowWidth = 6;   // also used as '5' and '6' and even '8' below
@@ -257,7 +257,7 @@ TQWhatsThat::TQWhatsThat( TQWidget* w, const TQString& txt, TQWidget* parent, co
 
     TQRect r;
 #ifndef TQT_NO_RICHTEXT
-    doc = 0;
+    doc = nullptr;
     if ( TQStyleSheet::mightBeRichText( text ) ) {
 	TQFont f = TQApplication::font( this );
 	doc = new TQSimpleRichText( text, f );
@@ -290,7 +290,7 @@ TQWhatsThat::TQWhatsThat( TQWidget* w, const TQString& txt, TQWidget* parent, co
 TQWhatsThat::~TQWhatsThat()
 {
     if ( wt && wt->whatsThat == this )
-	wt->whatsThat = 0;
+	wt->whatsThat = nullptr;
 #ifndef TQT_NO_RICHTEXT
     if ( doc )
 	delete doc;
@@ -404,7 +404,7 @@ void TQWhatsThat::paintEvent( TQPaintEvent* )
 
 #ifndef TQT_NO_RICHTEXT
     if ( doc ) {
-	doc->draw( &p, r.x(), r.y(), r, colorGroup(), 0 );
+	doc->draw( &p, r.x(), r.y(), r, colorGroup(), nullptr );
     }
     else
 #endif
@@ -483,15 +483,15 @@ static void tqWhatsThisPrivateCleanup()
 {
     if( wt ) {
 	delete wt;
-	wt = 0;
+	wt = nullptr;
     }
 }
 
 // the what's this manager class
 TQWhatsThisPrivate::TQWhatsThisPrivate()
-    : TQObject( 0, "global what's this object" )
+    : TQObject( nullptr, "global what's this object" )
 {
-    whatsThat = 0;
+    whatsThat = nullptr;
     dict = new TQPtrDict<TQWhatsThisPrivate::WhatsThisItem>;
     tlw = new TQPtrDict<TQWidget>;
     wt = this;
@@ -513,7 +513,7 @@ TQWhatsThisPrivate::~TQWhatsThisPrivate()
     TQPtrDictIterator<WhatsThisItem> it( *dict );
     WhatsThisItem * i;
     TQWidget * w;
-    while( (i=it.current()) != 0 ) {
+    while( (i=it.current()) ) {
 	w = (TQWidget *)it.currentKey();
 	++it;
 	dict->take( w );
@@ -525,7 +525,7 @@ TQWhatsThisPrivate::~TQWhatsThisPrivate()
 	delete whatsThat;
     }
     // and finally lose wt
-    wt = 0;
+    wt = nullptr;
 }
 
 bool TQWhatsThisPrivate::eventFilter( TQObject * o, TQEvent * e )
@@ -538,7 +538,7 @@ bool TQWhatsThisPrivate::eventFilter( TQObject * o, TQEvent * e )
 		return false; // ignore RMB
 	    if ( w->customWhatsThis() )
 		return false;
-	    TQWhatsThisPrivate::WhatsThisItem * i = 0;
+	    TQWhatsThisPrivate::WhatsThisItem * i = nullptr;
 	    TQMouseEvent* me = (TQMouseEvent*) e;
 	    TQPoint p = me->pos();
 	    while( w && !i ) {
@@ -635,7 +635,7 @@ void TQWhatsThisPrivate::leaveWhatsThisMode()
     if ( state == Waiting ) {
 	TQPtrDictIterator<TQWhatsThisButton> it( *(wt->buttons) );
 	TQWhatsThisButton * b;
-	while( (b=it.current()) != 0 ) {
+	while( (b=it.current()) ) {
 	    ++it;
 	    b->setOn( false );
 	}
@@ -813,7 +813,7 @@ void TQWhatsThis::remove( TQWidget * widget )
 TQString TQWhatsThis::textFor( TQWidget * w, const TQPoint& pos, bool includeParents )
 {
     TQWhatsThisPrivate::setUpWhatsThis();
-    TQWhatsThisPrivate::WhatsThisItem * i = 0;
+    TQWhatsThisPrivate::WhatsThisItem * i = nullptr;
     TQPoint p = pos;
     while( w && !i ) {
 	i = wt->dict->find( w );
diff --git a/src/widgets/tqwhatsthis.h b/src/widgets/tqwhatsthis.h
index 827e30378..09352765a 100644
--- a/src/widgets/tqwhatsthis.h
+++ b/src/widgets/tqwhatsthis.h
@@ -71,9 +71,9 @@ public:
 
     static void enterWhatsThisMode();
     static bool inWhatsThisMode();
-    static void leaveWhatsThisMode( const TQString& = TQString::null, const TQPoint& pos = TQCursor::pos(), TQWidget* w = 0 );
+    static void leaveWhatsThisMode( const TQString& = TQString::null, const TQPoint& pos = TQCursor::pos(), TQWidget* w = nullptr );
 
-    static void display( const TQString& text, const TQPoint& pos = TQCursor::pos(), TQWidget* w = 0 );
+    static void display( const TQString& text, const TQPoint& pos = TQCursor::pos(), TQWidget* w = nullptr );
 };
 
 #endif // TQT_NO_WHATSTHIS
diff --git a/src/widgets/tqwidgetinterface_p.h b/src/widgets/tqwidgetinterface_p.h
index 658f11f33..9b60ba338 100644
--- a/src/widgets/tqwidgetinterface_p.h
+++ b/src/widgets/tqwidgetinterface_p.h
@@ -79,7 +79,7 @@ public:
 
     /*! In the implementation create and return the widget \a widget
       here, use \a parent and \a name when creating the widget */
-    virtual TQWidget* create( const TQString &widget, TQWidget* parent = 0, const char* name = 0 ) = 0;
+    virtual TQWidget* create( const TQString &widget, TQWidget* parent = nullptr, const char* name = nullptr ) = 0;
 
     /*! In the implementation return the name of the group of the
       widget \a widget */
diff --git a/src/widgets/tqwidgetplugin.cpp b/src/widgets/tqwidgetplugin.cpp
index 3444ebd61..64f17effd 100644
--- a/src/widgets/tqwidgetplugin.cpp
+++ b/src/widgets/tqwidgetplugin.cpp
@@ -129,7 +129,7 @@ private:
 
 TQRESULT TQWidgetPluginPrivate::queryInterface( const TQUuid &iid, TQUnknownInterface **iface )
 {
-    *iface = 0;
+    *iface = nullptr;
 
     if ( iid == IID_QUnknown )
 	*iface = (TQWidgetFactoryInterface*)this;
diff --git a/src/widgets/tqwidgetplugin.h b/src/widgets/tqwidgetplugin.h
index 68b26b4f7..91ea91720 100644
--- a/src/widgets/tqwidgetplugin.h
+++ b/src/widgets/tqwidgetplugin.h
@@ -69,7 +69,7 @@ public:
     ~TQWidgetPlugin();
 
     virtual TQStringList keys() const = 0;
-    virtual TQWidget *create( const TQString &key, TQWidget *parent = 0, const char *name = 0 ) = 0;
+    virtual TQWidget *create( const TQString &key, TQWidget *parent = nullptr, const char *name = nullptr ) = 0;
 
     virtual TQString group( const TQString &key ) const;
     virtual TQIconSet iconSet( const TQString &key ) const;
diff --git a/src/widgets/tqwidgetresizehandler.cpp b/src/widgets/tqwidgetresizehandler.cpp
index 2b11fab90..46e6df554 100644
--- a/src/widgets/tqwidgetresizehandler.cpp
+++ b/src/widgets/tqwidgetresizehandler.cpp
@@ -96,7 +96,7 @@ static TQWidget *childOf( TQWidget *w, TQWidget *child )
 	    break;
 	child = child->parentWidget();
     }
-    return 0;
+    return nullptr;
 }
 
 bool TQWidgetResizeHandler::eventFilter( TQObject *o, TQEvent *ee )
diff --git a/src/widgets/tqwidgetresizehandler_p.h b/src/widgets/tqwidgetresizehandler_p.h
index 30f8e088c..1ed1fa914 100644
--- a/src/widgets/tqwidgetresizehandler_p.h
+++ b/src/widgets/tqwidgetresizehandler_p.h
@@ -71,7 +71,7 @@ public:
 	Any	= Move|Resize
     };
 
-    TQWidgetResizeHandler( TQWidget *parent, TQWidget *cw = 0, const char *name = 0 );
+    TQWidgetResizeHandler( TQWidget *parent, TQWidget *cw = nullptr, const char *name = nullptr );
     void setActive( bool b ) { setActive( Any, b ); }
     void setActive( Action ac, bool b );
     bool isActive() const { return isActive( Any ); }
diff --git a/src/widgets/tqwidgetstack.cpp b/src/widgets/tqwidgetstack.cpp
index 267a79d54..9a699cab9 100644
--- a/src/widgets/tqwidgetstack.cpp
+++ b/src/widgets/tqwidgetstack.cpp
@@ -82,7 +82,7 @@ class TQWidgetStackEventFilter : public TQObject
     */
 public:
 
-    TQWidgetStackEventFilter( TQObject *parent = 0, const char * name = 0 )
+    TQWidgetStackEventFilter( TQObject *parent = nullptr, const char * name = nullptr )
 	: TQObject( parent, name ) {}
     bool eventFilter( TQObject *o, TQEvent * e ) {
 	if ( e->type() == TQEvent::LayoutHint && o->isWidgetType() )
@@ -154,12 +154,12 @@ TQWidgetStack::TQWidgetStack( TQWidget * parent, const char *name, WFlags f )
 
 void TQWidgetStack::init()
 {
-   d = 0;
+   d = nullptr;
    TQWidgetStackEventFilter *ef = new TQWidgetStackEventFilter( this );
    installEventFilter( ef );
    dict = new TQIntDict<TQWidget>;
-   focusWidgets = 0;
-   topWidget = 0;
+   focusWidgets = nullptr;
+   topWidget = nullptr;
    invisible = new TQWidgetStackPrivate::Invisible( this );
    invisible->hide();
 }
@@ -254,7 +254,7 @@ void TQWidgetStack::removeWidget( TQWidget * w )
 	dict->take( i );
 
     if ( w == topWidget )
-	topWidget = 0;
+	topWidget = nullptr;
     if ( dict->isEmpty() )
 	invisible->hide(); // let background shine through again
     updateGeometry();
@@ -377,7 +377,7 @@ void TQWidgetStack::raiseWidget( TQWidget *w )
     TQObjectListIt it( *c );
     TQObject * o;
 
-    while( (o=it.current()) != 0 ) {
+    while( (o=it.current()) ) {
 	++it;
 	if ( o->isWidgetType() && o != w && o != invisible )
 	    ((TQWidget *)o)->hide();
@@ -434,7 +434,7 @@ void TQWidgetStack::show()
 	TQObjectListIt it( *c );
 	TQObject * o;
 
-	while( (o=it.current()) != 0 ) {
+	while( (o=it.current()) ) {
 	    ++it;
 	    if ( o->isWidgetType() ) {
 		if ( !topWidget && o != invisible )
@@ -460,7 +460,7 @@ void TQWidgetStack::show()
 
 TQWidget * TQWidgetStack::widget( int id ) const
 {
-    return id != -1 ? dict->find( id ) : 0;
+    return id != -1 ? dict->find( id ) : nullptr;
 }
 
 
@@ -547,7 +547,7 @@ TQSize TQWidgetStack::sizeHint() const
     TQIntDictIterator<TQWidget> it( *dict );
     TQWidget *w;
 
-    while ( (w = it.current()) != 0 ) {
+    while ( (w = it.current()) ) {
 	++it;
 	TQSize sh = w->sizeHint();
 	if ( w->sizePolicy().horData() == TQSizePolicy::Ignored )
@@ -577,7 +577,7 @@ TQSize TQWidgetStack::minimumSizeHint() const
     TQIntDictIterator<TQWidget> it( *dict );
     TQWidget *w;
 
-    while ( (w = it.current()) != 0 ) {
+    while ( (w = it.current()) ) {
 	++it;
 	TQSize sh = w->minimumSizeHint();
 	if ( w->sizePolicy().horData() == TQSizePolicy::Ignored )
diff --git a/src/widgets/tqwidgetstack.h b/src/widgets/tqwidgetstack.h
index 93d83da6f..cc41d6470 100644
--- a/src/widgets/tqwidgetstack.h
+++ b/src/widgets/tqwidgetstack.h
@@ -57,7 +57,7 @@ class TQ_EXPORT TQWidgetStack: public TQFrame
 {
     TQ_OBJECT
 public:
-    TQWidgetStack( TQWidget* parent=0, const char* name=0 );
+    TQWidgetStack( TQWidget* parent=nullptr, const char* name=nullptr );
     TQWidgetStack( TQWidget* parent, const char* name, WFlags f);
 
     ~TQWidgetStack();
diff --git a/src/workspace/tqworkspace.cpp b/src/workspace/tqworkspace.cpp
index 9bf7b8bb5..8e22d81d9 100644
--- a/src/workspace/tqworkspace.cpp
+++ b/src/workspace/tqworkspace.cpp
@@ -145,7 +145,7 @@ class TQWorkspaceChild : public TQFrame
 
 public:
     TQWorkspaceChild( TQWidget* window,
-		     TQWorkspace* parent=0, const char* name=0 );
+		     TQWorkspace* parent=nullptr, const char* name=nullptr );
     ~TQWorkspaceChild();
 
     void setActive( bool );
@@ -255,7 +255,7 @@ static bool isChildOf( TQWidget * child, TQWidget * parent )
     TQWidget * w = child;
     while( w && w != parent )
 	w = w->parentWidget();
-    return w != 0;
+    return w;
 }
 
 /*!
@@ -290,19 +290,19 @@ void
 TQWorkspace::init()
 {
     d = new TQWorkspacePrivate;
-    d->maxcontrols = 0;
-    d->active = 0;
-    d->maxWindow = 0;
-    d->maxtools = 0;
+    d->maxcontrols = nullptr;
+    d->active = nullptr;
+    d->maxWindow = nullptr;
+    d->maxtools = nullptr;
     d->px = 0;
     d->py = 0;
-    d->becomeActive = 0;
+    d->becomeActive = nullptr;
 #if defined( QT_WORKSPACE_WINDOWMODE ) && defined( TQ_WS_MAC )
     d->wmode = AutoDetect;
 #else
     d->wmode = MDI;
 #endif
-    d->mainwindow = 0;
+    d->mainwindow = nullptr;
 #if defined(TQ_WS_WIN)
     d->popup = new TQPopupMenu( this, "qt_internal_mdi_popup" );
     d->toolPopup = new TQPopupMenu( this, "qt_internal_mdi_popup" );
@@ -374,8 +374,8 @@ TQWorkspace::init()
     d->topCaption = topLevelWidget()->caption();
 #endif
 
-    d->hbar = d->vbar = 0;
-    d->corner = 0;
+    d->hbar = d->vbar = nullptr;
+    d->corner = nullptr;
     d->xoffset = d->yoffset = 0;
 
     updateWorkspace();
@@ -388,7 +388,7 @@ TQWorkspace::init()
 TQWorkspace::~TQWorkspace()
 {
     delete d;
-    d = 0;
+    d = nullptr;
 }
 
 /*!\reimp */
@@ -470,7 +470,7 @@ void TQWorkspace::childEvent( TQChildEvent * e)
 	    d->windows.removeRef( (TQWorkspaceChild*)e->child() );
 	    d->focus.removeRef( (TQWorkspaceChild*)e->child() );
 	    if (d->maxWindow == e->child())
-		d->maxWindow = 0;
+		d->maxWindow = nullptr;
 	    updateWorkspace();
 	}
     }
@@ -493,11 +493,11 @@ void TQWorkspace::wheelEvent( TQWheelEvent *e )
 void TQWorkspace::activateWindow( TQWidget* w, bool change_focus )
 {
     if ( !w ) {
-	d->active = 0;
-	emit windowActivated( 0 );
+	d->active = nullptr;
+	emit windowActivated( nullptr );
 	return;
     }
-    if ( d->wmode == MDI && !isVisibleTo( 0 ) ) {
+    if ( d->wmode == MDI && !isVisibleTo( nullptr ) ) {
 	d->becomeActive = w;
 	return;
     }
@@ -508,7 +508,7 @@ void TQWorkspace::activateWindow( TQWidget* w, bool change_focus )
 	return;
     }
 
-    d->active = 0;
+    d->active = nullptr;
     // First deactivate all other workspace clients
     TQPtrListIterator<TQWorkspaceChild> it( d->windows );
     while ( it.current () ) {
@@ -577,7 +577,7 @@ void TQWorkspace::activateWindow( TQWidget* w, bool change_focus )
 */
 TQWidget* TQWorkspace::activeWindow() const
 {
-    return d->active?d->active->windowWidget():0;
+    return d->active?d->active->windowWidget():nullptr;
 }
 
 
@@ -1032,7 +1032,7 @@ void TQWorkspace::showEvent( TQShowEvent *e )
 	w->setGeometry(dw->availableGeometry(dw->screenNumber(o)));
 	o->reparent(w, TQPoint(0, 0), true);
 	{
-	    TQMenuBar *mb = 0;
+	    TQMenuBar *mb = nullptr;
 	    if(::tqt_cast<TQMainWindow*>(o))
 		mb = ((TQMainWindow *)o)->menuBar();
 	    if(!mb)
@@ -1060,7 +1060,7 @@ void TQWorkspace::showEvent( TQShowEvent *e )
     TQWidget::showEvent( e );
     if ( d->becomeActive ) {
 	activateWindow( d->becomeActive );
-	d->becomeActive = 0;
+	d->becomeActive = nullptr;
     } else if ( d->windows.count() > 0 && !d->active ) {
 	activateWindow( d->windows.first()->windowWidget() );
     }
@@ -1079,7 +1079,7 @@ void TQWorkspace::showEvent( TQShowEvent *e )
 /*! \reimp */
 void TQWorkspace::hideEvent( TQHideEvent * )
 {
-    if ( !isVisibleTo(0) && !style().styleHint(TQStyle::SH_Workspace_FillSpaceOnMaximize, this))
+    if ( !isVisibleTo(nullptr) && !style().styleHint(TQStyle::SH_Workspace_FillSpaceOnMaximize, this))
 	hideMaximizeControls();
 }
 
@@ -1097,7 +1097,7 @@ void TQWorkspace::minimizeWindow( TQWidget* w)
 	bool wasMax = false;
 	if ( c == d->maxWindow ) {
 	    wasMax = true;
-	    d->maxWindow = 0;
+	    d->maxWindow = nullptr;
 	    inCaptionChange = true;
 #ifndef TQT_NO_WIDGET_TOPEXTRA
 	    if ( !!d->topCaption )
@@ -1153,7 +1153,7 @@ void TQWorkspace::normalizeWindow( TQWidget* w)
 
 	if ( c == d->maxWindow ) {
 	    c->setGeometry( d->maxRestore );
-	    d->maxWindow = 0;
+	    d->maxWindow = nullptr;
 #ifndef TQT_NO_WIDGET_TOPEXTRA
 	    inCaptionChange = true;
 	    if ( !!d->topCaption )
@@ -1258,7 +1258,7 @@ TQWorkspaceChild* TQWorkspace::findChild( TQWidget* w)
 	if (c->windowWidget() == w)
 	    return c;
     }
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -1334,8 +1334,8 @@ bool TQWorkspace::eventFilter( TQObject *o, TQEvent * e)
 	return TQWidget::eventFilter(o, e);
     }
 
-    static TQTime* t = 0;
-    static TQWorkspace* tc = 0;
+    static TQTime* t = nullptr;
+    static TQWorkspace* tc = nullptr;
 #ifndef TQT_NO_MENUBAR
     if ( o == d->maxtools && d->menuId != -1 ) {
 	switch ( e->type() ) {
@@ -1355,7 +1355,7 @@ bool TQWorkspace::eventFilter( TQObject *o, TQEvent * e)
 		    t->start();
 		    tc = this;
 		} else {
-		    tc = 0;
+		    tc = nullptr;
 		    closeActiveWindow();
 		}
 		return true;
@@ -1380,7 +1380,7 @@ bool TQWorkspace::eventFilter( TQObject *o, TQEvent * e)
 		if ( !c || c == o ) {
 		    if ( c && c->iconw && d->icons.contains( c->iconw->parentWidget() ) )
 			break;
-		    activateWindow( 0 );
+		    activateWindow( nullptr );
 		    break;
 		}
 		if ( c->isShown() ) {
@@ -1392,7 +1392,7 @@ bool TQWorkspace::eventFilter( TQObject *o, TQEvent * e)
 	d->focus.removeRef( (TQWorkspaceChild*)o );
 	if ( d->maxWindow == o && d->maxWindow->isHidden() ) {
 	    d->maxWindow->setGeometry( d->maxRestore );
-	    d->maxWindow = 0;
+	    d->maxWindow = nullptr;
 	    if ( d->active )
 		maximizeWindow( d->active );
 
@@ -1466,17 +1466,17 @@ void TQWorkspace::showMaximizeControls()
 {
 #ifndef TQT_NO_MENUBAR
     Q_ASSERT(d->maxWindow);
-    TQMenuBar* b = 0;
+    TQMenuBar* b = nullptr;
 
     // Do a breadth-first search first on every parent,
     TQWidget* w = parentWidget();
-    TQObjectList * l = 0;
+    TQObjectList * l = nullptr;
     while ( !l && w ) {
-	l = w->queryList( "TQMenuBar", 0, false, false );
+	l = w->queryList( "TQMenuBar", nullptr, false, false );
 	w = w->parentWidget();
 	if ( l && !l->count() ) {
 	    delete l;
-	    l = 0;
+	    l = nullptr;
 	}
     }
 
@@ -1484,7 +1484,7 @@ void TQWorkspace::showMaximizeControls()
     if ( !l || !l->count() ) {
 	if ( l )
 	    delete l;
-	l = topLevelWidget()->queryList( "TQMenuBar", 0, 0, true );
+	l = topLevelWidget()->queryList( "TQMenuBar", nullptr, 0, true );
     }
     if ( l && l->count() )
 	b = (TQMenuBar *)l->first();
@@ -1545,7 +1545,7 @@ void TQWorkspace::showMaximizeControls()
     if ( !d->active && d->becomeActive ) {
 	d->active = (TQWorkspaceChild*)d->becomeActive->parentWidget();
 	d->active->setActive( true );
-	d->becomeActive = 0;
+	d->becomeActive = nullptr;
 	emit windowActivated( d->active->windowWidget() );
     }
     if ( d->active && ( d->menuId == -1 || b->indexOf( d->menuId ) == -1 ) ) {
@@ -1585,13 +1585,13 @@ void TQWorkspace::hideMaximizeControls()
 	if ( mi != -1 ) {
 	    if ( d->maxmenubar->indexOf( mi ) != -1 )
 		d->maxmenubar->removeItem( mi );
-	    d->maxtools = 0;
+	    d->maxtools = nullptr;
 	}
 	int ci = d->controlId;
 	if ( ci != -1 && d->maxmenubar->indexOf( ci ) != -1 )
 	    d->maxmenubar->removeItem( ci );
     }
-    d->maxcontrols = 0;
+    d->maxcontrols = nullptr;
     d->menuId = -1;
     d->controlId = -1;
 #endif
@@ -1625,7 +1625,7 @@ void TQWorkspace::closeAllWindows()
 {
     bool did_close = true;
     TQPtrListIterator<TQWorkspaceChild> it( d->windows );
-    TQWorkspaceChild *c = 0;
+    TQWorkspaceChild *c = nullptr;
     while ( ( c = it.current() ) && did_close ) {
 	++it;
 	if ( c->windowWidget() )
@@ -1682,7 +1682,7 @@ void TQWorkspace::popupOperationMenu( const TQPoint&  p)
 void TQWorkspace::operationMenuAboutToShow()
 {
     for ( int i = 1; i < 6; i++ ) {
-	bool enable = d->active != 0;
+	bool enable = d->active;
 	d->popup->setItemEnabled( i, enable );
     }
 
@@ -1791,7 +1791,7 @@ void TQWorkspace::activateNextWindow()
     if ( d->focus.at( a ) )
 	activateWindow( d->focus.at( a )->windowWidget(), false );
     else
-	activateWindow(0);
+	activateWindow(nullptr);
 }
 
 void TQWorkspace::activatePreviousWindow()
@@ -1812,7 +1812,7 @@ void TQWorkspace::activatePrevWindow()
 	if ( d->focus.last() )
 	    activateWindow( d->focus.first()->windowWidget(), false );
 	else
-	    activateWindow( 0 );
+	    activateWindow( nullptr );
 
 	return;
     }
@@ -1824,7 +1824,7 @@ void TQWorkspace::activatePrevWindow()
     if ( d->focus.at( a ) )
 	activateWindow( d->focus.at( a )->windowWidget(), false );
     else
-	activateWindow( 0 );
+	activateWindow( nullptr );
 }
 
 
@@ -1866,7 +1866,7 @@ void TQWorkspace::cascade()
 
     // make a list of all relevant mdi clients
     TQPtrList<TQWorkspaceChild> widgets;
-    TQWorkspaceChild* wc = 0;
+    TQWorkspaceChild* wc = nullptr;
     for ( wc = d->focus.first(); wc; wc = d->focus.next() )
 	if ( wc->windowWidget()->isVisibleTo( this ) && !wc->windowWidget()->testWFlags( WStyle_Tool ) && !wc->iconw )
 	    widgets.append( wc );
@@ -1892,7 +1892,7 @@ void TQWorkspace::cascade()
 	int h = prefSize.height();
 
 	child->showNormal();
-	tqApp->sendPostedEvents( 0, TQEvent::ShowNormal );
+	tqApp->sendPostedEvents( nullptr, TQEvent::ShowNormal );
 	if ( y + h > height() )
 	    y = 0;
 	if ( x + w > width() )
@@ -1916,7 +1916,7 @@ void TQWorkspace::cascade()
 void TQWorkspace::tile()
 {
     blockSignals(true);
-    TQWidget *oldActive = d->active ? d->active->windowWidget() : 0;
+    TQWidget *oldActive = d->active ? d->active->windowWidget() : nullptr;
     if  ( d->maxWindow )
 	d->maxWindow->showNormal();
 
@@ -1987,7 +1987,7 @@ void TQWorkspace::tile()
 		c->TQFrame::move( p );
 	} else {
 	    c->showNormal();
-	    tqApp->sendPostedEvents( 0, TQEvent::ShowNormal );
+	    tqApp->sendPostedEvents( nullptr, TQEvent::ShowNormal );
 	    used[row*cols+col] = true;
             TQSize sz(w, h);
             TQSize bsize(c->baseSize());
@@ -2025,13 +2025,13 @@ TQWorkspaceChild::TQWorkspaceChild( TQWidget* window, TQWorkspace *parent,
 	      (parent->windowMode() == TQWorkspace::TopLevel ? (WStyle_MinMax | WStyle_SysMenu | WType_TopLevel) :
 	       WStyle_NoBorder ) | WStyle_Customize | WDestructiveClose | WNoMousePropagation | WSubWindow )
 {
-    statusbar = 0;
+    statusbar = nullptr;
     setMouseTracking( true );
     act = false;
-    iconw = 0;
-    lastfocusw = 0;
+    iconw = nullptr;
+    lastfocusw = nullptr;
     shademode = false;
-    titlebar = 0;
+    titlebar = nullptr;
     snappedRight = false;
     snappedDown = false;
 
@@ -2154,12 +2154,12 @@ TQWorkspaceChild::~TQWorkspaceChild()
 	if ( workspace->d->active == this ) {
 	    workspace->activatePrevWindow();
             if (workspace->d->active == this) {
-                workspace->activateWindow(0);
+                workspace->activateWindow(nullptr);
             }
         }
 	if ( workspace->d->maxWindow == this ) {
 	    workspace->hideMaximizeControls();
-	    workspace->d->maxWindow = 0;
+	    workspace->d->maxWindow = nullptr;
 	}
     }
 }
@@ -2308,7 +2308,7 @@ bool TQWorkspaceChild::eventFilter( TQObject * o, TQEvent * e)
 	    if ( iconw ) {
 		((TQWorkspace*)parentWidget())->removeIcon( iconw->parentWidget() );
 		delete iconw->parentWidget();
-		iconw = 0;
+		iconw = nullptr;
 	    }
 	}
 	activate();
@@ -2316,7 +2316,7 @@ bool TQWorkspaceChild::eventFilter( TQObject * o, TQEvent * e)
 
     // for all widgets except the window, that's the only thing we
     // process, and if we have no childWidget we skip totally
-    if ( o != childWidget || childWidget == 0 )
+    if ( o != childWidget || !childWidget )
 	return false;
 
     switch ( e->type() ) {
@@ -2444,7 +2444,7 @@ bool TQWorkspaceChild::focusNextPrevChild( bool next )
     TQFocusData *f = focusData();
 
     TQWidget *startingPoint = f->home();
-    TQWidget *candidate = 0;
+    TQWidget *candidate = nullptr;
     TQWidget *w = next ? f->next() : f->prev();
     while( !candidate && w != startingPoint ) {
 	if ( w != startingPoint &&
@@ -2462,7 +2462,7 @@ bool TQWorkspaceChild::focusNextPrevChild( bool next )
 	    startingPoint = f->home();
 	    TQWidget *nw = next ? f->prev() : f->next();
 	    TQObjectList *ol2 = queryList();
-	    TQWidget *lastValid = 0;
+	    TQWidget *lastValid = nullptr;
 	    candidate = startingPoint;
 	    while ( nw != startingPoint ) {
 		if ( ( candidate->focusPolicy() & TabFocus ) == TabFocus
@@ -2489,7 +2489,7 @@ bool TQWorkspaceChild::focusNextPrevChild( bool next )
 void TQWorkspaceChild::childEvent( TQChildEvent*  e)
 {
     if ( e->type() == TQEvent::ChildRemoved && e->child() == childWidget ) {
-	childWidget = 0;
+	childWidget = nullptr;
 	if ( iconw ) {
 	    ((TQWorkspace*)parentWidget())->removeIcon( iconw->parentWidget() );
 	    delete iconw->parentWidget();
@@ -2534,7 +2534,7 @@ void TQWorkspaceChild::drawFrame( TQPainter *p )
 
 void TQWorkspaceChild::styleChange( TQStyle & )
 {
-    resizeEvent( 0 );
+    resizeEvent( nullptr );
     if ( iconw ) {
 	TQVBox *vbox = (TQVBox*)iconw->parentWidget()->tqt_cast( "TQVBox" );
 	Q_ASSERT(vbox);
@@ -2810,7 +2810,7 @@ void TQWorkspaceChild::move( int x, int y )
 
 bool TQWorkspace::scrollBarsEnabled() const
 {
-    return d->vbar != 0;
+    return d->vbar;
 }
 
 /*!
@@ -2826,7 +2826,7 @@ bool TQWorkspace::scrollBarsEnabled() const
 */
 void TQWorkspace::setScrollBarsEnabled( bool enable )
 {
-    if ( (d->vbar != 0) == enable )
+    if ( (!!d->vbar) == enable )
 	return;
 
     d->xoffset = d->yoffset = 0;
@@ -2841,8 +2841,8 @@ void TQWorkspace::setScrollBarsEnabled( bool enable )
 	delete d->vbar;
 	delete d->hbar;
 	delete d->corner;
-	d->vbar = d->hbar = 0;
-	d->corner = 0;
+	d->vbar = d->hbar = nullptr;
+	d->corner = nullptr;
     }
 
     TQPtrListIterator<TQWorkspaceChild> it( d->windows );
@@ -3008,7 +3008,7 @@ TQWorkspace::WindowMode TQWorkspace::windowMode() const
 void TQWorkspace::styleChange( TQStyle &olds )
 {
     int fs = style().styleHint(TQStyle::SH_Workspace_FillSpaceOnMaximize, this);
-    if ( isVisibleTo(0) && d->maxWindow &&
+    if ( isVisibleTo(nullptr) && d->maxWindow &&
 	 fs != olds.styleHint(TQStyle::SH_Workspace_FillSpaceOnMaximize, this)) {
 	if( fs )
 	    hideMaximizeControls();
diff --git a/src/workspace/tqworkspace.h b/src/workspace/tqworkspace.h
index 2349fe553..e52ee7443 100644
--- a/src/workspace/tqworkspace.h
+++ b/src/workspace/tqworkspace.h
@@ -76,9 +76,9 @@ private:
 
 public:
 #ifdef QT_WORKSPACE_WINDOWMODE
-    TQWorkspace( WindowMode mode, TQWidget* parent=0, const char* name=0 );
+    TQWorkspace( WindowMode mode, TQWidget* parent=nullptr, const char* name=nullptr );
 #endif
-    TQWorkspace( TQWidget* parent=0, const char* name=0 );
+    TQWorkspace( TQWidget* parent=nullptr, const char* name=nullptr );
 
     ~TQWorkspace();
 
diff --git a/src/xml/tqdom.cpp b/src/xml/tqdom.cpp
index ed67c2ce2..22c856f34 100644
--- a/src/xml/tqdom.cpp
+++ b/src/xml/tqdom.cpp
@@ -119,7 +119,7 @@ public:
 class TQDomNodePrivate : public TQShared
 {
 public:
-    TQDomNodePrivate( TQDomDocumentPrivate*, TQDomNodePrivate* parent = 0 );
+    TQDomNodePrivate( TQDomDocumentPrivate*, TQDomNodePrivate* parent = nullptr );
     TQDomNodePrivate( TQDomNodePrivate* n, bool deep );
     virtual ~TQDomNodePrivate();
 
@@ -144,10 +144,10 @@ public:
     virtual void normalize();
     virtual void clear();
 
-    TQDomNodePrivate* parent() { return hasParent ? ownerNode : 0; }
+    TQDomNodePrivate* parent() { return hasParent ? ownerNode : nullptr; }
     void setParent( TQDomNodePrivate *p ) { ownerNode = p; hasParent = true; }
     void setNoParent() {
-	ownerNode = hasParent ? (TQDomNodePrivate*)ownerDocument() : 0;
+	ownerNode = hasParent ? (TQDomNodePrivate*)ownerDocument() : nullptr;
 	hasParent = false;
     }
 
@@ -256,7 +256,7 @@ public:
 class TQDomDocumentTypePrivate : public TQDomNodePrivate
 {
 public:
-    TQDomDocumentTypePrivate( TQDomDocumentPrivate*, TQDomNodePrivate* parent = 0 );
+    TQDomDocumentTypePrivate( TQDomDocumentPrivate*, TQDomNodePrivate* parent = nullptr );
     TQDomDocumentTypePrivate( TQDomDocumentTypePrivate* n, bool deep );
     ~TQDomDocumentTypePrivate();
     void init();
@@ -285,7 +285,7 @@ public:
 class TQDomDocumentFragmentPrivate : public TQDomNodePrivate
 {
 public:
-    TQDomDocumentFragmentPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* parent = 0 );
+    TQDomDocumentFragmentPrivate( TQDomDocumentPrivate*, TQDomNodePrivate* parent = nullptr );
     TQDomDocumentFragmentPrivate( TQDomNodePrivate* n, bool deep );
     ~TQDomDocumentFragmentPrivate();
 
@@ -645,7 +645,7 @@ TQDomImplementationPrivate* TQDomImplementationPrivate::clone()
 */
 TQDomImplementation::TQDomImplementation()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 /*!
@@ -754,7 +754,7 @@ bool TQDomImplementation::hasFeature( const TQString& feature, const TQString& v
 */
 TQDomDocumentType TQDomImplementation::createDocumentType( const TQString& qName, const TQString& publicId, const TQString& systemId )
 {
-    TQDomDocumentTypePrivate *dt = new TQDomDocumentTypePrivate( 0 );
+    TQDomDocumentTypePrivate *dt = new TQDomDocumentTypePrivate( nullptr );
     dt->name = qName;
     if ( systemId.isNull() ) {
 	dt->publicId = TQString::null;
@@ -785,7 +785,7 @@ TQDomDocument TQDomImplementation::createDocument( const TQString& nsURI, const
 */
 bool TQDomImplementation::isNull()
 {
-    return ( impl == 0 );
+    return ( !impl );
 }
 
 /**************************************************************
@@ -890,7 +890,7 @@ void TQDomNodeListPrivate::createList()
 TQDomNodePrivate* TQDomNodeListPrivate::item( int index )
 {
     if ( !node_impl )
-	return 0;
+	return nullptr;
     if ( timestamp < qt_nodeListTime )
 	createList();
     return list.at( index );
@@ -947,7 +947,7 @@ uint TQDomNodeListPrivate::length() const
 */
 TQDomNodeList::TQDomNodeList()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 TQDomNodeList::TQDomNodeList( TQDomNodeListPrivate* p )
@@ -1066,20 +1066,20 @@ TQDomNodePrivate::TQDomNodePrivate( TQDomDocumentPrivate* doc, TQDomNodePrivate
 	setParent( par );
     else
 	setOwnerDocument( doc );
-    prev = 0;
-    next = 0;
-    first = 0;
-    last = 0;
+    prev = nullptr;
+    next = nullptr;
+    first = nullptr;
+    last = nullptr;
     createdWithDom1Interface = true;
 }
 
 TQDomNodePrivate::TQDomNodePrivate( TQDomNodePrivate* n, bool deep )
 {
     setOwnerDocument( n->ownerDocument() );
-    prev = 0;
-    next = 0;
-    first = 0;
-    last = 0;
+    prev = nullptr;
+    next = nullptr;
+    first = nullptr;
+    last = nullptr;
 
     name = n->name;
     value = n->value;
@@ -1108,8 +1108,8 @@ TQDomNodePrivate::~TQDomNodePrivate()
 	p = n;
     }
 
-    first = 0;
-    last = 0;
+    first = nullptr;
+    last = nullptr;
 }
 
 void TQDomNodePrivate::clear()
@@ -1124,8 +1124,8 @@ void TQDomNodePrivate::clear()
 	p = n;
     }
 
-    first = 0;
-    last = 0;
+    first = nullptr;
+    last = nullptr;
 }
 
 TQDomNodePrivate* TQDomNodePrivate::namedItem( const TQString& n )
@@ -1137,27 +1137,27 @@ TQDomNodePrivate* TQDomNodePrivate::namedItem( const TQString& n )
 	p = p->next;
     }
 
-    return 0;
+    return nullptr;
 }
 
 TQDomNamedNodeMapPrivate* TQDomNodePrivate::attributes()
 {
-    return 0;
+    return nullptr;
 }
 
 TQDomNodePrivate* TQDomNodePrivate::insertBefore( TQDomNodePrivate* newChild, TQDomNodePrivate* refChild )
 {
     // Error check
     if ( !newChild )
-	return 0;
+	return nullptr;
 
     // Error check
     if ( newChild == refChild )
-	return 0;
+	return nullptr;
 
     // Error check
     if ( refChild && refChild->parent() != this )
-	return 0;
+	return nullptr;
 
     // "mark lists as dirty"
     qt_nodeListTime++;
@@ -1166,7 +1166,7 @@ TQDomNodePrivate* TQDomNodePrivate::insertBefore( TQDomNodePrivate* newChild, TQ
     // all elements of the fragment instead of the fragment itself.
     if ( newChild->isDocumentFragment() ) {
 	// Fragment is empty ?
-	if ( newChild->first == 0 )
+	if ( !newChild->first )
 	    return newChild;
 
 	// New parent
@@ -1177,7 +1177,7 @@ TQDomNodePrivate* TQDomNodePrivate::insertBefore( TQDomNodePrivate* newChild, TQ
 	}
 
 	// Insert at the beginning ?
-	if ( !refChild || refChild->prev == 0 ) {
+	if ( !refChild || !refChild->prev ) {
 	    if ( first )
 		first->prev = newChild->last;
 	    newChild->last->next = first;
@@ -1196,8 +1196,8 @@ TQDomNodePrivate* TQDomNodePrivate::insertBefore( TQDomNodePrivate* newChild, TQ
 	// does not decrease the reference.
 
 	// Remove the nodes from the fragment
-	newChild->first = 0;
-	newChild->last = 0;
+	newChild->first = nullptr;
+	newChild->last = nullptr;
 	return newChild;
     }
 
@@ -1220,7 +1220,7 @@ TQDomNodePrivate* TQDomNodePrivate::insertBefore( TQDomNodePrivate* newChild, TQ
 	return newChild;
     }
 
-    if ( refChild->prev == 0 ) {
+    if ( !refChild->prev ) {
 	if ( first )
 	    first->prev = newChild;
 	newChild->next = first;
@@ -1242,15 +1242,15 @@ TQDomNodePrivate* TQDomNodePrivate::insertAfter( TQDomNodePrivate* newChild, TQD
 {
     // Error check
     if ( !newChild )
-	return 0;
+	return nullptr;
 
     // Error check
     if ( newChild == refChild )
-	return 0;
+	return nullptr;
 
     // Error check
     if ( refChild && refChild->parent() != this )
-	return 0;
+	return nullptr;
 
     // "mark lists as dirty"
     qt_nodeListTime++;
@@ -1259,7 +1259,7 @@ TQDomNodePrivate* TQDomNodePrivate::insertAfter( TQDomNodePrivate* newChild, TQD
     // all elements of the fragment instead of the fragment itself.
     if ( newChild->isDocumentFragment() ) {
 	// Fragment is empty ?
-	if ( newChild->first == 0 )
+	if ( !newChild->first )
 	    return newChild;
 
 	// New parent
@@ -1270,7 +1270,7 @@ TQDomNodePrivate* TQDomNodePrivate::insertAfter( TQDomNodePrivate* newChild, TQD
 	}
 
 	// Insert at the end
-	if ( !refChild || refChild->next == 0 ) {
+	if ( !refChild || !refChild->next ) {
 	    if ( last )
 		last->next = newChild->first;
 	    newChild->first->prev = last;
@@ -1288,8 +1288,8 @@ TQDomNodePrivate* TQDomNodePrivate::insertAfter( TQDomNodePrivate* newChild, TQD
 	// does not decrease the reference.
 
 	// Remove the nodes from the fragment
-	newChild->first = 0;
-	newChild->last = 0;
+	newChild->first = nullptr;
+	newChild->last = nullptr;
 	return newChild;
     }
 
@@ -1314,7 +1314,7 @@ TQDomNodePrivate* TQDomNodePrivate::insertAfter( TQDomNodePrivate* newChild, TQD
 	return newChild;
     }
 
-    if ( refChild->next == 0 ) {
+    if ( !refChild->next ) {
 	if ( last )
 	    last->next = newChild;
 	newChild->prev = last;
@@ -1335,11 +1335,11 @@ TQDomNodePrivate* TQDomNodePrivate::insertAfter( TQDomNodePrivate* newChild, TQD
 TQDomNodePrivate* TQDomNodePrivate::replaceChild( TQDomNodePrivate* newChild, TQDomNodePrivate* oldChild )
 {
     if ( oldChild->parent() != this )
-	return 0;
+	return nullptr;
     if ( !newChild || !oldChild )
-	return 0;
+	return nullptr;
     if ( newChild == oldChild )
-	return 0;
+	return nullptr;
 
     // mark lists as dirty
     qt_nodeListTime++;
@@ -1348,7 +1348,7 @@ TQDomNodePrivate* TQDomNodePrivate::replaceChild( TQDomNodePrivate* newChild, TQ
     // all elements of the fragment instead of the fragment itself.
     if ( newChild->isDocumentFragment() ) {
 	// Fragment is empty ?
-	if ( newChild->first == 0 )
+	if ( !newChild->first )
 	    return newChild;
 
 	// New parent
@@ -1373,15 +1373,15 @@ TQDomNodePrivate* TQDomNodePrivate::replaceChild( TQDomNodePrivate* newChild, TQ
 	    last = newChild->last;
 
 	oldChild->setNoParent();
-	oldChild->next = 0;
-	oldChild->prev = 0;
+	oldChild->next = nullptr;
+	oldChild->prev = nullptr;
 
 	// No need to increase the reference since TQDomDocumentFragment
 	// does not decrease the reference.
 
 	// Remove the nodes from the fragment
-	newChild->first = 0;
-	newChild->last = 0;
+	newChild->first = nullptr;
+	newChild->last = nullptr;
 
 	// We are no longer interested in the old node
 	if ( oldChild ) oldChild->deref();
@@ -1413,8 +1413,8 @@ TQDomNodePrivate* TQDomNodePrivate::replaceChild( TQDomNodePrivate* newChild, TQ
 	last = newChild;
 
     oldChild->setNoParent();
-    oldChild->next = 0;
-    oldChild->prev = 0;
+    oldChild->next = nullptr;
+    oldChild->prev = nullptr;
 
     // We are no longer interested in the old node
     if ( oldChild ) oldChild->deref();
@@ -1426,15 +1426,15 @@ TQDomNodePrivate* TQDomNodePrivate::removeChild( TQDomNodePrivate* oldChild )
 {
     // Error check
     if ( oldChild->parent() != this )
-	return 0;
+	return nullptr;
 
     // "mark lists as dirty"
     qt_nodeListTime++;
 
     // Perhaps oldChild was just created with "createElement" or that. In this case
     // its parent is TQDomDocument but it is not part of the documents child list.
-    if ( oldChild->next == 0 && oldChild->prev == 0 && first != oldChild )
-	return 0;
+    if ( !oldChild->next && !oldChild->prev && first != oldChild )
+	return nullptr;
 
     if ( oldChild->next )
 	oldChild->next->prev = oldChild->prev;
@@ -1447,8 +1447,8 @@ TQDomNodePrivate* TQDomNodePrivate::removeChild( TQDomNodePrivate* oldChild )
 	first = oldChild->next;
 
     oldChild->setNoParent();
-    oldChild->next = 0;
-    oldChild->prev = 0;
+    oldChild->next = nullptr;
+    oldChild->prev = nullptr;
 
     // We are no longer interested in the old node
     if ( oldChild ) oldChild->deref();
@@ -1459,7 +1459,7 @@ TQDomNodePrivate* TQDomNodePrivate::removeChild( TQDomNodePrivate* oldChild )
 TQDomNodePrivate* TQDomNodePrivate::appendChild( TQDomNodePrivate* newChild )
 {
     // No reference manipulation needed. Done in insertAfter.
-    return insertAfter( newChild, 0 );
+    return insertAfter( newChild, nullptr );
 }
 
 TQDomDocumentPrivate* TQDomNodePrivate::ownerDocument()
@@ -1485,7 +1485,7 @@ TQDomNodePrivate* TQDomNodePrivate::cloneNode( bool deep )
 static void qNormalizeNode( TQDomNodePrivate* n )
 {
     TQDomNodePrivate* p = n->first;
-    TQDomTextPrivate* t = 0;
+    TQDomTextPrivate* t = nullptr;
 
     while ( p ) {
 	if ( p->isText() ) {
@@ -1500,7 +1500,7 @@ static void qNormalizeNode( TQDomNodePrivate* n )
 	    }
 	} else {
 	    p = p->next;
-	    t = 0;
+	    t = nullptr;
 	}
     }
 }
@@ -1622,7 +1622,7 @@ void TQDomNodePrivate::save( TQTextStream& s, int depth, int indent ) const
 */
 TQDomNode::TQDomNode()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 /*!
@@ -2209,7 +2209,7 @@ bool TQDomNode::hasChildNodes() const
 {
     if ( !impl )
 	return false;
-    return IMPL->first != 0;
+    return IMPL->first;
 }
 
 /*!
@@ -2218,7 +2218,7 @@ bool TQDomNode::hasChildNodes() const
 */
 bool TQDomNode::isNull() const
 {
-    return ( impl == 0 );
+    return ( !impl );
 }
 
 /*!
@@ -2230,7 +2230,7 @@ bool TQDomNode::isNull() const
 void TQDomNode::clear()
 {
     if ( impl && impl->deref() ) delete impl;
-    impl = 0;
+    impl = nullptr;
 }
 
 /*!
@@ -2549,13 +2549,13 @@ TQDomNodePrivate* TQDomNamedNodeMapPrivate::namedItemNS( const TQString& nsURI,
 	++it;
 	n = it.current();
     }
-    return 0;
+    return nullptr;
 }
 
 TQDomNodePrivate* TQDomNamedNodeMapPrivate::setNamedItem( TQDomNodePrivate* arg )
 {
     if ( readonly || !arg )
-	return 0;
+	return nullptr;
 
     if ( appendToParent )
 	return parent->appendChild( arg );
@@ -2570,7 +2570,7 @@ TQDomNodePrivate* TQDomNamedNodeMapPrivate::setNamedItem( TQDomNodePrivate* arg
 TQDomNodePrivate* TQDomNamedNodeMapPrivate::setNamedItemNS( TQDomNodePrivate* arg )
 {
     if ( readonly || !arg )
-	return 0;
+	return nullptr;
 
     if ( appendToParent )
 	return parent->appendChild( arg );
@@ -2591,11 +2591,11 @@ TQDomNodePrivate* TQDomNamedNodeMapPrivate::setNamedItemNS( TQDomNodePrivate* ar
 TQDomNodePrivate* TQDomNamedNodeMapPrivate::removeNamedItem( const TQString& name )
 {
     if ( readonly )
-	return 0;
+	return nullptr;
 
     TQDomNodePrivate* p = namedItem( name );
-    if ( p == 0 )
-	return 0;
+    if ( !p )
+	return nullptr;
     if ( appendToParent )
 	return parent->removeChild( p );
 
@@ -2608,7 +2608,7 @@ TQDomNodePrivate* TQDomNamedNodeMapPrivate::removeNamedItem( const TQString& nam
 TQDomNodePrivate* TQDomNamedNodeMapPrivate::item( int index ) const
 {
     if ( (uint)index >= length() )
-	return 0;
+	return nullptr;
 
     TQDictIterator<TQDomNodePrivate> it( map );
     for ( int i = 0; i < index; ++i, ++it )
@@ -2623,12 +2623,12 @@ uint TQDomNamedNodeMapPrivate::length() const
 
 bool TQDomNamedNodeMapPrivate::contains( const TQString& name ) const
 {
-    return ( map[ name ] != 0 );
+    return ( map[ name ] );
 }
 
 bool TQDomNamedNodeMapPrivate::containsNS( const TQString& nsURI, const TQString & localName ) const
 {
-    return ( namedItemNS( nsURI, localName ) != 0 );
+    return ( namedItemNS( nsURI, localName ) );
 }
 
 /**************************************************************
@@ -2685,7 +2685,7 @@ bool TQDomNamedNodeMapPrivate::containsNS( const TQString& nsURI, const TQString
 */
 TQDomNamedNodeMap::TQDomNamedNodeMap()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 /*!
@@ -3012,7 +3012,7 @@ TQDomNodePrivate* TQDomDocumentTypePrivate::removeChild( TQDomNodePrivate* oldCh
 
 TQDomNodePrivate* TQDomDocumentTypePrivate::appendChild( TQDomNodePrivate* newChild )
 {
-    return insertAfter( newChild, 0 );
+    return insertAfter( newChild, nullptr );
 }
 
 void TQDomDocumentTypePrivate::save( TQTextStream& s, int, int indent ) const
@@ -3623,7 +3623,7 @@ TQDomAttrPrivate::~TQDomAttrPrivate()
 void TQDomAttrPrivate::setNodeValue( const TQString& v )
 {
     value = v;
-    TQDomTextPrivate *t = new TQDomTextPrivate( 0, this, v );
+    TQDomTextPrivate *t = new TQDomTextPrivate( nullptr, this, v );
     // keep the refcount balanced: appendChild() does a ref() anyway.
     t->deref();
     if ( first ) {
@@ -4017,7 +4017,7 @@ TQDomAttrPrivate* TQDomElementPrivate::setAttributeNode( TQDomAttrPrivate* newAt
 
 TQDomAttrPrivate* TQDomElementPrivate::setAttributeNodeNS( TQDomAttrPrivate* newAttr )
 {
-    TQDomNodePrivate* n = 0;
+    TQDomNodePrivate* n = nullptr;
     if ( !newAttr->prefix.isNull() )
 	n = m_attr->namedItemNS( newAttr->namespaceURI, newAttr->name );
 
@@ -4652,10 +4652,10 @@ TQDomTextPrivate* TQDomTextPrivate::splitText( int offset )
 {
     if ( !parent() ) {
 	tqWarning( "TQDomText::splitText  The node has no parent. So I can not split" );
-	return 0;
+	return nullptr;
     }
 
-    TQDomTextPrivate* t = new TQDomTextPrivate( ownerDocument(), 0, value.mid( offset ) );
+    TQDomTextPrivate* t = new TQDomTextPrivate( ownerDocument(), nullptr, value.mid( offset ) );
     value.truncate( offset );
 
     parent()->insertAfter( t, this );
@@ -5765,7 +5765,7 @@ bool TQDomProcessingInstruction::isProcessingInstruction() const
  **************************************************************/
 
 TQDomDocumentPrivate::TQDomDocumentPrivate()
-    : TQDomNodePrivate( 0 )
+    : TQDomNodePrivate( nullptr )
 {
     impl = new TQDomImplementationPrivate();
     type = new TQDomDocumentTypePrivate( this, this );
@@ -5774,7 +5774,7 @@ TQDomDocumentPrivate::TQDomDocumentPrivate()
 }
 
 TQDomDocumentPrivate::TQDomDocumentPrivate( const TQString& aname )
-    : TQDomNodePrivate( 0 )
+    : TQDomNodePrivate( nullptr )
 {
     impl = new TQDomImplementationPrivate();
     type = new TQDomDocumentTypePrivate( this, this );
@@ -5784,10 +5784,10 @@ TQDomDocumentPrivate::TQDomDocumentPrivate( const TQString& aname )
 }
 
 TQDomDocumentPrivate::TQDomDocumentPrivate( TQDomDocumentTypePrivate* dt )
-    : TQDomNodePrivate( 0 )
+    : TQDomNodePrivate( nullptr )
 {
     impl = new TQDomImplementationPrivate();
-    if ( dt != 0 ) {
+    if ( dt ) {
 	type = dt;
 	type->ref();
     } else {
@@ -5819,8 +5819,8 @@ void TQDomDocumentPrivate::clear()
 {
     if ( impl->deref() ) delete impl;
     if ( type->deref() ) delete type;
-    impl = 0;
-    type = 0;
+    impl = nullptr;
+    type = nullptr;
     TQDomNodePrivate::clear();
 }
 
@@ -5888,14 +5888,14 @@ TQDomElementPrivate* TQDomDocumentPrivate::documentElement()
 
 TQDomElementPrivate* TQDomDocumentPrivate::createElement( const TQString& tagName )
 {
-    TQDomElementPrivate* e = new TQDomElementPrivate( this, 0, tagName );
+    TQDomElementPrivate* e = new TQDomElementPrivate( this, nullptr, tagName );
     e->deref();
     return e;
 }
 
 TQDomElementPrivate* TQDomDocumentPrivate::createElementNS( const TQString& nsURI, const TQString& qName )
 {
-    TQDomElementPrivate* e = new TQDomElementPrivate( this, 0, nsURI, qName );
+    TQDomElementPrivate* e = new TQDomElementPrivate( this, nullptr, nsURI, qName );
     e->deref();
     return e;
 }
@@ -5909,56 +5909,56 @@ TQDomDocumentFragmentPrivate* TQDomDocumentPrivate::createDocumentFragment()
 
 TQDomTextPrivate* TQDomDocumentPrivate::createTextNode( const TQString& data )
 {
-    TQDomTextPrivate* t = new TQDomTextPrivate( this, 0, data );
+    TQDomTextPrivate* t = new TQDomTextPrivate( this, nullptr, data );
     t->deref();
     return t;
 }
 
 TQDomCommentPrivate* TQDomDocumentPrivate::createComment( const TQString& data )
 {
-    TQDomCommentPrivate* c = new TQDomCommentPrivate( this, 0, data );
+    TQDomCommentPrivate* c = new TQDomCommentPrivate( this, nullptr, data );
     c->deref();
     return c;
 }
 
 TQDomCDATASectionPrivate* TQDomDocumentPrivate::createCDATASection( const TQString& data )
 {
-    TQDomCDATASectionPrivate* c = new TQDomCDATASectionPrivate( this, 0, data );
+    TQDomCDATASectionPrivate* c = new TQDomCDATASectionPrivate( this, nullptr, data );
     c->deref();
     return c;
 }
 
 TQDomProcessingInstructionPrivate* TQDomDocumentPrivate::createProcessingInstruction( const TQString& target, const TQString& data )
 {
-    TQDomProcessingInstructionPrivate* p = new TQDomProcessingInstructionPrivate( this, 0, target, data );
+    TQDomProcessingInstructionPrivate* p = new TQDomProcessingInstructionPrivate( this, nullptr, target, data );
     p->deref();
     return p;
 }
 
 TQDomAttrPrivate* TQDomDocumentPrivate::createAttribute( const TQString& aname )
 {
-    TQDomAttrPrivate* a = new TQDomAttrPrivate( this, 0, aname );
+    TQDomAttrPrivate* a = new TQDomAttrPrivate( this, nullptr, aname );
     a->deref();
     return a;
 }
 
 TQDomAttrPrivate* TQDomDocumentPrivate::createAttributeNS( const TQString& nsURI, const TQString& qName )
 {
-    TQDomAttrPrivate* a = new TQDomAttrPrivate( this, 0, nsURI, qName );
+    TQDomAttrPrivate* a = new TQDomAttrPrivate( this, nullptr, nsURI, qName );
     a->deref();
     return a;
 }
 
 TQDomEntityReferencePrivate* TQDomDocumentPrivate::createEntityReference( const TQString& aname )
 {
-    TQDomEntityReferencePrivate* e = new TQDomEntityReferencePrivate( this, 0, aname );
+    TQDomEntityReferencePrivate* e = new TQDomEntityReferencePrivate( this, nullptr, aname );
     e->deref();
     return e;
 }
 
 TQDomNodePrivate* TQDomDocumentPrivate::importNode( const TQDomNodePrivate* importedNode, bool deep )
 {
-    TQDomNodePrivate *node = 0;
+    TQDomNodePrivate *node = nullptr;
     switch ( importedNode->nodeType() ) {
 	case TQDomNode::AttributeNode:
 	    node = new TQDomAttrPrivate( (TQDomAttrPrivate*)importedNode, true );
@@ -6161,7 +6161,7 @@ void TQDomDocumentPrivate::save( TQTextStream& s, int, int indent ) const
 */
 TQDomDocument::TQDomDocument()
 {
-    impl = 0;
+    impl = nullptr;
 }
 
 /*!
@@ -7007,7 +7007,7 @@ bool TQDomHandler::characters( const TQString&  ch )
     if ( cdata ) {
 	node->appendChild( doc->createCDATASection( ch ) );
     } else if ( !entityName.isEmpty() ) {
-	TQDomEntityPrivate* e = new TQDomEntityPrivate( doc, 0, entityName,
+	TQDomEntityPrivate* e = new TQDomEntityPrivate( doc, nullptr, entityName,
 		TQString::null, TQString::null, TQString::null );
 	e->value = ch;
 	doc->doctype()->appendChild( e );
@@ -7071,7 +7071,7 @@ bool TQDomHandler::comment( const TQString& ch )
 
 bool TQDomHandler::unparsedEntityDecl( const TQString &name, const TQString &publicId, const TQString &systemId, const TQString &notationName )
 {
-    TQDomEntityPrivate* e = new TQDomEntityPrivate( doc, 0, name,
+    TQDomEntityPrivate* e = new TQDomEntityPrivate( doc, nullptr, name,
 	    publicId, systemId, notationName );
     doc->doctype()->appendChild( e );
     return true;
@@ -7084,7 +7084,7 @@ bool TQDomHandler::externalEntityDecl( const TQString &name, const TQString &pub
 
 bool TQDomHandler::notationDecl( const TQString & name, const TQString & publicId, const TQString & systemId )
 {
-    TQDomNotationPrivate* n = new TQDomNotationPrivate( doc, 0, name, publicId, systemId );
+    TQDomNotationPrivate* n = new TQDomNotationPrivate( doc, nullptr, name, publicId, systemId );
     doc->doctype()->appendChild( n );
     return true;
 }
diff --git a/src/xml/tqdom.h b/src/xml/tqdom.h
index 16fd11c1a..ba88bd362 100644
--- a/src/xml/tqdom.h
+++ b/src/xml/tqdom.h
@@ -318,16 +318,16 @@ public:
     TQDomElement documentElement() const;
 
     // TQt extensions
-    bool setContent( const TQCString& text, bool namespaceProcessing, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0  );
-    bool setContent( const TQByteArray& text, bool namespaceProcessing, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0  );
-    bool setContent( const TQString& text, bool namespaceProcessing, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0  );
-    bool setContent( TQIODevice* dev, bool namespaceProcessing, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0  );
-    bool setContent( const TQCString& text, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
-    bool setContent( const TQByteArray& text, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0  );
-    bool setContent( const TQString& text, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0  );
-    bool setContent( TQIODevice* dev, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0  );
-
-    bool setContent( TQXmlInputSource *source, TQXmlReader *reader, TQString *errorMsg=0, int *errorLine=0, int *errorColumn=0  );
+    bool setContent( const TQCString& text, bool namespaceProcessing, TQString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr  );
+    bool setContent( const TQByteArray& text, bool namespaceProcessing, TQString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr  );
+    bool setContent( const TQString& text, bool namespaceProcessing, TQString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr  );
+    bool setContent( TQIODevice* dev, bool namespaceProcessing, TQString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr  );
+    bool setContent( const TQCString& text, TQString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr );
+    bool setContent( const TQByteArray& text, TQString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr  );
+    bool setContent( const TQString& text, TQString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr  );
+    bool setContent( TQIODevice* dev, TQString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr  );
+
+    bool setContent( TQXmlInputSource *source, TQXmlReader *reader, TQString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr  );
 
     // Reimplemented from TQDomNode
     TQDomNode::NodeType nodeType() const;
diff --git a/src/xml/tqsvgdevice.cpp b/src/xml/tqsvgdevice.cpp
index 3aec30c7a..bcab5b793 100644
--- a/src/xml/tqsvgdevice.cpp
+++ b/src/xml/tqsvgdevice.cpp
@@ -110,8 +110,8 @@ enum ElementType {
 };
 
 typedef TQMap<TQString,ElementType> TQSvgTypeMap;
-static TQSvgTypeMap *qSvgTypeMap=0; // element types
-static TQMap<TQString,TQString> *qSvgColMap=0; // recognized color keyword names
+static TQSvgTypeMap *qSvgTypeMap=nullptr; // element types
+static TQMap<TQString,TQString> *qSvgColMap=nullptr; // recognized color keyword names
 
 /*!
     \class TQSvgDevice tqsvgdevice.h
@@ -138,7 +138,7 @@ static TQMap<TQString,TQString> *qSvgColMap=0; // recognized color keyword names
 
 TQSvgDevice::TQSvgDevice()
     : TQPaintDevice( TQInternal::ExternalDevice ),
-      pt( 0 )
+      pt( nullptr )
 {
     d = new TQSvgDevicePrivate;
     d->currentClip = 0;
@@ -151,8 +151,8 @@ TQSvgDevice::TQSvgDevice()
 
 TQSvgDevice::~TQSvgDevice()
 {
-    delete qSvgTypeMap; qSvgTypeMap = 0;	// static
-    delete qSvgColMap; qSvgColMap = 0;
+    delete qSvgTypeMap; qSvgTypeMap = nullptr;	// static
+    delete qSvgColMap; qSvgColMap = nullptr;
     delete d;
 }
 
@@ -207,8 +207,8 @@ bool TQSvgDevice::play( TQPainter *painter )
 		   ? attr.namedItem( "width" ).nodeValue() : TQString( "100%" );
     TQString hstr = attr.contains( "height" )
 		   ? attr.namedItem( "height" ).nodeValue() : TQString( "100%" );
-    double width = parseLen( wstr, 0, true );
-    double height = parseLen( hstr, 0, false );
+    double width = parseLen( wstr, nullptr, true );
+    double height = parseLen( hstr, nullptr, false );
     // SVG doesn't respect x and y. But we want a proper bounding rect.
     brect.setWidth( int(width) - x );
     brect.setHeight( int(height) - y );
@@ -257,7 +257,7 @@ bool TQSvgDevice::play( TQPainter *painter )
         { "text",     TextElement     },
         { "tspan",    TSpanElement    },
 	{ "title",    TitleElement    },
-	{ 0,          InvalidElement  }
+	{ nullptr,          InvalidElement  }
     };
     // initialize only once
     if ( !qSvgTypeMap ) {
@@ -1064,7 +1064,7 @@ TQColor TQSvgDevice::parseColor( const TQString &col )
 	{ "teal",    "#008080" },
 	{ "aqua",    "#00ffff" },
 	// ### the latest spec has more
-	{ 0,         0         }
+	{ nullptr,         nullptr         }
     };
 
     // initialize color map on first use
diff --git a/src/xml/tqsvgdevice_p.h b/src/xml/tqsvgdevice_p.h
index 84d9cf214..faec5dafc 100644
--- a/src/xml/tqsvgdevice_p.h
+++ b/src/xml/tqsvgdevice_p.h
@@ -100,7 +100,7 @@ private:
     void saveAttributes();
     void restoreAttributes();
     TQColor parseColor( const TQString &col );
-    double parseLen( const TQString &str, bool *ok=0, bool horiz=true ) const;
+    double parseLen( const TQString &str, bool *ok=nullptr, bool horiz=true ) const;
     int lenToInt( const TQDomNamedNodeMap &map, const TQString &attr,
 		  int def=0 ) const;
     double lenToDouble( const TQDomNamedNodeMap &map, const TQString &attr,
diff --git a/src/xml/tqxml.cpp b/src/xml/tqxml.cpp
index eab061cb0..097cf6213 100644
--- a/src/xml/tqxml.cpp
+++ b/src/xml/tqxml.cpp
@@ -945,11 +945,11 @@ const TQChar TQXmlInputSource::EndOfDocument = TQChar((ushort)0xffff);
 */
 void TQXmlInputSource::init()
 {
-    inputDevice = 0;
-    inputStream = 0;
+    inputDevice = nullptr;
+    inputStream = nullptr;
 
     setData( TQString::null );
-    encMapper = 0;
+    encMapper = nullptr;
 }
 
 /*!
@@ -1108,10 +1108,10 @@ void TQXmlInputSource::fetchData()
 {
     TQByteArray rawData;
 
-    if ( inputDevice != 0 ) {
+    if ( inputDevice ) {
 	if ( inputDevice->isOpen() || inputDevice->open( IO_ReadOnly )  )
 	    rawData = inputDevice->readAll();
-    } else if ( inputStream != 0 ) {
+    } else if ( inputStream ) {
 	if ( inputStream->device()->isDirectAccess() ) {
 	    rawData = inputStream->device()->readAll();
 	} else {
@@ -1144,10 +1144,10 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
 	return TQString::null;
     if ( beginning ) {
 	delete encMapper;
-	encMapper = 0;
+	encMapper = nullptr;
     }
-    if ( encMapper == 0 ) {
-	TQTextCodec *codec = 0;
+    if ( !encMapper ) {
+	TQTextCodec *codec = nullptr;
 	// look for byte order mark and read the first 5 characters
 	if ( data.size() >= 2 &&
 		( ((uchar)data.at(0)==(uchar)0xfe &&
@@ -1187,7 +1187,7 @@ TQString TQXmlInputSource::fromRawData( const TQByteArray &data, bool beginning
 		}
 
 		codec = TQTextCodec::codecForName( encoding );
-		if ( codec == 0 ) {
+		if ( !codec ) {
 		    return input;
 		}
 		delete encMapper;
@@ -2095,7 +2095,7 @@ bool TQXmlDefaultHandler::unparsedEntityDecl( const TQString&, const TQString&,
 bool TQXmlDefaultHandler::resolveEntity( const TQString&, const TQString&,
 	TQXmlInputSource*& ret )
 {
-    ret = 0;
+    ret = nullptr;
     return true;
 }
 
@@ -2222,7 +2222,7 @@ private:
     // functions
     inline TQXmlSimpleReaderPrivate()
     {
-	parseStack = 0;
+	parseStack = nullptr;
         undefEntityInAttrHack = false;
     }
 
@@ -2683,12 +2683,12 @@ TQXmlSimpleReader::TQXmlSimpleReader()
     d = new TQXmlSimpleReaderPrivate();
     d->locator = new TQXmlSimpleReaderLocator( this );
 
-    entityRes  = 0;
-    dtdHnd     = 0;
-    contentHnd = 0;
-    errorHnd   = 0;
-    lexicalHnd = 0;
-    declHnd    = 0;
+    entityRes  = nullptr;
+    dtdHnd     = nullptr;
+    contentHnd = nullptr;
+    errorHnd   = nullptr;
+    lexicalHnd = nullptr;
+    declHnd    = nullptr;
 
     // default feature settings
     d->useNamespaces = true;
@@ -2711,7 +2711,7 @@ TQXmlSimpleReader::~TQXmlSimpleReader()
 */
 bool TQXmlSimpleReader::feature( const TQString& name, bool *ok ) const
 {
-    if ( ok != 0 )
+    if ( ok )
 	*ok = true;
     if        ( name == "http://xml.org/sax/features/namespaces" ) {
 	return d->useNamespaces;
@@ -2723,7 +2723,7 @@ bool TQXmlSimpleReader::feature( const TQString& name, bool *ok ) const
 	return d->reportEntities;
     } else {
 	tqWarning( "Unknown feature %s", name.latin1() );
-	if ( ok != 0 )
+	if ( ok )
 	    *ok = false;
     }
     return false;
@@ -2802,9 +2802,9 @@ bool TQXmlSimpleReader::hasFeature( const TQString& name ) const
 */
 void* TQXmlSimpleReader::property( const TQString&, bool *ok ) const
 {
-    if ( ok != 0 )
+    if ( ok )
 	*ok = false;
-    return 0;
+    return nullptr;
 }
 
 /*! \reimp
@@ -2942,7 +2942,7 @@ bool TQXmlSimpleReader::parse( const TQXmlInputSource *input, bool incremental )
 	d->initIncrementalParsing();
     } else {
 	delete d->parseStack;
-	d->parseStack = 0;
+	d->parseStack = nullptr;
     }
     // call the handler
     if ( contentHnd ) {
@@ -2984,7 +2984,7 @@ bool TQXmlSimpleReader::parse( const TQXmlInputSource *input, bool incremental )
 */
 bool TQXmlSimpleReader::parseContinue()
 {
-    if ( d->parseStack == 0 || d->parseStack->isEmpty() )
+    if ( !d->parseStack || d->parseStack->isEmpty() )
 	return false;
     initData();
     int state = d->parseStack->pop().state;
@@ -3001,7 +3001,7 @@ bool TQXmlSimpleReader::parseBeginOrContinue( int state, bool incremental )
     if ( state==0 ) {
 	if ( !parseProlog() ) {
 	    if ( incremental && d->error.isNull() ) {
-		pushParseState( 0, 0 );
+		pushParseState( nullptr, 0 );
 		return true;
 	    } else {
 		d->tags.clear();
@@ -3013,7 +3013,7 @@ bool TQXmlSimpleReader::parseBeginOrContinue( int state, bool incremental )
     if ( state==1 ) {
 	if ( !parseElement() ) {
 	    if ( incremental && d->error.isNull() ) {
-		pushParseState( 0, 1 );
+		pushParseState( nullptr, 1 );
 		return true;
 	    } else {
 		d->tags.clear();
@@ -3026,7 +3026,7 @@ bool TQXmlSimpleReader::parseBeginOrContinue( int state, bool incremental )
     while ( !atEnd() ) {
 	if ( !parseMisc() ) {
 	    if ( incremental && d->error.isNull() ) {
-		pushParseState( 0, 2 );
+		pushParseState( nullptr, 2 );
 		return true;
 	    } else {
 		d->tags.clear();
@@ -3036,7 +3036,7 @@ bool TQXmlSimpleReader::parseBeginOrContinue( int state, bool incremental )
     }
     if ( !atEndOrig && incremental ) {
 	// we parsed something at all, so be prepared to come back later
-	pushParseState( 0, 2 );
+	pushParseState( nullptr, 2 );
 	return true;
     }
     // is stack empty?
@@ -3048,7 +3048,7 @@ bool TQXmlSimpleReader::parseBeginOrContinue( int state, bool incremental )
     // call the handler
     if ( contentHnd ) {
 	delete d->parseStack;
-	d->parseStack = 0;
+	d->parseStack = nullptr;
 	if ( !contentHnd->endDocument() ) {
 	    reportParseError( contentHnd->errorString() );
 	    return false;
@@ -3172,7 +3172,7 @@ bool TQXmlSimpleReader::parseProlog()
     signed char state;
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	d->xmldecl_possible = true;
 	d->doctype_read = false;
 	state = Init;
@@ -3362,7 +3362,7 @@ bool TQXmlSimpleReader::parseElement()
     int state;
     int input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	state = Init;
     } else {
 	state = d->parseStack->pop().state;
@@ -3725,7 +3725,7 @@ bool TQXmlSimpleReader::parseContent()
     signed char state;
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	d->contentCharDataRead = false;
 	state = Init;
     } else {
@@ -4027,7 +4027,7 @@ bool TQXmlSimpleReader::parseMisc()
     signed char state;
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	state = Init;
     } else {
 	state = d->parseStack->pop().state;
@@ -4181,7 +4181,7 @@ bool TQXmlSimpleReader::parsePI()
     signed char state;
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	state = Init;
     } else {
 	state = d->parseStack->pop().state;
@@ -4407,7 +4407,7 @@ bool TQXmlSimpleReader::parseDoctype()
     signed char state;
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	d->startDTDwasReported = false;
 	d->systemId = TQString::null;
 	d->publicId = TQString::null;
@@ -4615,7 +4615,7 @@ bool TQXmlSimpleReader::parseExternalID()
     signed char state;
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	d->systemId = TQString::null;
 	d->publicId = TQString::null;
 	state = Init;
@@ -4778,7 +4778,7 @@ bool TQXmlSimpleReader::parseMarkupdecl()
     signed char state;
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	state = Init;
     } else {
 	state = d->parseStack->pop().state;
@@ -4935,7 +4935,7 @@ bool TQXmlSimpleReader::parsePEReference()
     signed char state;
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	state = Init;
     } else {
 	state = d->parseStack->pop().state;
@@ -4972,7 +4972,7 @@ bool TQXmlSimpleReader::parsePEReference()
 		    } else if ( entityRes ) {
 			TQMap<TQString,TQXmlSimpleReaderPrivate::ExternParameterEntity>::Iterator it2;
 			it2 = d->externParameterEntities.find( ref() );
-			TQXmlInputSource *ret = 0;
+			TQXmlInputSource *ret = nullptr;
 			if ( it2 != d->externParameterEntities.end() ) {
 			    if ( !entityRes->resolveEntity( it2.data().publicId, it2.data().systemId, ret ) ) {
 				delete ret;
@@ -5107,7 +5107,7 @@ bool TQXmlSimpleReader::parseAttlistDecl()
     signed char state;
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	state = Init;
     } else {
 	state = d->parseStack->pop().state;
@@ -5322,7 +5322,7 @@ bool TQXmlSimpleReader::parseAttType()
     signed char state;
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	state = Init;
     } else {
 	state = d->parseStack->pop().state;
@@ -5542,7 +5542,7 @@ bool TQXmlSimpleReader::parseAttValue()
     signed char state;
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	state = Init;
     } else {
 	state = d->parseStack->pop().state;
@@ -5683,7 +5683,7 @@ bool TQXmlSimpleReader::parseElementDecl()
     signed char state;
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	state = Init;
     } else {
 	state = d->parseStack->pop().state;
@@ -5891,7 +5891,7 @@ bool TQXmlSimpleReader::parseNotationDecl()
     signed char state;
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	state = Init;
     } else {
 	state = d->parseStack->pop().state;
@@ -6034,7 +6034,7 @@ bool TQXmlSimpleReader::parseChoiceSeq()
     signed char state;
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	state = Init;
     } else {
 	state = d->parseStack->pop().state;
@@ -6250,7 +6250,7 @@ bool TQXmlSimpleReader::parseEntityDecl()
     signed char state;
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	state = Init;
     } else {
 	state = d->parseStack->pop().state;
@@ -6524,7 +6524,7 @@ bool TQXmlSimpleReader::parseEntityValue()
     signed char state;
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	state = Init;
     } else {
 	state = d->parseStack->pop().state;
@@ -6642,7 +6642,7 @@ bool TQXmlSimpleReader::parseComment()
     signed char state;
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	state = Init;
     } else {
 	state = d->parseStack->pop().state;
@@ -6753,7 +6753,7 @@ bool TQXmlSimpleReader::parseAttribute()
     int state;
     int input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	state = Init;
     } else {
 	state = d->parseStack->pop().state;
@@ -6859,7 +6859,7 @@ bool TQXmlSimpleReader::parseName()
     };
     int state;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	state = Init;
     } else {
 	state = d->parseStack->pop().state;
@@ -6944,7 +6944,7 @@ bool TQXmlSimpleReader::parseNmtoken()
     signed char state;
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	state = Init;
     } else {
 	state = d->parseStack->pop().state;
@@ -7051,7 +7051,7 @@ bool TQXmlSimpleReader::parseReference()
     signed char state;
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	d->parseReference_charDataRead = false;
 	state = Init;
     } else {
@@ -7302,7 +7302,7 @@ bool TQXmlSimpleReader::processReference()
 			    // Included if validating
 			    bool skipIt = true;
 			    if ( entityRes ) {
-				TQXmlInputSource *ret = 0;
+				TQXmlInputSource *ret = nullptr;
 				if ( !entityRes->resolveEntity( itExtern.data().publicId, itExtern.data().systemId, ret ) ) {
 				    delete ret;
 				    reportParseError( entityRes->errorString() );
@@ -7378,7 +7378,7 @@ bool TQXmlSimpleReader::parseString()
     signed char state; // state in this function is the position in the string s
     signed char input;
 
-    if ( d->parseStack==0 || d->parseStack->isEmpty() ) {
+    if ( !d->parseStack || d->parseStack->isEmpty() ) {
 	d->Done = d->parseString_s.length();
 	state = 0;
     } else {
@@ -7513,7 +7513,7 @@ bool TQXmlSimpleReader::eat_ws()
 	}
 	next();
     }
-    if ( d->parseStack != 0 ) {
+    if ( d->parseStack ) {
 	unexpectedEof( &TQXmlSimpleReader::eat_ws, 0 );
 	return false;
     }
@@ -7599,7 +7599,7 @@ void TQXmlSimpleReader::reportParseError( const TQString& error )
 */
 void TQXmlSimpleReader::unexpectedEof( ParseFunction where, int state )
 {
-    if ( d->parseStack == 0 ) {
+    if ( !d->parseStack ) {
 	reportParseError( XMLERR_UNEXPECTEDEOF );
     } else {
 	if ( c == TQXmlInputSource::EndOfDocument ) {
@@ -7619,7 +7619,7 @@ void TQXmlSimpleReader::unexpectedEof( ParseFunction where, int state )
 */
 void TQXmlSimpleReader::parseFailed( ParseFunction where, int state )
 {
-    if ( d->parseStack!=0 && d->error.isNull() ) {
+    if ( d->parseStack && d->error.isNull() ) {
 	pushParseState( where, state );
     }
 }
diff --git a/src/xml/tqxml.h b/src/xml/tqxml.h
index 0dae44a8f..c4e48b133 100644
--- a/src/xml/tqxml.h
+++ b/src/xml/tqxml.h
@@ -226,10 +226,10 @@ private:
 class TQM_EXPORT_XML TQXmlReader
 {
 public:
-    virtual bool feature( const TQString& name, bool *ok = 0 ) const = 0;
+    virtual bool feature( const TQString& name, bool *ok = nullptr ) const = 0;
     virtual void setFeature( const TQString& name, bool value ) = 0;
     virtual bool hasFeature( const TQString& name ) const = 0;
-    virtual void* property( const TQString& name, bool *ok = 0 ) const = 0;
+    virtual void* property( const TQString& name, bool *ok = nullptr ) const = 0;
     virtual void setProperty( const TQString& name, void* value ) = 0;
     virtual bool hasProperty( const TQString& name ) const = 0;
     virtual void setEntityResolver( TQXmlEntityResolver* handler ) = 0;
@@ -254,11 +254,11 @@ public:
     TQXmlSimpleReader();
     virtual ~TQXmlSimpleReader();
 
-    bool feature( const TQString& name, bool *ok = 0 ) const;
+    bool feature( const TQString& name, bool *ok = nullptr ) const;
     void setFeature( const TQString& name, bool value );
     bool hasFeature( const TQString& name ) const;
 
-    void* property( const TQString& name, bool *ok = 0 ) const;
+    void* property( const TQString& name, bool *ok = nullptr ) const;
     void setProperty( const TQString& name, void* value );
     bool hasProperty( const TQString& name ) const;
 
diff --git a/tools/assistant/config.cpp b/tools/assistant/config.cpp
index ae3db7e1e..bfaae642b 100644
--- a/tools/assistant/config.cpp
+++ b/tools/assistant/config.cpp
@@ -42,7 +42,7 @@
 #include <tqsettings.h>
 #include <tqxml.h>
 
-static Config *static_configuration = 0;
+static Config *static_configuration = nullptr;
 
 inline TQString getVersionString()
 {
diff --git a/tools/assistant/finddialog.ui.h b/tools/assistant/finddialog.ui.h
index b515f31e2..bf254ce87 100644
--- a/tools/assistant/finddialog.ui.h
+++ b/tools/assistant/finddialog.ui.h
@@ -35,7 +35,7 @@
 
 void FindDialog::init()
 {
-    lastBrowser = 0;
+    lastBrowser = nullptr;
     onceFound = false;
     findExpr = "";
     sb = new TQStatusBar( this );
diff --git a/tools/assistant/helpdialogimpl.cpp b/tools/assistant/helpdialogimpl.cpp
index 4824c5d92..23a62cef3 100644
--- a/tools/assistant/helpdialogimpl.cpp
+++ b/tools/assistant/helpdialogimpl.cpp
@@ -353,7 +353,7 @@ void HelpDialog::loadIndexFile()
     processEvents();
 
     listIndex->clear();
-    HelpNavigationListItem *lastItem = 0;
+    HelpNavigationListItem *lastItem = nullptr;
     TQString lastKeyword = TQString::null;
     TQValueList<IndexKeyword>::ConstIterator it = lst.begin();
     for ( ; it != lst.end(); ++it ) {
@@ -812,7 +812,7 @@ void HelpDialog::insertContents()
     for ( ; lstIt.current(); ++lstIt ) {
 	HelpNavigationContentsItem *newEntry;
 
-	HelpNavigationContentsItem *contentEntry = 0;
+	HelpNavigationContentsItem *contentEntry = nullptr;
 	TQPtrStack<HelpNavigationContentsItem> stack;
 	stack.clear();
 	int depth = 0;
diff --git a/tools/assistant/helpdialogimpl.h b/tools/assistant/helpdialogimpl.h
index ca3680d88..058757ba4 100644
--- a/tools/assistant/helpdialogimpl.h
+++ b/tools/assistant/helpdialogimpl.h
@@ -68,7 +68,7 @@ class SearchValidator : public TQValidator
 {
     TQ_OBJECT
 public:
-    SearchValidator( TQObject *parent, const char *name = 0 )
+    SearchValidator( TQObject *parent, const char *name = nullptr )
 	: TQValidator( parent, name ) {}
     ~SearchValidator() {}
     TQValidator::State validate( TQString &str, int & ) const;
diff --git a/tools/assistant/helpwindow.h b/tools/assistant/helpwindow.h
index 85cfad901..b98caad1f 100644
--- a/tools/assistant/helpwindow.h
+++ b/tools/assistant/helpwindow.h
@@ -45,7 +45,7 @@ class HelpWindow : public TQTextBrowser
 {
     TQ_OBJECT
 public:
-    HelpWindow( MainWindow *m, TQWidget *parent = 0, const char *name = 0 );
+    HelpWindow( MainWindow *m, TQWidget *parent = nullptr, const char *name = nullptr );
     void setSource( const TQString &name );
     TQPopupMenu *createPopupMenu( const TQPoint& pos );
     void blockScrolling( bool b );
diff --git a/tools/assistant/index.cpp b/tools/assistant/index.cpp
index d41a744eb..ea4dd4764 100644
--- a/tools/assistant/index.cpp
+++ b/tools/assistant/index.cpp
@@ -140,7 +140,7 @@ void Index::insertInDict( const TQString &str, int docNum )
 {
     if ( strcmp( str, "amp" ) == 0 || strcmp( str, "nbsp" ) == 0 )
 	return;
-    Entry *e = 0;
+    Entry *e = nullptr;
     if ( dict.count() )
 	e = dict[ str ];
 
@@ -265,7 +265,7 @@ TQStringList Index::query( const TQStringList &terms, const TQStringList &termSe
 
     TQStringList::ConstIterator it = terms.begin();
     for ( it = terms.begin(); it != terms.end(); ++it ) {
-	Entry *e = 0;
+	Entry *e = nullptr;
 	if ( (*it).contains( '*' ) ) {
 	    TQValueList<Document> wcts = setupDummyTerm( getWildcardTerms( *it ) );
 	    termList.append( new Term( "dummy", wcts.count(), wcts ) );
@@ -411,7 +411,7 @@ TQValueList<Document> Index::setupDummyTerm( const TQStringList &terms )
     TermList termList;
     TQStringList::ConstIterator it = terms.begin();
     for ( ; it != terms.end(); ++it ) {
-	Entry *e = 0;
+	Entry *e = nullptr;
 	if ( dict[ *it ] ) {
 	    e = dict[ *it ];
 	    termList.append( new Term( *it, e->documents.count(), e->documents ) );
diff --git a/tools/assistant/lib/tqassistantclient.cpp b/tools/assistant/lib/tqassistantclient.cpp
index c343c39e7..bcb6973f1 100644
--- a/tools/assistant/lib/tqassistantclient.cpp
+++ b/tools/assistant/lib/tqassistantclient.cpp
@@ -45,7 +45,7 @@ class TQAssistantClientPrivate
     TQStringList arguments;
 };
 
-static TQMap<const TQAssistantClient*,TQAssistantClientPrivate*> *dpointers = 0;
+static TQMap<const TQAssistantClient*,TQAssistantClientPrivate*> *dpointers = nullptr;
 
 static TQAssistantClientPrivate *data( const TQAssistantClient *client, bool create=false )
 {
@@ -183,7 +183,7 @@ TQAssistantClient::~TQAssistantClient()
 	    delete d;
 	    if( dpointers->isEmpty() ) {
 		delete dpointers;
-		dpointers = 0;
+		dpointers = nullptr;
 	    }
 	}
     }
diff --git a/tools/assistant/lib/tqassistantclient.h b/tools/assistant/lib/tqassistantclient.h
index 17796431c..a89e42541 100644
--- a/tools/assistant/lib/tqassistantclient.h
+++ b/tools/assistant/lib/tqassistantclient.h
@@ -45,7 +45,7 @@ class TQ_EXPORT TQAssistantClient : public TQObject
     TQ_PROPERTY( bool open READ isOpen )
 
 public:
-    TQAssistantClient( const TQString &path, TQObject *parent = 0, const char *name = 0 );
+    TQAssistantClient( const TQString &path, TQObject *parent = nullptr, const char *name = nullptr );
     ~TQAssistantClient();
 
     bool isOpen() const;
diff --git a/tools/assistant/main.cpp b/tools/assistant/main.cpp
index 83c367d62..5fc6c2b9f 100644
--- a/tools/assistant/main.cpp
+++ b/tools/assistant/main.cpp
@@ -60,7 +60,7 @@ class AssistantSocket : public TQSocket
 {
     TQ_OBJECT
 public:
-    AssistantSocket( int sock, TQObject *parent = 0 );
+    AssistantSocket( int sock, TQObject *parent = nullptr );
     ~AssistantSocket() {}
 
 signals:
@@ -76,7 +76,7 @@ class AssistantServer : public TQServerSocket
 {
     TQ_OBJECT
 public:
-    AssistantServer( TQObject* parent = 0 );
+    AssistantServer( TQObject* parent = nullptr );
     void newConnection( int socket );
     TQ_UINT16 getPort() const;
 
@@ -157,7 +157,7 @@ int main( int argc, char ** argv )
     TQApplication a(argc, argv, withGUI);
 
     TQString resourceDir;
-    AssistantServer *as = 0;
+    AssistantServer *as = nullptr;
     TQStringList catlist;
     TQString file, profileName, aDocPath;
     bool server = false;
@@ -297,7 +297,7 @@ int main( int argc, char ** argv )
     a.installTranslator( &qtTranslator );
 
 
-    Config *conf = 0;
+    Config *conf = nullptr;
     if (configLoaded)
         conf = Config::configuration();
     else
diff --git a/tools/assistant/mainwindow.ui.h b/tools/assistant/mainwindow.ui.h
index 82312b2f8..fa1937762 100644
--- a/tools/assistant/mainwindow.ui.h
+++ b/tools/assistant/mainwindow.ui.h
@@ -68,7 +68,7 @@ void MainWindow::init()
     windows->append( this );
     tabs = new TabbedBrowser( this, "qt_assistant_tabbedbrowser" );
     setCentralWidget( tabs );
-    settingsDia = 0;
+    settingsDia = nullptr;
 
     Config *config = Config::configuration();
 
@@ -176,7 +176,7 @@ void MainWindow::setupGoActions()
 {
     Config *config = Config::configuration();
     TQStringList titles = config->docTitles();
-    TQAction *action = 0;
+    TQAction *action = nullptr;
 
     static bool separatorInserted = false;
 
@@ -200,7 +200,7 @@ void MainWindow::setupGoActions()
 		goMenu->insertSeparator();
 		separatorInserted = true;
 	    }
-	    action = new TQAction( title, TQIconSet( pix ), title, 0, 0 );
+	    action = new TQAction( title, TQIconSet( pix ), title, 0, nullptr );
 	    action->addTo( goMenu );
 	    action->addTo( goActionToolbar );
 	    goActions->append( action );
@@ -243,7 +243,7 @@ void MainWindow::destroy()
     windows->removeRef( this );
     if ( windows->isEmpty() ) {
 	delete windows;
-	windows = 0;
+	windows = nullptr;
     }
     delete goActions;
     delete goActionDocFiles;
@@ -522,7 +522,7 @@ void MainWindow::showSettingsDialog( int page )
     for ( obj = lst->last(); obj; obj = lst->prev() ) {
 	if ( obj->isA( "TQToolBarSeparator" ) ) {
 	    delete obj;
-	    obj = 0;
+	    obj = nullptr;
 	    break;
 	}
     }
diff --git a/tools/assistant/settingsdialogimpl.h b/tools/assistant/settingsdialogimpl.h
index 1be8812f7..2087581e8 100644
--- a/tools/assistant/settingsdialogimpl.h
+++ b/tools/assistant/settingsdialogimpl.h
@@ -45,7 +45,7 @@ class SettingsDialog : public SettingsDialogBase
     TQ_OBJECT
 
 public:
-    SettingsDialog( TQWidget *parent, const char* name = 0 );
+    SettingsDialog( TQWidget *parent, const char* name = nullptr );
 
 protected slots:
     void selectColor();
diff --git a/tools/assistant/tabbedbrowser.ui.h b/tools/assistant/tabbedbrowser.ui.h
index 920c99eaa..bc40ecd87 100644
--- a/tools/assistant/tabbedbrowser.ui.h
+++ b/tools/assistant/tabbedbrowser.ui.h
@@ -129,7 +129,7 @@ void TabbedBrowser::init()
 {
     tabLinkUnderline = false;
     tabStyleSheet = new TQStyleSheet( TQStyleSheet::defaultSheet() );
-    lastCurrentTab = 0;
+    lastCurrentTab = nullptr;
     while( tab->count() )
 	tab->removePage( tab->page(0) );
 
diff --git a/tools/designer/designer/actiondnd.cpp b/tools/designer/designer/actiondnd.cpp
index 43c524676..103b88577 100644
--- a/tools/designer/designer/actiondnd.cpp
+++ b/tools/designer/designer/actiondnd.cpp
@@ -54,26 +54,26 @@
 #include <tqstyle.h>
 #include <tqtimer.h>
 
-TQAction *ActionDrag::the_action = 0;
+TQAction *ActionDrag::the_action = nullptr;
 
 ActionDrag::ActionDrag(TQAction *action, TQWidget *source)
 : TQStoredDrag("application/x-designer-actions", source)
 {
-    Q_ASSERT(the_action == 0);
+    Q_ASSERT(!the_action);
     the_action = action;
 }
 
 ActionDrag::ActionDrag(TQActionGroup *group, TQWidget *source)
 : TQStoredDrag("application/x-designer-actiongroup", source)
 {
-    Q_ASSERT(the_action == 0);
+    Q_ASSERT(!the_action);
     the_action = group;
 }
 
 ActionDrag::ActionDrag(const TQString &type, TQAction *action, TQWidget *source)
 : TQStoredDrag(type, source)
 {
-    Q_ASSERT(the_action == 0);
+    Q_ASSERT(!the_action);
     the_action = action;
 }
 
@@ -86,7 +86,7 @@ bool ActionDrag::canDecode(TQDropEvent *e)
 
 ActionDrag::~ActionDrag()
 {
-    the_action = 0;
+    the_action = nullptr;
 }
 
 void TQDesignerAction::init()
@@ -133,7 +133,7 @@ void TQDesignerAction::remove()
     if ( !widgetToInsert )
 	return;
     MainWindow::self->formWindow()->selectWidget( widgetToInsert, false );
-    widgetToInsert->reparent( 0, TQPoint( 0, 0 ), false );
+    widgetToInsert->reparent( nullptr, TQPoint( 0, 0 ), false );
 }
 
 class TQDesignerIndicatorWidget : public TQWidget
@@ -195,7 +195,7 @@ void TQDesignerToolBarSeparator::paintEvent( TQPaintEvent * )
 
 
 TQSeparatorAction::TQSeparatorAction( TQObject *parent )
-    : TQAction( parent, "qt_designer_separator" ), wid( 0 )
+    : TQAction( parent, "qt_designer_separator" ), wid( nullptr )
 {
 }
 
@@ -235,7 +235,7 @@ TQWidget *TQSeparatorAction::widget() const
 TQDesignerToolBar::TQDesignerToolBar( TQMainWindow *mw )
     : TQToolBar( mw ), lastIndicatorPos( -1, -1 )
 {
-    insertAnchor = 0;
+    insertAnchor = nullptr;
     afterAnchor = true;
     setAcceptDrops( true );
     MetaDataBase::addEntry( this );
@@ -251,7 +251,7 @@ TQDesignerToolBar::TQDesignerToolBar( TQMainWindow *mw )
 TQDesignerToolBar::TQDesignerToolBar( TQMainWindow *mw, Dock dock )
     : TQToolBar( TQString::null, mw, dock), lastIndicatorPos( -1, -1 )
 {
-    insertAnchor = 0;
+    insertAnchor = nullptr;
     afterAnchor = true;
     setAcceptDrops( true );
     indicator = new TQDesignerIndicatorWidget( this );
@@ -362,12 +362,12 @@ void TQDesignerToolBar::paintEvent( TQPaintEvent *e )
 void TQDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e )
 {
     e->accept();
-    TQPopupMenu menu( 0 );
+    TQPopupMenu menu( nullptr );
     menu.insertItem( tr( "Delete Toolbar" ), 1 );
     int res = menu.exec( e->globalPos() );
     if ( res != -1 ) {
 	RemoveToolBarCommand *cmd = new RemoveToolBarCommand( tr( "Delete Toolbar '%1'" ).arg( name() ),
-							      formWindow, 0, this );
+							      formWindow, nullptr, this );
 	formWindow->commandHistory()->addCommand( cmd );
 	cmd->execute();
     }
@@ -405,7 +405,7 @@ void TQDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w )
 void TQDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o )
 {
     e->accept();
-    TQPopupMenu menu( 0 );
+    TQPopupMenu menu( nullptr );
     const int ID_DELETE = 1;
     const int ID_SEP = 2;
     const int ID_DELTOOLBAR = 3;
@@ -432,7 +432,7 @@ void TQDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject
 	cmd->execute();
     } else if ( res == ID_SEP ) {
 	calcIndicatorPos( mapFromGlobal( e->globalPos() ) );
-	TQAction *a = new TQSeparatorAction( 0 );
+	TQAction *a = new TQSeparatorAction( nullptr );
 	int index = actionList.findRef( *actionMap.find( insertAnchor ) );
 	if ( index != -1 && afterAnchor )
 	    ++index;
@@ -447,7 +447,7 @@ void TQDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject
 	cmd->execute();
     } else if ( res == ID_DELTOOLBAR ) {
 	RemoveToolBarCommand *cmd = new RemoveToolBarCommand( tr( "Delete Toolbar '%1'" ).arg( name() ),
-							      formWindow, 0, this );
+							      formWindow, nullptr, this );
 	formWindow->commandHistory()->addCommand( cmd );
 	cmd->execute();
     }
@@ -551,7 +551,7 @@ void TQDesignerToolBar::dragMoveEvent( TQDragMoveEvent *e )
 void TQDesignerToolBar::dragLeaveEvent( TQDragLeaveEvent * )
 {
     indicator->hide();
-    insertAnchor = 0;
+    insertAnchor = nullptr;
     afterAnchor = true;
 }
 
@@ -563,7 +563,7 @@ void TQDesignerToolBar::dropEvent( TQDropEvent *e )
     e->accept();
 
     indicator->hide();
-    TQAction *a = 0;
+    TQAction *a = nullptr;
     int index = actionList.findRef( *actionMap.find( insertAnchor ) );
     if ( index != -1 && afterAnchor )
 	++index;
@@ -600,7 +600,7 @@ void TQDesignerToolBar::dropEvent( TQDropEvent *e )
 
 void TQDesignerToolBar::reInsert()
 {
-    TQAction *a = 0;
+    TQAction *a = nullptr;
     actionMap.clear();
     clear();
     for ( a = actionList.first(); a; a = actionList.next() ) {
@@ -630,14 +630,14 @@ TQPoint TQDesignerToolBar::calcIndicatorPos( const TQPoint &pos )
 {
     if ( orientation() == Horizontal ) {
 	TQPoint pnt( width() - 2, 0 );
-	insertAnchor = 0;
+	insertAnchor = nullptr;
 	afterAnchor = true;
 	if ( !children() )
 	    return pnt;
 	pnt = TQPoint( 13, 0 );
 	TQObjectListIt it( *children() );
 	TQObject * obj;
-	while( (obj=it.current()) != 0 ) {
+	while( (obj=it.current()) ) {
 	    ++it;
 	    if ( obj->isWidgetType() &&
 		 qstrcmp( "qt_dockwidget_internal", obj->name() ) != 0 ) {
@@ -652,14 +652,14 @@ TQPoint TQDesignerToolBar::calcIndicatorPos( const TQPoint &pos )
 	return pnt;
     } else {
 	TQPoint pnt( 0, height() - 2 );
-	insertAnchor = 0;
+	insertAnchor = nullptr;
 	afterAnchor = true;
 	if ( !children() )
 	    return pnt;
 	pnt = TQPoint( 0, 13 );
 	TQObjectListIt it( *children() );
 	TQObject * obj;
-	while( (obj=it.current()) != 0 ) {
+	while( (obj=it.current()) ) {
 	    ++it;
 	    if ( obj->isWidgetType() &&
 		 qstrcmp( "qt_dockwidget_internal", obj->name() ) != 0 ) {
@@ -704,7 +704,7 @@ void TQDesignerToolBar::doInsertWidget( const TQPoint &p )
     if ( formWindow != MainWindow::self->formWindow() )
 	return;
     calcIndicatorPos( p );
-    TQWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, true );
+    TQWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, nullptr, true );
     installEventFilters( w );
     MainWindow::self->formWindow()->insertWidget( w, true );
     TQDesignerAction *a = new TQDesignerAction( w, parent() );
diff --git a/tools/designer/designer/actiondnd.h b/tools/designer/designer/actiondnd.h
index aa3531b34..604ad90a7 100644
--- a/tools/designer/designer/actiondnd.h
+++ b/tools/designer/designer/actiondnd.h
@@ -78,7 +78,7 @@ class TQDesignerActionGroup : public TQActionGroup
 
 public:
     TQDesignerActionGroup( TQObject *parent )
-	: TQActionGroup( ::tqt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ) { init(); }
+	: TQActionGroup( ::tqt_cast<TQActionGroup*>(parent) ? parent : nullptr ), wid( nullptr ), idx( -1 ) { init(); }
 
     void init();
 
@@ -113,9 +113,9 @@ class TQDesignerAction : public TQAction
 
 public:
     TQDesignerAction( TQObject *parent )
-	: TQAction( ::tqt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) { init(); }
+	: TQAction( ::tqt_cast<TQActionGroup*>(parent) ? parent : nullptr ), wid( nullptr ), idx( -1 ), widgetToInsert( nullptr ) { init(); }
     TQDesignerAction( TQWidget *w, TQObject *parent )
-	: TQAction( ::tqt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) { init(); }
+	: TQAction( ::tqt_cast<TQActionGroup*>(parent) ? parent : nullptr ), wid( nullptr ), idx( -1 ), widgetToInsert( w ) { init(); }
 
     void init();
 
@@ -148,7 +148,7 @@ class TQDesignerToolBarSeparator : public TQWidget
     TQ_OBJECT
 
 public:
-    TQDesignerToolBarSeparator( Orientation, TQToolBar *parent, const char* name=0 );
+    TQDesignerToolBarSeparator( Orientation, TQToolBar *parent, const char* name=nullptr );
 
     TQSize sizeHint() const;
     Orientation orientation() const { return orient; }
diff --git a/tools/designer/designer/actioneditorimpl.cpp b/tools/designer/designer/actioneditorimpl.cpp
index 14c6eb521..2e77c52e0 100644
--- a/tools/designer/designer/actioneditorimpl.cpp
+++ b/tools/designer/designer/actioneditorimpl.cpp
@@ -51,7 +51,7 @@
 #include <tqobjectlist.h>
 
 ActionEditor::ActionEditor( TQWidget* parent,  const char* name, WFlags fl )
-    : ActionEditorBase( parent, name, fl ), currentAction( 0 ), formWindow( 0 ),
+    : ActionEditorBase( parent, name, fl ), currentAction( nullptr ), formWindow( nullptr ),
     explicitlyClosed(false)
 {
     listActions->addColumn( tr( "Actions" ) );
@@ -80,7 +80,7 @@ void ActionEditor::closeEvent( TQCloseEvent *e )
 
 void ActionEditor::currentActionChanged( TQListViewItem *i )
 {
-    buttonConnect->setEnabled( i != 0 );
+    buttonConnect->setEnabled( i );
     if ( !i )
 	return;
     currentAction = ( (ActionItem*)i )->action();
@@ -130,14 +130,14 @@ void ActionEditor::deleteAction()
 	return;
 
     TQListViewItemIterator it( listActions );
-    ActionItem *ai = 0;
+    ActionItem *ai = nullptr;
     while ( it.current() ) {
 	ai = (ActionItem*)it.current();
 	if ( ai->action() == currentAction || ai->actionGroup() == currentAction ) {
 	    emit removing( currentAction );
 	    formWindow->actionList().removeRef( currentAction );
 	    delete currentAction;
-	    currentAction = 0;
+	    currentAction = nullptr;
 	    delete it.current();
 	    break;
 	}
@@ -158,7 +158,7 @@ void ActionEditor::newAction()
 	    actionParent = (ActionItem*)actionParent->parent();
     }
 
-    ActionItem *i = 0;
+    ActionItem *i = nullptr;
     if ( actionParent )
 	i = new ActionItem( actionParent );
     else
@@ -194,7 +194,7 @@ void ActionEditor::newActionGroup()
 	    actionParent = (ActionItem*)actionParent->parent();
     }
 
-    ActionItem *i = 0;
+    ActionItem *i = nullptr;
     if ( actionParent )
 	i = new ActionItem( actionParent, true );
     else
@@ -235,7 +235,7 @@ void ActionEditor::setFormWindow( FormWindow *fw )
     } else {
 	setEnabled( true );
 	for ( TQAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) {
-	    ActionItem *i = 0;
+	    ActionItem *i = nullptr;
 	    if ( ::tqt_cast<TQAction*>(a->parent()) )
 		continue;
 	    i = new ActionItem( listActions, a );
diff --git a/tools/designer/designer/actioneditorimpl.h b/tools/designer/designer/actioneditorimpl.h
index d12792719..842d9d54d 100644
--- a/tools/designer/designer/actioneditorimpl.h
+++ b/tools/designer/designer/actioneditorimpl.h
@@ -45,7 +45,7 @@ class ActionEditor : public ActionEditorBase
     TQ_OBJECT
 
 public:
-    ActionEditor( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+    ActionEditor( TQWidget* parent = nullptr, const char* name = nullptr, WFlags fl = 0 );
     void setFormWindow( FormWindow *fw );
     void updateActionName( TQAction *a );
     void updateActionIcon( TQAction *a );
diff --git a/tools/designer/designer/actionlistview.cpp b/tools/designer/designer/actionlistview.cpp
index 1842f24cd..8e02f60f8 100644
--- a/tools/designer/designer/actionlistview.cpp
+++ b/tools/designer/designer/actionlistview.cpp
@@ -46,7 +46,7 @@ ActionListView::ActionListView( TQWidget *parent, const char *name )
 }
 
 ActionItem::ActionItem( TQListView *lv, TQAction *ac )
-    : TQListViewItem( lv ), a( 0 ), g( 0 )
+    : TQListViewItem( lv ), a( nullptr ), g( nullptr )
 {
     g = ::tqt_cast<TQDesignerActionGroup*>(ac);
     if ( !g )
@@ -55,7 +55,7 @@ ActionItem::ActionItem( TQListView *lv, TQAction *ac )
 }
 
 ActionItem::ActionItem( TQListViewItem *i, TQAction *ac )
-    : TQListViewItem( i ), a( 0 ), g( 0 )
+    : TQListViewItem( i ), a( nullptr ), g( nullptr )
 {
     g = ::tqt_cast<TQDesignerActionGroup*>(ac);
     if ( !g )
@@ -77,8 +77,8 @@ TQDragObject *ActionListView::dragObject()
 {
     ActionItem *i = (ActionItem*)currentItem();
     if ( !i )
-	return 0;
-    TQStoredDrag *drag = 0;
+	return nullptr;
+    TQStoredDrag *drag = nullptr;
     if ( i->action() ) {
 	drag = new ActionDrag( i->action(), viewport() );
 	drag->setPixmap( i->action()->iconSet().pixmap() );
diff --git a/tools/designer/designer/actionlistview.h b/tools/designer/designer/actionlistview.h
index e2b81b7d4..79681369f 100644
--- a/tools/designer/designer/actionlistview.h
+++ b/tools/designer/designer/actionlistview.h
@@ -42,14 +42,14 @@ class ActionItem : public TQListViewItem
 public:
     ActionItem( TQListView *lv, bool group )
 	: TQListViewItem( lv ),
-	  a( group ? 0 : new TQDesignerAction( 0 ) ),
-	  g( group ? new TQDesignerActionGroup( 0 ) : 0 ) { setDragEnabled( true ); }
+	  a( group ? nullptr : new TQDesignerAction( nullptr ) ),
+	  g( group ? new TQDesignerActionGroup( nullptr ) : nullptr ) { setDragEnabled( true ); }
     ActionItem( TQListView *lv, TQAction *ac );
     ActionItem( TQListViewItem *i, TQAction *ac );
     ActionItem( ActionItem *parent, bool group = false )
 	: TQListViewItem( parent ),
-	  a( group ? 0 : new TQDesignerAction( parent->actionGroup() ) ),
-	  g( group ? new TQDesignerActionGroup( parent->actionGroup() ) : 0 ) { setDragEnabled( true ); moveToEnd(); }
+	  a( group ? nullptr : new TQDesignerAction( parent->actionGroup() ) ),
+	  g( group ? new TQDesignerActionGroup( parent->actionGroup() ) : nullptr ) { setDragEnabled( true ); moveToEnd(); }
 
     TQDesignerAction *action() const { return a; }
     TQDesignerActionGroup *actionGroup() const { return g; }
@@ -68,7 +68,7 @@ class ActionListView : public TQListView
     TQ_OBJECT
 
 public:
-    ActionListView( TQWidget *parent = 0, const char *name = 0 );
+    ActionListView( TQWidget *parent = nullptr, const char *name = nullptr );
 
 protected:
     TQDragObject *dragObject();
diff --git a/tools/designer/designer/asciivalidator.h b/tools/designer/designer/asciivalidator.h
index 9201fc9c0..896b71617 100644
--- a/tools/designer/designer/asciivalidator.h
+++ b/tools/designer/designer/asciivalidator.h
@@ -42,9 +42,9 @@ class AsciiValidator: public TQValidator
 {
     TQ_OBJECT
 public:
-    AsciiValidator( TQObject * parent, const char *name = 0 );
-    AsciiValidator( bool funcName, TQObject * parent, const char *name = 0 );
-    AsciiValidator( const TQString &allow, TQObject * parent, const char *name = 0 );
+    AsciiValidator( TQObject * parent, const char *name = nullptr );
+    AsciiValidator( bool funcName, TQObject * parent, const char *name = nullptr );
+    AsciiValidator( const TQString &allow, TQObject * parent, const char *name = nullptr );
     ~AsciiValidator();
 
     TQValidator::State validate( TQString &, int & ) const;
diff --git a/tools/designer/designer/command.cpp b/tools/designer/designer/command.cpp
index 35431a373..5b7a82e6f 100644
--- a/tools/designer/designer/command.cpp
+++ b/tools/designer/designer/command.cpp
@@ -68,7 +68,7 @@ CommandHistory::CommandHistory( int s )
 {
     history.setAutoDelete( true );
     modified = false;
-    compressedCommand = 0;
+    compressedCommand = nullptr;
 }
 
 void CommandHistory::addCommand( Command *cmd, bool tryCompress )
@@ -78,7 +78,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress )
 	     compressedCommand->type() != cmd->type() ||
 	     !compressedCommand->canMerge( cmd ) ) {
 	    checkCompressedCommand();
-	    compressedCommand = 0;
+	    compressedCommand = nullptr;
 	}
 
 	if ( compressedCommand ) {
@@ -127,7 +127,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress )
 void CommandHistory::undo()
 {
     checkCompressedCommand();
-    compressedCommand = 0;
+    compressedCommand = nullptr;
     if ( current > -1 ) {
 	history.at( current )->unexecute();
 	--current;
@@ -140,7 +140,7 @@ void CommandHistory::undo()
 void CommandHistory::redo()
 {
     checkCompressedCommand();
-    compressedCommand = 0;
+    compressedCommand = nullptr;
     if ( current > -1 ) {
 	if ( current < (int)history.count() - 1 ) {
 	    ++current;
@@ -159,19 +159,19 @@ void CommandHistory::redo()
 
 void CommandHistory::emitUndoRedo()
 {
-    Command *undoCmd = 0;
-    Command *redoCmd = 0;
+    Command *undoCmd = nullptr;
+    Command *redoCmd = nullptr;
 
     if ( current >= 0 && current < (int)history.count() )
 	undoCmd = history.at( current );
     if ( current + 1 >= 0 && current + 1 < (int)history.count() )
 	redoCmd = history.at( current + 1 );
 
-    bool ua = (undoCmd != 0);
+    bool ua = (undoCmd);
     TQString uc;
     if ( ua )
 	uc = undoCmd->name();
-    bool ra = (redoCmd != 0);
+    bool ra = (redoCmd);
     TQString rc;
     if ( ra )
 	rc = redoCmd->name();
@@ -195,7 +195,7 @@ void CommandHistory::checkCompressedCommand()
 {
     if ( compressedCommand && compressedCommand->type() == Command::SetProperty ) {
 	Command *c = compressedCommand;
-	compressedCommand = 0;
+	compressedCommand = nullptr;
 	if ( !( (SetPropertyCommand*)c )->checkProperty() ) {
 	    history.remove( current );
 	    --current;
@@ -804,11 +804,11 @@ BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw,
     WidgetFactory::LayoutType lay = WidgetFactory::layoutType( layoutBase );
     spacing = MetaDataBase::spacing( layoutBase );
     margin = MetaDataBase::margin( layoutBase );
-    layout = 0;
+    layout = nullptr;
     if ( lay == WidgetFactory::HBox )
-	layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, false, ::tqt_cast<TQSplitter*>(layoutBase) != 0 );
+	layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, false, ::tqt_cast<TQSplitter*>(layoutBase) );
     else if ( lay == WidgetFactory::VBox )
-	layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, false, ::tqt_cast<TQSplitter*>(layoutBase) != 0 );
+	layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, false, ::tqt_cast<TQSplitter*>(layoutBase) );
     else if ( lay == WidgetFactory::Grid )
 	layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), false );
 }
@@ -955,7 +955,7 @@ void AddWidgetStackPageCommand::execute()
 {
     index = widgetStack->insertPage( stackPage, index );
     formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
-    formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 );
+    formWindow()->mainWindow()->objectHierarchy()->tabsChanged( nullptr );
 }
 
 void AddWidgetStackPageCommand::unexecute()
@@ -963,7 +963,7 @@ void AddWidgetStackPageCommand::unexecute()
     index = widgetStack->removePage( stackPage );
     stackPage->hide();
     formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
-    formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 );
+    formWindow()->mainWindow()->objectHierarchy()->tabsChanged( nullptr );
 }
 
 DeleteWidgetStackPageCommand::DeleteWidgetStackPageCommand( const TQString &n, FormWindow *fw,
@@ -1498,7 +1498,7 @@ PopulateListBoxCommand::PopulateListBoxCommand( const TQString &n, FormWindow *f
 						TQListBox *lb, const TQValueList<Item> &items )
     : Command( n, fw ), newItems( items ), listbox( lb )
 {
-    TQListBoxItem *i = 0;
+    TQListBoxItem *i = nullptr;
     for ( i = listbox->firstItem(); i; i = i->next() ) {
 	Item item;
 	if ( i->pixmap() )
@@ -1541,7 +1541,7 @@ PopulateIconViewCommand::PopulateIconViewCommand( const TQString &n, FormWindow
     : Command( n, fw ), newItems( items ), iconview( iv )
 {
 #ifndef TQT_NO_ICONVIEW
-    TQIconViewItem *i = 0;
+    TQIconViewItem *i = nullptr;
     for ( i = iconview->firstItem(); i; i = i->nextItem() ) {
 	Item item;
 	if ( i->pixmap() )
@@ -1616,11 +1616,11 @@ void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to )
 
     TQListViewItemIterator it( from );
     TQPtrStack<TQListViewItem> fromParents, toParents;
-    fromParents.push( 0 );
-    toParents.push( 0 );
+    fromParents.push( nullptr );
+    toParents.push( nullptr );
     TQPtrStack<TQListViewItem> toLasts;
-    TQListViewItem *fromLast = 0;
-    toLasts.push( 0 );
+    TQListViewItem *fromLast = nullptr;
+    toLasts.push( nullptr );
     int cols = from->columns();
     to->setSorting( -1 );
     from->setSorting( -1 );
@@ -1628,7 +1628,7 @@ void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to )
 	TQListViewItem *i = it.current();
 	if ( i->parent() == fromParents.top() ) {
 	    TQListViewItem *pi = toParents.top();
-	    TQListViewItem *ni = 0;
+	    TQListViewItem *ni = nullptr;
 	    if ( pi )
 		ni = new TQListViewItem( pi, toLasts.top() );
 	    else
@@ -1646,9 +1646,9 @@ void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to )
 	    if ( i->parent() == fromLast ) {
 		fromParents.push( fromLast );
 		toParents.push( toLasts.top() );
-		toLasts.push( 0 );
+		toLasts.push( nullptr );
 		TQListViewItem *pi = toParents.top();
-		TQListViewItem *ni = 0;
+		TQListViewItem *ni = nullptr;
 		if ( pi )
 		    ni = new TQListViewItem( pi );
 		else
@@ -1670,7 +1670,7 @@ void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to )
 		}
 
 		TQListViewItem *pi = toParents.top();
-		TQListViewItem *ni = 0;
+		TQListViewItem *ni = nullptr;
 		if ( pi )
 		    ni = new TQListViewItem( pi, toLasts.top() );
 		else
@@ -1881,7 +1881,7 @@ void AddActionToToolBarCommand::unexecute()
 // ------------------------------------------------------------
 
 AddToolBarCommand::AddToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw )
-    : Command( n, fw ), toolBar( 0 ), mainWindow( mw )
+    : Command( n, fw ), toolBar( nullptr ), mainWindow( mw )
 {
 }
 
@@ -1918,7 +1918,7 @@ AddContainerPageCommand::AddContainerPageCommand( const TQString &n, FormWindow
 						  TQWidget *c, const TQString &label )
     : Command( n, fw ), container( c ), index( -1 ), pageLabel( label ), page( 0 )
 {
-    WidgetInterface *iface = 0;
+    WidgetInterface *iface = nullptr;
     widgetManager()->queryInterface( WidgetFactory::classNameOf( container ), &iface );
     if ( !iface )
 	return;
@@ -1965,7 +1965,7 @@ DeleteContainerPageCommand::DeleteContainerPageCommand( const TQString &n, FormW
 							TQWidget *c, int idx )
     : Command( n, fw ), container( c ), index( idx )
 {
-    WidgetInterface *iface = 0;
+    WidgetInterface *iface = nullptr;
     widgetManager()->queryInterface( WidgetFactory::classNameOf( container ), &iface );
     if ( !iface )
 	return;
@@ -2012,7 +2012,7 @@ RenameContainerPageCommand::RenameContainerPageCommand( const TQString &n, FormW
 							const TQString &label )
     : Command( n, fw ), container( c ), index( idx ), newLabel( label )
 {
-    WidgetInterface *iface = 0;
+    WidgetInterface *iface = nullptr;
     widgetManager()->queryInterface( WidgetFactory::classNameOf( container ), &iface );
     if ( !iface )
 	return;
@@ -2077,7 +2077,7 @@ RemoveActionFromPopupCommand::RemoveActionFromPopupCommand( const TQString &n,
 							    FormWindow *fw,
 							    PopupMenuEditor *m,
 							    int idx )
-    : AddActionToPopupCommand( n, fw, m, 0, idx )
+    : AddActionToPopupCommand( n, fw, m, nullptr, idx )
 {
     item = menu->at( index );
 }
@@ -2117,7 +2117,7 @@ void ExchangeActionInPopupCommand::unexecute()
 ActionEditor *ActionCommand::actionEditor()
 {
     // FIXME: handle multiple action editors
-    return (ActionEditor *) formWindow()->mainWindow()->child( 0, "ActionEditor" );
+    return (ActionEditor *) formWindow()->mainWindow()->child( nullptr, "ActionEditor" );
 }
 
 // ------------------------------------------------------------
@@ -2187,17 +2187,17 @@ AddMenuCommand::AddMenuCommand( const TQString &n,
 				MenuBarEditor *b,
 				MenuBarEditorItem *i,
 				int idx )
-    : Command( n, fw ), mb( b ), item( i ), name( 0 ), index( idx )
+    : Command( n, fw ), mb( b ), item( i ), name( nullptr ), index( idx )
 { }
 
 AddMenuCommand::AddMenuCommand( const TQString &n,
 				FormWindow *fw,
 				TQMainWindow *mw,
 				const TQString &nm )
-    : Command( n, fw ), mb( 0 ), item( 0 ), name( nm ), index( -1 )
+    : Command( n, fw ), mb( nullptr ), item( nullptr ), name( nm ), index( -1 )
 {
     if ( mw )
-	mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" );
+	mb = (MenuBarEditor *)mw->child( nullptr, "MenuBarEditor" );
 }
 
 void AddMenuCommand::execute()
@@ -2244,7 +2244,7 @@ RemoveMenuCommand::RemoveMenuCommand( const TQString &n,
 				      FormWindow *fw,
 				      MenuBarEditor *b,
 				      int idx )
-    : AddMenuCommand( n, fw, b, 0, idx )
+    : AddMenuCommand( n, fw, b, nullptr, idx )
 {
     item = mb->item( index );
 }
diff --git a/tools/designer/designer/configtoolboxdialog.ui.h b/tools/designer/designer/configtoolboxdialog.ui.h
index 2c86ee719..6b4a3b1c5 100644
--- a/tools/designer/designer/configtoolboxdialog.ui.h
+++ b/tools/designer/designer/configtoolboxdialog.ui.h
@@ -84,8 +84,8 @@ void ConfigToolboxDialog::addTool()
     TQListView *src = listViewTools;
 
     bool addKids = false;
-    TQListViewItem *nextSibling = 0;
-    TQListViewItem *nextParent = 0;
+    TQListViewItem *nextSibling = nullptr;
+    TQListViewItem *nextParent = nullptr;
     TQListViewItemIterator it = src->firstChild();
     for ( ; *it; it++ ) {
 	// Hit the nextSibling, turn of child processing
@@ -138,7 +138,7 @@ void ConfigToolboxDialog::removeTool()
 
 void ConfigToolboxDialog::moveToolUp()
 {
-    TQListViewItem *next = 0;
+    TQListViewItem *next = nullptr;
     TQListViewItem *item = listViewCommon->firstChild();
     for ( int i = 0; i < listViewCommon->childCount(); ++i ) {
 	next = item->itemBelow();
@@ -152,7 +152,7 @@ void ConfigToolboxDialog::moveToolUp()
 void ConfigToolboxDialog::moveToolDown()
 {
     int count = listViewCommon->childCount();
-    TQListViewItem *next = 0;
+    TQListViewItem *next = nullptr;
     TQListViewItem *item = listViewCommon->lastItem();
     for ( int i = 0; i < count; ++i ) {
 	next = item->itemAbove();
@@ -209,7 +209,7 @@ void ConfigToolboxDialog::ok()
     MainWindow::self->commonWidgetsPage.clear();
     TQListViewItem *item = listViewCommon->firstChild();
     for ( int j = 0; j < listViewCommon->childCount(); item = item->itemBelow(), ++j ) {
-        TQAction *a = 0;
+        TQAction *a = nullptr;
 	for ( a = MainWindow::self->toolActions.last();
 	    a;
 	    a = MainWindow::self->toolActions.prev() ) {
diff --git a/tools/designer/designer/connectiondialog.ui.h b/tools/designer/designer/connectiondialog.ui.h
index 6ce923379..25a52cd99 100644
--- a/tools/designer/designer/connectiondialog.ui.h
+++ b/tools/designer/designer/connectiondialog.ui.h
@@ -64,8 +64,8 @@ static const char * invalid_connection[] = {
     "                 "
 };
 
-static TQPixmap *invalidConnection = 0;
-static TQPixmap *validConnection = 0;
+static TQPixmap *invalidConnection = nullptr;
+static TQPixmap *validConnection = nullptr;
 
 void ConnectionDialog::init()
 {
@@ -90,7 +90,7 @@ void ConnectionDialog::init()
 	updateConnectionState( c );
     }
 
-    defaultSender = defaultReceiver = 0;
+    defaultSender = defaultReceiver = nullptr;
     connectionsTable->setCurrentCell( 0, 0 );
 }
 
diff --git a/tools/designer/designer/connectionitems.cpp b/tools/designer/designer/connectionitems.cpp
index 0e10b89f0..61178e398 100644
--- a/tools/designer/designer/connectionitems.cpp
+++ b/tools/designer/designer/connectionitems.cpp
@@ -86,11 +86,11 @@ static const char* const ignore_slots[] = {
     "init()",
     "destroy()",
     "deleteLater()",
-    0
+    nullptr
 };
 
 ConnectionItem::ConnectionItem( TQTable *table, FormWindow *fw )
-    : TQComboTableItem( table, TQStringList(), false ), formWindow( fw ), conn( 0 )
+    : TQComboTableItem( table, TQStringList(), false ), formWindow( fw ), conn( nullptr )
 {
     setReplaceable( false );
 }
@@ -393,7 +393,7 @@ SlotItem::SlotItem( TQTable *table, FormWindow *fw )
     lst.sort();
     setStringList( lst );
 
-    lastReceiver = 0;
+    lastReceiver = nullptr;
     lastSignal = "<No Signal>";
 }
 
diff --git a/tools/designer/designer/customwidgeteditorimpl.cpp b/tools/designer/designer/customwidgeteditorimpl.cpp
index 1ee0e61cc..4d19b0106 100644
--- a/tools/designer/designer/customwidgeteditorimpl.cpp
+++ b/tools/designer/designer/customwidgeteditorimpl.cpp
@@ -59,7 +59,7 @@
 #include <tqcheckbox.h>
 
 CustomWidgetEditor::CustomWidgetEditor( TQWidget *parent, MainWindow *mw )
-    : CustomWidgetEditorBase( parent, 0, true ), mainWindow( mw )
+    : CustomWidgetEditorBase( parent, nullptr, true ), mainWindow( mw )
 {
     connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
     checkTimer = new TQTimer( this );
@@ -105,7 +105,7 @@ void CustomWidgetEditor::setupDefinition()
 	boxWidgets->setCurrentItem( boxWidgets->firstItem() );
 	boxWidgets->setSelected( boxWidgets->firstItem(), true );
     }
-    oldItem = 0;
+    oldItem = nullptr;
 }
 
 void CustomWidgetEditor::setupSignals()
@@ -215,7 +215,7 @@ void CustomWidgetEditor::currentWidgetChanged( TQListBoxItem *i )
 
 void CustomWidgetEditor::addWidgetClicked()
 {
-    oldItem = 0;
+    oldItem = nullptr;
     checkTimer->stop();
     checkWidgetName();
 
@@ -264,7 +264,7 @@ void CustomWidgetEditor::classNameChanged( const TQString &s )
 
 void CustomWidgetEditor::deleteWidgetClicked()
 {
-    oldItem = 0;
+    oldItem = nullptr;
     checkTimer->stop();
     checkWidgetName();
 
@@ -364,11 +364,11 @@ void CustomWidgetEditor::widthChanged( int wid )
 MetaDataBase::CustomWidget *CustomWidgetEditor::findWidget( TQListBoxItem *i )
 {
     if ( !i )
-	return 0;
+	return nullptr;
 
     TQMap<TQListBoxItem*, MetaDataBase::CustomWidget*>::Iterator it = customWidgets.find( i );
     if ( it == customWidgets.end() )
-	return 0;
+	return nullptr;
     return *it;
 }
 
@@ -390,7 +390,7 @@ void CustomWidgetEditor::checkWidgetName()
 {
     TQListBoxItem *i = oldItem ? oldItem : boxWidgets->item( boxWidgets->currentItem() );
     MetaDataBase::CustomWidget *w = findWidget( i );
-    oldItem = 0;
+    oldItem = nullptr;
     if ( !i || !w )
 	return;
 
@@ -412,7 +412,7 @@ void CustomWidgetEditor::checkWidgetName()
 
 void CustomWidgetEditor::closeClicked()
 {
-    oldItem = 0;
+    oldItem = nullptr;
     checkTimer->stop();
     checkWidgetName();
     accept();
@@ -773,7 +773,7 @@ void CustomWidgetEditor::loadDescription()
     while ( firstWidget.tagName() != "customwidgets" )
 	firstWidget = firstWidget.nextSibling().toElement();
 
-    Resource::loadCustomWidgets( firstWidget, 0 );
+    Resource::loadCustomWidgets( firstWidget, nullptr );
     boxWidgets->clear();
     setupDefinition();
     setupSignals();
diff --git a/tools/designer/designer/database.cpp b/tools/designer/designer/database.cpp
index cbacc2089..7d5c895c9 100644
--- a/tools/designer/designer/database.cpp
+++ b/tools/designer/designer/database.cpp
@@ -51,9 +51,9 @@
 
 DatabaseSupport::DatabaseSupport()
 {
-    con = 0;
-    frm = 0;
-    parent = 0;
+    con = nullptr;
+    frm = nullptr;
+    parent = nullptr;
 }
 
 void DatabaseSupport::initPreview( const TQString &connection, const TQString &table, TQObject *o,
diff --git a/tools/designer/designer/dbconnectionimpl.h b/tools/designer/designer/dbconnectionimpl.h
index 94193b330..c278e96d4 100644
--- a/tools/designer/designer/dbconnectionimpl.h
+++ b/tools/designer/designer/dbconnectionimpl.h
@@ -45,8 +45,8 @@ class DatabaseConnectionEditor : public DatabaseConnectionEditorBase
     TQ_OBJECT
 
 public:
-    DatabaseConnectionEditor( DatabaseConnection* connection, TQWidget* parent = 0,
-			       const char* name = 0, bool modal = false, WFlags fl = 0 );
+    DatabaseConnectionEditor( DatabaseConnection* connection, TQWidget* parent = nullptr,
+			       const char* name = nullptr, bool modal = false, WFlags fl = 0 );
     ~DatabaseConnectionEditor();
 
 public slots:
diff --git a/tools/designer/designer/dbconnectionsimpl.cpp b/tools/designer/designer/dbconnectionsimpl.cpp
index a1172e45f..ed9eafa2a 100644
--- a/tools/designer/designer/dbconnectionsimpl.cpp
+++ b/tools/designer/designer/dbconnectionsimpl.cpp
@@ -157,7 +157,7 @@ void DatabaseConnectionsEditor::currentConnectionChanged( const TQString &s )
 #ifndef TQT_NO_SQL
     DatabaseConnection *conn = project->databaseConnection( s );
     blockChanges = true;
-    enableAll( conn != 0 );
+    enableAll( conn );
     connectionWidget->editName->setEnabled( false );
     blockChanges = false;
     if ( !conn )
diff --git a/tools/designer/designer/dbconnectionsimpl.h b/tools/designer/designer/dbconnectionsimpl.h
index 0e76e8a12..c68326518 100644
--- a/tools/designer/designer/dbconnectionsimpl.h
+++ b/tools/designer/designer/dbconnectionsimpl.h
@@ -44,8 +44,8 @@ class DatabaseConnectionsEditor : public DatabaseConnectionBase
     TQ_OBJECT
 
 public:
-    DatabaseConnectionsEditor( Project *pro, TQWidget* parent = 0,
-			       const char* name = 0, bool modal = false, WFlags fl = 0 );
+    DatabaseConnectionsEditor( Project *pro, TQWidget* parent = nullptr,
+			       const char* name = nullptr, bool modal = false, WFlags fl = 0 );
     ~DatabaseConnectionsEditor();
 
 protected slots:
diff --git a/tools/designer/designer/designerapp.cpp b/tools/designer/designer/designerapp.cpp
index fefa38eff..0660fccd5 100644
--- a/tools/designer/designer/designerapp.cpp
+++ b/tools/designer/designer/designerapp.cpp
@@ -46,7 +46,7 @@
 #include <process.h>
 #endif
 
-static TQSplashScreen *splash = 0;
+static TQSplashScreen *splash = nullptr;
 
 void set_splash_status( const TQString &txt )
 {
@@ -98,8 +98,8 @@ void DesignerApplication::closeSplash()
     splash->hide();
 }
 
-static TQString *settings_key = 0;
-static TQString *old_settings_key = 0;
+static TQString *settings_key = nullptr;
+static TQString *old_settings_key = nullptr;
 
 TQ_EXPORT TQString DesignerApplication::settingsKey()
 {
@@ -155,7 +155,7 @@ bool DesignerApplication::winEventFilter( MSG *msg )
 	    if ( arg[0] != '-' ) {
 		TQObjectList* l = MainWindow::self->queryList( "FormWindow" );
 		FormWindow* fw = (FormWindow*) l->first();
-		FormWindow* totop = 0;
+		FormWindow* totop = nullptr;
 		bool haveit = false;
 		while ( fw ) {
 		    haveit = haveit || fw->fileName() == arg;
diff --git a/tools/designer/designer/designerappiface.cpp b/tools/designer/designer/designerappiface.cpp
index 8428b1717..8698241dd 100644
--- a/tools/designer/designer/designerappiface.cpp
+++ b/tools/designer/designer/designerappiface.cpp
@@ -64,7 +64,7 @@ DesignerInterfaceImpl::~DesignerInterfaceImpl()
 
 TQRESULT DesignerInterfaceImpl::queryInterface( const TQUuid &uuid, TQUnknownInterface** iface )
 {
-    *iface = 0;
+    *iface = nullptr;
 
     if ( uuid == IID_QUnknown )
 	*iface = (TQUnknownInterface*)this;
@@ -89,14 +89,14 @@ DesignerFormWindow *DesignerInterfaceImpl::currentForm() const
 {
     if ( mainWindow->formWindow() )
 	return mainWindow->formWindow()->iFace();
-    return 0;
+    return nullptr;
 }
 
 DesignerSourceFile *DesignerInterfaceImpl::currentSourceFile() const
 {
     if ( mainWindow->sourceFile() )
 	return mainWindow->sourceFile()->iFace();
-    return 0;
+    return nullptr;
 }
 
 TQPtrList<DesignerProject> DesignerInterfaceImpl::projectList() const
@@ -118,12 +118,12 @@ void DesignerInterfaceImpl::showStatusMessage( const TQString &text, int ms ) co
 
 DesignerDock *DesignerInterfaceImpl::createDock() const
 {
-    return 0;
+    return nullptr;
 }
 
 DesignerOutputDock *DesignerInterfaceImpl::outputDock() const
 {
-    return mainWindow->outputWindow() ? mainWindow->outputWindow()->iFace() : 0;
+    return mainWindow->outputWindow() ? mainWindow->outputWindow()->iFace() : nullptr;
 }
 
 void DesignerInterfaceImpl::setModified( bool b, TQWidget *window )
@@ -976,7 +976,7 @@ void DesignerFormWindowImpl::addMenu( const TQString &text, const TQString &name
     TQString n = name;
     formWindow->unify( popup, n, true );
     popup->setName( n );
-    MenuBarEditor *mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" );
+    MenuBarEditor *mb = (MenuBarEditor *)mw->child( nullptr, "MenuBarEditor" );
     if ( !mb ) {
 	mb = new MenuBarEditor( formWindow, mw );
 	mb->setName( "MenuBar" );
@@ -991,7 +991,7 @@ void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a )
     if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
 	return;
     TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
-    if ( !mw->child( 0, "MenuBarEditor" ) )
+    if ( !mw->child( nullptr, "MenuBarEditor" ) )
 	return;
     PopupMenuEditor *popup = (PopupMenuEditor*)mw->child( menu, "PopupMenuEditor" );
     if ( !popup )
@@ -1004,12 +1004,12 @@ void DesignerFormWindowImpl::addMenuSeparator( const TQString &menu )
     if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
 	return;
     TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
-    if ( !mw->child( 0, "MenuBarEditor" ) )
+    if ( !mw->child( nullptr, "MenuBarEditor" ) )
 	return;
     PopupMenuEditor *popup = (PopupMenuEditor*)mw->child( menu, "PopupMenuEditor" );
     if ( !popup )
 	return;
-    TQAction *a = new TQSeparatorAction( 0 );
+    TQAction *a = new TQSeparatorAction( nullptr );
     popup->insert( a );
 }
 
@@ -1045,7 +1045,7 @@ void DesignerFormWindowImpl::addToolBarSeparator( const TQString &tbn )
     TQDesignerToolBar *tb = (TQDesignerToolBar*)mw->child( tbn, "TQDesignerToolBar" );
     if ( !tb )
 	return;
-    TQAction *a = new TQSeparatorAction( 0 );
+    TQAction *a = new TQSeparatorAction( nullptr );
     a->addTo( tb );
     tb->addAction( a );
 }
@@ -1056,7 +1056,7 @@ DesignerDockImpl::DesignerDockImpl()
 
 TQDockWindow *DesignerDockImpl::dockWindow() const
 {
-    return 0;
+    return nullptr;
 }
 
 DesignerOutputDockImpl::DesignerOutputDockImpl( OutputWindow *ow )
diff --git a/tools/designer/designer/designerappiface.h b/tools/designer/designer/designerappiface.h
index 199cd9754..39d892ecb 100644
--- a/tools/designer/designer/designerappiface.h
+++ b/tools/designer/designer/designerappiface.h
@@ -213,7 +213,7 @@ public:
     void setCurrentWidget( TQWidget * );
     TQPtrList<TQAction> actionList() const;
     TQAction *createAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, int accel,
-			   TQObject* parent, const char* name = 0, bool toggle = false );
+			   TQObject* parent, const char* name = nullptr, bool toggle = false );
     void addAction( TQAction * );
     void removeAction( TQAction * );
     void preview() const;
diff --git a/tools/designer/designer/editfunctionsimpl.cpp b/tools/designer/designer/editfunctionsimpl.cpp
index 025fd8b6a..4bc107dc7 100644
--- a/tools/designer/designer/editfunctionsimpl.cpp
+++ b/tools/designer/designer/editfunctionsimpl.cpp
@@ -52,7 +52,7 @@
 #include <tqcheckbox.h>
 
 EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots )
-    : EditFunctionsBase( parent, 0, true ), formWindow( fw )
+    : EditFunctionsBase( parent, nullptr, true ), formWindow( fw )
 {
     connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
 
@@ -121,7 +121,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots )
     TQObjectList *l = parent->queryList( "TQLineEdit", "functionName" );
     TQObject *obj;
     TQObjectListIt itemsLineEditIt( *l );
-    while ( (obj = itemsLineEditIt.current()) != 0 ) {
+    while ( (obj = itemsLineEditIt.current()) ) {
         ++itemsLineEditIt;
 	TQObject::connect( this,
 			  TQ_SIGNAL( itemRenamed( const TQString & ) ),
diff --git a/tools/designer/designer/finddialog.ui.h b/tools/designer/designer/finddialog.ui.h
index 9dceda5d6..12c101aa0 100644
--- a/tools/designer/designer/finddialog.ui.h
+++ b/tools/designer/designer/finddialog.ui.h
@@ -33,8 +33,8 @@
 
 void FindDialog::init()
 {
-    editor = 0;
-    formWindow = 0;
+    editor = nullptr;
+    formWindow = nullptr;
 }
 
 void FindDialog::destroy()
diff --git a/tools/designer/designer/formfile.cpp b/tools/designer/designer/formfile.cpp
index 86be2157c..40783c5be 100644
--- a/tools/designer/designer/formfile.cpp
+++ b/tools/designer/designer/formfile.cpp
@@ -68,9 +68,9 @@ static TQString make_func_pretty( const TQString &s )
 }
 
 FormFile::FormFile( const TQString &fn, bool temp, Project *p, const char *name )
-    : filename( fn ), fileNameTemp( temp ), pro( p ), fw( 0 ), ed( 0 ),
-      timeStamp( 0, fn + codeExtension() ), codeEdited( false ), pkg( false ),
-      cm( false ), codeFileStat( None ), timeStampUi(0, fn)
+    : filename( fn ), fileNameTemp( temp ), pro( p ), fw( nullptr ), ed( nullptr ),
+      timeStamp( nullptr, fn + codeExtension() ), codeEdited( false ), pkg( false ),
+      cm( false ), codeFileStat( None ), timeStampUi(nullptr, fn)
 {
     MetaDataBase::addEntry( this );
     fake = qstrcmp( name, "qt_fakewindow" ) == 0;
@@ -86,7 +86,7 @@ FormFile::~FormFile()
 {
     pro->removeFormFile( this );
     if ( formWindow() )
-	formWindow()->setFormFile( 0 );
+	formWindow()->setFormFile( nullptr );
 }
 
 void FormFile::setFormWindow( FormWindow *f )
@@ -94,7 +94,7 @@ void FormFile::setFormWindow( FormWindow *f )
     if ( f == fw )
 	return;
     if ( fw )
-	fw->setFormFile( 0 );
+	fw->setFormFile( nullptr );
     fw = f;
     if ( fw )
 	fw->setFormFile( this );
@@ -280,9 +280,9 @@ bool FormFile::saveAs( bool ignoreModified )
     while ( !saved ) {
 	fn = TQFileDialog::getSaveFileName( f,
 					   tr( "TQt User-Interface Files (*.ui)" ) + ";;" +
-					   tr( "All Files (*)" ), MainWindow::self, 0,
+					   tr( "All Files (*)" ), MainWindow::self, nullptr,
 					   tr( "Save Form '%1' As ...").arg( formName() ),
-					   MainWindow::self ? &MainWindow::self->lastSaveFilter : 0 );
+					   MainWindow::self ? &MainWindow::self->lastSaveFilter : nullptr );
 	if ( fn.isEmpty() )
 	    return false;
 	TQFileInfo fi( fn );
@@ -480,13 +480,13 @@ bool FormFile::setupUihFile( bool askForUih )
 SourceEditor *FormFile::showEditor( bool askForUih )
 {
     if ( !MainWindow::self )
-	return 0;
+	return nullptr;
     showFormWindow();
     if ( !setupUihFile( askForUih ) )
-	return 0;
+	return nullptr;
     SourceEditor *se = MainWindow::self->openSourceEditor();
     if ( !se )
-        return 0;
+        return nullptr;
     se->setActiveWindow();
     se->setFocus();
     return se;
@@ -884,10 +884,10 @@ bool FormFile::checkFileName( bool allowBreak )
 	while ( fn.isEmpty() ) {
 	    fn = TQFileDialog::getSaveFileName( pro->makeAbsolute( fileName() ),
 					       tr( "TQt User-Interface Files (*.ui)" ) + ";;" +
-					       tr( "All Files (*)" ), MainWindow::self, 0,
+					       tr( "All Files (*)" ), MainWindow::self, nullptr,
 					       tr( "Save Form '%1' As ...").
 					       arg( formWindow()->name() ),
-					       MainWindow::self ? &MainWindow::self->lastSaveFilter : 0 );
+					       MainWindow::self ? &MainWindow::self->lastSaveFilter : nullptr );
 	    if ( allowBreak && fn.isEmpty() )
 		return false;
 	}
diff --git a/tools/designer/designer/formfile.h b/tools/designer/designer/formfile.h
index d195acfc8..34f549df0 100644
--- a/tools/designer/designer/formfile.h
+++ b/tools/designer/designer/formfile.h
@@ -56,7 +56,7 @@ public:
 
     enum UihState { None, Ok, Deleted };
 
-    FormFile( const TQString &fn, bool temp, Project *p, const char *name = 0 );
+    FormFile( const TQString &fn, bool temp, Project *p, const char *name = nullptr );
     ~FormFile();
 
     void setFormWindow( FormWindow *f );
diff --git a/tools/designer/designer/formsettingsimpl.cpp b/tools/designer/designer/formsettingsimpl.cpp
index d5f2d32f1..f6fb99e1e 100644
--- a/tools/designer/designer/formsettingsimpl.cpp
+++ b/tools/designer/designer/formsettingsimpl.cpp
@@ -48,7 +48,7 @@
 #include <tqcheckbox.h>
 
 FormSettings::FormSettings( TQWidget *parent, FormWindow *fw )
-    : FormSettingsBase( parent, 0, true ), formwindow( fw )
+    : FormSettingsBase( parent, nullptr, true ), formwindow( fw )
 {
     connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
     MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( fw );
diff --git a/tools/designer/designer/formwindow.cpp b/tools/designer/designer/formwindow.cpp
index c6ced066d..ecdfb303e 100644
--- a/tools/designer/designer/formwindow.cpp
+++ b/tools/designer/designer/formwindow.cpp
@@ -146,7 +146,7 @@ FormWindow::FormWindow( FormFile *f, MainWindow *mw, TQWidget *parent, const cha
 }
 
 FormWindow::FormWindow( FormFile *f, TQWidget *parent, const char *name )
-    : TQWidget( parent, name, WDestructiveClose ), mainwindow( 0 ),
+    : TQWidget( parent, name, WDestructiveClose ), mainwindow( nullptr ),
       commands( 100 ), pixInline( true )
 {
     ff = f;
@@ -158,19 +158,19 @@ void FormWindow::init()
     fake = qstrcmp( name(), "qt_fakewindow" ) == 0;
     MetaDataBase::addEntry( this );
     ff->setFormWindow( this );
-    iface = 0;
-    proj = 0;
-    propertyWidget = 0;
+    iface = nullptr;
+    proj = nullptr;
+    propertyWidget = nullptr;
     toolFixed = false;
     checkedSelectionsForMove = false;
-    mContainer = 0;
-    startWidget = endWidget = 0;
+    mContainer = nullptr;
+    startWidget = endWidget = nullptr;
     currTool = POINTER_TOOL;
-    unclippedPainter = 0;
+    unclippedPainter = nullptr;
     widgetPressed = false;
     drawRubber = false;
     setFocusPolicy( ClickFocus );
-    sizePreviewLabel = 0;
+    sizePreviewLabel = nullptr;
     checkSelectionsTimer = new TQTimer( this, "checkSelectionsTimer" );
     connect( checkSelectionsTimer, TQ_SIGNAL( timeout() ),
 	     this, TQ_SLOT( invalidCheckedSelections() ) );
@@ -186,7 +186,7 @@ void FormWindow::init()
     windowsRepaintWorkaroundTimer = new TQTimer( this );
     connect( windowsRepaintWorkaroundTimer, TQ_SIGNAL( timeout() ),
 	     this, TQ_SLOT( windowsRepaintWorkaroundTimerTimeout() ) );
-    insertParent = 0;
+    insertParent = nullptr;
     connect( &commands, TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ),
 	     this, TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ) );
     propShowBlocked = false;
@@ -195,12 +195,12 @@ void FormWindow::init()
 
     connect( &commands, TQ_SIGNAL( modificationChanged( bool ) ),
 	     this, TQ_SLOT( modificationChanged( bool ) ) );
-    buffer = 0;
+    buffer = nullptr;
 
     TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this );
     setMainContainer( w );
     propertyWidget = w;
-    targetContainer = 0;
+    targetContainer = nullptr;
     hadOwnPalette = false;
 
     defSpacing = BOXLAYOUT_DEFAULT_SPACING;
@@ -233,11 +233,11 @@ void FormWindow::initSlots()
 FormWindow::~FormWindow()
 {
     if ( MainWindow::self && MainWindow::self->objectHierarchy()->formWindow() == this )
-	MainWindow::self->objectHierarchy()->setFormWindow( 0, 0 );
+	MainWindow::self->objectHierarchy()->setFormWindow( nullptr, nullptr );
 
     MetaDataBase::clear( this );
     if ( ff )
-	ff->setFormWindow( 0 );
+	ff->setFormWindow( nullptr );
     delete iface;
 }
 
@@ -308,7 +308,7 @@ void FormWindow::endUnclippedPainter()
     if ( unclippedPainter )
 	unclippedPainter->end();
     delete unclippedPainter;
-    unclippedPainter = 0;
+    unclippedPainter = nullptr;
 }
 
 TQPoint FormWindow::gridPoint( const TQPoint &p )
@@ -364,7 +364,7 @@ void FormWindow::insertWidget()
     }
 
 
-    TQWidget *w = WidgetFactory::create( currTool, insertParent, 0, true, &currRect, orient );
+    TQWidget *w = WidgetFactory::create( currTool, insertParent, nullptr, true, &currRect, orient );
     if ( !w )
 	return;
 
@@ -831,7 +831,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
 			targetContainer->setPalette( restorePalette );
 		    else
 			targetContainer->unsetPalette();
-		    targetContainer = 0;
+		    targetContainer = nullptr;
 		}
 
 		// finally move the selected widgets and show/update preview label
@@ -889,7 +889,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
 	if ( wid && canBeBuddy( wid ) && wid->isVisibleTo( this ) )
 	    newendWidget = wid;
 	else
-	    newendWidget = 0;
+	    newendWidget = nullptr;
 	if ( ::tqt_cast<TQLayoutWidget*>(newendWidget) || ::tqt_cast<Spacer*>(newendWidget) )
 	    newendWidget = (TQWidget*)endWidget;
 	drawRecRect = newendWidget != endWidget;
@@ -1055,7 +1055,7 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
 	}
 	if ( !toolFixed )
 	    mainwindow->resetTool();
-	startWidget = endWidget = 0;
+	startWidget = endWidget = nullptr;
 	mainWindow()->statusBar()->clear();
 	break;
     case ORDER_TOOL:
@@ -1086,9 +1086,9 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
     }
     widgetPressed = false;
     drawRubber = false;
-    insertParent = 0;
+    insertParent = nullptr;
     delete buffer;
-    buffer = 0;
+    buffer = nullptr;
 }
 
 void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w )
@@ -1153,7 +1153,7 @@ void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w )
 	}
 	if ( !widgets.isEmpty() ) {
 	    MoveCommand *cmd = new MoveCommand( tr( "Move" ), this,
-						widgets, oldPos, newPos, 0, 0 );
+						widgets, oldPos, newPos, nullptr, nullptr );
 	    commandHistory()->addCommand( cmd, true );
 	    cmd->execute();
 	}
@@ -1234,7 +1234,7 @@ void FormWindow::selectWidget( TQObject *o, bool select )
     } else {
 	WidgetSelection *s = usedSelections.find( w );
 	if ( s )
-	    s->setWidget( 0 );
+	    s->setWidget( nullptr );
 	TQObject *opw = propertyWidget;
 	if ( !usedSelections.isEmpty() )
 	    propertyWidget = TQPtrDictIterator<WidgetSelection>( usedSelections ).current()->widget();
@@ -1282,7 +1282,7 @@ void FormWindow::clearSelection( bool changePropertyDisplay )
 {
     TQPtrDictIterator<WidgetSelection> it( usedSelections );
     for ( ; it.current(); ++it )
-	it.current()->setWidget( 0, false );
+	it.current()->setWidget( nullptr, false );
 
     usedSelections.clear();
     if ( changePropertyDisplay ) {
@@ -1384,7 +1384,7 @@ void FormWindow::selectWidgets()
 bool FormWindow::isWidgetSelected( TQObject *w )
 {
     if ( w->isWidgetType() )
-	return usedSelections.find( (TQWidget*)w ) != 0;
+	return usedSelections.find( (TQWidget*)w );
     return false; // #### do stuff for TQObjects
 }
 
@@ -1450,18 +1450,18 @@ void FormWindow::checkSelectionsForMove( TQWidget *w )
 {
     checkedSelectionsForMove = true;
 
-    TQObjectList *l = w->parentWidget()->queryList( "TQWidget", 0, false, false );
+    TQObjectList *l = w->parentWidget()->queryList( "TQWidget", nullptr, false, false );
     moving.clear();
     if ( l ) {
 	TQPtrDictIterator<WidgetSelection> it( usedSelections );
 	WidgetSelection *sel;
-	while ( ( sel = it.current() ) != 0 ) {
+	while ( ( sel = it.current() ) ) {
 	    if ( it.current()->widget() == mainContainer() )
 		continue;
 	    ++it;
 	    if ( l->find( sel->widget() ) == -1 ) {
 		if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout )
-		    sel->setWidget( 0 );
+		    sel->setWidget( nullptr );
 	    } else {
 		if ( WidgetFactory::layoutType( sel->widget()->parentWidget() ) == WidgetFactory::NoLayout ) {
 		    moving.insert( sel->widget(), sel->widget()->pos() );
@@ -1481,7 +1481,7 @@ void FormWindow::deleteWidgets()
     TQWidgetList widgets;
     TQPtrDictIterator<WidgetSelection> it( usedSelections );
     for ( ; it.current(); ++it ) {
-	TQWidget *tb = 0;
+	TQWidget *tb = nullptr;
 	if ( !( tb = mainWindow()->isAToolBarChild( it.current()->widget() ) ) )
 	     widgets.append( it.current()->widget() );
 	else
@@ -1629,7 +1629,7 @@ TQPtrDict<TQWidget> *FormWindow::widgets()
 TQWidget *FormWindow::designerWidget( TQObject *o ) const
 {
     if ( !o || !o->isWidgetType() )
-	return 0;
+	return nullptr;
     TQWidget *w = (TQWidget*)o;
     while ( ( w && !isMainContainer( w ) && !insertedWidgets[ (void*)w ] ) || isCentralWidget( w ) )
 	w = (TQWidget*)w->parent();
@@ -1715,12 +1715,12 @@ void FormWindow::currentToolChanged()
 	break;
     }
 
-    startWidget = endWidget = 0;
+    startWidget = endWidget = nullptr;
     widgetPressed = false;
     drawRubber = false;
-    insertParent = 0;
+    insertParent = nullptr;
     delete buffer;
-    buffer = 0;
+    buffer = nullptr;
 
     currTool = t;
 
@@ -1998,7 +1998,7 @@ void FormWindow::layoutHorizontal()
 {
     TQWidgetList widgets( selectedWidgets() );
     LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand( tr( "Lay out horizontally" ),
-								this, mainContainer(), 0, widgets );
+								this, mainContainer(), nullptr, widgets );
     clearSelection( false );
     commandHistory()->addCommand( cmd );
     cmd->execute();
@@ -2008,7 +2008,7 @@ void FormWindow::layoutVertical()
 {
     TQWidgetList widgets( selectedWidgets() );
     LayoutVerticalCommand *cmd = new LayoutVerticalCommand( tr( "Lay out vertically" ),
-							    this, mainContainer(), 0, widgets );
+							    this, mainContainer(), nullptr, widgets );
     clearSelection( false );
     commandHistory()->addCommand( cmd );
     cmd->execute();
@@ -2018,7 +2018,7 @@ void FormWindow::layoutHorizontalSplit()
 {
     TQWidgetList widgets( selectedWidgets() );
     LayoutHorizontalSplitCommand *cmd = new LayoutHorizontalSplitCommand( tr( "Lay out horizontally (in splitter)" ),
-									  this, mainContainer(), 0, widgets );
+									  this, mainContainer(), nullptr, widgets );
     clearSelection( false );
     commandHistory()->addCommand( cmd );
     cmd->execute();
@@ -2028,7 +2028,7 @@ void FormWindow::layoutVerticalSplit()
 {
     TQWidgetList widgets( selectedWidgets() );
     LayoutVerticalSplitCommand *cmd = new LayoutVerticalSplitCommand( tr( "Lay out vertically (in splitter)" ),
-								      this, mainContainer(), 0, widgets );
+								      this, mainContainer(), nullptr, widgets );
     clearSelection( false );
     commandHistory()->addCommand( cmd );
     cmd->execute();
@@ -2041,7 +2041,7 @@ void FormWindow::layoutGrid()
 
     TQWidgetList widgets( selectedWidgets() );
     LayoutGridCommand *cmd = new LayoutGridCommand( tr( "Lay out in a grid" ),
-						    this, mainContainer(), 0, widgets, xres, yres );
+						    this, mainContainer(), nullptr, widgets, xres, yres );
     clearSelection( false );
     commandHistory()->addCommand( cmd );
     cmd->execute();
@@ -2145,10 +2145,10 @@ void FormWindow::breakLayout( TQWidget *w )
 
 BreakLayoutCommand *FormWindow::breakLayoutCommand( TQWidget *w )
 {
-    CHECK_MAINWINDOW_VALUE( 0 );
+    CHECK_MAINWINDOW_VALUE( nullptr );
     TQObjectList *l = (TQObjectList*)w->children();
     if ( !l )
-	return 0;
+	return nullptr;
 
     TQWidgetList widgets;
     for ( TQObject *o = l->first(); o; o = l->next() ) {
@@ -2213,7 +2213,7 @@ bool FormWindow::allowMove( TQWidget *w )
 void FormWindow::editConnections()
 {
     CHECK_MAINWINDOW;
-    buffer = 0;
+    buffer = nullptr;
     if ( !startWidget || !endWidget )
 	return;
 
@@ -2372,7 +2372,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt )
 	}
 	if ( !found ) {
 	    TQPtrList<TQAction> al;
-	    TQAction *a = 0;
+	    TQAction *a = nullptr;
 	    for ( a = actions.first(); a; a = actions.next() ) {
 		TQObjectList *l = a->queryList( "TQAction" );
 		al.append( a );
@@ -2407,7 +2407,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt )
 	}
 	if ( ::tqt_cast<TQMainWindow*>(mainContainer()) ) {
 	    if ( !found ) {
-		TQObjectList *l = mainContainer()->queryList( "TQDockWindow", 0, true );
+		TQObjectList *l = mainContainer()->queryList( "TQDockWindow", nullptr, true );
 		for ( TQObject *o = l->first(); o; o = l->next() ) {
 		    if ( o != w &&
 			 qstrcmp( o->name(), s.latin1() ) == 0 ) {
@@ -2520,7 +2520,7 @@ static bool isChildOf( TQWidget *c, TQWidget *p )
 TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf )
 {
     TQPtrDictIterator<TQWidget> it( insertedWidgets );
-    TQWidget *container = 0;
+    TQWidget *container = nullptr;
     int depth = -1;
     TQWidgetList selected = selectedWidgets();
     if ( rect().contains( mapFromGlobal( pos ) ) ) {
@@ -2547,7 +2547,7 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf )
 		break;
 	    w = w->parentWidget();
 	}
-	if ( !( w == 0 || w->isTopLevel() ) ) continue; // we did not get through the full while loop
+	if ( !( !w || w->isTopLevel() ) ) continue; // we did not get through the full while loop
 
 	int wd = widgetDepth( it.current() );
 	if ( wd == depth && container ) {
@@ -2575,7 +2575,7 @@ void FormWindow::setMainContainer( TQWidget *w )
     if ( mContainer )
 	insertedWidgets.remove( mContainer );
     if ( propertyWidget == mContainer )
-	propertyWidget = 0;
+	propertyWidget = nullptr;
     delete mContainer;
     mContainer = w;
     insertedWidgets.insert( mContainer, mContainer );
@@ -2665,7 +2665,7 @@ TQAction *FormWindow::findAction( const TQString &name )
 	if ( ac )
 	    return ac;
     }
-    return 0;
+    return nullptr;
 }
 
 void FormWindow::killAccels( TQObject *top )
diff --git a/tools/designer/designer/formwindow.h b/tools/designer/designer/formwindow.h
index 7345023e0..46d243947 100644
--- a/tools/designer/designer/formwindow.h
+++ b/tools/designer/designer/formwindow.h
@@ -70,8 +70,8 @@ class FormWindow : public TQWidget
     TQ_PROPERTY( TQString fileName READ fileName WRITE setFileName )
 
 public:
-    FormWindow( FormFile *f, MainWindow *mw, TQWidget *parent, const char *name = 0 );
-    FormWindow( FormFile *f, TQWidget *parent, const char *name = 0 );
+    FormWindow( FormFile *f, MainWindow *mw, TQWidget *parent, const char *name = nullptr );
+    FormWindow( FormFile *f, TQWidget *parent, const char *name = nullptr );
     ~FormWindow();
 
     void init();
@@ -117,7 +117,7 @@ public:
     virtual void raiseChildSelections( TQWidget *w );
 
     virtual void emitUpdateProperties( TQObject *w );
-    virtual void emitShowProperties( TQObject *w = 0 );
+    virtual void emitShowProperties( TQObject *w = nullptr );
     virtual void emitSelectionChanged();
 
     virtual void setPropertyShowingBlocked( bool b );
@@ -155,7 +155,7 @@ public:
 
     virtual bool hasInsertedChildren( TQWidget *w ) const;
 
-    virtual TQWidget *currentWidget() const { return propertyWidget && propertyWidget->isWidgetType() ? (TQWidget*)propertyWidget : 0; } // #####
+    virtual TQWidget *currentWidget() const { return propertyWidget && propertyWidget->isWidgetType() ? (TQWidget*)propertyWidget : nullptr; } // #####
     virtual bool unify( TQObject *w, TQString &s, bool changeIt );
 
     virtual bool isCustomWidgetUsed( MetaDataBase::CustomWidget *w );
diff --git a/tools/designer/designer/gotolinedialog.ui.h b/tools/designer/designer/gotolinedialog.ui.h
index d8be5e832..6d14b859a 100644
--- a/tools/designer/designer/gotolinedialog.ui.h
+++ b/tools/designer/designer/gotolinedialog.ui.h
@@ -33,7 +33,7 @@
 
 void GotoLineDialog::init()
 {
-    editor = 0;
+    editor = nullptr;
 }
 
 void GotoLineDialog::destroy()
diff --git a/tools/designer/designer/hierarchyview.cpp b/tools/designer/designer/hierarchyview.cpp
index b7c53073a..c156a14b8 100644
--- a/tools/designer/designer/hierarchyview.cpp
+++ b/tools/designer/designer/hierarchyview.cpp
@@ -67,9 +67,9 @@
 
 #include <stdlib.h>
 
-TQListViewItem *newItem = 0;
+TQListViewItem *newItem = nullptr;
 
-static TQPluginManager<ClassBrowserInterface> *classBrowserInterfaceManager = 0;
+static TQPluginManager<ClassBrowserInterface> *classBrowserInterfaceManager = nullptr;
 
 HierarchyItem::HierarchyItem( Type type, TQListViewItem *parent, TQListViewItem *after,
 			      const TQString &txt1, const TQString &txt2, const TQString &txt3 )
@@ -157,14 +157,14 @@ TQObject *HierarchyItem::object() const
 void HierarchyItem::okRename( int col )
 {
     if ( newItem == this )
-	newItem = 0;
+	newItem = nullptr;
     TQListViewItem::okRename( col );
 }
 
 void HierarchyItem::cancelRename( int col )
 {
     if ( newItem == this ) {
-	newItem = 0;
+	newItem = nullptr;
 	TQListViewItem::cancelRename( col );
 	delete this;
 	return;
@@ -183,8 +183,8 @@ HierarchyList::HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects
     setDefaultRenameAction( Accept );
     header()->setMovingEnabled( false );
     header()->setStretchEnabled( true );
-    normalMenu = 0;
-    tabWidgetMenu = 0;
+    normalMenu = nullptr;
+    tabWidgetMenu = nullptr;
     addColumn( tr( "Name" ) );
     addColumn( tr( "Class" ) );
     TQPalette p( palette() );
@@ -242,16 +242,16 @@ void HierarchyList::viewportMouseReleaseEvent( TQMouseEvent *e )
 TQObject *HierarchyList::handleObjectClick( TQListViewItem *i )
 {
     if ( !i )
-	return 0;
+	return nullptr;
 
     TQObject *o = findObject( i );
     if ( !o )
-	return 0;
+	return nullptr;
     if ( formWindow == o ) {
 	if ( deselect )
 	    formWindow->clearSelection( false );
 	formWindow->emitShowProperties( formWindow );
-	return 0;
+	return nullptr;
     }
     if ( o->isWidgetType() ) {
 	TQWidget *w = (TQWidget*)o;
@@ -274,9 +274,9 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i )
 	    } else if ( ::tqt_cast<TQMenuBar*>(w) || ::tqt_cast<TQDockWindow*>(w) ) {
 		formWindow->setActiveObject( w );
 	    } else if ( ::tqt_cast<TQPopupMenu*>(w) ) {
-		return 0; // ### we could try to find our menu bar and change the currentMenu to our index
+		return nullptr; // ### we could try to find our menu bar and change the currentMenu to our index
 	    } else {
-		return 0;
+		return nullptr;
 	    }
 	}
     } else if ( ::tqt_cast<TQAction*>(o) ) {
@@ -329,14 +329,14 @@ TQListViewItem *HierarchyList::findItem( TQObject *o )
 	    return it.current();
 	++it;
     }
-    return 0;
+    return nullptr;
 }
 
 TQObject *HierarchyList::current() const
 {
     if ( currentItem() )
 	return ( (HierarchyItem*)currentItem() )->object();
-    return 0;
+    return nullptr;
 }
 
 void HierarchyList::changeNameOf( TQObject *o, const TQString &name )
@@ -360,7 +360,7 @@ void HierarchyList::changeDatabaseOf( TQObject *o, const TQString &info )
 #endif
 }
 
-static TQPtrList<TQWidgetStack> *widgetStacks = 0;
+static TQPtrList<TQWidgetStack> *widgetStacks = nullptr;
 
 void HierarchyList::setup()
 {
@@ -386,7 +386,7 @@ void HierarchyList::setup()
     if ( !widgetStacks )
 	widgetStacks = new TQPtrList<TQWidgetStack>;
     if ( w )
-	insertObject( w, 0 );
+	insertObject( w, nullptr );
     widgetStacks->clear();
 }
 
@@ -407,7 +407,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
 	    fakeMainWindow = true;
 	}
     }
-    TQListViewItem *item = 0;
+    TQListViewItem *item = nullptr;
     TQString className = WidgetFactory::classNameOf( o );
     if ( ::tqt_cast<TQLayoutWidget*>(o) ) {
 	switch ( WidgetFactory::layoutType( (TQWidget*)o ) ) {
@@ -449,9 +449,9 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
     }
 
     if ( !parent )
-	item = new HierarchyItem( HierarchyItem::Widget, this, 0, name, className, dbInfo );
+	item = new HierarchyItem( HierarchyItem::Widget, this, nullptr, name, className, dbInfo );
     else
-	item = new HierarchyItem( HierarchyItem::Widget, parent, 0, name, className, dbInfo );
+	item = new HierarchyItem( HierarchyItem::Widget, parent, nullptr, name, className, dbInfo );
     item->setOpen( true );
     if ( !parent )
 	item->setPixmap( 0, TQPixmap::fromMimeSource( "designer_form.png" ) );
@@ -467,7 +467,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
     ( (HierarchyItem*)item )->setObject( o );
     const TQObjectList *l = o->children();
     if ( ::tqt_cast<TQDesignerToolBar*>(o) )
-	l = 0;
+	l = nullptr;
     if ( l ) {
 	TQObjectListIt it( *l );
 	it.toLast();
@@ -481,7 +481,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
 		    TQObject *obj = it.current();
 		    TQDesignerTabWidget *tw = ::tqt_cast<TQDesignerTabWidget*>(it.current()->parent());
 		    TQDesignerWizard *dw = ::tqt_cast<TQDesignerWizard*>(it.current()->parent());
-		    TQWidgetStack *stack = 0;
+		    TQWidgetStack *stack = nullptr;
 		    if ( dw || tw || ::tqt_cast<TQWidgetStack*>(obj) )
 			stack = (TQWidgetStack*)obj;
 		    else
@@ -489,7 +489,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
 		    if ( widgetStacks->findRef( stack ) != -1 )
 			continue;
 		    widgetStacks->append( stack );
-		    TQObjectList *l2 = stack->queryList( "TQWidget", 0, true, false );
+		    TQObjectList *l2 = stack->queryList( "TQWidget", nullptr, true, false );
 		    for ( obj = l2->last(); obj; obj = l2->prev() ) {
 			if ( qstrcmp( obj->className(),
 				      "TQWidgetStackPrivate::Invisible" ) == 0 ||
@@ -705,13 +705,13 @@ void FormDefinitionView::setup()
     if ( lIface ) {
 	TQStringList defs = lIface->definitions();
 	for ( TQStringList::Iterator dit = defs.begin(); dit != defs.end(); ++dit ) {
-	    HierarchyItem *itemDef = new HierarchyItem( HierarchyItem::DefinitionParent, this, 0,
+	    HierarchyItem *itemDef = new HierarchyItem( HierarchyItem::DefinitionParent, this, nullptr,
 							tr( *dit ), TQString::null, TQString::null );
 	    itemDef->setPixmap( 0, TQPixmap::fromMimeSource( "designer_folder.png" ) );
 	    itemDef->setOpen( true );
 	    TQStringList entries =
 		lIface->definitionEntries( *dit, formWindow->mainWindow()->designerInterface() );
-	    HierarchyItem *item = 0;
+	    HierarchyItem *item = nullptr;
 	    for ( TQStringList::Iterator eit = entries.begin(); eit != entries.end(); ++eit ) {
 		item = new HierarchyItem( HierarchyItem::Definition,
 					  itemDef, item, *eit, TQString::null, TQString::null );
@@ -748,31 +748,31 @@ void FormDefinitionView::setupVariables()
 	i = i->nextSibling();
     }
 
-    HierarchyItem *itemVar = new HierarchyItem( HierarchyItem::VarParent, this, 0, tr( "Class Variables" ),
+    HierarchyItem *itemVar = new HierarchyItem( HierarchyItem::VarParent, this, nullptr, tr( "Class Variables" ),
 						TQString::null, TQString::null );
     itemVar->setPixmap( 0, TQPixmap::fromMimeSource( "designer_folder.png" ) );
     itemVar->setOpen( true );
 
-    itemVarPriv = new HierarchyItem( HierarchyItem::VarPrivate, itemVar, 0, tr( "private" ),
+    itemVarPriv = new HierarchyItem( HierarchyItem::VarPrivate, itemVar, nullptr, tr( "private" ),
 				     TQString::null, TQString::null );
-    itemVarProt = new HierarchyItem( HierarchyItem::VarProtected, itemVar, 0, tr( "protected" ),
+    itemVarProt = new HierarchyItem( HierarchyItem::VarProtected, itemVar, nullptr, tr( "protected" ),
 				     TQString::null, TQString::null );
-    itemVarPubl = new HierarchyItem( HierarchyItem::VarPublic, itemVar, 0, tr( "public" ),
+    itemVarPubl = new HierarchyItem( HierarchyItem::VarPublic, itemVar, nullptr, tr( "public" ),
 				     TQString::null, TQString::null );
 
     TQValueList<MetaDataBase::Variable> varList = MetaDataBase::variables( formWindow );
     TQValueList<MetaDataBase::Variable>::Iterator it = --( varList.end() );
     if ( !varList.isEmpty() && itemVar ) {
 	for (;;) {
-	    TQListViewItem *item = 0;
+	    TQListViewItem *item = nullptr;
 	    if ( (*it).varAccess == "public" )
-		item = new HierarchyItem( HierarchyItem::Variable, itemVarPubl, 0, (*it).varName,
+		item = new HierarchyItem( HierarchyItem::Variable, itemVarPubl, nullptr, (*it).varName,
 					  TQString::null, TQString::null );
 	    else if ( (*it).varAccess == "private" )
-		item = new HierarchyItem( HierarchyItem::Variable, itemVarPriv, 0, (*it).varName,
+		item = new HierarchyItem( HierarchyItem::Variable, itemVarPriv, nullptr, (*it).varName,
 					  TQString::null, TQString::null );
 	    else // default is protected
-		item = new HierarchyItem( HierarchyItem::Variable, itemVarProt, 0, (*it).varName,
+		item = new HierarchyItem( HierarchyItem::Variable, itemVarProt, nullptr, (*it).varName,
 					  TQString::null, TQString::null );
 	    item->setPixmap( 0, TQPixmap::fromMimeSource( "designer_editslots.png" ) );
 	    if ( it == varList.begin() )
@@ -830,50 +830,50 @@ void FormDefinitionView::refresh()
 
 
     itemFunct = new HierarchyItem( HierarchyItem::FunctParent,
-				   this, 0, tr( "Functions" ), TQString::null, TQString::null );
+				   this, nullptr, tr( "Functions" ), TQString::null, TQString::null );
     itemFunct->moveItem( i );
     itemFunct->setPixmap( 0, TQPixmap::fromMimeSource( "designer_folder.png" ) );
-    itemFunctPriv = new HierarchyItem( HierarchyItem::FunctPrivate, itemFunct, 0,
+    itemFunctPriv = new HierarchyItem( HierarchyItem::FunctPrivate, itemFunct, nullptr,
 				       tr( "private" ), TQString::null, TQString::null );
-    itemFunctProt = new HierarchyItem( HierarchyItem::FunctProtected, itemFunct, 0,
+    itemFunctProt = new HierarchyItem( HierarchyItem::FunctProtected, itemFunct, nullptr,
 				       tr( "protected" ), TQString::null, TQString::null );
-    itemFunctPubl = new HierarchyItem( HierarchyItem::FunctPublic, itemFunct, 0,
+    itemFunctPubl = new HierarchyItem( HierarchyItem::FunctPublic, itemFunct, nullptr,
 				       tr( "public" ), TQString::null, TQString::null );
 
     itemSlots = new HierarchyItem( HierarchyItem::SlotParent,
-				   this, 0, tr( "Slots" ), TQString::null, TQString::null );
+				   this, nullptr, tr( "Slots" ), TQString::null, TQString::null );
     itemSlots->setPixmap( 0, TQPixmap::fromMimeSource( "designer_folder.png" ) );
-    itemPrivate = new HierarchyItem( HierarchyItem::SlotPrivate, itemSlots, 0, tr( "private" ),
+    itemPrivate = new HierarchyItem( HierarchyItem::SlotPrivate, itemSlots, nullptr, tr( "private" ),
 				     TQString::null, TQString::null );
-    itemProtected = new HierarchyItem( HierarchyItem::SlotProtected, itemSlots, 0, tr( "protected" ),
+    itemProtected = new HierarchyItem( HierarchyItem::SlotProtected, itemSlots, nullptr, tr( "protected" ),
 				       TQString::null, TQString::null );
-    itemPublic = new HierarchyItem( HierarchyItem::SlotPublic, itemSlots, 0, tr( "public" ),
+    itemPublic = new HierarchyItem( HierarchyItem::SlotPublic, itemSlots, nullptr, tr( "public" ),
 				    TQString::null, TQString::null );
 
     TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow );
     TQValueList<MetaDataBase::Function>::Iterator it = --( functionList.end() );
     if ( !functionList.isEmpty() && itemFunct ) {
 	for (;;) {
-	    TQListViewItem *item = 0;
+	    TQListViewItem *item = nullptr;
 	    if ( (*it).type == "slot" ) {
 		if ( (*it).access == "protected" )
-		    item = new HierarchyItem( HierarchyItem::Slot, itemProtected, 0, (*it).function,
+		    item = new HierarchyItem( HierarchyItem::Slot, itemProtected, nullptr, (*it).function,
 					      TQString::null, TQString::null );
 		else if ( (*it).access == "private" )
-		    item = new HierarchyItem( HierarchyItem::Slot, itemPrivate, 0, (*it).function,
+		    item = new HierarchyItem( HierarchyItem::Slot, itemPrivate, nullptr, (*it).function,
 					      TQString::null, TQString::null );
 		else // default is public
-		    item = new HierarchyItem( HierarchyItem::Slot, itemPublic, 0, (*it).function,
+		    item = new HierarchyItem( HierarchyItem::Slot, itemPublic, nullptr, (*it).function,
 					      TQString::null, TQString::null );
 	    } else {
 		if ( (*it).access == "protected" )
-		    item = new HierarchyItem( HierarchyItem::Function, itemFunctProt, 0, (*it).function,
+		    item = new HierarchyItem( HierarchyItem::Function, itemFunctProt, nullptr, (*it).function,
 					      TQString::null, TQString::null );
 		else if ( (*it).access == "private" )
-		    item = new HierarchyItem( HierarchyItem::Function, itemFunctPriv, 0, (*it).function,
+		    item = new HierarchyItem( HierarchyItem::Function, itemFunctPriv, nullptr, (*it).function,
 					      TQString::null, TQString::null );
 		else // default is public
-		    item = new HierarchyItem( HierarchyItem::Function, itemFunctPubl, 0, (*it).function,
+		    item = new HierarchyItem( HierarchyItem::Function, itemFunctPubl, nullptr, (*it).function,
 					      TQString::null, TQString::null );
 	    }
 	    item->setPixmap( 0, TQPixmap::fromMimeSource( "designer_editslots.png" ) );
@@ -1095,7 +1095,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
 		return;
 	    if ( i->rtti() == HierarchyItem::Definition )
 		i = i->parent();
-	    ListEditor dia( this, 0, true );
+	    ListEditor dia( this, nullptr, true );
 	    dia.setCaption( tr( "Edit %1" ).arg( i->text( 0 ) ) );
 	    TQStringList entries = lIface->definitionEntries( i->text( 0 ), MainWindow::self->designerInterface() );
 	    dia.setList( entries );
@@ -1149,7 +1149,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
 	} else {
 	    TQListViewItem *p = i->parent();
 	    delete i;
-	    save( p, 0 );
+	    save( p, nullptr );
 	}
     } else if ( res == PROPS ) {
 	if ( i->rtti() == HierarchyItem::Slot ||
@@ -1169,7 +1169,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
 void FormDefinitionView::renamed( TQListViewItem *i )
 {
     if ( newItem == i )
-	newItem = 0;
+	newItem = nullptr;
     if ( !i->parent() )
 	return;
     save( i->parent(), i );
@@ -1228,11 +1228,11 @@ void FormDefinitionView::addVariable( const TQString &varName, const TQString &a
 // ------------------------------------------------------------
 
 HierarchyView::HierarchyView( TQWidget *parent )
-    : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
+    : TQTabWidget( parent, nullptr, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
 		  WStyle_Tool |WStyle_MinMax | WStyle_SysMenu )
 {
-    formwindow = 0;
-    editor = 0;
+    formwindow = nullptr;
+    editor = nullptr;
     listview = new HierarchyList( this, formWindow() );
     fView = new FormDefinitionView( this, formWindow() );
     if ( !MainWindow::self->singleProjectMode() ) {
@@ -1254,7 +1254,7 @@ HierarchyView::HierarchyView( TQWidget *parent )
     classBrowsers = new TQMap<TQString, ClassBrowser>();
     TQStringList langs = MetaDataBase::languages();
     for ( TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it ) {
-	TQInterfacePtr<ClassBrowserInterface> ciface = 0;
+	TQInterfacePtr<ClassBrowserInterface> ciface = nullptr;
 	classBrowserInterfaceManager->queryInterface( *it, &ciface );
 	if ( ciface ) {
 	    ClassBrowser cb( ciface->createClassBrowser( this ), ciface );
@@ -1284,13 +1284,13 @@ void HierarchyView::clear()
 void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o )
 {
     bool fake = fw && qstrcmp( fw->name(), "qt_fakewindow" ) == 0;
-    if ( fw == 0 || o == 0 ) {
+    if ( !fw || !o ) {
 	listview->clear();
 	fView->clear();
 	listview->setFormWindow( fw );
 	fView->setFormWindow( fw );
-	formwindow = 0;
-	editor = 0;
+	formwindow = nullptr;
+	editor = nullptr;
     }
 
     setTabEnabled( listview, true );
@@ -1315,7 +1315,7 @@ void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o )
     if ( !fake ) {
 	listview->setFormWindow( fw );
     } else {
-	listview->setFormWindow( 0 );
+	listview->setFormWindow( nullptr );
 	listview->clear();
     }
 
@@ -1339,7 +1339,7 @@ void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o )
     else if ( fw )
 	showClasses( fw->formFile()->editor() );
 
-    editor = 0;
+    editor = nullptr;
 }
 
 void HierarchyView::showClasses( SourceEditor *se )
@@ -1368,13 +1368,13 @@ void HierarchyView::showClassesTimeout()
     setTabEnabled( listview, !!se->formWindow() && !se->formWindow()->isFake() );
     setTabEnabled( fView, false );
 
-    formwindow = 0;
-    listview->setFormWindow( 0 );
-    fView->setFormWindow( 0 );
+    formwindow = nullptr;
+    listview->setFormWindow( nullptr );
+    fView->setFormWindow( nullptr );
     listview->clear();
     fView->clear();
     if ( !se->formWindow() )
-	MainWindow::self->propertyeditor()->setWidget( 0, 0 );
+	MainWindow::self->propertyeditor()->setWidget( nullptr, nullptr );
     editor = se;
 
     for ( TQMap<TQString, ClassBrowser>::Iterator it = classBrowsers->begin();
diff --git a/tools/designer/designer/hierarchyview.h b/tools/designer/designer/hierarchyview.h
index 6f4daaa65..5bc7f6f87 100644
--- a/tools/designer/designer/hierarchyview.h
+++ b/tools/designer/designer/hierarchyview.h
@@ -231,7 +231,7 @@ signals:
 private:
     struct ClassBrowser
     {
-	ClassBrowser( TQListView * = 0, ClassBrowserInterface * = 0 );
+	ClassBrowser( TQListView * = nullptr, ClassBrowserInterface * = nullptr );
 	~ClassBrowser();
 	TQListView *lv;
 	TQInterfacePtr<ClassBrowserInterface> iface;
diff --git a/tools/designer/designer/iconvieweditorimpl.cpp b/tools/designer/designer/iconvieweditorimpl.cpp
index 41f9e717d..002e80603 100644
--- a/tools/designer/designer/iconvieweditorimpl.cpp
+++ b/tools/designer/designer/iconvieweditorimpl.cpp
@@ -43,7 +43,7 @@
 #include <tqcheckbox.h>
 
 IconViewEditor::IconViewEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
-    : IconViewEditorBase( parent, 0, true ), formwindow( fw )
+    : IconViewEditorBase( parent, nullptr, true ), formwindow( fw )
 {
     connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
     iconview = (TQIconView*)editWidget;
@@ -54,7 +54,7 @@ IconViewEditor::IconViewEditor( TQWidget *parent, TQWidget *editWidget, FormWind
     itemChoosePixmap->setEnabled( false );
     itemDeletePixmap->setEnabled( false );
 
-    TQIconViewItem *i = 0;
+    TQIconViewItem *i = nullptr;
     for ( i = iconview->firstItem(); i; i = i->nextItem() ) {
 	(void)new TQIconViewItem( preview, i->text(), *i->pixmap()  );
     }
@@ -124,7 +124,7 @@ void IconViewEditor::cancelClicked()
 
 void IconViewEditor::applyClicked()
 {
-    TQIconViewItem *i = 0;
+    TQIconViewItem *i = nullptr;
     TQValueList<PopulateIconViewCommand::Item> items;
     for ( i = preview->firstItem(); i; i = i->nextItem() ) {
 	PopulateIconViewCommand::Item item;
diff --git a/tools/designer/designer/layout.cpp b/tools/designer/designer/layout.cpp
index feb9c1e53..f541f9704 100644
--- a/tools/designer/designer/layout.cpp
+++ b/tools/designer/designer/layout.cpp
@@ -87,9 +87,9 @@ void Layout::setup()
 {
     startPoint = TQPoint( 32767, 32767 );
     TQValueList<TQWidgetList> lists;
-    TQWidget *lastParent = 0;
-    TQWidgetList *lastList = 0;
-    TQWidget *w = 0;
+    TQWidget *lastParent = nullptr;
+    TQWidgetList *lastList = nullptr;
+    TQWidget *w = nullptr;
 
     // Go through all widgets of the list we got. As we can only
     // layout widgets which have the same parent, we first do some
@@ -101,7 +101,7 @@ void Layout::setup()
 	if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout )
 	    continue;
 	if ( lastParent != w->parentWidget() ) {
-	    lastList = 0;
+	    lastList = nullptr;
 	    lastParent = w->parentWidget();
 	    TQValueList<TQWidgetList>::Iterator it = lists.begin();
 	    for ( ; it != lists.end(); ++it ) {
@@ -119,7 +119,7 @@ void Layout::setup()
     }
 
     // So, now find the list with the most entries
-    lastList = 0;
+    lastList = nullptr;
     TQValueList<TQWidgetList>::Iterator it = lists.begin();
     for ( ; it != lists.end(); ++it ) {
 	if ( !lastList || ( *it ).count() > lastList->count() )
@@ -318,7 +318,7 @@ void HorizontalLayout::doLayout()
     if ( !prepareLayout( needMove, needReparent ) )
 	return;
 
-    TQHBoxLayout *layout = (TQHBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::HBox );
+    TQHBoxLayout *layout = (TQHBoxLayout*)WidgetFactory::createLayout( layoutBase, nullptr, WidgetFactory::HBox );
 
     for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
 	if ( needReparent && w->parent() != layoutBase )
@@ -382,7 +382,7 @@ void VerticalLayout::doLayout()
     if ( !prepareLayout( needMove, needReparent ) )
 	return;
 
-    TQVBoxLayout *layout = (TQVBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::VBox );
+    TQVBoxLayout *layout = (TQVBoxLayout*)WidgetFactory::createLayout( layoutBase, nullptr, WidgetFactory::VBox );
 
     for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
 	if ( needReparent && w->parent() != layoutBase )
@@ -738,7 +738,7 @@ bool Grid::locateWidget( TQWidget* w, int& row, int& col, int& rowspan, int & co
 GridLayout::GridLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, const TQSize &res, bool doSetup )
     : Layout( wl, p, fw, lb, doSetup ), resolution( res )
 {
-    grid = 0;
+    grid = nullptr;
     if ( doSetup )
 	setup();
 }
@@ -754,7 +754,7 @@ void GridLayout::doLayout()
     if ( !prepareLayout( needMove, needReparent ) )
 	return;
 
-    TQDesignerGridLayout *layout = (TQDesignerGridLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::Grid );
+    TQDesignerGridLayout *layout = (TQDesignerGridLayout*)WidgetFactory::createLayout( layoutBase, nullptr, WidgetFactory::Grid );
 
     if ( !grid )
 	buildGrid();
@@ -803,7 +803,7 @@ void GridLayout::buildGrid()
 
     // Using push_back would look nicer, but operator[] is much faster
     int index  = 0;
-    TQWidget* w = 0;
+    TQWidget* w = nullptr;
     for ( w = widgets.first(); w; w = widgets.next() ) {
 	TQRect widgetPos = w->geometry();
 	x[index]   = widgetPos.left();
diff --git a/tools/designer/designer/listboxdnd.cpp b/tools/designer/designer/listboxdnd.cpp
index bac5beeb1..cbfbc100a 100644
--- a/tools/designer/designer/listboxdnd.cpp
+++ b/tools/designer/designer/listboxdnd.cpp
@@ -42,7 +42,7 @@
 class ListBoxItemDrag : public TQStoredDrag
 {
 public:
-    ListBoxItemDrag( ListBoxItemList & items, bool sendPtr = false, TQListBox * parent = 0, const char * name = 0 );
+    ListBoxItemDrag( ListBoxItemList & items, bool sendPtr = false, TQListBox * parent = nullptr, const char * name = nullptr );
     ~ListBoxItemDrag() {};
     static bool canDecode( TQDragMoveEvent * event );
     static bool decode( TQDropEvent * event, TQListBox * parent, TQListBoxItem * insertPoint );
@@ -64,7 +64,7 @@ bool ListBoxDnd::dropEvent( TQDropEvent * event )
     
 	if ( dMode & NullDrop ) { // combined with Move, a NullDrop will delete an item
 	    event->accept();
-	    emit dropped( 0 ); // a NullDrop
+	    emit dropped( nullptr ); // a NullDrop
 	    return true;
 	}
 	
@@ -259,7 +259,7 @@ bool ListBoxItemDrag::decode( TQDropEvent * event, TQListBox * parent, TQListBox
 	TQ_UINT8 recievePtr = 0; // data contains just item pointers; no data
 	stream >> recievePtr;
 
-	TQListBoxItem * item = 0;
+	TQListBoxItem * item = nullptr;
 
 	if ( recievePtr ) {
 	    
diff --git a/tools/designer/designer/listboxdnd.h b/tools/designer/designer/listboxdnd.h
index e5d72e995..cd167da32 100644
--- a/tools/designer/designer/listboxdnd.h
+++ b/tools/designer/designer/listboxdnd.h
@@ -45,7 +45,7 @@ class ListBoxDnd : public ListDnd
     TQ_OBJECT
 public:
     // dragModes are enumerated in ListDnd
-    ListBoxDnd( TQListBox * eventSource, const char * name = 0 );
+    ListBoxDnd( TQListBox * eventSource, const char * name = nullptr );
     
 signals:
     void dropped( TQListBoxItem * );
diff --git a/tools/designer/designer/listboxeditorimpl.cpp b/tools/designer/designer/listboxeditorimpl.cpp
index 1e169f87a..0a0387cd5 100644
--- a/tools/designer/designer/listboxeditorimpl.cpp
+++ b/tools/designer/designer/listboxeditorimpl.cpp
@@ -46,7 +46,7 @@
 #include <tqcheckbox.h>
 
 ListBoxEditor::ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
-    : ListBoxEditorBase( parent, 0, true ), formwindow( fw )
+    : ListBoxEditorBase( parent, nullptr, true ), formwindow( fw )
 {
     connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
     listbox = (TQListBox*)editWidget;
@@ -57,7 +57,7 @@ ListBoxEditor::ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow
     itemChoosePixmap->setEnabled( false );
     itemDeletePixmap->setEnabled( false );
 
-    TQListBoxItem *i = 0;
+    TQListBoxItem *i = nullptr;
     for ( i = listbox->firstItem(); i; i = i->next() ) {
 	if ( i->pixmap() )
 	    (void)new TQListBoxPixmap( preview, *i->pixmap(), i->text() );
@@ -78,7 +78,7 @@ ListBoxEditor::ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow
     TQObjectList *l = parent->queryList( "TQLineEdit", "itemText" );
     TQObjectListIt it( *l );
     TQObject *obj;
-    while ( (obj = it.current()) != 0 ) {
+    while ( (obj = it.current()) ) {
         ++it;
 	TQObject::connect( editorRename,
 			  TQ_SIGNAL( itemTextChanged( const TQString & ) ),
@@ -156,7 +156,7 @@ void ListBoxEditor::cancelClicked()
 
 void ListBoxEditor::applyClicked()
 {
-    TQListBoxItem *i = 0;
+    TQListBoxItem *i = nullptr;
     TQValueList<PopulateListBoxCommand::Item> items;
     for ( i = preview->firstItem(); i; i = i->next() ) {
 	PopulateListBoxCommand::Item item;
@@ -197,7 +197,7 @@ void ListBoxEditor::moveItemUp()
 	return;
 
     TQListBoxItem *i = preview->item( preview->currentItem() );
-    bool hasPix = (i->pixmap() != 0);
+    bool hasPix = (i->pixmap());
     TQPixmap pix;
     if ( hasPix )
 	pix = *i->pixmap();
@@ -221,7 +221,7 @@ void ListBoxEditor::moveItemDown()
 	return;
 
     TQListBoxItem *i = preview->item( preview->currentItem() );
-    bool hasPix = (i->pixmap() != 0);
+    bool hasPix = (i->pixmap());
     TQPixmap pix;
     if ( hasPix )
 	pix = *i->pixmap();
diff --git a/tools/designer/designer/listboxrename.cpp b/tools/designer/designer/listboxrename.cpp
index 14d9f3935..a8c845867 100644
--- a/tools/designer/designer/listboxrename.cpp
+++ b/tools/designer/designer/listboxrename.cpp
@@ -47,7 +47,7 @@ public:
 
 ListBoxRename::ListBoxRename( TQListBox * eventSource, const char * name )
     : TQObject( eventSource, name ),
-      clickedItem( 0 ), activity( false )
+      clickedItem( nullptr ), activity( false )
 {
     src = eventSource;
     src->installEventFilter( this );
@@ -150,7 +150,7 @@ void ListBoxRename::showLineEdit()
 void ListBoxRename::hideLineEdit()
 {
     ed->hide();
-    clickedItem = 0;
+    clickedItem = nullptr;
     src->setFocus();
 }
 
diff --git a/tools/designer/designer/listboxrename.h b/tools/designer/designer/listboxrename.h
index 5cc00ecf6..3eefc8656 100644
--- a/tools/designer/designer/listboxrename.h
+++ b/tools/designer/designer/listboxrename.h
@@ -43,7 +43,7 @@ class ListBoxRename : public TQObject
 {
     TQ_OBJECT
 public:
-    ListBoxRename( TQListBox * eventSource, const char * name = 0 );
+    ListBoxRename( TQListBox * eventSource, const char * name = nullptr );
     bool eventFilter( TQObject *, TQEvent * event );
 
 signals:
diff --git a/tools/designer/designer/listdnd.cpp b/tools/designer/designer/listdnd.cpp
index d2f18ee5c..b5c30a004 100644
--- a/tools/designer/designer/listdnd.cpp
+++ b/tools/designer/designer/listdnd.cpp
@@ -44,7 +44,7 @@ ListDnd::ListDnd( TQScrollView * eventSource, const char * name )
     src->installEventFilter( this );
     src->viewport()->installEventFilter( this );
 
-    line = new TQWidget( src->viewport(), 0, TQt::WStyle_NoBorder | WStyle_StaysOnTop );
+    line = new TQWidget( src->viewport(), nullptr, TQt::WStyle_NoBorder | WStyle_StaysOnTop );
     line->setBackgroundColor( TQt::black );
     line->resize( src->viewport()->width(), 2 );
     line->hide();
diff --git a/tools/designer/designer/listdnd.h b/tools/designer/designer/listdnd.h
index a464255c0..10291aec1 100644
--- a/tools/designer/designer/listdnd.h
+++ b/tools/designer/designer/listdnd.h
@@ -42,7 +42,7 @@ class ListDnd : public TQObject
     TQ_OBJECT
 public:
     enum DragMode { None = 0, External = 1, Internal = 2, Both = 3, Move = 4, NullDrop = 8 };
-    ListDnd( TQScrollView * eventSource, const char * name = 0 );
+    ListDnd( TQScrollView * eventSource, const char * name = nullptr );
     void setDragMode( int mode );
     int dragMode() const;
     bool eventFilter( TQObject *, TQEvent * event );
diff --git a/tools/designer/designer/listeditor.ui.h b/tools/designer/designer/listeditor.ui.h
index 922806099..23bb4d510 100644
--- a/tools/designer/designer/listeditor.ui.h
+++ b/tools/designer/designer/listeditor.ui.h
@@ -18,7 +18,7 @@ void ListEditor::init()
 
 void ListEditor::setList( const TQStringList &l )
 {
-    TQListViewItem *i = 0;
+    TQListViewItem *i = nullptr;
     for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
 	i = new TQListViewItem( listview, i );
 	i->setText( 0, *it );
@@ -43,7 +43,7 @@ void ListEditor::renamed( TQListViewItem *i )
 void ListEditor::removeItems()
 {
     TQListViewItemIterator it( listview );
-    TQListViewItem *i = 0;
+    TQListViewItem *i = nullptr;
     while ( ( i = it.current() ) ) {
 	++it;
 	if ( i->isSelected() )
@@ -55,7 +55,7 @@ TQStringList ListEditor::items()
 {
     TQStringList l;
     TQListViewItemIterator it( listview );
-    TQListViewItem *i = 0;
+    TQListViewItem *i = nullptr;
     while ( ( i = it.current() ) ) {
 	++it;
 	if ( !i->text( 0 ).isEmpty() )
diff --git a/tools/designer/designer/listviewdnd.cpp b/tools/designer/designer/listviewdnd.cpp
index 131f5cf6e..4283c9f18 100644
--- a/tools/designer/designer/listviewdnd.cpp
+++ b/tools/designer/designer/listviewdnd.cpp
@@ -43,7 +43,7 @@ class ListViewItemDrag : public TQStoredDrag
 {
 public:
     enum DropRelation { Sibling, Child };
-    ListViewItemDrag( ListViewItemList & items, TQWidget * parent = 0, const char * name = 0 );
+    ListViewItemDrag( ListViewItemList & items, TQWidget * parent = nullptr, const char * name = nullptr );
     ~ListViewItemDrag() {};
     static bool canDecode( TQDragMoveEvent * event );
     static bool decode( TQDropEvent * event, TQListView * parent, TQListViewItem * insertPoint, DropRelation dr );
@@ -64,7 +64,7 @@ bool ListViewDnd::dropEvent( TQDropEvent * event )
     
 	if ( dMode & NullDrop ) { // combined with Move, a NullDrop will delete an item
 	    event->accept();
-	    emit dropped( 0 ); // a NullDrop
+	    emit dropped( nullptr ); // a NullDrop
 	    return true;
 	}
 	
@@ -87,7 +87,7 @@ bool ListViewDnd::dropEvent( TQDropEvent * event )
 
 	if ( ListViewItemDrag::decode( event, (TQListView *) src, item, dr ) ) {
 	    event->accept();
-	    emit dropped( 0 ); // Use ID instead of item?
+	    emit dropped( nullptr ); // Use ID instead of item?
 	}
     }
 
@@ -139,8 +139,8 @@ bool ListViewDnd::mouseMoveEvent( TQMouseEvent * event )
 int ListViewDnd::buildFlatList( ListViewItemList & list )
 {
     bool addKids = false;
-    TQListViewItem *nextSibling = 0;
-    TQListViewItem *nextParent = 0;
+    TQListViewItem *nextSibling = nullptr;
+    TQListViewItem *nextParent = nullptr;
     TQListViewItemIterator it = ((TQListView *)src)->firstChild();
     for ( ; *it; it++ ) {
 	// Hit the nextSibling, turn of child processing
@@ -292,12 +292,12 @@ bool ListViewItemDrag::canDecode( TQDragMoveEvent * event )
 bool ListViewItemDrag::decode( TQDropEvent * event, TQListView * parent, TQListViewItem * insertPoint, DropRelation dr )
 {
     TQByteArray data = event->encodedData( "qt/listviewitem" );
-    TQListViewItem* itemParent = insertPoint ? insertPoint->parent() : 0;
+    TQListViewItem* itemParent = insertPoint ? insertPoint->parent() : nullptr;
 
     // Change from sibling (default) to child creation
     if ( insertPoint && dr == Child ) {
 	itemParent = insertPoint;
-	insertPoint = 0;
+	insertPoint = nullptr;
     }
 
     if ( data.size() ) {
@@ -426,8 +426,8 @@ TQDataStream & operator>> ( TQDataStream & stream, TQListViewItem & item )
     int childCount;
     stream >> childCount;
 
-    TQListViewItem *child = 0;
-    TQListViewItem *prevchild = 0;
+    TQListViewItem *child = nullptr;
+    TQListViewItem *prevchild = nullptr;
     for ( i = 0; i < childCount; i++ ) {
 	child = new TQListViewItem( &item, prevchild );
 	stream >> ( *child );
diff --git a/tools/designer/designer/listviewdnd.h b/tools/designer/designer/listviewdnd.h
index 1252fd05d..3770f5b7d 100644
--- a/tools/designer/designer/listviewdnd.h
+++ b/tools/designer/designer/listviewdnd.h
@@ -48,7 +48,7 @@ class ListViewDnd : public ListDnd
 public:
     enum DragMode { Flat = 16 }; // see ListDnd::DragMode
 
-    ListViewDnd( TQListView * eventSource, const char * name = 0 );
+    ListViewDnd( TQListView * eventSource, const char * name = nullptr );
 
 signals:
     void dropped( TQListViewItem * );
diff --git a/tools/designer/designer/listvieweditorimpl.cpp b/tools/designer/designer/listvieweditorimpl.cpp
index b7a6e6fa4..05fe69dee 100644
--- a/tools/designer/designer/listvieweditorimpl.cpp
+++ b/tools/designer/designer/listvieweditorimpl.cpp
@@ -52,7 +52,7 @@
 #include <tqptrstack.h>
 
 ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw )
-    : ListViewEditorBase( parent, 0, true ), listview( lv ), formwindow( fw )
+    : ListViewEditorBase( parent, nullptr, true ), listview( lv ), formwindow( fw )
 {
     connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
     itemText->setEnabled( false );
@@ -94,7 +94,7 @@ ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw
     TQObjectList *l = parent->queryList( "TQLineEdit", "itemText" );
     TQObject *obj;
     TQObjectListIt itemsLineEditIt( *l );
-    while ( (obj = itemsLineEditIt.current()) != 0 ) {
+    while ( (obj = itemsLineEditIt.current()) ) {
         ++itemsLineEditIt;
 	TQObject::connect( this,
 			  TQ_SIGNAL( itemRenamed( const TQString & ) ),
@@ -119,7 +119,7 @@ ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw
     // Find TQLineEdit "colText" and connect
     l = parent->queryList( "TQLineEdit", "colText" );
     TQObjectListIt columnsLineEditIt( *l );
-    while ( (obj = columnsLineEditIt.current()) != 0 ) {
+    while ( (obj = columnsLineEditIt.current()) ) {
         ++columnsLineEditIt;
 	TQObject::connect( columnsRename,
 			  TQ_SIGNAL( itemTextChanged( const TQString & ) ),
@@ -412,7 +412,7 @@ void ListViewEditor::itemNewClicked()
 void ListViewEditor::itemNewSubClicked()
 {
     TQListViewItem *parent = itemsPreview->currentItem();
-    TQListViewItem *item = 0;
+    TQListViewItem *item = nullptr;
     if ( parent ) {
 	item = new TQListViewItem( parent );
 	parent->setOpen( true );
@@ -620,14 +620,14 @@ void ListViewEditor::setupItems()
 ListViewEditor::Column *ListViewEditor::findColumn( TQListBoxItem *i )
 {
     if ( !i )
-	return 0;
+	return nullptr;
 
     for ( TQValueList<Column>::Iterator it = columns.begin(); it != columns.end(); ++it ) {
 	if ( ( *it ).item == i )
 	    return &( *it );
     }
 
-    return 0;
+    return nullptr;
 }
 
 void ListViewEditor::initTabPage( const TQString &page )
diff --git a/tools/designer/designer/mainwindow.cpp b/tools/designer/designer/mainwindow.cpp
index 1203f16eb..91c981152 100644
--- a/tools/designer/designer/mainwindow.cpp
+++ b/tools/designer/designer/mainwindow.cpp
@@ -129,7 +129,7 @@ extern void set_splash_status( const TQString &txt );
 extern TQObject* qwf_form_object;
 extern TQString *qwf_plugin_dir;
 
-TQ_EXPORT MainWindow *MainWindow::self = 0;
+TQ_EXPORT MainWindow *MainWindow::self = nullptr;
 
 TQString assistantPath()
 {
@@ -151,7 +151,7 @@ static TQString textNoAccel( const TQString& text)
 
 
 TQ_EXPORT MainWindow::MainWindow( bool asClient, bool single, const TQString &plgDir )
-    : TQMainWindow( 0, "designer_mainwindow", WType_TopLevel | (single ? 0 : WDestructiveClose) | WGroupLeader ),
+    : TQMainWindow( nullptr, "designer_mainwindow", WType_TopLevel | (single ? 0 : WDestructiveClose) | WGroupLeader ),
       grd( 10, 10 ), sGrid( true ), snGrid( true ), restoreConfig( true ), splashScreen( true ),
       fileFilter( tr( "TQt User-Interface Files (*.ui)" ) ), client( asClient ),
       previewing( false ), databaseAutoEdit( false ), autoSaveEnabled( false ), autoSaveInterval( 1800 )
@@ -161,7 +161,7 @@ TQ_EXPORT MainWindow::MainWindow( bool asClient, bool single, const TQString &pl
 
     self = this;
     setPluginDirectory( plgDir );
-    customWidgetToolBar = customWidgetToolBar2 = 0;
+    customWidgetToolBar = customWidgetToolBar2 = nullptr;
     guiStuffVisible = true;
     editorsReadOnly = false;
     sSignalHandlers = true;
@@ -191,14 +191,14 @@ TQ_EXPORT MainWindow::MainWindow( bool asClient, bool single, const TQString &pl
     setIcon( TQPixmap::fromMimeSource( "designer_appicon.png" ) );
 #endif
 
-    actionGroupTools = 0;
-    prefDia = 0;
-    windowMenu = 0;
-    hierarchyView = 0;
-    actionEditor = 0;
-    currentProject = 0;
-    wspace = 0;
-    oWindow = 0;
+    actionGroupTools = nullptr;
+    prefDia = nullptr;
+    windowMenu = nullptr;
+    hierarchyView = nullptr;
+    actionEditor = nullptr;
+    currentProject = nullptr;
+    wspace = nullptr;
+    oWindow = nullptr;
     singleProject = single;
 
     statusBar()->clear();
@@ -217,7 +217,7 @@ TQ_EXPORT MainWindow::MainWindow( bool asClient, bool single, const TQString &pl
     layoutToolBar = new TQToolBar( this, "Layout" );
     layoutToolBar->setCloseMode( TQDockWindow::Undocked );
     addToolBar( layoutToolBar, tr( "Layout" ) );
-    interpreterPluginManager = 0;
+    interpreterPluginManager = nullptr;
     setupToolActions();
     setupLayoutActions();
     setupPreviewActions();
@@ -240,7 +240,7 @@ TQ_EXPORT MainWindow::MainWindow( bool asClient, bool single, const TQString &pl
     emit hasActiveForm( false );
     emit hasActiveWindow( false );
 
-    lastPressWidget = 0;
+    lastPressWidget = nullptr;
     tqApp->installEventFilter( this );
 
     TQSize as( tqApp->desktop()->size() );
@@ -258,15 +258,15 @@ TQ_EXPORT MainWindow::MainWindow( bool asClient, bool single, const TQString &pl
     set_splash_status( "Loading User Settings..." );
     readConfig();
     // hack to make WidgetFactory happy (so it knows TQWidget and TQDialog for resetting properties)
-    TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ), this, 0, false );
+    TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ), this, nullptr, false );
     delete w;
-    w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), this, 0, false );
+    w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), this, nullptr, false );
     delete w;
-    w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLabel" ), this, 0, false );
+    w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLabel" ), this, nullptr, false );
     delete w;
-    w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQTabWidget" ), this, 0, false );
+    w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQTabWidget" ), this, nullptr, false );
     delete w;
-    w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this, 0, false );
+    w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this, nullptr, false );
     delete w;
     setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), false );
     actionEditor->parentWidget()->hide();
@@ -303,10 +303,10 @@ MainWindow::~MainWindow()
     projects.clear();
 
     delete oWindow;
-    oWindow = 0;
+    oWindow = nullptr;
 
     desInterface->release();
-    desInterface = 0;
+    desInterface = nullptr;
 
     delete actionPluginManager;
     delete preferencePluginManager;
@@ -318,7 +318,7 @@ MainWindow::~MainWindow()
 
     MetaDataBase::clearDataBase();
     if(self == this)
-	self = 0;
+	self = nullptr;
 }
 
 void MainWindow::setupMDI()
@@ -333,7 +333,7 @@ void MainWindow::setupMDI()
     qworkspace->setScrollBarsEnabled( true );
     connect( qworkspace, TQ_SIGNAL( windowActivated( TQWidget * ) ),
 	     this, TQ_SLOT( activeWindowChanged( TQWidget * ) ) );
-    lastActiveFormWindow = 0;
+    lastActiveFormWindow = nullptr;
     qworkspace->setAcceptDrops( true );
 }
 
@@ -434,7 +434,7 @@ void MainWindow::setupWorkspace()
 
 void MainWindow::setupActionEditor()
 {
-    TQDockWindow *dw = new TQDockWindow( TQDockWindow::OutsideDock, this, 0 );
+    TQDockWindow *dw = new TQDockWindow( TQDockWindow::OutsideDock, this, nullptr );
     addDockWindow( dw, TQt::DockTornOff );
     dw->setResizeEnabled( true );
     dw->setCloseMode( TQDockWindow::Always );
@@ -466,7 +466,7 @@ void MainWindow::setupToolbox()
     dw->show();
     setDockEnabled( dw, TQt::DockTop, false );
     setDockEnabled( dw, TQt::DockBottom, false );
-    commonWidgetsToolBar = new TQToolBar( "Common Widgets", 0, toolBox, false, "Common Widgets" );
+    commonWidgetsToolBar = new TQToolBar( "Common Widgets", nullptr, toolBox, false, "Common Widgets" );
     commonWidgetsToolBar->setFrameStyle( TQFrame::NoFrame );
     commonWidgetsToolBar->setOrientation( TQt::Vertical );
     commonWidgetsToolBar->setBackgroundMode(PaletteBase);
@@ -570,7 +570,7 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet )
 
     FormWindow *fw = formWindow();
     if ( !fw )
-	return 0;
+	return nullptr;
 
     TQStringList databases;
     TQPtrDictIterator<TQWidget> wit( *fw->widgets() );
@@ -627,7 +627,7 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet )
 	return w;
     }
     TQApplication::restoreOverrideCursor();
-    return 0;
+    return nullptr;
 }
 
 void MainWindow::previewForm()
@@ -640,7 +640,7 @@ void MainWindow::previewForm()
 void MainWindow::previewForm( const TQString & style )
 {
     TQStyle* st = TQStyleFactory::create( style );
-    TQWidget* w = 0;
+    TQWidget* w = nullptr;
     if ( style == "Motif" ) {
 	TQPalette p( TQColor( 192, 192, 192 ) );
 	w = previewFormInternal( st, &p );
@@ -806,7 +806,7 @@ void MainWindow::helpManual()
 
 void MainWindow::helpAbout()
 {
-    AboutDialog dlg( this, 0, true );
+    AboutDialog dlg( this, nullptr, true );
     if ( singleProjectMode() ) {
 	dlg.aboutPixmap->setText( "" );
 	dlg.aboutVersion->setText( "" );
@@ -881,7 +881,7 @@ void MainWindow::showProperties( TQObject *o )
 	if ( lastActiveFormWindow )
 	    hierarchyView->setFormWindow( lastActiveFormWindow, lastActiveFormWindow->mainContainer() );
 	else
-	    hierarchyView->setFormWindow( 0, 0 );
+	    hierarchyView->setFormWindow( nullptr, nullptr );
 	return;
     }
     TQWidget *w = (TQWidget*)o;
@@ -900,8 +900,8 @@ void MainWindow::showProperties( TQObject *o )
 	}
 	hierarchyView->setFormWindow( fw, w );
     } else {
-	propertyEditor->setWidget( 0, 0 );
-	hierarchyView->setFormWindow( 0, 0 );
+	propertyEditor->setWidget( nullptr, nullptr );
+	hierarchyView->setFormWindow( nullptr, nullptr );
     }
 
     if ( currentTool() == POINTER_TOOL && fw &&
@@ -947,7 +947,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
     if ( !o || !e || !o->isWidgetType() )
 	return TQMainWindow::eventFilter( o, e );
 
-    TQWidget *w = 0;
+    TQWidget *w = nullptr;
     bool passiveInteractor;
     switch ( e->type() ) {
     case TQEvent::AccelOverride:
@@ -1039,7 +1039,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
 	    return true;
 	return !passiveInteractor;
     case TQEvent::MouseButtonRelease:
-	lastPressWidget = 0;
+	lastPressWidget = nullptr;
 	if ( isAToolBarChild( o )  && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL )
 	    break;
 	if ( ::tqt_cast<TQSizeGrip*>(o) )
@@ -1227,13 +1227,13 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
 TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const
 {
     if ( ::tqt_cast<TQWizard*>(o->parent()) && !::tqt_cast<TQPushButton*>(o) )
-	return 0;
+	return nullptr;
     while ( o ) {
 	if ( ::tqt_cast<FormWindow*>(o) )
 	    return (TQWidget*)o;
 	o = o->parent();
     }
-    return 0;
+    return nullptr;
 }
 
 TQWidget *MainWindow::isAToolBarChild( TQObject *o ) const
@@ -1242,16 +1242,16 @@ TQWidget *MainWindow::isAToolBarChild( TQObject *o ) const
 	if ( ::tqt_cast<TQDesignerToolBar*>(o) )
 	    return (TQWidget*)o;
 	if ( ::tqt_cast<FormWindow*>(o) )
-	    return 0;
+	    return nullptr;
 	o = o->parent();
     }
-    return 0;
+    return nullptr;
 }
 
 FormWindow *MainWindow::formWindow()
 {
     if ( qworkspace->activeWindow() ) {
-	FormWindow *fw = 0;
+	FormWindow *fw = nullptr;
 	if ( ::tqt_cast<FormWindow*>(qworkspace->activeWindow()) )
 	    fw = (FormWindow*)qworkspace->activeWindow();
 	else if ( lastActiveFormWindow &&
@@ -1259,7 +1259,7 @@ FormWindow *MainWindow::formWindow()
 	    fw = lastActiveFormWindow;
 	return fw;
     }
-    return 0;
+    return nullptr;
 }
 
 void MainWindow::emitProjectSignals()
@@ -1332,7 +1332,7 @@ void MainWindow::createNewProject( const TQString &lang )
     }
 
     TQAction *a = new TQAction( pro->makeRelative( pro->fileName() ),
-			      pro->makeRelative( pro->fileName() ), 0, actionGroupProjects, 0, true );
+			      pro->makeRelative( pro->fileName() ), 0, actionGroupProjects, nullptr, true );
     projects.insert( a, pro );
     addRecentlyOpened( pro->makeAbsolute( pro->fileName() ), recentlyProjects );
     projectSelected( a );
@@ -1344,7 +1344,7 @@ bool MainWindow::unregisterClient( FormWindow *w )
     propertyEditor->closed( w );
     objectHierarchy()->closed( w );
     if ( w == lastActiveFormWindow )
-	lastActiveFormWindow = 0;
+	lastActiveFormWindow = nullptr;
 
     TQPtrList<SourceEditor> waitingForDelete;
     waitingForDelete.setAutoDelete( true );
@@ -1354,7 +1354,7 @@ bool MainWindow::unregisterClient( FormWindow *w )
     }
 
     if ( actionEditor->form() == w ) {
-	actionEditor->setFormWindow( 0 );
+	actionEditor->setFormWindow( nullptr );
 	actionEditor->parentWidget()->hide();
     }
 
@@ -1383,7 +1383,7 @@ void MainWindow::activeWindowChanged( TQWidget *w )
 	    if ( actionEditor->wantToBeShown() )
 		actionEditor->parentWidget()->show();
 	} else {
-	    TQWidget *mc = 0;
+	    TQWidget *mc = nullptr;
 	    if ( ofw && (mc = ofw->mainContainer()) && ::tqt_cast<TQMainWindow*>(mc) )
 		actionEditor->setWantToBeShown( !actionEditor->parentWidget()->isHidden() );
 	    actionEditor->parentWidget()->hide();
@@ -1444,7 +1444,7 @@ void MainWindow::activeWindowChanged( TQWidget *w )
 	actionEditRedo->setToolTip( textNoAccel( actionEditRedo->menuText()) );
 	if ( hierarchyView->sourceEditor() != w )
 	    hierarchyView->showClasses( se );
-	actionEditor->setFormWindow( 0 );
+	actionEditor->setFormWindow( nullptr );
 	if ( wspace && se->project() && se->project() != currentProject ) {
 	    for ( TQMap<TQAction*, Project *>::ConstIterator it = projects.begin(); it != projects.end(); ++it ) {
 		if ( *it == se->project() ) {
@@ -1551,18 +1551,18 @@ void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int
 {
     const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", true ), true );
     if ( text && qstrcmp( text->type(), "TQString") != 0 )
-	text = 0;
+	text = nullptr;
     const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", true ), true );
     if ( title && qstrcmp( title->type(), "TQString") != 0 )
-	title = 0;
+	title = nullptr;
     const TQMetaProperty* pagetitle =
 	w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", true ), true );
     if ( pagetitle && qstrcmp( pagetitle->type(), "TQString") != 0 )
-	pagetitle = 0;
+	pagetitle = nullptr;
     const TQMetaProperty* pixmap =
 	w->metaObject()->property( w->metaObject()->findProperty( "pixmap", true ), true );
     if ( pixmap && qstrcmp( pixmap->type(), "TQPixmap") != 0 )
-	pixmap = 0;
+	pixmap = nullptr;
 
     if ( ( text && text->designable(w) ) ||
 	 ( title && title->designable(w) ) ||
@@ -1593,11 +1593,11 @@ void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int
 #ifdef QT_CONTAINER_CUSTOM_WIDGETS
 static TQWidgetContainerInterfacePrivate *containerWidgetInterface( TQWidget *w )
 {
-    WidgetInterface *iface = 0;
+    WidgetInterface *iface = nullptr;
     widgetManager()->queryInterface( WidgetFactory::classNameOf( w ), &iface );
     if ( !iface )
 	return 0;
-    TQWidgetContainerInterfacePrivate *iface2 = 0;
+    TQWidgetContainerInterfacePrivate *iface2 = nullptr;
     iface->queryInterface( IID_QWidgetContainer, (TQUnknownInterface**)&iface2 );
     if ( !iface2 )
 	return 0;
@@ -2823,7 +2823,7 @@ void MainWindow::openProject( const TQString &fn )
     TQApplication::setOverrideCursor( waitCursor );
     Project *pro = new Project( fn, "", projectSettingsPluginManager );
     pro->setModified( false );
-    TQAction *a = new TQAction( pro->projectName(), pro->projectName(), 0, actionGroupProjects, 0, true );
+    TQAction *a = new TQAction( pro->projectName(), pro->projectName(), 0, actionGroupProjects, nullptr, true );
     projects.insert( a, pro );
     projectSelected( a );
     TQApplication::restoreOverrideCursor();
@@ -2918,7 +2918,7 @@ void MainWindow::setupActionManager()
 
     TQStringList lst = actionPluginManager->featureList();
     for ( TQStringList::ConstIterator ait = lst.begin(); ait != lst.end(); ++ait ) {
-	ActionInterface *iface = 0;
+	ActionInterface *iface = nullptr;
 	actionPluginManager->queryInterface( *ait, &iface );
 	if ( !iface )
 	    continue;
@@ -2931,8 +2931,8 @@ void MainWindow::setupActionManager()
 	TQString grp = iface->group( *ait );
 	if ( grp.isEmpty() )
 	    grp = "3rd party actions";
-	TQPopupMenu *menu = 0;
-	TQToolBar *tb = 0;
+	TQPopupMenu *menu = nullptr;
+	TQToolBar *tb = nullptr;
 
 	if ( !( menu = (TQPopupMenu*)child( grp.latin1(), "TQPopupMenu" ) ) ) {
 	    menu = new TQPopupMenu( this, grp.latin1() );
@@ -3037,7 +3037,7 @@ Project *MainWindow::findProject( const TQString &projectName ) const
 	if ( (*it)->projectName() == projectName )
 	    return *it;
     }
-    return 0;
+    return nullptr;
 }
 
 void MainWindow::setCurrentProject( Project *pro )
@@ -3107,7 +3107,7 @@ void MainWindow::addRecentlyOpened( const TQString &fn, TQStringList &lst )
 
 TemplateWizardInterface * MainWindow::templateWizardInterface( const TQString& className )
 {
-    TemplateWizardInterface* iface = 0;
+    TemplateWizardInterface* iface = nullptr;
     templateWizardPluginManager->queryInterface( className, & iface );
     return iface;
 }
@@ -3131,7 +3131,7 @@ void MainWindow::setupPluginManagers()
     if ( preferencePluginManager ) {
 	TQStringList lst = preferencePluginManager->featureList();
 	for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
-	    PreferenceInterface *i = 0;
+	    PreferenceInterface *i = nullptr;
 	    preferencePluginManager->queryInterface( *it, &i );
 	    if ( !i )
 		continue;
@@ -3147,7 +3147,7 @@ void MainWindow::setupPluginManagers()
     if ( projectSettingsPluginManager ) {
 	TQStringList lst = projectSettingsPluginManager->featureList();
 	for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
-	    ProjectSettingsInterface *i = 0;
+	    ProjectSettingsInterface *i = nullptr;
 	    projectSettingsPluginManager->queryInterface( *it, &i );
 	    if ( !i )
 		continue;
@@ -3312,9 +3312,9 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm )
 {
     TQWidgetList windows = qworkspace->windowList();
     for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
-	FormWindow *fw = 0;
-	SourceEditor *se = 0;
-	SourceFile *sf = 0;
+	FormWindow *fw = nullptr;
+	SourceEditor *se = nullptr;
+	SourceFile *sf = nullptr;
 	if ( ::tqt_cast<FormWindow*>(w) ) {
 	    fw = (FormWindow*)w;
 	} else if ( ::tqt_cast<SourceEditor*>(w) ) {
@@ -3410,7 +3410,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm )
     }
 
     FormFile *ff = currentProject->fakeFormFileFor( o );
-    FormWindow *fw = 0;
+    FormWindow *fw = nullptr;
     if ( ff )
 	fw = ff->formWindow();
 
@@ -3456,7 +3456,7 @@ TQObject *MainWindow::findRealObject( TQObject *o )
 		  ( (SourceEditor*)w )->sourceFile() == o )
 	    return o;
     }
-    return 0;
+    return nullptr;
 }
 
 void MainWindow::formNameChanged( FormWindow *fw )
@@ -3488,10 +3488,10 @@ void MainWindow::breakPointsChanged()
 						      "/qsa" );
     }
 
-    InterpreterInterface *iiface = 0;
+    InterpreterInterface *iiface = nullptr;
     if ( interpreterPluginManager ) {
 	TQString lang = currentProject->language();
-	iiface = 0;
+	iiface = nullptr;
 	interpreterPluginManager->queryInterface( lang, &iiface );
 	if ( !iiface )
 	    return;
@@ -3552,12 +3552,12 @@ SourceFile *MainWindow::sourceFile()
 		return e->sourceFile();
 	}
     }
-    return 0;
+    return nullptr;
 }
 
 bool MainWindow::openProjectSettings( Project *pro )
 {
-    ProjectSettings dia( pro, this, 0, true );
+    ProjectSettings dia( pro, this, nullptr, true );
     SenderObject *senderObject = new SenderObject( designerInterface() );
     TQValueList<Tab>::ConstIterator it;
     for ( it = projectTabs.begin(); it != projectTabs.end(); ++it ) {
@@ -3584,7 +3584,7 @@ bool MainWindow::openProjectSettings( Project *pro )
     for ( it = projectTabs.begin(); it != projectTabs.end(); ++it ) {
 	Tab t = *it;
 	dia.tabWidget->removePage( t.w );
-	t.w->reparent( 0, TQPoint(0,0), false );
+	t.w->reparent( nullptr, TQPoint(0,0), false );
     }
 
     return res == TQDialog::Accepted;
@@ -3602,7 +3602,7 @@ TQStringList MainWindow::sourceTemplates() const
 
 SourceTemplateInterface* MainWindow::sourceTemplateInterface( const TQString& templ )
 {
-    SourceTemplateInterface *iface = 0;
+    SourceTemplateInterface *iface = nullptr;
     sourceTemplatePluginManager->queryInterface( templ, &iface);
     return iface;
 }
@@ -3653,14 +3653,14 @@ void MainWindow::setSingleProject( Project *pro )
 	hierarchyView->clear();
 	windows = qWorkspace()->windowList();
 	qWorkspace()->blockSignals( false );
-	currentProject = 0;
+	currentProject = nullptr;
 	updateUndoRedo( false, false, TQString::null, TQString::null );
     }
 
     singleProject = true;
     projects.clear();
     TQAction *a = new TQAction( tr( pro->name() ), tr( pro->name() ), 0,
-			      actionGroupProjects, 0, true );
+			      actionGroupProjects, nullptr, true );
     eProject = pro;
     projects.insert( a, eProject );
     a->setOn( true );
diff --git a/tools/designer/designer/mainwindow.h b/tools/designer/designer/mainwindow.h
index 286108266..306e81a0c 100644
--- a/tools/designer/designer/mainwindow.h
+++ b/tools/designer/designer/mainwindow.h
@@ -110,7 +110,7 @@ public:
     TQPopupMenu *setupNormalHierarchyMenu( TQWidget *parent );
     TQPopupMenu *setupTabWidgetHierarchyMenu( TQWidget *parent, const char *addSlot, const char *removeSlot );
 
-    FormWindow *openFormWindow( const TQString &fn, bool validFileName = true, FormFile *ff = 0 );
+    FormWindow *openFormWindow( const TQString &fn, bool validFileName = true, FormFile *ff = nullptr );
     bool isCustomWidgetUsed( MetaDataBase::CustomWidget *w );
 
     void setGrid( const TQPoint &p );
@@ -338,7 +338,7 @@ private:
 
     void enableAll( bool enable );
 
-    TQWidget* previewFormInternal( TQStyle* style = 0, TQPalette* pal = 0 );
+    TQWidget* previewFormInternal( TQStyle* style = nullptr, TQPalette* pal = nullptr );
 
     void readConfig();
 
diff --git a/tools/designer/designer/mainwindowactions.cpp b/tools/designer/designer/mainwindowactions.cpp
index eb285fe17..7a456e3a4 100644
--- a/tools/designer/designer/mainwindowactions.cpp
+++ b/tools/designer/designer/mainwindowactions.cpp
@@ -124,37 +124,37 @@ static TQIconSet createIconSet( const TQString &name )
 
 void MainWindow::setupEditActions()
 {
-    actionEditUndo = new TQAction( tr("Undo"), createIconSet( "designer_undo.png" ),tr("&Undo: Not Available"), CTRL + Key_Z, this, 0 );
+    actionEditUndo = new TQAction( tr("Undo"), createIconSet( "designer_undo.png" ),tr("&Undo: Not Available"), CTRL + Key_Z, this, nullptr );
     actionEditUndo->setStatusTip( tr( "Undoes the last action" ) );
     actionEditUndo->setWhatsThis( whatsThisFrom( "Edit|Undo" ) );
     connect( actionEditUndo, TQ_SIGNAL( activated() ), this, TQ_SLOT( editUndo() ) );
     actionEditUndo->setEnabled( false );
 
-    actionEditRedo = new TQAction( tr( "Redo" ), createIconSet("designer_redo.png"), tr( "&Redo: Not Available" ), CTRL + Key_Y, this, 0 );
+    actionEditRedo = new TQAction( tr( "Redo" ), createIconSet("designer_redo.png"), tr( "&Redo: Not Available" ), CTRL + Key_Y, this, nullptr );
     actionEditRedo->setStatusTip( tr( "Redoes the last undone operation") );
     actionEditRedo->setWhatsThis( whatsThisFrom( "Edit|Redo" ) );
     connect( actionEditRedo, TQ_SIGNAL( activated() ), this, TQ_SLOT( editRedo() ) );
     actionEditRedo->setEnabled( false );
 
-    actionEditCut = new TQAction( tr( "Cut" ), createIconSet("designer_editcut.png"), tr( "Cu&t" ), CTRL + Key_X, this, 0 );
+    actionEditCut = new TQAction( tr( "Cut" ), createIconSet("designer_editcut.png"), tr( "Cu&t" ), CTRL + Key_X, this, nullptr );
     actionEditCut->setStatusTip( tr( "Cuts the selected widgets and puts them on the clipboard" ) );
     actionEditCut->setWhatsThis(  whatsThisFrom( "Edit|Cut" ) );
     connect( actionEditCut, TQ_SIGNAL( activated() ), this, TQ_SLOT( editCut() ) );
     actionEditCut->setEnabled( false );
 
-    actionEditCopy = new TQAction( tr( "Copy" ), createIconSet("designer_editcopy.png"), tr( "&Copy" ), CTRL + Key_C, this, 0 );
+    actionEditCopy = new TQAction( tr( "Copy" ), createIconSet("designer_editcopy.png"), tr( "&Copy" ), CTRL + Key_C, this, nullptr );
     actionEditCopy->setStatusTip( tr( "Copies the selected widgets to the clipboard" ) );
     actionEditCopy->setWhatsThis(  whatsThisFrom( "Edit|Copy" ) );
     connect( actionEditCopy, TQ_SIGNAL( activated() ), this, TQ_SLOT( editCopy() ) );
     actionEditCopy->setEnabled( false );
 
-    actionEditPaste = new TQAction( tr( "Paste" ), createIconSet("designer_editpaste.png"), tr( "&Paste" ), CTRL + Key_V, this, 0 );
+    actionEditPaste = new TQAction( tr( "Paste" ), createIconSet("designer_editpaste.png"), tr( "&Paste" ), CTRL + Key_V, this, nullptr );
     actionEditPaste->setStatusTip( tr( "Pastes the clipboard's contents" ) );
     actionEditPaste->setWhatsThis( whatsThisFrom( "Edit|Paste" ) );
     connect( actionEditPaste, TQ_SIGNAL( activated() ), this, TQ_SLOT( editPaste() ) );
     actionEditPaste->setEnabled( false );
 
-    actionEditDelete = new TQAction( tr( "Delete" ), TQPixmap(), tr( "&Delete" ), Key_Delete, this, 0 );
+    actionEditDelete = new TQAction( tr( "Delete" ), TQPixmap(), tr( "&Delete" ), Key_Delete, this, nullptr );
     actionEditDelete->setStatusTip( tr( "Deletes the selected widgets" ) );
     actionEditDelete->setWhatsThis( whatsThisFrom( "Edit|Delete" ) );
     connect( actionEditDelete, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDelete() ) );
@@ -164,61 +164,61 @@ void MainWindow::setupEditActions()
     connect( macDelete, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDelete() ) );
 #endif
 
-    actionEditSelectAll = new TQAction( tr( "Select All" ), TQPixmap(), tr( "Select &All" ), CTRL + Key_A, this, 0 );
+    actionEditSelectAll = new TQAction( tr( "Select All" ), TQPixmap(), tr( "Select &All" ), CTRL + Key_A, this, nullptr );
     actionEditSelectAll->setStatusTip( tr( "Selects all widgets" ) );
     actionEditSelectAll->setWhatsThis( whatsThisFrom( "Edit|Select All" ) );
     connect( actionEditSelectAll, TQ_SIGNAL( activated() ), this, TQ_SLOT( editSelectAll() ) );
     actionEditSelectAll->setEnabled( true );
 
-    actionEditRaise = new TQAction( tr( "Bring to Front" ), createIconSet("designer_editraise.png"), tr( "Bring to &Front" ), 0, this, 0 );
+    actionEditRaise = new TQAction( tr( "Bring to Front" ), createIconSet("designer_editraise.png"), tr( "Bring to &Front" ), 0, this, nullptr );
     actionEditRaise->setStatusTip( tr( "Raises the selected widgets" ) );
     actionEditRaise->setWhatsThis( tr( "Raises the selected widgets" ) );
     connect( actionEditRaise, TQ_SIGNAL( activated() ), this, TQ_SLOT( editRaise() ) );
     actionEditRaise->setEnabled( false );
 
-    actionEditLower = new TQAction( tr( "Send to Back" ), createIconSet("designer_editlower.png"), tr( "Send to &Back" ), 0, this, 0 );
+    actionEditLower = new TQAction( tr( "Send to Back" ), createIconSet("designer_editlower.png"), tr( "Send to &Back" ), 0, this, nullptr );
     actionEditLower->setStatusTip( tr( "Lowers the selected widgets" ) );
     actionEditLower->setWhatsThis( tr( "Lowers the selected widgets" ) );
     connect( actionEditLower, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLower() ) );
     actionEditLower->setEnabled( false );
 
     actionEditAccels = new TQAction( tr( "Check Accelerators" ), TQPixmap(),
-				    tr( "Chec&k Accelerators" ), ALT + Key_R, this, 0 );
+				    tr( "Chec&k Accelerators" ), ALT + Key_R, this, nullptr );
     actionEditAccels->setStatusTip( tr("Checks if the accelerators used in the form are unique") );
     actionEditAccels->setWhatsThis( whatsThisFrom( "Edit|Check Accelerator" ) );
     connect( actionEditAccels, TQ_SIGNAL( activated() ), this, TQ_SLOT( editAccels() ) );
     connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQ_SLOT( setEnabled(bool) ) );
 
     actionEditFunctions = new TQAction( tr( "Slots" ), createIconSet("designer_editslots.png"),
-				   tr( "S&lots..." ), 0, this, 0 );
+				   tr( "S&lots..." ), 0, this, nullptr );
     actionEditFunctions->setStatusTip( tr("Opens a dialog for editing slots") );
     actionEditFunctions->setWhatsThis( whatsThisFrom( "Edit|Slots" ) );
     connect( actionEditFunctions, TQ_SIGNAL( activated() ), this, TQ_SLOT( editFunctions() ) );
     connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQ_SLOT( setEnabled(bool) ) );
 
     actionEditConnections = new TQAction( tr( "Connections" ), createIconSet("designer_connecttool.png"),
-					 tr( "Co&nnections..." ), 0, this, 0 );
+					 tr( "Co&nnections..." ), 0, this, nullptr );
     actionEditConnections->setStatusTip( tr("Opens a dialog for editing connections") );
     actionEditConnections->setWhatsThis( whatsThisFrom( "Edit|Connections" ) );
     connect( actionEditConnections, TQ_SIGNAL( activated() ), this, TQ_SLOT( editConnections() ) );
     connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQ_SLOT( setEnabled(bool) ) );
 
     actionEditSource = new TQAction( tr( "Source" ), TQIconSet(),
-					 tr( "&Source..." ), CTRL + Key_E, this, 0 );
+					 tr( "&Source..." ), CTRL + Key_E, this, nullptr );
     actionEditSource->setStatusTip( tr("Opens an editor to edit the form's source code") );
     actionEditSource->setWhatsThis( whatsThisFrom( "Edit|Source" ) );
     connect( actionEditSource, TQ_SIGNAL( activated() ), this, TQ_SLOT( editSource() ) );
     connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQ_SLOT( setEnabled(bool) ) );
 
     actionEditFormSettings = new TQAction( tr( "Form Settings" ), TQPixmap(),
-					  tr( "&Form Settings..." ), 0, this, 0 );
+					  tr( "&Form Settings..." ), 0, this, nullptr );
     actionEditFormSettings->setStatusTip( tr("Opens a dialog to change the form's settings") );
     actionEditFormSettings->setWhatsThis( whatsThisFrom( "Edit|Form Settings" ) );
     connect( actionEditFormSettings, TQ_SIGNAL( activated() ), this, TQ_SLOT( editFormSettings() ) );
     connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQ_SLOT( setEnabled(bool) ) );
 
     actionEditPreferences = new TQAction( tr( "Preferences" ), TQPixmap(),
-					 tr( "Preferences..." ), 0, this, 0 );
+					 tr( "Preferences..." ), 0, this, nullptr );
     actionEditPreferences->setStatusTip( tr("Opens a dialog to change preferences") );
     actionEditPreferences->setWhatsThis( whatsThisFrom( "Edit|Preferences" ) );
     connect( actionEditPreferences, TQ_SIGNAL( activated() ), this, TQ_SLOT( editPreferences() ) );
@@ -269,25 +269,25 @@ void MainWindow::setupEditActions()
 void MainWindow::setupSearchActions()
 {
     actionSearchFind = new TQAction( tr( "Find" ), createIconSet( "designer_searchfind.png" ),
-				    tr( "&Find..." ), CTRL + Key_F, this, 0 );
+				    tr( "&Find..." ), CTRL + Key_F, this, nullptr );
     connect( actionSearchFind, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchFind() ) );
     actionSearchFind->setEnabled( false );
     actionSearchFind->setWhatsThis( whatsThisFrom( "Search|Find" ) );
 
     actionSearchIncremetal = new TQAction( tr( "Find Incremental" ), TQIconSet(),
-					  tr( "Find &Incremental" ), ALT + Key_I, this, 0 );
+					  tr( "Find &Incremental" ), ALT + Key_I, this, nullptr );
     connect( actionSearchIncremetal, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchIncremetalFindMenu() ) );
     actionSearchIncremetal->setEnabled( false );
     actionSearchIncremetal->setWhatsThis( whatsThisFrom( "Search|Find Incremental" ) );
 
     actionSearchReplace = new TQAction( tr( "Replace" ), TQIconSet(),
-				    tr( "&Replace..." ), CTRL + Key_R, this, 0 );
+				    tr( "&Replace..." ), CTRL + Key_R, this, nullptr );
     connect( actionSearchReplace, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchReplace() ) );
     actionSearchReplace->setEnabled( false );
     actionSearchReplace->setWhatsThis( whatsThisFrom( "Search|Replace" ) );
 
     actionSearchGotoLine = new TQAction( tr( "Goto Line" ), TQIconSet(),
-				    tr( "&Goto Line..." ), ALT + Key_G, this, 0 );
+				    tr( "&Goto Line..." ), ALT + Key_G, this, nullptr );
     connect( actionSearchGotoLine, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchGotoLine() ) );
     actionSearchGotoLine->setEnabled( false );
     actionSearchGotoLine->setWhatsThis( whatsThisFrom( "Search|Goto line" ) );
@@ -323,49 +323,49 @@ void MainWindow::setupLayoutActions()
     }
 
     actionEditAdjustSize = new TQAction( tr( "Adjust Size" ), createIconSet("designer_adjustsize.png"),
-					tr( "Adjust &Size" ), CTRL + Key_J, this, 0 );
+					tr( "Adjust &Size" ), CTRL + Key_J, this, nullptr );
     actionEditAdjustSize->setStatusTip(tr("Adjusts the size of the selected widget") );
     actionEditAdjustSize->setWhatsThis( whatsThisFrom( "Layout|Adjust Size" ) );
     connect( actionEditAdjustSize, TQ_SIGNAL( activated() ), this, TQ_SLOT( editAdjustSize() ) );
     actionEditAdjustSize->setEnabled( false );
 
     actionEditHLayout = new TQAction( tr( "Lay Out Horizontally" ), createIconSet("designer_edithlayout.png"),
-				     tr( "Lay Out &Horizontally" ), CTRL + Key_H, this, 0 );
+				     tr( "Lay Out &Horizontally" ), CTRL + Key_H, this, nullptr );
     actionEditHLayout->setStatusTip(tr("Lays out the selected widgets horizontally") );
     actionEditHLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally" ) );
     connect( actionEditHLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutHorizontal() ) );
     actionEditHLayout->setEnabled( false );
 
     actionEditVLayout = new TQAction( tr( "Lay Out Vertically" ), createIconSet("designer_editvlayout.png"),
-				     tr( "Lay Out &Vertically" ), CTRL + Key_L, this, 0 );
+				     tr( "Lay Out &Vertically" ), CTRL + Key_L, this, nullptr );
     actionEditVLayout->setStatusTip(tr("Lays out the selected widgets vertically") );
     actionEditVLayout->setWhatsThis(  whatsThisFrom( "Layout|Lay Out Vertically" ) );
     connect( actionEditVLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutVertical() ) );
     actionEditVLayout->setEnabled( false );
 
     actionEditGridLayout = new TQAction( tr( "Lay Out in a Grid" ), createIconSet("designer_editgrid.png"),
-					tr( "Lay Out in a &Grid" ), CTRL + Key_G, this, 0 );
+					tr( "Lay Out in a &Grid" ), CTRL + Key_G, this, nullptr );
     actionEditGridLayout->setStatusTip(tr("Lays out the selected widgets in a grid") );
     actionEditGridLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out in a Grid" ) );
     connect( actionEditGridLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutGrid() ) );
     actionEditGridLayout->setEnabled( false );
 
     actionEditSplitHorizontal = new TQAction( tr( "Lay Out Horizontally (in Splitter)" ), createIconSet("designer_editvlayoutsplit.png"),
-					     tr( "Lay Out Horizontally (in S&plitter)" ), 0, this, 0 );
+					     tr( "Lay Out Horizontally (in S&plitter)" ), 0, this, nullptr );
     actionEditSplitHorizontal->setStatusTip(tr("Lays out the selected widgets horizontally in a splitter") );
     actionEditSplitHorizontal->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally (in Splitter)" ) );
     connect( actionEditSplitHorizontal, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutHorizontalSplit() ) );
     actionEditSplitHorizontal->setEnabled( false );
 
     actionEditSplitVertical = new TQAction( tr( "Lay Out Vertically (in Splitter)" ), createIconSet("designer_edithlayoutsplit.png"),
-					     tr( "Lay Out Vertically (in Sp&litter)" ), 0, this, 0 );
+					     tr( "Lay Out Vertically (in Sp&litter)" ), 0, this, nullptr );
     actionEditSplitVertical->setStatusTip(tr("Lays out the selected widgets vertically in a splitter") );
     actionEditSplitVertical->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically (in Splitter)" ) );
     connect( actionEditSplitVertical, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutVerticalSplit() ) );
     actionEditSplitVertical->setEnabled( false );
 
     actionEditBreakLayout = new TQAction( tr( "Break Layout" ), createIconSet("designer_editbreaklayout.png"),
-					 tr( "&Break Layout" ), CTRL + Key_B, this, 0 );
+					 tr( "&Break Layout" ), CTRL + Key_B, this, nullptr );
     actionEditBreakLayout->setStatusTip(tr("Breaks the selected layout") );
     actionEditBreakLayout->setWhatsThis( whatsThisFrom( "Layout|Break Layout" ) );
     connect( actionEditBreakLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editBreakLayout() ) );
@@ -481,12 +481,12 @@ void MainWindow::setupToolActions()
     actionBuddyTool->addTo( mmenu );
     mmenu->insertSeparator();
 
-    customWidgetToolBar = 0;
-    customWidgetMenu = 0;
+    customWidgetToolBar = nullptr;
+    customWidgetMenu = nullptr;
 
     actionToolsCustomWidget = new TQAction( tr("Custom Widgets"),
 					   createIconSet( "designer_customwidget.png" ),
-					   tr("Edit &Custom Widgets..."), 0, this, 0 );
+					   tr("Edit &Custom Widgets..."), 0, this, nullptr );
     actionToolsCustomWidget->setStatusTip( tr("Opens a dialog to add and change "
 					      "custom widgets") );
     actionToolsCustomWidget->setWhatsThis( whatsThisFrom( "Tools|Custom|Edit Custom"
@@ -517,7 +517,7 @@ void MainWindow::setupToolActions()
 	TQPopupMenu *menu = new TQPopupMenu( this, grp.latin1() );
 	mmenu->insertItem( grp, menu );
 
-	TQToolBar *tb2 = new TQToolBar( grp, 0, toolBox, false, grp.latin1() );
+	TQToolBar *tb2 = new TQToolBar( grp, nullptr, toolBox, false, grp.latin1() );
 	tb2->setFrameStyle( TQFrame::NoFrame );
 	tb2->setOrientation( TQt::Vertical );
 	tb2->setBackgroundMode( PaletteBase );
@@ -592,7 +592,7 @@ void MainWindow::setupToolActions()
 	customWidgetToolBar->hide();
 	actionToolsCustomWidget->addTo( customWidgetMenu );
 	customWidgetMenu->insertSeparator();
-	TQToolBar *tb2 = new TQToolBar( "Custom Widgets", 0,
+	TQToolBar *tb2 = new TQToolBar( "Custom Widgets", nullptr,
 				      toolBox, false, "Custom Widgets" );
 	tb2->setBackgroundMode(PaletteBase);
 	tb2->setOrientation( TQt::Vertical );
@@ -621,10 +621,10 @@ void MainWindow::setupFileActions()
     fileMenu = new TQPopupMenu( this, "File" );
     menubar->insertItem( tr( "&File" ), fileMenu );
 
-    TQAction *a = 0;
+    TQAction *a = nullptr;
 
     if ( !singleProject ) {
-	a = new TQAction( this, 0 );
+	a = new TQAction( this, nullptr );
 	a->setText( tr( "New" ) );
 	a->setToolTip( tr( "New Dialog or File" ) );
 	a->setMenuText( tr( "&New..." ) );
@@ -636,7 +636,7 @@ void MainWindow::setupFileActions()
 	a->addTo( tb );
 	a->addTo( fileMenu );
     } else {
-	actionGroupNew = new TQActionGroup( this, 0, false );
+	actionGroupNew = new TQActionGroup( this, nullptr, false );
 	 a = actionGroupNew;
 	( (TQActionGroup*)a )->setUsesDropDown( true );
 	a->setText( tr( "New" ) );
@@ -645,7 +645,7 @@ void MainWindow::setupFileActions()
 	a->setStatusTip( tr( "Creates a new dialog or file" ) );
 	a->setWhatsThis( whatsThisFrom( "File|New" ) );
 
-	TQAction *newForm = new TQAction( a, 0 );
+	TQAction *newForm = new TQAction( a, nullptr );
 	newForm->setText( tr( "New Dialog" ) );
 	newForm->setMenuText( tr( "&Dialog..." ) );
 	newForm->setIconSet( createIconSet("designer_form.png") );
@@ -653,7 +653,7 @@ void MainWindow::setupFileActions()
 	newForm->setStatusTip( tr( "Creates a new dialog." ) );
 	connect( newForm, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileNewDialog() ) );
 
-	TQAction *newFile = new TQAction( a, 0 );
+	TQAction *newFile = new TQAction( a, nullptr );
 	newFile->setText( tr( "New File" ) );
 	newFile->setMenuText( tr( "&File..." ) );
 	newFile->setIconSet( createIconSet("designer_filenew.png") );
@@ -668,7 +668,7 @@ void MainWindow::setupFileActions()
 	fileMenu->insertSeparator();
     }
 
-    a = new TQAction( this, 0 );
+    a = new TQAction( this, nullptr );
     a->setText( tr( "Open" ) );
     a->setMenuText( tr( "&Open..." ) );
     a->setIconSet( createIconSet("designer_fileopen.png") );
@@ -683,7 +683,7 @@ void MainWindow::setupFileActions()
     }
 
 
-    a = new TQAction( this, 0 );
+    a = new TQAction( this, nullptr );
     a->setText( tr( "Close" ) );
     a->setMenuText( tr( "&Close" ) );
     a->setStatusTip( tr( "Closes the current project or document" ) );
@@ -695,7 +695,7 @@ void MainWindow::setupFileActions()
 	fileMenu->insertSeparator();
     }
 
-    a = new TQAction( this, 0 );
+    a = new TQAction( this, nullptr );
     actionFileSave = a;
     a->setText( tr( "Save" ) );
     a->setMenuText( tr( "&Save" ) );
@@ -708,7 +708,7 @@ void MainWindow::setupFileActions()
     a->addTo( tb );
     a->addTo( fileMenu );
 
-    a = new TQAction( this, 0 );
+    a = new TQAction( this, nullptr );
     a->setText( tr( "Save As" ) );
     a->setMenuText( tr( "Save &As..." ) );
     a->setStatusTip( tr( "Saves the current form with a new filename" ) );
@@ -718,7 +718,7 @@ void MainWindow::setupFileActions()
     if ( !singleProject )
 	a->addTo( fileMenu );
 
-    a = new TQAction( this, 0 );
+    a = new TQAction( this, nullptr );
     a->setText( tr( "Save All" ) );
     a->setMenuText( tr( "Sa&ve All" ) );
     a->setStatusTip( tr( "Saves all open documents" ) );
@@ -730,7 +730,7 @@ void MainWindow::setupFileActions()
 	fileMenu->insertSeparator();
     }
 
-    a = new TQAction( this, 0 );
+    a = new TQAction( this, nullptr );
     a->setText( tr( "Create Template" ) );
     a->setMenuText( tr( "Create &Template..." ) );
     a->setStatusTip( tr( "Creates a new template" ) );
@@ -762,7 +762,7 @@ void MainWindow::setupFileActions()
     if ( !singleProject )
 	fileMenu->insertSeparator();
 
-    a = new TQAction( this, 0 );
+    a = new TQAction( this, nullptr );
     actionFileExit = a;
     a->setAccel(CTRL + Key_Q);
     if  ( !singleProjectMode() ) {
@@ -783,14 +783,14 @@ void MainWindow::setupProjectActions()
     projectMenu = new TQPopupMenu( this, "Project" );
     menubar->insertItem( tr( "Pr&oject" ), projectMenu );
 
-    TQActionGroup *ag = new TQActionGroup( this, 0 );
+    TQActionGroup *ag = new TQActionGroup( this, nullptr );
     ag->setText( tr( "Active Project" ) );
     ag->setMenuText( tr( "Active Project" ) );
     ag->setExclusive( true );
     ag->setUsesDropDown( true );
     connect( ag, TQ_SIGNAL( selected( TQAction * ) ), this, TQ_SLOT( projectSelected( TQAction * ) ) );
     connect( ag, TQ_SIGNAL( selected( TQAction * ) ), this, TQ_SIGNAL( projectChanged() ) );
-    TQAction *a = new TQAction( tr( "<No Project>" ), tr( "<No Project>" ), 0, ag, 0, true );
+    TQAction *a = new TQAction( tr( "<No Project>" ), tr( "<No Project>" ), 0, ag, nullptr, true );
     eProject = new Project( "", tr( "<No Project>" ), projectSettingsPluginManager, true );
     projects.insert( a, eProject );
     a->setOn( true );
@@ -801,7 +801,7 @@ void MainWindow::setupProjectActions()
     if ( !singleProject )
 	projectMenu->insertSeparator();
 
-    a = new TQAction( tr( "Add File" ), TQPixmap(), tr( "&Add File..." ), 0, this, 0 );
+    a = new TQAction( tr( "Add File" ), TQPixmap(), tr( "&Add File..." ), 0, this, nullptr );
     a->setStatusTip( tr("Adds a file to the current project") );
     a->setWhatsThis( whatsThisFrom( "Project|Add File" ) );
     connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( projectInsertFile() ) );
@@ -811,7 +811,7 @@ void MainWindow::setupProjectActions()
 	a->addTo( projectMenu );
 
     TQAction* actionEditPixmapCollection = new TQAction( tr( "Image Collection..." ), TQPixmap(),
-					  tr( "&Image Collection..." ), 0, this, 0 );
+					  tr( "&Image Collection..." ), 0, this, nullptr );
     actionEditPixmapCollection->setStatusTip( tr("Opens a dialog for editing the current project's image collection") );
     actionEditPixmapCollection->setWhatsThis( whatsThisFrom( "Project|Image Collection" ) );
     connect( actionEditPixmapCollection, TQ_SIGNAL( activated() ), this, TQ_SLOT( editPixmapCollection() ) );
@@ -821,7 +821,7 @@ void MainWindow::setupProjectActions()
 
 #ifndef TQT_NO_SQL
     TQAction* actionEditDatabaseConnections = new TQAction( tr( "Database Connections..." ), TQPixmap(),
-						 tr( "&Database Connections..." ), 0, this, 0 );
+						 tr( "&Database Connections..." ), 0, this, nullptr );
     actionEditDatabaseConnections->setStatusTip( tr("Opens a dialog for editing the current project's database connections") );
     actionEditDatabaseConnections->setWhatsThis( whatsThisFrom( "Project|Database Connections" ) );
     connect( actionEditDatabaseConnections, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDatabaseConnections() ) );
@@ -832,7 +832,7 @@ void MainWindow::setupProjectActions()
 #endif
 
     TQAction* actionEditProjectSettings = new TQAction( tr( "Project Settings..." ), TQPixmap(),
-					  tr( "&Project Settings..." ), 0, this, 0 );
+					  tr( "&Project Settings..." ), 0, this, nullptr );
     actionEditProjectSettings->setStatusTip( tr("Opens a dialog to change the project's settings") );
     actionEditProjectSettings->setWhatsThis( whatsThisFrom( "Project|Project Settings" ) );
     connect( actionEditProjectSettings, TQ_SIGNAL( activated() ), this, TQ_SLOT( editProjectSettings() ) );
@@ -844,12 +844,12 @@ void MainWindow::setupProjectActions()
 
 void MainWindow::setupPreviewActions()
 {
-    TQAction* a = 0;
+    TQAction* a = nullptr;
     TQPopupMenu *menu = new TQPopupMenu( this, "Preview" );
     layoutMenu = menu;
     menubar->insertItem( tr( "&Preview" ), menu, toolsMenuId + 2 );
 
-    a = new TQAction( tr( "Preview Form" ), TQPixmap(), tr( "Preview &Form" ), 0, this, 0 );
+    a = new TQAction( tr( "Preview Form" ), TQPixmap(), tr( "Preview &Form" ), 0, this, nullptr );
     a->setAccel( CTRL + Key_T );
     a->setStatusTip( tr("Opens a preview") );
     a->setWhatsThis( whatsThisFrom( "Preview|Preview Form" ) );
@@ -878,7 +878,7 @@ void MainWindow::setupPreviewActions()
 	    info = tr( "The preview will use the advanced Motif look and feel used by the GIMP toolkit (GTK) on Linux." );
 
 	a = new TQAction( tr( "Preview Form in %1 Style" ).arg( *it ), TQPixmap(),
-					 tr( "... in %1 Style" ).arg( *it ), 0, this, 0 );
+					 tr( "... in %1 Style" ).arg( *it ), 0, this, nullptr );
 	a->setStatusTip( tr("Opens a preview in %1 style").arg( *it ) );
 	a->setWhatsThis( tr("<b>Open a preview in %1 style.</b>"
 			"<p>Use the preview to test the design and "
@@ -973,28 +973,28 @@ void MainWindow::setupWindowActions()
 
 void MainWindow::setupHelpActions()
 {
-    actionHelpContents = new TQAction( tr( "Contents" ), tr( "&Contents" ), Key_F1, this, 0 );
+    actionHelpContents = new TQAction( tr( "Contents" ), tr( "&Contents" ), Key_F1, this, nullptr );
     actionHelpContents->setStatusTip( tr("Opens the online help") );
     actionHelpContents->setWhatsThis( whatsThisFrom( "Help|Contents" ) );
     connect( actionHelpContents, TQ_SIGNAL( activated() ), this, TQ_SLOT( helpContents() ) );
 
-    actionHelpManual = new TQAction( tr( "Manual" ), tr( "&Manual" ), CTRL + Key_M, this, 0 );
+    actionHelpManual = new TQAction( tr( "Manual" ), tr( "&Manual" ), CTRL + Key_M, this, nullptr );
     actionHelpManual->setStatusTip( tr("Opens the TQt Designer manual") );
     actionHelpManual->setWhatsThis( whatsThisFrom( "Help|Manual" ) );
     connect( actionHelpManual, TQ_SIGNAL( activated() ), this, TQ_SLOT( helpManual() ) );
 
-    actionHelpAbout = new TQAction( tr("About"), TQPixmap(), tr("&About"), 0, this, 0 );
+    actionHelpAbout = new TQAction( tr("About"), TQPixmap(), tr("&About"), 0, this, nullptr );
     actionHelpAbout->setStatusTip( tr("Displays information about TQt Designer") );
     actionHelpAbout->setWhatsThis( whatsThisFrom( "Help|About" ) );
     connect( actionHelpAbout, TQ_SIGNAL( activated() ), this, TQ_SLOT( helpAbout() ) );
 
-    actionHelpAboutTQt = new TQAction( tr("About TQt"), TQPixmap(), tr("About &TQt"), 0, this, 0 );
+    actionHelpAboutTQt = new TQAction( tr("About TQt"), TQPixmap(), tr("About &TQt"), 0, this, nullptr );
     actionHelpAboutTQt->setStatusTip( tr("Displays information about the TQt Toolkit") );
     actionHelpAboutTQt->setWhatsThis( whatsThisFrom( "Help|About TQt" ) );
     connect( actionHelpAboutTQt, TQ_SIGNAL( activated() ), this, TQ_SLOT( helpAboutTQt() ) );
 
     actionHelpWhatsThis = new TQAction( tr("What's This?"), TQIconSet( whatsthis_image, whatsthis_image ),
-				       tr("What's This?"), SHIFT + Key_F1, this, 0 );
+				       tr("What's This?"), SHIFT + Key_F1, this, nullptr );
     actionHelpWhatsThis->setStatusTip( tr("\"What's This?\" context sensitive help") );
     actionHelpWhatsThis->setWhatsThis( whatsThisFrom( "Help|What's This?" ) );
     connect( actionHelpWhatsThis, TQ_SIGNAL( activated() ), this, TQ_SLOT( whatsThis() ) );
@@ -1031,7 +1031,7 @@ void MainWindow::fileNewDialog()
     TQString n = "Dialog" + TQString::number( ++forms );
     while ( currentProject->findFormFile( n + ".ui" ) )
 	n = "Dialog" + TQString::number( ++forms );
-    FormWindow *fw = 0;
+    FormWindow *fw = nullptr;
     FormFile *ff = new FormFile( n + ".ui", false, currentProject );
     fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n );
     ff->setModified( true );
@@ -1093,8 +1093,8 @@ void MainWindow::fileCloseProject()
     if ( currentProject->isDummy() )
 	return;
     Project *pro = currentProject;
-    TQAction* a = 0;
-    TQAction* lastValid = 0;
+    TQAction* a = nullptr;
+    TQAction* lastValid = nullptr;
     for ( TQMap<TQAction*, Project* >::Iterator it = projects.begin(); it != projects.end(); ++it ) {
 	if ( it.data() == pro ) {
 	    a = it.key();
@@ -1144,7 +1144,7 @@ void MainWindow::fileCloseProject()
 	actionGroupProjects->removeChild( a );
 	projects.remove( a );
 	delete a;
-	currentProject = 0;
+	currentProject = nullptr;
 	if ( lastValid ) {
 	    projectSelected( lastValid );
 	    statusBar()->message( "Selected project '" + tr( currentProject->projectName() + "'") );
@@ -1211,11 +1211,11 @@ TQ_EXPORT void MainWindow::fileOpen( const TQString &filter, const TQString &ext
 	TQStringList filenames;
 	if ( fn.isEmpty() ) {
 	    if ( !inProject ) {
-		TQString f = TQFileDialog::getOpenFileName( TQString::null, filters, this, 0,
+		TQString f = TQFileDialog::getOpenFileName( TQString::null, filters, this, nullptr,
 							  tr("Open" ), &lastOpenFilter );
 		filenames << f;
 	    } else {
-		filenames = TQFileDialog::getOpenFileNames( filters, TQString::null, this, 0,
+		filenames = TQFileDialog::getOpenFileNames( filters, TQString::null, this, nullptr,
 							   tr("Add"), &lastOpenFilter );
 	    }
 	} else {
@@ -1250,7 +1250,7 @@ TQ_EXPORT void MainWindow::fileOpen( const TQString &filter, const TQString &ext
 			}
 		    }
 
-		    ImportFilterInterface* iface = 0;
+		    ImportFilterInterface* iface = nullptr;
 		    manager.queryInterface( filter, &iface );
 		    if ( !iface ) {
 			statusBar()->message( tr( "No import filter is available to import '%1'").
@@ -1281,7 +1281,7 @@ TQ_EXPORT void MainWindow::fileOpen( const TQString &filter, const TQString &ext
 TQ_EXPORT FormWindow *MainWindow::openFormWindow( const TQString &filename, bool validFileName, FormFile *ff )
 {
     if ( filename.isEmpty() )
-	return 0;
+	return nullptr;
 
     bool makeNew = false;
 
@@ -1344,7 +1344,7 @@ bool MainWindow::fileSaveForm()
 	}
     }
 
-    FormWindow *fw = 0;
+    FormWindow *fw = nullptr;
 
     TQWidget *w = qWorkspace()->activeWindow();
     if ( w ) {
@@ -1396,7 +1396,7 @@ void MainWindow::fileSaveAll()
 
 void MainWindow::fileCreateTemplate()
 {
-    CreateTemplate dia( this, 0, true );
+    CreateTemplate dia( this, nullptr, true );
 
     int i = 0;
     for ( i = 0; i < WidgetDatabase::count(); ++i ) {
@@ -1543,7 +1543,7 @@ void MainWindow::editPaste()
 
     if ( w && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) {
 	formWindow()->paste( tqApp->clipboard()->text(), WidgetFactory::containerOfWidget( w ) );
-	hierarchyView->widgetInserted( 0 );
+	hierarchyView->widgetInserted( nullptr );
 	formWindow()->commandHistory()->setModified( true );
     } else {
 	TQMessageBox::information( this, tr( "Paste error" ),
@@ -1729,24 +1729,24 @@ void MainWindow::editConnections()
 SourceEditor *MainWindow::editSource()
 {
     if ( !formWindow() )
-	return 0;
+	return nullptr;
     return formWindow()->formFile()->showEditor();
 }
 
 SourceEditor *MainWindow::openSourceEditor()
 {
     if ( !formWindow() )
-	return 0;
+	return nullptr;
     
     TQString lang = currentProject->language();
     if ( !MetaDataBase::hasEditor( lang ) ) {
 	TQMessageBox::information( this, tr( "Edit Source" ),
 				  tr( "There is no plugin for editing " + lang + " code installed!\n"
 				      "Note: Plugins are not available in static TQt configurations." ) );
-	return 0;
+	return nullptr;
     }
 
-    SourceEditor *editor = 0;
+    SourceEditor *editor = nullptr;
     for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) {
 	if ( e->language() == lang && e->formWindow() == formWindow() ) {
 	    editor = e;
@@ -1766,10 +1766,10 @@ SourceEditor *MainWindow::editSource( SourceFile *f )
 	TQMessageBox::information( this, tr( "Edit Source" ),
 				  tr( "There is no plugin for editing " + lang + " code installed!\n"
 				      "Note: Plugins are not available in static TQt configurations." ) );
-	return 0;
+	return nullptr;
     }
 
-    SourceEditor *editor = 0;
+    SourceEditor *editor = nullptr;
     if ( f )
 	editor = f->editor();
     if ( !editor )
@@ -1783,14 +1783,14 @@ SourceEditor *MainWindow::createSourceEditor( TQObject *object, Project *project
 					      const TQString &lang, const TQString &func,
 					      bool rereadSource )
 {
-    SourceEditor *editor = 0;
-    EditorInterface *eIface = 0;
+    SourceEditor *editor = nullptr;
+    EditorInterface *eIface = nullptr;
     editorPluginManager->queryInterface( lang, &eIface );
     if ( !eIface )
-	return 0;
+	return nullptr;
     LanguageInterface *lIface = MetaDataBase::languageInterface( lang );
     if ( !lIface )
-	return 0;
+	return nullptr;
     TQApplication::setOverrideCursor( WaitCursor );
     editor = new SourceEditor( qWorkspace(), eIface, lIface );
     eIface->release();
@@ -1833,7 +1833,7 @@ void MainWindow::editProjectSettings()
 
 void MainWindow::editPixmapCollection()
 {
-    PixmapCollectionEditor dia( this, 0, true );
+    PixmapCollectionEditor dia( this, nullptr, true );
     dia.setProject( currentProject );
     dia.exec();
 }
@@ -1841,7 +1841,7 @@ void MainWindow::editPixmapCollection()
 void MainWindow::editDatabaseConnections()
 {
 #ifndef TQT_NO_SQL
-    DatabaseConnectionsEditor dia( currentProject, this, 0, true );
+    DatabaseConnectionsEditor dia( currentProject, this, nullptr, true );
     dia.exec();
 #endif
 }
@@ -1849,7 +1849,7 @@ void MainWindow::editDatabaseConnections()
 void MainWindow::editPreferences()
 {
     statusBar()->message( tr( "Edit preferences..." ) );
-    Preferences *dia = new Preferences( this, 0, true );
+    Preferences *dia = new Preferences( this, nullptr, true );
     prefDia = dia;
     connect( dia->helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
     dia->buttonColor->setEditor( StyledButton::ColorEditor );
@@ -1928,14 +1928,14 @@ void MainWindow::editPreferences()
     for ( it = preferenceTabs.begin(); it != preferenceTabs.end(); ++it ) {
 	Tab t = *it;
 	dia->tabWidget->removePage( t.w );
-	t.w->reparent( 0, TQPoint(0,0), false );
+	t.w->reparent( nullptr, TQPoint(0,0), false );
     }
 
     for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() )
 	e->configChanged();
 
     delete dia;
-    prefDia = 0;
+    prefDia = nullptr;
     statusBar()->clear();
 }
 
@@ -1946,7 +1946,7 @@ void MainWindow::searchFind()
 	 return;
 
     if ( !findDialog )
-	findDialog = new FindDialog( this, 0, false );
+	findDialog = new FindDialog( this, nullptr, false );
     findDialog->show();
     findDialog->raise();
     findDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface(),
@@ -1988,7 +1988,7 @@ void MainWindow::searchReplace()
 	 return;
 
     if ( !replaceDialog )
-	replaceDialog = new ReplaceDialog( this, 0, false );
+	replaceDialog = new ReplaceDialog( this, nullptr, false );
     replaceDialog->show();
     replaceDialog->raise();
     replaceDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface(),
@@ -2004,7 +2004,7 @@ void MainWindow::searchGotoLine()
 	 return;
 
     if ( !gotoLineDialog )
-	gotoLineDialog = new GotoLineDialog( this, 0, false );
+	gotoLineDialog = new GotoLineDialog( this, nullptr, false );
     gotoLineDialog->show();
     gotoLineDialog->raise();
     gotoLineDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface() );
diff --git a/tools/designer/designer/menubareditor.cpp b/tools/designer/designer/menubareditor.cpp
index bff61987f..b9262c604 100644
--- a/tools/designer/designer/menubareditor.cpp
+++ b/tools/designer/designer/menubareditor.cpp
@@ -52,8 +52,8 @@ class MenuBarEditorItemPtrDrag : public TQStoredDrag
 {
 public:
     MenuBarEditorItemPtrDrag( MenuBarEditorItem * item,
-			      TQWidget * parent = 0,
-			      const char * name = 0 );
+			      TQWidget * parent = nullptr,
+			      const char * name = nullptr );
     ~MenuBarEditorItemPtrDrag() {};
     static bool canDecode( TQDragMoveEvent * e );
     static bool decode( TQDropEvent * e, MenuBarEditorItem ** i );
@@ -97,7 +97,7 @@ bool MenuBarEditorItemPtrDrag::decode( TQDropEvent * e, MenuBarEditorItem ** i )
 MenuBarEditorItem::MenuBarEditorItem( MenuBarEditor * bar, TQObject * parent, const char * name )
     : TQObject( parent, name ),
       menuBar( bar ),
-      popupMenu( 0 ),
+      popupMenu( nullptr ),
       visible( true ),
       separator( false ),
       removable( false )
@@ -119,7 +119,7 @@ MenuBarEditorItem::MenuBarEditorItem( TQActionGroup * actionGroup, MenuBarEditor
 				      TQObject * parent, const char * name )
     : TQObject( parent, name ),
       menuBar( bar ),
-      popupMenu( 0 ),
+      popupMenu( nullptr ),
       visible( true ),
       separator( false ),
       removable( true )
@@ -132,7 +132,7 @@ MenuBarEditorItem::MenuBarEditorItem( TQActionGroup * actionGroup, MenuBarEditor
 MenuBarEditorItem::MenuBarEditorItem( MenuBarEditorItem * item, TQObject * parent, const char * name )
     : TQObject( parent, name ),
       menuBar( item->menuBar ),
-      popupMenu( 0 ),
+      popupMenu( nullptr ),
       text( item->text ),
       visible( item->visible ),
       separator( item->separator ),
@@ -144,12 +144,12 @@ MenuBarEditorItem::MenuBarEditorItem( MenuBarEditorItem * item, TQObject * paren
 // MenuBarEditor --------------------------------------------------------
 
 int MenuBarEditor::clipboardOperation = 0;
-MenuBarEditorItem * MenuBarEditor::clipboardItem = 0;
+MenuBarEditorItem * MenuBarEditor::clipboardItem = nullptr;
 
 MenuBarEditor::MenuBarEditor( FormWindow * fw, TQWidget * parent, const char * name )
     : TQMenuBar( parent, name ),
       formWnd( fw ),
-      draggedItem( 0 ),
+      draggedItem( nullptr ),
       currentIndex( 0 ),
       itemHeight( 0 ),
       separatorWidth( 32 ),
@@ -379,7 +379,7 @@ void MenuBarEditor::cut( int index )
 
     if ( clipboardItem == &addItem || clipboardItem == &addSeparator ) {
 	clipboardOperation = None;
-	clipboardItem = 0;
+	clipboardItem = nullptr;
 	return; // do nothing
     }
 
@@ -398,7 +398,7 @@ void MenuBarEditor::copy( int index )
 
     if ( clipboardItem == &addItem || clipboardItem == &addSeparator ) {
 	clipboardOperation = None;
-	clipboardItem = 0;
+	clipboardItem = nullptr;
     }
 }
 
@@ -429,7 +429,7 @@ void MenuBarEditor::showLineEdit( int index )
     if ( index == -1 )
 	index = currentIndex;
 
-    MenuBarEditorItem * i = 0;
+    MenuBarEditorItem * i = nullptr;
 
     if ( (uint) index >= itemList.count() )
 	i = &addItem;
@@ -661,7 +661,7 @@ void MenuBarEditor::mouseMoveEvent( TQMouseEvent * e )
 		} else {
 		    hideItem();
 		    draggedItem->setVisible( true );
-		    draggedItem = 0;
+		    draggedItem = nullptr;
 		    showItem();
 		}
 	    } else if ( dropConfirmed ) { // item was dropped
@@ -707,10 +707,10 @@ void MenuBarEditor::dragMoveEvent( TQDragMoveEvent * e )
 
 void MenuBarEditor::dropEvent( TQDropEvent * e )
 {
-    MenuBarEditorItem * i = 0;
+    MenuBarEditorItem * i = nullptr;
 
     if ( MenuBarEditorItemPtrDrag::decode( e, &i ) ) {
-	draggedItem = 0;
+	draggedItem = nullptr;
 	hideItem();
 	dropInPlace( i, e->pos() );
 	e->accept();
@@ -1008,7 +1008,7 @@ void MenuBarEditor::dropInPlace( MenuBarEditorItem * i, const TQPoint & pos )
     }
 
     hideItem();
-    Command * cmd = 0;
+    Command * cmd = nullptr;
     int iidx = itemList.findRef( i );
     if ( iidx != -1 ) { // internal dnd
 	cmd = new MoveMenuCommand( "Item Dragged", formWnd, this, iidx, idx );
@@ -1099,7 +1099,7 @@ void MenuBarEditor::enterEditMode()
 
 void MenuBarEditor::leaveEditMode()
 {
-    MenuBarEditorItem * i = 0;
+    MenuBarEditorItem * i = nullptr;
     if ( currentIndex >= (int)itemList.count() ) {
 	i = createItem();
 	// do not put rename on cmd stack
diff --git a/tools/designer/designer/menubareditor.h b/tools/designer/designer/menubareditor.h
index 544ea1168..a6165d3d6 100644
--- a/tools/designer/designer/menubareditor.h
+++ b/tools/designer/designer/menubareditor.h
@@ -47,15 +47,15 @@ class MenuBarEditorItem : public TQObject
 
     friend class MenuBarEditor;
 
-    MenuBarEditorItem( MenuBarEditor * bar = 0, TQObject * parent = 0, const char * name = 0 );
+    MenuBarEditorItem( MenuBarEditor * bar = nullptr, TQObject * parent = nullptr, const char * name = nullptr );
     
 public:
     MenuBarEditorItem( PopupMenuEditor * menu, MenuBarEditor * bar,
-		       TQObject * parent = 0, const char * name = 0);
+		       TQObject * parent = nullptr, const char * name = nullptr);
     MenuBarEditorItem( TQActionGroup * actionGroup, MenuBarEditor * bar,
-		       TQObject * parent = 0, const char * name = 0);
+		       TQObject * parent = nullptr, const char * name = nullptr);
     MenuBarEditorItem( MenuBarEditorItem * item,
-		       TQObject * parent = 0, const char * name = 0);
+		       TQObject * parent = nullptr, const char * name = nullptr);
     ~MenuBarEditorItem() { };
 
     PopupMenuEditor * menu() { return popupMenu; }
@@ -90,7 +90,7 @@ class MenuBarEditor : public TQMenuBar
     TQ_OBJECT
     
 public:
-    MenuBarEditor( FormWindow * fw, TQWidget * parent = 0, const char * name = 0 );
+    MenuBarEditor( FormWindow * fw, TQWidget * parent = nullptr, const char * name = nullptr );
     ~MenuBarEditor();
 
     FormWindow * formWindow();
diff --git a/tools/designer/designer/metadatabase.cpp b/tools/designer/designer/metadatabase.cpp
index 3e05ed76a..0a6b77b43 100644
--- a/tools/designer/designer/metadatabase.cpp
+++ b/tools/designer/designer/metadatabase.cpp
@@ -84,12 +84,12 @@ public:
     TQString exportMacro;
 };
 
-static TQPtrDict<MetaDataBaseRecord> *db = 0;
-static TQPtrList<MetaDataBase::CustomWidget> *cWidgets = 0;
+static TQPtrDict<MetaDataBaseRecord> *db = nullptr;
+static TQPtrList<MetaDataBase::CustomWidget> *cWidgets = nullptr;
 static bool doUpdate = true;
 static TQStringList langList;
 static TQStringList editorLangList;
-static TQPluginManager<LanguageInterface> *languageInterfaceManager = 0;
+static TQPluginManager<LanguageInterface> *languageInterfaceManager = nullptr;
 
 /*!
   \class MetaDataBase metadatabase.h
@@ -117,9 +117,9 @@ inline void setupDataBase()
 void MetaDataBase::clearDataBase()
 {
     delete db;
-    db = 0;
+    db = nullptr;
     delete cWidgets;
-    cWidgets = 0;
+    cWidgets = nullptr;
 }
 
 void MetaDataBase::addEntry( TQObject *o )
@@ -286,7 +286,7 @@ TQStringVariantMap* MetaDataBase::fakeProperties( TQObject* o )
     if ( !r ) {
 	tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
 		  o, o->name(), o->className() );
-	return 0;
+	return nullptr;
     }
     return &r->fakeProperties;
 }
@@ -304,7 +304,7 @@ void MetaDataBase::setSpacing( TQObject *o, int spacing )
     }
 
     r->spacing = spacing;
-    TQLayout * layout = 0;
+    TQLayout * layout = nullptr;
     WidgetFactory::layoutType( (TQWidget*)o, layout );
     if ( layout ) {
 	int spadef = 6;
@@ -347,7 +347,7 @@ void MetaDataBase::setMargin( TQObject *o, int margin )
     }
 
     r->margin = margin;
-    TQLayout * layout = 0;
+    TQLayout * layout = nullptr;
     WidgetFactory::layoutType( (TQWidget*)o, layout );
 
     bool isInnerLayout = true;
@@ -446,7 +446,7 @@ void MetaDataBase::addConnection( TQObject *o, TQObject *sender, const TQCString
 	TQString sen = sender->name();
 	if ( ::tqt_cast<FormWindow*>(o) && sender == ( (FormWindow*)o )->mainContainer() )
 	    sen = "this";
-	FormFile *ff = 0;
+	FormFile *ff = nullptr;
 	if ( ::tqt_cast<FormFile*>(o) )
 	    ff = (FormFile*)o;
 	else if ( ::tqt_cast<FormWindow*>(o) )
@@ -508,7 +508,7 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte
 	TQString senderName = (*cit).sender;
 	if ( senderName.find( '.' ) != -1 )
 	    senderName = senderName.mid( senderName.findRev( '.' ) + 1 );
-	TQObject *sender = 0;
+	TQObject *sender = nullptr;
 	if ( formfile->formWindow() )
 	    sender = formfile->formWindow()->child( senderName );
 	if ( !sender && formfile->isFake() )
@@ -621,15 +621,15 @@ void MetaDataBase::doConnections( TQObject *o )
 	return;
     }
 
-    TQObject *sender = 0, *receiver = 0;
-    TQObjectList *l = 0;
+    TQObject *sender = nullptr, *receiver = nullptr;
+    TQObjectList *l = nullptr;
     TQValueList<Connection>::Iterator it = r->connections.begin();
     for ( ; it != r->connections.end(); ++it ) {
 	Connection conn = *it;
 	if ( qstrcmp( conn.sender->name(), o->name() ) == 0 ) {
 	    sender = o;
 	} else {
-	    l = o->queryList( 0, conn.sender->name(), false );
+	    l = o->queryList( nullptr, conn.sender->name(), false );
 	    if ( !l || !l->first() ) {
 		delete l;
 		continue;
@@ -640,7 +640,7 @@ void MetaDataBase::doConnections( TQObject *o )
 	if ( qstrcmp( conn.receiver->name(), o->name() ) == 0 ) {
 	    receiver = o;
 	} else {
-	    l = o->queryList( 0, conn.receiver->name(), false );
+	    l = o->queryList( nullptr, conn.receiver->name(), false );
 	    if ( !l || !l->first() ) {
 		delete l;
 		continue;
@@ -1010,7 +1010,7 @@ MetaDataBase::CustomWidget *MetaDataBase::customWidget( int id )
 	if ( id == w->id )
 	    return w;
     }
-    return 0;
+    return nullptr;
 }
 
 bool MetaDataBase::isWidgetNameUsed( CustomWidget *wid )
@@ -1294,7 +1294,7 @@ MetaDataBase::CustomWidget::CustomWidget( const CustomWidget &w )
     if ( w.pixmap )
 	pixmap = new TQPixmap( *w.pixmap );
     else
-	pixmap = 0;
+	pixmap = nullptr;
     id = w.id;
     isContainer = w.isContainer;
 }
@@ -1345,7 +1345,7 @@ MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomW
     if ( w.pixmap )
 	pixmap = new TQPixmap( *w.pixmap );
     else
-	pixmap = 0;
+	pixmap = nullptr;
     lstSignals = w.lstSignals;
     lstSlots = w.lstSlots;
     lstProperties = w.lstProperties;
@@ -1567,7 +1567,7 @@ TQString MetaDataBase::normalizeFunction( const TQString &f )
 
 LanguageInterface *MetaDataBase::languageInterface( const TQString &lang )
 {
-    LanguageInterface* iface = 0;
+    LanguageInterface* iface = nullptr;
     languageInterfaceManager->queryInterface( lang, &iface );
     return iface;
 }
diff --git a/tools/designer/designer/multilineeditorimpl.cpp b/tools/designer/designer/multilineeditorimpl.cpp
index e0cd1bf9f..ab72395f4 100644
--- a/tools/designer/designer/multilineeditorimpl.cpp
+++ b/tools/designer/designer/multilineeditorimpl.cpp
@@ -86,7 +86,7 @@ TQTextParagraph* TextEdit::paragraph()
 
 MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget *parent, TQWidget *editWidget,
 				  FormWindow *fw, const TQString &text )
-    : MultiLineEditorBase( parent, 0, WType_Dialog | WShowModal ), formwindow( fw ), doWrap( false )
+    : MultiLineEditorBase( parent, nullptr, WType_Dialog | WShowModal ), formwindow( fw ), doWrap( false )
 {
     callStatic = call_static;
 
@@ -382,7 +382,7 @@ TQString MultiLineEditor::getStaticText()
 
 TQString MultiLineEditor::getText( TQWidget *parent, const TQString &text, bool richtextMode, bool *useWrap )
 {
-    MultiLineEditor medit( true, richtextMode, parent, 0, 0, text );
+    MultiLineEditor medit( true, richtextMode, parent, nullptr, nullptr, text );
     if ( richtextMode )
 	medit.setUseWrapping( *useWrap );
     if ( medit.exec() == TQDialog::Accepted ) {
diff --git a/tools/designer/designer/multilineeditorimpl.h b/tools/designer/designer/multilineeditorimpl.h
index 1e5dd8216..a356a7cd0 100644
--- a/tools/designer/designer/multilineeditorimpl.h
+++ b/tools/designer/designer/multilineeditorimpl.h
@@ -48,7 +48,7 @@ class TextEdit : public TQTextEdit
     TQ_OBJECT
 
 public:
-    TextEdit( TQWidget *parent = 0, const char *name = 0 );
+    TextEdit( TQWidget *parent = nullptr, const char *name = nullptr );
     TQTextDocument *document() const { return TQTextEdit::document(); }
     TQTextParagraph *paragraph();
 
diff --git a/tools/designer/designer/newformimpl.cpp b/tools/designer/designer/newformimpl.cpp
index ed9bf994b..4d0e92453 100644
--- a/tools/designer/designer/newformimpl.cpp
+++ b/tools/designer/designer/newformimpl.cpp
@@ -76,7 +76,7 @@ FormItem::FormItem( TQIconView *view, const TQString &text )
 void FormItem::insert( Project *pro )
 {
     TQString n = "Form" + TQString::number( ++forms );
-    FormWindow *fw = 0;
+    FormWindow *fw = nullptr;
     FormFile *ff = new FormFile( FormFile::createUnnamedFileName(), true, pro );
     fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n );
     fw->setProject( pro );
@@ -217,7 +217,7 @@ void SourceTemplateItem::insert( Project *pro )
     if ( !siface )
 	return;
     SourceTemplateInterface::Source src = siface->create( text(), MainWindow::self->designerInterface() );
-    SourceFile *f = 0;
+    SourceFile *f = nullptr;
     if ( src.type == SourceTemplateInterface::Source::Invalid )
 	return;
     if ( src.type == SourceTemplateInterface::Source::FileName )
@@ -260,7 +260,7 @@ void NewForm::insertTemplates( TQIconView *tView,
 	    pi->setDragEnabled( false );
 	}
     }
-    TQIconViewItem *cur = 0;
+    TQIconViewItem *cur = nullptr;
     FormItem *fi = new FormItem( tView,tr( "Dialog" ) );
     allItems.append( fi );
     fi->setFormType( FormItem::Dialog );
@@ -305,7 +305,7 @@ void NewForm::insertTemplates( TQIconView *tView,
 	    if ( filist ) {
 		TQFileInfoListIterator it( *filist );
 		TQFileInfo *fi;
-		while ( ( fi = it.current() ) != 0 ) {
+		while ( ( fi = it.current() ) ) {
 		    ++it;
 		    if ( !fi->isFile() || fi->extension() != "ui" )
 			continue;
@@ -370,7 +370,7 @@ NewForm::NewForm( TQIconView *templateView, const TQString &templatePath )
 
 NewForm::NewForm( TQWidget *parent, const TQStringList& projects,
 		  const TQString& currentProject, const TQString &templatePath )
-    : NewFormBase( parent, 0, true )
+    : NewFormBase( parent, nullptr, true )
 {
     connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
 
diff --git a/tools/designer/designer/outputwindow.cpp b/tools/designer/designer/outputwindow.cpp
index 4f71c13ac..f330a18fa 100644
--- a/tools/designer/designer/outputwindow.cpp
+++ b/tools/designer/designer/outputwindow.cpp
@@ -44,13 +44,13 @@
 #include <stdio.h>
 #include <tqpainter.h>
 
-static TQTextEdit *debugoutput = 0;
+static TQTextEdit *debugoutput = nullptr;
 TQ_EXPORT bool debugToStderr = false;
 
-TQtMsgHandler OutputWindow::oldMsgHandler = 0;
+TQtMsgHandler OutputWindow::oldMsgHandler = nullptr;
 
 OutputWindow::OutputWindow( TQWidget *parent )
-    : TQTabWidget( parent, "output_window" ), debugView( 0 ), errorView( 0 )
+    : TQTabWidget( parent, "output_window" ), debugView( nullptr ), errorView( nullptr )
 {
     setupDebug();
     setupError();
@@ -59,8 +59,8 @@ OutputWindow::OutputWindow( TQWidget *parent )
 
 OutputWindow::~OutputWindow()
 {
-    debugoutput = debugView = 0;
-    errorView = 0;
+    debugoutput = debugView = nullptr;
+    errorView = nullptr;
     if ( !debugToStderr )
 	qInstallMsgHandler( oldMsgHandler );
     delete iface;
@@ -138,7 +138,7 @@ void OutputWindow::setErrorMessages( const TQStringList &errors, const TQValueLi
     TQStringList::ConstIterator it = locations.begin();
     TQObjectList objects = (TQObjectList)locationObjects;
     TQObject *o = objects.first();
-    TQListViewItem *after = 0;
+    TQListViewItem *after = nullptr;
     for ( ; lit != lines.end() && mit != errors.end(); ++lit, ++mit, ++it, o = objects.next() )
 	after = new ErrorItem( errorView, after, *mit, *lit, *it, o );
     setCurrentPage( 1 );
diff --git a/tools/designer/designer/paletteeditoradvancedimpl.cpp b/tools/designer/designer/paletteeditoradvancedimpl.cpp
index c15c65370..5a61801f9 100644
--- a/tools/designer/designer/paletteeditoradvancedimpl.cpp
+++ b/tools/designer/designer/paletteeditoradvancedimpl.cpp
@@ -51,7 +51,7 @@
 class BoldListBoxText : public TQListBoxText
 {
 public:
-    BoldListBoxText( TQString text, TQListBox* lb = 0 );
+    BoldListBoxText( TQString text, TQListBox* lb = nullptr );
 
 protected:
     virtual void paint( TQPainter* );
@@ -250,7 +250,7 @@ TQColorGroup::ColorRole PaletteEditorAdvanced::effectFromItem( int item )
 
 void PaletteEditorAdvanced::onCentral( int item )
 {
-    TQPixmap* p = 0;
+    TQPixmap* p = nullptr;
     TQColor c;
 
     switch(selectedPalette) {
@@ -515,7 +515,7 @@ void PaletteEditorAdvanced::setPreviewPalette( const TQPalette& pal )
 void PaletteEditorAdvanced::updateStyledButtons()
 {
     TQColor central, effect;
-    TQPixmap *pm = 0;
+    TQPixmap *pm = nullptr;
     switch (selectedPalette) {
     case 0:
     default:
diff --git a/tools/designer/designer/paletteeditoradvancedimpl.h b/tools/designer/designer/paletteeditoradvancedimpl.h
index edf4a5f5b..b85409456 100644
--- a/tools/designer/designer/paletteeditoradvancedimpl.h
+++ b/tools/designer/designer/paletteeditoradvancedimpl.h
@@ -42,12 +42,12 @@ class PaletteEditorAdvanced : public PaletteEditorAdvancedBase
 {
     TQ_OBJECT
 public:
-    PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent=0, const char * name=0,
+    PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent=nullptr, const char * name=nullptr,
 			   bool modal=false, WFlags f=0 );
     ~PaletteEditorAdvanced();
 
     static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground,
-				TQWidget* parent = 0, const char* name = 0, FormWindow *fw = 0 );
+				TQWidget* parent = nullptr, const char* name = nullptr, FormWindow *fw = nullptr );
 
 protected slots:
     void paletteSelected(int);
diff --git a/tools/designer/designer/paletteeditorimpl.h b/tools/designer/designer/paletteeditorimpl.h
index 733395c47..889860706 100644
--- a/tools/designer/designer/paletteeditorimpl.h
+++ b/tools/designer/designer/paletteeditorimpl.h
@@ -43,11 +43,11 @@ class PaletteEditor : public PaletteEditorBase
     TQ_OBJECT
 
 public:
-    PaletteEditor( FormWindow *fw, TQWidget * parent=0, const char * name=0, bool modal=false, WFlags f=0 );
+    PaletteEditor( FormWindow *fw, TQWidget * parent=nullptr, const char * name=nullptr, bool modal=false, WFlags f=0 );
     ~PaletteEditor();
 
     static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground,
-				TQWidget* parent = 0, const char* name = 0, FormWindow *fw = 0 );
+				TQWidget* parent = nullptr, const char* name = nullptr, FormWindow *fw = nullptr );
 
 protected slots:
     void onChooseMainColor();
diff --git a/tools/designer/designer/pixmapchooser.cpp b/tools/designer/designer/pixmapchooser.cpp
index 4cbbef673..b7517484e 100644
--- a/tools/designer/designer/pixmapchooser.cpp
+++ b/tools/designer/designer/pixmapchooser.cpp
@@ -53,7 +53,7 @@
 #include <tqiconview.h>
 
 #if defined(DESIGNER)
-static ImageIconProvider *imageIconProvider = 0;
+static ImageIconProvider *imageIconProvider = nullptr;
 #endif
 
 PixmapView::PixmapView( TQWidget *parent )
@@ -114,7 +114,7 @@ TQStringList qChoosePixmaps( TQWidget *parent )
     TQString all;
     buildImageFormatList( filter, all );
 
-    TQFileDialog fd( TQString::null, filter, parent, 0, true );
+    TQFileDialog fd( TQString::null, filter, parent, nullptr, true );
     fd.setMode( TQFileDialog::ExistingFiles );
     fd.setContentsPreviewEnabled( true );
     PixmapView *pw = new PixmapView( &fd );
@@ -138,7 +138,7 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
 	TQString all;
 	buildImageFormatList( filter, all );
 
-	TQFileDialog fd( TQString::null, filter, parent, 0, true );
+	TQFileDialog fd( TQString::null, filter, parent, nullptr, true );
 	fd.setContentsPreviewEnabled( true );
 	PixmapView *pw = new PixmapView( &fd );
 	fd.setContentsPreview( pw, pw );
@@ -153,7 +153,7 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
 	    return pix;
 	}
     } else if ( fw && fw->savePixmapInProject() ) {
-	PixmapCollectionEditor dia( parent, 0, true );
+	PixmapCollectionEditor dia( parent, nullptr, true );
 	dia.setProject( fw->project() );
 	dia.setChooserMode( true );
 	dia.setCurrentItem( MetaDataBase::pixmapKey( fw, old.serialNumber() ) );
@@ -163,7 +163,7 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
 	    return pix;
 	}
     } else {
-	PixmapFunction dia( parent, 0, true );
+	PixmapFunction dia( parent, nullptr, true );
 	TQObject::connect( dia.helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
 	dia.labelFunction->setText( fw->pixmapLoaderFunction() + "(" );
 	dia.editArguments->setText( MetaDataBase::pixmapArgument( fw, old.serialNumber() ) );
diff --git a/tools/designer/designer/pixmapchooser.h b/tools/designer/designer/pixmapchooser.h
index a8bc94cf2..89652d736 100644
--- a/tools/designer/designer/pixmapchooser.h
+++ b/tools/designer/designer/pixmapchooser.h
@@ -62,7 +62,7 @@ class ImageIconProvider : public TQFileIconProvider
     TQ_OBJECT
 
 public:
-    ImageIconProvider( TQWidget *parent = 0, const char *name = 0 );
+    ImageIconProvider( TQWidget *parent = nullptr, const char *name = nullptr );
     ~ImageIconProvider();
 
     const TQPixmap *pixmap( const TQFileInfo &fi );
@@ -73,7 +73,7 @@ private:
 
 };
 
-TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw = 0, const TQPixmap &old = TQPixmap(),  TQString *fn = 0 );
+TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw = nullptr, const TQPixmap &old = TQPixmap(),  TQString *fn = nullptr );
 TQStringList qChoosePixmaps( TQWidget *parent );
 
 #endif
diff --git a/tools/designer/designer/pixmapcollectioneditor.ui.h b/tools/designer/designer/pixmapcollectioneditor.ui.h
index e9d03b9d5..e87629221 100644
--- a/tools/designer/designer/pixmapcollectioneditor.ui.h
+++ b/tools/designer/designer/pixmapcollectioneditor.ui.h
@@ -33,7 +33,7 @@
 
 void PixmapCollectionEditor::init()
 {
-    project = 0;
+    project = nullptr;
     setChooserMode( false );
 }
 
diff --git a/tools/designer/designer/popupmenueditor.cpp b/tools/designer/designer/popupmenueditor.cpp
index 9ef665df9..712c836b7 100644
--- a/tools/designer/designer/popupmenueditor.cpp
+++ b/tools/designer/designer/popupmenueditor.cpp
@@ -59,8 +59,8 @@
 class PopupMenuEditorItemPtrDrag : public TQStoredDrag
 {
 public:
-    PopupMenuEditorItemPtrDrag( PopupMenuEditorItem * item, TQWidget * parent = 0,
-				const char * name = 0 );
+    PopupMenuEditorItemPtrDrag( PopupMenuEditorItem * item, TQWidget * parent = nullptr,
+				const char * name = nullptr );
     ~PopupMenuEditorItemPtrDrag() {};
     static bool canDecode( TQDragMoveEvent * e );
     static bool decode( TQDropEvent * e, PopupMenuEditorItem ** i );
@@ -102,8 +102,8 @@ bool PopupMenuEditorItemPtrDrag::decode( TQDropEvent * e, PopupMenuEditorItem **
 
 PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditor * menu, TQObject * parent, const char * name )
     : TQObject( parent, name ),
-      a( 0 ),
-      s( 0 ),
+      a( nullptr ),
+      s( nullptr ),
       m( menu ),
       separator( false ),
       removable( false )
@@ -118,7 +118,7 @@ PopupMenuEditorItem::PopupMenuEditorItem( TQAction * action, PopupMenuEditor * m
 					  TQObject * parent, const char * name )
     : TQObject( parent, name ),
       a( action ),
-      s( 0 ),
+      s( nullptr ),
       m( menu ),
       separator( false ),
       removable( true )
@@ -134,7 +134,7 @@ PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditorItem * item, PopupMenuE
 					  TQObject * parent, const char * name )
     : TQObject( parent, name ),
       a( item->a ),
-      s( 0 ),
+      s( nullptr ),
       m( menu ),
       separator( item->separator ),
       removable( item->removable )
@@ -250,18 +250,18 @@ void PopupMenuEditorItem::selfDestruct()
     int i = m->find( s );
     if ( i != -1 && i < m->count() )
 	m->remove( i ); // remove this item
-    a = 0; // the selfDestruct call was caused by the deletion of the action
+    a = nullptr; // the selfDestruct call was caused by the deletion of the action
     delete this;
 }
 
 // PopupMenuEditor Implementation -----------------------------------
 
-PopupMenuEditorItem * PopupMenuEditor::draggedItem = 0;
+PopupMenuEditorItem * PopupMenuEditor::draggedItem = nullptr;
 int PopupMenuEditor::clipboardOperation = 0;
-PopupMenuEditorItem * PopupMenuEditor::clipboardItem = 0;
+PopupMenuEditorItem * PopupMenuEditor::clipboardItem = nullptr;
 
 PopupMenuEditor::PopupMenuEditor( FormWindow * fw, TQWidget * parent, const char * name )
-    : TQWidget( 0, name, WStyle_Customize | WStyle_NoBorder | WRepaintNoErase | WResizeNoErase ),
+    : TQWidget( nullptr, name, WStyle_Customize | WStyle_NoBorder | WRepaintNoErase | WResizeNoErase ),
       formWnd( fw ),
       parentMenu( parent ),
       iconWidth( 0 ),
@@ -277,7 +277,7 @@ PopupMenuEditor::PopupMenuEditor( FormWindow * fw, TQWidget * parent, const char
 
 PopupMenuEditor::PopupMenuEditor( FormWindow * fw, PopupMenuEditor * menu,
 				  TQWidget * parent, const char * name )
-    : TQWidget( 0, name, WStyle_Customize | WStyle_NoBorder | WRepaintNoErase ),
+    : TQWidget( nullptr, name, WStyle_Customize | WStyle_NoBorder | WRepaintNoErase ),
       formWnd( fw ),
       parentMenu( parent ),
       iconWidth( menu->iconWidth ),
@@ -319,7 +319,7 @@ void PopupMenuEditor::init()
     lineEdit->setBackgroundMode(PaletteButton);
     lineEdit->installEventFilter( this );
 
-    dropLine = new TQWidget( this, 0, TQt::WStyle_NoBorder | WStyle_StaysOnTop );
+    dropLine = new TQWidget( this, nullptr, TQt::WStyle_NoBorder | WStyle_StaysOnTop );
     dropLine->setBackgroundColor( TQt::red );
     dropLine->hide();
 
@@ -352,7 +352,7 @@ void PopupMenuEditor::insert( TQAction * action, int index )
 {
     if ( !action )
 	return;
-    insert( new PopupMenuEditorItem( action, this, 0, action->name() ), index );
+    insert( new PopupMenuEditorItem( action, this, nullptr, action->name() ), index );
 }
 
 void PopupMenuEditor::insert( TQActionGroup * actionGroup, int index )
@@ -360,10 +360,10 @@ void PopupMenuEditor::insert( TQActionGroup * actionGroup, int index )
     if ( !actionGroup )
 	return;
     bool dropdown = actionGroup->usesDropDown();
-    PopupMenuEditorItem *i = new PopupMenuEditorItem( (TQAction *)actionGroup, this, 0,
+    PopupMenuEditorItem *i = new PopupMenuEditorItem( (TQAction *)actionGroup, this, nullptr,
 						      TQString( actionGroup->name() ) + "Menu" );
-    TQActionGroup *g = 0;
-    TQObjectList *l = actionGroup->queryList( "TQAction", 0, false, false );
+    TQActionGroup *g = nullptr;
+    TQObjectList *l = actionGroup->queryList( "TQAction", nullptr, false, false );
     TQObjectListIterator it( *l );
     insert( i, index );
     for ( ; it.current(); ++it ) {
@@ -433,7 +433,7 @@ void PopupMenuEditor::cut( int index )
 
     if ( clipboardItem == &addItem || clipboardItem == &addSeparator ) {
 	clipboardOperation = None;
-	clipboardItem = 0;
+	clipboardItem = nullptr;
 	return; // do nothing
     }
 
@@ -452,7 +452,7 @@ void PopupMenuEditor::copy( int index )
 
     if ( clipboardItem == &addItem || clipboardItem == &addSeparator ) {
 	clipboardOperation = None;
-	clipboardItem = 0;
+	clipboardItem = nullptr;
     }
 }
 
@@ -471,7 +471,7 @@ void PopupMenuEditor::paste( int index )
 
 void PopupMenuEditor::insertedActions( TQPtrList<TQAction> & list )
 {
-    TQAction * a = 0;
+    TQAction * a = nullptr;
     PopupMenuEditorItem * i = itemList.first();
 
     while ( i ) {
@@ -492,8 +492,8 @@ void PopupMenuEditor::choosePixmap( int index )
 {
     int idx = ( index == -1 ? currentIndex : index );
 
-    PopupMenuEditorItem * i = 0;
-    TQAction * a = 0;
+    PopupMenuEditorItem * i = nullptr;
+    TQAction * a = nullptr;
 
     if ( idx < (int)itemList.count() ) {
 	i = itemList.at( idx );
@@ -503,7 +503,7 @@ void PopupMenuEditor::choosePixmap( int index )
     }
 
     hide(); // qChoosePixmap hides the menu
-    TQIconSet icons( qChoosePixmap( 0, formWnd, 0, 0 ) );
+    TQIconSet icons( qChoosePixmap( nullptr, formWnd, nullptr, nullptr ) );
     SetActionIconsCommand * cmd =
 	new SetActionIconsCommand( "Set icon", formWnd, a, this, icons );
     formWnd->commandHistory()->addCommand( cmd );
@@ -516,7 +516,7 @@ void PopupMenuEditor::showLineEdit( int index )
 {
     int idx = ( index == -1 ? currentIndex : index );
 
-    PopupMenuEditorItem * i = 0;
+    PopupMenuEditorItem * i = nullptr;
 
     if ( idx >= (int)itemList.count() )
 	i = &addItem;
@@ -545,7 +545,7 @@ void PopupMenuEditor::setAccelerator( int key, TQt::ButtonState state, int index
 	 key == TQt::Key_unknown )
 	return; // ignore these keys when they are pressed
 
-    PopupMenuEditorItem * i = 0;
+    PopupMenuEditorItem * i = nullptr;
 
     if ( idx >= (int)itemList.count() )
 	i = createItem();
@@ -620,7 +620,7 @@ void PopupMenuEditor::remove( int index )
 
 PopupMenuEditorItem * PopupMenuEditor::createItem( TQAction * a )
 {
-    ActionEditor * ae = (ActionEditor *) formWindow()->mainWindow()->child( 0, "ActionEditor" );
+    ActionEditor * ae = (ActionEditor *) formWindow()->mainWindow()->child( nullptr, "ActionEditor" );
     if ( !a )
 	a = ae->newActionEx();
     PopupMenuEditorItem * i = new PopupMenuEditorItem( a, this );
@@ -715,7 +715,7 @@ void PopupMenuEditor::setFocusAt( const TQPoint & pos )
 bool PopupMenuEditor::eventFilter( TQObject * o, TQEvent * e )
 {
     if ( o == lineEdit  && e->type() == TQEvent::FocusOut ) {
-	leaveEditMode( 0 );
+	leaveEditMode( nullptr );
 	update();
     }
     return TQWidget::eventFilter( o, e );
@@ -747,7 +747,7 @@ void PopupMenuEditor::mouseDoubleClickEvent( TQMouseEvent * )
 {
     setFocusAt( mousePressPos );
     if ( currentItem() == &addSeparator ) {
-	PopupMenuEditorItem * i = createItem( new TQSeparatorAction( 0 ) );
+	PopupMenuEditorItem * i = createItem( new TQSeparatorAction( nullptr ) );
 	i->setSeparator( true );
 	return;
     }
@@ -771,7 +771,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e )
 		cmd.execute();
                 // FIXME: start rename after drop
 	    } else if ( draggedItem == &addSeparator ) {
-		draggedItem = createItem( new TQSeparatorAction( 0 ) );
+		draggedItem = createItem( new TQSeparatorAction( nullptr ) );
 		draggedItem->setSeparator( true );
 	    }
 
@@ -793,7 +793,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e )
 
 	    if ( draggedItem ) { // item was not dropped
 		draggedItem->setVisible( true );
-		draggedItem = 0;
+		draggedItem = nullptr;
 		if ( hasFocus() ) {
 		    hideSubMenu();
 		    resizeToContents();
@@ -850,8 +850,8 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e )
 	TQTimer::singleShot( 0, s, TQ_SLOT( hide() ) );
     }
 
-    draggedItem = 0;
-    PopupMenuEditorItem * i = 0;
+    draggedItem = nullptr;
+    PopupMenuEditorItem * i = nullptr;
 
     if ( e->provides( "qt/popupmenueditoritemptr" ) ) {
 	PopupMenuEditorItemPtrDrag::decode( e, &i );
@@ -863,7 +863,7 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e )
 		TQString n = TQString( g->name() ) + "Item";
 		formWindow()->unify( i, n, false );
 		i->setName( n );
-		TQObjectList *l = g->queryList( "TQAction", 0, false, false );
+		TQObjectList *l = g->queryList( "TQAction", nullptr, false, false );
 		TQObjectListIterator it( *l );
 		for ( ; it.current(); ++it ) {
 		    g = ::tqt_cast<TQActionGroup*>(it.current());
@@ -1145,7 +1145,7 @@ TQSize PopupMenuEditor::contentsSize()
     int w = 0;
     int h = itemHeight( &addItem ) + itemHeight( &addSeparator );
     PopupMenuEditorItem * i = itemList.first();
-    TQAction * a = 0;
+    TQAction * a = nullptr;
     while ( i ) {
 	if ( i->isVisible() ) {
 	    if ( !i->isSeparator() ) {
@@ -1283,7 +1283,7 @@ void PopupMenuEditor::clearCurrentField()
     if ( i->isSeparator() )
 	return;
     if ( currentField == 0 ) {
-	TQIconSet icons( 0 );
+	TQIconSet icons( nullptr );
 	SetActionIconsCommand * cmd = new SetActionIconsCommand( "Remove icon",
 								 formWnd,
 								 i->action(),
@@ -1380,7 +1380,7 @@ void PopupMenuEditor::enterEditMode( TQKeyEvent * e )
     PopupMenuEditorItem * i = currentItem();
 
     if ( i == &addSeparator ) {
-	i = createItem( new TQSeparatorAction( 0 ) );
+	i = createItem( new TQSeparatorAction( nullptr ) );
     } else if ( i->isSeparator() ) {
 	return;
     } else if ( currentField == 0 ) {
@@ -1400,7 +1400,7 @@ void PopupMenuEditor::leaveEditMode( TQKeyEvent * e )
     setFocus();
     lineEdit->hide();
 
-    PopupMenuEditorItem * i = 0;
+    PopupMenuEditorItem * i = nullptr;
     if ( e && e->key() == TQt::Key_Escape ) {
  	update();
 	return;
@@ -1420,7 +1420,7 @@ void PopupMenuEditor::leaveEditMode( TQKeyEvent * e )
 	a->setName( n );
 	MetaDataBase::addEntry( a );
 	MetaDataBase::setPropertyChanged( a, "menuText", true );
-	ActionEditor *ae = (ActionEditor*)formWindow()->mainWindow()->child( 0, "ActionEditor" );
+	ActionEditor *ae = (ActionEditor*)formWindow()->mainWindow()->child( nullptr, "ActionEditor" );
 	if ( ae )
 	    ae->updateActionName( a );
     } else {
@@ -1452,13 +1452,13 @@ TQString PopupMenuEditor::constructName( PopupMenuEditorItem *item )
     PopupMenuEditor *p = ::tqt_cast<PopupMenuEditor*>(e);
     if ( p ) {
 	int idx = p->find( item->m );
-	PopupMenuEditorItem * i = ( idx > -1 ? p->at( idx ) : 0 );
+	PopupMenuEditorItem * i = ( idx > -1 ? p->at( idx ) : nullptr );
 	s = ( i ? TQString( i->action()->name() ).remove( "Action" ) : TQString( "" ) );
     } else {
 	MenuBarEditor *b = ::tqt_cast<MenuBarEditor*>(e);
 	if ( b ) {
 	    int idx = b->findItem( item->m );
-	    MenuBarEditorItem * i = ( idx > -1 ? b->item( idx ) : 0 );
+	    MenuBarEditorItem * i = ( idx > -1 ? b->item( idx ) : nullptr );
 	    s = ( i ? i->menuText().lower() : TQString( "" ) );
 	}
     }
diff --git a/tools/designer/designer/popupmenueditor.h b/tools/designer/designer/popupmenueditor.h
index f3ba89811..e5b4a6431 100644
--- a/tools/designer/designer/popupmenueditor.h
+++ b/tools/designer/designer/popupmenueditor.h
@@ -47,7 +47,7 @@ class PopupMenuEditorItem : public TQObject
 
     friend class PopupMenuEditor;
 
-    PopupMenuEditorItem( PopupMenuEditor * menu = 0, TQObject * parent = 0, const char * name = 0 );
+    PopupMenuEditorItem( PopupMenuEditor * menu = nullptr, TQObject * parent = nullptr, const char * name = nullptr );
 
 public:
     enum ItemType {
@@ -57,9 +57,9 @@ public:
     };
 
     PopupMenuEditorItem( TQAction * action, PopupMenuEditor * menu,
-			 TQObject * parent = 0, const char * name = 0 );
+			 TQObject * parent = nullptr, const char * name = nullptr );
     PopupMenuEditorItem( PopupMenuEditorItem * item, PopupMenuEditor * menu,
-			 TQObject * parent = 0, const char * name = 0 );
+			 TQObject * parent = nullptr, const char * name = nullptr );
     ~PopupMenuEditorItem();
 
     void init();
@@ -113,8 +113,8 @@ class PopupMenuEditor : public TQWidget
     friend class Resource;
 
 public:
-    PopupMenuEditor( FormWindow * fw, TQWidget * parent = 0, const char * name = 0 );
-    PopupMenuEditor( FormWindow * fw, PopupMenuEditor * menu, TQWidget * parent, const char * name = 0 );
+    PopupMenuEditor( FormWindow * fw, TQWidget * parent = nullptr, const char * name = nullptr );
+    PopupMenuEditor( FormWindow * fw, PopupMenuEditor * menu, TQWidget * parent, const char * name = nullptr );
     ~PopupMenuEditor();
 
     void init();
@@ -166,7 +166,7 @@ public slots:
     void focusOnSubMenu();
     
 protected:
-    PopupMenuEditorItem * createItem( TQAction * a = 0 );
+    PopupMenuEditorItem * createItem( TQAction * a = nullptr );
     void removeItem( int index = -1 );
     PopupMenuEditorItem * currentItem();
     PopupMenuEditorItem * itemAt( int y );
diff --git a/tools/designer/designer/previewframe.h b/tools/designer/designer/previewframe.h
index 9f79f4540..da9cce2ac 100644
--- a/tools/designer/designer/previewframe.h
+++ b/tools/designer/designer/previewframe.h
@@ -43,7 +43,7 @@ class PreviewWorkspace : public TQWorkspace
 {
     TQ_OBJECT
 public:
-    PreviewWorkspace( TQWidget* parent = 0, const char* name = 0 )
+    PreviewWorkspace( TQWidget* parent = nullptr, const char* name = nullptr )
         : TQWorkspace( parent, name ) {}
     ~PreviewWorkspace() {}
 
@@ -56,7 +56,7 @@ class PreviewFrame : public TQVBox
     TQ_OBJECT
 
 public:
-    PreviewFrame( TQWidget *parent = 0, const char *name = 0 );
+    PreviewFrame( TQWidget *parent = nullptr, const char *name = nullptr );
     void setPreviewPalette(TQPalette);
 
 private:
diff --git a/tools/designer/designer/previewwidgetimpl.cpp b/tools/designer/designer/previewwidgetimpl.cpp
index caeee4b5c..b5cfeca61 100644
--- a/tools/designer/designer/previewwidgetimpl.cpp
+++ b/tools/designer/designer/previewwidgetimpl.cpp
@@ -41,7 +41,7 @@ PreviewWidget::PreviewWidget( TQWidget *parent, const char *name )
     TQObjectList *l = queryList("TQWidget");
     TQObjectListIt it(*l);
     TQObject * obj;
-    while ((obj = it.current()) != 0) {
+    while ((obj = it.current())) {
         ++it;
         obj->installEventFilter(this);
 	((TQWidget*)obj)->setFocusPolicy(NoFocus);
diff --git a/tools/designer/designer/previewwidgetimpl.h b/tools/designer/designer/previewwidgetimpl.h
index aaf511546..b78076297 100644
--- a/tools/designer/designer/previewwidgetimpl.h
+++ b/tools/designer/designer/previewwidgetimpl.h
@@ -41,7 +41,7 @@ class PreviewWidget : public PreviewWidgetBase
     TQ_OBJECT
 
 public:
-    PreviewWidget( TQWidget *parent = 0, const char *name = 0 );
+    PreviewWidget( TQWidget *parent = nullptr, const char *name = nullptr );
 
     void closeEvent(TQCloseEvent *);
     bool eventFilter(TQObject *, TQEvent *);
diff --git a/tools/designer/designer/project.cpp b/tools/designer/designer/project.cpp
index 191d9522d..dcc10fade 100644
--- a/tools/designer/designer/project.cpp
+++ b/tools/designer/designer/project.cpp
@@ -104,7 +104,7 @@ void DatabaseConnection::remove()
     else
 	TQSqlDatabase::removeDatabase( nm );
     // the above will effectively delete the current connection
-    conn = 0;
+    conn = nullptr;
 }
 #endif
 
@@ -132,7 +132,7 @@ bool DatabaseConnection::open( bool suppressDialog )
     for( ; suppressDialog == false ; ) {
 	bool done = false;
 	if ( !success ) {
-	    DatabaseConnectionEditor dia( this, 0  , 0 , true );
+	    DatabaseConnectionEditor dia( this, nullptr  , nullptr , true );
 	    switch( dia.exec() ) {
 	    case TQDialog::Accepted:
 		done = false;
@@ -213,7 +213,7 @@ Project::Project( const TQString &fn, const TQString &pName,
 {
     modified = true;
     pixCollection = new PixmapCollection( this );
-    iface = 0;
+    iface = nullptr;
     lang = l;
     is_cpp = lang == "C++";
     cfg.insert( "(all)", "qt warn_on release" );
@@ -250,7 +250,7 @@ DatabaseConnection *Project::databaseConnection( const TQString &name )
 	if ( conn->name() == name )
 	    return conn;
     }
-    return 0;
+    return nullptr;
 }
 #endif
 
@@ -339,7 +339,7 @@ static TQString parse_part( const TQString &part )
     return res;
 }
 
-TQStringList parse_multiline_part( const TQString &contents, const TQString &key, int *start = 0 )
+TQStringList parse_multiline_part( const TQString &contents, const TQString &key, int *start = nullptr )
 {
     if ( start )
 	*start = -1;
@@ -611,7 +611,7 @@ static void remove_contents( TQString &contents, const TQString &s )
     }
 }
 
-static void remove_multiline_contents( TQString &contents, const TQString &s, int *strt = 0 )
+static void remove_multiline_contents( TQString &contents, const TQString &s, int *strt = nullptr )
 {
     int i = contents.find( s );
     int startBrace = contents.findRev("{", i);
@@ -1106,7 +1106,7 @@ TQObjectList *Project::formList( bool resolveFakeObjects ) const
 	    if ( resolveFakeObjects && f->formWindow()->isFake() )
 		l->append( objectForFakeForm( f->formWindow() ) );
 	    else
-		l->append( f->formWindow()->child( 0, "TQWidget" ) );
+		l->append( f->formWindow()->child( nullptr, "TQWidget" ) );
 	} else if ( f->isFake() ) {
 	    l->append( objectForFakeFormFile( f ) );
 	}
@@ -1192,7 +1192,7 @@ SourceFile* Project::findSourceFile( const TQString& filename, SourceFile *ignor
 	    return it.current();
 	++it;
     }
-    return 0;
+    return nullptr;
 }
 
 FormFile* Project::findFormFile( const TQString& filename, FormFile *ignore ) const
@@ -1203,7 +1203,7 @@ FormFile* Project::findFormFile( const TQString& filename, FormFile *ignore ) co
 	    return it.current();
 	++it;
     }
-    return 0;
+    return nullptr;
 }
 
 void Project::setIncludePath( const TQString &platform, const TQString &path )
@@ -1340,7 +1340,7 @@ void Project::addObject( TQObject *o )
     fakeFormFiles.insert( (void*)o, ff );
     MetaDataBase::addEntry( o );
     if ( hasGUI() ) {
-	TQWidget *parent = MainWindow::self ? MainWindow::self->qWorkspace() : 0;
+	TQWidget *parent = MainWindow::self ? MainWindow::self->qWorkspace() : nullptr;
 	FormWindow *fw = new FormWindow( ff, MainWindow::self, parent, "qt_fakewindow" );
 	fw->setProject( this );
 	if ( TQFile::exists( ff->absFileName() ) )
@@ -1402,7 +1402,7 @@ TQObject *Project::objectForFakeForm( FormWindow *fw ) const
 	    it.current() == fw->formFile() )
 	    return (TQObject*)it.currentKey();
     }
-    return 0;
+    return nullptr;
 }
 
 TQObject *Project::objectForFakeFormFile( FormFile *ff ) const
@@ -1411,7 +1411,7 @@ TQObject *Project::objectForFakeFormFile( FormFile *ff ) const
 	if ( it.current() == ff )
 	    return (TQObject*)it.currentKey();
     }
-    return 0;
+    return nullptr;
 }
 
 void Project::removeTempProject()
diff --git a/tools/designer/designer/project.h b/tools/designer/designer/project.h
index 8a19eb079..cf3c96a9d 100644
--- a/tools/designer/designer/project.h
+++ b/tools/designer/designer/project.h
@@ -62,9 +62,9 @@ class DatabaseConnection
 public:
     DatabaseConnection( Project *p ) :
 #ifndef TQT_NO_SQL
-	conn( 0 ),
+	conn( nullptr ),
 #endif
-	project( p ), loaded( false ), iface( 0 ) {}
+	project( p ), loaded( false ), iface( nullptr ) {}
     ~DatabaseConnection();
 
     bool refreshCatalog();
@@ -122,7 +122,7 @@ class Project : public TQObject
 
 public:
     Project( const TQString &fn, const TQString &pName = TQString::null,
-	     TQPluginManager<ProjectSettingsInterface> *pm = 0, bool isDummy = false,
+	     TQPluginManager<ProjectSettingsInterface> *pm = nullptr, bool isDummy = false,
 	     const TQString &l = "C++" );
     ~Project();
 
@@ -180,12 +180,12 @@ public:
     TQPtrListIterator<SourceFile> sourceFiles() const { return TQPtrListIterator<SourceFile>(sourcefiles); }
     void addSourceFile( SourceFile *sf );
     bool removeSourceFile( SourceFile *sf );
-    SourceFile* findSourceFile( const TQString& filename, SourceFile *ignore = 0 ) const;
+    SourceFile* findSourceFile( const TQString& filename, SourceFile *ignore = nullptr ) const;
 
     TQPtrListIterator<FormFile> formFiles() const { return TQPtrListIterator<FormFile>(formfiles); }
     void addFormFile( FormFile *ff );
     bool removeFormFile( FormFile *ff );
-    FormFile* findFormFile( const TQString& filename, FormFile *ignore = 0 ) const;
+    FormFile* findFormFile( const TQString& filename, FormFile *ignore = nullptr ) const;
 
     void setIncludePath( const TQString &platform, const TQString &path );
     void setLibs( const TQString &platform, const TQString &path );
diff --git a/tools/designer/designer/projectsettingsimpl.h b/tools/designer/designer/projectsettingsimpl.h
index 423c2d9d2..f8ed1bfab 100644
--- a/tools/designer/designer/projectsettingsimpl.h
+++ b/tools/designer/designer/projectsettingsimpl.h
@@ -46,7 +46,7 @@ class ProjectSettings : public ProjectSettingsBase
     TQ_OBJECT
 
 public:
-    ProjectSettings( Project *pro, TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
+    ProjectSettings( Project *pro, TQWidget* parent = nullptr, const char* name = nullptr, bool modal = false, WFlags fl = 0 );
     ~ProjectSettings();
 
 protected slots:
diff --git a/tools/designer/designer/propertyeditor.cpp b/tools/designer/designer/propertyeditor.cpp
index 24e06588e..ca145ba28 100644
--- a/tools/designer/designer/propertyeditor.cpp
+++ b/tools/designer/designer/propertyeditor.cpp
@@ -92,14 +92,14 @@
 
 #include <limits.h>
 
-static TQFontDatabase *fontDataBase = 0;
+static TQFontDatabase *fontDataBase = nullptr;
 TQString assistantPath();
 
 #ifdef TQ_WS_MAC
 #include <tqwindowsstyle.h>
 static void setupStyle(TQWidget *w)
 {
-    static TQStyle *windowsStyle = 0;
+    static TQStyle *windowsStyle = nullptr;
     if(!windowsStyle)
 	windowsStyle = new TQWindowsStyle;
     w->setStyle(windowsStyle);
@@ -111,7 +111,7 @@ static void setupStyle(TQWidget *w)
 static void cleanupFontDatabase()
 {
     delete fontDataBase;
-    fontDataBase = 0;
+    fontDataBase = nullptr;
 }
 
 static TQStringList getFontList()
@@ -179,14 +179,14 @@ PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *
     setText( 0, propertyName );
     changed = false;
     setText( 1, "" );
-    resetButton = 0;
+    resetButton = nullptr;
 }
 
 PropertyItem::~PropertyItem()
 {
     if ( resetButton )
 	delete resetButton->parentWidget();
-    resetButton = 0;
+    resetButton = nullptr;
 }
 
 void PropertyItem::toggle()
@@ -574,8 +574,8 @@ PropertyTextItem::PropertyTextItem( PropertyList *l, PropertyItem *after, Proper
     : PropertyItem( l, after, prop, propName ), withComment( comment ),
       hasMultiLines( multiLine ), asciiOnly( ascii ), accel( a )
 {
-    lin = 0;
-    box = 0;
+    lin = nullptr;
+    box = nullptr;
 }
 
 TQLineEdit *PropertyTextItem::lined()
@@ -589,7 +589,7 @@ TQLineEdit *PropertyTextItem::lined()
 	box->hide();
     }
 
-    lin = 0;
+    lin = nullptr;
     if ( hasMultiLines )
 	lin = new TQLineEdit( box );
     else
@@ -632,9 +632,9 @@ TQLineEdit *PropertyTextItem::lined()
 PropertyTextItem::~PropertyTextItem()
 {
     delete (TQLineEdit*)lin;
-    lin = 0;
+    lin = nullptr;
     delete (TQHBox*)box;
-    box = 0;
+    box = nullptr;
 }
 
 void PropertyTextItem::setChanged( bool b, bool updateDb )
@@ -772,7 +772,7 @@ PropertyDoubleItem::PropertyDoubleItem( PropertyList *l, PropertyItem *after, Pr
 				    const TQString &propName )
     : PropertyItem( l, after, prop, propName )
 {
-    lin = 0;
+    lin = nullptr;
 }
 
 TQLineEdit *PropertyDoubleItem::lined()
@@ -793,7 +793,7 @@ TQLineEdit *PropertyDoubleItem::lined()
 PropertyDoubleItem::~PropertyDoubleItem()
 {
     delete (TQLineEdit*)lin;
-    lin = 0;
+    lin = nullptr;
 }
 
 void PropertyDoubleItem::showEditor()
@@ -852,7 +852,7 @@ void PropertyDoubleItem::setValue()
 PropertyDateItem::PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
     : PropertyItem( l, after, prop, propName )
 {
-    lin = 0;
+    lin = nullptr;
 }
 
 TQDateEdit *PropertyDateItem::lined()
@@ -872,7 +872,7 @@ TQDateEdit *PropertyDateItem::lined()
 PropertyDateItem::~PropertyDateItem()
 {
     delete (TQDateEdit*)lin;
-    lin = 0;
+    lin = nullptr;
 }
 
 void PropertyDateItem::showEditor()
@@ -927,7 +927,7 @@ void PropertyDateItem::setValue()
 PropertyTimeItem::PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
     : PropertyItem( l, after, prop, propName )
 {
-    lin = 0;
+    lin = nullptr;
 }
 
 TQTimeEdit *PropertyTimeItem::lined()
@@ -947,7 +947,7 @@ TQTimeEdit *PropertyTimeItem::lined()
 PropertyTimeItem::~PropertyTimeItem()
 {
     delete (TQTimeEdit*)lin;
-    lin = 0;
+    lin = nullptr;
 }
 
 void PropertyTimeItem::showEditor()
@@ -1002,7 +1002,7 @@ void PropertyTimeItem::setValue()
 PropertyDateTimeItem::PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
     : PropertyItem( l, after, prop, propName )
 {
-    lin = 0;
+    lin = nullptr;
 }
 
 TQDateTimeEdit *PropertyDateTimeItem::lined()
@@ -1022,7 +1022,7 @@ TQDateTimeEdit *PropertyDateTimeItem::lined()
 PropertyDateTimeItem::~PropertyDateTimeItem()
 {
     delete (TQDateTimeEdit*)lin;
-    lin = 0;
+    lin = nullptr;
 }
 
 void PropertyDateTimeItem::showEditor()
@@ -1077,7 +1077,7 @@ void PropertyDateTimeItem::setValue()
 PropertyBoolItem::PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
     : PropertyItem( l, after, prop, propName )
 {
-    comb = 0;
+    comb = nullptr;
 }
 
 TQComboBox *PropertyBoolItem::combo()
@@ -1097,7 +1097,7 @@ TQComboBox *PropertyBoolItem::combo()
 PropertyBoolItem::~PropertyBoolItem()
 {
     delete (TQComboBox*)comb;
-    comb = 0;
+    comb = nullptr;
 }
 
 void PropertyBoolItem::toggle()
@@ -1168,7 +1168,7 @@ PropertyIntItem::PropertyIntItem( PropertyList *l, PropertyItem *after, Property
 				  const TQString &propName, bool s )
     : PropertyItem( l, after, prop, propName ), signedValue( s )
 {
-    spinBx = 0;
+    spinBx = nullptr;
 }
 
 TQSpinBox *PropertyIntItem::spinBox()
@@ -1193,7 +1193,7 @@ TQSpinBox *PropertyIntItem::spinBox()
 PropertyIntItem::~PropertyIntItem()
 {
     delete (TQSpinBox*)spinBx;
-    spinBx = 0;
+    spinBx = nullptr;
 }
 
 void PropertyIntItem::showEditor()
@@ -1260,13 +1260,13 @@ PropertyLayoutItem::PropertyLayoutItem( PropertyList *l, PropertyItem *after, Pr
 		  const TQString &propName )
     : PropertyItem( l, after, prop, propName )
 {
-    spinBx = 0;
+    spinBx = nullptr;
 }
 
 PropertyLayoutItem::~PropertyLayoutItem()
 {
     delete (TQSpinBox*)spinBx;
-    spinBx = 0;
+    spinBx = nullptr;
 }
 
 TQSpinBox* PropertyLayoutItem::spinBox()
@@ -1336,7 +1336,7 @@ PropertyListItem::PropertyListItem( PropertyList *l, PropertyItem *after, Proper
 				    const TQString &propName, bool e )
     : PropertyItem( l, after, prop, propName ), editable( e )
 {
-    comb = 0;
+    comb = nullptr;
     oldInt = -1;
 }
 
@@ -1361,7 +1361,7 @@ TQComboBox *PropertyListItem::combo()
 PropertyListItem::~PropertyListItem()
 {
     delete (TQComboBox*)comb;
-    comb = 0;
+    comb = nullptr;
 }
 
 void PropertyListItem::showEditor()
@@ -1482,7 +1482,7 @@ PropertyCoordItem::PropertyCoordItem( PropertyList *l, PropertyItem *after, Prop
 				    const TQString &propName, Type t )
     : PropertyItem( l, after, prop, propName ), typ( t )
 {
-    lin = 0;
+    lin = nullptr;
 
 }
 
@@ -1516,7 +1516,7 @@ void PropertyCoordItem::createChildren()
 
 void PropertyCoordItem::initChildren()
 {
-    PropertyItem *item = 0;
+    PropertyItem *item = nullptr;
     for ( int i = 0; i < childCount(); ++i ) {
 	item = PropertyItem::child( i );
 	if ( item->name() == tr( "x" ) ) {
@@ -1546,7 +1546,7 @@ void PropertyCoordItem::initChildren()
 PropertyCoordItem::~PropertyCoordItem()
 {
     delete (TQLineEdit*)lin;
-    lin = 0;
+    lin = nullptr;
 }
 
 void PropertyCoordItem::showEditor()
@@ -1763,7 +1763,7 @@ void PropertyColorItem::createChildren()
 
 void PropertyColorItem::initChildren()
 {
-    PropertyItem *item = 0;
+    PropertyItem *item = nullptr;
     for ( int i = 0; i < childCount(); ++i ) {
 	item = PropertyItem::child( i );
 	if ( item->name() == tr( "Red" ) )
@@ -1891,7 +1891,7 @@ void PropertyFontItem::createChildren()
 
 void PropertyFontItem::initChildren()
 {
-    PropertyItem *item = 0;
+    PropertyItem *item = nullptr;
     for ( int i = 0; i < childCount(); ++i ) {
 	item = PropertyItem::child( i );
 	if ( item->name() == tr( "Family" ) ) {
@@ -2013,7 +2013,7 @@ void PropertyDatabaseItem::createChildren()
 void PropertyDatabaseItem::initChildren()
 {
 #ifndef TQT_NO_SQL
-    PropertyItem *item = 0;
+    PropertyItem *item = nullptr;
     TQStringList lst = value().toStringList();
     TQString conn, table;
     for ( int i = 0; i < childCount(); ++i ) {
@@ -2148,7 +2148,7 @@ PropertySizePolicyItem::PropertySizePolicyItem( PropertyList *l, PropertyItem *a
 						const TQString &propName )
     : PropertyItem( l, after, prop, propName )
 {
-    lin = 0;
+    lin = nullptr;
 }
 
 TQLineEdit *PropertySizePolicyItem::lined()
@@ -2181,7 +2181,7 @@ void PropertySizePolicyItem::createChildren()
 
 void PropertySizePolicyItem::initChildren()
 {
-    PropertyItem *item = 0;
+    PropertyItem *item = nullptr;
     TQSizePolicy sp = val.toSizePolicy();
     for ( int i = 0; i < childCount(); ++i ) {
 	item = PropertyItem::child( i );
@@ -2346,7 +2346,7 @@ PropertyCursorItem::PropertyCursorItem( PropertyList *l, PropertyItem *after, Pr
 					const TQString &propName )
     : PropertyItem( l, after, prop, propName )
 {
-    comb = 0;
+    comb = nullptr;
 }
 
 TQComboBox *PropertyCursorItem::combo()
@@ -2626,7 +2626,7 @@ void EnumPopup::closeWidget()
 {
     TQPtrListIterator<TQCheckBox> it( checkBoxList );
     int i = 0;
-    while ( it.current() != 0 ) {
+    while ( it.current() ) {
 	itemList[i].selected = (*it)->isChecked();
 	++it;
 	++i;
@@ -2922,7 +2922,7 @@ PropertyList::PropertyList( PropertyEditor *e )
     setVScrollBarMode( AlwaysOn );
     setColumnWidthMode( 1, Manual );
     mousePressed = false;
-    pressItem = 0;
+    pressItem = nullptr;
     theLastEvent = MouseEvent;
     header()->installEventFilter( this );
 }
@@ -3007,7 +3007,7 @@ static TQVariant::Type type_to_variant( const TQString &s )
 #ifndef TQT_NO_SQL
 static bool parent_is_data_aware( TQWidget *w )
 {
-    TQWidget *p = w ? w->parentWidget() : 0;
+    TQWidget *p = w ? w->parentWidget() : nullptr;
     while ( p && !p->isTopLevel() ) {
 	if ( ::tqt_cast<TQDesignerDataBrowser*>(p) || ::tqt_cast<TQDesignerDataView*>(p) )
 	    return true;
@@ -3027,7 +3027,7 @@ void PropertyList::setupProperties()
 	return;
     bool allProperties = !::tqt_cast<Spacer*>(editor->widget());
     TQStrList lst = editor->widget()->metaObject()->propertyNames( allProperties );
-    PropertyItem *item = 0;
+    PropertyItem *item = nullptr;
     TQMap<TQString, bool> unique;
     TQObject *w = editor->widget();
     TQStringList valueSet;
@@ -3157,7 +3157,7 @@ void PropertyList::setupProperties()
 			<< p->valueToKey( AlignHCenter )
 			<< p->valueToKey( AlignRight )
 			<< p->valueToKey( AlignJustify );
-		    item = new PropertyListItem( this, item, 0, "hAlign", false );
+		    item = new PropertyListItem( this, item, nullptr, "hAlign", false );
 		    item->setValue( lst );
 		    setPropertyValue( item );
 		    if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) )
@@ -3167,12 +3167,12 @@ void PropertyList::setupProperties()
 			lst << p->valueToKey( AlignTop )
 			    << p->valueToKey( AlignVCenter )
 			    << p->valueToKey( AlignBottom );
-			item = new PropertyListItem( this, item, 0, "vAlign", false );
+			item = new PropertyListItem( this, item, nullptr, "vAlign", false );
 			item->setValue( lst );
 			setPropertyValue( item );
 			if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) )
 			    item->setChanged( true, false );
-			item = new PropertyBoolItem( this, item, 0, "wordwrap" );
+			item = new PropertyBoolItem( this, item, nullptr, "wordwrap" );
 			if ( ::tqt_cast<TQGroupBox*>(w) )
 			    item->setVisible( false );
 			setPropertyValue( item );
@@ -3183,11 +3183,11 @@ void PropertyList::setupProperties()
 		    TQStrList lst( p->enumKeys() );
 		    TQStringList l;
 		    TQPtrListIterator<char> it( lst );
-		    while ( it.current() != 0 ) {
+		    while ( it.current() ) {
 			l << TQString(*it);
 			++it;
 		    }
-		    item = new PropertyEnumItem( this, item, 0, p->name() );
+		    item = new PropertyEnumItem( this, item, nullptr, p->name() );
 		    item->setValue( l );
 		    setPropertyValue( item );
 		    if ( MetaDataBase::isPropertyChanged( editor->widget(), p->name() ) )
@@ -3203,7 +3203,7 @@ void PropertyList::setupProperties()
 			continue;
 		    lst << k;
 		}
-		item = new PropertyListItem( this, item, 0, p->name(), false );
+		item = new PropertyListItem( this, item, nullptr, p->name(), false );
 		item->setValue( lst );
 	    } else {
 		TQVariant::Type t = TQVariant::nameToType( p->type() );
@@ -3223,14 +3223,14 @@ void PropertyList::setupProperties()
 
     if ( !::tqt_cast<TQSplitter*>(w) && !::tqt_cast<MenuBarEditor*>(w) && !::tqt_cast<TQDesignerToolBar*>(w) &&
 	 w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) {
-	item = new PropertyLayoutItem( this, item, 0, "layoutSpacing" );
+	item = new PropertyLayoutItem( this, item, nullptr, "layoutSpacing" );
 	setPropertyValue( item );
 	if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutSpacing" )
 	     || MetaDataBase::spacing( editor->widget() ) != -1 )
 	    layoutInitValue( item, true );
 	else
 	    layoutInitValue( item );
-	item = new PropertyLayoutItem( this, item, 0, "layoutMargin" );
+	item = new PropertyLayoutItem( this, item, nullptr, "layoutMargin" );
 	setPropertyValue( item );
 	if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutMargin" )
 	     || MetaDataBase::margin( editor->widget() ) != -1 )
@@ -3240,7 +3240,7 @@ void PropertyList::setupProperties()
 	TQWidget *widget = (TQWidget*)w;
 	if ( ( !::tqt_cast<TQLayoutWidget*>(widget) &&
 	       widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) {
-	    item = new PropertyListItem( this, item, 0, "resizeMode", false );
+	    item = new PropertyListItem( this, item, nullptr, "resizeMode", false );
 	    TQStringList lst;
 	    lst << "Auto" << "FreeResize" << "Minimum" << "Fixed";
 	    item->setValue( lst );
@@ -3256,11 +3256,11 @@ void PropertyList::setupProperties()
 
     if ( !::tqt_cast<Spacer*>(w) && !::tqt_cast<TQLayoutWidget*>(w) &&
 	 !::tqt_cast<MenuBarEditor*>(w) && !::tqt_cast<TQDesignerToolBar*>(w) ) {
-	item = new PropertyTextItem( this, item, 0, "toolTip", true, false );
+	item = new PropertyTextItem( this, item, nullptr, "toolTip", true, false );
 	setPropertyValue( item );
 	if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) )
 	    item->setChanged( true, false );
-	item = new PropertyTextItem( this, item, 0, "whatsThis", true, true );
+	item = new PropertyTextItem( this, item, nullptr, "whatsThis", true, true );
 	setPropertyValue( item );
 	if ( MetaDataBase::isPropertyChanged( editor->widget(), "whatsThis" ) )
 	    item->setChanged( true, false );
@@ -3269,7 +3269,7 @@ void PropertyList::setupProperties()
 #ifndef TQT_NO_SQL
     if ( !::tqt_cast<TQDataTable*>(editor->widget()) && !::tqt_cast<TQDataBrowser*>(editor->widget()) &&
 	 !::tqt_cast<TQDataView*>(editor->widget()) && parent_is_data_aware( ::tqt_cast<TQWidget*>(editor->widget()) ) ) {
-	item = new PropertyDatabaseItem( this, item, 0, "database", editor->formWindow()->mainContainer() != w );
+	item = new PropertyDatabaseItem( this, item, nullptr, "database", editor->formWindow()->mainContainer() != w );
 	setPropertyValue( item );
 	if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
 	    item->setChanged( true, false );
@@ -3277,11 +3277,11 @@ void PropertyList::setupProperties()
 
     if ( ::tqt_cast<TQDataTable*>(editor->widget()) || ::tqt_cast<TQDataBrowser*>(editor->widget()) ||
 	 ::tqt_cast<TQDataView*>(editor->widget()) ) {
-	item = new PropertyDatabaseItem( this, item, 0, "database", false );
+	item = new PropertyDatabaseItem( this, item, nullptr, "database", false );
 	setPropertyValue( item );
 	if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
 	    item->setChanged( true, false );
-	item = new PropertyBoolItem( this, item, 0, "frameworkCode" );
+	item = new PropertyBoolItem( this, item, nullptr, "frameworkCode" );
 	setPropertyValue( item );
 	if ( MetaDataBase::isPropertyChanged( editor->widget(), "frameworkCode" ) )
 	    item->setChanged( true, false );
@@ -3338,7 +3338,7 @@ void PropertyList::setupCusWidgetProperties( MetaDataBase::CustomWidget *cw,
 bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, TQVariant::Type t )
 {
     if ( name == "buddy" ) {
-	PropertyListItem *itm = new PropertyListItem( this, item, 0, name, true );
+	PropertyListItem *itm = new PropertyListItem( this, item, nullptr, name, true );
 	TQPtrDict<TQWidget> *widgets = editor->formWindow()->widgets();
 	TQPtrDictIterator<TQWidget> it( *widgets );
 	TQStringList l;
@@ -3358,83 +3358,83 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
 
     switch ( t ) {
     case TQVariant::String:
-	item = new PropertyTextItem( this, item, 0, name, true,
+	item = new PropertyTextItem( this, item, nullptr, name, true,
 				     ::tqt_cast<TQLabel*>(editor->widget()) ||
 				     ::tqt_cast<TQTextView*>(editor->widget()) ||
 				     ::tqt_cast<TQButton*>(editor->widget()) );
 	break;
     case TQVariant::CString:
-	item = new PropertyTextItem( this, item, 0,
+	item = new PropertyTextItem( this, item, nullptr,
 				     name, name == "name" &&
 				     editor->widget() == editor->formWindow()->mainContainer(),
 				     false, true );
 	break;
     case TQVariant::Bool:
-	item = new PropertyBoolItem( this, item, 0, name );
+	item = new PropertyBoolItem( this, item, nullptr, name );
 	break;
     case TQVariant::Font:
-	item = new PropertyFontItem( this, item, 0, name );
+	item = new PropertyFontItem( this, item, nullptr, name );
 	break;
     case TQVariant::Int:
 	if ( name == "accel" )
-	    item = new PropertyTextItem( this, item, 0, name, false, false, false, true );
+	    item = new PropertyTextItem( this, item, nullptr, name, false, false, false, true );
 	else if ( name == "layoutSpacing" || name == "layoutMargin" )
-	    item = new PropertyLayoutItem( this, item, 0, name );
+	    item = new PropertyLayoutItem( this, item, nullptr, name );
 	else if ( name == "resizeMode" )
-	    item = new PropertyListItem( this, item, 0, name, true );
+	    item = new PropertyListItem( this, item, nullptr, name, true );
 	else
-	    item = new PropertyIntItem( this, item, 0, name, true );
+	    item = new PropertyIntItem( this, item, nullptr, name, true );
 	break;
     case TQVariant::Double:
-	item = new PropertyDoubleItem( this, item, 0, name );
+	item = new PropertyDoubleItem( this, item, nullptr, name );
 	break;
     case TQVariant::KeySequence:
-	item = new PropertyKeysequenceItem( this, item, 0, name );
+	item = new PropertyKeysequenceItem( this, item, nullptr, name );
 	break;
     case TQVariant::UInt:
-	item = new PropertyIntItem( this, item, 0, name, false );
+	item = new PropertyIntItem( this, item, nullptr, name, false );
 	break;
     case TQVariant::StringList:
-	item = new PropertyListItem( this, item, 0, name, true );
+	item = new PropertyListItem( this, item, nullptr, name, true );
 	break;
     case TQVariant::Rect:
-	item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Rect );
+	item = new PropertyCoordItem( this, item, nullptr, name, PropertyCoordItem::Rect );
 	break;
     case TQVariant::Point:
-	item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Point );
+	item = new PropertyCoordItem( this, item, nullptr, name, PropertyCoordItem::Point );
 	break;
     case TQVariant::Size:
-	item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Size );
+	item = new PropertyCoordItem( this, item, nullptr, name, PropertyCoordItem::Size );
 	break;
     case TQVariant::Color:
-	item = new PropertyColorItem( this, item, 0, name, true );
+	item = new PropertyColorItem( this, item, nullptr, name, true );
 	break;
     case TQVariant::Pixmap:
-	item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::Pixmap );
+	item = new PropertyPixmapItem( this, item, nullptr, name, PropertyPixmapItem::Pixmap );
 	break;
     case TQVariant::IconSet:
-	item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::IconSet );
+	item = new PropertyPixmapItem( this, item, nullptr, name, PropertyPixmapItem::IconSet );
 	break;
     case TQVariant::Image:
-	item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::Image );
+	item = new PropertyPixmapItem( this, item, nullptr, name, PropertyPixmapItem::Image );
 	break;
     case TQVariant::SizePolicy:
-	item = new PropertySizePolicyItem( this, item, 0, name );
+	item = new PropertySizePolicyItem( this, item, nullptr, name );
 	break;
     case TQVariant::Palette:
-	item = new PropertyPaletteItem( this, item, 0, name );
+	item = new PropertyPaletteItem( this, item, nullptr, name );
 	break;
     case TQVariant::Cursor:
-	item = new PropertyCursorItem( this, item, 0, name );
+	item = new PropertyCursorItem( this, item, nullptr, name );
 	break;
     case TQVariant::Date:
-	item = new PropertyDateItem( this, item, 0, name );
+	item = new PropertyDateItem( this, item, nullptr, name );
 	break;
     case TQVariant::Time:
-	item = new PropertyTimeItem( this, item, 0, name );
+	item = new PropertyTimeItem( this, item, nullptr, name );
 	break;
     case TQVariant::DateTime:
-	item = new PropertyDateTimeItem( this, item, 0, name );
+	item = new PropertyDateTimeItem( this, item, nullptr, name );
 	break;
     default:
 	return false;
@@ -3610,7 +3610,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
     } else if ( o == header() ) {
 	if ( e->type() == TQEvent::ContextMenu ) {
 	    ((TQContextMenuEvent *)e)->accept();
-	    TQPopupMenu menu( 0 );
+	    TQPopupMenu menu( nullptr );
 	    menu.setCheckable( true );
 	    const int cat_id = 1;
 	    const int alpha_id = 2;
@@ -3954,7 +3954,7 @@ void EventList::setup()
 	eventItem->setOpen( true );
 	TQValueList<MetaDataBase::Connection> conns =
 	    MetaDataBase::connections( formWindow, editor->widget(), formWindow->mainContainer() );
-	HierarchyItem *item = 0;
+	HierarchyItem *item = nullptr;
 	for ( TQValueList<MetaDataBase::Connection>::Iterator cit = conns.begin();
 	      cit != conns.end(); ++cit ) {
 	    TQString s = it.current();
@@ -4042,7 +4042,7 @@ void EventList::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
 void EventList::renamed( TQListViewItem *i )
 {
     if ( newItem == i )
-	newItem = 0;
+	newItem = nullptr;
     if ( !i->parent() )
 	return;
     TQListViewItem *itm = i->parent()->firstChild();
@@ -4110,12 +4110,12 @@ void EventList::save( TQListViewItem *p )
 */
 
 PropertyEditor::PropertyEditor( TQWidget *parent )
-    : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
+    : TQTabWidget( parent, nullptr, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
 		  WStyle_StaysOnTop | WStyle_Tool |WStyle_MinMax | WStyle_SysMenu )
 {
     setCaption( tr( "Property Editor" ) );
-    wid = 0;
-    formwindow = 0;
+    wid = nullptr;
+    formwindow = nullptr;
     listview = new PropertyList( this );
     addTab( listview, tr( "P&roperties" ) );
     eList = new EventList( this, formWindow(), this );
@@ -4154,8 +4154,8 @@ void PropertyEditor::setWidget( TQObject *w, FormWindow *fw )
     if ( !w || !fw ) {
 	setCaption( tr( "Property Editor" ) );
 	clear();
-	wid = 0;
-	formwindow = 0;
+	wid = nullptr;
+	formwindow = nullptr;
 	return;
     }
 
@@ -4209,8 +4209,8 @@ void PropertyEditor::emitWidgetChanged()
 void PropertyEditor::closed( FormWindow *w )
 {
     if ( w == formwindow ) {
-	formwindow = 0;
-	wid = 0;
+	formwindow = nullptr;
+	wid = nullptr;
 	clear();
     }
 }
@@ -4259,7 +4259,7 @@ TQString PropertyEditor::classOfCurrentProperty() const
 TQMetaObject* PropertyEditor::metaObjectOfCurrentProperty() const
 {
     if ( !wid )
-	return 0;
+	return nullptr;
     return wid->metaObject();
 }
 
diff --git a/tools/designer/designer/propertyeditor.h b/tools/designer/designer/propertyeditor.h
index f45a1cd3d..bb765aa76 100644
--- a/tools/designer/designer/propertyeditor.h
+++ b/tools/designer/designer/propertyeditor.h
@@ -608,7 +608,7 @@ class EnumBox : public TQComboBox
     TQ_OBJECT
 
 public:
-    EnumBox( TQWidget *parent, const char *name = 0 );
+    EnumBox( TQWidget *parent, const char *name = nullptr );
     ~EnumBox() {}
     void setText( const TQString &text );
     void insertEnums( TQValueList<EnumItem> lst );
diff --git a/tools/designer/designer/propertyobject.cpp b/tools/designer/designer/propertyobject.cpp
index 96a8fab5f..102d1319a 100644
--- a/tools/designer/designer/propertyobject.cpp
+++ b/tools/designer/designer/propertyobject.cpp
@@ -39,7 +39,7 @@
 #include <tqvariant.h>
 
 PropertyObject::PropertyObject( const TQWidgetList &objs )
-    : TQObject(), objects( objs ), mobj( 0 )
+    : TQObject(), objects( objs ), mobj( nullptr )
 {
     TQPtrVector<TQPtrList<TQMetaObject> > v;
     v.resize( objects.count() );
diff --git a/tools/designer/designer/replacedialog.ui.h b/tools/designer/designer/replacedialog.ui.h
index f5ad431d8..f3eb49db3 100644
--- a/tools/designer/designer/replacedialog.ui.h
+++ b/tools/designer/designer/replacedialog.ui.h
@@ -34,16 +34,16 @@
 
 void ReplaceDialog::init()
 {
-    editor = 0;
-    formWindow = 0;
+    editor = nullptr;
+    formWindow = nullptr;
 }
 
 void ReplaceDialog::destroy()
 {
     if ( editor )
 	editor->release();
-    editor = 0;
-    formWindow = 0;
+    editor = nullptr;
+    formWindow = nullptr;
 }
 
 void ReplaceDialog::doReplace()
diff --git a/tools/designer/designer/resource.cpp b/tools/designer/designer/resource.cpp
index f42cbb82b..dd45b1117 100644
--- a/tools/designer/designer/resource.cpp
+++ b/tools/designer/designer/resource.cpp
@@ -276,25 +276,25 @@ static TQString mkBool( bool b )
 
 Resource::Resource()
 {
-    mainwindow = 0;
-    formwindow = 0;
-    toplevel = 0;
+    mainwindow = nullptr;
+    formwindow = nullptr;
+    toplevel = nullptr;
     copying = false;
     pasting = false;
     hadGeometry = false;
-    langIface = 0;
+    langIface = nullptr;
     hasFunctions = false;
 }
 
 Resource::Resource( MainWindow* mw )
     : mainwindow( mw )
 {
-    formwindow = 0;
-    toplevel = 0;
+    formwindow = nullptr;
+    toplevel = nullptr;
     copying = false;
     pasting = false;
     hadGeometry = false;
-    langIface = 0;
+    langIface = nullptr;
     hasFunctions = false;
 }
 
@@ -345,8 +345,8 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
 
     DomTool::fixDocument( doc );
 
-    TQWidget *p = mainwindow ? mainwindow->qWorkspace() : 0;
-    toplevel = formwindow = new FormWindow( ff, p, 0 );
+    TQWidget *p = mainwindow ? mainwindow->qWorkspace() : nullptr;
+    toplevel = formwindow = new FormWindow( ff, p, nullptr );
     if ( defProject )
 	formwindow->setProject( defProject );
     else if ( MainWindow::self )
@@ -725,7 +725,7 @@ bool Resource::save( TQIODevice* dev )
 
     ts << "<!DOCTYPE UI><UI version=\"3.3\" stdsetdef=\"1\">" << endl;
     saveMetaInfoBefore( ts, 0 );
-    saveObject( formwindow->mainContainer(), 0, ts, 0 );
+    saveObject( formwindow->mainContainer(), nullptr, ts, 0 );
     if ( ::tqt_cast<TQMainWindow*>(formwindow->mainContainer()) ) {
 	saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
 	saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
@@ -771,7 +771,7 @@ TQString Resource::copy()
 	    p = p->parentWidget();
 	}
 	if ( save )
-	    saveObject( w, 0, ts, 0 );
+	    saveObject( w, nullptr, ts, 0 );
     }
     if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() )
 	saveCustomWidgets( ts, 0 );
@@ -817,7 +817,7 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
     formwindow->clearSelection( false );
     while ( !firstWidget.isNull() ) {
 	if ( firstWidget.tagName() == "widget" ) {
-	    TQWidget *w = (TQWidget*)createObject( firstWidget, parent, 0 );
+	    TQWidget *w = (TQWidget*)createObject( firstWidget, parent, nullptr );
 	    if ( !w )
 		continue;
 	    widgets.append( w );
@@ -831,7 +831,7 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
 		w->move( x, y );
 	    formwindow->selectWidget( w );
 	} else if ( firstWidget.tagName() == "spacer" ) {
-	    TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? TQt::Vertical : TQt::Horizontal );
+	    TQWidget *w = createSpacer( firstWidget, parent, nullptr, firstWidget.tagName() == "vspacer" ? TQt::Vertical : TQt::Horizontal );
 	    if ( !w )
 		continue;
 	    widgets.append( w );
@@ -918,7 +918,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre
 	return;
     }
 
-    TQDesignerWidgetStack* ws = 0;
+    TQDesignerWidgetStack* ws = nullptr;
 
     if ( ::tqt_cast<TQTabWidget*>(obj) ) {
 	TQTabWidget* tw = (TQTabWidget*) obj;
@@ -952,7 +952,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre
 	    ts << makeIndent( indent ) << "</widget>" << endl;
 	}
 	delete tmpl;
-    } else if ( (ws = ::tqt_cast<TQDesignerWidgetStack*>(obj)) != 0 ) {
+    } else if ( (ws = ::tqt_cast<TQDesignerWidgetStack*>(obj)) ) {
 	for ( int i = 0; i < ws->count(); ++i ) {
 	    TQWidget *w = ws->page( i );
 	    if ( !w )
@@ -1035,10 +1035,10 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre
 	bool saved = false;
 #ifdef QT_CONTAINER_CUSTOM_WIDGETS
 	if ( isPlugin ) {
-	    WidgetInterface *iface = 0;
+	    WidgetInterface *iface = nullptr;
 	    widgetManager()->queryInterface( className, &iface );
 	    if ( iface ) {
-		TQWidgetContainerInterfacePrivate *iface2 = 0;
+		TQWidgetContainerInterfacePrivate *iface2 = nullptr;
 		iface->queryInterface( IID_QWidgetContainer, (TQUnknownInterface**)&iface2 );
 		if ( iface2 ) {
 		    if ( iface2->supportsPages( className ) )  {
@@ -1165,14 +1165,14 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre
 void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
 {
     if ( ::tqt_cast<TQListBox*>(obj) || ::tqt_cast<TQComboBox*>(obj) ) {
-	TQListBox *lb = 0;
+	TQListBox *lb = nullptr;
 	if ( ::tqt_cast<TQListBox*>(obj) ) {
 	    lb = (TQListBox*)obj;
 	} else {
             TQComboBox *cb = (TQComboBox*)obj;
 	    lb = cb->listBox();
             if (!lb) {
-                TQPopupMenu *popup = (TQPopupMenu*)cb->child( 0, "TQPopupMenu" );
+                TQPopupMenu *popup = (TQPopupMenu*)cb->child( nullptr, "TQPopupMenu" );
                 Q_ASSERT(popup);
                 for ( int id = 0; id < (int)popup->count(); ++id ) {
                     ts << makeIndent( indent ) << "<item>" << endl;
@@ -1418,8 +1418,8 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
 
     TQString closeTag;
     // if the widget has a layout we pretend that all widget's childs are childs of the layout - makes the structure nicer
-    TQLayout *layout = 0;
-    TQDesignerGridLayout* grid = 0;
+    TQLayout *layout = nullptr;
+    TQDesignerGridLayout* grid = nullptr;
     if ( !::tqt_cast<TQSplitter*>(obj) &&
 	 WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) &&
 	 obj->isWidgetType() &&
@@ -1452,7 +1452,7 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
 
     }
 
-    TQObject *o = 0;
+    TQObject *o = nullptr;
     for ( TQPtrListIterator<TQObject> it ( *l ); ( o = it.current() ); ++it )
 	if ( !TQString( o->name() ).startsWith( "qt_dead_widget_" ) )
 	    saveObject( o, grid, ts, indent );
@@ -1831,10 +1831,10 @@ void Resource::saveColor( TQTextStream &ts, int indent, const TQColor &c )
 
 TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout )
 {
-    lastItem = 0;
+    lastItem = nullptr;
     TQDomElement n = e.firstChild().toElement();
-    TQWidget *w = 0; // the widget that got created
-    TQObject *obj = 0; // gets the properties
+    TQWidget *w = nullptr; // the widget that got created
+    TQObject *obj = nullptr; // gets the properties
 
     int row = e.attribute( "row" ).toInt();
     int col = e.attribute( "column" ).toInt();
@@ -1855,14 +1855,14 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
     // ### TODO loading for custom container widgets without pages
 #endif
     if ( !className.isNull() ) {
-	obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, false );
+	obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, nullptr, false );
 	if ( !obj ) {
 	    TQMessageBox::critical( MainWindow::self, MainWindow::tr( "Loading File" ),
 				   MainWindow::tr( "Error loading %1.\n"
 						   "The widget %2 couldn't be created.\n"
                                                    "Information may be lost if this form is saved." ).
 				   arg( currFileName ).arg( className ) );
-	    return 0;
+	    return nullptr;
 	}
 	if ( !mainContainerSet ) {
 	    if ( formwindow )
@@ -1891,7 +1891,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
 
 	if ( !toplevel )
 	    toplevel = w;
-	layout = 0;
+	layout = nullptr;
 
 	if ( w && formwindow ) {
 	    if ( !parent ||
@@ -1918,7 +1918,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
     }
 
     TQDomElement sizePolicyElement;
-    TQObject *sizePolicyObject = 0;
+    TQObject *sizePolicyObject = nullptr;
 
     while ( !n.isNull() ) {
 	if ( n.tagName() == "spacer" ) {
@@ -1966,10 +1966,10 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
 #ifdef QT_CONTAINER_CUSTOM_WIDGETS
 	    } else if ( isPlugin ) {
 		if ( attrib == "label" ) {
-		    WidgetInterface *iface = 0;
+		    WidgetInterface *iface = nullptr;
 		    widgetManager()->queryInterface( parentClassName, &iface );
 		    if ( iface ) {
-			TQWidgetContainerInterfacePrivate *iface2 = 0;
+			TQWidgetContainerInterfacePrivate *iface2 = nullptr;
 			iface->queryInterface( IID_QWidgetContainer, (TQUnknownInterface**)&iface2 );
 			if ( iface2 ) {
 			    iface2->insertPage( parentClassName,
@@ -2115,7 +2115,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
 	bool hasPixmap = false;
 	TQString txt;
 	loadItem( n, pix, txt, hasPixmap );
-	TQListBox *lb = 0;
+	TQListBox *lb = nullptr;
 	if ( ::tqt_cast<TQListBox*>(widget) ) {
 	    lb = (TQListBox*)widget;
 	} else {
@@ -2147,7 +2147,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
 	TQPixmap pix;
 	TQValueList<TQPixmap> pixmaps;
 	TQStringList textes;
-	TQListViewItem *item = 0;
+	TQListViewItem *item = nullptr;
 	TQListView *lv = (TQListView*)widget;
 	if ( i )
 	    item = new TQListViewItem( i, lastItem );
@@ -2585,19 +2585,19 @@ void Resource::loadConnections( const TQDomElement &e )
 	    MetaDataBase::Connection conn;
 	    while ( !n2.isNull() ) {
 		if ( n2.tagName() == "sender" ) {
-		    conn.sender = 0;
+		    conn.sender = nullptr;
 		    TQString name = n2.firstChild().toText().data();
 		    if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
 			conn.sender = toplevel;
 		    } else {
 			if ( name == "this" )
 			    name = toplevel->name();
-			TQObjectList *l = toplevel->queryList( 0, name, false );
+			TQObjectList *l = toplevel->queryList( nullptr, name, false );
 			if ( l ) {
 			    if ( l->first() )
 				conn.sender = l->first();
 			    delete l;
-			    l = 0;
+			    l = nullptr;
 			}
 			if ( !conn.sender )
 			    conn.sender = formwindow->findAction( name );
@@ -2605,17 +2605,17 @@ void Resource::loadConnections( const TQDomElement &e )
 		} else if ( n2.tagName() == "signal" ) {
 		    conn.signal = n2.firstChild().toText().data();
 		} else if ( n2.tagName() == "receiver" ) {
-		    conn.receiver = 0;
+		    conn.receiver = nullptr;
 		    TQString name = n2.firstChild().toText().data();
 		    if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
 			conn.receiver = toplevel;
 		    } else {
-			TQObjectList *l = toplevel->queryList( 0, name, false );
+			TQObjectList *l = toplevel->queryList( nullptr, name, false );
 			if ( l ) {
 			    if ( l->first() )
 				conn.receiver = l->first();
 			    delete l;
-			    l = 0;
+			    l = nullptr;
 			}
 			if ( !conn.receiver )
 			    conn.receiver = formwindow->findAction( name );
@@ -2815,7 +2815,7 @@ void Resource::saveTabOrder( TQTextStream &ts, int indent )
 
 void Resource::loadTabOrder( const TQDomElement &e )
 {
-    TQWidget *last = 0;
+    TQWidget *last = nullptr;
     TQDomElement n = e.firstChild().toElement();
     TQWidgetList widgets;
     while ( !n.isNull() ) {
@@ -2823,7 +2823,7 @@ void Resource::loadTabOrder( const TQDomElement &e )
 	    TQString name = n.firstChild().toText().data();
 	    if ( name.isEmpty() )
 		continue;
-	    TQObjectList *l = toplevel->queryList( 0, name, false );
+	    TQObjectList *l = toplevel->queryList( nullptr, name, false );
 	    if ( l ) {
 		if ( l->first() ) {
 		    TQWidget *w = (TQWidget*)l->first();
@@ -3078,7 +3078,7 @@ void Resource::saveActions( const TQPtrList<TQAction> &actions, TQTextStream &ts
 void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
 {
     TQDomElement n = e;
-    TQAction *a = 0;
+    TQAction *a = nullptr;
     if ( n.tagName() == "action" ) {
 	a = new TQDesignerAction( parent );
 	MetaDataBase::addEntry( a );
@@ -3187,7 +3187,7 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent )
 
 void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent )
 {
-    MenuBarEditor *mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" );
+    MenuBarEditor *mb = (MenuBarEditor *)mw->child( nullptr, "MenuBarEditor" );
     if ( !mb )
 	return;
     ts << makeIndent( indent ) << "<menubar>" << endl;
@@ -3243,7 +3243,7 @@ void Resource::loadToolBars( const TQDomElement &e )
 {
     TQDomElement n = e.firstChild().toElement();
     TQMainWindow *mw = ( (TQMainWindow*)formwindow->mainContainer() );
-    TQDesignerToolBar *tb = 0;
+    TQDesignerToolBar *tb = nullptr;
     while ( !n.isNull() ) {
 	if ( n.tagName() == "toolbar" ) {
 	    TQt::Dock dock = (TQt::Dock)n.attribute( "dock" ).toInt();
@@ -3257,7 +3257,7 @@ void Resource::loadToolBars( const TQDomElement &e )
 			tb->addAction( a );
 		    }
 		} else if ( n2.tagName() == "separator" ) {
-		    TQAction *a = new TQSeparatorAction( 0 );
+		    TQAction *a = new TQSeparatorAction( nullptr );
 		    a->addTo( tb );
 		    tb->addAction( a );
 		} else if ( n2.tagName() == "widget" ) {
@@ -3302,7 +3302,7 @@ void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e )
 {
     MetaDataBase::addEntry( p );
     TQDomElement n = e.firstChild().toElement();
-    TQAction *a = 0;
+    TQAction *a = nullptr;
     while ( !n.isNull() ) {
 	if ( n.tagName() == "action" || n.tagName() == "actiongroup") {
 	    a = formwindow->findAction( n.attribute( "name" ) );
@@ -3319,7 +3319,7 @@ void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e )
 		loadPopupMenu( i->subMenu(), n );
 	    }
 	} else if ( n.tagName() == "separator" ) {
-	    a = new TQSeparatorAction( 0 );
+	    a = new TQSeparatorAction( nullptr );
 	    p->insert( a );
 	}
 	n = n.nextSibling().toElement();
diff --git a/tools/designer/designer/resource.h b/tools/designer/designer/resource.h
index 0ff070767..080a45c08 100644
--- a/tools/designer/designer/resource.h
+++ b/tools/designer/designer/resource.h
@@ -78,8 +78,8 @@ public:
     void setWidget( FormWindow *w );
     TQWidget *widget() const;
 
-    bool load( FormFile *ff, Project *defProject = 0 );
-    bool load( FormFile *ff, TQIODevice*, Project *defProject = 0 );
+    bool load( FormFile *ff, Project *defProject = nullptr );
+    bool load( FormFile *ff, TQIODevice*, Project *defProject = nullptr );
     TQString copy();
 
     bool save( const TQString& filename, bool formCodeOnly = false);
@@ -117,9 +117,9 @@ private:
     void saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent );
     void savePopupMenu( PopupMenuEditor *pm, TQMainWindow *mw, TQTextStream &ts, int indent );
 
-    TQObject *createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout = 0 );
+    TQObject *createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout = nullptr );
     TQWidget *createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, TQt::Orientation o );
-    void createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i = 0 );
+    void createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i = nullptr );
     void createColumn( const TQDomElement &e, TQWidget *widget );
     void setObjectProperty( TQObject* widget, const TQString &prop, const TQDomElement &e);
     TQString saveInCollection( const TQImage &img );
diff --git a/tools/designer/designer/sizehandle.cpp b/tools/designer/designer/sizehandle.cpp
index c8a1edc3d..1f1f580fa 100644
--- a/tools/designer/designer/sizehandle.cpp
+++ b/tools/designer/designer/sizehandle.cpp
@@ -47,7 +47,7 @@ SizeHandle::SizeHandle( FormWindow *parent, Direction d, WidgetSelection *s )
     active = true;
     setBackgroundMode( active ? PaletteText : PaletteDark );
     setFixedSize( 6, 6 );
-    widget = 0;
+    widget = nullptr;
     dir =d ;
     setMouseTracking( false );
     formWindow = parent;
@@ -288,7 +288,7 @@ void WidgetSelection::setWidget( TQWidget *w, bool updateDict )
 	hide();
 	if ( updateDict )
 	    selectionDict->remove( wid );
-	wid = 0;
+	wid = nullptr;
 	return;
     }
 
@@ -309,7 +309,7 @@ void WidgetSelection::setWidget( TQWidget *w, bool updateDict )
 
 bool WidgetSelection::isUsed() const
 {
-    return wid != 0;
+    return wid;
 }
 
 void WidgetSelection::updateGeometry()
diff --git a/tools/designer/designer/sourceeditor.cpp b/tools/designer/designer/sourceeditor.cpp
index a22a4e5fa..491b7dd59 100644
--- a/tools/designer/designer/sourceeditor.cpp
+++ b/tools/designer/designer/sourceeditor.cpp
@@ -46,7 +46,7 @@
 #include <tqtextstream.h>
 
 SourceEditor::SourceEditor( TQWidget *parent, EditorInterface *iface, LanguageInterface *liface )
-    : TQVBox( parent, 0, WDestructiveClose ), iFace( iface ), lIface( liface ), obj( 0 ), pro( 0 )
+    : TQVBox( parent, nullptr, WDestructiveClose ), iFace( iface ), lIface( liface ), obj( nullptr ), pro( nullptr )
 {
     iFace->addRef();
     lIface->addRef();
@@ -60,14 +60,14 @@ SourceEditor::SourceEditor( TQWidget *parent, EditorInterface *iface, LanguageIn
 SourceEditor::~SourceEditor()
 {
     saveBreakPoints();
-    editor = 0;
+    editor = nullptr;
     if ( formWindow() ) {
 	formWindow()->formFile()->setCodeEdited( false );
-	formWindow()->formFile()->setEditor( 0 );
+	formWindow()->formFile()->setEditor( nullptr );
     } else if ( sourceFile() ) {
-	sourceFile()->setEditor( 0 );
+	sourceFile()->setEditor( nullptr );
 	if ( MainWindow::self->objectHierarchy()->sourceEditor() == this )
-	    MainWindow::self->objectHierarchy()->setFormWindow( 0, 0 );
+	    MainWindow::self->objectHierarchy()->setFormWindow( nullptr, nullptr );
     }
     iFace->release();
     lIface->release();
@@ -77,10 +77,10 @@ SourceEditor::~SourceEditor()
 void SourceEditor::setObject( TQObject *o, Project *p )
 {
     if ( sourceFile() )
-	sourceFile()->setEditor( 0 );
+	sourceFile()->setEditor( nullptr );
     if ( formWindow() ) {
 	formWindow()->formFile()->setCodeEdited( false );
-	formWindow()->formFile()->setEditor( 0 );
+	formWindow()->formFile()->setEditor( nullptr );
     }
     if ( ::tqt_cast<FormWindow*>(o) )
 	( (FormWindow*)o )->formFile()->setCodeEdited( true );
@@ -111,7 +111,7 @@ void SourceEditor::setObject( TQObject *o, Project *p )
 	else
 	    iFace->setContext( formWindow()->mainContainer() );
     } else {
-	iFace->setContext( 0 );
+	iFace->setContext( nullptr );
     }
     if ( changed || sourceFile() )
 	iFace->setBreakPoints( MetaDataBase::breakPoints( o ) );
@@ -242,7 +242,7 @@ void SourceEditor::resetContext()
 	else
 	    iFace->setContext( formWindow()->mainContainer() );
     } else {
-	iFace->setContext( 0 );
+	iFace->setContext( nullptr );
     }
 }
 
@@ -313,13 +313,13 @@ bool SourceEditor::saveAs()
 SourceFile *SourceEditor::sourceFile() const
 {
     if ( !::tqt_cast<SourceFile*>((TQObject *)obj) )
-	return 0;
+	return nullptr;
     return (SourceFile*)(TQObject*)obj;
 }
 
 FormWindow *SourceEditor::formWindow() const
 {
     if ( !::tqt_cast<FormWindow*>((TQObject *)obj) )
-	return 0;
+	return nullptr;
     return (FormWindow*)(TQObject*)obj;
 }
diff --git a/tools/designer/designer/sourcefile.cpp b/tools/designer/designer/sourcefile.cpp
index af449bfb5..48119246b 100644
--- a/tools/designer/designer/sourcefile.cpp
+++ b/tools/designer/designer/sourcefile.cpp
@@ -45,11 +45,11 @@
 #include <stdlib.h>
 
 SourceFile::SourceFile( const TQString &fn, bool temp, Project *p )
-    : filename( fn ), ed( 0 ), fileNameTemp( temp ),
-      timeStamp( 0, p->makeAbsolute( fn ) ), pro( p ), pkg( false )
+    : filename( fn ), ed( nullptr ), fileNameTemp( temp ),
+      timeStamp( nullptr, p->makeAbsolute( fn ) ), pro( p ), pkg( false )
       , accepted( true )
 {
-    iface = 0;
+    iface = nullptr;
     
     if ( !temp )
 	accepted = checkFileName( true );
diff --git a/tools/designer/designer/startdialogimpl.cpp b/tools/designer/designer/startdialogimpl.cpp
index cb422c477..9bd54cbc0 100644
--- a/tools/designer/designer/startdialogimpl.cpp
+++ b/tools/designer/designer/startdialogimpl.cpp
@@ -33,7 +33,7 @@ void FileDialog::accept()
 
 
 StartDialog::StartDialog( TQWidget *parent, const TQString &templatePath )
-    : StartDialogBase( parent, 0 )
+    : StartDialogBase( parent, nullptr )
 {
     newForm = new NewForm( templateView, templatePath );
     recentFiles.clear();
@@ -149,7 +149,7 @@ void StartDialog::initFileOpen()
     TQObjectList *l = fd->queryList( "TQPushButton" );
     TQObjectListIt it( *l );
     TQObject *obj;
-    while ( (obj = it.current()) != 0 ) {
+    while ( (obj = it.current()) ) {
         ++it;
 	((TQPushButton*)obj)->hide();
     }
diff --git a/tools/designer/designer/styledbutton.cpp b/tools/designer/designer/styledbutton.cpp
index 53602cb32..cb1bae211 100644
--- a/tools/designer/designer/styledbutton.cpp
+++ b/tools/designer/designer/styledbutton.cpp
@@ -46,7 +46,7 @@
 #include <tqstyle.h>
 
 StyledButton::StyledButton(TQWidget* parent, const char* name)
-    : TQButton( parent, name ), pix( 0 ), spix( 0 ), s( 0 ), formWindow( 0 ), mousePressed( false )
+    : TQButton( parent, name ), pix( nullptr ), spix( nullptr ), s( 0 ), formWindow( nullptr ), mousePressed( false )
 {
     setMinimumSize( minimumSizeHint() );
     setAcceptDrops( true );
@@ -57,7 +57,7 @@ StyledButton::StyledButton(TQWidget* parent, const char* name)
 }
 
 StyledButton::StyledButton( const TQBrush& b, TQWidget* parent, const char* name, WFlags f )
-    : TQButton( parent, name, f ), spix( 0 ), s( 0 ), formWindow( 0 )
+    : TQButton( parent, name, f ), spix( nullptr ), s( 0 ), formWindow( nullptr )
 {
     col = b.color();
     pix = b.pixmap();
@@ -95,7 +95,7 @@ void StyledButton::setPixmap( const TQPixmap & pm )
 	pix = new TQPixmap( pm );
     } else {
 	delete pix;
-	pix = 0;
+	pix = nullptr;
     }
     scalePixmap();
 }
@@ -144,7 +144,7 @@ void StyledButton::scalePixmap()
 
 	spix->convertFromImage( s? img.smoothScale( 6*width()/8, 6*height()/8 ) : img );
     } else {
-	spix = 0;
+	spix = nullptr;
     }
 
     update();
diff --git a/tools/designer/designer/styledbutton.h b/tools/designer/designer/styledbutton.h
index d57cd6984..ef9d02120 100644
--- a/tools/designer/designer/styledbutton.h
+++ b/tools/designer/designer/styledbutton.h
@@ -55,8 +55,8 @@ class StyledButton : public TQButton
 public:
     enum EditorType { ColorEditor, PixmapEditor };
 
-    StyledButton( TQWidget* parent = 0, const char* name = 0 );
-    StyledButton( const TQBrush& b, TQWidget* parent = 0, const char* name = 0, WFlags f = 0 );
+    StyledButton( TQWidget* parent = nullptr, const char* name = nullptr );
+    StyledButton( const TQBrush& b, TQWidget* parent = nullptr, const char* name = nullptr, WFlags f = 0 );
     ~StyledButton();
 
     void setEditor( EditorType );
diff --git a/tools/designer/designer/syntaxhighlighter_html.cpp b/tools/designer/designer/syntaxhighlighter_html.cpp
index eb0dfb4ce..39f9e9429 100644
--- a/tools/designer/designer/syntaxhighlighter_html.cpp
+++ b/tools/designer/designer/syntaxhighlighter_html.cpp
@@ -39,7 +39,7 @@
 
 
 SyntaxHighlighter_HTML::SyntaxHighlighter_HTML()
-    : TQTextPreProcessor(), lastFormat( 0 ), lastFormatId( -1 )
+    : TQTextPreProcessor(), lastFormat( nullptr ), lastFormatId( -1 )
 {
     TQFont f( tqApp->font() );
 
diff --git a/tools/designer/designer/tableeditorimpl.h b/tools/designer/designer/tableeditorimpl.h
index 20da697c8..f793be03e 100644
--- a/tools/designer/designer/tableeditorimpl.h
+++ b/tools/designer/designer/tableeditorimpl.h
@@ -46,8 +46,8 @@ class TableEditor : public TableEditorBase
     TQ_OBJECT
 
 public:
-    TableEditor( TQWidget* parent = 0, TQWidget *editWidget = 0, FormWindow *fw = 0,
-		 const char* name = 0, bool modal = false, WFlags fl = 0 );
+    TableEditor( TQWidget* parent = nullptr, TQWidget *editWidget = nullptr, FormWindow *fw = nullptr,
+		 const char* name = nullptr, bool modal = false, WFlags fl = 0 );
     ~TableEditor();
 
 protected slots:
diff --git a/tools/designer/designer/tqcompletionedit.cpp b/tools/designer/designer/tqcompletionedit.cpp
index 870fe02fc..f0a6f241c 100644
--- a/tools/designer/designer/tqcompletionedit.cpp
+++ b/tools/designer/designer/tqcompletionedit.cpp
@@ -40,7 +40,7 @@
 TQCompletionEdit::TQCompletionEdit( TQWidget *parent, const char *name )
     : TQLineEdit( parent, name ), aAdd( false ), caseSensitive( false )
 {
-    popup = new TQVBox( 0, 0, WType_Popup );
+    popup = new TQVBox( nullptr, nullptr, WType_Popup );
     popup->setFrameStyle( TQFrame::Box | TQFrame::Plain );
     popup->setLineWidth( 1 );
     popup->hide();
diff --git a/tools/designer/designer/tqcompletionedit.h b/tools/designer/designer/tqcompletionedit.h
index 792f74002..322b1a98c 100644
--- a/tools/designer/designer/tqcompletionedit.h
+++ b/tools/designer/designer/tqcompletionedit.h
@@ -47,7 +47,7 @@ class TQCompletionEdit : public TQLineEdit
     TQ_PROPERTY( bool caseSensitive READ isCaseSensitive WRITE setCaseSensitive )
 
 public:
-    TQCompletionEdit( TQWidget *parent = 0, const char *name = 0 );
+    TQCompletionEdit( TQWidget *parent = nullptr, const char *name = nullptr );
 
     bool autoAdd() const;
     TQStringList completionList() const;
diff --git a/tools/designer/designer/variabledialogimpl.cpp b/tools/designer/designer/variabledialogimpl.cpp
index a0f84470c..41d7b5dcb 100644
--- a/tools/designer/designer/variabledialogimpl.cpp
+++ b/tools/designer/designer/variabledialogimpl.cpp
@@ -79,7 +79,7 @@ void VariableDialog::okClicked()
     TQValueList<MetaDataBase::Variable> lst;
 
     TQListViewItemIterator it( varView );
-    while ( it.current() != 0 ) {
+    while ( it.current() ) {
 	MetaDataBase::Variable v;
 	v.varName = it.current()->text( 0 ).simplifyWhiteSpace();
 	if ( v.varName[ (int)v.varName.length() - 1 ] != ';' )
@@ -110,7 +110,7 @@ void VariableDialog::okClicked()
 					   "Remove this variable?" ), tr( "&Yes" ), tr( "&No" ) ) == 0 ) {
 		for ( it2 = invalidLst.begin(); it2 != invalidLst.end(); ++it2 ) {
 		    it = varView->firstChild();
-		    while ( it.current() != 0 ) {
+		    while ( it.current() ) {
 			if ( MetaDataBase::extractVariableName( (*it)->text( 0 ).simplifyWhiteSpace() ) ==
 			     MetaDataBase::extractVariableName( (*it2).varName ) ) {
 			    delete (*it);
@@ -147,7 +147,7 @@ void VariableDialog::deleteVariable()
     if ( !i )
 	return;
     delete i;
-    i = 0;
+    i = nullptr;
     if ( varView->firstChild() )
 	varView->setSelected( varView->firstChild(), true );
 }
diff --git a/tools/designer/designer/variabledialogimpl.h b/tools/designer/designer/variabledialogimpl.h
index adc6f9643..4574af5c1 100644
--- a/tools/designer/designer/variabledialogimpl.h
+++ b/tools/designer/designer/variabledialogimpl.h
@@ -43,7 +43,7 @@ class VariableDialog : public VariableDialogBase
 {
     TQ_OBJECT
 public:
-    VariableDialog( FormWindow *fw, TQWidget* parent = 0 );
+    VariableDialog( FormWindow *fw, TQWidget* parent = nullptr );
     ~VariableDialog();
 
     void setCurrentItem( TQString text );
diff --git a/tools/designer/designer/widgetaction.cpp b/tools/designer/designer/widgetaction.cpp
index bf3a44881..4e2ca27df 100644
--- a/tools/designer/designer/widgetaction.cpp
+++ b/tools/designer/designer/widgetaction.cpp
@@ -38,7 +38,7 @@
 #include <tqstylefactory.h>
 #include <tqstyle.h>
 
-static TQStyle *windowsStyle = 0;
+static TQStyle *windowsStyle = nullptr;
 
 void WidgetAction::addedTo( TQWidget *w, TQWidget *container )
 {
diff --git a/tools/designer/designer/widgetaction.h b/tools/designer/designer/widgetaction.h
index 8f5b83601..9aa297a66 100644
--- a/tools/designer/designer/widgetaction.h
+++ b/tools/designer/designer/widgetaction.h
@@ -42,15 +42,15 @@ class WidgetAction : public TQAction
 
 public:
     WidgetAction( const TQString &grp, TQObject* parent,
-		  const char* name = 0, bool toggle = false  )
+		  const char* name = nullptr, bool toggle = false  )
 	: TQAction( parent, name, toggle ) { init( grp ); }
     WidgetAction( const TQString &grp, const TQString& text,
 		  const TQIconSet& icon, const TQString& menuText, TQKeySequence accel,
-		  TQObject* parent, const char* name = 0, bool toggle = false )
+		  TQObject* parent, const char* name = nullptr, bool toggle = false )
 	: TQAction( text, icon, menuText, accel, parent, name, toggle ) { init( grp ); }
     WidgetAction( const TQString &grp, const TQString& text,
 		  const TQString& menuText, TQKeySequence accel, TQObject* parent,
-		  const char* name = 0, bool toggle = false )
+		  const char* name = nullptr, bool toggle = false )
 	: TQAction( text, menuText, accel, parent, name, toggle ) { init( grp ); }
     ~WidgetAction();
 
diff --git a/tools/designer/designer/widgetfactory.cpp b/tools/designer/designer/widgetfactory.cpp
index 92f95e846..ff57836a9 100644
--- a/tools/designer/designer/widgetfactory.cpp
+++ b/tools/designer/designer/widgetfactory.cpp
@@ -106,12 +106,12 @@
 FormWindow *find_formwindow( TQWidget *w )
 {
     if ( !w )
-	return 0;
+	return nullptr;
     for (;;) {
 	if ( ::tqt_cast<FormWindow*>(w) )
 	    return (FormWindow*)w;
 	if ( !w->parentWidget() )
-	    return 0;
+	    return nullptr;
 	w = w->parentWidget();
     }
 }
@@ -125,7 +125,7 @@ void TQLayoutWidget::paintEvent( TQPaintEvent* )
 
 
 TQDesignerTabWidget::TQDesignerTabWidget( TQWidget *parent, const char *name )
-    : TQTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false )
+    : TQTabWidget( parent, name ), dropIndicator( nullptr ), dragPage( nullptr ), mousePressed( false )
 {
     tabBar()->setAcceptDrops( true );
     tabBar()->installEventFilter( this );
@@ -368,7 +368,7 @@ int TQDesignerWidgetStack::count() const
 TQWidget* TQDesignerWidgetStack::page( int i ) const
 {
     if ( i < 0 || i >= count() )
-	return 0;
+	return nullptr;
     TQDesignerWidgetStack* that = (TQDesignerWidgetStack*) this;
     return that->pages.at( i );
 }
@@ -482,8 +482,8 @@ void TQDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index )
 	removedPages.remove( p );
 }
 
-TQMap< int, TQMap< TQString, TQVariant> > *defaultProperties = 0;
-TQMap< int, TQStringList > *changedProperties = 0;
+TQMap< int, TQMap< TQString, TQVariant> > *defaultProperties = nullptr;
+TQMap< int, TQStringList > *changedProperties = nullptr;
 
 /*!
   \class WidgetFactory widgetfactory.h
@@ -527,14 +527,14 @@ TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, boo
 {
     TQString n = WidgetDatabase::className( id );
     if ( n.isEmpty() )
-	return 0;
+	return nullptr;
 
     if ( !defaultProperties ) {
 	defaultProperties = new TQMap< int, TQMap< TQString, TQVariant> >();
 	changedProperties = new TQMap< int, TQStringList >();
     }
 
-    TQWidget *w = 0;
+    TQWidget *w = nullptr;
     TQString str = WidgetDatabase::createWidgetName( id );
     const char *s = str.latin1();
     w = createWidget( n, parent, name ? name : s, init, r, orient );
@@ -543,7 +543,7 @@ TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, boo
     if ( !w && WidgetDatabase::isCustomWidget( id ) )
 	w = createCustomWidget( parent, name ? name : s, MetaDataBase::customWidget( id ) );
     if ( !w )
-	return 0;
+	return nullptr;
     MetaDataBase::addEntry( w );
 
     if ( !defaultProperties->contains( id ) )
@@ -588,7 +588,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
 
     MetaDataBase::addEntry( widget );
 
-    TQLayout *l = 0;
+    TQLayout *l = nullptr;
     int align = 0;
     if ( !layout && ::tqt_cast<TQGroupBox*>(widget) ) {
 	TQGroupBox *gb = (TQGroupBox*)widget;
@@ -607,7 +607,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
 	    l = new TQDesignerGridLayout( layout );
 	    break;
 	default:
-	    return 0;
+	    return nullptr;
 	}
 	align = TQt::AlignTop;
 	MetaDataBase::setMargin( gb, metamargin );
@@ -625,7 +625,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
 		l = new TQDesignerGridLayout( layout );
 		break;
 	    default:
-		return 0;
+		return nullptr;
 	    }
 	    MetaDataBase::addEntry( l );
 	    l->setSpacing( spacing );
@@ -642,7 +642,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
 		l = new TQDesignerGridLayout( widget );
 		break;
 	    default:
-		return 0;
+		return nullptr;
 	    }
 	    MetaDataBase::addEntry( l );
 	    if ( widget ) {
@@ -688,7 +688,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
 				      const TQRect *r, TQt::Orientation orient )
 {
     if ( className == "TQPushButton" ) {
-	TQPushButton *b = 0;
+	TQPushButton *b = nullptr;
 	if ( init ) {
 	    b = new TQDesignerPushButton( parent, name );
 	    b->setText( TQString::fromLatin1( name ) );
@@ -849,7 +849,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
 	}
 	return new TQWidget( parent, name );
     } else if ( className == "TQDialog" ) {
-	TQDialog *dia = 0;
+	TQDialog *dia = nullptr;
 	if ( ::tqt_cast<FormWindow*>(parent) )
 	    dia = new TQDesignerDialog( (FormWindow*)parent, parent, name );
 	else
@@ -972,15 +972,15 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
     }
 #endif
 
-    WidgetInterface *iface = 0;
+    WidgetInterface *iface = nullptr;
     widgetManager()->queryInterface( className, &iface );
     if ( !iface )
-	return 0;
+	return nullptr;
 
     TQWidget *w = iface->create( className, parent, name );
 #ifdef QT_CONTAINER_CUSTOM_WIDGETS
     if ( init && WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( className ) ) ) {
-	TQWidgetContainerInterfacePrivate *iface2 = 0;
+	TQWidgetContainerInterfacePrivate *iface2 = nullptr;
 	iface->queryInterface( IID_QWidgetContainer, (TQUnknownInterface**)&iface2 );
 	if ( iface2 ) {
 	    iface2->addPage( className, w, "Page", -1 );
@@ -1001,7 +1001,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
 
 WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&layout )
 {
-    layout = 0;
+    layout = nullptr;
 
     if ( ::tqt_cast<TQTabWidget*>(w) )
 	w = ((TQTabWidget*)w)->currentPage();
@@ -1057,7 +1057,7 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout )
 */
 WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w )
 {
-    TQLayout *l = 0;
+    TQLayout *l = nullptr;
     return layoutType( w, l );
 }
 
@@ -1070,7 +1070,7 @@ TQWidget *WidgetFactory::layoutParent( TQLayout *layout )
 	    return (TQWidget*)o;
 	o = o->parent();
     }
-    return 0;
+    return nullptr;
 }
 
 /*!  Returns the widget into which children should be inserted when \a
@@ -1099,11 +1099,11 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w )
 #ifdef QT_CONTAINER_CUSTOM_WIDGETS
     if ( !WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) )
 	return w;
-    WidgetInterface *iface = 0;
+    WidgetInterface *iface = nullptr;
     widgetManager()->queryInterface( classNameOf( w ), &iface );
     if ( !iface )
 	return w;
-    TQWidgetContainerInterfacePrivate *iface2 = 0;
+    TQWidgetContainerInterfacePrivate *iface2 = nullptr;
     iface->queryInterface( IID_QWidgetContainer, (TQUnknownInterface**)&iface2 );
     if ( !iface2 )
 	return w;
@@ -1180,7 +1180,7 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o )
 #ifdef QT_CONTAINER_CUSTOM_WIDGETS
     if ( !o->isWidgetType() )
 	return ( lastWasAPassiveInteractor = false );
-    WidgetInterface *iface = 0;
+    WidgetInterface *iface = nullptr;
     TQWidget *w = (TQWidget*)o;
     while ( !iface && w && !::tqt_cast<FormWindow*>(w) ) {
 	widgetManager()->queryInterface( classNameOf( w ), &iface );
@@ -1188,7 +1188,7 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o )
     }
     if ( !iface )
 	return ( lastWasAPassiveInteractor = false );
-    TQWidgetContainerInterfacePrivate *iface2 = 0;
+    TQWidgetContainerInterfacePrivate *iface2 = nullptr;
     iface->queryInterface( IID_QWidgetContainer, (TQUnknownInterface**)&iface2 );
     if ( !iface2 )
 	return ( lastWasAPassiveInteractor = false );
@@ -1375,7 +1375,7 @@ bool WidgetFactory::hasSpecialEditor( int id, TQObject *editorWidget )
 	return true;
     if ( className == "TQTextEdit" || className == "TQMultiLineEdit" )
 	return true;
-    if ( ::tqt_cast<TQTable*>(editorWidget) != 0 )
+    if ( ::tqt_cast<TQTable*>(editorWidget) )
 	return true;
 
     return false;
@@ -1387,7 +1387,7 @@ bool WidgetFactory::hasItems( int id, TQObject *editorWidget )
 
     if ( className.contains( "ListBox" ) || className.contains( "ListView" ) ||
 	 className.contains( "IconView" )  || className.contains( "ComboBox" ) ||
-	 ::tqt_cast<TQTable*>(editorWidget) != 0 )
+	 ::tqt_cast<TQTable*>(editorWidget) )
 	return true;
 
     return false;
@@ -1448,7 +1448,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
 	return;
     }
 #ifndef TQT_NO_TABLE
-    if (::tqt_cast<TQTable*>(editWidget) != 0) {
+    if (::tqt_cast<TQTable*>(editWidget)) {
 	TableEditor *e = new TableEditor( parent, editWidget, fw );
 	e->exec();
 	delete e;
@@ -1528,7 +1528,7 @@ TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propNam
 TQWidget *WidgetFactory::createCustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *w )
 {
     if ( !w )
-	return 0;
+	return nullptr;
     return new CustomWidget( parent, name, w );
 }
 
@@ -1627,12 +1627,12 @@ void TQLayoutWidget::updateSizePolicy()
 	  parentLayout is set to the parent layout if there is one and if it is
 	  top level, in which case layouting is illogical.
 	*/
-	TQLayout *parentLayout = 0;
+	TQLayout *parentLayout = nullptr;
 	if ( parent() && parent()->isWidgetType() ) {
 	    parentLayout = ((TQWidget *)parent())->layout();
 	    if ( parentLayout &&
 		 ::tqt_cast<TQLayoutWidget*>(parentLayout->mainWidget()) )
-		parentLayout = 0;
+		parentLayout = nullptr;
 	}
 
 	TQObjectListIt it( *children() );
@@ -1742,7 +1742,7 @@ TQWidget *CustomWidgetFactory::createWidget( const TQString &className, TQWidget
 {
     MetaDataBase::CustomWidget *w = MetaDataBase::customWidget( WidgetDatabase::idFromClassName( className ) );
     if ( !w )
-	return 0;
+	return nullptr;
     return WidgetFactory::createCustomWidget( parent, name, w );
 }
 
@@ -1782,7 +1782,7 @@ void TQDesignerToolBox::setItemLabel( const TQString &l )
 
 TQCString TQDesignerToolBox::itemName() const
 {
-    return currentItem() ? currentItem()->name() : 0;
+    return currentItem() ? currentItem()->name() : nullptr;
 }
 
 void TQDesignerToolBox::setItemName( const TQCString &n )
diff --git a/tools/designer/designer/widgetfactory.h b/tools/designer/designer/widgetfactory.h
index 98173ddda..186d2bcbc 100644
--- a/tools/designer/designer/widgetfactory.h
+++ b/tools/designer/designer/widgetfactory.h
@@ -83,8 +83,8 @@ public:
 	NoLayout
     };
 
-    static TQWidget *create( int id, TQWidget *parent, const char *name = 0, bool init = true,
-			    const TQRect *rect = 0, TQt::Orientation orient = TQt::Horizontal );
+    static TQWidget *create( int id, TQWidget *parent, const char *name = nullptr, bool init = true,
+			    const TQRect *rect = nullptr, TQt::Orientation orient = TQt::Horizontal );
     static TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type );
     static void deleteLayout( TQWidget *widget );
 
@@ -118,7 +118,7 @@ public:
 
 private:
     static TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name, bool init,
-				  const TQRect *r = 0, TQt::Orientation orient = TQt::Horizontal );
+				  const TQRect *r = nullptr, TQt::Orientation orient = TQt::Horizontal );
     static TQWidget *createCustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *w );
 
     static TQGuardedPtr<TQObject> *lastPassiveInteractor;
@@ -220,7 +220,7 @@ public:
     void addPage( TQWidget *p, const TQString & );
     void removePage( TQWidget *p );
     void insertPage( TQWidget *p, const TQString &t, int index );
-    bool isPageRemoved( TQWidget *p ) { return (removedPages.find( p ) != 0); }
+    bool isPageRemoved( TQWidget *p ) { return (removedPages.find( p )); }
 
     bool isModal() const { return modal; }
     void setModal(bool b) { modal = b; }
@@ -231,7 +231,7 @@ private:
     struct Page
     {
 	Page( TQWidget *a, const TQString &b ) : p( a ), t( b ) {}
-	Page() : p( 0 ), t( TQString::null ) {}
+	Page() : p( nullptr ), t( TQString::null ) {}
 	TQWidget *p;
 	TQString t;
     };
@@ -323,8 +323,8 @@ class TQDesignerLabel : public TQLabel
     TQ_PROPERTY( TQCString buddy READ buddyWidget WRITE setBuddyWidget )
 
 public:
-    TQDesignerLabel( TQWidget *parent = 0, const char *name = 0 )
-	: TQLabel( parent, name ) { myBuddy = 0; }
+    TQDesignerLabel( TQWidget *parent = nullptr, const char *name = nullptr )
+	: TQLabel( parent, name ) { myBuddy = nullptr; }
 
     void setBuddyWidget( const TQCString &b ) {
 	myBuddy = b;
diff --git a/tools/designer/designer/wizardeditorimpl.cpp b/tools/designer/designer/wizardeditorimpl.cpp
index 6ed0e0cdc..5313bb21d 100644
--- a/tools/designer/designer/wizardeditorimpl.cpp
+++ b/tools/designer/designer/wizardeditorimpl.cpp
@@ -44,7 +44,7 @@
 #include <tqinputdialog.h>
 
 WizardEditor::WizardEditor( TQWidget *parent, TQWizard *w, FormWindow *fw )
-    : WizardEditorBase( parent, 0 ), formwindow( fw ), wizard( w ), draggedItem( 0 )
+    : WizardEditorBase( parent, nullptr ), formwindow( fw ), wizard( w ), draggedItem( 0 )
 {
     connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
     fillListBox();
diff --git a/tools/designer/designer/workspace.cpp b/tools/designer/designer/workspace.cpp
index 2c3d8b93c..7f2fa5699 100644
--- a/tools/designer/designer/workspace.cpp
+++ b/tools/designer/designer/workspace.cpp
@@ -108,9 +108,9 @@ void WorkspaceItem::init()
 {
     autoOpen = false;
     useOddColor = false;
-    project = 0;
-    sourceFile = 0;
-    formFile = 0;
+    project = nullptr;
+    sourceFile = nullptr;
+    formFile = nullptr;
 }
 
 void WorkspaceItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align )
@@ -273,15 +273,15 @@ void WorkspaceItem::setAutoOpen( bool b )
 }
 
 Workspace::Workspace( TQWidget *parent, MainWindow *mw )
-    : TQListView( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
+    : TQListView( parent, nullptr, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
 		 WStyle_Tool | WStyle_MinMax | WStyle_SysMenu ), mainWindow( mw ),
-	project( 0 ), completionDirty( false )
+	project( nullptr ), completionDirty( false )
 {
     init_colors();
 
     setDefaultRenameAction( Accept );
     blockNewForms = false;
-    bufferEdit = 0;
+    bufferEdit = nullptr;
     header()->setStretchEnabled( true );
     header()->hide();
     setSorting( 0 );
@@ -311,7 +311,7 @@ Workspace::Workspace( TQWidget *parent, MainWindow *mw )
 void Workspace::projectDestroyed( TQObject* o )
 {
     if ( o == project ) {
-	project = 0;
+	project = nullptr;
 	clear();
     }
 }
@@ -473,7 +473,7 @@ WorkspaceItem *Workspace::findItem( FormFile* ff)
 	if ( ( (WorkspaceItem*)it.current() )->formFile == ff )
 	    return (WorkspaceItem*)it.current();
     }
-    return 0;
+    return nullptr;
 }
 
 WorkspaceItem *Workspace::findItem( SourceFile *sf )
@@ -483,7 +483,7 @@ WorkspaceItem *Workspace::findItem( SourceFile *sf )
 	if ( ( (WorkspaceItem*)it.current() )->sourceFile == sf )
 	    return (WorkspaceItem*)it.current();
     }
-    return 0;
+    return nullptr;
 }
 
 WorkspaceItem *Workspace::findItem( TQObject *o )
@@ -493,7 +493,7 @@ WorkspaceItem *Workspace::findItem( TQObject *o )
 	if ( ( (WorkspaceItem*)it.current() )->object == o )
 	    return (WorkspaceItem*)it.current();
     }
-    return 0;
+    return nullptr;
 }
 
 void Workspace::closeAutoOpenItems()
diff --git a/tools/designer/editor/browser.cpp b/tools/designer/editor/browser.cpp
index 8284e493f..e524ba18f 100644
--- a/tools/designer/editor/browser.cpp
+++ b/tools/designer/editor/browser.cpp
@@ -37,7 +37,7 @@
 
 
 EditorBrowser::EditorBrowser( Editor *e )
-    : curEditor( e ), oldHighlightedParag( 0 )
+    : curEditor( e ), oldHighlightedParag( nullptr )
 {
     curEditor = e;
 
@@ -71,7 +71,7 @@ bool EditorBrowser::eventFilter( TQObject *o, TQEvent *e )
 		if ( oldHighlightedParag ) {
 		    oldHighlightedParag->setEndState( -1 );
 		    oldHighlightedParag->format();
-		    oldHighlightedParag = 0;
+		    oldHighlightedParag = nullptr;
 		}
 		if ( findCursor( c, from, to ) && from.paragraph() == to.paragraph() ) {
 		    // avoid collision with other selections
@@ -97,7 +97,7 @@ bool EditorBrowser::eventFilter( TQObject *o, TQEvent *e )
 		oldHighlightedParag->setEndState( -1 );
 		oldHighlightedParag->format();
 		curEditor->repaintChanged();
-		oldHighlightedParag = 0;
+		oldHighlightedParag = nullptr;
 	    }
 	    if ( killEvent )
 		return true;
@@ -111,7 +111,7 @@ bool EditorBrowser::eventFilter( TQObject *o, TQEvent *e )
 		    oldHighlightedParag->setEndState( -1 );
 		    oldHighlightedParag->format();
 		    curEditor->repaintChanged();
-		    oldHighlightedParag = 0;
+		    oldHighlightedParag = nullptr;
 		}
 	    }
 	default:
diff --git a/tools/designer/editor/cindent.cpp b/tools/designer/editor/cindent.cpp
index 0e15b3fdf..bb8d7114d 100644
--- a/tools/designer/editor/cindent.cpp
+++ b/tools/designer/editor/cindent.cpp
@@ -40,7 +40,7 @@ extern void setIndentSize( int s );
 
 CIndent::CIndent()
     : TQTextIndent(), tabSize( 8 ), indentSize( 4 ),
-      autoIndent( true ), keepTabs( true ), lastDoc( 0 )
+      autoIndent( true ), keepTabs( true ), lastDoc( nullptr )
 {
 }
 
@@ -145,7 +145,7 @@ void CIndent::reindent()
     // #### this is sloooooooow (O(n^2))
     TQTextParagraph *parag = lastDoc->firstParagraph();
     while ( parag ) {
-	indent( lastDoc, parag, 0, 0 );
+	indent( lastDoc, parag, nullptr, nullptr );
 	parag = parag->next();
     }
 }
diff --git a/tools/designer/editor/completion.cpp b/tools/designer/editor/completion.cpp
index 4a8ebdecd..482c85ddc 100644
--- a/tools/designer/editor/completion.cpp
+++ b/tools/designer/editor/completion.cpp
@@ -65,12 +65,12 @@ public:
     CompletionItem( TQListBox *lb, const TQString &txt, const TQString &t, const TQString &p,
 		    const TQString &pre, const TQString &p2 )
 	: TQListBoxItem( lb ), type( t ), postfix( p ), prefix( pre ), postfix2( p2 ),
-	  parag( 0 ), lastState( false ) { setText( txt ); }
+	  parag( nullptr ), lastState( false ) { setText( txt ); }
     ~CompletionItem() { delete parag; }
     void paint( TQPainter *painter ) {
 	if ( lastState != isSelected() ) {
 	    delete parag;
-	    parag = 0;
+	    parag = nullptr;
 	}
 	lastState = isSelected();
 	if ( !parag )
@@ -103,7 +103,7 @@ void CompletionItem::setupParagraph() {
 	TQTextFormatter *formatter;
 	formatter = new TQTextFormatterBreakWords;
 	formatter->setWrapEnabled( false );
-	parag = new TQTextParagraph( 0 );
+	parag = new TQTextParagraph( nullptr );
 	parag->setTabStops( listBox()->fontMetrics().width( "propertyXXXX" ) );
 	parag->pseudoDocument()->pFormatter = formatter;
 	parag->insert( 0, " " + type + ( type.isEmpty() ? " " : "\t" ) + prefix +
@@ -137,8 +137,8 @@ void CompletionItem::setupParagraph() {
 EditorCompletion::EditorCompletion( Editor *e )
 {
     enabled = true;
-    lastDoc = 0;
-    completionPopup = new TQVBox( e->topLevelWidget(), 0, WType_Popup );
+    lastDoc = nullptr;
+    completionPopup = new TQVBox( e->topLevelWidget(), nullptr, WType_Popup );
     completionPopup->setFrameStyle( TQFrame::Box | TQFrame::Plain );
     completionPopup->setLineWidth( 1 );
     functionLabel = new ArgHintWidget( e->topLevelWidget(), "editor_function_lbl" );
diff --git a/tools/designer/editor/editor.h b/tools/designer/editor/editor.h
index d82331df6..0dfc2a057 100644
--- a/tools/designer/editor/editor.h
+++ b/tools/designer/editor/editor.h
@@ -62,8 +62,8 @@ public:
     TQTextCursor *textCursor() const { return TQTextEdit::textCursor(); }
     void repaintChanged() { TQTextEdit::repaintChanged(); }
 
-    virtual EditorCompletion *completionManager() { return 0; }
-    virtual EditorBrowser *browserManager() { return 0; }
+    virtual EditorCompletion *completionManager() { return nullptr; }
+    virtual EditorBrowser *browserManager() { return nullptr; }
     virtual void configChanged();
 
     Config *config() { return cfg; }
diff --git a/tools/designer/editor/markerwidget.cpp b/tools/designer/editor/markerwidget.cpp
index 5b20c0277..b17fe5bbc 100644
--- a/tools/designer/editor/markerwidget.cpp
+++ b/tools/designer/editor/markerwidget.cpp
@@ -281,10 +281,10 @@ static const char *stack_frame_xpm[]={
 ".###............",
 "................"};
 
-static TQPixmap *errorPixmap = 0;
-static TQPixmap *breakpointPixmap = 0;
-static TQPixmap *stepPixmap = 0;
-static TQPixmap *stackFrame = 0;
+static TQPixmap *errorPixmap = nullptr;
+static TQPixmap *breakpointPixmap = nullptr;
+static TQPixmap *stepPixmap = nullptr;
+static TQPixmap *stackFrame = nullptr;
 
 MarkerWidget::MarkerWidget( ViewManager *parent, const char*name )
     : TQWidget( parent, name, WRepaintNoErase | WStaticContents | WResizeNoErase ), viewManager( parent )
@@ -434,7 +434,7 @@ void MarkerWidget::mousePressEvent( TQMouseEvent *e )
 
 void MarkerWidget::contextMenuEvent( TQContextMenuEvent *e )
 {
-    TQPopupMenu m( 0, "editor_breakpointsmenu" );
+    TQPopupMenu m( nullptr, "editor_breakpointsmenu" );
 
     int toggleBreakPoint = 0;
 //    int editBreakpoints = 0;
diff --git a/tools/designer/editor/viewmanager.cpp b/tools/designer/editor/viewmanager.cpp
index 3efd10332..5013007d3 100644
--- a/tools/designer/editor/viewmanager.cpp
+++ b/tools/designer/editor/viewmanager.cpp
@@ -42,7 +42,7 @@
 #include <tqtimer.h>
 
 ViewManager::ViewManager( TQWidget *parent, const char *name )
-    : TQWidget( parent, name ), curView( 0 )
+    : TQWidget( parent, name ), curView( nullptr )
 {
     TQHBoxLayout *l = new TQHBoxLayout( this );
     markerWidget = new MarkerWidget( this, "editor_markerwidget" );
diff --git a/tools/designer/editor/yyindent.cpp b/tools/designer/editor/yyindent.cpp
index 70357ec74..a4f38ce0f 100644
--- a/tools/designer/editor/yyindent.cpp
+++ b/tools/designer/editor/yyindent.cpp
@@ -115,11 +115,11 @@ void setIndentSize( int size )
     ppContinuationIndentSize = 2 * size;
 }
 
-static TQRegExp *literal = 0;
-static TQRegExp *label = 0;
-static TQRegExp *inlineCComment = 0;
-static TQRegExp *braceX = 0;
-static TQRegExp *iflikeKeyword = 0;
+static TQRegExp *literal = nullptr;
+static TQRegExp *label = nullptr;
+static TQRegExp *inlineCComment = nullptr;
+static TQRegExp *braceX = nullptr;
+static TQRegExp *iflikeKeyword = nullptr;
 
 /*
   Returns the first non-space character in the string t, or
@@ -299,13 +299,13 @@ struct LinizerState
     bool pendingRightBrace;
 };
 
-static TQStringList *yyProgram = 0;
-static LinizerState *yyLinizerState = 0;
+static TQStringList *yyProgram = nullptr;
+static LinizerState *yyLinizerState = nullptr;
 
 // shorthands
-static const TQString *yyLine = 0;
-static const int *yyBraceDepth = 0;
-static const bool *yyLeftBraceFollows = 0;
+static const TQString *yyLine = nullptr;
+static const int *yyBraceDepth = nullptr;
+static const bool *yyLeftBraceFollows = nullptr;
 
 /*
   Saves and restores the state of the global linizer. This enables
diff --git a/tools/designer/examples/addressbook/addressbook.ui.h b/tools/designer/examples/addressbook/addressbook.ui.h
index 84c4f340f..465642faa 100644
--- a/tools/designer/examples/addressbook/addressbook.ui.h
+++ b/tools/designer/examples/addressbook/addressbook.ui.h
@@ -15,7 +15,7 @@
 
 void AddressBook::fileNew()
 {
-    AddressDetails dia( this, 0, true );
+    AddressDetails dia( this, nullptr, true );
     connect( &dia, TQ_SIGNAL( newAddress( const TQString &,
 				       const TQString &,
 				       const TQString &,
@@ -117,7 +117,7 @@ void AddressBook::fileExit()
 
 void AddressBook::editFind()
 {
-    SearchDialog dia( this, 0, true );
+    SearchDialog dia( this, nullptr, true );
     connect( &dia, TQ_SIGNAL( searchAddress( const TQString & ) ),
 	     this, TQ_SLOT( searchAddress( const TQString & ) ) );
     dia.exec();
diff --git a/tools/designer/examples/colortool/mainform.ui.h b/tools/designer/examples/colortool/mainform.ui.h
index f78e75ed8..290c7414b 100644
--- a/tools/designer/examples/colortool/mainform.ui.h
+++ b/tools/designer/examples/colortool/mainform.ui.h
@@ -22,7 +22,7 @@ void MainForm::init()
     if ( clipboard->supportsSelection() )
 	clipboard->setSelectionMode( true );
 
-    findForm = 0;
+    findForm = nullptr;
     loadSettings();
     m_filename = "";
     m_changed = false;
diff --git a/tools/designer/examples/credit/creditform.h b/tools/designer/examples/credit/creditform.h
index 938bcb10f..2e8b66683 100644
--- a/tools/designer/examples/credit/creditform.h
+++ b/tools/designer/examples/credit/creditform.h
@@ -4,7 +4,7 @@ class CreditForm : public CreditFormBase
 {
     TQ_OBJECT
 public:
-    CreditForm( TQWidget* parent = 0, const char* name = 0, 
+    CreditForm( TQWidget* parent = nullptr, const char* name = nullptr, 
 		bool modal = false, WFlags fl = 0 );
     ~CreditForm();
 public slots:
diff --git a/tools/designer/examples/credit/creditformbase.h b/tools/designer/examples/credit/creditformbase.h
index a191f50fa..a15501c41 100644
--- a/tools/designer/examples/credit/creditformbase.h
+++ b/tools/designer/examples/credit/creditformbase.h
@@ -24,7 +24,7 @@ class CreditFormBase : public TQDialog
     TQ_OBJECT
 
 public:
-    CreditFormBase( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
+    CreditFormBase( TQWidget* parent = nullptr, const char* name = nullptr, bool modal = false, WFlags fl = 0 );
     ~CreditFormBase();
 
     TQButtonGroup* creditButtonGroup;
diff --git a/tools/designer/examples/filechooser/plugin/plugin.cpp b/tools/designer/examples/filechooser/plugin/plugin.cpp
index 80bce8dc1..8e2b31ac7 100644
--- a/tools/designer/examples/filechooser/plugin/plugin.cpp
+++ b/tools/designer/examples/filechooser/plugin/plugin.cpp
@@ -50,7 +50,7 @@ TQWidget* CustomWidgetPlugin::create( const TQString &key, TQWidget* parent, con
 {
     if ( key == "FileChooser" )
 	return new FileChooser( parent, name );
-    return 0;
+    return nullptr;
 }
 
 TQString CustomWidgetPlugin::group( const TQString& feature ) const
diff --git a/tools/designer/examples/filechooser/plugin/plugin.h b/tools/designer/examples/filechooser/plugin/plugin.h
index 929cba207..47dd8f8f7 100644
--- a/tools/designer/examples/filechooser/plugin/plugin.h
+++ b/tools/designer/examples/filechooser/plugin/plugin.h
@@ -6,7 +6,7 @@ public:
     CustomWidgetPlugin();
 
     TQStringList keys() const;
-    TQWidget* create( const TQString &classname, TQWidget* parent = 0, const char* name = 0 );
+    TQWidget* create( const TQString &classname, TQWidget* parent = nullptr, const char* name = nullptr );
     TQString group( const TQString& ) const;
     TQIconSet iconSet( const TQString& ) const;
     TQString includeFile( const TQString& ) const;
diff --git a/tools/designer/examples/filechooser/widget/filechooser.h b/tools/designer/examples/filechooser/widget/filechooser.h
index 7676df15d..7b33c6a75 100644
--- a/tools/designer/examples/filechooser/widget/filechooser.h
+++ b/tools/designer/examples/filechooser/widget/filechooser.h
@@ -21,7 +21,7 @@ class QT_WIDGET_PLUGIN_EXPORT FileChooser : public TQWidget
     TQ_PROPERTY( TQString fileName READ fileName WRITE setFileName )
 
 public:
-    FileChooser( TQWidget *parent = 0, const char *name = 0);
+    FileChooser( TQWidget *parent = nullptr, const char *name = nullptr);
 
     enum Mode { File, Directory };
 
diff --git a/tools/designer/examples/opengl/main.cpp b/tools/designer/examples/opengl/main.cpp
index 3791bf8fa..28237a7f5 100644
--- a/tools/designer/examples/opengl/main.cpp
+++ b/tools/designer/examples/opengl/main.cpp
@@ -206,7 +206,7 @@ public:
 
     TQStringList featureList() const;
 
-    TQWidget* create( const TQString &classname, TQWidget* parent = 0, const char* name = 0 );
+    TQWidget* create( const TQString &classname, TQWidget* parent = nullptr, const char* name = nullptr );
     TQString group( const TQString& ) const;
     TQIconSet iconSet( const TQString& ) const;
     TQString includeFile( const TQString& ) const;
@@ -233,7 +233,7 @@ TQStringList OpenGLWidgetInterface::featureList() const
 
 TQWidget* OpenGLWidgetInterface::create( const TQString &description, TQWidget* parent, const char* name )
 {
-    TQWidget* w = 0;
+    TQWidget* w = nullptr;
 
     if ( description == "GLWidget" )
 	w = new GLWidget( parent, name );
@@ -284,7 +284,7 @@ bool OpenGLWidgetInterface::isContainer( const TQString& ) const
 
 TQRESULT OpenGLWidgetInterface::queryInterface( const TQUuid& uuid, TQUnknownInterface **iface )
 {
-    *iface = 0;
+    *iface = nullptr;
 
     if ( uuid == IID_QUnknown )
 	*iface = (TQUnknownInterface*)this;
diff --git a/tools/designer/examples/sizeaware/main.cpp b/tools/designer/examples/sizeaware/main.cpp
index ff8eb85cf..169b6daf0 100644
--- a/tools/designer/examples/sizeaware/main.cpp
+++ b/tools/designer/examples/sizeaware/main.cpp
@@ -4,7 +4,7 @@
 int main( int argc, char ** argv )
 {
     TQApplication app( argc, argv );
-    SizeAware *sizeaware = new SizeAware( 0, 0, true );
+    SizeAware *sizeaware = new SizeAware( nullptr, nullptr, true );
     sizeaware->exec();
     sizeaware->destroy();
     return 0; 
diff --git a/tools/designer/examples/sizeaware/sizeaware.h b/tools/designer/examples/sizeaware/sizeaware.h
index 089a10c47..0d2ff552c 100644
--- a/tools/designer/examples/sizeaware/sizeaware.h
+++ b/tools/designer/examples/sizeaware/sizeaware.h
@@ -8,7 +8,7 @@ class SizeAware : public TQDialog
     TQ_PROPERTY( TQString company READ company WRITE setCompany )
     TQ_PROPERTY( TQString settingsFile READ settingsFile WRITE setSettingsFile )
 public:
-    SizeAware( TQDialog *parent = 0, const char *name = 0, bool modal = false );
+    SizeAware( TQDialog *parent = nullptr, const char *name = nullptr, bool modal = false );
     ~SizeAware();
     void setCompany( TQString company ) { m_company = company; }
     TQString company() const { return m_company; } 
diff --git a/tools/designer/examples/vcr/vcr.cpp b/tools/designer/examples/vcr/vcr.cpp
index ea4c39481..0f9ef0aff 100644
--- a/tools/designer/examples/vcr/vcr.cpp
+++ b/tools/designer/examples/vcr/vcr.cpp
@@ -97,19 +97,19 @@ Vcr::Vcr( TQWidget *parent, const char *name )
     TQHBoxLayout *layout = new TQHBoxLayout( this );
     layout->setMargin( 0 );
 
-    TQPushButton *rewind = new TQPushButton( TQPixmap( rewind_xpm ), 0, this, "vcr_rewind" );
+    TQPushButton *rewind = new TQPushButton( TQPixmap( rewind_xpm ), nullptr, this, "vcr_rewind" );
     layout->addWidget( rewind );
     connect( rewind, TQ_SIGNAL(clicked()), TQ_SIGNAL(rewind()) ); 
 
-    TQPushButton *play = new TQPushButton( TQPixmap( play_xpm ), 0, this, "vcr_play" );
+    TQPushButton *play = new TQPushButton( TQPixmap( play_xpm ), nullptr, this, "vcr_play" );
     layout->addWidget( play );
     connect( play, TQ_SIGNAL(clicked()), TQ_SIGNAL(play()) ); 
 
-    TQPushButton *next = new TQPushButton( TQPixmap( next_xpm ), 0, this, "vcr_next" );
+    TQPushButton *next = new TQPushButton( TQPixmap( next_xpm ), nullptr, this, "vcr_next" );
     layout->addWidget( next );
     connect( next, TQ_SIGNAL(clicked()), TQ_SIGNAL(next()) ); 
 
-    TQPushButton *stop = new TQPushButton( TQPixmap( stop_xpm ), 0, this, "vcr_stop" );
+    TQPushButton *stop = new TQPushButton( TQPixmap( stop_xpm ), nullptr, this, "vcr_stop" );
     layout->addWidget( stop );
     connect( stop, TQ_SIGNAL(clicked()), TQ_SIGNAL(stop()) ); 
 }
diff --git a/tools/designer/examples/vcr/vcr.h b/tools/designer/examples/vcr/vcr.h
index f8addbdd9..bfcd80d0d 100644
--- a/tools/designer/examples/vcr/vcr.h
+++ b/tools/designer/examples/vcr/vcr.h
@@ -6,7 +6,7 @@ class Vcr : public TQWidget
 {
     TQ_OBJECT
 public:
-    Vcr( TQWidget *parent = 0, const char *name = 0 );
+    Vcr( TQWidget *parent = nullptr, const char *name = nullptr );
     ~Vcr() {}
 signals:
     void rewind();
diff --git a/tools/designer/interfaces/actioninterface.h b/tools/designer/interfaces/actioninterface.h
index bf77e59d9..eda533f2e 100644
--- a/tools/designer/interfaces/actioninterface.h
+++ b/tools/designer/interfaces/actioninterface.h
@@ -67,7 +67,7 @@ public:
       In the implementation return the TQAction object for the action
       \a name.
     */
-    virtual TQAction* create( const TQString &name, TQObject* parent = 0 ) = 0;
+    virtual TQAction* create( const TQString &name, TQObject* parent = nullptr ) = 0;
 
     /*! In the implementation of the interface return the name of the
       group of the action \a name.
diff --git a/tools/designer/interfaces/designerinterface.h b/tools/designer/interfaces/designerinterface.h
index 87f7dd32c..4eff8f9ad 100644
--- a/tools/designer/interfaces/designerinterface.h
+++ b/tools/designer/interfaces/designerinterface.h
@@ -228,7 +228,7 @@ struct DesignerFormWindow
     virtual void setCurrentWidget( TQWidget * ) = 0;
     virtual TQPtrList<TQAction> actionList() const = 0;
     virtual TQAction *createAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, int accel,
-				   TQObject* parent, const char* name = 0, bool toggle = false ) = 0;
+				   TQObject* parent, const char* name = nullptr, bool toggle = false ) = 0;
     virtual void addAction( TQAction * ) = 0;
     virtual void removeAction( TQAction * ) = 0;
     virtual void preview() const = 0;
diff --git a/tools/designer/plugins/cppeditor/common.cpp b/tools/designer/plugins/cppeditor/common.cpp
index 7a8e94d73..e82d17e02 100644
--- a/tools/designer/plugins/cppeditor/common.cpp
+++ b/tools/designer/plugins/cppeditor/common.cpp
@@ -82,7 +82,7 @@ CommonInterface::~CommonInterface()
 
 TQRESULT CommonInterface::queryInterface( const TQUuid &uuid, TQUnknownInterface** iface )
 {
-    *iface = 0;
+    *iface = nullptr;
     if ( uuid == IID_QUnknown )
 	*iface = (TQUnknownInterface*)this;
     else if ( uuid == IID_QComponentInformation )
diff --git a/tools/designer/plugins/cppeditor/cppcompletion.cpp b/tools/designer/plugins/cppeditor/cppcompletion.cpp
index f26f4bfcc..8cc28dabd 100644
--- a/tools/designer/plugins/cppeditor/cppcompletion.cpp
+++ b/tools/designer/plugins/cppeditor/cppcompletion.cpp
@@ -54,7 +54,7 @@ bool CppEditorCompletion::doObjectCompletion( const TQString &objName )
     if ( ( i = object.findRev( "." ) ) != -1 )
 	object = object.mid( i + 1 );
     object = object.simplifyWhiteSpace();
-    TQObject *obj = 0;
+    TQObject *obj = nullptr;
     if ( ths->name() == object || object == "this" ) {
 	obj = ths;
     } else {
@@ -175,7 +175,7 @@ TQValueList<TQStringList> CppEditorCompletion::functionParameters( const TQStrin
 	objName = objName.simplifyWhiteSpace();
     }
 
-    TQObject *obj = 0;
+    TQObject *obj = nullptr;
     if ( ths->name() == objName || objName == "this" ) {
 	obj = ths;
     } else {
diff --git a/tools/designer/plugins/cppeditor/cppeditor.cpp b/tools/designer/plugins/cppeditor/cppeditor.cpp
index 4d6849639..2a05ba13f 100644
--- a/tools/designer/plugins/cppeditor/cppeditor.cpp
+++ b/tools/designer/plugins/cppeditor/cppeditor.cpp
@@ -54,7 +54,7 @@ CppEditor::CppEditor( const TQString &fn, TQWidget *parent, const char *name, De
     browser = new CppEditorBrowser( this );
     int j = 0;
     while ( SyntaxHighlighter_CPP::keywords[ j ] != TQString::null )
-	    completion->addCompletionEntry( SyntaxHighlighter_CPP::keywords[ j++ ], 0, false );
+	    completion->addCompletionEntry( SyntaxHighlighter_CPP::keywords[ j++ ], nullptr, false );
     configChanged();
 }
 
@@ -95,7 +95,7 @@ void CppEditor::configChanged()
     indent->setKeepTabs( Config::indentKeepTabs( path ) );
     indent->setAutoIndent( Config::indentAutoIndent( path ) );
     if ( !Config::indentAutoIndent( path ) )
-	document()->setIndent( 0 );
+	document()->setIndent( nullptr );
     else
 	document()->setIndent( indent );
 
diff --git a/tools/designer/plugins/cppeditor/editorinterfaceimpl.cpp b/tools/designer/plugins/cppeditor/editorinterfaceimpl.cpp
index 68b030fe5..3dc4c4261 100644
--- a/tools/designer/plugins/cppeditor/editorinterfaceimpl.cpp
+++ b/tools/designer/plugins/cppeditor/editorinterfaceimpl.cpp
@@ -42,7 +42,7 @@
 #include <tqtimer.h>
 
 EditorInterfaceImpl::EditorInterfaceImpl()
-    : EditorInterface(), viewManager( 0 ), dIface( 0 )
+    : EditorInterface(), viewManager( nullptr ), dIface( nullptr )
 {
     updateTimer = new TQTimer( this );
     connect( updateTimer, TQ_SIGNAL( timeout() ),
@@ -59,7 +59,7 @@ EditorInterfaceImpl::~EditorInterfaceImpl()
 
 TQRESULT EditorInterfaceImpl::queryInterface( const TQUuid &uuid, TQUnknownInterface** iface )
 {
-    *iface = 0;
+    *iface = nullptr;
     if ( uuid == IID_QUnknown )
 	*iface = (TQUnknownInterface*)this;
     else if ( uuid == IID_Editor )
@@ -75,7 +75,7 @@ TQWidget *EditorInterfaceImpl::editor( bool readonly,
 				      TQWidget *parent, TQUnknownInterface *iface )
 {
     if ( !viewManager ) {
-	( (EditorInterfaceImpl*)this )->viewManager = new ViewManager( parent, 0 );
+	( (EditorInterfaceImpl*)this )->viewManager = new ViewManager( parent, nullptr );
 	( (EditorInterfaceImpl*)this )->viewManager->showMarkerWidget( false );
 	if ( iface )
 	    iface->queryInterface( IID_Designer, (TQUnknownInterface**) &dIface );
diff --git a/tools/designer/plugins/cppeditor/languageinterfaceimpl.cpp b/tools/designer/plugins/cppeditor/languageinterfaceimpl.cpp
index b1e772d68..ee8efb6b9 100644
--- a/tools/designer/plugins/cppeditor/languageinterfaceimpl.cpp
+++ b/tools/designer/plugins/cppeditor/languageinterfaceimpl.cpp
@@ -65,7 +65,7 @@ TQRESULT LanguageInterfaceImpl::queryInterface( const TQUuid &uuid, TQUnknownInt
     if ( parent )
 	return parent->queryInterface( uuid, iface );
 
-    *iface = 0;
+    *iface = nullptr;
     if ( uuid == IID_QUnknown )
 	*iface = (TQUnknownInterface*)this;
     else if ( uuid == IID_Language )
@@ -120,7 +120,7 @@ TQStringList LanguageInterfaceImpl::definitions() const
 
 TQStringList LanguageInterfaceImpl::definitionEntries( const TQString &definition, TQUnknownInterface *designerIface ) const
 {
-    DesignerInterface *iface = 0;
+    DesignerInterface *iface = nullptr;
     designerIface->queryInterface( IID_Designer, (TQUnknownInterface**) &iface );
     if ( !iface )
 	return TQStringList();
@@ -143,7 +143,7 @@ TQStringList LanguageInterfaceImpl::definitionEntries( const TQString &definitio
 
 void LanguageInterfaceImpl::setDefinitionEntries( const TQString &definition, const TQStringList &entries, TQUnknownInterface *designerIface )
 {
-    DesignerInterface *iface = 0;
+    DesignerInterface *iface = nullptr;
     designerIface->queryInterface( IID_Designer, (TQUnknownInterface**) &iface );
     if ( !iface )
 	return;
@@ -211,7 +211,7 @@ void LanguageInterfaceImpl::sourceProjectKeys( TQStringList &keys ) const
 {
 public:
     CheckObject() {}
-    bool checkConnectArgs( const char *signal, const char *member ) { return TQObject::checkConnectArgs( signal, 0, member ); }
+    bool checkConnectArgs( const char *signal, const char *member ) { return TQObject::checkConnectArgs( signal, nullptr, member ); }
 
 };
 
diff --git a/tools/designer/plugins/cppeditor/languageinterfaceimpl.h b/tools/designer/plugins/cppeditor/languageinterfaceimpl.h
index 0647d2674..cdc0a0b01 100644
--- a/tools/designer/plugins/cppeditor/languageinterfaceimpl.h
+++ b/tools/designer/plugins/cppeditor/languageinterfaceimpl.h
@@ -40,7 +40,7 @@
 class LanguageInterfaceImpl : public LanguageInterface
 {
 public:
-    LanguageInterfaceImpl( TQUnknownInterface *outer = 0 );
+    LanguageInterfaceImpl( TQUnknownInterface *outer = nullptr );
 
     ulong addRef();
     ulong release();
diff --git a/tools/designer/plugins/cppeditor/mainfilesettings.ui.h b/tools/designer/plugins/cppeditor/mainfilesettings.ui.h
index 8ac48ad07..61e62720e 100644
--- a/tools/designer/plugins/cppeditor/mainfilesettings.ui.h
+++ b/tools/designer/plugins/cppeditor/mainfilesettings.ui.h
@@ -14,7 +14,7 @@ void CppMainFile::init()
 
 void CppMainFile::setup( TQUnknownInterface *appIface )
 {
-    DesignerInterface *dIface = 0;
+    DesignerInterface *dIface = nullptr;
     appIface->queryInterface( IID_Designer, (TQUnknownInterface**)&dIface );
     if ( !dIface )
 	return;
diff --git a/tools/designer/plugins/cppeditor/preferenceinterfaceimpl.cpp b/tools/designer/plugins/cppeditor/preferenceinterfaceimpl.cpp
index 96a5d217d..37ec5b522 100644
--- a/tools/designer/plugins/cppeditor/preferenceinterfaceimpl.cpp
+++ b/tools/designer/plugins/cppeditor/preferenceinterfaceimpl.cpp
@@ -38,7 +38,7 @@
 PreferenceInterfaceImpl::PreferenceInterfaceImpl( TQUnknownInterface *outer )
     : parent( outer ),
       ref( 0 ),
-      cppEditorSyntax( 0 )
+      cppEditorSyntax( nullptr )
 {
 }
 
@@ -67,7 +67,7 @@ TQRESULT PreferenceInterfaceImpl::queryInterface( const TQUuid &uuid, TQUnknownI
     if ( parent )
 	return parent->queryInterface( uuid, iface );
 
-    *iface = 0;
+    *iface = nullptr;
     if ( uuid == IID_QUnknown )
 	*iface = (TQUnknownInterface*)this;
     else if ( uuid == IID_Preference )
@@ -82,11 +82,11 @@ TQRESULT PreferenceInterfaceImpl::queryInterface( const TQUuid &uuid, TQUnknownI
 PreferenceInterface::Preference *PreferenceInterfaceImpl::preference()
 {
     if ( !cppEditorSyntax ) {
-	cppEditorSyntax = new PreferencesBase( 0, "cppeditor_syntax" );
+	cppEditorSyntax = new PreferencesBase( nullptr, "cppeditor_syntax" );
 	( (PreferencesBase*)cppEditorSyntax )->setPath( "/Trolltech/CppEditor/" );
 	cppEditorSyntax->hide();
     }
-    Preference *pf = 0;
+    Preference *pf = nullptr;
     pf = new Preference;
     pf->tab = cppEditorSyntax;
     pf->title = "C++ Editor";
diff --git a/tools/designer/plugins/cppeditor/preferenceinterfaceimpl.h b/tools/designer/plugins/cppeditor/preferenceinterfaceimpl.h
index aacc9f607..156eb6940 100644
--- a/tools/designer/plugins/cppeditor/preferenceinterfaceimpl.h
+++ b/tools/designer/plugins/cppeditor/preferenceinterfaceimpl.h
@@ -41,7 +41,7 @@ class TQWidget;
 class PreferenceInterfaceImpl : public PreferenceInterface
 {
 public:
-    PreferenceInterfaceImpl( TQUnknownInterface *outer = 0 );
+    PreferenceInterfaceImpl( TQUnknownInterface *outer = nullptr );
     virtual ~PreferenceInterfaceImpl();
 
     ulong addRef();
diff --git a/tools/designer/plugins/cppeditor/projectsettings.ui.h b/tools/designer/plugins/cppeditor/projectsettings.ui.h
index 7ec8e0214..9aee3c229 100644
--- a/tools/designer/plugins/cppeditor/projectsettings.ui.h
+++ b/tools/designer/plugins/cppeditor/projectsettings.ui.h
@@ -18,7 +18,7 @@ void CppProjectSettings::reInit( TQUnknownInterface *iface )
     comboDefines->setCurrentItem( 0 );
     comboInclude->setCurrentItem( 0 );
     
-    DesignerInterface *dIface = 0;
+    DesignerInterface *dIface = nullptr;
     iface->queryInterface( IID_Designer, (TQUnknownInterface**)&dIface );
     if ( !dIface )
 	return;
@@ -49,7 +49,7 @@ void CppProjectSettings::reInit( TQUnknownInterface *iface )
 
 void CppProjectSettings::save( TQUnknownInterface *iface )
 {
-    DesignerInterface *dIface = 0;
+    DesignerInterface *dIface = nullptr;
     iface->queryInterface( IID_Designer, (TQUnknownInterface**)&dIface );
     if ( !dIface )
 	return;
diff --git a/tools/designer/plugins/cppeditor/projectsettingsinterfaceimpl.cpp b/tools/designer/plugins/cppeditor/projectsettingsinterfaceimpl.cpp
index 5bbc9bdc5..9a42a5ad1 100644
--- a/tools/designer/plugins/cppeditor/projectsettingsinterfaceimpl.cpp
+++ b/tools/designer/plugins/cppeditor/projectsettingsinterfaceimpl.cpp
@@ -38,7 +38,7 @@
 ProjectSettingsInterfaceImpl::ProjectSettingsInterfaceImpl( TQUnknownInterface *outer )
     : parent( outer ),
       ref( 0 ),
-      settingsTab( 0 )
+      settingsTab( nullptr )
 {
 }
 
@@ -61,10 +61,10 @@ ulong ProjectSettingsInterfaceImpl::release()
 ProjectSettingsInterface::ProjectSettings *ProjectSettingsInterfaceImpl::projectSetting()
 {
     if ( !settingsTab ) {
-	settingsTab = new CppProjectSettings( 0 );
+	settingsTab = new CppProjectSettings( nullptr );
 	settingsTab->hide();
     }
-    ProjectSettings *pf = 0;
+    ProjectSettings *pf = nullptr;
     pf = new ProjectSettings;
     pf->tab = settingsTab;
     pf->title = "C++";
@@ -93,7 +93,7 @@ TQRESULT ProjectSettingsInterfaceImpl::queryInterface( const TQUuid &uuid, TQUnk
     if ( parent )
 	return parent->queryInterface( uuid, iface );
 
-    *iface = 0;
+    *iface = nullptr;
     if ( uuid == IID_QUnknown )
 	*iface = (TQUnknownInterface*)this;
     else if ( uuid == IID_ProjectSettings )
diff --git a/tools/designer/plugins/cppeditor/projectsettingsinterfaceimpl.h b/tools/designer/plugins/cppeditor/projectsettingsinterfaceimpl.h
index 1b4009e06..1c1b89980 100644
--- a/tools/designer/plugins/cppeditor/projectsettingsinterfaceimpl.h
+++ b/tools/designer/plugins/cppeditor/projectsettingsinterfaceimpl.h
@@ -42,7 +42,7 @@ class CppProjectSettings;
 class ProjectSettingsInterfaceImpl : public ProjectSettingsInterface
 {
 public:
-    ProjectSettingsInterfaceImpl( TQUnknownInterface *outer = 0 );
+    ProjectSettingsInterfaceImpl( TQUnknownInterface *outer = nullptr );
 
     ulong addRef();
     ulong release();
diff --git a/tools/designer/plugins/cppeditor/sourcetemplateinterfaceimpl.cpp b/tools/designer/plugins/cppeditor/sourcetemplateinterfaceimpl.cpp
index 2536ae636..97e861172 100644
--- a/tools/designer/plugins/cppeditor/sourcetemplateinterfaceimpl.cpp
+++ b/tools/designer/plugins/cppeditor/sourcetemplateinterfaceimpl.cpp
@@ -44,7 +44,7 @@ SourceTemplateInterfaceImpl::SourceTemplateInterfaceImpl()
 
 TQRESULT SourceTemplateInterfaceImpl::queryInterface( const TQUuid &uuid, TQUnknownInterface **iface )
 {
-    *iface = 0;
+    *iface = nullptr;
     if ( uuid == IID_QUnknown )
 	*iface = (TQUnknownInterface*)this;
     else if ( uuid == IID_QFeatureList )
@@ -88,10 +88,10 @@ SourceTemplateInterface::Source SourceTemplateInterfaceImpl::create( const TQStr
     SourceTemplateInterface::Source src;
     src.type = SourceTemplateInterface::Source::Invalid;
     if ( templ == "C++ Main-File (main.cpp)" ) {
-	CppMainFile dia( 0, 0, true );
+	CppMainFile dia( nullptr, nullptr, true );
 	dia.setup( appIface );
 	if ( dia.exec() == TQDialog::Accepted ) {
-	    DesignerInterface *dIface = 0;
+	    DesignerInterface *dIface = nullptr;
 	    appIface->queryInterface( IID_Designer, (TQUnknownInterface**)&dIface );
 	    if ( dIface ) {
 		src.type = SourceTemplateInterface::Source::FileName;
diff --git a/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.cpp b/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.cpp
index e582dc8a0..4219642c3 100644
--- a/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.cpp
+++ b/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.cpp
@@ -126,13 +126,13 @@ const char * const SyntaxHighlighter_CPP::keywords[] = {
     "ulong",
     "emit",
     // end of array
-    0
+    nullptr
 };
 
-static TQMap<int, TQMap<TQString, int > > *wordMap = 0;
+static TQMap<int, TQMap<TQString, int > > *wordMap = nullptr;
 
 SyntaxHighlighter_CPP::SyntaxHighlighter_CPP()
-    : TQTextPreProcessor(), lastFormat( 0 ), lastFormatId( -1 )
+    : TQTextPreProcessor(), lastFormat( nullptr ), lastFormatId( -1 )
 {
     TQFont f( tqApp->font() );
 
diff --git a/tools/designer/plugins/cppeditor/yyreg.cpp b/tools/designer/plugins/cppeditor/yyreg.cpp
index b3335133f..15bf1d033 100644
--- a/tools/designer/plugins/cppeditor/yyreg.cpp
+++ b/tools/designer/plugins/cppeditor/yyreg.cpp
@@ -125,7 +125,7 @@ static void stopTokenizer()
 {
     delete yyIn;
     delete[] yyLexBuf;
-    yyLexBuf = 0;
+    yyLexBuf = nullptr;
 }
 
 /*
diff --git a/tools/designer/plugins/dlg/dlg2ui.cpp b/tools/designer/plugins/dlg/dlg2ui.cpp
index 26445a12f..a3b252875 100644
--- a/tools/designer/plugins/dlg/dlg2ui.cpp
+++ b/tools/designer/plugins/dlg/dlg2ui.cpp
@@ -62,7 +62,7 @@ static const char *widgetTypes[] = {
     "IconView", "LCDNumber", "Label", "LineEdit", "ListBox", "ListView",
     "MenuBar", "MultiLineEdit", "ProgressBar", "PushButton", "RadioButton",
     "ScrollBar", "ScrollView", "Slider", "SpinBox", "Splitter", "TabBar",
-    "TextBrowser", "TextView", "User", "VBox", "VButtonGroup", "VGroupBox", 0
+    "TextBrowser", "TextView", "User", "VBox", "VButtonGroup", "VGroupBox", nullptr
 };
 
 /*
@@ -77,19 +77,19 @@ static const struct {
     const char *type;
 } propertyDefs[] = {
     { "Button", "AutoRepeat", "autoRepeat", "boolean" },
-    { "Button", "AutoResize", 0, 0 },
+    { "Button", "AutoResize", nullptr, nullptr },
     { "Button", "Text", "text", "tqstring" },
     { "ButtonGroup", "Exclusive", "exclusive", "boolean" },
     { "ButtonGroup", "RadioButtonExclusive", "radioButtonExclusive",
       "boolean" },
     { "CheckBox", "Checked", "checked", "boolean" },
     { "ComboBox", "AutoCompletion", "autoCompletion", "boolean" },
-    { "ComboBox", "AutoResize", 0, 0 },
+    { "ComboBox", "AutoResize", nullptr, nullptr },
     { "ComboBox", "DuplicatesEnabled", "duplicatesEnabled", "boolean" },
     { "ComboBox", "MaxCount", "maxCount", "integer" },
     { "ComboBox", "Policy", "insertionPolicy", "enum" },
     { "ComboBox", "SizeLimit", "sizeLimit", "integer" },
-    { "ComboBox", "Style", 0, 0 },
+    { "ComboBox", "Style", nullptr, nullptr },
     { "Dial", "Initial", "value", "integer" },
     { "Dial", "LineStep", "lineStep", "integer" },
     { "Dial", "MaxValue", "maxValue", "integer" },
@@ -99,33 +99,33 @@ static const struct {
     { "Dial", "ShowNotches", "notchesVisible", "boolean" },
     { "Dial", "Tracking", "tracking", "boolean" },
     { "Dial", "Wrapping", "wrapping", "boolean" },
-    { "DlgWidget", "AdjustSize", 0, 0 },
+    { "DlgWidget", "AdjustSize", nullptr, nullptr },
     { "DlgWidget", "BackgroundMode", "backgroundMode", "enum" },
     { "DlgWidget", "BackgroundOrigin", "backgroundOrigin", "enum" },
     { "DlgWidget", "BackgroundPixmap", "backgroundPixmap", "tqpixmap" },
-    { "DlgWidget", "DataLenName", 0, 0 },
-    { "DlgWidget", "DataVarName", 0, 0 },
+    { "DlgWidget", "DataLenName", nullptr, nullptr },
+    { "DlgWidget", "DataVarName", nullptr, nullptr },
     { "DlgWidget", "Enabled", "enabled", "boolean" },
     { "DlgWidget", "FocusPolicy", "focusPolicy", "enum" },
     { "DlgWidget", "Font", "font", "tqfont" },
-    { "DlgWidget", "FontPropagation", 0, 0 },
+    { "DlgWidget", "FontPropagation", nullptr, nullptr },
     { "DlgWidget", "MaximumSize", "maximumSize", "tqsize" },
     { "DlgWidget", "MinimumSize", "minimumSize", "tqsize" },
-    { "DlgWidget", "Name", 0, 0 },
+    { "DlgWidget", "Name", nullptr, nullptr },
     { "DlgWidget", "Palette", "palette", "tqpalette" },
-    { "DlgWidget", "PalettePropagation", 0, 0 },
-    { "DlgWidget", "ReadPixmapFromData", 0, 0 },
-    { "DlgWidget", "Rect", 0, 0 },
-    { "DlgWidget", "SignalConnection", 0, 0 },
-    { "DlgWidget", "UseBackgroudPixmap", 0, 0 },
-    { "DlgWidget", "Variable", 0, 0 },
+    { "DlgWidget", "PalettePropagation", nullptr, nullptr },
+    { "DlgWidget", "ReadPixmapFromData", nullptr, nullptr },
+    { "DlgWidget", "Rect", nullptr, nullptr },
+    { "DlgWidget", "SignalConnection", nullptr, nullptr },
+    { "DlgWidget", "UseBackgroudPixmap", nullptr, nullptr },
+    { "DlgWidget", "Variable", nullptr, nullptr },
     { "Frame", "FrameMargin", "margin", "integer" },
     { "Frame", "LineWidth", "lineWidth", "integer" },
     { "Frame", "MidLineWidth", "midLineWidth", "integer" },
-    { "Frame", "Style", 0, 0 },
+    { "Frame", "Style", nullptr, nullptr },
     { "GroupBox", "Title", "title", "tqstring" },
-    { "IconView", "AlignMode", 0, 0 },
-    { "IconView", "Aligning", 0, 0 },
+    { "IconView", "AlignMode", nullptr, nullptr },
+    { "IconView", "Aligning", nullptr, nullptr },
     { "IconView", "Arrangement", "arrangement", "enum" },
     { "IconView", "AutoArrange", "autoArrange", "boolean" },
     { "IconView", "EnableMoveItems", "itemsMovable", "boolean" },
@@ -145,8 +145,8 @@ static const struct {
     { "LCDNumber", "Mode", "mode", "enum" },
     { "LCDNumber", "SegmentStyle", "segmentStyle", "enum" },
     { "LCDNumber", "SmallDecimalPoint", "smallDecimalPoint", "boolean" },
-    { "LCDNumber", "Value", 0, 0 },
-    { "Label", "AutoResize", 0, 0 },
+    { "LCDNumber", "Value", nullptr, nullptr },
+    { "Label", "AutoResize", nullptr, nullptr },
     { "Label", "Indent", "indent", "integer" },
     { "Label", "Text", "text", "tqstring" },
     { "Label", "TextFormat", "textFormat", "enum" },
@@ -154,33 +154,33 @@ static const struct {
     { "LineEdit", "FrameShown", "frame", "boolean"  },
     { "LineEdit", "MaxLength", "maxLength", "integer" },
     { "LineEdit", "Text", "text", "tqstring" },
-    { "ListBox", "AutoScroll", 0, 0 },
-    { "ListBox", "AutoUpdate", 0, 0 },
+    { "ListBox", "AutoScroll", nullptr, nullptr },
+    { "ListBox", "AutoUpdate", nullptr, nullptr },
     { "ListBox", "ColumnMode", "columnMode", "enum" },
-    { "ListBox", "DragSelect", 0, 0 },
+    { "ListBox", "DragSelect", nullptr, nullptr },
     { "ListBox", "RowMode", "rowMode", "enum" },
     { "ListBox", "SelectionMode", "selectionMode", "enum" },
-    { "ListBox", "SmoothScrolling", 0, 0 },
+    { "ListBox", "SmoothScrolling", nullptr, nullptr },
     { "ListView", "AllColumnsShowFocus", "allColumnsShowFocus", "boolean" },
-    { "ListView", "HeaderInformation", 0, 0 },
+    { "ListView", "HeaderInformation", nullptr, nullptr },
     { "ListView", "ItemMargin", "itemMargin", "integer" },
     { "ListView", "MultiSelection", "multiSelection", "boolean" },
     { "ListView", "RootIsDecorated", "rootIsDecorated", "boolean" },
     { "ListView", "TreeStepSize", "treeStepSize", "boolean" },
-    { "MultiLineEdit", "AutoUpdate", 0, 0 },
-    { "MultiLineEdit", "EchoMode", 0, 0 },
-    { "MultiLineEdit", "HorizontalMargin", 0, 0 },
-    { "MultiLineEdit", "MaxLength", 0, 0 },
-    { "MultiLineEdit", "MaxLineLength", 0, 0 },
-    { "MultiLineEdit", "MaxLines", 0, 0 },
-    { "MultiLineEdit", "OverwriteMode", 0, 0 },
-    { "MultiLineEdit", "ReadOnly", 0, 0 },
-    { "MultiLineEdit", "Text", 0, 0 },
+    { "MultiLineEdit", "AutoUpdate", nullptr, nullptr },
+    { "MultiLineEdit", "EchoMode", nullptr, nullptr },
+    { "MultiLineEdit", "HorizontalMargin", nullptr, nullptr },
+    { "MultiLineEdit", "MaxLength", nullptr, nullptr },
+    { "MultiLineEdit", "MaxLineLength", nullptr, nullptr },
+    { "MultiLineEdit", "MaxLines", nullptr, nullptr },
+    { "MultiLineEdit", "OverwriteMode", nullptr, nullptr },
+    { "MultiLineEdit", "ReadOnly", nullptr, nullptr },
+    { "MultiLineEdit", "Text", nullptr, nullptr },
     { "MultiLineEdit", "UndoDepth", "undoDepth", "integer" },
-    { "MultiLineEdit", "UndoEnabled", 0, 0 },
-    { "MultiLineEdit", "WordWrap", 0, 0 },
-    { "MultiLineEdit", "WrapColumnOrWidth", 0, 0 },
-    { "MultiLineEdit", "WrapPolicy", 0, 0 },
+    { "MultiLineEdit", "UndoEnabled", nullptr, nullptr },
+    { "MultiLineEdit", "WordWrap", nullptr, nullptr },
+    { "MultiLineEdit", "WrapColumnOrWidth", nullptr, nullptr },
+    { "MultiLineEdit", "WrapPolicy", nullptr, nullptr },
     { "ProgressBar", "CenterIndicator", "centerIndicator", "boolean" },
     { "ProgressBar", "IndicatorFollowsStyle", "indicatorFollowsStyle",
       "boolean" },
@@ -188,7 +188,7 @@ static const struct {
     { "ProgressBar", "TotalSteps", "totalSteps", "integer" },
     { "PushButton", "AutoDefault", "autoDefault", "boolean" },
     { "PushButton", "Default", "default", "boolean" },
-    { "PushButton", "IsMenuButton", 0, 0 },
+    { "PushButton", "IsMenuButton", nullptr, nullptr },
     { "PushButton", "ToggleButton", "toggleButton", "boolean" },
     { "RadioButton", "Checked", "checked", "boolean" },
     { "ScrollBar", "Initial", "value", "integer" },
@@ -219,17 +219,17 @@ static const struct {
     { "SpinBox", "Step", "lineStep", "integer" },
     { "SpinBox", "Suffix", "suffix", "tqstring" },
     { "SpinBox", "Wrapping", "wrapping", "boolean" },
-    { "Splitter", "OpaqueResize", 0, 0 },
+    { "Splitter", "OpaqueResize", nullptr, nullptr },
     { "Splitter", "Orientation", "orientation", "enum" },
     { "TabBar", "Shape", "shape", "enum" },
-    { "TabBar", "TabNames", 0, 0 },
-    { "TextView", "Context", 0, 0 },
+    { "TabBar", "TabNames", nullptr, nullptr },
+    { "TextView", "Context", nullptr, nullptr },
     { "TextView", "LinkUnderline", "linkUnderline", "boolean" },
     { "TextView", "Text", "text", "tqstring" },
     { "TextView", "TextFormat", "textFormat", "enum" },
-    { "User", "UserClassHeader", 0, 0 },
-    { "User", "UserClassName", 0, 0 },
-    { 0, 0, 0, 0 }
+    { "User", "UserClassHeader", nullptr, nullptr },
+    { "User", "UserClassName", nullptr, nullptr },
+    { nullptr, nullptr, nullptr, nullptr }
 };
 
 /*
@@ -291,7 +291,7 @@ TQString Dlg2Ui::closing( const TQString& tag )
 void Dlg2Ui::error( const TQString& message )
 {
     if ( numErrors++ == 0 )
-	TQMessageBox::warning( 0, yyFileName, message );
+	TQMessageBox::warning( nullptr, yyFileName, message );
 }
 
 void Dlg2Ui::syntaxError()
@@ -1333,18 +1333,18 @@ void Dlg2Ui::matchBox( const TQDomElement& box )
 	{ "Grid_Row", &Dlg2Ui::matchGridRow },
 	{ "Grid_Spacer", &Dlg2Ui::matchGridSpacer },
 	{ "Layout_Widget", &Dlg2Ui::matchLayoutWidget },
-	{ 0, 0 }
+	{ nullptr, nullptr }
     };
 
     int i = 0;
-    while ( jumpTable[i].tagName != 0 ) {
+    while ( jumpTable[i].tagName ) {
 	if ( TQString(jumpTable[i].tagName) == box.tagName() ) {
 	    (this->*jumpTable[i].matchFunc)( box );
 	    break;
 	}
 	i++;
     }
-    if ( jumpTable[i].tagName == 0 )
+    if ( !jumpTable[i].tagName )
 	syntaxError();
 }
 
@@ -1540,13 +1540,13 @@ TQStringList Dlg2Ui::convertTQtArchitectDlgFile( const TQString& fileName )
     uniqueWidget = 1;
 
     i = 0;
-    while ( widgetTypes[i] != 0 ) {
+    while ( widgetTypes[i] ) {
 	yyWidgetTypeSet.insert( TQString(widgetTypes[i]), 0 );
 	i++;
     }
 
     i = 0;
-    while ( propertyDefs[i].widgetName != 0 ) {
+    while ( propertyDefs[i].widgetName ) {
 	yyPropertyMap[TQString(propertyDefs[i].widgetName)]
 		.insert( TQString(propertyDefs[i].architectName), i );
 	i++;
diff --git a/tools/designer/plugins/dlg/main.cpp b/tools/designer/plugins/dlg/main.cpp
index c470293d2..4f814b050 100644
--- a/tools/designer/plugins/dlg/main.cpp
+++ b/tools/designer/plugins/dlg/main.cpp
@@ -59,7 +59,7 @@ DlgFilter::DlgFilter()
 
 TQRESULT DlgFilter::queryInterface( const TQUuid &uuid, TQUnknownInterface **iface )
 {
-    *iface = 0;
+    *iface = nullptr;
     if ( uuid == IID_QUnknown )
 	*iface = (TQUnknownInterface*)(ImportFilterInterface*)this;
     else if ( uuid == IID_QFeatureList )
diff --git a/tools/designer/plugins/glade/glade2ui.cpp b/tools/designer/plugins/glade/glade2ui.cpp
index 2e6ec3f37..b79cbc0d2 100644
--- a/tools/designer/plugins/glade/glade2ui.cpp
+++ b/tools/designer/plugins/glade/glade2ui.cpp
@@ -98,7 +98,7 @@ static const struct {
     { "GtkVScrollbar", "TQScrollBar" },
     { "GtkVSeparator", "Line" },
     { "Placeholder", "TQLabel" },
-    { 0, 0 }
+    { nullptr, nullptr }
 };
 
 static const struct {
@@ -137,7 +137,7 @@ static const struct {
     { "SELECT_ALL", "&Select All" },
     { "UNDO", "&Undo" },
     { "UNDO_MOVE", "&Undo Move" },
-    { 0, 0 }
+    { nullptr, nullptr }
 };
 
 static const struct {
@@ -172,7 +172,7 @@ static const struct {
     { "Tab", TQt::Key_Tab },
     { "Up", TQt::Key_Up },
     { "space", TQt::Key_Space },
-    { 0, 0 }
+    { nullptr, 0 }
 };
 
 static TQString nonMenuText( const TQString& menuText )
@@ -197,7 +197,7 @@ static TQString fixedName( const TQString& name )
     TQString fixed;
 
     int i = 0;
-    while ( latin1 != 0 && latin1[i] != '\0' ) {
+    while ( latin1 && latin1[i] != '\0' ) {
 	if ( isalnum(latin1[i]) )
 	    fixed += name[i];
 	else
@@ -247,21 +247,21 @@ static TQString entitize( const TQString& str )
 Glade2Ui::Glade2Ui()
 {
     int i = 0;
-    while ( classNames[i].gtkName != 0 ) {
+    while ( classNames[i].gtkName ) {
 	yyClassNameMap.insert( TQString(classNames[i].gtkName),
 			       TQString(classNames[i].qtName) );
 	i++;
     }
 
     i = 0;
-    while ( stockMenuItems[i].name != 0 ) {
+    while ( stockMenuItems[i].name ) {
 	yyStockMap.insert( TQString(stockMenuItems[i].name),
 			   TQString(stockMenuItems[i].menuText) );
 	i++;
     }
 
     i = 0;
-    while ( keys[i].gtkName != 0 ) {
+    while ( keys[i].gtkName ) {
 	yyKeyMap.insert( TQString(keys[i].gtkName), keys[i].qtValue );
 	i++;
     }
@@ -301,7 +301,7 @@ TQString Glade2Ui::atom( const TQString& tag, const AttributeMap& attr )
 void Glade2Ui::error( const TQString& message )
 {
     if ( numErrors++ == 0 )
-	TQMessageBox::warning( 0, yyFileName, message );
+	TQMessageBox::warning( nullptr, yyFileName, message );
 }
 
 void Glade2Ui::syntaxError()
@@ -2023,7 +2023,7 @@ TQStringList Glade2Ui::convertGladeFile( const TQString& fileName )
     }
 
     TQProgressDialog fremskritt( TQString("Converting Glade files..."),
-				TQString("Abort Conversion"), numWidgets, 0,
+				TQString("Abort Conversion"), numWidgets, nullptr,
 				"fremskritt", true );
 
     n = root.firstChild();
@@ -2114,7 +2114,7 @@ TQStringList Glade2Ui::convertGladeFile( const TQString& fileName )
 		TQMap<TQString, TQString>::ConstIterator im = yyImages.begin();
 		while ( im != yyImages.end() ) {
 		    uint length = 0;
-		    const char *format = 0;
+		    const char *format = nullptr;
 
 		    TQString fn = dir + TQChar( '/' ) + im.key();
 		    TQFile f( fn );
@@ -2127,7 +2127,7 @@ TQStringList Glade2Ui::convertGladeFile( const TQString& fileName )
 			format = TQImageIO::imageFormat( &f );
 			f.close();
 		    }
-		    if ( format == 0 )
+		    if ( !format )
 			format = "XPM";
 
 		    AttributeMap attr;
@@ -2180,7 +2180,7 @@ TQStringList Glade2Ui::convertGladeFile( const TQString& fileName )
 		outFileName += TQString::number( widgetNo + 1 );
 	    outFileName += TQString( ".ui" );
 	    FILE *out = fopen( outFileName.latin1(), "w" );
-	    if ( out == 0 ) {
+	    if ( !out ) {
 		tqWarning( "glade2ui: Could not open file '%s'",
 			 outFileName.latin1() );
 	    } else {
diff --git a/tools/designer/plugins/glade/main.cpp b/tools/designer/plugins/glade/main.cpp
index f8a55d713..2eb3e7e58 100644
--- a/tools/designer/plugins/glade/main.cpp
+++ b/tools/designer/plugins/glade/main.cpp
@@ -60,7 +60,7 @@ GladeFilter::GladeFilter()
 
 TQRESULT GladeFilter::queryInterface( const TQUuid &uuid, TQUnknownInterface **iface )
 {
-    *iface = 0;
+    *iface = nullptr;
     if ( uuid == IID_QUnknown )
 	*iface = (TQUnknownInterface*)(ImportFilterInterface*)this;
     else if ( uuid == IID_QFeatureList )
diff --git a/tools/designer/plugins/kdevdlg/kdevdlg2ui.cpp b/tools/designer/plugins/kdevdlg/kdevdlg2ui.cpp
index b40b778da..8bc119a25 100644
--- a/tools/designer/plugins/kdevdlg/kdevdlg2ui.cpp
+++ b/tools/designer/plugins/kdevdlg/kdevdlg2ui.cpp
@@ -226,7 +226,7 @@ KDEVDLG2UI::KDEVDLG2UI( TQTextStream* input, const TQString& name )
     writeToFile = true;
     in = input;
     indentation = 0;
-    out = 0;
+    out = nullptr;
 }
 
 /*!
@@ -261,7 +261,7 @@ bool KDEVDLG2UI::parse()
     writeDialog( className );
 
     delete out;
-    out = 0;
+    out = nullptr;
 
     return true;
 }
diff --git a/tools/designer/plugins/kdevdlg/main.cpp b/tools/designer/plugins/kdevdlg/main.cpp
index 83d58e01f..7f6aef42c 100644
--- a/tools/designer/plugins/kdevdlg/main.cpp
+++ b/tools/designer/plugins/kdevdlg/main.cpp
@@ -62,7 +62,7 @@ KDevDlgFilter::KDevDlgFilter()
 
 TQRESULT KDevDlgFilter::queryInterface( const TQUuid &uuid, TQUnknownInterface **iface )
 {
-    *iface = 0;
+    *iface = nullptr;
     if ( uuid == IID_QUnknown )
 	*iface = (TQUnknownInterface*)(ImportFilterInterface*)this;
     else if ( uuid == IID_QFeatureList )
diff --git a/tools/designer/plugins/rc/main.cpp b/tools/designer/plugins/rc/main.cpp
index 880c33b5c..bbcabfff0 100644
--- a/tools/designer/plugins/rc/main.cpp
+++ b/tools/designer/plugins/rc/main.cpp
@@ -60,7 +60,7 @@ RCFilter::RCFilter()
 
 TQRESULT RCFilter::queryInterface( const TQUuid &uuid, TQUnknownInterface **iface )
 {
-    *iface = 0;
+    *iface = nullptr;
     if ( uuid == IID_QUnknown )
 	*iface = (TQUnknownInterface*)(ImportFilterInterface*)this;
     else if ( uuid == IID_QFeatureList )
diff --git a/tools/designer/plugins/rc/rc2ui.cpp b/tools/designer/plugins/rc/rc2ui.cpp
index 5755fab21..59931fef0 100644
--- a/tools/designer/plugins/rc/rc2ui.cpp
+++ b/tools/designer/plugins/rc/rc2ui.cpp
@@ -210,7 +210,7 @@ RC2UI::RC2UI( TQTextStream* input )
     writeToFile = true;
     in = input;
     indentation = 0;
-    out = 0;
+    out = nullptr;
 }
 
 /*!
@@ -763,7 +763,7 @@ bool RC2UI::makeDialog()
 
 	if (out) {
 	    delete out;
-	    out = 0;
+	    out = nullptr;
 	}
 	fileOut.close();
 
@@ -872,7 +872,7 @@ bool RC2UI::makeStringTable()
 
 	if ( out ) {
 	    delete out;
-	    out = 0;
+	    out = nullptr;
 	}
     } while ( line != blockStart1 );
 
diff --git a/tools/designer/plugins/wizards/main.cpp b/tools/designer/plugins/wizards/main.cpp
index 9388119e3..2e77c07f4 100644
--- a/tools/designer/plugins/wizards/main.cpp
+++ b/tools/designer/plugins/wizards/main.cpp
@@ -106,12 +106,12 @@ void StandardTemplateWizardInterface::setup( const TQString &templ, TQWidget *wi
 	 templ == "TQDataView" ||
 	 templ == "TQDataBrowser" ||
 	 templ == "TQDataTable" ) {
-	SqlFormWizard wizard( aIface, widget, tqApp->mainWidget(), fw, 0, true );
+	SqlFormWizard wizard( aIface, widget, tqApp->mainWidget(), fw, nullptr, true );
 	wizard.exec();
     }
 #endif
     if ( templ == "TQMainWindow" ) {
-	MainWindowWizardBase wizard( tqApp->mainWidget(), 0, true );
+	MainWindowWizardBase wizard( tqApp->mainWidget(), nullptr, true );
 	wizard.setAppInterface( aIface, fw, widget );
 	wizard.exec();
     }
@@ -120,7 +120,7 @@ void StandardTemplateWizardInterface::setup( const TQString &templ, TQWidget *wi
 
 TQRESULT StandardTemplateWizardInterface::queryInterface( const TQUuid& uuid, TQUnknownInterface** iface )
 {
-    *iface = 0;
+    *iface = nullptr;
     if ( uuid == IID_QUnknown )
 	*iface = (TQUnknownInterface*)(TemplateWizardInterface*) this;
     else if ( uuid == IID_QFeatureList )
diff --git a/tools/designer/plugins/wizards/mainwindowwizard.ui.h b/tools/designer/plugins/wizards/mainwindowwizard.ui.h
index 99adbe0c7..bf1f6ac4a 100644
--- a/tools/designer/plugins/wizards/mainwindowwizard.ui.h
+++ b/tools/designer/plugins/wizards/mainwindowwizard.ui.h
@@ -125,46 +125,46 @@ void MainWindowWizardBase::accept()
 
     getPixmap( "document-new", pix );
 
-    TQAction *fileNewAction = dfw->createAction( tr( "New" ), pix, tr( "&New" ), CTRL + Key_N, 0, "fileNewAction" );
+    TQAction *fileNewAction = dfw->createAction( tr( "New" ), pix, tr( "&New" ), CTRL + Key_N, nullptr, "fileNewAction" );
     actions.insert( tr( "New" ), fileNewAction );
     getPixmap( "document-open", pix );
-    TQAction *fileOpenAction = dfw->createAction( tr( "Open" ), pix, tr( "&Open..." ), CTRL + Key_O, 0, "fileOpenAction" );
+    TQAction *fileOpenAction = dfw->createAction( tr( "Open" ), pix, tr( "&Open..." ), CTRL + Key_O, nullptr, "fileOpenAction" );
     actions.insert( tr( "Open" ), fileOpenAction );
     getPixmap( "document-save", pix );
-    TQAction *fileSaveAction = dfw->createAction( tr( "Save" ), pix, tr( "&Save" ), CTRL + Key_S, 0, "fileSaveAction" );
+    TQAction *fileSaveAction = dfw->createAction( tr( "Save" ), pix, tr( "&Save" ), CTRL + Key_S, nullptr, "fileSaveAction" );
     actions.insert( tr( "Save" ), fileSaveAction );
-    TQAction *fileSaveAsAction = dfw->createAction( tr( "Save As" ), TQIconSet(), tr( "Save &As..." ), 0, 0, "fileSaveAsAction" );
+    TQAction *fileSaveAsAction = dfw->createAction( tr( "Save As" ), TQIconSet(), tr( "Save &As..." ), 0, nullptr, "fileSaveAsAction" );
     actions.insert( tr( "Save As" ), fileSaveAsAction );
     getPixmap( "print", pix );
-    TQAction *filePrintAction = dfw->createAction( tr( "Print" ), pix, tr( "&Print..." ), CTRL + Key_P, 0, "filePrintAction" );
+    TQAction *filePrintAction = dfw->createAction( tr( "Print" ), pix, tr( "&Print..." ), CTRL + Key_P, nullptr, "filePrintAction" );
     actions.insert( tr( "Print" ), filePrintAction );
-    TQAction *fileExitAction = dfw->createAction( tr( "Exit" ), TQIconSet(), tr( "E&xit" ), 0, 0, "fileExitAction" );
+    TQAction *fileExitAction = dfw->createAction( tr( "Exit" ), TQIconSet(), tr( "E&xit" ), 0, nullptr, "fileExitAction" );
     actions.insert( tr( "Exit" ), fileExitAction );
 
     getPixmap( "undo", pix );
-    TQAction *editUndoAction = dfw->createAction( tr( "Undo" ), pix, tr( "&Undo" ), CTRL + Key_Z, 0, "editUndoAction" );
+    TQAction *editUndoAction = dfw->createAction( tr( "Undo" ), pix, tr( "&Undo" ), CTRL + Key_Z, nullptr, "editUndoAction" );
     actions.insert( tr( "Undo" ), editUndoAction );
     getPixmap( "redo", pix );
-    TQAction *editRedoAction = dfw->createAction( tr( "Redo" ), pix, tr( "&Redo" ), CTRL + Key_Y, 0, "editRedoAction" );
+    TQAction *editRedoAction = dfw->createAction( tr( "Redo" ), pix, tr( "&Redo" ), CTRL + Key_Y, nullptr, "editRedoAction" );
     actions.insert( tr( "Redo" ), editRedoAction );
     getPixmap( "edit-cut", pix );
-    TQAction *editCutAction = dfw->createAction( tr( "Cut" ), pix, tr( "Cu&t" ), CTRL + Key_X, 0, "editCutAction" );
+    TQAction *editCutAction = dfw->createAction( tr( "Cut" ), pix, tr( "Cu&t" ), CTRL + Key_X, nullptr, "editCutAction" );
     actions.insert( tr( "Cut" ), editCutAction );
     getPixmap( "edit-copy", pix );
-    TQAction *editCopyAction = dfw->createAction( tr( "Copy" ), pix, tr( "&Copy" ), CTRL + Key_C, 0, "editCopyAction" );
+    TQAction *editCopyAction = dfw->createAction( tr( "Copy" ), pix, tr( "&Copy" ), CTRL + Key_C, nullptr, "editCopyAction" );
     actions.insert( tr( "Copy" ), editCopyAction );
     getPixmap( "edit-paste", pix );
-    TQAction *editPasteAction = dfw->createAction( tr( "Paste" ), pix, tr( "&Paste" ), CTRL + Key_V, 0, "editPasteAction" );
+    TQAction *editPasteAction = dfw->createAction( tr( "Paste" ), pix, tr( "&Paste" ), CTRL + Key_V, nullptr, "editPasteAction" );
     actions.insert( tr( "Paste" ), editPasteAction );
     getPixmap( "searchfind", pix );
-    TQAction *editFindAction = dfw->createAction( tr( "Find" ), pix, tr( "&Find..." ), CTRL + Key_F, 0, "editFindAction" );
+    TQAction *editFindAction = dfw->createAction( tr( "Find" ), pix, tr( "&Find..." ), CTRL + Key_F, nullptr, "editFindAction" );
     actions.insert( tr( "Find" ), editFindAction );
 
-    TQAction *helpAboutAction = dfw->createAction( tr( "About" ), TQIconSet(), tr( "&About" ), 0, 0, "helpAboutAction" );
+    TQAction *helpAboutAction = dfw->createAction( tr( "About" ), TQIconSet(), tr( "&About" ), 0, nullptr, "helpAboutAction" );
     actions.insert( tr( "About" ), helpAboutAction );
-    TQAction *helpContentsAction = dfw->createAction( tr( "Contents" ), TQIconSet(), tr( "&Contents..." ), 0, 0, "helpContentsAction" );
+    TQAction *helpContentsAction = dfw->createAction( tr( "Contents" ), TQIconSet(), tr( "&Contents..." ), 0, nullptr, "helpContentsAction" );
     actions.insert( tr( "Contents" ), helpContentsAction );
-    TQAction *helpIndexAction = dfw->createAction( tr( "Index" ), TQIconSet(), tr( "&Index..." ), 0, 0, "helpIndexAction" );
+    TQAction *helpIndexAction = dfw->createAction( tr( "Index" ), TQIconSet(), tr( "&Index..." ), 0, nullptr, "helpIndexAction" );
     actions.insert( tr( "Index" ), helpIndexAction );
 
     if ( checkFileMenu->isChecked() ) {
@@ -312,7 +312,7 @@ void MainWindowWizardBase::pageSelected( const TQString & )
 
 void MainWindowWizardBase::setAppInterface( TQUnknownInterface * iface, DesignerFormWindow * fw, TQWidget * w )
 {
-    DesignerInterface *d = 0;
+    DesignerInterface *d = nullptr;
     iface->queryInterface(  IID_Designer, (TQUnknownInterface**)&d );
     dIface = d;
     dfw = fw;
diff --git a/tools/designer/plugins/wizards/sqlformwizardimpl.cpp b/tools/designer/plugins/wizards/sqlformwizardimpl.cpp
index 2291af5d9..00f81aa53 100644
--- a/tools/designer/plugins/wizards/sqlformwizardimpl.cpp
+++ b/tools/designer/plugins/wizards/sqlformwizardimpl.cpp
@@ -354,7 +354,7 @@ void SqlFormWizard::accept()
     }
 
     TQPtrList<DesignerDatabase> databases = proIface->databaseConnections();
-    DesignerDatabase *database = 0;
+    DesignerDatabase *database = nullptr;
     for ( DesignerDatabase *d = databases.first(); d; d = databases.next() ) {
 	if ( d->name() == listBoxConnection->currentText() || ( ( d->name() == "(default)" || d->name().isEmpty() ) && listBoxConnection->currentText() == "(default)" ) ) {
 	    database = d;
diff --git a/tools/designer/plugins/wizards/sqlformwizardimpl.h b/tools/designer/plugins/wizards/sqlformwizardimpl.h
index e6f3e38a5..dfe31299e 100644
--- a/tools/designer/plugins/wizards/sqlformwizardimpl.h
+++ b/tools/designer/plugins/wizards/sqlformwizardimpl.h
@@ -44,8 +44,8 @@ class SqlFormWizard : public SqlFormWizardBase
     TQ_OBJECT
 
 public:
-    SqlFormWizard( TQUnknownInterface *aIface, TQWidget *w, TQWidget* parent = 0, DesignerFormWindow *fw = 0,
-		   const char* name = 0, bool modal = false, WFlags fl = 0 );
+    SqlFormWizard( TQUnknownInterface *aIface, TQWidget *w, TQWidget* parent = nullptr, DesignerFormWindow *fw = nullptr,
+		   const char* name = nullptr, bool modal = false, WFlags fl = 0 );
     ~SqlFormWizard();
 
     void accept() const;
diff --git a/tools/designer/shared/globaldefs.h b/tools/designer/shared/globaldefs.h
index d121256d1..02f6e45e4 100644
--- a/tools/designer/shared/globaldefs.h
+++ b/tools/designer/shared/globaldefs.h
@@ -41,9 +41,9 @@
 #define BOXLAYOUT_DEFAULT_SPACING 6
 
 #ifndef NO_STATIC_COLORS
-static TQColor *backColor1 = 0;
-static TQColor *backColor2 = 0;
-static TQColor *selectedBack = 0;
+static TQColor *backColor1 = nullptr;
+static TQColor *backColor2 = nullptr;
+static TQColor *selectedBack = nullptr;
 
 static void init_colors()
 {
diff --git a/tools/designer/shared/uib.h b/tools/designer/shared/uib.h
index 8ee070ee6..7ef9fd5d3 100644
--- a/tools/designer/shared/uib.h
+++ b/tools/designer/shared/uib.h
@@ -97,7 +97,7 @@ private:
 
 inline int UibStrTable::insertCString( const char *cstr )
 {
-    if ( cstr == 0 || cstr[0] == 0 ) {
+    if ( !cstr || cstr[0] == 0 ) {
 	return 0;
     } else {
 	int nextPos = table.size();
diff --git a/tools/designer/shared/widgetdatabase.cpp b/tools/designer/shared/widgetdatabase.cpp
index b53842a9f..e66342243 100644
--- a/tools/designer/shared/widgetdatabase.cpp
+++ b/tools/designer/shared/widgetdatabase.cpp
@@ -50,13 +50,13 @@ const int dbsize = 300;
 const int dbcustom = 200;
 const int dbdictsize = 211;
 static WidgetDatabaseRecord* db[ dbsize ];
-static TQDict<int> *className2Id = 0;
+static TQDict<int> *className2Id = nullptr;
 static int dbcount  = 0;
 static int dbcustomcount = 200;
 static TQStrList *wGroups;
 static TQStrList *invisibleGroups;
 static bool whatsThisLoaded = false;
-static TQPluginManager<WidgetInterface> *widgetPluginManager = 0;
+static TQPluginManager<WidgetInterface> *widgetPluginManager = nullptr;
 static bool plugins_set_up = false;
 static bool was_in_setup = false;
 
@@ -66,7 +66,7 @@ WidgetDatabaseRecord::WidgetDatabaseRecord()
 {
     isForm = false;
     isContainer = false;
-    icon = 0;
+    icon = nullptr;
     nameCounter = 0;
     isCommon = false;
     isPlugin = false;
@@ -131,7 +131,7 @@ void WidgetDatabase::setupDataBase( int id )
     className2Id = new TQDict<int>( dbdictsize );
     className2Id->setAutoDelete( true );
 
-    WidgetDatabaseRecord *r = 0;
+    WidgetDatabaseRecord *r = nullptr;
 
     r = new WidgetDatabaseRecord;
     r->iconSet = "designer_pushbutton.png";
@@ -587,7 +587,7 @@ void WidgetDatabase::setupPlugins()
 	if ( hasWidget( *it ) )
 	    continue;
 	WidgetDatabaseRecord *r = new WidgetDatabaseRecord;
-	WidgetInterface *iface = 0;
+	WidgetInterface *iface = nullptr;
 	widgetManager()->queryInterface( *it, &iface );
 	if ( !iface )
 	    continue;
@@ -803,18 +803,18 @@ int WidgetDatabase::idFromClassName( const TQString &name )
 
 bool WidgetDatabase::hasWidget( const TQString &name )
 {
-    return className2Id->find( name ) != 0;
+    return className2Id->find( name );
 }
 
 WidgetDatabaseRecord *WidgetDatabase::at( int index )
 {
     if ( index < 0 )
-	return 0;
+	return nullptr;
     if ( index >= dbcustom && index < dbcustomcount )
 	return db[ index ];
     if ( index < dbcount )
 	return db[ index ];
-    return 0;
+    return nullptr;
 }
 
 void WidgetDatabase::insert( int index, WidgetDatabaseRecord *r )
@@ -843,7 +843,7 @@ TQString WidgetDatabase::widgetGroup( const TQString &g )
 
 bool WidgetDatabase::isGroupEmpty( const TQString &grp )
 {
-    WidgetDatabaseRecord *r = 0;
+    WidgetDatabaseRecord *r = nullptr;
     for ( int i = 0; i < dbcount; ++i ) {
 	if ( !( r = db[ i ] ) )
 	    continue;
@@ -934,7 +934,7 @@ void WidgetDatabase::loadWhatsThis( const TQString &docPath )
 // ### TQt 3.1: make these publically accessible via TQWidgetDatabase API
 #if defined(TQUIC)
 bool dbnounload = false;
-TQStringList *dbpaths = 0;
+TQStringList *dbpaths = nullptr;
 #else
 extern TQString *qwf_plugin_dir;
 #endif
diff --git a/tools/designer/tools/tqtconv2ui/main.cpp b/tools/designer/tools/tqtconv2ui/main.cpp
index 80803eb93..c0cba4a7f 100644
--- a/tools/designer/tools/tqtconv2ui/main.cpp
+++ b/tools/designer/tools/tqtconv2ui/main.cpp
@@ -52,7 +52,7 @@ private:
     TQPluginManager<ImportFilterInterface> * importFiltersManager;
 };
 
-Conv2ui::Conv2ui() : importFiltersManager( 0 )
+Conv2ui::Conv2ui() : importFiltersManager( nullptr )
 {
     reinit();
 }
@@ -90,7 +90,7 @@ bool Conv2ui::convert( const TQString & filename, const TQDir & dest )
 
     for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
 
-	ImportFilterInterface * interface = 0;
+	ImportFilterInterface * interface = nullptr;
 	importFiltersManager->queryInterface( *it, &interface );
 
 	if ( !interface ) continue;
@@ -114,7 +114,7 @@ bool Conv2ui::convert( const TQString & filename, const TQDir & dest )
 TQStringList Conv2ui::featureList()
 {
     if ( !importFiltersManager ) {
-	return 0;
+	return nullptr;
     }
     return importFiltersManager->featureList();
 }
diff --git a/tools/designer/tquic/form.cpp b/tools/designer/tquic/form.cpp
index b9d8fd703..cdacc9f16 100644
--- a/tools/designer/tquic/form.cpp
+++ b/tools/designer/tquic/form.cpp
@@ -838,8 +838,8 @@ void TQUic::createFormImpl( const TQDomElement &e )
 
     // find out what images are required
     TQStringList requiredImages;
-    static const char *imgTags[] = { "pixmap", "iconset", 0 };
-    for ( i = 0; imgTags[i] != 0; i++ ) {
+    static const char *imgTags[] = { "pixmap", "iconset", nullptr };
+    for ( i = 0; imgTags[i]; i++ ) {
 	nl = e.parentNode().toElement().elementsByTagName( imgTags[i] );
 	for ( int j = 0; j < (int) nl.length(); j++ ) {
 	    TQDomNode nn = nl.item(j);
diff --git a/tools/designer/tquic/main.cpp b/tools/designer/tquic/main.cpp
index f8cace3cf..d9153a811 100644
--- a/tools/designer/tquic/main.cpp
+++ b/tools/designer/tquic/main.cpp
@@ -60,14 +60,14 @@ int main( int argc, char * argv[] )
     bool binary = false;
 #endif
     TQStringList images;
-    const char *error = 0;
-    const char* fileName = 0;
-    const char* className = 0;
-    const char* headerFile = 0;
+    const char *error = nullptr;
+    const char* fileName = nullptr;
+    const char* className = nullptr;
+    const char* headerFile = nullptr;
     TQCString outputFile;
     TQCString image_tmpfile;
-    const char* projectName = 0;
-    const char* trmacro = 0;
+    const char* projectName = nullptr;
+    const char* trmacro = nullptr;
     bool nofwd = false;
     bool fix = false;
     TQCString pchFile;
@@ -81,7 +81,7 @@ int main( int argc, char * argv[] )
     if (pluginPaths.count())
 	TQApplication::setLibraryPaths(pluginPaths);
 
-    for ( int n = 1; n < argc && error == 0; n++ ) {
+    for ( int n = 1; n < argc && !error; n++ ) {
 	TQCString arg = argv[n];
 	if ( arg[0] == '-' ) {			// option
 	    TQCString opt = &arg[1];
diff --git a/tools/designer/tquic/object.cpp b/tools/designer/tquic/object.cpp
index c32176435..6fb746c39 100644
--- a/tools/designer/tquic/object.cpp
+++ b/tools/designer/tquic/object.cpp
@@ -307,12 +307,12 @@ TQString TQUic::createObjectImpl( const TQDomElement &e, const TQString& parentC
 	    }
 	}
      } else if ( objClass != "TQToolBar" && objClass != "TQMenuBar" ) { // standard widgets
-	 WidgetInterface *iface = 0;
+	 WidgetInterface *iface = nullptr;
 	 widgetManager()->queryInterface( objClass, &iface );
 #ifdef QT_CONTAINER_CUSTOM_WIDGETS
 	 int id = WidgetDatabase::idFromClassName( objClass );
 	 if ( WidgetDatabase::isContainer( id ) && WidgetDatabase::isCustomPluginWidget( id ) && iface ) {
-	     TQWidgetContainerInterfacePrivate *iface2 = 0;
+	     TQWidgetContainerInterfacePrivate *iface2 = nullptr;
 	     iface->queryInterface( IID_QWidgetContainer, (TQUnknownInterface**)&iface2 );
 	     if ( iface2 ) {
 		 bool supportsPages = iface2->supportsPages( objClass );
diff --git a/tools/designer/tquic/tquic.cpp b/tools/designer/tquic/tquic.cpp
index 246c3164a..9223cc0ff 100644
--- a/tools/designer/tquic/tquic.cpp
+++ b/tools/designer/tquic/tquic.cpp
@@ -934,7 +934,7 @@ TQString TQUic::createSpacerImpl( const TQDomElement &e, const TQString& /*paren
 static const char* const ColorRole[] = {
     "Foreground", "Button", "Light", "Midlight", "Dark", "Mid",
     "Text", "BrightText", "ButtonText", "Base", "Background", "Shadow",
-    "Highlight", "HighlightedText", "Link", "LinkVisited", 0
+    "Highlight", "HighlightedText", "Link", "LinkVisited", nullptr
 };
 
 
diff --git a/tools/designer/tquic/tquic.h b/tools/designer/tquic/tquic.h
index 18e44c26e..fb5fe6833 100644
--- a/tools/designer/tquic/tquic.h
+++ b/tools/designer/tquic/tquic.h
@@ -69,10 +69,10 @@ public:
     TQString createObjectInstance( const TQString& objClass, const TQString& parent, const TQString& objName );
     TQString createSpacerImpl( const TQDomElement &e, const TQString& parentClass, const TQString& parent, const TQString& layout = TQString::null );
     void createExclusiveProperty( const TQDomElement & e, const TQString& exclusiveProp );
-    TQString createListBoxItemImpl( const TQDomElement &e, const TQString &parent, TQString *value = 0 );
+    TQString createListBoxItemImpl( const TQDomElement &e, const TQString &parent, TQString *value = nullptr );
     TQString createIconViewItemImpl( const TQDomElement &e, const TQString &parent );
-    TQString createListViewColumnImpl( const TQDomElement &e, const TQString &parent, TQString *value = 0 );
-    TQString createTableRowColumnImpl( const TQDomElement &e, const TQString &parent, TQString *value = 0 );
+    TQString createListViewColumnImpl( const TQDomElement &e, const TQString &parent, TQString *value = nullptr );
+    TQString createTableRowColumnImpl( const TQDomElement &e, const TQString &parent, TQString *value = nullptr );
     TQString createListViewItemImpl( const TQDomElement &e, const TQString &parent,
 				    const TQString &parentItem );
     void createColorGroupImpl( const TQString& cg, const TQDomElement& e );
diff --git a/tools/designer/uilib/tqwidgetfactory.cpp b/tools/designer/uilib/tqwidgetfactory.cpp
index d416a7e64..36af561e3 100644
--- a/tools/designer/uilib/tqwidgetfactory.cpp
+++ b/tools/designer/uilib/tqwidgetfactory.cpp
@@ -114,19 +114,19 @@ public:
 };
 
 static TQPtrList<TQWidgetFactory> widgetFactories;
-static TQPluginManager<LanguageInterface> *languageInterfaceManager = 0;
-static TQPluginManager<WidgetInterface> *widgetInterfaceManager = 0;
+static TQPluginManager<LanguageInterface> *languageInterfaceManager = nullptr;
+static TQPluginManager<WidgetInterface> *widgetInterfaceManager = nullptr;
 
-static TQMap<TQString, bool> *availableWidgetMap = 0;
-static TQStringList *availableWidgetList = 0;
+static TQMap<TQString, bool> *availableWidgetMap = nullptr;
+static TQStringList *availableWidgetList = nullptr;
 
-TQ_EXPORT TQMap<TQWidget*, TQString> *qwf_forms = 0;
-TQString *qwf_language = 0;
+TQ_EXPORT TQMap<TQWidget*, TQString> *qwf_forms = nullptr;
+TQString *qwf_language = nullptr;
 TQ_EXPORT bool qwf_execute_code = true;
 bool qwf_stays_on_top = false;
 TQString qwf_currFileName = "";
-TQObject *qwf_form_object = 0;
-TQ_EXPORT TQString *qwf_plugin_dir = 0;
+TQObject *qwf_form_object = nullptr;
+TQ_EXPORT TQString *qwf_plugin_dir = nullptr;
 
 static void setupPluginDir()
 {
@@ -253,7 +253,7 @@ static TQSizePolicy::SizeType stringToSizeType( const TQString& str )
 /*! Constructs a TQWidgetFactory. */
 
 TQWidgetFactory::TQWidgetFactory()
-    : d( new TQWidgetFactoryPrivate() ), dbControls( 0 ),
+    : d( new TQWidgetFactoryPrivate() ), dbControls( nullptr ),
       usePixmapCollection( false ), defMargin( 11 ), defSpacing( 6 )
 {
     widgetFactories.setAutoDelete( true );
@@ -303,7 +303,7 @@ TQWidget *TQWidgetFactory::create( const TQString &uiFile, TQObject *connector,
 	failed = !f.open( IO_ReadOnly );
     }
     if ( failed )
-	return 0;
+	return nullptr;
 
     qwf_currFileName = uiFile;
     TQWidget *w = TQWidgetFactory::create( &f, connector, parent, name );
@@ -322,13 +322,13 @@ TQWidget *TQWidgetFactory::create( const TQString &uiFile, TQObject *connector,
 TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidget *parent, const char *name )
 {
     setupPluginDir();
-    TQWidget *w = 0;
+    TQWidget *w = nullptr;
     TQDomDocument doc;
     TQString errMsg;
     int errLine;
 
     TQWidgetFactory *widgetFactory = new TQWidgetFactory;
-    widgetFactory->toplevel = 0;
+    widgetFactory->toplevel = nullptr;
 
     // If we have no GUI, we only want to load the code
     if ( tqApp->type() != TQApplication::Tty ) {
@@ -349,7 +349,7 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge
 	}
 	if ( !w ) {
 	    delete widgetFactory;
-	    return 0;
+	    return nullptr;
 	}
     }
 
@@ -383,8 +383,8 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge
 		continue;
 	    TQValueList<Field> fieldMap = *widgetFactory->fieldMaps.find( table );
 	    TQString conn = (*it)[ 0 ];
-	    TQSqlCursor* c = 0;
-	    TQSqlDatabase *db = 0;
+	    TQSqlCursor* c = nullptr;
+	    TQSqlDatabase *db = nullptr;
 	    if ( conn.isEmpty() || conn == "(default)" ) {
 		db = TQSqlDatabase::database();
 		c = new TQSqlCursor( (*it)[ 1 ] );
@@ -477,10 +477,10 @@ TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connec
     if ( !imageCollection.isNull() )
 	loadImageCollection( imageCollection );
 
-    createWidgetInternal( widget, parent, 0, widget.attribute("class", "TQWidget") );
+    createWidgetInternal( widget, parent, nullptr, widget.attribute("class", "TQWidget") );
     TQWidget *w = toplevel;
     if ( !w )
-	return 0;
+	return nullptr;
 
     if ( !actions.isNull() )
 	loadActions( actions );
@@ -706,7 +706,7 @@ void TQWidgetFactory::inputSpacer( const UibStrTable& strings, TQDataStream& in,
 	in >> objectTag;
     }
 
-    if ( parent != 0 ) {
+    if ( parent ) {
 	TQSpacerItem *spacer;
 	if ( vertical ) {
 	    spacer = new TQSpacerItem( w, h, TQSizePolicy::Minimum, sizeType );
@@ -773,7 +773,7 @@ void TQWidgetFactory::inputColumnOrRow( const UibStrTable& strings,
 	in >> objectTag;
     }
 
-    if ( parent != 0 ) {
+    if ( parent ) {
 	if ( parent->inherits("TQListView") ) {
 	    createListViewColumn( (TQListView *) parent, text, pixmap, clickable,
 				  resizable );
@@ -796,12 +796,12 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
     TQCString comment;
     TQ_UINT8 objectTag;
 
-    TQListView *listView = 0;
-    if ( parent != 0 && parent->inherits("TQListView") )
+    TQListView *listView = nullptr;
+    if ( parent && parent->inherits("TQListView") )
 	parent = (TQListView *) parent;
-    TQListViewItem *item = 0;
-    if ( listView != 0 ) {
-	if ( parentItem == 0 ) {
+    TQListViewItem *item = nullptr;
+    if ( listView ) {
+	if ( !parentItem ) {
 	    item = new TQListViewItem( listView, d->lastItem );
 	} else {
 	    item = new TQListViewItem( parentItem, d->lastItem );
@@ -813,7 +813,7 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
     while ( !in.atEnd() && objectTag != Object_End ) {
 	switch ( objectTag ) {
 	case Object_Item:
-	    if ( listView != 0 )
+	    if ( listView )
 		d->lastItem->setOpen( true );
 	    inputItem( strings, in, parent, item );
 	    break;
@@ -838,7 +838,7 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
 	in >> objectTag;
     }
 
-    if ( listView != 0 ) {
+    if ( listView ) {
 	int i = 0;
 	TQStringList::ConstIterator t = texts.begin();
 	while ( t != texts.end() ) {
@@ -858,11 +858,11 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
 	TQString text = texts.last();
 	TQPixmap pixmap = pixmaps.last();
 
-	if ( parent != 0 ) {
+	if ( parent ) {
 	    if ( parent->inherits("TQComboBox") ||
 		 parent->inherits("TQListBox") ) {
 		TQListBox *listBox = (TQListBox *) parent->tqt_cast( "TQListBox" );
-		if ( listBox == 0 )
+		if ( !listBox )
 		    listBox = ((TQComboBox *) parent)->listBox();
 
 		if ( pixmap.isNull() ) {
@@ -916,15 +916,15 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
 				      TQDataStream& in, TQWidget *ancestorWidget,
 				      TQObject *parent, TQCString className )
 {
-    TQObject *obj = 0;
-    TQWidget *widget = 0;
-    TQLayout *layout = 0;
-    TQWidget *parentWidget = 0;
-    TQLayout *parentLayout = 0;
+    TQObject *obj = nullptr;
+    TQWidget *widget = nullptr;
+    TQLayout *layout = nullptr;
+    TQWidget *parentWidget = nullptr;
+    TQLayout *parentLayout = nullptr;
 
     bool isTQObject = !className.isEmpty();
     if ( isTQObject ) {
-	if ( parent != 0 ) {
+	if ( parent ) {
 	    if ( parent->isWidgetType() ) {
 		if ( parent->inherits("TQMainWindow") ) {
 		    parentWidget = ((TQMainWindow *) parent)->centralWidget();
@@ -952,8 +952,8 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
 	    } else if ( className == "TQVBoxLayout" ) {
 		type = VBox;
 	    }
-	    if ( parentLayout != 0 && parentLayout->inherits("TQGridLayout") ) {
-		layout = createLayout( 0, 0, type );
+	    if ( parentLayout && parentLayout->inherits("TQGridLayout") ) {
+		layout = createLayout( nullptr, nullptr, type );
 	    } else {
 		layout = createLayout( parentWidget, parentLayout, type );
 	    }
@@ -971,13 +971,13 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
 	    obj = widget;
 	} else if ( className == "TQWidget" ) {
 	    unpackCString( strings, in, className );
-	    widget = createWidget( className, parentWidget, 0 );
+	    widget = createWidget( className, parentWidget, nullptr );
 	    obj = widget;
 	}
 
-	if ( widget != 0 )
+	if ( widget )
 	    ancestorWidget = widget;
-	d->lastItem = 0;
+	d->lastItem = nullptr;
 	objects[numObjects++] = obj;
     }
 
@@ -1039,7 +1039,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
 		if ( fontFlags & Font_StrikeOut )
 		    font.setStrikeOut( true );
 
-		if ( obj != 0 )
+		if ( obj )
 		    setProperty( obj, name, font );
 	    }
 	    break;
@@ -1095,7 +1095,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
 		    }
 		    in >> paletteTag;
 		}
-		if ( obj != 0 )
+		if ( obj )
 		    setProperty( obj, name, palette );
 	    }
 	    break;
@@ -1110,7 +1110,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
 	    break;
 	case Object_SubAction:
 	    inputObject( objects, numObjects, strings, in, parentWidget,
-			 obj != 0 ? obj : parent, "TQAction" );
+			 obj ? obj : parent, "TQAction" );
 	    break;
 	case Object_SubLayout:
 	    inputObject( objects, numObjects, strings, in, parentWidget, obj,
@@ -1128,7 +1128,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
 
 	    if ( metAttribute > 0 ) {
 		if ( name == "title" ) {
-		    if ( parent != 0 ) {
+		    if ( parent ) {
 			if ( parent->inherits("TQTabWidget") ) {
 			    ((TQTabWidget *) parent)->insertTab( widget, str );
 			} else if ( parent->inherits("TQWizard") ) {
@@ -1137,7 +1137,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
 		    }
 		}
 	    } else {
-		if ( obj != 0 )
+		if ( obj )
 		    setProperty( obj, name, str );
 	    }
 	    break;
@@ -1147,11 +1147,11 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
 
 	    if ( metAttribute > 0 ) {
 		if ( name == "id" ) {
-		    if ( parent != 0 && parent->inherits("TQWidgetStack") )
+		    if ( parent && parent->inherits("TQWidgetStack") )
 			((TQWidgetStack *) parent)->addWidget( widget, value.toInt() );
 		}
 	    } else {
-		if ( obj != 0 )
+		if ( obj )
 		    setProperty( obj, name, value );
 	    }
 	    break;
@@ -1162,8 +1162,8 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
 	metAttribute--;
     }
 
-    if ( parentLayout != 0 ) {
-	if ( widget != 0 ) {
+    if ( parentLayout ) {
+	if ( widget ) {
 	    if ( parentLayout->inherits("TQGridLayout") ) {
 		((TQGridLayout *) parentLayout)->addMultiCellWidget(
 			widget, row, row + rowspan - 1, column,
@@ -1171,7 +1171,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects,
 	    } else {
 		((TQBoxLayout *) parentLayout)->addWidget( widget );
 	    }
-	} else if ( layout != 0 ) {
+	} else if ( layout ) {
 	    if ( parentLayout->inherits("TQGridLayout") ) {
 		((TQGridLayout *) parentLayout)->addMultiCellLayout(
 			layout, row, row + rowspan - 1, column,
@@ -1194,19 +1194,19 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
     in >> cr;
     if ( lf != '\n' || cr != '\r' ) {
 	tqWarning( "File corrupted" );
-	return 0;
+	return nullptr;
     }
 
     TQ_UINT8 tqdatastreamVersion;
     in >> tqdatastreamVersion;
     if ( (int) tqdatastreamVersion > in.version() ) {
 	tqWarning( "Incompatible version of TQt" );
-	return 0;
+	return nullptr;
     }
     in.setVersion( tqdatastreamVersion );
 
     UibStrTable strings;
-    TQObject **objects = 0;
+    TQObject **objects = nullptr;
     int numObjects = 0;
 
     TQ_UINT8 blockType;
@@ -1231,7 +1231,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
 		    unpackUInt16( in, buddyNo );
 		    TQLabel *label =
 			(TQLabel *) objects[labelNo]->tqt_cast( "TQLabel" );
-		    if ( label != 0 )
+		    if ( label )
 			label->setBuddy( (TQWidget *) objects[buddyNo] );
 		} while ( !END_OF_BLOCK() );
 	    }
@@ -1357,12 +1357,12 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
 	    toplevel = (TQWidget *)
 		inputObject( objects, numObjects, strings, in, toplevel, parent,
 			     "TQWidget" );
-	    if ( toplevel != 0 )
+	    if ( toplevel )
 		toplevel->setName( name );
 	    break;
 	default:
 	    tqWarning( "Version error" );
-	    return 0;
+	    return nullptr;
 	}
 	in >> blockType;
     }
@@ -1512,7 +1512,7 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *pa
     } else if ( className == "TQGrid" ) {
 	return new TQGrid( 4, parent, name );
     } else if ( className == "TQMainWindow" ) {
-	TQMainWindow *mw = 0;
+	TQMainWindow *mw = nullptr;
 	if ( !qwf_stays_on_top )
 	    mw = new TQMainWindow( parent, name );
 	else
@@ -1540,7 +1540,7 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *pa
 	    new TQPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(),
 						 *qwf_plugin_dir );
 
-    TQInterfacePtr<WidgetInterface> iface = 0;
+    TQInterfacePtr<WidgetInterface> iface = nullptr;
     widgetInterfaceManager->queryInterface( className, &iface );
     if ( iface ) {
 	TQWidget *w = iface->create( className, parent, name );
@@ -1558,7 +1558,7 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *pa
     }
 
     // no success
-    return 0;
+    return nullptr;
 }
 
 /*! Returns the names of the widgets this factory can create. */
@@ -1581,10 +1581,10 @@ bool TQWidgetFactory::supportsWidget( const TQString &widget )
 TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget *parent,
 					       TQLayout* layout, const TQString &classNameArg )
 {
-    d->lastItem = 0;
+    d->lastItem = nullptr;
     TQDomElement n = e.firstChild().toElement();
-    TQWidget *w = 0; // the widget that got created
-    TQObject *obj = 0; // gets the properties
+    TQWidget *w = nullptr; // the widget that got created
+    TQObject *obj = nullptr; // gets the properties
 
     TQString className = classNameArg;
 
@@ -1608,9 +1608,9 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
 	    // hide layout widgets
 	    w = parent;
 	} else {
-	    obj = TQWidgetFactory::createWidget( className, parent, 0 );
+	    obj = TQWidgetFactory::createWidget( className, parent, nullptr );
 	    if ( !obj )
-		return 0;
+		return nullptr;
 	    w = (TQWidget*)obj;
 	    if ( !toplevel )
 		toplevel = w;
@@ -1633,7 +1633,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
 		}
 	    }
 
-	    layout = 0;
+	    layout = nullptr;
 	}
     }
 #ifdef QT_CONTAINER_CUSTOM_WIDGETS
@@ -1655,7 +1655,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
 	} else if ( n.tagName() == "hbox" ) {
 	    TQLayout *parentLayout = layout;
 	    if ( layout && layout->inherits( "TQGridLayout" ) )
-		layout = createLayout( 0, 0, TQWidgetFactory::HBox, isTQLayoutWidget );
+		layout = createLayout( nullptr, nullptr, TQWidgetFactory::HBox, isTQLayoutWidget );
 	    else
 		layout = createLayout( w, layout, TQWidgetFactory::HBox, isTQLayoutWidget );
 	    obj = layout;
@@ -1667,7 +1667,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
 	} else if ( n.tagName() == "grid" ) {
 	    TQLayout *parentLayout = layout;
 	    if ( layout && layout->inherits( "TQGridLayout" ) )
-		layout = createLayout( 0, 0, TQWidgetFactory::Grid, isTQLayoutWidget );
+		layout = createLayout( nullptr, nullptr, TQWidgetFactory::Grid, isTQLayoutWidget );
 	    else
 		layout = createLayout( w, layout, TQWidgetFactory::Grid, isTQLayoutWidget );
 	    obj = layout;
@@ -1679,7 +1679,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
 	} else if ( n.tagName() == "vbox" ) {
 	    TQLayout *parentLayout = layout;
 	    if ( layout && layout->inherits( "TQGridLayout" ) )
-		layout = createLayout( 0, 0, TQWidgetFactory::VBox, isTQLayoutWidget );
+		layout = createLayout( nullptr, nullptr, TQWidgetFactory::VBox, isTQLayoutWidget );
 	    else
 		layout = createLayout( w, layout, TQWidgetFactory::VBox, isTQLayoutWidget );
 	    obj = layout;
@@ -1709,10 +1709,10 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget
 #ifdef QT_CONTAINER_CUSTOM_WIDGETS
 		} else if ( isPlugin ) {
 		    if ( attrib == "label" ) {
-			WidgetInterface *iface = 0;
+			WidgetInterface *iface = nullptr;
 			widgetInterfaceManager->queryInterface( parentClassName, &iface );
 			if ( iface ) {
-			    TQWidgetContainerInterfacePrivate *iface2 = 0;
+			    TQWidgetContainerInterfacePrivate *iface2 = nullptr;
 			    iface->queryInterface( IID_QWidgetContainer,
 						   (TQUnknownInterface**)&iface2 );
 			    if ( iface2 ) {
@@ -1760,7 +1760,7 @@ TQLayout *TQWidgetFactory::createLayout( TQWidget *widget, TQLayout* layout,
     if ( !layout && widget && widget->inherits( "TQToolBox" ) )
 	widget = ((TQToolBox*)widget)->currentItem();
 
-    TQLayout *l = 0;
+    TQLayout *l = nullptr;
     int align = 0;
     if ( !layout && widget && widget->inherits( "TQGroupBox" ) ) {
 	TQGroupBox *gb = (TQGroupBox*)widget;
@@ -1782,7 +1782,7 @@ TQLayout *TQWidgetFactory::createLayout( TQWidget *widget, TQLayout* layout,
 	    l = new TQGridLayout( layout );
 	    break;
 	default:
-	    return 0;
+	    return nullptr;
 	}
     } else {
 	switch ( type ) {
@@ -1796,7 +1796,7 @@ TQLayout *TQWidgetFactory::createLayout( TQWidget *widget, TQLayout* layout,
 	    l = new TQGridLayout( widget );
 	    break;
 	default:
-	    return 0;
+	    return nullptr;
 	}
     }
     l->setAlignment( align );
@@ -1831,7 +1831,7 @@ void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop,
 		 value.type() == TQVariant::CString ) {
 		const TQMetaProperty *metaProp =
 			obj->metaObject()->property( offset, true );
-		if ( metaProp != 0 && metaProp->isEnumType() ) {
+		if ( metaProp && metaProp->isEnumType() ) {
 		    if ( metaProp->isSetType() ) {
 			TQStrList flagsCStr;
 			TQStringList flagsStr =
@@ -1979,7 +1979,7 @@ static TQImage loadImageData( TQDomElement &n2 )
     int n = hex.length() / 2;
     TQByteArray data( n );
     for ( int i = 0; i < n; i++ )
-	data[i] = (char) hex.mid( 2 * i, 2 ).toUInt( 0, 16 );
+	data[i] = (char) hex.mid( 2 * i, 2 ).toUInt( nullptr, 16 );
     return loadImageData( format, n2.attribute("length").toULong(), data );
 }
 
@@ -2058,7 +2058,7 @@ struct Connection
 	       signal == c.signal && slot == c.slot ;
     }
 
-    Connection() : sender( 0 ), receiver( 0 ) { }
+    Connection() : sender( nullptr ), receiver( nullptr ) { }
 };
 
 class NormalizeObject : public TQObject
@@ -2084,7 +2084,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
 		    } else {
 			if ( name == "this" )
 			    name = toplevel->name();
-			TQObjectList *l = toplevel->queryList( 0, name, false );
+			TQObjectList *l = toplevel->queryList( nullptr, name, false );
 			if ( l ) {
 			    if ( l->first() )
 				conn.sender = l->first();
@@ -2100,7 +2100,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
 		    if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
 			conn.receiver = toplevel;
 		    } else {
-			TQObjectList *l = toplevel->queryList( 0, name, false );
+			TQObjectList *l = toplevel->queryList( nullptr, name, false );
 			if ( l ) {
 			    if ( l->first() )
 				conn.receiver = l->first();
@@ -2121,8 +2121,8 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
 		continue;
 	    }
 
-	    TQObject *sender = 0, *receiver = 0;
-	    TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), false );
+	    TQObject *sender = nullptr, *receiver = nullptr;
+	    TQObjectList *l = toplevel->queryList( nullptr, conn.sender->name(), false );
 	    if ( qstrcmp( conn.sender->name(), toplevel->name() ) == 0 ) {
 		sender = toplevel;
 	    } else {
@@ -2140,7 +2140,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
 	    if ( qstrcmp( conn.receiver->name(), toplevel->name() ) == 0 ) {
 		receiver = toplevel;
 	    } else {
-		l = toplevel->queryList( 0, conn.receiver->name(), false );
+		l = toplevel->queryList( nullptr, conn.receiver->name(), false );
 		if ( !l || !l->first() ) {
 		    delete l;
 		    n = n.nextSibling().toElement();
@@ -2178,12 +2178,12 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
 
 void TQWidgetFactory::loadTabOrder( const TQDomElement &e )
 {
-    TQWidget *last = 0;
+    TQWidget *last = nullptr;
     TQDomElement n = e.firstChild().toElement();
     while ( !n.isNull() ) {
 	if ( n.tagName() == "tabstop" ) {
 	    TQString name = n.firstChild().toText().data();
-	    TQObjectList *l = toplevel->queryList( 0, name, false );
+	    TQObjectList *l = toplevel->queryList( nullptr, name, false );
 	    if ( l ) {
 		if ( l->first() ) {
 		    TQWidget *w = (TQWidget*)l->first();
@@ -2345,7 +2345,7 @@ void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLis
 	bool hasPixmap = false;
 	TQString txt;
 	loadItem( n, pix, txt, hasPixmap );
-	TQListBox *lb = 0;
+	TQListBox *lb = nullptr;
 	if ( widget->inherits( "TQListBox" ) ) {
 	    lb = (TQListBox*)widget;
 	} else {
@@ -2377,7 +2377,7 @@ void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLis
 	TQPixmap pix;
 	TQValueList<TQPixmap> pixmaps;
 	TQStringList textes;
-	TQListViewItem *item = 0;
+	TQListViewItem *item = nullptr;
 	TQListView *lv = (TQListView*)widget;
 	if ( i )
 	    item = new TQListViewItem( i, d->lastItem );
@@ -2419,7 +2419,7 @@ void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLis
 void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e )
 {
     TQDomElement n = e;
-    TQAction *a = 0;
+    TQAction *a = nullptr;
     bool hasMenuText = false;
     if ( n.tagName() == "action" ) {
 	a = new TQAction( parent );
@@ -2477,7 +2477,7 @@ void TQWidgetFactory::loadToolBars( const TQDomElement &e )
 {
     TQDomElement n = e.firstChild().toElement();
     TQMainWindow *mw = ( (TQMainWindow*)toplevel );
-    TQToolBar *tb = 0;
+    TQToolBar *tb = nullptr;
     while ( !n.isNull() ) {
 	if ( n.tagName() == "toolbar" ) {
 	    TQt::Dock dock = (TQt::Dock)n.attribute( "dock" ).toInt();
@@ -2493,7 +2493,7 @@ void TQWidgetFactory::loadToolBars( const TQDomElement &e )
 		} else if ( n2.tagName() == "separator" ) {
 		    tb->addSeparator();
 		} else if ( n2.tagName() == "widget" ) {
-		    (void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", "TQWidget" ) );
+		    (void)createWidgetInternal( n2, tb, nullptr, n2.attribute( "class", "TQWidget" ) );
 		} else if ( n2.tagName() == "property" ) {
 		    setProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() );
 		}
@@ -2549,7 +2549,7 @@ void TQWidgetFactory::loadPopupMenu( TQPopupMenu *p, const TQDomElement &e )
 		    a->addTo( p );
 		}
 	    }
-	    a = 0;
+	    a = nullptr;
 	} else if ( n.tagName() == "separator" ) {
 	    p->insertSeparator();
 	}
@@ -2572,7 +2572,7 @@ TQAction *TQWidgetFactory::findAction( const TQString &name )
 	if ( ac )
 	    return ac;
     }
-    return 0;
+    return nullptr;
 }
 
 /*!
@@ -2599,7 +2599,7 @@ void TQWidgetFactory::loadExtraSource()
     if ( !qwf_language || !languageInterfaceManager )
 	return;
     TQString lang = *qwf_language;
-    LanguageInterface *iface = 0;
+    LanguageInterface *iface = nullptr;
     languageInterfaceManager->queryInterface( lang, &iface );
     if ( !iface )
 	return;
diff --git a/tools/designer/uilib/tqwidgetfactory.h b/tools/designer/uilib/tqwidgetfactory.h
index 25a514024..9ee5080c3 100644
--- a/tools/designer/uilib/tqwidgetfactory.h
+++ b/tools/designer/uilib/tqwidgetfactory.h
@@ -61,8 +61,8 @@ public:
     TQWidgetFactory();
     virtual ~TQWidgetFactory();
 
-    static TQWidget *create( const TQString &uiFile, TQObject *connector = 0, TQWidget *parent = 0, const char *name = 0 );
-    static TQWidget *create( TQIODevice *dev, TQObject *connector = 0, TQWidget *parent = 0, const char *name = 0 );
+    static TQWidget *create( const TQString &uiFile, TQObject *connector = nullptr, TQWidget *parent = nullptr, const char *name = nullptr );
+    static TQWidget *create( TQIODevice *dev, TQObject *connector = nullptr, TQWidget *parent = nullptr, const char *name = nullptr );
     static void addWidgetFactory( TQWidgetFactory *factory );
     static void loadImages( const TQString &dir );
 
@@ -95,7 +95,7 @@ private:
 #endif
     void createColumn( const TQDomElement &e, TQWidget *widget );
     void loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap );
-    void createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i = 0 );
+    void createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i = nullptr );
     void loadChildAction( TQObject *parent, const TQDomElement &e );
     void loadActions( const TQDomElement &e );
     void loadToolBars( const TQDomElement &e );
@@ -123,7 +123,7 @@ private:
     void inputColumnOrRow( const UibStrTable& strings, TQDataStream& in,
 			   TQObject *parent, bool isRow );
     void inputItem( const UibStrTable& strings, TQDataStream& in,
-		    TQObject *parent, TQListViewItem *parentItem = 0 );
+		    TQObject *parent, TQListViewItem *parentItem = nullptr );
     void inputMenuItem( TQObject **objects, const UibStrTable& strings,
 			TQDataStream& in, TQMenuBar *menuBar );
     TQObject *inputObject( TQObject **objects, int& numObjects,
diff --git a/tools/linguist/linguist/finddialog.cpp b/tools/linguist/linguist/finddialog.cpp
index 2d863d411..53ff655ce 100644
--- a/tools/linguist/linguist/finddialog.cpp
+++ b/tools/linguist/linguist/finddialog.cpp
@@ -50,11 +50,11 @@ FindDialog::FindDialog( bool replace, TQWidget *parent, const char *name,
 			bool modal )
     : TQDialog( parent, name, modal )
 {
-    sourceText = 0;
+    sourceText = nullptr;
     
     led = new TQLineEdit( this, "find line edit" );
     TQLabel *findWhat = new TQLabel( led, tr("Fi&nd what:"), this, "find what" );
-    TQLabel *replaceWith = 0;
+    TQLabel *replaceWith = nullptr;
     TQPushButton *findNxt = new TQPushButton( tr("&Find Next"), this,
 					    "find next" );
     findNxt->setDefault( true );
@@ -163,7 +163,7 @@ FindDialog::FindDialog( bool replace, TQWidget *parent, const char *name,
 void FindDialog::emitFindNext()
 {
     int where;
-    if ( sourceText != 0 )
+    if ( sourceText )
 	where = ( sourceText->isChecked() ? SourceText : 0 ) |
 		( translations->isChecked() ? Translations : 0 ) |
 		( comments->isChecked() ? Comments : 0 );
diff --git a/tools/linguist/linguist/finddialog.h b/tools/linguist/linguist/finddialog.h
index 8536bc7a2..992b469a4 100644
--- a/tools/linguist/linguist/finddialog.h
+++ b/tools/linguist/linguist/finddialog.h
@@ -45,7 +45,7 @@ class FindDialog : public TQDialog
 public:
     enum { SourceText = 0x1, Translations = 0x2, Comments = 0x4 };
 
-    FindDialog( bool replace, TQWidget *parent = 0, const char *name = 0, bool modal = false );
+    FindDialog( bool replace, TQWidget *parent = nullptr, const char *name = nullptr, bool modal = false );
 
 signals:
     void findNext( const TQString& text, int where, bool matchCase );
diff --git a/tools/linguist/linguist/main.cpp b/tools/linguist/linguist/main.cpp
index 8d96c0e4a..9cc22fe67 100644
--- a/tools/linguist/linguist/main.cpp
+++ b/tools/linguist/linguist/main.cpp
@@ -48,7 +48,7 @@ int main( int argc, char **argv )
     TQApplication::setOverrideCursor( TQt::waitCursor );
 
 
-    TQTranslator translator( 0 );
+    TQTranslator translator( nullptr );
     translator.load( TQString( "linguist_" ) + TQTextCodec::locale(), "." );
     app.installTranslator( &translator );
 
@@ -64,7 +64,7 @@ int main( int argc, char **argv )
     r.setWidth( config.readNumEntry( keybase + "Geometry/MainwindowWidth", r.width() ) );
     r.setHeight( config.readNumEntry( keybase + "Geometry/MainwindowHeight", r.height() ) );
 
-    TQSplashScreen *splash = 0;
+    TQSplashScreen *splash = nullptr;
     if ( showSplash ) {
 	splash = new TQSplashScreen( TQPixmap::fromMimeSource("splash.png"),
 				    TQt::WDestructiveClose );
diff --git a/tools/linguist/linguist/msgedit.cpp b/tools/linguist/linguist/msgedit.cpp
index 4ed0b5dbb..b36b309aa 100644
--- a/tools/linguist/linguist/msgedit.cpp
+++ b/tools/linguist/linguist/msgedit.cpp
@@ -69,7 +69,7 @@ static const int MaxCandidates = 5;
 class MED : public TQTextEdit
 {
 public:
-    MED( TQWidget *parent, const char *name = 0 )
+    MED( TQWidget *parent, const char *name = nullptr )
 	: TQTextEdit( parent, name ) {}
 
     int cursorX() const { return textCursor()->x(); }
@@ -102,7 +102,7 @@ TQString richText( const TQString& text )
 
 	if ( ch < 0x20 ) {
 	    const char *p = strchr( backTab, ch );
-	    if ( p == 0 )
+	    if ( !p )
 		rich += richMeta( TQString::number(ch, 16) );
 	    else
 		rich += richMeta( MessageEditor::tr(friendlyBackTab[p - backTab]) );
@@ -133,13 +133,13 @@ TQString richText( const TQString& text )
    Used to create a shadow like effect for a widget
 */
 ShadowWidget::ShadowWidget( TQWidget * parent, const char * name )
-    : TQWidget( parent, name ), sWidth( 10 ), wMargin( 3 ), childWgt( 0 )
+    : TQWidget( parent, name ), sWidth( 10 ), wMargin( 3 ), childWgt( nullptr )
 {
 }
 
 ShadowWidget::ShadowWidget( TQWidget * child, TQWidget * parent,
 			    const char * name )
-    : TQWidget( parent, name ), sWidth( 10 ), wMargin( 3 ), childWgt( 0 )
+    : TQWidget( parent, name ), sWidth( 10 ), wMargin( 3 ), childWgt( nullptr )
 {
     setWidget( child );
 }
@@ -766,9 +766,9 @@ void MessageEditor::emitTranslationChanged()
 void MessageEditor::guessActivated( int accelKey )
 {
     TQListViewItem *item = phraseLv->firstChild();
-    while ( item != 0 && ((PhraseLVI *) item)->accelKey() != accelKey )
+    while ( item && ((PhraseLVI *) item)->accelKey() != accelKey )
 	item = item->nextSibling();
-    if ( item != 0 )
+    if ( item )
 	insertPhraseInTranslation( item );
 }
 
diff --git a/tools/linguist/linguist/msgedit.h b/tools/linguist/linguist/msgedit.h
index 7e881afc0..6d75781e2 100644
--- a/tools/linguist/linguist/msgedit.h
+++ b/tools/linguist/linguist/msgedit.h
@@ -65,7 +65,7 @@ class PageCurl : public TQWidget
 {
     TQ_OBJECT
 public:
-    PageCurl( TQWidget * parent = 0, const char * name = 0,
+    PageCurl( TQWidget * parent = nullptr, const char * name = nullptr,
 	      WFlags f = 0 )
 	: TQWidget( parent, name, f )
     {
@@ -104,8 +104,8 @@ signals:
 class ShadowWidget : public TQWidget
 {    
 public:
-    ShadowWidget( TQWidget * parent = 0, const char * name = 0 );
-    ShadowWidget( TQWidget * child, TQWidget * parent = 0, const char * name = 0 );
+    ShadowWidget( TQWidget * parent = nullptr, const char * name = nullptr );
+    ShadowWidget( TQWidget * child, TQWidget * parent = nullptr, const char * name = nullptr );
     
     void setShadowWidth( int width ) { sWidth = width; }
     int  shadowWidth() const { return sWidth; }
@@ -127,7 +127,7 @@ class EditorPage : public TQFrame
 {
     TQ_OBJECT
 public:
-    EditorPage( TQWidget * parent = 0, const char * name = 0 );
+    EditorPage( TQWidget * parent = nullptr, const char * name = nullptr );
     
 protected:
     void resizeEvent( TQResizeEvent * );
@@ -159,8 +159,8 @@ class MessageEditor : public TQWidget
 {
     TQ_OBJECT
 public:
-    MessageEditor( MetaTranslator * t, TQWidget * parent = 0,
-		   const char * name = 0 );
+    MessageEditor( MetaTranslator * t, TQWidget * parent = nullptr,
+		   const char * name = nullptr );
     TQListView * sourceTextList() const;
     TQListView * phraseList() const;
     
diff --git a/tools/linguist/linguist/phrase.cpp b/tools/linguist/linguist/phrase.cpp
index cd46e7f60..854ca267e 100644
--- a/tools/linguist/linguist/phrase.cpp
+++ b/tools/linguist/linguist/phrase.cpp
@@ -155,8 +155,8 @@ bool PhraseBook::load( const TQString& filename )
     reader.setErrorHandler( hand );
 
     bool ok = reader.parse( in );
-    reader.setContentHandler( 0 );
-    reader.setErrorHandler( 0 );
+    reader.setContentHandler( nullptr );
+    reader.setErrorHandler( nullptr );
     delete hand;
     f.close();
     if ( !ok )
diff --git a/tools/linguist/linguist/phrasebookbox.cpp b/tools/linguist/linguist/phrasebookbox.cpp
index 0ad9545b8..6e4b2e9e8 100644
--- a/tools/linguist/linguist/phrasebookbox.cpp
+++ b/tools/linguist/linguist/phrasebookbox.cpp
@@ -147,10 +147,10 @@ void PhraseBookBox::newPhrase()
 void PhraseBookBox::removePhrase()
 {
     TQListViewItem *item = lv->currentItem();
-    TQListViewItem *next = item->itemBelow() != 0 ? item->itemBelow()
+    TQListViewItem *next = item->itemBelow() ? item->itemBelow()
 			  : item->itemAbove();
     delete item;
-    if ( next != 0 )
+    if ( next )
 	selectItem( next );
     enableDisable();
 }
@@ -159,7 +159,7 @@ void PhraseBookBox::save()
 {
     pb.clear();
     TQListViewItem *item = lv->firstChild();
-    while ( item != 0 ) {
+    while ( item ) {
 	if ( !item->text(PhraseLVI::SourceTextShown).isEmpty() &&
 	     item->text(PhraseLVI::SourceTextShown) != NewPhrase )
 	    pb.append( Phrase(((PhraseLVI *) item)->phrase()) );
@@ -172,7 +172,7 @@ void PhraseBookBox::save()
 
 void PhraseBookBox::sourceChanged( const TQString& source )
 {
-    if ( lv->currentItem() != 0 ) {
+    if ( lv->currentItem() ) {
 	lv->currentItem()->setText( PhraseLVI::SourceTextShown,
 				    source.stripWhiteSpace() );
 	lv->currentItem()->setText( PhraseLVI::SourceTextOriginal, source );
@@ -183,7 +183,7 @@ void PhraseBookBox::sourceChanged( const TQString& source )
 
 void PhraseBookBox::targetChanged( const TQString& target )
 {
-    if ( lv->currentItem() != 0 ) {
+    if ( lv->currentItem() ) {
 	lv->currentItem()->setText( PhraseLVI::TargetTextShown,
 				    target.stripWhiteSpace() );
 	lv->currentItem()->setText( PhraseLVI::TargetTextOriginal, target );
@@ -194,7 +194,7 @@ void PhraseBookBox::targetChanged( const TQString& target )
 
 void PhraseBookBox::definitionChanged( const TQString& definition )
 {
-    if ( lv->currentItem() != 0 ) {
+    if ( lv->currentItem() ) {
 	lv->currentItem()->setText( PhraseLVI::DefinitionText, definition );
 	lv->sort();
 	lv->ensureItemVisible( lv->currentItem() );
@@ -220,7 +220,7 @@ void PhraseBookBox::enableDisable()
     targetLed->blockSignals( true );
     definitionLed->blockSignals( true );
 
-    if ( item == 0 ) {
+    if ( !item ) {
 	sourceLed->setText( TQString::null );
 	targetLed->setText( TQString::null );
 	definitionLed->setText( TQString::null );
@@ -229,10 +229,10 @@ void PhraseBookBox::enableDisable()
 	targetLed->setText( item->text(1) );
 	definitionLed->setText( item->text(2) );
     }
-    sourceLed->setEnabled( item != 0 );
-    targetLed->setEnabled( item != 0 );
-    definitionLed->setEnabled( item != 0 );
-    removeBut->setEnabled( item != 0 );
+    sourceLed->setEnabled( item );
+    targetLed->setEnabled( item );
+    definitionLed->setEnabled( item );
+    removeBut->setEnabled( item );
 
     sourceLed->blockSignals( false );
     targetLed->blockSignals( false );
diff --git a/tools/linguist/linguist/phrasebookbox.h b/tools/linguist/linguist/phrasebookbox.h
index af98afcb3..705a06ede 100644
--- a/tools/linguist/linguist/phrasebookbox.h
+++ b/tools/linguist/linguist/phrasebookbox.h
@@ -50,7 +50,7 @@ class PhraseBookBox : public TQDialog
     TQ_OBJECT
 public:
     PhraseBookBox( const TQString& filename, const PhraseBook& phraseBook,
-		   TQWidget *parent = 0, const char *name = 0,
+		   TQWidget *parent = nullptr, const char *name = nullptr,
 		   bool modal = false );
 
     const PhraseBook& phraseBook() const { return pb; }
diff --git a/tools/linguist/linguist/phraselv.cpp b/tools/linguist/linguist/phraselv.cpp
index f04dae603..1a542969e 100644
--- a/tools/linguist/linguist/phraselv.cpp
+++ b/tools/linguist/linguist/phraselv.cpp
@@ -63,7 +63,7 @@ WhatPhrase::WhatPhrase( PhraseLV *w )
 TQString WhatPhrase::text( const TQPoint& p )
 {
     TQListViewItem *item = parent->itemAt( p );
-    if ( item == 0 )
+    if ( !item )
 	return PhraseLV::tr( "This is a list of phrase entries relevant to the"
 		  " source text.  Each phrase is supplemented with a suggested"
 		  " translation and a definition." );
diff --git a/tools/linguist/linguist/trwindow.cpp b/tools/linguist/linguist/trwindow.cpp
index 44a032107..ab80eb23a 100644
--- a/tools/linguist/linguist/trwindow.cpp
+++ b/tools/linguist/linguist/trwindow.cpp
@@ -111,10 +111,10 @@ typedef TQValueList<MetaTranslatorMessage> TML;
 static const int ErrorMS = 600000; // for error messages
 static const int MessageMS = 2500;
 
-TQPixmap * TrWindow::pxOn = 0;
-TQPixmap * TrWindow::pxOff = 0;
-TQPixmap * TrWindow::pxObsolete = 0;
-TQPixmap * TrWindow::pxDanger = 0;
+TQPixmap * TrWindow::pxOn = nullptr;
+TQPixmap * TrWindow::pxOff = nullptr;
+TQPixmap * TrWindow::pxObsolete = nullptr;
+TQPixmap * TrWindow::pxDanger = nullptr;
 
 enum Ending { End_None, End_FullStop, End_Interrobang, End_Colon,
 	      End_Ellipsis };
@@ -228,7 +228,7 @@ const TQPixmap TrWindow::pageCurl()
 }
 
 TrWindow::TrWindow()
-    : TQMainWindow( 0, "translation window", WType_TopLevel | WDestructiveClose )
+    : TQMainWindow( nullptr, "translation window", WType_TopLevel | WDestructiveClose )
 {
 
 #ifndef TQ_WS_MACX
@@ -296,7 +296,7 @@ TrWindow::TrWindow()
     findMatchCase = false;
     findWhere = 0;
     foundItem = 0;
-    foundScope = 0;
+    foundScope = nullptr;
     foundWhere = 0;
     foundOffset = 0;
 
@@ -327,13 +327,13 @@ TrWindow::TrWindow()
     TQWhatsThis::add( slv, tr("This panel lists the source texts. "
 			    "Items that violate validation rules "
 			    "are marked with a warning.") );
-    showNewCurrent( 0 );
+    showNewCurrent( nullptr );
 
     TQSize as( tqApp->desktop()->size() );
     as -= TQSize( 30, 30 );
     resize( TQSize( 1000, 800 ).boundedTo( as ) );
     readConfig();
-    stats = 0;
+    stats = nullptr;
     srcWords = 0;
     srcChars = 0;
     srcCharsSpc = 0;
@@ -366,7 +366,7 @@ void TrWindow::openFile( const TQString& name )
 	    numFinished = 0;
 	    numNonobsolete = 0;
 	    numMessages = 0;
-	    foundScope = 0;
+	    foundScope = nullptr;
 
 	    TML all = tor.messages();
 	    TML::Iterator it;
@@ -378,7 +378,7 @@ void TrWindow::openFile( const TQString& name )
 	    for ( it = all.begin(); it != all.end(); ++it ) {
 		tqApp->processEvents();
 		ContextLVI *c = contexts.find( TQString((*it).context()) );
-		if ( c == 0 ) {
+		if ( !c ) {
 		    c = new ContextLVI( lv, tor.toUnicode((*it).context(),
 							  (*it).utf8()) );
 		    contexts.insert( TQString((*it).context()), c );
@@ -519,7 +519,7 @@ void TrWindow::print()
 	statusBar()->message( tr("Printing...") );
 	PrintOut pout( &printer );
 	ContextLVI *c = (ContextLVI *) lv->firstChild();
-	while ( c != 0 ) {
+	while ( c ) {
 	    setCurrentContextItem( c );
 	    pout.vskip();
 	    pout.setRule( PrintOut::ThickRule );
@@ -533,7 +533,7 @@ void TrWindow::print()
 	    pout.setRule( PrintOut::ThickRule );
 
 	    MessageLVI *m = (MessageLVI *) slv->firstChild();
-	    while ( m != 0 ) {
+	    while ( m ) {
 		pout.setRule( PrintOut::ThinRule );
 
 		TQString type;
@@ -610,13 +610,13 @@ void TrWindow::findAgain()
     slv->setUpdatesEnabled( false );
     do {
 	// Iterate through every item in all contexts
-	if ( j == 0 ) {
+	if ( !j ) {
 	    j = lv->firstChild();
 	    setCurrentContextItem( j );
-	    if ( foundScope != 0 )
+	    if ( foundScope )
 		delayedMsg = tr("Search wrapped.");
 	}
-	if ( k == 0 )
+	if ( !k )
 	    k = slv->firstChild();
 
 	while ( k ) {
@@ -704,7 +704,7 @@ int TrWindow::itemToIndex( TQListView * view, TQListViewItem * item )
     TQListViewItem * tmp;
 
     if( view && item ){
-	if( (tmp = view->firstChild()) != 0 )
+	if( (tmp = view->firstChild()) )
 	    do {
 		no++;
 		tmp = tmp->nextSibling();
@@ -715,7 +715,7 @@ int TrWindow::itemToIndex( TQListView * view, TQListViewItem * item )
 
 TQListViewItem * TrWindow::indexToItem( TQListView * view, int index )
 {
-    TQListViewItem * item = 0;
+    TQListViewItem * item = nullptr;
 
     if ( view && index > 0 ) {
 	item = view->firstChild();
@@ -858,7 +858,7 @@ void TrWindow::manual()
 
 void TrWindow::about()
 {
-    AboutDialog about( this, 0, true );
+    AboutDialog about( this, nullptr, true );
     about.versionLabel->setText( tr("Version %1").arg(TQT_VERSION_STR) );
     about.exec();
 }
@@ -934,17 +934,17 @@ void TrWindow::updateCaption()
 //
 void TrWindow::showNewScope( TQListViewItem *item )
 {
-    static ContextLVI * oldContext = 0;
+    static ContextLVI * oldContext = nullptr;
 
-    if( item != 0 ) {
+    if( item ) {
 	ContextLVI * c = (ContextLVI *) item;
 	bool upe = slv->isUpdatesEnabled();
 	slv->setUpdatesEnabled( false );
 	slv->viewport()->setUpdatesEnabled( false );
-	if ( oldContext != 0 ) {
+	if ( oldContext ) {
 	    MessageLVI * tmp;
 	    slv->blockSignals( true );
-	    while ( (tmp = (MessageLVI *) slv->firstChild()) != 0 )
+	    while ( (tmp = (MessageLVI *) slv->firstChild()) )
 		oldContext->appendMessageItem( slv, tmp );
 	    slv->blockSignals( false );
 	}
@@ -970,9 +970,9 @@ void TrWindow::showNewScope( TQListViewItem *item )
 
 void TrWindow::showNewCurrent( TQListViewItem *item )
 {
-    messageIsShown = (item != 0);
+    messageIsShown = (item);
     MessageLVI *m = (MessageLVI *) item;
-    ContextLVI *c = (ContextLVI *) m ? m->contextLVI() : 0;
+    ContextLVI *c = (ContextLVI *) m ? m->contextLVI() : nullptr;
 
     if ( messageIsShown ) {
 	me->showMessage( m->sourceText(), m->comment(), c->fullContext(),
@@ -987,7 +987,7 @@ void TrWindow::showNewCurrent( TQListViewItem *item )
 	doneAndNextAct->setEnabled( m->message().type() !=
 				    MetaTranslatorMessage::Obsolete );
     } else {
-	if ( item == 0 )
+	if ( !item )
 	    me->showNothing();
 	else
 	    me->showContext( c->fullContext(), c->finished() );
@@ -1001,7 +1001,7 @@ void TrWindow::showNewCurrent( TQListViewItem *item )
 void TrWindow::updateTranslation( const TQString& translation )
 {
     TQListViewItem *item = slv->currentItem();
-    if ( item != 0 ) {
+    if ( item ) {
 	MessageLVI *m = (MessageLVI *) item;
 	if ( translation != m->translation() ) {
 	    bool dngr;
@@ -1027,7 +1027,7 @@ void TrWindow::updateTranslation( const TQString& translation )
 void TrWindow::updateFinished( bool finished )
 {
     TQListViewItem *item = slv->currentItem();
-    if ( item != 0 ) {
+    if ( item ) {
 	MessageLVI *m = (MessageLVI *) item;
 	if ( finished != m->finished() ) {
 	    numFinished += finished ? +1 : -1;
@@ -1074,7 +1074,7 @@ void TrWindow::doneAndNext()
 void TrWindow::toggleFinished( TQListViewItem *item, const TQPoint& /* p */,
 			       int column )
 {
-    if ( item != 0 && column == 0 ) {
+    if ( item && column == 0 ) {
 	MessageLVI *m = (MessageLVI *) item;
 	bool dngr = false;
 
@@ -1111,8 +1111,8 @@ void TrWindow::nextUnfinished()
 
 	// Make sure an item is selected from both the context and the
 	// message list.
-	if( (mItem == 0) && !(mItem = slv->firstChild()) ) {
-	    if( (cItem == 0) && !(cItem = lv->firstChild()) ) {
+	if( (!mItem) && !(mItem = slv->firstChild()) ) {
+	    if( (!cItem) && !(cItem = lv->firstChild()) ) {
 		statusBar()->message( tr("No phrase to translate."),
 				      MessageMS );
 		tqApp->beep();
@@ -1147,7 +1147,7 @@ void TrWindow::nextUnfinished()
 	m = (MessageLVI *) mItem->nextSibling();
 	n = m;
 	do {
-	    if ( n == 0 )
+	    if ( !n )
 		break;
 	    if ( n && !n->finished() && n != mItem ) {
 		setCurrentMessageItem( n );
@@ -1161,7 +1161,7 @@ void TrWindow::nextUnfinished()
 	p = (ContextLVI *) p->nextSibling();
 	q = p;
 	do {
-	    if ( q == 0 )
+	    if ( !q )
 		q = (ContextLVI *) lv->firstChild();
 	    if ( q && !q->finished() ) {
 		showNewScope( q );
@@ -1192,12 +1192,12 @@ static TQListViewItem * lastChild( TQListView * view )
 	ret = view->firstChild();
 	while ( ret ) {
 	    tmp = ret->nextSibling();
-	    if ( tmp == 0 )
+	    if ( !tmp )
 		return ret;
 	    ret = tmp;
 	}
     }
-    return 0;
+    return nullptr;
 }
 
 void TrWindow::prevUnfinished()
@@ -1210,8 +1210,8 @@ void TrWindow::prevUnfinished()
 
 	// Make sure an item is selected from both the context and the
 	// message list.
-	if( (mItem == 0) && !(mItem = slv->firstChild()) ) {
-	    if( (cItem == 0) && !(cItem = lv->firstChild()) ) {
+	if( (!mItem) && !(mItem = slv->firstChild()) ) {
+	    if( (!cItem) && !(cItem = lv->firstChild()) ) {
 		statusBar()->message( tr("No phrase to translate."),
 				      MessageMS );
 		tqApp->beep();
@@ -1246,20 +1246,20 @@ void TrWindow::prevUnfinished()
 	n = m;
 	do {
 	    n = (MessageLVI * ) n->itemAbove();
-	    if ( n == 0 )
+	    if ( !n )
 		break;
 	    if ( n && !n->finished() ) {
 		setCurrentMessageItem( n );
 		return;
 	    }
-	} while ( !((ContextLVI *) cItem)->finished() && n != 0 );
+	} while ( !((ContextLVI *) cItem)->finished() && n );
 
 	// If all siblings are Finished or Obsolete, look in the prev
 	// Unfinished context.
 	q = p;
 	do {
 	    q = (ContextLVI *) q->itemAbove();
-	    if ( q == 0 )
+	    if ( !q )
 		q = (ContextLVI *) lastChild( lv );
 	    if ( q && !q->finished() ) {
 		showNewScope( q );
@@ -1272,7 +1272,7 @@ void TrWindow::prevUnfinished()
 		    return;
 		}
 	    }
-	} while ( q != 0 );
+	} while ( q );
     }
     statusBar()->message( tr("No untranslated phrases left."), MessageMS );
     tqApp->beep();
@@ -1295,11 +1295,11 @@ void TrWindow::prev()
 	if ( !mItem ) return;
 	setCurrentMessageItem( mItem );
     } else {
-	if ( (tmp = mItem->itemAbove()) != 0 ) {
+	if ( (tmp = mItem->itemAbove()) ) {
 	    setCurrentMessageItem( tmp );
 	    return;
 	} else {
-	    if ( (tmp = cItem->itemAbove()) == 0 ) {
+	    if ( !(tmp = cItem->itemAbove()) ) {
 		tmp = lastChild( lv );
 	    }
 	    if ( !tmp ) return;
@@ -1326,11 +1326,11 @@ void TrWindow::next()
 	if ( !mItem ) return;
 	setCurrentMessageItem( mItem );
     } else {
-	if ( (tmp = mItem->nextSibling()) != 0 ) {
+	if ( (tmp = mItem->nextSibling()) ) {
 	    setCurrentMessageItem( tmp );
 	    return;
 	} else {
-	    if ( (tmp = cItem->nextSibling()) == 0 ) {
+	    if ( !(tmp = cItem->nextSibling()) ) {
 		tmp = lv->firstChild();
 	    }
 	    if ( !tmp ) return;
@@ -1359,10 +1359,10 @@ void TrWindow::revalidate()
     int oldItemNo = itemToIndex( slv, slv->currentItem() );
     slv->setUpdatesEnabled( false );
 
-    while ( c != 0 ) {
+    while ( c ) {
 	showNewScope( c );
 	MessageLVI *m = (MessageLVI *) slv->firstChild();
-	while ( m != 0 ) {
+	while ( m ) {
 	    m->setDanger( danger(m->sourceText(), m->translation()) &&
 		    m->message().type() == MetaTranslatorMessage::Finished );
 	    m = (MessageLVI *) m->nextSibling();
@@ -1557,7 +1557,7 @@ void TrWindow::setupMenuBar()
     viewp->insertItem( tr("&Toolbars"), createDockWindowMenu( OnlyToolBars ) );
 
     // Help
-    manualAct = new Action( helpp, tr("&Manual"), this, TQ_SLOT(manual()), 0,
+    manualAct = new Action( helpp, tr("&Manual"), this, TQ_SLOT(manual()), nullptr,
 			    Key_F1 );
     helpp->insertSeparator();
     aboutAct = new Action( helpp, tr("&About"), this, TQ_SLOT(about()) );
@@ -1738,8 +1738,8 @@ void TrWindow::updateProgress()
 			   .arg(numNonobsolete) );
     prevUnfinishedAct->setEnabled( numFinished != numNonobsolete );
     nextUnfinishedAct->setEnabled( numFinished != numNonobsolete );
-    prevAct->setEnabled( lv->firstChild() != 0 );
-    nextAct->setEnabled( lv->firstChild() != 0 );
+    prevAct->setEnabled( lv->firstChild() );
+    nextAct->setEnabled( lv->firstChild() );
 }
 
 void TrWindow::updatePhraseDict()
@@ -1748,13 +1748,13 @@ void TrWindow::updatePhraseDict()
     PhraseBook::Iterator p;
     PhraseBook *ent;
     phraseDict.clear();
-    while ( pb.current() != 0 ) {
+    while ( pb.current() ) {
 	for ( p = (*pb)->begin(); p != (*pb)->end(); ++p ) {
 	    TQString f = friendlyString( (*p).source() );
 	    if ( f.length() > 0 ) {
 		f = TQStringList::split( TQChar(' '), f ).first();
 		ent = phraseDict.find( f );
-		if ( ent == 0 ) {
+		if ( !ent ) {
 		    ent = new PhraseBook;
 		    phraseDict.insert( f, ent );
 		}
@@ -1776,7 +1776,7 @@ PhraseBook TrWindow::getPhrases( const TQString& source )
 
     for ( w = lookupWords.begin(); w != lookupWords.end(); ++w ) {
 	PhraseBook *ent = phraseDict.find( *w );
-	if ( ent != 0 ) {
+	if ( ent ) {
 	    for ( p = ent->begin(); p != ent->end(); ++p ) {
 		if ( f.find(friendlyString((*p).source())) >= 0 )
 		    phrases.append( *p );
@@ -1822,7 +1822,7 @@ bool TrWindow::danger( const TQString& source, const TQString& translation,
 
 	for ( w = lookupWords.begin(); w != lookupWords.end(); ++w ) {
 	    PhraseBook *ent = phraseDict.find( *w );
-	    if ( ent != 0 ) {
+	    if ( ent ) {
 		for ( p = ent->begin(); p != ent->end(); ++p ) {
 		    if ( fsource.find(friendlyString((*p).source())) < 0 ||
 			 ftranslation.find(friendlyString((*p).target())) >= 0 )
@@ -2033,7 +2033,7 @@ void TrWindow::updateStatistics()
 	ci = ci->nextSibling();
     }
     // ..and the items in the source list
-    countStats( 0, slv->firstChild(), trW, trC, trCS );
+    countStats( nullptr, slv->firstChild(), trW, trC, trCS );
     emit statsChanged( srcWords, srcChars, srcCharsSpc, trW, trC, trCS );
 }
 
diff --git a/tools/linguist/lupdate/fetchtr.cpp b/tools/linguist/lupdate/fetchtr.cpp
index 60912c7d2..db1d58d72 100644
--- a/tools/linguist/lupdate/fetchtr.cpp
+++ b/tools/linguist/lupdate/fetchtr.cpp
@@ -337,7 +337,7 @@ static int getToken()
 			} else {
 			    const char *p = strchr( tab, yyCh );
 			    if ( yyStringLen < sizeof(yyString) - 1 )
-				yyString[yyStringLen++] = ( p == 0 ) ?
+				yyString[yyStringLen++] = ( !p ) ?
 					(char) yyCh : backTab[p - tab];
 			    yyCh = getChar();
 			}
@@ -672,7 +672,7 @@ void fetchtr_cpp( const char *fileName, MetaTranslator *tor,
 		  const char *defaultContext, bool mustExist )
 {
     yyInFile = fopen( fileName, "r" );
-    if ( yyInFile == 0 ) {
+    if ( !yyInFile ) {
 	if ( mustExist )
 	    fprintf( stderr,
 		     "lupdate error: Cannot open C++ source file '%s': %s\n",
@@ -681,7 +681,7 @@ void fetchtr_cpp( const char *fileName, MetaTranslator *tor,
     }
 
     startTokenizer( fileName, getCharFromFile );
-    parse( tor, 0, defaultContext );
+    parse( tor, nullptr, defaultContext );
     fclose( yyInFile );
 }
 
@@ -698,7 +698,7 @@ void fetchtr_inlined_cpp( const char *fileName, const TQString& in,
 {
     yyInStr = in;
     startTokenizer( fileName, getCharFromString );
-    parse( tor, context, 0 );
+    parse( tor, context, nullptr );
     yyInStr = TQString::null;
 }
 
@@ -817,8 +817,8 @@ void fetchtr_ui( const char *fileName, MetaTranslator *tor,
 
     if ( !reader.parse(in) )
 	fprintf( stderr, "%s: Parse error in UI file\n", fileName );
-    reader.setContentHandler( 0 );
-    reader.setErrorHandler( 0 );
+    reader.setContentHandler( nullptr );
+    reader.setErrorHandler( nullptr );
     delete hand;
     f.close();
 }
diff --git a/tools/linguist/shared/metatranslator.cpp b/tools/linguist/shared/metatranslator.cpp
index a00c84e70..410f943d0 100644
--- a/tools/linguist/shared/metatranslator.cpp
+++ b/tools/linguist/shared/metatranslator.cpp
@@ -99,7 +99,7 @@ bool TsHandler::startElement( const TQString& /* namespaceURI */,
 		    base = 16;
 		    value = value.mid( 1 );
 		}
-		int n = value.toUInt( 0, base );
+		int n = value.toUInt( nullptr, base );
 		if ( n != 0 )
 		    accum += TQChar( n );
 	    }
@@ -192,7 +192,7 @@ bool TsHandler::fatalError( const TQXmlParseException& exception )
 	msg.sprintf( "Parse error at line %d, column %d (%s).",
 		     exception.lineNumber(), exception.columnNumber(),
 		     exception.message().latin1() );
-	if ( tqApp == 0 )
+	if ( !tqApp )
 	    fprintf( stderr, "XML error: %s\n", msg.latin1() );
 	else
 	    TQMessageBox::information( tqApp->mainWidget(),
@@ -275,7 +275,7 @@ MetaTranslatorMessage::MetaTranslatorMessage( const char *context,
       non-Latin-1) characters in .ui files.
     */
     if ( utf8 ) {
-	if ( sourceText != 0 ) {
+	if ( sourceText ) {
 	    int i = 0;
 	    while ( sourceText[i] != '\0' ) {
 		if ( (uchar) sourceText[i] >= 0x80 ) {
@@ -285,7 +285,7 @@ MetaTranslatorMessage::MetaTranslatorMessage( const char *context,
 		i++;
 	    }
 	}
-	if ( !utfeight && comment != 0 ) {
+	if ( !utfeight && comment ) {
 	    int i = 0;
 	    while ( comment[i] != '\0' ) {
 		if ( (uchar) comment[i] >= 0x80 ) {
@@ -351,7 +351,7 @@ void MetaTranslator::clear()
 {
     mm.clear();
     codecName = "ISO-8859-1";
-    codec = 0;
+    codec = nullptr;
 }
 
 bool MetaTranslator::load( const TQString& filename )
@@ -370,8 +370,8 @@ bool MetaTranslator::load( const TQString& filename )
     reader.setErrorHandler( hand );
 
     bool ok = reader.parse( in );
-    reader.setContentHandler( 0 );
-    reader.setErrorHandler( 0 );
+    reader.setContentHandler( nullptr );
+    reader.setErrorHandler( nullptr );
     delete hand;
     f.close();
     return ok;
@@ -454,7 +454,7 @@ bool MetaTranslator::save( const TQString& filename ) const
 bool MetaTranslator::release( const TQString& filename, bool verbose,
 			      TQTranslator::SaveMode mode ) const
 {
-    TQTranslator tor( 0 );
+    TQTranslator tor( nullptr );
     int finished = 0;
     int unfinished = 0;
     int untranslated = 0;
@@ -559,15 +559,15 @@ void MetaTranslator::setCodec( const char *name )
 
     codecName = name;
     codec = TQTextCodec::codecForName( name );
-    if ( codec == 0 || codec->mibEnum() == latin1 )
-	codec = 0;
+    if ( !codec || codec->mibEnum() == latin1 )
+	codec = nullptr;
 }
 
 TQString MetaTranslator::toUnicode( const char *str, bool utf8 ) const
 {
     if ( utf8 )
 	return TQString::fromUtf8( str );
-    else if ( codec == 0 )
+    else if ( !codec )
 	return TQString( str );
     else
 	return codec->toUnicode( str );
diff --git a/tools/linguist/tqm2ts/main.cpp b/tools/linguist/tqm2ts/main.cpp
index 898c65cd6..5f3d2e25b 100644
--- a/tools/linguist/tqm2ts/main.cpp
+++ b/tools/linguist/tqm2ts/main.cpp
@@ -69,7 +69,7 @@ int main( int argc, char **argv )
 	}
 
 	numQmFiles++;
-	TQTranslator tor( 0 );
+	TQTranslator tor( nullptr );
 	if ( tor.load(argv[i], ".") ) {
 	    TQString g = argv[i];
 	    g.replace( TQRegExp(TQString("\\.qm$")), TQString::null );
@@ -84,7 +84,7 @@ int main( int argc, char **argv )
 	    TML all = tor.messages();
 	    TML::Iterator it;
 	    for ( it = all.begin(); it != all.end(); ++it ) {
-		if ( (*it).sourceText() == 0 ) {
+		if ( !(*it).sourceText() ) {
 		    ignored++;
 		} else {
 		    TQCString context = (*it).context();
diff --git a/tools/linguist/tutorial/tt1/main.cpp b/tools/linguist/tutorial/tt1/main.cpp
index 27373bec2..a8cf21dea 100644
--- a/tools/linguist/tutorial/tt1/main.cpp
+++ b/tools/linguist/tutorial/tt1/main.cpp
@@ -13,11 +13,11 @@ int main( int argc, char **argv )
 {
     TQApplication app( argc, argv );
 
-    TQTranslator translator( 0 );
+    TQTranslator translator( nullptr );
     translator.load( "tt1_la", "." );
     app.installTranslator( &translator );
 
-    TQPushButton hello( TQPushButton::tr("Hello world!"), 0 );
+    TQPushButton hello( TQPushButton::tr("Hello world!"), nullptr );
 
     app.setMainWidget( &hello );
     hello.show();
diff --git a/tools/linguist/tutorial/tt2/arrowpad.h b/tools/linguist/tutorial/tt2/arrowpad.h
index 13c061d5d..614ad9d10 100644
--- a/tools/linguist/tutorial/tt2/arrowpad.h
+++ b/tools/linguist/tutorial/tt2/arrowpad.h
@@ -13,7 +13,7 @@ class ArrowPad : public TQGrid
 {
     TQ_OBJECT
 public:
-    ArrowPad( TQWidget *parent = 0, const char *name = 0 );
+    ArrowPad( TQWidget *parent = nullptr, const char *name = nullptr );
 
 private:
     void skip();
diff --git a/tools/linguist/tutorial/tt2/main.cpp b/tools/linguist/tutorial/tt2/main.cpp
index f4cbea950..c0ec806c1 100644
--- a/tools/linguist/tutorial/tt2/main.cpp
+++ b/tools/linguist/tutorial/tt2/main.cpp
@@ -15,7 +15,7 @@ int main( int argc, char **argv )
 {
     TQApplication app( argc, argv );
 
-    TQTranslator translator( 0 );
+    TQTranslator translator( nullptr );
     translator.load( TQString("tt2_") + TQTextCodec::locale(), "." );
     app.installTranslator( &translator );
 
diff --git a/tools/linguist/tutorial/tt2/mainwindow.h b/tools/linguist/tutorial/tt2/mainwindow.h
index 38209c619..5e887ce6c 100644
--- a/tools/linguist/tutorial/tt2/mainwindow.h
+++ b/tools/linguist/tutorial/tt2/mainwindow.h
@@ -13,7 +13,7 @@ class MainWindow : public TQMainWindow
 {
     TQ_OBJECT
 public:
-    MainWindow( TQWidget *parent = 0, const char *name = 0 );
+    MainWindow( TQWidget *parent = nullptr, const char *name = nullptr );
 };
 
 #endif
diff --git a/tools/linguist/tutorial/tt3/main.cpp b/tools/linguist/tutorial/tt3/main.cpp
index 141b8c8d1..e2faa4e5c 100644
--- a/tools/linguist/tutorial/tt3/main.cpp
+++ b/tools/linguist/tutorial/tt3/main.cpp
@@ -15,7 +15,7 @@ int main( int argc, char **argv )
 {
     TQApplication app( argc, argv );
 
-    TQTranslator translator( 0 );
+    TQTranslator translator( nullptr );
     translator.load( TQString("tt3_") + TQTextCodec::locale(), "." );
     app.installTranslator( &translator );
 
diff --git a/tools/linguist/tutorial/tt3/mainwindow.h b/tools/linguist/tutorial/tt3/mainwindow.h
index fafd15ed5..0a50d4437 100644
--- a/tools/linguist/tutorial/tt3/mainwindow.h
+++ b/tools/linguist/tutorial/tt3/mainwindow.h
@@ -13,7 +13,7 @@ class MainWindow : public TQMainWindow
 {
     TQ_OBJECT
 public:
-    MainWindow( TQWidget *parent = 0, const char *name = 0 );
+    MainWindow( TQWidget *parent = nullptr, const char *name = nullptr );
 
 private slots:
     void about();
diff --git a/tools/linguist/tutorial/tt3/printpanel.h b/tools/linguist/tutorial/tt3/printpanel.h
index 906e8994e..8fc5f5884 100644
--- a/tools/linguist/tutorial/tt3/printpanel.h
+++ b/tools/linguist/tutorial/tt3/printpanel.h
@@ -13,7 +13,7 @@ class PrintPanel : public TQVBox
 {
     TQ_OBJECT
 public:
-    PrintPanel( TQWidget *parent = 0, const char *name = 0 );
+    PrintPanel( TQWidget *parent = nullptr, const char *name = nullptr );
 };
 
 #endif
diff --git a/tools/msg2tqm/msg2tqm.cpp b/tools/msg2tqm/msg2tqm.cpp
index 103c38432..f94dfa617 100644
--- a/tools/msg2tqm/msg2tqm.cpp
+++ b/tools/msg2tqm/msg2tqm.cpp
@@ -40,7 +40,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-static TQString* defaultScope = 0;
+static TQString* defaultScope = nullptr;
 
 bool hasHandle( const TQString& line, const TQString& handle)
 {
@@ -125,15 +125,15 @@ void translate( const TQString& filename, const TQString& qmfile )
     TQFile f(filename);
     if ( !f.open( IO_ReadOnly) )
 	return;
-    TQTranslator* translator = new TQTranslator(0);
-    TQTextCodec *codec = 0;
+    TQTranslator* translator = new TQTranslator(nullptr);
+    TQTextCodec *codec = nullptr;
     for (int pass =  0; pass < 2; pass++) {
 	f.at(0);
 	TQTextStream t( &f );
 	TQString line;
 	TQString msgid;
 	TQString msgstr;
-	if ( codec != 0 ) {
+	if ( codec ) {
 	    t.setCodec( codec );
 	}
 	while ( !t.atEnd() || !line.isEmpty() ) {
diff --git a/tools/qtconfig/colorbutton.h b/tools/qtconfig/colorbutton.h
index 612302822..dff1cc8dd 100644
--- a/tools/qtconfig/colorbutton.h
+++ b/tools/qtconfig/colorbutton.h
@@ -42,8 +42,8 @@ class ColorButton : public TQButton
     TQ_OBJECT
 
 public:
-    ColorButton(TQWidget *, const char * = 0);
-    ColorButton(const TQColor &, TQWidget *, const char * = 0);
+    ColorButton(TQWidget *, const char * = nullptr);
+    ColorButton(const TQColor &, TQWidget *, const char * = nullptr);
 
     const TQColor &color() const { return col; }
 
diff --git a/tools/qtconfig/mainwindow.cpp b/tools/qtconfig/mainwindow.cpp
index 6a43d26aa..566a67783 100644
--- a/tools/qtconfig/mainwindow.cpp
+++ b/tools/qtconfig/mainwindow.cpp
@@ -202,7 +202,7 @@ static void setStyleHelper(TQWidget *w, TQStyle *s)
 
     TQPtrListIterator<TQObject> childit(*children);
     TQObject *child;
-    while ((child = childit.current()) != 0) {
+    while ((child = childit.current())) {
 	++childit;
 
 	if (child->isWidgetType())
@@ -212,8 +212,8 @@ static void setStyleHelper(TQWidget *w, TQStyle *s)
 
 
 MainWindow::MainWindow()
-    : MainWindowBase(0, "main window"),
-      editPalette(palette()), previewPalette(palette()), previewstyle(0)
+    : MainWindowBase(nullptr, "main window"),
+      editPalette(palette()), previewPalette(palette()), previewstyle(nullptr)
 {
     modified = true;
 
@@ -984,7 +984,7 @@ void MainWindow::upLibpath()
 
 void MainWindow::browseLibpath()
 {
-    TQString dirname = TQFileDialog::getExistingDirectory(TQString::null, this, 0,
+    TQString dirname = TQFileDialog::getExistingDirectory(TQString::null, this, nullptr,
 							tr("Select a Directory"));
     if (dirname.isNull())
 	return;
@@ -1074,7 +1074,7 @@ void MainWindow::upFontpath()
 
 void MainWindow::browseFontpath()
 {
-    TQString dirname = TQFileDialog::getExistingDirectory(TQString::null, this, 0,
+    TQString dirname = TQFileDialog::getExistingDirectory(TQString::null, this, nullptr,
 							tr("Select a Directory"));
     if (dirname.isNull())
 	return;
diff --git a/tools/qtconfig/paletteeditoradvanced.cpp b/tools/qtconfig/paletteeditoradvanced.cpp
index ac1770a4b..40a489fd8 100644
--- a/tools/qtconfig/paletteeditoradvanced.cpp
+++ b/tools/qtconfig/paletteeditoradvanced.cpp
@@ -49,7 +49,7 @@
 class BoldListBoxText : public TQListBoxText
 {
 public:
-    BoldListBoxText( TQString text, TQListBox* lb = 0 );
+    BoldListBoxText( TQString text, TQListBox* lb = nullptr );
 
 protected:
     virtual void paint( TQPainter* );
diff --git a/tools/qtconfig/paletteeditoradvanced.h b/tools/qtconfig/paletteeditoradvanced.h
index fc4b4a51b..51366d66f 100644
--- a/tools/qtconfig/paletteeditoradvanced.h
+++ b/tools/qtconfig/paletteeditoradvanced.h
@@ -40,12 +40,12 @@ class PaletteEditorAdvanced : public PaletteEditorAdvancedBase
 {
     TQ_OBJECT
 public:
-    PaletteEditorAdvanced( TQWidget * parent=0, const char * name=0,
+    PaletteEditorAdvanced( TQWidget * parent=nullptr, const char * name=nullptr,
 			   bool modal=false, WFlags f=0 );
     ~PaletteEditorAdvanced();
 
     static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground,
-				TQWidget* parent = 0, const char* name = 0 );
+				TQWidget* parent = nullptr, const char* name = nullptr );
 
 protected slots:
     void paletteSelected(int);
diff --git a/tools/qtconfig/previewframe.h b/tools/qtconfig/previewframe.h
index a84021ed5..9e6b0a4ec 100644
--- a/tools/qtconfig/previewframe.h
+++ b/tools/qtconfig/previewframe.h
@@ -44,7 +44,7 @@ class Workspace : public TQWorkspace
     TQ_OBJECT
 
 public:
-    Workspace( TQWidget* parent = 0, const char* name = 0 )
+    Workspace( TQWidget* parent = nullptr, const char* name = nullptr )
         : TQWorkspace( parent, name ) {}
     ~Workspace() {}
 
@@ -57,7 +57,7 @@ class PreviewFrame : public TQVBox
     TQ_OBJECT
 
 public:
-    PreviewFrame( TQWidget *parent = 0, const char *name = 0 );
+    PreviewFrame( TQWidget *parent = nullptr, const char *name = nullptr );
     void setPreviewPalette(TQPalette);
 
 private:
diff --git a/tools/qtconfig/previewwidget.cpp b/tools/qtconfig/previewwidget.cpp
index c27e17e4e..223c47c48 100644
--- a/tools/qtconfig/previewwidget.cpp
+++ b/tools/qtconfig/previewwidget.cpp
@@ -42,7 +42,7 @@ PreviewWidget::PreviewWidget( TQWidget *parent, const char *name )
     TQObjectList *l = queryList("TQWidget");
     TQObjectListIt it(*l);
     TQObject * obj;
-    while ((obj = it.current()) != 0) {
+    while ((obj = it.current())) {
         ++it;
         obj->installEventFilter(this);
 	((TQWidget*)obj)->setFocusPolicy(NoFocus);
diff --git a/tools/qtconfig/previewwidget.h b/tools/qtconfig/previewwidget.h
index 738c0aa64..1b5352f19 100644
--- a/tools/qtconfig/previewwidget.h
+++ b/tools/qtconfig/previewwidget.h
@@ -41,7 +41,7 @@ class PreviewWidget : public PreviewWidgetBase
     TQ_OBJECT
 
 public:
-    PreviewWidget( TQWidget *parent = 0, const char *name = 0 );
+    PreviewWidget( TQWidget *parent = nullptr, const char *name = nullptr );
 
     void closeEvent(TQCloseEvent *);
     bool eventFilter(TQObject *, TQEvent *);
diff --git a/tools/tqconfig/main.cpp b/tools/tqconfig/main.cpp
index 1eb3bb476..cf83ac244 100644
--- a/tools/tqconfig/main.cpp
+++ b/tools/tqconfig/main.cpp
@@ -541,7 +541,7 @@ void Main::createItem(const TQString& ch)
     if ( !item[ch] ) {
 	TQStringList deps = dependencies[ch];
 	TQString sec = section[ch];
-	TQListViewItem* parent = 0;
+	TQListViewItem* parent = nullptr;
 	for (TQStringList::Iterator dp = deps.begin(); dp != deps.end(); ++dp) {
 	    TQString dsec = section[*dp];
 	    if ( dsec.isEmpty() )
diff --git a/tools/tqconfig/main.h b/tools/tqconfig/main.h
index 4722b6d2f..536ac7740 100644
--- a/tools/tqconfig/main.h
+++ b/tools/tqconfig/main.h
@@ -44,7 +44,7 @@ class TQLabel;
 class Info : public TQTextBrowser {
     TQ_OBJECT
 public:
-    Info( TQWidget* parent, const char* name=0 );
+    Info( TQWidget* parent, const char* name=nullptr );
 
 signals:
     void idClicked(const TQString& name);
diff --git a/tutorial/t1/main.cpp b/tutorial/t1/main.cpp
index 4acd54d87..e7687ff04 100644
--- a/tutorial/t1/main.cpp
+++ b/tutorial/t1/main.cpp
@@ -12,7 +12,7 @@ int main( int argc, char **argv )
 {
     TQApplication a( argc, argv );
 
-    TQPushButton hello( "Hello world!", 0 );
+    TQPushButton hello( "Hello world!", nullptr );
     hello.resize( 100, 30 );
 
     a.setMainWidget( &hello );
diff --git a/tutorial/t10/cannon.h b/tutorial/t10/cannon.h
index 4bdd1b5e0..1ff2af2d6 100644
--- a/tutorial/t10/cannon.h
+++ b/tutorial/t10/cannon.h
@@ -14,7 +14,7 @@ class CannonField : public TQWidget
 {
     TQ_OBJECT
 public:
-    CannonField( TQWidget *parent=0, const char *name=0 );
+    CannonField( TQWidget *parent=nullptr, const char *name=nullptr );
 
     TQSizePolicy sizePolicy() const;
 
diff --git a/tutorial/t10/lcdrange.h b/tutorial/t10/lcdrange.h
index f42bd8313..d62e0b93a 100644
--- a/tutorial/t10/lcdrange.h
+++ b/tutorial/t10/lcdrange.h
@@ -16,7 +16,7 @@ class LCDRange : public TQVBox
 {
     TQ_OBJECT
 public:
-    LCDRange( TQWidget *parent=0, const char *name=0 );
+    LCDRange( TQWidget *parent=nullptr, const char *name=nullptr );
 
     int value() const;
 
diff --git a/tutorial/t10/main.cpp b/tutorial/t10/main.cpp
index 375dfcb00..39053084f 100644
--- a/tutorial/t10/main.cpp
+++ b/tutorial/t10/main.cpp
@@ -17,7 +17,7 @@
 class MyWidget: public TQWidget
 {
 public:
-    MyWidget( TQWidget *parent=0, const char *name=0 );
+    MyWidget( TQWidget *parent=nullptr, const char *name=nullptr );
 };
 
 
diff --git a/tutorial/t11/cannon.h b/tutorial/t11/cannon.h
index e3e98a3bc..c17f9df05 100644
--- a/tutorial/t11/cannon.h
+++ b/tutorial/t11/cannon.h
@@ -17,7 +17,7 @@ class CannonField : public TQWidget
 {
     TQ_OBJECT
 public:
-    CannonField( TQWidget *parent=0, const char *name=0 );
+    CannonField( TQWidget *parent=nullptr, const char *name=nullptr );
 
     int   angle() const { return ang; }
     int   force() const { return f; }
diff --git a/tutorial/t11/lcdrange.h b/tutorial/t11/lcdrange.h
index f42bd8313..d62e0b93a 100644
--- a/tutorial/t11/lcdrange.h
+++ b/tutorial/t11/lcdrange.h
@@ -16,7 +16,7 @@ class LCDRange : public TQVBox
 {
     TQ_OBJECT
 public:
-    LCDRange( TQWidget *parent=0, const char *name=0 );
+    LCDRange( TQWidget *parent=nullptr, const char *name=nullptr );
 
     int value() const;
 
diff --git a/tutorial/t11/main.cpp b/tutorial/t11/main.cpp
index 0a9d31bf1..1b40cca2a 100644
--- a/tutorial/t11/main.cpp
+++ b/tutorial/t11/main.cpp
@@ -17,7 +17,7 @@
 class MyWidget: public TQWidget
 {
 public:
-    MyWidget( TQWidget *parent=0, const char *name=0 );
+    MyWidget( TQWidget *parent=nullptr, const char *name=nullptr );
 };
 
 
diff --git a/tutorial/t12/cannon.h b/tutorial/t12/cannon.h
index 466a6ea50..31f38db70 100644
--- a/tutorial/t12/cannon.h
+++ b/tutorial/t12/cannon.h
@@ -17,7 +17,7 @@ class CannonField : public TQWidget
 {
     TQ_OBJECT
 public:
-    CannonField( TQWidget *parent=0, const char *name=0 );
+    CannonField( TQWidget *parent=nullptr, const char *name=nullptr );
 
     int   angle() const { return ang; }
     int   force() const { return f; }
diff --git a/tutorial/t12/lcdrange.h b/tutorial/t12/lcdrange.h
index 59c3d004e..3325eb2e2 100644
--- a/tutorial/t12/lcdrange.h
+++ b/tutorial/t12/lcdrange.h
@@ -17,9 +17,9 @@ class LCDRange : public TQVBox
 {
     TQ_OBJECT
 public:
-    LCDRange( TQWidget *parent=0, const char *name=0 );
-    LCDRange( const char *s, TQWidget *parent=0,
-	      const char *name=0 );
+    LCDRange( TQWidget *parent=nullptr, const char *name=nullptr );
+    LCDRange( const char *s, TQWidget *parent=nullptr,
+	      const char *name=nullptr );
 
     int         value() const;
     const char *text()  const;
diff --git a/tutorial/t12/main.cpp b/tutorial/t12/main.cpp
index 500076c09..46e05f454 100644
--- a/tutorial/t12/main.cpp
+++ b/tutorial/t12/main.cpp
@@ -17,7 +17,7 @@
 class MyWidget: public TQWidget
 {
 public:
-    MyWidget( TQWidget *parent=0, const char *name=0 );
+    MyWidget( TQWidget *parent=nullptr, const char *name=nullptr );
 };
 
 
diff --git a/tutorial/t13/cannon.h b/tutorial/t13/cannon.h
index e4de4fbc4..64bfb7ab0 100644
--- a/tutorial/t13/cannon.h
+++ b/tutorial/t13/cannon.h
@@ -17,7 +17,7 @@ class CannonField : public TQWidget
 {
     TQ_OBJECT
 public:
-    CannonField( TQWidget *parent=0, const char *name=0 );
+    CannonField( TQWidget *parent=nullptr, const char *name=nullptr );
 
     int   angle() const { return ang; }
     int   force() const { return f; }
diff --git a/tutorial/t13/gamebrd.h b/tutorial/t13/gamebrd.h
index d0f10a818..271b69133 100644
--- a/tutorial/t13/gamebrd.h
+++ b/tutorial/t13/gamebrd.h
@@ -22,7 +22,7 @@ class GameBoard : public TQWidget
 {
     TQ_OBJECT
 public:
-    GameBoard( TQWidget *parent=0, const char *name=0 );
+    GameBoard( TQWidget *parent=nullptr, const char *name=nullptr );
 
 protected slots:
     void  fire();
diff --git a/tutorial/t13/lcdrange.h b/tutorial/t13/lcdrange.h
index 6c8327d14..a8ab93149 100644
--- a/tutorial/t13/lcdrange.h
+++ b/tutorial/t13/lcdrange.h
@@ -17,8 +17,8 @@ class LCDRange : public TQWidget
 {
     TQ_OBJECT
 public:
-    LCDRange( TQWidget *parent=0, const char *name=0 );
-    LCDRange( const char *s, TQWidget *parent=0, const char *name=0 );
+    LCDRange( TQWidget *parent=nullptr, const char *name=nullptr );
+    LCDRange( const char *s, TQWidget *parent=nullptr, const char *name=nullptr );
 
     int         value() const;
     const char *text()  const;
diff --git a/tutorial/t14/cannon.h b/tutorial/t14/cannon.h
index d28e04733..97375e331 100644
--- a/tutorial/t14/cannon.h
+++ b/tutorial/t14/cannon.h
@@ -17,7 +17,7 @@ class CannonField : public TQWidget
 {
     TQ_OBJECT
 public:
-    CannonField( TQWidget *parent=0, const char *name=0 );
+    CannonField( TQWidget *parent=nullptr, const char *name=nullptr );
 
     int   angle() const { return ang; }
     int   force() const { return f; }
diff --git a/tutorial/t14/gamebrd.h b/tutorial/t14/gamebrd.h
index aac70ffad..b6791b84b 100644
--- a/tutorial/t14/gamebrd.h
+++ b/tutorial/t14/gamebrd.h
@@ -22,7 +22,7 @@ class GameBoard : public TQWidget
 {
     TQ_OBJECT
 public:
-    GameBoard( TQWidget *parent=0, const char *name=0 );
+    GameBoard( TQWidget *parent=nullptr, const char *name=nullptr );
 
 protected slots:
     void  fire();
diff --git a/tutorial/t14/lcdrange.h b/tutorial/t14/lcdrange.h
index 6c8327d14..a8ab93149 100644
--- a/tutorial/t14/lcdrange.h
+++ b/tutorial/t14/lcdrange.h
@@ -17,8 +17,8 @@ class LCDRange : public TQWidget
 {
     TQ_OBJECT
 public:
-    LCDRange( TQWidget *parent=0, const char *name=0 );
-    LCDRange( const char *s, TQWidget *parent=0, const char *name=0 );
+    LCDRange( TQWidget *parent=nullptr, const char *name=nullptr );
+    LCDRange( const char *s, TQWidget *parent=nullptr, const char *name=nullptr );
 
     int         value() const;
     const char *text()  const;
diff --git a/tutorial/t15/main.cpp b/tutorial/t15/main.cpp
index bee75527e..31b2769b2 100644
--- a/tutorial/t15/main.cpp
+++ b/tutorial/t15/main.cpp
@@ -70,7 +70,7 @@ int main( int argc, char **argv )
 
 	tqDebug( "[MainObject]    thread: %p event loop: %p", TQThread::currentThreadObject(), TQApplication::eventLoop() );
 
-	TQPushButton hello( "Exit", 0 );
+	TQPushButton hello( "Exit", nullptr );
 	hello.resize( 100, 30 );
 
 	MainObject mainobject;
diff --git a/tutorial/t2/main.cpp b/tutorial/t2/main.cpp
index 6d4172318..aed18ef09 100644
--- a/tutorial/t2/main.cpp
+++ b/tutorial/t2/main.cpp
@@ -13,7 +13,7 @@ int main( int argc, char **argv )
 {
     TQApplication a( argc, argv );
 
-    TQPushButton quit( "Quit", 0 );
+    TQPushButton quit( "Quit", nullptr );
     quit.resize( 75, 30 );
     quit.setFont( TQFont( "Times", 18, TQFont::Bold ) );
 
diff --git a/tutorial/t4/main.cpp b/tutorial/t4/main.cpp
index 3900bfcbb..ec3324124 100644
--- a/tutorial/t4/main.cpp
+++ b/tutorial/t4/main.cpp
@@ -12,7 +12,7 @@
 class MyWidget : public TQWidget
 {
 public:
-    MyWidget( TQWidget *parent=0, const char *name=0 );
+    MyWidget( TQWidget *parent=nullptr, const char *name=nullptr );
 };
 
 
diff --git a/tutorial/t5/main.cpp b/tutorial/t5/main.cpp
index 242104e96..408728c5b 100644
--- a/tutorial/t5/main.cpp
+++ b/tutorial/t5/main.cpp
@@ -15,7 +15,7 @@
 class MyWidget : public TQVBox
 {
 public:
-    MyWidget( TQWidget *parent=0, const char *name=0 );
+    MyWidget( TQWidget *parent=nullptr, const char *name=nullptr );
 };
 
 
diff --git a/tutorial/t6/main.cpp b/tutorial/t6/main.cpp
index a280fafd6..530ce4942 100644
--- a/tutorial/t6/main.cpp
+++ b/tutorial/t6/main.cpp
@@ -15,7 +15,7 @@
 class LCDRange : public TQVBox
 {
 public:
-    LCDRange( TQWidget *parent=0, const char *name=0 );
+    LCDRange( TQWidget *parent=nullptr, const char *name=nullptr );
 };
 
 LCDRange::LCDRange( TQWidget *parent, const char *name )
@@ -31,7 +31,7 @@ LCDRange::LCDRange( TQWidget *parent, const char *name )
 class MyWidget : public TQVBox
 {
 public:
-    MyWidget( TQWidget *parent=0, const char *name=0 );
+    MyWidget( TQWidget *parent=nullptr, const char *name=nullptr );
 };
 
 
diff --git a/tutorial/t7/lcdrange.h b/tutorial/t7/lcdrange.h
index cba1e17c4..e8ada1a96 100644
--- a/tutorial/t7/lcdrange.h
+++ b/tutorial/t7/lcdrange.h
@@ -16,7 +16,7 @@ class LCDRange : public TQVBox
 {
     TQ_OBJECT
 public:
-    LCDRange( TQWidget *parent=0, const char *name=0 );
+    LCDRange( TQWidget *parent=nullptr, const char *name=nullptr );
 
     int value() const;
 
diff --git a/tutorial/t7/main.cpp b/tutorial/t7/main.cpp
index dc77904bd..9b3899fbb 100644
--- a/tutorial/t7/main.cpp
+++ b/tutorial/t7/main.cpp
@@ -17,7 +17,7 @@
 class MyWidget : public TQVBox
 {
 public:
-    MyWidget( TQWidget *parent=0, const char *name=0 );
+    MyWidget( TQWidget *parent=nullptr, const char *name=nullptr );
 };
 
 
@@ -31,7 +31,7 @@ MyWidget::MyWidget( TQWidget *parent, const char *name )
 
     TQGrid *grid = new TQGrid( 4, this );
 
-    LCDRange *previous = 0;
+    LCDRange *previous = nullptr;
     for( int r = 0 ; r < 4 ; r++ ) {
 	for( int c = 0 ; c < 4 ; c++ ) {
 	    LCDRange* lr = new LCDRange( grid );
diff --git a/tutorial/t8/cannon.h b/tutorial/t8/cannon.h
index 725142eed..bb09fc4c5 100644
--- a/tutorial/t8/cannon.h
+++ b/tutorial/t8/cannon.h
@@ -14,7 +14,7 @@ class CannonField : public TQWidget
 {
     TQ_OBJECT
 public:
-    CannonField( TQWidget *parent=0, const char *name=0 );
+    CannonField( TQWidget *parent=nullptr, const char *name=nullptr );
 
     int angle() const { return ang; }
     TQSizePolicy sizePolicy() const;
diff --git a/tutorial/t8/lcdrange.h b/tutorial/t8/lcdrange.h
index f42bd8313..d62e0b93a 100644
--- a/tutorial/t8/lcdrange.h
+++ b/tutorial/t8/lcdrange.h
@@ -16,7 +16,7 @@ class LCDRange : public TQVBox
 {
     TQ_OBJECT
 public:
-    LCDRange( TQWidget *parent=0, const char *name=0 );
+    LCDRange( TQWidget *parent=nullptr, const char *name=nullptr );
 
     int value() const;
 
diff --git a/tutorial/t8/main.cpp b/tutorial/t8/main.cpp
index dd8dce929..cb5990155 100644
--- a/tutorial/t8/main.cpp
+++ b/tutorial/t8/main.cpp
@@ -17,7 +17,7 @@
 class MyWidget: public TQWidget
 {
 public:
-    MyWidget( TQWidget *parent=0, const char *name=0 );
+    MyWidget( TQWidget *parent=nullptr, const char *name=nullptr );
 };
 
 
diff --git a/tutorial/t9/cannon.h b/tutorial/t9/cannon.h
index 725142eed..bb09fc4c5 100644
--- a/tutorial/t9/cannon.h
+++ b/tutorial/t9/cannon.h
@@ -14,7 +14,7 @@ class CannonField : public TQWidget
 {
     TQ_OBJECT
 public:
-    CannonField( TQWidget *parent=0, const char *name=0 );
+    CannonField( TQWidget *parent=nullptr, const char *name=nullptr );
 
     int angle() const { return ang; }
     TQSizePolicy sizePolicy() const;
diff --git a/tutorial/t9/lcdrange.h b/tutorial/t9/lcdrange.h
index f42bd8313..d62e0b93a 100644
--- a/tutorial/t9/lcdrange.h
+++ b/tutorial/t9/lcdrange.h
@@ -16,7 +16,7 @@ class LCDRange : public TQVBox
 {
     TQ_OBJECT
 public:
-    LCDRange( TQWidget *parent=0, const char *name=0 );
+    LCDRange( TQWidget *parent=nullptr, const char *name=nullptr );
 
     int value() const;
 
diff --git a/tutorial/t9/main.cpp b/tutorial/t9/main.cpp
index 74049bdb4..54603dbef 100644
--- a/tutorial/t9/main.cpp
+++ b/tutorial/t9/main.cpp
@@ -17,7 +17,7 @@
 class MyWidget: public TQWidget
 {
 public:
-    MyWidget( TQWidget *parent=0, const char *name=0 );
+    MyWidget( TQWidget *parent=nullptr, const char *name=nullptr );
 };
 
 
-- 
cgit v1.2.3

