From 24625ee7cbcd159ffa115f4d386668d22306f8e7 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sat, 3 Oct 2026 17:38:38 -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>
---
 atlantik/atlanticd/atlanticclient.h                |  2 +-
 atlantik/client/atlantik.cpp                       | 46 +++++------
 atlantik/client/atlantik.h                         |  2 +-
 atlantik/client/configdlg.h                        | 10 +--
 atlantik/client/eventlogwidget.h                   |  2 +-
 atlantik/client/main.cpp                           | 10 +--
 atlantik/client/monopigator.cpp                    | 12 +--
 atlantik/client/selectconfiguration_widget.cpp     |  2 +-
 atlantik/client/selectconfiguration_widget.h       |  2 +-
 atlantik/client/selectgame_widget.cpp              |  4 +-
 atlantik/client/selectgame_widget.h                |  2 +-
 atlantik/client/selectserver_widget.h              |  2 +-
 atlantik/libatlantic/atlantic_core.cpp             | 62 +++++++-------
 atlantik/libatlantic/estate.cpp                    |  4 +-
 atlantik/libatlantic/game.cpp                      |  2 +-
 atlantik/libatlantic/player.cpp                    |  4 +-
 atlantik/libatlantic/trade.cpp                     |  8 +-
 atlantik/libatlantikclient/atlantik_network.cpp    | 22 ++---
 atlantik/libatlantikclient/atlantik_network.h      |  2 +-
 atlantik/libatlantikui/auction_widget.h            |  2 +-
 atlantik/libatlantikui/board.cpp                   | 48 +++++------
 atlantik/libatlantikui/board.h                     |  6 +-
 atlantik/libatlantikui/estatedetails.cpp           | 14 ++--
 atlantik/libatlantikui/estatedetails.h             |  2 +-
 atlantik/libatlantikui/estateview.cpp              | 28 +++----
 atlantik/libatlantikui/estateview.h                |  2 +-
 atlantik/libatlantikui/portfolioestate.h           |  4 +-
 atlantik/libatlantikui/portfolioview.cpp           | 12 +--
 atlantik/libatlantikui/portfolioview.h             |  2 +-
 atlantik/libatlantikui/token.cpp                   |  8 +-
 atlantik/libatlantikui/token.h                     |  2 +-
 atlantik/libatlantikui/trade_widget.cpp            | 10 +--
 atlantik/libatlantikui/trade_widget.h              |  2 +-
 kasteroids/toplevel.cpp                            |  2 +-
 kasteroids/view.cpp                                |  4 +-
 kasteroids/view.h                                  |  2 +-
 katomic/feld.h                                     |  2 +-
 katomic/gamewidget.h                               |  2 +-
 katomic/main.cpp                                   |  6 +-
 katomic/molek.h                                    |  2 +-
 kbackgammon/engines/fibs/kbgfibs.cpp               | 10 +--
 kbackgammon/engines/fibs/kbgfibs.h                 |  2 +-
 kbackgammon/engines/fibs/kbgfibschat.cpp           |  6 +-
 kbackgammon/engines/fibs/kbgfibschat.h             |  2 +-
 kbackgammon/engines/fibs/kbginvite.cpp             |  2 +-
 kbackgammon/engines/fibs/kbginvite.h               |  2 +-
 kbackgammon/engines/fibs/kplayerlist.cpp           |  2 +-
 kbackgammon/engines/fibs/kplayerlist.h             |  2 +-
 kbackgammon/engines/generic/kbgengine.h            |  2 +-
 kbackgammon/engines/gnubg/kbggnubg.h               |  2 +-
 kbackgammon/engines/nextgen/kbggame.h              |  2 +-
 kbackgammon/engines/nextgen/kbgng.cpp              |  2 +-
 kbackgammon/engines/nextgen/kbgng.h                |  2 +-
 kbackgammon/engines/offline/kbgoffline.h           |  2 +-
 kbackgammon/kbg.cpp                                | 10 +--
 kbackgammon/kbgboard.cpp                           |  4 +-
 kbackgammon/kbgboard.h                             | 10 +--
 kbackgammon/kbgtextview.h                          |  2 +-
 kbattleship/kbattleship/kbaiplayer.cpp             | 12 +--
 kbattleship/kbattleship/kbattlefield.cpp           |  2 +-
 kbattleship/kbattleship/kbattleship.cpp            | 74 ++++++++---------
 kbattleship/kbattleship/kbattleshipclient.cpp      |  2 +-
 kbattleship/kbattleship/kbattleshipserver.cpp      | 10 +--
 kbattleship/kbattleship/kbattleshipview.cpp        |  2 +-
 kbattleship/kbattleship/kbattleshipview.h          |  2 +-
 kbattleship/kbattleship/kbchooserstrategy.cpp      |  6 +-
 kbattleship/kbattleship/kbchooserstrategy.h        |  2 +-
 kbattleship/kbattleship/kbdestroyshipstrategy.h    |  2 +-
 kbattleship/kbattleship/kbdiagonalshotstrategy.h   |  2 +-
 kbattleship/kbattleship/kbdiagonalwrapstrategy.cpp | 12 +--
 kbattleship/kbattleship/kbdiagonalwrapstrategy.h   |  2 +-
 .../kbattleship/kbhorizontalstepstrategy.cpp       | 14 ++--
 kbattleship/kbattleship/kbhorizontalstepstrategy.h |  2 +-
 kbattleship/kbattleship/kbrandomshotstrategy.cpp   |  4 +-
 kbattleship/kbattleship/kbrandomshotstrategy.h     |  2 +-
 kbattleship/kbattleship/kbstrategy.cpp             |  6 +-
 kbattleship/kbattleship/kbstrategy.h               |  2 +-
 kbattleship/kbattleship/kbverticalstepstrategy.cpp | 14 ++--
 kbattleship/kbattleship/kbverticalstepstrategy.h   |  2 +-
 kbattleship/kbattleship/kchatwidget.h              |  2 +-
 kbattleship/kbattleship/kclientdialog.h            |  2 +-
 kbattleship/kbattleship/konnectionhandling.cpp     | 28 +++----
 kbattleship/kbattleship/kserverdialog.h            |  2 +-
 kbattleship/kbattleship/kshiplist.cpp              | 10 +--
 kbattleship/kbattleship/kstatdialog.h              |  2 +-
 kbattleship/kbattleship/main.cpp                   |  4 +-
 kblackbox/kbbgame.cpp                              |  8 +-
 kblackbox/kbbgfx.h                                 |  2 +-
 kblackbox/main.cpp                                 |  2 +-
 kbounce/game.cpp                                   | 22 ++---
 kbounce/game.h                                     |  8 +-
 kbounce/kbounce.cpp                                |  4 +-
 kenolaba/AbTop.cpp                                 | 14 ++--
 kenolaba/Ball.cpp                                  | 47 ++++++-----
 kenolaba/Ball.h                                    |  4 +-
 kenolaba/Board.cpp                                 |  2 +-
 kenolaba/Board.h                                   |  2 +-
 kenolaba/BoardWidget.cpp                           | 28 +++----
 kenolaba/BoardWidget.h                             |  2 +-
 kenolaba/EvalDlgImpl.cpp                           |  2 +-
 kenolaba/EvalScheme.cpp                            |  2 +-
 kenolaba/Network.cpp                               | 12 +--
 kenolaba/kenolaba.cpp                              | 10 +--
 kfouleggs/ai.cpp                                   | 12 +--
 kfouleggs/board.cpp                                |  4 +-
 kfouleggs/main.cpp                                 |  2 +-
 kgoldrunner/src/kgoldrunner.cpp                    |  2 +-
 kgoldrunner/src/kgrcanvas.cpp                      |  6 +-
 kgoldrunner/src/kgrcanvas.h                        |  2 +-
 kgoldrunner/src/kgrdialog.cpp                      |  2 +-
 kgoldrunner/src/kgrdialog.h                        |  6 +-
 kgoldrunner/src/kgrfigure.cpp                      |  2 +-
 kgoldrunner/src/kgrgame.cpp                        | 20 ++---
 kgoldrunner/src/kgrgame.h                          |  2 +-
 kgoldrunner/src/main.cpp                           |  2 +-
 kjumpingcube/cubeboxbase.h                         |  2 +-
 kjumpingcube/kcubeboxwidget.h                      |  6 +-
 kjumpingcube/kcubewidget.h                         |  2 +-
 kjumpingcube/kjumpingcube.cpp                      |  6 +-
 kjumpingcube/main.cpp                              |  2 +-
 klickety/board.cpp                                 |  6 +-
 klickety/piece.h                                   |  4 +-
 klines/ballpainter.cpp                             |  4 +-
 klines/klines.cpp                                  |  2 +-
 klines/linesboard.cpp                              |  6 +-
 klines/linesboard.h                                |  2 +-
 klines/mwidget.h                                   |  2 +-
 klines/prompt.h                                    |  2 +-
 kmahjongg/Background.cpp                           |  8 +-
 kmahjongg/GameTimer.h                              |  2 +-
 kmahjongg/HighScore.cpp                            |  2 +-
 kmahjongg/Tileset.cpp                              |  4 +-
 kmahjongg/boardwidget.h                            |  2 +-
 kmahjongg/kmahjongg.cpp                            |  4 +-
 kmahjongg/kmahjongg.h                              |  2 +-
 kmines/dialogs.cpp                                 |  6 +-
 kmines/dialogs.h                                   |  2 +-
 kmines/field.h                                     |  8 +-
 kmines/frame.cpp                                   |  4 +-
 kmines/kzoommainwindow.cpp                         |  2 +-
 kmines/kzoommainwindow.h                           |  4 +-
 kmines/main.cpp                                    |  6 +-
 kmines/solver/advFastRules.cpp                     |  2 +-
 kmines/solver/adviseFast.cpp                       |  4 +-
 kmines/solver/bfield.cpp                           |  2 +-
 kmines/solver/solver.cpp                           |  2 +-
 kmines/solver/solver.h                             |  2 +-
 kmines/status.cpp                                  |  2 +-
 knetwalk/src/cell.cpp                              |  2 +-
 knetwalk/src/main.cpp                              | 14 ++--
 knetwalk/src/mainwindow.cpp                        | 12 +--
 knetwalk/src/mainwindow.h                          |  2 +-
 kolf/ball.cpp                                      |  4 +-
 kolf/canvasitem.cpp                                |  4 +-
 kolf/canvasitem.h                                  |  2 +-
 kolf/config.h                                      |  6 +-
 kolf/editor.cpp                                    |  4 +-
 kolf/editor.h                                      |  2 +-
 kolf/floater.cpp                                   |  2 +-
 kolf/game.cpp                                      | 62 +++++++-------
 kolf/game.h                                        |  2 +-
 kolf/kcomboboxdialog.cpp                           |  2 +-
 kolf/kcomboboxdialog.h                             |  8 +-
 kolf/kolf.cpp                                      | 22 ++---
 kolf/newgame.cpp                                   |  2 +-
 kolf/newgame.h                                     |  4 +-
 kolf/object.h                                      |  2 +-
 kolf/printdialogpage.h                             |  2 +-
 kolf/scoreboard.h                                  |  2 +-
 kolf/slope.cpp                                     | 10 +--
 kolf/slope.h                                       |  2 +-
 konquest/Konquest.cpp                              |  2 +-
 konquest/fleetdlg.cpp                              |  2 +-
 konquest/gameboard.cpp                             |  8 +-
 konquest/gameboard.h                               |  4 +-
 konquest/gamecore.cpp                              | 12 +--
 konquest/int_validator.h                           |  4 +-
 konquest/map_widget.h                              |  2 +-
 konquest/minimap.cpp                               |  2 +-
 konquest/minimap.h                                 |  2 +-
 konquest/newgamedlg.cpp                            |  8 +-
 konquest/scoredlg.cpp                              |  2 +-
 kpat/card.cpp                                      |  2 +-
 kpat/card.h                                        |  2 +-
 kpat/cardmaps.cpp                                  |  8 +-
 kpat/clock.cpp                                     |  2 +-
 kpat/clock.h                                       |  2 +-
 kpat/computation.cpp                               |  2 +-
 kpat/computation.h                                 |  2 +-
 kpat/dealer.cpp                                    | 46 +++++------
 kpat/dealer.h                                      |  2 +-
 kpat/deck.cpp                                      |  4 +-
 kpat/deck.h                                        |  4 +-
 kpat/fortyeight.cpp                                |  4 +-
 kpat/fortyeight.h                                  |  4 +-
 kpat/freecell.cpp                                  | 14 ++--
 kpat/freecell.h                                    |  4 +-
 kpat/golf.cpp                                      |  2 +-
 kpat/golf.h                                        |  4 +-
 kpat/grandf.cpp                                    |  2 +-
 kpat/grandf.h                                      |  2 +-
 kpat/gypsy.cpp                                     |  4 +-
 kpat/gypsy.h                                       |  2 +-
 kpat/idiot.cpp                                     |  2 +-
 kpat/idiot.h                                       |  2 +-
 kpat/kings.h                                       |  2 +-
 kpat/klondike.h                                    |  2 +-
 kpat/main.cpp                                      |  8 +-
 kpat/mod3.cpp                                      |  4 +-
 kpat/mod3.h                                        |  2 +-
 kpat/napoleon.cpp                                  |  4 +-
 kpat/napoleon.h                                    |  2 +-
 kpat/pile.cpp                                      | 16 ++--
 kpat/pile.h                                        |  4 +-
 kpat/pwidget.cpp                                   | 12 +--
 kpat/simon.h                                       |  2 +-
 kpat/spider.cpp                                    |  6 +-
 kpat/spider.h                                      |  4 +-
 kpat/yukon.h                                       |  2 +-
 kpoker/betbox.h                                    |  2 +-
 kpoker/kpaint.h                                    |  4 +-
 kpoker/kpoker.cpp                                  | 30 +++----
 kpoker/kpoker.h                                    |  2 +-
 kpoker/newgamedlg.cpp                              |  2 +-
 kpoker/newgamedlg.h                                |  4 +-
 kpoker/optionsdlg.cpp                              |  4 +-
 kpoker/optionsdlg.h                                |  2 +-
 kpoker/playerbox.h                                 |  2 +-
 kpoker/top.cpp                                     |  2 +-
 kreversi/Position.h                                |  2 +-
 kreversi/highscores.cpp                            |  8 +-
 kreversi/kreversi.cpp                              |  6 +-
 kreversi/kzoommainwindow.cpp                       |  2 +-
 kreversi/kzoommainwindow.h                         |  4 +-
 kreversi/main.cpp                                  | 12 +--
 kreversi/qreversigame.h                            |  2 +-
 ksame/KSameWidget.cpp                              |  2 +-
 ksame/KSameWidget.h                                |  2 +-
 ksame/StoneField.cpp                               |  4 +-
 ksame/StoneWidget.cpp                              |  2 +-
 ksame/StoneWidget.h                                |  2 +-
 ksame/main.cpp                                     |  2 +-
 kshisen/app.cpp                                    |  4 +-
 kshisen/app.h                                      |  2 +-
 kshisen/board.cpp                                  |  8 +-
 kshisen/board.h                                    |  2 +-
 kshisen/main.cpp                                   |  2 +-
 kshisen/tileset.cpp                                |  2 +-
 ksirtet/ksirtet/ai.cpp                             | 10 +--
 ksirtet/ksirtet/board.cpp                          |  2 +-
 ksirtet/ksirtet/main.cpp                           |  2 +-
 ksmiletris/gamewidget.h                            |  2 +-
 ksmiletris/gamewindow.cpp                          |  2 +-
 ksmiletris/gamewindow.h                            |  2 +-
 ksmiletris/main.cpp                                |  2 +-
 ksmiletris/mirrorwidget.h                          |  2 +-
 ksmiletris/npiecewidget.h                          |  2 +-
 ksmiletris/screenwidget.h                          |  2 +-
 ksnake/basket.cpp                                  |  4 +-
 ksnake/board.cpp                                   | 10 +--
 ksnake/game.cpp                                    | 14 ++--
 ksnake/game.h                                      |  2 +-
 ksnake/levels.cpp                                  |  2 +-
 ksnake/main.cpp                                    |  4 +-
 ksnake/progress.h                                  |  2 +-
 ksnake/rattler.cpp                                 |  8 +-
 ksnake/rattler.h                                   |  2 +-
 ksnake/snake.cpp                                   |  4 +-
 ksnake/startroom.cpp                               |  2 +-
 ksnake/startroom.h                                 |  2 +-
 ksnake/view.h                                      |  2 +-
 ksokoban/Bookmark.cpp                              |  2 +-
 ksokoban/History.cpp                               | 16 ++--
 ksokoban/LevelMap.cpp                              | 10 +--
 ksokoban/MainWindow.cpp                            | 18 ++--
 ksokoban/ModalLabel.h                              |  2 +-
 ksokoban/Move.cpp                                  |  4 +-
 ksokoban/PathFinder.cpp                            |  6 +-
 ksokoban/PlayField.cpp                             | 28 +++----
 ksokoban/PlayField.h                               |  2 +-
 ksokoban/main.cpp                                  |  6 +-
 kspaceduel/ai.cpp                                  |  6 +-
 kspaceduel/dialogs.h                               |  4 +-
 kspaceduel/main.cpp                                |  2 +-
 kspaceduel/mainview.cpp                            |  8 +-
 kspaceduel/mainview.h                              |  2 +-
 kspaceduel/playerinfo.h                            |  2 +-
 kspaceduel/topwidget.cpp                           | 20 ++---
 ktron/ktron.cpp                                    | 26 +++---
 ktron/ktron.h                                      |  2 +-
 ktron/tron.cpp                                     |  6 +-
 ktron/tron.h                                       |  2 +-
 ktuberling/main.cpp                                |  4 +-
 ktuberling/playground.cpp                          | 12 +--
 ktuberling/soundfactory.cpp                        |  6 +-
 ktuberling/toplevel.cpp                            |  4 +-
 libksirtet/base/board.cpp                          | 22 ++---
 libksirtet/base/board.h                            |  2 +-
 libksirtet/base/factory.cpp                        | 10 +--
 libksirtet/base/factory.h                          |  2 +-
 libksirtet/base/field.cpp                          |  8 +-
 libksirtet/base/gtetris.cpp                        | 22 ++---
 libksirtet/base/kzoommainwindow.cpp                |  2 +-
 libksirtet/base/kzoommainwindow.h                  |  4 +-
 libksirtet/base/piece.cpp                          | 16 ++--
 libksirtet/base/settings.cpp                       |  4 +-
 libksirtet/common/ai.cpp                           | 16 ++--
 libksirtet/common/board.cpp                        |  6 +-
 libksirtet/common/inter.cpp                        | 14 ++--
 libksirtet/common/misc_ui.h                        |  2 +-
 libksirtet/common/settings.cpp                     |  2 +-
 libksirtet/lib/internal.cpp                        |  2 +-
 libksirtet/lib/internal.h                          |  2 +-
 libksirtet/lib/keys.cpp                            |  6 +-
 libksirtet/lib/meeting.h                           |  6 +-
 libksirtet/lib/mp_board.h                          |  2 +-
 libksirtet/lib/mp_interface.cpp                    |  4 +-
 libksirtet/lib/mp_interface.h                      |  4 +-
 libksirtet/lib/mp_option.h                         |  2 +-
 libksirtet/lib/mp_simple_board.h                   |  2 +-
 libksirtet/lib/mp_simple_interface.h               |  2 +-
 libksirtet/lib/pline.h                             |  8 +-
 libksirtet/lib/smanager.cpp                        |  6 +-
 libksirtet/lib/socket.cpp                          |  2 +-
 libksirtet/lib/socket.h                            |  2 +-
 libksirtet/lib/types.h                             |  2 +-
 libksirtet/lib/wizard.h                            |  2 +-
 libtdegames/highscore/kexthighscore.cpp            |  6 +-
 libtdegames/highscore/kexthighscore_gui.cpp        | 10 +--
 libtdegames/highscore/kexthighscore_internal.cpp   |  6 +-
 libtdegames/highscore/kexthighscore_tab.h          |  2 +-
 libtdegames/highscore/khighscore.cpp               |  6 +-
 libtdegames/highscore/khighscore.h                 |  4 +-
 libtdegames/highscore/kscoredialog.cpp             |  4 +-
 libtdegames/highscore/kscoredialog.h               |  2 +-
 libtdegames/highscore/tdeconfigrawbackend.cpp      |  8 +-
 libtdegames/kcanvasrootpixmap.h                    |  2 +-
 libtdegames/kcarddialog.cpp                        | 30 +++----
 libtdegames/kcarddialog.h                          |  6 +-
 libtdegames/kchatbase.cpp                          | 10 +--
 libtdegames/kchatbase.h                            |  4 +-
 libtdegames/kchatdialog.cpp                        | 16 ++--
 libtdegames/kgame/dialogs/kgameconnectdialog.cpp   | 12 +--
 libtdegames/kgame/dialogs/kgameconnectdialog.h     |  2 +-
 libtdegames/kgame/dialogs/kgamedebugdialog.cpp     | 78 +++++++++---------
 libtdegames/kgame/dialogs/kgamedialog.cpp          | 40 ++++-----
 libtdegames/kgame/dialogs/kgamedialog.h            |  4 +-
 libtdegames/kgame/dialogs/kgamedialogconfig.cpp    | 54 ++++++------
 libtdegames/kgame/dialogs/kgamedialogconfig.h      | 12 +--
 libtdegames/kgame/dialogs/kgameerrordialog.cpp     |  8 +-
 libtdegames/kgame/dialogs/kgameerrordialog.h       |  2 +-
 libtdegames/kgame/kgame.cpp                        | 42 +++++-----
 libtdegames/kgame/kgame.h                          |  4 +-
 libtdegames/kgame/kgamechat.cpp                    | 10 +--
 libtdegames/kgame/kgameio.cpp                      | 16 ++--
 libtdegames/kgame/kgamenetwork.cpp                 | 12 +--
 libtdegames/kgame/kgamenetwork.h                   |  2 +-
 libtdegames/kgame/kgameprocess.cpp                 |  2 +-
 libtdegames/kgame/kgameproperty.cpp                |  6 +-
 libtdegames/kgame/kgameproperty.h                  | 10 +--
 libtdegames/kgame/kgamepropertyhandler.cpp         |  2 +-
 libtdegames/kgame/kgamepropertyhandler.h           |  6 +-
 libtdegames/kgame/kgamesequence.cpp                | 14 ++--
 libtdegames/kgame/kmessageclient.cpp               |  6 +-
 libtdegames/kgame/kmessageclient.h                 |  2 +-
 libtdegames/kgame/kmessageio.cpp                   | 20 ++---
 libtdegames/kgame/kmessageio.h                     | 18 ++--
 libtdegames/kgame/kmessageserver.cpp               | 14 ++--
 libtdegames/kgame/kmessageserver.h                 |  4 +-
 libtdegames/kgame/kplayer.cpp                      | 14 ++--
 libtdegames/kgame/kplayer.h                        |  4 +-
 libtdegames/kgamelcd.cpp                           |  2 +-
 libtdegames/kgamelcd.h                             |  8 +-
 libtdegames/kgameprogress.cpp                      |  4 +-
 libtdegames/kgameprogress.h                        |  6 +-
 libtdegames/kstdgameaction.cpp                     | 52 ++++++------
 libtdegames/kstdgameaction.h                       | 96 +++++++++++-----------
 lskat/lskat/KChildConnect.cpp                      |  4 +-
 lskat/lskat/KConnectEntry.cpp                      |  2 +-
 lskat/lskat/KConnectEntry.h                        |  2 +-
 lskat/lskat/KEInput.cpp                            |  8 +-
 lskat/lskat/KEInput.h                              |  4 +-
 lskat/lskat/KEMessage.cpp                          |  4 +-
 lskat/lskat/KInputChildProcess.cpp                 |  2 +-
 lskat/lskat/KInteractiveConnect.h                  |  2 +-
 lskat/lskat/KRSocket.cpp                           |  8 +-
 lskat/lskat/KRemoteConnect.cpp                     | 28 +++----
 lskat/lskat/KRemoteConnect.h                       |  2 +-
 lskat/lskat/TDEProcessConnect.cpp                  |  6 +-
 lskat/lskat/TDEProcessConnect.h                    |  2 +-
 lskat/lskat/lskat.cpp                              | 20 ++---
 lskat/lskat/lskatdoc.cpp                           |  8 +-
 lskat/lskat/lskatdoc.h                             |  6 +-
 lskat/lskat/lskatview.h                            |  2 +-
 lskat/lskat/main.cpp                               |  8 +-
 lskat/lskat/namedlg.h                              |  2 +-
 lskat/lskatproc/KChildConnect.cpp                  |  4 +-
 lskat/lskatproc/KEMessage.cpp                      |  4 +-
 lskat/lskatproc/KInputChildProcess.cpp             |  2 +-
 tdefifteen/src/main.cpp                            |  4 +-
 tdefifteen/src/mainwindow.cpp                      |  2 +-
 tdefifteen/src/mainwindow.h                        |  2 +-
 twin4/twin4/kspritecache.cpp                       | 26 +++---
 twin4/twin4/kspritecache.h                         |  4 +-
 twin4/twin4/main.cpp                               | 10 +--
 twin4/twin4/scorewidget.h                          |  2 +-
 twin4/twin4/twin4.cpp                              |  8 +-
 twin4/twin4/twin4.h                                |  4 +-
 twin4/twin4/twin4doc.cpp                           | 14 ++--
 twin4/twin4/twin4doc.h                             |  2 +-
 twin4/twin4/twin4player.cpp                        |  2 +-
 twin4/twin4/twin4proc.cpp                          |  6 +-
 twin4/twin4/twin4view.cpp                          | 24 +++---
 twin4/twin4/twin4view.h                            |  2 +-
 414 files changed, 1479 insertions(+), 1480 deletions(-)

diff --git a/atlantik/atlanticd/atlanticclient.h b/atlantik/atlanticd/atlanticclient.h
index 298b3b13..0e3dd206 100644
--- a/atlantik/atlanticd/atlanticclient.h
+++ b/atlantik/atlanticd/atlanticclient.h
@@ -25,7 +25,7 @@ TQ_OBJECT
   
 
 public:
-	AtlanticClient(TQObject *parent = 0, const char *name = 0);
+	AtlanticClient(TQObject *parent = nullptr, const char *name = nullptr);
 	void sendData(const TQString &data);
 
 private slots:
diff --git a/atlantik/client/atlantik.cpp b/atlantik/client/atlantik.cpp
index 431beaf3..0e286f03 100644
--- a/atlantik/client/atlantik.cpp
+++ b/atlantik/client/atlantik.cpp
@@ -57,9 +57,9 @@
 
 LogTextEdit::LogTextEdit( TQWidget *parent, const char *name ) : TQTextEdit( parent, name )
 {
-	m_clear = KStdAction::clear( this, TQ_SLOT( clear() ), 0 );
-	m_selectAll = KStdAction::selectAll( this, TQ_SLOT( selectAll() ), 0 );
-	m_copy = KStdAction::copy( this, TQ_SLOT( copy() ), 0 );
+	m_clear = KStdAction::clear( this, TQ_SLOT( clear() ), nullptr );
+	m_selectAll = KStdAction::selectAll( this, TQ_SLOT( selectAll() ), nullptr );
+	m_copy = KStdAction::copy( this, TQ_SLOT( copy() ), nullptr );
 }
 
 LogTextEdit::~LogTextEdit()
@@ -98,13 +98,13 @@ Atlantik::Atlantik ()
 	KStdAction::configureNotifications(this, TQ_SLOT(configureNotifications()), actionCollection());
 
 	// Initialize pointers to 0L
-	m_configDialog = 0;
-	m_board = 0;
-	m_eventLogWidget = 0;
-	m_selectServer = 0;
-	m_selectGame = 0;
-	m_selectConfiguration = 0;
-	m_atlantikNetwork = 0;
+	m_configDialog = nullptr;
+	m_board = nullptr;
+	m_eventLogWidget = nullptr;
+	m_selectServer = nullptr;
+	m_selectGame = nullptr;
+	m_selectConfiguration = nullptr;
+	m_atlantikNetwork = nullptr;
 
 	// Game and network core
 	m_atlanticCore = new AtlanticCore(this, "atlanticCore");
@@ -255,7 +255,7 @@ void Atlantik::newEstate(Estate *estate)
 
 void Atlantik::newTrade(Trade *trade)
 {
-	TradeDisplay *tradeDisplay = new TradeDisplay(trade, m_atlanticCore, 0, "tradeDisplay");
+	TradeDisplay *tradeDisplay = new TradeDisplay(trade, m_atlanticCore, nullptr, "tradeDisplay");
 	m_tradeGUIMap[trade] = tradeDisplay;
 	tradeDisplay->show();
 }
@@ -295,7 +295,7 @@ void Atlantik::showSelectServer()
 	if (m_selectGame)
 	{
 		delete m_selectGame;
-		m_selectGame = 0;
+		m_selectGame = nullptr;
 	}
 
 	m_atlanticCore->reset(true);
@@ -333,12 +333,12 @@ void Atlantik::showSelectGame()
 	if (m_selectServer)
 	{
 		delete m_selectServer;
-		m_selectServer = 0;
+		m_selectServer = nullptr;
 	}
 	if (m_selectConfiguration)
 	{
 		delete m_selectConfiguration;
-		m_selectConfiguration = 0;
+		m_selectConfiguration = nullptr;
 	}
 
 	connect(m_selectGame, TQ_SIGNAL(joinGame(int)), m_atlantikNetwork, TQ_SLOT(joinGame(int)));
@@ -355,7 +355,7 @@ void Atlantik::showSelectConfiguration()
 	if (m_selectGame)
 	{
 		delete m_selectGame;
-		m_selectGame = 0;
+		m_selectGame = nullptr;
 	}
 
 	m_selectConfiguration = new SelectConfiguration(m_atlanticCore, m_mainWidget, "selectConfiguration");
@@ -393,13 +393,13 @@ void Atlantik::showBoard()
 	if (m_selectGame)
 	{
 		delete m_selectGame;
-		m_selectGame = 0;
+		m_selectGame = nullptr;
 	}
 
 	if (m_selectConfiguration)
 	{
 		delete m_selectConfiguration;
-		m_selectConfiguration = 0;
+		m_selectConfiguration = nullptr;
 	}
 
 	if (!m_board)
@@ -411,7 +411,7 @@ void Atlantik::showBoard()
 	m_board->displayDefault();
 	m_board->show();
 
-	PortfolioView *portfolioView = 0;
+	PortfolioView *portfolioView = nullptr;
 	for (TQPtrListIterator<PortfolioView> it(m_portfolioViews); *it; ++it)
 		if ((portfolioView = dynamic_cast<PortfolioView*>(*it)))
 			portfolioView->buildPortfolio();
@@ -474,7 +474,7 @@ void Atlantik::networkClosed(int status)
 
 void Atlantik::slotConfigure()
 {
-	if (m_configDialog == 0)
+	if (!m_configDialog)
 		m_configDialog = new ConfigDialog(this);
 	m_configDialog->show();
 
@@ -484,7 +484,7 @@ void Atlantik::slotConfigure()
 void Atlantik::showEventLog()
 {
 	if (!m_eventLogWidget)
-		m_eventLogWidget = new EventLogWidget(m_eventLog, 0);
+		m_eventLogWidget = new EventLogWidget(m_eventLog, nullptr);
 	m_eventLogWidget->show();
 }
 
@@ -647,7 +647,7 @@ void Atlantik::playerChanged(Player *player)
 	if (player == playerSelf)
 	{
 		// We changed ourselves..
-		PortfolioView *portfolioView = 0;
+		PortfolioView *portfolioView = nullptr;
 		for (TQPtrListIterator<PortfolioView> it(m_portfolioViews); *it; ++it)
 			if ((portfolioView = dynamic_cast<PortfolioView*>(*it)))
 			{
@@ -812,12 +812,12 @@ PortfolioView *Atlantik::addPortfolioView(Player *player)
 
 PortfolioView *Atlantik::findPortfolioView(Player *player)
 {
-	PortfolioView *portfolioView = 0;
+	PortfolioView *portfolioView = nullptr;
 	for (TQPtrListIterator<PortfolioView> it(m_portfolioViews); (portfolioView = *it) ; ++it)
 		if (player == portfolioView->player())
 			return portfolioView;
 
-	return 0;
+	return nullptr;
 }
 
 void Atlantik::closeEvent(TQCloseEvent *e)
diff --git a/atlantik/client/atlantik.h b/atlantik/client/atlantik.h
index 4fac89a7..4a282f04 100644
--- a/atlantik/client/atlantik.h
+++ b/atlantik/client/atlantik.h
@@ -74,7 +74,7 @@ TQ_OBJECT
   
 
 public:
-	LogTextEdit( TQWidget *parent = 0, const char *name = 0 );
+	LogTextEdit( TQWidget *parent = nullptr, const char *name = nullptr );
 	virtual ~LogTextEdit();
 
 	TQPopupMenu *createPopupMenu( const TQPoint & pos );
diff --git a/atlantik/client/configdlg.h b/atlantik/client/configdlg.h
index 4ec0d156..9e491deb 100644
--- a/atlantik/client/configdlg.h
+++ b/atlantik/client/configdlg.h
@@ -38,7 +38,7 @@ TQ_OBJECT
   
 
 public:
-	ConfigPlayer(ConfigDialog *configDialog, TQWidget *parent, const char *name=0);
+	ConfigPlayer(ConfigDialog *configDialog, TQWidget *parent, const char *name=nullptr);
 
 	TQString playerName();
 	TQString playerImage();
@@ -62,7 +62,7 @@ TQ_OBJECT
   
 
 public:
-	ConfigBoard(ConfigDialog *configDialog, TQWidget *parent, const char *name=0);
+	ConfigBoard(ConfigDialog *configDialog, TQWidget *parent, const char *name=nullptr);
 
 	bool indicateUnowned();
 	bool highliteUnowned();
@@ -83,7 +83,7 @@ TQ_OBJECT
   
 
 public:
-	ConfigMonopigator(ConfigDialog *dialog, TQWidget *parent, const char *name = 0);
+	ConfigMonopigator(ConfigDialog *dialog, TQWidget *parent, const char *name = nullptr);
 
 	bool connectOnStart();
 	bool hideDevelopmentServers();
@@ -101,7 +101,7 @@ TQ_OBJECT
   
 
 public:
-	ConfigGeneral(ConfigDialog *dialog, TQWidget *parent, const char *name = 0);
+	ConfigGeneral(ConfigDialog *dialog, TQWidget *parent, const char *name = nullptr);
 
 	bool chatTimestamps();
 
@@ -118,7 +118,7 @@ TQ_OBJECT
   
 
 public:
-	ConfigDialog(Atlantik *parent, const char *name=0);
+	ConfigDialog(Atlantik *parent, const char *name=nullptr);
 
 	bool chatTimestamps();
 	bool indicateUnowned();
diff --git a/atlantik/client/eventlogwidget.h b/atlantik/client/eventlogwidget.h
index d4e1c110..0a2fbf37 100644
--- a/atlantik/client/eventlogwidget.h
+++ b/atlantik/client/eventlogwidget.h
@@ -55,7 +55,7 @@ TQ_OBJECT
 public:
 	enum EventLogType { Default, Net_In, Net_Out };
 
-	EventLogWidget(EventLog *eventLog, TQWidget *parent=0, const char *name = 0);
+	EventLogWidget(EventLog *eventLog, TQWidget *parent=nullptr, const char *name = nullptr);
 
 public slots:
 	void addEvent(Event *event);
diff --git a/atlantik/client/main.cpp b/atlantik/client/main.cpp
index 3333c88e..89b33b9e 100644
--- a/atlantik/client/main.cpp
+++ b/atlantik/client/main.cpp
@@ -25,12 +25,12 @@
 
 static TDECmdLineOptions options[] =
 {
-	{ "h", 0, 0 },
-	{ "host <argument>", I18N_NOOP("Connect to this host"), 0 },
-	{ "p", 0, 0 },
+	{ "h", nullptr, nullptr },
+	{ "host <argument>", I18N_NOOP("Connect to this host"), nullptr },
+	{ "p", nullptr, nullptr },
 	{ "port <argument>", I18N_NOOP("Connect at this port"), "1234" },
-	{ "g", 0, 0 },
-	{ "game <argument>", I18N_NOOP("Join this game"), 0 },
+	{ "g", nullptr, nullptr },
+	{ "game <argument>", I18N_NOOP("Join this game"), nullptr },
 	TDECmdLineLastOption
 };
 
diff --git a/atlantik/client/monopigator.cpp b/atlantik/client/monopigator.cpp
index dd441ecb..93e6fa6f 100644
--- a/atlantik/client/monopigator.cpp
+++ b/atlantik/client/monopigator.cpp
@@ -25,9 +25,9 @@
 
 Monopigator::Monopigator()
 {
-	m_downloadData = 0;
-	m_job = 0;
-	m_timer = 0;
+	m_downloadData = nullptr;
+	m_job = nullptr;
+	m_timer = nullptr;
 }
 
 Monopigator::~Monopigator()
@@ -35,7 +35,7 @@ Monopigator::~Monopigator()
 	if (m_job)
 		m_job -> kill();
         delete m_downloadData;
-        m_downloadData=0L;
+        m_downloadData=nullptr;
 }
 
 void Monopigator::loadData(const KURL &url)
@@ -68,14 +68,14 @@ void Monopigator::slotData(TDEIO::Job *, const TQByteArray &data)
 void Monopigator::slotResult(TDEIO::Job *job)
 {
 	processData(m_downloadData->buffer(), !job->error());
-	m_job = 0;
+	m_job = nullptr;
 }
 
 void Monopigator::slotTimeout()
 {
 	if (m_job)
 		m_job -> kill();
-	m_job = 0;
+	m_job = nullptr;
 
 	emit timeout();
 }
diff --git a/atlantik/client/selectconfiguration_widget.cpp b/atlantik/client/selectconfiguration_widget.cpp
index 9bae10da..ed517569 100644
--- a/atlantik/client/selectconfiguration_widget.cpp
+++ b/atlantik/client/selectconfiguration_widget.cpp
@@ -36,7 +36,7 @@
 SelectConfiguration::SelectConfiguration(AtlanticCore *atlanticCore, TQWidget *parent, const char *name) : TQWidget(parent, name)
 {
 	m_atlanticCore = atlanticCore;
-	m_game = 0;
+	m_game = nullptr;
 
 	m_mainLayout = new TQVBoxLayout(this, KDialog::marginHint());
 	TQ_CHECK_PTR(m_mainLayout);
diff --git a/atlantik/client/selectconfiguration_widget.h b/atlantik/client/selectconfiguration_widget.h
index fd95095a..a0b290d4 100644
--- a/atlantik/client/selectconfiguration_widget.h
+++ b/atlantik/client/selectconfiguration_widget.h
@@ -38,7 +38,7 @@ TQ_OBJECT
   
 
 public:
-	SelectConfiguration(AtlanticCore *atlanticCore, TQWidget *parent, const char *name=0);
+	SelectConfiguration(AtlanticCore *atlanticCore, TQWidget *parent, const char *name=nullptr);
 
 	void setCanStart(const bool &canStart);
 	TQString hostToConnect() const;
diff --git a/atlantik/client/selectgame_widget.cpp b/atlantik/client/selectgame_widget.cpp
index b7b71a58..775c563a 100644
--- a/atlantik/client/selectgame_widget.cpp
+++ b/atlantik/client/selectgame_widget.cpp
@@ -136,7 +136,7 @@ void SelectGame::updateGame(Game *game)
 void SelectGame::playerChanged(Player *player)
 {
 	TQListViewItem *item = m_gameList->firstChild();
-	Game *game = 0;
+	Game *game = nullptr;
 
 	while (item)
 	{
@@ -160,7 +160,7 @@ TQListViewItem *SelectGame::findItem(Game *game)
 
 		item = item->nextSibling();
 	}
-	return 0;
+	return nullptr;
 }
 
 void SelectGame::validateConnectButton()
diff --git a/atlantik/client/selectgame_widget.h b/atlantik/client/selectgame_widget.h
index 6ea71c0c..908e1437 100644
--- a/atlantik/client/selectgame_widget.h
+++ b/atlantik/client/selectgame_widget.h
@@ -33,7 +33,7 @@ TQ_OBJECT
   
 
 public:
-	SelectGame(AtlanticCore *atlanticCore, TQWidget *parent, const char *name=0);
+	SelectGame(AtlanticCore *atlanticCore, TQWidget *parent, const char *name=nullptr);
 
 	void initPage();
 	bool validateNext();
diff --git a/atlantik/client/selectserver_widget.h b/atlantik/client/selectserver_widget.h
index d4e3354f..130560dc 100644
--- a/atlantik/client/selectserver_widget.h
+++ b/atlantik/client/selectserver_widget.h
@@ -35,7 +35,7 @@ TQ_OBJECT
   
 
 public:
-	SelectServer(bool useMonopigatorOnStart, bool hideDevelopmentServers, TQWidget *parent, const char *name=0);
+	SelectServer(bool useMonopigatorOnStart, bool hideDevelopmentServers, TQWidget *parent, const char *name=nullptr);
 	virtual ~SelectServer();
 
 	void initPage();
diff --git a/atlantik/libatlantic/atlantic_core.cpp b/atlantik/libatlantic/atlantic_core.cpp
index 9139e6ed..26bd23da 100644
--- a/atlantik/libatlantic/atlantic_core.cpp
+++ b/atlantik/libatlantic/atlantic_core.cpp
@@ -28,7 +28,7 @@
 
 AtlanticCore::AtlanticCore(TQObject *parent, const char *name) : TQObject(parent, name)
 {
-	m_playerSelf = 0;
+	m_playerSelf = nullptr;
 }
 
 void AtlanticCore::reset(bool deletePermanents)
@@ -46,7 +46,7 @@ void AtlanticCore::reset(bool deletePermanents)
 	m_configOptions.clear();
 	m_configOptions.setAutoDelete(false);
 
-	Trade *trade = 0;
+	Trade *trade = nullptr;
 	for (TQPtrListIterator<Trade> it(m_trades); (trade = *it) ; ++it)
 	{
 		emit removeGUI(trade);
@@ -54,7 +54,7 @@ void AtlanticCore::reset(bool deletePermanents)
 	}
 	m_trades.clear();
 
-	Player *player = 0;
+	Player *player = nullptr;
 	for (TQPtrListIterator<Player> it(m_players); (player = *it) ; ++it)
 	{
 		if (deletePermanents)
@@ -64,16 +64,16 @@ void AtlanticCore::reset(bool deletePermanents)
 		}
 		else
 		{
-			player->setLocation(0);
-			player->setDestination(0);
+			player->setLocation(nullptr);
+			player->setDestination(nullptr);
 		}
 	}
 	if (deletePermanents)
 	{
 		m_players.clear();
-		m_playerSelf = 0;
+		m_playerSelf = nullptr;
 
-		Game *game = 0;
+		Game *game = nullptr;
 		for (TQPtrListIterator<Game> it(m_games); (game = *it) ; ++it)
 		{
 			emit removeGUI(game);
@@ -121,12 +121,12 @@ Player *AtlanticCore::newPlayer(int playerId, const bool &playerSelf)
 
 Player *AtlanticCore::findPlayer(int playerId)
 {
-	Player *player = 0;
+	Player *player = nullptr;
 	for (TQPtrListIterator<Player> it(m_players); (player = *it) ; ++it)
 		if (player->id() == playerId)
 			return player;
 
-	return 0;
+	return nullptr;
 }
 
 void AtlanticCore::removePlayer(Player *player)
@@ -156,30 +156,30 @@ Game *AtlanticCore::newGame(int gameId, const TQString &type)
 
 Game *AtlanticCore::findGame(const TQString &type)
 {
-	Game *game = 0;
+	Game *game = nullptr;
 	for (TQPtrListIterator<Game> it(m_games); (game = *it) ; ++it)
 		if (game->id() == -1 && game->type() == type)
 			return game;
 
-	return 0;
+	return nullptr;
 }
 
 Game *AtlanticCore::findGame(int gameId)
 {
 	if (gameId == -1)
-		return 0;
+		return nullptr;
 
-	Game *game = 0;
+	Game *game = nullptr;
 	for (TQPtrListIterator<Game> it(m_games); (game = *it) ; ++it)
 		if (game->id() == gameId)
 			return game;
 
-	return 0;
+	return nullptr;
 }
 
 Game *AtlanticCore::gameSelf()
 {
-	return( m_playerSelf ? m_playerSelf->game() : 0 );
+	return( m_playerSelf ? m_playerSelf->game() : nullptr );
 }
 
 void AtlanticCore::removeGame(Game *game)
@@ -209,17 +209,17 @@ Estate *AtlanticCore::newEstate(int estateId)
 
 Estate *AtlanticCore::findEstate(int estateId)
 {
-	Estate *estate = 0;
+	Estate *estate = nullptr;
 	for (TQPtrListIterator<Estate> it(m_estates); (estate = *it) ; ++it)
 		if (estate->id() == estateId)
 			return estate;
 
-	return 0;
+	return nullptr;
 }
 
 Estate *AtlanticCore::estateAfter(Estate *estate)
 {
-	Estate *eFirst = 0, *eTmp = 0;
+	Estate *eFirst = nullptr, *eTmp = nullptr;
 	bool useNext = false;
 	for (TQPtrListIterator<Estate> it(m_estates); (eTmp = *it) ; ++it)
 	{
@@ -247,12 +247,12 @@ EstateGroup *AtlanticCore::newEstateGroup(int groupId)
 
 EstateGroup *AtlanticCore::findEstateGroup(int groupId)
 {
-	EstateGroup *estateGroup = 0;
+	EstateGroup *estateGroup = nullptr;
 	for (TQPtrListIterator<EstateGroup> it(m_estateGroups); (estateGroup = *it) ; ++it)
 		if (estateGroup->id() == groupId)
 			return estateGroup;
 
-	return 0;
+	return nullptr;
 }
 
 TQPtrList<Trade> AtlanticCore::trades()
@@ -272,12 +272,12 @@ Trade *AtlanticCore::newTrade(int tradeId)
 
 Trade *AtlanticCore::findTrade(int tradeId)
 {
-	Trade *trade = 0;
+	Trade *trade = nullptr;
 	for (TQPtrListIterator<Trade> it(m_trades); (trade = *it) ; ++it)
 		if (trade->tradeId() == tradeId)
 			return trade;
 
-	return 0;
+	return nullptr;
 }
 
 void AtlanticCore::removeTrade(Trade *trade)
@@ -324,44 +324,44 @@ void AtlanticCore::removeConfigOption(ConfigOption *configOption)
 
 ConfigOption *AtlanticCore::findConfigOption(int configId)
 {
-	ConfigOption *configOption = 0;
+	ConfigOption *configOption = nullptr;
 	for (TQPtrListIterator<ConfigOption> it(m_configOptions); (configOption = *it) ; ++it)
 		if (configOption->id() == configId)
 			return configOption;
 
-	return 0;
+	return nullptr;
 }
 
 void AtlanticCore::printDebug()
 {
-	Player *player = 0;
+	Player *player = nullptr;
 	for (TQPtrListIterator<Player> it(m_players); (player = *it) ; ++it)
 		if (player == m_playerSelf)
 			std::cout << "PS: " << player->name().latin1() << ", game " << TQString::number(player->game() ? player->game()->id() : -1).latin1() << std::endl;
 		else
 			std::cout << " P: " << player->name().latin1() << ", game " << TQString::number(player->game() ? player->game()->id() : -1).latin1() << std::endl;
 
-	Game *game = 0;
+	Game *game = nullptr;
 	for (TQPtrListIterator<Game> it(m_games); (game = *it) ; ++it)
 		std::cout << " G: " << TQString::number(game->id()).latin1() << ", master: " << TQString::number(game->master() ? game->master()->id() : -1 ).latin1() << std::endl;
 
-	Estate *estate = 0;
+	Estate *estate = nullptr;
 	for (TQPtrListIterator<Estate> it(m_estates); (estate = *it) ; ++it)
 		std::cout << " E: " << estate->name().latin1() << std::endl;
 
-	EstateGroup *estateGroup = 0;
+	EstateGroup *estateGroup = nullptr;
 	for (TQPtrListIterator<EstateGroup> it(m_estateGroups); (estateGroup = *it) ; ++it)
 		std::cout << "EG: " << estateGroup->name().latin1() << std::endl;
 
-	Auction *auction = 0;
+	Auction *auction = nullptr;
 	for (TQPtrListIterator<Auction> it(m_auctions); (auction = *it) ; ++it)
 		std::cout << " A: " << TQString::number(auction->auctionId()).latin1() << std::endl;
 
-	Trade *trade = 0;
+	Trade *trade = nullptr;
 	for (TQPtrListIterator<Trade> it(m_trades); (trade = *it) ; ++it)
 		std::cout << " T: " << TQString::number(trade->tradeId()).latin1() << std::endl;
 
-	ConfigOption *configOption = 0;
+	ConfigOption *configOption = nullptr;
 	for (TQPtrListIterator<ConfigOption> it(m_configOptions); (configOption = *it) ; ++it)
 		std::cout << "CO:" << TQString::number(configOption->id()).latin1() << " " << configOption->name().latin1() << " " << configOption->value().latin1() << std::endl;
 }
diff --git a/atlantik/libatlantic/estate.cpp b/atlantik/libatlantic/estate.cpp
index ec86c6ff..b25e6d72 100644
--- a/atlantik/libatlantic/estate.cpp
+++ b/atlantik/libatlantic/estate.cpp
@@ -24,11 +24,11 @@ Estate::Estate(int estateId) : TQObject()
 {
 	m_id = estateId;
 	m_name = TQString();
-	m_owner = 0;
+	m_owner = nullptr;
 	m_houses = 0;
 	m_price = 0;
 	m_money = 0;
-	m_estateGroup = 0;
+	m_estateGroup = nullptr;
 	m_changed = m_canBeOwned = m_canBuyHouses = m_canSellHouses = m_isMortgaged = m_canToggleMortgage = false;
 	m_bgColor = TQColor();
 	m_color = TQColor();
diff --git a/atlantik/libatlantic/game.cpp b/atlantik/libatlantic/game.cpp
index 8a310e16..44450c9c 100644
--- a/atlantik/libatlantic/game.cpp
+++ b/atlantik/libatlantic/game.cpp
@@ -24,7 +24,7 @@ Game::Game(int gameId) : TQObject()
 	m_description = TQString();
 	m_type = TQString();
 	m_players = 0;
-	m_master = 0;
+	m_master = nullptr;
 
 	m_changed = false;
 }
diff --git a/atlantik/libatlantic/player.cpp b/atlantik/libatlantic/player.cpp
index e944e970..03affdb9 100644
--- a/atlantik/libatlantic/player.cpp
+++ b/atlantik/libatlantic/player.cpp
@@ -21,11 +21,11 @@
 Player::Player(int playerId) : TQObject()
 {
 	m_id = playerId;
-	m_game = 0;
+	m_game = nullptr;
 	m_name = "";
 	m_host = "";
 	m_image = "";
-	m_location = m_destination = 0;
+	m_location = m_destination = nullptr;
 	m_money = 0;
 	m_changed = m_isSelf = false;
 	m_bankrupt = m_hasDebt = m_hasTurn = m_canRoll = m_canBuy = m_canAuction = m_canUseCard = m_inJail = false;
diff --git a/atlantik/libatlantic/trade.cpp b/atlantik/libatlantic/trade.cpp
index edba1e52..a971d404 100644
--- a/atlantik/libatlantic/trade.cpp
+++ b/atlantik/libatlantic/trade.cpp
@@ -57,7 +57,7 @@ unsigned int Trade::count( bool acceptOnly )
 
 void Trade::updateEstate(Estate *estate, Player *to)
 {
-	TradeEstate *t=0;
+	TradeEstate *t=nullptr;
 	
 	for (TQPtrListIterator<TradeItem> i(mTradeItems); *i; ++i)
 	{
@@ -69,7 +69,7 @@ void Trade::updateEstate(Estate *estate, Player *to)
 		if (t->estate()==estate)
 			break;
 		
-		t=0;
+		t=nullptr;
 	}
 	if (t)
 	{
@@ -98,7 +98,7 @@ void Trade::updateEstate(Estate *estate, Player *to)
 
 void Trade::updateMoney(unsigned int money, Player *from, Player *to)
 {
-	TradeMoney *t=0;
+	TradeMoney *t=nullptr;
 	
 	for (TQPtrListIterator<TradeItem> i(mTradeItems); *i; ++i)
 	{
@@ -110,7 +110,7 @@ void Trade::updateMoney(unsigned int money, Player *from, Player *to)
 		if (t->from() == from && t->to() == to && t->money())
 			break;
 		
-		t=0;
+		t=nullptr;
 	}
 	if (t)
 	{
diff --git a/atlantik/libatlantikclient/atlantik_network.cpp b/atlantik/libatlantikclient/atlantik_network.cpp
index ed5505f2..93ceea86 100644
--- a/atlantik/libatlantikclient/atlantik_network.cpp
+++ b/atlantik/libatlantikclient/atlantik_network.cpp
@@ -35,7 +35,7 @@
 
 #include "atlantik_network.h"
 
-AtlantikNetwork::AtlantikNetwork(AtlanticCore *atlanticCore) : KExtendedSocket(0, 0, KExtendedSocket::inputBufferedSocket)
+AtlantikNetwork::AtlantikNetwork(AtlanticCore *atlanticCore) : KExtendedSocket(nullptr, 0, KExtendedSocket::inputBufferedSocket)
 {
 	m_atlanticCore = atlanticCore;
 	m_textStream = new TQTextStream(this);
@@ -382,7 +382,7 @@ void AtlantikNetwork::processNode(TQDomNode n)
 						kdDebug() << "gameupdate for " << TQString::number(gameId) << endl;
 
 
-					Game *game = 0;
+					Game *game = nullptr;
 					if (gameId == -1)
 					{
 						a = e.attributeNode(TQString("gametype"));
@@ -471,7 +471,7 @@ void AtlantikNetwork::processNode(TQDomNode n)
 					{
 						int gameId = a.value().toInt();
 						if (gameId == -1)
-							player->setGame( 0 );
+							player->setGame( nullptr );
 						else
 						{
 							// Ensure setGame succeeds by creating game if necessary
@@ -571,7 +571,7 @@ void AtlantikNetwork::processNode(TQDomNode n)
 				{
 					int groupId = a.value().toInt();
 
-					EstateGroup *estateGroup = 0;
+					EstateGroup *estateGroup = nullptr;
 					bool b_newEstateGroup = false;
 					
 					if (!(estateGroup = m_atlanticCore->findEstateGroup(groupId)))
@@ -604,7 +604,7 @@ void AtlantikNetwork::processNode(TQDomNode n)
 				{
 					estateId = a.value().toInt();
 					
-					Estate *estate = 0;
+					Estate *estate = nullptr;
 					bool b_newEstate = false;
 
 					// FIXME: allow any estateId, GUI should not use it to determin its geometry
@@ -620,7 +620,7 @@ void AtlantikNetwork::processNode(TQDomNode n)
 						TQObject::connect(estate, TQ_SIGNAL(newTrade(Player *)), this, TQ_SLOT(newTrade(Player *)));
 
 						// Players without estate should get one
-						Player *player = 0;
+						Player *player = nullptr;
 						TQPtrList<Player> playerList = m_atlanticCore->players();
 						for (TQPtrListIterator<Player> it(playerList); (player = *it) ; ++it)
 							if (m_playerLocationMap[player] == estate->id())
@@ -762,7 +762,7 @@ void AtlantikNetwork::processNode(TQDomNode n)
 					else if (type=="completed" && trade)
 					{
 						m_atlanticCore->removeTrade(trade);
-						trade = 0;
+						trade = nullptr;
 					}
 					else if (type=="rejected")
 					{
@@ -772,7 +772,7 @@ void AtlantikNetwork::processNode(TQDomNode n)
 						if ( player && player == m_atlanticCore->playerSelf() )
 						{
 							m_atlanticCore->removeTrade(trade);
-							trade = 0;
+							trade = nullptr;
 						}
 					}
 					else
@@ -815,7 +815,7 @@ void AtlantikNetwork::processNode(TQDomNode n)
 								}
 								else if (e_child.tagName() == "trademoney")
 								{
-									Player *pFrom = 0, *pTo = 0;
+									Player *pFrom = nullptr, *pTo = nullptr;
 
 									a = e_child.attributeNode(TQString("playerfrom"));
 									if (!a.isNull())
@@ -878,8 +878,8 @@ void AtlantikNetwork::processNode(TQDomNode n)
 						if (status == 3)
 						{
 							m_atlanticCore->delAuction(auction);
-							m_auctions[auctionId] = 0;
-							auction = 0;
+							m_auctions[auctionId] = nullptr;
+							auction = nullptr;
 						}
 					}
 
diff --git a/atlantik/libatlantikclient/atlantik_network.h b/atlantik/libatlantikclient/atlantik_network.h
index 20992b3c..4ac5bbd1 100644
--- a/atlantik/libatlantikclient/atlantik_network.h
+++ b/atlantik/libatlantikclient/atlantik_network.h
@@ -105,7 +105,7 @@ signals:
 	void msgStatus(const TQString &data, const TQString &icon = TQString());
 	void networkEvent(const TQString &data, const TQString &icon);
 
-	void displayDetails(TQString text, bool clearText, bool clearButtons, Estate *estate = 0);
+	void displayDetails(TQString text, bool clearText, bool clearButtons, Estate *estate = nullptr);
 	void addCommandButton(TQString command, TQString caption, bool enabled);
 	void addCloseButton();
 
diff --git a/atlantik/libatlantikui/auction_widget.h b/atlantik/libatlantikui/auction_widget.h
index 07251f4f..7e5b6d66 100644
--- a/atlantik/libatlantikui/auction_widget.h
+++ b/atlantik/libatlantikui/auction_widget.h
@@ -39,7 +39,7 @@ TQ_OBJECT
   
 
 public:
-	AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, TQWidget *parent, const char *name=0);
+	AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, TQWidget *parent, const char *name=nullptr);
 
 private slots:
 	void auctionChanged();
diff --git a/atlantik/libatlantikui/board.cpp b/atlantik/libatlantikui/board.cpp
index 0177f6be..3b01f349 100644
--- a/atlantik/libatlantikui/board.cpp
+++ b/atlantik/libatlantikui/board.cpp
@@ -41,14 +41,14 @@ AtlantikBoard::AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, Display
 	m_maxEstates = maxEstates;
 	m_mode = mode;
 	m_animateTokens = false;
-	m_lastServerDisplay = 0;
+	m_lastServerDisplay = nullptr;
 
 	setMinimumSize(TQSize(500, 500));
 
 	int sideLen = maxEstates/4;
 
 	// Animated token movement
-	m_movingToken = 0;
+	m_movingToken = nullptr;
 	m_timer = new TQTimer(this);
 	connect(m_timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotMoveToken()));
 	m_resumeTimer = false;
@@ -90,8 +90,8 @@ void AtlantikBoard::reset()
 	m_tokens.clear();
 	m_estateViews.clear();
 	m_displayQueue.clear();
-	m_lastServerDisplay = 0;
-	m_movingToken = 0;
+	m_lastServerDisplay = nullptr;
+	m_movingToken = nullptr;
 }
 
 void AtlantikBoard::setViewProperties(bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects, bool animateTokens)
@@ -120,7 +120,7 @@ EstateView *AtlantikBoard::findEstateView(Estate *estate)
 		if (estateView && estateView->estate() == estate)
 			return estateView;
 	}
-	return 0;
+	return nullptr;
 }
 
 void AtlantikBoard::addEstateView(Estate *estate, bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects)
@@ -166,7 +166,7 @@ void AtlantikBoard::addEstateView(Estate *estate, bool indicateUnowned, bool hig
 
 	if (m_atlanticCore)
 	{
-		Player *player = 0;
+		Player *player = nullptr;
 		TQPtrList<Player> playerList = m_atlanticCore->players();
 		for (TQPtrListIterator<Player> it(playerList); (player = *it) ; ++it)
 			if (player->location() == estate)
@@ -186,11 +186,11 @@ void AtlantikBoard::addAuctionWidget(Auction *auction)
 
 Token *AtlantikBoard::findToken(Player *player)
 {
-	Token *token = 0;
+	Token *token = nullptr;
 	for (TQPtrListIterator<Token> it(m_tokens); (token = *it) ; ++it)
 		if (token->player() == player)
 			return token;
-	return 0;
+	return nullptr;
 }
 
 void AtlantikBoard::addToken(Player *player)
@@ -201,7 +201,7 @@ void AtlantikBoard::addToken(Player *player)
 		return;
 	}
 
-	Player *playerSelf = 0;
+	Player *playerSelf = nullptr;
 	if (m_atlanticCore)
 		playerSelf = m_atlanticCore->playerSelf();
 
@@ -227,7 +227,7 @@ void AtlantikBoard::playerChanged(Player *player)
 {
 	kdDebug() << "playerChanged: playerLoc " << (player->location() ? player->location()->name() : "none") << endl;
 
-	Player *playerSelf = 0;
+	Player *playerSelf = nullptr;
 	if (m_atlanticCore)
 		playerSelf = m_atlanticCore->playerSelf();
 
@@ -292,7 +292,7 @@ void AtlantikBoard::removeToken(Player *player)
 	if (token == m_movingToken)
 	{
 		m_timer->stop();
-		m_movingToken = 0;
+		m_movingToken = nullptr;
 	}
 
 	m_tokens.remove(token);
@@ -312,7 +312,7 @@ void AtlantikBoard::jumpToken(Token *token)
 	if (player)
 	{
 		player->setLocation(token->location());
-		player->setDestination(0);
+		player->setDestination(nullptr);
 
 		if (token->isHidden() && !player->isBankrupt())
 			token->show();
@@ -323,7 +323,7 @@ void AtlantikBoard::jumpToken(Token *token)
 		m_timer->stop();
 
 		if (!m_resumeTimer)
-			m_movingToken = 0;
+			m_movingToken = nullptr;
 	}
 
 	emit tokenConfirmation(token->location());
@@ -434,18 +434,18 @@ void AtlantikBoard::slotMoveToken()
 	// We have arrived at our _final_ destination!
 	if (eDest == m_movingToken->destination())
 	{
-		m_movingToken->setDestination(0);
-		m_movingToken->player()->setDestination(0);
+		m_movingToken->setDestination(nullptr);
+		m_movingToken->player()->setDestination(nullptr);
 
 		m_timer->stop();
-		m_movingToken = 0;
+		m_movingToken = nullptr;
 	}
 }
 
 void AtlantikBoard::resizeEvent(TQResizeEvent *)
 {
 	// Stop moving tokens, slotResizeAftermath will re-enable this
-	if (m_timer!=0 && m_timer->isActive())
+	if (m_timer && m_timer->isActive())
 	{
 		m_timer->stop();
 		m_resumeTimer=true;
@@ -476,12 +476,12 @@ void AtlantikBoard::slotResizeAftermath()
 	// _after_ resizeEvent has returned to make sure we have the correct
 	// adjusted estate geometries.
 
-	Token *token = 0;
+	Token *token = nullptr;
 	for (TQPtrListIterator<Token> it(m_tokens); (token = *it) ; ++it)
 		jumpToken(token);
 
 	// Restart the timer that was stopped in resizeEvent
-	if (m_resumeTimer && m_timer!=0 && !m_timer->isActive())
+	if (m_resumeTimer && m_timer && !m_timer->isActive())
 	{
 		m_timer->start(15);
 		m_resumeTimer=false;
@@ -497,11 +497,11 @@ void AtlantikBoard::displayDefault()
 		break;
 	case 1:
 		if (EstateDetails *display = dynamic_cast<EstateDetails*>(m_lastServerDisplay))
-			display->setEstate(0);
+			display->setEstate(nullptr);
 		break;
 	default:
 		if (m_displayQueue.getFirst() == m_lastServerDisplay)
-			m_lastServerDisplay = 0;
+			m_lastServerDisplay = nullptr;
 		m_displayQueue.removeFirst();
 		break;
 	}
@@ -516,14 +516,14 @@ void AtlantikBoard::displayButton(TQString command, TQString caption, bool enabl
 
 void AtlantikBoard::addCloseButton()
 {
-	EstateDetails *eDetails = 0;
+	EstateDetails *eDetails = nullptr;
 	if ((eDetails = dynamic_cast<EstateDetails*>(m_lastServerDisplay)) && eDetails != m_displayQueue.getLast())
 		eDetails->addCloseButton();
 }
 
 void AtlantikBoard::insertDetails(TQString text, bool clearText, bool clearButtons, Estate *estate)
 {
-	EstateDetails *eDetails = 0;
+	EstateDetails *eDetails = nullptr;
 
 	if ((eDetails = dynamic_cast<EstateDetails*>(m_lastServerDisplay)))
 	{
@@ -556,7 +556,7 @@ void AtlantikBoard::prependEstateDetails(Estate *estate)
 	if (!estate)
 		return;
 
-	EstateDetails *eDetails = 0;
+	EstateDetails *eDetails = nullptr;
 
 	if (m_displayQueue.getFirst() == m_lastServerDisplay)
 	{
diff --git a/atlantik/libatlantikui/board.h b/atlantik/libatlantikui/board.h
index 7af0ecc4..f42c9d52 100644
--- a/atlantik/libatlantikui/board.h
+++ b/atlantik/libatlantikui/board.h
@@ -40,7 +40,7 @@ TQ_OBJECT
 public:
 	enum DisplayMode { Play, Edit };
 
-	AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, DisplayMode mode, TQWidget *parent, const char *name=0);
+	AtlantikBoard(AtlanticCore *atlanticCore, int maxEstates, DisplayMode mode, TQWidget *parent, const char *name=nullptr);
 	~AtlantikBoard();
 	void reset();
 
@@ -65,7 +65,7 @@ private slots:
 	void playerChanged(Player *player);
 	void displayButton(TQString command, TQString caption, bool enabled);
 	void prependEstateDetails(Estate *);
-	void insertDetails(TQString text, bool clearText, bool clearButtons, Estate *estate = 0);
+	void insertDetails(TQString text, bool clearText, bool clearButtons, Estate *estate = nullptr);
 	void addCloseButton();
 
 signals:
@@ -79,7 +79,7 @@ private:
 	Token *findToken(Player *player);
 	void jumpToken(Token *token);
 	void moveToken(Token *token);
-	TQPoint calculateTokenDestination(Token *token, Estate *estate = 0);
+	TQPoint calculateTokenDestination(Token *token, Estate *estate = nullptr);
 
 	void updateCenter();
 
diff --git a/atlantik/libatlantikui/estatedetails.cpp b/atlantik/libatlantikui/estatedetails.cpp
index 8a43d6a3..9913a966 100644
--- a/atlantik/libatlantikui/estatedetails.cpp
+++ b/atlantik/libatlantikui/estatedetails.cpp
@@ -41,14 +41,14 @@
 
 EstateDetails::EstateDetails(Estate *estate, TQString text, TQWidget *parent, const char *name) : TQWidget(parent, name)
 {
-	m_pixmap = 0;
-	m_quartzBlocks = 0;
+	m_pixmap = nullptr;
+	m_quartzBlocks = nullptr;
 	b_recreate = true;
 	m_recreateQuartz = true;
 
-	m_estate = 0;
+	m_estate = nullptr;
 
-	m_closeButton = 0;
+	m_closeButton = nullptr;
 	m_buttons.setAutoDelete(true);
 
 	m_mainLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
@@ -86,7 +86,7 @@ void EstateDetails::paintEvent(TQPaintEvent *)
 		if (m_quartzBlocks)
 		{
 			delete m_quartzBlocks;
-			m_quartzBlocks = 0;
+			m_quartzBlocks = nullptr;
 		}
 
 		if (m_estate->color().isValid())
@@ -212,7 +212,7 @@ void EstateDetails::addDetails()
 {
 	if (m_estate)
 	{
-		TQListViewItem *infoText = 0;
+		TQListViewItem *infoText = nullptr;
 
 		// Price
 		if (m_estate->price())
@@ -311,7 +311,7 @@ void EstateDetails::clearButtons()
 	if (m_closeButton)
 	{
 		delete m_closeButton;
-		m_closeButton = 0;
+		m_closeButton = nullptr;
 	}
 
 	// Delete buttons
diff --git a/atlantik/libatlantikui/estatedetails.h b/atlantik/libatlantikui/estatedetails.h
index b0cb0034..3bab047c 100644
--- a/atlantik/libatlantikui/estatedetails.h
+++ b/atlantik/libatlantikui/estatedetails.h
@@ -38,7 +38,7 @@ class EstateDetails : public TQWidget
   
 
 public:
-	EstateDetails(Estate *estate, TQString text, TQWidget *parent, const char *name = 0);
+	EstateDetails(Estate *estate, TQString text, TQWidget *parent, const char *name = nullptr);
 	~EstateDetails();
 	Estate *estate() { return m_estate; }
 
diff --git a/atlantik/libatlantikui/estateview.cpp b/atlantik/libatlantikui/estateview.cpp
index 9145ca3c..e29ab8b5 100644
--- a/atlantik/libatlantikui/estateview.cpp
+++ b/atlantik/libatlantikui/estateview.cpp
@@ -47,13 +47,13 @@ EstateView::EstateView(Estate *estate, EstateOrientation orientation, const TQSt
 
 	setBackgroundMode(NoBackground); // avoid flickering
 
-	qpixmap = 0;
+	qpixmap = nullptr;
 	b_recreate = true;
 
-	m_quartzBlocks = 0;	
+	m_quartzBlocks = nullptr;	
 	m_recreateQuartz = true;
 
-	pe = 0;
+	pe = nullptr;
 	updatePE();
 
 	icon = new TQPixmap(locate("data", "atlantik/pics/" + _icon));
@@ -124,8 +124,8 @@ void EstateView::setViewProperties(bool indicateUnowned, bool highliteUnowned, b
 
 TQPixmap *EstateView::rotatePixmap(TQPixmap *p)
 {
-	if (p==0 || p->isNull())
-		return 0;
+	if (!p || p->isNull())
+		return nullptr;
 
 	TQWMatrix m;
 
@@ -148,8 +148,8 @@ TQPixmap *EstateView::rotatePixmap(TQPixmap *p)
 
 KPixmap *EstateView::rotatePixmap(KPixmap *p)
 {
-	if (p==0 || p->isNull())
-		return 0;
+	if (!p || p->isNull())
+		return nullptr;
 
 	TQWMatrix m;
 
@@ -177,15 +177,15 @@ void EstateView::updatePE()
 	if (m_estate->isOwned() || !m_estate->canBeOwned() || m_indicateUnowned==false)
 	{
 		delete pe;
-		pe = 0;
+		pe = nullptr;
 	}
 	else
 	{
-		if (pe==0)
+		if (!pe)
 		{
 			// Display a coloured portfolioestate to indicate property is
 			// for sale
-			pe = new PortfolioEstate(m_estate, 0, true, this, "board-portfolioestate");
+			pe = new PortfolioEstate(m_estate, nullptr, true, this, "board-portfolioestate");
 			repositionPortfolioEstate();
 
 			pe->show();
@@ -208,7 +208,7 @@ void EstateView::estateChanged()
 
 void EstateView::repositionPortfolioEstate()
 {
-	if (pe!=0)
+	if (pe)
 	{
 		int x = (m_orientation == West ? (width()-2 - pe->width()) : 2);
 		int y = (m_orientation == North ? (height()-2 - pe->height()) : 2);
@@ -226,7 +226,7 @@ void EstateView::paintEvent(TQPaintEvent *)
 		if (m_quartzBlocks)
 		{
 			delete m_quartzBlocks;
-			m_quartzBlocks = 0;
+			m_quartzBlocks = nullptr;
 		}
 
 		if (m_estate->color().isValid())
@@ -268,7 +268,7 @@ void EstateView::paintEvent(TQPaintEvent *)
 		painter.drawRect(rect());
         
 		// Paint icon only when it exists and fits
-		if (icon!=0 && width() > icon->width() && height() > icon->height())
+		if (icon && width() > icon->width() && height() > icon->height())
 			painter.drawPixmap( (width() - icon->width())/2, (height() - icon->height())/2, *icon);
 
 		if (m_estate->color().isValid())
@@ -520,7 +520,7 @@ void EstateView::drawQuartzBlocks(KPixmap *pi, KPixmap &p, const TQColor &c1, co
 {
 	TQPainter px;
 
-	if (pi==0 || pi->isNull())
+	if (!pi || pi->isNull())
 		return;
 
 	px.begin(pi);
diff --git a/atlantik/libatlantikui/estateview.h b/atlantik/libatlantikui/estateview.h
index 8fd94bfb..9629eb3d 100644
--- a/atlantik/libatlantikui/estateview.h
+++ b/atlantik/libatlantikui/estateview.h
@@ -35,7 +35,7 @@ TQ_OBJECT
   
 
 	public:
-		EstateView(Estate *estate, EstateOrientation orientation, const TQString &, bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects, TQWidget *parent, const char *name = 0);
+		EstateView(Estate *estate, EstateOrientation orientation, const TQString &, bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects, TQWidget *parent, const char *name = nullptr);
 		void setViewProperties(bool indicateUnowned, bool highliteUnowned, bool darkenMortgaged, bool quartzEffects);
 		Estate *estate() { return m_estate; }
 		void updatePE();
diff --git a/atlantik/libatlantikui/portfolioestate.h b/atlantik/libatlantikui/portfolioestate.h
index 854f5159..cee99fe0 100644
--- a/atlantik/libatlantikui/portfolioestate.h
+++ b/atlantik/libatlantikui/portfolioestate.h
@@ -32,9 +32,9 @@ TQ_OBJECT
   
 
 public:
-	PortfolioEstate(Estate *estate, Player *player, bool alwaysOwned, TQWidget *parent, const char *name = 0);
+	PortfolioEstate(Estate *estate, Player *player, bool alwaysOwned, TQWidget *parent, const char *name = nullptr);
 	Estate *estate() { return m_estate; }
-	static TQPixmap drawPixmap(Estate *estate, Player *player = 0, bool alwaysOwned = true);
+	static TQPixmap drawPixmap(Estate *estate, Player *player = nullptr, bool alwaysOwned = true);
 
 protected:
 	void paintEvent(TQPaintEvent *);
diff --git a/atlantik/libatlantikui/portfolioview.cpp b/atlantik/libatlantikui/portfolioview.cpp
index fd26771a..7141570b 100644
--- a/atlantik/libatlantikui/portfolioview.cpp
+++ b/atlantik/libatlantikui/portfolioview.cpp
@@ -46,9 +46,9 @@ PortfolioView::PortfolioView(AtlanticCore *core, Player *player, TQColor activeC
 	m_player = player;
 	m_activeColor = activeColor;
 	m_inactiveColor = inactiveColor;
-	m_lastPE = 0;
+	m_lastPE = nullptr;
 
-	qpixmap = 0;
+	qpixmap = nullptr;
 	b_recreate = true;
 
 	m_portfolioEstates.setAutoDelete(true);
@@ -56,7 +56,7 @@ PortfolioView::PortfolioView(AtlanticCore *core, Player *player, TQColor activeC
 	setMinimumHeight(ICONSIZE);
 
 	// Init icon
-	m_image = 0;
+	m_image = nullptr;
 	m_imageName = "hamburger.png";
 	loadIcon();
 }
@@ -80,7 +80,7 @@ void PortfolioView::buildPortfolio()
 
 	// Loop through estate groups in order
 	TQPtrList<EstateGroup> estateGroups = m_atlanticCore->estateGroups();
-	PortfolioEstate *lastPE = 0, *firstPEprevGroup = 0;
+	PortfolioEstate *lastPE = nullptr, *firstPEprevGroup = nullptr;
 
 	int x = 100, y = 25, marginHint = 5, bottom;
 	bottom = ICONSIZE - PE_HEIGHT - marginHint;
@@ -91,7 +91,7 @@ void PortfolioView::buildPortfolio()
 		if ((estateGroup = *it))
 		{
 			// New group
-			lastPE = 0;
+			lastPE = nullptr;
 
 			// Loop through estates
 			TQPtrList<Estate> estates = m_atlanticCore->estates();
@@ -155,7 +155,7 @@ void PortfolioView::loadIcon()
 	m_imageName = m_player->image();
 
 	delete m_image;
-	m_image = 0;
+	m_image = nullptr;
 
 	if (!m_imageName.isEmpty())
 	{
diff --git a/atlantik/libatlantikui/portfolioview.h b/atlantik/libatlantikui/portfolioview.h
index 1a5279e4..091e427a 100644
--- a/atlantik/libatlantikui/portfolioview.h
+++ b/atlantik/libatlantikui/portfolioview.h
@@ -36,7 +36,7 @@ TQ_OBJECT
   
 
 public:
-	PortfolioView(AtlanticCore *core, Player *_player, TQColor activeColor, TQColor inactiveColor, TQWidget *parent, const char *name = 0);
+	PortfolioView(AtlanticCore *core, Player *_player, TQColor activeColor, TQColor inactiveColor, TQWidget *parent, const char *name = nullptr);
 	~PortfolioView();
 
 	void buildPortfolio();
diff --git a/atlantik/libatlantikui/token.cpp b/atlantik/libatlantikui/token.cpp
index 38b8ad4e..67789394 100644
--- a/atlantik/libatlantikui/token.cpp
+++ b/atlantik/libatlantikui/token.cpp
@@ -44,13 +44,13 @@ Token::Token(Player *player, AtlantikBoard *parent, const char *name) : TQWidget
 
 	m_inJail = m_player->inJail();
 	m_location = m_player->location();
-	m_destination = 0;
+	m_destination = nullptr;
 
-	qpixmap = 0;
+	qpixmap = nullptr;
 	b_recreate = true;
 
 	// Init icon
-	m_image = 0;
+	m_image = nullptr;
 	loadIcon();
 
 	setFixedSize(TQSize(TOKEN_ICONSIZE, TOKEN_ICONSIZE + TDEGlobalSettings::generalFont().pointSize()));
@@ -92,7 +92,7 @@ void Token::loadIcon()
 	m_imageName = m_player->image();
 
 	delete m_image;
-	m_image = 0;
+	m_image = nullptr;
 
 	if (!m_imageName.isEmpty())
 	{
diff --git a/atlantik/libatlantikui/token.h b/atlantik/libatlantikui/token.h
index 128de878..cfffe79b 100644
--- a/atlantik/libatlantikui/token.h
+++ b/atlantik/libatlantikui/token.h
@@ -31,7 +31,7 @@ TQ_OBJECT
   
 
 	public:
-		Token (Player *player, AtlantikBoard *parent, const char *name = 0);
+		Token (Player *player, AtlantikBoard *parent, const char *name = nullptr);
 		~Token();
 		Player *player();
 		void setLocation(Estate *estate);
diff --git a/atlantik/libatlantikui/trade_widget.cpp b/atlantik/libatlantikui/trade_widget.cpp
index 4d11bc05..549cf2cb 100644
--- a/atlantik/libatlantikui/trade_widget.cpp
+++ b/atlantik/libatlantikui/trade_widget.cpp
@@ -161,7 +161,7 @@ TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, TQWidget *p
 	setTypeCombo(m_editTypeCombo->currentItem());
 	setEstateCombo(m_estateCombo->currentItem());
 
-	m_contextTradeItem = 0;
+	m_contextTradeItem = nullptr;
 }
 
 void TradeDisplay::closeEvent(TQCloseEvent *e)
@@ -196,7 +196,7 @@ void TradeDisplay::tradeItemRemoved(TradeItem *t)
 {
 	TDEListViewItem *item = m_componentMap[t];
 	delete item;
-	m_componentMap[t] = 0;
+	m_componentMap[t] = nullptr;
 }
 
 void TradeDisplay::tradeItemChanged(TradeItem *t)
@@ -224,7 +224,7 @@ void TradeDisplay::playerChanged(Player *player)
 	m_playerFromCombo->changeItem(player->name(), m_playerFromRevMap[player]);
 	m_playerTargetCombo->changeItem(player->name(), m_playerTargetRevMap[player]);
 
-	TradeItem *item = 0;
+	TradeItem *item = nullptr;
 	for (TQMap<TDEListViewItem *, TradeItem *>::Iterator it=m_componentRevMap.begin() ; it != m_componentRevMap.end() && (item = *it) ; ++it)
 		tradeItemChanged(item);
 }
@@ -366,9 +366,9 @@ void TradeDisplay::contextMenuClicked(int)
 		return;
 
 	if (TradeEstate *tradeEstate = dynamic_cast<TradeEstate*>(m_contextTradeItem))
-		emit updateEstate(m_trade, tradeEstate->estate(), 0);
+		emit updateEstate(m_trade, tradeEstate->estate(), nullptr);
 	else if (TradeMoney *tradeMoney = dynamic_cast<TradeMoney*>(m_contextTradeItem))
 		emit updateMoney(m_trade, 0, tradeMoney->from(), tradeMoney->to());
 
-	m_contextTradeItem = 0;
+	m_contextTradeItem = nullptr;
 }
diff --git a/atlantik/libatlantikui/trade_widget.h b/atlantik/libatlantikui/trade_widget.h
index e30269fe..d4d2ff03 100644
--- a/atlantik/libatlantikui/trade_widget.h
+++ b/atlantik/libatlantikui/trade_widget.h
@@ -42,7 +42,7 @@ TQ_OBJECT
   
 
 public:
-	TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, TQWidget *parent=0, const char *name = 0);
+	TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, TQWidget *parent=nullptr, const char *name = nullptr);
 
 	Trade *trade() { return mTrade; }
 
diff --git a/kasteroids/toplevel.cpp b/kasteroids/toplevel.cpp
index 9a6e956c..0bc91347 100644
--- a/kasteroids/toplevel.cpp
+++ b/kasteroids/toplevel.cpp
@@ -69,7 +69,7 @@ SLevel levels[MAX_LEVELS] =
 #include <arts/dispatcher.h>
 #include <arts/soundserver.h>
 
-Arts::SimpleSoundServer *soundServer = 0;
+Arts::SimpleSoundServer *soundServer = nullptr;
 #endif
 
 
diff --git a/kasteroids/view.cpp b/kasteroids/view.cpp
index dda74dba..28ef2208 100644
--- a/kasteroids/view.cpp
+++ b/kasteroids/view.cpp
@@ -84,7 +84,7 @@ KAsteroidsView::KAsteroidsView( TQWidget *parent, const char *name )
     TQFont font( TDEGlobalSettings::generalFont().family(), 18 );
     textSprite->setFont( font );
 
-    shield = 0;
+    shield = nullptr;
     shieldOn = false;
     refreshRate = REFRESH_DELAY;
 
@@ -400,7 +400,7 @@ void KAsteroidsView::wrapSprite( TQCanvasItem *s )
 
 void KAsteroidsView::rockHit( TQCanvasItem *hit )
 {
-    KPowerup *nPup = 0;
+    KPowerup *nPup = nullptr;
     int rnd = static_cast<int>(krandom.getDouble()*30.0) % 30;
     switch( rnd )
     {
diff --git a/kasteroids/view.h b/kasteroids/view.h
index 9fbbf347..7417d958 100644
--- a/kasteroids/view.h
+++ b/kasteroids/view.h
@@ -22,7 +22,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/katomic/feld.h b/katomic/feld.h
index 3af0aa6c..7ded67af 100644
--- a/katomic/feld.h
+++ b/katomic/feld.h
@@ -33,7 +33,7 @@ class Feld : public TQWidget
   
 
 public:
-    Feld (TQWidget *parent=0, const char *name=0);
+    Feld (TQWidget *parent=nullptr, const char *name=nullptr);
     ~Feld ();
 
     enum Direction { None      = 0,
diff --git a/katomic/gamewidget.h b/katomic/gamewidget.h
index 039f433d..2413b663 100644
--- a/katomic/gamewidget.h
+++ b/katomic/gamewidget.h
@@ -17,7 +17,7 @@ class GameWidget : public TQWidget
 
  public:
 
-    GameWidget ( TQWidget *parent, const char *name=0 );
+    GameWidget ( TQWidget *parent, const char *name=nullptr );
 
     ~GameWidget();
 
diff --git a/katomic/main.cpp b/katomic/main.cpp
index 9d63150d..d3a070a7 100644
--- a/katomic/main.cpp
+++ b/katomic/main.cpp
@@ -42,9 +42,9 @@ int main(int argc, char **argv)
   TDEAboutData aboutData( "katomic", I18N_NOOP("KAtomic"),
     version, description, TDEAboutData::License_GPL,
     "(c) 1998, Andreas Wuest");
-  aboutData.addAuthor("Andreas Wuest", 0, "AndreasWuest@gmx.de");
-  aboutData.addAuthor("Stephan Kulow", 0, "coolo@kde.org");
-  aboutData.addAuthor("Cristian Tibirna", 0, "tibirna@kde.org");
+  aboutData.addAuthor("Andreas Wuest", nullptr, "AndreasWuest@gmx.de");
+  aboutData.addAuthor("Stephan Kulow", nullptr, "coolo@kde.org");
+  aboutData.addAuthor("Cristian Tibirna", nullptr, "tibirna@kde.org");
   aboutData.addCredit("Carsten Pfeiffer");
   aboutData.addCredit("Dave Corrie");
   aboutData.addCredit("Kai Jung", I18N_NOOP("6 new levels"), "jung@fh-fresenius.de");
diff --git a/katomic/molek.h b/katomic/molek.h
index 14386e08..d5de6118 100644
--- a/katomic/molek.h
+++ b/katomic/molek.h
@@ -26,7 +26,7 @@ class Molek : public TQWidget
   
 
 public:
-    Molek (TQWidget *parent=0, const char *name=0);
+    Molek (TQWidget *parent=nullptr, const char *name=nullptr);
    ~Molek ();
 
    void load(const TDESimpleConfig& config);
diff --git a/kbackgammon/engines/fibs/kbgfibs.cpp b/kbackgammon/engines/fibs/kbgfibs.cpp
index 47154022..09d007de 100644
--- a/kbackgammon/engines/fibs/kbgfibs.cpp
+++ b/kbackgammon/engines/fibs/kbgfibs.cpp
@@ -851,7 +851,7 @@ void KBgEngineFIBS::fibsRequestInvitation(const TQString &player)
 void KBgEngineFIBS::invitationDone()
 {
 	delete invitationDlg;
-	invitationDlg = 0;
+	invitationDlg = nullptr;
 }
 
 
@@ -2110,7 +2110,7 @@ KBgEngineFIBS::KBgEngineFIBS(TQWidget *parent, TQString *name, TQPopupMenu *pmen
 	/*
 	 * No invitation dialog
 	 */
-	invitationDlg = 0;
+	invitationDlg = nullptr;
 
 	connect(this, TQ_SIGNAL(fibsWhoInfo(const TQString &)), this, TQ_SLOT(changeJoin(const TQString &)));
 	connect(this, TQ_SIGNAL(fibsLogout (const TQString &)), this, TQ_SLOT(cancelJoin(const TQString &)));
@@ -2119,7 +2119,7 @@ KBgEngineFIBS::KBgEngineFIBS(TQWidget *parent, TQString *name, TQPopupMenu *pmen
 	/*
 	 * Creating, initializing and connecting the player list
 	 */
-	playerlist = new KFibsPlayerList(0, "fibs player list");
+	playerlist = new KFibsPlayerList(nullptr, "fibs player list");
 
 	connect(this, TQ_SIGNAL(fibsWhoInfo(const TQString &)), playerlist, TQ_SLOT(changePlayer(const TQString &)));
 	connect(this, TQ_SIGNAL(fibsLogout (const TQString &)), playerlist, TQ_SLOT(deletePlayer(const TQString &)));
@@ -2133,7 +2133,7 @@ KBgEngineFIBS::KBgEngineFIBS(TQWidget *parent, TQString *name, TQPopupMenu *pmen
 	/*
 	 * Create, initialize and connect the chat window
 	 */
-	chatWindow = new KBgChat(0, "chat window");
+	chatWindow = new KBgChat(nullptr, "chat window");
 
 	connect(this, TQ_SIGNAL(chatMessage(const TQString &)), chatWindow, TQ_SLOT(handleData(const TQString &)));
 	connect(this, TQ_SIGNAL(fibsStartNewGame(const TQString &)), chatWindow, TQ_SLOT(startGame(const TQString &)));
@@ -2189,7 +2189,7 @@ KBgEngineFIBS::KBgEngineFIBS(TQWidget *parent, TQString *name, TQPopupMenu *pmen
 	optsMenuID = menu->insertItem(i18n("&Options"), optsMenu); {
 
 		for (int i = 0; i < NumFIBSOpt; i++)
-			fibsOpt[i] = 0;
+			fibsOpt[i] = nullptr;
 
 		fibsOpt[OptReady]   = new TDEToggleAction(i18n("Ready to Play"),
 							0, this, TQ_SLOT(toggle_ready()),   this);
diff --git a/kbackgammon/engines/fibs/kbgfibs.h b/kbackgammon/engines/fibs/kbgfibs.h
index 76b388fd..f8f3cae0 100644
--- a/kbackgammon/engines/fibs/kbgfibs.h
+++ b/kbackgammon/engines/fibs/kbgfibs.h
@@ -66,7 +66,7 @@ public:
 	/**
 	 * Constructor
 	 */
-	KBgEngineFIBS(TQWidget *parent = 0, TQString *name = 0, TQPopupMenu *pmenu = 0);
+	KBgEngineFIBS(TQWidget *parent = nullptr, TQString *name = nullptr, TQPopupMenu *pmenu = nullptr);
 
 	/**
 	 * Destructor
diff --git a/kbackgammon/engines/fibs/kbgfibschat.cpp b/kbackgammon/engines/fibs/kbgfibschat.cpp
index 7a8954c6..c240892e 100644
--- a/kbackgammon/engines/fibs/kbgfibschat.cpp
+++ b/kbackgammon/engines/fibs/kbgfibschat.cpp
@@ -194,7 +194,7 @@ KBgChat::KBgChat(TQWidget *parent, const char *name)
     TDEActionCollection* actions = new TDEActionCollection(this);
 
     d->mName[0] = TQString();
-    d->mChat = 0;
+    d->mChat = nullptr;
     d->mInvt = new TQPopupMenu();
 
     setAutoAddMessages(false); // we get an echo from FIBS
@@ -667,8 +667,8 @@ void KBgChat::contextMenu(TQListBoxItem *i, const TQPoint &p)
     /*
      * Even if i is non-null, user might still be TQString()
      */
-    d->mName[0] = (i == 0) ? TQString() : ((KLBT *)i)->player();
-    d->mText = (i == 0) ? TQString() : ((KLBT *)i)->text();
+    d->mName[0] = (i == nullptr) ? TQString() : ((KLBT *)i)->player();
+    d->mText = (i == nullptr) ? TQString() : ((KLBT *)i)->text();
 
     /*
      * Get a new context menu every time. Safe to delete the 0
diff --git a/kbackgammon/engines/fibs/kbgfibschat.h b/kbackgammon/engines/fibs/kbgfibschat.h
index b444672d..958fb3b0 100644
--- a/kbackgammon/engines/fibs/kbgfibschat.h
+++ b/kbackgammon/engines/fibs/kbgfibschat.h
@@ -61,7 +61,7 @@ public:
     /**
      * Constructor
      */
-    KBgChat(TQWidget *parent = 0, const char *name = 0);
+    KBgChat(TQWidget *parent = nullptr, const char *name = nullptr);
 
     /**
      * Destructor
diff --git a/kbackgammon/engines/fibs/kbginvite.cpp b/kbackgammon/engines/fibs/kbginvite.cpp
index fd4b35a7..b701ab81 100644
--- a/kbackgammon/engines/fibs/kbginvite.cpp
+++ b/kbackgammon/engines/fibs/kbginvite.cpp
@@ -49,7 +49,7 @@ public:
  * the toolkit.
  */
 KBgInvite::KBgInvite(const char *name)
-    : KDialog(0, name, false)
+    : KDialog(nullptr, name, false)
 {
     setCaption(i18n("Invite Players"));
 
diff --git a/kbackgammon/engines/fibs/kbginvite.h b/kbackgammon/engines/fibs/kbginvite.h
index 220e012a..0aa80cde 100644
--- a/kbackgammon/engines/fibs/kbginvite.h
+++ b/kbackgammon/engines/fibs/kbginvite.h
@@ -52,7 +52,7 @@ public:
     /**
      * Constructor
      */
-    KBgInvite(const char *name = 0);
+    KBgInvite(const char *name = nullptr);
 
     /**
      * Destructor
diff --git a/kbackgammon/engines/fibs/kplayerlist.cpp b/kbackgammon/engines/fibs/kplayerlist.cpp
index c8639a61..f8d7cb9f 100644
--- a/kbackgammon/engines/fibs/kplayerlist.cpp
+++ b/kbackgammon/engines/fibs/kplayerlist.cpp
@@ -809,7 +809,7 @@ void KFibsPlayerList::deletePlayer(const TQString &player)
  */
 void KFibsPlayerList::changePlayerStatus(const TQString &player, int stat, bool flag)
 {
-    TQListViewItem *i = 0;
+    TQListViewItem *i = nullptr;
 
     /*
      * Find the correct line
diff --git a/kbackgammon/engines/fibs/kplayerlist.h b/kbackgammon/engines/fibs/kplayerlist.h
index 85c561aa..cd8b750a 100644
--- a/kbackgammon/engines/fibs/kplayerlist.h
+++ b/kbackgammon/engines/fibs/kplayerlist.h
@@ -63,7 +63,7 @@ public:
     /**
      * Constructor
      */
-    KFibsPlayerList(TQWidget *parent = 0, const char *name = 0);
+    KFibsPlayerList(TQWidget *parent = nullptr, const char *name = nullptr);
 
     /**
      * Destructor
diff --git a/kbackgammon/engines/generic/kbgengine.h b/kbackgammon/engines/generic/kbgengine.h
index 6964e065..9abee162 100644
--- a/kbackgammon/engines/generic/kbgengine.h
+++ b/kbackgammon/engines/generic/kbgengine.h
@@ -68,7 +68,7 @@ public:
     /**
      * Constructor
      */
-    KBgEngine (TQWidget * parent = 0, TQString * name = 0, TQPopupMenu * pmenu = 0);
+    KBgEngine (TQWidget * parent = nullptr, TQString * name = nullptr, TQPopupMenu * pmenu = nullptr);
 
     /**
      * Destructor
diff --git a/kbackgammon/engines/gnubg/kbggnubg.h b/kbackgammon/engines/gnubg/kbggnubg.h
index f32da01f..04efb2d7 100644
--- a/kbackgammon/engines/gnubg/kbggnubg.h
+++ b/kbackgammon/engines/gnubg/kbggnubg.h
@@ -50,7 +50,7 @@ public:
 	/*
 	 * Constructor and destructor
 	 */
-	KBgEngineGNU(TQWidget *parent = 0, TQString *name = 0, TQPopupMenu *pmenu = 0);
+	KBgEngineGNU(TQWidget *parent = nullptr, TQString *name = nullptr, TQPopupMenu *pmenu = nullptr);
 	virtual ~KBgEngineGNU();
 
 	/**
diff --git a/kbackgammon/engines/nextgen/kbggame.h b/kbackgammon/engines/nextgen/kbggame.h
index 295410ea..d2783390 100644
--- a/kbackgammon/engines/nextgen/kbggame.h
+++ b/kbackgammon/engines/nextgen/kbggame.h
@@ -45,7 +45,7 @@ public:
 
     enum MsgID {Text, Cmd, MaxMsg};
 
-    KBgGame(int cookie = 42, TQObject *parent = 0);
+    KBgGame(int cookie = 42, TQObject *parent = nullptr);
 
 protected:
 
diff --git a/kbackgammon/engines/nextgen/kbgng.cpp b/kbackgammon/engines/nextgen/kbgng.cpp
index c5dc3bbe..c0a285da 100644
--- a/kbackgammon/engines/nextgen/kbgng.cpp
+++ b/kbackgammon/engines/nextgen/kbgng.cpp
@@ -80,7 +80,7 @@ KBgEngineNg::KBgEngineNg(TQWidget *parent, TQString *name, TQPopupMenu *pmenu)
     readConfig();
 
     // initialize to local games
-    _player[0] = _player[1] = 0;
+    _player[0] = _player[1] = nullptr;
     _currGame = None;
     _gameSelect->setCurrentItem(Local);
     setGame();
diff --git a/kbackgammon/engines/nextgen/kbgng.h b/kbackgammon/engines/nextgen/kbgng.h
index a03db0c6..c3253c18 100644
--- a/kbackgammon/engines/nextgen/kbgng.h
+++ b/kbackgammon/engines/nextgen/kbgng.h
@@ -57,7 +57,7 @@ public:
     /*
      * Constructor and destructor
      */
-    KBgEngineNg( TQWidget *parent = 0, TQString *name = 0, TQPopupMenu *pmenu = 0);
+    KBgEngineNg( TQWidget *parent = nullptr, TQString *name = nullptr, TQPopupMenu *pmenu = nullptr);
     virtual ~KBgEngineNg();
 
     /**
diff --git a/kbackgammon/engines/offline/kbgoffline.h b/kbackgammon/engines/offline/kbgoffline.h
index 9f38efa3..2948b6e5 100644
--- a/kbackgammon/engines/offline/kbgoffline.h
+++ b/kbackgammon/engines/offline/kbgoffline.h
@@ -55,7 +55,7 @@ public:
     /**
      * Constructor
      */
-    KBgEngineOffline(TQWidget *parent = 0, TQString *name = 0, TQPopupMenu *pmenu = 0);
+    KBgEngineOffline(TQWidget *parent = nullptr, TQString *name = nullptr, TQPopupMenu *pmenu = nullptr);
 
     /**
      * Destructor
diff --git a/kbackgammon/kbg.cpp b/kbackgammon/kbg.cpp
index 2c966059..88fdb5f4 100644
--- a/kbackgammon/kbg.cpp
+++ b/kbackgammon/kbg.cpp
@@ -142,9 +142,9 @@ KBg::KBg()
 	 * (e.g. using KEditToolbar)
 	 */
 	cmdLabel = new TQLabel(i18n("Command: "), this);
-	new KWidgetAction( cmdLabel, cmdLabel->text(), 0, 0, 0, actionCollection(), "command_label");
+	new KWidgetAction( cmdLabel, cmdLabel->text(), 0, nullptr, nullptr, actionCollection(), "command_label");
 	cmdLine  = new KLineEdit(this, "commandline");
-	KWidgetAction* actionCmdLine = new KWidgetAction( cmdLine, TQString(), 0, 0, 0, actionCollection(), "command_lineedit");
+	KWidgetAction* actionCmdLine = new KWidgetAction( cmdLine, TQString(), 0, nullptr, nullptr, actionCollection(), "command_lineedit");
 	actionCmdLine->setAutoSized(true);
 
 	cmdLine->completionObject()->setOrder(TDECompletion::Weighted);
@@ -163,7 +163,7 @@ KBg::KBg()
 	 * prefers a different engine, it will be started later
 	 */
 	for (int i = 0; i < MaxEngine; i++)
-		engine[i] = 0;
+		engine[i] = nullptr;
 	currEngine = None;
 	engineSet->setCurrentItem(Offline);
 	setupEngine();
@@ -244,7 +244,7 @@ void KBg::setupEngine()
 
 	if (currEngine != None) {
 		delete engine[currEngine];
-		engine[currEngine] = 0;
+		engine[currEngine] = nullptr;
 	}
 
 	switch (currEngine = type) {
@@ -475,7 +475,7 @@ void KBg::setupDone()
 {
 	nb->delayedDestruct();
 	for (int i = 0; i < MaxEngine; i++)
-		if (i != currEngine) engine[i] = 0;
+		if (i != currEngine) engine[i] = nullptr;
 }
 
 // FIXME make more general...
diff --git a/kbackgammon/kbgboard.cpp b/kbackgammon/kbgboard.cpp
index 14cc3d59..2bb5ed04 100644
--- a/kbackgammon/kbgboard.cpp
+++ b/kbackgammon/kbgboard.cpp
@@ -377,7 +377,7 @@ void KBgBoard::queryCube()
  * Constructor, creates the dialog but does not show nor execute it.
  */
 KBgBoardQCube::KBgBoardQCube(int val, bool us, bool them)
-	: TQDialog(0, 0, true)
+	: TQDialog(nullptr, nullptr, true)
 {
 	setCaption(i18n("Set Cube Values"));
 
@@ -527,7 +527,7 @@ void KBgBoardQCube::changePlayer(int val)
  * Constructor, creates the dialog but does not show nor execute it.
  */
 KBgBoardQDice::KBgBoardQDice(const char *name)
-	: TQDialog(0, name, true)
+	: TQDialog(nullptr, name, true)
 {
 	setCaption(i18n("Set Dice Values"));
 
diff --git a/kbackgammon/kbgboard.h b/kbackgammon/kbgboard.h
index 94b3b0a7..f78d8e44 100644
--- a/kbackgammon/kbgboard.h
+++ b/kbackgammon/kbgboard.h
@@ -109,8 +109,8 @@ class KBgBoard : public TQWidget
 	/**
 	 * Constructor and destructor. Parameter as usual.
 	 */
-	KBgBoard(TQWidget *parent = 0, const char *name = 0,
-			 TQPopupMenu *menu = 0);
+	KBgBoard(TQWidget *parent = nullptr, const char *name = nullptr,
+			 TQPopupMenu *menu = nullptr);
 	virtual ~KBgBoard();
 
 	/**
@@ -830,7 +830,7 @@ public:
 	/**
 	 * Constructor and destructor
 	 */
-	KBgBoardQDice(const char *name = 0);
+	KBgBoardQDice(const char *name = nullptr);
 	virtual ~KBgBoardQDice();
 
 protected:
@@ -910,8 +910,8 @@ public:
 	/**
 	 * Constructor
 	 */
-	KBgBoardSetup(TQWidget *parent = 0, const char *name = 0,
-			      TQPopupMenu *menu = 0);
+	KBgBoardSetup(TQWidget *parent = nullptr, const char *name = nullptr,
+			      TQPopupMenu *menu = nullptr);
 
 	/**
 	 * Lets the board put its setup pages into the notebook nb
diff --git a/kbackgammon/kbgtextview.h b/kbackgammon/kbgtextview.h
index ff7c694c..26c90769 100644
--- a/kbackgammon/kbgtextview.h
+++ b/kbackgammon/kbgtextview.h
@@ -42,7 +42,7 @@ public:
 	/**
 	 * Constructor
 	 */
-	KBgTextView(TQWidget *parent = 0, const char *name = 0);
+	KBgTextView(TQWidget *parent = nullptr, const char *name = nullptr);
 
 	/**
 	 * Destructor
diff --git a/kbattleship/kbattleship/kbaiplayer.cpp b/kbattleship/kbattleship/kbaiplayer.cpp
index e1ea7d75..b6578665 100644
--- a/kbattleship/kbattleship/kbaiplayer.cpp
+++ b/kbattleship/kbattleship/kbaiplayer.cpp
@@ -26,9 +26,9 @@
 
 KBAIPlayer::KBAIPlayer()
 {
-	m_ownShipList = 0;
-	m_battleField = 0;
-	m_masterStrategy = 0;
+	m_ownShipList = nullptr;
+	m_battleField = nullptr;
+	m_masterStrategy = nullptr;
 	m_randomSeq = new KRandomSequence(TDEApplication::random());
 }
 
@@ -43,7 +43,7 @@ void KBAIPlayer::init(KBattleField *battle_field, KShipList *ai_shiplist)
 	m_battleField = battle_field;
 	m_ownShipList = ai_shiplist;
 
-	if(m_battleField != 0)
+	if(m_battleField)
 	{
 		TQRect rect = m_battleField->enemyRect();
 		int grid = m_battleField->gridSize();
@@ -53,7 +53,7 @@ void KBAIPlayer::init(KBattleField *battle_field, KShipList *ai_shiplist)
 
 void KBAIPlayer::slotRestart()
 {
-	if(m_randomSeq == 0 || m_ownShipList == 0 || m_battleField == 0)
+	if(!m_randomSeq || !m_ownShipList || !m_battleField)
 		return;
 
 	addShips();
@@ -90,7 +90,7 @@ void KBAIPlayer::chooseStrategy()
 
 bool KBAIPlayer::slotRequestShot()
 {
-	if(m_masterStrategy != 0 && m_masterStrategy->hasMoreShots())
+	if(m_masterStrategy && m_masterStrategy->hasMoreShots())
 	{
 		TQPoint pos = m_masterStrategy->nextShot();
 		emit sigShootAt(pos);
diff --git a/kbattleship/kbattleship/kbattlefield.cpp b/kbattleship/kbattleship/kbattlefield.cpp
index c4a9e422..17e0570b 100644
--- a/kbattleship/kbattleship/kbattlefield.cpp
+++ b/kbattleship/kbattleship/kbattlefield.cpp
@@ -92,7 +92,7 @@ void KBattleField::drawOwnField()
 		return;
 
 	KBattleshipWindow *window = static_cast<KBattleshipWindow *>(m_parent->parent()->parent());
-	KShip *ship = 0;
+	KShip *ship = nullptr;
 	int data;
 
 	for(int i = 0; i != m_ownfieldx; i++)
diff --git a/kbattleship/kbattleship/kbattleship.cpp b/kbattleship/kbattleship/kbattleship.cpp
index 894b354a..0065047d 100644
--- a/kbattleship/kbattleship/kbattleship.cpp
+++ b/kbattleship/kbattleship/kbattleship.cpp
@@ -39,12 +39,12 @@ extern const char *clientVersion;
 KBattleshipWindow::KBattleshipWindow() : TDEMainWindow()
 {
 	shift = false;
-	m_connection = 0;
+	m_connection = nullptr;
 	m_lost = 0;
-	m_config = 0;
-	m_client = 0;
-	m_server = 0;
-	m_aiPlayer = 0;
+	m_config = nullptr;
+	m_client = nullptr;
+	m_server = nullptr;
+	m_aiPlayer = nullptr;
 	m_aiHits = 0;
 
 	init();
@@ -52,7 +52,7 @@ KBattleshipWindow::KBattleshipWindow() : TDEMainWindow()
 
 KBattleshipWindow::~KBattleshipWindow()
 {
-	if(m_config != 0)
+	if(m_config)
 		saveOptions();
 	delete m_aiPlayer;
 	delete m_ownshiplist;
@@ -158,7 +158,7 @@ void KBattleshipWindow::slotDeleteAI()
 {
 	m_aiHits = 0;
 	delete m_aiPlayer;
-	m_aiPlayer = 0;
+	m_aiPlayer = nullptr;
 }
 
 void KBattleshipWindow::slotRestartAI()
@@ -169,12 +169,12 @@ void KBattleshipWindow::slotRestartAI()
 
 void KBattleshipWindow::slotEnemyFieldClick(int fieldx, int fieldy)
 {
-	if(m_connection != 0 || m_aiPlaying)
+	if(m_connection || m_aiPlaying)
 	{
-		if(!m_aiPlaying && m_connection == 0)
+		if(!m_aiPlaying && !m_connection)
 			return;
 
-		if(!m_serverHasClient && m_connection != 0)
+		if(!m_serverHasClient && m_connection)
 			return;
 
 		if(!m_shootable)
@@ -326,7 +326,7 @@ void KBattleshipWindow::slotEnemyFieldClick(int fieldx, int fieldy)
 				}
 				return;
 			}
-			else if(m_aiPlayer != 0 && m_aiPlaying)
+			else if(m_aiPlayer && m_aiPlaying)
 				m_aiPlayer->slotRequestShot();
 		}
 	}
@@ -451,15 +451,15 @@ void KBattleshipWindow::slotAbortNetworkGame()
 		if(m_connection->type() == KonnectionHandling::SERVER)
 		{
 			delete m_kbserver;
-			m_kbserver = 0;
+			m_kbserver = nullptr;
 		}
 		else
 		{
 			delete m_kbclient;
-			m_kbclient = 0;
+			m_kbclient = nullptr;
 		}
 		delete m_connection;
-		m_connection = 0;
+		m_connection = nullptr;
 	}
 }
 
@@ -480,12 +480,12 @@ void KBattleshipWindow::slotPlaceShipPreview(int fieldx, int fieldy)
 {
 	int xadd = 0, yadd = 0;
 
-	if(m_connection != 0 || m_aiPlaying)
+	if(m_connection || m_aiPlaying)
 	{
-		if(!m_aiPlaying && m_connection == 0)
+		if(!m_aiPlaying && !m_connection)
 			return;
 
-		if(m_connection != 0 && !m_aiPlaying && !m_serverHasClient)
+		if(m_connection && !m_aiPlaying && !m_serverHasClient)
 			return;
 
 		if((m_placeable && m_ownshiplist->canAddShips()) || m_aiPlaying)
@@ -537,12 +537,12 @@ void KBattleshipWindow::slotPlaceShipPreview(int fieldx, int fieldy)
 
 void KBattleshipWindow::slotPlaceShip(int fieldx, int fieldy)
 {
-	if(m_connection != 0 || m_aiPlaying)
+	if(m_connection || m_aiPlaying)
 	{
-		if(!m_aiPlaying && m_connection == 0)
+		if(!m_aiPlaying && !m_connection)
 			return;
 
-		if(m_connection != 0 && !m_aiPlaying && !m_serverHasClient)
+		if(m_connection && !m_aiPlaying && !m_serverHasClient)
 			return;
 
 		if(m_placeable && m_ownshiplist->canAddShips())
@@ -573,7 +573,7 @@ void KBattleshipWindow::slotShipsReady()
 
 void KBattleshipWindow::slotSendMessage(int fieldx, int fieldy, int state)
 {
-	if(m_connection != 0)
+	if(m_connection)
 	{
 		KMessage *msg = new KMessage(KMessage::ANSWER_SHOOT);
 		msg->addField(TQString("fieldx"), TQString::number(fieldx));
@@ -589,7 +589,7 @@ void KBattleshipWindow::slotSendMessage(int fieldx, int fieldy, int state)
 
 void KBattleshipWindow::slotSendMessage(KMessage *msg)
 {
-	if(m_connection != 0)
+	if(m_connection)
 	{
 		if(m_connection->type() == KonnectionHandling::SERVER)
 			m_kbserver->sendMessage(msg);
@@ -600,7 +600,7 @@ void KBattleshipWindow::slotSendMessage(KMessage *msg)
 
 void KBattleshipWindow::slotSendChatMessage(const TQString &text)
 {
-	if(m_connection != 0 && m_serverHasClient)
+	if(m_connection && m_serverHasClient)
 	{
 		KMessage *msg = new KMessage(KMessage::CHAT);
 		msg->chatMessage(m_ownNickname, text);
@@ -687,9 +687,9 @@ void KBattleshipWindow::slotEnemyClientInfo()
 
 void KBattleshipWindow::slotServerConnect()
 {
-	if(m_connection == 0)
+	if(!m_connection)
 	{
-		if(m_client != 0) {
+		if(m_client) {
 			m_client->show();
 			return;
 		}
@@ -710,7 +710,7 @@ void KBattleshipWindow::slotServerConnect()
 void KBattleshipWindow::slotDeleteConnectDialog()
 {
 	delete m_client;
-	m_client = 0;
+	m_client = nullptr;
 }
 
 void KBattleshipWindow::slotReplayRequest()
@@ -798,9 +798,9 @@ void KBattleshipWindow::cleanup(bool placechange)
 
 void KBattleshipWindow::slotNewServer()
 {
-	if(m_connection == 0)
+	if(!m_connection)
 	{
-		if(m_server != 0)
+		if(m_server)
 			return;
 
 		slotStatusMsg(i18n("Loading Start-Server dialog..."));
@@ -819,7 +819,7 @@ void KBattleshipWindow::slotNewServer()
 void KBattleshipWindow::slotDeleteServerDialog()
 {
 	delete m_server;
-	m_server = 0;
+	m_server = nullptr;
 }
 
 void KBattleshipWindow::slotSendVersion()
@@ -852,14 +852,14 @@ void KBattleshipWindow::slotStartBattleshipServer()
 	m_chat->setNickname(m_ownNickname);
 	slotChangeOwnPlayer(m_ownNickname);
 	delete m_server;
-	m_server = 0;
+	m_server = nullptr;
 	cleanup(true);
 	m_aiPlaying = false;
 	m_shootable = false;
 	m_placeable = true;
 	m_stat->clear();
 	m_stat->clearWon();
-	if(m_connection == 0)
+	if(!m_connection)
 	{
 		m_connection = new KonnectionHandling(this, m_kbserver);
 		connect(m_connection, TQ_SIGNAL(sigStatusBar(const TQString &)), this, TQ_SLOT(slotStatusMsg(const TQString &)));
@@ -1098,7 +1098,7 @@ void KBattleshipWindow::slotConnectToBattleshipServer()
 	int port = m_client->port().toInt();
 	TQString nickname = m_client->nickname();
 	delete m_client;
-	m_client = 0;
+	m_client = nullptr;
 	slotConnectToBattleshipServer(host, port, nickname);
 }
 void KBattleshipWindow::slotConnectToBattleshipServer(const TQString &host, int port, const TQString &nickname)
@@ -1116,7 +1116,7 @@ void KBattleshipWindow::slotConnectToBattleshipServer(const TQString &host, int
 	m_gameServerConnect->setText(i18n("Dis&connect from server"));
 	m_gameNewServer->setEnabled(false);
 	m_gameSingle->setEnabled(false);
-	if(m_connection == 0)
+	if(!m_connection)
 	{
 		m_connection = new KonnectionHandling(this, m_kbclient);
 		connect(m_kbclient, TQ_SIGNAL(sigConnected()), this, TQ_SLOT(slotSendVersion()));
@@ -1223,7 +1223,7 @@ void KBattleshipWindow::slotSinglePlayer()
 	}
 	else
 	{
-		if(m_aiPlayer != 0)
+		if(m_aiPlayer)
 		{
 			m_aiPlaying = false;
 			slotChangeOwnPlayer("-");
@@ -1254,10 +1254,10 @@ void KBattleshipWindow::slotStartBattleshipGame(bool clearstat)
 	slotChangeOwnPlayer(m_ownNickname);
 	slotChangeEnemyPlayer(KGameMisc::randomName());
 	cleanup(true);
-	if(m_connection != 0)
+	if(m_connection)
 	{
 		delete m_connection;
-		m_connection = 0;
+		m_connection = nullptr;
 	}
 	m_aiPlaying = true;
 	m_shootable = false;
@@ -1265,7 +1265,7 @@ void KBattleshipWindow::slotStartBattleshipGame(bool clearstat)
 	if(clearstat)
 		m_stat->clearWon();
 
-	if(m_aiPlayer == 0)
+	if(!m_aiPlayer)
 	{
 		m_aiPlayer = new KBAIPlayer();
 		m_aiPlayer->init(m_view->field(), m_enemyshiplist);
diff --git a/kbattleship/kbattleship/kbattleshipclient.cpp b/kbattleship/kbattleship/kbattleshipclient.cpp
index cad29b29..f9e4e56b 100644
--- a/kbattleship/kbattleship/kbattleshipclient.cpp
+++ b/kbattleship/kbattleship/kbattleshipclient.cpp
@@ -62,7 +62,7 @@ void KBattleshipClient::slotReadData()
 	if(!len)
 	{
 		delete m_readNotifier;
-		m_readNotifier = 0;
+		m_readNotifier = nullptr;
 		emit sigEndConnect();
 		return;
 	}
diff --git a/kbattleship/kbattleship/kbattleshipserver.cpp b/kbattleship/kbattleship/kbattleshipserver.cpp
index 36d3ff70..2e2a0817 100644
--- a/kbattleship/kbattleship/kbattleshipserver.cpp
+++ b/kbattleship/kbattleship/kbattleshipserver.cpp
@@ -34,14 +34,14 @@ KBattleshipServer::KBattleshipServer(int port, const TQString& name)
 	: KExtendedSocket(TQString(), port, inetSocket | passiveSocket), m_name(name)
 {
 	m_port = port;
-	m_serverSocket = 0;
+	m_serverSocket = nullptr;
 }
 
 void KBattleshipServer::init()
 {
 	if(listen())
 	{
-		KMessageBox::error(0L, i18n("Failed to bind to local port \"%1\"\n\nPlease check if another KBattleship server instance\nis running or another application uses this port.").arg(m_port));
+		KMessageBox::error(nullptr, i18n("Failed to bind to local port \"%1\"\n\nPlease check if another KBattleship server instance\nis running or another application uses this port.").arg(m_port));
 		emit sigServerFailure();
 		return;
 	}
@@ -57,7 +57,7 @@ void KBattleshipServer::slotNewConnection()
 {
 	KExtendedSocket *sock;
 	accept(sock);
-	if(sock && m_serverSocket == 0)
+	if(sock && !m_serverSocket)
 	{
 		m_service.stop();
 		m_serverSocket = sock;
@@ -115,9 +115,9 @@ void KBattleshipServer::slotDiscardClient(const TQString &reason, bool kmversion
 	delete msg;
 
 	delete m_readNotifier;
-	m_readNotifier = 0;
+	m_readNotifier = nullptr;
 	delete m_serverSocket;
-	m_serverSocket = 0;
+	m_serverSocket = nullptr;
 
 	if(bemit)
 		emit sigEndConnect();
diff --git a/kbattleship/kbattleship/kbattleshipview.cpp b/kbattleship/kbattleship/kbattleshipview.cpp
index 4008803e..b94d69f6 100644
--- a/kbattleship/kbattleship/kbattleshipview.cpp
+++ b/kbattleship/kbattleship/kbattleshipview.cpp
@@ -33,7 +33,7 @@ KBattleshipView::KBattleshipView(TQWidget *parent, const char *name, bool draw)
 	m_decide = false;
 	m_lastX = 0;
 	m_lastY = 0;
-	m_battlefield = 0;
+	m_battlefield = nullptr;
 }
 
 KBattleshipView::~KBattleshipView()
diff --git a/kbattleship/kbattleship/kbattleshipview.h b/kbattleship/kbattleship/kbattleshipview.h
index b970f7e4..193de037 100644
--- a/kbattleship/kbattleship/kbattleshipview.h
+++ b/kbattleship/kbattleship/kbattleshipview.h
@@ -35,7 +35,7 @@ class KBattleshipView : public TQWidget
 	TQ_OBJECT
   
 public:
-	KBattleshipView(TQWidget *parent = 0, const char *name = 0, bool draw = false);
+	KBattleshipView(TQWidget *parent = nullptr, const char *name = nullptr, bool draw = false);
 	~KBattleshipView();
 
 	KBattleField *field() { return m_battlefield; }
diff --git a/kbattleship/kbattleship/kbchooserstrategy.cpp b/kbattleship/kbattleship/kbchooserstrategy.cpp
index 548670fe..783f1cba 100644
--- a/kbattleship/kbattleship/kbchooserstrategy.cpp
+++ b/kbattleship/kbattleship/kbchooserstrategy.cpp
@@ -30,7 +30,7 @@ KBChooserStrategy::KBChooserStrategy(KBStrategy *parent) : KBStrategy(parent)
 	m_destroyer = new KBDestroyShipStrategy(this);
 	m_destroying = false;
 
-	m_child = 0;
+	m_child = nullptr;
 
 	m_random = new KRandomSequence(TDEApplication::random());
 }
@@ -46,7 +46,7 @@ void KBChooserStrategy::init(KBattleField *field, const TQRect &field_rect)
 {
 	KBStrategy::init(field, field_rect);
 
-	if(m_destroyer != 0)
+	if(m_destroyer)
 		m_destroyer->init(field, field_rect);
 
 	advance();
@@ -98,7 +98,7 @@ bool KBChooserStrategy::advance()
 
 bool KBChooserStrategy::hasMoreShots()
 {
-	if(m_parent == 0)
+	if(!m_parent)
 	{
 		if((!m_destroying) && m_prevShots.count() > 0)
 		{
diff --git a/kbattleship/kbattleship/kbchooserstrategy.h b/kbattleship/kbattleship/kbchooserstrategy.h
index 5ac7d7c2..4839aa23 100644
--- a/kbattleship/kbattleship/kbchooserstrategy.h
+++ b/kbattleship/kbattleship/kbchooserstrategy.h
@@ -25,7 +25,7 @@
 class KBChooserStrategy : public KBStrategy
 {
 public: 
-	KBChooserStrategy(KBStrategy *parent = 0);
+	KBChooserStrategy(KBStrategy *parent = nullptr);
 	virtual ~KBChooserStrategy();
 
 	virtual void init(KBattleField *field, const TQRect &field_rect);
diff --git a/kbattleship/kbattleship/kbdestroyshipstrategy.h b/kbattleship/kbattleship/kbdestroyshipstrategy.h
index 41503be1..248041cd 100644
--- a/kbattleship/kbattleship/kbdestroyshipstrategy.h
+++ b/kbattleship/kbattleship/kbdestroyshipstrategy.h
@@ -23,7 +23,7 @@
 class KBDestroyShipStrategy : public KBStrategy
 {
 public:
-	KBDestroyShipStrategy(KBStrategy *parent = 0);
+	KBDestroyShipStrategy(KBStrategy *parent = nullptr);
 
 	virtual void init(KBattleField *field, const TQRect &field_rect);
 	virtual const TQPoint nextShot();
diff --git a/kbattleship/kbattleship/kbdiagonalshotstrategy.h b/kbattleship/kbattleship/kbdiagonalshotstrategy.h
index e328fad2..fdfc3ce1 100644
--- a/kbattleship/kbattleship/kbdiagonalshotstrategy.h
+++ b/kbattleship/kbattleship/kbdiagonalshotstrategy.h
@@ -23,7 +23,7 @@ class KBDiagonalShotStrategy : public KBStrategy
 {
 public:
 	enum Direction {LEFTUP, LEFTDOWN, RIGHTUP, RIGHTDOWN};
-	KBDiagonalShotStrategy(KBStrategy *parent = 0);
+	KBDiagonalShotStrategy(KBStrategy *parent = nullptr);
 
 	virtual const TQPoint nextShot();
 	virtual bool hasMoreShots();
diff --git a/kbattleship/kbattleship/kbdiagonalwrapstrategy.cpp b/kbattleship/kbattleship/kbdiagonalwrapstrategy.cpp
index 7055403b..ac9387e4 100644
--- a/kbattleship/kbattleship/kbdiagonalwrapstrategy.cpp
+++ b/kbattleship/kbattleship/kbdiagonalwrapstrategy.cpp
@@ -21,14 +21,14 @@ KBDiagonalWrapStrategy::KBDiagonalWrapStrategy(KBStrategy *parent) : KBStrategy(
 {
 	m_child = new KBDiagonalShotStrategy(this);
 
-	if(parent == 0)
+	if(!parent)
 	{
 		m_destroyer = new KBDestroyShipStrategy(this);
 		m_destroying = false;
 	}
 	else
 	{
-		m_destroyer = 0;
+		m_destroyer = nullptr;
 		m_destroying = false;
 	}
 }
@@ -75,7 +75,7 @@ void KBDiagonalWrapStrategy::init(KBattleField *field, const TQRect &field_rect)
 
 	m_start = TQPoint(m_column, m_row);
 
-	if(m_destroyer != 0)
+	if(m_destroyer)
 		m_destroyer->init(field, field_rect);
 }
 
@@ -85,7 +85,7 @@ const TQPoint KBDiagonalWrapStrategy::nextShot()
 	{
 		if(m_destroying)
 			return m_destroyer->nextShot();
-		else if(m_child != 0)
+		else if(m_child)
 			return m_child->nextShot();
 	}
 
@@ -125,7 +125,7 @@ bool KBDiagonalWrapStrategy::advance()
 
 bool KBDiagonalWrapStrategy::hasMoreShots()
 {
-	if(m_parent == 0 && !m_destroying && m_prevShots.count() > 0)
+	if(!m_parent && !m_destroying && m_prevShots.count() > 0)
 	{
 		TQPoint pos = m_prevShots.last();
 		int state = m_battleField->ownState(pos.x(), pos.y());
@@ -154,7 +154,7 @@ void KBDiagonalWrapStrategy::shotAt(const TQPoint &pos)
 {
 	m_prevShots.append(pos);
 
-	if(m_child != 0)
+	if(m_child)
 		m_child->shotAt(pos);
 }
 
diff --git a/kbattleship/kbattleship/kbdiagonalwrapstrategy.h b/kbattleship/kbattleship/kbdiagonalwrapstrategy.h
index f4a7c28d..d5f6b2b4 100644
--- a/kbattleship/kbattleship/kbdiagonalwrapstrategy.h
+++ b/kbattleship/kbattleship/kbdiagonalwrapstrategy.h
@@ -24,7 +24,7 @@
 class KBDiagonalWrapStrategy : public KBStrategy
 {
 public: 
-	KBDiagonalWrapStrategy(KBStrategy *parent = 0);
+	KBDiagonalWrapStrategy(KBStrategy *parent = nullptr);
 	virtual ~KBDiagonalWrapStrategy();
 
 	virtual void init(KBattleField *field, const TQRect &field_rect);
diff --git a/kbattleship/kbattleship/kbhorizontalstepstrategy.cpp b/kbattleship/kbattleship/kbhorizontalstepstrategy.cpp
index a6e931da..53b77bce 100644
--- a/kbattleship/kbattleship/kbhorizontalstepstrategy.cpp
+++ b/kbattleship/kbattleship/kbhorizontalstepstrategy.cpp
@@ -19,15 +19,15 @@
 
 KBHorizontalStepStrategy::KBHorizontalStepStrategy(KBStrategy *parent) : KBStrategy(parent)
 {
-	m_child = 0;
-	if(parent == 0) // only the master destroys ships
+	m_child = nullptr;
+	if(!parent) // only the master destroys ships
 	{
 		m_destroyer = new KBDestroyShipStrategy(this);
 		m_destroying = false;
 	}
 	else
 	{
-		m_destroyer = 0;
+		m_destroyer = nullptr;
 		m_destroying = false;
 	}
 }
@@ -47,7 +47,7 @@ void KBHorizontalStepStrategy::init(KBattleField *field, const TQRect &field_rec
 	m_start = TQPoint(m_column, m_row);
 	m_passes = 0;
 
-	if(m_destroyer != 0)
+	if(m_destroyer)
 		m_destroyer->init(field, field_rect);
 }
 
@@ -59,7 +59,7 @@ const TQPoint KBHorizontalStepStrategy::nextShot()
 			return m_destroyer->nextShot();
 		else if(m_passes == 0)
 			return TQPoint(m_column, m_row);
-		else if(m_parent == 0)
+		else if(!m_parent)
 			return m_child->nextShot();
 	}
 
@@ -108,7 +108,7 @@ void KBHorizontalStepStrategy::setStart(int col, int row)
 
 bool KBHorizontalStepStrategy::hasMoreShots()
 {
-	if(m_parent != 0)
+	if(m_parent)
 	{
 		// Child Strategy
 		if(m_passes == 0)
@@ -205,6 +205,6 @@ bool KBHorizontalStepStrategy::hasMoreShots()
 void KBHorizontalStepStrategy::shotAt(const TQPoint &pos)
 {
 	m_prevShots.append(pos);
-	if(m_child != 0)
+	if(m_child)
 		m_child->shotAt(pos);
 }
diff --git a/kbattleship/kbattleship/kbhorizontalstepstrategy.h b/kbattleship/kbattleship/kbhorizontalstepstrategy.h
index 80ec7b72..15f1157e 100644
--- a/kbattleship/kbattleship/kbhorizontalstepstrategy.h
+++ b/kbattleship/kbattleship/kbhorizontalstepstrategy.h
@@ -23,7 +23,7 @@
 class KBHorizontalStepStrategy : public KBStrategy
 {
 public: 
-	KBHorizontalStepStrategy(KBStrategy *parent = 0);
+	KBHorizontalStepStrategy(KBStrategy *parent = nullptr);
 	virtual ~KBHorizontalStepStrategy();
 
 	virtual void init(KBattleField *field, const TQRect &field_rect);
diff --git a/kbattleship/kbattleship/kbrandomshotstrategy.cpp b/kbattleship/kbattleship/kbrandomshotstrategy.cpp
index 62416350..37eeec07 100644
--- a/kbattleship/kbattleship/kbrandomshotstrategy.cpp
+++ b/kbattleship/kbattleship/kbrandomshotstrategy.cpp
@@ -34,7 +34,7 @@ void KBRandomShotStrategy::init(KBattleField *field, const TQRect &field_rect)
 	m_column = (int) rand.getLong(m_fieldRect.width());
 	m_row = (int) rand.getLong(m_fieldRect.height());
 
-	if(m_destroyer != 0)
+	if(m_destroyer)
 		m_destroyer->init(field, field_rect);
 }
 
@@ -63,7 +63,7 @@ bool KBRandomShotStrategy::advance()
 
 bool KBRandomShotStrategy::hasMoreShots()
 {
-	if(m_parent == 0)
+	if(!m_parent)
 	{
 		if((!m_destroying) && m_prevShots.count() > 0)
 		{
diff --git a/kbattleship/kbattleship/kbrandomshotstrategy.h b/kbattleship/kbattleship/kbrandomshotstrategy.h
index 141961b9..cb7531d4 100644
--- a/kbattleship/kbattleship/kbrandomshotstrategy.h
+++ b/kbattleship/kbattleship/kbrandomshotstrategy.h
@@ -25,7 +25,7 @@
 class KBRandomShotStrategy : public KBStrategy
 {
 public: 
-	KBRandomShotStrategy(KBStrategy *parent = 0);
+	KBRandomShotStrategy(KBStrategy *parent = nullptr);
 	virtual ~KBRandomShotStrategy();
 
 	virtual void init(KBattleField *field, const TQRect &field_rect);
diff --git a/kbattleship/kbattleship/kbstrategy.cpp b/kbattleship/kbattleship/kbstrategy.cpp
index be445559..0c16e870 100644
--- a/kbattleship/kbattleship/kbstrategy.cpp
+++ b/kbattleship/kbattleship/kbstrategy.cpp
@@ -20,7 +20,7 @@
 KBStrategy::KBStrategy(KBStrategy *parent)
 {
 	m_parent = parent;
-	m_viableShots = 0;
+	m_viableShots = nullptr;
 }
 
 KBStrategy::~KBStrategy()
@@ -29,7 +29,7 @@ KBStrategy::~KBStrategy()
   {
     m_prevShots.remove( m_prevShots.last() );
   }
-	if (m_parent == 0 && m_viableShots != 0)
+	if (!m_parent && m_viableShots)
 	{
 		delete[] m_viableShots;
 	}
@@ -53,7 +53,7 @@ void KBStrategy::init(KBattleField *field, const TQRect &field_rect)
 	m_fieldRect = field_rect;
 	if (!m_parent)
 	{
-		if (m_viableShots == 0)
+		if (!m_viableShots)
 		{
 			m_viableShots = new bool[(field_rect.width()*field_rect.height())];
 		}
diff --git a/kbattleship/kbattleship/kbstrategy.h b/kbattleship/kbattleship/kbstrategy.h
index 9c4cdf15..2c1189dc 100644
--- a/kbattleship/kbattleship/kbstrategy.h
+++ b/kbattleship/kbattleship/kbstrategy.h
@@ -26,7 +26,7 @@ class KBStrategy
 {
 public:
 	enum{FREE, SHOT, SHIP};
-	KBStrategy(KBStrategy *parent = 0);
+	KBStrategy(KBStrategy *parent = nullptr);
 	virtual ~KBStrategy();
 
 	virtual const TQPoint nextShot() = 0;
diff --git a/kbattleship/kbattleship/kbverticalstepstrategy.cpp b/kbattleship/kbattleship/kbverticalstepstrategy.cpp
index 7642ccaf..6a09652e 100644
--- a/kbattleship/kbattleship/kbverticalstepstrategy.cpp
+++ b/kbattleship/kbattleship/kbverticalstepstrategy.cpp
@@ -20,16 +20,16 @@
 
 KBVerticalStepStrategy::KBVerticalStepStrategy(KBStrategy *parent) : KBStrategy(parent)
 {
-	m_child = 0;
+	m_child = nullptr;
 
-	if(parent == 0) // only the master destroys ships
+	if(!parent) // only the master destroys ships
 	{
 		m_destroyer = new KBDestroyShipStrategy(this);
 		m_destroying = false;
 	}
 	else
 	{
-		m_destroyer = 0;
+		m_destroyer = nullptr;
 		m_destroying = false;
 	}
 }
@@ -49,7 +49,7 @@ void KBVerticalStepStrategy::init(KBattleField *field, const TQRect &field_rect)
 	m_start = TQPoint(m_column, m_row);
 	m_passes = 0;
 
-	if(m_destroyer != 0)
+	if(m_destroyer)
 		m_destroyer->init(field, field_rect);
 }
 
@@ -61,7 +61,7 @@ const TQPoint KBVerticalStepStrategy::nextShot()
 			return m_destroyer->nextShot();
 		else if(m_passes == 0)
 			return TQPoint(m_column, m_row);
-		else if(m_parent == 0)
+		else if(!m_parent)
 			return m_child->nextShot();
 	}
 
@@ -110,7 +110,7 @@ void KBVerticalStepStrategy::setStart(int col, int row)
 
 bool KBVerticalStepStrategy::hasMoreShots()
 {
-	if(m_parent != 0)
+	if(m_parent)
 	{
 		// Child Strategy
 		if(m_passes == 0)
@@ -209,6 +209,6 @@ bool KBVerticalStepStrategy::hasMoreShots()
 void KBVerticalStepStrategy::shotAt(const TQPoint &pos)
 {
 	m_prevShots.append(pos);
-	if(m_child != 0)
+	if(m_child)
 		m_child->shotAt(pos);
 }
diff --git a/kbattleship/kbattleship/kbverticalstepstrategy.h b/kbattleship/kbattleship/kbverticalstepstrategy.h
index a5d614c6..4af4277f 100644
--- a/kbattleship/kbattleship/kbverticalstepstrategy.h
+++ b/kbattleship/kbattleship/kbverticalstepstrategy.h
@@ -24,7 +24,7 @@
 class KBVerticalStepStrategy : public KBStrategy
 {
 public: 
-	KBVerticalStepStrategy(KBStrategy *parent = 0);
+	KBVerticalStepStrategy(KBStrategy *parent = nullptr);
 	virtual ~KBVerticalStepStrategy();
 
 	virtual void init(KBattleField *field, const TQRect &field_rect);
diff --git a/kbattleship/kbattleship/kchatwidget.h b/kbattleship/kbattleship/kchatwidget.h
index bc3f5da7..48953fee 100644
--- a/kbattleship/kbattleship/kchatwidget.h
+++ b/kbattleship/kbattleship/kchatwidget.h
@@ -29,7 +29,7 @@ class KChatWidget : public chatDlg
 	TQ_OBJECT
   
 public:
-	KChatWidget(TQWidget *parent = 0, const char *name = 0);
+	KChatWidget(TQWidget *parent = nullptr, const char *name = nullptr);
 
 	void clear();
 	void setNickname(const TQString &nickname) { m_currentNickname = nickname; }
diff --git a/kbattleship/kbattleship/kclientdialog.h b/kbattleship/kbattleship/kclientdialog.h
index 732424db..c9078437 100644
--- a/kbattleship/kbattleship/kclientdialog.h
+++ b/kbattleship/kbattleship/kclientdialog.h
@@ -34,7 +34,7 @@ class KClientDialog : public KDialogBase
 	TQ_OBJECT
   
 public:
-	KClientDialog(TQWidget *parent = 0, const char *name = 0);
+	KClientDialog(TQWidget *parent = nullptr, const char *name = nullptr);
 	~KClientDialog();
 
 	TQString port() const;
diff --git a/kbattleship/kbattleship/konnectionhandling.cpp b/kbattleship/kbattleship/konnectionhandling.cpp
index e243a747..2509eb7c 100644
--- a/kbattleship/kbattleship/konnectionhandling.cpp
+++ b/kbattleship/kbattleship/konnectionhandling.cpp
@@ -22,7 +22,7 @@ extern const char *protocolVersion;
 KonnectionHandling::KonnectionHandling(TQWidget *parent, KBattleshipServer *server) : TQObject(parent)
 {
 	m_kbserver = server;
-	m_kbclient = 0;
+	m_kbclient = nullptr;
 	m_type = KonnectionHandling::SERVER;
 	connect(server, TQ_SIGNAL(sigServerFailure()), this, TQ_SIGNAL(sigAbortNetworkGame()));
 	connect(server, TQ_SIGNAL(sigNewConnect()), this, TQ_SLOT(slotNewClient()));
@@ -34,7 +34,7 @@ KonnectionHandling::KonnectionHandling(TQWidget *parent, KBattleshipServer *serv
 KonnectionHandling::KonnectionHandling(TQWidget *parent, KBattleshipClient *client) : TQObject(parent)
 {
 	m_kbclient = client;
-	m_kbserver = 0;
+	m_kbserver = nullptr;
 	m_type = KonnectionHandling::CLIENT;
 	connect(client, TQ_SIGNAL(sigEndConnect()), this, TQ_SLOT(slotLostServer()));
 	connect(client, TQ_SIGNAL(sigSocketFailure(int)), this, TQ_SLOT(slotSocketError(int)));
@@ -45,7 +45,7 @@ KonnectionHandling::KonnectionHandling(TQWidget *parent, KBattleshipClient *clie
 void KonnectionHandling::updateInternal(KBattleshipServer *server)
 {
 	m_kbserver = server;
-	m_kbclient = 0;
+	m_kbclient = nullptr;
 	m_type = KonnectionHandling::SERVER;
 	connect(server, TQ_SIGNAL(sigServerFailure()), this, TQ_SIGNAL(sigAbortNetworkGame()));
 	connect(server, TQ_SIGNAL(sigNewConnect()), this, TQ_SLOT(slotNewClient()));
@@ -57,7 +57,7 @@ void KonnectionHandling::updateInternal(KBattleshipServer *server)
 void KonnectionHandling::updateInternal(KBattleshipClient *client)
 {
 	m_kbclient = client;
-	m_kbserver = 0;
+	m_kbserver = nullptr;
 	m_type = KonnectionHandling::CLIENT;
 	connect(client, TQ_SIGNAL(sigEndConnect()), this, TQ_SLOT(slotLostServer()));
 	connect(client, TQ_SIGNAL(sigSocketFailure(int)), this, TQ_SLOT(slotSocketError(int)));
@@ -71,7 +71,7 @@ void KonnectionHandling::slotNewClient()
 
 void KonnectionHandling::slotLostClient()
 {
-	KMessageBox::error(0L, i18n("Connection to client lost. Aborting the game."));
+	KMessageBox::error(nullptr, i18n("Connection to client lost. Aborting the game."));
 	emit sigClientLost();
 }
 
@@ -94,11 +94,11 @@ void KonnectionHandling::slotNewMessage(KMessage *msg)
 			case KMessage::DISCARD:
 				if(msg->field("kmversion") == TQString("true"))
 				{
-					KMessageBox::error(0L, i18n("Connection dropped by enemy. The client's protocol implementation (%1) is not compatible with our (%2) version.").arg(msg->field("reason")).arg(protocolVersion));
+					KMessageBox::error(nullptr, i18n("Connection dropped by enemy. The client's protocol implementation (%1) is not compatible with our (%2) version.").arg(msg->field("reason")).arg(protocolVersion));
 					emit sigAbortNetworkGame();
 				}
 				else
-					KMessageBox::error(0L, i18n(msg->field("reason").latin1()));
+					KMessageBox::error(nullptr, i18n(msg->field("reason").latin1()));
 				break;
 
 				// Got some informations
@@ -159,7 +159,7 @@ void KonnectionHandling::slotNewMessage(KMessage *msg)
 				if(msg->field("protocolVersion") != TQString::fromLatin1(protocolVersion))
 				{
 					m_kbserver->slotDiscardClient(protocolVersion, true, false);
-					KMessageBox::error(0L, i18n("Connection to client dropped. The client's protocol implementation (%1) is not compatible with our (%2) version.").arg(msg->field("protocolVersion")).arg(protocolVersion));
+					KMessageBox::error(nullptr, i18n("Connection to client dropped. The client's protocol implementation (%1) is not compatible with our (%2) version.").arg(msg->field("protocolVersion")).arg(protocolVersion));
 				}
 				else
 					emit sigClientInformation(msg->field("clientName"), msg->field("clientVersion"), msg->field("clientDescription"), msg->field("protocolVersion"));
@@ -167,7 +167,7 @@ void KonnectionHandling::slotNewMessage(KMessage *msg)
 
 				// Got the enemy's nickname
 			case KMessage::GREET:
-				KMessageBox::information(0L, i18n("We have a player. Let's start..."));
+				KMessageBox::information(nullptr, i18n("We have a player. Let's start..."));
 				emit sigStatusBar(i18n("Please place your ships. Use the \"Shift\" key to place the ships vertically."));
 				emit sigEnemyNickname(msg->field("nickname"));
 				emit sigSendNickname();
@@ -220,19 +220,19 @@ void KonnectionHandling::slotSocketError(int error)
 	switch(error)
 	{
 		case IO_ConnectError:
-			KMessageBox::error(0L, i18n("Connection refused by other host."));
+			KMessageBox::error(nullptr, i18n("Connection refused by other host."));
 			break;
 
 		case IO_LookupError:
-			KMessageBox::error(0L, i18n("Couldn't lookup host."));
+			KMessageBox::error(nullptr, i18n("Couldn't lookup host."));
 			break;
 
 		case IO_ReadError:
-			KMessageBox::error(0L, i18n("Couldn't connect to server."));
+			KMessageBox::error(nullptr, i18n("Couldn't connect to server."));
 			break;
 
 		default:
-			KMessageBox::error(0L, i18n("Unknown error; No: %1").arg(error));
+			KMessageBox::error(nullptr, i18n("Unknown error; No: %1").arg(error));
 			break;
 	}
 
@@ -241,6 +241,6 @@ void KonnectionHandling::slotSocketError(int error)
 
 void KonnectionHandling::slotLostServer()
 {
-	KMessageBox::error(0L, i18n("Connection to server lost. Aborting the game."));
+	KMessageBox::error(nullptr, i18n("Connection to server lost. Aborting the game."));
 	emit sigServerLost();
 }
diff --git a/kbattleship/kbattleship/kserverdialog.h b/kbattleship/kbattleship/kserverdialog.h
index 83d419b2..4a6f7c3f 100644
--- a/kbattleship/kbattleship/kserverdialog.h
+++ b/kbattleship/kbattleship/kserverdialog.h
@@ -33,7 +33,7 @@ class TDEServerDialog : public KDialogBase
 	TQ_OBJECT
   
 public:
-	TDEServerDialog(TQWidget *parent = 0, const char *name = 0);
+	TDEServerDialog(TQWidget *parent = nullptr, const char *name = nullptr);
 
 	TQString port() const;
 	TQString nickname() const;
diff --git a/kbattleship/kbattleship/kshiplist.cpp b/kbattleship/kbattleship/kshiplist.cpp
index 538b57e3..6fde77c9 100644
--- a/kbattleship/kbattleship/kshiplist.cpp
+++ b/kbattleship/kbattleship/kshiplist.cpp
@@ -38,7 +38,7 @@ int KShipList::shipTypeAt(int x, int y)
 {
 	int tempx, tempy;
 	KShip *shipiterator;
-	for(shipiterator = m_shiplist.first(); shipiterator != 0; shipiterator = m_shiplist.next())
+	for(shipiterator = m_shiplist.first(); shipiterator; shipiterator = m_shiplist.next())
 	{
 		if(shipiterator->shipystart() != shipiterator->shipystop())
 		{
@@ -92,7 +92,7 @@ KShip *KShipList::shipAt(int x, int y)
 {
 	int tempx, tempy;
 	KShip *shipiterator;
-	for(shipiterator = m_shiplist.first(); shipiterator != 0; shipiterator = m_shiplist.next())
+	for(shipiterator = m_shiplist.first(); shipiterator; shipiterator = m_shiplist.next())
 	{
 		for(tempy = shipiterator->shipystart(); tempy <= shipiterator->shipystop(); tempy++)
 		{
@@ -106,7 +106,7 @@ KShip *KShipList::shipAt(int x, int y)
 			}
 		}
 	}
-	return 0;
+	return nullptr;
 }
 
 bool KShipList::canAddShips()
@@ -119,7 +119,7 @@ bool KShipList::canAddShips()
 void KShipList::addNewShip(int button, int fieldx, int fieldy)
 {
 	if(!addNewShip(!(button == TQt::LeftButton), fieldx, fieldy))
-		KMessageBox::information(0L, i18n("You cannot place the ship here."));
+		KMessageBox::information(nullptr, i18n("You cannot place the ship here."));
 }
 
 bool KShipList::addNewShip(bool vertical, int fieldx, int fieldy)
@@ -129,7 +129,7 @@ bool KShipList::addNewShip(bool vertical, int fieldx, int fieldy)
 	if(!field.contains(ship))
 		return false;
 
-	for(KShip *placedShip = m_shiplist.first(); placedShip != 0; placedShip = m_shiplist.next())
+	for(KShip *placedShip = m_shiplist.first(); placedShip; placedShip = m_shiplist.next())
 	{
 		for(int i = fieldx-1; i < (fieldx + ship.width()+1); i++)
 		{
diff --git a/kbattleship/kbattleship/kstatdialog.h b/kbattleship/kbattleship/kstatdialog.h
index 4ba29c34..5793b8c2 100644
--- a/kbattleship/kbattleship/kstatdialog.h
+++ b/kbattleship/kbattleship/kstatdialog.h
@@ -25,7 +25,7 @@ class KStatDialog : public statDlg
 	TQ_OBJECT
   
 public:
-	KStatDialog(TQWidget *parent = 0, const char *name = 0);
+	KStatDialog(TQWidget *parent = nullptr, const char *name = nullptr);
 
 	void setShot();
 	void setShot(int shot);
diff --git a/kbattleship/kbattleship/main.cpp b/kbattleship/kbattleship/main.cpp
index 706fe650..8401ef6c 100644
--- a/kbattleship/kbattleship/main.cpp
+++ b/kbattleship/kbattleship/main.cpp
@@ -25,7 +25,7 @@ extern const char *clientName, *clientVersion, *clientDescription;
 
 static TDECmdLineOptions options[] =
 {
-	{"!+[URL]",                 I18N_NOOP("URL of server to attach to.  In the form kbattleship://host:port/ or host:port"), 0},
+	{"!+[URL]",                 I18N_NOOP("URL of server to attach to.  In the form kbattleship://host:port/ or host:port"), nullptr},
 	TDECmdLineLastOption
 };
 
@@ -55,7 +55,7 @@ int main(int argc, char *argv[])
 	TQString onePicCheck = locate("data", "kbattleship/pictures/hit.png");
 	if(picDirCheck.isEmpty() || onePicCheck.isEmpty())
 	{
-		KMessageBox::error(0, i18n("You don't have KBattleship pictures installed. The game cannot run without them!"));
+		KMessageBox::error(nullptr, i18n("You don't have KBattleship pictures installed. The game cannot run without them!"));
 		return 1;
 	}
 	
diff --git a/kblackbox/kbbgame.cpp b/kblackbox/kbbgame.cpp
index 3d14a89f..b940b161 100644
--- a/kblackbox/kbbgame.cpp
+++ b/kblackbox/kbbgame.cpp
@@ -265,7 +265,7 @@ void KBBGame::newGame()
 
   if (running) {
     bool cancel;
-    cancel = KMessageBox::warningContinueCancel(0,
+    cancel = KMessageBox::warningContinueCancel(nullptr,
          i18n("Do you really want to give up this game?"),TQString(),i18n("Give Up"))
       == KMessageBox::Cancel;
     if (cancel)
@@ -386,7 +386,7 @@ void KBBGame::giveUp()
 {
   if (running) {
     bool stop;
-    stop = KMessageBox::warningContinueCancel(0,
+    stop = KMessageBox::warningContinueCancel(nullptr,
 			    i18n(
 			    "Do you really want to give up this game?"),TQString(),i18n("Give Up"))
       == KMessageBox::Continue;
@@ -440,7 +440,7 @@ bool KBBGame::setSize( int w, int h )
   bool ok = false;
   if (((w+4) != gr->numC()) || ((h+4) != gr->numR())) {
     if (running) {
-      ok = KMessageBox::warningContinueCancel(0,
+      ok = KMessageBox::warningContinueCancel(nullptr,
 			      i18n(
 			      "This will be the end of the current game!"),TQString(),i18n("End Game"))
 	== KMessageBox::Continue;
@@ -469,7 +469,7 @@ bool KBBGame::setBalls( int n )
   bool ok = false;
   if (balls != n) {
     if (running) {
-      ok = KMessageBox::warningContinueCancel(0,
+      ok = KMessageBox::warningContinueCancel(nullptr,
 			 i18n("This will be the end of the current game!"),TQString(),i18n("End Game"))
 	== KMessageBox::Continue;
     } else ok = true;
diff --git a/kblackbox/kbbgfx.h b/kblackbox/kbbgfx.h
index b3cb5d68..d9621356 100644
--- a/kblackbox/kbbgfx.h
+++ b/kblackbox/kbbgfx.h
@@ -55,7 +55,7 @@ class KBBGraphic : public TQWidget
   TQ_OBJECT
   
 public:
-  KBBGraphic(  TQPixmap** p=0, TQWidget* parent=0, const char* name=0 );
+  KBBGraphic(  TQPixmap** p=nullptr, TQWidget* parent=nullptr, const char* name=nullptr );
   ~KBBGraphic();
 
   friend class KBBGame;
diff --git a/kblackbox/main.cpp b/kblackbox/main.cpp
index 47fe402a..8d30b2f7 100644
--- a/kblackbox/main.cpp
+++ b/kblackbox/main.cpp
@@ -29,7 +29,7 @@ int main( int argc, char **argv )
   TDEAboutData aboutData( "kblackbox", I18N_NOOP("KBlackBox"),
     KBVERSION, description, TDEAboutData::License_GPL,
     "(c) 1999-2000, Robert Cimrman");
-  aboutData.addAuthor("Robert Cimrman",0, "cimrman3@students.zcu.cz");
+  aboutData.addAuthor("Robert Cimrman",nullptr, "cimrman3@students.zcu.cz");
   TDECmdLineArgs::init( argc, argv, &aboutData );
 
   TDEApplication a;
diff --git a/kbounce/game.cpp b/kbounce/game.cpp
index 4d5182a9..843936e9 100644
--- a/kbounce/game.cpp
+++ b/kbounce/game.cpp
@@ -45,7 +45,7 @@
 
 
 #if HAVE_ARTS
-SimpleSoundServer *JezzGame::m_artsServer = 0;
+SimpleSoundServer *JezzGame::m_artsServer = nullptr;
 #endif
 TQString JezzGame::m_soundPath;
 bool JezzGame::m_sound = true;
@@ -341,8 +341,8 @@ void JezzView::viewportMouseReleaseEvent( TQMouseEvent *ev )
 /*************************************************************************/
 
 JezzGame::JezzGame( const TQPixmap &background, int ballNum, TQWidget *parent, const char *name )
-    : TQWidget( parent, name ), m_wall1( 0 ), m_wall2( 0 ),
-      m_text( 0 ), m_running( false ), m_percent( 0 ), m_pictured( false )
+    : TQWidget( parent, name ), m_wall1( nullptr ), m_wall2( nullptr ),
+      m_text( nullptr ), m_running( false ), m_percent( 0 ), m_pictured( false )
 {
    TQString path = tdeApp->dirs()->findResourceDir( "data", "kbounce/pics/ball0000.png" ) + "kbounce/pics/";
 
@@ -488,7 +488,7 @@ void JezzGame::makeBlack()
          m_buf[x][y] = m_field->tile( x, y );
 
    // fill areas that contains a ball
-   for ( Ball *ball=m_balls.first(); ball!=0; ball=m_balls.next() )
+   for ( Ball *ball=m_balls.first(); ball; ball=m_balls.next() )
       fill( ball->x()/TILE_SIZE, ball->y()/TILE_SIZE );
 
    // areas still free can be blacked now
@@ -572,7 +572,7 @@ void JezzGame::ballCollision( Ball */*ball*/, int /*x*/, int /*y*/, int tile )
           m_wall1->finish();
           m_wall1->fill( false );
           delete m_wall1;
-          m_wall1 = 0;
+          m_wall1 = nullptr;
       }
 
       if ( (tile==TILE_WALLDOWN || tile==TILE_WALLRIGHT) && m_wall2 )
@@ -581,7 +581,7 @@ void JezzGame::ballCollision( Ball */*ball*/, int /*x*/, int /*y*/, int tile )
           m_wall2->finish();
           m_wall2->fill( false );
           delete m_wall2;
-          m_wall2 = 0;
+          m_wall2 = nullptr;
       }
 
       // update view
@@ -644,14 +644,14 @@ void JezzGame::wallFinished( Wall *wall, int tile )
         {
             m_wall1->fill( false );
             delete m_wall1;
-            m_wall1 = 0;
+            m_wall1 = nullptr;
         }
 
         if ( m_wall2 )
         {
             m_wall2->fill( false );
             delete m_wall2;
-            m_wall2 = 0;
+            m_wall2 = nullptr;
         }
     } else
     {
@@ -659,14 +659,14 @@ void JezzGame::wallFinished( Wall *wall, int tile )
         {
             m_wall1->fill( true );
             delete m_wall1;
-            m_wall1 = 0;
+            m_wall1 = nullptr;
         }
 
         if ( m_wall2==wall && m_wall2 )
         {
             m_wall2->fill( true );
             delete m_wall2;
-            m_wall2 = 0;
+            m_wall2 = nullptr;
         }
     }
 
@@ -685,7 +685,7 @@ void JezzGame::tick()
         if ( m_wall2 ) m_wall2->advance();
     } else
     {
-        for ( Ball *ball=m_balls.first(); ball!=0; ball=m_balls.next() )
+        for ( Ball *ball=m_balls.first(); ball; ball=m_balls.next() )
             ball->update();
 
         if ( m_field ) m_field->update();
diff --git a/kbounce/game.h b/kbounce/game.h
index 761d1235..4b97c520 100644
--- a/kbounce/game.h
+++ b/kbounce/game.h
@@ -60,7 +60,7 @@ public:
    enum Direction { Up, Down, Left, Right };
 
    Wall( JezzField *field, int x, int y, Direction dir, int tile,
-	 TQObject *parent=0, const char *name=0 );
+	 TQObject *parent=nullptr, const char *name=nullptr );
 
    void finish();
    void fill( bool black );
@@ -91,7 +91,7 @@ class JezzField : public TQCanvas
    TQ_OBJECT
   
 public:
-   JezzField( const TQPixmap &tiles, const TQPixmap &background, TQObject* parent = 0, const char* name = 0 );
+   JezzField( const TQPixmap &tiles, const TQPixmap &background, TQObject* parent = nullptr, const char* name = nullptr );
 
    void setGameTile( int x, int y, bool black );
    void setBackground( const TQPixmap &background );
@@ -117,7 +117,7 @@ class JezzView : public TQCanvasView
   TQ_OBJECT
   
 public:
-   JezzView(TQCanvas* viewing=0, TQWidget* parent=0, const char* name=0, WFlags f=0);
+   JezzView(TQCanvas* viewing=nullptr, TQWidget* parent=nullptr, const char* name=nullptr, WFlags f=0);
 
 signals:
    void buildWall( int x, int y, bool vertical );
@@ -136,7 +136,7 @@ class JezzGame : public TQWidget
   
 
 public:
-   JezzGame( const TQPixmap &background, int ballNum, TQWidget *parent=0, const char *name=0 );
+   JezzGame( const TQPixmap &background, int ballNum, TQWidget *parent=nullptr, const char *name=nullptr );
    ~JezzGame();
 
    int percent();
diff --git a/kbounce/kbounce.cpp b/kbounce/kbounce.cpp
index c63d8dc1..a1d668c1 100644
--- a/kbounce/kbounce.cpp
+++ b/kbounce/kbounce.cpp
@@ -34,7 +34,7 @@
 #include "game.h"
 
 KJezzball::KJezzball()
-    : m_gameWidget( 0 )
+    : m_gameWidget( nullptr )
 {
     // setup variables
     m_game.level = 1;
@@ -141,7 +141,7 @@ void KJezzball::initXMLUI()
     m_backgroundShowAction->setEnabled( !m_backgroundDir.isEmpty() );
     m_backgroundShowAction->setChecked( m_showBackground );
 
-    m_soundAction = new TDEToggleAction( i18n("&Play Sounds"), 0, 0, 0, actionCollection(), "toggle_sound");
+    m_soundAction = new TDEToggleAction( i18n("&Play Sounds"), 0, nullptr, nullptr, actionCollection(), "toggle_sound");
 }
 
 void KJezzball::newGame()
diff --git a/kenolaba/AbTop.cpp b/kenolaba/AbTop.cpp
index 83dcea36..caad875b 100644
--- a/kenolaba/AbTop.cpp
+++ b/kenolaba/AbTop.cpp
@@ -52,8 +52,8 @@ AbTop::AbTop()
   timerState = noGame;
 
   myPort = Network::defaultPort;
-  currentEvalScheme = 0;
-  net = 0;
+  currentEvalScheme = nullptr;
+  net = nullptr;
 
   actValue = 0;
   stop = false;
@@ -189,7 +189,7 @@ void AbTop::setupActions()
   connect(showSpyAction, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(optionShowSpy(bool)));
 
 
-  levelAction = KStdGameAction::chooseGameType(0, 0, actionCollection());
+  levelAction = KStdGameAction::chooseGameType(nullptr, nullptr, actionCollection());
   TQStringList list;
   for (uint i=0; i<Nb_Levels; i++)
       list.append( i18n(LEVEL[i].label) );
@@ -214,7 +214,7 @@ void AbTop::toggleMenubar()
 
 void AbTop::configure()
 {
-  KDialogBase *dlg = new KDialogBase( 0, "ConfigureEvaluation", true,
+  KDialogBase *dlg = new KDialogBase( nullptr, "ConfigureEvaluation", true,
 				      i18n("Configure Evaluation"),
 				      KDialogBase::Ok | KDialogBase::Cancel,
 				      KDialogBase::Ok, true);
@@ -777,9 +777,9 @@ void AbTop::pastePosition(const char * text)
 void AbTop::gameNetwork(bool on)
 {
   if (!on) {
-    if (net != 0) {
+    if (net) {
       delete net;
-      net = 0;
+      net = nullptr;
     }
     return;
   }
@@ -788,7 +788,7 @@ void AbTop::gameNetwork(bool on)
   net = new Network(myPort);
   char *h, h2[100];
   int p, i;
-  for(h = hosts.first(); h!=0; h=hosts.next()) {
+  for(h = hosts.first(); h; h=hosts.next()) {
     for(i=0;h[i]!=0 && h[i]!=':';i++);
     if (h[i]==':')
       p = atoi(h+i+1);
diff --git a/kenolaba/Ball.cpp b/kenolaba/Ball.cpp
index 04d11be0..34d2ee05 100644
--- a/kenolaba/Ball.cpp
+++ b/kenolaba/Ball.cpp
@@ -8,7 +8,7 @@
 #include <math.h>
 #include <stdio.h>
 
-Ball* Ball::first = 0;
+Ball* Ball::first = nullptr;
 //TQImage Ball::back;
 int Ball::sizeX, Ball::sizeY;
 double Ball::lightX, Ball::lightY, Ball::lightZ;
@@ -29,7 +29,7 @@ void Ball::invalidate()
   Ball *b;
 
   /* invalidate all Balls... */
-  for(b=first;b!=0;b=b->next)
+  for(b=first;b;b=b->next)
     b->pm.resize(0,0);
 }
 
@@ -59,7 +59,7 @@ void Ball::setTexture(double c, double d)
 
 Ball::Ball(const TQColor& c, double a, int t)
 {
-  if (first ==0) {
+  if (!first) {
     sizeX = sizeY = -1;
     setLight();
     setTexture(7,.3);
@@ -83,9 +83,9 @@ Ball::~Ball()
   if (first == this)
     first = next;
   else {
-    for(b = first; b!=0; b=b->next)
+    for(b = first; b; b=b->next)
       if (b->next == this) break;
-    if (b!=0)
+    if (b)
       b->next = next;
   }
 }
@@ -207,7 +207,7 @@ BallPosition::BallPosition(int xp,int yp, Ball* d)
   def=d;
   actStep = -1;
   actType = ANIMATION_STOPPED;
-  actAnimation=0;
+  actAnimation=nullptr;
 }
 
 
@@ -219,10 +219,10 @@ BallWidget::BallWidget( int _freq, int bFr, TQWidget *parent, const char *name )
   int i;
 
   for(i=0;i<MAX_POSITION;i++)
-    positions[i] = 0;
+    positions[i] = nullptr;
 
   for(i=0;i<MAX_ANIMATION;i++)
-    animations[i] = 0;
+    animations[i] = nullptr;
 
   freq = _freq;
   isRunning = false;
@@ -234,7 +234,7 @@ BallWidget::BallWidget( int _freq, int bFr, TQWidget *parent, const char *name )
 
 BallWidget::~BallWidget()
 {
-  if (timer !=0)
+  if (timer)
     delete timer;
 }
 
@@ -242,7 +242,7 @@ void BallWidget::createBlending(int no, int s, Ball* b1, Ball* b2)
 {
   if (no<0 || no>= MAX_ANIMATION) return;
 
-  if (animations[no] !=0)
+  if (animations[no])
     delete animations[no];
 
   animations[no] = new BallAnimation(s,b1,b2);
@@ -254,7 +254,7 @@ void BallWidget::createBallPosition(int no, int x, int y, Ball* def)
 {
   if (no<0 || no>= MAX_POSITION) return;
 
-  if (positions[no] !=0)
+  if (positions[no])
     delete positions[no];
 
   positions[no] = new BallPosition(x,y, def);
@@ -264,8 +264,8 @@ void BallWidget::startAnimation(int pos, int anim, int type)
 {
   BallPosition *p;
 
-  if (pos<0 || pos>=MAX_POSITION || positions[pos]==0) return;
-  if (anim<0 || anim>=MAX_ANIMATION || animations[anim]==0) return;
+  if (pos<0 || pos>=MAX_POSITION || !positions[pos]) return;
+  if (anim<0 || anim>=MAX_ANIMATION || !animations[anim]) return;
 
   p = positions.at(pos);
   p->actAnimation = animations.at(anim);
@@ -286,11 +286,11 @@ void BallWidget::stopAnimation(int pos)
 {
   BallPosition *p;
 
-  if (pos<0 || pos>=MAX_POSITION || positions[pos]==0) return;
+  if (pos<0 || pos>=MAX_POSITION || !positions[pos]) return;
 
   p = positions.at(pos);
   if (p->actType == ANIMATION_STOPPED ||
-      p->actAnimation == 0) return;
+      p->actAnimation == nullptr) return;
 
   if (p->actType == ANIMATION_LOOP ||
       p->actType == ANIMATION_CYCLE) {
@@ -330,13 +330,13 @@ void BallWidget::paint(TQPaintDevice *pd)
 
   for(i=0;i<MAX_POSITION;i++) {
     p = positions.at(i);
-    if (p==0) continue;
+    if (!p) continue;
 
     xReal = (w + p->x * realSize / 500 - Ball::w() )/2;
     yReal = (h + p->y * realSize / 500 - Ball::h() )/2;
 
-    if (p->actAnimation==0 || p->actStep==-1) {
-      if (p->def !=0 )
+    if (!p->actAnimation || p->actStep==-1) {
+      if (p->def )
 	bitBlt( pd, xReal, yReal, p->def->pixmap() );
     }
     else {
@@ -360,10 +360,9 @@ void BallWidget::animate()
 
   for(i=0;i<MAX_POSITION;i++) {
     p = positions.at(i);
-    if (p==0) continue;
+    if (!p) continue;
 
-    if (p->actType == ANIMATION_STOPPED ||
-	p->actAnimation ==0) continue;
+    if (p->actType == ANIMATION_STOPPED || !p->actAnimation) continue;
 
     p->actStep += p->actDir;
     if (p->actStep <= -1) {
@@ -383,7 +382,7 @@ void BallWidget::animate()
       }
       else {
 	p->actType = ANIMATION_STOPPED;
-	p->actAnimation = 0;
+	p->actAnimation = nullptr;
 	emit animationFinished(i);
       }
     }
@@ -394,8 +393,8 @@ void BallWidget::animate()
     /* Update Pixmap */
     xReal = (w + p->x * realSize / 500 - Ball::w() )/2;
     yReal = (h + p->y * realSize / 500 - Ball::h() )/2;
-    if (p->actAnimation==0 || p->actStep==-1) {
-      if (p->def !=0 )
+    if (!p->actAnimation || p->actStep==-1) {
+      if (p->def )
 	bitBlt( this, xReal, yReal, p->def->pixmap() );
     }
     else {
diff --git a/kenolaba/Ball.h b/kenolaba/Ball.h
index dfeb29da..a8dce30a 100644
--- a/kenolaba/Ball.h
+++ b/kenolaba/Ball.h
@@ -100,7 +100,7 @@ class BallWidget : public TQWidget
   
 
  public:
-  BallWidget(int _freq, int bFr, TQWidget *parent = 0, const char *name = 0);
+  BallWidget(int _freq, int bFr, TQWidget *parent = nullptr, const char *name = nullptr);
   ~BallWidget();
 
   void createBlending(int, int, Ball* , Ball* );
@@ -143,7 +143,7 @@ class BallTest: public BallWidget
   TQ_OBJECT
   
 public:
-  BallTest(TQWidget *parent=0, const char *name=0 );
+  BallTest(TQWidget *parent=nullptr, const char *name=nullptr );
 protected:
   void mousePressEvent( TQMouseEvent * );
   void mouseReleaseEvent( TQMouseEvent * );
diff --git a/kenolaba/Board.cpp b/kenolaba/Board.cpp
index 2cf8ccb2..38ea2a2f 100644
--- a/kenolaba/Board.cpp
+++ b/kenolaba/Board.cpp
@@ -116,7 +116,7 @@ Board::Board()
   spyDepth = 0;
   debug = 0;
   realMaxDepth = 1;
-  _evalScheme = 0;
+  _evalScheme = nullptr;
 }
 
 void Board::setEvalScheme(EvalScheme* scheme)
diff --git a/kenolaba/Board.h b/kenolaba/Board.h
index a91f67e9..b25f6a36 100644
--- a/kenolaba/Board.h
+++ b/kenolaba/Board.h
@@ -87,7 +87,7 @@ class Board : public TQObject
   void showHist();
 
   /* Evaluation Scheme to use */
-  void setEvalScheme( EvalScheme* scheme = 0);
+  void setEvalScheme( EvalScheme* scheme = nullptr);
   EvalScheme* evalScheme() { return _evalScheme; }
 
   /* Calculate a value for actual position
diff --git a/kenolaba/BoardWidget.cpp b/kenolaba/BoardWidget.cpp
index 40a61659..189fd4c6 100644
--- a/kenolaba/BoardWidget.cpp
+++ b/kenolaba/BoardWidget.cpp
@@ -37,7 +37,7 @@
 BoardWidget::BoardWidget(Board& b, TQWidget *parent, const char *name)
   : BallWidget(10,9,parent, name), board(b)
 {
-  pList =0;
+  pList =nullptr;
   gettingMove = false;
   editMode = false;
   renderMode = false;
@@ -81,11 +81,11 @@ BoardWidget::BoardWidget(Board& b, TQWidget *parent, const char *name)
 BoardWidget::~BoardWidget()
 {
   for(int i=1; i<7; i++)
-    if (arrow[i] != 0)
+    if (arrow[i])
       delete arrow[i];
 
 #ifdef HAVE_KIR  
-  if (m_backRenderer != 0)
+  if (m_backRenderer)
     delete m_backRenderer;
 #endif
   delete boardColor;
@@ -99,7 +99,7 @@ BoardWidget::~BoardWidget()
 void BoardWidget::configure()
 {
 #ifdef HAVE_KIR
-  if (m_backRenderer != 0) {
+  if (m_backRenderer) {
     m_backRenderer->setup();
     m_backRenderer->manager()->saveModules();
   }
@@ -136,17 +136,17 @@ void BoardWidget::initBalls()
   for(j=-4;j<5;j++)
     for(i= ((j>0)?j-4:-4) ; i< ((j<0)?5+j:5) ;i++) {
       pos=60+j*11+i;
-      createPos(pos, i,j, 0);
+      createPos(pos, i,j, nullptr);
     }
 
   pos = 0;
   /* the outer marks of color1 */
-  for(i=0;i<3;i++) createPos(pos++, -6, i-4, 0 );
-  for(i=0;i<3;i++) createPos(pos++, 2+i, i-4, 0 );
+  for(i=0;i<3;i++) createPos(pos++, -6, i-4, nullptr );
+  for(i=0;i<3;i++) createPos(pos++, 2+i, i-4, nullptr );
 
   /* the outer marks of color2 */
-  for(i=0;i<3;i++) createPos(pos++, 6, 4-i, 0 );
-  for(i=0;i<3;i++) createPos(pos++, -2-i, 4-i, 0 );
+  for(i=0;i<3;i++) createPos(pos++, 6, 4-i, nullptr );
+  for(i=0;i<3;i++) createPos(pos++, -2-i, 4-i, nullptr );
 }  
 
 void BoardWidget::resizeEvent(TQResizeEvent *e)
@@ -322,17 +322,17 @@ void BoardWidget::updateBalls()
       else if (w==Board::color2bright)
         startAnimation(pos,4,ANIMATION_LOOP);
       else if (w==Board::free) {
-	positions[pos]->def= 0;
-	positions[pos]->actAnimation = 0;
+	positions[pos]->def= nullptr;
+	positions[pos]->actAnimation = nullptr;
 	//	stopAnimation(pos);
       }                         
     }
   
   for(i=0;i<6;i++)
-    positions[i]->def= ((14-color1Count)>i && color1Count>0) ? n1:0;
+    positions[i]->def= ((14-color1Count)>i && color1Count>0) ? n1:nullptr;
   
   for(i=6;i<12;i++)
-    positions[i]->def= ((14-color2Count)>i-6 && color2Count>0) ? n2:0;
+    positions[i]->def= ((14-color2Count)>i-6 && color2Count>0) ? n2:nullptr;
   
 }
 
@@ -617,7 +617,7 @@ void BoardWidget::showStart(const Move& m, int step, bool updateGUI)
 
 void BoardWidget::choseMove(MoveList *pl)
 { 
-  if (!gettingMove && pl != 0) {
+  if (!gettingMove && pl) {
     pList = pl;
     gettingMove = true;
     mbDown = false;
diff --git a/kenolaba/BoardWidget.h b/kenolaba/BoardWidget.h
index 3b5dd3ad..4cc93596 100644
--- a/kenolaba/BoardWidget.h
+++ b/kenolaba/BoardWidget.h
@@ -18,7 +18,7 @@ class BoardWidget : public BallWidget
   
 	
  public:
-	BoardWidget(Board&, TQWidget *parent = 0, const char *name = 0);
+	BoardWidget(Board&, TQWidget *parent = nullptr, const char *name = nullptr);
 	~BoardWidget();
 
 	void createPos(int , int , int , Ball*);
diff --git a/kenolaba/EvalDlgImpl.cpp b/kenolaba/EvalDlgImpl.cpp
index 08aa4959..1082083e 100644
--- a/kenolaba/EvalDlgImpl.cpp
+++ b/kenolaba/EvalDlgImpl.cpp
@@ -275,7 +275,7 @@ void EvalDlgImpl::select(int i)
   TQString name = evalList->text(i);
 
   delete _scheme;
-  _scheme = 0;
+  _scheme = nullptr;
 
   // 2 fixed entries: 0 is Current (origScheme), 1 is Default
 
diff --git a/kenolaba/EvalScheme.cpp b/kenolaba/EvalScheme.cpp
index 54fb34f6..4e319cdd 100644
--- a/kenolaba/EvalScheme.cpp
+++ b/kenolaba/EvalScheme.cpp
@@ -185,7 +185,7 @@ void EvalScheme::setInARowValue(int stones, int value)
 EvalScheme* EvalScheme::create(TQString scheme)
 {
   int pos = scheme.find('=');
-  if (pos<0) return 0;
+  if (pos<0) return nullptr;
   
   EvalScheme* evalScheme = new EvalScheme( scheme.left(pos) );
   evalScheme->setDefaults();
diff --git a/kenolaba/Network.cpp b/kenolaba/Network.cpp
index 848f0e9b..772771ba 100644
--- a/kenolaba/Network.cpp
+++ b/kenolaba/Network.cpp
@@ -12,7 +12,7 @@
 
 Listener::Listener(const char* h, int p, struct sockaddr_in s,bool r)
 {
-  if (h==0)
+  if (!h)
     host[0]=0;
   else {
     int l = strlen(h);
@@ -75,7 +75,7 @@ Network::~Network()
   int len = sprintf(tmp, "unreg %d", ntohs(mySin.sin_port));
   
   Listener* l;
-  for(l=listeners.first(); l!=0; l=listeners.next()) {
+  for(l=listeners.first(); l; l=listeners.next()) {
     if (l->reachable)
       sendString( l->sin, tmp, len);
   }
@@ -104,7 +104,7 @@ void Network::gotConnection()
   if (strncmp(tmp,"reg ",4)==0) {
     int port = atoi(tmp+4);
     sin.sin_port = htons( port );
-    Listener *l = new Listener(0,0,sin);
+    Listener *l = new Listener(nullptr,0,sin);
     //    printf("Reg of 0x%x:%d\n", 
     //	   ntohl(sin.sin_addr.s_addr ), ntohs(sin.sin_port));
     listeners.append(l);
@@ -115,10 +115,10 @@ void Network::gotConnection()
     int port = atoi(tmp+6);
     sin.sin_port = htons( port );
     Listener* l;
-    for(l=listeners.first(); l!=0; l=listeners.next())
+    for(l=listeners.first(); l; l=listeners.next())
       if (l->sin.sin_addr.s_addr == sin.sin_addr.s_addr &&
 	  l->sin.sin_port == sin.sin_port) break;
-    if (l==0) {
+    if (!l) {
       printf("Error: UnReg of 0x%x:%d. Not Found\n",
 	     ntohl(sin.sin_addr.s_addr), ntohs(sin.sin_port));
       return;
@@ -166,7 +166,7 @@ void Network::broadcast(const char* pos)
   char tmp[1024];
   int len = sprintf(tmp,"pos %s", pos);
   
-  for(Listener* l=listeners.first(); l!=0; l=listeners.next())
+  for(Listener* l=listeners.first(); l; l=listeners.next())
     if (l->reachable)
       l->reachable = sendString(l->sin, tmp, len);
 }
diff --git a/kenolaba/kenolaba.cpp b/kenolaba/kenolaba.cpp
index f642fef3..04b81ff3 100644
--- a/kenolaba/kenolaba.cpp
+++ b/kenolaba/kenolaba.cpp
@@ -18,10 +18,10 @@ static const char description[] =
 
 static TDECmdLineOptions options[] =
 {
-  { "h", 0, 0},
-  { "host <host>", I18N_NOOP("Use 'host' for network game"), 0 },
-  { "p", 0, 0},
-  { "port <port>", I18N_NOOP("Use 'port' for network game"), 0 },
+  { "h", nullptr, nullptr},
+  { "host <host>", I18N_NOOP("Use 'host' for network game"), nullptr },
+  { "p", nullptr, nullptr},
+  { "port <port>", I18N_NOOP("Use 'port' for network game"), nullptr },
   TDECmdLineLastOption
 };
 
@@ -41,7 +41,7 @@ int main(int argc, char *argv[])
 	TDEAboutData aboutData( "kenolaba", I18N_NOOP("Kenolaba"),
 		KENOLABA_VERSION, description, TDEAboutData::License_GPL,
 		"(c) 1997-2000, Josef Weidendorfer");
-	aboutData.addAuthor("Josef Weidendorfer",0, "Josef.Weidendorfer@gmx.de");
+	aboutData.addAuthor("Josef Weidendorfer",nullptr, "Josef.Weidendorfer@gmx.de");
 	aboutData.addAuthor("Robert Williams");
 	TDECmdLineArgs::init( argc, argv, &aboutData );
 	TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
diff --git a/kfouleggs/ai.cpp b/kfouleggs/ai.cpp
index bd145456..06fbdc64 100644
--- a/kfouleggs/ai.cpp
+++ b/kfouleggs/ai.cpp
@@ -7,19 +7,19 @@
 
 
 const AI::Data FEAI::DATA[] = {
-    { "OccupiedLines", I18N_NOOP("Occupied lines:"), 0,
+    { "OccupiedLines", I18N_NOOP("Occupied lines:"), nullptr,
       false, nbOccupiedLines },
     { "Spaces", I18N_NOOP("Number of spaces:"), I18N_NOOP("Number of spaces under mean height"),
       false, nbSpaces },
-    { "Peak2Peak", I18N_NOOP("Peak-to-peak distance:"), 0,
+    { "Peak2Peak", I18N_NOOP("Peak-to-peak distance:"), nullptr,
       false, peakToPeak },
-    { "MeanHeight", I18N_NOOP("Mean height:"), 0,
+    { "MeanHeight", I18N_NOOP("Mean height:"), nullptr,
       false, mean },
-    { "RemovedEggs", I18N_NOOP("Number of removed eggs:"), 0,
+    { "RemovedEggs", I18N_NOOP("Number of removed eggs:"), nullptr,
       false, nbRemoved },
-    { "Puyos", I18N_NOOP("Number of puyos:"), 0,
+    { "Puyos", I18N_NOOP("Number of puyos:"), nullptr,
       true, nbPuyos },
-    { "ChainedPuyos", I18N_NOOP("Number of chained puyos:"), 0,
+    { "ChainedPuyos", I18N_NOOP("Number of chained puyos:"), nullptr,
       true, nbChained },
     LastData
 };
diff --git a/kfouleggs/board.cpp b/kfouleggs/board.cpp
index aa62626c..36d21234 100644
--- a/kfouleggs/board.cpp
+++ b/kfouleggs/board.cpp
@@ -58,7 +58,7 @@ void FEBoard::removeBlock(const Coord &c)
     // remove surrounding garbage
     CoordList list = matrix().neighbours(c, true, true);
     for (CoordList::const_iterator i = list.begin(); i!=list.end(); ++i)
-		if ( matrix()[*i]!=0 && matrix()[*i]->isGarbage() )
+		if ( matrix()[*i] && matrix()[*i]->isGarbage() )
             Board::removeBlock(*i);
 }
 
@@ -70,7 +70,7 @@ bool FEBoard::toBeRemoved(const Coord &c) const
 bool FEBoard::toFall(const Coord &c) const
 {
     Coord under = c - Coord(0, 1);
-    return ( matrix()[under]==0 );
+    return ( matrix()[under]==nullptr );
 }
 
 void FEBoard::remove()
diff --git a/kfouleggs/main.cpp b/kfouleggs/main.cpp
index db73d96e..c1a46319 100644
--- a/kfouleggs/main.cpp
+++ b/kfouleggs/main.cpp
@@ -16,7 +16,7 @@ const MPGameInfo MP_GAME_INFO = {
     4,     // max nb local games
     500,   // interval
     true,  // IA allowed
-    0, 0   // no setting slots
+    nullptr, nullptr   // no setting slots
 };
 
 const MainData MAIN_DATA = {
diff --git a/kgoldrunner/src/kgoldrunner.cpp b/kgoldrunner/src/kgoldrunner.cpp
index d2d5e262..ce3d4e22 100644
--- a/kgoldrunner/src/kgoldrunner.cpp
+++ b/kgoldrunner/src/kgoldrunner.cpp
@@ -34,7 +34,7 @@
 #include "kgoldrunner.h"
 
 KGoldrunner::KGoldrunner()
-    : TDEMainWindow (0, "KGoldrunner"),
+    : TDEMainWindow (nullptr, "KGoldrunner"),
       view (new KGrCanvas (this))
 {
 /******************************************************************************/
diff --git a/kgoldrunner/src/kgrcanvas.cpp b/kgoldrunner/src/kgrcanvas.cpp
index dcb46040..099235a4 100644
--- a/kgoldrunner/src/kgrcanvas.cpp
+++ b/kgoldrunner/src/kgrcanvas.cpp
@@ -35,7 +35,7 @@
 class KGoldrunner;
 
 KGrCanvas::KGrCanvas (TQWidget * parent, const char *name)
-	: TQCanvasView (0, parent, name)
+	: TQCanvasView (nullptr, parent, name)
 {
     setBackgroundMode (NoBackground);
     m = new TQCursor ();		// For handling the mouse.
@@ -199,7 +199,7 @@ void KGrCanvas::makeTitle ()
     // This uses a calculated TQLabel and TQFont size because a TQCanvasText
     // object does not always display scaled-up fonts cleanly (in TQt 3.1.1).
 
-    if (title != 0)
+    if (title)
 	title->close (true);		// Close and delete previous title.
 
     title = new TQLabel ("", this);
@@ -462,7 +462,7 @@ void KGrCanvas::initView()
     makeBorder();
 
     // Create a title item, in off-white colour, on top of the border.
-    title = 0;
+    title = nullptr;
     makeTitle();
 
     // Create an empty list of enemy sprites.
diff --git a/kgoldrunner/src/kgrcanvas.h b/kgoldrunner/src/kgrcanvas.h
index 2eaec845..3c48b590 100644
--- a/kgoldrunner/src/kgrcanvas.h
+++ b/kgoldrunner/src/kgrcanvas.h
@@ -33,7 +33,7 @@ class KGrCanvas : public TQCanvasView
 	TQ_OBJECT
   
 public:
-	KGrCanvas (TQWidget * parent = 0, const char *name = 0);
+	KGrCanvas (TQWidget * parent = nullptr, const char *name = nullptr);
 	virtual ~KGrCanvas();
 
 	void changeLandscape (const TQString & name);
diff --git a/kgoldrunner/src/kgrdialog.cpp b/kgoldrunner/src/kgrdialog.cpp
index 0cb8a947..660474c2 100644
--- a/kgoldrunner/src/kgrdialog.cpp
+++ b/kgoldrunner/src/kgrdialog.cpp
@@ -612,7 +612,7 @@ KGrECDialog::KGrECDialog (int action, int collnIndex,
     prefixL  = new TQLabel (i18n("File name prefix:"), prefixBox);
     ecPrefix = new TQLineEdit (prefixBox);
 
-    ecGrp    = new TQButtonGroup (1, TQt::Horizontal, 0, dad);
+    ecGrp    = new TQButtonGroup (1, TQt::Horizontal, nullptr, dad);
     mainLayout->addWidget (ecGrp);
     ecTradB  = new TQRadioButton (i18n("Traditional rules"), ecGrp);
     ecKGrB   = new TQRadioButton (i18n("KGoldrunner rules"), ecGrp);
diff --git a/kgoldrunner/src/kgrdialog.h b/kgoldrunner/src/kgrdialog.h
index 9012e62d..8374748c 100644
--- a/kgoldrunner/src/kgrdialog.h
+++ b/kgoldrunner/src/kgrdialog.h
@@ -62,7 +62,7 @@ TQ_OBJECT
 public:
     KGrSLDialog (int action, int requestedLevel, int collnIndex,
 			TQPtrList<KGrCollection> & gamesList, KGrGame * theGame,
-			TQWidget * parent = 0, const char *name = 0);
+			TQWidget * parent = nullptr, const char *name = nullptr);
     ~KGrSLDialog();
 
     int selectedLevel()	{return (number->value());}
@@ -117,7 +117,7 @@ TQ_OBJECT
   
 public:
     KGrNHDialog (const TQString & levelName, const TQString & levelHint,
-			TQWidget * parent = 0, const char * name = 0);
+			TQWidget * parent = nullptr, const char * name = nullptr);
     ~KGrNHDialog();
 
     TQString	getName()	{return (nhName->text());}
@@ -143,7 +143,7 @@ TQ_OBJECT
 public:
     KGrECDialog (int action, int collnIndex,
 			TQPtrList<KGrCollection> & gamesList,
-			TQWidget *parent = 0, const char *name = 0);
+			TQWidget *parent = nullptr, const char *name = nullptr);
     ~KGrECDialog();
 
     TQString	getName()	{return (ecName->text());}
diff --git a/kgoldrunner/src/kgrfigure.cpp b/kgoldrunner/src/kgrfigure.cpp
index bfe7a6e1..2868cfe4 100644
--- a/kgoldrunner/src/kgrfigure.cpp
+++ b/kgoldrunner/src/kgrfigure.cpp
@@ -1584,7 +1584,7 @@ int KGrEnemy::distanceDown (int x, int y, int deltah)
 	}
     }
     if (rungs == 1) {
-	for (KGrEnemy *enemy=enemies->first();enemy!=0;enemy=enemies->next()) {
+	for (KGrEnemy *enemy=enemies->first();enemy;enemy=enemies->next()) {
 	    if((x*16==enemy->getx()) && (y*16+16==enemy->gety()))
 		rungs = 0;		// Pit is blocked.  Find another way.
 	}
diff --git a/kgoldrunner/src/kgrgame.cpp b/kgoldrunner/src/kgrgame.cpp
index f770b310..3d3afcc2 100644
--- a/kgoldrunner/src/kgrgame.cpp
+++ b/kgoldrunner/src/kgrgame.cpp
@@ -456,12 +456,12 @@ int KGrGame::loadLevel (int levelNo)
       levelHint = i18n((const char *) levelHintC.left(len-1));
 
   // Disconnect edit-mode slots from signals from "view".
-  disconnect (view, TQ_SIGNAL (mouseClick(int)), 0, 0);
-  disconnect (view, TQ_SIGNAL (mouseLetGo(int)), 0, 0);
+  disconnect (view, TQ_SIGNAL (mouseClick(int)), nullptr, nullptr);
+  disconnect (view, TQ_SIGNAL (mouseLetGo(int)), nullptr, nullptr);
 
   if (newLevel) {
       hero->setEnemyList (&enemies);
-      for (enemy=enemies.first();enemy != 0; enemy = enemies.next())
+      for (enemy=enemies.first();enemy; enemy = enemies.next())
 	enemy->setEnemyList(&enemies);
   }
 
@@ -1278,7 +1278,7 @@ void KGrGame::showFigurePositions()
 {
     if (KGrObject::frozen) {
 	hero->showState('p');
-	for (enemy=enemies.first();enemy != 0; enemy = enemies.next()) {
+	for (enemy=enemies.first();enemy; enemy = enemies.next()) {
 	    enemy->showState('p');
 	}
     }
@@ -1294,7 +1294,7 @@ void KGrGame::showHeroState()
 void KGrGame::showEnemyState(int enemyId)
 {
     if (KGrObject::frozen) {
-	for (enemy=enemies.first();enemy != 0; enemy = enemies.next()) {
+	for (enemy=enemies.first();enemy; enemy = enemies.next()) {
 	    if (enemy->enemyId == enemyId) enemy->showState('s');
 	}
     }
@@ -2030,8 +2030,8 @@ void KGrGame::setEditableCell (int i, int j, char type)
 void KGrGame::showEditLevel()
 {
     // Disconnect play-mode slots from signals from "view".
-    disconnect (view, TQ_SIGNAL(mouseClick(int)), 0, 0);
-    disconnect (view, TQ_SIGNAL(mouseLetGo(int)), 0, 0);
+    disconnect (view, TQ_SIGNAL(mouseClick(int)), nullptr, nullptr);
+    disconnect (view, TQ_SIGNAL(mouseLetGo(int)), nullptr, nullptr);
 
     // Connect edit-mode slots to signals from "view".
     connect (view, TQ_SIGNAL(mouseClick(int)), TQ_SLOT(doEdit(int)));
@@ -2212,7 +2212,7 @@ bool KGrGame::ownerOK (Owner o)
     KGrCollection * c;
     bool OK = false;
 
-    for (c = collections.first(); c != 0; c = collections.next()) {
+    for (c = collections.first(); c; c = collections.next()) {
 	if (c->owner == o) {
 	    OK = true;
 	    break;
@@ -2361,7 +2361,7 @@ void KGrGame::mapCollections()
     TQString		fileName2;
 
     // Find KGoldrunner level files, sorted by name (same as numerical order).
-    for (colln = collections.first(); colln != 0; colln = collections.next()) {
+    for (colln = collections.first(); colln; colln = collections.next()) {
 	d.setPath ((colln->owner == SYSTEM)	? systemDataDir + "levels/"
 						: userDataDir + "levels/");
 	d_path = d.path();
@@ -2552,7 +2552,7 @@ bool KGrGame::saveCollections (Owner o)
     int			i, len;
     char		ch;
 
-    for (colln = collections.first(); colln != 0; colln = collections.next()) {
+    for (colln = collections.first(); colln; colln = collections.next()) {
 	if (colln->owner == o) {
 	    line.sprintf ("%03d %c %s %s\n", colln->nLevels, colln->settings,
 				colln->prefix.myStr(),
diff --git a/kgoldrunner/src/kgrgame.h b/kgoldrunner/src/kgrgame.h
index 2d6b1a57..686a67a5 100644
--- a/kgoldrunner/src/kgrgame.h
+++ b/kgoldrunner/src/kgrgame.h
@@ -271,7 +271,7 @@ private:
 class KGrThumbNail : public TQFrame
 {
 public:
-    KGrThumbNail (TQWidget *parent = 0, const char *name = 0);
+    KGrThumbNail (TQWidget *parent = nullptr, const char *name = nullptr);
     void setFilePath (TQString &, TQLabel *);	// Set filepath and name field.
 
     static TQColor backgroundColor;
diff --git a/kgoldrunner/src/main.cpp b/kgoldrunner/src/main.cpp
index 287f3b85..e4ad68f6 100644
--- a/kgoldrunner/src/main.cpp
+++ b/kgoldrunner/src/main.cpp
@@ -24,7 +24,7 @@ int main (int argc, char **argv)
 		     "(C) 2003 Ian Wadham and Marco Krüger");
     about.addAuthor( "Ian Wadham", I18N_NOOP("Current author"),
     		     "ianw2@optusnet.com.au" );
-    about.addAuthor( "Marco Krüger", I18N_NOOP("Original author"), 0);
+    about.addAuthor( "Marco Krüger", I18N_NOOP("Original author"), nullptr);
 
     TDECmdLineArgs::init (argc, argv, &about);
 
diff --git a/kjumpingcube/cubeboxbase.h b/kjumpingcube/cubeboxbase.h
index 63bc0529..b25b55bd 100644
--- a/kjumpingcube/cubeboxbase.h
+++ b/kjumpingcube/cubeboxbase.h
@@ -162,7 +162,7 @@ void CubeBoxBase<T>::deleteCubes()
       
    delete [] cubes;
       
-   cubes=0;
+   cubes=nullptr;
 }
 /*
 template<class T>
diff --git a/kjumpingcube/kcubeboxwidget.h b/kjumpingcube/kcubeboxwidget.h
index 2768735f..0f539b8b 100644
--- a/kjumpingcube/kcubeboxwidget.h
+++ b/kjumpingcube/kcubeboxwidget.h
@@ -53,10 +53,10 @@ class KCubeBoxWidget : public TQWidget , public CubeBoxBase<KCubeWidget>
    TQ_OBJECT
   
 public:
-   KCubeBoxWidget(const int dim=1,TQWidget *parent=0,const char *name=0);
+   KCubeBoxWidget(const int dim=1,TQWidget *parent=nullptr,const char *name=nullptr);
       
-   KCubeBoxWidget(CubeBox& box, TQWidget *parent=0,const char *name=0);
-   KCubeBoxWidget(const KCubeBoxWidget& box,TQWidget *parent=0,const char *name=0);
+   KCubeBoxWidget(CubeBox& box, TQWidget *parent=nullptr,const char *name=nullptr);
+   KCubeBoxWidget(const KCubeBoxWidget& box,TQWidget *parent=nullptr,const char *name=nullptr);
    virtual ~KCubeBoxWidget();
    
    KCubeBoxWidget& operator= (CubeBox& box);
diff --git a/kjumpingcube/kcubewidget.h b/kjumpingcube/kcubewidget.h
index 8a6114f4..603b847d 100644
--- a/kjumpingcube/kcubewidget.h
+++ b/kjumpingcube/kcubewidget.h
@@ -39,7 +39,7 @@ class KCubeWidget : public TQFrame , public Cube
          
 public:
    /** constructs a new KCubeWidget*/
-   KCubeWidget(TQWidget* parent=0,const char* name=0
+   KCubeWidget(TQWidget* parent=nullptr,const char* name=nullptr
                     ,Owner owner=Cube::Nobody,int value=1,int max=0);  
    virtual ~KCubeWidget();   
    
diff --git a/kjumpingcube/kjumpingcube.cpp b/kjumpingcube/kjumpingcube.cpp
index 38840680..e70af3d9 100644
--- a/kjumpingcube/kjumpingcube.cpp
+++ b/kjumpingcube/kjumpingcube.cpp
@@ -108,7 +108,7 @@ void KJumpingCube::saveGame(bool saveAs)
 
       do
       {
-         url = KFileDialog::getSaveURL(gameURL.url(),"*.kjc",this,0);
+         url = KFileDialog::getSaveURL(gameURL.url(),"*.kjc",this,nullptr);
 
          if(url.isEmpty())
             return;
@@ -163,7 +163,7 @@ void KJumpingCube::openGame()
 
    do
    {
-      url = KFileDialog::getOpenURL( gameURL.url(), "*.kjc", this, 0 );
+      url = KFileDialog::getOpenURL( gameURL.url(), "*.kjc", this, nullptr );
       if( url.isEmpty() )
          return;
       if(!TDEIO::NetAccess::exists(url,true,this))
@@ -269,7 +269,7 @@ void KJumpingCube::showOptions(){
     return;
 
   TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Prefs::self(), KDialogBase::Swallow);
-  dialog->addPage(new Settings(0, "General"), i18n("General"), "package_settings");
+  dialog->addPage(new Settings(nullptr, "General"), i18n("General"), "package_settings");
   connect(dialog, TQ_SIGNAL(settingsChanged()), view, TQ_SLOT(loadSettings()));
   dialog->show();
 }
diff --git a/kjumpingcube/main.cpp b/kjumpingcube/main.cpp
index 39812a61..3fce73fa 100644
--- a/kjumpingcube/main.cpp
+++ b/kjumpingcube/main.cpp
@@ -39,7 +39,7 @@ int main(int argc, char *argv[])
     TDEAboutData aboutData( "kjumpingcube", I18N_NOOP("KJumpingCube"),
                           KJC_VERSION, description, TDEAboutData::License_GPL,
                           "(c) 1998-2000, Matthias Kiefer");
-    aboutData.addAuthor("Matthias Kiefer",0, "matthias.kiefer@gmx.de");
+    aboutData.addAuthor("Matthias Kiefer",nullptr, "matthias.kiefer@gmx.de");
     aboutData.addAuthor("Benjamin Meyer",I18N_NOOP("Various improvements"), "ben+kjumpingcube@meyerhome.net");
     TDECmdLineArgs::init( argc, argv, &aboutData );
 
diff --git a/klickety/board.cpp b/klickety/board.cpp
index 4adc5c59..bdd71014 100644
--- a/klickety/board.cpp
+++ b/klickety/board.cpp
@@ -78,7 +78,7 @@ void KLBoard::remove()
 bool KLBoard::toFall(const Coord &c) const
 {
     Coord under(c.first, c.second-1);
-    return ( matrix()[under]==0 );
+    return !matrix()[under];
 }
 
 void KLBoard::computeInfos()
@@ -89,7 +89,7 @@ void KLBoard::computeInfos()
     for (uint i=0; i<matrix().width(); i++)
         for (uint j=0; j<firstClearLine(); j++) {
             Coord c(i, j);
-            if ( matrix()[c]!=0 ) empty[i] = false;
+            if ( matrix()[c] ) empty[i] = false;
         }
 }
 
@@ -121,7 +121,7 @@ bool KLBoard::doSlide(bool doAll, bool first, bool lineByLine)
         // do move
         for (uint i=1; i<matrix().width(); i++) {
             Coord src(i, j);
-            if( heights[i]==0 || matrix()[src]==0 ) continue;
+            if( heights[i]==0 || !matrix()[src] ) continue;
             if (lineByLine) final = false;
             uint k = i - (lineByLine ? 1 : heights[i]);
             Coord dest(k, j);
diff --git a/klickety/piece.h b/klickety/piece.h
index 6966ff80..c3de1714 100644
--- a/klickety/piece.h
+++ b/klickety/piece.h
@@ -13,8 +13,8 @@ class KLPieceInfo : public GPieceInfo
     virtual uint nbTypes() const              { return NB_BLOCK_TYPES; }
     virtual uint nbForms() const              { return 0; }
 
-    virtual const int *i(uint, uint) const    { return 0; }
-    virtual const int *j(uint, uint) const    { return 0; }
+    virtual const int *i(uint, uint) const    { return nullptr; }
+    virtual const int *j(uint, uint) const    { return nullptr; }
     virtual uint value(uint, uint) const      { return 0; }
     virtual uint form(uint) const             { return 0; }
     virtual uint nbConfigurations(uint) const { return 0; }
diff --git a/klines/ballpainter.cpp b/klines/ballpainter.cpp
index 3da8df9b..bd3ddfda 100644
--- a/klines/ballpainter.cpp
+++ b/klines/ballpainter.cpp
@@ -37,7 +37,7 @@ int colorLinesArr[NCOLORS] =
 
 
 BallPainter::BallPainter()
-    : TQObject(), backgroundPix(0)
+    : TQObject(), backgroundPix(nullptr)
 {
   createPix();
 }
@@ -66,7 +66,7 @@ void BallPainter::createPix()
   TQPixmap *fire = new TQPixmap(
 		locate( "appdata", "fire.jpg" ));
   if (balls->isNull() ||backgroundPix->isNull() || fire->isNull() ) {
-      KMessageBox::error(0, i18n("Unable to find graphics. Check your installation."), i18n("Error"));
+      KMessageBox::error(nullptr, i18n("Unable to find graphics. Check your installation."), i18n("Error"));
       tqApp->exit(1);
       return; // Error
   }
diff --git a/klines/klines.cpp b/klines/klines.cpp
index 52d5fcb3..8b19cbe7 100644
--- a/klines/klines.cpp
+++ b/klines/klines.cpp
@@ -117,7 +117,7 @@ void KLines::initTDEAction()
                                 this, TQ_SLOT(switchNumbered()), actionCollection(), "options_show_numbered");
   undoAction = KStdGameAction::undo(this, TQ_SLOT(undo()), actionCollection());
 
-  levelAction = KStdGameAction::chooseGameType(0, 0, actionCollection());
+  levelAction = KStdGameAction::chooseGameType(nullptr, nullptr, actionCollection());
   TQStringList items;
   for (uint i=0; i<Nb_Levels; i++)
       items.append( i18n(LEVEL[i]) );
diff --git a/klines/linesboard.cpp b/klines/linesboard.cpp
index eebcf21e..e8e5097b 100644
--- a/klines/linesboard.cpp
+++ b/klines/linesboard.cpp
@@ -37,7 +37,7 @@
 LinesBoard::LinesBoard( BallPainter * abPainter, TQWidget* parent, const char* name )
     : Field( parent, name )
 {
-  demoLabel = 0;
+  demoLabel = nullptr;
   bGameOver = false;
   anim = ANIM_NO;
   focusX = -1;
@@ -186,7 +186,7 @@ void LinesBoard::setGameOver(bool b)
 void LinesBoard::paintEvent( TQPaintEvent* )
 {
     TQPainter *paint;
-    KPixmap *pixmap = 0;
+    KPixmap *pixmap = nullptr;
     if (bGameOver)
     {
        pixmap = new KPixmap();
@@ -705,7 +705,7 @@ void LinesBoard::showDemoText(const TQString &text)
 {
   if (!demoLabel)
   {
-     demoLabel = new TQLabel(0, "demoTip", WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM );
+     demoLabel = new TQLabel(nullptr, "demoTip", WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM );
      demoLabel->setMargin(1);
      demoLabel->setIndent(0);
      demoLabel->setAutoMask( false );
diff --git a/klines/linesboard.h b/klines/linesboard.h
index 45d92a70..5f929d33 100644
--- a/klines/linesboard.h
+++ b/klines/linesboard.h
@@ -34,7 +34,7 @@ class LinesBoard : public Field
   TQ_OBJECT
   
 public:
-  LinesBoard( BallPainter * abPainter, TQWidget* parent=0, const char* name=0 );
+  LinesBoard( BallPainter * abPainter, TQWidget* parent=nullptr, const char* name=nullptr );
   ~LinesBoard();
 
   int width();
diff --git a/klines/mwidget.h b/klines/mwidget.h
index 4577e02d..255b325b 100644
--- a/klines/mwidget.h
+++ b/klines/mwidget.h
@@ -36,7 +36,7 @@ class MainWidget : public TQFrame
   BallPainter *bPainter;
 
 public:
-  MainWidget( TQWidget* parent=0, const char* name=0 );
+  MainWidget( TQWidget* parent=nullptr, const char* name=nullptr );
   ~MainWidget();
   LinesBoard * GetLsb();
   LinesPrompt * GetPrompt();
diff --git a/klines/prompt.h b/klines/prompt.h
index cffb43c7..ca8537b7 100644
--- a/klines/prompt.h
+++ b/klines/prompt.h
@@ -34,7 +34,7 @@ class LinesPrompt : public TQWidget
   void mousePressEvent( TQMouseEvent* );
 
 public:
-  LinesPrompt( BallPainter * abPainter, TQWidget * parent=0, const char * name=0 );
+  LinesPrompt( BallPainter * abPainter, TQWidget * parent=nullptr, const char * name=nullptr );
   ~LinesPrompt();
 
   void setPrompt(bool enabled);
diff --git a/kmahjongg/Background.cpp b/kmahjongg/Background.cpp
index 2cf7296f..7578d691 100644
--- a/kmahjongg/Background.cpp
+++ b/kmahjongg/Background.cpp
@@ -4,10 +4,10 @@
 
 Background::Background(): tile(true) {
 
-  sourceImage = 0;
-  backgroundImage = 0;
-  backgroundPixmap = 0;
-  backgroundShadowPixmap = 0;
+  sourceImage = nullptr;
+  backgroundImage = nullptr;
+  backgroundPixmap = nullptr;
+  backgroundShadowPixmap = nullptr;
 }
 
 Background::~Background() {
diff --git a/kmahjongg/GameTimer.h b/kmahjongg/GameTimer.h
index eac2e928..11ba1c34 100644
--- a/kmahjongg/GameTimer.h
+++ b/kmahjongg/GameTimer.h
@@ -26,7 +26,7 @@ class GameTimer: public TQLCDNumber
     TQ_OBJECT
   
 public:
-    GameTimer( TQWidget *parent=0, const char *name=0 );
+    GameTimer( TQWidget *parent=nullptr, const char *name=nullptr );
 
     int toInt(); 
     TQString toString() {return theTimer.toString();}	
diff --git a/kmahjongg/HighScore.cpp b/kmahjongg/HighScore.cpp
index 66bc842b..d9bb3033 100644
--- a/kmahjongg/HighScore.cpp
+++ b/kmahjongg/HighScore.cpp
@@ -511,7 +511,7 @@ void HighScore::reset() {
 	    while (t) {
 		d = t;
 		t = t->next;
-		d->next=0;
+		d->next=nullptr;
 		delete d;
 	    }
 
diff --git a/kmahjongg/Tileset.cpp b/kmahjongg/Tileset.cpp
index bec2d959..993c54b8 100644
--- a/kmahjongg/Tileset.cpp
+++ b/kmahjongg/Tileset.cpp
@@ -214,8 +214,8 @@ bool Tileset::loadTileset( const TQString& tilesetPath, const bool isPreview)
     TQImage qiTiles;
     TQRgb *unsel;
     TQRgb *sel;
-    TQRgb *nextSel=0;
-    TQRgb *nextUnsel=0;
+    TQRgb *nextSel=nullptr;
+    TQRgb *nextUnsel=nullptr;
 
     if (filename == tilesetPath) {
 	return true;
diff --git a/kmahjongg/boardwidget.h b/kmahjongg/boardwidget.h
index 4cce396a..be478886 100644
--- a/kmahjongg/boardwidget.h
+++ b/kmahjongg/boardwidget.h
@@ -92,7 +92,7 @@ class BoardWidget : public TQWidget
   
 
     public:
-  	BoardWidget( TQWidget* parent = 0, const char *name = 0 );
+  	BoardWidget( TQWidget* parent = nullptr, const char *name = nullptr );
 	~BoardWidget();
 
         void calculateNewGame(int num = -1 );
diff --git a/kmahjongg/kmahjongg.cpp b/kmahjongg/kmahjongg.cpp
index e577d7a3..19f88eca 100644
--- a/kmahjongg/kmahjongg.cpp
+++ b/kmahjongg/kmahjongg.cpp
@@ -60,7 +60,7 @@ int is_paused = 0;
 KMahjongg::KMahjongg( TQWidget* parent, const char *name)
     : TDEMainWindow(parent, name)
 {
-    boardEditor = 0;
+    boardEditor = nullptr;
 
     // init board widget
     bw = new BoardWidget( this );
@@ -237,7 +237,7 @@ void KMahjongg::showSettings(){
     return;
 
   TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Prefs::self(), KDialogBase::Swallow);
-  dialog->addPage(new Settings(0, "General"), i18n("General"), "package_settings");
+  dialog->addPage(new Settings(nullptr, "General"), i18n("General"), "package_settings");
   connect(dialog, TQ_SIGNAL(settingsChanged()), bw, TQ_SLOT(loadSettings()));
   connect(dialog, TQ_SIGNAL(settingsChanged()), this, TQ_SLOT(setDisplayedWidth()));
   dialog->show();
diff --git a/kmahjongg/kmahjongg.h b/kmahjongg/kmahjongg.h
index 70a87243..8b729a44 100644
--- a/kmahjongg/kmahjongg.h
+++ b/kmahjongg/kmahjongg.h
@@ -54,7 +54,7 @@ class KMahjongg : public TDEMainWindow
   
 
     public:
-        KMahjongg( TQWidget* parent = 0, const char *name = 0);
+        KMahjongg( TQWidget* parent = nullptr, const char *name = nullptr);
         ~KMahjongg();
 
     public slots:
diff --git a/kmines/dialogs.cpp b/kmines/dialogs.cpp
index 88656b1a..c70637cd 100644
--- a/kmines/dialogs.cpp
+++ b/kmines/dialogs.cpp
@@ -120,7 +120,7 @@ const uint CustomConfig::maxHeight = 50;
 const uint CustomConfig::minHeight = 5;
 
 CustomConfig::CustomConfig()
-    : TQWidget(0, "custom_config_widget"), _block(false)
+    : TQWidget(nullptr, "custom_config_widget"), _block(false)
 {
     TQVBoxLayout *top = new TQVBoxLayout(this, KDialog::spacingHint());
 
@@ -209,7 +209,7 @@ static const char *MOUSE_ACTION_LABELS[Settings::EnumMouseAction::COUNT-1] = {
 };
 
 GameConfig::GameConfig()
-    : TQWidget(0, "game_config_widget"), _magicDialogEnabled(false)
+    : TQWidget(nullptr, "game_config_widget"), _magicDialogEnabled(false)
 {
     TQVBoxLayout *top = new TQVBoxLayout(this, KDialog::spacingHint());
 
@@ -269,7 +269,7 @@ static const char *N_COLOR_CONFIG_NAMES[KMines::NB_N_COLORS] = {
 };
 
 AppearanceConfig::AppearanceConfig()
-    : TQWidget(0, "appearance_config_widget")
+    : TQWidget(nullptr, "appearance_config_widget")
 {
     TQVBoxLayout *top = new TQVBoxLayout(this, KDialog::spacingHint());
 
diff --git a/kmines/dialogs.h b/kmines/dialogs.h
index ce8bca28..36e174bd 100644
--- a/kmines/dialogs.h
+++ b/kmines/dialogs.h
@@ -36,7 +36,7 @@ class Smiley : public TQPushButton, public KMines
  TQ_OBJECT
   
  public:
-    Smiley(TQWidget *parent, const char *name = 0)
+    Smiley(TQWidget *parent, const char *name = nullptr)
         : TQPushButton(TQString(), parent, name) {}
 
  public slots:
diff --git a/kmines/field.h b/kmines/field.h
index 2d6ef873..84143953 100644
--- a/kmines/field.h
+++ b/kmines/field.h
@@ -58,8 +58,8 @@ class Field : public FieldFrame, public BaseField
     void doUmark()  { doUmark(_cursor); }
     void keyboardAutoReveal();
     CaseState doAction(ActionType type, const KGrid2D::Coord &c,
-                     bool completeReveal, KGrid2D::CoordList *autorevealed = 0,
-                     bool *caseUncovered = 0);
+                     bool completeReveal, KGrid2D::CoordList *autorevealed = nullptr,
+                     bool *caseUncovered = nullptr);
 
 	void readSettings();
 
@@ -98,8 +98,8 @@ class Field : public FieldFrame, public BaseField
 	void revealActions(bool press);
 
     void doAutoReveal(const KGrid2D::Coord &);
-    bool doReveal(const KGrid2D::Coord &, KGrid2D::CoordList *autorevealed = 0,
-                  bool *caseUncovered = 0);
+    bool doReveal(const KGrid2D::Coord &, KGrid2D::CoordList *autorevealed = nullptr,
+                  bool *caseUncovered = nullptr);
     void doMark(const KGrid2D::Coord &);
     void doUmark(const KGrid2D::Coord &);
     void changeCase(const KGrid2D::Coord &, CaseState newState);
diff --git a/kmines/frame.cpp b/kmines/frame.cpp
index 0698057f..66c29a61 100644
--- a/kmines/frame.cpp
+++ b/kmines/frame.cpp
@@ -27,7 +27,7 @@
 
 
 FieldFrame::FieldFrame(TQWidget *parent)
-    : TQFrame(parent, "field"), _button(0)
+    : TQFrame(parent, "field"), _button(nullptr)
 {
     setFrameStyle( TQFrame::Box | TQFrame::Raised );
 	setLineWidth(2);
@@ -133,7 +133,7 @@ void FieldFrame::drawBox(TQPainter &painter, const TQPoint &p,
     }
 
 	TQRect r(p, _button.size());
-    const TQPixmap *pixmap = (type==NoPixmap ? 0 : &_pixmaps[type]);
+    const TQPixmap *pixmap = (type==NoPixmap ? nullptr : &_pixmaps[type]);
     TQColor color = (nbMines==0 ? black : Settings::mineColor(nbMines-1));
     style().drawItem(&painter, r, AlignCenter, colorGroup(), true, pixmap,
                      text, -1, &color);
diff --git a/kmines/kzoommainwindow.cpp b/kmines/kzoommainwindow.cpp
index a9bb2004..8eb0e8e2 100644
--- a/kmines/kzoommainwindow.cpp
+++ b/kmines/kzoommainwindow.cpp
@@ -26,7 +26,7 @@
 #include <kcmenumngr.h>
 
 KZoomMainWindow::KZoomMainWindow(uint min, uint max, uint step, const char *name)
-  : TDEMainWindow(0, name), _zoomStep(step), _minZoom(min), _maxZoom(max)
+  : TDEMainWindow(nullptr, name), _zoomStep(step), _minZoom(min), _maxZoom(max)
 {
   installEventFilter(this);
   
diff --git a/kmines/kzoommainwindow.h b/kmines/kzoommainwindow.h
index 433d9d04..5a6b77c1 100644
--- a/kmines/kzoommainwindow.h
+++ b/kmines/kzoommainwindow.h
@@ -46,7 +46,7 @@ class KZoomMainWindow : public TDEMainWindow
 public:
   /** Constructor. */
   KZoomMainWindow(uint minZoom, uint maxZoom, uint zoomStep,
-                  const char *name = 0);
+                  const char *name = nullptr);
 
   /** Add a widget to be managed i.e. the adjustSize() method of the
    * widget is called whenever the zoom is changed.
@@ -67,7 +67,7 @@ protected:
    * @param popupName is the name of the context popup menu as defined in
    * the ui.rc file.
    */
-  void init(const char *popupName = 0);
+  void init(const char *popupName = nullptr);
     
   virtual void setZoom(uint zoom);
   virtual bool eventFilter(TQObject *o, TQEvent *e);
diff --git a/kmines/main.cpp b/kmines/main.cpp
index 7c1a43e4..223929a4 100644
--- a/kmines/main.cpp
+++ b/kmines/main.cpp
@@ -92,7 +92,7 @@ MainWidget::MainWidget()
     KStdGameAction::configureHighscores(this, TQ_SLOT(configureHighscores()),
                                         actionCollection());
 	// Levels
-    _levels = KStdGameAction::chooseGameType(0, 0, actionCollection());
+    _levels = KStdGameAction::chooseGameType(nullptr, nullptr, actionCollection());
     TQStringList list;
     for (uint i=0; i<=Level::NB_TYPES; i++)
         list += i18n(Level::LABELS[i]);
@@ -240,8 +240,8 @@ int main(int argc, char **argv)
 
     TDEAboutData aboutData("kmines", I18N_NOOP("KMines"), LONG_VERSION,
 						 DESCRIPTION, TDEAboutData::License_GPL,
-						 COPYLEFT, 0, HOMEPAGE);
-    aboutData.addAuthor("Nicolas Hadacek", 0, EMAIL);
+						 COPYLEFT, nullptr, HOMEPAGE);
+    aboutData.addAuthor("Nicolas Hadacek", nullptr, EMAIL);
 	aboutData.addCredit("Andreas Zehender", I18N_NOOP("Smiley pixmaps"));
     aboutData.addCredit("Mikhail Kourinny", I18N_NOOP("Solver/Adviser"));
     aboutData.addCredit("Thomas Capricelli", I18N_NOOP("Magic reveal mode"));
diff --git a/kmines/solver/advFastRules.cpp b/kmines/solver/advFastRules.cpp
index e9ad110f..c83d68c8 100644
--- a/kmines/solver/advFastRules.cpp
+++ b/kmines/solver/advFastRules.cpp
@@ -132,7 +132,7 @@ AdviseFast::RuleSet::newRule(Entry const &e){
 	}
 
 	// Make compiler happy
-	return 0;
+	return nullptr;
 }
 
 void AdviseFast::RuleSet::removeRef(Coord p){
diff --git a/kmines/solver/adviseFast.cpp b/kmines/solver/adviseFast.cpp
index f15d508e..26763029 100644
--- a/kmines/solver/adviseFast.cpp
+++ b/kmines/solver/adviseFast.cpp
@@ -114,7 +114,7 @@ bool AdviseFast::FactSet::reveal(
 	if( !_field->isCovered(point) ) return true; // :)
 
 	CoordList tmp;
-	if(_field->doReveal(point, &tmp, 0) == false)
+	if(_field->doReveal(point, &tmp, nullptr) == false)
 		// Blew up :(
 		return false;
 
@@ -183,7 +183,7 @@ CoordSet const *AdviseFast::FactSet::getContainingFacts(
 	if(_containingFacts.count(point))
 		return &const_cast<std::map<Coord, CoordSet> &>(_containingFacts)
 			[point];
-	else return 0;
+	else return nullptr;
 }
 
 std::ostream &AdviseFast::operator <<(std::ostream &s, FactSet const &fs)
diff --git a/kmines/solver/bfield.cpp b/kmines/solver/bfield.cpp
index 24f5221f..bdb98ae8 100644
--- a/kmines/solver/bfield.cpp
+++ b/kmines/solver/bfield.cpp
@@ -135,7 +135,7 @@ bool BaseField::autoReveal(const Coord &p, bool *caseUncovered)
         if ( state(*it)==Marked ) nb--;
     if ( nb==0 ) // number of surrounding mines == number of marks :)
         for (CoordList::const_iterator it=n.begin(); it!=n.end(); ++it)
-            if ( !reveal(*it, 0, caseUncovered) ) return false;
+            if ( !reveal(*it, nullptr, caseUncovered) ) return false;
     return true;
 }
 
diff --git a/kmines/solver/solver.cpp b/kmines/solver/solver.cpp
index 9a416d28..c924c62e 100644
--- a/kmines/solver/solver.cpp
+++ b/kmines/solver/solver.cpp
@@ -37,7 +37,7 @@
 class SolverPrivate
 {
  public:
-    SolverPrivate() : facts(0), rules(0) {}
+    SolverPrivate() : facts(nullptr), rules(nullptr) {}
     ~SolverPrivate() {
         delete facts;
         delete rules;
diff --git a/kmines/solver/solver.h b/kmines/solver/solver.h
index 7354b99c..97091882 100644
--- a/kmines/solver/solver.h
+++ b/kmines/solver/solver.h
@@ -34,7 +34,7 @@ class Solver : public TQObject
  TQ_OBJECT
   
  public:
-    Solver(TQObject *parent = 0);
+    Solver(TQObject *parent = nullptr);
     ~Solver();
 
     /** A method to advice a point placement */
diff --git a/kmines/status.cpp b/kmines/status.cpp
index 1e0d005b..3780cc80 100644
--- a/kmines/status.cpp
+++ b/kmines/status.cpp
@@ -365,7 +365,7 @@ void Status::loadLog()
         TQFile file(tmpFile);
         if ( file.open(IO_ReadOnly) ) {
             int errorLine;
-            bool ok = doc.setContent(&file, 0, &errorLine);
+            bool ok = doc.setContent(&file, nullptr, &errorLine);
             if ( !ok ) {
                KMessageBox::sorry(this, i18n("Cannot read XML file on line %1")
                                   .arg(errorLine));
diff --git a/knetwalk/src/cell.cpp b/knetwalk/src/cell.cpp
index b02ad5ff..ac377bf0 100644
--- a/knetwalk/src/cell.cpp
+++ b/knetwalk/src/cell.cpp
@@ -69,7 +69,7 @@ void Cell::initPixmaps()
 	}
 }
 
-Cell::Cell(TQWidget* parent, int i) : TQWidget(parent, 0, WNoAutoErase)
+Cell::Cell(TQWidget* parent, int i) : TQWidget(parent, nullptr, WNoAutoErase)
 {
 	angle     = 0;
 	light     = 0;
diff --git a/knetwalk/src/main.cpp b/knetwalk/src/main.cpp
index 15d130c6..3b8bb15f 100644
--- a/knetwalk/src/main.cpp
+++ b/knetwalk/src/main.cpp
@@ -30,20 +30,20 @@ static const char version[] = "1.0";
 
 static TDECmdLineOptions options[] =
 {
-	{ "Novice", I18N_NOOP( "Start in novice mode" ), 0 },
-	{ "Normal", I18N_NOOP( "Start in normal mode" ), 0 },
-	{ "Expert", I18N_NOOP( "Start in expert mode" ), 0 },
-	{ "Master", I18N_NOOP( "Start in master mode" ), 0 },
+	{ "Novice", I18N_NOOP( "Start in novice mode" ), nullptr },
+	{ "Normal", I18N_NOOP( "Start in normal mode" ), nullptr },
+	{ "Expert", I18N_NOOP( "Start in expert mode" ), nullptr },
+	{ "Master", I18N_NOOP( "Start in master mode" ), nullptr },
 	TDECmdLineLastOption
 };
 
 int main(int argc, char ** argv)
 {
 	TDEAboutData about("knetwalk", I18N_NOOP("KNetwalk"), version, description,
-		TDEAboutData::License_GPL, I18N_NOOP("(C) 2004, 2005 Andi Peredri, ported to KDE by Thomas Nagy"), 0, 
+		TDEAboutData::License_GPL, I18N_NOOP("(C) 2004, 2005 Andi Peredri, ported to KDE by Thomas Nagy"), nullptr, 
 		"tnagyemail-mail@yahoo.fr");
-	about.addAuthor( "Andi Peredri", 0, "andi@ukr.net" );
-	about.addAuthor( "Thomas Nagy", 0, "tnagy2^8@yahoo.fr" );
+	about.addAuthor( "Andi Peredri", nullptr, "andi@ukr.net" );
+	about.addAuthor( "Thomas Nagy", nullptr, "tnagy2^8@yahoo.fr" );
 
 	TDECmdLineArgs::init(argc, argv, &about);
 	TDECmdLineArgs::addCmdLineOptions(options);
diff --git a/knetwalk/src/mainwindow.cpp b/knetwalk/src/mainwindow.cpp
index 1806a248..d1525204 100644
--- a/knetwalk/src/mainwindow.cpp
+++ b/knetwalk/src/mainwindow.cpp
@@ -70,7 +70,7 @@ MainWindow::MainWindow(TQWidget *parent, const char* name, WFlags /*fl*/) :
 	KStdGameAction::quit(this, TQ_SLOT(close()), actionCollection());
 	KStdGameAction::configureHighscores(this, TQ_SLOT(configureHighscores()), actionCollection());
 
-	m_levels = KStdGameAction::chooseGameType(0, 0, actionCollection());
+	m_levels = KStdGameAction::chooseGameType(nullptr, nullptr, actionCollection());
 	TQStringList lst;
 	lst += i18n("Novice");
 	lst += i18n("Normal");
@@ -112,7 +112,7 @@ MainWindow::MainWindow(TQWidget *parent, const char* name, WFlags /*fl*/) :
 		connect(board[i], TQ_SIGNAL(rClicked(int)), TQ_SLOT(rClicked(int)));
 		connect(board[i], TQ_SIGNAL(mClicked(int)), TQ_SLOT(mClicked(int)));
 	}
-	srand(time(0));
+	srand(time(nullptr));
 
 	slotNewGame();
 }
@@ -299,7 +299,7 @@ Cell* MainWindow::uCell(Cell* cell) const
 		return board[cell->index() - MasterBoardSize];
 	else if(wrapped)
 		return board[MasterBoardSize * (MasterBoardSize - 1) + cell->index()];
-	else return 0;
+	else return nullptr;
 }
 
 Cell* MainWindow::dCell(Cell* cell) const
@@ -308,7 +308,7 @@ Cell* MainWindow::dCell(Cell* cell) const
 		return board[cell->index() + MasterBoardSize];
 	else if(wrapped)
 		return board[cell->index() - MasterBoardSize * (MasterBoardSize - 1)];
-	else return 0;
+	else return nullptr;
 }
 
 Cell* MainWindow::lCell(Cell* cell) const
@@ -317,7 +317,7 @@ Cell* MainWindow::lCell(Cell* cell) const
 		return board[cell->index() - 1];
 	else if(wrapped)
 		return board[cell->index() - 1 + MasterBoardSize];
-	else return 0;
+	else return nullptr;
 }
 
 Cell* MainWindow::rCell(Cell* cell) const
@@ -326,7 +326,7 @@ Cell* MainWindow::rCell(Cell* cell) const
 		return board[cell->index() + 1];
 	else if(wrapped)
 		return board[cell->index() + 1 - MasterBoardSize];
-	else return 0;
+	else return nullptr;
 }
 
 void MainWindow::lClicked(int index)
diff --git a/knetwalk/src/mainwindow.h b/knetwalk/src/mainwindow.h
index fe133719..e94aac26 100644
--- a/knetwalk/src/mainwindow.h
+++ b/knetwalk/src/mainwindow.h
@@ -29,7 +29,7 @@ class MainWindow : public TDEMainWindow
 	TQ_OBJECT
   
 	public:
-		MainWindow(TQWidget *parent=0, const char* name=0, WFlags fl=0);
+		MainWindow(TQWidget *parent=nullptr, const char* name=nullptr, WFlags fl=0);
 	protected:
 		virtual void closeEvent(TQCloseEvent*);
 	private:
diff --git a/kolf/ball.cpp b/kolf/ball.cpp
index 4fa25ac6..ea9a0ff4 100644
--- a/kolf/ball.cpp
+++ b/kolf/ball.cpp
@@ -299,8 +299,8 @@ void Ball::collisionDetect(double oldx, double oldy)
 
 			// ok now we have a list of wall points we are on
 
-			WallPoint *iterpoint = 0;
-			WallPoint *finalPoint = 0;
+			WallPoint *iterpoint = nullptr;
+			WallPoint *finalPoint = nullptr;
 
 			// this wont be least when we're done hopefully
 			double leastAngleDifference = 9999;
diff --git a/kolf/canvasitem.cpp b/kolf/canvasitem.cpp
index 3acacba2..62b50553 100644
--- a/kolf/canvasitem.cpp
+++ b/kolf/canvasitem.cpp
@@ -13,8 +13,8 @@ TQCanvasRectangle *CanvasItem::onVStrut()
 	TQCanvasItemList l = qthis->collisions(true);
 	l.sort();
 	bool aboveVStrut = false;
-	CanvasItem *item = 0;
-	TQCanvasItem *qitem = 0;
+	CanvasItem *item = nullptr;
+	TQCanvasItem *qitem = nullptr;
 	for (TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it)
 	{
 		item = dynamic_cast<CanvasItem *>(*it);
diff --git a/kolf/canvasitem.h b/kolf/canvasitem.h
index 2b1bd1b4..0b08daed 100644
--- a/kolf/canvasitem.h
+++ b/kolf/canvasitem.h
@@ -13,7 +13,7 @@ class KolfGame;
 class CanvasItem
 {
 public:
-	CanvasItem() { game = 0; }
+	CanvasItem() { game = nullptr; }
 	virtual ~CanvasItem() {}
 	/**
 	 * load your settings from the TDEConfig, which represents a course.
diff --git a/kolf/config.h b/kolf/config.h
index a26e4b13..0c0ea592 100644
--- a/kolf/config.h
+++ b/kolf/config.h
@@ -9,7 +9,7 @@ class Config : public TQFrame
   
 
 public:
-	Config(TQWidget *parent, const char *name = 0);
+	Config(TQWidget *parent, const char *name = nullptr);
 	void ctorDone();
 
 signals:
@@ -29,7 +29,7 @@ class MessageConfig : public Config
   
 
 public:
-	MessageConfig(TQString text, TQWidget *parent, const char *name = 0);
+	MessageConfig(TQString text, TQWidget *parent, const char *name = nullptr);
 };
 
 // internal
@@ -39,7 +39,7 @@ class DefaultConfig : public MessageConfig
   
 
 public:
-	DefaultConfig(TQWidget *parent, const char *name = 0);
+	DefaultConfig(TQWidget *parent, const char *name = nullptr);
 };
 
 #endif
diff --git a/kolf/editor.cpp b/kolf/editor.cpp
index 5dc06f63..5cc23ef3 100644
--- a/kolf/editor.cpp
+++ b/kolf/editor.cpp
@@ -13,7 +13,7 @@ Editor::Editor(ObjectList *list, TQWidget *parent, const char *name)
 	: TQWidget(parent, name)
 {
 	this->list = list;
-	config = 0;
+	config = nullptr;
 
 	hlayout = new TQHBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
 
@@ -24,7 +24,7 @@ Editor::Editor(ObjectList *list, TQWidget *parent, const char *name)
 	hlayout->setStretchFactor(vlayout, 2);
 
 	TQStringList items;
-	Object *obj = 0;
+	Object *obj = nullptr;
 	for (obj = list->first(); obj; obj = list->next())
 		items.append(obj->name());
 
diff --git a/kolf/editor.h b/kolf/editor.h
index 4c17d651..fb4d27b3 100644
--- a/kolf/editor.h
+++ b/kolf/editor.h
@@ -16,7 +16,7 @@ class Editor : public TQWidget
   
 
 public:
-	Editor(ObjectList *list, TQWidget * = 0, const char * = 0);
+	Editor(ObjectList *list, TQWidget * = nullptr, const char * = nullptr);
 
 signals:
 	void changed();
diff --git a/kolf/floater.cpp b/kolf/floater.cpp
index dc0f129a..0114734d 100644
--- a/kolf/floater.cpp
+++ b/kolf/floater.cpp
@@ -49,7 +49,7 @@ Config *FloaterGuide::config(TQWidget *parent)
 Floater::Floater(TQRect rect, TQCanvas *canvas)
 	: Bridge(rect, canvas), speedfactor(16)
 {
-	wall = 0;
+	wall = nullptr;
 	setEnabled(true);
 	noUpdateZ = false;
 	haventMoved = true;
diff --git a/kolf/game.cpp b/kolf/game.cpp
index 325fbe9e..d4d5299a 100644
--- a/kolf/game.cpp
+++ b/kolf/game.cpp
@@ -1217,7 +1217,7 @@ void Cup::save(TDEConfig *cfg)
 BlackHole::BlackHole(TQCanvas *canvas)
 	: Hole(black, canvas), exitDeg(0)
 {
-	infoLine = 0;
+	infoLine = nullptr;
 	m_minSpeed = 3.0;
 	m_maxSpeed = 5.0;
 	runs = 0;
@@ -1260,7 +1260,7 @@ void BlackHole::showInfo()
 void BlackHole::hideInfo()
 {
 	delete infoLine;
-	infoLine = 0;
+	infoLine = nullptr;
 
 	exitItem->hideInfo();
 }
@@ -1578,7 +1578,7 @@ void WallPoint::clean()
 	setSize(7, 7);
 	update();
 
-	TQCanvasItem *onPoint = 0;
+	TQCanvasItem *onPoint = nullptr;
 	TQCanvasItemList l = collisions(true);
 	for (TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it)
 		if ((*it)->rtti() == rtti())
@@ -1733,8 +1733,8 @@ Wall::Wall(TQCanvas *canvas)
 
 	dampening = 1.2;
 
-	startItem = 0;
-	endItem = 0;
+	startItem = nullptr;
+	endItem = nullptr;
 
 	moveBy(0, 0);
 	setZ(50);
@@ -2149,7 +2149,7 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi
 
 	regAdv = false;
 	curHole = 0; // will get ++'d
-	cfg = 0;
+	cfg = nullptr;
 	setFilename(filename);
 	this->players = players;
 	this->obj = obj;
@@ -2421,8 +2421,8 @@ void KolfGame::handleMousePressEvent(TQMouseEvent *e)
 
 		moving = false;
 		highlighter->setVisible(false);
-		selectedItem = 0;
-		movingItem = 0;
+		selectedItem = nullptr;
+		movingItem = nullptr;
 
 		if (list.count() < 1)
 		{
@@ -2645,7 +2645,7 @@ void KolfGame::setShowInfo(bool yes)
 
 	if (m_showInfo)
 	{
-		TQCanvasItem *item = 0;
+		TQCanvasItem *item = nullptr;
 		for (item = items.first(); item; item = items.next())
 		{
 			CanvasItem *citem = dynamic_cast<CanvasItem *>(item);
@@ -2660,7 +2660,7 @@ void KolfGame::setShowInfo(bool yes)
 	}
 	else
 	{
-		TQCanvasItem *item = 0;
+		TQCanvasItem *item = nullptr;
 		for (item = items.first(); item; item = items.next())
 		{
 			CanvasItem *citem = dynamic_cast<CanvasItem *>(item);
@@ -2747,7 +2747,7 @@ void KolfGame::keyReleaseEvent(TQKeyEvent *e)
 				citem->aboutToDelete();
 				citem->aboutToDie();
 				delete citem;
-				selectedItem = 0;
+				selectedItem = nullptr;
 				emit newSelectedItem(&holeInfo);
 
 				setModified(true);
@@ -2866,7 +2866,7 @@ void KolfGame::fastTimeout()
 
 		if (fastAdvancedExist)
 		{
-			CanvasItem *citem = 0;
+			CanvasItem *citem = nullptr;
 			for (citem = fastAdvancers.first(); citem; citem = fastAdvancers.next())
 				citem->doAdvance();
 		}
@@ -2876,7 +2876,7 @@ void KolfGame::fastTimeout()
 
 		if (fastAdvancedExist)
 		{
-			CanvasItem *citem = 0;
+			CanvasItem *citem = nullptr;
 			for (citem = fastAdvancers.first(); citem; citem = fastAdvancers.next())
 				citem->fastAdvanceDone();
 		}
@@ -3036,7 +3036,7 @@ void KolfGame::recreateStateList()
 {
 	stateDB.clear();
 
-	TQCanvasItem *item = 0;
+	TQCanvasItem *item = nullptr;
 
 	for (item = items.first(); item; item = items.next())
 	{
@@ -3063,7 +3063,7 @@ void KolfGame::undoShot()
 
 void KolfGame::loadStateList()
 {
-	TQCanvasItem *item = 0;
+	TQCanvasItem *item = nullptr;
 
 	for (item = items.first(); item; item = items.next())
 	{
@@ -3261,7 +3261,7 @@ void KolfGame::startBall(const Vector &vector)
 	(*curPlayer).ball()->setState(Rolling);
 	(*curPlayer).ball()->setVector(vector);
 
-	TQCanvasItem *item = 0;
+	TQCanvasItem *item = nullptr;
 	for (item = items.first(); item; item = items.next())
 	{
 		CanvasItem *citem = dynamic_cast<CanvasItem *>(item);
@@ -3480,9 +3480,9 @@ void KolfGame::hideInfo()
 
 void KolfGame::openFile()
 {
-	Object *curObj = 0;
+	Object *curObj = nullptr;
 
-	TQCanvasItem *item = 0;
+	TQCanvasItem *item = nullptr;
 	for (item = items.first(); item; item = items.next())
 	{
 		CanvasItem *citem = dynamic_cast<CanvasItem *>(item);
@@ -3502,7 +3502,7 @@ void KolfGame::openFile()
 	extraMoveable.clear();
 	fastAdvancers.setAutoDelete(false);
 	fastAdvancers.clear();
-	selectedItem = 0;
+	selectedItem = nullptr;
 
 	// will tell basic course info
 	// we do this here for the hell of it.
@@ -3640,7 +3640,7 @@ void KolfGame::openFile()
 	}
 
 	// do it down here; if !hasFinalLoad, do it up there!
-	TQCanvasItem *qcanvasItem = 0;
+	TQCanvasItem *qcanvasItem = nullptr;
 	TQPtrList<CanvasItem> todo;
 	TQPtrList<TQCanvasItem> qtodo;
 	if (hasFinalLoad)
@@ -3664,7 +3664,7 @@ void KolfGame::openFile()
 			}
 		}
 
-		CanvasItem *citem = 0;
+		CanvasItem *citem = nullptr;
 		qcanvasItem = qtodo.first();
 		for (citem = todo.first(); citem; citem = todo.next())
 		{
@@ -3704,7 +3704,7 @@ void KolfGame::openFile()
 
 void KolfGame::addItemsToMoveableList(TQPtrList<TQCanvasItem> list)
 {
-	TQCanvasItem *item = 0;
+	TQCanvasItem *item = nullptr;
 	for (item = list.first(); item; item = list.next())
 		extraMoveable.append(item);
 }
@@ -3733,7 +3733,7 @@ void KolfGame::addNewObject(Object *newObj)
 	for (;; ++i)
 	{
 		bool found = false;
-		TQCanvasItem *item = 0;
+		TQCanvasItem *item = nullptr;
 		for (item = items.first(); item; item = items.next())
 		{
 			CanvasItem *citem = dynamic_cast<CanvasItem *>(item);
@@ -3834,7 +3834,7 @@ void KolfGame::addNewHole()
 	inPlay = false;
 
 	// add default objects
-	Object *curObj = 0;
+	Object *curObj = nullptr;
 	for (curObj = obj->first(); curObj; curObj = obj->next())
 		if (curObj->addOnNewHole())
 			addNewObject(curObj);
@@ -3864,7 +3864,7 @@ void KolfGame::resetHoleScores()
 
 void KolfGame::clearHole()
 {
-	TQCanvasItem *qcanvasItem = 0;
+	TQCanvasItem *qcanvasItem = nullptr;
 	for (qcanvasItem = items.first(); qcanvasItem; qcanvasItem = items.next())
 	{
 		CanvasItem *citem = dynamic_cast<CanvasItem *>(qcanvasItem);
@@ -3877,7 +3877,7 @@ void KolfGame::clearHole()
 	emit newSelectedItem(&holeInfo);
 
 	// add default objects
-	Object *curObj = 0;
+	Object *curObj = nullptr;
 	for (curObj = obj->first(); curObj; curObj = obj->next())
 		if (curObj->addOnNewHole())
 			addNewObject(curObj);
@@ -3961,7 +3961,7 @@ void KolfGame::save()
 	bool hasFinalLoad = false;
 	fastAdvancedExist = false;
 
-	TQCanvasItem *item = 0;
+	TQCanvasItem *item = nullptr;
 	for (item = items.first(); item; item = items.next())
 	{
 		CanvasItem *citem = dynamic_cast<CanvasItem *>(item);
@@ -4038,7 +4038,7 @@ void KolfGame::toggleEditMode()
 	*/
 
 	moving = false;
-	selectedItem = 0;
+	selectedItem = nullptr;
 
 	editing = !editing;
 
@@ -4054,7 +4054,7 @@ void KolfGame::toggleEditMode()
 	}
 
 	// alert our items
-	TQCanvasItem *item = 0;
+	TQCanvasItem *item = nullptr;
 	for (item = items.first(); item; item = items.next())
 	{
 		CanvasItem *citem = dynamic_cast<CanvasItem *>(item);
@@ -4089,7 +4089,7 @@ void KolfGame::playSound(TQString file, double vol)
 {
 	if (m_sound)
 	{
-		KPlayObject *oldPlayObject = 0;
+		KPlayObject *oldPlayObject = nullptr;
 		for (oldPlayObject = oldPlayObjects.first(); oldPlayObject; oldPlayObject = oldPlayObjects.next())
 		{
 			if (oldPlayObject && oldPlayObject->state() != Arts::posPlaying)
@@ -4181,7 +4181,7 @@ bool KolfGame::allPlayersDone()
 
 void KolfGame::setBorderWalls(bool showing)
 {
-	Wall *wall = 0;
+	Wall *wall = nullptr;
 	for (wall = borderWalls.first(); wall; wall = borderWalls.next())
 		wall->setVisible(showing);
 }
diff --git a/kolf/game.h b/kolf/game.h
index 2d556749..a195e8d3 100644
--- a/kolf/game.h
+++ b/kolf/game.h
@@ -804,7 +804,7 @@ class TDE_EXPORT KolfGame : public TQCanvasView
   
 
 public:
-	KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWidget *parent=0, const char *name=0 );
+	KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWidget *parent=nullptr, const char *name=nullptr );
 	~KolfGame();
 	void setObjects(ObjectList *obj) { this->obj = obj; }
 	void setFilename(const TQString &filename);
diff --git a/kolf/kcomboboxdialog.cpp b/kolf/kcomboboxdialog.cpp
index 228e4b3e..7790f58e 100644
--- a/kolf/kcomboboxdialog.cpp
+++ b/kolf/kcomboboxdialog.cpp
@@ -52,7 +52,7 @@ KComboBoxDialog::KComboBoxDialog( const TQString &_text, const TQStringList &_it
 		topLayout->addWidget( dontAskAgainCheckBox, 1 );
 	}
 	else
-		dontAskAgainCheckBox = 0;
+		dontAskAgainCheckBox = nullptr;
 
 	if ( !_value.isNull() )
 		combo->setCurrentText( _value );
diff --git a/kolf/kcomboboxdialog.h b/kolf/kcomboboxdialog.h
index 3c1df769..e303d258 100644
--- a/kolf/kcomboboxdialog.h
+++ b/kolf/kcomboboxdialog.h
@@ -52,7 +52,7 @@ public:
 	 * @param _text      Text of the label
 	 * @param _value     Initial value of the combobox
 	 */
-	KComboBoxDialog( const TQString &_text, const TQStringList& _items, const TQString& _value = TQString(), bool showDontAskAgain = false, TQWidget *parent = 0 );
+	KComboBoxDialog( const TQString &_text, const TQStringList& _items, const TQString& _value = TQString(), bool showDontAskAgain = false, TQWidget *parent = nullptr );
 	virtual ~KComboBoxDialog();
 
 	/**
@@ -73,7 +73,7 @@ public:
 	 * @param _value           Initial value of the inputline
 	 * @param dontAskAgainName Name for saving whether the user doesn't want to be asked again; use TQString() to disable
 	 */
-	static TQString getItem( const TQString &_text, const TQStringList &_items, const TQString& _value = TQString(), const TQString &dontAskAgainName = TQString(), TQWidget *parent = 0 );
+	static TQString getItem( const TQString &_text, const TQStringList &_items, const TQString& _value = TQString(), const TQString &dontAskAgainName = TQString(), TQWidget *parent = nullptr );
 
 	/**
 	 * Static convenience function to get input from the user.
@@ -85,7 +85,7 @@ public:
 	 * @param _value           Initial value of the inputline
 	 * @param dontAskAgainName Name for saving whether the user doesn't want to be asked again; use TQString() to disable
 	 */
-	static TQString getItem( const TQString &_text, const TQString &_caption, const TQStringList &_items, const TQString& _value = TQString(), const TQString &dontAskAgainName = TQString(), TQWidget *parent = 0 );
+	static TQString getItem( const TQString &_text, const TQString &_caption, const TQStringList &_items, const TQString& _value = TQString(), const TQString &dontAskAgainName = TQString(), TQWidget *parent = nullptr );
 
 	/**
 	 * Static convenience method.
@@ -102,7 +102,7 @@ public:
 	 */
 	static TQString getText(const TQString &_caption, const TQString &_text,
 	                       const TQString &_value = TQString(),
-	                       bool *ok = 0, TQWidget *parent = 0,
+	                       bool *ok = nullptr, TQWidget *parent = nullptr,
 	                       const TQString &configName = TQString(),
 	                       TDEConfig *config = TDEGlobal::config());
 
diff --git a/kolf/kolf.cpp b/kolf/kolf.cpp
index 4c16d574..87e16f89 100644
--- a/kolf/kolf.cpp
+++ b/kolf/kolf.cpp
@@ -50,10 +50,10 @@ Kolf::Kolf()
     : TDEMainWindow(0, "Kolf")
 {
 	competition = false;
-	game = 0;
-	editor = 0;
-	spacer = 0;
-	scoreboard = 0;
+	game = nullptr;
+	editor = nullptr;
+	spacer = nullptr;
+	scoreboard = nullptr;
 	isTutorial = false;
 
 	initGUI();
@@ -162,7 +162,7 @@ bool Kolf::queryClose()
 
 void Kolf::startNewGame()
 {
-	NewGameDialog *dialog = 0;
+	NewGameDialog *dialog = nullptr;
 	int firstHole = 1;
 
 	if (loadedGame.isNull())
@@ -180,7 +180,7 @@ void Kolf::startNewGame()
 
 	if (loadedGame.isNull())
 	{
-		PlayerEditor *curEditor = 0;
+		PlayerEditor *curEditor = nullptr;
 		int newId = 1;
 		for (curEditor = dialog->players()->first(); curEditor; curEditor = dialog->players()->next(), ++newId)
 		{
@@ -217,7 +217,7 @@ void Kolf::startNewGame()
 		scoreboard->newPlayer((*it).name());
 
 	delete spacer;
-	spacer = 0;
+	spacer = nullptr;
 	delete game;
 	game = new KolfGame(obj, &players, filename, dummy);
 	game->setStrict(competition);
@@ -330,7 +330,7 @@ void Kolf::closeGame()
 
 	editingEnded();
 	delete game;
-	game = 0;
+	game = nullptr;
 	loadedGame = TQString();
 
 	editingAction->setChecked(false);
@@ -613,7 +613,7 @@ void Kolf::editingStarted()
 void Kolf::editingEnded()
 {
 	delete editor;
-	editor = 0;
+	editor = nullptr;
 
 	if (scoreboard)
 		scoreboard->show();
@@ -766,7 +766,7 @@ void Kolf::initPlugins()
 	obj->append(new BumperObj());
 
 	ObjectList *other = PluginLoader::loadAll();
-	Object *object = 0;
+	Object *object = nullptr;
 	for (object = other->first(); object; object = other->next())
 	{
 		obj->append(object);
@@ -785,7 +785,7 @@ void Kolf::initPlugins()
 void Kolf::showPlugins()
 {
 	TQString text = TQString("<h2>%1</h2><ol>").arg(i18n("Currently Loaded Plugins"));
-	Object *object = 0;
+	Object *object = nullptr;
 	for (object = plugins.first(); object; object = plugins.next())
 	{
 		text.append("<li>");
diff --git a/kolf/newgame.cpp b/kolf/newgame.cpp
index 9fead695..f2408c90 100644
--- a/kolf/newgame.cpp
+++ b/kolf/newgame.cpp
@@ -196,7 +196,7 @@ void NewGameDialog::slotOk()
 	config->deleteGroup("New Game Dialog");
 	config->setGroup("New Game Dialog");
 
-	PlayerEditor *curEditor = 0;
+	PlayerEditor *curEditor = nullptr;
 	int i = 0;
 	for (curEditor = editors.first(); curEditor; curEditor = editors.next(), ++i)
 		config->writeEntry(TQString::number(i) + curEditor->name(), TQString(curEditor->color().name()));
diff --git a/kolf/newgame.h b/kolf/newgame.h
index f1ccf549..a3efadce 100644
--- a/kolf/newgame.h
+++ b/kolf/newgame.h
@@ -30,7 +30,7 @@ class PlayerEditor : public TQWidget
   
 	
 public:
-	PlayerEditor(TQString name = TQString(), TQColor = red, TQWidget *parent = 0, const char *_name = 0);
+	PlayerEditor(TQString name = TQString(), TQColor = red, TQWidget *parent = nullptr, const char *_name = nullptr);
 	TQColor color() { return colorButton->color(); }
 	TQString name() { return editor->text(); }
 	void setColor(TQColor col) { colorButton->setColor(col); }
@@ -54,7 +54,7 @@ class NewGameDialog : public KDialogBase
   
 
 public:
-	NewGameDialog(bool enableCourses, TQWidget *parent, const char *_name = 0);
+	NewGameDialog(bool enableCourses, TQWidget *parent, const char *_name = nullptr);
 	TQPtrList<PlayerEditor> *players() { return &editors; }
 	bool competition() { return mode->isChecked(); }
 	TQString course() { return currentCourse; }
diff --git a/kolf/object.h b/kolf/object.h
index 07adb2fd..650fbc88 100644
--- a/kolf/object.h
+++ b/kolf/object.h
@@ -13,7 +13,7 @@ class Object : public TQObject
   
 
 public:
-	Object(TQObject *parent = 0, const char *name = 0) : TQObject(parent, name) { m_addOnNewHole = false; }
+	Object(TQObject *parent = nullptr, const char *name = nullptr) : TQObject(parent, name) { m_addOnNewHole = false; }
 	virtual TQCanvasItem *newObject(TQCanvas * /*canvas*/) { return 0; }
 	TQString name() { return m_name; }
 	TQString _name() { return m__name; }
diff --git a/kolf/printdialogpage.h b/kolf/printdialogpage.h
index 350199db..cbc073be 100644
--- a/kolf/printdialogpage.h
+++ b/kolf/printdialogpage.h
@@ -14,7 +14,7 @@ class PrintDialogPage : public KPrintDialogPage
   
 
 	public:
-		PrintDialogPage(TQWidget *parent = 0, const char *name = 0);
+		PrintDialogPage(TQWidget *parent = nullptr, const char *name = nullptr);
 
 		//reimplement virtual functions
 		void getOptions(TQMap<TQString, TQString> &opts, bool incldef = false);
diff --git a/kolf/scoreboard.h b/kolf/scoreboard.h
index dfb56ef6..1ac81853 100644
--- a/kolf/scoreboard.h
+++ b/kolf/scoreboard.h
@@ -12,7 +12,7 @@ class ScoreBoard : public TQTable
   
 
 public:
-	ScoreBoard(TQWidget *parent = 0, const char *name = 0);
+	ScoreBoard(TQWidget *parent = nullptr, const char *name = nullptr);
 	int total(int id, TQString &name);
 
 public slots:
diff --git a/kolf/slope.cpp b/kolf/slope.cpp
index 8b187a06..62ceb26c 100644
--- a/kolf/slope.cpp
+++ b/kolf/slope.cpp
@@ -65,7 +65,7 @@ bool Slope::terrainCollisions() const
 void Slope::showInfo()
 {
 	showingInfo = true;
-	Arrow *arrow = 0;
+	Arrow *arrow = nullptr;
 	for (arrow = arrows.first(); arrow; arrow = arrows.next())
 	{
 		arrow->setZ(z() + .01);
@@ -77,7 +77,7 @@ void Slope::showInfo()
 void Slope::hideInfo()
 {
 	showingInfo = false;
-	Arrow *arrow = 0;
+	Arrow *arrow = nullptr;
 	for (arrow = arrows.first(); arrow; arrow = arrows.next())
 		arrow->setVisible(false);
 	text->setVisible(false);
@@ -92,7 +92,7 @@ void Slope::aboutToDie()
 
 void Slope::clearArrows()
 {
-	Arrow *arrow = 0;
+	Arrow *arrow = nullptr;
 	for (arrow = arrows.first(); arrow; arrow = arrows.next())
 	{
 		arrow->setVisible(false);
@@ -165,7 +165,7 @@ void Slope::moveArrow()
 	xavg /= r.size();
 	yavg /= r.size();
 
-	Arrow *arrow = 0;
+	Arrow *arrow = nullptr;
 	for (arrow = arrows.first(); arrow; arrow = arrows.next())
 		arrow->move((double)xavg, (double)yavg);
 	
@@ -190,7 +190,7 @@ void Slope::updateZ(TQCanvasRectangle *vStrut)
 
 	double newZ = 0;
 
-	TQCanvasRectangle *rect = 0;
+	TQCanvasRectangle *rect = nullptr;
 	if (!stuckOnGround)
 		rect = vStrut? vStrut : onVStrut();
 
diff --git a/kolf/slope.h b/kolf/slope.h
index 87ec03cf..b5e4589e 100644
--- a/kolf/slope.h
+++ b/kolf/slope.h
@@ -66,7 +66,7 @@ public:
 	TQMap<KImageEffect::GradientType, TQString> gradientI18nKeys;
 	TQMap<KImageEffect::GradientType, TQString> gradientKeys;
 
-	virtual void updateZ(TQCanvasRectangle *vStrut = 0);
+	virtual void updateZ(TQCanvasRectangle *vStrut = nullptr);
 
 	void moveArrow();
 
diff --git a/konquest/Konquest.cpp b/konquest/Konquest.cpp
index a0c772a8..d2181f86 100644
--- a/konquest/Konquest.cpp
+++ b/konquest/Konquest.cpp
@@ -15,7 +15,7 @@ main(int argc, char **argv)
     TDEAboutData aboutData( "konquest", I18N_NOOP("Konquest"),
         KONQUEST_VERSION, description, TDEAboutData::License_GPL,
         I18N_NOOP("Copyright (c) 1999-2001, Developers"));
-    aboutData.addAuthor("Russ Steffen",0, "rsteffen@bayarea.net");
+    aboutData.addAuthor("Russ Steffen",nullptr, "rsteffen@bayarea.net");
     TDECmdLineArgs::init( argc, argv, &aboutData );
 
     TDEApplication a;
diff --git a/konquest/fleetdlg.cpp b/konquest/fleetdlg.cpp
index 7459929a..e24b3bd1 100644
--- a/konquest/fleetdlg.cpp
+++ b/konquest/fleetdlg.cpp
@@ -40,7 +40,7 @@ FleetDlg::FleetDlg( TQWidget *parent, AttackFleetList *fleets )
 {
     setCaption( tdeApp->makeStdCaption(i18n("Fleet Overview")) );
 
-    fleetTable = new TDEListView( this, 0 );
+    fleetTable = new TDEListView( this, nullptr );
     fleetTable->addColumn(i18n("Fleet No."));
     fleetTable->addColumn(i18n("Destination"));
     fleetTable->addColumn(i18n("Ships"));
diff --git a/konquest/gameboard.cpp b/konquest/gameboard.cpp
index 029958ce..71d16723 100644
--- a/konquest/gameboard.cpp
+++ b/konquest/gameboard.cpp
@@ -203,7 +203,7 @@ GameBoard::turn()
 {
     PlanetListIterator planetAi( planets );
     PlanetListIterator planetAttack( planets );
-    Planet *target = 0;
+    Planet *target = nullptr;
    
     switch( gameState ) {
     case NONE :
@@ -529,7 +529,7 @@ GameBoard::resolveShipsInFlight()
 Player *
 GameBoard::findWinner()
 {
-    Player *winner = 0;
+    Player *winner = nullptr;
     int activePlayers = 0;
 
     PlayerListIterator nextPlayer( players );
@@ -549,7 +549,7 @@ GameBoard::findWinner()
     if (activePlayers == 1)
         return winner;
 
-    return 0;
+    return nullptr;
 }
 
 void
@@ -661,7 +661,7 @@ GameBoard::doFleetArrival( AttackFleet *arrivingFleet )
         	TQString msg;
         	msg = i18n("Reinforcements (%1 ships) have arrived for planet %2.")
         	      .arg(arrivingFleet->getShipCount());
-                gameMsg(msg, 0, arrivingFleet->destination);
+                gameMsg(msg, nullptr, arrivingFleet->destination);
         }
     } else {
 
diff --git a/konquest/gameboard.h b/konquest/gameboard.h
index cf0d6a21..c371a984 100644
--- a/konquest/gameboard.h
+++ b/konquest/gameboard.h
@@ -67,13 +67,13 @@ private:
     void doFleetArrival( AttackFleet *arrivingFleet );
     void scanForSurvivors();
 
-    void gameMsg(const TQString &msg, Player *player = 0, Planet *planet = 0, Player *planetPlayer = 0);
+    void gameMsg(const TQString &msg, Player *player = nullptr, Planet *planet = nullptr, Player *planetPlayer = nullptr);
 
     void changeGameBoard( bool inPlay );
     void cleanupGame();
     Player *findWinner();
 
-    TQString playerString(Player *player = 0);
+    TQString playerString(Player *player = nullptr);
     
     //***************************************************************
     // Game State information
diff --git a/konquest/gamecore.cpp b/konquest/gamecore.cpp
index 1a9b25f9..9666a2f9 100644
--- a/konquest/gamecore.cpp
+++ b/konquest/gamecore.cpp
@@ -68,7 +68,7 @@ CoreLogic::roll()
 
 
 Map::Map()
-    : TQObject( 0, 0 ),  freezeUpdates( false ),
+    : TQObject( nullptr, nullptr ),  freezeUpdates( false ),
     rows( BOARD_ROWS ), columns( BOARD_COLS ),
     hasSelectedSector( false )
 {
@@ -98,7 +98,7 @@ Map::populateMap( PlayerList &players, Player *neutral,
 
     // Create a planet for each player
     Player *plr;
-    for( plr = players.first(); plr != 0; plr = players.next() )
+    for( plr = players.first(); plr; plr = players.next() )
     {
         TQString newName( names.mid( index++, 1 ) );
         Sector &sect = findRandomFreeSector();
@@ -242,16 +242,16 @@ const int Map::getColumns() const
 //---------------------------------------------------------------------------
 
 Sector::Sector()
-: TQObject(0,0), planet( nullptr ), parentMap(nullptr ), x(0), y(0)
+: TQObject(nullptr,nullptr), planet( nullptr ), parentMap(nullptr ), x(0), y(0)
 {}
 
 Sector::Sector( Map *newParentMap, int xPos, int yPos )
-: TQObject(0,0), planet(nullptr), parentMap( newParentMap ), x(xPos), y(yPos)
+: TQObject(nullptr,nullptr), planet(nullptr), parentMap( newParentMap ), x(xPos), y(yPos)
 {
 }
 
 Sector::Sector( const Sector & other )
-: TQObject(0,0), planet(other.planet), parentMap(other.parentMap), x(other.x), y(other.y)
+: TQObject(nullptr,nullptr), planet(other.planet), parentMap(other.parentMap), x(other.x), y(other.y)
 {
 }
 
@@ -322,7 +322,7 @@ int Sector::getColumn()
 
 Planet::Planet( TQString planetName, Sector &newParentSector, Player *initialOwner,
                 int newProd, double newKillP, double newMorale )
-       : TQObject(0,0), name(planetName), owner(initialOwner), parentSector(newParentSector),
+       : TQObject(nullptr,nullptr), name(planetName), owner(initialOwner), parentSector(newParentSector),
          homeFleet( this, newProd ), killPercentage(newKillP), morale( newMorale ), productionRate(newProd)
 
 
diff --git a/konquest/int_validator.h b/konquest/int_validator.h
index 2723f43c..a6f60adb 100644
--- a/konquest/int_validator.h
+++ b/konquest/int_validator.h
@@ -10,8 +10,8 @@ class IntValidator : public TQValidator
   
 
 public:
-    IntValidator( TQWidget *parent, const char *name = 0 );
-    IntValidator( int bottom, int top, TQWidget *parent, const char *name = 0 );
+    IntValidator( TQWidget *parent, const char *name = nullptr );
+    IntValidator( int bottom, int top, TQWidget *parent, const char *name = nullptr );
 
     virtual ~IntValidator();
 
diff --git a/konquest/map_widget.h b/konquest/map_widget.h
index 1a8eccff..bbfc623a 100644
--- a/konquest/map_widget.h
+++ b/konquest/map_widget.h
@@ -20,7 +20,7 @@ class ConquestMap : public TQGridView
 
     // Constructors
 public:
-    ConquestMap( Map *newMap, TQWidget *parent = 0 );
+    ConquestMap( Map *newMap, TQWidget *parent = nullptr );
     virtual ~ConquestMap();
 
     // Interface
diff --git a/konquest/minimap.cpp b/konquest/minimap.cpp
index 4334e832..b9cda322 100644
--- a/konquest/minimap.cpp
+++ b/konquest/minimap.cpp
@@ -12,7 +12,7 @@ MiniMap::MiniMap(  TQWidget *parent, const char *name )
     SECTOR_HEIGHT( 12 ), SECTOR_WIDTH( 12 ),
     BOARD_HEIGHT( 10 * SECTOR_HEIGHT ),
     BOARD_WIDTH( 10 * SECTOR_WIDTH ),
-    map( 0 )
+    map( nullptr )
 {
     setFrameStyle( NoFrame );
     setPaletteBackgroundColor( black );
diff --git a/konquest/minimap.h b/konquest/minimap.h
index ca65464b..d48ee6bb 100644
--- a/konquest/minimap.h
+++ b/konquest/minimap.h
@@ -18,7 +18,7 @@ class MiniMap : public TQGridView
 
     // Constructors
 public:
-    MiniMap( TQWidget *parent = 0, const char* name = 0 );
+    MiniMap( TQWidget *parent = nullptr, const char* name = nullptr );
     virtual ~MiniMap();
 
     void setMap( Map *newMap );
diff --git a/konquest/newgamedlg.cpp b/konquest/newgamedlg.cpp
index 4237e495..cf7114dd 100644
--- a/konquest/newgamedlg.cpp
+++ b/konquest/newgamedlg.cpp
@@ -165,8 +165,8 @@ NewGameDlg::setPlayerCount(int playerCount)
 		TQColor( 106, 157, 104 ),  TQColor( 131, 153, 128) };
        
     int i = 0;
-    TQListViewItem *lastItem = 0;
-    TQListViewItem *item = 0;
+    TQListViewItem *lastItem = nullptr;
+    TQListViewItem *item = nullptr;
     TQListViewItem *nextItem = w->listPlayers->firstChild();
     while( (item = nextItem) )
     {
@@ -294,13 +294,13 @@ NewGameDlg::updateMiniMap()
 
     Planet *planet;
     planet = plnetList->first();
-    for( planet = plnetList->take(); planet != 0; planet = plnetList->take() ) {
+    for( planet = plnetList->take(); planet; planet = plnetList->take() ) {
         delete planet;
     }
 
     Player *player;
     player = plrList->first();
-    for( player = plrList->take(); player != 0; player = plrList->take() ) {
+    for( player = plrList->take(); player; player = plrList->take() ) {
         delete player;
     }
 
diff --git a/konquest/scoredlg.cpp b/konquest/scoredlg.cpp
index d3b34be7..2f79240b 100644
--- a/konquest/scoredlg.cpp
+++ b/konquest/scoredlg.cpp
@@ -32,7 +32,7 @@ ScoreDlg::ScoreDlg( TQWidget *parent, const TQString& title, PlayerList *players
 {
     setCaption( tdeApp->makeStdCaption(title) );
 
-    scoreTable = new TDEListView( this, 0 );
+    scoreTable = new TDEListView( this, nullptr );
     scoreTable->addColumn(i18n("Player"));
     scoreTable->addColumn(i18n("Ships Built"));
     scoreTable->addColumn(i18n("Planets Conquered"));
diff --git a/kpat/card.cpp b/kpat/card.cpp
index 09773711..c1bfe7cf 100644
--- a/kpat/card.cpp
+++ b/kpat/card.cpp
@@ -41,7 +41,7 @@ const int Card::RTTI = 1001;
 Card::Card( Rank r, Suit s, TQCanvas* _parent )
     : TQCanvasRectangle( _parent ),
       m_suit( s ), m_rank( r ),
-      m_source(0), scaleX(1.0), scaleY(1.0), tookDown(false)
+      m_source(nullptr), scaleX(1.0), scaleY(1.0), tookDown(false)
 {
     // Set the name of the card
     // FIXME: i18n()
diff --git a/kpat/card.h b/kpat/card.h
index 244f0b8d..a56d4ba3 100644
--- a/kpat/card.h
+++ b/kpat/card.h
@@ -51,7 +51,7 @@ public:
     enum Rank { None = 0, Ace = 1, Two,  Three, Four, Five,  Six, Seven, 
 		          Eight,   Nine, Ten,   Jack, Queen, King };
 
-    Card( Rank r, Suit s,  TQCanvas *parent=0);
+    Card( Rank r, Suit s,  TQCanvas *parent=nullptr);
     virtual ~Card();
 
     // Properties of the card.
diff --git a/kpat/cardmaps.cpp b/kpat/cardmaps.cpp
index 736c2b4e..4a021fd4 100644
--- a/kpat/cardmaps.cpp
+++ b/kpat/cardmaps.cpp
@@ -40,7 +40,7 @@
 #include <tdeglobalsettings.h>
 #include <assert.h>
 
-cardMap *cardMap::_self = 0;
+cardMap *cardMap::_self = nullptr;
 static KStaticDeleter<cardMap> cms;
 
 cardMap::cardMap(const TQColor &dim) : dimcolor(dim)
@@ -73,7 +73,7 @@ bool cardMap::setCardDir( const TQString &dir)
     // may take a while (approx. 3 seconds on my AMD K6PR200)
     bool animate = config->readBoolEntry( "Animation", true);
 
-    TQWidget* w = 0;
+    TQWidget* w = nullptr;
     TQPainter p;
     TQTime t1, t2;
 
@@ -102,7 +102,7 @@ bool cardMap::setCardDir( const TQString &dir)
 
     if( animate ) {
         t1 = TQTime::currentTime();
-        w = new TQWidget( 0, "", TQt::WStyle_Customize | TQt::WStyle_NoBorder | TQt::WStyle_Tool );
+        w = new TQWidget( nullptr, "", TQt::WStyle_Customize | TQt::WStyle_NoBorder | TQt::WStyle_Tool );
         TQRect dg = TDEGlobalSettings::splashScreenDesktopGeometry();
         w->setBackgroundColor( TQt::darkGreen );
         w->setGeometry( dg.left() + ( dg.width() - greeting_width ) / 2, dg.top() + ( dg.height() - 180 ) / 2, greeting_width, 180);
@@ -237,7 +237,7 @@ TQPixmap cardMap::image( Card::Rank _rank, Card::Suit _suit, bool inverted) cons
     {
         kdError() << "access to invalid card " << int(_rank) << ", " << int(_suit) << endl;
     }
-    return 0;
+    return nullptr;
 }
 
 cardMap *cardMap::self() {
diff --git a/kpat/clock.cpp b/kpat/clock.cpp
index a1002d80..ce20f3ad 100644
--- a/kpat/clock.cpp
+++ b/kpat/clock.cpp
@@ -71,7 +71,7 @@ void Clock::deal() {
         for (int i = 0; i < 12; i++)
             if (c->rank() == ranks[i] && c->suit() == suits[i]) {
                 target[i]->add(c, false, true);
-                c = 0;
+                c = nullptr;
                 break;
             }
         if (c)
diff --git a/kpat/clock.h b/kpat/clock.h
index 09ce3a35..77a6d931 100644
--- a/kpat/clock.h
+++ b/kpat/clock.h
@@ -8,7 +8,7 @@ class Clock : public Dealer {
   
 
 public:
-    Clock( TDEMainWindow* parent=0, const char* name=0);
+    Clock( TDEMainWindow* parent=nullptr, const char* name=nullptr);
     virtual bool checkAdd   ( int checkIndex, const Pile *c1, const CardList& c2) const;
     virtual bool startAutoDrop() { return false; }
 
diff --git a/kpat/computation.cpp b/kpat/computation.cpp
index d7f52a16..64a1b46f 100644
--- a/kpat/computation.cpp
+++ b/kpat/computation.cpp
@@ -103,7 +103,7 @@ bool Computation::checkAdd( int index, const Pile* c1, const CardList& cl) const
 
     if (c1->isEmpty()) {
         Card::Rank start = static_cast<Card::Rank>(Card::Ace + (offset - 1));
-        return cl.first()->rank() == start && matches(cl, 0, offset);
+        return cl.first()->rank() == start && matches(cl, nullptr, offset);
     }
 
     return matches(cl, c1->top(), offset);
diff --git a/kpat/computation.h b/kpat/computation.h
index 48760f1a..ad3ff94f 100644
--- a/kpat/computation.h
+++ b/kpat/computation.h
@@ -32,7 +32,7 @@ class Computation : public Dealer {
   
 
 public:
-    Computation( TDEMainWindow *parent = 0, const char *name=0 );
+    Computation( TDEMainWindow *parent = nullptr, const char *name=nullptr );
 
     virtual void restart();
 
diff --git a/kpat/dealer.cpp b/kpat/dealer.cpp
index eb9363e2..2f0ac1df 100644
--- a/kpat/dealer.cpp
+++ b/kpat/dealer.cpp
@@ -31,7 +31,7 @@ MoveHint::MoveHint(Card *card, Pile *to, bool d)
 //                    class DealerInfoList
 
 
-DealerInfoList *DealerInfoList::_self = 0;
+DealerInfoList *DealerInfoList::_self = nullptr;
 static KStaticDeleter<DealerInfoList> dl;
 
 
@@ -52,16 +52,16 @@ void DealerInfoList::add(DealerInfo *dealer)
 //                            class Dealer
 
 
-Dealer *Dealer::s_instance = 0;
+Dealer *Dealer::s_instance = nullptr;
 
 
 Dealer::Dealer( TDEMainWindow* _parent , const char* _name )
-  : TQCanvasView( 0, _parent, _name ),
-    towait(0),
+  : TQCanvasView( nullptr, _parent, _name ),
+    towait(nullptr),
     myActions(0),
-    ademo(0),
-    ahint(0), 
-    aredeal(0),
+    ademo(nullptr),
+    ahint(nullptr), 
+    aredeal(nullptr),
     takeTargets(false),
     _won(false),
     _waiting(0),
@@ -119,7 +119,7 @@ void Dealer::setupActions() {
                              parent()->actionCollection(), "game_hint");
         actionlist.append(ahint);
     } else
-        ahint = 0;
+        ahint = nullptr;
 
     if (actions() & Dealer::Demo) {
         ademo = new TDEToggleAction( i18n("&Demo"), TQString::fromLatin1("1rightarrow"), CTRL+Key_D, this,
@@ -127,7 +127,7 @@ void Dealer::setupActions() {
                                    parent()->actionCollection(), "game_demo");
         actionlist.append(ademo);
     } else
-        ademo = 0;
+        ademo = nullptr;
 
     if (actions() & Dealer::Redeal) {
         aredeal = new TDEAction (i18n("&Redeal"), TQString::fromLatin1("queue"), 0, this,
@@ -135,7 +135,7 @@ void Dealer::setupActions() {
                                parent()->actionCollection(), "game_redeal");
         actionlist.append(aredeal);
     } else
-        aredeal = 0;
+        aredeal = nullptr;
 
     parent()->guiFactory()->plugActionList( parent(), TQString::fromLatin1("game_actions"), actionlist);
 }
@@ -151,7 +151,7 @@ Dealer::~Dealer()
         delete piles.first(); // removes itself
 
     if (s_instance == this)
-        s_instance = 0;
+        s_instance = nullptr;
 }
 
 TDEMainWindow *Dealer::parent() const
@@ -578,7 +578,7 @@ bool Dealer::cardClicked(Card *c) {
 }
 
 void Dealer::pileClicked(Pile *c) {
-    c->cardClicked(0);
+    c->cardClicked(nullptr);
 }
 
 bool Dealer::cardDblClicked(Card *c)
@@ -637,7 +637,7 @@ void Dealer::startNew()
     kdDebug(11111) << "startNew restart\n";
     restart();
     takeState();
-    Card *towait = 0;
+    Card *towait = nullptr;
     for (TQCanvasItemList::Iterator it = list.begin(); it != list.end(); ++it) {
         if ((*it)->rtti() == Card::RTTI) {
             towait = static_cast<Card*>(*it);
@@ -651,7 +651,7 @@ void Dealer::startNew()
         takeState();
     else
         connect(towait, TQ_SIGNAL(stoped(Card*)), TQ_SLOT(slotTakeState(Card *)));
-    resizeEvent(0);
+    resizeEvent(nullptr);
 }
 
 void Dealer::slotTakeState(Card *c) {
@@ -676,7 +676,7 @@ void Dealer::enlargeCanvas(TQCanvasRectangle *c)
         changed = true;
     }
     if (changed)
-        resizeEvent(0);
+        resizeEvent(nullptr);
 }
 
 typedef class TQValueList<CardState> CardStateList;
@@ -772,7 +772,7 @@ void Dealer::takeState()
 
         if (*old == *n) {
             delete n;
-            n = 0;
+            n = nullptr;
         } else {
             emit updateMoves();
             undoList.append(n);
@@ -971,7 +971,7 @@ void Dealer::undo()
 Pile *Dealer::findTarget(Card *c)
 {
     if (!c)
-        return 0;
+        return nullptr;
 
     CardList empty;
     empty.append(c);
@@ -982,7 +982,7 @@ Pile *Dealer::findTarget(Card *c)
         if ((*it)->legalAdd(empty))
             return *it;
     }
-    return 0;
+    return nullptr;
 }
 
 void Dealer::setWaiting(bool w)
@@ -1079,11 +1079,11 @@ void Dealer::stopDemo()
     } else stop_demo_next = false;
 
     if (towait == (Card*)-1)
-        towait = 0;
+        towait = nullptr;
 
     if (towait) {
         towait->disconnect();
-        towait = 0;
+        towait = nullptr;
     }
     demotimer->stop();
     if (ademo)
@@ -1171,7 +1171,7 @@ void Dealer::won()
 MoveHint *Dealer::chooseHint()
 {
     if (hints.isEmpty())
-        return 0;
+        return nullptr;
 
     for (HintList::ConstIterator it = hints.begin(); it != hints.end(); ++it)
     {
@@ -1263,7 +1263,7 @@ void Dealer::demo() {
 
 Card *Dealer::demoNewCards()
 {
-    return 0;
+    return nullptr;
 }
 
 void Dealer::newDemoMove(Card *m)
@@ -1279,7 +1279,7 @@ void Dealer::waitForDemo(Card *t)
     if (towait != t)
         return;
     t->disconnect();
-    towait = 0;
+    towait = nullptr;
     demotimer->start(250, true);
 }
 
diff --git a/kpat/dealer.h b/kpat/dealer.h
index 630c2ece..ecda6c30 100644
--- a/kpat/dealer.h
+++ b/kpat/dealer.h
@@ -96,7 +96,7 @@ class Dealer: public TQCanvasView
 
 public:
 
-    Dealer( TDEMainWindow* parent = 0, const char* name = 0 );
+    Dealer( TDEMainWindow* parent = nullptr, const char* name = nullptr );
     virtual ~Dealer();
 
     static const Dealer *instance();
diff --git a/kpat/deck.cpp b/kpat/deck.cpp
index 3606db1a..66d415d6 100644
--- a/kpat/deck.cpp
+++ b/kpat/deck.cpp
@@ -7,7 +7,7 @@
 const int NumberOfCards = 52;
 
 
-Deck *Deck::my_deck = 0;
+Deck *Deck::my_deck = nullptr;
 
 
 Deck::Deck( Dealer* parent, int m, int s )
@@ -88,7 +88,7 @@ Card* Deck::nextCard()
     if ( c != m_cards.end() ) {
         return *c;
     } else
-        return 0;
+        return nullptr;
 }
 
 
diff --git a/kpat/deck.h b/kpat/deck.h
index f5239fe0..5bc18b63 100644
--- a/kpat/deck.h
+++ b/kpat/deck.h
@@ -13,11 +13,11 @@ class Deck: public Pile
 {
 
 private:
-    Deck( Dealer* parent = 0, int m = 1, int s = 4 );
+    Deck( Dealer* parent = nullptr, int m = 1, int s = 4 );
     virtual ~Deck();
 
 public:
-    static Deck *new_deck( Dealer *parent = 0, int m = 1, int s = 4 );
+    static Deck *new_deck( Dealer *parent = nullptr, int m = 1, int s = 4 );
     static Deck *deck() { return my_deck; }
 
     static const long n;
diff --git a/kpat/fortyeight.cpp b/kpat/fortyeight.cpp
index 50af4e01..544795d6 100644
--- a/kpat/fortyeight.cpp
+++ b/kpat/fortyeight.cpp
@@ -92,8 +92,8 @@ void Fortyeight::deckClicked(Card *)
 Card *Fortyeight::demoNewCards()
 {
     if (deck->isEmpty() && lastdeal)
-        return 0;
-    deckClicked(0);
+        return nullptr;
+    deckClicked(nullptr);
     return pile->top();
 }
 
diff --git a/kpat/fortyeight.h b/kpat/fortyeight.h
index ed2b1ec7..5eb93a35 100644
--- a/kpat/fortyeight.h
+++ b/kpat/fortyeight.h
@@ -9,7 +9,7 @@ class HorLeftPile : public Pile
   
 
 public:
-    HorLeftPile( int _index, Dealer* parent = 0);
+    HorLeftPile( int _index, Dealer* parent = nullptr);
     virtual TQSize cardOffset( bool _spread, bool _facedown, const Card *before) const;
     virtual void initSizes();
 };
@@ -20,7 +20,7 @@ class Fortyeight : public Dealer
   
 
 public:
-    Fortyeight( TDEMainWindow* parent=0, const char* name=0);
+    Fortyeight( TDEMainWindow* parent=nullptr, const char* name=nullptr);
     virtual bool isGameLost() const;
 
 public slots:
diff --git a/kpat/freecell.cpp b/kpat/freecell.cpp
index b54f4404..bbf8b060 100644
--- a/kpat/freecell.cpp
+++ b/kpat/freecell.cpp
@@ -51,7 +51,7 @@ void FreecellPile::moveCards(CardList &c, Pile *to)
 FreecellBase::FreecellBase( int decks, int stores, int freecells, int fill, bool unlimit,
                             TDEMainWindow* parent, const char* name)
     : Dealer(parent,name),
-solver_instance(0), es_filling(fill), solver_ret(FCS_STATE_NOT_BEGAN_YET),
+solver_instance(nullptr), es_filling(fill), solver_ret(FCS_STATE_NOT_BEGAN_YET),
 unlimited_move(unlimit)
 {
     deck = Deck::new_deck(this, decks);
@@ -319,8 +319,8 @@ void FreecellBase::resumeSolution()
 MoveHint *FreecellBase::translateMove(void *m) {
     fcs_move_t move = *(static_cast<fcs_move_t *>(m));
     uint cards = fcs_move_get_num_cards_in_seq(move);
-    Pile *from = 0;
-    Pile *to = 0;
+    Pile *from = nullptr;
+    Pile *to = nullptr;
 
     switch(fcs_move_get_type(move))
     {
@@ -350,13 +350,13 @@ MoveHint *FreecellBase::translateMove(void *m) {
         case FCS_MOVE_TYPE_STACK_TO_FOUNDATION:
             from = store[fcs_move_get_src_stack(move)];
             cards = 1;
-            to = 0;
+            to = nullptr;
             break;
 
         case FCS_MOVE_TYPE_FREECELL_TO_FOUNDATION:
             from = freecell[fcs_move_get_src_freecell(move)];
             cards = 1;
-            to = 0;
+            to = nullptr;
     }
     assert(from);
     assert(cards <= from->cards().count());
@@ -552,7 +552,7 @@ MoveHint *FreecellBase::chooseHint()
             oldmoves.append(mh);
             return mh;
         } else
-            return 0;
+            return nullptr;
     } else
         return Dealer::chooseHint();
 }
@@ -813,7 +813,7 @@ bool FreecellBase::checkRemove(int checkIndex, const Pile *p, const Card *c) con
 class Freecell : public FreecellBase
 {
 public:
-    Freecell( TDEMainWindow* parent=0, const char* name=0);
+    Freecell( TDEMainWindow* parent=nullptr, const char* name=nullptr);
     virtual void deal();
 };
 
diff --git a/kpat/freecell.h b/kpat/freecell.h
index bdd836c7..0ceefe61 100644
--- a/kpat/freecell.h
+++ b/kpat/freecell.h
@@ -27,7 +27,7 @@
 class FreecellPile : public Pile
 {
 public:
-    FreecellPile(int _index, Dealer* parent = 0) : Pile(_index, parent) {}
+    FreecellPile(int _index, Dealer* parent = nullptr) : Pile(_index, parent) {}
     virtual void moveCards(CardList &c, Pile *to);
 };
 
@@ -38,7 +38,7 @@ class FreecellBase : public Dealer
 
 public:
     FreecellBase( int decks, int stores, int freecells, int es_filling, bool unlimited_move,
-                  TDEMainWindow* parent=0, const char* name=0);
+                  TDEMainWindow* parent=nullptr, const char* name=nullptr);
     void moveCards(CardList &c, FreecellPile *from, Pile *to);
     TQString solverFormat() const;
     virtual ~FreecellBase();
diff --git a/kpat/golf.cpp b/kpat/golf.cpp
index 83e34c38..1228e0f0 100644
--- a/kpat/golf.cpp
+++ b/kpat/golf.cpp
@@ -108,7 +108,7 @@ void Golf::deal()
 
 Card *Golf::demoNewCards()
 {
-    deckClicked(0);
+    deckClicked(nullptr);
     return waste->top();
 }
 
diff --git a/kpat/golf.h b/kpat/golf.h
index cdf4d17f..9c3b8a8f 100644
--- a/kpat/golf.h
+++ b/kpat/golf.h
@@ -9,7 +9,7 @@ class HorRightPile : public Pile
   
 
 public:
-    HorRightPile( int _index, Dealer* parent = 0);
+    HorRightPile( int _index, Dealer* parent = nullptr);
     virtual TQSize cardOffset( bool _spread, bool _facedown, const Card *before) const;
 };
 
@@ -19,7 +19,7 @@ class Golf : public Dealer
   
 
 public:
-    Golf( TDEMainWindow* parent=0, const char* name=0);
+    Golf( TDEMainWindow* parent=nullptr, const char* name=nullptr);
     void deal();
     virtual void restart();
     virtual bool isGameLost() const;
diff --git a/kpat/grandf.cpp b/kpat/grandf.cpp
index 1a8aeaf3..53285459 100644
--- a/kpat/grandf.cpp
+++ b/kpat/grandf.cpp
@@ -75,7 +75,7 @@ Card *Grandf::demoNewCards()
         redeal();
         return store[3]->top();
     } else
-        return 0;
+        return nullptr;
 }
 
 void Grandf::deal() {
diff --git a/kpat/grandf.h b/kpat/grandf.h
index 59091f14..89e98b46 100644
--- a/kpat/grandf.h
+++ b/kpat/grandf.h
@@ -38,7 +38,7 @@ class Grandf : public Dealer {
   
 
 public:
-    Grandf( TDEMainWindow* parent=0, const char* name=0);
+    Grandf( TDEMainWindow* parent=nullptr, const char* name=nullptr);
 
 public slots:
     void redeal();
diff --git a/kpat/gypsy.cpp b/kpat/gypsy.cpp
index 77e6d55b..3c42c11d 100644
--- a/kpat/gypsy.cpp
+++ b/kpat/gypsy.cpp
@@ -50,7 +50,7 @@ void Gypsy::deal() {
 Card *Gypsy::demoNewCards()
 {
     if (deck->isEmpty())
-        return 0;
+        return nullptr;
     dealRow(true);
     return store[0]->top();
 }
@@ -78,7 +78,7 @@ bool Gypsy::isGameLost() const {
             Card *cnext=store[i]->top();
             int indexi=store[i]->indexOf(cnext);
 
-            Card *cardi= 0;
+            Card *cardi= nullptr;
             do{
                 cardi=cnext;
                 if (indexi>0)
diff --git a/kpat/gypsy.h b/kpat/gypsy.h
index 0bcd2300..f57a0740 100644
--- a/kpat/gypsy.h
+++ b/kpat/gypsy.h
@@ -14,7 +14,7 @@ class Gypsy : public Dealer {
   
 
 public:
-    Gypsy( TDEMainWindow* parent=0, const char* name=0);
+    Gypsy( TDEMainWindow* parent=nullptr, const char* name=nullptr);
 	virtual bool isGameLost() const;
 
 public slots:
diff --git a/kpat/idiot.cpp b/kpat/idiot.cpp
index 65397616..4511f8d0 100644
--- a/kpat/idiot.cpp
+++ b/kpat/idiot.cpp
@@ -215,7 +215,7 @@ void Idiot::getHints()
 Card *Idiot::demoNewCards()
 {
     if ( m_deck->isEmpty() )
-        return 0;
+        return nullptr;
 
     deal();
 
diff --git a/kpat/idiot.h b/kpat/idiot.h
index 0f720056..dcbc0e63 100644
--- a/kpat/idiot.h
+++ b/kpat/idiot.h
@@ -32,7 +32,7 @@ class Idiot: public Dealer
 
 public:
 
-    Idiot( TDEMainWindow* parent = 0, const char* name = 0 );
+    Idiot( TDEMainWindow* parent = nullptr, const char* name = nullptr );
 
     virtual bool  isGameWon() const;
 
diff --git a/kpat/kings.h b/kpat/kings.h
index e908112b..ee6b20e9 100644
--- a/kpat/kings.h
+++ b/kpat/kings.h
@@ -12,7 +12,7 @@ class Kings : public FreecellBase {
   
 
 public:
-    Kings( TDEMainWindow* parent=0, const char* name=0);
+    Kings( TDEMainWindow* parent=nullptr, const char* name=nullptr);
     virtual bool isGameLost() const;
 
 public slots:
diff --git a/kpat/klondike.h b/kpat/klondike.h
index 3a792607..2f22b952 100644
--- a/kpat/klondike.h
+++ b/kpat/klondike.h
@@ -35,7 +35,7 @@ class Klondike : public Dealer {
   
 
 public:
-    Klondike( bool easy, TDEMainWindow* parent=0, const char* name=0);
+    Klondike( bool easy, TDEMainWindow* parent=nullptr, const char* name=nullptr);
 
 public:
     virtual void restart();
diff --git a/kpat/main.cpp b/kpat/main.cpp
index 5209d5ed..9a2d727a 100644
--- a/kpat/main.cpp
+++ b/kpat/main.cpp
@@ -27,7 +27,7 @@ static const char description[] = I18N_NOOP("TDE Patience Game");
 
 static TDECmdLineOptions options[] =
 {
-    { "+file",          I18N_NOOP("File to load"), 0 },
+    { "+file",          I18N_NOOP("File to load"), nullptr },
     TDECmdLineLastOption
 };
 
@@ -38,10 +38,10 @@ int main( int argc, char **argv )
                           "(c) 1995, Paul Olav Tvete\n"
                           "(c) 2000 Stephan Kulow");
     aboutData.addAuthor("Paul Olav Tvete");
-    aboutData.addAuthor("Mario Weilguni",0,"mweilguni@kde.org");
-    aboutData.addAuthor("Matthias Ettrich",0,"ettrich@kde.org");
+    aboutData.addAuthor("Mario Weilguni",nullptr,"mweilguni@kde.org");
+    aboutData.addAuthor("Matthias Ettrich",nullptr,"ettrich@kde.org");
     aboutData.addAuthor("Rodolfo Borges",I18N_NOOP("Some Game Types"),"barrett@9hells.org");
-    aboutData.addAuthor("Peter H. Ruegg",0,"kpat@incense.org");
+    aboutData.addAuthor("Peter H. Ruegg",nullptr,"kpat@incense.org");
     aboutData.addAuthor("Michael Koch", I18N_NOOP("Bug fixes"), "koch@kde.org");
     aboutData.addAuthor("Marcus Meissner", I18N_NOOP("Shuffle algorithm for game numbers"),
                         "mm@caldera.de");
diff --git a/kpat/mod3.cpp b/kpat/mod3.cpp
index 25488962..552d8ac3 100644
--- a/kpat/mod3.cpp
+++ b/kpat/mod3.cpp
@@ -171,8 +171,8 @@ void Mod3::deal()
 Card *Mod3::demoNewCards()
 {
    if (deck->isEmpty())
-       return 0;
-   deckClicked(0);
+       return nullptr;
+   deckClicked(nullptr);
    return stack[3][0]->top();
 }
 
diff --git a/kpat/mod3.h b/kpat/mod3.h
index 76d1f9f0..6f05aa27 100644
--- a/kpat/mod3.h
+++ b/kpat/mod3.h
@@ -31,7 +31,7 @@ class Mod3 : public Dealer
   
 
 public:
-    Mod3( TDEMainWindow* parent=0, const char* name=0);
+    Mod3( TDEMainWindow* parent=nullptr, const char* name=nullptr);
 
     void deal();
 
diff --git a/kpat/napoleon.cpp b/kpat/napoleon.cpp
index dc23bc1d..d33ccba8 100644
--- a/kpat/napoleon.cpp
+++ b/kpat/napoleon.cpp
@@ -127,8 +127,8 @@ void Napoleon::deal1(Card *) {
 Card *Napoleon::demoNewCards()
 {
     if (deck->isEmpty())
-        return 0;
-    deal1(0);
+        return nullptr;
+    deal1(nullptr);
     return pile->top();
 }
 
diff --git a/kpat/napoleon.h b/kpat/napoleon.h
index d4a8ba7b..4b173e3f 100644
--- a/kpat/napoleon.h
+++ b/kpat/napoleon.h
@@ -27,7 +27,7 @@ class Napoleon : public Dealer {
     TQ_OBJECT
   
 public:
-    Napoleon (TDEMainWindow* parent=0, const char* name=0);
+    Napoleon (TDEMainWindow* parent=nullptr, const char* name=nullptr);
 
     virtual void restart();
     virtual void getHints();
diff --git a/kpat/pile.cpp b/kpat/pile.cpp
index 8e6ce1db..03dda6cf 100644
--- a/kpat/pile.cpp
+++ b/kpat/pile.cpp
@@ -109,7 +109,7 @@ Pile::~Pile()
                 i = (*it)->source()->index();
             kdDebug(11111) << "pile doesn't match " << index() << " - " << i << endl;
         }
-        (*it)->setSource(0);
+        (*it)->setSource(nullptr);
     }
 }
 
@@ -224,7 +224,7 @@ int Pile::indexOf(const Card *c) const
 Card *Pile::at(int index) const
 {
     if (index < 0 || index >= int(m_cards.count()))
-        return 0;
+        return nullptr;
     return *m_cards.at(index);
 }
 
@@ -234,7 +234,7 @@ Card *Pile::at(int index) const
 Card *Pile::top() const
 {
     if (m_cards.isEmpty())
-        return 0;
+        return nullptr;
 
     return m_cards.last();
 }
@@ -243,7 +243,7 @@ void Pile::clear()
 {
     for (CardList::Iterator it = m_cards.begin(); it != m_cards.end(); ++it)
     {
-        (*it)->setSource(0);
+        (*it)->setSource(nullptr);
     }
     m_cards.clear();
 }
@@ -265,8 +265,8 @@ void Pile::add( Card *_card, int index)
         m_cards.append(_card);
     else {
         while (m_cards.count() <= uint(index))
-            m_cards.append(0);
-        assert(m_cards[index] == 0);
+            m_cards.append(nullptr);
+        assert(!m_cards[index]);
         m_cards[index] = _card;
     }
 }
@@ -407,7 +407,7 @@ void Pile::moveCardsBack(CardList &cl, bool anim)
 
     Card *c = cl.first();
 
-    Card *before = 0;
+    Card *before = nullptr;
     TQSize off;
 
     int steps = STEPS_MOVEBACK;
@@ -436,7 +436,7 @@ void Pile::moveCardsBack(CardList &cl, bool anim)
     CardList::Iterator it = cl.begin(); // == c
     ++it;
 
-    off = cardOffset(m_addFlags & Pile::addSpread, false, 0);
+    off = cardOffset(m_addFlags & Pile::addSpread, false, nullptr);
 
     for (; it != cl.end(); ++it)
     {
diff --git a/kpat/pile.h b/kpat/pile.h
index 92d13ff4..d297a51c 100644
--- a/kpat/pile.h
+++ b/kpat/pile.h
@@ -41,7 +41,7 @@ public:
     static const int autoTurnTop;
     static const int wholeColumn;
 
-    Pile( int _index, Dealer* parent = 0);
+    Pile( int _index, Dealer* parent = nullptr);
     virtual ~Pile();
 
     Dealer   *dealer() const { return m_dealer; }
@@ -50,7 +50,7 @@ public:
     bool legalAdd(const CardList &c ) const;
     bool legalRemove(const Card *c) const;
 
-    virtual void moveCards(CardList &c, Pile *to = 0);
+    virtual void moveCards(CardList &c, Pile *to = nullptr);
     void moveCardsBack(CardList &c, bool anim = true);
 
     void setAddFlags( int flag )    { m_addFlags    = flag; }
diff --git a/kpat/pwidget.cpp b/kpat/pwidget.cpp
index de2a96a7..199c945f 100644
--- a/kpat/pwidget.cpp
+++ b/kpat/pwidget.cpp
@@ -47,7 +47,7 @@
 #include "gamestatsimpl.h"
 
 
-static pWidget *current_pwidget = 0;
+static pWidget *current_pwidget = nullptr;
 
 
 void saveGame(int) {
@@ -55,7 +55,7 @@ void saveGame(int) {
 }
 
 pWidget::pWidget()
-    : TDEMainWindow(0, "pwidget"), dill(0)
+    : TDEMainWindow(nullptr, "pwidget"), dill(nullptr)
 {
     current_pwidget = this;
     // TDECrash::setEmergencySaveFunction(::saveGame);
@@ -297,7 +297,7 @@ void pWidget::newGame()
     // Check if the user is already running a game, and if she is,
     // then ask if she wants to abort it.
     if (!dill->isGameWon() && !dill->isGameLost()
-	&& KMessageBox::warningContinueCancel(0,
+	&& KMessageBox::warningContinueCancel(nullptr,
                                      i18n("You are already running an unfinished game.  "
                                           "If you abort the old game to start a new one, "
                                           "the old game will be registered as a loss in "
@@ -336,7 +336,7 @@ void pWidget::setGameCaption()
 void pWidget::newGameType()
 {
     delete dill;
-    dill = 0;
+    dill = nullptr;
     slotUpdateMoves();
 
     uint id = games->currentItem();
@@ -437,7 +437,7 @@ void pWidget::setBackSide(const TQString &deck, const TQString &cards)
 void pWidget::chooseGame()
 {
     bool ok;
-    long number = KInputDialog::getText(i18n("Game Number"), i18n("Enter a game number (FreeCell deals are the same as in the FreeCell FAQ):"), TQString::number(dill->gameNumber()), 0, this).toLong(&ok);
+    long number = KInputDialog::getText(i18n("Game Number"), i18n("Enter a game number (FreeCell deals are the same as in the FreeCell FAQ):"), TQString::number(dill->gameNumber()), nullptr, this).toLong(&ok);
     if (ok) {
         dill->setGameNumber(number);
         setGameCaption();
@@ -467,7 +467,7 @@ void pWidget::gameLost()
 
     // The following code is taken out of tdemessagebox.cpp in tdeui.
     // Is there a better way?
-    TDEConfig  *config = 0;
+    TDEConfig  *config = nullptr;
     TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages");
 
     config = TDEGlobal::config();
diff --git a/kpat/simon.h b/kpat/simon.h
index 5ec8c3dc..c2755c04 100644
--- a/kpat/simon.h
+++ b/kpat/simon.h
@@ -8,7 +8,7 @@ class Simon : public Dealer {
   
 
 public:
-    Simon( TDEMainWindow* parent=0, const char* name=0);
+    Simon( TDEMainWindow* parent=nullptr, const char* name=nullptr);
 
 public slots:
     void deal();
diff --git a/kpat/spider.cpp b/kpat/spider.cpp
index 6b4843c4..3df33931 100644
--- a/kpat/spider.cpp
+++ b/kpat/spider.cpp
@@ -221,7 +221,7 @@ MoveHint *Spider::chooseHint()
 {
     kdDebug(11111) << "choose 1 of " << hints.count() << " hints" << endl;
     if (hints.isEmpty())
-        return 0;
+        return nullptr;
 
     // first, choose a card that is moving to the same suit
     for (HintList::ConstIterator it = hints.begin(); it != hints.end(); ++it)
@@ -382,8 +382,8 @@ void Spider::deal()
 Card *Spider::demoNewCards()
 {
    if (m_leg > 4)
-       return 0;
-   deckClicked(0);
+       return nullptr;
+   deckClicked(nullptr);
    return stack[0]->top();
 }
 
diff --git a/kpat/spider.h b/kpat/spider.h
index d54db076..4bebd823 100644
--- a/kpat/spider.h
+++ b/kpat/spider.h
@@ -26,7 +26,7 @@
 class SpiderPile : public Pile
 {
 public:
-    SpiderPile(int _index, Dealer* parent = 0) : Pile(_index, parent) {}
+    SpiderPile(int _index, Dealer* parent = nullptr) : Pile(_index, parent) {}
     virtual void moveCards(CardList &c, Pile *to);
     CardList getRun();
 };
@@ -37,7 +37,7 @@ class Spider : public Dealer
   
 
 public:
-    Spider(int suits, TDEMainWindow *parent=0, const char *name=0);
+    Spider(int suits, TDEMainWindow *parent=nullptr, const char *name=nullptr);
     void deal();
     void dealRow();
     void checkPileDeck(Pile *to);
diff --git a/kpat/yukon.h b/kpat/yukon.h
index 3dc591b2..71e609f6 100644
--- a/kpat/yukon.h
+++ b/kpat/yukon.h
@@ -8,7 +8,7 @@ class Yukon : public Dealer {
   
 
 public:
-    Yukon( TDEMainWindow* parent=0, const char* name=0);
+    Yukon( TDEMainWindow* parent=nullptr, const char* name=nullptr);
 	virtual bool isGameLost() const;
 
 public slots:
diff --git a/kpoker/betbox.h b/kpoker/betbox.h
index 37bee0b2..d11ba91d 100644
--- a/kpoker/betbox.h
+++ b/kpoker/betbox.h
@@ -36,7 +36,7 @@ class BetBox : public TQGroupBox
   
 
   public:
-    BetBox(TQWidget* parent = 0, const char* name = 0);
+    BetBox(TQWidget* parent = nullptr, const char* name = nullptr);
     ~BetBox();
 
 
diff --git a/kpoker/kpaint.h b/kpoker/kpaint.h
index a003339d..e2af1905 100644
--- a/kpoker/kpaint.h
+++ b/kpoker/kpaint.h
@@ -39,7 +39,7 @@ class CardImages : public TQWidget
   
 
   public:
-    CardImages( TQWidget *parent = 0, const char *name = 0 ); 
+    CardImages( TQWidget *parent = nullptr, const char *name = nullptr ); 
     ~CardImages();
 
     // FIXME: Use CardValue instead of int when the cards are in their
@@ -70,7 +70,7 @@ class CardWidget : public TQPushButton
   
 	    
   public:
-    CardWidget( TQWidget *parent=0, const char *name=0 );
+    CardWidget( TQWidget *parent=nullptr, const char *name=nullptr );
 	
     /**
      * Paints the deck if cardType = 0 or the card specified in cardType
diff --git a/kpoker/kpoker.cpp b/kpoker/kpoker.cpp
index ee36b725..384d302d 100644
--- a/kpoker/kpoker.cpp
+++ b/kpoker/kpoker.cpp
@@ -185,9 +185,9 @@ kpok::kpok(TQWidget *parent, const char *name)
   version = tdeApp->caption() + " " + KPOKER_VERSION;
   setCaption( version );
 
-  mOptions   = 0;
+  mOptions   = nullptr;
 
-  playerBox  = 0;
+  playerBox  = nullptr;
   adjust     = false;
 
   initWindow();		// FIXME: Change this name!!!
@@ -200,7 +200,7 @@ kpok::kpok(TQWidget *parent, const char *name)
 
 kpok::~kpok()
 {
-  if (mOptions != 0) {
+  if (mOptions) {
     if (m_numPlayers > 1)
       m_game.setBettingLimits(mOptions->getMinBet(), mOptions->getMaxBet());
 
@@ -300,7 +300,7 @@ void kpok::initWindow()
   connect (drawTimer, TQ_SIGNAL(timeout()), TQ_SLOT(drawCardsEvent()) );
 
   // and now the betUp/Down Buttons
-  betBox = new BetBox(this, 0);
+  betBox = new BetBox(this, nullptr);
   betLayout->addWidget(betBox);
   connect(betBox, TQ_SIGNAL(betChanged(int)), this, TQ_SLOT(betChange(int)));
   connect(betBox, TQ_SIGNAL(betAdjusted()),   this, TQ_SLOT(adjustBet()));
@@ -311,7 +311,7 @@ void kpok::initWindow()
   TQToolTip::add(potLabel, i18n("The current pot"));
 
   // Load all cards into pixmaps first -> in the constructor.
-  cardImages = new CardImages(this, 0);
+  cardImages = new CardImages(this, nullptr);
 
   // The configuration
   TDEConfig* conf = tdeApp->config();
@@ -997,7 +997,7 @@ void kpok::winner()
 
 void kpok::noMoney()
 {
-  KMessageBox::sorry(0, i18n("You Lost"), i18n("Oops, you went bankrupt.\n"
+  KMessageBox::sorry(nullptr, i18n("You Lost"), i18n("Oops, you went bankrupt.\n"
 					       "Starting a new game.\n"));
   newGame();
 }
@@ -1183,7 +1183,7 @@ void kpok::removePlayerFromRound(PokerPlayer* removePlayer)
 
 void kpok::switchToOnePlayerRules()
 {
-  KMessageBox::information(0, i18n("You are the only player with money!\n"
+  KMessageBox::information(nullptr, i18n("You are the only player with money!\n"
 				   "Switching to one player rules..."), 
 			   i18n("You Won"));
 
@@ -1253,7 +1253,7 @@ bool kpok::readEntriesAndInitPoker()
   }
   initPoker(numPlayers);
 
-  if (newGameDlg != 0) {
+  if (newGameDlg) {
     delete newGameDlg;
   }
 
@@ -1323,8 +1323,8 @@ void kpok::toggleAdjust()   { setAdjust(!adjust); }
 
 void kpok::slotPreferences()
 {
-  if ( mOptions==0 )
-    mOptions = new OptionsDlg(this, 0, m_numPlayers);
+  if ( !mOptions )
+    mOptions = new OptionsDlg(this, nullptr, m_numPlayers);
 
   if (m_numPlayers > 1)
     mOptions->init(drawDelay, m_game.getMaxBet(), m_game.getMinBet());
@@ -1333,7 +1333,7 @@ void kpok::slotPreferences()
 
   if (!mOptions->exec()) {
     delete mOptions;
-    mOptions = 0;
+    mOptions = nullptr;
   }
 }
 
@@ -1375,7 +1375,7 @@ void kpok::setSound(bool s)
 
 void kpok::readOptions()
 {
-  if (mOptions != 0) {
+  if (mOptions) {
     if (m_numPlayers > 1) {
       m_game.setBettingLimits(mOptions->getMinBet(), mOptions->getMaxBet());
       for (int i = 0; i < m_game.getNumActivePlayers(); i++)
@@ -1386,7 +1386,7 @@ void kpok::readOptions()
     //	kdDebug() << cashPerRound << endl;
     //	cashPerRound = mOptions->getCashPerRound(); // NOT(!) configurable
     delete mOptions;
-    mOptions = 0;
+    mOptions = nullptr;
   }
 }
 
@@ -1451,8 +1451,8 @@ void kpok::exchangeCard5()  { playerBox[0]->cardClicked(5); }
 void kpok::slotCardDeck()
 {
   tdeApp->config()->setGroup("General");
-  TQString deckPath = tdeApp->config()->readPathEntry("DeckPath", 0);
-  TQString cardPath = tdeApp->config()->readPathEntry("CardPath", 0);
+  TQString deckPath = tdeApp->config()->readPathEntry("DeckPath", nullptr);
+  TQString cardPath = tdeApp->config()->readPathEntry("CardPath", nullptr);
   bool randomDeck, randomCardDir;
 
   // Show the "Select Card Deck" dialog and load the images for the
diff --git a/kpoker/kpoker.h b/kpoker/kpoker.h
index 0d158f9a..f68b9403 100644
--- a/kpoker/kpoker.h
+++ b/kpoker/kpoker.h
@@ -173,7 +173,7 @@ class kpok : public TQWidget
   
 
  public:
-  kpok(TQWidget * parent = 0, const char *name = 0);
+  kpok(TQWidget * parent = nullptr, const char *name = nullptr);
   virtual ~kpok();
 	
   TQString getName (int playerNr); 
diff --git a/kpoker/newgamedlg.cpp b/kpoker/newgamedlg.cpp
index 962c239d..2b0e849c 100644
--- a/kpoker/newgamedlg.cpp
+++ b/kpoker/newgamedlg.cpp
@@ -36,7 +36,7 @@
 
 NewGameDlg::NewGameDlg(TQWidget* parent)
   : KDialogBase(Plain, i18n("New Game"), 
-		Ok|Cancel, Ok, parent, 0, true, true)
+		Ok|Cancel, Ok, parent, nullptr, true, true)
 {
   TQVBoxLayout  *topLayout = new TQVBoxLayout(plainPage(), spacingHint());
   TQHBoxLayout  *l         = new TQHBoxLayout(topLayout);
diff --git a/kpoker/newgamedlg.h b/kpoker/newgamedlg.h
index 46440095..a0812c44 100644
--- a/kpoker/newgamedlg.h
+++ b/kpoker/newgamedlg.h
@@ -42,7 +42,7 @@ class NewGameDlg : public KDialogBase
   
 
  public:
-  NewGameDlg(TQWidget* parent = 0);
+  NewGameDlg(TQWidget* parent = nullptr);
   ~NewGameDlg();
 
   /**
@@ -79,7 +79,7 @@ class NewGameDlg : public KDialogBase
    **/
   void hideReadingFromConfig();
 
-  void setPlayerNames(int no = -1, TQString playerName = 0);
+  void setPlayerNames(int no = -1, TQString playerName = nullptr);
 
 
  protected slots:
diff --git a/kpoker/optionsdlg.cpp b/kpoker/optionsdlg.cpp
index e095bd1d..6c30281b 100644
--- a/kpoker/optionsdlg.cpp
+++ b/kpoker/optionsdlg.cpp
@@ -33,8 +33,8 @@ OptionsDlg::OptionsDlg(TQWidget* parent, const char* name, int _players)
 		parent, name, true, true)
 {
   TQVBoxLayout* topLayout = new TQVBoxLayout(plainPage(), spacingHint());
-  maxBet = 0;
-  minBet = 0;
+  maxBet = nullptr;
+  minBet = nullptr;
 
   if (_players <= 0)
     players = DEFAULT_PLAYERS;
diff --git a/kpoker/optionsdlg.h b/kpoker/optionsdlg.h
index 3109fa9e..395cb9f7 100644
--- a/kpoker/optionsdlg.h
+++ b/kpoker/optionsdlg.h
@@ -42,7 +42,7 @@ class OptionsDlg : public KDialogBase
   
 
  public:
-  OptionsDlg(TQWidget* parent = 0, const char* name = 0, int _players = 1);
+  OptionsDlg(TQWidget* parent = nullptr, const char* name = nullptr, int _players = 1);
   ~OptionsDlg();
 
   void init(int _drawDelay, int _maxBetOrCashPerRound, int minBet = -1);
diff --git a/kpoker/playerbox.h b/kpoker/playerbox.h
index 652d86a3..0d536efe 100644
--- a/kpoker/playerbox.h
+++ b/kpoker/playerbox.h
@@ -35,7 +35,7 @@ class PlayerBox : public TQGroupBox
   
 
   public:
-    PlayerBox(bool playerOne, TQWidget* parent = 0, const char* name = 0);
+    PlayerBox(bool playerOne, TQWidget* parent = nullptr, const char* name = nullptr);
     ~PlayerBox();
 
     void cardClicked(int no);
diff --git a/kpoker/top.cpp b/kpoker/top.cpp
index 95229081..d90f2eea 100644
--- a/kpoker/top.cpp
+++ b/kpoker/top.cpp
@@ -41,7 +41,7 @@
 
 PokerWindow::PokerWindow()
 {
-  m_kpok = new kpok(this, 0);
+  m_kpok = new kpok(this, nullptr);
   setCentralWidget( m_kpok );
   m_kpok->show();
 
diff --git a/kreversi/Position.h b/kreversi/Position.h
index b6c489ea..95dab1de 100644
--- a/kreversi/Position.h
+++ b/kreversi/Position.h
@@ -77,7 +77,7 @@ public:
   bool   moveIsPossible(Color color) const;
   bool   moveIsAtAllPossible()       const;
   bool   moveIsLegal(SimpleMove &move)     const;
-  bool   doMove(SimpleMove &move, TQValueList<char> *turned = 0);
+  bool   doMove(SimpleMove &move, TQValueList<char> *turned = nullptr);
   bool   doMove(Move &move);
   bool   undoMove(Move &move);
 
diff --git a/kreversi/highscores.cpp b/kreversi/highscores.cpp
index c230299a..a72a6e88 100644
--- a/kreversi/highscores.cpp
+++ b/kreversi/highscores.cpp
@@ -29,11 +29,11 @@ namespace KExtHighscore
 
 const ExtManager::Data ExtManager::DATA[SuperEngine::NbStrengths] = {
   { I18N_NOOP("1 (Beginner)"), "beginner" },
-  { I18N_NOOP("2"), 0 },
-  { I18N_NOOP("3"), 0 },
+  { I18N_NOOP("2"), nullptr },
+  { I18N_NOOP("3"), nullptr },
   { I18N_NOOP("4 (Average)"), "average" },
-  { I18N_NOOP("5"), 0 },
-  { I18N_NOOP("6"), 0 },
+  { I18N_NOOP("5"), nullptr },
+  { I18N_NOOP("6"), nullptr },
   { I18N_NOOP("7 (Expert)"), "expert" }
 };
 
diff --git a/kreversi/kreversi.cpp b/kreversi/kreversi.cpp
index 1b5533b3..886d00af 100644
--- a/kreversi/kreversi.cpp
+++ b/kreversi/kreversi.cpp
@@ -167,7 +167,7 @@ void KReversi::createTDEActions()
   continueAction = new TDEAction(i18n("&Continue Thinking"), "reload", 0,
 			       this, TQ_SLOT(slotContinue()), actionCollection(),
 			       "game_continue");
-  new TDEAction(i18n("S&witch Sides"), 0, 0,
+  new TDEAction(i18n("S&witch Sides"), nullptr, 0,
 	      this, TQ_SLOT(slotSwitchSides()), actionCollection(),
 	      "game_switch_sides");
 
@@ -220,7 +220,7 @@ void KReversi::slotNewGame()
   // If already playing, ask the player if he wants to abort the old game.
   if ( isPlaying() ) {
     if (KMessageBox
-	::warningYesNo(0,
+	::warningYesNo(nullptr,
 		       i18n("You are already running an unfinished game.  "
 			    "If you abort the old game to start a new one, "
 			    "the old game will be registered as a loss in "
@@ -752,7 +752,7 @@ void KReversi::slotEditSettings()
 
   TDEConfigDialog *dialog  = new TDEConfigDialog(this, "settings", Prefs::self(), 
 					     KDialogBase::Swallow);
-  Settings      *general = new Settings(0, "General");
+  Settings      *general = new Settings(nullptr, "General");
 
   dialog->addPage(general, i18n("General"), "package_settings");
   connect(dialog, TQ_SIGNAL(settingsChanged()), this, TQ_SLOT(loadSettings()));
diff --git a/kreversi/kzoommainwindow.cpp b/kreversi/kzoommainwindow.cpp
index ca31e998..1b6bccc5 100644
--- a/kreversi/kzoommainwindow.cpp
+++ b/kreversi/kzoommainwindow.cpp
@@ -29,7 +29,7 @@
 
 KZoomMainWindow::KZoomMainWindow(uint min, uint max, uint step, 
 				 const char *name)
-  : TDEMainWindow(0, name), m_zoomStep(step), m_minZoom(min), m_maxZoom(max)
+  : TDEMainWindow(nullptr, name), m_zoomStep(step), m_minZoom(min), m_maxZoom(max)
 {
   installEventFilter(this);
   
diff --git a/kreversi/kzoommainwindow.h b/kreversi/kzoommainwindow.h
index 806acf87..c63daed2 100644
--- a/kreversi/kzoommainwindow.h
+++ b/kreversi/kzoommainwindow.h
@@ -51,7 +51,7 @@ class KZoomMainWindow : public TDEMainWindow
 public:
   /** Constructor. */
   KZoomMainWindow(uint minZoom, uint maxZoom, uint zoomStep,
-                  const char *name = 0);
+                  const char *name = nullptr);
 
   /** Add a widget to be managed i.e. the adjustSize() method of the
    * widget is called whenever the zoom is changed.
@@ -72,7 +72,7 @@ protected:
    * @param popupName is the name of the context popup menu as defined in
    * the ui.rc file.
    */
-  void  init(const char *popupName = 0);
+  void  init(const char *popupName = nullptr);
     
   virtual void  setZoom(uint zoom);
   virtual bool  eventFilter(TQObject *o, TQEvent *e);
diff --git a/kreversi/main.cpp b/kreversi/main.cpp
index cf9241e1..d8d5c51d 100644
--- a/kreversi/main.cpp
+++ b/kreversi/main.cpp
@@ -57,12 +57,12 @@ int main(int argc, char **argv)
   TDEAboutData aboutData( "kreversi", I18N_NOOP("KReversi"),
     KREVERSI_VERSION, description, TDEAboutData::License_GPL,
     "(c) 1997-2000, Mario Weilguni");
-  aboutData.addAuthor("Mario Weilguni",0, "mweilguni@sime.com");
-  aboutData.addAuthor("Benjamin Meyer",0, "ben+kreversi@meyerhome.net");
-  aboutData.addCredit("Mats Luthman", I18N_NOOP("Game engine, ported from his JAVA applet."), 0);
-  aboutData.addCredit("Stephan Kulow", I18N_NOOP("Comments and bugfixes."), 0);
-  aboutData.addCredit("Arne Klaassen", I18N_NOOP("Raytraced chips."), 0);
-  aboutData.addCredit("Inge Wallin", I18N_NOOP("Cleaning, bugfixes, some enhancements."), 0);
+  aboutData.addAuthor("Mario Weilguni",nullptr, "mweilguni@sime.com");
+  aboutData.addAuthor("Benjamin Meyer",nullptr, "ben+kreversi@meyerhome.net");
+  aboutData.addCredit("Mats Luthman", I18N_NOOP("Game engine, ported from his JAVA applet."), nullptr);
+  aboutData.addCredit("Stephan Kulow", I18N_NOOP("Comments and bugfixes."), nullptr);
+  aboutData.addCredit("Arne Klaassen", I18N_NOOP("Raytraced chips."), nullptr);
+  aboutData.addCredit("Inge Wallin", I18N_NOOP("Cleaning, bugfixes, some enhancements."), nullptr);
 
   TDECmdLineArgs::init( argc, argv, &aboutData );
 
diff --git a/kreversi/qreversigame.h b/kreversi/qreversigame.h
index 3e7388e0..264245ee 100644
--- a/kreversi/qreversigame.h
+++ b/kreversi/qreversigame.h
@@ -67,7 +67,7 @@ class QReversiGame : public TQObject, public Game {
   
 
  public:
-  QReversiGame(TQObject *parent = 0);
+  QReversiGame(TQObject *parent = nullptr);
   ~QReversiGame();
 
   // Methods dealing with the game
diff --git a/ksame/KSameWidget.cpp b/ksame/KSameWidget.cpp
index 818a2879..da8572cb 100644
--- a/ksame/KSameWidget.cpp
+++ b/ksame/KSameWidget.cpp
@@ -55,7 +55,7 @@ KSameWidget::KSameWidget(TQWidget *parent, const char* name, WFlags fl) :
 	KStdGameAction::quit(this, TQ_SLOT(close()), actionCollection(), "game_quit");
 	undo = KStdGameAction::undo(this, TQ_SLOT(m_undo()), actionCollection(), "edit_undo");
 
-	random = new TDEToggleAction(i18n("&Random Board"), 0, 0, 0, actionCollection(), "random_board");
+	random = new TDEToggleAction(i18n("&Random Board"), 0, nullptr, nullptr, actionCollection(), "random_board");
 	showNumberRemaining = new TDEToggleAction(i18n("&Show Number Remaining"), 0, this, TQ_SLOT(showNumberRemainingToggled()), actionCollection(), "showNumberRemaining");
 
 	KStdAction::configureNotifications(this, TQ_SLOT(configureNotifications()),
diff --git a/ksame/KSameWidget.h b/ksame/KSameWidget.h
index b2ecd182..85d938c9 100644
--- a/ksame/KSameWidget.h
+++ b/ksame/KSameWidget.h
@@ -31,7 +31,7 @@ class KSameWidget: public TDEMainWindow {
   
 
 public:
-     KSameWidget(TQWidget *parent=0, const char* name=0, WFlags fl=0);
+     KSameWidget(TQWidget *parent=nullptr, const char* name=nullptr, WFlags fl=0);
 
 private slots:
      /* File Menu */
diff --git a/ksame/StoneField.cpp b/ksame/StoneField.cpp
index 356986c2..f354368c 100644
--- a/ksame/StoneField.cpp
+++ b/ksame/StoneField.cpp
@@ -61,7 +61,7 @@ StoneField::StoneField(int width, int height,
     Q_ASSERT(height>0);
 
     if (undoenabled) undolist=new TQPtrList<StoneFieldState>;
-    else undolist=0;
+    else undolist=nullptr;
 
     sizex=width;
     sizey=height;
@@ -313,7 +313,7 @@ StoneField::undo(int count) {
 	if (count <= 0)
 		return 0;
      int undocount=1;
-     StoneFieldState *state=0;
+     StoneFieldState *state=nullptr;
      undolist->setAutoDelete(true);
      while (--count>0) {
 	  if (undolist->count()==1) break;
diff --git a/ksame/StoneWidget.cpp b/ksame/StoneWidget.cpp
index 57ef5c8f..6953e82e 100644
--- a/ksame/StoneWidget.cpp
+++ b/ksame/StoneWidget.cpp
@@ -251,7 +251,7 @@ StoneWidget::timerEvent( TQTimerEvent * ) {
     if (x<0||y<0||x>=field_width||y>=field_height)
         stonefield.unmark();
     slice=(slice+1)%maxslices;
-    paintEvent(0);
+    paintEvent(nullptr);
 }
 
 void
diff --git a/ksame/StoneWidget.h b/ksame/StoneWidget.h
index 5522816e..7636c5b8 100644
--- a/ksame/StoneWidget.h
+++ b/ksame/StoneWidget.h
@@ -46,7 +46,7 @@ class StoneWidget : public TQWidget {
     StoneSlice **map;
 
 public:
-    StoneWidget( TQWidget *parent=0, int x=10,int y=10);
+    StoneWidget( TQWidget *parent=nullptr, int x=10,int y=10);
     ~StoneWidget();
 
     unsigned int board();
diff --git a/ksame/main.cpp b/ksame/main.cpp
index 0a634d01..2623e7a2 100644
--- a/ksame/main.cpp
+++ b/ksame/main.cpp
@@ -36,7 +36,7 @@ static const char copyright[] = "(c) 1997-1998 Marcus Kreutzberger";
 int main( int argc, char **argv ) {
 	TDEAboutData aboutData("ksame", I18N_NOOP("SameGame"), KSAME_VERSION,
                          description, TDEAboutData::License_GPL, copyright);
-    aboutData.addAuthor("Marcus Kreutzberger", 0, "kreutzbe@informatik.mu-luebeck.de");
+    aboutData.addAuthor("Marcus Kreutzberger", nullptr, "kreutzbe@informatik.mu-luebeck.de");
     TDECmdLineArgs::init(argc, argv, &aboutData);
 
     TDEApplication::setColorSpec(TQApplication::ManyColor+TQApplication::CustomColor);
diff --git a/kshisen/app.cpp b/kshisen/app.cpp
index ae3546f5..390b73c0 100644
--- a/kshisen/app.cpp
+++ b/kshisen/app.cpp
@@ -593,7 +593,7 @@ void App::writeHighscore()
 void App::showHighscore(int focusitem)
 {
 	// this may look a little bit confusing...
-	TQDialog *dlg = new TQDialog(0, "hall_Of_fame", true);
+	TQDialog *dlg = new TQDialog(nullptr, "hall_Of_fame", true);
 	dlg->setCaption(i18n("Hall of Fame"));
 
 	TQVBoxLayout *tl = new TQVBoxLayout(dlg, 10);
@@ -750,7 +750,7 @@ void App::showSettings(){
 		return;
 
 	TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Prefs::self(), KDialogBase::Swallow);
-	Settings *general = new Settings(0, "General");
+	Settings *general = new Settings(nullptr, "General");
 	dialog->addPage(general, i18n("General"), "package_settings");
 	connect(dialog, TQ_SIGNAL(settingsChanged()), this, TQ_SLOT(loadSettings()));
 	connect(dialog, TQ_SIGNAL(settingsChanged()), board, TQ_SLOT(loadSettings()));
diff --git a/kshisen/app.h b/kshisen/app.h
index 5fee0252..bd05cb5d 100644
--- a/kshisen/app.h
+++ b/kshisen/app.h
@@ -65,7 +65,7 @@ class App : public TDEMainWindow
   
 
 public:
-	App(TQWidget *parent = 0, const char *name=0);
+	App(TQWidget *parent = nullptr, const char *name=nullptr);
 
 private slots:
 	void loadSettings();
diff --git a/kshisen/board.cpp b/kshisen/board.cpp
index 3d85ab14..18fc3290 100644
--- a/kshisen/board.cpp
+++ b/kshisen/board.cpp
@@ -58,7 +58,7 @@ static int size_y[5] = { 6,  8, 12, 14, 16};
 static int DELAY[5] = {1000, 750, 500, 250, 125};
 
 Board::Board(TQWidget *parent, const char *name) : 
-       TQWidget(parent, name, WResizeNoErase), field(0),
+       TQWidget(parent, name, WResizeNoErase), field(nullptr),
        _x_tiles(0), _y_tiles(0),
        _delay(125), paused(false),
        gravity_flag(true), _solvable_flag(true),
@@ -249,7 +249,7 @@ void Board::setSize(int x, int y)
 	if(x == x_tiles() && y == y_tiles())
 		return;
 
-	if(field != 0)
+	if(field)
 		delete [] field;
 
 	field = new int[ x * y ];
@@ -730,7 +730,7 @@ void Board::undrawConnection()
 	// game is over?
 	if(!getHint_I(dummyPath))
 	{
-		time_for_game = (int)difftime( time(0), starttime);
+		time_for_game = (int)difftime( time(nullptr), starttime);
 		emit endOfGame();
 	}
 }
@@ -995,7 +995,7 @@ int Board::getTimeForGame() const
 
 bool Board::solvable(bool norestore)
 {
-	int *oldfield = 0;
+	int *oldfield = nullptr;
 
 	if(!norestore)
 	{
diff --git a/kshisen/board.h b/kshisen/board.h
index 08da3fcd..2ea0feed 100644
--- a/kshisen/board.h
+++ b/kshisen/board.h
@@ -73,7 +73,7 @@ class Board : public TQWidget
   
 
 public:
-	Board(TQWidget *parent = 0, const char *name=0);
+	Board(TQWidget *parent = nullptr, const char *name=nullptr);
 	~Board();
 
 	virtual void paintEvent(TQPaintEvent *);
diff --git a/kshisen/main.cpp b/kshisen/main.cpp
index e73d6adf..3fe07ddc 100644
--- a/kshisen/main.cpp
+++ b/kshisen/main.cpp
@@ -59,7 +59,7 @@ int main(int argc, char **argv)
 	aboutData.addAuthor("Dave Corrie", I18N_NOOP("Current Maintainer"), "kde@davecorrie.com");
 	aboutData.addAuthor("Mario Weilguni", I18N_NOOP("Original Author"), "mweilguni@sime.com");
 	aboutData.addCredit("Jason Lane", I18N_NOOP("Added 'tiles removed' counter\nTile smooth-scaling and window resizing"), "jglane@btopenworld.com");
-	aboutData.addCredit(0, I18N_NOOP("Thanks also to everyone who should be listed here but isn't!"), 0);
+	aboutData.addCredit(nullptr, I18N_NOOP("Thanks also to everyone who should be listed here but isn't!"), nullptr);
 	TDECmdLineArgs::init( argc, argv, &aboutData );
 
 	TDEApplication a;
diff --git a/kshisen/tileset.cpp b/kshisen/tileset.cpp
index 2b00ad58..ffc35827 100644
--- a/kshisen/tileset.cpp
+++ b/kshisen/tileset.cpp
@@ -39,7 +39,7 @@ TileSet::TileSet() : scaledTiles(nTiles)
 	TQImage tileset(TDEGlobal::dirs()->findResource("appdata", "tileset.png"));
 	if(tileset.isNull())
 	{
-		KMessageBox::sorry(0, i18n("Cannot load tiles pixmap!"));
+		KMessageBox::sorry(nullptr, i18n("Cannot load tiles pixmap!"));
 		TDEApplication::exit(1);
 	}
 
diff --git a/ksirtet/ksirtet/ai.cpp b/ksirtet/ksirtet/ai.cpp
index 61309852..1062ffbd 100644
--- a/ksirtet/ksirtet/ai.cpp
+++ b/ksirtet/ksirtet/ai.cpp
@@ -5,17 +5,17 @@
 
 
 const AI::Data KSAI::DATA[] = {
-    { "OccupiedLines", I18N_NOOP("Occupied lines:"), 0,
+    { "OccupiedLines", I18N_NOOP("Occupied lines:"), nullptr,
       false, nbOccupiedLines },
-    { "Holes", I18N_NOOP("Number of holes:"), 0,
+    { "Holes", I18N_NOOP("Number of holes:"), nullptr,
       false, nbHoles },
     { "Spaces", I18N_NOOP("Number of spaces:"), I18N_NOOP("Number of spaces under mean height"),
       false, nbSpaces },
-    { "Peak2Peak", I18N_NOOP("Peak-to-peak distance:"), 0,
+    { "Peak2Peak", I18N_NOOP("Peak-to-peak distance:"), nullptr,
       false, peakToPeak },
-    { "MeanHeight", I18N_NOOP("Mean height:"), 0,
+    { "MeanHeight", I18N_NOOP("Mean height:"), nullptr,
       false, mean },
-    { "FullLines", I18N_NOOP("Number of full lines:"), 0,
+    { "FullLines", I18N_NOOP("Number of full lines:"), nullptr,
       true, nbRemoved },
     LastData
 };
diff --git a/ksirtet/ksirtet/board.cpp b/ksirtet/ksirtet/board.cpp
index f50aa1a4..e01a12b1 100644
--- a/ksirtet/ksirtet/board.cpp
+++ b/ksirtet/ksirtet/board.cpp
@@ -128,7 +128,7 @@ bool KSBoard::_putGift(uint nb)
 	do {
 		i = randomGarbage.getLong(matrix().width());
         Coord c(i, 0);
-		if ( matrix()[c]!=0 ) continue;
+		if ( matrix()[c] ) continue;
         setGarbageBlock(c);
 		_nb--;
 	} while ( _nb!=0 );
diff --git a/ksirtet/ksirtet/main.cpp b/ksirtet/ksirtet/main.cpp
index 403b4448..91152a8e 100644
--- a/ksirtet/ksirtet/main.cpp
+++ b/ksirtet/ksirtet/main.cpp
@@ -17,7 +17,7 @@ const MPGameInfo MP_GAME_INFO = {
     4,     // max nb local games
     500,   // interval
     true,  // IA allowed
-    0, 0   // no setting slots
+    nullptr, nullptr   // no setting slots
 };
 
 const MainData MAIN_DATA = {
diff --git a/ksmiletris/gamewidget.h b/ksmiletris/gamewidget.h
index f0eb335b..417bb548 100644
--- a/ksmiletris/gamewidget.h
+++ b/ksmiletris/gamewidget.h
@@ -48,7 +48,7 @@ public:
 	int num_level;
 	int num_points;
 
-	GameWidget(TQWidget *parent=0, const char *name=0);
+	GameWidget(TQWidget *parent=nullptr, const char *name=nullptr);
 	~GameWidget();
 
 	void setPieces(PiecesType type);
diff --git a/ksmiletris/gamewindow.cpp b/ksmiletris/gamewindow.cpp
index ab7a8edf..7cc2a3b1 100644
--- a/ksmiletris/gamewindow.cpp
+++ b/ksmiletris/gamewindow.cpp
@@ -43,7 +43,7 @@ const int default_width = 362;
 const int default_height = 460;
 
 GameWindow::GameWindow(TQWidget *, const char *name)
-        : TDEMainWindow(0, name)
+        : TDEMainWindow(nullptr, name)
 {
         //New Games
         (void)KStdGameAction::gameNew(this,
diff --git a/ksmiletris/gamewindow.h b/ksmiletris/gamewindow.h
index 1e0c0649..ab82be70 100644
--- a/ksmiletris/gamewindow.h
+++ b/ksmiletris/gamewindow.h
@@ -38,7 +38,7 @@ class GameWindow : public TDEMainWindow {
   
 
 public:
-	GameWindow(TQWidget *parent=0, const char *name=0);
+	GameWindow(TQWidget *parent=nullptr, const char *name=nullptr);
 
 public slots:
 	void menu_newGame();
diff --git a/ksmiletris/main.cpp b/ksmiletris/main.cpp
index 79f8018c..4d882c47 100644
--- a/ksmiletris/main.cpp
+++ b/ksmiletris/main.cpp
@@ -39,7 +39,7 @@ int main(int argc, char **argv)
 	TDEAboutData aboutData( "ksmiletris", I18N_NOOP("KSmileTris"), 
 		VERSION, description, TDEAboutData::License_GPL, 
 		"(c) 1998, Sandro Sigala");
-	aboutData.addAuthor("Sandro Sigala",0, "ssigala@globalnet.it");
+	aboutData.addAuthor("Sandro Sigala",nullptr, "ssigala@globalnet.it");
 	TDECmdLineArgs::init( argc, argv, &aboutData );
 
 	
diff --git a/ksmiletris/mirrorwidget.h b/ksmiletris/mirrorwidget.h
index 80676a8a..0241c2b3 100644
--- a/ksmiletris/mirrorwidget.h
+++ b/ksmiletris/mirrorwidget.h
@@ -31,7 +31,7 @@ this software.
 class MirrorWidget : public TQFrame {
 public:
 	MirrorWidget(TQPixmap *s, bool *game, bool *pause,
-		     TQWidget *parent=0, const char *name=0);
+		     TQWidget *parent=nullptr, const char *name=nullptr);
 
 	void setBackgroundSprite(Sprite s) { bg_sprite = s; }
 	void setMirrorSprites(Sprite *s) { mirror_sprites = s; }
diff --git a/ksmiletris/npiecewidget.h b/ksmiletris/npiecewidget.h
index f2d7ac1f..553bb4f7 100644
--- a/ksmiletris/npiecewidget.h
+++ b/ksmiletris/npiecewidget.h
@@ -31,7 +31,7 @@ this software.
 class NextPieceWidget : public TQFrame {
 public:
 	NextPieceWidget(TQPixmap *s, bool *game, bool *pause,
-			TQWidget *parent=0, const char *name=0);
+			TQWidget *parent=nullptr, const char *name=nullptr);
 
 	void setBackgroundSprite(Sprite s) { bg_sprite = s; }
 	void setNextPieceSprites(Sprite *s) { next_piece_sprites = s; }
diff --git a/ksmiletris/screenwidget.h b/ksmiletris/screenwidget.h
index a27b3b31..8c28d806 100644
--- a/ksmiletris/screenwidget.h
+++ b/ksmiletris/screenwidget.h
@@ -31,7 +31,7 @@ this software.
 class ScreenWidget : public TQFrame {
 public:
 	ScreenWidget(TQPixmap *s, bool *game, bool *pause,
-		     TQWidget *parent=0, const char *name=0);
+		     TQWidget *parent=nullptr, const char *name=nullptr);
 
 	void setBackgroundSprite(Sprite s) { bg_sprite = s; }
 	void setScreenSprites(Sprite *s) { screen_sprites = s; }
diff --git a/ksnake/basket.cpp b/ksnake/basket.cpp
index c65695a5..cb156450 100644
--- a/ksnake/basket.cpp
+++ b/ksnake/basket.cpp
@@ -84,7 +84,7 @@ void Basket::newApples()
 void Basket::repaint(bool dirty )
 {
     Kaffee *g;
-    for ( g  = list->first(); g != 0; g = list->next()) {
+    for ( g  = list->first(); g; g = list->next()) {
 	if (dirty) {
 	    pixServer->draw(g->position(), ApplePix, (int)g->type());
 	    g->dirty = false;
@@ -101,7 +101,7 @@ Fruits Basket::eaten(int i)
     Kaffee *g;
     Fruits f = Red;
 
-    for (g = list->first(); g != 0; g = list->next() )
+    for (g = list->first(); g; g = list->next() )
 	{
 	    if (g->position() == i) {
 		f = g->type();
diff --git a/ksnake/board.cpp b/ksnake/board.cpp
index a55834ad..91cfd468 100644
--- a/ksnake/board.cpp
+++ b/ksnake/board.cpp
@@ -30,7 +30,7 @@ Pos::Pos(Pos *p, int i, int r) {
 	_parent = p;
 	_index = i;
 	_price = r;
-	left = right = next = fnext = 0;
+	left = right = next = fnext = nullptr;
 	inList = false;
 }
 Pos::~Pos() {
@@ -57,7 +57,7 @@ Pos *Pos::listNext() {
 }
 void Pos::addBTree(Pos *np) {
 	// Check direction np is going to.
-	Pos **p = 0;
+	Pos **p = nullptr;
 	if(np->index() < index())
 		p = &left;
 	else if(np->index() > index())
@@ -84,7 +84,7 @@ Pos *Pos::searchBTree(int i) {
 		return(right->searchBTree(i));
 	}
 	// Node not found.
-	return(0);
+	return(nullptr);
 }
 void Pos::addFList(Pos *np) {
 	np->fnext = fnext;
@@ -101,7 +101,7 @@ void Pos::addList(Pos *np) {
 		n = p->next;
 		if(! n) {
 			// The new node go to tail.
-			np->next = 0;
+			np->next = nullptr;
 			p->next = np;
 			return;
 		}
@@ -231,7 +231,7 @@ int Board::getNextCloseTo(int s, int d, bool diag, int lastIndex)
 	const int firstN = diag ? 4 : 0;
 	const int lastN = diag ? 8 : 4;
 	
-	Pos *root = new Pos(0, s, 0), *list = root;
+	Pos *root = new Pos(nullptr, s, 0), *list = root;
 	
 	// List of indexes.
 	for(; list; list = list->listNext()) {
diff --git a/ksnake/game.cpp b/ksnake/game.cpp
index 54ea84f9..5af4198f 100644
--- a/ksnake/game.cpp
+++ b/ksnake/game.cpp
@@ -113,10 +113,10 @@ void Game::showHighScores()
 void Game::createMenu()
 {
 	actionCollection()->setAutoConnectShortcuts(false);
-	(void)new TDEAction(i18n("Move Up"), Key_Up, 0, 0, actionCollection(), "Pl1Up");
-	(void)new TDEAction(i18n("Move Down"), Key_Down, 0, 0, actionCollection(), "Pl1Down");
-	(void)new TDEAction(i18n("Move Right"), Key_Right, 0, 0, actionCollection(), "Pl1Right");
-	(void)new TDEAction(i18n("Move Left"), Key_Left, 0, 0, actionCollection(), "Pl1Left");
+	(void)new TDEAction(i18n("Move Up"), Key_Up, nullptr, nullptr, actionCollection(), "Pl1Up");
+	(void)new TDEAction(i18n("Move Down"), Key_Down, nullptr, nullptr, actionCollection(), "Pl1Down");
+	(void)new TDEAction(i18n("Move Right"), Key_Right, nullptr, nullptr, actionCollection(), "Pl1Right");
+	(void)new TDEAction(i18n("Move Left"), Key_Left, nullptr, nullptr, actionCollection(), "Pl1Left");
 	actionCollection()->setAutoConnectShortcuts(true);
 	rattler->setActionCollection(actionCollection());
 
@@ -148,9 +148,9 @@ void Game::showSettings(){
     return;
 
   TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Settings::self());
-  dialog->addPage(new General(0, "General"), i18n("General"), "package_settings");
+  dialog->addPage(new General(nullptr, "General"), i18n("General"), "package_settings");
 
-  Appearance *a = new Appearance(0, "Appearance");
+  Appearance *a = new Appearance(nullptr, "Appearance");
 
 
   TQStringList list;
@@ -172,7 +172,7 @@ void Game::showSettings(){
 
 	dialog->addPage(a, i18n("Appearance"), "style");
 
-	dialog->addPage(new StartRoom(0, "StartRoom"), i18n("First Level"), "folder_home");
+	dialog->addPage(new StartRoom(nullptr, "StartRoom"), i18n("First Level"), "folder_home");
 	connect(dialog, TQ_SIGNAL(settingsChanged()), rattler, TQ_SLOT(loadSettings()));
 	dialog->show();
 }
diff --git a/ksnake/game.h b/ksnake/game.h
index 9ee61c16..7b0f999e 100644
--- a/ksnake/game.h
+++ b/ksnake/game.h
@@ -39,7 +39,7 @@ TQ_OBJECT
   
 
 public:
-	Game(TQWidget *parent=0, const char *name=0);
+	Game(TQWidget *parent=nullptr, const char *name=nullptr);
 	~Game();
 
 private slots:
diff --git a/ksnake/levels.cpp b/ksnake/levels.cpp
index f2987d11..37c02987 100644
--- a/ksnake/levels.cpp
+++ b/ksnake/levels.cpp
@@ -30,7 +30,7 @@
 
 #include "levels.h"
 
-Levels *leV = 0;
+Levels *leV = nullptr;
 
 Levels::Levels()
 {
diff --git a/ksnake/main.cpp b/ksnake/main.cpp
index bb4b0474..db1b8df0 100644
--- a/ksnake/main.cpp
+++ b/ksnake/main.cpp
@@ -36,9 +36,9 @@ int main( int argc, char **argv )
   TDEAboutData aboutData( "ksnake", I18N_NOOP("KSnakeRace"),
     KSNAKE_VERSION, description, TDEAboutData::License_GPL,
 			I18N_NOOP("(c) 1997-2000, Your Friendly KSnake Developers"));
-  aboutData.addAuthor("Michel Filippi",0, "mfilippi@sade.rhein-main.de");
+  aboutData.addAuthor("Michel Filippi",nullptr, "mfilippi@sade.rhein-main.de");
   aboutData.addAuthor("Robert Williams");
-  aboutData.addAuthor("Andrew Chant",0, "andrew.chant@utoronto.ca");
+  aboutData.addAuthor("Andrew Chant",nullptr, "andrew.chant@utoronto.ca");
 	aboutData.addCredit("André Luiz dos Santos", I18N_NOOP("AI stuff"), "andre@netvision.com.br");
 	aboutData.addCredit("Benjamin Meyer", I18N_NOOP("Improvements"), "ben+ksnake@meyerhome.net");
   TDECmdLineArgs::init( argc, argv, &aboutData );
diff --git a/ksnake/progress.h b/ksnake/progress.h
index 3abcf4ff..e9a49984 100644
--- a/ksnake/progress.h
+++ b/ksnake/progress.h
@@ -33,7 +33,7 @@ class Progress : public KGameProgress
     TQ_OBJECT
   
 public:
-    Progress( TQWidget *parent=0, const char *name=0 );
+    Progress( TQWidget *parent=nullptr, const char *name=nullptr );
 
 public slots:
     void advance();
diff --git a/ksnake/rattler.cpp b/ksnake/rattler.cpp
index f589b9ae..82047561 100644
--- a/ksnake/rattler.cpp
+++ b/ksnake/rattler.cpp
@@ -40,7 +40,7 @@
 #include "settings.h"
 
 TQBitArray gameState(5);
-TQLabel *label = 0;
+TQLabel *label = nullptr;
 int speed[4] = { 130, 95, 55, 40 };
 
 Rattler::Rattler( TQWidget *parent, const char *name )
@@ -127,14 +127,14 @@ void Rattler::timerEvent( TQTimerEvent * )
 	if ( !leaving )		// advance progressBar unless Samy
 		emit advance();	// is going out
 
-	for (CompuSnake *c = computerSnakes->first(); c != 0; c = computerSnakes->next()){
+	for (CompuSnake *c = computerSnakes->first(); c; c = computerSnakes->next()){
 		if(c) {
 				c->nextMove();
 				c->repaint(false);
 				}
 	}
 
-	for (Ball *b = balls->first(); b != 0; b = balls->next()){
+	for (Ball *b = balls->first(); b; b = balls->next()){
 		if (b) {
 			b->nextMove();
 			b->repaint();
@@ -335,7 +335,7 @@ void Rattler::cleanLabel()
 {
 	if (label) {
 		delete label;
-		label = 0;
+		label = nullptr;
 	}
 }
 
diff --git a/ksnake/rattler.h b/ksnake/rattler.h
index 5cc830de..0c495d5e 100644
--- a/ksnake/rattler.h
+++ b/ksnake/rattler.h
@@ -46,7 +46,7 @@ class Rattler : public TQWidget
   
 
 public:
-	Rattler ( TQWidget *parent=0, const char *name=0 );
+	Rattler ( TQWidget *parent=nullptr, const char *name=nullptr );
 	~Rattler();
   void setActionCollection(TDEActionCollection *a){ actionCollection = a;}
 
diff --git a/ksnake/snake.cpp b/ksnake/snake.cpp
index c892452b..9553481b 100644
--- a/ksnake/snake.cpp
+++ b/ksnake/snake.cpp
@@ -57,7 +57,7 @@ void Snake::updateSamy()
 
 void Snake::zero()
 {
-	for ( Samy *sam = list.first(); sam != 0; sam = list.next() ) {
+	for ( Samy *sam = list.first(); sam; sam = list.next() ) {
 		board->set(sam->index, empty);
 		pixServer->erase(sam->index);
 	}
@@ -146,7 +146,7 @@ void Snake::reset(int index, int border)
 void Snake::repaint( bool dirty)
 {
 	int x = 0;
-	for ( Samy *sam = list.first(); sam != 0; sam = list.next(), x++) {
+	for ( Samy *sam = list.first(); sam; sam = list.next(), x++) {
 		if (sam->index != OUT ) {
 			if(!dirty && x > 1 && x < tail())
 				continue;
diff --git a/ksnake/startroom.cpp b/ksnake/startroom.cpp
index b2af039e..5405ce54 100644
--- a/ksnake/startroom.cpp
+++ b/ksnake/startroom.cpp
@@ -40,7 +40,7 @@ StartRoom::StartRoom( TQWidget *parent, const char *name)
     TQSpacerItem* spacer = new TQSpacerItem( 20, 61, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
     Form1Layout->addItem( spacer, 2, 1 );
 
-    TQHBoxLayout *layout1 = new TQHBoxLayout( 0, 0, 6, "layout1"); 
+    TQHBoxLayout *layout1 = new TQHBoxLayout( nullptr, 0, 6, "layout1"); 
     TQSpacerItem* spacer_2 = new TQSpacerItem( 91, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
     layout1->addItem( spacer_2 );
 
diff --git a/ksnake/startroom.h b/ksnake/startroom.h
index 4a21d5dc..980b7f4a 100644
--- a/ksnake/startroom.h
+++ b/ksnake/startroom.h
@@ -36,7 +36,7 @@ class StartRoom : public TQWidget
 	TQ_OBJECT
   
 public:
-	StartRoom( TQWidget *parent=0, const char *name=0 );
+	StartRoom( TQWidget *parent=nullptr, const char *name=nullptr );
 
 private slots:
 	void loadLevel(int level);
diff --git a/ksnake/view.h b/ksnake/view.h
index e363e488..ca60d480 100644
--- a/ksnake/view.h
+++ b/ksnake/view.h
@@ -35,7 +35,7 @@ class View : public TQWidget
     TQ_OBJECT
   
 public:
-	View ( TQWidget *parent=0, const char *name=0 );
+	View ( TQWidget *parent=nullptr, const char *name=nullptr );
 
 	Progress *progress;
 	Rattler *rattler;
diff --git a/ksokoban/Bookmark.cpp b/ksokoban/Bookmark.cpp
index 1b493633..5aaec6d5 100644
--- a/ksokoban/Bookmark.cpp
+++ b/ksokoban/Bookmark.cpp
@@ -102,7 +102,7 @@ Bookmark::set(int _collection, int _level, int _moves, History *_h) {
 
 bool
 Bookmark::goTo(LevelMap *_map, History *_h) {
-  return _h->load(_map, data_.latin1()) != 0;
+  return _h->load(_map, data_.latin1()) != nullptr;
 }
 
 
diff --git a/ksokoban/History.cpp b/ksokoban/History.cpp
index dcebf558..a2c78242 100644
--- a/ksokoban/History.cpp
+++ b/ksokoban/History.cpp
@@ -46,14 +46,14 @@ void
 History::save(TQString &_str) {
   Move *m = past_.first();
 
-  while (m != 0) {
+  while (m) {
     m->save(_str);
     m = past_.next();
   }
   _str += '-';
 
   m = future_.first();
-  while (m != 0) {
+  while (m) {
     m->save(_str);
     m = future_.next();
   }
@@ -69,23 +69,23 @@ History::load(LevelMap *map, const char *_str) {
   while (*_str != '\0' && *_str != '-') {
     m = new Move(x, y);
     _str = m->load(_str);
-    if (_str == 0) return 0;
+    if (!_str) return nullptr;
     x = m->finalX();
     y = m->finalY();
     past_.append(m);
     if (!m->redo(map)) {
       //printf("redo failed: %s\n", _str);
       //abort();
-      return 0;
+      return nullptr;
     }
   }
-  if (*_str != '-') return 0;
+  if (*_str != '-') return nullptr;
 
   _str++;
   while (*_str != '\0') {
     m = new Move(x, y);
     _str = m->load(_str);
-    if (_str == 0) return 0;
+    if (!_str) return nullptr;
     x = m->finalX();
     y = m->finalY();
     future_.append(m);
@@ -105,7 +105,7 @@ History::redo(LevelMap *map) {
 
 MoveSequence *
 History::deferRedo(LevelMap *map) {
-  if (future_.isEmpty()) return 0;
+  if (future_.isEmpty()) return nullptr;
 
   Move *m=future_.take(0);
   past_.append(m);
@@ -123,7 +123,7 @@ History::undo(LevelMap *map) {
 
 MoveSequence *
 History::deferUndo(LevelMap *map) {
-  if (past_.isEmpty()) return 0;
+  if (past_.isEmpty()) return nullptr;
 
   Move *m = past_.take(past_.count()-1);
   future_.insert(0, m);
diff --git a/ksokoban/LevelMap.cpp b/ksokoban/LevelMap.cpp
index ca96353d..9ed786a0 100644
--- a/ksokoban/LevelMap.cpp
+++ b/ksokoban/LevelMap.cpp
@@ -43,7 +43,7 @@ LevelMap::collectionName() {
   return collection_->name();
 }
 
-LevelMap::LevelMap () : collection_(0), totalMoves_(0), totalPushes_(0),
+LevelMap::LevelMap () : collection_(nullptr), totalMoves_(0), totalPushes_(0),
 			goodLevel_(false) {
 }
 
@@ -60,13 +60,13 @@ LevelMap::changeCollection (LevelCollection *_collection)
 
 int
 LevelMap::level () const {
-  if (collection_ == 0) return 0;
+  if (!collection_) return 0;
   return collection_->level();
 }
 
 void
 LevelMap::level (int _level) {
-  assert(collection_ != 0);
+  assert(collection_);
 
   collection_->level(_level);
   goodLevel_ = collection_->loadLevel(this);
@@ -76,13 +76,13 @@ LevelMap::level (int _level) {
 
 int
 LevelMap::noOfLevels () const {
-  assert(collection_ != 0);
+  assert(collection_);
   return collection_->noOfLevels();
 }
 
 int
 LevelMap::completedLevels () const{
-  assert(collection_ != 0);
+  assert(collection_);
   return collection_->completedLevels();
 }
 
diff --git a/ksokoban/MainWindow.cpp b/ksokoban/MainWindow.cpp
index e4147928..e3762ebf 100644
--- a/ksokoban/MainWindow.cpp
+++ b/ksokoban/MainWindow.cpp
@@ -47,7 +47,7 @@
 
 void
 MainWindow::createCollectionMenu() {
-  collection_ = new TQPopupMenu(0,"collection menu");
+  collection_ = new TQPopupMenu(nullptr,"collection menu");
   collection_->setCheckable(true);
   //connect(collection_, TQ_SIGNAL(activated(int)), playField_, TQ_SLOT(changeCollection(int)));
   connect(collection_, TQ_SIGNAL(activated(int)), this, TQ_SLOT(changeCollection(int)));
@@ -70,7 +70,7 @@ MainWindow::createCollectionMenu() {
 }
 
 
-MainWindow::MainWindow() : TDEMainWindow(0), externalCollection_(0) {
+MainWindow::MainWindow() : TDEMainWindow(0), externalCollection_(nullptr) {
   int i;
   TQPixmap pixmap;
 
@@ -88,7 +88,7 @@ MainWindow::MainWindow() : TDEMainWindow(0), externalCollection_(0) {
 
   menu_ = new KMenuBar(this, "menubar" );
 
-  game_ = new TQPopupMenu(0,"game menu");
+  game_ = new TQPopupMenu(nullptr,"game menu");
   pixmap = SmallIcon("document-open");
   game_->insertItem(TQIconSet(pixmap), i18n("&Load Levels..."), this, TQ_SLOT(loadLevels()));
   pixmap = SmallIcon("forward");
@@ -110,7 +110,7 @@ MainWindow::MainWindow() : TDEMainWindow(0), externalCollection_(0) {
   game_->insertItem(TQIconSet(pixmap), i18n("&Quit"), tdeApp, TQ_SLOT(closeAllWindows()), TQKeySequence( (TDEStdAccel::quit()).toString()));
   menu_->insertItem(i18n("&Game"), game_);
 
-  animation_ = new TQPopupMenu(0,"animation menu");
+  animation_ = new TQPopupMenu(nullptr,"animation menu");
   animation_->setCheckable(true);
   connect(animation_, TQ_SIGNAL(activated(int)), this, TQ_SLOT(updateAnimMenu(int)));
   connect(animation_, TQ_SIGNAL(activated(int)), playField_, TQ_SLOT(changeAnim(int)));
@@ -123,8 +123,8 @@ MainWindow::MainWindow() : TDEMainWindow(0), externalCollection_(0) {
   menu_->insertItem(i18n("&Animation"), animation_);
 
   pixmap = SmallIcon("bookmark_add");
-  bookmarkMenu_ = new TQPopupMenu(0,"bookmarks menu");
-  setBM_ = new TQPopupMenu(0, "set bookmark menu");
+  bookmarkMenu_ = new TQPopupMenu(nullptr,"bookmarks menu");
+  setBM_ = new TQPopupMenu(nullptr, "set bookmark menu");
   setBM_->insertItem(TQIconSet(pixmap), i18n("(unused)"), 1);
   setBM_->setAccel(CTRL+Key_1, 1);
   setBM_->insertItem(TQIconSet(pixmap), i18n("(unused)"), 2);
@@ -149,7 +149,7 @@ MainWindow::MainWindow() : TDEMainWindow(0), externalCollection_(0) {
   bookmarkMenu_->insertItem(i18n("&Set Bookmark"), setBM_);
 
   pixmap = SmallIcon("bookmark");
-  goToBM_ = new TQPopupMenu(0, "go to bookmark menu");
+  goToBM_ = new TQPopupMenu(nullptr, "go to bookmark menu");
   goToBM_->insertItem(TQIconSet(pixmap), i18n("(unused)"), 1);
   goToBM_->setAccel(Key_1, 1);
   goToBM_->insertItem(TQIconSet(pixmap), i18n("(unused)"), 2);
@@ -273,7 +273,7 @@ MainWindow::goToBookmark(int id) {
 
   if (collection < 0 || collection >= internalCollections_.collections()) return;
   LevelCollection* colPtr = internalCollections_[collection];
-  if (colPtr == 0) return;
+  if (!colPtr) return;
   if (level < 0 || level >= colPtr->noOfLevels()) return;
   if (level > colPtr->completedLevels()) return;
 
@@ -291,7 +291,7 @@ MainWindow::changeCollection(int id)
   collection_->setItemChecked(checkedCollection_, true);
 
   delete externalCollection_;
-  externalCollection_ = 0;
+  externalCollection_ = nullptr;
   playField_->changeCollection(internalCollections_[id]);
 }
 
diff --git a/ksokoban/ModalLabel.h b/ksokoban/ModalLabel.h
index 379706ee..66ccd52d 100644
--- a/ksokoban/ModalLabel.h
+++ b/ksokoban/ModalLabel.h
@@ -33,7 +33,7 @@ public:
   bool completed_;
 
 protected:
-  ModalLabel (const TQString &text, TQWidget *parent, const char *name=0, WFlags f=0);
+  ModalLabel (const TQString &text, TQWidget *parent, const char *name=nullptr, WFlags f=0);
 
 };
 
diff --git a/ksokoban/Move.cpp b/ksokoban/Move.cpp
index dd61df40..8556b67c 100644
--- a/ksokoban/Move.cpp
+++ b/ksokoban/Move.cpp
@@ -154,14 +154,14 @@ Move::load (const char *s) {
     default:
       //printf ("2><>%s\n", s);
       //abort ();
-      return 0;
+      return nullptr;
     }
 
     if (x<=0 || x>=MAX_X || y<=0 || y>=MAX_Y) {
       //printf ("x: %d, y:%d ><>%s\n", x, y, s);
       //abort ();
 
-      return 0;
+      return nullptr;
     }
 
     if (isupper (c)) push (x, y);
diff --git a/ksokoban/PathFinder.cpp b/ksokoban/PathFinder.cpp
index 3afd0b1c..25d1a40d 100644
--- a/ksokoban/PathFinder.cpp
+++ b/ksokoban/PathFinder.cpp
@@ -63,7 +63,7 @@ Move *
 PathFinder::search (Map *_map, int _x, int _y) {
   int xpos=_map->xpos ();
   int ypos=_map->ypos ();
-  if (xpos == _x && ypos == _y) return 0;
+  if (xpos == _x && ypos == _y) return nullptr;
 
   for (int y=0; y<=MAX_Y; y++) {
     for (int x=0; x<=MAX_X; x++) {
@@ -142,13 +142,13 @@ PathFinder::search (Map *_map, int _x, int _y) {
     }
 
     delete move;
-    return 0;
+    return nullptr;
   }
 }
 
 Move*
 PathFinder::drag(int /* x1 */, int /* y1 */, int /* x2 */, int /* y2 */) {
-  return 0;
+  return nullptr;
 }
 
 bool
diff --git a/ksokoban/PlayField.cpp b/ksokoban/PlayField.cpp
index 94ed3e8a..0af654a9 100644
--- a/ksokoban/PlayField.cpp
+++ b/ksokoban/PlayField.cpp
@@ -46,8 +46,8 @@
 #include "PlayField.moc"
 
 PlayField::PlayField(TQWidget *parent, const char *name, WFlags f)
-  : TQWidget(parent, name, f|WResizeNoErase), imageData_(0), lastLevel_(-1),
-    moveSequence_(0), moveInProgress_(false), dragInProgress_(false),
+  : TQWidget(parent, name, f|WResizeNoErase), imageData_(nullptr), lastLevel_(-1),
+    moveSequence_(nullptr), moveInProgress_(false), dragInProgress_(false),
     xOffs_(0), yOffs_(0),
     wheelDelta_(0),
     levelText_(i18n("Level:")), stepsText_(i18n("Steps:")),
@@ -97,32 +97,32 @@ PlayField::changeCursor(const TQCursor* c) {
   if (cursor_ == c) return;
 
   cursor_ = c;
-  if (c == 0) unsetCursor();
+  if (!c) unsetCursor();
   else setCursor(*c);
 }
 
 int
 PlayField::level() const {
-  if (levelMap_ == 0) return 0;
+  if (!levelMap_) return 0;
   return levelMap_->level();
 }
 
 const TQString &
 PlayField::collectionName() {
   static TQString error = "????";
-  if (levelMap_ == 0) return error;
+  if (!levelMap_) return error;
   return levelMap_->collectionName();
 }
 
 int
 PlayField::totalMoves() const {
-  if (levelMap_ == 0) return 0;
+  if (!levelMap_) return 0;
   return levelMap_->totalMoves();
 }
 
 int
 PlayField::totalPushes() const{
-  if (levelMap_ == 0) return 0;
+  if (!levelMap_) return 0;
   return levelMap_->totalPushes();
 }
 
@@ -407,7 +407,7 @@ PlayField::highlight() {
     highlightY_ = y;
   } else {
     if (pathFinder_.canWalkTo(x, y)) changeCursor(&crossCursor);
-    else changeCursor(0);
+    else changeCursor(nullptr);
     if (highlightX_ >= 0) {
       TQPainter paint(this);
 
@@ -423,7 +423,7 @@ void
 PlayField::stopMoving() {
   this->killTimers();
   delete moveSequence_;
-  moveSequence_ = 0;
+  moveSequence_ = nullptr;
   moveInProgress_ = false;
   updateStepsXpm();
   updatePushesXpm();
@@ -445,17 +445,17 @@ void
 PlayField::startMoving(MoveSequence *ms) {
   static const int delay[4] = {0, 15, 35, 60};
 
-  assert(moveSequence_ == 0 && !moveInProgress_);
+  assert(!moveSequence_ && !moveInProgress_);
   moveSequence_ = ms;
   moveInProgress_ = true;
   if (animDelay_) startTimer(delay[animDelay_]);
-  timerEvent(0);
+  timerEvent(nullptr);
 }
 
 void
 PlayField::timerEvent(TQTimerEvent *) {
   assert(moveInProgress_);
-  if (moveSequence_ == 0) {
+  if (!moveSequence_) {
     this->killTimers();
     moveInProgress_ = false;
     return;
@@ -665,7 +665,7 @@ void
 PlayField::stopDrag() {
   if (!dragInProgress_) return;
 
-  changeCursor(0);
+  changeCursor(nullptr);
 
   TQPainter paint(this);
 
@@ -734,7 +734,7 @@ PlayField::mousePressEvent(TQMouseEvent *e) {
   switch (e->button()) {
   case TQt::LeftButton:
     m = pathFinder_.search(levelMap_, x, y);
-    if (m != 0) {
+    if (m) {
       history_->add(m);
 
       startMoving(m);
diff --git a/ksokoban/PlayField.h b/ksokoban/PlayField.h
index f025f355..55f350d8 100644
--- a/ksokoban/PlayField.h
+++ b/ksokoban/PlayField.h
@@ -45,7 +45,7 @@ class PlayField : public TQWidget {
   TQ_OBJECT
   
 public:
-  PlayField(TQWidget *parent, const char *name=0, WFlags f=0);
+  PlayField(TQWidget *parent, const char *name=nullptr, WFlags f=0);
   ~PlayField ();
 
   bool canMoveNow();
diff --git a/ksokoban/main.cpp b/ksokoban/main.cpp
index 04465dbb..a957c6ff 100644
--- a/ksokoban/main.cpp
+++ b/ksokoban/main.cpp
@@ -33,7 +33,7 @@ static const char version[] = "0.4.2";
 
 static TDECmdLineOptions options[] =
 {
-     { "+[file]", I18N_NOOP("Level collection file to load"), 0 },
+     { "+[file]", I18N_NOOP("Level collection file to load"), nullptr },
      TDECmdLineLastOption  // End of options.
 };
 
@@ -43,9 +43,9 @@ main (int argc, char **argv)
 {
   TDEAboutData aboutData("ksokoban", I18N_NOOP("KSokoban"),
 		       version, description, TDEAboutData::License_GPL,
-		       "(c) 1998-2001  Anders Widell", 0,
+		       "(c) 1998-2001  Anders Widell", nullptr,
 		       "http://hem.passagen.se/awl/ksokoban/");
-  aboutData.addAuthor("Anders Widell", 0,
+  aboutData.addAuthor("Anders Widell", nullptr,
 		      "awl@passagen.se",
 		      "http://hem.passagen.se/awl/");
   aboutData.addCredit("David W. Skinner",
diff --git a/kspaceduel/ai.cpp b/kspaceduel/ai.cpp
index 25989ae5..b48b4e6e 100644
--- a/kspaceduel/ai.cpp
+++ b/kspaceduel/ai.cpp
@@ -528,12 +528,12 @@ void Ai::chooseAction()
    double posangle,movephi,phiright,phileft,torotate=0,velangle;
    int framesleft,framesright;
    bool rotateAndAccelerate=false;
-   Hit *nextHit=0;
+   Hit *nextHit=nullptr;
    int shotHitTime;
 
    
    shotHitTime=1000000;
-   nextHit=0;
+   nextHit=nullptr;
 /*   for(h=objectsHitByShip.first();h;h=objectsHitByShip.next())
       if(h->object==HSHOT)
          if(h->hitTime<shotHitTime)
@@ -645,7 +645,7 @@ void Ai::chooseAction()
    else
    {
       
-      bestShot=0;   
+      bestShot=nullptr;   
       for(s=myShots.first();s;s=myShots.next())
          if(s->score<bestScore)
          {
diff --git a/kspaceduel/dialogs.h b/kspaceduel/dialogs.h
index 19bb353a..63b871ae 100644
--- a/kspaceduel/dialogs.h
+++ b/kspaceduel/dialogs.h
@@ -20,7 +20,7 @@ class ConfigSetup:public TQWidget
    TQ_OBJECT
   
 public:
-   ConfigSetup(SConfig *custom,TQWidget *parent=0,const char* name=0);
+   ConfigSetup(SConfig *custom,TQWidget *parent=nullptr,const char* name=nullptr);
 
    bool hasChanged();
    bool isDefault();
@@ -82,7 +82,7 @@ class SettingsDialog : public TDEConfigDialog
         TQ_OBJECT
   
 public:
-        SettingsDialog(SConfig *customConfig, TQWidget *parent=0, const char *name=0);
+        SettingsDialog(SConfig *customConfig, TQWidget *parent=nullptr, const char *name=nullptr);
         ~SettingsDialog();
 
 signals:
diff --git a/kspaceduel/main.cpp b/kspaceduel/main.cpp
index 94f56cc8..3afacfe2 100644
--- a/kspaceduel/main.cpp
+++ b/kspaceduel/main.cpp
@@ -12,7 +12,7 @@ int main(int argc,char **argv)
    TDEAboutData aboutData( "kspaceduel", I18N_NOOP("KSpaceDuel"), 
       KSPACEDUEL_VERSION, description, TDEAboutData::License_GPL, 
       "(c) 1998-2000, Andreas Zehender");
-   aboutData.addAuthor("Andreas Zehender",0, "az@azweb.de");
+   aboutData.addAuthor("Andreas Zehender",nullptr, "az@azweb.de");
    TDECmdLineArgs::init( argc, argv, &aboutData );
 
    TDEApplication myapplication;
diff --git a/kspaceduel/mainview.cpp b/kspaceduel/mainview.cpp
index 4050f5ef..dba9e688 100644
--- a/kspaceduel/mainview.cpp
+++ b/kspaceduel/mainview.cpp
@@ -16,7 +16,7 @@
 #include "ai.h"
 #include "options.h"
 
-TDEToggleAction *MyMainView::pauseAction = 0;
+TDEToggleAction *MyMainView::pauseAction = nullptr;
 
 MyMainView::MyMainView(TQWidget *parent)
     :TQWidget(parent),
@@ -93,7 +93,7 @@ MyMainView::MyMainView(TQWidget *parent)
    powerups.setAutoDelete(true);
 
    waitForStart=false;
-   textSprite=0;
+   textSprite=nullptr;
    readConfig();
 }
 
@@ -487,7 +487,7 @@ void MyMainView::newRound()
    {
       textSprite->hide();
       delete textSprite;
-      textSprite=0;
+      textSprite=nullptr;
    }
    field.update();
 
@@ -528,7 +528,7 @@ void MyMainView::timerEvent(TQTimerEvent *event)
             {
                textSprite->hide();
                delete textSprite;
-               textSprite=0;
+               textSprite=nullptr;
             }
 
             textSprite=new TQCanvasText(&field);
diff --git a/kspaceduel/mainview.h b/kspaceduel/mainview.h
index 0515dfc7..460a044c 100644
--- a/kspaceduel/mainview.h
+++ b/kspaceduel/mainview.h
@@ -21,7 +21,7 @@ class MyMainView:public TQWidget
    TQ_OBJECT
   
 public:
-   MyMainView(TQWidget *parent=0);
+   MyMainView(TQWidget *parent=nullptr);
    ~MyMainView();
 
    static TDEToggleAction *pauseAction;
diff --git a/kspaceduel/playerinfo.h b/kspaceduel/playerinfo.h
index 5668889e..b418c7e8 100644
--- a/kspaceduel/playerinfo.h
+++ b/kspaceduel/playerinfo.h
@@ -12,7 +12,7 @@ class PlayerInfo:public TQFrame
    TQ_OBJECT
   
 public:
-   PlayerInfo(int pnr,TQWidget *parent=0,const char *name=0);
+   PlayerInfo(int pnr,TQWidget *parent=nullptr,const char *name=nullptr);
 public slots:
    void setHitpoints(int h);
    void setEnergy(int e);
diff --git a/kspaceduel/topwidget.cpp b/kspaceduel/topwidget.cpp
index a8a3b5ab..32f7bb0e 100644
--- a/kspaceduel/topwidget.cpp
+++ b/kspaceduel/topwidget.cpp
@@ -81,35 +81,35 @@ void MyTopLevelWidget::initActions( )
    // Default keys
    actionCollection()->setAutoConnectShortcuts(false);
    TDEAction* ac;
-   ac = new TDEAction(i18n("Player 1 Rotate Left"), Key_S, 0, 0,
+   ac = new TDEAction(i18n("Player 1 Rotate Left"), Key_S, nullptr, nullptr,
 		    actionCollection(), "P1KeyLeft");
    ac->setEnabled( false );
-   ac = new TDEAction(i18n("Player 1 Rotate Right"), Key_F, 0, 0,
+   ac = new TDEAction(i18n("Player 1 Rotate Right"), Key_F, nullptr, nullptr,
 		     actionCollection(), "P1KeyRight");
    ac->setEnabled( false );
-   ac = new TDEAction(i18n("Player 1 Accelerate"), Key_E, 0, 0,
+   ac = new TDEAction(i18n("Player 1 Accelerate"), Key_E, nullptr, nullptr,
 		    actionCollection(), "P1KeyAcc");
    ac->setEnabled( false );
-   ac = new TDEAction(i18n("Player 1 Shot"), Key_D, 0, 0,
+   ac = new TDEAction(i18n("Player 1 Shot"), Key_D, nullptr, nullptr,
 		    actionCollection(), "P1Shot");
    ac->setEnabled( false );
-   ac = new TDEAction(i18n("Player 1 Mine"), Key_A, 0, 0,
+   ac = new TDEAction(i18n("Player 1 Mine"), Key_A, nullptr, nullptr,
 		    actionCollection(), "P1Mine");
    ac->setEnabled( false );
 
-   ac = new TDEAction(i18n("Player 2 Rotate Left"), Key_Left, 0, 0,
+   ac = new TDEAction(i18n("Player 2 Rotate Left"), Key_Left, nullptr, nullptr,
 		    actionCollection(), "P2KeyLeft");
    ac->setEnabled( false );
-   ac = new TDEAction(i18n("Player 2 Rotate Right"), Key_Right, 0, 0,
+   ac = new TDEAction(i18n("Player 2 Rotate Right"), Key_Right, nullptr, nullptr,
 		    actionCollection(), "P2KeyRight");
    ac->setEnabled( false );
-   ac = new TDEAction(i18n("Player 2 Accelerate"), Key_Up, 0, 0,
+   ac = new TDEAction(i18n("Player 2 Accelerate"), Key_Up, nullptr, nullptr,
 		    actionCollection(), "P2KeyAcc");
    ac->setEnabled( false );
-   ac = new TDEAction(i18n("Player 2 Shot"), Key_Down, 0, 0,
+   ac = new TDEAction(i18n("Player 2 Shot"), Key_Down, nullptr, nullptr,
 		    actionCollection(), "P2Shot");
    ac->setEnabled( false );
-   ac = new TDEAction(i18n("Player 2 Mine"), Key_Insert, 0, 0,
+   ac = new TDEAction(i18n("Player 2 Mine"), Key_Insert, nullptr, nullptr,
 		    actionCollection(), "P2Mine");
    ac->setEnabled( false );
 
diff --git a/ktron/ktron.cpp b/ktron/ktron.cpp
index 85478071..8719677f 100644
--- a/ktron/ktron.cpp
+++ b/ktron/ktron.cpp
@@ -57,26 +57,26 @@ KTron::KTron(TQWidget *parent, const char *name) : TDEMainWindow(parent, name) {
   // We match up keyboard events ourselves in Tron::keyPressEvent()
   // We must disable the actions, otherwise we don't get the keyPressEvent's
   TDEAction *act;
-  act = new TDEAction(i18n("Player 1 Up"), Key_R, 0, 0, actionCollection(), "Pl1Up");
+  act = new TDEAction(i18n("Player 1 Up"), Key_R, nullptr, nullptr, actionCollection(), "Pl1Up");
   act->setEnabled(false);
-  act = new TDEAction(i18n("Player 1 Down"), Key_F, 0, 0, actionCollection(), "Pl1Down");
+  act = new TDEAction(i18n("Player 1 Down"), Key_F, nullptr, nullptr, actionCollection(), "Pl1Down");
   act->setEnabled(false);
-  act = new TDEAction(i18n("Player 1 Right"), Key_G, 0, 0, actionCollection(), "Pl1Right");
+  act = new TDEAction(i18n("Player 1 Right"), Key_G, nullptr, nullptr, actionCollection(), "Pl1Right");
   act->setEnabled(false);
-  act = new TDEAction(i18n("Player 1 Left"), Key_D, 0, 0, actionCollection(), "Pl1Left");
+  act = new TDEAction(i18n("Player 1 Left"), Key_D, nullptr, nullptr, actionCollection(), "Pl1Left");
   act->setEnabled(false);
-  act = new TDEAction(i18n("Player 1 Accelerator"), Key_A, 0, 0, actionCollection(), "Pl1Ac");
+  act = new TDEAction(i18n("Player 1 Accelerator"), Key_A, nullptr, nullptr, actionCollection(), "Pl1Ac");
   act->setEnabled(false);
  
-  act = new TDEAction(i18n("Player 2 Up"), Key_Up, 0, 0, actionCollection(), "Pl2Up");
+  act = new TDEAction(i18n("Player 2 Up"), Key_Up, nullptr, nullptr, actionCollection(), "Pl2Up");
   act->setEnabled(false);
-  act = new TDEAction(i18n("Player 2 Down"), Key_Down, 0, 0, actionCollection(), "Pl2Down");
+  act = new TDEAction(i18n("Player 2 Down"), Key_Down, nullptr, nullptr, actionCollection(), "Pl2Down");
   act->setEnabled(false);
-  act = new TDEAction(i18n("Player 2 Right"), Key_Right, 0, 0, actionCollection(), "Pl2Right");
+  act = new TDEAction(i18n("Player 2 Right"), Key_Right, nullptr, nullptr, actionCollection(), "Pl2Right");
   act->setEnabled(false);
-  act = new TDEAction(i18n("Player 2 Left"), Key_Left, 0, 0, actionCollection(), "Pl2Left");
+  act = new TDEAction(i18n("Player 2 Left"), Key_Left, nullptr, nullptr, actionCollection(), "Pl2Left");
   act->setEnabled(false);
-  act = new TDEAction(i18n("Player 2 Accelerator"), Key_0, 0, 0, actionCollection(), "Pl2Ac");
+  act = new TDEAction(i18n("Player 2 Accelerator"), Key_0, nullptr, nullptr, actionCollection(), "Pl2Ac");
   act->setEnabled(false);
 
   tron->setActionCollection(actionCollection());
@@ -183,9 +183,9 @@ void KTron::showSettings(){
     return;
   
   TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Settings::self());
-  dialog->addPage(new General(0, "General"), i18n("General"), "package_settings");
-  dialog->addPage(new Ai(0, "Ai"), i18n("A.I."), "preferences-desktop-personal");
-  dialog->addPage(new Appearance(0, "Appearance"), i18n("Appearance"), "style");
+  dialog->addPage(new General(nullptr, "General"), i18n("General"), "package_settings");
+  dialog->addPage(new Ai(nullptr, "Ai"), i18n("A.I."), "preferences-desktop-personal");
+  dialog->addPage(new Appearance(nullptr, "Appearance"), i18n("Appearance"), "style");
   connect(dialog, TQ_SIGNAL(settingsChanged()), tron, TQ_SLOT(loadSettings()));
   connect(dialog, TQ_SIGNAL(settingsChanged()), this, TQ_SLOT(loadSettings()));
   dialog->show();
diff --git a/ktron/ktron.h b/ktron/ktron.h
index af41b9b2..a9c623c2 100644
--- a/ktron/ktron.h
+++ b/ktron/ktron.h
@@ -42,7 +42,7 @@ TQ_OBJECT
   
 
 public:
-  KTron(TQWidget *parent=0, const char *name=0);
+  KTron(TQWidget *parent=nullptr, const char *name=nullptr);
 
 private:
   TDEAccel *accel;
diff --git a/ktron/tron.cpp b/ktron/tron.cpp
index 878e93fa..9eef8b59 100644
--- a/ktron/tron.cpp
+++ b/ktron/tron.cpp
@@ -44,8 +44,8 @@
 Tron::Tron(TQWidget *parent,const char *name)
   : TQWidget(parent,name)
 {
-  pixmap=0;
-  playfield=0;
+  pixmap=nullptr;
+  playfield=nullptr;
   beginHint=false;
   lookForward=15;
 
@@ -431,7 +431,7 @@ void Tron::setBackgroundPix(TQPixmap pix)
 {
     bgPix=pix;
 
-    if(pixmap!=0){
+    if(pixmap){
        updatePixmap();
       // most pictures have colors, that you can read white text
       setPalette(TQColor("black"));
diff --git a/ktron/tron.h b/ktron/tron.h
index 730ca0a0..1683d698 100644
--- a/ktron/tron.h
+++ b/ktron/tron.h
@@ -49,7 +49,7 @@ class Tron : public TQWidget
   
 
 public:
-  Tron(TQWidget *parent=0, const char *name=0);
+  Tron(TQWidget *parent=nullptr, const char *name=nullptr);
   ~Tron();
   void setActionCollection(TDEActionCollection*);
   void updatePixmap();
diff --git a/ktuberling/main.cpp b/ktuberling/main.cpp
index d7107719..1c6dbba1 100644
--- a/ktuberling/main.cpp
+++ b/ktuberling/main.cpp
@@ -13,7 +13,7 @@
 #include "toplevel.h"
 
 static TDECmdLineOptions options[] = {
-   { "+<tuberling-file>", I18N_NOOP("Potato to open"), 0 },
+   { "+<tuberling-file>", I18N_NOOP("Potato to open"), nullptr },
    TDECmdLineLastOption
 };
                   
@@ -43,7 +43,7 @@ int main(int argc, char *argv[])
   TDEGlobal::locale()->insertCatalogue("libtdegames");
   KImageIO::registerFormats();
 
-  TopLevel *toplevel=0;
+  TopLevel *toplevel=nullptr;
 
   if (app.isRestored())
     RESTORE(TopLevel)
diff --git a/ktuberling/playground.cpp b/ktuberling/playground.cpp
index 47f11823..7cce927e 100644
--- a/ktuberling/playground.cpp
+++ b/ktuberling/playground.cpp
@@ -29,9 +29,9 @@ PlayGround::PlayGround(TopLevel *parent, const char *name, uint selectedGameboar
 {
   topLevel = parent;
 
-  textsLayout = objectsLayout = 0;
-  textsList = soundsList = 0;
-  draggedCursor = 0;
+  textsLayout = objectsLayout = nullptr;
+  textsList = soundsList = nullptr;
+  draggedCursor = nullptr;
 
   toDraw.setAutoDelete(true);
   history.setAutoDelete(true);
@@ -289,7 +289,7 @@ void PlayGround::mouseReleaseEvent( TQMouseEvent *event )
 
   // We are not anymore dragging an object
   delete draggedCursor;
-  draggedCursor = 0;
+  draggedCursor = nullptr;
   setCursor(arrow);
 
   // If we are not moving the object to the editable area
@@ -299,7 +299,7 @@ void PlayGround::mouseReleaseEvent( TQMouseEvent *event )
     if (draggedZOrder == -1) return;
 
     while (history.count() > currentAction) history.removeLast();
-    newAction = new Action(&draggedObject, draggedZOrder, 0, -1);
+    newAction = new Action(&draggedObject, draggedZOrder, nullptr, -1);
     history.append(newAction);
     currentAction++;
     topLevel->enableUndo(true);
@@ -601,7 +601,7 @@ bool PlayGround::loadFrom(const TQString &name)
     }
     newObject = new ToDraw(readObject);
     toDraw.append(newObject);
-    newAction = new Action(0, -1, newObject, toDraw.count()-1);
+    newAction = new Action(nullptr, -1, newObject, toDraw.count()-1);
     history.append(newAction);
     currentAction++;
 
diff --git a/ktuberling/soundfactory.cpp b/ktuberling/soundfactory.cpp
index 0e56d4be..b9677792 100644
--- a/ktuberling/soundfactory.cpp
+++ b/ktuberling/soundfactory.cpp
@@ -23,7 +23,7 @@ SoundFactory::SoundFactory(TopLevel *parent, const char *name, uint selectedLang
 {
   topLevel = parent;
 
-  namesList = filesList = 0;
+  namesList = filesList = nullptr;
 
   TQDomDocument layoutsDocument;
   bool ok = topLevel->loadLayout(layoutsDocument);
@@ -61,7 +61,7 @@ void SoundFactory::playSound(const TQString &soundRef) const
   if (sound == sounds) return;
 
   soundFile = locate("data", "ktuberling/sounds/" + filesList[sound]);
-  if (soundFile == 0) return;
+  if (!soundFile) return;
 
 //printf("%s\n", (const char *) soundFile);
   KAudioPlayer::play(soundFile);
@@ -89,7 +89,7 @@ bool SoundFactory::registerLanguages(TQDomDocument &layoutDocument)
   {
     languageElement = (const TQDomElement &) languagesList.item(i).toElement();
     codeAttribute = languageElement.attributeNode("code");
-    enabled = locate("data", "ktuberling/sounds/" + codeAttribute.value() + "/") != 0;
+    enabled = locate("data", "ktuberling/sounds/" + codeAttribute.value() + "/") != nullptr;
 
     menuItemsList = languageElement.elementsByTagName("menuitem");
     if (menuItemsList.count() != 1)
diff --git a/ktuberling/toplevel.cpp b/ktuberling/toplevel.cpp
index ca37300c..45e65dc0 100644
--- a/ktuberling/toplevel.cpp
+++ b/ktuberling/toplevel.cpp
@@ -57,7 +57,7 @@ void TopLevel::enableRedo(bool enable) const
 // Register an available gameboard
 void TopLevel::registerGameboard(const TQString &menuItem, const char *actionId)
 {
-  TDEToggleAction *t = 0;
+  TDEToggleAction *t = nullptr;
 
   switch (gameboards)
   {
@@ -89,7 +89,7 @@ void TopLevel::registerGameboard(const TQString &menuItem, const char *actionId)
 // Register an available language
 void TopLevel::registerLanguage(const TQString &menuItem, const char *actionId, bool enabled)
 {
-  TDEToggleAction *t = 0;
+  TDEToggleAction *t = nullptr;
 
   switch (languages)
   {
diff --git a/libksirtet/base/board.cpp b/libksirtet/base/board.cpp
index 74643374..09aaadda 100644
--- a/libksirtet/base/board.cpp
+++ b/libksirtet/base/board.cpp
@@ -18,7 +18,7 @@ FixedCanvasView::FixedCanvasView(TQWidget *parent, const char *name)
 
 TQSize FixedCanvasView::sizeHint() const
 {
-  if ( canvas()==0 ) return TQSize();
+  if ( !canvas() ) return TQSize();
   return canvas()->size() + 2 * TQSize(frameWidth(), frameWidth());
 }
 
@@ -39,7 +39,7 @@ BaseBoard::BaseBoard(bool graphic, TQWidget *parent)
 : FixedCanvasView(parent, "board"),
   GenericTetris(bfactory->bbi.width, bfactory->bbi.height,
                 bfactory->bbi.withPieces, graphic),
-  state(GameOver), timer(this), sequences(0), main(0), _next(0),
+  state(GameOver), timer(this), sequences(nullptr), main(nullptr), _next(nullptr),
  _arcade(false)
 {
     if (graphic) {
@@ -82,7 +82,7 @@ void BaseBoard::adjustSize()
     for (uint i=0; i<matrix().width(); i++)
         for (uint j=0; j<firstClearLine(); j++) {
             Coord c(i, j);
-            if ( matrix()[c]==0 ) continue;
+            if ( !matrix()[c] ) continue;
             partialMoveBlock(c, TQPoint(0, 0));
         }
     
@@ -98,7 +98,7 @@ void BaseBoard::adjustSize()
 BaseBoard::~BaseBoard()
 {
     if ( graphic() ) {
-        setBlockInfo(0, 0); // destruct all sprites before deleting canvas
+        setBlockInfo(nullptr, nullptr); // destruct all sprites before deleting canvas
         delete _next;
         delete main;
         delete sequences;
@@ -183,7 +183,7 @@ int BaseBoard::firstColumnBlock(uint col) const
 {
 	for (int j=firstClearLine()-1; j>=0; j--) {
         Coord c(col, j);
-		if ( matrix()[c]!=0 ) return j;
+		if ( matrix()[c] ) return j;
     }
 	return -1;
 }
@@ -207,7 +207,7 @@ void BaseBoard::remove()
     for (uint j=0; j<firstClearLine(); j++)
         for (uint i=0; i<matrix().width(); i++) {
             Coord c(i, j);
-            if ( matrix()[c]==0 || !toBeRemoved(c) ) continue;
+            if ( !matrix()[c] || !toBeRemoved(c) ) continue;
             removeBlock(c);
         }
     computeInfos();
@@ -246,7 +246,7 @@ bool BaseBoard::doFall(bool doAll, bool first, bool lineByLine)
         // do move
         for (uint j=1; j<matrix().height(); j++) {
             Coord src(i, j);
-            if( heights[j]==0 || matrix()[src]==0 ) continue;
+            if( heights[j]==0 || !matrix()[src] ) continue;
             if (lineByLine) final = false;
             uint k = j - (lineByLine ? 1 : heights[j]);
             Coord dest(i, k);
@@ -377,7 +377,7 @@ void BaseBoard::_findGroup(Square<int> &field, const Coord &c,
 void BaseBoard::blockInGroup(Square<int> &field, const Coord &c, uint value,
                              uint &nb, bool set) const
 {
-	if ( matrix()[c]==0 ) return;
+	if ( !matrix()[c] ) return;
 	if ( matrix()[c]->value()!=value ) return;
 	if ( field[c]!=(set ? -1 : 0) ) return;
 	_findGroup(field, c, nb, set);
@@ -391,7 +391,7 @@ TQMemArray<uint> BaseBoard::findGroups(Square<int> &field, uint minSize,
  	for (uint j=0; j<firstClearLine(); j++)
 		for (uint i=0; i<matrix().width(); i++) {
             Coord c(i, j);
-			if ( matrix()[c]==0 || matrix()[c]->isGarbage() ) continue;
+			if ( !matrix()[c] || matrix()[c]->isGarbage() ) continue;
 			if ( field[c]!=0 ) continue;
             uint nb = findGroup(field, c);
             setGroup(field, c, nb);
@@ -411,7 +411,7 @@ uint BaseBoard::drawCode(const Coord &c) const
 	uint code = 0;
     for (uint i=0; i<Nb_Direction; i++) {
         Coord nc = SquareBase::neighbour(c, DIRECTION_DATA[i].neighbour);
-        if ( !matrix().inside(nc) || matrix()[nc]==0
+        if ( !matrix().inside(nc) || !matrix()[nc]
             || matrix()[nc]->value()!=v ) continue;
         code |= DIRECTION_DATA[i].direction;
     }
@@ -423,7 +423,7 @@ void BaseBoard::computeNeighbours()
 	for (uint j=0; j<firstClearLine(); j++)
 		for (uint i=0; i<matrix().width(); i++) {
             Coord c(i, j);
-			if ( matrix()[c]==0 || matrix()[c]->isGarbage() ) continue;
+			if ( !matrix()[c] || matrix()[c]->isGarbage() ) continue;
 			matrix()[c]->sprite()->setFrame( drawCode(c) );
 		}
 }
diff --git a/libksirtet/base/board.h b/libksirtet/base/board.h
index f38fbf41..1a608d26 100644
--- a/libksirtet/base/board.h
+++ b/libksirtet/base/board.h
@@ -17,7 +17,7 @@ class TDE_EXPORT FixedCanvasView : public TQCanvasView
   TQ_OBJECT
   
 public:
-  FixedCanvasView(TQWidget *parent = 0, const char *name = 0);
+  FixedCanvasView(TQWidget *parent = nullptr, const char *name = nullptr);
   
   virtual TQSize sizeHint() const;
   
diff --git a/libksirtet/base/factory.cpp b/libksirtet/base/factory.cpp
index b5e09661..e80b399b 100644
--- a/libksirtet/base/factory.cpp
+++ b/libksirtet/base/factory.cpp
@@ -9,19 +9,19 @@
 #include "settings.h"
 
 
-BaseFactory *BaseFactory::_self = 0;
+BaseFactory *BaseFactory::_self = nullptr;
 
 BaseFactory::BaseFactory(const MainData &md, const BaseBoardInfo &bi)
     : mainData(md), bbi(bi)
 {
-    Q_ASSERT( _self==0 );
+    Q_ASSERT(!_self);
     _self = this;
     _aboutData =
         new TDEAboutData(md.appName, md.trName, md.longVersion, md.description,
                        TDEAboutData::License_GPL,
                        "(c) 1995, Eirik Eng\n(c) 1996-2004, Nicolas Hadacek",
-                       0, md.homepage);
-    _aboutData->addAuthor("Nicolas Hadacek", 0, "hadacek@kde.org");
+                       nullptr, md.homepage);
+    _aboutData->addAuthor("Nicolas Hadacek", nullptr, "hadacek@kde.org");
     _aboutData->addCredit("Eirik Eng", I18N_NOOP("Core engine"));
 }
 
@@ -38,7 +38,7 @@ BaseFactory::~BaseFactory()
     delete tdeApp;
     delete _aboutData;
     Q_ASSERT(_self);
-    _self = 0;
+    _self = nullptr;
 }
 
 TQWidget *BaseFactory::createAppearanceConfig()
diff --git a/libksirtet/base/factory.h b/libksirtet/base/factory.h
index 2bd96bfb..9ab39963 100644
--- a/libksirtet/base/factory.h
+++ b/libksirtet/base/factory.h
@@ -48,7 +48,7 @@ class TDE_EXPORT BaseFactory
 
     virtual TQWidget *createAppearanceConfig();
     virtual TQWidget *createColorConfig();
-    virtual TQWidget *createGameConfig() { return 0; }
+    virtual TQWidget *createGameConfig() { return nullptr; }
  
  protected:
     TDEAboutData *_aboutData;
diff --git a/libksirtet/base/field.cpp b/libksirtet/base/field.cpp
index e750b67f..4b3fa9f5 100644
--- a/libksirtet/base/field.cpp
+++ b/libksirtet/base/field.cpp
@@ -20,7 +20,7 @@ const char *BaseField::BUTTON_TEXTS[NB_BUTTON_TYPE] = {
 };
 
 BaseField::BaseField(TQWidget *w)
-    : _widget(w), _boardLayout(0), _label(0), _button(0)
+    : _widget(w), _boardLayout(nullptr), _label(nullptr), _button(nullptr)
 {
     top = new TQGridLayout(w, 3, 5, 10);
 
@@ -64,11 +64,11 @@ bool BaseField::isArcade() const
 void BaseField::setMessage(const TQString &label, ButtonType type)
 {
     delete _label;
-    _label = 0;
+    _label = nullptr;
     delete _button;
-    _button = 0;
+    _button = nullptr;
     delete _boardLayout;
-    _boardLayout = 0;
+    _boardLayout = nullptr;
 
     if ( label.isEmpty() && type==NoButton ) {
         _widget->setFocus();
diff --git a/libksirtet/base/gtetris.cpp b/libksirtet/base/gtetris.cpp
index 6c2a66a9..7a498aa4 100644
--- a/libksirtet/base/gtetris.cpp
+++ b/libksirtet/base/gtetris.cpp
@@ -7,15 +7,15 @@ using namespace KGrid2D;
 
 GenericTetris::GenericTetris(uint width, uint height, bool withPieces,
                              bool graphic)
-    : _nextPiece(0), _currentPiece(0), _score(0), _nbRemoved(0),
-      _nbClearLines(height), _main(0),
+    : _nextPiece(nullptr), _currentPiece(nullptr), _score(0), _nbRemoved(0),
+      _nbClearLines(height), _main(nullptr),
       _graphic(graphic), _matrix(width, height)
 {
     if (withPieces) {
         _nextPiece = new Piece;
         _currentPiece = new Piece;
     }
-    _matrix.fill(0);
+    _matrix.fill(nullptr);
 }
 
 void GenericTetris::copy(const GenericTetris &g)
@@ -33,7 +33,7 @@ void GenericTetris::copy(const GenericTetris &g)
         Coord c = _matrix.coord(i);
         delete _matrix[c];
         if ( g._matrix[c] ) _matrix[c] = new Block(g._matrix[c]->value());
-        else _matrix[c] = 0;
+        else _matrix[c] = nullptr;
     }
 }
 
@@ -123,7 +123,7 @@ bool GenericTetris::canPosition(const Coord &pos, const Piece *piece) const
 {
     for(uint k=0; k<piece->nbBlocks(); k++) {
         Coord c(piece->pos(k, pos));
-        if ( !_matrix.inside(c) || _matrix[c]!=0 )
+        if ( !_matrix.inside(c) || _matrix[c] )
             return false; // outside or something in the way
     }
     return true;
@@ -182,14 +182,14 @@ void GenericTetris::computeInfos()
     _nbClearLines = 0;
     for (uint j=_matrix.height(); j>0; j--) {
         for (uint i=0; i<_matrix.width(); i++)
-            if ( _matrix[Coord(i, j-1)]!=0 ) return;
+            if ( _matrix[Coord(i, j-1)] ) return;
         _nbClearLines++;
     }
 }
 
 void GenericTetris::setBlock(const Coord &c, Block *b)
 {
-	Q_ASSERT( b && _matrix[c]==0 );
+	Q_ASSERT( b && _matrix[c]==nullptr );
 	_matrix[c] = b;
 	if (_graphic) {
         TQPoint p = toPoint(c);
@@ -200,15 +200,15 @@ void GenericTetris::setBlock(const Coord &c, Block *b)
 void GenericTetris::removeBlock(const Coord &c)
 {
 	delete _matrix[c];
-	_matrix[c] = 0;
+	_matrix[c] = nullptr;
 }
 
 void GenericTetris::moveBlock(const Coord &src, const Coord &dest)
 {
-	Q_ASSERT( _matrix[dest]==0 );
+	Q_ASSERT(!_matrix[dest]);
 	if ( _matrix[src] ) {
 		setBlock(dest, _matrix[src]);
-		_matrix[src] = 0;
+		_matrix[src] = nullptr;
 	}
 }
 
@@ -235,7 +235,7 @@ void GenericTetris::bumpCurrentPiece(int dec)
 
 void GenericTetris::partialMoveBlock(const Coord &c, const TQPoint &dec)
 {
-	Q_ASSERT( _graphic && _matrix[c]!=0 );
+	Q_ASSERT( _graphic && _matrix[c]!=nullptr );
     TQPoint p = toPoint(c) + dec;
 	_matrix[c]->sprite()->move(p.x(), p.y());
 }
diff --git a/libksirtet/base/kzoommainwindow.cpp b/libksirtet/base/kzoommainwindow.cpp
index a9bb2004..8eb0e8e2 100644
--- a/libksirtet/base/kzoommainwindow.cpp
+++ b/libksirtet/base/kzoommainwindow.cpp
@@ -26,7 +26,7 @@
 #include <kcmenumngr.h>
 
 KZoomMainWindow::KZoomMainWindow(uint min, uint max, uint step, const char *name)
-  : TDEMainWindow(0, name), _zoomStep(step), _minZoom(min), _maxZoom(max)
+  : TDEMainWindow(nullptr, name), _zoomStep(step), _minZoom(min), _maxZoom(max)
 {
   installEventFilter(this);
   
diff --git a/libksirtet/base/kzoommainwindow.h b/libksirtet/base/kzoommainwindow.h
index a649b71f..22526c27 100644
--- a/libksirtet/base/kzoommainwindow.h
+++ b/libksirtet/base/kzoommainwindow.h
@@ -48,7 +48,7 @@ class TDE_EXPORT KZoomMainWindow : public TDEMainWindow
 public:
   /** Constructor. */
   KZoomMainWindow(uint minZoom, uint maxZoom, uint zoomStep,
-                  const char *name = 0);
+                  const char *name = nullptr);
 
   /** Add a widget to be managed i.e. the adjustSize() method of the
    * widget is called whenever the zoom is changed.
@@ -69,7 +69,7 @@ protected:
    * @param popupName is the name of the context popup menu as defined in
    * the ui.rc file.
    */
-  void init(const char *popupName = 0);
+  void init(const char *popupName = nullptr);
     
   virtual void setZoom(uint zoom);
   virtual bool eventFilter(TQObject *o, TQEvent *e);
diff --git a/libksirtet/base/piece.cpp b/libksirtet/base/piece.cpp
index 27d704bd..94a46511 100644
--- a/libksirtet/base/piece.cpp
+++ b/libksirtet/base/piece.cpp
@@ -66,7 +66,7 @@ SequenceArray::SequenceArray()
 : _size(0)
 {
     const GPieceInfo &pinfo = Piece::info();
-    fill(0, pinfo.nbNormalBlockTypes() + pinfo.nbGarbageBlockTypes());
+    fill(nullptr, pinfo.nbNormalBlockTypes() + pinfo.nbGarbageBlockTypes());
 }
 
 void SequenceArray::setBlockSize(uint bsize)
@@ -92,7 +92,7 @@ void SequenceArray::setBlockSize(uint bsize)
                     pixmaps.append(pi);
                 }
             }
-        if ( at(i)==0 ) {
+        if ( !at(i) ) {
             at(i) = new TQCanvasPixmapArray(pixmaps, points);
             pixmaps.clear();
             points.clear();
@@ -117,7 +117,7 @@ TQPoint BlockInfo::toPoint(const Coord &pos) const
 
 //-----------------------------------------------------------------------------
 Block::Block(uint value)
-: _value(value), _sprite(0)
+: _value(value), _sprite(nullptr)
 {}
 
 Block::~Block()
@@ -153,10 +153,10 @@ bool Block::isGarbage() const
 
 
 //-----------------------------------------------------------------------------
-GPieceInfo *Piece::_info = 0;
+GPieceInfo *Piece::_info = nullptr;
 
 Piece::Piece()
-    : _binfo(0), _i(0), _j(0)
+    : _binfo(nullptr), _i(nullptr), _j(nullptr)
 {
     _blocks.setAutoDelete(true);
 }
@@ -179,7 +179,7 @@ void Piece::rotate(bool left, const TQPoint &p)
 
 Coord Piece::min() const
 {
-    if ( _i==0 || _j==0 ) return Coord(0, 0);
+    if ( !_i || !_j ) return Coord(0, 0);
     Coord min = coord(0);
     for(uint k=1; k<_info->nbBlocks(); k++)
         min = minimum(min, coord(k));
@@ -188,7 +188,7 @@ Coord Piece::min() const
 
 Coord Piece::max() const
 {
-    if ( _i==0 || _j==0 ) return Coord(0, 0);
+    if ( !_i || !_j ) return Coord(0, 0);
     Coord max = coord(0);
     for(uint k=1; k<_info->nbBlocks(); k++)
         max = maximum(max, coord(k));
@@ -200,7 +200,7 @@ void Piece::copy(const Piece *p)
     if ( p->_blocks.size()!=0 ) {
         _blocks.resize(p->_blocks.size());
         for (uint k=0; k<_blocks.size(); k++) {
-            if ( _blocks[k]==0 ) _blocks.insert(k, new Block);
+            if ( !_blocks[k] ) _blocks.insert(k, new Block);
             _blocks[k]->setValue(p->_blocks[k]->value(), _binfo);
         }
     }
diff --git a/libksirtet/base/settings.cpp b/libksirtet/base/settings.cpp
index 5b2735b5..dabbd437 100644
--- a/libksirtet/base/settings.cpp
+++ b/libksirtet/base/settings.cpp
@@ -19,7 +19,7 @@
 
 //-----------------------------------------------------------------------------
 BaseAppearanceConfig::BaseAppearanceConfig()
-    : TQWidget(0, "appearance_config")
+    : TQWidget(nullptr, "appearance_config")
 {
     TQVBoxLayout *top = new TQVBoxLayout(this);
 
@@ -58,7 +58,7 @@ BaseAppearanceConfig::BaseAppearanceConfig()
 
 //-----------------------------------------------------------------------------
 ColorConfig::ColorConfig()
-    : TQWidget(0, "color_config")
+    : TQWidget(nullptr, "color_config")
 {
     const GPieceInfo &info = Piece::info();
     TQVBoxLayout *top = new TQVBoxLayout(this);
diff --git a/libksirtet/common/ai.cpp b/libksirtet/common/ai.cpp
index 35d9d89f..add1d92e 100644
--- a/libksirtet/common/ai.cpp
+++ b/libksirtet/common/ai.cpp
@@ -22,7 +22,7 @@
 
 //-----------------------------------------------------------------------------
 AIPiece::AIPiece()
-    : _current(0)
+    : _current(nullptr)
 {}
 
 AIPiece::~AIPiece()
@@ -34,7 +34,7 @@ void AIPiece::init(const Piece *piece, Board *b)
 {
     _piece = piece;
     _board = b;
-    if ( _current==0 ) _current = new Piece;
+    if ( !_current ) _current = new Piece;
     reset();
 }
 
@@ -83,11 +83,11 @@ bool AIPiece::place()
 }
 
 //-----------------------------------------------------------------------------
-const AI::Data AI::LastData = { 0, 0, 0, false, 0 };
+const AI::Data AI::LastData = { nullptr, nullptr, nullptr, false, nullptr };
 
 AI::AI(uint tTime, uint oTime, const Data *DATA)
     : timer(this), thinkTime(tTime), orderTime(oTime), stopped(false),
-      board(0)
+      board(nullptr)
 {
     connect(&timer, TQ_SIGNAL(timeout()), TQ_SLOT(timeout()));
 
@@ -123,8 +123,8 @@ void AI::initThink()
 void AI::launch(Board *m)
 {
     main = m;
-    if ( board==0 )
-        board = static_cast<Board *>(bfactory->createBoard(false, 0));
+    if ( !board )
+        board = static_cast<Board *>(bfactory->createBoard(false, nullptr));
 
     pieces[0]->init(main->currentPiece(), board); // current
     if ( pieces.size()>=2 ) pieces[1]->init(main->nextPiece(), board); // next
@@ -252,7 +252,7 @@ double AI::nbHoles(const Board &, const Board &current)
     for (uint i=0; i<current.matrix().width(); i++) {
         for (int j=current.firstColumnBlock(i)-1; j>=0; j--) {
             KGrid2D::Coord c(i, j);
-            if ( current.matrix()[c]==0 ) nb++;
+            if ( !current.matrix()[c] ) nb++;
         }
     }
     return nb;
@@ -296,7 +296,7 @@ const uint AIConfig::minThinkingDepth = 1;
 const uint AIConfig::maxThinkingDepth = 2;
 
 AIConfig::AIConfig(const TQValueVector<AI::Element> &elements)
-    : TQWidget(0, "ai config")
+    : TQWidget(nullptr, "ai config")
 {
     TQGridLayout *top = new TQGridLayout(this, 3, 2, KDialog::marginHint(),
                                        KDialog::spacingHint());
diff --git a/libksirtet/common/board.cpp b/libksirtet/common/board.cpp
index 05d016f2..9f076134 100644
--- a/libksirtet/common/board.cpp
+++ b/libksirtet/common/board.cpp
@@ -13,7 +13,7 @@
 
 Board::Board(bool graphic, GiftPool *gp, TQWidget *parent)
     : BaseBoard(graphic, parent),
-      _giftPool(gp), aiEngine(0) 
+      _giftPool(gp), aiEngine(nullptr) 
 {}
 
 Board::~Board()
@@ -25,10 +25,10 @@ void Board::setType(bool _ai)
 {
     Q_ASSERT( graphic() );
     if (_ai) {
-        if ( aiEngine==0 ) aiEngine = cfactory->createAI();
+        if ( !aiEngine ) aiEngine = cfactory->createAI();
     } else {
         delete aiEngine;
-        aiEngine = 0;
+        aiEngine = nullptr;
     }
 }
 
diff --git a/libksirtet/common/inter.cpp b/libksirtet/common/inter.cpp
index ac574b91..a3370026 100644
--- a/libksirtet/common/inter.cpp
+++ b/libksirtet/common/inter.cpp
@@ -12,17 +12,17 @@
 
 
 const ActionData Interface::ACTION_DATA[Nb_Actions] = {
-    { I18N_NOOP("Move Left"),     "move left",     TQ_SLOT(moveLeft()),  0 },
-    { I18N_NOOP("Move Right"),    "move right",    TQ_SLOT(moveRight()), 0 },
+    { I18N_NOOP("Move Left"),     "move left",     TQ_SLOT(moveLeft()),  nullptr },
+    { I18N_NOOP("Move Right"),    "move right",    TQ_SLOT(moveRight()), nullptr },
     { I18N_NOOP("Drop Down"),     "drop down",     TQ_SLOT(dropDownStart()),
                                                    TQ_SLOT(dropDownStop()) },
-    { I18N_NOOP("One Line Down"), "one line down", TQ_SLOT(oneLineDown()), 0 },
-    { I18N_NOOP("Rotate Left"),   "rotate left",   TQ_SLOT(rotateLeft()),  0 },
-    { I18N_NOOP("Rotate Right"),  "rotate right",  TQ_SLOT(rotateRight()), 0 },
+    { I18N_NOOP("One Line Down"), "one line down", TQ_SLOT(oneLineDown()), nullptr },
+    { I18N_NOOP("Rotate Left"),   "rotate left",   TQ_SLOT(rotateLeft()),  nullptr },
+    { I18N_NOOP("Rotate Right"),  "rotate right",  TQ_SLOT(rotateRight()), nullptr },
     { I18N_NOOP("Move to Left Column"), "move left total",
-                                                   TQ_SLOT(moveLeftTotal()), 0 },
+                                                   TQ_SLOT(moveLeftTotal()), nullptr },
     { I18N_NOOP("Move to Right Column"), "move right total",
-                                                   TQ_SLOT(moveRightTotal()), 0 }
+                                                   TQ_SLOT(moveRightTotal()), nullptr }
 };
 
 const int Interface::KEYCODE_ONE[Nb_Actions] = {
diff --git a/libksirtet/common/misc_ui.h b/libksirtet/common/misc_ui.h
index fb2fd02a..5fecd129 100644
--- a/libksirtet/common/misc_ui.h
+++ b/libksirtet/common/misc_ui.h
@@ -73,7 +73,7 @@ class LIBKSIRTET_EXPORT PlayerProgress : public KGameProgress
   TQ_OBJECT
   
 public:
-  PlayerProgress(BaseBoard *board, TQWidget *parent = 0, const char *name = 0);
+  PlayerProgress(BaseBoard *board, TQWidget *parent = nullptr, const char *name = nullptr);
   
   virtual TQSize sizeHint() const;
   virtual TQSizePolicy sizePolicy() const;
diff --git a/libksirtet/common/settings.cpp b/libksirtet/common/settings.cpp
index 27be2047..02009771 100644
--- a/libksirtet/common/settings.cpp
+++ b/libksirtet/common/settings.cpp
@@ -30,7 +30,7 @@ AppearanceConfig::AppearanceConfig()
 
 //-----------------------------------------------------------------------------
 GameConfig::GameConfig()
-    : TQWidget(0, "game config")
+    : TQWidget(nullptr, "game config")
 {
     TQVBoxLayout *top = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
 
diff --git a/libksirtet/lib/internal.cpp b/libksirtet/lib/internal.cpp
index b5ea3881..17e3665e 100644
--- a/libksirtet/lib/internal.cpp
+++ b/libksirtet/lib/internal.cpp
@@ -123,7 +123,7 @@ IOBuffer *Network::ioBuffer(uint i) const
 		i -= remotes[k].array->size();
 	}
 	Q_ASSERT(false);
-	return 0;
+	return nullptr;
 }
 
 void Network::readError(uint i)
diff --git a/libksirtet/lib/internal.h b/libksirtet/lib/internal.h
index 30e4c7b3..bcd994de 100644
--- a/libksirtet/lib/internal.h
+++ b/libksirtet/lib/internal.h
@@ -22,7 +22,7 @@ class Local
 	virtual TQString playerName(uint i) const { return boards[i].name; }
 	virtual IOBuffer *ioBuffer(uint i) const { return ios[i]; }
 	virtual void writeData(bool inverse);
-	virtual WritingStream *globalStream() { return 0; }
+	virtual WritingStream *globalStream() { return nullptr; }
 
  protected:
 	MPInterface *interface;
diff --git a/libksirtet/lib/keys.cpp b/libksirtet/lib/keys.cpp
index b6cc99cd..88a5877d 100644
--- a/libksirtet/lib/keys.cpp
+++ b/libksirtet/lib/keys.cpp
@@ -30,7 +30,7 @@ void KeyData::setCurrentNb(uint nb)
 {
     Q_ASSERT( nb<_maxNb );
     clear();
-    _cols.fill(0, nb);
+    _cols.fill(nullptr, nb);
 }
 
 void KeyData::clear()
@@ -47,11 +47,11 @@ void KeyData::createActionCollection(uint index, TQWidget *receiver)
     for (uint k=0; k<_data.size(); k++) {
         TQString label = i18n(_data[k].label);
         TQString name = TQString("%2 %3").arg(index+1).arg(_data[k].name);
-        const char *slot = (_data[k].slotRelease ? 0 : _data[k].slot);
+        const char *slot = (_data[k].slotRelease ? nullptr : _data[k].slot);
         TDEAction *a = new TDEAction(label, _keycodes[_cols.size()-1][index][k],
                                  receiver, slot, _cols[index], name.utf8());
         a->setEnabled(false);
-        if ( slot==0 ) {
+        if ( !slot ) {
             SpecialData data;
             data.enabled = false;
             data.pressed = new TQSignal(this);
diff --git a/libksirtet/lib/meeting.h b/libksirtet/lib/meeting.h
index 779d06a4..66cb78a1 100644
--- a/libksirtet/lib/meeting.h
+++ b/libksirtet/lib/meeting.h
@@ -19,7 +19,7 @@ class NetMeeting : public KDialogBase
 	// "gameName" and "gameId" are TQByteArray because they are
     // used for ID comparing between games.
 	NetMeeting(const cId &id, Socket *, MPOptionWidget *option, bool server,
-               TQWidget *parent = 0, const char * name = 0);
+               TQWidget *parent = nullptr, const char * name = nullptr);
 	virtual ~NetMeeting();
 
  protected slots:
@@ -84,7 +84,7 @@ class ServerNetMeeting : public NetMeeting
      ServerNetMeeting(const cId &id,
 					  const RemoteHostData &rhd, MPOptionWidget *options,
 					  TQPtrList<RemoteHostData> &arhd,
-					  TQWidget *parent = 0, const char * name = 0);
+					  TQWidget *parent = nullptr, const char * name = nullptr);
 
  private slots:
 	void newHost(int);
@@ -115,7 +115,7 @@ class ClientNetMeeting : public NetMeeting
  public:
 	ClientNetMeeting(const cId &id,
 					 const RemoteHostData &rhd, MPOptionWidget *options,
-					 TQWidget *parent = 0, const char * name = 0);
+					 TQWidget *parent = nullptr, const char * name = nullptr);
 
  private slots:
 	void textChanged(const TQString &text);
diff --git a/libksirtet/lib/mp_board.h b/libksirtet/lib/mp_board.h
index ca40df56..00607ba7 100644
--- a/libksirtet/lib/mp_board.h
+++ b/libksirtet/lib/mp_board.h
@@ -13,7 +13,7 @@ class MPBoard : public TQWidget
   
 
  public:
-    MPBoard(TQWidget *parent, const char *name=0)
+    MPBoard(TQWidget *parent, const char *name=nullptr)
 	: TQWidget(parent, name) {}
 	virtual ~MPBoard() {}
 
diff --git a/libksirtet/lib/mp_interface.cpp b/libksirtet/lib/mp_interface.cpp
index ce341c24..5b30ec11 100644
--- a/libksirtet/lib/mp_interface.cpp
+++ b/libksirtet/lib/mp_interface.cpp
@@ -22,7 +22,7 @@
 MPInterface::MPInterface(const MPGameInfo &_gameInfo,
                          uint nbActions, const ActionData *data,
 						 TQWidget *parent, const char *name)
-: TQWidget(parent, name), internal(0), gameInfo(_gameInfo), nbLocalHumans(0)
+: TQWidget(parent, name), internal(nullptr), gameInfo(_gameInfo), nbLocalHumans(0)
 {
 	Q_ASSERT( gameInfo.maxNbLocalPlayers>=1 );
 
@@ -45,7 +45,7 @@ void MPInterface::clear()
 	if (internal) {
 		stop();
 		delete internal;
-		internal = 0;
+		internal = nullptr;
         _keyData->clear();
 	}
 }
diff --git a/libksirtet/lib/mp_interface.h b/libksirtet/lib/mp_interface.h
index 968d3408..41d21595 100644
--- a/libksirtet/lib/mp_interface.h
+++ b/libksirtet/lib/mp_interface.h
@@ -83,7 +83,7 @@ class MPInterface : public TQWidget
      */
     MPInterface(const MPGameInfo &gameInfo,
                 uint nbActions, const ActionData *data,
-				TQWidget *parent = 0, const char *name = 0);
+				TQWidget *parent = nullptr, const char *name = nullptr);
 	virtual ~MPInterface();
 
  public slots:
@@ -197,7 +197,7 @@ class MPInterface : public TQWidget
 	 * null pointer is returned and so no option widget is shown.
 	 * The option widget must be inherited from the @ref MPOptionWidget class.
 	 */
-	virtual MPOptionWidget *newOptionWidget() const { return 0; }
+	virtual MPOptionWidget *newOptionWidget() const { return nullptr; }
 
 	/** Called when a network error occurred or when a host gets disconnected.
 	 *  The default implementation displays a message and calls singleHumans()
diff --git a/libksirtet/lib/mp_option.h b/libksirtet/lib/mp_option.h
index adf78125..b14d4eb4 100644
--- a/libksirtet/lib/mp_option.h
+++ b/libksirtet/lib/mp_option.h
@@ -38,7 +38,7 @@ class MPOptionWidget : public TQWidget
   
 		
  public:
-	MPOptionWidget(bool Server, TQWidget *parent = 0, const char *name = 0)
+	MPOptionWidget(bool Server, TQWidget *parent = nullptr, const char *name = nullptr)
 	: TQWidget(parent, name), server(Server) {}
 	virtual ~MPOptionWidget() {}
 
diff --git a/libksirtet/lib/mp_simple_board.h b/libksirtet/lib/mp_simple_board.h
index b1782bb9..61e63f8f 100644
--- a/libksirtet/lib/mp_simple_board.h
+++ b/libksirtet/lib/mp_simple_board.h
@@ -12,7 +12,7 @@ class TDE_EXPORT MPSimpleBoard : public MPBoard
   
 		
  public:
-    MPSimpleBoard(TQWidget *parent = 0, const char *name = 0)
+    MPSimpleBoard(TQWidget *parent = nullptr, const char *name = nullptr)
 	: MPBoard(parent, name) {}
 	virtual ~MPSimpleBoard() {}
 
diff --git a/libksirtet/lib/mp_simple_interface.h b/libksirtet/lib/mp_simple_interface.h
index e2ab4430..517d9efb 100644
--- a/libksirtet/lib/mp_simple_interface.h
+++ b/libksirtet/lib/mp_simple_interface.h
@@ -12,7 +12,7 @@ class MPSimpleInterface : public MPInterface
  public:
 	MPSimpleInterface(const MPGameInfo &gi,
                       uint nbActions, const ActionData *data,
-                      TQWidget *parent = 0, const char *name = 0);
+                      TQWidget *parent = nullptr, const char *name = nullptr);
 
     bool isPaused() const { return state==SS_Pause; }
 
diff --git a/libksirtet/lib/pline.h b/libksirtet/lib/pline.h
index 0a214e72..20426719 100644
--- a/libksirtet/lib/pline.h
+++ b/libksirtet/lib/pline.h
@@ -20,7 +20,7 @@ class MeetingLine : public TQFrame
 
  public:
     MeetingLine(bool isOwner, bool readerIsServer, bool serverLine,
-				TQWidget *parent, const char *name = 0);
+				TQWidget *parent, const char *name = nullptr);
 
 	MeetingCheckBox::Type type() const { return tcb->type(); }
 	void setType(MeetingCheckBox::Type type) { tcb->setType(type); }
@@ -58,7 +58,7 @@ class PlayerLine : public TQFrame
 	PlayerLine(PlayerComboBox::Type type, const TQString &txt,
 			   bool humanSetting, bool AISetting,
 			   bool canBeEmpty, bool acceptAI,
-			   TQWidget *parent = 0, const char *name = 0);
+			   TQWidget *parent = nullptr, const char *name = nullptr);
 
 	PlayerComboBox::Type type() const { return pcb->type(); }
 	TQString name() const { return edit->text(); }
@@ -86,7 +86,7 @@ class GWidgetList : public TQWidget
   
 
  public:
-	GWidgetList(uint interval, TQWidget *parent = 0, const char * name = 0);
+	GWidgetList(uint interval, TQWidget *parent = nullptr, const char * name = nullptr);
 
 	void remove(uint i);
 	uint size() const { return widgets.count(); }
@@ -105,7 +105,7 @@ template <class Type>
 class WidgetList : public GWidgetList
 {
  public:
-	WidgetList(uint interval, TQWidget *parent=0, const char *name=0)
+	WidgetList(uint interval, TQWidget *parent=nullptr, const char *name=nullptr)
 	: GWidgetList(interval, parent, name) {}
 
 	void append(Type *w) { GWidgetList::append(w); }
diff --git a/libksirtet/lib/smanager.cpp b/libksirtet/lib/smanager.cpp
index 03137e32..2db13ab5 100644
--- a/libksirtet/lib/smanager.cpp
+++ b/libksirtet/lib/smanager.cpp
@@ -82,7 +82,7 @@ bool SocketManager::canWriteAll(uint sec, uint usec)
 	write_tmp = write_set;
 	tv.tv_sec = sec;
     tv.tv_usec = usec;
-    return ( select(max_fd+1, 0, &write_tmp, 0, &tv)==(int)nbWriteable );
+    return ( select(max_fd+1, nullptr, &write_tmp, nullptr, &tv)==(int)nbWriteable );
 }
 
 bool SocketManager::canWrite(uint i, uint sec, uint usec)
@@ -92,7 +92,7 @@ bool SocketManager::canWrite(uint i, uint sec, uint usec)
 	FD_SET(fd, &write_tmp);
 	tv.tv_sec = sec;
 	tv.tv_usec = usec;
-	return ( select(fd+1, 0, &write_tmp, 0, &tv)==1 );
+	return ( select(fd+1, nullptr, &write_tmp, nullptr, &tv)==1 );
 }
 
 bool SocketManager::checkPendingData(uint sec, uint usec)
@@ -100,7 +100,7 @@ bool SocketManager::checkPendingData(uint sec, uint usec)
 	read_tmp = read_set;
 	tv.tv_sec = sec;
     tv.tv_usec = usec;
-	return ( select(max_fd+1, &read_tmp, 0, 0, &tv)!=-1 );
+	return ( select(max_fd+1, &read_tmp, nullptr, nullptr, &tv)!=-1 );
 }
 
 bool SocketManager::dataPending(uint i)
diff --git a/libksirtet/lib/socket.cpp b/libksirtet/lib/socket.cpp
index 0298645c..87f78f5f 100644
--- a/libksirtet/lib/socket.cpp
+++ b/libksirtet/lib/socket.cpp
@@ -22,7 +22,7 @@
 
 Socket::Socket(KExtendedSocket *s, bool createNotifier,
                TQObject *parent, const char *name)
-: _socket(s), _notifier(0)
+: _socket(s), _notifier(nullptr)
 {
     Q_ASSERT(s);
 	if (createNotifier) {
diff --git a/libksirtet/lib/socket.h b/libksirtet/lib/socket.h
index f6e3f3be..04cd17b2 100644
--- a/libksirtet/lib/socket.h
+++ b/libksirtet/lib/socket.h
@@ -12,7 +12,7 @@ class Socket
 {
  public:
  	Socket(KExtendedSocket *, bool createNotifier = false,
-		   TQObject *parent = 0, const char *name = 0);
+		   TQObject *parent = nullptr, const char *name = nullptr);
 
 	/** close the socket */
     ~Socket();
diff --git a/libksirtet/lib/types.h b/libksirtet/lib/types.h
index 3e294073..39591dd3 100644
--- a/libksirtet/lib/types.h
+++ b/libksirtet/lib/types.h
@@ -104,7 +104,7 @@ class Socket;
 class RemoteHostData
 {
  public:
-	RemoteHostData() : socket(0) {}
+	RemoteHostData() : socket(nullptr) {}
 
 	Socket                *socket;
 	TQValueList<BoardData>  bds;
diff --git a/libksirtet/lib/wizard.h b/libksirtet/lib/wizard.h
index 9a74ae21..54c22c9a 100644
--- a/libksirtet/lib/wizard.h
+++ b/libksirtet/lib/wizard.h
@@ -23,7 +23,7 @@ class MPWizard : public KWizard
 
  public:
 	MPWizard(const MPGameInfo &gi, ConnectionData &cd,
-			 TQWidget *parent = 0, const char *name = 0);
+			 TQWidget *parent = nullptr, const char *name = nullptr);
 
 	void showPage(TQWidget *page);
 
diff --git a/libtdegames/highscore/kexthighscore.cpp b/libtdegames/highscore/kexthighscore.cpp
index 5a9e22d2..6b4dfbf7 100644
--- a/libtdegames/highscore/kexthighscore.cpp
+++ b/libtdegames/highscore/kexthighscore.cpp
@@ -31,7 +31,7 @@ namespace KExtHighscore
 {
 
 //-----------------------------------------------------------------------------
-ManagerPrivate *internal = 0;
+ManagerPrivate *internal = nullptr;
 
 uint gameType()
 {
@@ -117,7 +117,7 @@ Manager::Manager(uint nbGameTypes, uint maxNbEntries)
 Manager::~Manager()
 {
     delete internal;
-    internal = 0;
+    internal = nullptr;
 }
 
 void Manager::setTrackLostGames(bool track)
@@ -193,7 +193,7 @@ bool Manager::isStrictlyLess(const Score &s1, const Score &s2) const
 
 Item *Manager::createItem(ItemType type)
 {
-    Item *item = 0;
+    Item *item = nullptr;
     switch (type) {
     case ScoreDefault:
         item = new Item((uint)0, i18n("Score"), TQt::AlignRight);
diff --git a/libtdegames/highscore/kexthighscore_gui.cpp b/libtdegames/highscore/kexthighscore_gui.cpp
index 4ae9fb9c..f656594e 100644
--- a/libtdegames/highscore/kexthighscore_gui.cpp
+++ b/libtdegames/highscore/kexthighscore_gui.cpp
@@ -71,7 +71,7 @@ ScoresList::ScoresList(TQWidget *parent)
 
 void ScoresList::addHeader(const ItemArray &items)
 {
-    addLineItem(items, 0, 0);
+    addLineItem(items, 0, nullptr);
 }
 
 TQListViewItem *ScoresList::addLine(const ItemArray &items,
@@ -111,7 +111,7 @@ TQString HighscoresList::itemText(const ItemContainer &item, uint row) const
 void HighscoresList::load(const ItemArray &items, int highlight)
 {
     clear();
-    TQListViewItem *line = 0;
+    TQListViewItem *line = nullptr;
     for (int j=items.nbEntries()-1; j>=0; j--) {
         TQListViewItem *item = addLine(items, j, j==highlight);
         if ( j==highlight ) line = item;
@@ -122,7 +122,7 @@ void HighscoresList::load(const ItemArray &items, int highlight)
 //-----------------------------------------------------------------------------
 HighscoresWidget::HighscoresWidget(TQWidget *parent)
     : TQWidget(parent, "show_highscores_widget"),
-      _statsTab(0), _histoTab(0)
+      _statsTab(nullptr), _histoTab(nullptr)
 {
     const ScoreInfos &s = internal->scoreInfos();
     const PlayerInfos &p = internal->playerInfos();
@@ -178,7 +178,7 @@ HighscoresDialog::HighscoresDialog(int rank, TQWidget *parent)
                   KGuiItem(i18n("Configure..."), "configure"),
                   KGuiItem(i18n("Export..."))), _rank(rank), _tab(0)
 {
-    _widgets.resize(internal->nbGameTypes(), 0);
+    _widgets.resize(internal->nbGameTypes(), nullptr);
 
     if ( internal->nbGameTypes()>1 ) {
         for (uint i=0; i<internal->nbGameTypes(); i++) {
@@ -206,7 +206,7 @@ void HighscoresDialog::createPage(TQWidget *page)
     _current = page;
     bool several = ( internal->nbGameTypes()>1 );
     int i = (several ? pageIndex(page) : 0);
-    if ( _widgets[i]==0 ) {
+    if ( !_widgets[i] ) {
         _widgets[i] = new HighscoresWidget(page);
         connect(_widgets[i], TQ_SIGNAL(tabChanged(int)), TQ_SLOT(tabChanged(int)));
     }
diff --git a/libtdegames/highscore/kexthighscore_internal.cpp b/libtdegames/highscore/kexthighscore_internal.cpp
index f26a2683..40ef7c36 100644
--- a/libtdegames/highscore/kexthighscore_internal.cpp
+++ b/libtdegames/highscore/kexthighscore_internal.cpp
@@ -48,7 +48,7 @@ const char ItemContainer::ANONYMOUS[] = "_";
 const char ItemContainer::ANONYMOUS_LABEL[] = I18N_NOOP("anonymous");
 
 ItemContainer::ItemContainer()
-    : _item(0)
+    : _item(nullptr)
 {}
 
 ItemContainer::~ItemContainer()
@@ -499,7 +499,7 @@ ManagerPrivate::ManagerPrivate(uint nbGameTypes, Manager &m)
 
 void ManagerPrivate::init(uint maxNbEntries)
 {
-    _hsConfig = new KHighscore(false, 0);
+    _hsConfig = new KHighscore(false, nullptr);
     _playerInfos = new PlayerInfos;
     _scoreInfos = new ScoreInfos(maxNbEntries, *_playerInfos);
 }
@@ -589,7 +589,7 @@ void ManagerPrivate::convertToGlobal()
 {
     // read old highscores
     KHighscore *tmp = _hsConfig;
-    _hsConfig = new KHighscore(true, 0);
+    _hsConfig = new KHighscore(true, nullptr);
     TQValueVector<Score> scores(_scoreInfos->nbEntries());
     for (uint i=0; i<scores.count(); i++)
         scores[i] = readScore(i);
diff --git a/libtdegames/highscore/kexthighscore_tab.h b/libtdegames/highscore/kexthighscore_tab.h
index 3ba1c720..b6b5d609 100644
--- a/libtdegames/highscore/kexthighscore_tab.h
+++ b/libtdegames/highscore/kexthighscore_tab.h
@@ -36,7 +36,7 @@ class PlayersCombo : public TQComboBox
  TQ_OBJECT
   
  public:
-    PlayersCombo(TQWidget *parent = 0, const char *name = 0);
+    PlayersCombo(TQWidget *parent = nullptr, const char *name = nullptr);
 
     void load();
 
diff --git a/libtdegames/highscore/khighscore.cpp b/libtdegames/highscore/khighscore.cpp
index bdc82845..acb831af 100644
--- a/libtdegames/highscore/khighscore.cpp
+++ b/libtdegames/highscore/khighscore.cpp
@@ -50,8 +50,8 @@ public:
     bool     global;
 };
 
-KFileLock *KHighscore::_lock = 0;
-KRawConfig *KHighscore::_config = 0;
+KFileLock *KHighscore::_lock = nullptr;
+KRawConfig *KHighscore::_config = nullptr;
 static KStaticDeleter<KFileLock> lockSD;
 static KStaticDeleter<KRawConfig> configSD;
 
@@ -73,7 +73,7 @@ void KHighscore::init(bool forceLocal)
     d = new KHighscorePrivate;
 #ifdef HIGHSCORE_DIRECTORY
     d->global = !forceLocal;
-    if ( d->global && _lock==0 )
+    if ( d->global && !_lock )
         kdFatal(11002) << "KHighscore::init should be called before!!" << endl;
 #else
     d->global = false;
diff --git a/libtdegames/highscore/khighscore.h b/libtdegames/highscore/khighscore.h
index f3b3473e..00b1c554 100644
--- a/libtdegames/highscore/khighscore.h
+++ b/libtdegames/highscore/khighscore.h
@@ -90,7 +90,7 @@ public:
          * Constructor. The highscore file is forced to be local to support
          * games using the old behaviour.
          */
-	KHighscore(TQObject* parent = 0);
+	KHighscore(TQObject* parent = nullptr);
 
         /**
          * Constructor.
@@ -138,7 +138,7 @@ public:
          * @return false on error or if the config file is locked by another
          * process. In such case, the config stays read-only.
          */
-        bool lockForWriting(TQWidget *widget = 0);
+        bool lockForWriting(TQWidget *widget = nullptr);
 
         /**
          * Effectively write and unlock the system-wide highscore file
diff --git a/libtdegames/highscore/kscoredialog.cpp b/libtdegames/highscore/kscoredialog.cpp
index 98aab883..02c23239 100644
--- a/libtdegames/highscore/kscoredialog.cpp
+++ b/libtdegames/highscore/kscoredialog.cpp
@@ -68,7 +68,7 @@ KScoreDialog::KScoreDialog(int fields, TQWidget *parent, const char *oname)
         : KDialogBase(parent, oname, true, i18n("High Scores"), Ok, Ok, true)
 {
    d = new KScoreDialogPrivate();
-   d->edit = 0;
+   d->edit = nullptr;
    d->fields = fields;
    d->newName = -1;
    d->latest = -1;
@@ -385,7 +385,7 @@ void KScoreDialog::slotGotName()
    label->setText(d->player);
    d->stack[(d->newName-1)]->raiseWidget(label);
    delete d->edit;
-   d->edit = 0;
+   d->edit = nullptr;
    d->newName = -1;
 }
 
diff --git a/libtdegames/highscore/kscoredialog.h b/libtdegames/highscore/kscoredialog.h
index 30222b14..72e2bd60 100644
--- a/libtdegames/highscore/kscoredialog.h
+++ b/libtdegames/highscore/kscoredialog.h
@@ -60,7 +60,7 @@ public:
     * @param parent passed to parent TQWidget constructor
     * @param name passed to parent TQWidget constructor
     */
-   KScoreDialog(int fields, TQWidget *parent=0, const char *name=0);
+   KScoreDialog(int fields, TQWidget *parent=nullptr, const char *name=nullptr);
 
    ~KScoreDialog();
 
diff --git a/libtdegames/highscore/tdeconfigrawbackend.cpp b/libtdegames/highscore/tdeconfigrawbackend.cpp
index 80b4da96..7d925d0c 100644
--- a/libtdegames/highscore/tdeconfigrawbackend.cpp
+++ b/libtdegames/highscore/tdeconfigrawbackend.cpp
@@ -26,7 +26,7 @@
 
 TDEConfigRawBackEnd::TDEConfigRawBackEnd(TDEConfigBase *_config, int fd)
     : TDEConfigINIBackEnd(_config, TQString(), "config", false),
-      _fd(fd), _stream(0)
+      _fd(fd), _stream(nullptr)
 {
     _file.open(IO_ReadOnly, _fd);
 }
@@ -50,11 +50,11 @@ void TDEConfigRawBackEnd::sync(bool bMerge)
 
   _file.reset();
   KEntryMap aTempMap;
-  getEntryMap(aTempMap, false, bMerge ? &_file : 0);
+  getEntryMap(aTempMap, false, bMerge ? &_file : nullptr);
 
-  if ( _stream==0 ) {
+  if ( !_stream ) {
       _stream = fdopen(_fd, "w");
-      if ( _stream==0 ) return;
+      if ( !_stream ) return;
   }
   ftruncate(_fd, 0);
   writeEntries(_stream, aTempMap);
diff --git a/libtdegames/kcanvasrootpixmap.h b/libtdegames/kcanvasrootpixmap.h
index fbbea730..cc035602 100644
--- a/libtdegames/kcanvasrootpixmap.h
+++ b/libtdegames/kcanvasrootpixmap.h
@@ -46,7 +46,7 @@ class TDE_EXPORT KCanvasRootPixmap : public KRootPixmap
     /**
      * Constructor.
      */
-    KCanvasRootPixmap(TQCanvasView *view, const char *name = 0);
+    KCanvasRootPixmap(TQCanvasView *view, const char *name = nullptr);
 
  private slots:
     void backgroundUpdatedSlot(const TQPixmap &);
diff --git a/libtdegames/kcarddialog.cpp b/libtdegames/kcarddialog.cpp
index e3735fec..ba86596f 100644
--- a/libtdegames/kcarddialog.cpp
+++ b/libtdegames/kcarddialog.cpp
@@ -71,16 +71,16 @@ class KCardDialogPrivate
 public:
     KCardDialogPrivate()
     {
-       deckLabel = 0;
-       cardLabel = 0;
-       deckIconView = 0;
-       cardIconView = 0;
-       randomDeck = 0;
-       randomCardDir = 0;
-       cPreview = 0;
-       scaleSlider = 0;
-       globalDeck = 0;
-       globalCardDir = 0;
+       deckLabel = nullptr;
+       cardLabel = nullptr;
+       deckIconView = nullptr;
+       cardIconView = nullptr;
+       randomDeck = nullptr;
+       randomCardDir = nullptr;
+       cPreview = nullptr;
+       scaleSlider = nullptr;
+       globalDeck = nullptr;
+       globalCardDir = nullptr;
 
        cScale = 1;
     }
@@ -118,10 +118,10 @@ int KCardDialog::getCardDeck(TQString &pDeck, TQString &pCardDir, TQWidget *pPar
     dlg.setDeck(pDeck);
     dlg.setCardDir(pCardDir);
 
-    dlg.setupDialog(pScale != 0);
+    dlg.setupDialog(pScale != nullptr);
     dlg.loadConfig(pConf);
-    dlg.showRandomDeckBox(pRandomDeck != 0);
-    dlg.showRandomCardDirBox(pRandomCardDir != 0);
+    dlg.showRandomDeckBox(pRandomDeck != nullptr);
+    dlg.showRandomCardDirBox(pRandomCardDir != nullptr);
     int result=dlg.exec();
     if (result==TQDialog::Accepted)
     {
@@ -625,7 +625,7 @@ void KCardDialog::slotRandomDeckToggled(bool on)
     setDeck(getRandomDeck());
   } else {
     d->deckLabel->setText("empty");
-    setDeck(0);
+    setDeck(nullptr);
   }
 }
 
@@ -639,7 +639,7 @@ void KCardDialog::slotRandomCardDirToggled(bool on)
       }
   } else {
       d->cardLabel->setText("empty");
-      setCardDir(0);
+      setCardDir(nullptr);
   }
 }
 
diff --git a/libtdegames/kcarddialog.h b/libtdegames/kcarddialog.h
index ea14f310..e8d9195a 100644
--- a/libtdegames/kcarddialog.h
+++ b/libtdegames/kcarddialog.h
@@ -154,9 +154,9 @@ public:
    *
    * @return TQDialog::result().
    */
-   static int getCardDeck(TQString &deck,TQString &carddir, TQWidget *parent=0,
-                          CardFlags flags=Both, bool* randomDeck=0,
-                          bool* randomCardDir=0, double* scale=0, TDEConfig* conf=0);
+   static int getCardDeck(TQString &deck,TQString &carddir, TQWidget *parent=nullptr,
+                          CardFlags flags=Both, bool* randomDeck=nullptr,
+                          bool* randomCardDir=nullptr, double* scale=nullptr, TDEConfig* conf=nullptr);
 
    /**
     * Read the configuration from the applications rc file and put the
diff --git a/libtdegames/kchatbase.cpp b/libtdegames/kchatbase.cpp
index cae06fb5..2c8cfce2 100644
--- a/libtdegames/kchatbase.cpp
+++ b/libtdegames/kchatbase.cpp
@@ -35,8 +35,8 @@ class KChatBaseTextPrivate
 public:
 	KChatBaseTextPrivate()
 	{
-		mNameFont = 0;
-		mMessageFont = 0;
+		mNameFont = nullptr;
+		mMessageFont = nullptr;
 	}
 
 	TQString mName;
@@ -161,9 +161,9 @@ class KChatBasePrivate
 public:
 	KChatBasePrivate() 
 	{ 
-		mBox = 0;
-		mEdit = 0;
-		mCombo = 0;
+		mBox = nullptr;
+		mEdit = nullptr;
+		mCombo = nullptr;
 
 		mAcceptMessage = true;
 		mMaxItems = -1;
diff --git a/libtdegames/kchatbase.h b/libtdegames/kchatbase.h
index d5c63691..410d10d5 100644
--- a/libtdegames/kchatbase.h
+++ b/libtdegames/kchatbase.h
@@ -369,14 +369,14 @@ public:
 	 * to. If you use 0 then tdeApp->config() is used and the group is changed
 	 * to "KChatBase" (the current group is restored at the end).
 	 **/
-	virtual void saveConfig(TDEConfig* conf = 0);
+	virtual void saveConfig(TDEConfig* conf = nullptr);
 
 	/**
 	 * Read the configuration from a TDEConfig object. If the pointer is
 	 * NULL tdeApp->config() is used and the group is changed to "KChatBase".
 	 * The current TDEConfig::group is restored after this call.
 	 **/
-	virtual void readConfig(TDEConfig* conf = 0);
+	virtual void readConfig(TDEConfig* conf = nullptr);
 
 	/**
 	 * Set the maximum number of items in the list. If the number of item
diff --git a/libtdegames/kchatdialog.cpp b/libtdegames/kchatdialog.cpp
index 707e9987..ce43b01f 100644
--- a/libtdegames/kchatdialog.cpp
+++ b/libtdegames/kchatdialog.cpp
@@ -33,14 +33,14 @@ class KChatDialogPrivate
  public:
 	KChatDialogPrivate()
 	{
-		mTextPage = 0;
+		mTextPage = nullptr;
 
-		mNamePreview = 0;
-		mTextPreview = 0;
-		mSystemNamePreview = 0;
-		mSystemTextPreview = 0;
+		mNamePreview = nullptr;
+		mTextPreview = nullptr;
+		mSystemNamePreview = nullptr;
+		mSystemTextPreview = nullptr;
 
-		mChat = 0;
+		mChat = nullptr;
 	}
 
 	TQFrame* mTextPage;
@@ -57,7 +57,7 @@ class KChatDialogPrivate
 
 KChatDialog::KChatDialog(KChatBase* chat, TQWidget* parent, bool modal) 
 //	: KDialogBase(Tabbed, i18n("Configure Chat"), Ok|Default|Apply|Cancel, Ok, parent, 0, modal, true)
-	: KDialogBase(Plain, i18n("Configure Chat"), Ok|Default|Apply|Cancel, Ok, parent, 0, modal, true)
+	: KDialogBase(Plain, i18n("Configure Chat"), Ok|Default|Apply|Cancel, Ok, parent, nullptr, modal, true)
 {
  init();
  plugChatWidget(chat);
@@ -65,7 +65,7 @@ KChatDialog::KChatDialog(KChatBase* chat, TQWidget* parent, bool modal)
 
 KChatDialog::KChatDialog(TQWidget* parent, bool modal) 
 //	: KDialogBase(Tabbed, i18n("Configure Chat"), Ok|Default|Apply|Cancel, Ok, parent, 0, modal, true)
-	: KDialogBase(Plain, i18n("Configure Chat"), Ok|Default|Apply|Cancel, Ok, parent, 0, modal, true)
+	: KDialogBase(Plain, i18n("Configure Chat"), Ok|Default|Apply|Cancel, Ok, parent, nullptr, modal, true)
 {
  init();
 }
diff --git a/libtdegames/kgame/dialogs/kgameconnectdialog.cpp b/libtdegames/kgame/dialogs/kgameconnectdialog.cpp
index 86d32ac2..08aa331f 100644
--- a/libtdegames/kgame/dialogs/kgameconnectdialog.cpp
+++ b/libtdegames/kgame/dialogs/kgameconnectdialog.cpp
@@ -39,10 +39,10 @@ class KGameConnectWidgetPrivate
  public:
 	KGameConnectWidgetPrivate()
 	{
-		mPort = 0;
-		mHost = 0;
-		mButtonGroup = 0;
-		mBrowser = 0;
+		mPort = nullptr;
+		mHost = nullptr;
+		mButtonGroup = nullptr;
+		mBrowser = nullptr;
 	}
 
 	KIntNumInput* mPort;
@@ -206,7 +206,7 @@ class KGameConnectDialogPrivate
  public:
 	KGameConnectDialogPrivate()
 	{
-		mConnect = 0;
+		mConnect = nullptr;
 	}
 
 	KGameConnectWidget* mConnect;
@@ -214,7 +214,7 @@ class KGameConnectDialogPrivate
 
 // buttonmask =Ok|Cancel
 KGameConnectDialog::KGameConnectDialog(TQWidget* parent,int buttonmask) : KDialogBase(Plain,
-		i18n("Network Game"),buttonmask , Ok, parent, 0, true, buttonmask!=0)
+		i18n("Network Game"),buttonmask , Ok, parent, nullptr, true, buttonmask!=0)
 {
  d = new KGameConnectDialogPrivate;
  TQVBoxLayout* vb = new TQVBoxLayout(plainPage(), spacingHint());
diff --git a/libtdegames/kgame/dialogs/kgameconnectdialog.h b/libtdegames/kgame/dialogs/kgameconnectdialog.h
index 6c0fb329..48367cd5 100644
--- a/libtdegames/kgame/dialogs/kgameconnectdialog.h
+++ b/libtdegames/kgame/dialogs/kgameconnectdialog.h
@@ -119,7 +119,7 @@ class KGameConnectDialog : public KDialogBase
 	TQ_OBJECT
   
 public:
-	KGameConnectDialog(TQWidget* parent = 0,int buttonmask=Ok|Cancel);
+	KGameConnectDialog(TQWidget* parent = nullptr,int buttonmask=Ok|Cancel);
 	virtual ~KGameConnectDialog();
 	
 	/**
diff --git a/libtdegames/kgame/dialogs/kgamedebugdialog.cpp b/libtdegames/kgame/dialogs/kgamedebugdialog.cpp
index 7b82c909..e5e13504 100644
--- a/libtdegames/kgame/dialogs/kgamedebugdialog.cpp
+++ b/libtdegames/kgame/dialogs/kgamedebugdialog.cpp
@@ -46,41 +46,41 @@ class KGameDebugDialogPrivate
 public:
 	KGameDebugDialogPrivate()
 	{
-		mGame = 0;
-
-		mGamePage = 0;
-		mGameProperties = 0;
-		mGameAddress = 0;
-		mGameId = 0;
-		mGameCookie = 0;
-		mGameMaster = 0;
-		mGameAdmin = 0;
-		mGameOffering = 0;
-		mGameStatus = 0;
-		mGameRunning = 0;
-		mGameMaxPlayers = 0;
-		mGameMinPlayers = 0;
-		mGamePlayerCount = 0;
-
-		mPlayerPage = 0;
-		mPlayerList = 0;
-		mPlayerProperties = 0;
-		mPlayerAddress = 0;
-		mPlayerId = 0;
-		mPlayerName = 0;
-		mPlayerGroup = 0;
-		mPlayerUserId = 0;
-		mPlayerMyTurn = 0;
-		mPlayerAsyncInput= 0;
-		mPlayerKGameAddress = 0;
-		mPlayerVirtual = 0;
-		mPlayerActive = 0;
-		mPlayerRtti = 0;
-		mPlayerNetworkPriority = 0;
-
-		mMessagePage = 0;
-		mMessageList = 0;
-		mHideIdList = 0;
+		mGame = nullptr;
+
+		mGamePage = nullptr;
+		mGameProperties = nullptr;
+		mGameAddress = nullptr;
+		mGameId = nullptr;
+		mGameCookie = nullptr;
+		mGameMaster = nullptr;
+		mGameAdmin = nullptr;
+		mGameOffering = nullptr;
+		mGameStatus = nullptr;
+		mGameRunning = nullptr;
+		mGameMaxPlayers = nullptr;
+		mGameMinPlayers = nullptr;
+		mGamePlayerCount = nullptr;
+
+		mPlayerPage = nullptr;
+		mPlayerList = nullptr;
+		mPlayerProperties = nullptr;
+		mPlayerAddress = nullptr;
+		mPlayerId = nullptr;
+		mPlayerName = nullptr;
+		mPlayerGroup = nullptr;
+		mPlayerUserId = nullptr;
+		mPlayerMyTurn = nullptr;
+		mPlayerAsyncInput= nullptr;
+		mPlayerKGameAddress = nullptr;
+		mPlayerVirtual = nullptr;
+		mPlayerActive = nullptr;
+		mPlayerRtti = nullptr;
+		mPlayerNetworkPriority = nullptr;
+
+		mMessagePage = nullptr;
+		mMessageList = nullptr;
+		mHideIdList = nullptr;
 	}
 
 	const KGame* mGame;
@@ -122,7 +122,7 @@ public:
 
 KGameDebugDialog::KGameDebugDialog(KGame* g, TQWidget* parent, bool modal) :
 		KDialogBase(Tabbed, i18n("KGame Debug Dialog"), Close, Close, 
-		parent, 0, modal, true)
+		parent, nullptr, modal, true)
 {
  d = new KGameDebugDialogPrivate;
 
@@ -448,9 +448,9 @@ void KGameDebugDialog::setKGame(const KGame* g)
 void KGameDebugDialog::slotUnsetKGame()
 {
  if (d->mGame) {
-	disconnect(d->mGame, 0, this, 0);
+	disconnect(d->mGame, nullptr, this, nullptr);
  }
- d->mGame = 0;
+ d->mGame = nullptr;
  clearPages();
 }
 
@@ -474,7 +474,7 @@ void KGameDebugDialog::removePlayer(TQListBoxItem* i)
  if (!p) {
 	return;
  }
- disconnect(p, 0, this, 0);
+ disconnect(p, nullptr, this, nullptr);
  if (i->isSelected()) {
 	clearPlayerData();
  }
diff --git a/libtdegames/kgame/dialogs/kgamedialog.cpp b/libtdegames/kgame/dialogs/kgamedialog.cpp
index 077d7f32..97a5348c 100644
--- a/libtdegames/kgame/dialogs/kgamedialog.cpp
+++ b/libtdegames/kgame/dialogs/kgamedialog.cpp
@@ -36,16 +36,16 @@ class KGameDialogPrivate
 public:
 	KGameDialogPrivate() 
 	{
-		mGamePage = 0;
-		mNetworkPage = 0;
-		mMsgServerPage = 0;
-		mTopLayout = 0;
+		mGamePage = nullptr;
+		mNetworkPage = nullptr;
+		mMsgServerPage = nullptr;
+		mTopLayout = nullptr;
 
-		mNetworkConfig = 0;
-		mGameConfig = 0;
+		mNetworkConfig = nullptr;
+		mGameConfig = nullptr;
 
-		mOwner = 0;
-		mGame = 0;
+		mOwner = nullptr;
+		mGame = nullptr;
 	}
 
 	TQVBox* mGamePage;
@@ -66,7 +66,7 @@ public:
 KGameDialog::KGameDialog(KGame* g, KPlayer* owner, const TQString& title,
 		TQWidget* parent, bool modal)
 	: KDialogBase(Tabbed, title, Ok|Default|Apply,
-	Ok, parent, 0, modal, true)
+	Ok, parent, nullptr, modal, true)
 {
  init(g, owner);
 }
@@ -74,7 +74,7 @@ KGameDialog::KGameDialog(KGame* g, KPlayer* owner, const TQString& title,
 KGameDialog::KGameDialog(KGame* g, KPlayer* owner, const TQString& title, 
 		TQWidget* parent, long initConfigs, int chatMsgId, bool modal)
 	: KDialogBase(Tabbed, title, Ok|Default|Apply,
-	Ok, parent, 0, modal, true)
+	Ok, parent, nullptr, modal, true)
 {
  init(g, owner);
  if ((ConfigOptions)initConfigs!=NoConfig) {
@@ -102,16 +102,16 @@ void KGameDialog::initDefaultDialog(ConfigOptions initConfigs, int chatMsgId)
 {
  if (initConfigs & GameConfig) {
 	kdDebug() << "add gameconf" << endl;
-	addGameConfig(new KGameDialogGeneralConfig(0));
+	addGameConfig(new KGameDialogGeneralConfig(nullptr));
  }
  if (initConfigs & NetworkConfig) {
-	addNetworkConfig(new KGameDialogNetworkConfig(0));
+	addNetworkConfig(new KGameDialogNetworkConfig(nullptr));
  }
  if (initConfigs & (MsgServerConfig) ) {
-	addMsgServerConfig(new KGameDialogMsgServerConfig(0));
+	addMsgServerConfig(new KGameDialogMsgServerConfig(nullptr));
  }
  if (initConfigs & ChatConfig) {
-	KGameDialogChatConfig * c = new KGameDialogChatConfig(chatMsgId, 0);
+	KGameDialogChatConfig * c = new KGameDialogChatConfig(chatMsgId, nullptr);
 	if (d->mGamePage) {
 		addChatWidget(c, d->mGamePage);
 	} else {
@@ -123,10 +123,10 @@ void KGameDialog::initDefaultDialog(ConfigOptions initConfigs, int chatMsgId)
 	// kick players out
 	if (d->mNetworkPage) {
 		// put it on the network page
-		addConnectionList(new KGameDialogConnectionConfig(0), d->mNetworkPage);
+		addConnectionList(new KGameDialogConnectionConfig(nullptr), d->mNetworkPage);
 	} else {
 		// if no network page available put it on an own page
-		addConfigPage(new KGameDialogConnectionConfig(0), i18n("C&onnections"));
+		addConfigPage(new KGameDialogConnectionConfig(nullptr), i18n("C&onnections"));
 	}
  }
 }
@@ -197,7 +197,7 @@ void KGameDialog::addConnectionList(KGameDialogConnectionConfig* c, TQVBox* pare
 
 TQVBox *KGameDialog::configPage(ConfigOptions which)
 {
- TQVBox *box = 0;
+ TQVBox *box = nullptr;
  switch(which)
  {
 	case NetworkConfig:
@@ -219,7 +219,7 @@ TQVBox* KGameDialog::addConfigPage(KGameDialogConfig* widget, const TQString& ti
 {
  if (!widget) {
 	kdError(11001) << "Cannot add NULL config widget" << endl;
-	return 0;
+	return nullptr;
  }
  TQVBox* page = addVBoxPage(title);
  addConfigWidget(widget, page);
@@ -298,7 +298,7 @@ void KGameDialog::setOwner(KPlayer* owner)
 void KGameDialog::setKGame(KGame* g)
 {
  if (d->mGame) {
-	disconnect(d->mGame, 0, this, 0);
+	disconnect(d->mGame, nullptr, this, nullptr);
  }
  d->mGame = g;
  for (int unsigned i = 0; i < d->mConfigWidgets.count(); i++) {
@@ -320,7 +320,7 @@ void KGameDialog::setAdmin(bool admin)
 }
 
 void KGameDialog::slotUnsetKGame() // called when KGame is destroyed
-{ setKGame(0); }
+{ setKGame(nullptr); }
 
 void KGameDialog::submitToKGame()
 {
diff --git a/libtdegames/kgame/dialogs/kgamedialog.h b/libtdegames/kgame/dialogs/kgamedialog.h
index cc123457..98bc59e1 100644
--- a/libtdegames/kgame/dialogs/kgamedialog.h
+++ b/libtdegames/kgame/dialogs/kgamedialog.h
@@ -176,7 +176,7 @@ public:
 	 * already added config widget. Note that the game page will be used
 	 * if parent is 0.
 	 **/
-	void addChatWidget(KGameDialogChatConfig* chat, TQVBox* parent = 0);
+	void addChatWidget(KGameDialogChatConfig* chat, TQVBox* parent = nullptr);
 
 	/**
 	 * Add a connection list to the dialog. The list consists of a
@@ -190,7 +190,7 @@ public:
 	 * @param parent The parent of the widget. If 0 the networkConfig
 	 * page is used.
 	 **/
-	void addConnectionList(KGameDialogConnectionConfig* c, TQVBox* parent = 0);
+	void addConnectionList(KGameDialogConnectionConfig* c, TQVBox* parent = nullptr);
 
 	/**
 	 * Add a new page to the dialog. The page will contain you new config
diff --git a/libtdegames/kgame/dialogs/kgamedialogconfig.cpp b/libtdegames/kgame/dialogs/kgamedialogconfig.cpp
index 646e8e41..2803e792 100644
--- a/libtdegames/kgame/dialogs/kgamedialogconfig.cpp
+++ b/libtdegames/kgame/dialogs/kgamedialogconfig.cpp
@@ -46,8 +46,8 @@ class KGameDialogConfigPrivate
 public:
 	KGameDialogConfigPrivate()
 	{
-		mOwner = 0;
-		mGame = 0;
+		mOwner = nullptr;
+		mGame = nullptr;
 
 		mAdmin = false;
 	}
@@ -96,10 +96,10 @@ class KGameDialogNetworkConfigPrivate
 public:
 	KGameDialogNetworkConfigPrivate()
 	{
-		mInitConnection = 0;
-		mNetworkLabel = 0;
-		mDisconnectButton = 0;
-		mConnect = 0;
+		mInitConnection = nullptr;
+		mNetworkLabel = nullptr;
+		mDisconnectButton = nullptr;
+		mConnect = nullptr;
 		mDefaultServer=true;
 
 	}
@@ -252,8 +252,8 @@ class KGameDialogGeneralConfigPrivate
 public:
 	KGameDialogGeneralConfigPrivate()
 	{
-		mTopLayout = 0;
-		mName = 0;
+		mTopLayout = nullptr;
+		mName = nullptr;
 	}
 
 	TQLineEdit* mName;
@@ -362,15 +362,15 @@ class KGameDialogMsgServerConfigPrivate
 public:
 	KGameDialogMsgServerConfigPrivate()
 	{
-		senderLayout = 0;
-		localLayout = 0;
+		senderLayout = nullptr;
+		localLayout = nullptr;
 
-		changeMaxClients = 0;
-		changeAdmin= 0;
-		removeClient= 0;
-		noAdmin = 0;
+		changeMaxClients = nullptr;
+		changeAdmin= nullptr;
+		removeClient= nullptr;
+		noAdmin = nullptr;
 
-		noMaster = 0;
+		noMaster = nullptr;
 	}
 
 	TQVBoxLayout* senderLayout;
@@ -485,7 +485,7 @@ void KGameDialogMsgServerConfig::setAdmin(bool a)
  if (admin()) {
 	if (d->noAdmin) {
 		delete d->noAdmin;
-		d->noAdmin = 0;
+		d->noAdmin = nullptr;
 	}
 	d->changeMaxClients = new TQPushButton(i18n("Change Maximal Number of Clients"), this);
 	connect(d->changeMaxClients, TQ_SIGNAL(pressed()), this, TQ_SLOT(slotChangeMaxClients()));
@@ -499,15 +499,15 @@ void KGameDialogMsgServerConfig::setAdmin(bool a)
  } else {
 	if (d->changeMaxClients) {
 		delete d->changeMaxClients;
-		d->changeMaxClients = 0;
+		d->changeMaxClients = nullptr;
 	}
 	if (d->changeAdmin) {
 		delete d->changeAdmin;
-		d->changeAdmin = 0;
+		d->changeAdmin = nullptr;
 	}
 	if (d->removeClient) {
 		delete d->removeClient;
-		d->removeClient = 0;
+		d->removeClient = nullptr;
 	}
 	d->noAdmin = new TQLabel(i18n("Only the admin can configure the message server!"), this);
 	d->senderLayout->addWidget(d->noAdmin);
@@ -527,7 +527,7 @@ void KGameDialogMsgServerConfig::setHasMsgServer(bool has)
  }
  if (d->noMaster) {
 	delete d->noMaster;
-	d->noMaster = 0;
+	d->noMaster = nullptr;
  }
  //TODO
  // list all connections, data (max clients) and so on
@@ -541,7 +541,7 @@ class KGameDialogChatConfigPrivate
 public:
 	KGameDialogChatConfigPrivate()
 	{
-		mChat = 0;
+		mChat = nullptr;
 	}
 
 	KGameChat* mChat;
@@ -554,7 +554,7 @@ KGameDialogChatConfig::KGameDialogChatConfig(int chatMsgId, TQWidget* parent)
  TQVBoxLayout* topLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
  topLayout->setAutoAdd(true);
  TQHGroupBox* b = new TQHGroupBox(i18n("Chat"), this);
- d->mChat = new KGameChat(0, chatMsgId, b);
+ d->mChat = new KGameChat(nullptr, chatMsgId, b);
 }
 
 KGameDialogChatConfig::~KGameDialogChatConfig()
@@ -592,7 +592,7 @@ class KGameDialogConnectionConfigPrivate
 public:
 	KGameDialogConnectionConfigPrivate()
 	{
-		mPlayerBox = 0;
+		mPlayerBox = nullptr;
 	}
 
 	TQPtrDict<KPlayer> mItem2Player;
@@ -621,7 +621,7 @@ KGameDialogConnectionConfig::~KGameDialogConnectionConfig()
 void KGameDialogConnectionConfig::setKGame(KGame* g)
 {
  if (game()) {
-	disconnect(game(), 0, this, 0);
+	disconnect(game(), nullptr, this, nullptr);
  }
  KGameDialogConfig::setKGame(g);
  slotClearPlayers();
@@ -650,7 +650,7 @@ void KGameDialogConnectionConfig::setAdmin(bool a)
 	return;
  }
  if (admin()) {
-	disconnect(game(), TQ_SIGNAL(executed(TQListBoxItem*)), this, 0);
+	disconnect(game(), TQ_SIGNAL(executed(TQListBoxItem*)), this, nullptr);
  }
  KGameDialogConfig::setAdmin(a);
  if (admin()) {
@@ -668,7 +668,7 @@ TQListBoxItem* KGameDialogConnectionConfig::item(KPlayer* p) const
 	}
 	++it;
  }
- return 0;
+ return nullptr;
 }
 
 void KGameDialogConnectionConfig::slotClearPlayers()
@@ -756,7 +756,7 @@ void KGameDialogConnectionConfig::slotKickPlayerOut(TQListBoxItem* item)
 void KGameDialogConnectionConfig::slotPropertyChanged(KGamePropertyBase* prop, KPlayer* player)
 {
  if(prop->id() == KGamePropertyBase::IdName) {
-	TQListBoxText* old = 0;
+	TQListBoxText* old = nullptr;
 	TQPtrDictIterator<KPlayer> it(d->mItem2Player);
 	while (it.current() && !old) {
 		if (it.current() == player) {
diff --git a/libtdegames/kgame/dialogs/kgamedialogconfig.h b/libtdegames/kgame/dialogs/kgamedialogconfig.h
index 6d1f9586..05e54b78 100644
--- a/libtdegames/kgame/dialogs/kgamedialogconfig.h
+++ b/libtdegames/kgame/dialogs/kgamedialogconfig.h
@@ -53,7 +53,7 @@ class TDE_EXPORT KGameDialogConfig : public TQWidget
 	TQ_OBJECT
   
 public:
-	KGameDialogConfig(TQWidget* parent = 0);
+	KGameDialogConfig(TQWidget* parent = nullptr);
 	virtual ~KGameDialogConfig();
 
 	/**
@@ -162,7 +162,7 @@ public:
 	 * will exist anymore.
 	 *
 	 **/
-	KGameDialogGeneralConfig(TQWidget* parent = 0, bool initializeGUI = true);
+	KGameDialogGeneralConfig(TQWidget* parent = nullptr, bool initializeGUI = true);
 	virtual ~KGameDialogGeneralConfig();
 
 	/**
@@ -215,7 +215,7 @@ class TDE_EXPORT KGameDialogNetworkConfig : public KGameDialogConfig
 	TQ_OBJECT
   
 public:
-	KGameDialogNetworkConfig(TQWidget* parent = 0);
+	KGameDialogNetworkConfig(TQWidget* parent = nullptr);
 	virtual ~KGameDialogNetworkConfig();
 
 
@@ -282,7 +282,7 @@ class KGameDialogMsgServerConfig : public KGameDialogConfig
 	TQ_OBJECT
   
 public:
-	KGameDialogMsgServerConfig(TQWidget* parent = 0);
+	KGameDialogMsgServerConfig(TQWidget* parent = nullptr);
 	virtual ~KGameDialogMsgServerConfig();
 
 	virtual void submitToKGame(KGame*, KPlayer*) {}
@@ -316,7 +316,7 @@ class KGameDialogChatConfig : public KGameDialogConfig
 	TQ_OBJECT
   
 public:
-	KGameDialogChatConfig(int chatMsgId, TQWidget* parent = 0);
+	KGameDialogChatConfig(int chatMsgId, TQWidget* parent = nullptr);
 	virtual ~KGameDialogChatConfig();
 
 	virtual void setKGame(KGame* g);
@@ -338,7 +338,7 @@ class KGameDialogConnectionConfig : public KGameDialogConfig
 	TQ_OBJECT
   
 public:
-	KGameDialogConnectionConfig(TQWidget* parent = 0);
+	KGameDialogConnectionConfig(TQWidget* parent = nullptr);
 	virtual ~KGameDialogConnectionConfig();
 
 	virtual void setKGame(KGame* g);
diff --git a/libtdegames/kgame/dialogs/kgameerrordialog.cpp b/libtdegames/kgame/dialogs/kgameerrordialog.cpp
index 574d4545..7c51bf20 100644
--- a/libtdegames/kgame/dialogs/kgameerrordialog.cpp
+++ b/libtdegames/kgame/dialogs/kgameerrordialog.cpp
@@ -31,7 +31,7 @@ class KGameErrorDialogPrivate
 public:
 	KGameErrorDialogPrivate()
 	{
-		mGame = 0;
+		mGame = nullptr;
 	}
 
 	const KGame* mGame;
@@ -66,9 +66,9 @@ void KGameErrorDialog::setKGame(const KGame* g)
 void KGameErrorDialog::slotUnsetKGame()
 {
  if (d->mGame) {
-	disconnect(d->mGame, 0, this, 0);
+	disconnect(d->mGame, nullptr, this, nullptr);
  }
- d->mGame = 0;
+ d->mGame = nullptr;
 }
 
 void KGameErrorDialog::error(const TQString& errorText, TQWidget* parent)
@@ -116,7 +116,7 @@ void KGameErrorDialog::connectionError(TQString s)
 // should become the real dialog - currently we just use messageboxes 
 // -> maybe unused forever
 KGameErrorMessageDialog::KGameErrorMessageDialog(TQWidget* parent) 
-		: KDialogBase(Plain, i18n("Error"), Ok, Ok, parent, 0, true, true)
+		: KDialogBase(Plain, i18n("Error"), Ok, Ok, parent, nullptr, true, true)
 {
 }
 
diff --git a/libtdegames/kgame/dialogs/kgameerrordialog.h b/libtdegames/kgame/dialogs/kgameerrordialog.h
index c9b26863..73c5a447 100644
--- a/libtdegames/kgame/dialogs/kgameerrordialog.h
+++ b/libtdegames/kgame/dialogs/kgameerrordialog.h
@@ -88,7 +88,7 @@ public slots:
 	void slotUnsetKGame();
 
 protected:
-	void error(const TQString& errorText, TQWidget* parent = 0);
+	void error(const TQString& errorText, TQWidget* parent = nullptr);
 
 private:
 	KGameErrorDialogPrivate* d;
diff --git a/libtdegames/kgame/kgame.cpp b/libtdegames/kgame/kgame.cpp
index a3967cc3..ea1bd4b3 100644
--- a/libtdegames/kgame/kgame.cpp
+++ b/libtdegames/kgame/kgame.cpp
@@ -56,7 +56,7 @@ public:
     {
         mUniquePlayerNumber = 0;
         mPolicy=KGame::PolicyLocal;
-        mGameSequence = 0;
+        mGameSequence = nullptr;
     }
 
     int mUniquePlayerNumber;
@@ -204,7 +204,7 @@ bool KGame::loadgame(TQDataStream &stream, bool network,bool resetgame)
 
  if (gameSequence())
  {
-   gameSequence()->setCurrentPlayer(0);  // TODO !!!
+   gameSequence()->setCurrentPlayer(nullptr);  // TODO !!!
  }
  int newseed;
  stream >> newseed;
@@ -218,7 +218,7 @@ bool KGame::loadgame(TQDataStream &stream, bool network,bool resetgame)
  // to access the players
  dataHandler()->lockDirectEmit();
  KPlayer *player;
- for ( player=playerList()->first(); player != 0; player=playerList()->next() )
+ for ( player=playerList()->first(); player; player=playerList()->next() )
  {
    player->dataHandler()->lockDirectEmit();
    // kdDebug(11001) << "Player "<<player->id() << " to indirect emit" <<endl;
@@ -254,7 +254,7 @@ bool KGame::loadgame(TQDataStream &stream, bool network,bool resetgame)
  // Note we habe to have this external locking to prevent the games unlocking
  // to access the players
  dataHandler()->unlockDirectEmit();
- for ( player=playerList()->first(); player != 0; player=playerList()->next() )
+ for ( player=playerList()->first(); player; player=playerList()->next() )
  {
    player->dataHandler()->unlockDirectEmit();
    // kdDebug(11001) << "Player "<<player->id() << " to direct emit" <<endl;
@@ -340,7 +340,7 @@ void KGame::savePlayers(TQDataStream &stream, KGamePlayerList *list)
  kdDebug(11001) << "Saving KGame " << cnt << " KPlayer objects " << endl;
  stream << cnt;
  KPlayer *player;
- for ( player=list->first(); player != 0; player=list->next() )
+ for ( player=list->first(); player; player=list->next() )
  {
    savePlayer(stream,player);
  }
@@ -399,7 +399,7 @@ KPlayer * KGame::findPlayer(TQ_UINT32 id) const
      return it.current();
    }
  }
- return 0;
+ return nullptr;
 }
 
 // it is necessary that addPlayer and systemAddPlayer are called in the same
@@ -570,7 +570,7 @@ bool KGame::systemRemove(KPlayer* p,bool deleteit)
 
  emit signalPlayerLeftGame(p);
 
- p->setGame(0);
+ p->setGame(nullptr);
  if (deleteit)
  {
    delete p;
@@ -826,7 +826,7 @@ KPlayer *KGame::nextPlayer(KPlayer *last,bool exclusive)
  {
    return gameSequence()->nextPlayer(last, exclusive);
  }
- return 0;
+ return nullptr;
 }
 
 void KGame::setGameStatus(int status)
@@ -941,7 +941,7 @@ void KGame::networkTransmission(TQDataStream &stream, int msgid, TQ_UINT32 recei
      kdDebug(11001) << k_funcinfo << ": Got IdAddPlayer" << endl;
      if (sender!=gameId()  || policy()!=PolicyDirty)
      {
-       KPlayer *newplayer=0;
+       KPlayer *newplayer=nullptr;
        // We sent the message so the player is already available
        if (sender==gameId())
        {
@@ -1086,11 +1086,11 @@ void KGame::setupGameContinue(TQDataStream& stream, TQ_UINT32 sender)
     kdDebug(11001) << "  Still to deacticvate "
             << (int)(cnt+playerCount()-inactivateIds.count())-(int)maxPlayers() 
             << endl;
-    KPlayer *currentPlayer=0;
+    KPlayer *currentPlayer=nullptr;
     int currentPriority=0x7fff; // MAX_UINT (16bit?) to get the maximum of the list
     // find lowest network priority which is not yet in the newPlayerList
     // do this for the new players
-    for ( player=newPlayerList.first(); player != 0; player=newPlayerList.next() ) 
+    for ( player=newPlayerList.first(); player; player=newPlayerList.next() ) 
     {
       // Already in the list
       if (inactivateIds.find(player->id())!=inactivateIds.end()) 
@@ -1106,7 +1106,7 @@ void KGame::setupGameContinue(TQDataStream& stream, TQ_UINT32 sender)
 
     // find lowest network priority which is not yet in the newPlayerList
     // Do this for the network players
-    for ( player=d->mPlayerList.first(); player != 0; player=d->mPlayerList.next() ) 
+    for ( player=d->mPlayerList.first(); player; player=d->mPlayerList.next() ) 
     {
       // Already in the list
       if (inactivateIds.find(player->id())!=inactivateIds.end()) 
@@ -1169,7 +1169,7 @@ void KGame::setupGameContinue(TQDataStream& stream, TQ_UINT32 sender)
   }
 
   // Now send out the player list which the client can activate
-  for ( player=newPlayerList.first(); player != 0; player=newPlayerList.next() )
+  for ( player=newPlayerList.first(); player; player=newPlayerList.next() )
   {
     kdDebug(11001) << " newplayerlist contains " << player->id() << endl;
     // Only activate what is not in the list
@@ -1270,7 +1270,7 @@ void KGame::slotServerDisconnected() // Client side
   KGamePlayerList removeList;
   kdDebug(11001) << "Playerlist of client=" << d->mPlayerList.count() << " count" << endl;
   kdDebug(11001) << "Inactive Playerlist of client=" << d->mInactivePlayerList.count() << " count" << endl;
-  for ( player=d->mPlayerList.first(); player != 0; player=d->mPlayerList.next() ) 
+  for ( player=d->mPlayerList.first(); player; player=d->mPlayerList.next() ) 
   {
     // TODO: CHECK: id=0, could not connect to server in the first place??
     if (KGameMessage::rawGameId(player->id()) != gameId() && gameId()!=0)
@@ -1280,7 +1280,7 @@ void KGame::slotServerDisconnected() // Client side
     }
   }
 
-  for ( player=removeList.first(); player != 0; player=removeList.next() )
+  for ( player=removeList.first(); player; player=removeList.next() )
   {
     bool remove = true;
     emit signalReplacePlayerIO(player, &remove);
@@ -1295,7 +1295,7 @@ void KGame::slotServerDisconnected() // Client side
   kdDebug(11001) << " our game id is after setMaster " << gameId() << endl;
 
   KGamePlayerList mReList(d->mInactivePlayerList);
-  for ( player=mReList.first(); player != 0; player=mReList.next() )
+  for ( player=mReList.first(); player; player=mReList.next() )
   {
     // TODO ?check for priority? Sequence should be ok
     if ((int)playerCount()<maxPlayers() || maxPlayers()<0)
@@ -1305,7 +1305,7 @@ void KGame::slotServerDisconnected() // Client side
   }
   kdDebug(11001) << " Players activated player-cnt=" << playerCount() << endl;
 
-  for ( player=d->mPlayerList.first(); player != 0; player=d->mPlayerList.next() ) 
+  for ( player=d->mPlayerList.first(); player; player=d->mPlayerList.next() ) 
   {
     int oldid=player->id();
     d->mUniquePlayerNumber++;
@@ -1314,7 +1314,7 @@ void KGame::slotServerDisconnected() // Client side
   }
   // TODO clear inactive lists ?
   Debug();
-  for ( player=d->mPlayerList.first(); player != 0; player=d->mPlayerList.next() ) 
+  for ( player=d->mPlayerList.first(); player; player=d->mPlayerList.next() ) 
   {
     player->Debug();
   }
@@ -1331,7 +1331,7 @@ void KGame::slotClientDisconnected(TQ_UINT32 clientID,bool /*broken*/) // server
  KPlayer *player;
  KGamePlayerList removeList;
  kdDebug(11001) << "Playerlist of client=" << d->mPlayerList.count() << " count" << endl;
- for ( player=d->mPlayerList.first(); player != 0; player=d->mPlayerList.next() )
+ for ( player=d->mPlayerList.first(); player; player=d->mPlayerList.next() )
  {
    if (KGameMessage::rawGameId(player->id())==clientID)
    {
@@ -1340,7 +1340,7 @@ void KGame::slotClientDisconnected(TQ_UINT32 clientID,bool /*broken*/) // server
    }
  }
 
- for ( player=removeList.first(); player != 0; player=removeList.next() )
+ for ( player=removeList.first(); player; player=removeList.next() )
  {
    // try to replace the KGameIO first
    bool remove = true;
@@ -1401,7 +1401,7 @@ bool KGame::sendGroupMessage(const TQByteArray &msg, int msgid, TQ_UINT32 sender
 // AB: group must not be i18n'ed!! we should better use an id for group and use
 // a groupName() for the name // FIXME
  KPlayer *player;
- for ( player=d->mPlayerList.first(); player != 0; player=d->mPlayerList.next() )
+ for ( player=d->mPlayerList.first(); player; player=d->mPlayerList.next() )
  {
    if (player && player->group()==group)
    {
diff --git a/libtdegames/kgame/kgame.h b/libtdegames/kgame/kgame.h
index 238d4865..49520e00 100644
--- a/libtdegames/kgame/kgame.h
+++ b/libtdegames/kgame/kgame.h
@@ -101,7 +101,7 @@ public:
      * game in load/save and network operations. Change this between
      * games.
      */
-    KGame(int cookie=42,TQObject* parent=0);
+    KGame(int cookie=42,TQObject* parent=nullptr);
 
     /**
     * Destructs the game
@@ -767,7 +767,7 @@ protected:
     * @param list the optional list is the player list to be saved, default is playerList()
     *
     **/
-    void savePlayers(TQDataStream &stream,KGamePlayerList *list=0);
+    void savePlayers(TQDataStream &stream,KGamePlayerList *list=nullptr);
 
     /**
      * Prepare a player for being added. Put all data about a player into the
diff --git a/libtdegames/kgame/kgamechat.cpp b/libtdegames/kgame/kgamechat.cpp
index 650cf060..1bf715dd 100644
--- a/libtdegames/kgame/kgamechat.cpp
+++ b/libtdegames/kgame/kgamechat.cpp
@@ -40,8 +40,8 @@ class KGameChatPrivate
 public:
 	KGameChatPrivate()
 	{
-		mFromPlayer = 0;
-		mGame = 0;
+		mFromPlayer = nullptr;
+		mGame = nullptr;
 
 		mToMyGroup = -1;
 	}
@@ -70,7 +70,7 @@ KGameChat::KGameChat(KGame* g, int msgid, KPlayer* fromPlayer, TQWidget* parent)
 
 KGameChat::KGameChat(TQWidget* parent) : KChatBase(parent)
 {
- init(0, -1);
+ init(nullptr, -1);
 }
 
 KGameChat::~KGameChat()
@@ -200,7 +200,7 @@ void KGameChat::setFromPlayer(KPlayer* p)
  if (!p) {
 	kdError(11001) << k_funcinfo << ": NULL player" << endl;
 	removeSendingEntry(d->mToMyGroup);
-	d->mFromPlayer = 0;
+	d->mFromPlayer = nullptr;
 	return;
  }
  if (d->mFromPlayer) {
@@ -259,7 +259,7 @@ void KGameChat::slotUnsetKGame()
  if (!d->mGame) {
 	return;
  }
- disconnect(d->mGame, 0, this, 0);
+ disconnect(d->mGame, nullptr, this, nullptr);
  removeSendingEntry(d->mToMyGroup);
  TQMap<int, int>::Iterator it;
  for (it = d->mSendId2PlayerId.begin(); it != d->mSendId2PlayerId.end(); ++it) {
diff --git a/libtdegames/kgame/kgameio.cpp b/libtdegames/kgame/kgameio.cpp
index 13a19a81..aeeeba94 100644
--- a/libtdegames/kgame/kgameio.cpp
+++ b/libtdegames/kgame/kgameio.cpp
@@ -37,16 +37,16 @@
 #include <stdlib.h>
 
 // ----------------------- Generic IO -------------------------
-KGameIO::KGameIO() : TQObject(0,0)
+KGameIO::KGameIO() : TQObject(nullptr,nullptr)
 {
   kdDebug(11001) << k_funcinfo << ": this=" << this << ", sizeof(this)" << sizeof(KGameIO) << endl;
-  mPlayer = 0;
+  mPlayer = nullptr;
 }
 
-KGameIO::KGameIO(KPlayer* player) : TQObject(0,0)
+KGameIO::KGameIO(KPlayer* player) : TQObject(nullptr,nullptr)
 {
   kdDebug(11001) << k_funcinfo << ": this=" << this << ", sizeof(this)" << sizeof(KGameIO) << endl;
-  mPlayer = 0;
+  mPlayer = nullptr;
   if (player)
   {
     player->addGameIO(this);
@@ -92,7 +92,7 @@ KGame* KGameIO::game() const
 {
   if (!player())
   {
-    return 0;
+    return nullptr;
   }
   return player()->game();
 }
@@ -241,7 +241,7 @@ public:
   {
     //mMessageServer = 0;
     //mMessageClient = 0;
-    mProcessIO=0;
+    mProcessIO=nullptr;
   }
   //KMessageServer *mMessageServer;
   //KMessageClient *mMessageClient;
@@ -286,7 +286,7 @@ KGameProcessIO::~KGameProcessIO()
   if (d->mProcessIO)
   {
     delete d->mProcessIO;
-    d->mProcessIO=0;
+    d->mProcessIO=nullptr;
   }
   delete d;
 }
@@ -436,7 +436,7 @@ public:
 
     mPauseCounter = 0;
 
-    mAdvanceTimer = 0;
+    mAdvanceTimer = nullptr;
   }
   int mAdvanceCounter;
   int mReactionPeriod;
diff --git a/libtdegames/kgame/kgamenetwork.cpp b/libtdegames/kgame/kgamenetwork.cpp
index 94badd88..9061187c 100644
--- a/libtdegames/kgame/kgamenetwork.cpp
+++ b/libtdegames/kgame/kgamenetwork.cpp
@@ -41,10 +41,10 @@ class KGameNetworkPrivate
 public:
         KGameNetworkPrivate()
         {
-                mMessageClient = 0;
-                mMessageServer = 0;
+                mMessageClient = nullptr;
+                mMessageServer = nullptr;
                 mDisconnectId = 0;
-		mService = 0;
+		mService = nullptr;
         }
 
 public:
@@ -59,7 +59,7 @@ public:
 };
 
 // ------------------- NETWORK GAME ------------------------
-KGameNetwork::KGameNetwork(int c, TQObject* parent) : TQObject(parent, 0)
+KGameNetwork::KGameNetwork(int c, TQObject* parent) : TQObject(parent, nullptr)
 {
  d = new KGameNetworkPrivate;
  d->mCookie = (TQ_INT16)c;
@@ -99,7 +99,7 @@ int KGameNetwork::cookie() const
 { return d->mCookie; }
 
 bool KGameNetwork::isMaster() const
-{ return (d->mMessageServer != 0); }
+{ return (d->mMessageServer != nullptr); }
 
 bool KGameNetwork::isAdmin() const
 { return (d->mMessageClient->isAdmin()); }
@@ -224,7 +224,7 @@ bool KGameNetwork::connectToServer (const TQString& host, TQ_UINT16 port)
    stopServerConnection();
    d->mMessageClient->setServer((KMessageIO*)0);
    delete d->mMessageServer;
-   d->mMessageServer = 0;
+   d->mMessageServer = nullptr;
  }
 
  kdDebug(11001) << "    about to set server" << endl;
diff --git a/libtdegames/kgame/kgamenetwork.h b/libtdegames/kgame/kgamenetwork.h
index 0b7be6e8..a0c3786d 100644
--- a/libtdegames/kgame/kgamenetwork.h
+++ b/libtdegames/kgame/kgamenetwork.h
@@ -52,7 +52,7 @@ public:
     /**
      * Create a KGameNetwork object
      */
-    KGameNetwork(int cookie=42,TQObject* parent=0);
+    KGameNetwork(int cookie=42,TQObject* parent=nullptr);
     virtual ~KGameNetwork();
 
     /**
diff --git a/libtdegames/kgame/kgameprocess.cpp b/libtdegames/kgame/kgameprocess.cpp
index b0858e81..06a6a5c2 100644
--- a/libtdegames/kgame/kgameprocess.cpp
+++ b/libtdegames/kgame/kgameprocess.cpp
@@ -43,7 +43,7 @@
 
 // ----------------------- Process Child ---------------------------
 
-KGameProcess::KGameProcess() : TQObject(0,0)
+KGameProcess::KGameProcess() : TQObject(nullptr,nullptr)
 {
   mTerminate=false;
   // Check whether a player is set. If not create one!
diff --git a/libtdegames/kgame/kgameproperty.cpp b/libtdegames/kgame/kgameproperty.cpp
index ea7d19df..c87d843f 100644
--- a/libtdegames/kgame/kgameproperty.cpp
+++ b/libtdegames/kgame/kgameproperty.cpp
@@ -59,7 +59,7 @@ KGamePropertyBase::~KGamePropertyBase()
 
 void KGamePropertyBase::init()
 {
- mOwner = 0;
+ mOwner = nullptr;
  setDirty(false);
 
  // this is very useful and used by e.g. KGameDialog so
@@ -93,7 +93,7 @@ int KGamePropertyBase::registerData(int id, KGamePropertyHandler* owner,Property
 // we don't support changing the id
  if (!owner) {
 	kdWarning(11001) << k_funcinfo << "Resetting owner=0. Sure you want to do this?" << endl;
-	mOwner=0;
+	mOwner=nullptr;
 	return -1;
  }
  if (!mOwner) {
@@ -118,7 +118,7 @@ void KGamePropertyBase::unregisterData()
 	return;
  }
  mOwner->removeProperty(this);
- mOwner = 0;
+ mOwner = nullptr;
 }
 
 bool KGamePropertyBase::sendProperty()
diff --git a/libtdegames/kgame/kgameproperty.h b/libtdegames/kgame/kgameproperty.h
index 76d389ac..63ce6904 100644
--- a/libtdegames/kgame/kgameproperty.h
+++ b/libtdegames/kgame/kgameproperty.h
@@ -261,25 +261,25 @@ public:
 	 * @param name if not 0 you can assign a name to this property
 	 *
 	 **/
-	int registerData(int id, KGamePropertyHandler* owner,PropertyPolicy p, TQString name=0);
+	int registerData(int id, KGamePropertyHandler* owner,PropertyPolicy p, TQString name=nullptr);
 
 	/** 
 	 * This is an overloaded member function, provided for convenience.
 	 * It differs from the above function only in what argument(s) it accepts.
 	 **/
-	int registerData(int id, KGamePropertyHandler* owner, TQString name=0);
+	int registerData(int id, KGamePropertyHandler* owner, TQString name=nullptr);
 
 	/** 
 	 * This is an overloaded member function, provided for convenience.
 	 * It differs from the above function only in what argument(s) it accepts.
 	 **/
-	int registerData(int id, KGame* owner, TQString name=0);
+	int registerData(int id, KGame* owner, TQString name=nullptr);
 
 	/** 
 	 * This is an overloaded member function, provided for convenience.
 	 * It differs from the above function only in what argument(s) it accepts.
 	 **/
-	int registerData(int id, KPlayer* owner, TQString name=0);
+	int registerData(int id, KPlayer* owner, TQString name=nullptr);
 
 	/** 
 	 * This is an overloaded member function, provided for convenience.
@@ -287,7 +287,7 @@ public:
 	 * In particular you can use this function to create properties which
 	 * will have an automatic id assigned. The new id is returned.
 	 **/
-	int registerData(KGamePropertyHandler* owner,PropertyPolicy p=PolicyUndefined, TQString name=0);
+	int registerData(KGamePropertyHandler* owner,PropertyPolicy p=PolicyUndefined, TQString name=nullptr);
 
 	void unregisterData();
 
diff --git a/libtdegames/kgame/kgamepropertyhandler.cpp b/libtdegames/kgame/kgamepropertyhandler.cpp
index 0cd02fbf..483a61f9 100644
--- a/libtdegames/kgame/kgamepropertyhandler.cpp
+++ b/libtdegames/kgame/kgamepropertyhandler.cpp
@@ -292,7 +292,7 @@ void KGamePropertyHandler::unlockDirectEmit()
   if (d->mIndirectEmit<=0)
   {
     KGamePropertyBase *prop;
-    while((prop=d->mSignalQueue.dequeue()) != 0)
+    while((prop=d->mSignalQueue.dequeue()) != nullptr)
     {
       // kdDebug(11001) << "emmiting signal for " << prop->id() << endl;
       emit signalPropertyChanged(prop);
diff --git a/libtdegames/kgame/kgamepropertyhandler.h b/libtdegames/kgame/kgamepropertyhandler.h
index 2ad1d705..f496cd43 100644
--- a/libtdegames/kgame/kgamepropertyhandler.h
+++ b/libtdegames/kgame/kgamepropertyhandler.h
@@ -81,14 +81,14 @@ public:
 	 * You have to call registerHandler before you can use this
 	 * handler!
 	 **/
-	KGamePropertyHandler(TQObject* parent = 0);
+	KGamePropertyHandler(TQObject* parent = nullptr);
 
 	/**
 	 * Construct a registered handler. 
 	 *
 	 * @see registerHandler
 	 **/
-	KGamePropertyHandler(int id, const TQObject* receiver, const char* sendf, const char* emitf, TQObject* parent = 0);
+	KGamePropertyHandler(int id, const TQObject* receiver, const char* sendf, const char* emitf, TQObject* parent = nullptr);
 	~KGamePropertyHandler();
 
 	/**
@@ -133,7 +133,7 @@ public:
 	 * propertyName. This is used for debugging, e.g. in KGameDebugDialog
 	 * @return true on success
 	 **/
-	bool addProperty(KGamePropertyBase *data, TQString name=0);
+	bool addProperty(KGamePropertyBase *data, TQString name=nullptr);
 
 	/**
 	 * Removes a property from the handler
diff --git a/libtdegames/kgame/kgamesequence.cpp b/libtdegames/kgame/kgamesequence.cpp
index 33e2f6ee..9237e1a8 100644
--- a/libtdegames/kgame/kgamesequence.cpp
+++ b/libtdegames/kgame/kgamesequence.cpp
@@ -29,8 +29,8 @@
 
 KGameSequence::KGameSequence() : TQObject()
 {
- mGame = 0;
- mCurrentPlayer = 0;
+ mGame = nullptr;
+ mCurrentPlayer = nullptr;
 }
 
 KGameSequence::~KGameSequence()
@@ -53,7 +53,7 @@ KPlayer *KGameSequence::nextPlayer(KPlayer *last,bool exclusive)
  if (!game())
  {
    kdError() << k_funcinfo << "NULL game object" << endl;
-   return 0;
+   return nullptr;
  }
  unsigned int minId,nextId,lastId;
  KPlayer *nextplayer, *minplayer;
@@ -71,11 +71,11 @@ KPlayer *KGameSequence::nextPlayer(KPlayer *last,bool exclusive)
  // remove when this has been checked
  minId = 0x7fff;  // we just need a very large number...properly MAX_UINT or so would be ok...
  nextId = minId;
- nextplayer = 0;
- minplayer = 0;
+ nextplayer = nullptr;
+ minplayer = nullptr;
 
  KPlayer *player;
- for (player = game()->playerList()->first(); player != 0; player=game()->playerList()->next() )
+ for (player = game()->playerList()->first(); player; player=game()->playerList()->next() )
  {
    // Find the first player for a cycle
    if (player->id() < minId)
@@ -110,7 +110,7 @@ KPlayer *KGameSequence::nextPlayer(KPlayer *last,bool exclusive)
  }
  else
  {
-   return 0;
+   return nullptr;
  }
  return nextplayer;
 }
diff --git a/libtdegames/kgame/kmessageclient.cpp b/libtdegames/kgame/kmessageclient.cpp
index 01cc7175..cca3317e 100644
--- a/libtdegames/kgame/kmessageclient.cpp
+++ b/libtdegames/kgame/kmessageclient.cpp
@@ -32,7 +32,7 @@ class KMessageClientPrivate
 {
 public:
   KMessageClientPrivate ()
-    : adminID (0), connection (0)
+    : adminID (0), connection (nullptr)
   {}
 
   ~KMessageClientPrivate ()
@@ -333,7 +333,7 @@ void KMessageClient::removeBrokenConnection2 ()
 
   emit aboutToDisconnect(id());
   delete d->connection;
-  d->connection = 0;
+  d->connection = nullptr;
   d->adminID = 0;
   emit connectionBroken();
   kdDebug (11001) << k_funcinfo << ": Broken:Deleting the connection object DONE" << endl;
@@ -345,7 +345,7 @@ void KMessageClient::disconnect ()
 
   emit aboutToDisconnect(id());
   delete d->connection;
-  d->connection = 0;
+  d->connection = nullptr;
   d->adminID = 0;
   emit connectionBroken();
   kdDebug (11001) << k_funcinfo << ": Disconnect:Deleting the connection object DONE" << endl;
diff --git a/libtdegames/kgame/kmessageclient.h b/libtdegames/kgame/kmessageclient.h
index c08b05e4..365cae75 100644
--- a/libtdegames/kgame/kmessageclient.h
+++ b/libtdegames/kgame/kmessageclient.h
@@ -59,7 +59,7 @@ public:
     Creates an unconnected KMessageClient object. Use setServer() later to connect to a
     KMessageServer object.
   */
-  KMessageClient (TQObject *parent = 0, const char *name = 0);
+  KMessageClient (TQObject *parent = nullptr, const char *name = nullptr);
 
   /**
     Destructor.
diff --git a/libtdegames/kgame/kmessageio.cpp b/libtdegames/kgame/kmessageio.cpp
index f04bdad8..0e40f905 100644
--- a/libtdegames/kgame/kmessageio.cpp
+++ b/libtdegames/kgame/kmessageio.cpp
@@ -179,7 +179,7 @@ TQString KMessageSocket::peerName () const
 
 KMessageDirect::KMessageDirect (KMessageDirect *partner, TQObject *parent, 
 const char *name)
-  : KMessageIO (parent, name), mPartner (0)
+  : KMessageIO (parent, name), mPartner (nullptr)
 {
   // 0 as first parameter leaves the object unconnected
   if (!partner)
@@ -203,14 +203,14 @@ KMessageDirect::~KMessageDirect ()
 {
   if (mPartner)
   {
-    mPartner->mPartner = 0;
+    mPartner->mPartner = nullptr;
     emit mPartner->connectionBroken();
   }
 }
 
 bool KMessageDirect::isConnected () const
 {
-  return mPartner != 0;
+  return mPartner != nullptr;
 }
 
 void KMessageDirect::send (const TQByteArray &msg)
@@ -231,14 +231,14 @@ KMessageProcess::~KMessageProcess()
   {
     mProcess->kill();
     delete mProcess;
-    mProcess=0;
+    mProcess=nullptr;
     // Remove not send buffers
     mQueue.setAutoDelete(true);
     mQueue.clear();
     // Maybe todo: delete mSendBuffer
   }
 }
-KMessageProcess::KMessageProcess(TQObject *parent, TQString file) : KMessageIO(parent,0)
+KMessageProcess::KMessageProcess(TQObject *parent, TQString file) : KMessageIO(parent,nullptr)
 {
   // Start process
   kdDebug(11001) << "@@@KMessageProcess::Start process" << endl;
@@ -257,7 +257,7 @@ KMessageProcess::KMessageProcess(TQObject *parent, TQString file) : KMessageIO(p
   connect(mProcess, TQ_SIGNAL(wroteStdin(TDEProcess *)),
                         this, TQ_SLOT(slotWroteStdin(TDEProcess *)));
   mProcess->start(TDEProcess::NotifyOnExit,TDEProcess::All);
-  mSendBuffer=0;
+  mSendBuffer=nullptr;
   mReceiveCount=0;
   mReceiveBuffer.resize(1024);
 }
@@ -306,7 +306,7 @@ void KMessageProcess::slotWroteStdin(TDEProcess * )
   if (mSendBuffer)
   {
     delete mSendBuffer;
-    mSendBuffer=0;
+    mSendBuffer=nullptr;
   }
   writeToProcess();
 }
@@ -392,12 +392,12 @@ void KMessageProcess::slotProcessExited(TDEProcess * /*p*/)
   kdDebug(11001) << "Process exited (slot)" << endl;
   emit connectionBroken();
   delete mProcess;
-  mProcess=0;
+  mProcess=nullptr;
 }
 
 
 // ----------------------- KMessageFilePipe ---------------------------
-KMessageFilePipe::KMessageFilePipe(TQObject *parent,TQFile *readfile,TQFile *writefile) : KMessageIO(parent,0)
+KMessageFilePipe::KMessageFilePipe(TQObject *parent,TQFile *readfile,TQFile *writefile) : KMessageIO(parent,nullptr)
 {
   mReadFile=readfile;
   mWriteFile=writefile;
@@ -411,7 +411,7 @@ KMessageFilePipe::~KMessageFilePipe()
 
 bool KMessageFilePipe::isConnected () const
 {
-  return (mReadFile!=0)&&(mWriteFile!=0);
+  return (mReadFile!=nullptr)&&(mWriteFile!=nullptr);
 }
 
 void KMessageFilePipe::send(const TQByteArray &msg)
diff --git a/libtdegames/kgame/kmessageio.h b/libtdegames/kgame/kmessageio.h
index 42acaf41..49097774 100644
--- a/libtdegames/kgame/kmessageio.h
+++ b/libtdegames/kgame/kmessageio.h
@@ -62,7 +62,7 @@ public:
   /**
    * The usual TQObject constructor, does nothing else.
    **/
-  KMessageIO (TQObject *parent = 0, const char *name = 0);
+  KMessageIO (TQObject *parent = nullptr, const char *name = nullptr);
 
   /**
    * The usual destructor, does nothing special.
@@ -183,8 +183,8 @@ public:
     If the connection could not be established (e.g. unknown host or no server
     socket at this port), the signal /e connectionBroken is emitted.
   */
-  KMessageSocket (TQString host, TQ_UINT16 port, TQObject *parent = 0,
-                  const char *name = 0);
+  KMessageSocket (TQString host, TQ_UINT16 port, TQObject *parent = nullptr,
+                  const char *name = nullptr);
 
   /**
     Connects to a server socket on /e host with /e port. You can immediately
@@ -194,8 +194,8 @@ public:
     If the connection could not be established (e.g. unknown host or no server
     socket at this port), the signal /e connectionBroken is emitted.
   */
-  KMessageSocket (TQHostAddress host, TQ_UINT16 port, TQObject *parent = 0,
-                  const char *name = 0);
+  KMessageSocket (TQHostAddress host, TQ_UINT16 port, TQObject *parent = nullptr,
+                  const char *name = nullptr);
 
   /**
     Uses /e socket to do the communication.
@@ -208,7 +208,7 @@ public:
     together with this KMessageSocket object. (Use 0 as parent for the TQSocket
     object t ensure it is not deleted.)
   */
-  KMessageSocket (TQSocket *socket, TQObject *parent = 0, const char *name = 0);
+  KMessageSocket (TQSocket *socket, TQObject *parent = nullptr, const char *name = nullptr);
 
   /**
     Uses the socket specified by the socket descriptor socketFD to do the
@@ -221,7 +221,7 @@ public:
     manipulate the socket afterwards, especially don't close it. The socket is
     automatically closed when KMessageSocket is deleted.
   */
-  KMessageSocket (int socketFD, TQObject *parent = 0, const char *name = 0);
+  KMessageSocket (int socketFD, TQObject *parent = nullptr, const char *name = nullptr);
 
   /**
     Destructor, closes the socket.
@@ -307,8 +307,8 @@ public:
 
     If that object is already connected, the object remains unconnected.
   */
-  KMessageDirect (KMessageDirect *partner = 0, TQObject *parent = 0, const char
-*name = 0);
+  KMessageDirect (KMessageDirect *partner = nullptr, TQObject *parent = nullptr, const char
+*name = nullptr);
 
   /**
     Destructor, closes the connection.
diff --git a/libtdegames/kgame/kmessageserver.cpp b/libtdegames/kgame/kmessageserver.cpp
index f74628cb..2bcd4132 100644
--- a/libtdegames/kgame/kmessageserver.cpp
+++ b/libtdegames/kgame/kmessageserver.cpp
@@ -63,7 +63,7 @@ class KMessageServerPrivate
 {
 public:
   KMessageServerPrivate()
-    : mMaxClients (-1), mGameId (1), mUniqueClientNumber (1), mAdminID (0), mServerSocket (0)
+    : mMaxClients (-1), mGameId (1), mUniqueClientNumber (1), mAdminID (0), mServerSocket (nullptr)
   {
     mClientList.setAutoDelete (true);
     mMessageQueue.setAutoDelete (true);
@@ -87,7 +87,7 @@ public:
 // ------------------ KMessageServer
 
 KMessageServer::KMessageServer (TQ_UINT16 cookie,TQObject* parent)
-  : TQObject(parent, 0)
+  : TQObject(parent, nullptr)
 {
   d = new KMessageServerPrivate;
   d->mIsRecursive=false;
@@ -132,7 +132,7 @@ bool KMessageServer::initNetwork (TQ_UINT16 port)
   {
     kdError(11001) << k_funcinfo << ": Serversocket::ok() == false" << endl;
     delete d->mServerSocket;
-    d->mServerSocket=0;
+    d->mServerSocket=nullptr;
     return false;
   }
 
@@ -156,13 +156,13 @@ void KMessageServer::stopNetwork()
   if (d->mServerSocket) 
   {
     delete d->mServerSocket;
-    d->mServerSocket = 0;
+    d->mServerSocket = nullptr;
   }
 }
 
 bool KMessageServer::isOfferingConnections() const
 {
-  return d->mServerSocket != 0;
+  return d->mServerSocket != nullptr;
 }
 
 //----------------------------------------------- adding / removing clients
@@ -300,7 +300,7 @@ KMessageIO* KMessageServer::findClient (TQ_UINT32 no) const
       return (*iter);
     ++iter;
   }
-  return 0;
+  return nullptr;
 }
 
 TQ_UINT32 KMessageServer::adminID () const
@@ -314,7 +314,7 @@ void KMessageServer::setAdmin (TQ_UINT32 adminID)
   if (adminID == d->mAdminID)
     return;
 
-  if (adminID > 0 && findClient (adminID) == 0)
+  if (adminID > 0 && !findClient(adminID))
   {
     kdWarning (11001) << "Trying to set a new admin that doesn't exist!" << endl;
     return;
diff --git a/libtdegames/kgame/kmessageserver.h b/libtdegames/kgame/kmessageserver.h
index 93f0e4f2..c52b0176 100644
--- a/libtdegames/kgame/kmessageserver.h
+++ b/libtdegames/kgame/kmessageserver.h
@@ -209,7 +209,7 @@ public:
     /**
      * Create a KGameNetwork object
      **/
-    KMessageServer(TQ_UINT16 cookie = 42, TQObject* parent = 0);
+    KMessageServer(TQ_UINT16 cookie = 42, TQObject* parent = nullptr);
 
     ~KMessageServer();
 
@@ -480,7 +480,7 @@ class KMessageServerSocket : public TQServerSocket
   
 
 public:
-  KMessageServerSocket (TQ_UINT16 port, TQObject *parent = 0);
+  KMessageServerSocket (TQ_UINT16 port, TQObject *parent = nullptr);
   ~KMessageServerSocket ();
 
   void newConnection (int socket);
diff --git a/libtdegames/kgame/kplayer.cpp b/libtdegames/kgame/kplayer.cpp
index 4e815b81..d8665177 100644
--- a/libtdegames/kgame/kplayer.cpp
+++ b/libtdegames/kgame/kplayer.cpp
@@ -43,7 +43,7 @@ class KPlayerPrivate
 public:
    KPlayerPrivate()
    {
-      mNetworkPlayer = 0;
+      mNetworkPlayer = nullptr;
    }
 
    TQ_UINT32 mId;
@@ -59,12 +59,12 @@ public:
    KGamePropertyTQString mGroup;
 };
 
-KPlayer::KPlayer() : TQObject(0,0)
+KPlayer::KPlayer() : TQObject(nullptr,nullptr)
 {
  init();
 }
 
-KPlayer::KPlayer(KGame* game) : TQObject(0, 0)
+KPlayer::KPlayer(KGame* game) : TQObject(nullptr, nullptr)
 {
  init();
  game->addPlayer(this);
@@ -82,7 +82,7 @@ void KPlayer::init()
                                        TQ_SLOT(emitSignal(KGamePropertyBase *)));
    d->mVirtual=false;
    mActive=true;
-   mGame=0;
+   mGame=nullptr;
    d->mId=0; // "0" is always an invalid ID!
    d->mPriority=0;
    // I guess we cannot translate the group otherwise no
@@ -249,7 +249,7 @@ bool KPlayer::removeGameIO(KGameIO *targetinput,bool deleteit)
     }
     else
     {
-      targetinput->setPlayer(0);
+      targetinput->setPlayer(nullptr);
       result=mInputList.remove(targetinput);
     }
   }
@@ -267,7 +267,7 @@ KGameIO * KPlayer::findRttiIO(int rtti) const
     }
     ++it;
   }
-  return 0;
+  return nullptr;
 }
 
 int KPlayer::calcIOValue()
@@ -295,7 +295,7 @@ bool KPlayer::setTurn(bool b, bool exclusive)
   {
      KPlayer *player;
      KGame::KGamePlayerList *list=game()->playerList();
-     for ( player=list->first(); player != 0; player=list->next() )
+     for ( player=list->first(); player; player=list->next() )
      {
        if (player==this)
        {
diff --git a/libtdegames/kgame/kplayer.h b/libtdegames/kgame/kplayer.h
index 54aa7919..05775259 100644
--- a/libtdegames/kgame/kplayer.h
+++ b/libtdegames/kgame/kplayer.h
@@ -301,7 +301,7 @@ public:
        * @param deleteit true (default) to delete the device otherwisse just remove it
        * @return true on ok
        */
-      bool removeGameIO(KGameIO *input=0,bool deleteit=true);
+      bool removeGameIO(KGameIO *input=nullptr,bool deleteit=true);
 
       /**
        * Finds the KGameIO devies with the given rtti code.
@@ -319,7 +319,7 @@ public:
        * @param rtti the rtti typed to be checked for
        * @return true if it exists
        */
-      bool hasRtti(int rtti) const  {return findRttiIO(rtti)!=0;}
+      bool hasRtti(int rtti) const  {return findRttiIO(rtti)!=nullptr;}
 
       // Message exchange
       /**
diff --git a/libtdegames/kgamelcd.cpp b/libtdegames/kgamelcd.cpp
index 86314cc1..03e08b0b 100644
--- a/libtdegames/kgamelcd.cpp
+++ b/libtdegames/kgamelcd.cpp
@@ -229,7 +229,7 @@ void KGameLCDList::append(TQLCDNumber *lcd)
 void KGameLCDList::append(const TQString &leading, TQLCDNumber *lcd)
 {
     uint i = size();
-    TQLabel *label = 0;
+    TQLabel *label = nullptr;
     if ( !leading.isEmpty() ) {
       label = new TQLabel(leading, this);
       static_cast<TQGridLayout *>(layout())->addWidget(label, i+1, 0);
diff --git a/libtdegames/kgamelcd.h b/libtdegames/kgamelcd.h
index 309c3ee6..69becd0f 100644
--- a/libtdegames/kgamelcd.h
+++ b/libtdegames/kgamelcd.h
@@ -44,7 +44,7 @@ class TDE_EXPORT KGameLCD : public TQLCDNumber
     TQ_OBJECT
   
 public:
-    KGameLCD(uint nbDigits, TQWidget *parent = 0, const char *name = 0);
+    KGameLCD(uint nbDigits, TQWidget *parent = nullptr, const char *name = nullptr);
 
     ~KGameLCD();
 
@@ -129,7 +129,7 @@ class TDE_EXPORT KGameLCDClock : public KGameLCD
     TQ_OBJECT
   
 public:
-    KGameLCDClock(TQWidget *parent = 0, const char *name = 0);
+    KGameLCDClock(TQWidget *parent = nullptr, const char *name = nullptr);
 
     ~KGameLCDClock();
 
@@ -202,8 +202,8 @@ public:
      * @param name passed to the TQWidget constructor
      */
     KGameLCDList(const TQString &title,
-                 TQWidget *parent = 0, const char *name = 0);
-    KGameLCDList(TQWidget *parent = 0, const char *name = 0);
+                 TQWidget *parent = nullptr, const char *name = nullptr);
+    KGameLCDList(TQWidget *parent = nullptr, const char *name = nullptr);
 
     ~KGameLCDList();
 
diff --git a/libtdegames/kgameprogress.cpp b/libtdegames/kgameprogress.cpp
index 7002ee8d..2f8bf1fb 100644
--- a/libtdegames/kgameprogress.cpp
+++ b/libtdegames/kgameprogress.cpp
@@ -68,7 +68,7 @@ void KGameProgress::initialize()
 {
 	format_ = "%p%";
 	use_supplied_bar_color = false;
-	bar_pixmap = 0;
+	bar_pixmap = nullptr;
 	bar_style = Solid;
 	text_enabled = true;
 	setBackgroundMode( PaletteBackground );
@@ -106,7 +106,7 @@ void KGameProgress::setBarColor(const TQColor &color)
 	use_supplied_bar_color = true;
 	if (bar_pixmap) {
 		delete bar_pixmap;
-		bar_pixmap = 0;
+		bar_pixmap = nullptr;
 	}
 }
 
diff --git a/libtdegames/kgameprogress.h b/libtdegames/kgameprogress.h
index 557d1173..7111230f 100644
--- a/libtdegames/kgameprogress.h
+++ b/libtdegames/kgameprogress.h
@@ -71,18 +71,18 @@ public:
   /**
    * Construct a horizontal progress bar.
    */
-  KGameProgress(TQWidget *parent=0, const char *name=0);
+  KGameProgress(TQWidget *parent=nullptr, const char *name=nullptr);
 
   /**
    * Construct a progress bar with orientation @p orient.
    */
-  KGameProgress(Orientation orient, TQWidget *parent=0, const char *name=0);
+  KGameProgress(Orientation orient, TQWidget *parent=nullptr, const char *name=nullptr);
 
   /**
    * Construct a progress bar with minimum, maximum and initial values.
    */
   KGameProgress(int minValue, int maxValue, int value, Orientation,
-                TQWidget *parent=0, const char *name=0);
+                TQWidget *parent=nullptr, const char *name=nullptr);
 
   /**
    * Destruct the progress bar.
diff --git a/libtdegames/kstdgameaction.cpp b/libtdegames/kstdgameaction.cpp
index a2e7e906..7ffb4bf2 100644
--- a/libtdegames/kstdgameaction.cpp
+++ b/libtdegames/kstdgameaction.cpp
@@ -57,32 +57,32 @@ struct KStdGameActionInfo
 
 const KStdGameActionInfo g_rgActionInfo[] = {
 // "game" menu
-    { KStdGameAction::New, TDEStdAccel::New, 0, "game_new", I18N_NOOP2("new game", "&New"), 0, "document-new" },
-    { KStdGameAction::Load, TDEStdAccel::Open, 0, "game_load", I18N_NOOP("&Load..."), 0, "document-open" },
-    { KStdGameAction::LoadRecent, TDEStdAccel::AccelNone, 0, "game_load_recent", I18N_NOOP("Load &Recent"), 0, 0 },
-    { KStdGameAction::Restart, TDEStdAccel::Reload, 0, "game_restart", I18N_NOOP("Restart &Game"), 0, "reload" },
-    { KStdGameAction::Save, TDEStdAccel::Save, 0, "game_save", I18N_NOOP("&Save"), 0, "document-save" },
-    { KStdGameAction::SaveAs, TDEStdAccel::AccelNone, 0, "game_save_as", I18N_NOOP("Save &As..."), 0, "document-save-as" },
-    { KStdGameAction::End, TDEStdAccel::End, 0, "game_end", I18N_NOOP("&End Game"), 0, "window-close" },
-    { KStdGameAction::Pause, TDEStdAccel::AccelNone, TQt::Key_P, "game_pause", I18N_NOOP("Pa&use"), 0, "media-playback-pause" },
-    { KStdGameAction::Highscores, TDEStdAccel::AccelNone, TQt::CTRL+TQt::Key_H, "game_highscores", I18N_NOOP("Show &Highscores"), 0, "highscore" },
-    { KStdGameAction::Print, TDEStdAccel::Print, 0, "game_print", I18N_NOOP("&Print..."), 0, "document-print" },
-    { KStdGameAction::Quit, TDEStdAccel::Quit, 0, "game_quit", I18N_NOOP("&Quit"), 0, "application-exit" },
+    { KStdGameAction::New, TDEStdAccel::New, 0, "game_new", I18N_NOOP2("new game", "&New"), nullptr, "document-new" },
+    { KStdGameAction::Load, TDEStdAccel::Open, 0, "game_load", I18N_NOOP("&Load..."), nullptr, "document-open" },
+    { KStdGameAction::LoadRecent, TDEStdAccel::AccelNone, 0, "game_load_recent", I18N_NOOP("Load &Recent"), nullptr, nullptr },
+    { KStdGameAction::Restart, TDEStdAccel::Reload, 0, "game_restart", I18N_NOOP("Restart &Game"), nullptr, "reload" },
+    { KStdGameAction::Save, TDEStdAccel::Save, 0, "game_save", I18N_NOOP("&Save"), nullptr, "document-save" },
+    { KStdGameAction::SaveAs, TDEStdAccel::AccelNone, 0, "game_save_as", I18N_NOOP("Save &As..."), nullptr, "document-save-as" },
+    { KStdGameAction::End, TDEStdAccel::End, 0, "game_end", I18N_NOOP("&End Game"), nullptr, "window-close" },
+    { KStdGameAction::Pause, TDEStdAccel::AccelNone, TQt::Key_P, "game_pause", I18N_NOOP("Pa&use"), nullptr, "media-playback-pause" },
+    { KStdGameAction::Highscores, TDEStdAccel::AccelNone, TQt::CTRL+TQt::Key_H, "game_highscores", I18N_NOOP("Show &Highscores"), nullptr, "highscore" },
+    { KStdGameAction::Print, TDEStdAccel::Print, 0, "game_print", I18N_NOOP("&Print..."), nullptr, "document-print" },
+    { KStdGameAction::Quit, TDEStdAccel::Quit, 0, "game_quit", I18N_NOOP("&Quit"), nullptr, "application-exit" },
 // "move" menu
-    { KStdGameAction::Repeat, TDEStdAccel::AccelNone, 0, "move_repeat", I18N_NOOP("Repeat"), 0, 0 },
-    { KStdGameAction::Undo, TDEStdAccel::Undo, 0, "move_undo", I18N_NOOP("Und&o"), 0, "edit-undo" },
-    { KStdGameAction::Redo, TDEStdAccel::Redo, 0, "move_redo", I18N_NOOP("Re&do"), 0, "edit-redo" },
-    { KStdGameAction::Roll, TDEStdAccel::AccelNone, TQt::CTRL+TQt::Key_R, "move_roll", I18N_NOOP("&Roll Dice"), 0, "roll" },
-    { KStdGameAction::EndTurn, TDEStdAccel::AccelNone, 0, "move_end_turn", I18N_NOOP("End Turn"), 0, "endturn" },
-    { KStdGameAction::Hint, TDEStdAccel::AccelNone, TQt::Key_H, "move_hint", I18N_NOOP("&Hint"), 0, "idea" },
-    { KStdGameAction::Demo, TDEStdAccel::AccelNone, TQt::Key_D, "move_demo", I18N_NOOP("&Demo"), 0, "1rightarrow" },
-    { KStdGameAction::Solve, TDEStdAccel::AccelNone, 0, "move_solve", I18N_NOOP("&Solve"), 0, "wizard" },
+    { KStdGameAction::Repeat, TDEStdAccel::AccelNone, 0, "move_repeat", I18N_NOOP("Repeat"), nullptr, nullptr },
+    { KStdGameAction::Undo, TDEStdAccel::Undo, 0, "move_undo", I18N_NOOP("Und&o"), nullptr, "edit-undo" },
+    { KStdGameAction::Redo, TDEStdAccel::Redo, 0, "move_redo", I18N_NOOP("Re&do"), nullptr, "edit-redo" },
+    { KStdGameAction::Roll, TDEStdAccel::AccelNone, TQt::CTRL+TQt::Key_R, "move_roll", I18N_NOOP("&Roll Dice"), nullptr, "roll" },
+    { KStdGameAction::EndTurn, TDEStdAccel::AccelNone, 0, "move_end_turn", I18N_NOOP("End Turn"), nullptr, "endturn" },
+    { KStdGameAction::Hint, TDEStdAccel::AccelNone, TQt::Key_H, "move_hint", I18N_NOOP("&Hint"), nullptr, "idea" },
+    { KStdGameAction::Demo, TDEStdAccel::AccelNone, TQt::Key_D, "move_demo", I18N_NOOP("&Demo"), nullptr, "1rightarrow" },
+    { KStdGameAction::Solve, TDEStdAccel::AccelNone, 0, "move_solve", I18N_NOOP("&Solve"), nullptr, "wizard" },
 // "settings" menu
-    { KStdGameAction::ChooseGameType, TDEStdAccel::AccelNone, 0, "options_choose_game_type", I18N_NOOP("Choose Game &Type"), 0, 0 },
-    { KStdGameAction::Carddecks, TDEStdAccel::AccelNone, 0, "options_configure_carddecks", I18N_NOOP("Configure &Carddecks..."), 0, 0 },
-    { KStdGameAction::ConfigureHighscores, TDEStdAccel::AccelNone, 0, "options_configure_highscores", I18N_NOOP("Configure &Highscores..."), 0, 0 },
+    { KStdGameAction::ChooseGameType, TDEStdAccel::AccelNone, 0, "options_choose_game_type", I18N_NOOP("Choose Game &Type"), nullptr, nullptr },
+    { KStdGameAction::Carddecks, TDEStdAccel::AccelNone, 0, "options_configure_carddecks", I18N_NOOP("Configure &Carddecks..."), nullptr, nullptr },
+    { KStdGameAction::ConfigureHighscores, TDEStdAccel::AccelNone, 0, "options_configure_highscores", I18N_NOOP("Configure &Highscores..."), nullptr, nullptr },
 
-    { KStdGameAction::ActionNone, TDEStdAccel::AccelNone, 0, 0, 0, 0, 0 }
+    { KStdGameAction::ActionNone, TDEStdAccel::AccelNone, 0, nullptr, nullptr, nullptr, nullptr }
 };
 
 static const KStdGameActionInfo* infoPtr( KStdGameAction::StdGameAction id )
@@ -91,7 +91,7 @@ static const KStdGameActionInfo* infoPtr( KStdGameAction::StdGameAction id )
 		if( g_rgActionInfo[i].id == id )
 			return &g_rgActionInfo[i];
 	}
-	return 0;
+	return nullptr;
 }
 
 
@@ -99,7 +99,7 @@ TDEAction* KStdGameAction::create(StdGameAction id, const char *name,
                                 const TQObject *recvr, const char *slot,
                                 TDEActionCollection* parent )
 {
-	TDEAction* pAction = 0;
+	TDEAction* pAction = nullptr;
 	const KStdGameActionInfo* pInfo = infoPtr( id );
 	kdDebug(125) << "KStdGameAction::create( " << id << "=" << (pInfo ? pInfo->psName : (const char*)0) << ", " << parent << ", " << name << " )" << endl;
 	if( pInfo ) {
@@ -134,7 +134,7 @@ TDEAction* KStdGameAction::create(StdGameAction id, const char *name,
 const char* KStdGameAction::name( StdGameAction id )
 {
 	const KStdGameActionInfo* pInfo = infoPtr( id );
-	return (pInfo) ? pInfo->psName : 0;
+	return (pInfo) ? pInfo->psName : nullptr;
 }
 
 TDEAction *KStdGameAction::gameNew(const TQObject *recvr, const char *slot,
diff --git a/libtdegames/kstdgameaction.h b/libtdegames/kstdgameaction.h
index 53a099df..d6a5b4a2 100644
--- a/libtdegames/kstdgameaction.h
+++ b/libtdegames/kstdgameaction.h
@@ -87,7 +87,7 @@ public:
 	static TDEAction* create( StdGameAction id,
 		const TQObject *recvr, const char *slot,
 		TDEActionCollection* parent )
-		{ return create( id, 0, recvr, slot, parent ); }
+		{ return create( id, nullptr, recvr, slot, parent ); }
 
 
     /**
@@ -95,9 +95,9 @@ public:
      * KStdGameAction::StdGameAction enum.
      * @deprecated
      */
-    static TDEAction *action(StdGameAction act_enum, const TQObject *recvr = 0,
-                           const char *slot = 0, TDEActionCollection *parent = 0,
-                           const char *name = 0L );
+    static TDEAction *action(StdGameAction act_enum, const TQObject *recvr = nullptr,
+                           const char *slot = nullptr, TDEActionCollection *parent = nullptr,
+                           const char *name = nullptr );
 
     /**
      * This will return the internal name of a given standard action.
@@ -114,147 +114,147 @@ public:
     /**
      * Start a new game
      **/
-    static TDEAction *gameNew(const TQObject *recvr = 0, const char *slot = 0,
-                            TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEAction *gameNew(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                            TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
     /**
      * Load a previousely saved game
      */
-    static TDEAction *load(const TQObject *recvr = 0, const char *slot = 0,
-                         TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEAction *load(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                         TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
     /**
      * Load a recently loaded game.
      */
-    static TDERecentFilesAction *loadRecent(const TQObject *recvr = 0, const char *slot = 0,
-                         TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDERecentFilesAction *loadRecent(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                         TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
     /**
      * Save the current game.
      */
-    static TDEAction *save(const TQObject *recvr = 0, const char *slot = 0,
-                         TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEAction *save(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                         TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
     /**
      * Save the current game under a different filename.
      */
-    static TDEAction *saveAs(const TQObject *recvr = 0, const char *slot = 0,
-                           TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEAction *saveAs(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                           TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
     /**
      * Pause the game
      **/
-    static TDEToggleAction *pause(const TQObject *recvr = 0, const char *slot = 0,
-                           TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEToggleAction *pause(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                           TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
     /**
      * Show the highscores.
      */
-    static TDEAction *highscores(const TQObject *recvr = 0, const char *slot = 0,
-                           TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEAction *highscores(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                           TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
 
     /**
      * End the current game, but do not quit the program. Think of a "close"
      * entry.
      */
-    static TDEAction *end(const TQObject *recvr = 0, const char *slot = 0,
-                          TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEAction *end(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                          TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
     /**
      * Print the current screen? Game? Whatever - hardly used in games but there
      * is at least one example (ktuberling)
      */
-    static TDEAction *print(const TQObject *recvr = 0, const char *slot = 0,
-                          TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEAction *print(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                          TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
     /**
      * Quit the game.
      */
-    static TDEAction *quit(const TQObject *recvr = 0, const char *slot = 0,
-                         TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEAction *quit(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                         TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
 
 
     /**
      * Repeat the last move.
      **/
-    static TDEAction *repeat(const TQObject *recvr = 0, const char *slot = 0,
-                         TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEAction *repeat(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                         TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
     /**
      * Undo the last move
      **/
-    static TDEAction *undo(const TQObject *recvr = 0, const char *slot = 0,
-                         TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEAction *undo(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                         TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
     /**
      * Redo the last move (which has been undone)
      **/
-    static TDEAction *redo(const TQObject *recvr = 0, const char *slot = 0,
-                         TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEAction *redo(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                         TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
     /**
      * Roll die or dice
      **/
-    static TDEAction *roll(const TQObject *recvr = 0, const char *slot = 0,
-                         TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEAction *roll(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                         TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
     /**
      * End the current turn (not the game). Usually to let the next player
      * start
      **/
-    static TDEAction *endTurn(const TQObject *recvr = 0, const char *slot = 0,
-                         TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEAction *endTurn(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                         TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
 
     /**
      * Display configure carddecks dialog.
      */
-    static TDEAction *carddecks(const TQObject *recvr = 0, const char *slot = 0,
-                                TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEAction *carddecks(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                                TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
     /**
      * Display configure highscores dialog.
      * @since 3.2
      */
-    static TDEAction *configureHighscores(const TQObject *recvr = 0, const char *slot = 0,
-                                TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEAction *configureHighscores(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                                TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
     /**
      * Give an advice/hint.
      * @since 3.2
      */
-    static TDEAction *hint(const TQObject *recvr = 0, const char *slot = 0,
-                         TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEAction *hint(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                         TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
     /**
      * Show a demo.
      * @since 3.2
      */
-    static TDEToggleAction *demo(const TQObject *recvr = 0, const char *slot = 0,
-                               TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEToggleAction *demo(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                               TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
     /**
      * Solve the game.
      * @since 3.2
      */
-    static TDEAction *solve(const TQObject *recvr = 0, const char *slot = 0,
-                          TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEAction *solve(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                          TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
     /**
      * Choose game type.
      * @since 3.2
      */
-    static TDESelectAction *chooseGameType(const TQObject *recvr = 0, const char *slot = 0,
-                                         TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDESelectAction *chooseGameType(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                                         TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
     /**
      * Restart game.
      * @since 3.2
      */
-    static TDEAction *restart(const TQObject *recvr = 0, const char *slot = 0,
-                            TDEActionCollection *parent = 0, const char *name = 0L );
+    static TDEAction *restart(const TQObject *recvr = nullptr, const char *slot = nullptr,
+                            TDEActionCollection *parent = nullptr, const char *name = nullptr );
 
 };
 
diff --git a/lskat/lskat/KChildConnect.cpp b/lskat/lskat/KChildConnect.cpp
index 35ac9408..2d619f70 100644
--- a/lskat/lskat/KChildConnect.cpp
+++ b/lskat/lskat/KChildConnect.cpp
@@ -20,7 +20,7 @@
 #include "KChildConnect.moc"
 
 KChildConnect::KChildConnect()
-  : TQObject(0,0)
+  : TQObject(nullptr,nullptr)
 {
   input_pending=false;
   inputbuffer="";
@@ -102,7 +102,7 @@ void KChildConnect::Receive(TQString input)
 
   KEMessage *msg=new KEMessage;
   char *it;
-  for (it=inputcache.first();it!=0;it=inputcache.next())
+  for (it=inputcache.first();it;it=inputcache.next())
   {
     msg->AddString(TQCString(it));
   }
diff --git a/lskat/lskat/KConnectEntry.cpp b/lskat/lskat/KConnectEntry.cpp
index 750a4405..d6c0da5a 100644
--- a/lskat/lskat/KConnectEntry.cpp
+++ b/lskat/lskat/KConnectEntry.cpp
@@ -143,7 +143,7 @@ bool KConnectEntry::Init(KG_INPUTTYPE stype,int id,KEMessage *msg)
 KConnectEntry::KConnectEntry()
 {
   type=(KG_INPUTTYPE)0;
-  connect.r=0;
+  connect.r=nullptr;
 }
 
 KConnectEntry::~KConnectEntry()
diff --git a/lskat/lskat/KConnectEntry.h b/lskat/lskat/KConnectEntry.h
index f62c6e2d..b9023337 100644
--- a/lskat/lskat/KConnectEntry.h
+++ b/lskat/lskat/KConnectEntry.h
@@ -49,7 +49,7 @@ class KConnectEntry
   KConnectEntry(KConnectEntry &entry);
   KConnectEntry &operator=(KConnectEntry &entry);
   bool Exit();
-  bool Init(KG_INPUTTYPE stype,int id=0,KEMessage *msg=0);
+  bool Init(KG_INPUTTYPE stype,int id=0,KEMessage *msg=nullptr);
   KR_STATUS QueryStatus();
   bool SendMsg(KEMessage *msg);
 };
diff --git a/lskat/lskat/KEInput.cpp b/lskat/lskat/KEInput.cpp
index 21c299ae..fca453b8 100644
--- a/lskat/lskat/KEInput.cpp
+++ b/lskat/lskat/KEInput.cpp
@@ -23,13 +23,13 @@
 #include "KEInput.moc"
 
 KEInput::KEInput(TQObject * parent)
-  : TQObject(parent,0)
+  : TQObject(parent,nullptr)
 {
   number_of_inputs=0;
   locked=false;
   previous_input=-1;
   next_input=-1;
-  cTimer=0;
+  cTimer=nullptr;
 //  mMsg=(KEMessage *)0;
 }
 
@@ -218,7 +218,7 @@ bool KEInput::Next(int number, bool force)
 void KEInput::slotTimerNextRemote()
 {
   delete cTimer;
-  cTimer=0;
+  cTimer=nullptr;
   if (next_input>=0 && next_input<number_of_inputs)
     playerArray[next_input].QueryRemoteConnect()->Next();
 }
@@ -226,7 +226,7 @@ void KEInput::slotTimerNextRemote()
 void KEInput::slotTimerNextProcess()
 {
   delete cTimer;
-  cTimer=0;
+  cTimer=nullptr;
   if (next_input>=0 && next_input<number_of_inputs)
     playerArray[next_input].QueryProcessConnect()->Next();
 }
diff --git a/lskat/lskat/KEInput.h b/lskat/lskat/KEInput.h
index ee84e508..5d27e004 100644
--- a/lskat/lskat/KEInput.h
+++ b/lskat/lskat/KEInput.h
@@ -47,7 +47,7 @@ class KEInput : public TQObject
    TQMemArray<KConnectEntry> playerArray;
 
   public:
-   KEInput(TQObject * parent=0);
+   KEInput(TQObject * parent=nullptr);
    ~KEInput();
    int QueryNumberOfInputs();
    int QueryNext();
@@ -58,7 +58,7 @@ class KEInput : public TQObject
    KG_INPUTTYPE QueryType(int no=-1);
    KR_STATUS QueryStatus(int no=-1);
    bool IsInput(int no);
-   bool SetInputDevice(int no, KG_INPUTTYPE type, KEMessage *msg=0);
+   bool SetInputDevice(int no, KG_INPUTTYPE type, KEMessage *msg=nullptr);
    bool RemoveInput(int no);
    bool Next(int number, bool force=false);
    bool SetInput(KEMessage *msg,int number=-1);
diff --git a/lskat/lskat/KEMessage.cpp b/lskat/lskat/KEMessage.cpp
index 38cd2e8d..e7416bdd 100644
--- a/lskat/lskat/KEMessage.cpp
+++ b/lskat/lskat/KEMessage.cpp
@@ -224,7 +224,7 @@ TQString KEMessage::ToString()
   KMessageEntry *entry;
   char *it;
   s=KEMESSAGE_HEAD+KEMESSAGE_CR;
-  for (it=keys.first();it!=0;it=keys.next())
+  for (it=keys.first();it;it=keys.next())
   {
     entry=dict.find(TQCString(it));
     s+=EntryToString(it,entry);
@@ -313,7 +313,7 @@ KEMessage &KEMessage::operator=(KEMessage &msg)
   KMessageEntry *newentry;
   char *it;
   // printf("Assigning = KEMessage from %p to %p\n",&msg,this);
-  for (it=msg.keys.first();it!=0;it=msg.keys.next())
+  for (it=msg.keys.first();it;it=msg.keys.next())
   {
     entry=msg.dict.find(TQCString(it));
     newentry=new KMessageEntry;
diff --git a/lskat/lskat/KInputChildProcess.cpp b/lskat/lskat/KInputChildProcess.cpp
index 91ff119c..c4791ceb 100644
--- a/lskat/lskat/KInputChildProcess.cpp
+++ b/lskat/lskat/KInputChildProcess.cpp
@@ -21,7 +21,7 @@ KInputChildProcess::~KInputChildProcess()
   delete childConnect;
 }
 KInputChildProcess::KInputChildProcess(int size_buffer)
-  : TQObject(0,0)
+  : TQObject(nullptr,nullptr)
 {
   buffersize=size_buffer;
   if (buffersize<1) buffersize=1024;
diff --git a/lskat/lskat/KInteractiveConnect.h b/lskat/lskat/KInteractiveConnect.h
index db3ab9b6..4badae68 100644
--- a/lskat/lskat/KInteractiveConnect.h
+++ b/lskat/lskat/KInteractiveConnect.h
@@ -29,7 +29,7 @@ class KInteractiveConnect:public KChildConnect
   KInteractiveConnect();
   ~KInteractiveConnect();
   bool Next();
-  bool Init(int id=0,KEMessage *msg=0);
+  bool Init(int id=0,KEMessage *msg=nullptr);
   bool Exit();
   bool SendMsg(KEMessage *msg);
   bool Send(TQString str);
diff --git a/lskat/lskat/KRSocket.cpp b/lskat/lskat/KRSocket.cpp
index 1b5201ad..872e179d 100644
--- a/lskat/lskat/KRSocket.cpp
+++ b/lskat/lskat/KRSocket.cpp
@@ -103,7 +103,7 @@
 #include <kdebug.h>
 
 KRServerSocket::KRServerSocket( const char *_path, int optname, int value, int level) :
-  notifier( 0L ), sock( -1 )
+  notifier( nullptr ), sock( -1 )
 {
   domain = PF_UNIX;
 
@@ -118,7 +118,7 @@ KRServerSocket::KRServerSocket( const char *_path, int optname, int value, int l
 }
 
 KRServerSocket::KRServerSocket( const char *_path ) :
-  notifier( 0L ), sock( -1 )
+  notifier( nullptr ), sock( -1 )
 {
   domain = PF_UNIX;
 
@@ -133,7 +133,7 @@ KRServerSocket::KRServerSocket( const char *_path ) :
 }
 
 KRServerSocket::KRServerSocket( unsigned short int _port ) :
-  notifier( 0L ), sock( -1 )
+  notifier( nullptr ), sock( -1 )
 {
   domain = PF_INET;
 
@@ -148,7 +148,7 @@ KRServerSocket::KRServerSocket( unsigned short int _port ) :
 }
 
 KRServerSocket::KRServerSocket( unsigned short int _port,int optname,int value,int level ) :
-  notifier( 0L ), sock( -1 )
+  notifier( nullptr ), sock( -1 )
 {
   domain = PF_INET;
 
diff --git a/lskat/lskat/KRemoteConnect.cpp b/lskat/lskat/KRemoteConnect.cpp
index f8c91e70..79ca782c 100644
--- a/lskat/lskat/KRemoteConnect.cpp
+++ b/lskat/lskat/KRemoteConnect.cpp
@@ -47,10 +47,10 @@ KRemoteConnect::KRemoteConnect()
   port=7687;
   IP="localhost";
   socketStatus=KR_INVALID;
-  kSocket=0;
-  service=0;
-  kServerSocket=0;
-  bufferMsg=0;
+  kSocket=nullptr;
+  service=nullptr;
+  kServerSocket=nullptr;
+  bufferMsg=nullptr;
   buffer=new char[4097];
   inputbuffer="";
   input_pending=false;
@@ -146,9 +146,9 @@ bool tryserver;
   if (tryserver) // become a server
   {
     delete kSocket;
-    kSocket=0;
+    kSocket=nullptr;
     delete service;
-    service = 0;
+    service = nullptr;
     // Store message
     if (msg->QueryNumberOfKeys()>0)
     {
@@ -157,7 +157,7 @@ bool tryserver;
     }
     else
     {
-      bufferMsg=0;
+      bufferMsg=nullptr;
     }
     socketStatus=KR_WAIT_FOR_CLIENT;
     OfferServerSocket();
@@ -198,7 +198,7 @@ void KRemoteConnect::socketRequest(TDESocket *sock)
   {
     delete sock;
     delete kServerSocket;
-    kServerSocket=0;
+    kServerSocket=nullptr;
     return ;
   }
   kSocket=sock;
@@ -216,14 +216,14 @@ void KRemoteConnect::socketRequest(TDESocket *sock)
     */
     socketStatus=KR_SERVER;
     delete kServerSocket; // no more connections
-    kServerSocket=0;
+    kServerSocket=nullptr;
     if (bufferMsg)
     {
       // Delayed sending of init msg
       bufferMsg->AddData(TQCString("Client"),(short)QueryID());
       SendMsg(bufferMsg);
       delete bufferMsg;
-      bufferMsg=0;
+      bufferMsg=nullptr;
     }
   }
 }
@@ -231,7 +231,7 @@ void KRemoteConnect::socketRequest(TDESocket *sock)
 void KRemoteConnect::socketClosed(TDESocket *sock)
 {
   delete sock;
-  kSocket=0;
+  kSocket=nullptr;
   socketStatus=KR_INVALID;
   KEMessage *msg=new KEMessage;
   msg->AddData(TQCString("ConnectionLost"),(short)QueryID());
@@ -298,9 +298,9 @@ bool KRemoteConnect::Exit()
   delete kSocket;
   delete kServerSocket;
   delete bufferMsg;
-  kSocket=0;
-  kServerSocket=0;
-  bufferMsg=0;
+  kSocket=nullptr;
+  kServerSocket=nullptr;
+  bufferMsg=nullptr;
   socketStatus=KR_INVALID;
   return true;
 }
diff --git a/lskat/lskat/KRemoteConnect.h b/lskat/lskat/KRemoteConnect.h
index bbc99608..fafbfbe6 100644
--- a/lskat/lskat/KRemoteConnect.h
+++ b/lskat/lskat/KRemoteConnect.h
@@ -48,7 +48,7 @@ class KRemoteConnect: public KChildConnect
   public:
   KRemoteConnect();
   ~KRemoteConnect();
-  bool Init(int id=0,KEMessage *msg=0);
+  bool Init(int id=0,KEMessage *msg=nullptr);
   bool Exit();
   bool Next();
 //  bool SendMsg(KEMessage *msg);
diff --git a/lskat/lskat/TDEProcessConnect.cpp b/lskat/lskat/TDEProcessConnect.cpp
index 541a84a2..ce89c007 100644
--- a/lskat/lskat/TDEProcessConnect.cpp
+++ b/lskat/lskat/TDEProcessConnect.cpp
@@ -39,7 +39,7 @@ TDEProcessConnect::TDEProcessConnect()
   : KChildConnect()
 {
   running=false;
-  process=0;
+  process=nullptr;
 }
 
 TDEProcessConnect::~TDEProcessConnect()
@@ -138,7 +138,7 @@ void TDEProcessConnect::slotProcessExited(TDEProcess *)
 {
   running=false;
   delete process;
-  process=0;
+  process=nullptr;
   Init(QueryID());
 }
 void TDEProcessConnect::slotWroteStdin(TDEProcess *)
@@ -154,7 +154,7 @@ bool TDEProcessConnect::Exit()
     running=false;
     if (process) process->kill();
     delete process;
-    process=0;
+    process=nullptr;
   }
   return true;
 }
diff --git a/lskat/lskat/TDEProcessConnect.h b/lskat/lskat/TDEProcessConnect.h
index b7b37d33..68cd8e0e 100644
--- a/lskat/lskat/TDEProcessConnect.h
+++ b/lskat/lskat/TDEProcessConnect.h
@@ -37,7 +37,7 @@ class TDEProcessConnect: public KChildConnect
   public:
   TDEProcessConnect();
   ~TDEProcessConnect();
-  bool Init(int id=0,KEMessage *msg=0);
+  bool Init(int id=0,KEMessage *msg=nullptr);
   bool Exit();
   bool Next();
  //  bool SendMsg(KEMessage *msg);
diff --git a/lskat/lskat/lskat.cpp b/lskat/lskat/lskat.cpp
index fe09b337..4b70b0a2 100644
--- a/lskat/lskat/lskat.cpp
+++ b/lskat/lskat/lskat.cpp
@@ -361,7 +361,7 @@ void LSkatApp::slotFileStatistics()
   if (KMessageBox::Yes==KMessageBox::questionYesNo(this,message,TQString(),KStdGuiItem::clear()))
   {
     doc->ClearStats();
-    doc->slotUpdateAllViews(0);
+    doc->slotUpdateAllViews(nullptr);
   }
 }
 
@@ -399,7 +399,7 @@ void LSkatApp::slotFileNew()
 void LSkatApp::slotFileEnd()
 {
   doc->EndGame(true);
-  doc->slotUpdateAllViews(0);
+  doc->slotUpdateAllViews(nullptr);
   slotStatusMsg(i18n("Game ended...start a new one..."));
 
   KEMessage *msg=new KEMessage;
@@ -527,7 +527,7 @@ void LSkatApp::slotOptionsCardDeck()
   if (result==TQDialog::Accepted)
   {
     doc->SetCardDeckPath(s1,s2);
-    doc->slotUpdateAllViews(0);
+    doc->slotUpdateAllViews(nullptr);
   }
 }
 
@@ -597,7 +597,7 @@ void LSkatApp::NewGame()
   bool res;
   // doc->SetIntro(0);
   doc->NewGame();
-  doc->slotUpdateAllViews(0);
+  doc->slotUpdateAllViews(nullptr);
   res=MakeInputDevice(0);
   if (!res)
   {
@@ -683,7 +683,7 @@ bool LSkatApp::MakeInputDevice(int no)
           {
             s=i18n("Offering remote connection on port %1...").arg(port);
           }
-          progress=new TQProgressDialog(s, i18n("Abort"), tim, this,0,true );
+          progress=new TQProgressDialog(s, i18n("Abort"), tim, this,nullptr,true );
           progress->setCaption(i18n("Lieutenant Skat"));
           for (j=0; j<tim; j++)
           {
@@ -866,7 +866,7 @@ void LSkatApp::slotReceiveInput(KEMessage *msg,int )
     slotStatusMsg(message);
 
     doc->EndGame(true);
-    doc->slotUpdateAllViews(0);
+    doc->slotUpdateAllViews(nullptr);
     slotStatusNames();
   }
 
@@ -890,7 +890,7 @@ void LSkatApp::slotReceiveInput(KEMessage *msg,int )
     doc->NewGame();
     ExtractGame(msg);
     doc->SetServer(false);
-    doc->slotUpdateAllViews(0);
+    doc->slotUpdateAllViews(nullptr);
     mInput->Unlock();
     mInput->Next(doc->GetStartPlayer());
   }
@@ -914,10 +914,10 @@ void LSkatApp::MoveFinished()
     if (res==2) // end game
     {
       doc->EvaluateGame();
-      doc->slotUpdateAllViews(0);
+      doc->slotUpdateAllViews(nullptr);
       // m->SetStatusBar(i18n("Game over"),3);
       //doc->SwitchStartPlayer();
-      doc->slotUpdateAllViews(0);
+      doc->slotUpdateAllViews(nullptr);
       checkMenus(CheckFileMenu|CheckOptionsMenu);
     }
     else if (doc->IsRunning()) // continue game
@@ -964,7 +964,7 @@ void LSkatApp::Move(int x,int y,int player,bool remote)
   int res=doc->PrepareMove(player,y*4+x);
   if (res>0)
   {
-    doc->InitMove(0,player,x,y);
+    doc->InitMove(nullptr,player,x,y);
     if (mInput->QueryType()!=KG_INPUTTYPE_REMOTE && !remote )
     {
       msg=new KEMessage;
diff --git a/lskat/lskat/lskatdoc.cpp b/lskat/lskat/lskatdoc.cpp
index 7e9c5056..5523bbc4 100644
--- a/lskat/lskat/lskatdoc.cpp
+++ b/lskat/lskat/lskatdoc.cpp
@@ -34,7 +34,7 @@
 #include "lskatview.h"
 #include <kcarddialog.h>
 
-TQPtrList<LSkatView> *LSkatDoc::pViewList = 0L;
+TQPtrList<LSkatView> *LSkatDoc::pViewList = nullptr;
 
 LSkatDoc::LSkatDoc(TQWidget *parent, const char *name) : TQObject(parent, name)
 {
@@ -120,7 +120,7 @@ void LSkatDoc::InitMove(LSkatView *sender,int player,int x,int y)
   LSkatView *w;
   if(pViewList)
   {
-    for(w=pViewList->first(); w!=0; w=pViewList->next())
+    for(w=pViewList->first(); w; w=pViewList->next())
     {
       if(w!=sender) w->InitMove(player,x,y);
     }
@@ -132,7 +132,7 @@ void LSkatDoc::slotUpdateAllViews(LSkatView *sender)
   LSkatView *w;
   if(pViewList)
   {
-    for(w=pViewList->first(); w!=0; w=pViewList->next())
+    for(w=pViewList->first(); w; w=pViewList->next())
     {
       if(w!=sender)
         w->repaint();
@@ -145,7 +145,7 @@ void LSkatDoc::UpdateViews(int mode)
   if (IsIntro()) return ;
   if(pViewList)
   {
-    for(w=pViewList->first(); w!=0; w=pViewList->next())
+    for(w=pViewList->first(); w; w=pViewList->next())
     {
        if (mode & UPDATE_STATUS) w->updateStatus();
     }
diff --git a/lskat/lskat/lskatdoc.h b/lskat/lskat/lskatdoc.h
index 0446f210..7fc1ff48 100644
--- a/lskat/lskat/lskatdoc.h
+++ b/lskat/lskat/lskatdoc.h
@@ -50,7 +50,7 @@ class LSkatDoc : public TQObject
   
   public:
     /** Constructor for the fileclass of the application */
-    LSkatDoc(TQWidget *parent, const char *name=0);
+    LSkatDoc(TQWidget *parent, const char *name=nullptr);
     /** Destructor for the fileclass of the application */
     ~LSkatDoc();
 
@@ -71,9 +71,9 @@ class LSkatDoc : public TQObject
     /** closes the acutal document */
     void closeDocument();
     /** loads the document by filename and format and emits the updateViews() signal */
-    bool openDocument(const TQString &filename, const char *format=0);
+    bool openDocument(const TQString &filename, const char *format=nullptr);
     /** saves the document under filename and format.*/	
-    bool saveDocument(const TQString &filename, const char *format=0);
+    bool saveDocument(const TQString &filename, const char *format=nullptr);
     /** sets the path to the file connected with the document */
     void setAbsFilePath(const TQString &filename);
     /** returns the pathname of the current document file*/
diff --git a/lskat/lskat/lskatview.h b/lskat/lskat/lskatview.h
index 112a1dca..033e3e5d 100644
--- a/lskat/lskat/lskatview.h
+++ b/lskat/lskat/lskatview.h
@@ -42,7 +42,7 @@ class LSkatView : public TQWidget
   
   public:
   /** Constructor for the main view */
-  LSkatView(TQWidget *parent = 0, const char *name=0);
+  LSkatView(TQWidget *parent = nullptr, const char *name=nullptr);
 
   /** returns a pointer to the document connected to the view instance. Mind that this method requires a LSkatApp instance as a parent
    * widget to get to the window document pointer by calling the LSkatApp::getDocument() method.
diff --git a/lskat/lskat/main.cpp b/lskat/lskat/main.cpp
index 77da5bfd..35931ece 100644
--- a/lskat/lskat/main.cpp
+++ b/lskat/lskat/main.cpp
@@ -19,8 +19,8 @@
 
 static TDECmdLineOptions options[] =
 {
-  { "d", 0, 0},
-  { "debug <level>", I18N_NOOP("Enter debug level"), 0 },
+  { "d", nullptr, nullptr},
+  { "debug <level>", I18N_NOOP("Enter debug level"), nullptr },
   TDECmdLineLastOption
 };
 
@@ -35,8 +35,8 @@ int main(int argc, char *argv[])
                         I18N_NOOP("Card Game"),
                         TDEAboutData::License_GPL,
                         "(c) 2000, Martin Heni");
-  aboutData.addAuthor("Martin Heni",0, "martin@heni-online.de");
-  aboutData.addCredit("Laura", I18N_NOOP("Beta testing"), 0);
+  aboutData.addAuthor("Martin Heni",nullptr, "martin@heni-online.de");
+  aboutData.addCredit("Laura", I18N_NOOP("Beta testing"), nullptr);
   TDECmdLineArgs::init( argc, argv, &aboutData );
   TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
 
diff --git a/lskat/lskat/namedlg.h b/lskat/lskat/namedlg.h
index 4aff2fde..6639f941 100644
--- a/lskat/lskat/namedlg.h
+++ b/lskat/lskat/namedlg.h
@@ -24,7 +24,7 @@ class NameDlg : public KDialogBase
   
 
 public:
-    NameDlg( TQWidget* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0 );
+    NameDlg( TQWidget* parent = nullptr, const char* name = nullptr, bool modal = true, WFlags fl = 0 );
     ~NameDlg();
    void SetNames(TQString n1,TQString n2);
    void GetNames(TQString &n1,TQString &n2);
diff --git a/lskat/lskatproc/KChildConnect.cpp b/lskat/lskatproc/KChildConnect.cpp
index 6ea4b973..1e87b1ed 100644
--- a/lskat/lskatproc/KChildConnect.cpp
+++ b/lskat/lskatproc/KChildConnect.cpp
@@ -20,7 +20,7 @@
 #include "KChildConnect.moc"
 
 KChildConnect::KChildConnect()
-  : TQObject(0,0)
+  : TQObject(nullptr,nullptr)
 {
   input_pending=false;
   inputbuffer="";
@@ -102,7 +102,7 @@ void KChildConnect::Receive(TQString input)
 
   KEMessage *msg=new KEMessage;
   char *it;
-  for (it=inputcache.first();it!=0;it=inputcache.next())
+  for (it=inputcache.first();it;it=inputcache.next())
   {
     msg->AddString(TQCString(it));
   }
diff --git a/lskat/lskatproc/KEMessage.cpp b/lskat/lskatproc/KEMessage.cpp
index ce8985f3..4ff7a77a 100644
--- a/lskat/lskatproc/KEMessage.cpp
+++ b/lskat/lskatproc/KEMessage.cpp
@@ -224,7 +224,7 @@ TQString KEMessage::ToString()
   KMessageEntry *entry;
   char *it;
   s=KEMESSAGE_HEAD+KEMESSAGE_CR;
-  for (it=keys.first();it!=0;it=keys.next())
+  for (it=keys.first();it;it=keys.next())
   {
     entry=dict.find(TQCString(it));
     s+=EntryToString(it,entry);
@@ -313,7 +313,7 @@ KEMessage &KEMessage::operator=(KEMessage &msg)
   KMessageEntry *newentry;
   char *it;
   // printf("Assigning = KEMessage from %p to %p\n",&msg,this);
-  for (it=msg.keys.first();it!=0;it=msg.keys.next())
+  for (it=msg.keys.first();it;it=msg.keys.next())
   {
     entry=msg.dict.find(TQCString(it));
     newentry=new KMessageEntry;
diff --git a/lskat/lskatproc/KInputChildProcess.cpp b/lskat/lskatproc/KInputChildProcess.cpp
index 24fca968..dcde6dc6 100644
--- a/lskat/lskatproc/KInputChildProcess.cpp
+++ b/lskat/lskatproc/KInputChildProcess.cpp
@@ -21,7 +21,7 @@ KInputChildProcess::~KInputChildProcess()
   delete childConnect;
 }
 KInputChildProcess::KInputChildProcess(int size_buffer)
-  : TQObject(0,0)
+  : TQObject(nullptr,nullptr)
 {
   buffersize=size_buffer;
   if (buffersize<1) buffersize=1024;
diff --git a/tdefifteen/src/main.cpp b/tdefifteen/src/main.cpp
index d9d5c989..b2150e82 100644
--- a/tdefifteen/src/main.cpp
+++ b/tdefifteen/src/main.cpp
@@ -23,9 +23,9 @@ int main(int argc, char *argv[])
                         description,                                    // short description
                         TDEAboutData::License_GPL,                      // licence type
                         I18N_NOOP("(c) 2017-2020 Denis Kozadaev"),      // copyright statement
-                        0,                                              // text - any information
+                        nullptr,                                              // text - any information
                         "http://trinitydesktop.org",                    // home page address
-                        0);                                             // bug email address
+                        nullptr);                                             // bug email address
 
     about.addAuthor( "Denis Kozadaev", "Author", "denis@tambov.ru" );
 
diff --git a/tdefifteen/src/mainwindow.cpp b/tdefifteen/src/mainwindow.cpp
index 688c1743..82009f7d 100644
--- a/tdefifteen/src/mainwindow.cpp
+++ b/tdefifteen/src/mainwindow.cpp
@@ -11,7 +11,7 @@
 
 MainWindow::MainWindow(TQWidget* parent, const char* name) : TDEMainWindow(parent, name)
 {
-    TDEAction* actionQuit = KStdAction::quit(this, TQ_SLOT(close()), 0);
+    TDEAction* actionQuit = KStdAction::quit(this, TQ_SLOT(close()), nullptr);
     TDEAction* actionNew  = new TDEAction( "&New Game", "reload", TQt::CTRL + TQt::Key_N, this, TQ_SLOT(newGame()), this, "New Game");
 
     mMenu = new TDEPopupMenu(this);
diff --git a/tdefifteen/src/mainwindow.h b/tdefifteen/src/mainwindow.h
index 00fdcbee..819584cc 100644
--- a/tdefifteen/src/mainwindow.h
+++ b/tdefifteen/src/mainwindow.h
@@ -15,7 +15,7 @@ class MainWindow : public TDEMainWindow
 	TQ_OBJECT
     
 public:
-	MainWindow(TQWidget* parent = 0, const char* name = 0);
+	MainWindow(TQWidget* parent = nullptr, const char* name = nullptr);
 	~MainWindow();
 
 private:
diff --git a/twin4/twin4/kspritecache.cpp b/twin4/twin4/kspritecache.cpp
index 56d0ba65..6d185376 100644
--- a/twin4/twin4/kspritecache.cpp
+++ b/twin4/twin4/kspritecache.cpp
@@ -31,8 +31,8 @@ KSpriteCache::KSpriteCache(TQString grafixdir, TQObject* parent,const char * nam
   : TQObject(parent,name)
 {
   kdDebug(11002) << "KSpriteCache:: grafixdir=" << grafixdir << endl;
-  mConfig=0;
-  mCanvas=0;
+  mConfig=nullptr;
+  mCanvas=nullptr;
   setRcFile(TQString("grafix.rc"));
   setGrafixDir(grafixdir);
   kdDebug(11002) << "Grafixdir=" << grafixDir() << " rcfile=" << rcFile() << endl;
@@ -140,7 +140,7 @@ TQCanvasItem *KSpriteCache::getItem(TQString name,int no)
     if (!mConfig->hasGroup(name))
     {
       kdError() << "Item "<<name <<" not defined! " <<endl;
-      return 0;
+      return nullptr;
     }
     mConfig->setGroup(name);
     item=loadItem(mConfig,name);
@@ -202,7 +202,7 @@ TQCanvasPixmapArray *KSpriteCache::createPixmapArray(TDEConfig *config,TQString
 
 
   // Prepare for the reading of the pixmaps
-  TQPixmap *pixmap=0;
+  TQPixmap *pixmap=nullptr;
   TQPtrList<TQPixmap> pixlist;
   pixlist.setAutoDelete(true);
   TQPtrList<TQPoint> hotlist;
@@ -286,7 +286,7 @@ TQCanvasPixmapArray *KSpriteCache::createPixmapArray(TDEConfig *config,TQString
   }// end create images
 
  //kdDebug(11002) <<"Pixarray count="<<pixlist.count()<<endl;
- if (pixlist.count()<1) return 0;
+ if (pixlist.count()<1) return nullptr;
 
  TQCanvasPixmapArray *pixmaparray=new TQCanvasPixmapArray(pixlist,hotlist);
  return pixmaparray;
@@ -378,9 +378,9 @@ void KSpriteCache::changeGrey(TQPixmap *pixmap,int lighter)
 
 TQCanvasItem *KSpriteCache::loadItem(TDEConfig *config,TQString name)
 {
-  if (!config) return 0;
+  if (!config) return nullptr;
   int rtti=config->readNumEntry("rtti",0);
-  TQCanvasItem *item=0;
+  TQCanvasItem *item=nullptr;
   switch(rtti)
   {
     case TQCanvasItem::Rtti_Text:
@@ -423,9 +423,9 @@ TQCanvasItem *KSpriteCache::loadItem(TDEConfig *config,TQString name)
 
 TQCanvasItem *KSpriteCache::cloneItem(TQCanvasItem *original)
 {
-  if (!original) return 0;
+  if (!original) return nullptr;
   int rtti=original->rtti();
-  TQCanvasItem *item=0;
+  TQCanvasItem *item=nullptr;
   switch(rtti)
   {
     case TQCanvasItem::Rtti_Text:
@@ -524,10 +524,10 @@ KSprite::KSprite(TQCanvasPixmapArray* array, TQCanvas* canvas)
 {
   mImages=array;
   mSpeed=0.0;
-  mNotify=0;
+  mNotify=nullptr;
   mAnimationNumber=-1;
   mAnimSpeedCnt=0;
-  mMoveObj=0;
+  mMoveObj=nullptr;
 
 }
 
@@ -749,14 +749,14 @@ void KSprite::deleteNotify()
   {
     //kdDebug(11002) << "REALLY deleting notify" << endl;
     delete mNotify;
-    mNotify=0;
+    mNotify=nullptr;
   }
 }
 
 KSprite::~KSprite()
 {
   delete mNotify;
-  mNotify=0;
+  mNotify=nullptr;
 }
 
 void KSprite::setAnimation(int no)
diff --git a/twin4/twin4/kspritecache.h b/twin4/twin4/kspritecache.h
index 63a88c02..23d7bca7 100644
--- a/twin4/twin4/kspritecache.h
+++ b/twin4/twin4/kspritecache.h
@@ -36,7 +36,7 @@ class KSprite;
   
 
       public:
-        KSpriteNotify() :TQObject(0,0) {mRefCnt=0;}
+        KSpriteNotify() :TQObject(nullptr,nullptr) {mRefCnt=0;}
         void emitSignal(TQCanvasItem *parent,int mode) {emit signalNotify(parent,mode);}
         void incRefCnt() {mRefCnt++;}
         void decRefCnt() {mRefCnt--;}
@@ -293,7 +293,7 @@ class KSpriteCache : public TQObject
   * 
   * @param grafixdir - the directory where the configuration file and the graphics reside
   **/
-  KSpriteCache(TQString grafixdir, TQObject* parent=0,const char * name=0);
+  KSpriteCache(TQString grafixdir, TQObject* parent=nullptr,const char * name=nullptr);
 
   /**
   * Delete the sprite cache
diff --git a/twin4/twin4/main.cpp b/twin4/twin4/main.cpp
index 92db41f2..d757c0c8 100644
--- a/twin4/twin4/main.cpp
+++ b/twin4/twin4/main.cpp
@@ -26,8 +26,8 @@
 
 static TDECmdLineOptions options[] =
 {
-  { "d", 0, 0},
-  { "debug <level>", I18N_NOOP("Enter debug level"), 0 },
+  { "d", nullptr, nullptr},
+  { "debug <level>", I18N_NOOP("Enter debug level"), nullptr },
   TDECmdLineLastOption
 };
 
@@ -41,9 +41,9 @@ int main(int argc, char *argv[])
                         I18N_NOOP("TWin4: Two player network game"),
                         TDEAboutData::License_GPL,
                         "(c) 1995-2000, Martin Heni");
-  aboutData.addAuthor("Martin Heni",0, "martin@heni-online.de");
-  aboutData.addCredit("Laura", I18N_NOOP("Beta testing"), 0);
-  aboutData.addAuthor("Benjamin Meyer", I18N_NOOP("Code Improvements"), 0);
+  aboutData.addAuthor("Martin Heni",nullptr, "martin@heni-online.de");
+  aboutData.addCredit("Laura", I18N_NOOP("Beta testing"), nullptr);
+  aboutData.addAuthor("Benjamin Meyer", I18N_NOOP("Code Improvements"), nullptr);
   TDECmdLineArgs::init( argc, argv, &aboutData );
   TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
 
diff --git a/twin4/twin4/scorewidget.h b/twin4/twin4/scorewidget.h
index a491f521..568e36f7 100644
--- a/twin4/twin4/scorewidget.h
+++ b/twin4/twin4/scorewidget.h
@@ -14,7 +14,7 @@ class ScoreWidget : public TQFrame
   
 
 public:
-    ScoreWidget( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+    ScoreWidget( TQWidget* parent = nullptr, const char* name = nullptr, WFlags fl = 0 );
     void setMove(int i);
     void setLevel(int i);
     void setChance(int i);
diff --git a/twin4/twin4/twin4.cpp b/twin4/twin4/twin4.cpp
index 4f7d76c2..ef159863 100644
--- a/twin4/twin4/twin4.cpp
+++ b/twin4/twin4/twin4.cpp
@@ -64,7 +64,7 @@
  * is derived from the libtdegames chat widget
  */
 ChatDlg::ChatDlg(KGame *game,TQWidget *parent)
-    : KDialogBase(Plain,i18n("Chat Dlg"),Ok,Ok,parent,0,false,true),mChat(0), mChatDlg(0)
+    : KDialogBase(Plain,i18n("Chat Dlg"),Ok,Ok,parent,nullptr,false,true),mChat(nullptr), mChatDlg(nullptr)
 {
  setMinimumSize(TQSize(200,200));
 
@@ -107,7 +107,7 @@ void ChatDlg::setPlayer(Kwin4Player *p)
 /**
  * Construct the main application window 
  */
-Kwin4App::Kwin4App(TQWidget *parent, const char *name) : TDEMainWindow(parent,name), view(0), doc(0), mChat(0), mMyChatDlg(0)
+Kwin4App::Kwin4App(TQWidget *parent, const char *name) : TDEMainWindow(parent,name), view(nullptr), doc(nullptr), mChat(nullptr), mMyChatDlg(nullptr)
 {
   initGUI();
   initStatusBar();
@@ -533,7 +533,7 @@ void Kwin4App::slotInitNetwork()
   int port=Prefs::port();
 
   // just for testing - should be non-modal
-  KGameDialog dlg(doc, 0, i18n("Network Configuration"), this,
+  KGameDialog dlg(doc, nullptr, i18n("Network Configuration"), this,
       KGameDialog::NetworkConfig, 20000, true);
   dlg.networkConfig()->setDefaultNetworkInfo(host, port);
   dlg.networkConfig()->setDiscoveryInfo("_twin4._tcp",Prefs::gamename());
@@ -617,7 +617,7 @@ void Kwin4App::showSettings(){
     return;
 
   TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Prefs::self(), KDialogBase::Swallow);
-  Settings *general = new Settings(0, "General");
+  Settings *general = new Settings(nullptr, "General");
   dialog->addPage(general, i18n("General"), "package_settings");
   connect(dialog, TQ_SIGNAL(settingsChanged()), doc, TQ_SLOT(loadSettings()));
   dialog->show();
diff --git a/twin4/twin4/twin4.h b/twin4/twin4/twin4.h
index aa87418e..d0d7a15b 100644
--- a/twin4/twin4/twin4.h
+++ b/twin4/twin4/twin4.h
@@ -40,7 +40,7 @@ class TDE_EXPORT ChatDlg : public KDialogBase
   TQ_OBJECT
   
 public:
-  ChatDlg(KGame *game,TQWidget* parent=0);
+  ChatDlg(KGame *game,TQWidget* parent=nullptr);
 
 public slots:  
   void setPlayer(Kwin4Player *p);
@@ -60,7 +60,7 @@ TQ_OBJECT
   
 
 public:
-  Kwin4App(TQWidget *parent=0, const char *name=0);
+  Kwin4App(TQWidget *parent=nullptr, const char *name=nullptr);
 
 protected:
   void EndGame(TABLE mode);
diff --git a/twin4/twin4/twin4doc.cpp b/twin4/twin4/twin4doc.cpp
index e41a734d..4e928926 100644
--- a/twin4/twin4/twin4doc.cpp
+++ b/twin4/twin4/twin4doc.cpp
@@ -36,7 +36,7 @@
 #include "prefs.h"
 #include "statuswidget.h"
 
-Kwin4Doc::Kwin4Doc(TQWidget *parent, const char *) : KGame(1234,parent), pView(0), mHintProcess(0)
+Kwin4Doc::Kwin4Doc(TQWidget *parent, const char *) : KGame(1234,parent), pView(nullptr), mHintProcess(nullptr)
 {
   connect(this,TQ_SIGNAL(signalPropertyChanged(KGamePropertyBase *,KGame *)),
           this,TQ_SLOT(slotPropertyChanged(KGamePropertyBase *,KGame *)));
@@ -877,7 +877,7 @@ void Kwin4Doc::setPlayedBy(int col, KGameIO::IOMode io)
   if (mPlayedBy[col]!=io && !player->isVirtual())
   {
     mPlayedBy[col]=io;
-    player->removeGameIO(0); // remove all IO's
+    player->removeGameIO(nullptr); // remove all IO's
     createIO(player,io);
   }
 }
@@ -1080,13 +1080,13 @@ void Kwin4Doc::slotClientConnected(TQ_UINT32 cid,KGame *)
 Kwin4Player *Kwin4Doc::getPlayer(FARBE col)
 {
  Kwin4Player *p;
- for ( p=(Kwin4Player *)playerList()->first(); p!= 0; p=(Kwin4Player *)playerList()->next() )
+ for ( p=(Kwin4Player *)playerList()->first(); p; p=(Kwin4Player *)playerList()->next() )
  {
    if (p->userId()==col)
      return p;
  }
  kdError() << "SERIOUS ERROR: Cannot find player with colour " << col << ".  CRASH imminent" << endl;
- return 0;
+ return nullptr;
 }
 
 /**
@@ -1186,7 +1186,7 @@ void Kwin4Doc::slotPropertyChanged(KGamePropertyBase *prop,KGame *)
      if (gameStatus()==Abort)
      {
        if (global_debug>1) kdDebug(12010) << "PropertyChanged::status signal game abort +++" << endl;
-       emit signalGameOver(2,getPlayer(QueryCurrentPlayer()),0); // 2 indicates Abort
+       emit signalGameOver(2,getPlayer(QueryCurrentPlayer()),nullptr); // 2 indicates Abort
      }
      else if (gameStatus()==Run)
      {
@@ -1290,7 +1290,7 @@ void Kwin4Doc::newPlayersJoin(KGamePlayerList * /*oldList*/,KGamePlayerList *new
     if (global_debug>1) kdDebug(12010) << "ADMIN keeps yellow and kicks red= " << red->id()<<" userId/col="<<red->userId()<<endl;
     // loop all client players and deactivate the one which have the color
     // yellow
-    for ( player=newList->first(); player != 0; player=newList->next() ) 
+    for ( player=newList->first(); player; player=newList->next() ) 
     {
       if (player->userId()==yellow->userId()) 
       {
@@ -1306,7 +1306,7 @@ void Kwin4Doc::newPlayersJoin(KGamePlayerList * /*oldList*/,KGamePlayerList *new
     if (global_debug>1) kdDebug(12010) << "ADMIN keeps red and kicks yellow= " << yellow->id()<<" userId/col="<<yellow->userId()<<endl;
     // loop all client players and deactivate the one which have the color
     // red
-    for ( player=newList->first(); player != 0; player=newList->next() ) 
+    for ( player=newList->first(); player; player=newList->next() ) 
     {
       if (player->userId()==red->userId()) 
       {
diff --git a/twin4/twin4/twin4doc.h b/twin4/twin4/twin4doc.h
index c9aa30ab..657cad35 100644
--- a/twin4/twin4/twin4doc.h
+++ b/twin4/twin4/twin4doc.h
@@ -51,7 +51,7 @@ TQ_OBJECT
   
 
 public:
-  Kwin4Doc(TQWidget *parent, const char *name=0);
+  Kwin4Doc(TQWidget *parent, const char *name=nullptr);
   ~Kwin4Doc();
 
   /** adds a view to the document which represents the document contents. Usually this is your main view. */
diff --git a/twin4/twin4/twin4player.cpp b/twin4/twin4/twin4player.cpp
index 30b8ce26..a6d22d21 100644
--- a/twin4/twin4/twin4player.cpp
+++ b/twin4/twin4/twin4player.cpp
@@ -24,7 +24,7 @@
 #include "twin4player.h"
 #include "statuswidget.h"
 
-Kwin4Player::Kwin4Player() : KPlayer(), sWidget(0)
+Kwin4Player::Kwin4Player() : KPlayer(), sWidget(nullptr)
 {
   int id;
   id=mWin.registerData(dataHandler(),KGamePropertyBase::PolicyDirty,TQString("mWin"));
diff --git a/twin4/twin4/twin4proc.cpp b/twin4/twin4/twin4proc.cpp
index a17b4ad7..c358fc98 100644
--- a/twin4/twin4/twin4proc.cpp
+++ b/twin4/twin4/twin4proc.cpp
@@ -38,7 +38,7 @@
 #define START_REK 1    // (0) 1:Nur Stellungsbewertung bei Level 1
                        //     0:Level 1 schon eine Rekursion
 
-TDEComputer::TDEComputer() : TQObject(0,0)
+TDEComputer::TDEComputer() : TQObject(nullptr,nullptr)
 {
     InitField();
 
@@ -150,14 +150,14 @@ long TDEComputer::think(TQDataStream &in,TQDataStream &out,bool hint)
   fprintf(stderr,"CHECKSUM=%ld should be 421256\n",(long)tmp);
 
   time_t timea,timee;
-  timea=time(0);
+  timea=time(nullptr);
 
   int mymove;
   mymove= GetCompMove();
 
   fprintf(stderr,"Computermove to %d value=%ld\n",mymove,aktwert);
 
-  timee=time(0);
+  timee=time(nullptr);
   // Sleep a minimum amount to slow down moves
   if (timee-timea < MIN_TIME) sleep((MIN_TIME-(timee-timea)));
 
diff --git a/twin4/twin4/twin4view.cpp b/twin4/twin4/twin4view.cpp
index b51cf63e..9e18abbe 100644
--- a/twin4/twin4/twin4view.cpp
+++ b/twin4/twin4/twin4view.cpp
@@ -102,7 +102,7 @@ private:
 };
 
 Kwin4View::Kwin4View(Kwin4Doc *theDoc, TQWidget *parent, const char *name)
-        : TQCanvasView(0,parent, name), doc(theDoc)
+        : TQCanvasView(nullptr,parent, name), doc(theDoc)
 {
   mLastArrow=-1;
 
@@ -188,7 +188,7 @@ Kwin4View::Kwin4View(Kwin4Doc *theDoc, TQWidget *parent, const char *name)
 
 void Kwin4View::initView(bool deleteall)
 {
-  KSprite *sprite=0;
+  KSprite *sprite=nullptr;
   // mCanvas->setAdvancePeriod(period);
   mCanvas->setAdvancePeriod(15);
 
@@ -252,7 +252,7 @@ void Kwin4View::initView(bool deleteall)
 TQPixmap *Kwin4View::loadPixmap(TQString name)
 {
   if (!mCache)
-    return 0;
+    return nullptr;
   return mCache->loadPixmap(name);
 }
 
@@ -308,7 +308,7 @@ void Kwin4View::drawStar(int x,int y,int no)
 
 void Kwin4View::hideIntro()
 {
-  KSprite *sprite=0;
+  KSprite *sprite=nullptr;
   sprite=(KSprite *)(mCache->getItem("about",1));
   if (sprite) sprite->hide();
   sprite=(KSprite *)(mCache->getItem("win4about",1));
@@ -327,7 +327,7 @@ void Kwin4View::hideIntro()
 
 void Kwin4View::drawIntro(bool /*remove*/)
 {
-  KSprite *sprite=0;
+  KSprite *sprite=nullptr;
   // background
   sprite=(KSprite *)(mCache->getItem("about",1));
   if (sprite) sprite->show();
@@ -410,14 +410,14 @@ void Kwin4View::introMoveDone(TQCanvasItem *item,int )
   if (move)
   {
     delete move;
-    sprite->setMoveObject(0);
+    sprite->setMoveObject(nullptr);
   }
 }
 
 void Kwin4View::drawBoard(bool remove)
 {
-  KSprite *sprite=0;
-  KSprite *board=0;
+  KSprite *sprite=nullptr;
+  KSprite *board=nullptr;
   int x,y;
 
   // Board
@@ -503,7 +503,7 @@ void Kwin4View::setHint(int x,int y,bool enabled)
 
 void Kwin4View::setPiece(int x,int y,int color,int no,bool animation)
 {
-  KSprite *sprite=0;
+  KSprite *sprite=nullptr;
 
   y=5-y;
 
@@ -553,12 +553,12 @@ void Kwin4View::setPiece(int x,int y,int color,int no,bool animation)
 
 void Kwin4View::setArrow(int x,int color)
 {
-  KSprite *sprite=0;
+  KSprite *sprite=nullptr;
 
   if (mLastArrow>=0)
     sprite=(KSprite *)(mCache->getItem("arrow",mLastArrow));
   else 
-    sprite=0;
+    sprite=nullptr;
   if (sprite) 
     sprite->setFrame(0);
   
@@ -589,7 +589,7 @@ bool Kwin4View::wrongPlayer(KPlayer *player,KGameIO::IOMode io)
   KPlayer *p;
 
   bool flag=false;
-  for ( p=playerList->first(); p!= 0; p=playerList->next() )
+  for ( p=playerList->first(); p; p=playerList->next() )
   {
     if (p==player) continue;
     if (p->hasRtti(io) && p->myTurn()) flag=true;
diff --git a/twin4/twin4/twin4view.h b/twin4/twin4/twin4view.h
index e15ade83..e906013c 100644
--- a/twin4/twin4/twin4view.h
+++ b/twin4/twin4/twin4view.h
@@ -35,7 +35,7 @@ TQ_OBJECT
   
 
 public:
-  Kwin4View(Kwin4Doc *theDoc, TQWidget *parent = 0, const char *name=0);
+  Kwin4View(Kwin4Doc *theDoc, TQWidget *parent = nullptr, const char *name=nullptr);
 
   void initView(bool deleteall=true);
   void drawBoard(bool remove=false);
-- 
cgit v1.2.3

