From 4ea405580c3b25d256944c6603d4f6a31bcc393d Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sun, 8 Nov 2026 08:05:39 -0300
Subject: Replace zero pointer constants in calendar components
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>
---
 kalarm/alarmcalendar.cpp                           |  36 +++---
 kalarm/alarmevent.cpp                              |   8 +-
 kalarm/alarmevent.h                                |  10 +-
 kalarm/alarmlistview.cpp                           |   4 +-
 kalarm/alarmlistview.h                             |   2 +-
 kalarm/alarmtext.h                                 |   2 +-
 kalarm/alarmtimewidget.cpp                         |   4 +-
 kalarm/alarmtimewidget.h                           |   6 +-
 kalarm/birthdaydlg.cpp                             |   8 +-
 kalarm/birthdaydlg.h                               |   8 +-
 kalarm/daemon.cpp                                  |  22 ++--
 kalarm/daemon.h                                    |   2 +-
 kalarm/deferdlg.h                                  |   2 +-
 kalarm/editdlg.cpp                                 |  42 +++----
 kalarm/editdlg.h                                   |   8 +-
 kalarm/editdlgprivate.h                            |   4 +-
 kalarm/emailidcombo.h                              |   2 +-
 kalarm/eventlistviewbase.cpp                       |  12 +-
 kalarm/eventlistviewbase.h                         |   2 +-
 kalarm/find.cpp                                    |   8 +-
 kalarm/fontcolour.cpp                              |   6 +-
 kalarm/fontcolour.h                                |   2 +-
 kalarm/fontcolourbutton.cpp                        |   2 +-
 kalarm/fontcolourbutton.h                          |   4 +-
 kalarm/functions.cpp                               |   8 +-
 kalarm/functions.h                                 |  18 +--
 kalarm/kalarmapp.cpp                               |  62 +++++-----
 kalarm/kalarmapp.h                                 |   4 +-
 kalarm/kalarmd/adapp.cpp                           |   4 +-
 kalarm/kalarmd/adcalendar.cpp                      |   4 +-
 kalarm/kalarmd/admain.cpp                          |   4 +-
 kalarm/kalarmd/alarmdaemon.cpp                     |   4 +-
 kalarm/kalarmd/alarmdaemon.h                       |   2 +-
 kalarm/kalarmd/clientinfo.cpp                      |   6 +-
 kalarm/kalarmd/clientinfo.h                        |   2 +-
 kalarm/kamail.cpp                                  |  10 +-
 kalarm/kamail.h                                    |   2 +-
 kalarm/latecancel.h                                |   2 +-
 kalarm/lib/buttongroup.h                           |   8 +-
 kalarm/lib/checkbox.cpp                            |   4 +-
 kalarm/lib/checkbox.h                              |   4 +-
 kalarm/lib/colourcombo.h                           |   2 +-
 kalarm/lib/combobox.h                              |   4 +-
 kalarm/lib/dateedit.h                              |   2 +-
 kalarm/lib/label.cpp                               |  22 ++--
 kalarm/lib/label.h                                 |   8 +-
 kalarm/lib/lineedit.h                              |   4 +-
 kalarm/lib/messagebox.cpp                          |   2 +-
 kalarm/lib/messagebox.h                            |   2 +-
 kalarm/lib/pushbutton.h                            |   6 +-
 kalarm/lib/radiobutton.cpp                         |   4 +-
 kalarm/lib/radiobutton.h                           |   4 +-
 kalarm/lib/slider.h                                |   6 +-
 kalarm/lib/spinbox.cpp                             |   2 +-
 kalarm/lib/spinbox.h                               |   4 +-
 kalarm/lib/spinbox2.cpp                            |   4 +-
 kalarm/lib/spinbox2.h                              |   8 +-
 kalarm/lib/spinbox2private.h                       |   6 +-
 kalarm/lib/synchtimer.cpp                          |   6 +-
 kalarm/lib/synchtimer.h                            |  10 +-
 kalarm/lib/timeedit.cpp                            |   2 +-
 kalarm/lib/timeedit.h                              |   2 +-
 kalarm/lib/timeperiod.h                            |   2 +-
 kalarm/lib/timespinbox.cpp                         |   2 +-
 kalarm/lib/timespinbox.h                           |   4 +-
 kalarm/main.cpp                                    | 130 ++++++++++-----------
 kalarm/mainwindow.cpp                              |  38 +++---
 kalarm/mainwindow.h                                |   8 +-
 kalarm/mainwindowbase.h                            |   2 +-
 kalarm/messagewin.cpp                              |  96 +++++++--------
 kalarm/pickfileradio.cpp                           |   4 +-
 kalarm/pickfileradio.h                             |   6 +-
 kalarm/prefdlg.cpp                                 |   8 +-
 kalarm/preferences.cpp                             |   2 +-
 kalarm/recurrenceedit.cpp                          |  26 ++---
 kalarm/recurrenceedit.h                            |   4 +-
 kalarm/recurrenceeditprivate.h                     |  20 ++--
 kalarm/reminder.cpp                                |   2 +-
 kalarm/reminder.h                                  |   2 +-
 kalarm/repetition.cpp                              |   4 +-
 kalarm/repetition.h                                |   4 +-
 kalarm/sounddlg.cpp                                |  12 +-
 kalarm/sounddlg.h                                  |   2 +-
 kalarm/soundpicker.cpp                             |   2 +-
 kalarm/soundpicker.h                               |   2 +-
 kalarm/specialactions.h                            |   6 +-
 kalarm/startdaytimer.cpp                           |   2 +-
 kalarm/startdaytimer.h                             |   2 +-
 kalarm/templatedlg.cpp                             |  12 +-
 kalarm/templatedlg.h                               |   4 +-
 kalarm/templatelistview.h                          |   2 +-
 kalarm/templatemenuaction.h                        |   2 +-
 kalarm/templatepickdlg.h                           |   2 +-
 kalarm/timeselector.cpp                            |   2 +-
 kalarm/timeselector.h                              |   2 +-
 kalarm/traywindow.cpp                              |   8 +-
 kalarm/traywindow.h                                |   2 +-
 kalarm/undo.cpp                                    |  46 ++++----
 karm/csvexportdialog.h                             |   4 +-
 karm/edittaskdialog.cpp                            |   8 +-
 karm/edittaskdialog.h                              |   2 +-
 karm/idletimedetector.cpp                          |   2 +-
 karm/karm_part.cpp                                 |   8 +-
 karm/karmstorage.cpp                               |  16 +--
 karm/ktimewidget.cpp                               |   4 +-
 karm/ktimewidget.h                                 |   2 +-
 karm/main.cpp                                      |  24 ++--
 karm/mainwindow.cpp                                |   6 +-
 karm/plannerparser.cpp                             |   2 +-
 karm/preferences.cpp                               |   4 +-
 karm/print.cpp                                     |   2 +-
 karm/printdialog.cpp                               |   2 +-
 karm/task.cpp                                      |   4 +-
 karm/task.h                                        |   8 +-
 karm/taskview.cpp                                  |  40 +++----
 karm/taskview.h                                    |   4 +-
 karm/tdeaccelmenuwatch.cpp                         |   4 +-
 karm/tdeaccelmenuwatch.h                           |   2 +-
 karm/test/runscripts.cpp                           |   2 +-
 karm/test/script.cpp                               |   4 +-
 karm/tray.cpp                                      |   8 +-
 kdgantt/KDGanttMinimizeSplitter.cpp                |  14 +--
 kdgantt/KDGanttMinimizeSplitter.h                  |   6 +-
 kdgantt/KDGanttSemiSizingControl.cpp               |   8 +-
 kdgantt/KDGanttSemiSizingControl.h                 |  10 +-
 kdgantt/KDGanttSizingControl.h                     |   2 +-
 kdgantt/KDGanttView.cpp                            |  34 +++---
 kdgantt/KDGanttView.h                              |   6 +-
 kdgantt/KDGanttViewEventItem.cpp                   |   2 +-
 kdgantt/KDGanttViewItem.cpp                        |  62 +++++-----
 kdgantt/KDGanttViewSubwidgets.cpp                  | 120 +++++++++----------
 kdgantt/KDGanttViewSubwidgets.h                    |   4 +-
 kdgantt/KDGanttViewSummaryItem.cpp                 |   4 +-
 kdgantt/KDGanttViewTaskItem.cpp                    |   2 +-
 kdgantt/KDGanttViewTaskLink.cpp                    |  18 +--
 kdgantt/KDGanttViewTaskLinkGroup.cpp               |   4 +-
 kgantt/kgantt/KGantt.cpp                           |   4 +-
 kgantt/kgantt/KGantt.h                             |   6 +-
 kgantt/kgantt/KGanttBarConfig.h                    |   2 +-
 kgantt/kgantt/KGanttItem.cpp                       |  10 +-
 kgantt/kgantt/xQGanttBarView.h                     |   4 +-
 kgantt/kgantt/xQGanttBarViewPort.cpp               |  20 ++--
 kgantt/kgantt/xQGanttBarViewPort.h                 |   6 +-
 kgantt/kgantt/xQGanttListView.h                    |   4 +-
 kgantt/kgantt/xQGanttListViewPort.cpp              |   2 +-
 kgantt/kgantt/xQGanttListViewPort.h                |   4 +-
 korganizer/aboutdata.cpp                           |   2 +-
 korganizer/actionmanager.cpp                       |  38 +++---
 korganizer/agendaview.h                            |   2 +-
 korganizer/archivedialog.h                         |   2 +-
 korganizer/calendarview.cpp                        |  62 +++++-----
 korganizer/calendarview.h                          |  24 ++--
 korganizer/datechecker.cpp                         |   4 +-
 korganizer/datechecker.h                           |   2 +-
 korganizer/datenavigator.h                         |   2 +-
 korganizer/datenavigatorcontainer.cpp              |   2 +-
 korganizer/datenavigatorcontainer.h                |   2 +-
 korganizer/docprefs.cpp                            |   2 +-
 korganizer/eventarchiver.h                         |   2 +-
 korganizer/exportwebdialog.h                       |   4 +-
 korganizer/filtereditdialog.cpp                    |  14 +--
 korganizer/filtereditdialog.h                      |   2 +-
 korganizer/freebusymanager.cpp                     |  14 +--
 korganizer/freebusymanager.h                       |   2 +-
 korganizer/freebusyurldialog.h                     |   8 +-
 korganizer/history.cpp                             |  12 +-
 korganizer/importdialog.cpp                        |   4 +-
 korganizer/incidencechanger.cpp                    |   8 +-
 .../interfaces/calendar/calendardecoration.h       |   2 +-
 korganizer/interfaces/calendar/plugin.h            |   2 +-
 korganizer/interfaces/korganizer/baseview.h        |   4 +-
 .../interfaces/korganizer/incidencechangerbase.h   |   2 +-
 korganizer/interfaces/korganizer/part.h            |   6 +-
 korganizer/interfaces/korganizer/printplugin.h     |   4 +-
 korganizer/journalentry.cpp                        |  20 ++--
 korganizer/kdatenavigator.h                        |   2 +-
 korganizer/koagenda.cpp                            |  80 ++++++-------
 korganizer/koagenda.h                              |   8 +-
 korganizer/koagendaitem.cpp                        |  78 ++++++-------
 korganizer/koagendaitem.h                          |  14 +--
 korganizer/koagendaview.cpp                        |  16 +--
 korganizer/koagendaview.h                          |  10 +-
 korganizer/koattendeeeditor.cpp                    |   6 +-
 korganizer/koattendeeeditor.h                      |   4 +-
 korganizer/kocore.cpp                              |  38 +++---
 korganizer/kodaymatrix.cpp                         |   8 +-
 korganizer/kodialogmanager.cpp                     |  16 +--
 korganizer/koeditoralarms.cpp                      |   6 +-
 korganizer/koeditoralarms.h                        |   4 +-
 korganizer/koeditorattachments.cpp                 |  14 +--
 korganizer/koeditorattachments.h                   |   8 +-
 korganizer/koeditordetails.cpp                     |   6 +-
 korganizer/koeditordetails.h                       |   4 +-
 korganizer/koeditorfreebusy.cpp                    |  16 +--
 korganizer/koeditorfreebusy.h                      |   4 +-
 korganizer/koeditorgeneral.cpp                     |  12 +-
 korganizer/koeditorgeneral.h                       |   2 +-
 korganizer/koeditorgeneralevent.cpp                |  10 +-
 korganizer/koeditorgeneralevent.h                  |   2 +-
 korganizer/koeditorgeneraljournal.cpp              |   2 +-
 korganizer/koeditorgeneraljournal.h                |   2 +-
 korganizer/koeditorgeneraltodo.cpp                 |  12 +-
 korganizer/koeditorgeneraltodo.h                   |   2 +-
 korganizer/koeditorrecurrence.cpp                  |  28 ++---
 korganizer/koeditorrecurrence.h                    |  28 ++---
 korganizer/koeventeditor.cpp                       |   8 +-
 korganizer/koeventpopupmenu.cpp                    |   4 +-
 korganizer/koeventview.cpp                         |   4 +-
 korganizer/koeventview.h                           |   2 +-
 korganizer/koeventviewer.cpp                       |   6 +-
 korganizer/koeventviewer.h                         |   2 +-
 korganizer/koeventviewerdialog.h                   |   4 +-
 korganizer/koglobals.cpp                           |   4 +-
 korganizer/kogroupware.cpp                         |   6 +-
 korganizer/koidentitymanager.h                     |   2 +-
 korganizer/koincidenceeditor.cpp                   |  10 +-
 korganizer/koincidencetooltip.h                    |  10 +-
 korganizer/kojournaleditor.cpp                     |   6 +-
 korganizer/kojournalview.cpp                       |   6 +-
 korganizer/kojournalview.h                         |   4 +-
 korganizer/kolistview.cpp                          |  10 +-
 korganizer/kolistview.h                            |   4 +-
 korganizer/komailclient.cpp                        |   2 +-
 korganizer/komonthview.cpp                         |  26 ++---
 korganizer/komonthview.h                           |   4 +-
 korganizer/koprefs.cpp                             |   6 +-
 korganizer/koprefsdialog.cpp                       |   4 +-
 korganizer/koprefsdialog.h                         |   2 +-
 korganizer/korgac/alarmdialog.cpp                  |   4 +-
 korganizer/korgac/alarmdialog.h                    |   2 +-
 korganizer/korgac/alarmdockwindow.cpp              |   2 +-
 korganizer/korgac/alarmdockwindow.h                |   2 +-
 korganizer/korgac/koalarmclient.cpp                |   2 +-
 korganizer/korgac/koalarmclient.h                  |   2 +-
 korganizer/korgac/korgacmain.cpp                   |   6 +-
 korganizer/korganizer.cpp                          |   4 +-
 korganizer/korganizer.h                            |   2 +-
 korganizer/korganizer_options.h                    |  14 +--
 korganizer/korganizer_part.cpp                     |   2 +-
 korganizer/korganizerifaceimpl.h                   |   2 +-
 korganizer/kotimelineview.cpp                      |  18 +--
 korganizer/kotimelineview.h                        |   4 +-
 korganizer/kotodoeditor.cpp                        |  12 +-
 korganizer/kotodoeditor.h                          |   2 +-
 korganizer/kotodoview.cpp                          |  50 ++++----
 korganizer/kotodoview.h                            |   4 +-
 korganizer/kotodoviewitem.cpp                      |   2 +-
 korganizer/koviewmanager.cpp                       |  32 ++---
 korganizer/kowhatsnextview.cpp                     |   6 +-
 korganizer/kowhatsnextview.h                       |   4 +-
 korganizer/kowindowlist.cpp                        |   6 +-
 korganizer/kowindowlist.h                          |   2 +-
 korganizer/multiagendaview.cpp                     |  22 ++--
 korganizer/multiagendaview.h                       |   4 +-
 korganizer/navigatorbar.h                          |   4 +-
 korganizer/plugins/datenums/configdialog.h         |   2 +-
 korganizer/plugins/exchange/exchange.cpp           |  10 +-
 korganizer/plugins/exchange/exchangeconfig.h       |   2 +-
 korganizer/plugins/exchange/exchangedialog.h       |   2 +-
 korganizer/plugins/hebrew/configdialog.h           |   2 +-
 korganizer/previewdialog.cpp                       |   8 +-
 korganizer/printing/calprinter.cpp                 |   2 +-
 korganizer/printing/calprinter.h                   |   2 +-
 korganizer/printing/calprintpluginbase.cpp         |  12 +-
 korganizer/printing/calprintpluginbase.h           |   2 +-
 korganizer/publishdialog.h                         |   2 +-
 korganizer/resourceview.cpp                        |  10 +-
 korganizer/resourceview.h                          |   2 +-
 korganizer/searchdialog.cpp                        |   2 +-
 korganizer/searchdialog.h                          |   2 +-
 korganizer/statusdialog.h                          |   2 +-
 korganizer/stdcalendar.cpp                         |   6 +-
 korganizer/templatemanagementdialog.cpp            |   2 +-
 korganizer/timelabels.cpp                          |   2 +-
 korganizer/timelabels.h                            |   2 +-
 korganizer/timelineitem.cpp                        |   4 +-
 libkcal/assignmentvisitor.cpp                      |  24 ++--
 libkcal/attachment.cpp                             |   4 +-
 libkcal/attachmenthandler.cpp                      |  24 ++--
 libkcal/calendar.cpp                               |  10 +-
 libkcal/calendarlocal.cpp                          |   8 +-
 libkcal/calendarlocal.h                            |   4 +-
 libkcal/calendarnull.cpp                           |   2 +-
 libkcal/calendarnull.h                             |   6 +-
 libkcal/calendarresources.cpp                      |  26 ++---
 libkcal/calendarresources.h                        |  10 +-
 libkcal/calformat.cpp                              |   4 +-
 libkcal/calhelper.cpp                              |   8 +-
 libkcal/calselectdialog.cpp                        |   2 +-
 libkcal/comparisonvisitor.cpp                      |  14 +--
 libkcal/compat.cpp                                 |   4 +-
 libkcal/confirmsavedialog.h                        |   2 +-
 libkcal/dndfactory.cpp                             |  14 +--
 libkcal/dndfactory.h                               |   4 +-
 libkcal/filestorage.cpp                            |   2 +-
 libkcal/filestorage.h                              |   2 +-
 libkcal/freebusy.cpp                               |   2 +-
 libkcal/freebusyurlstore.cpp                       |   2 +-
 libkcal/icaldrag.h                                 |   2 +-
 libkcal/icalformat.cpp                             |  30 ++---
 libkcal/icalformatimpl.cpp                         |  42 +++----
 libkcal/icalformatimpl.h                           |   4 +-
 libkcal/incidence.cpp                              |  22 ++--
 libkcal/incidencebase.cpp                          |   6 +-
 libkcal/incidenceformatter.cpp                     |  34 +++---
 libkcal/incidenceformatter.h                       |   2 +-
 libkcal/recurrence.cpp                             |   8 +-
 libkcal/recurrencerule.cpp                         |   4 +-
 libkcal/recurrencerule.h                           |   2 +-
 libkcal/resourcecached.cpp                         |   4 +-
 libkcal/resourcecachedconfig.h                     |   4 +-
 libkcal/resourcecalendar.cpp                       |   4 +-
 libkcal/resourcecalendar.h                         |   2 +-
 libkcal/resourcelocal.cpp                          |   4 +-
 libkcal/resourcelocalconfig.h                      |   2 +-
 libkcal/resourcelocaldir.cpp                       |   4 +-
 libkcal/resourcelocaldirconfig.h                   |   2 +-
 libkcal/scheduler.cpp                              |  26 ++---
 libkcal/tests/readandwrite.cpp                     |   6 +-
 libkcal/tests/testcalendar.cpp                     |   2 +-
 libkcal/tests/testcalselectdialog.cpp              |   2 +-
 libkcal/tests/testfields.cpp                       |   2 +-
 libkcal/tests/testincidence.cpp                    |   2 +-
 libkcal/tests/testrecurprevious.cpp                |   8 +-
 libkcal/tests/testrecurrence.cpp                   |   8 +-
 libkcal/tests/testrecurrencetype.cpp               |   8 +-
 libkcal/tests/testrecurson.cpp                     |   8 +-
 libkcal/tests/testresource.cpp                     |  10 +-
 libkcal/tests/testvcalexport.cpp                   |   6 +-
 libkcal/vcaldrag.h                                 |   2 +-
 libkcal/vcalformat.cpp                             | 126 ++++++++++----------
 331 files changed, 1581 insertions(+), 1581 deletions(-)

diff --git a/kalarm/alarmcalendar.cpp b/kalarm/alarmcalendar.cpp
index 31d8898d7..e26f36403 100644
--- a/kalarm/alarmcalendar.cpp
+++ b/kalarm/alarmcalendar.cpp
@@ -75,7 +75,7 @@ static const TQString calendarNames[AlarmCalendar::NCALS] = {
 };
 static KStaticDeleter<AlarmCalendar> calendarDeleter[AlarmCalendar::NCALS];    // ensure that the calendar destructors are called
 
-AlarmCalendar* AlarmCalendar::mCalendars[NCALS] = { 0, 0, 0, 0 };
+AlarmCalendar* AlarmCalendar::mCalendars[NCALS] = { nullptr, nullptr, nullptr, nullptr };
 
 
 /******************************************************************************
@@ -177,7 +177,7 @@ void AlarmCalendar::terminateCalendars()
 	for (int i = 0;  i < NCALS;  ++i)
 	{
 		calendarDeleter[i].destructObject();
-		mCalendars[i] = 0;
+		mCalendars[i] = nullptr;
 	}
 }
 
@@ -190,11 +190,11 @@ AlarmCalendar* AlarmCalendar::calendarOpen(CalID id)
 {
 	AlarmCalendar* cal = mCalendars[id];
 	if (!cal->mPurgeDays)
-		return 0;     // all events are automatically purged from the calendar
+		return nullptr;     // all events are automatically purged from the calendar
 	if (cal->open())
 		return cal;
 	kdError(5950) << "AlarmCalendar::calendarOpen(" << calendarNames[id] << "): open error" << endl;
-	return 0;
+	return nullptr;
 }
 
 /******************************************************************************
@@ -204,7 +204,7 @@ AlarmCalendar* AlarmCalendar::calendarOpen(CalID id)
 const KCal::Event* AlarmCalendar::getEvent(const TQString& uniqueID)
 {
 	if (uniqueID.isEmpty())
-		return 0;
+		return nullptr;
 	CalID calID;
 	switch (KAEvent::uidStatus(uniqueID))
 	{
@@ -213,11 +213,11 @@ const KCal::Event* AlarmCalendar::getEvent(const TQString& uniqueID)
 		case KAEvent::EXPIRED:     calID = EXPIRED;  break;
 		case KAEvent::DISPLAYING:  calID = DISPLAY;  break;
 		default:
-			return 0;
+			return nullptr;
 	}
 	AlarmCalendar* cal = calendarOpen(calID);
 	if (!cal)
-		return 0;
+		return nullptr;
 	return cal->event(uniqueID);
 }
 
@@ -230,7 +230,7 @@ const KCal::Event* AlarmCalendar::getEvent(const TQString& uniqueID)
 */
 AlarmCalendar::AlarmCalendar(const TQString& path, CalID type, const TQString& icalPath,
                              const TQString& configKey)
-	: mCalendar(0),
+	: mCalendar(nullptr),
 	  mConfigKey(icalPath.isNull() ? TQString() : configKey),
 	  mType(eventTypes[type]),
 	  mPurgeDays(-1),      // default to not purging
@@ -284,7 +284,7 @@ bool AlarmCalendar::open()
 	if (!mOpen)
 	{
 		delete mCalendar;
-		mCalendar = 0;
+		mCalendar = nullptr;
 	}
 	return mOpen;
 }
@@ -321,7 +321,7 @@ int AlarmCalendar::load()
 	if (!TDEIO::NetAccess::download(mUrl, tmpFile, MainWindow::mainMainWindow()))
 	{
 		kdError(5950) << "AlarmCalendar::load(): Load failure" << endl;
-		KMessageBox::error(0, i18n("Cannot open calendar:\n%1").arg(mUrl.prettyURL()));
+		KMessageBox::error(nullptr, i18n("Cannot open calendar:\n%1").arg(mUrl.prettyURL()));
 		return -1;
 	}
 	kdDebug(5950) << "AlarmCalendar::load(): --- Downloaded to " << tmpFile << endl;
@@ -338,11 +338,11 @@ int AlarmCalendar::load()
 		if (!fi.size())
 			return 0;     // file is zero length
 		kdError(5950) << "AlarmCalendar::load(): Error loading calendar file '" << tmpFile << "'" << endl;
-		KMessageBox::error(0, i18n("Error loading calendar:\n%1\n\nPlease fix or delete the file.").arg(mUrl.prettyURL()));
+		KMessageBox::error(nullptr, i18n("Error loading calendar:\n%1\n\nPlease fix or delete the file.").arg(mUrl.prettyURL()));
 		// load() could have partially populated the calendar, so clear it out
 		mCalendar->close();
 		delete mCalendar;
-		mCalendar = 0;
+		mCalendar = nullptr;
 		return -1;
 	}
 	if (!mLocalFile.isEmpty())
@@ -383,7 +383,7 @@ bool AlarmCalendar::saveCal(const TQString& newFile)
 	if (!mCalendar->save(saveFilename, new ICalFormat))
 	{
 		kdError(5950) << "AlarmCalendar::saveCal(" << saveFilename << "): failed." << endl;
-		KMessageBox::error(0, i18n("Failed to save calendar to\n'%1'").arg(mICalUrl.prettyURL()));
+		KMessageBox::error(nullptr, i18n("Failed to save calendar to\n'%1'").arg(mICalUrl.prettyURL()));
 		return false;
 	}
 
@@ -392,7 +392,7 @@ bool AlarmCalendar::saveCal(const TQString& newFile)
 		if (!TDEIO::NetAccess::upload(saveFilename, mICalUrl, MainWindow::mainMainWindow()))
 		{
 			kdError(5950) << "AlarmCalendar::saveCal(" << saveFilename << "): upload failed." << endl;
-			KMessageBox::error(0, i18n("Cannot upload calendar to\n'%1'").arg(mICalUrl.prettyURL()));
+			KMessageBox::error(nullptr, i18n("Cannot upload calendar to\n'%1'").arg(mICalUrl.prettyURL()));
 			return false;
 		}
 	}
@@ -431,7 +431,7 @@ void AlarmCalendar::close()
 	{
 		mCalendar->close();
 		delete mCalendar;
-		mCalendar = 0;
+		mCalendar = nullptr;
 	}
 	mOpen = false;
 }
@@ -500,7 +500,7 @@ bool AlarmCalendar::importAlarms(TQWidget* parent)
 		bool saveTemplate = false;
 		AlarmCalendar* active  = activeCalendar();
 		AlarmCalendar* expired = expiredCalendar();
-		AlarmCalendar* templat = 0;
+		AlarmCalendar* templat = nullptr;
 		AlarmCalendar* acal;
 		Event::List events = cal.rawEvents();
 		for (Event::List::ConstIterator it = events.begin();  it != events.end();  ++it)
@@ -730,7 +730,7 @@ void AlarmCalendar::startPurgeTimer()
 Event* AlarmCalendar::addEvent(KAEvent& event, bool useEventID)
 {
 	if (!mOpen)
-		return 0;
+		return nullptr;
 	TQString id = event.id();
 	Event* kcalEvent = new Event;
 	if (mType == KAEvent::ACTIVE)
@@ -817,7 +817,7 @@ void AlarmCalendar::emitEmptyStatus()
 */
 KCal::Event* AlarmCalendar::event(const TQString& uniqueID)
 {
-	return mCalendar ?  mCalendar->event(uniqueID) : 0;
+	return mCalendar ?  mCalendar->event(uniqueID) : nullptr;
 }
 
 /******************************************************************************
diff --git a/kalarm/alarmevent.cpp b/kalarm/alarmevent.cpp
index db345243f..0cfcff864 100644
--- a/kalarm/alarmevent.cpp
+++ b/kalarm/alarmevent.cpp
@@ -200,7 +200,7 @@ void KAEvent::copy(const KAEvent& event)
 	if (event.mRecurrence)
 		mRecurrence = new KARecurrence(*event.mRecurrence);
 	else
-		mRecurrence = 0;
+		mRecurrence = nullptr;
 }
 
 /******************************************************************************
@@ -2192,7 +2192,7 @@ void KAEvent::setRecurrence(const KARecurrence& recurrence)
 		mRecurrence->setFloats(mStartDateTime.isDateOnly());
 	}
 	else
-		mRecurrence = 0;
+		mRecurrence = nullptr;
 
 	// Adjust sub-repetition values to fit the recurrence
 	setRepetition(mRepeatInterval, mRepeatCount);
@@ -2408,7 +2408,7 @@ bool KAEvent::setRecur(RecurrenceRule::PeriodType recurType, int freq, int count
 void KAEvent::clearRecur()
 {
 	delete mRecurrence;
-	mRecurrence     = 0;
+	mRecurrence     = nullptr;
 	mRepeatInterval = 0;
 	mRepeatCount    = 0;
 	mNextRepeat     = 0;
@@ -3194,7 +3194,7 @@ void KAAlarm::dumpDebug() const
 {
 	kdDebug(5950) << "KAAlarm dump:" << endl;
 	KAAlarmEventBase::dumpDebug();
-	const char* altype = 0;
+	const char* altype = nullptr;
 	switch (mType)
 	{
 		case MAIN__ALARM:                    altype = "MAIN";  break;
diff --git a/kalarm/alarmevent.h b/kalarm/alarmevent.h
index 6bda36d95..537c62e1c 100644
--- a/kalarm/alarmevent.h
+++ b/kalarm/alarmevent.h
@@ -309,11 +309,11 @@ class KAEvent : public KAAlarmEventBase
 			LIMIT_REMINDER
 		};
 
-		KAEvent()          : mRevision(0), mRecurrence(0), mAlarmCount(0) { }
+		KAEvent()          : mRevision(0), mRecurrence(nullptr), mAlarmCount(0) { }
 		KAEvent(const TQDateTime& dt, const TQString& message, const TQColor& bg, const TQColor& fg, const TQFont& f, Action action, int lateCancel, int flags)
-		                                        : mRecurrence(0) { set(dt, message, bg, fg, f, action, lateCancel, flags); }
-		explicit KAEvent(const KCal::Event& e)  : mRecurrence(0) { set(e); }
-		KAEvent(const KAEvent& e)               : KAAlarmEventBase(e), mRecurrence(0) { copy(e); }
+		                                        : mRecurrence(nullptr) { set(dt, message, bg, fg, f, action, lateCancel, flags); }
+		explicit KAEvent(const KCal::Event& e)  : mRecurrence(nullptr) { set(e); }
+		KAEvent(const KAEvent& e)               : KAAlarmEventBase(e), mRecurrence(nullptr) { copy(e); }
 		~KAEvent()         { delete mRecurrence; }
 		KAEvent&           operator=(const KAEvent& e)       { if (&e != this) copy(e);  return *this; }
 		void               set(const KCal::Event&);
@@ -377,7 +377,7 @@ class KAEvent : public KAAlarmEventBase
 		bool               reminderDeferral() const       { return mDeferral == REMINDER_DEFERRAL; }
 		int                reminderArchived() const       { return mArchiveReminderMinutes; }
 		DateTime           deferDateTime() const          { return mDeferralTime; }
-		DateTime           deferralLimit(DeferLimitType* = 0) const;
+		DateTime           deferralLimit(DeferLimitType* = nullptr) const;
 		int                deferDefaultMinutes() const    { return mDeferDefaultMinutes; }
 		DateTime           displayDateTime() const;
 		const TQString&    messageFileOrCommand() const   { return mText; }
diff --git a/kalarm/alarmlistview.cpp b/kalarm/alarmlistview.cpp
index d0e5ab0f5..b7cb8fa79 100644
--- a/kalarm/alarmlistview.cpp
+++ b/kalarm/alarmlistview.cpp
@@ -155,7 +155,7 @@ AlarmListView::AlarmListView(const TQValueList<int>& order, TQWidget* parent, co
 AlarmListView::~AlarmListView()
 {
 	delete mTooltip;
-	mTooltip = 0;
+	mTooltip = nullptr;
 	mInstanceList.remove(this);
 }
 
@@ -280,7 +280,7 @@ void AlarmListView::addEvent(const KAEvent& event, EventListViewBase* view)
 AlarmListViewItem* AlarmListView::addEntry(const KAEvent& event, const TQDateTime& now, bool setSize, bool reselect)
 {
 	if (!mShowExpired  &&  event.expired())
-		return 0;
+		return nullptr;
 	AlarmListViewItem* item = new AlarmListViewItem(this, event, now);
 	return static_cast<AlarmListViewItem*>(EventListViewBase::addEntry(item, setSize, reselect));
 }
diff --git a/kalarm/alarmlistview.h b/kalarm/alarmlistview.h
index 9da667ed1..4c8904569 100644
--- a/kalarm/alarmlistview.h
+++ b/kalarm/alarmlistview.h
@@ -71,7 +71,7 @@ class AlarmListView : public EventListViewBase
 			COLUMN_COUNT
 		};
 
-		AlarmListView(const TQValueList<int>& order, TQWidget* parent = 0, const char* name = 0);
+		AlarmListView(const TQValueList<int>& order, TQWidget* parent = nullptr, const char* name = nullptr);
 		~AlarmListView();
 		void                   showExpired(bool show)      { mShowExpired = show; }
 		bool                   showingExpired() const      { return mShowExpired; }
diff --git a/kalarm/alarmtext.h b/kalarm/alarmtext.h
index e5eb7d974..af2b82eef 100644
--- a/kalarm/alarmtext.h
+++ b/kalarm/alarmtext.h
@@ -46,7 +46,7 @@ class AlarmText
 		bool           isEmail() const            { return mIsEmail; }
 		bool           isScript() const           { return mIsScript; }
 		unsigned long  kmailSerialNumber() const  { return mKMailSerialNum; }
-		static TQString summary(const KAEvent&, int maxLines = 1, bool* truncated = 0);
+		static TQString summary(const KAEvent&, int maxLines = 1, bool* truncated = nullptr);
 		static bool    checkIfEmail(const TQString&);
 		static TQString emailHeaders(const TQString&, bool subjectOnly);
 		static TQString fromCalendarText(const TQString&, bool& email);
diff --git a/kalarm/alarmtimewidget.cpp b/kalarm/alarmtimewidget.cpp
index 6586b8968..4e8151756 100644
--- a/kalarm/alarmtimewidget.cpp
+++ b/kalarm/alarmtimewidget.cpp
@@ -122,7 +122,7 @@ void AlarmTimeWidget::init(int mode)
 	if (mode & DEFER_TIME)
 	{
 		mAnyTimeAllowed = false;
-		mAnyTimeCheckBox = 0;
+		mAnyTimeCheckBox = nullptr;
 	}
 	else
 	{
@@ -224,7 +224,7 @@ DateTime AlarmTimeWidget::getDateTime(int* minsFromNow, bool checkExpired, bool
 	if (minsFromNow)
 		*minsFromNow = 0;
 	if (errorWidget)
-		*errorWidget = 0;
+		*errorWidget = nullptr;
 	TQTime nowt = TQTime::currentTime();
 	TQDateTime now(TQDate::currentDate(), TQTime(nowt.hour(), nowt.minute()));
 	if (mAtTimeRadio->isOn())
diff --git a/kalarm/alarmtimewidget.h b/kalarm/alarmtimewidget.h
index d384c0542..bdf5a8a6f 100644
--- a/kalarm/alarmtimewidget.h
+++ b/kalarm/alarmtimewidget.h
@@ -41,9 +41,9 @@ class AlarmTimeWidget : public ButtonGroup
 			DEFER_TIME   = 0x01,   // "Defer to ..."
 			NARROW       = 0x02    // make a narrow widget
 		};
-		AlarmTimeWidget(const TQString& groupBoxTitle, int mode, TQWidget* parent = 0, const char* name = 0);
-		AlarmTimeWidget(int mode, TQWidget* parent = 0, const char* name = 0);
-		DateTime         getDateTime(int* minsFromNow = 0, bool checkExpired = true, bool showErrorMessage = true, TQWidget** errorWidget = 0) const;
+		AlarmTimeWidget(const TQString& groupBoxTitle, int mode, TQWidget* parent = nullptr, const char* name = nullptr);
+		AlarmTimeWidget(int mode, TQWidget* parent = nullptr, const char* name = nullptr);
+		DateTime         getDateTime(int* minsFromNow = nullptr, bool checkExpired = true, bool showErrorMessage = true, TQWidget** errorWidget = nullptr) const;
 		void             setDateTime(const DateTime&);
 		void             setMinDateTimeIsCurrent();
 		void             setMinDateTime(const TQDateTime& = TQDateTime());
diff --git a/kalarm/birthdaydlg.cpp b/kalarm/birthdaydlg.cpp
index 02ba99870..b7f9de748 100644
--- a/kalarm/birthdaydlg.cpp
+++ b/kalarm/birthdaydlg.cpp
@@ -67,12 +67,12 @@ class AddresseeItem : public TQListViewItem
 };
 
 
-const TDEABC::AddressBook* BirthdayDlg::mAddressBook = 0;
+const TDEABC::AddressBook* BirthdayDlg::mAddressBook = nullptr;
 
 
 BirthdayDlg::BirthdayDlg(TQWidget* parent)
 	: KDialogBase(KDialogBase::Plain, i18n("Import Birthdays From KAddressBook"), Ok|Cancel, Ok, parent, "BirthdayDlg"),
-	  mSpecialActionsButton(0)
+	  mSpecialActionsButton(nullptr)
 {
 	TQWidget* topWidget = plainPage();
 	TQBoxLayout* topLayout = new TQVBoxLayout(topWidget);
@@ -213,7 +213,7 @@ void BirthdayDlg::close()
 	if (mAddressBook)
 	{
 		TDEABC::StdAddressBook::close();
-		mAddressBook = 0;
+		mAddressBook = nullptr;
 	}
 }
 
@@ -253,7 +253,7 @@ void BirthdayDlg::updateSelectionList()
 			bool alarmExists = (messageList.find(text) != messageList.end());
 			// Check if the birthday is already in the selection list
 			bool inSelectionList = false;
-			AddresseeItem* item = 0;
+			AddresseeItem* item = nullptr;
 			for (TQListViewItem* qitem = mAddresseeList->firstChild();  qitem;  qitem = qitem->nextSibling())
 			{
 				item = dynamic_cast<AddresseeItem*>(qitem);
diff --git a/kalarm/birthdaydlg.h b/kalarm/birthdaydlg.h
index aa7c66aec..352003fb4 100644
--- a/kalarm/birthdaydlg.h
+++ b/kalarm/birthdaydlg.h
@@ -45,7 +45,7 @@ class BirthdayDlg : public KDialogBase
 		TQ_OBJECT
   
 	public:
-		BirthdayDlg(TQWidget* parent = 0);
+		BirthdayDlg(TQWidget* parent = nullptr);
 		TQValueList<KAEvent> events() const;
 		static void close();
 
@@ -82,9 +82,9 @@ class BLineEdit : public TQLineEdit
 		TQ_OBJECT
   
 	public:
-		BLineEdit(TQWidget* parent = 0, const char* name = 0)
+		BLineEdit(TQWidget* parent = nullptr, const char* name = nullptr)
 			     : TQLineEdit(parent, name) {}
-		BLineEdit(const TQString& text, TQWidget* parent = 0, const char* name = 0)
+		BLineEdit(const TQString& text, TQWidget* parent = nullptr, const char* name = nullptr)
 			     : TQLineEdit(text, parent, name) {}
 	signals:
 		void         focusLost();
@@ -97,7 +97,7 @@ class BListView : public TDEListView
 		TQ_OBJECT
   
 	public:
-		BListView(TQWidget* parent = 0, const char* name = 0);
+		BListView(TQWidget* parent = nullptr, const char* name = nullptr);
 	public slots:
 		virtual void slotSelectAll()   { selectAll(true); }
 		virtual void slotDeselect()    { selectAll(false); }
diff --git a/kalarm/daemon.cpp b/kalarm/daemon.cpp
index cecb15a79..df30f1e6a 100644
--- a/kalarm/daemon.cpp
+++ b/kalarm/daemon.cpp
@@ -64,13 +64,13 @@ class NotificationHandler : public TQObject, virtual public AlarmGuiIface
 };
 
 
-Daemon*               Daemon::mInstance = 0;
-NotificationHandler*  Daemon::mDcopHandler = 0;
+Daemon*               Daemon::mInstance = nullptr;
+NotificationHandler*  Daemon::mDcopHandler = nullptr;
 TQValueList<TQString> Daemon::mQueuedEvents;
 TQValueList<TQString> Daemon::mSavingEvents;
-TQTimer*              Daemon::mStartTimer = 0;
-TQTimer*              Daemon::mRegisterTimer = 0;
-TQTimer*              Daemon::mStatusTimer = 0;
+TQTimer*              Daemon::mStartTimer = nullptr;
+TQTimer*              Daemon::mRegisterTimer = nullptr;
+TQTimer*              Daemon::mStatusTimer = nullptr;
 int                   Daemon::mStatusTimerCount = 0;
 int                   Daemon::mStatusTimerInterval;
 int                   Daemon::mStartTimeout = 0;
@@ -137,7 +137,7 @@ bool Daemon::start()
 			TQString execStr = locate("exe", TQString::fromLatin1(DAEMON_APP_NAME));
 			if (execStr.isEmpty())
 			{
-				KMessageBox::error(0, i18n("Alarm daemon not found."));
+				KMessageBox::error(nullptr, i18n("Alarm daemon not found."));
 				kdError() << "Daemon::startApp(): " DAEMON_APP_NAME " not found" << endl;
 				return false;
 			}
@@ -213,7 +213,7 @@ void Daemon::registrationResult(bool reregister, int result, int version)
 {
 	kdDebug(5950) << "Daemon::registrationResult(" << reregister << ") version: " << version << endl;
 	delete mRegisterTimer;
-	mRegisterTimer = 0;
+	mRegisterTimer = nullptr;
 	bool failed = false;
 	TQString errmsg;
 	if (version  &&  version != DAEMON_VERSION_NUM)
@@ -234,7 +234,7 @@ void Daemon::registrationResult(bool reregister, int result, int version)
 				// find the KAlarm executable so won't be able to restart KAlarm if
 				// KAlarm exits.
 				kdError(5950) << "Daemon::registrationResult(" << reregister << "): registerApp dcop call: " << tdeApp->aboutData()->appName() << " not found" << endl;
-				KMessageBox::error(0, i18n("Alarms will be disabled if you stop KAlarm.\n"
+				KMessageBox::error(nullptr, i18n("Alarms will be disabled if you stop KAlarm.\n"
 							   "(Installation or configuration error: %1 cannot locate %2 executable.)")
 							   .arg(TQString::fromLatin1(DAEMON_APP_NAME))
 							   .arg(tdeApp->aboutData()->appName()));
@@ -263,7 +263,7 @@ void Daemon::registrationResult(bool reregister, int result, int version)
 			if (!mRegisterFailMsg)
 			{
 				mRegisterFailMsg = true;
-				KMessageBox::error(0, errmsg);
+				KMessageBox::error(nullptr, errmsg);
 			}
 		}
 		return;
@@ -300,11 +300,11 @@ void Daemon::checkIfStarted()
 			break;
 	}
 	delete mStartTimer;
-	mStartTimer = 0;
+	mStartTimer = nullptr;
 	if (err)
 	{
 		kdError(5950) << "Daemon::checkIfStarted(): failed to start daemon" << endl;
-		KMessageBox::error(0, i18n("Cannot enable alarms:\nFailed to start Alarm Daemon (%1)").arg(TQString::fromLatin1(DAEMON_APP_NAME)));
+		KMessageBox::error(nullptr, i18n("Cannot enable alarms:\nFailed to start Alarm Daemon (%1)").arg(TQString::fromLatin1(DAEMON_APP_NAME)));
 	}
 }
 
diff --git a/kalarm/daemon.h b/kalarm/daemon.h
index b74410389..0238de0e7 100644
--- a/kalarm/daemon.h
+++ b/kalarm/daemon.h
@@ -122,7 +122,7 @@ class AlarmEnableAction : public TDEToggleAction
 		TQ_OBJECT
   
 	public:
-		AlarmEnableAction(int accel, TQObject* parent, const char* name = 0);
+		AlarmEnableAction(int accel, TQObject* parent, const char* name = nullptr);
 	public slots:
 		void         setCheckedActual(bool);  // set state and emit switched() signal
 		virtual void setChecked(bool);        // request state change and emit userClicked() signal
diff --git a/kalarm/deferdlg.h b/kalarm/deferdlg.h
index 70fb1e6eb..e4a51e89f 100644
--- a/kalarm/deferdlg.h
+++ b/kalarm/deferdlg.h
@@ -33,7 +33,7 @@ class DeferAlarmDlg : public KDialogBase
   
 	public:
 		DeferAlarmDlg(const TQString& caption, const DateTime& initialDT,
-		              bool cancelButton, TQWidget* parent = 0, const char* name = 0);
+		              bool cancelButton, TQWidget* parent = nullptr, const char* name = nullptr);
 		void             setLimit(const DateTime&);
 		DateTime         setLimit(const TQString& eventID);
 		const DateTime&  getDateTime() const   { return mAlarmDateTime; }
diff --git a/kalarm/editdlg.cpp b/kalarm/editdlg.cpp
index 5652ba660..c1746e4dc 100644
--- a/kalarm/editdlg.cpp
+++ b/kalarm/editdlg.cpp
@@ -97,7 +97,7 @@ static const int  maxDelayTime = 99*60 + 59;    // < 100 hours
 class PickAlarmFileRadio : public PickFileRadio
 {
     public:
-	PickAlarmFileRadio(const TQString& text, TQButtonGroup* parent, const char* name = 0)
+	PickAlarmFileRadio(const TQString& text, TQButtonGroup* parent, const char* name = nullptr)
 		: PickFileRadio(text, parent, name) { }
 	virtual TQString pickFile()    // called when browse button is pressed to select a file to display
 	{
@@ -114,7 +114,7 @@ class PickAlarmFileRadio : public PickFileRadio
 class PickLogFileRadio : public PickFileRadio
 {
     public:
-	PickLogFileRadio(TQPushButton* b, LineEdit* e, const TQString& text, TQButtonGroup* parent, const char* name = 0)
+	PickLogFileRadio(TQPushButton* b, LineEdit* e, const TQString& text, TQButtonGroup* parent, const char* name = nullptr)
 		: PickFileRadio(b, e, text, parent, name) { }
 	virtual TQString pickFile()    // called when browse button is pressed to select a log file
 	{
@@ -173,19 +173,19 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* par
 	  mMainPageShown(false),
 	  mRecurPageShown(false),
 	  mRecurSetDefaultEndDate(true),
-	  mTemplateName(0),
-	  mSpecialActionsButton(0),
+	  mTemplateName(nullptr),
+	  mSpecialActionsButton(nullptr),
 	  mReminderDeferral(false),
 	  mReminderArchived(false),
-	  mEmailRemoveButton(0),
-	  mDeferGroup(0),
-	  mTimeWidget(0),
-	  mShowInKorganizer(0),
+	  mEmailRemoveButton(nullptr),
+	  mDeferGroup(nullptr),
+	  mTimeWidget(nullptr),
+	  mShowInKorganizer(nullptr),
 	  mDeferGroupHeight(0),
 	  mTemplate(Template),
 	  mDesiredReadOnly(readOnly),
 	  mReadOnly(readOnly),
-	  mSavedEvent(0)
+	  mSavedEvent(nullptr)
 {
 	setButtonText(Default, i18n("Load Template..."));
 	TQVBox* mainWidget = new TQVBox(this);
@@ -397,7 +397,7 @@ EditAlarmDlg::EditAlarmDlg(bool Template, const TQString& caption, TQWidget* par
 		mTemplateName->setFocus();
 
 	// Save the initial state of all controls so that we can later tell if they have changed
-	saveState((event && (mTemplate || !event->isTemplate())) ? event : 0);
+	saveState((event && (mTemplate || !event->isTemplate())) ? event : nullptr);
 
 	// Note the current desktop so that the dialog can be shown on it.
 	// If a main window is visible, the dialog will by KDE default always appear on its
@@ -446,7 +446,7 @@ void EditAlarmDlg::initDisplayAlarms(TQWidget* parent)
 	mFontColourButton->setMaximumHeight(mFontColourButton->sizeHint().height());
 	frameLayout->addWidget(mFontColourButton);
 
-	TQHBoxLayout* layout = new TQHBoxLayout(frameLayout, 0, 0);
+	TQHBoxLayout* layout = new TQHBoxLayout(frameLayout, 0, nullptr);
 	mBgColourBox = new TQHBox(mDisplayAlarmsFrame);
 	mBgColourBox->setSpacing(spacingHint());
 	layout->addWidget(mBgColourBox);
@@ -564,7 +564,7 @@ void EditAlarmDlg::initEmail(TQWidget* parent)
 	TQGridLayout* grid = new TQGridLayout(layout, 3, 3, spacingHint());
 	grid->setColStretch(1, 1);
 
-	mEmailFromList = 0;
+	mEmailFromList = nullptr;
 	if (Preferences::emailFrom() == Preferences::MAIL_FROM_KMAIL)
 	{
 		// Email sender identity
@@ -986,7 +986,7 @@ CheckBox* EditAlarmDlg::createConfirmAckCheckbox(TQWidget* parent, const char* n
 void EditAlarmDlg::saveState(const KAEvent* event)
 {
 	delete mSavedEvent;
-	mSavedEvent = 0;
+	mSavedEvent = nullptr;
 	if (event)
 		mSavedEvent = new KAEvent(*event);
 	if (mTemplate)
@@ -1025,7 +1025,7 @@ void EditAlarmDlg::saveState(const KAEvent* event)
 		mSavedEmailAttach += mEmailAttachList->text(i);
 	mSavedEmailBcc         = mEmailBcc->isChecked();
 	if (mTimeWidget)
-		mSavedDateTime = mTimeWidget->getDateTime(0, false, false);
+		mSavedDateTime = mTimeWidget->getDateTime(nullptr, false, false);
 	mSavedLateCancel       = mLateCancel->minutes();
 	mSavedAutoClose        = mLateCancel->isAutoClose();
 	if (mShowInKorganizer)
@@ -1057,7 +1057,7 @@ bool EditAlarmDlg::stateChanged() const
 			return true;
 	}
 	else
-		if (mSavedDateTime != mTimeWidget->getDateTime(0, false, false))
+		if (mSavedDateTime != mTimeWidget->getDateTime(nullptr, false, false))
 			return true;
 	if (mSavedTypeRadio        != mActionGroup->selected()
 	||  mSavedLateCancel       != mLateCancel->minutes()
@@ -1364,7 +1364,7 @@ void EditAlarmDlg::slotOk()
 	else
 	{
 		TQWidget* errWidget;
-		mAlarmDateTime = mTimeWidget->getDateTime(0, !timedRecurrence, false, &errWidget);
+		mAlarmDateTime = mTimeWidget->getDateTime(nullptr, !timedRecurrence, false, &errWidget);
 		if (errWidget)
 		{
 			// It's more than just an existing deferral being changed, so the time matters
@@ -1486,7 +1486,7 @@ void EditAlarmDlg::slotTry()
 			{
 				theApp()->commandMessage((ShellProcess*)proc, this);
 				KMessageBox::information(this, i18n("Command executed:\n%1").arg(text));
-				theApp()->commandMessage((ShellProcess*)proc, 0);
+				theApp()->commandMessage((ShellProcess*)proc, nullptr);
 			}
 			else if (mEmailRadio->isOn())
 			{
@@ -1529,7 +1529,7 @@ void EditAlarmDlg::slotEditDeferral()
 	int repeatInterval;
 	int repeatCount = mRecurrenceEdit->subRepeatCount(&repeatInterval);
 	DateTime start = mSavedEvent->recurs() ? (mExpiredRecurrence ? DateTime() : mSavedEvent->mainDateTime())
-	               : mTimeWidget->getDateTime(0, !repeatCount, !mExpiredRecurrence);
+	               : mTimeWidget->getDateTime(nullptr, !repeatCount, !mExpiredRecurrence);
 	if (!start.isValid())
 	{
 		if (!mExpiredRecurrence)
@@ -1611,7 +1611,7 @@ void EditAlarmDlg::slotShowRecurrenceEdit()
 	if (!mReadOnly  &&  !mTemplate)
 	{
 		TQDateTime now = TQDateTime::currentDateTime();
-		mAlarmDateTime = mTimeWidget->getDateTime(0, false, false);
+		mAlarmDateTime = mTimeWidget->getDateTime(nullptr, false, false);
 		bool expired = (mAlarmDateTime.dateTime() < now);
 		if (mRecurSetDefaultEndDate)
 		{
@@ -1641,7 +1641,7 @@ void EditAlarmDlg::slotRecurTypeChange(int repeatType)
 		mTimeWidget->enableAnyTime(!recurs || repeatType != RecurrenceEdit::SUBDAILY);
 		if (atLogin)
 		{
-			mAlarmDateTime = mTimeWidget->getDateTime(0, false, false);
+			mAlarmDateTime = mTimeWidget->getDateTime(nullptr, false, false);
 			mRecurrenceEdit->setEndDateTime(mAlarmDateTime.dateTime());
 		}
 		mReminder->enableOnceOnly(recurs && !atLogin);
@@ -1773,7 +1773,7 @@ bool EditAlarmDlg::checkEmailData()
 void EditAlarmDlg::slotAlarmTypeChanged(int)
 {
 	bool displayAlarm = false;
-	TQWidget* focus = 0;
+	TQWidget* focus = nullptr;
 	if (mMessageRadio->isOn())
 	{
 		mFileBox->hide();
diff --git a/kalarm/editdlg.h b/kalarm/editdlg.h
index f6e2b16a3..25da9d720 100644
--- a/kalarm/editdlg.h
+++ b/kalarm/editdlg.h
@@ -63,13 +63,13 @@ class EditAlarmDlg : public KDialogBase
 		enum MessageType { MESSAGE, FILE };
 		enum CmdLogType { DISCARD_OUTPUT, LOG_TO_FILE, EXEC_IN_TERMINAL };
 
-		EditAlarmDlg(bool Template, const TQString& caption, TQWidget* parent = 0, const char* name = 0,
-                     const KAEvent* = 0, bool readOnly = false);
+		EditAlarmDlg(bool Template, const TQString& caption, TQWidget* parent = nullptr, const char* name = nullptr,
+                     const KAEvent* = nullptr, bool readOnly = false);
 		virtual ~EditAlarmDlg();
 		bool            getEvent(KAEvent&);
 		void            setAction(KAEvent::Action, const AlarmText& = AlarmText());
 
-		static CheckBox* createConfirmAckCheckbox(TQWidget* parent, const char* name = 0);
+		static CheckBox* createConfirmAckCheckbox(TQWidget* parent, const char* name = nullptr);
 
 		static TQString i18n_ConfirmAck();         // plain text of 'Confirm acknowledgement' checkbox
 		static TQString i18n_k_ConfirmAck();       // text of 'Confirm acknowledgement' checkbox, with 'k' shortcut
@@ -122,7 +122,7 @@ class EditAlarmDlg : public KDialogBase
 		int             getAlarmFlags() const;
 		bool            checkText(TQString& result, bool showErrorMessage = true) const;
 		void            setSoundPicker();
-		void            setRecurTabTitle(const KAEvent* = 0);
+		void            setRecurTabTitle(const KAEvent* = nullptr);
 		bool            checkCommandData();
 		bool            checkEmailData();
 
diff --git a/kalarm/editdlgprivate.h b/kalarm/editdlgprivate.h
index f44824fb8..8cb80bf43 100644
--- a/kalarm/editdlgprivate.h
+++ b/kalarm/editdlgprivate.h
@@ -29,7 +29,7 @@ class PageFrame : public TQFrame
 		TQ_OBJECT
   
 	public:
-		PageFrame(TQWidget* parent = 0, const char* name = 0) : TQFrame(parent, name) { }
+		PageFrame(TQWidget* parent = nullptr, const char* name = nullptr) : TQFrame(parent, name) { }
 	protected:
 		virtual void     showEvent(TQShowEvent*)    { emit shown(); }
 	signals:
@@ -41,7 +41,7 @@ class TextEdit : public KTextEdit
 		TQ_OBJECT
   
 	public:
-		TextEdit(TQWidget* parent, const char* name = 0);
+		TextEdit(TQWidget* parent, const char* name = nullptr);
 	protected:
 		virtual void dragEnterEvent(TQDragEnterEvent*);
 };
diff --git a/kalarm/emailidcombo.h b/kalarm/emailidcombo.h
index 630212d5a..058507b7c 100644
--- a/kalarm/emailidcombo.h
+++ b/kalarm/emailidcombo.h
@@ -30,7 +30,7 @@ class EmailIdCombo : public KPIM::IdentityCombo
 		TQ_OBJECT
   
 	public:
-		explicit EmailIdCombo(KPIM::IdentityManager*, TQWidget* parent = 0, const char* name = 0);
+		explicit EmailIdCombo(KPIM::IdentityManager*, TQWidget* parent = nullptr, const char* name = nullptr);
 		void  setReadOnly(bool ro)    { mReadOnly = ro; }
 	protected:
 		virtual void mousePressEvent(TQMouseEvent*);
diff --git a/kalarm/eventlistviewbase.cpp b/kalarm/eventlistviewbase.cpp
index 2425a11b7..37642c89a 100644
--- a/kalarm/eventlistviewbase.cpp
+++ b/kalarm/eventlistviewbase.cpp
@@ -47,7 +47,7 @@ class EventListWhatsThisBase : public TQWhatsThis
 
 EventListViewBase::EventListViewBase(TQWidget* parent, const char* name)
 	: TDEListView(parent, name),
-	  mFind(0),
+	  mFind(nullptr),
 	  mLastColumn(-1),
 	  mLastColumnHeaderWidth(0)
 {
@@ -95,7 +95,7 @@ EventListViewItemBase* EventListViewBase::getEntry(const TQString& eventID) cons
 			if (item->event().id() == eventID)
 				return item;
 	}
-	return 0;
+	return nullptr;
 }
 
 /******************************************************************************
@@ -150,7 +150,7 @@ void EventListViewBase::deleteEvent(const TQString& eventID, const InstanceList&
 EventListViewItemBase* EventListViewBase::addEntry(const KAEvent& event, bool setSize, bool reselect)
 {
 	if (!shouldShowEvent(event))
-		return 0;
+		return nullptr;
 	return addEntry(createItem(event), setSize, reselect);
 }
 
@@ -251,7 +251,7 @@ bool EventListViewBase::anySelected() const
 const KAEvent* EventListViewBase::selectedEvent() const
 {
 	EventListViewItemBase* sel = selectedItem();
-	return sel ? &sel->event() : 0;
+	return sel ? &sel->event() : nullptr;
 }
 
 /******************************************************************************
@@ -265,13 +265,13 @@ EventListViewItemBase* EventListViewBase::selectedItem() const
 	if (selectionMode() == TQListView::Single)
 		return (EventListViewItemBase*)TDEListView::selectedItem();
 
-	TQListViewItem* item = 0;
+	TQListViewItem* item = nullptr;
 	for (TQListViewItem* it = firstChild();  it;  it = it->nextSibling())
 	{
 		if (isSelected(it))
 		{
 			if (item)
-				return 0;
+				return nullptr;
 			item = it;
 		}
 	}
diff --git a/kalarm/eventlistviewbase.h b/kalarm/eventlistviewbase.h
index 18d1a7716..6e5b9cbc0 100644
--- a/kalarm/eventlistviewbase.h
+++ b/kalarm/eventlistviewbase.h
@@ -42,7 +42,7 @@ class EventListViewBase : public TDEListView
 		typedef TQValueListIterator<EventListViewBase*>      InstanceListIterator;
 		typedef TQValueListConstIterator<EventListViewBase*> InstanceListConstIterator;
 
-		EventListViewBase(TQWidget* parent = 0, const char* name = 0);
+		EventListViewBase(TQWidget* parent = nullptr, const char* name = nullptr);
 		virtual ~EventListViewBase()  { }
 		EventListViewItemBase* getEntry(const TQString& eventID) const;
 		void                   addEvent(const KAEvent& e)  { addEvent(e, instances(), this); }
diff --git a/kalarm/find.cpp b/kalarm/find.cpp
index 9e30388ed..4e6a896e8 100644
--- a/kalarm/find.cpp
+++ b/kalarm/find.cpp
@@ -52,8 +52,8 @@ static long FIND_KALARM_OPTIONS = FIND_LIVE | FIND_EXPIRED | FIND_MESSAGE | FIND
 Find::Find(EventListViewBase* parent)
 	: TQObject(parent),
 	  mListView(parent),
-	  mDialog(0),
-	  mFind(0),
+	  mDialog(nullptr),
+	  mFind(nullptr),
 	  mOptions(0)
 {
 }
@@ -62,7 +62,7 @@ Find::~Find()
 {
 	delete mDialog;    // automatically set to 0
 	delete mFind;
-	mFind = 0;
+	mFind = nullptr;
 }
 
 /******************************************************************************
@@ -284,7 +284,7 @@ void Find::findNext(bool forward, bool sort, bool checkEnd, bool fromCurrent)
 	if (sort)
 		mListView->sort();    // ensure the whole list is sorted, not just the visible items
 
-	EventListViewItemBase* item = mNoCurrentItem ? 0 : mListView->currentItem();
+	EventListViewItemBase* item = mNoCurrentItem ? nullptr : mListView->currentItem();
 	if (!fromCurrent)
 		item = nextItem(item, forward);
 
diff --git a/kalarm/fontcolour.cpp b/kalarm/fontcolour.cpp
index 64a8cdce5..0cf314549 100644
--- a/kalarm/fontcolour.cpp
+++ b/kalarm/fontcolour.cpp
@@ -43,8 +43,8 @@ FontColourChooser::FontColourChooser(TQWidget *parent, const char *name,
           const TQString& frameLabel, bool editColours, bool fg, bool defaultFont,
           int visibleListSize)
 	: TQWidget(parent, name),
-	  mFgColourButton(0),
-	  mRemoveColourButton(0),
+	  mFgColourButton(nullptr),
+	  mRemoveColourButton(nullptr),
 	  mColourList(Preferences::messageColours()),
 	  mReadOnly(false)
 {
@@ -114,7 +114,7 @@ FontColourChooser::FontColourChooser(TQWidget *parent, const char *name,
 		layout->addWidget(new TQWidget(page));    // left adjust the widget
 	}
 	else
-		mDefaultFont = 0;
+		mDefaultFont = nullptr;
 
 	mFontChooser = new TDEFontChooser(page, name, onlyFixed, fontList, false, visibleListSize);
 	mFontChooser->installEventFilter(this);   // for read-only mode
diff --git a/kalarm/fontcolour.h b/kalarm/fontcolour.h
index 4a4eb52bd..860ab77b9 100644
--- a/kalarm/fontcolour.h
+++ b/kalarm/fontcolour.h
@@ -36,7 +36,7 @@ class FontColourChooser : public TQWidget
 	TQ_OBJECT
   
 public:
-	explicit FontColourChooser(TQWidget* parent = 0, const char* name = 0,
+	explicit FontColourChooser(TQWidget* parent = nullptr, const char* name = nullptr,
 	       bool onlyFixed = false,
 	       const TQStringList& fontList = TQStringList(),
 	       const TQString& frameLabel = i18n("Requested font"),
diff --git a/kalarm/fontcolourbutton.cpp b/kalarm/fontcolourbutton.cpp
index a291a3769..cb3c3aa66 100644
--- a/kalarm/fontcolourbutton.cpp
+++ b/kalarm/fontcolourbutton.cpp
@@ -126,7 +126,7 @@ FontColourDlg::FontColourDlg(const TQColor& bgColour, const TQColor& fgColour, c
 	TQWidget* page = new TQWidget(this);
 	setMainWidget(page);
 	TQVBoxLayout* layout = new TQVBoxLayout(page, 0, spacingHint());
-	mChooser = new FontColourChooser(page, 0, false, TQStringList(), TQString(), false, true, true);
+	mChooser = new FontColourChooser(page, nullptr, false, TQStringList(), TQString(), false, true, true);
 	mChooser->setBgColour(bgColour);
 	mChooser->setFgColour(fgColour);
 	if (defaultFont)
diff --git a/kalarm/fontcolourbutton.h b/kalarm/fontcolourbutton.h
index efe799d41..8966d5cd9 100644
--- a/kalarm/fontcolourbutton.h
+++ b/kalarm/fontcolourbutton.h
@@ -36,7 +36,7 @@ class FontColourButton : public TQFrame
 		TQ_OBJECT
   
 	public:
-		FontColourButton(TQWidget* parent = 0, const char* name = 0);
+		FontColourButton(TQWidget* parent = nullptr, const char* name = nullptr);
 		void          setDefaultFont();
 		void          setFont(const TQFont&);
 		void          setBgColour(const TQColor&);
@@ -71,7 +71,7 @@ class FontColourDlg : public KDialogBase
   
 	public:
 		FontColourDlg(const TQColor& bg, const TQColor& fg, const TQFont&, bool defaultFont,
-		              const TQString& caption, TQWidget* parent = 0, const char* name = 0);
+		              const TQString& caption, TQWidget* parent = nullptr, const char* name = nullptr);
 		bool         defaultFont() const   { return mDefaultFont; }
 		TQFont        font() const          { return mFont; }
 		TQColor       bgColour() const      { return mBgColour; }
diff --git a/kalarm/functions.cpp b/kalarm/functions.cpp
index 11c576ed0..a475f0fa9 100644
--- a/kalarm/functions.cpp
+++ b/kalarm/functions.cpp
@@ -180,9 +180,9 @@ bool addExpiredEvent(KAEvent& event)
 
 	// Update window lists
 	if (!archiving)
-		AlarmListView::addEvent(event, 0);
+		AlarmListView::addEvent(event, nullptr);
 	else if (kcalEvent)
-		AlarmListView::modifyEvent(KAEvent(*kcalEvent), 0);
+		AlarmListView::modifyEvent(KAEvent(*kcalEvent), nullptr);
 	return true;
 }
 
@@ -830,9 +830,9 @@ FileType fileType(const TQString& mimetype)
 {
 	static const char* applicationTypes[] = {
 		"x-shellscript", "x-nawk", "x-awk", "x-perl", "x-python",
-		"x-desktop", "x-troff", 0 };
+		"x-desktop", "x-troff", nullptr };
 	static const char* formattedTextTypes[] = {
-		"html", "xml", 0 };
+		"html", "xml", nullptr };
 
 	if (mimetype.startsWith(TQString::fromLatin1("image/")))
 		return Image;
diff --git a/kalarm/functions.h b/kalarm/functions.h
index ab97c6ec9..4b4bceb13 100644
--- a/kalarm/functions.h
+++ b/kalarm/functions.h
@@ -72,12 +72,12 @@ FileType            fileType(const TQString& mimetype);
 /** Return current KAlarm version number */
 int                 Version();
 inline int          Version(int major, int minor, int rev)     { return major*10000 + minor*100 + rev; }
-int                 getVersionNumber(const TQString& version, TQString* subVersion = 0);
+int                 getVersionNumber(const TQString& version, TQString* subVersion = nullptr);
 /** Return which version of KAlarm was the first to use the current calendar/event format */
 inline int          currentCalendarVersion()        { return KAEvent::calVersion(); }
 inline TQString      currentCalendarVersionString()  { return KAEvent::calVersionString(); }
 TQString             browseFile(const TQString& caption, TQString& defaultDir, const TQString& initialFile = TQString(),
-                               const TQString& filter = TQString(), int mode = 0, TQWidget* parent = 0, const char* name = 0);
+                               const TQString& filter = TQString(), int mode = 0, TQWidget* parent = nullptr, const char* name = nullptr);
 bool                edit(const TQString& eventID);
 bool                editNew(const TQString& templateName = TQString());
 /** Create a "New Alarm" TDEAction */
@@ -88,19 +88,19 @@ TemplateMenuAction* createNewFromTemplateAction(const TQString& label, TQObject*
  *  If shell commands are disabled, command alarm templates are omitted.
  */
 TQValueList<KAEvent> templateList();
-void                outputAlarmWarnings(TQWidget* parent, const KAEvent* = 0);
+void                outputAlarmWarnings(TQWidget* parent, const KAEvent* = nullptr);
 void                resetDaemon();
 void                resetDaemonIfQueued();    // must only be called from KAlarmApp::processQueue()
 TQString             runKMail(bool minimise);
 bool                runProgram(const TQCString& program, const TQCString& windowName, TQCString& dcopName, TQString& errorMessage);
 
-UpdateStatus        addEvent(KAEvent&, AlarmListView* selectionView, TQWidget* errmsgParent = 0, bool useEventID = false, bool allowKOrgUpdate = true);
+UpdateStatus        addEvent(KAEvent&, AlarmListView* selectionView, TQWidget* errmsgParent = nullptr, bool useEventID = false, bool allowKOrgUpdate = true);
 bool                addExpiredEvent(KAEvent&);
-UpdateStatus        addTemplate(KAEvent&, TemplateListView* selectionView, TQWidget* errmsgParent = 0);
-UpdateStatus        modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListView* selectionView, TQWidget* errmsgParent = 0);
-UpdateStatus        updateEvent(KAEvent&, AlarmListView* selectionView, TQWidget* errmsgParent = 0, bool archiveOnDelete = true, bool incRevision = true);
-UpdateStatus        updateTemplate(const KAEvent&, TemplateListView* selectionView, TQWidget* errmsgParent = 0);
-UpdateStatus        deleteEvent(KAEvent&, bool archive = true, TQWidget* errmsgParent = 0);
+UpdateStatus        addTemplate(KAEvent&, TemplateListView* selectionView, TQWidget* errmsgParent = nullptr);
+UpdateStatus        modifyEvent(KAEvent& oldEvent, const KAEvent& newEvent, AlarmListView* selectionView, TQWidget* errmsgParent = nullptr);
+UpdateStatus        updateEvent(KAEvent&, AlarmListView* selectionView, TQWidget* errmsgParent = nullptr, bool archiveOnDelete = true, bool incRevision = true);
+UpdateStatus        updateTemplate(const KAEvent&, TemplateListView* selectionView, TQWidget* errmsgParent = nullptr);
+UpdateStatus        deleteEvent(KAEvent&, bool archive = true, TQWidget* errmsgParent = nullptr);
 UpdateStatus        deleteTemplate(const KAEvent&);
 void                deleteDisplayEvent(const TQString& eventID);
 UpdateStatus        reactivateEvent(KAEvent&, AlarmListView* selectionView, bool useEventID = false);
diff --git a/kalarm/kalarmapp.cpp b/kalarm/kalarmapp.cpp
index 4c98477c6..c99e68650 100644
--- a/kalarm/kalarmapp.cpp
+++ b/kalarm/kalarmapp.cpp
@@ -84,7 +84,7 @@ static inline int maxLateness(int lateCancel)
 }
 
 
-KAlarmApp*  KAlarmApp::theInstance  = 0;
+KAlarmApp*  KAlarmApp::theInstance  = nullptr;
 int         KAlarmApp::mActiveCount = 0;
 int         KAlarmApp::mFatalError  = 0;
 TQString     KAlarmApp::mFatalMessage;
@@ -100,7 +100,7 @@ KAlarmApp::KAlarmApp()
 #ifdef OLD_DCOP
 	  mDcopHandlerOld(new DcopHandlerOld()),
 #endif
-	  mTrayWindow(0),
+	  mTrayWindow(nullptr),
 	  mPendingQuit(false),
 	  mProcessingQueue(false),
 	  mCheckingSystemTray(false),
@@ -201,7 +201,7 @@ bool KAlarmApp::restoreSession()
 		quitIf(1, true);    // error opening the main calendar - quit
 		return true;
 	}
-	MainWindow* trayParent = 0;
+	MainWindow* trayParent = nullptr;
 	for (int i = 1;  TDEMainWindow::canBeRestored(i);  ++i)
 	{
 		TQString type = TDEMainWindow::classNameOfToplevel(i);
@@ -324,7 +324,7 @@ int KAlarmApp::newInstance()
 				kdDebug(5950)<<"KAlarmApp::newInstance(): handle event" << endl;
 				EventFunc function = EVENT_HANDLE;
 				int count = 0;
-				const char* option = 0;
+				const char* option = nullptr;
 				if (args->isSet("handleEvent"))   { function = EVENT_HANDLE;   option = "handleEvent";   ++count; }
 				if (args->isSet("triggerEvent"))  { function = EVENT_TRIGGER;  option = "triggerEvent";  ++count; }
 				if (args->isSet("cancelEvent"))   { function = EVENT_CANCEL;   option = "cancelEvent";   ++count; }
@@ -785,7 +785,7 @@ void KAlarmApp::quitIf(int exitCode, bool force)
 		if (mActiveCount > 0  ||  MessageWin::instanceCount())
 			return;
 		int mwcount = MainWindow::count();
-		MainWindow* mw = mwcount ? MainWindow::firstWindow() : 0;
+		MainWindow* mw = mwcount ? MainWindow::firstWindow() : nullptr;
 		if (mwcount > 1 || (mwcount && (!mw->isHidden() || !mw->isTrayParent())))
 			return;
 		// There are no windows left except perhaps a main window which is a hidden tray icon parent
@@ -865,7 +865,7 @@ void KAlarmApp::quitFatal()
 			return;
 		case 1:
 			mFatalError = 2;
-			KMessageBox::error(0, mFatalMessage);
+			KMessageBox::error(nullptr, mFatalMessage);
 			mFatalError = 3;
 			// fall through to '3'
 		case 3:
@@ -911,7 +911,7 @@ void KAlarmApp::processQueue()
 					execAlarm(entry.event, entry.event.firstAlarm(), false);
 					break;
 				case EVENT_HANDLE:
-					KAlarm::addEvent(entry.event, 0);
+					KAlarm::addEvent(entry.event, nullptr);
 					break;
 				case EVENT_CANCEL:
 					break;
@@ -966,7 +966,7 @@ void KAlarmApp::redisplayAlarms()
 */
 void KAlarmApp::removeWindow(TrayWindow*)
 {
-	mTrayWindow = 0;
+	mTrayWindow = nullptr;
 	quitIf();
 }
 
@@ -1004,7 +1004,7 @@ bool KAlarmApp::displayTrayIcon(bool show, MainWindow* parent)
 	else if (mTrayWindow)
 	{
 		delete mTrayWindow;
-		mTrayWindow = 0;
+		mTrayWindow = nullptr;
 	}
 	return true;
 }
@@ -1063,7 +1063,7 @@ bool KAlarmApp::checkSystemTray()
 */
 MainWindow* KAlarmApp::trayMainWindow() const
 {
-	return mTrayWindow ? mTrayWindow->assocMainWindow() : 0;
+	return mTrayWindow ? mTrayWindow->assocMainWindow() : nullptr;
 }
 
 /******************************************************************************
@@ -1076,9 +1076,9 @@ void KAlarmApp::slotPreferencesChanged()
 	{
 		// The system tray run mode has changed
 		++mActiveCount;         // prevent the application from quitting
-		MainWindow* win = mTrayWindow ? mTrayWindow->assocMainWindow() : 0;
+		MainWindow* win = mTrayWindow ? mTrayWindow->assocMainWindow() : nullptr;
 		delete mTrayWindow;     // remove the system tray icon if it is currently shown
-		mTrayWindow = 0;
+		mTrayWindow = nullptr;
 		mOldRunInSystemTray = newRunInSysTray;
 		if (!newRunInSysTray)
 		{
@@ -1416,7 +1416,7 @@ bool KAlarmApp::handleEvent(const TQString& eventID, EventFunc function)
 						execAlarm(event, alarm, false);
 				}
 				if (updateCalAndDisplay)
-					KAlarm::updateEvent(event, 0);     // update the window lists and calendar file
+					KAlarm::updateEvent(event, nullptr);     // update the window lists and calendar file
 				else if (function != EVENT_TRIGGER)
 				{
 					kdDebug(5950) << "KAlarmApp::handleEvent(): no action" << endl;
@@ -1474,7 +1474,7 @@ void KAlarmApp::alarmCompleted(const KAEvent& event)
 	{
 		TQString command = event.postAction();
 		kdDebug(5950) << "KAlarmApp::alarmCompleted(" << event.id() << "): " << command << endl;
-		doShellCommand(command, event, 0, ProcData::POST_ACTION);
+		doShellCommand(command, event, nullptr, ProcData::POST_ACTION);
 	}
 }
 
@@ -1539,7 +1539,7 @@ void KAlarmApp::rescheduleAlarm(KAEvent& event, const KAAlarm& alarm, bool updat
 	if (update)
 	{
 		event.cancelCancelledDeferral();
-		KAlarm::updateEvent(event, 0);     // update the window lists and calendar file
+		KAlarm::updateEvent(event, nullptr);     // update the window lists and calendar file
 	}
 }
 
@@ -1562,7 +1562,7 @@ void KAlarmApp::cancelAlarm(KAEvent& event, KAAlarm::Type alarmType, bool update
 	if (!event.alarmCount())
 		KAlarm::deleteEvent(event, false);
 	else if (updateCalAndDisplay)
-		KAlarm::updateEvent(event, 0);    // update the window lists and calendar file
+		KAlarm::updateEvent(event, nullptr);    // update the window lists and calendar file
 }
 
 /******************************************************************************
@@ -1578,7 +1578,7 @@ void* KAlarmApp::execAlarm(KAEvent& event, const KAAlarm& alarm, bool reschedule
 		// The event is disabled.
 		if (reschedule)
 			rescheduleAlarm(event, alarm, true);
-		return 0;
+		return nullptr;
 	}
 
 	void* result = (void*)1;
@@ -1650,7 +1650,7 @@ void* KAlarmApp::execAlarm(KAEvent& event, const KAAlarm& alarm, bool reschedule
 				kdDebug(5950) << "KAlarmApp::execAlarm(): COMMAND: (script)" << endl;
 				TQString tmpfile = createTempScriptFile(command, false, event, alarm);
 				if (tmpfile.isEmpty())
-					result = 0;
+					result = nullptr;
 				else
 					result = doShellCommand(tmpfile, event, &alarm, (flags | ProcData::TEMP_FILE));
 			}
@@ -1668,7 +1668,7 @@ void* KAlarmApp::execAlarm(KAEvent& event, const KAAlarm& alarm, bool reschedule
 			kdDebug(5950) << "KAlarmApp::execAlarm(): EMAIL to: " << event.emailAddresses(", ") << endl;
 			TQStringList errmsgs;
 			if (!KAMail::send(event, errmsgs, (reschedule || allowDefer)))
-				result = 0;
+				result = nullptr;
 			if (!errmsgs.isEmpty())
 			{
 				// Some error occurred, although the email may have been sent successfully
@@ -1683,7 +1683,7 @@ void* KAlarmApp::execAlarm(KAEvent& event, const KAAlarm& alarm, bool reschedule
 			break;
 		}
 		default:
-			return 0;
+			return nullptr;
 	}
 	return result;
 }
@@ -1714,7 +1714,7 @@ ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent&
 			{
 				tmpXtermFile = createTempScriptFile(command, true, event, *alarm);
 				if (tmpXtermFile.isEmpty())
-					return 0;
+					return nullptr;
 				cmd.replace("%C", tmpXtermFile);    // %C indicates where to insert the command
 			}
 		}
@@ -1724,7 +1724,7 @@ ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent&
 			// with a sleep after the command is executed
 			tmpXtermFile = createTempScriptFile(command + TQString::fromLatin1("\nsleep 86400\n"), true, event, *alarm);
 			if (tmpXtermFile.isEmpty())
-				return 0;
+				return nullptr;
 			cmd.replace("%W", tmpXtermFile);    // %w indicates where to insert the command
 		}
 		else if (cmd.find("%w") >= 0)
@@ -1752,7 +1752,7 @@ ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent&
 	}
 	ShellProcess* proc = new ShellProcess(cmd);
 	connect(proc, TQ_SIGNAL(shellExited(ShellProcess*)), TQ_SLOT(slotCommandExited(ShellProcess*)));
-	TQGuardedPtr<ShellProcess> logproc = 0;
+	TQGuardedPtr<ShellProcess> logproc = nullptr;
 	if (comms == TDEProcess::AllOutput  &&  !event.logFile().isEmpty())
 	{
 		// Output is to be appended to a log file.
@@ -1774,7 +1774,7 @@ ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent&
 			heading = "\n******* KAlarm *******\n";
 		logproc->writeStdin(heading, heading.length()+1);
 	}
-	ProcData* pd = new ProcData(proc, logproc, new KAEvent(event), (alarm ? new KAAlarm(*alarm) : 0), flags);
+	ProcData* pd = new ProcData(proc, logproc, new KAEvent(event), (alarm ? new KAAlarm(*alarm) : nullptr), flags);
 	if (flags & ProcData::TEMP_FILE)
 		pd->tempFiles += command;
 	if (!tmpXtermFile.isEmpty())
@@ -1788,7 +1788,7 @@ ShellProcess* KAlarmApp::doShellCommand(const TQString& command, const KAEvent&
 	commandErrorMsg(proc, event, alarm, flags);
 	mCommandProcesses.remove(pd);
 	delete pd;
-	return 0;
+	return nullptr;
 }
 
 /******************************************************************************
@@ -1871,7 +1871,7 @@ void KAlarmApp::slotCommandExited(ShellProcess* proc)
 				if (pd->messageBoxParent)
 				{
 					// Close the existing informational KMessageBox for this process
-					TQObjectList* dialogs = pd->messageBoxParent->queryList("KDialogBase", 0, false, true);
+					TQObjectList* dialogs = pd->messageBoxParent->queryList("KDialogBase", nullptr, false, true);
 					KDialogBase* dialog = (KDialogBase*)dialogs->getFirst();
 					delete dialog;
 					delete dialogs;
@@ -2007,7 +2007,7 @@ static bool convWakeTime(const TQCString& timeParam, TQDateTime& dateTime, bool&
 	char* s;
 	char* end;
 	// Get the minute value
-	if ((s = strchr(timeStr, ':')) == 0)
+	if ((s = strchr(timeStr, ':')) == nullptr)
 		noTime = true;
 	else
 	{
@@ -2017,7 +2017,7 @@ static bool convWakeTime(const TQCString& timeParam, TQDateTime& dateTime, bool&
 		if (end == s  ||  *end  ||  dt[4] >= 60)
 			return false;
 		// Get the hour value
-		if ((s = strrchr(timeStr, '-')) == 0)
+		if ((s = strrchr(timeStr, '-')) == nullptr)
 			s = timeStr;
 		else
 			*s++ = 0;
@@ -2030,7 +2030,7 @@ static bool convWakeTime(const TQCString& timeParam, TQDateTime& dateTime, bool&
 	{
 		dateSet = true;
 		// Get the day value
-		if ((s = strrchr(timeStr, '-')) == 0)
+		if ((s = strrchr(timeStr, '-')) == nullptr)
 			s = timeStr;
 		else
 			*s++ = 0;
@@ -2040,7 +2040,7 @@ static bool convWakeTime(const TQCString& timeParam, TQDateTime& dateTime, bool&
 		if (s != timeStr)
 		{
 			// Get the month value
-			if ((s = strrchr(timeStr, '-')) == 0)
+			if ((s = strrchr(timeStr, '-')) == nullptr)
 				s = timeStr;
 			else
 				*s++ = 0;
@@ -2166,7 +2166,7 @@ KAlarmApp::ProcData::ProcData(ShellProcess* p, ShellProcess* logp, KAEvent* e, K
 	  logProcess(logp),
 	  event(e),
 	  alarm(a),
-	  messageBoxParent(0),
+	  messageBoxParent(nullptr),
 	  flags(f)
 { }
 
diff --git a/kalarm/kalarmapp.h b/kalarm/kalarmapp.h
index 52359ef03..3d9142259 100644
--- a/kalarm/kalarmapp.h
+++ b/kalarm/kalarmapp.h
@@ -68,9 +68,9 @@ class KAlarmApp : public TDEUniqueApplication
 		void               removeWindow(TrayWindow*);
 		TrayWindow*        trayWindow() const              { return mTrayWindow; }
 		MainWindow*        trayMainWindow() const;
-		bool               displayTrayIcon(bool show, MainWindow* = 0);
+		bool               displayTrayIcon(bool show, MainWindow* = nullptr);
 		bool               trayIconDisplayed() const       { return !!mTrayWindow; }
-		bool               editNewAlarm(MainWindow* = 0);
+		bool               editNewAlarm(MainWindow* = nullptr);
 		virtual void       commitData(TQSessionManager&);
 
 		void*              execAlarm(KAEvent&, const KAAlarm&, bool reschedule, bool allowDefer = true, bool noPreAction = false);
diff --git a/kalarm/kalarmd/adapp.cpp b/kalarm/kalarmd/adapp.cpp
index 3d5f22981..5488f53d6 100644
--- a/kalarm/kalarmd/adapp.cpp
+++ b/kalarm/kalarmd/adapp.cpp
@@ -31,7 +31,7 @@
 
 AlarmDaemonApp::AlarmDaemonApp()
 	: TDEUniqueApplication(false, false),
-	  mAd(0)
+	  mAd(nullptr)
 {
 	disableSessionManagement();
 }
@@ -65,7 +65,7 @@ int AlarmDaemonApp::newInstance()
 		args->clear();      // free up memory
 	}
 
-	mAd = new AlarmDaemon(autostart, 0, DAEMON_DCOP_OBJECT);
+	mAd = new AlarmDaemon(autostart, nullptr, DAEMON_DCOP_OBJECT);
 
 	return 0;
 }
diff --git a/kalarm/kalarmd/adcalendar.cpp b/kalarm/kalarmd/adcalendar.cpp
index 839f64167..67abeaa0f 100644
--- a/kalarm/kalarmd/adcalendar.cpp
+++ b/kalarm/kalarmd/adcalendar.cpp
@@ -107,7 +107,7 @@ void ADCalendar::slotDownloadJobResult(TDEIO::Job *job)
 	{
 		KURL url(mUrlString);
 		kdDebug(5900) << "Error downloading calendar from " << url.prettyURL() << endl;
-		job->showErrorDialog(0);
+		job->showErrorDialog(nullptr);
 	}
 	else
 	{
@@ -249,5 +249,5 @@ ADCalendar* ADCalendar::getCalendar(const TQString& calendarURL)
 				return *it;
 		}
 	}
-	return 0;
+	return nullptr;
 }
diff --git a/kalarm/kalarmd/admain.cpp b/kalarm/kalarmd/admain.cpp
index b1533e4a5..7883cf455 100644
--- a/kalarm/kalarmd/admain.cpp
+++ b/kalarm/kalarmd/admain.cpp
@@ -33,7 +33,7 @@
 
 static const TDECmdLineOptions options[] =
 {
-	{ "autostart", "", 0 },
+	{ "autostart", "", nullptr },
 	TDECmdLineLastOption
 };
 
@@ -41,7 +41,7 @@ int main(int argc, char** argv)
 {
 	TDEAboutData aboutData(DAEMON_APP_NAME, I18N_NOOP("KAlarm Daemon"),
 	                     DAEMON_VERSION, I18N_NOOP("KAlarm Alarm Daemon"), TDEAboutData::License_GPL,
-	                     "Copyright 1997-1999 Preston Brown\nCopyright 2000-2001 Cornelius Schumacher\nCopyright 2001,2004-2007 David Jarvie", 0,
+	                     "Copyright 1997-1999 Preston Brown\nCopyright 2000-2001 Cornelius Schumacher\nCopyright 2001,2004-2007 David Jarvie", nullptr,
 	                     "http://www.astrojar.org.uk/kalarm");
 	aboutData.addAuthor("David Jarvie", I18N_NOOP("Maintainer"), "software@astrojar.org.uk");
 	aboutData.addAuthor("Cornelius Schumacher", I18N_NOOP("Author"), "schumacher@kde.org");
diff --git a/kalarm/kalarmd/alarmdaemon.cpp b/kalarm/kalarmd/alarmdaemon.cpp
index 5de17379f..4d5af8688 100644
--- a/kalarm/kalarmd/alarmdaemon.cpp
+++ b/kalarm/kalarmd/alarmdaemon.cpp
@@ -61,7 +61,7 @@ static const TQString AUTOSTART_TRAY(TQString::fromLatin1("AutostartTray"));
 AlarmDaemon::AlarmDaemon(bool autostart, TQObject *parent, const char *name)
 	: DCOPObject(name),
 	  TQObject(parent, name),
-	  mAlarmTimer(0)
+	  mAlarmTimer(nullptr)
 {
 	kdDebug(5900) << "AlarmDaemon::AlarmDaemon()" << endl;
 	ADConfigData::readConfig();
@@ -271,7 +271,7 @@ void AlarmDaemon::registerApp(const TQCString& appName, const TQString& appTitle
 	}
 	else
 	{
-		ADCalendar* keepCal = 0;
+		ADCalendar* keepCal = nullptr;
 		ClientInfo* client = ClientInfo::get(appName);
 		if (client)
 		{
diff --git a/kalarm/kalarmd/alarmdaemon.h b/kalarm/kalarmd/alarmdaemon.h
index 85509ebd3..253a80386 100644
--- a/kalarm/kalarmd/alarmdaemon.h
+++ b/kalarm/kalarmd/alarmdaemon.h
@@ -34,7 +34,7 @@ class AlarmDaemon : public TQObject, virtual public AlarmDaemonIface
 		TQ_OBJECT
   
 	public:
-		AlarmDaemon(bool autostart, TQObject* parent = 0, const char* name = 0);
+		AlarmDaemon(bool autostart, TQObject* parent = nullptr, const char* name = nullptr);
 
 	private slots:
 //#ifdef AUTOSTART_KALARM
diff --git a/kalarm/kalarmd/clientinfo.cpp b/kalarm/kalarmd/clientinfo.cpp
index e8c5ea6c7..9e15bd1e4 100644
--- a/kalarm/kalarmd/clientinfo.cpp
+++ b/kalarm/kalarmd/clientinfo.cpp
@@ -71,10 +71,10 @@ ADCalendar* ClientInfo::setCalendar(const TQString& url)
 ClientInfo* ClientInfo::get(const TQCString& appName)
 {
 	if (appName.isEmpty())
-		return 0;
+		return nullptr;
 	TQMap<TQCString, ClientInfo*>::ConstIterator it = mClients.find(appName);
 	if (it == mClients.end())
-		return 0;
+		return nullptr;
 	return it.data();
 }
 
@@ -86,7 +86,7 @@ ClientInfo* ClientInfo::get(const ADCalendar* cal)
 	for (ClientInfo::ConstIterator it = ClientInfo::begin();  it != ClientInfo::end();  ++it)
 		if (it.data()->calendar() == cal)
 			return it.data();
-	return 0;
+	return nullptr;
 }
 
 /******************************************************************************
diff --git a/kalarm/kalarmd/clientinfo.h b/kalarm/kalarmd/clientinfo.h
index d679669ec..ba3ba806d 100644
--- a/kalarm/kalarmd/clientinfo.h
+++ b/kalarm/kalarmd/clientinfo.h
@@ -44,7 +44,7 @@ class ClientInfo
 			   ADCalendar* calendar, bool startClient);
 		~ClientInfo();
 		ADCalendar*          setCalendar(const TQString& url);
-		void                 detachCalendar()            { mCalendar = 0; }
+		void                 detachCalendar()            { mCalendar = nullptr; }
 		void                 setStartClient(bool start)  { mStartClient = start; }
 
 		TQCString             appName() const             { return mAppName; }
diff --git a/kalarm/kamail.cpp b/kalarm/kamail.cpp
index 349727496..e0ef48ea3 100644
--- a/kalarm/kamail.cpp
+++ b/kalarm/kamail.cpp
@@ -88,7 +88,7 @@ TQString KAMail::i18n_NeedFromEmailAddress()
 TQString KAMail::i18n_sent_mail()
 { return i18n("KMail folder name: this should be translated the same as in kmail", "sent-mail"); }
 
-KPIM::IdentityManager* KAMail::mIdentityManager = 0;
+KPIM::IdentityManager* KAMail::mIdentityManager = nullptr;
 KPIM::IdentityManager* KAMail::identityManager()
 {
 	if (!mIdentityManager)
@@ -380,7 +380,7 @@ TQString KAMail::initHeaders(const KAMailData& data, bool dateId)
 	if (dateId)
 	{
 		struct timeval tod;
-		gettimeofday(&tod, 0);
+		gettimeofday(&tod, nullptr);
 		time_t timenow = tod.tv_sec;
 		char buff[64];
 		strftime(buff, sizeof(buff), "Date: %a, %d %b %Y %H:%M:%S %z", localtime(&timenow));
@@ -409,7 +409,7 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event)
 		"application/x-sh", "application/x-csh", "application/x-shellscript",
 		"application/x-nawk", "application/x-gawk", "application/x-awk",
 		"application/x-perl", "application/x-desktop",
-		0
+		nullptr
 	};
 	TQStringList attachments = event.emailAttachments();
 	if (!attachments.count())
@@ -539,7 +539,7 @@ void KAMail::notifyQueued(const KAEvent& event)
 				TQString text = (Preferences::emailClient() == Preferences::KMAIL)
 				             ? i18n("An email has been queued to be sent by KMail")
 				             : i18n("An email has been queued to be sent");
-				KMessageBox::information(0, text, TQString(), Preferences::EMAIL_QUEUED_NOTIFY);
+				KMessageBox::information(nullptr, text, TQString(), Preferences::EMAIL_QUEUED_NOTIFY);
 				return;
 			}
 		}
@@ -891,7 +891,7 @@ char* KAMail::base64Encode(const char* in, TQIODevice::Offset size, TQIODevice::
 			if (outIndex >= size*2)
 			{
 				delete[] out;
-				return 0;
+				return nullptr;
 			}
 			for (int i = 0;  i < 4;  ++i)
 			{
diff --git a/kalarm/kamail.h b/kalarm/kamail.h
index e62ab8f63..4bc7387d8 100644
--- a/kalarm/kamail.h
+++ b/kalarm/kamail.h
@@ -37,7 +37,7 @@ class KAMail
 	public:
 		static bool        send(const KAEvent&, TQStringList& errmsgs, bool allowNotify = true);
 		static int         checkAddress(TQString& address);
-		static int         checkAttachment(TQString& attachment, KURL* = 0);
+		static int         checkAttachment(TQString& attachment, KURL* = nullptr);
 		static bool        checkAttachment(const KURL&);
 		static TQString     convertAddresses(const TQString& addresses, EmailAddressList&);
 		static TQString     convertAttachments(const TQString& attachments, TQStringList& list);
diff --git a/kalarm/latecancel.h b/kalarm/latecancel.h
index 7baefb42e..fe55c290f 100644
--- a/kalarm/latecancel.h
+++ b/kalarm/latecancel.h
@@ -35,7 +35,7 @@ class LateCancelSelector : public TQFrame
 		TQ_OBJECT
   
 	public:
-		LateCancelSelector(bool allowHourMinute, TQWidget* parent, const char* name = 0);
+		LateCancelSelector(bool allowHourMinute, TQWidget* parent, const char* name = nullptr);
 		int            minutes() const;
 		void           setMinutes(int Minutes, bool dateOnly, TimePeriod::Units defaultUnits);
 		void           setDateOnly(bool dateOnly);
diff --git a/kalarm/lib/buttongroup.h b/kalarm/lib/buttongroup.h
index f26ab26da..09e1774b2 100644
--- a/kalarm/lib/buttongroup.h
+++ b/kalarm/lib/buttongroup.h
@@ -44,20 +44,20 @@ class ButtonGroup : public TQButtonGroup
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		explicit ButtonGroup(TQWidget* parent, const char* name = 0);
+		explicit ButtonGroup(TQWidget* parent, const char* name = nullptr);
 		/** Constructor.
 		 *  @param title The title displayed for this button group.
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		ButtonGroup(const TQString& title, TQWidget* parent, const char* name = 0);
+		ButtonGroup(const TQString& title, TQWidget* parent, const char* name = nullptr);
 		/** Constructor.
 		 *  @param strips The number of rows or columns of buttons.
 		 *  @param orient The orientation (TQt::Horizontal or TQt::Vertical) of the button group.
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		ButtonGroup(int strips, TQt::Orientation orient, TQWidget* parent, const char* name = 0);
+		ButtonGroup(int strips, TQt::Orientation orient, TQWidget* parent, const char* name = nullptr);
 		/** Constructor.
 		 *  @param strips The number of rows or columns of buttons.
 		 *  @param orient The orientation (TQt::Horizontal or TQt::Vertical) of the button group.
@@ -65,7 +65,7 @@ class ButtonGroup : public TQButtonGroup
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		ButtonGroup(int strips, TQt::Orientation orient, const TQString& title, TQWidget* parent, const char* name = 0);
+		ButtonGroup(int strips, TQt::Orientation orient, const TQString& title, TQWidget* parent, const char* name = nullptr);
 		/** Inserts a button in the group.
 		 *  This overrides the insert() method of TQButtonGroup, which should really be a virtual method...
 		 *  @param button The button to insert.
diff --git a/kalarm/lib/checkbox.cpp b/kalarm/lib/checkbox.cpp
index 4b29d927a..b08b427b3 100644
--- a/kalarm/lib/checkbox.cpp
+++ b/kalarm/lib/checkbox.cpp
@@ -24,14 +24,14 @@
 CheckBox::CheckBox(TQWidget* parent, const char* name)
 	: TQCheckBox(parent, name),
 	  mFocusPolicy(focusPolicy()),
-	  mFocusWidget(0),
+	  mFocusWidget(nullptr),
 	  mReadOnly(false)
 { }
 
 CheckBox::CheckBox(const TQString& text, TQWidget* parent, const char* name)
 	: TQCheckBox(text, parent, name),
 	  mFocusPolicy(focusPolicy()),
-	  mFocusWidget(0),
+	  mFocusWidget(nullptr),
 	  mReadOnly(false)
 { }
 
diff --git a/kalarm/lib/checkbox.h b/kalarm/lib/checkbox.h
index eb9afc88a..73078eb8c 100644
--- a/kalarm/lib/checkbox.h
+++ b/kalarm/lib/checkbox.h
@@ -48,13 +48,13 @@ class CheckBox : public TQCheckBox
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		explicit CheckBox(TQWidget* parent, const char* name = 0);
+		explicit CheckBox(TQWidget* parent, const char* name = nullptr);
 		/** Constructor.
 		 *  @param text Text to display.
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		CheckBox(const TQString& text, TQWidget* parent, const char* name = 0);
+		CheckBox(const TQString& text, TQWidget* parent, const char* name = nullptr);
 		/** Returns true if the widget is read only. */
 		bool         isReadOnly() const          { return mReadOnly; }
 		/** Sets whether the check box is read-only for the user. If read-only,
diff --git a/kalarm/lib/colourcombo.h b/kalarm/lib/colourcombo.h
index d6c003437..c1e47dcd5 100644
--- a/kalarm/lib/colourcombo.h
+++ b/kalarm/lib/colourcombo.h
@@ -51,7 +51,7 @@ class ColourCombo : public TQComboBox
 		 *  @param name The name of this widget.
 		 *  @param defaultColour The colour which is selected by default.
 		 */
-		explicit ColourCombo(TQWidget* parent = 0, const char* name = 0, const TQColor& defaultColour = 0xFFFFFF);
+		explicit ColourCombo(TQWidget* parent = nullptr, const char* name = nullptr, const TQColor& defaultColour = 0xFFFFFF);
 		/** Returns the selected colour. */
 		TQColor       color() const               { return mSelectedColour; }
 		/** Returns the selected colour. */
diff --git a/kalarm/lib/combobox.h b/kalarm/lib/combobox.h
index cc915f0d9..17ff218b4 100644
--- a/kalarm/lib/combobox.h
+++ b/kalarm/lib/combobox.h
@@ -43,13 +43,13 @@ class ComboBox : public TQComboBox
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		explicit ComboBox(TQWidget* parent = 0, const char* name = 0);
+		explicit ComboBox(TQWidget* parent = nullptr, const char* name = nullptr);
 		/** Constructor.
 		 *  @param rw True for a read-write combo box, false for a read-only combo box.
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		explicit ComboBox(bool rw, TQWidget* parent = 0, const char* name = 0);
+		explicit ComboBox(bool rw, TQWidget* parent = nullptr, const char* name = nullptr);
 		/** Returns true if the widget is read only. */
 		bool         isReadOnly() const          { return mReadOnly; }
 		/** Sets whether the combo box is read-only for the user. If read-only,
diff --git a/kalarm/lib/dateedit.h b/kalarm/lib/dateedit.h
index 47a040cb1..ffd65fa2b 100644
--- a/kalarm/lib/dateedit.h
+++ b/kalarm/lib/dateedit.h
@@ -43,7 +43,7 @@ class DateEdit : public KDateEdit
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		explicit DateEdit(TQWidget* parent = 0, const char* name = 0);
+		explicit DateEdit(TQWidget* parent = nullptr, const char* name = nullptr);
 		/** Returns true if the widget contains a valid date. */
 		bool         isValid() const              { return date().isValid(); }
 		/** Returns the earliest date which can be entered.
diff --git a/kalarm/lib/label.cpp b/kalarm/lib/label.cpp
index 8a41d624b..2e9684ed5 100644
--- a/kalarm/lib/label.cpp
+++ b/kalarm/lib/label.cpp
@@ -25,20 +25,20 @@
 
 Label::Label(TQWidget* parent, const char* name, WFlags f)
 	: TQLabel(parent, name, f),
-	  mRadioButton(0),
-	  mFocusWidget(0)
+	  mRadioButton(nullptr),
+	  mFocusWidget(nullptr)
 { }
 
 Label::Label(const TQString& text, TQWidget* parent, const char* name, WFlags f)
 	: TQLabel(text, parent, name, f),
-	  mRadioButton(0),
-	  mFocusWidget(0)
+	  mRadioButton(nullptr),
+	  mFocusWidget(nullptr)
 { }
 
 Label::Label(TQWidget* buddy, const TQString& text, TQWidget* parent, const char* name, WFlags f)
 	: TQLabel(buddy, text, parent, name, f),
-	  mRadioButton(0),
-	  mFocusWidget(0)
+	  mRadioButton(nullptr),
+	  mFocusWidget(nullptr)
 { }
 
 /******************************************************************************
@@ -57,15 +57,15 @@ void Label::setBuddy(TQWidget* bud)
 		while (w->focusProxy())
 			w = w->focusProxy();
 		if (!w->inherits("TQRadioButton"))
-			w = 0;
+			w = nullptr;
 	}
 	if (!w)
 	{
 		// The buddy widget isn't a radio button
 		TQLabel::setBuddy(bud);
 		delete mFocusWidget;
-		mFocusWidget = 0;
-		mRadioButton = 0;
+		mFocusWidget = nullptr;
+		mRadioButton = nullptr;
 	}
 	else
 	{
@@ -81,8 +81,8 @@ void Label::setBuddy(TQWidget* bud)
 void Label::buddyDead()
 {
 	delete mFocusWidget;
-	mFocusWidget = 0;
-	mRadioButton = 0;
+	mFocusWidget = nullptr;
+	mRadioButton = nullptr;
 }
 
 /******************************************************************************
diff --git a/kalarm/lib/label.h b/kalarm/lib/label.h
index deae350f2..f389924b9 100644
--- a/kalarm/lib/label.h
+++ b/kalarm/lib/label.h
@@ -49,14 +49,14 @@ class Label : public TQLabel
 		 *  @param name The name of this widget.
 		 *  @param f    Flags. See TQWidget constructor for details.
 		 */
-		explicit Label(TQWidget* parent, const char* name = 0, WFlags f = 0);
+		explicit Label(TQWidget* parent, const char* name = nullptr, WFlags f = 0);
 		/** Constructs a label that displays @p text.
 		 *  @param text   Text string to display.
 		 *  @param parent The parent object of this widget.
 		 *  @param name   The name of this widget.
 		 *  @param f      Flags. See TQWidget constructor for details.
 		 */
-		Label(const TQString& text, TQWidget* parent, const char* name = 0, WFlags f = 0);
+		Label(const TQString& text, TQWidget* parent, const char* name = nullptr, WFlags f = 0);
 		/** Constructs a label, with a buddy widget, that displays @p text.
 		 *  @param buddy  Buddy widget which receives the keyboard focus when the
 		 *                label's accelerator key is pressed. If @p buddy is a radio
@@ -67,7 +67,7 @@ class Label : public TQLabel
 		 *  @param name   The name of this widget.
 		 *  @param f      Flags. See TQWidget constructor for details.
 		 */
-		Label(TQWidget* buddy, const TQString& text, TQWidget* parent, const char* name = 0, WFlags f = 0);
+		Label(TQWidget* buddy, const TQString& text, TQWidget* parent, const char* name = nullptr, WFlags f = 0);
 		/** Sets the label's buddy widget which receives the keyboard focus when the
 		 *  label's accelerator key is pressed. If @p buddy is a radio button,
 		 *  @p buddy is in addition selected when the accelerator key is pressed.
@@ -90,7 +90,7 @@ class LabelFocusWidget : public TQWidget
 		TQ_OBJECT
   
 	public:
-		LabelFocusWidget(TQWidget* parent, const char* name = 0);
+		LabelFocusWidget(TQWidget* parent, const char* name = nullptr);
 	protected:
 		virtual void focusInEvent(TQFocusEvent*);
 };
diff --git a/kalarm/lib/lineedit.h b/kalarm/lib/lineedit.h
index d715770f9..0773126ac 100644
--- a/kalarm/lib/lineedit.h
+++ b/kalarm/lib/lineedit.h
@@ -65,12 +65,12 @@ class LineEdit : public KLineEdit
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		explicit LineEdit(Type type, TQWidget* parent = 0, const char* name = 0);
+		explicit LineEdit(Type type, TQWidget* parent = nullptr, const char* name = nullptr);
 		/** Constructs a line edit whose content type is Text.
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		explicit LineEdit(TQWidget* parent = 0, const char* name = 0);
+		explicit LineEdit(TQWidget* parent = nullptr, const char* name = nullptr);
 		/** Prevents the line edit's contents being selected when the widget receives focus. */
 		void         setNoSelect()   { mNoSelect = true; }
 		/** Sets whether the cursor should be set at the beginning or end of the text when
diff --git a/kalarm/lib/messagebox.cpp b/kalarm/lib/messagebox.cpp
index 4e78ef085..0aaad529f 100644
--- a/kalarm/lib/messagebox.cpp
+++ b/kalarm/lib/messagebox.cpp
@@ -23,7 +23,7 @@
 #include "messagebox.h"
 
 
-TDEConfig* MessageBox::mConfig = 0;
+TDEConfig* MessageBox::mConfig = nullptr;
 TQMap<TQString, KMessageBox::ButtonCode> MessageBox::mContinueDefaults;
 
 
diff --git a/kalarm/lib/messagebox.h b/kalarm/lib/messagebox.h
index 5baccca0a..451a74021 100644
--- a/kalarm/lib/messagebox.h
+++ b/kalarm/lib/messagebox.h
@@ -117,7 +117,7 @@ class MessageBox : public KMessageBox
 		static void setDontShowAskAgainConfig(TDEConfig* cfg)    { mConfig = cfg; }
 
 	private:
-		static void saveDontShowAgain(const TQString& dontShowAgainName, bool yesno, bool dontShow, const char* yesnoResult = 0);
+		static void saveDontShowAgain(const TQString& dontShowAgainName, bool yesno, bool dontShow, const char* yesnoResult = nullptr);
 		static TDEConfig*                  mConfig;
 		static TQMap<TQString, ButtonCode> mContinueDefaults;
 };
diff --git a/kalarm/lib/pushbutton.h b/kalarm/lib/pushbutton.h
index 091060af2..ec7ca23d4 100644
--- a/kalarm/lib/pushbutton.h
+++ b/kalarm/lib/pushbutton.h
@@ -44,20 +44,20 @@ class PushButton : public TQPushButton
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		explicit PushButton(TQWidget* parent, const char* name = 0);
+		explicit PushButton(TQWidget* parent, const char* name = nullptr);
 		/** Constructor for a push button which displays a text.
 		 *  @param text The text to show on the button.
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		PushButton(const TQString& text, TQWidget* parent, const char* name = 0);
+		PushButton(const TQString& text, TQWidget* parent, const char* name = nullptr);
 		/** Constructor for a push button which displays an icon and a text.
 		 *  @param icon The icon to show on the button.
 		 *  @param text The text to show on the button.
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		PushButton(const TQIconSet& icon, const TQString& text, TQWidget* parent, const char* name = 0);
+		PushButton(const TQIconSet& icon, const TQString& text, TQWidget* parent, const char* name = nullptr);
 		/** Sets whether the push button is read-only for the user.
 		 *  @param readOnly True to set the widget read-only, false to enable its action.
 		 */
diff --git a/kalarm/lib/radiobutton.cpp b/kalarm/lib/radiobutton.cpp
index 62fb9b630..37a01dc78 100644
--- a/kalarm/lib/radiobutton.cpp
+++ b/kalarm/lib/radiobutton.cpp
@@ -24,14 +24,14 @@
 RadioButton::RadioButton(TQWidget* parent, const char* name)
 	: TQRadioButton(parent, name),
 	  mFocusPolicy(focusPolicy()),
-	  mFocusWidget(0),
+	  mFocusWidget(nullptr),
 	  mReadOnly(false)
 { }
 
 RadioButton::RadioButton(const TQString& text, TQWidget* parent, const char* name)
 	: TQRadioButton(text, parent, name),
 	  mFocusPolicy(focusPolicy()),
-	  mFocusWidget(0),
+	  mFocusWidget(nullptr),
 	  mReadOnly(false)
 { }
 
diff --git a/kalarm/lib/radiobutton.h b/kalarm/lib/radiobutton.h
index d3b477854..3769e6fb4 100644
--- a/kalarm/lib/radiobutton.h
+++ b/kalarm/lib/radiobutton.h
@@ -48,13 +48,13 @@ class RadioButton : public TQRadioButton
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		explicit RadioButton(TQWidget* parent, const char* name = 0);
+		explicit RadioButton(TQWidget* parent, const char* name = nullptr);
 		/** Constructor.
 		 *  @param text Text to display.
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		RadioButton(const TQString& text, TQWidget* parent, const char* name = 0);
+		RadioButton(const TQString& text, TQWidget* parent, const char* name = nullptr);
 		/** Returns true if the widget is read only. */
 		bool     isReadOnly() const          { return mReadOnly; }
 		/** Sets whether the radio button is read-only for the user. If read-only,
diff --git a/kalarm/lib/slider.h b/kalarm/lib/slider.h
index dc36e3ced..39927d12d 100644
--- a/kalarm/lib/slider.h
+++ b/kalarm/lib/slider.h
@@ -44,13 +44,13 @@ class Slider : public TQSlider
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		explicit Slider(TQWidget* parent = 0, const char* name = 0);
+		explicit Slider(TQWidget* parent = nullptr, const char* name = nullptr);
 		/** Constructor.
 		 *  @param orient The orientation of the slider, either TQt::Horizonal or TQt::Vertical.
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		explicit Slider(TQt::Orientation orient, TQWidget* parent = 0, const char* name = 0);
+		explicit Slider(TQt::Orientation orient, TQWidget* parent = nullptr, const char* name = nullptr);
 		/** Constructor.
 		 *  @param minValue The minimum value which the slider can have.
 		 *  @param maxValue The maximum value which the slider can have.
@@ -61,7 +61,7 @@ class Slider : public TQSlider
 		 *  @param name The name of this widget.
 		 */
 		Slider(int minValue, int maxValue, int pageStep, int value, TQt::Orientation orient,
-		       TQWidget* parent = 0, const char* name = 0);
+		       TQWidget* parent = nullptr, const char* name = nullptr);
 		/** Returns true if the slider is read only. */
 		bool         isReadOnly() const  { return mReadOnly; }
 		/** Sets whether the slider is read-only for the user.
diff --git a/kalarm/lib/spinbox.cpp b/kalarm/lib/spinbox.cpp
index 96fd3a8cb..d412916bc 100644
--- a/kalarm/lib/spinbox.cpp
+++ b/kalarm/lib/spinbox.cpp
@@ -55,7 +55,7 @@ void SpinBox::init()
 
 	// Find the spin widgets which are part of the spin boxes, in order to
 	// handle their shift-button presses.
-	TQObjectList* spinwidgets = queryList("TQSpinWidget", 0, false, true);
+	TQObjectList* spinwidgets = queryList("TQSpinWidget", nullptr, false, true);
 	TQSpinWidget* spin = (TQSpinWidget*)spinwidgets->getFirst();
 	if (spin)
 		spin->installEventFilter(this);   // handle shift-button presses
diff --git a/kalarm/lib/spinbox.h b/kalarm/lib/spinbox.h
index 930e8235b..da74c4d1f 100644
--- a/kalarm/lib/spinbox.h
+++ b/kalarm/lib/spinbox.h
@@ -48,7 +48,7 @@ class SpinBox : public TQSpinBox
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		explicit SpinBox(TQWidget* parent = 0, const char* name = 0);
+		explicit SpinBox(TQWidget* parent = nullptr, const char* name = nullptr);
 		/** Constructor.
 		 *  @param minValue The minimum value which the spin box can have.
 		 *  @param maxValue The maximum value which the spin box can have.
@@ -56,7 +56,7 @@ class SpinBox : public TQSpinBox
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		SpinBox(int minValue, int maxValue, int step = 1, TQWidget* parent = 0, const char* name = 0);
+		SpinBox(int minValue, int maxValue, int step = 1, TQWidget* parent = nullptr, const char* name = nullptr);
 		/** Returns true if the widget is read only. */
 		bool         isReadOnly() const                    { return mReadOnly; }
 		/** Sets whether the spin box can be changed by the user.
diff --git a/kalarm/lib/spinbox2.cpp b/kalarm/lib/spinbox2.cpp
index 328813e22..b60fd1f35 100644
--- a/kalarm/lib/spinbox2.cpp
+++ b/kalarm/lib/spinbox2.cpp
@@ -41,7 +41,7 @@
  */
 static const char* mirrorStyles[] = {
 	"PlastikStyle",
-	0     // list terminator
+	nullptr     // list terminator
 };
 static bool mirrorStyle(const TQStyle&);
 
@@ -403,7 +403,7 @@ SpinMirror::SpinMirror(SpinBox* spinbox, TQFrame* spinFrame, TQWidget* parent, c
 
 	// Find the spin widget which is part of the spin box, in order to
 	// pass on its shift-button presses.
-	TQObjectList* spinwidgets = spinbox->queryList("TQSpinWidget", 0, false, true);
+	TQObjectList* spinwidgets = spinbox->queryList("TQSpinWidget", nullptr, false, true);
 	mSpinWidget = (SpinBox*)spinwidgets->getFirst();
 	delete spinwidgets;
 }
diff --git a/kalarm/lib/spinbox2.h b/kalarm/lib/spinbox2.h
index c63f91526..57274969e 100644
--- a/kalarm/lib/spinbox2.h
+++ b/kalarm/lib/spinbox2.h
@@ -62,7 +62,7 @@ class SpinBox2 : public TQFrame
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		explicit SpinBox2(TQWidget* parent = 0, const char* name = 0);
+		explicit SpinBox2(TQWidget* parent = nullptr, const char* name = nullptr);
 		/** Constructor.
 		 *  @param minValue The minimum value which the spin box can have.
 		 *  @param maxValue The maximum value which the spin box can have.
@@ -72,7 +72,7 @@ class SpinBox2 : public TQFrame
 		 *  @param name The name of this widget.
 		 */
 		SpinBox2(int minValue, int maxValue, int step = 1, int step2 = 1,
-		         TQWidget* parent = 0, const char* name = 0);
+		         TQWidget* parent = nullptr, const char* name = nullptr);
 		/** Sets whether the spin box can be changed by the user.
 		 *  @param readOnly True to set the widget read-only, false to set it read-write.
 		 */
@@ -282,9 +282,9 @@ class SpinBox2 : public TQFrame
 		class MainSpinBox : public SpinBox
 		{
 			public:
-				MainSpinBox(SpinBox2* sb2, TQWidget* parent, const char* name = 0)
+				MainSpinBox(SpinBox2* sb2, TQWidget* parent, const char* name = nullptr)
 				                : SpinBox(parent, name), owner(sb2) { }
-				MainSpinBox(int minValue, int maxValue, int step, SpinBox2* sb2, TQWidget* parent, const char* name = 0)
+				MainSpinBox(int minValue, int maxValue, int step, SpinBox2* sb2, TQWidget* parent, const char* name = nullptr)
 				                : SpinBox(minValue, maxValue, step, parent, name), owner(sb2) { }
 				void            setAlignment(int a)       { editor()->setAlignment(a); }
 				virtual TQString mapValueToText(int v)     { return owner->mapValueToText(v); }
diff --git a/kalarm/lib/spinbox2private.h b/kalarm/lib/spinbox2private.h
index 2aac3f6b2..d24c953c7 100644
--- a/kalarm/lib/spinbox2private.h
+++ b/kalarm/lib/spinbox2private.h
@@ -36,9 +36,9 @@ class ExtraSpinBox : public SpinBox
 		TQ_OBJECT
   
 	public:
-		explicit ExtraSpinBox(TQWidget* parent, const char* name = 0)
+		explicit ExtraSpinBox(TQWidget* parent, const char* name = nullptr)
 		             : SpinBox(parent, name), mNewStylePending(false) { }
-		ExtraSpinBox(int minValue, int maxValue, int step, TQWidget* parent, const char* name = 0)
+		ExtraSpinBox(int minValue, int maxValue, int step, TQWidget* parent, const char* name = nullptr)
 		             : SpinBox(minValue, maxValue, step, parent, name), mNewStylePending(false) { }
 	signals:
 		void         styleUpdated();
@@ -63,7 +63,7 @@ class SpinMirror : public TQCanvasView
 		TQ_OBJECT
   
 	public:
-		explicit SpinMirror(SpinBox*, TQFrame* spinFrame, TQWidget* parent = 0, const char* name = 0);
+		explicit SpinMirror(SpinBox*, TQFrame* spinFrame, TQWidget* parent = nullptr, const char* name = nullptr);
 		void         setReadOnly(bool ro)        { mReadOnly = ro; }
 		bool         isReadOnly() const          { return mReadOnly; }
 		void         setNormalButtons(const TQPixmap&);
diff --git a/kalarm/lib/synchtimer.cpp b/kalarm/lib/synchtimer.cpp
index e32cf659c..fa83ac1d6 100644
--- a/kalarm/lib/synchtimer.cpp
+++ b/kalarm/lib/synchtimer.cpp
@@ -37,7 +37,7 @@ SynchTimer::SynchTimer()
 SynchTimer::~SynchTimer()
 {
 	delete mTimer;
-	mTimer = 0;
+	mTimer = nullptr;
 }
 
 /******************************************************************************
@@ -91,7 +91,7 @@ void SynchTimer::disconnecT(TQObject* receiver, const char* member)
 =  Application-wide timer synchronised to the minute boundary.
 =============================================================================*/
 
-MinuteTimer* MinuteTimer::mInstance = 0;
+MinuteTimer* MinuteTimer::mInstance = nullptr;
 
 MinuteTimer* MinuteTimer::instance()
 {
@@ -140,7 +140,7 @@ DailyTimer* DailyTimer::fixedInstance(const TQTime& timeOfDay, bool create)
 	for (TQValueList<DailyTimer*>::Iterator it = mFixedTimers.begin();  it != mFixedTimers.end();  ++it)
 		if ((*it)->mTime == timeOfDay)
 			return *it;
-	return create ? new DailyTimer(timeOfDay, true) : 0;
+	return create ? new DailyTimer(timeOfDay, true) : nullptr;
 }
 
 /******************************************************************************
diff --git a/kalarm/lib/synchtimer.h b/kalarm/lib/synchtimer.h
index 2263589cd..0c38c5bc9 100644
--- a/kalarm/lib/synchtimer.h
+++ b/kalarm/lib/synchtimer.h
@@ -53,7 +53,7 @@ class SynchTimer : public TQObject
 		SynchTimer();
 		virtual void        start() = 0;
 		void                connecT(TQObject* receiver, const char* member);
-		void                disconnecT(TQObject* receiver, const char* member = 0);
+		void                disconnecT(TQObject* receiver, const char* member = nullptr);
 		bool                hasConnections() const   { return !mConnections.isEmpty(); }
 
 		TQTimer*             mTimer;
@@ -79,7 +79,7 @@ class MinuteTimer : public SynchTimer
 		TQ_OBJECT
   
 	public:
-		virtual ~MinuteTimer()  { mInstance = 0; }
+		virtual ~MinuteTimer()  { mInstance = nullptr; }
 		/** Connect to the timer signal.
 		 *  @param receiver Receiving object.
 		 *  @param member Slot to activate.
@@ -91,7 +91,7 @@ class MinuteTimer : public SynchTimer
 		 *  @param member Slot to disconnect. If null, all slots belonging to
 		 *                @p receiver will be disconnected.
 		 */
-		static void disconnect(TQObject* receiver, const char* member = 0)
+		static void disconnect(TQObject* receiver, const char* member = nullptr)
 		                   { if (mInstance) mInstance->disconnecT(receiver, member); }
 
 	protected:
@@ -135,7 +135,7 @@ class DailyTimer : public SynchTimer
 		 *  @param member Slot to disconnect. If null, all slots belonging to
 		 *                @p receiver will be disconnected.
 		 */
-		static void disconnect(const TQTime& timeOfDay, TQObject* receiver, const char* member = 0);
+		static void disconnect(const TQTime& timeOfDay, TQObject* receiver, const char* member = nullptr);
 		/** Change the time at which this variable timer triggers.
 		 *  @param newTimeOfDay New time at which the timer should trigger.
 		 *  @param triggerMissed If true, and if @p newTimeOfDay < @p oldTimeOfDay, and if the current
@@ -192,7 +192,7 @@ class MidnightTimer
 		 *  @param member Slot to disconnect. If null, all slots belonging to
 		 *                @p receiver will be disconnected.
 		 */
-		static void disconnect(TQObject* receiver, const char* member = 0)
+		static void disconnect(TQObject* receiver, const char* member = nullptr)
 		                   { DailyTimer::disconnect(TQTime(0,0), receiver, member); }
 
 };
diff --git a/kalarm/lib/timeedit.cpp b/kalarm/lib/timeedit.cpp
index 21215a6c5..d20c0cc1d 100644
--- a/kalarm/lib/timeedit.cpp
+++ b/kalarm/lib/timeedit.cpp
@@ -30,7 +30,7 @@
 
 TimeEdit::TimeEdit(TQWidget* parent, const char* name)
 	: TQHBox(parent, name),
-	  mAmPm(0),
+	  mAmPm(nullptr),
 	  mAmIndex(-1),
 	  mPmIndex(-1),
 	  mReadOnly(false)
diff --git a/kalarm/lib/timeedit.h b/kalarm/lib/timeedit.h
index cfe9185bb..c85ea2dc1 100644
--- a/kalarm/lib/timeedit.h
+++ b/kalarm/lib/timeedit.h
@@ -56,7 +56,7 @@ class TimeEdit : public TQHBox
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		explicit TimeEdit(TQWidget* parent = 0, const char* name = 0);
+		explicit TimeEdit(TQWidget* parent = nullptr, const char* name = nullptr);
 		/** Returns true if the widget is read only. */
 		bool          isReadOnly() const           { return mReadOnly; }
 		/** Sets whether the widget is read-only for the user. If read-only,
diff --git a/kalarm/lib/timeperiod.h b/kalarm/lib/timeperiod.h
index e5cacc9b6..423c9d600 100644
--- a/kalarm/lib/timeperiod.h
+++ b/kalarm/lib/timeperiod.h
@@ -68,7 +68,7 @@ class TimePeriod : public TQHBox
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		TimePeriod(bool allowMinute, TQWidget* parent, const char* name = 0);
+		TimePeriod(bool allowMinute, TQWidget* parent, const char* name = nullptr);
 		/** Returns true if the widget is read only. */
 		bool          isReadOnly() const             { return mReadOnly; }
 		/** Sets whether the widget is read-only for the user. If read-only,
diff --git a/kalarm/lib/timespinbox.cpp b/kalarm/lib/timespinbox.cpp
index db3d54002..0fa65d629 100644
--- a/kalarm/lib/timespinbox.cpp
+++ b/kalarm/lib/timespinbox.cpp
@@ -30,7 +30,7 @@
 class TimeSpinBox::TimeValidator : public TQValidator
 {
 	public:
-		TimeValidator(int minMin, int maxMin, TQWidget* parent, const char* name = 0)
+		TimeValidator(int minMin, int maxMin, TQWidget* parent, const char* name = nullptr)
 			: TQValidator(parent, name),
 		          minMinute(minMin), maxMinute(maxMin), m12Hour(false), mPm(false) { }
 		virtual State validate(TQString&, int&) const;
diff --git a/kalarm/lib/timespinbox.h b/kalarm/lib/timespinbox.h
index 564828753..cb0efbd72 100644
--- a/kalarm/lib/timespinbox.h
+++ b/kalarm/lib/timespinbox.h
@@ -53,14 +53,14 @@ class TimeSpinBox : public SpinBox2
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		explicit TimeSpinBox(bool use24hour, TQWidget* parent = 0, const char* name = 0);
+		explicit TimeSpinBox(bool use24hour, TQWidget* parent = nullptr, const char* name = nullptr);
 		/** Constructor for a non-wrapping time spin box which can be used to enter a length of time.
 		 *  @param minMinute The minimum value which the spin box can hold, in minutes.
 		 *  @param maxMinute  The maximum value which the spin box can hold, in minutes.
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		TimeSpinBox(int minMinute, int maxMinute, TQWidget* parent = 0, const char* name = 0);
+		TimeSpinBox(int minMinute, int maxMinute, TQWidget* parent = nullptr, const char* name = nullptr);
 		/** Returns true if the spin box holds a valid value.
 		 *  An invalid value is displayed as asterisks.
 		 */
diff --git a/kalarm/main.cpp b/kalarm/main.cpp
index dee6051af..6e6e76d1c 100644
--- a/kalarm/main.cpp
+++ b/kalarm/main.cpp
@@ -33,74 +33,74 @@
 
 static TDECmdLineOptions options[] =
 {
-	{ "a", 0, 0 },
-	{ "ack-confirm", I18N_NOOP("Prompt for confirmation when alarm is acknowledged"), 0 },
-	{ "A", 0, 0 },
-	{ "attach <url>", I18N_NOOP("Attach file to email (repeat as needed)"), 0 },
-	{ "auto-close", I18N_NOOP("Auto-close alarm window after --late-cancel period"), 0 },
-	{ "bcc", I18N_NOOP("Blind copy email to self"), 0 },
-	{ "b", 0, 0 },
-	{ "beep", I18N_NOOP("Beep when message is displayed"), 0 },
-	{ "colour", 0, 0 },
-	{ "c", 0, 0 },
-	{ "color <color>", I18N_NOOP("Message background color (name or hex 0xRRGGBB)"), 0 },
-	{ "colourfg", 0, 0 },
-	{ "C", 0, 0 },
-	{ "colorfg <color>", I18N_NOOP("Message foreground color (name or hex 0xRRGGBB)"), 0 },
-	{ "calendarURL <url>", I18N_NOOP("URL of calendar file"), 0 },
-	{ "cancelEvent <eventID>", I18N_NOOP("Cancel alarm with the specified event ID"), 0 },
-	{ "d", 0, 0 },
-	{ "disable", I18N_NOOP("Disable the alarm"), 0 },
-	{ "e", 0, 0 },
-	{ "!exec <commandline>", I18N_NOOP("Execute a shell command line"), 0 },
-	{ "edit <eventID>", I18N_NOOP("Display the alarm edit dialog to edit the specified alarm"), 0 },
-	{ "n", 0, 0 },
-	{ "edit-new", I18N_NOOP("Display the alarm edit dialog to edit a new alarm"), 0 },
-	{ "edit-new-preset <templateName>", I18N_NOOP("Display the alarm edit dialog, preset with a template"), 0 },
-	{ "f", 0, 0 },
-	{ "file <url>", I18N_NOOP("File to display"), 0 },
-	{ "F", 0, 0 },
-	{ "from-id <ID>", I18N_NOOP("KMail identity to use as sender of email"), 0 },
-	{ "handleEvent <eventID>", I18N_NOOP("Trigger or cancel alarm with the specified event ID"), 0 },
-	{ "i", 0, 0 },
-	{ "interval <period>", I18N_NOOP("Interval between alarm repetitions"), 0 },
-	{ "k", 0, 0 },
-	{ "korganizer", I18N_NOOP("Show alarm as an event in KOrganizer"), 0 },
-	{ "l", 0, 0 },
+	{ "a", nullptr, nullptr },
+	{ "ack-confirm", I18N_NOOP("Prompt for confirmation when alarm is acknowledged"), nullptr },
+	{ "A", nullptr, nullptr },
+	{ "attach <url>", I18N_NOOP("Attach file to email (repeat as needed)"), nullptr },
+	{ "auto-close", I18N_NOOP("Auto-close alarm window after --late-cancel period"), nullptr },
+	{ "bcc", I18N_NOOP("Blind copy email to self"), nullptr },
+	{ "b", nullptr, nullptr },
+	{ "beep", I18N_NOOP("Beep when message is displayed"), nullptr },
+	{ "colour", nullptr, nullptr },
+	{ "c", nullptr, nullptr },
+	{ "color <color>", I18N_NOOP("Message background color (name or hex 0xRRGGBB)"), nullptr },
+	{ "colourfg", nullptr, nullptr },
+	{ "C", nullptr, nullptr },
+	{ "colorfg <color>", I18N_NOOP("Message foreground color (name or hex 0xRRGGBB)"), nullptr },
+	{ "calendarURL <url>", I18N_NOOP("URL of calendar file"), nullptr },
+	{ "cancelEvent <eventID>", I18N_NOOP("Cancel alarm with the specified event ID"), nullptr },
+	{ "d", nullptr, nullptr },
+	{ "disable", I18N_NOOP("Disable the alarm"), nullptr },
+	{ "e", nullptr, nullptr },
+	{ "!exec <commandline>", I18N_NOOP("Execute a shell command line"), nullptr },
+	{ "edit <eventID>", I18N_NOOP("Display the alarm edit dialog to edit the specified alarm"), nullptr },
+	{ "n", nullptr, nullptr },
+	{ "edit-new", I18N_NOOP("Display the alarm edit dialog to edit a new alarm"), nullptr },
+	{ "edit-new-preset <templateName>", I18N_NOOP("Display the alarm edit dialog, preset with a template"), nullptr },
+	{ "f", nullptr, nullptr },
+	{ "file <url>", I18N_NOOP("File to display"), nullptr },
+	{ "F", nullptr, nullptr },
+	{ "from-id <ID>", I18N_NOOP("KMail identity to use as sender of email"), nullptr },
+	{ "handleEvent <eventID>", I18N_NOOP("Trigger or cancel alarm with the specified event ID"), nullptr },
+	{ "i", nullptr, nullptr },
+	{ "interval <period>", I18N_NOOP("Interval between alarm repetitions"), nullptr },
+	{ "k", nullptr, nullptr },
+	{ "korganizer", I18N_NOOP("Show alarm as an event in KOrganizer"), nullptr },
+	{ "l", nullptr, nullptr },
 	{ "late-cancel <period>", I18N_NOOP("Cancel alarm if more than 'period' late when triggered"), "1" },
-	{ "L", 0, 0 },
-	{ "login", I18N_NOOP("Repeat alarm at every login"), 0 },
-	{ "m", 0, 0 },
-	{ "mail <address>", I18N_NOOP("Send an email to the given address (repeat as needed)"), 0 },
-	{ "p", 0, 0 },
-	{ "play <url>", I18N_NOOP("Audio file to play once"), 0 },
+	{ "L", nullptr, nullptr },
+	{ "login", I18N_NOOP("Repeat alarm at every login"), nullptr },
+	{ "m", nullptr, nullptr },
+	{ "mail <address>", I18N_NOOP("Send an email to the given address (repeat as needed)"), nullptr },
+	{ "p", nullptr, nullptr },
+	{ "play <url>", I18N_NOOP("Audio file to play once"), nullptr },
 #ifndef WITHOUT_ARTS
-	{ "P", 0, 0 },
-	{ "play-repeat <url>", I18N_NOOP("Audio file to play repeatedly"), 0 },
+	{ "P", nullptr, nullptr },
+	{ "play-repeat <url>", I18N_NOOP("Audio file to play repeatedly"), nullptr },
 #endif
-	{ "recurrence <spec>", I18N_NOOP("Specify alarm recurrence using iCalendar syntax"), 0 },
-	{ "R", 0, 0 },
-	{ "reminder <period>", I18N_NOOP("Display reminder in advance of alarm"), 0 },
-	{ "reminder-once <period>", I18N_NOOP("Display reminder once, before first alarm recurrence"), 0 },
-	{ "r", 0, 0 },
-	{ "repeat <count>", I18N_NOOP("Number of times to repeat alarm (including initial occasion)"), 0 },
-	{ "reset", I18N_NOOP("Reset the alarm scheduling daemon"), 0 },
-	{ "s", 0, 0 },
-	{ "speak", I18N_NOOP("Speak the message when it is displayed"), 0 },
-	{ "stop", I18N_NOOP("Stop the alarm scheduling daemon"), 0 },
-	{ "S", 0, 0 },
-	{ "subject", I18N_NOOP("Email subject line"), 0 },
-	{ "t", 0, 0 },
-	{ "time <time>", I18N_NOOP("Trigger alarm at time [[[yyyy-]mm-]dd-]hh:mm, or date yyyy-mm-dd"), 0 },
-	{ "tray", I18N_NOOP("Display system tray icon"), 0 },
-	{ "triggerEvent <eventID>", I18N_NOOP("Trigger alarm with the specified event ID"), 0 },
-	{ "u", 0, 0 },
-	{ "until <time>", I18N_NOOP("Repeat until time [[[yyyy-]mm-]dd-]hh:mm, or date yyyy-mm-dd"), 0 },
+	{ "recurrence <spec>", I18N_NOOP("Specify alarm recurrence using iCalendar syntax"), nullptr },
+	{ "R", nullptr, nullptr },
+	{ "reminder <period>", I18N_NOOP("Display reminder in advance of alarm"), nullptr },
+	{ "reminder-once <period>", I18N_NOOP("Display reminder once, before first alarm recurrence"), nullptr },
+	{ "r", nullptr, nullptr },
+	{ "repeat <count>", I18N_NOOP("Number of times to repeat alarm (including initial occasion)"), nullptr },
+	{ "reset", I18N_NOOP("Reset the alarm scheduling daemon"), nullptr },
+	{ "s", nullptr, nullptr },
+	{ "speak", I18N_NOOP("Speak the message when it is displayed"), nullptr },
+	{ "stop", I18N_NOOP("Stop the alarm scheduling daemon"), nullptr },
+	{ "S", nullptr, nullptr },
+	{ "subject", I18N_NOOP("Email subject line"), nullptr },
+	{ "t", nullptr, nullptr },
+	{ "time <time>", I18N_NOOP("Trigger alarm at time [[[yyyy-]mm-]dd-]hh:mm, or date yyyy-mm-dd"), nullptr },
+	{ "tray", I18N_NOOP("Display system tray icon"), nullptr },
+	{ "triggerEvent <eventID>", I18N_NOOP("Trigger alarm with the specified event ID"), nullptr },
+	{ "u", nullptr, nullptr },
+	{ "until <time>", I18N_NOOP("Repeat until time [[[yyyy-]mm-]dd-]hh:mm, or date yyyy-mm-dd"), nullptr },
 #ifndef WITHOUT_ARTS
-	{ "V", 0, 0 },
-	{ "volume <percent>", I18N_NOOP("Volume to play audio file"), 0 },
+	{ "V", nullptr, nullptr },
+	{ "volume <percent>", I18N_NOOP("Volume to play audio file"), nullptr },
 #endif
-	{ "+[message]", I18N_NOOP("Message text to display"), 0 },
+	{ "+[message]", I18N_NOOP("Message text to display"), nullptr },
 	TDECmdLineLastOption
 };
 
@@ -110,8 +110,8 @@ int main(int argc, char *argv[])
 	TDEAboutData aboutData(PROGRAM_NAME, I18N_NOOP("KAlarm"), KALARM_VERSION,
 		I18N_NOOP("Personal alarm message, command and email scheduler for TDE"),
 		TDEAboutData::License_GPL,
-		"Copyright 2001-2007, David Jarvie", 0, "http://www.astrojar.org.uk/kalarm");
-	aboutData.addAuthor("David Jarvie", 0, "software@astrojar.org.uk");
+		"Copyright 2001-2007, David Jarvie", nullptr, "http://www.astrojar.org.uk/kalarm");
+	aboutData.addAuthor("David Jarvie", nullptr, "software@astrojar.org.uk");
 
 	TDECmdLineArgs::init(argc, argv, &aboutData);
 	TDECmdLineArgs::addCmdLineOptions(options);
diff --git a/kalarm/mainwindow.cpp b/kalarm/mainwindow.cpp
index 02de1cec5..adcfebabe 100644
--- a/kalarm/mainwindow.cpp
+++ b/kalarm/mainwindow.cpp
@@ -92,7 +92,7 @@ static TDEShortcut redoShortcut;
 =============================================================================*/
 
 MainWindow::WindowList   MainWindow::mWindowList;
-TemplateDlg*             MainWindow::mTemplateDlg = 0;
+TemplateDlg*             MainWindow::mTemplateDlg = nullptr;
 
 // Collect these widget labels together to ensure consistent wording and
 // translations across different modules.
@@ -118,7 +118,7 @@ MainWindow* MainWindow::create(bool restored)
 }
 
 MainWindow::MainWindow(bool restored)
-	: MainWindowBase(0, "MainWin", WGroupLeader | WStyle_ContextHelp | WDestructiveClose),
+	: MainWindowBase(nullptr, "MainWin", WGroupLeader | WStyle_ContextHelp | WDestructiveClose),
 	  mMinuteTimerActive(false),
 	  mHiddenTrayParent(false)
 {
@@ -227,7 +227,7 @@ void MainWindow::readProperties(TDEConfig* config)
 */
 MainWindow* MainWindow::mainMainWindow()
 {
-	MainWindow* tray = theApp()->trayWindow() ? theApp()->trayWindow()->assocMainWindow() : 0;
+	MainWindow* tray = theApp()->trayWindow() ? theApp()->trayWindow()->assocMainWindow() : nullptr;
 	if (tray  &&  tray->isVisible())
 		return tray;
 	for (WindowList::Iterator it = mWindowList.begin();  it != mWindowList.end();  ++it)
@@ -236,7 +236,7 @@ MainWindow* MainWindow::mainMainWindow()
 	if (tray)
 		return tray;
 	if (mWindowList.isEmpty())
-		return 0;
+		return nullptr;
 	return mWindowList.first();
 }
 
@@ -333,8 +333,8 @@ void MainWindow::initActions()
 	mActionCopy            = new TDEAction(i18n("&Copy..."), "edit-copy", TQt::SHIFT+TQt::Key_Insert, this, TQ_SLOT(slotCopy()), actions, "copy");
 	mActionModify          = new TDEAction(i18n("&Edit..."), "edit", TQt::CTRL+TQt::Key_E, this, TQ_SLOT(slotModify()), actions, "modify");
 	mActionDelete          = new TDEAction(i18n("&Delete"), "edit-delete", TQt::Key_Delete, this, TQ_SLOT(slotDelete()), actions, "delete");
-	mActionReactivate      = new TDEAction(i18n("Reac&tivate"), 0, TQt::CTRL+TQt::Key_R, this, TQ_SLOT(slotReactivate()), actions, "undelete");
-	mActionEnable          = new TDEAction(TQString(), 0, TQt::CTRL+TQt::Key_B, this, TQ_SLOT(slotEnable()), actions, "disable");
+	mActionReactivate      = new TDEAction(i18n("Reac&tivate"), nullptr, TQt::CTRL+TQt::Key_R, this, TQ_SLOT(slotReactivate()), actions, "undelete");
+	mActionEnable          = new TDEAction(TQString(), nullptr, TQt::CTRL+TQt::Key_B, this, TQ_SLOT(slotEnable()), actions, "disable");
 	mActionView            = new TDEAction(i18n("&View"), "viewmag", TQt::CTRL+TQt::Key_W, this, TQ_SLOT(slotView()), actions, "view");
 	mActionShowTime        = new TDEToggleAction(i18n_a_ShowAlarmTimes(), TQt::CTRL+TQt::Key_M, this, TQ_SLOT(slotShowTime()), actions, "showAlarmTimes");
 	mActionShowTime->setCheckedState(i18n("Hide &Alarm Times"));
@@ -351,13 +351,13 @@ void MainWindow::initActions()
 	if (undoText.isNull())
 	{
 		// Get standard texts, etc., for Undo and Redo actions
-		TDEAction* act = KStdAction::undo(this, 0, actions);
+		TDEAction* act = KStdAction::undo(this, nullptr, actions);
 		undoIcon         = act->icon();
 		undoShortcut     = act->shortcut();
 		undoText         = act->text();
 		undoTextStripped = KAlarm::stripAccel(undoText);
 		delete act;
-		act = KStdAction::redo(this, 0, actions);
+		act = KStdAction::redo(this, nullptr, actions);
 		redoIcon         = act->icon();
 		redoShortcut     = act->shortcut();
 		redoText         = act->text();
@@ -469,8 +469,8 @@ void MainWindow::updateExpired()
 void MainWindow::setUpdateTimer()
 {
 	// Check whether any windows need to be updated
-	MainWindow* needTimer = 0;
-	MainWindow* timerWindow = 0;
+	MainWindow* needTimer = nullptr;
+	MainWindow* timerWindow = nullptr;
 	for (WindowList::Iterator it = mWindowList.begin();  it != mWindowList.end();  ++it)
 	{
 		MainWindow* w = *it;
@@ -538,7 +538,7 @@ void MainWindow::slotNew()
 */
 void MainWindow::executeNew(MainWindow* win, const KAEvent* evnt, KAEvent::Action action, const AlarmText& text)
 {
-	EditAlarmDlg editDlg(false, i18n("New Alarm"), win, 0, evnt);
+	EditAlarmDlg editDlg(false, i18n("New Alarm"), win, nullptr, evnt);
 	if (!text.isEmpty())
 		editDlg.setAction(action, text);
 	if (editDlg.exec() == TQDialog::Accepted)
@@ -547,7 +547,7 @@ void MainWindow::executeNew(MainWindow* win, const KAEvent* evnt, KAEvent::Actio
 		editDlg.getEvent(event);
 
 		// Add the alarm to the displayed lists and to the calendar file
-		if (KAlarm::addEvent(event, (win ? win->mListView : 0), &editDlg) == KAlarm::UPDATE_KORG_ERR)
+		if (KAlarm::addEvent(event, (win ? win->mListView : nullptr), &editDlg) == KAlarm::UPDATE_KORG_ERR)
 			KAlarm::displayKOrgUpdateError(&editDlg, KAlarm::KORG_ERR_ADD, 1);
 		Undo::saveAdd(event);
 
@@ -608,14 +608,14 @@ void MainWindow::slotModify()
 */
 void MainWindow::executeEdit(KAEvent& event, MainWindow* win)
 {
-	EditAlarmDlg editDlg(false, i18n("Edit Alarm"), win, 0, &event);
+	EditAlarmDlg editDlg(false, i18n("Edit Alarm"), win, nullptr, &event);
 	if (editDlg.exec() == TQDialog::Accepted)
 	{
 		KAEvent newEvent;
 		bool changeDeferral = !editDlg.getEvent(newEvent);
 
 		// Update the event in the displays and in the calendar file
-		AlarmListView* view = win ? win->mListView : 0;
+		AlarmListView* view = win ? win->mListView : nullptr;
 		if (changeDeferral)
 		{
 			// The only change has been to an existing deferral
@@ -645,7 +645,7 @@ void MainWindow::slotView()
 		KAEvent event = item->event();
 		EditAlarmDlg editDlg(false, (event.expired() ? i18n("Expired Alarm") + " [" + i18n("read-only") + ']'
 		                                             : i18n("View Alarm")),
-		                     this, 0, &event, true);
+		                     this, nullptr, &event, true);
 		editDlg.exec();
 	}
 }
@@ -908,7 +908,7 @@ void MainWindow::slotTemplatesEnd()
 	if (mTemplateDlg)
 	{
 		mTemplateDlg->delayedDestruct();   // this deletes the dialogue once it is safe to do so
-		mTemplateDlg = 0;
+		mTemplateDlg = nullptr;
 		enableTemplateMenuItem(true);      // re-enable menu item in all windows
 	}
 }
@@ -1282,7 +1282,7 @@ void MainWindow::executeDropEvent(MainWindow* win, TQDropEvent* e)
 		return;
 
 	if (!alarmText.isEmpty())
-		executeNew(win, 0, action, alarmText);
+		executeNew(win, nullptr, action, alarmText);
 }
 
 /******************************************************************************
@@ -1294,7 +1294,7 @@ void MainWindow::slotSelection()
 	// Find which item has been selected, and whether more than one is selected
 	TQValueList<EventListViewItemBase*> items = mListView->selectedItems();
 	int count = items.count();
-	AlarmListViewItem* item = (AlarmListViewItem*)((count == 1) ? items.first() : 0);
+	AlarmListViewItem* item = (AlarmListViewItem*)((count == 1) ? items.first() : nullptr);
 	bool enableReactivate = true;
 	bool enableEnableDisable = true;
 	bool enableEnable = false;
@@ -1404,7 +1404,7 @@ MainWindow* MainWindow::toggleWindow(MainWindow* win)
 		{
 			// The window is visible, so close it
 			win->close();
-			return 0;
+			return nullptr;
 		}
 		else
 		{
diff --git a/kalarm/mainwindow.h b/kalarm/mainwindow.h
index fdb05b38e..a1d7a4945 100644
--- a/kalarm/mainwindow.h
+++ b/kalarm/mainwindow.h
@@ -55,11 +55,11 @@ class MainWindow : public MainWindowBase
 		static void        refresh();
 		static void        updateExpired();
 		static void        addEvent(const KAEvent&, MainWindow*);
-		static void        executeNew(MainWindow* w = 0, KAEvent::Action a = KAEvent::MESSAGE, const AlarmText& t = AlarmText())
-		                                      { executeNew(w, 0, a, t); }
-		static void        executeNew(const KAEvent& e, MainWindow* w = 0)
+		static void        executeNew(MainWindow* w = nullptr, KAEvent::Action a = KAEvent::MESSAGE, const AlarmText& t = AlarmText())
+		                                      { executeNew(w, nullptr, a, t); }
+		static void        executeNew(const KAEvent& e, MainWindow* w = nullptr)
 		                                      { executeNew(w, &e); }
-		static void        executeEdit(KAEvent&, MainWindow* = 0);
+		static void        executeEdit(KAEvent&, MainWindow* = nullptr);
 		static void        executeDragEnterEvent(TQDragEnterEvent*);
 		static void        executeDropEvent(MainWindow*, TQDropEvent*);
 		static void        closeAll();
diff --git a/kalarm/mainwindowbase.h b/kalarm/mainwindowbase.h
index 41e7867d7..80c046da9 100644
--- a/kalarm/mainwindowbase.h
+++ b/kalarm/mainwindowbase.h
@@ -37,7 +37,7 @@ class MainWindowBase : public TDEMainWindow
   
 
 	public:
-		explicit MainWindowBase(TQWidget* parent = 0, const char* name = 0, WFlags f = WType_TopLevel | WDestructiveClose)
+		explicit MainWindowBase(TQWidget* parent = nullptr, const char* name = nullptr, WFlags f = WType_TopLevel | WDestructiveClose)
 		                    : TDEMainWindow(parent, name, f), disableQuit(false) { }
 
 	protected:
diff --git a/kalarm/messagewin.cpp b/kalarm/messagewin.cpp
index 1fefa7d1f..0cc0b7c96 100644
--- a/kalarm/messagewin.cpp
+++ b/kalarm/messagewin.cpp
@@ -93,7 +93,7 @@ static bool wantModal();
 class MessageText : public TQTextEdit
 {
 	public:
-		MessageText(const TQString& text, const TQString& context = TQString(), TQWidget* parent = 0, const char* name = 0)
+		MessageText(const TQString& text, const TQString& context = TQString(), TQWidget* parent = nullptr, const char* name = nullptr)
 		: TQTextEdit(text, context, parent, name)
 		{
 			setReadOnly(true);
@@ -144,7 +144,7 @@ TQMap<TQString, unsigned> MessageWin::mErrorMessages;
 *  displayed.
 */
 MessageWin::MessageWin(const KAEvent& event, const KAAlarm& alarm, bool reschedule_event, bool allowDefer)
-	: MainWindowBase(0, "MessageWin", WFLAGS | TQt::WGroupLeader | TQt::WStyle_ContextHelp
+	: MainWindowBase(nullptr, "MessageWin", WFLAGS | TQt::WGroupLeader | TQt::WStyle_ContextHelp
 	                                         | (wantModal() ? 0 : TQt::WX11BypassWM)),
 	  mMessage(event.cleanText()),
 	  mFont(event.font()),
@@ -166,15 +166,15 @@ MessageWin::MessageWin(const KAEvent& event, const KAAlarm& alarm, bool reschedu
 	  mShowEdit(!mEventID.isEmpty()),
 	  mNoDefer(!allowDefer || alarm.repeatAtLogin()),
 	  mInvalid(false),
-	  mArtsDispatcher(0),
-	  mPlayObject(0),
+	  mArtsDispatcher(nullptr),
+	  mPlayObject(nullptr),
 	  mOldVolume(-1),
 	  mEvent(event),
-	  mEditButton(0),
-	  mDeferButton(0),
-	  mSilenceButton(0),
-	  mDeferDlg(0),
-	  mWinModule(0),
+	  mEditButton(nullptr),
+	  mDeferButton(nullptr),
+	  mSilenceButton(nullptr),
+	  mDeferDlg(nullptr),
+	  mWinModule(nullptr),
 	  mFlags(event.flags()),
 	  mLateCancel(event.lateCancel()),
 	  mErrorWindow(false),
@@ -202,7 +202,7 @@ MessageWin::MessageWin(const KAEvent& event, const KAAlarm& alarm, bool reschedu
 *  Construct the message window for a specified error message.
 */
 MessageWin::MessageWin(const KAEvent& event, const DateTime& alarmDateTime, const TQStringList& errmsgs)
-	: MainWindowBase(0, "MessageWin", WFLAGS | TQt::WGroupLeader | TQt::WStyle_ContextHelp),
+	: MainWindowBase(nullptr, "MessageWin", WFLAGS | TQt::WGroupLeader | TQt::WStyle_ContextHelp),
 	  mMessage(event.cleanText()),
 	  mDateTime(alarmDateTime),
 	  mEventID(event.id()),
@@ -215,14 +215,14 @@ MessageWin::MessageWin(const KAEvent& event, const DateTime& alarmDateTime, cons
 	  mShowEdit(false),
 	  mNoDefer(true),
 	  mInvalid(false),
-	  mArtsDispatcher(0),
-	  mPlayObject(0),
+	  mArtsDispatcher(nullptr),
+	  mPlayObject(nullptr),
 	  mEvent(event),
-	  mEditButton(0),
-	  mDeferButton(0),
-	  mSilenceButton(0),
-	  mDeferDlg(0),
-	  mWinModule(0),
+	  mEditButton(nullptr),
+	  mDeferButton(nullptr),
+	  mSilenceButton(nullptr),
+	  mDeferDlg(nullptr),
+	  mWinModule(nullptr),
 	  mErrorWindow(true),
 	  mNoPostAction(true),
 	  mRecreating(false),
@@ -242,14 +242,14 @@ MessageWin::MessageWin(const KAEvent& event, const DateTime& alarmDateTime, cons
 *  The window is initialised by readProperties().
 */
 MessageWin::MessageWin()
-	: MainWindowBase(0, "MessageWin", WFLAGS),
-	  mArtsDispatcher(0),
-	  mPlayObject(0),
-	  mEditButton(0),
-	  mDeferButton(0),
-	  mSilenceButton(0),
-	  mDeferDlg(0),
-	  mWinModule(0),
+	: MainWindowBase(nullptr, "MessageWin", WFLAGS),
+	  mArtsDispatcher(nullptr),
+	  mPlayObject(nullptr),
+	  mEditButton(nullptr),
+	  mDeferButton(nullptr),
+	  mSilenceButton(nullptr),
+	  mDeferDlg(nullptr),
+	  mWinModule(nullptr),
 	  mErrorWindow(false),
 	  mRecreating(false),
 	  mRescheduleEvent(false),
@@ -270,7 +270,7 @@ MessageWin::~MessageWin()
 	kdDebug(5950) << "MessageWin::~MessageWin(" << mEventID << ")" << endl;
 	stopPlay();
 	delete mWinModule;
-	mWinModule = 0;
+	mWinModule = nullptr;
 	mErrorMessages.remove(mEventID);
 	mWindowList.remove(this);
 	if (!mRecreating)
@@ -297,7 +297,7 @@ void MessageWin::initView()
 	if (mDateTime.isValid())
 	{
 		// Show the alarm date/time, together with an "Advance reminder" text where appropriate
-		TQFrame* frame = 0;
+		TQFrame* frame = nullptr;
 		TQVBoxLayout* layout = topLayout;
 		if (reminder)
 		{
@@ -400,7 +400,7 @@ void MessageWin::initView()
 				topLayout->addStretch();
 				// Don't include any horizontal margins if message is 2/3 screen width
 				if (!mWinModule)
-					mWinModule = new TWinModule(0, TWinModule::INFO_DESKTOP);
+					mWinModule = new TWinModule(nullptr, TWinModule::INFO_DESKTOP);
 				if (text->sizeHint().width() >= mWinModule->workArea().width()*2/3)
 					topLayout->addWidget(text, 1, TQt::AlignHCenter);
 				else
@@ -573,7 +573,7 @@ void MessageWin::initView()
 		TQWhatsThis::add(mKMailButton, i18n("Locate and highlight this email in KMail"));
 	}
 	else
-		mKMailButton = 0;
+		mKMailButton = nullptr;
 
 	// KAlarm button
 	TQPixmap pixmap = iconLoader.loadIcon(TQString::fromLatin1(tdeApp->aboutData()->appName()), TDEIcon::MainToolbar);
@@ -769,7 +769,7 @@ MessageWin* MessageWin::findEvent(const TQString& eventID)
 		if (w->mEventID == eventID  &&  !w->mErrorWindow)
 			return w;
 	}
-	return 0;
+	return nullptr;
 }
 
 /******************************************************************************
@@ -823,7 +823,7 @@ void MessageWin::slotSpeak()
 			kdDebug(5950) << "MessageWin::slotSpeak(): failed to start kttsd: " << error << endl;
 			if (!haveErrorMessage(ErrMsg_Speak))
 			{
-				KMessageBox::detailedError(0, i18n("Unable to speak message"), error);
+				KMessageBox::detailedError(nullptr, i18n("Unable to speak message"), error);
 				clearErrorMessage(ErrMsg_Speak);
 			}
 			return;
@@ -837,7 +837,7 @@ void MessageWin::slotSpeak()
 		kdDebug(5950) << "MessageWin::slotSpeak(): sayMessage() DCOP error" << endl;
 		if (!haveErrorMessage(ErrMsg_Speak))
 		{
-			KMessageBox::detailedError(0, i18n("Unable to speak message"), i18n("DCOP Call sayMessage failed"));
+			KMessageBox::detailedError(nullptr, i18n("Unable to speak message"), i18n("DCOP Call sayMessage failed"));
 			clearErrorMessage(ErrMsg_Speak);
 		}
 	}
@@ -866,7 +866,7 @@ void MessageWin::slotPlayAudio()
 	}
 	if (!mArtsDispatcher)
 	{
-		mFadeTimer = 0;
+		mFadeTimer = nullptr;
 		mPlayTimer = new TQTimer(this);
 		connect(mPlayTimer, TQ_SIGNAL(timeout()), TQ_SLOT(checkAudioPlay()));
 		mArtsDispatcher = new KArtsDispatcher;
@@ -1053,8 +1053,8 @@ void MessageWin::stopPlay()
 				setKMixVolume(static_cast<int>(mOldVolume));
 		}
 	}
-	delete mPlayObject;      mPlayObject = 0;
-	delete mArtsDispatcher;  mArtsDispatcher = 0;
+	delete mPlayObject;      mPlayObject = nullptr;
+	delete mArtsDispatcher;  mArtsDispatcher = nullptr;
 	if (!mLocalAudioFile.isEmpty())
 	{
 		TDEIO::NetAccess::removeTempFile(mLocalAudioFile);   // removes it only if it IS a temporary file
@@ -1081,7 +1081,7 @@ void MessageWin::slotFade()
 		// The fade has finished. Set to normal volume.
 		volume = mVolume;
 		delete mFadeTimer;
-		mFadeTimer = 0;
+		mFadeTimer = nullptr;
 		if (!mVolume)
 		{
 			kdDebug(5950) << "MessageWin::slotFade(0)" << endl;
@@ -1154,9 +1154,9 @@ void MessageWin::repeat(const KAAlarm& alarm)
 		// Cancel any deferral dialogue so that the user notices something's going on,
 		// and also because the deferral time limit will have changed.
 		delete mDeferDlg;
-		mDeferDlg = 0;
+		mDeferDlg = nullptr;
 	}
-	const Event* kcalEvent = mEventID.isNull() ? 0 : AlarmCalendar::activeCalendar()->event(mEventID);
+	const Event* kcalEvent = mEventID.isNull() ? nullptr : AlarmCalendar::activeCalendar()->event(mEventID);
 	if (kcalEvent)
 	{
 		mAlarmType = alarm.type();    // store new alarm type for use if it is later deferred
@@ -1205,7 +1205,7 @@ TQSize MessageWin::sizeHint() const
 	if (mAction != KAEvent::MESSAGE)
 		return MainWindowBase::sizeHint();
 	if (!mWinModule)
-		mWinModule = new TWinModule(0, TWinModule::INFO_DESKTOP);
+		mWinModule = new TWinModule(nullptr, TWinModule::INFO_DESKTOP);
 	TQSize frame = frameGeometry().size();
 	TQSize contents = geometry().size();
 	TQSize desktop  = mWinModule->workArea().size();
@@ -1260,7 +1260,7 @@ void MessageWin::showEvent(TQShowEvent* se)
 				 */
 				TQPoint cursor = TQCursor::pos();
 				if (!mWinModule)
-					mWinModule = new TWinModule(0, TWinModule::INFO_DESKTOP);
+					mWinModule = new TWinModule(nullptr, TWinModule::INFO_DESKTOP);
 				TQRect desk = mWinModule->workArea();
 				TQDesktopWidget* dw = TQApplication::desktop();
 				if (dw->numScreens() > 1)
@@ -1469,13 +1469,13 @@ void MessageWin::slotEdit()
 		if (AlarmCalendar::activeCalendar()->event(mEventID))
 		{
 			// The old alarm hasn't expired yet, so replace it
-			status = KAlarm::modifyEvent(mEvent, event, 0, &editDlg);
+			status = KAlarm::modifyEvent(mEvent, event, nullptr, &editDlg);
 			Undo::saveEdit(mEvent, event);
 		}
 		else
 		{
 			// The old event has expired, so simply create a new one
-			status = KAlarm::addEvent(event, 0, &editDlg);
+			status = KAlarm::addEvent(event, nullptr, &editDlg);
 			Undo::saveAdd(event);
 		}
 
@@ -1551,14 +1551,14 @@ void MessageWin::slotDefer()
 	{
 		DateTime dateTime  = mDeferDlg->getDateTime();
 		int      delayMins = mDeferDlg->deferMinutes();
-		const Event* kcalEvent = mEventID.isNull() ? 0 : AlarmCalendar::activeCalendar()->event(mEventID);
+		const Event* kcalEvent = mEventID.isNull() ? nullptr : AlarmCalendar::activeCalendar()->event(mEventID);
 		if (kcalEvent)
 		{
 			// The event still exists in the calendar file.
 			KAEvent event(*kcalEvent);
 			bool repeat = event.defer(dateTime, (mAlarmType & KAAlarm::REMINDER_ALARM), true);
 			event.setDeferDefaultMinutes(delayMins);
-			KAlarm::updateEvent(event, 0, mDeferDlg, true, !repeat);
+			KAlarm::updateEvent(event, nullptr, mDeferDlg, true, !repeat);
 			if (event.deferred())
 				mNoPostAction = true;
 		}
@@ -1582,7 +1582,7 @@ void MessageWin::slotDefer()
 			event.setDeferDefaultMinutes(delayMins);
 			// Add the event back into the calendar file, retaining its ID
 			// and not updating KOrganizer
-			KAlarm::addEvent(event, 0, mDeferDlg, true, false);
+			KAlarm::addEvent(event, nullptr, mDeferDlg, true, false);
 			if (event.deferred())
 				mNoPostAction = true;
 			if (kcalEvent)
@@ -1603,7 +1603,7 @@ void MessageWin::slotDefer()
 	else
 		raise();
 	delete mDeferDlg;
-	mDeferDlg = 0;
+	mDeferDlg = nullptr;
 }
 
 /******************************************************************************
@@ -1653,7 +1653,7 @@ bool wantModal()
 	bool modal = Preferences::modalMessages();
 	if (modal)
 	{
-		TWinModule wm(0, TWinModule::INFO_DESKTOP);
+		TWinModule wm(nullptr, TWinModule::INFO_DESKTOP);
 		KWin::WindowInfo wi = KWin::windowInfo(wm.activeWindow(), NET::WMState);
 		modal = !(wi.valid()  &&  wi.hasState(NET::FullScreen));
 	}
@@ -1670,7 +1670,7 @@ bool wantModal()
 MWMimeSourceFactory::MWMimeSourceFactory(const TQString& absPath, KTextBrowser* view)
 	: TQMimeSourceFactory(),
 	  mMimeType("text/plain"),
-	  mLast(0)
+	  mLast(nullptr)
 {
 	view->setMimeSourceFactory(this);
 	TQString type = KMimeType::findByPath(absPath)->name();
diff --git a/kalarm/pickfileradio.cpp b/kalarm/pickfileradio.cpp
index bdfb2bb45..dbf95680f 100644
--- a/kalarm/pickfileradio.cpp
+++ b/kalarm/pickfileradio.cpp
@@ -50,8 +50,8 @@ PickFileRadio::PickFileRadio(TQPushButton* button, LineEdit* edit, const TQStrin
 PickFileRadio::PickFileRadio(const TQString& text, TQButtonGroup* parent, const char* name)
 	: RadioButton(text, parent, name),
 	  mGroup(parent),
-	  mEdit(0),
-	  mButton(0),
+	  mEdit(nullptr),
+	  mButton(nullptr),
 	  mLastId(-1),     // set to an invalid value
 	  mRevertId(false)
 {
diff --git a/kalarm/pickfileradio.h b/kalarm/pickfileradio.h
index ba72d58c8..86675bb5c 100644
--- a/kalarm/pickfileradio.h
+++ b/kalarm/pickfileradio.h
@@ -59,19 +59,19 @@ class PickFileRadio : public RadioButton
 		 *  @param parent Button group which is to be the parent object for the radio button.
 		 *  @param name The name of this widget.
 		 */
-		PickFileRadio(TQPushButton* button, LineEdit* edit, const TQString& text, TQButtonGroup* parent, const char* name = 0);
+		PickFileRadio(TQPushButton* button, LineEdit* edit, const TQString& text, TQButtonGroup* parent, const char* name = nullptr);
 		/** Constructor.
 		 *  The init() method must be called before the widget can be used.
 		 *  @param text Radio button's text.
 		 *  @param parent Button group which is to be the parent object for the radio button.
 		 *  @param name The name of this widget.
 		 */
-		PickFileRadio(const TQString& text, TQButtonGroup* parent, const char* name = 0);
+		PickFileRadio(const TQString& text, TQButtonGroup* parent, const char* name = nullptr);
 		/** Initialises the widget.
 		 *  @param button Push button to invoke the file picker dialogue.
 		 *  @param edit File name edit widget, or null if there is none.
 		 */
-		void            init(TQPushButton* button, LineEdit* edit = 0);
+		void            init(TQPushButton* button, LineEdit* edit = nullptr);
 		/** Sets whether the radio button and associated widgets are read-only for the user.
 		 *  If read-only, their states cannot be changed by the user.
 		 *  @param readOnly True to set the widgets read-only, false to set them read-write.
diff --git a/kalarm/prefdlg.cpp b/kalarm/prefdlg.cpp
index c2d200bd4..41727a5fe 100644
--- a/kalarm/prefdlg.cpp
+++ b/kalarm/prefdlg.cpp
@@ -95,7 +95,7 @@ static TQString xtermCommands[] = {
 = Class KAlarmPrefDlg
 =============================================================================*/
 
-KAlarmPrefDlg* KAlarmPrefDlg::mInstance = 0;
+KAlarmPrefDlg* KAlarmPrefDlg::mInstance = nullptr;
 
 void KAlarmPrefDlg::display()
 {
@@ -117,7 +117,7 @@ void KAlarmPrefDlg::display()
 }
 
 KAlarmPrefDlg::KAlarmPrefDlg()
-	: KDialogBase(IconList, i18n("Preferences"), Help | Default | Ok | Apply | Cancel, Ok, 0, "PrefDlg", false, true)
+	: KDialogBase(IconList, i18n("Preferences"), Help | Default | Ok | Apply | Cancel, Ok, nullptr, "PrefDlg", false, true)
 {
 	setWFlags(TQt::WDestructiveClose);
 	setIconListAllVisible(true);
@@ -143,7 +143,7 @@ KAlarmPrefDlg::KAlarmPrefDlg()
 
 KAlarmPrefDlg::~KAlarmPrefDlg()
 {
-	mInstance = 0;
+	mInstance = nullptr;
 }
 
 // Restore all defaults in the options...
@@ -822,7 +822,7 @@ TQString EmailPrefTab::validateAddr(ButtonGroup* group, TQLineEdit* addr, const
 FontColourPrefTab::FontColourPrefTab(TQVBox* frame)
 	: PrefsTabBase(frame)
 {
-	mFontChooser = new FontColourChooser(mPage, 0, false, TQStringList(), i18n("Message Font && Color"), true, false);
+	mFontChooser = new FontColourChooser(mPage, nullptr, false, TQStringList(), i18n("Message Font && Color"), true, false);
 	mPage->setStretchFactor(mFontChooser, 1);
 
 	TQFrame* layoutBox = new TQFrame(mPage);
diff --git a/kalarm/preferences.cpp b/kalarm/preferences.cpp
index 00ff26bb2..db641153d 100644
--- a/kalarm/preferences.cpp
+++ b/kalarm/preferences.cpp
@@ -39,7 +39,7 @@
 
 static TQString translateXTermPath(TDEConfig*, const TQString& cmdline, bool write);
 
-Preferences* Preferences::mInstance = 0;
+Preferences* Preferences::mInstance = nullptr;
 
 // Default config file settings
 TQColor defaultMessageColours[] = { TQt::red, TQt::green, TQt::blue, TQt::cyan, TQt::magenta, TQt::yellow, TQt::white, TQt::lightGray, TQt::black, TQColor() };
diff --git a/kalarm/recurrenceedit.cpp b/kalarm/recurrenceedit.cpp
index feee5e84d..f4c33b7c2 100644
--- a/kalarm/recurrenceedit.cpp
+++ b/kalarm/recurrenceedit.cpp
@@ -84,7 +84,7 @@ TQString RecurrenceEdit::i18n_y_Yearly()          { return i18n("&Yearly"); }
 
 RecurrenceEdit::RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name)
 	: TQFrame(parent, name),
-	  mRule(0),
+	  mRule(nullptr),
 	  mRuleButtonType(INVALID_RECUR),
 	  mDailyShown(false),
 	  mWeeklyShown(false),
@@ -307,9 +307,9 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name
 
 	if (mReadOnly)
 	{
-		mExceptionDateEdit     = 0;
-		mChangeExceptionButton = 0;
-		mDeleteExceptionButton = 0;
+		mExceptionDateEdit     = nullptr;
+		mChangeExceptionButton = nullptr;
+		mDeleteExceptionButton = nullptr;
 	}
 	else
 	{
@@ -355,11 +355,11 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name
 TQWidget* RecurrenceEdit::checkData(const TQDateTime& startDateTime, TQString& errorMessage) const
 {
 	if (mAtLoginButton->isOn())
-		return 0;
+		return nullptr;
 	const_cast<RecurrenceEdit*>(this)->mCurrStartDateTime = startDateTime;
 	if (mEndDateButton->isChecked())
 	{
-		TQWidget* errWidget = 0;
+		TQWidget* errWidget = nullptr;
 		bool noTime = !mEndTimeEdit->isEnabled();
 		TQDate endDate = mEndDateEdit->date();
 		if (endDate < startDateTime.date())
@@ -375,7 +375,7 @@ TQWidget* RecurrenceEdit::checkData(const TQDateTime& startDateTime, TQString& e
 		}
 	}
 	if (!mRule)
-		return 0;
+		return nullptr;
 	return mRule->validate(errorMessage);
 }
 
@@ -390,12 +390,12 @@ void RecurrenceEdit::periodClicked(int id)
 	bool subdaily = (id == mSubDailyButtonId);
 	if (none)
 	{
-		mRule = 0;
+		mRule = nullptr;
 		mRuleButtonType = NO_RECUR;
 	}
 	else if (atLogin)
 	{
-		mRule = 0;
+		mRule = nullptr;
 		mRuleButtonType = AT_LOGIN;
 		mRangeButtonGroup->setButton(mRangeButtonGroup->id(mEndDateButton));
 	}
@@ -1125,14 +1125,14 @@ Rule::Rule(const TQString& freqText, const TQString& freqWhatsThis, bool time, b
 	label->setFixedSize(label->sizeHint());
 	if (time)
 	{
-		mIntSpinBox = 0;
+		mIntSpinBox = nullptr;
 		mSpinBox = mTimeSpinBox = new TimeSpinBox(1, 5999, box);
 		mTimeSpinBox->setFixedSize(mTimeSpinBox->sizeHint());
 		mTimeSpinBox->setReadOnly(readOnly);
 	}
 	else
 	{
-		mTimeSpinBox = 0;
+		mTimeSpinBox = nullptr;
 		mSpinBox = mIntSpinBox = new SpinBox(1, 999, 1, box);
 		mIntSpinBox->setFixedSize(mIntSpinBox->sizeHint());
 		mIntSpinBox->setReadOnly(readOnly);
@@ -1285,7 +1285,7 @@ TQWidget* DayWeekRule::validate(TQString& errorMessage)
 {
 	for (int i = 0;  i < 7;  ++i)
 		if (mDayBox[i]->isChecked())
-			return 0;
+			return nullptr;
 	errorMessage = i18n("No day selected");
 	return mDayBox[0];
 }
@@ -1670,7 +1670,7 @@ TQWidget* YearlyRule::validate(TQString& errorMessage)
 {
 	for (int i = 0;  i < 12;  ++i)
 		if (mMonthBox[i]->isChecked()  &&  mMonthBox[i]->isEnabled())
-			return 0;
+			return nullptr;
 	errorMessage = i18n("No month selected");
 	return mMonthBox[0];
 }
diff --git a/kalarm/recurrenceedit.h b/kalarm/recurrenceedit.h
index df99e4c71..b4b439fdb 100644
--- a/kalarm/recurrenceedit.h
+++ b/kalarm/recurrenceedit.h
@@ -61,7 +61,7 @@ class RecurrenceEdit : public TQFrame
 		// Don't alter the order of these recurrence types
 		enum RepeatType { INVALID_RECUR = -1, NO_RECUR, AT_LOGIN, SUBDAILY, DAILY, WEEKLY, MONTHLY, ANNUAL };
 
-		RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name = 0);
+		RecurrenceEdit(bool readOnly, TQWidget* parent, const char* name = nullptr);
 		virtual ~RecurrenceEdit()  { }
 
 		/** Set widgets to default values */
@@ -73,7 +73,7 @@ class RecurrenceEdit : public TQFrame
 		TQWidget*     checkData(const TQDateTime& startDateTime, TQString& errorMessage) const;
 		RepeatType    repeatType() const                    { return mRuleButtonType; }
 		bool          isTimedRepeatType() const             { return mRuleButtonType >= SUBDAILY; }
-		int           subRepeatCount(int* subRepeatInterval = 0) const;
+		int           subRepeatCount(int* subRepeatInterval = nullptr) const;
 		void          setSubRepetition(int reminderMinutes, bool dateOnly);
 		void          setStartDate(const TQDate&, const TQDate& today);
 		void          setDefaultEndDate(const TQDate&);
diff --git a/kalarm/recurrenceeditprivate.h b/kalarm/recurrenceeditprivate.h
index b8bf78183..6d92186b5 100644
--- a/kalarm/recurrenceeditprivate.h
+++ b/kalarm/recurrenceeditprivate.h
@@ -39,7 +39,7 @@ class TQString;
 class NoRule : public TQFrame
 {
 	public:
-		NoRule(TQWidget* parent, const char* name = 0) : TQFrame(parent, name)
+		NoRule(TQWidget* parent, const char* name = nullptr) : TQFrame(parent, name)
 		                                                 { setFrameStyle(TQFrame::NoFrame); }
 		virtual int       frequency() const       { return 0; }
 };
@@ -50,12 +50,12 @@ class Rule : public NoRule
 
 	public:
 		Rule(const TQString& freqText, const TQString& freqWhatsThis, bool time, bool readOnly,
-		     TQWidget* parent, const char* name = 0);
+		     TQWidget* parent, const char* name = nullptr);
 		int               frequency() const;
 		void              setFrequency(int);
 		virtual void      setFrequencyFocus()     { mSpinBox->setFocus(); }
 		TQVBoxLayout*     layout() const          { return mLayout; }
-		virtual TQWidget* validate(TQString&)      { return 0; }
+		virtual TQWidget* validate(TQString&)      { return nullptr; }
 		virtual void      saveState();
 		virtual bool      stateChanged() const;
 	signals:
@@ -75,7 +75,7 @@ class SubDailyRule : public Rule
 		TQ_OBJECT
 
 	public:
-		SubDailyRule(bool readOnly, TQWidget* parent, const char* name = 0);
+		SubDailyRule(bool readOnly, TQWidget* parent, const char* name = nullptr);
 };
 
 // Daily/weekly rule choices base class
@@ -85,7 +85,7 @@ class DayWeekRule : public Rule
 
 	public:
 		DayWeekRule(const TQString& freqText, const TQString& freqWhatsThis, const TQString& daysWhatsThis,
-		            bool readOnly, TQWidget* parent, const char* name = 0);
+		            bool readOnly, TQWidget* parent, const char* name = nullptr);
 		TQBitArray        days() const;
 		void              setDays(bool);
 		void              setDays(const TQBitArray& days);
@@ -103,14 +103,14 @@ class DayWeekRule : public Rule
 class DailyRule : public DayWeekRule
 {
 	public:
-		DailyRule(bool readOnly, TQWidget* parent, const char* name = 0);
+		DailyRule(bool readOnly, TQWidget* parent, const char* name = nullptr);
 };
 
 // Weekly rule choices
 class WeeklyRule : public DayWeekRule
 {
 	public:
-		WeeklyRule(bool readOnly, TQWidget* parent, const char* name = 0);
+		WeeklyRule(bool readOnly, TQWidget* parent, const char* name = nullptr);
 };
 
 // Monthly/yearly rule choices base class
@@ -122,7 +122,7 @@ class MonthYearRule : public Rule
 		enum DayPosType { DATE, POS };
 
 		MonthYearRule(const TQString& freqText, const TQString& freqWhatsThis, bool allowEveryWeek,
-		              bool readOnly, TQWidget* parent, const char* name = 0);
+		              bool readOnly, TQWidget* parent, const char* name = nullptr);
 		DayPosType       type() const;
 		int              date() const;       // if date in month is selected
 		int              week() const;       // if position is selected
@@ -165,7 +165,7 @@ class MonthYearRule : public Rule
 class MonthlyRule : public MonthYearRule
 {
 	public:
-		MonthlyRule(bool readOnly, TQWidget* parent, const char* name = 0);
+		MonthlyRule(bool readOnly, TQWidget* parent, const char* name = nullptr);
 };
 
 // Yearly rule choices
@@ -174,7 +174,7 @@ class YearlyRule : public MonthYearRule
 		TQ_OBJECT
 
 	public:
-		YearlyRule(bool readOnly, TQWidget* parent, const char* name = 0);
+		YearlyRule(bool readOnly, TQWidget* parent, const char* name = nullptr);
 		TQValueList<int>  months() const;
 		void              setMonths(const TQValueList<int>& months);
 		void              setDefaultValues(int dayOfMonth, int dayOfWeek, int month);
diff --git a/kalarm/reminder.cpp b/kalarm/reminder.cpp
index 7f327a859..f362cd961 100644
--- a/kalarm/reminder.cpp
+++ b/kalarm/reminder.cpp
@@ -66,7 +66,7 @@ Reminder::Reminder(const TQString& caption, const TQString& reminderWhatsThis, c
 		layout->addStretch();
 	}
 	else
-		mOnceOnly = 0;
+		mOnceOnly = nullptr;
 }
 
 /******************************************************************************
diff --git a/kalarm/reminder.h b/kalarm/reminder.h
index c8e559536..cf7b68340 100644
--- a/kalarm/reminder.h
+++ b/kalarm/reminder.h
@@ -33,7 +33,7 @@ class Reminder : public TQFrame
   
 	public:
 		Reminder(const TQString& caption, const TQString& reminderWhatsThis, const TQString& valueWhatsThis,
-		         bool allowHourMinute, bool showOnceOnly, TQWidget* parent, const char* name = 0);
+		         bool allowHourMinute, bool showOnceOnly, TQWidget* parent, const char* name = nullptr);
 		bool           isReminder() const;
 		bool           isOnceOnly() const;
 		int            minutes() const;
diff --git a/kalarm/repetition.cpp b/kalarm/repetition.cpp
index 8a964eacd..ebd95bfda 100644
--- a/kalarm/repetition.cpp
+++ b/kalarm/repetition.cpp
@@ -42,7 +42,7 @@
 
 RepetitionButton::RepetitionButton(const TQString& caption, bool waitForInitialisation, TQWidget* parent, const char* name)
 	: TQPushButton(caption, parent, name),
-	  mDialog(0),
+	  mDialog(nullptr),
 	  mInterval(0),
 	  mCount(0),
 	  mMaxDuration(-1),
@@ -135,7 +135,7 @@ void RepetitionButton::displayDialog()
 	}
 	setOn(mInterval && mCount);
 	delete mDialog;
-	mDialog = 0;
+	mDialog = nullptr;
 	if (change)
 		emit changed();   // delete dialog first, or initialise() will redisplay dialog
 }
diff --git a/kalarm/repetition.h b/kalarm/repetition.h
index b59216caf..b5868fe0b 100644
--- a/kalarm/repetition.h
+++ b/kalarm/repetition.h
@@ -37,7 +37,7 @@ class RepetitionButton : public TQPushButton
 		TQ_OBJECT
   
 	public:
-		RepetitionButton(const TQString& caption, bool waitForInitialisation, TQWidget* parent, const char* name = 0);
+		RepetitionButton(const TQString& caption, bool waitForInitialisation, TQWidget* parent, const char* name = nullptr);
 		void           set(int interval, int count);
 		void           set(int interval, int count, bool dateOnly, int maxDuration = -1);
 		void           initialise(int interval, int count, bool dateOnly, int maxDuration = -1);   // use only after needsInitialisation() signal
@@ -73,7 +73,7 @@ class RepetitionDlg : public KDialogBase
 		TQ_OBJECT
   
 	public:
-		RepetitionDlg(const TQString& caption, bool readOnly, TQWidget* parent = 0, const char* name = 0);
+		RepetitionDlg(const TQString& caption, bool readOnly, TQWidget* parent = nullptr, const char* name = nullptr);
 		void           setReadOnly(bool);
 		void           set(int interval, int count, bool dateOnly = false, int maxDuration = -1);
 		int            interval() const;     // get the interval between repetitions, in minutes
diff --git a/kalarm/sounddlg.cpp b/kalarm/sounddlg.cpp
index d90b4ea8b..fb492eeb3 100644
--- a/kalarm/sounddlg.cpp
+++ b/kalarm/sounddlg.cpp
@@ -72,9 +72,9 @@ SoundDlg::SoundDlg(const TQString& file, float volume, float fadeVolume, int fad
                    const TQString& caption, TQWidget* parent, const char* name)
 	: KDialogBase(parent, name, true, caption, Ok|Cancel, Ok, false),
 	  mReadOnly(false),
-	  mArtsDispatcher(0),
-	  mPlayObject(0),
-	  mPlayTimer(0)
+	  mArtsDispatcher(nullptr),
+	  mPlayObject(nullptr),
+	  mPlayTimer(nullptr)
 {
 	TQWidget* page = new TQWidget(this);
 	setMainWidget(page);
@@ -364,9 +364,9 @@ void SoundDlg::checkAudioPlay()
 void SoundDlg::stopPlay()
 {
 #ifndef WITHOUT_ARTS
-	delete mPlayObject;      mPlayObject = 0;
-	delete mArtsDispatcher;  mArtsDispatcher = 0;
-	delete mPlayTimer;       mPlayTimer = 0;
+	delete mPlayObject;      mPlayObject = nullptr;
+	delete mArtsDispatcher;  mArtsDispatcher = nullptr;
+	delete mPlayTimer;       mPlayTimer = nullptr;
 	if (!mLocalAudioFile.isEmpty())
 	{
 		TDEIO::NetAccess::removeTempFile(mLocalAudioFile);   // removes it only if it IS a temporary file
diff --git a/kalarm/sounddlg.h b/kalarm/sounddlg.h
index 62c46ade5..462ee02bd 100644
--- a/kalarm/sounddlg.h
+++ b/kalarm/sounddlg.h
@@ -42,7 +42,7 @@ class SoundDlg : public KDialogBase
   
 	public:
 		SoundDlg(const TQString& file, float volume, float fadeVolume, int fadeSeconds, bool repeat,
-		         const TQString& caption, TQWidget* parent, const char* name = 0);
+		         const TQString& caption, TQWidget* parent, const char* name = nullptr);
 		~SoundDlg();
 		void           setReadOnly(bool);
 		bool           isReadOnly() const    { return mReadOnly; }
diff --git a/kalarm/soundpicker.cpp b/kalarm/soundpicker.cpp
index 7c58e2062..06d058260 100644
--- a/kalarm/soundpicker.cpp
+++ b/kalarm/soundpicker.cpp
@@ -288,5 +288,5 @@ TQString SoundPicker::browseFile(TQString& defaultDir, const TQString& initialFi
 	TQStringList filters = KDE::PlayObjectFactory::mimeTypes();
 	TQString filter = filters.join(" ");
 #endif
-	return KAlarm::browseFile(i18n("Choose Sound File"), defaultDir, initialFile, filter, KFile::ExistingOnly, 0, "pickSoundFile");
+	return KAlarm::browseFile(i18n("Choose Sound File"), defaultDir, initialFile, filter, KFile::ExistingOnly, nullptr, "pickSoundFile");
 }
diff --git a/kalarm/soundpicker.h b/kalarm/soundpicker.h
index 72ff4a869..8ad0fa499 100644
--- a/kalarm/soundpicker.h
+++ b/kalarm/soundpicker.h
@@ -46,7 +46,7 @@ class SoundPicker : public TQFrame
 		 *  @param parent The parent object of this widget.
 		 *  @param name The name of this widget.
 		 */
-		explicit SoundPicker(TQWidget* parent, const char* name = 0);
+		explicit SoundPicker(TQWidget* parent, const char* name = nullptr);
 		/** Initialises the widget's state.
 		 *  @param type     The option to select.
 		 *  @param filename The full path or URL of the sound file to select. If the 'file' option is
diff --git a/kalarm/specialactions.h b/kalarm/specialactions.h
index db7192e5d..08eac0a43 100644
--- a/kalarm/specialactions.h
+++ b/kalarm/specialactions.h
@@ -33,7 +33,7 @@ class SpecialActionsButton : public TQPushButton
 		TQ_OBJECT
   
 	public:
-		SpecialActionsButton(const TQString& caption, TQWidget* parent = 0, const char* name = 0);
+		SpecialActionsButton(const TQString& caption, TQWidget* parent = nullptr, const char* name = nullptr);
 		void           setActions(const TQString& pre, const TQString& post);
 		const TQString& preAction() const      { return mPreAction; }
 		const TQString& postAction() const     { return mPostAction; }
@@ -59,7 +59,7 @@ class SpecialActions : public TQWidget
 		TQ_OBJECT
   
 	public:
-		SpecialActions(TQWidget* parent = 0, const char* name = 0);
+		SpecialActions(TQWidget* parent = nullptr, const char* name = nullptr);
 		void         setActions(const TQString& pre, const TQString& post);
 		TQString      preAction() const;
 		TQString      postAction() const;
@@ -80,7 +80,7 @@ class SpecialActionsDlg : public KDialogBase
   
 	public:
 		SpecialActionsDlg(const TQString& preAction, const TQString& postAction,
-		                  const TQString& caption, TQWidget* parent = 0, const char* name = 0);
+		                  const TQString& caption, TQWidget* parent = nullptr, const char* name = nullptr);
 		TQString      preAction() const     { return mActions->preAction(); }
 		TQString      postAction() const    { return mActions->postAction(); }
 		void         setReadOnly(bool ro)  { mActions->setReadOnly(ro); }
diff --git a/kalarm/startdaytimer.cpp b/kalarm/startdaytimer.cpp
index ef8ddf867..30dd3d767 100644
--- a/kalarm/startdaytimer.cpp
+++ b/kalarm/startdaytimer.cpp
@@ -24,7 +24,7 @@
 #include "startdaytimer.moc"
 
 
-StartOfDayTimer* StartOfDayTimer::mInstance = 0;
+StartOfDayTimer* StartOfDayTimer::mInstance = nullptr;
 
 StartOfDayTimer::StartOfDayTimer()
 	: DailyTimer(Preferences::startOfDay(), false)
diff --git a/kalarm/startdaytimer.h b/kalarm/startdaytimer.h
index 23d84073a..3f1d0591d 100644
--- a/kalarm/startdaytimer.h
+++ b/kalarm/startdaytimer.h
@@ -49,7 +49,7 @@ class StartOfDayTimer : public DailyTimer
 		 *  @param member Slot to disconnect. If null, all slots belonging to
 		 *                @p receiver will be disconnected.
 		 */
-		static void disconnect(TQObject* receiver, const char* member = 0)
+		static void disconnect(TQObject* receiver, const char* member = nullptr)
 		                   { if (mInstance) mInstance->disconnecT(receiver, member); }
 
 	protected:
diff --git a/kalarm/templatedlg.cpp b/kalarm/templatedlg.cpp
index ebf7f1c6a..33ace7c43 100644
--- a/kalarm/templatedlg.cpp
+++ b/kalarm/templatedlg.cpp
@@ -40,7 +40,7 @@
 static const char TMPL_DIALOG_NAME[] = "TemplateDialog";
 
 
-TemplateDlg* TemplateDlg::mInstance = 0;
+TemplateDlg* TemplateDlg::mInstance = nullptr;
 
 
 TemplateDlg::TemplateDlg(TQWidget* parent, const char* name)
@@ -97,7 +97,7 @@ TemplateDlg::TemplateDlg(TQWidget* parent, const char* name)
 */
 TemplateDlg::~TemplateDlg()
 {
-	mInstance = 0;
+	mInstance = nullptr;
 }
 
 /******************************************************************************
@@ -106,7 +106,7 @@ TemplateDlg::~TemplateDlg()
 TemplateDlg* TemplateDlg::create(TQWidget* parent, const char* name)
 {
 	if (mInstance)
-		return 0;
+		return nullptr;
 	mInstance = new TemplateDlg(parent, name);
 	return mInstance;
 }
@@ -117,7 +117,7 @@ TemplateDlg* TemplateDlg::create(TQWidget* parent, const char* name)
 */
 void TemplateDlg::slotNew()
 {
-	createTemplate(0, this, mTemplateList);
+	createTemplate(nullptr, this, mTemplateList);
 }
 
 /******************************************************************************
@@ -140,7 +140,7 @@ void TemplateDlg::slotCopy()
 */
 void TemplateDlg::createTemplate(const KAEvent* event, TQWidget* parent, TemplateListView* view)
 {
-	EditAlarmDlg editDlg(true, i18n("New Alarm Template"), parent, 0, event);
+	EditAlarmDlg editDlg(true, i18n("New Alarm Template"), parent, nullptr, event);
 	if (editDlg.exec() == TQDialog::Accepted)
 	{
 		KAEvent event;
@@ -162,7 +162,7 @@ void TemplateDlg::slotEdit()
 	if (item)
 	{
 		KAEvent event = item->event();
-		EditAlarmDlg editDlg(true, i18n("Edit Alarm Template"), this, 0, &event);
+		EditAlarmDlg editDlg(true, i18n("Edit Alarm Template"), this, nullptr, &event);
 		if (editDlg.exec() == TQDialog::Accepted)
 		{
 			KAEvent newEvent;
diff --git a/kalarm/templatedlg.h b/kalarm/templatedlg.h
index 4d814eb85..57affacfd 100644
--- a/kalarm/templatedlg.h
+++ b/kalarm/templatedlg.h
@@ -32,9 +32,9 @@ class TemplateDlg : public KDialogBase
 		TQ_OBJECT
   
 	public:
-		static TemplateDlg*  create(TQWidget* parent = 0, const char* name = 0);
+		static TemplateDlg*  create(TQWidget* parent = nullptr, const char* name = nullptr);
 		~TemplateDlg();
-		static void   createTemplate(const KAEvent* = 0, TQWidget* parent = 0, TemplateListView* = 0);
+		static void   createTemplate(const KAEvent* = nullptr, TQWidget* parent = nullptr, TemplateListView* = nullptr);
 
 	signals:
 		void          emptyToggled(bool notEmpty);
diff --git a/kalarm/templatelistview.h b/kalarm/templatelistview.h
index 7d7d084d9..8e86055bf 100644
--- a/kalarm/templatelistview.h
+++ b/kalarm/templatelistview.h
@@ -51,7 +51,7 @@ class TemplateListView : public EventListViewBase
 		TQ_OBJECT
   
 	public:
-		explicit TemplateListView(bool includeCmdAlarms, const TQString& whatsThisText, TQWidget* parent = 0, const char* name = 0);
+		explicit TemplateListView(bool includeCmdAlarms, const TQString& whatsThisText, TQWidget* parent = nullptr, const char* name = nullptr);
 		~TemplateListView();
 		int                    iconColumn() const     { return mIconColumn; }
 		int                    nameColumn() const     { return mNameColumn; }
diff --git a/kalarm/templatemenuaction.h b/kalarm/templatemenuaction.h
index 51a1e4faa..45518a9e1 100644
--- a/kalarm/templatemenuaction.h
+++ b/kalarm/templatemenuaction.h
@@ -31,7 +31,7 @@ class TemplateMenuAction : public TDEActionMenu
   
 	public:
 		TemplateMenuAction(const TQString& label, const TQString& icon, TQObject* receiver,
-		                   const char* slot, TDEActionCollection* parent, const char* name = 0);
+		                   const char* slot, TDEActionCollection* parent, const char* name = nullptr);
 
 	signals:
 		void   selected(const KAEvent&);
diff --git a/kalarm/templatepickdlg.h b/kalarm/templatepickdlg.h
index a72ef2169..5633589a0 100644
--- a/kalarm/templatepickdlg.h
+++ b/kalarm/templatepickdlg.h
@@ -31,7 +31,7 @@ class TemplatePickDlg : public KDialogBase
 		TQ_OBJECT
   
 	public:
-		TemplatePickDlg(TQWidget* parent = 0, const char* name = 0);
+		TemplatePickDlg(TQWidget* parent = nullptr, const char* name = nullptr);
 		const KAEvent*    selectedTemplate() const;
 	protected:
 		virtual void      resizeEvent(TQResizeEvent*);
diff --git a/kalarm/timeselector.cpp b/kalarm/timeselector.cpp
index 710152b45..8befa4f5d 100644
--- a/kalarm/timeselector.cpp
+++ b/kalarm/timeselector.cpp
@@ -36,7 +36,7 @@
 TimeSelector::TimeSelector(const TQString& selectText, const TQString& postfix, const TQString& selectWhatsThis,
                            const TQString& valueWhatsThis, bool allowHourMinute, TQWidget* parent, const char* name)
 	: TQFrame(parent, name),
-	  mLabel(0),
+	  mLabel(nullptr),
 	  mReadOnly(false)
 {
 	setFrameStyle(TQFrame::NoFrame);
diff --git a/kalarm/timeselector.h b/kalarm/timeselector.h
index 7bb8d3327..9bb8bfcba 100644
--- a/kalarm/timeselector.h
+++ b/kalarm/timeselector.h
@@ -34,7 +34,7 @@ class TimeSelector : public TQFrame
   
 	public:
 		TimeSelector(const TQString& selectText, const TQString& postfix, const TQString& selectWhatsThis,
-		             const TQString& valueWhatsThis, bool allowHourMinute, TQWidget* parent, const char* name = 0);
+		             const TQString& valueWhatsThis, bool allowHourMinute, TQWidget* parent, const char* name = nullptr);
 		bool         isChecked() const;
 		void         setChecked(bool on);
 		int          minutes() const;
diff --git a/kalarm/traywindow.cpp b/kalarm/traywindow.cpp
index 55e7a8628..a23bac97b 100644
--- a/kalarm/traywindow.cpp
+++ b/kalarm/traywindow.cpp
@@ -72,7 +72,7 @@ struct TipItem
 =============================================================================*/
 
 TrayWindow::TrayWindow(MainWindow* parent, const char* name)
-	: KSystemTray((theApp()->wantRunInSystemTray() ? parent : 0), name),
+	: KSystemTray((theApp()->wantRunInSystemTray() ? parent : nullptr), name),
 	  mAssocMainWindow(parent)
 {
 	kdDebug(5950) << "TrayWindow::TrayWindow()" << endl;
@@ -109,7 +109,7 @@ TrayWindow::~TrayWindow()
 {
 	kdDebug(5950) << "TrayWindow::~TrayWindow()" << endl;
 	delete mTooltip;
-	mTooltip = 0;
+	mTooltip = nullptr;
 	theApp()->removeWindow(this);
 	emit deleted();
 }
@@ -214,7 +214,7 @@ void TrayWindow::dragEnterEvent(TQDragEnterEvent* e)
 */
 void TrayWindow::dropEvent(TQDropEvent* e)
 {
-	MainWindow::executeDropEvent(0, e);
+	MainWindow::executeDropEvent(nullptr, e);
 }
 
 /******************************************************************************
@@ -303,7 +303,7 @@ void TrayWindow::tooltipAlarmText(TQString& text) const
 void TrayWindow::removeWindow(MainWindow* win)
 {
 	if (win == mAssocMainWindow)
-		mAssocMainWindow = 0;
+		mAssocMainWindow = nullptr;
 }
 
 
diff --git a/kalarm/traywindow.h b/kalarm/traywindow.h
index eecc76639..8098e13f4 100644
--- a/kalarm/traywindow.h
+++ b/kalarm/traywindow.h
@@ -34,7 +34,7 @@ class TrayWindow : public KSystemTray
 		TQ_OBJECT
   
 	public:
-		TrayWindow(MainWindow* parent, const char* name = 0);
+		TrayWindow(MainWindow* parent, const char* name = nullptr);
 		~TrayWindow();
 		void         removeWindow(MainWindow*);
 		MainWindow*  assocMainWindow() const               { return mAssocMainWindow; }
diff --git a/kalarm/undo.cpp b/kalarm/undo.cpp
index 0d48a637a..e6a8eec7c 100644
--- a/kalarm/undo.cpp
+++ b/kalarm/undo.cpp
@@ -196,7 +196,7 @@ class UndoReactivates : public UndoMulti<UndoReactivate>
 		virtual UndoItem* createRedo(Undo::List&);
 };
 
-Undo*       Undo::mInstance = 0;
+Undo*       Undo::mInstance = nullptr;
 Undo::List  Undo::mUndoList;
 Undo::List  Undo::mRedoList;
 
@@ -401,7 +401,7 @@ void Undo::remove(UndoItem* item, bool undo)
 void Undo::replace(UndoItem* old, UndoItem* New)
 {
 	Type type = old->type();
-	List* list = (type == UNDO) ? &mUndoList : (type == REDO) ? &mRedoList : 0;
+	List* list = (type == UNDO) ? &mUndoList : (type == REDO) ? &mRedoList : nullptr;
 	if (!list)
 		return;
 	Iterator it = list->find(old);
@@ -418,7 +418,7 @@ void Undo::replace(UndoItem* old, UndoItem* New)
 */
 TQString Undo::actionText(Undo::Type type)
 {
-	List* list = (type == UNDO) ? &mUndoList : (type == REDO) ? &mRedoList : 0;
+	List* list = (type == UNDO) ? &mUndoList : (type == REDO) ? &mRedoList : nullptr;
 	return (list && !list->isEmpty()) ? list->first()->actionText() : TQString();
 }
 
@@ -451,7 +451,7 @@ TQValueList<int> Undo::ids(Undo::Type type)
 	TQValueList<int> ids;
 	TQStringList ignoreIDs;
 //int n=0;
-	List* list = (type == UNDO) ? &mUndoList : (type == REDO) ? &mRedoList : 0;
+	List* list = (type == UNDO) ? &mUndoList : (type == REDO) ? &mRedoList : nullptr;
 	if (!list)
 		return ids;
 	for (Iterator it = list->begin();  it != list->end();  ++it)
@@ -511,7 +511,7 @@ void Undo::emitChanged()
 */
 UndoItem* Undo::getItem(int id, Undo::Type type)
 {
-	List* list = (type == UNDO) ? &mUndoList : (type == REDO) ? &mRedoList : 0;
+	List* list = (type == UNDO) ? &mUndoList : (type == REDO) ? &mRedoList : nullptr;
 	if (list)
 	{
 		for (Iterator it = list->begin();  it != list->end();  ++it)
@@ -520,7 +520,7 @@ UndoItem* Undo::getItem(int id, Undo::Type type)
 				return *it;
 		}
 	}
-	return 0;
+	return nullptr;
 }
 
 /******************************************************************************
@@ -645,7 +645,7 @@ UndoItem* UndoMulti<T>::restore()
 			newUndos.append(undo);
 	}
 	if (newUndos.isEmpty())
-		return 0;
+		return nullptr;
 
 	// Create a redo item to delete the alarm again
 	return createRedo(newUndos);
@@ -720,7 +720,7 @@ UndoItem* UndoAdd::doRestore(bool setArchive)
 	if (!kcalEvent)
 	{
 		mRestoreError = ERR_NOT_FOUND;    // alarm is no longer in calendar
-		return 0;
+		return nullptr;
 	}
 	KAEvent event(*kcalEvent); 
 
@@ -759,7 +759,7 @@ UndoItem* UndoAdd::doRestore(bool setArchive)
 		default:
 			delete undo;
 			mRestoreError = ERR_PROG;
-			return 0;
+			return nullptr;
 	}
 	return undo;
 }
@@ -814,7 +814,7 @@ UndoItem* UndoEdit::restore()
 	if (!kcalEvent)
 	{
 		mRestoreError = ERR_NOT_FOUND;    // alarm is no longer in calendar
-		return 0;
+		return nullptr;
 	}
 	KAEvent newEvent(*kcalEvent); 
 
@@ -825,7 +825,7 @@ UndoItem* UndoEdit::restore()
 	switch (calendar())
 	{
 		case KAEvent::ACTIVE:
-			switch (KAlarm::modifyEvent(newEvent, *mOldEvent, 0))
+			switch (KAlarm::modifyEvent(newEvent, *mOldEvent, nullptr))
 			{
 				case KAlarm::UPDATE_ERROR:
 				case KAlarm::UPDATE_FAILED:
@@ -841,14 +841,14 @@ UndoItem* UndoEdit::restore()
 			}
 			break;
 		case KAEvent::TEMPLATE:
-			if (KAlarm::updateTemplate(*mOldEvent, 0) != KAlarm::UPDATE_OK)
+			if (KAlarm::updateTemplate(*mOldEvent, nullptr) != KAlarm::UPDATE_OK)
 				mRestoreError = ERR_TEMPLATE;
 			break;
 		case KAEvent::EXPIRED:    // editing of expired events is not allowed
 		default:
 			delete undo;
 			mRestoreError = ERR_PROG;
-			return 0;
+			return nullptr;
 	}
 	return undo;
 }
@@ -904,7 +904,7 @@ UndoItem* UndoDelete::restore()
 			{
 				// It was archived when it was deleted
 				mEvent->setUid(KAEvent::EXPIRED);
-				switch (KAlarm::reactivateEvent(*mEvent, 0, true))
+				switch (KAlarm::reactivateEvent(*mEvent, nullptr, true))
 				{
 					case KAlarm::UPDATE_KORG_ERR:
 						mRestoreWarning = WARN_KORG_ADD;
@@ -914,14 +914,14 @@ UndoItem* UndoDelete::restore()
 					case KAlarm::UPDATE_FAILED:
 					case KAlarm::SAVE_FAILED:
 						mRestoreError = ERR_EXPIRED;
-						return 0;
+						return nullptr;
 					case KAlarm::UPDATE_OK:
 						break;
 				}
 			}
 			else
 			{
-				switch (KAlarm::addEvent(*mEvent, 0, 0, true))
+				switch (KAlarm::addEvent(*mEvent, nullptr, nullptr, true))
 				{
 					case KAlarm::UPDATE_KORG_ERR:
 						mRestoreWarning = WARN_KORG_ADD;
@@ -931,29 +931,29 @@ UndoItem* UndoDelete::restore()
 					case KAlarm::UPDATE_FAILED:
 					case KAlarm::SAVE_FAILED:
 						mRestoreError = ERR_CREATE;
-						return 0;
+						return nullptr;
 					case KAlarm::UPDATE_OK:
 						break;
 				}
 			}
 			break;
 		case KAEvent::TEMPLATE:
-			if (KAlarm::addTemplate(*mEvent, 0) != KAlarm::UPDATE_OK)
+			if (KAlarm::addTemplate(*mEvent, nullptr) != KAlarm::UPDATE_OK)
 			{
 				mRestoreError = ERR_CREATE;
-				return 0;
+				return nullptr;
 			}
 			break;
 		case KAEvent::EXPIRED:
 			if (!KAlarm::addExpiredEvent(*mEvent))
 			{
 				mRestoreError = ERR_CREATE;
-				return 0;
+				return nullptr;
 			}
 			break;
 		default:
 			mRestoreError = ERR_PROG;
-			return 0;
+			return nullptr;
 	}
 
 	// Create a redo item to delete the alarm again
@@ -1037,7 +1037,7 @@ UndoItem* UndoReactivate::restore()
 			break;
 		default:
 			mRestoreError = ERR_PROG;
-			return 0;
+			return nullptr;
 	}
 	return UndoAdd::doRestore(true);     // restore alarm, ensuring that it is re-archived
 }
@@ -1080,7 +1080,7 @@ UndoItem* UndoDeactivate::restore()
 			break;
 		default:
 			mRestoreError = ERR_PROG;
-			return 0;
+			return nullptr;
 	}
 
 	return UndoDelete::restore();
diff --git a/karm/csvexportdialog.h b/karm/csvexportdialog.h
index 7e4a60283..51ac23cf5 100644
--- a/karm/csvexportdialog.h
+++ b/karm/csvexportdialog.h
@@ -31,8 +31,8 @@ class CSVExportDialog : public CSVExportDialogBase
 
   public:
     CSVExportDialog( ReportCriteria::REPORTTYPE rt,
-                     TQWidget *parent = 0, 
-                     const char *name = 0
+                     TQWidget *parent = nullptr,
+                     const char *name = nullptr
                      );
     
     /**
diff --git a/karm/edittaskdialog.cpp b/karm/edittaskdialog.cpp
index 2fceb4474..9f3426c76 100644
--- a/karm/edittaskdialog.cpp
+++ b/karm/edittaskdialog.cpp
@@ -42,12 +42,12 @@
 
 EditTaskDialog::EditTaskDialog( TQString caption, bool editDlg,
                                 DesktopList* desktopList)
-  : KDialogBase(0, "EditTaskDialog", true, caption, Ok|Cancel, Ok, true ),
+  : KDialogBase(nullptr, "EditTaskDialog", true, caption, Ok|Cancel, Ok, true ),
     origTime( 0 ), origSession( 0 )
 {
   TQWidget *page = new TQWidget( this ); 
   setMainWidget(page);
-  TWinModule twinmodule(0, TWinModule::INFO_DESKTOP);
+  TWinModule twinmodule(nullptr, TWinModule::INFO_DESKTOP);
 
   TQVBoxLayout *lay1 = new TQVBoxLayout(page);
   
@@ -151,7 +151,7 @@ EditTaskDialog::EditTaskDialog( TQString caption, bool editDlg,
   // If desktopList contains higher numbered desktops than desktopCount then
   // delete those from desktopList. This may be the case if the user has
   // configured virtual desktops. The values in desktopList are sorted.
-  if ( (desktopList != 0) && (desktopList->size() > 0) ) 
+  if ( desktopList && desktopList->size() > 0 )
   {
     DesktopList::iterator rit = desktopList->begin();
     while (*rit < desktopCount && rit!=desktopList->end()) 
@@ -191,7 +191,7 @@ EditTaskDialog::EditTaskDialog( TQString caption, bool editDlg,
   // check specified Desktop Check Boxes
   bool enableDesktops = false;
 
-  if ( (desktopList != 0) && (desktopList->size() > 0) ) 
+  if ( desktopList && desktopList->size() > 0 )
   {
     DesktopList::iterator it = desktopList->begin();
     while (it != desktopList->end()) 
diff --git a/karm/edittaskdialog.h b/karm/edittaskdialog.h
index cd173d33e..c65ee089b 100644
--- a/karm/edittaskdialog.h
+++ b/karm/edittaskdialog.h
@@ -46,7 +46,7 @@ class EditTaskDialog : public KDialogBase
   
 
   public:
-    EditTaskDialog(TQString caption, bool editDlg, DesktopList* desktopList=0);
+    EditTaskDialog(TQString caption, bool editDlg, DesktopList* desktopList=nullptr);
     void setTask(const TQString &name, long time, long sessionTime);
     TQString taskName() const;
 
diff --git a/karm/idletimedetector.cpp b/karm/idletimedetector.cpp
index bf4092f53..48ae1fb71 100644
--- a/karm/idletimedetector.cpp
+++ b/karm/idletimedetector.cpp
@@ -70,7 +70,7 @@ void IdleTimeDetector::informOverrun(int idleSeconds)
   TQDateTime idleStart = TQDateTime::currentDateTime().addSecs(-idleSeconds);
   TQString idleStartTQString = TDEGlobal::locale()->formatTime(idleStart.time());
 
-  int id =  TQMessageBox::warning( 0, i18n("Idle Detection"),
+  int id =  TQMessageBox::warning( nullptr, i18n("Idle Detection"),
                                      i18n("Desktop has been idle since %1."
                                           " What should we do?").arg(idleStartTQString),
                                      i18n("Revert && Stop"),
diff --git a/karm/karm_part.cpp b/karm/karm_part.cpp
index 690213654..feb91239a 100644
--- a/karm/karm_part.cpp
+++ b/karm/karm_part.cpp
@@ -371,8 +371,8 @@ void karmPart::fileSaveAs()
 #include <tdeaboutdata.h>
 #include <tdelocale.h>
 
-TDEInstance*  karmPartFactory::s_instance = 0L;
-TDEAboutData* karmPartFactory::s_about = 0L;
+TDEInstance*  karmPartFactory::s_instance = nullptr;
+TDEAboutData* karmPartFactory::s_about = nullptr;
 
 karmPartFactory::karmPartFactory()
     : KParts::Factory()
@@ -384,7 +384,7 @@ karmPartFactory::~karmPartFactory()
     delete s_instance;
     delete s_about;
 
-    s_instance = 0L;
+    s_instance = nullptr;
 }
 
 KParts::Part* karmPartFactory::createPartObject( TQWidget *parentWidget, const char *widgetName,
@@ -406,7 +406,7 @@ TDEInstance* karmPartFactory::instance()
     if( !s_instance )
     {
         s_about = new TDEAboutData("karmpart", I18N_NOOP("karmPart"), "0.1");
-        s_about->addAuthor("Thorsten Staerk", 0, "thorsten@staerk.de");
+        s_about->addAuthor("Thorsten Staerk", nullptr, "thorsten@staerk.de");
         s_instance = new TDEInstance(s_about);
     }
     return s_instance;
diff --git a/karm/karmstorage.cpp b/karm/karmstorage.cpp
index 7c992e0e4..b631a5951 100644
--- a/karm/karmstorage.cpp
+++ b/karm/karmstorage.cpp
@@ -65,19 +65,19 @@
 
 using namespace std;
 
-KarmStorage *KarmStorage::_instance = 0;
+KarmStorage *KarmStorage::_instance = nullptr;
 static long linenr;  // how many lines written by printTaskHistory so far
 
 
 KarmStorage *KarmStorage::instance()
 {
-  if (_instance == 0) _instance = new KarmStorage();
+  if (!_instance) _instance = new KarmStorage();
   return _instance;
 }
 
 KarmStorage::KarmStorage()
 {
-  _calendar = 0;
+  _calendar = nullptr;
 }
 
 TQString KarmStorage::load (TaskView* view, const Preferences* preferences, TQString fileName )
@@ -299,7 +299,7 @@ void KarmStorage::closeStorage(TaskView* view)
   {
     _calendar->close();
     delete _calendar;
-    _calendar = 0;
+    _calendar = nullptr;
 
     view->clear();
   }
@@ -436,7 +436,7 @@ TQString KarmStorage::loadFromFlatFile(TaskView* taskview,
         kdDebug(5970) << "KarmStorage::loadFromFlatFile - toplevel task: "
           << name << " min: " << minutes << endl;
         task = new Task(name, minutes, 0, desktopList, taskview);
-        task->setUid(addTask(task, 0));
+        task->setUid(addTask(task, nullptr));
       }
       else {
         Task *parent = stack.top();
@@ -588,7 +588,7 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview,
     << "KarmStorage::exportcsvFile: " << rc.url << endl;
 
   TQString title = i18n("Export Progress");
-  KProgressDialog dialog( taskview, 0, title );
+  KProgressDialog dialog( taskview, nullptr, title );
   dialog.setAutoClose( true );
   dialog.setAllowCancel( true );
   dialog.progressBar()->setTotalSteps( 2 * taskview->count() );
@@ -686,7 +686,7 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview,
       TQTextStream *stream=tmpFile.textStream();
       *stream << retval;
       tmpFile.close();
-      if (!TDEIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=TQString::fromLatin1("Could not upload");
+      if (!TDEIO::NetAccess::upload( tmpFile.name(), rc.url, nullptr )) err=TQString::fromLatin1("Could not upload");
     }
   }
 
@@ -1043,7 +1043,7 @@ TQString KarmStorage::exportcsvHistory ( TaskView      *taskview,
       TQTextStream *stream=tmpFile.textStream();
       *stream << retval;
       tmpFile.close();
-      if (!TDEIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=TQString::fromLatin1("Could not upload");
+      if (!TDEIO::NetAccess::upload( tmpFile.name(), rc.url, nullptr )) err=TQString::fromLatin1("Could not upload");
     }
   }
   return err;
diff --git a/karm/ktimewidget.cpp b/karm/ktimewidget.cpp
index ecf632a77..a9bb2e47f 100644
--- a/karm/ktimewidget.cpp
+++ b/karm/ktimewidget.cpp
@@ -16,7 +16,7 @@ enum ValidatorType { HOUR, MINUTE };
 class TimeValidator : public TQValidator
 {
   public:
-    TimeValidator( ValidatorType tp, TQWidget *parent=0, const char *name=0)
+    TimeValidator( ValidatorType tp, TQWidget *parent=nullptr, const char *name=nullptr)
       : TQValidator(parent, name)
     {
       _tp = tp;
@@ -46,7 +46,7 @@ class KarmLineEdit : public TQLineEdit
 {
 
   public:
-    KarmLineEdit( TQWidget* parent, const char* name = 0 )
+    KarmLineEdit( TQWidget* parent, const char* name = nullptr )
       : TQLineEdit( parent, name ) {}
 
 protected:
diff --git a/karm/ktimewidget.h b/karm/ktimewidget.h
index 88f298b22..89cbbb59a 100644
--- a/karm/ktimewidget.h
+++ b/karm/ktimewidget.h
@@ -13,7 +13,7 @@ class KarmLineEdit;
 class KArmTimeWidget : public TQWidget 
 {
   public:
-    KArmTimeWidget( TQWidget* parent = 0, const char* name = 0 );
+    KArmTimeWidget( TQWidget* parent = nullptr, const char* name = nullptr );
     void setTime( long minutes );
     long time() const;
 
diff --git a/karm/main.cpp b/karm/main.cpp
index cdc43e9d5..c73eddb32 100644
--- a/karm/main.cpp
+++ b/karm/main.cpp
@@ -21,7 +21,7 @@ namespace
 
 static const TDECmdLineOptions options[] =
 {
-  { "+file", I18N_NOOP( "The iCalendar file to open" ), 0 },
+  { "+file", I18N_NOOP( "The iCalendar file to open" ), nullptr },
   TDECmdLineLastOption
 };
 
@@ -35,17 +35,17 @@ int main( int argc, char *argv[] )
                        "mark@hubcapconsulting.com" );
   aboutData.addAuthor( "Sirtaj Singh Kang", I18N_NOOP( "Original Author" ),
                        "taj@kde.org" );
-  aboutData.addAuthor( "Allen Winter",      0, "winterz@verizon.net" );
-  aboutData.addAuthor( "David Faure",       0, "faure@kde.org" );
-  aboutData.addAuthor( "Espen Sand",        0, "espen@kde.org" );
-  aboutData.addAuthor( "Gioele Barabucci",  0, "gioele@gioelebarabucci.com" );
-  aboutData.addAuthor( "Jan Schaumann",     0, "jschauma@netmeister.org" );
-  aboutData.addAuthor( "Jesper Pedersen",   0, "blackie@kde.org" );
-  aboutData.addAuthor( "Kalle Dalheimer",   0, "kalle@kde.org" );
-  aboutData.addAuthor( "Scott Monachello",  0, "smonach@cox.net" );
-  aboutData.addAuthor( "Thorsten Staerk",   0, "kde@staerk.de" );
-  aboutData.addAuthor( "Tomas Pospisek",    0, "tpo_deb@sourcepole.ch" );
-  aboutData.addAuthor( "Willi Richert",     0, "w.richert@gmx.net" );
+  aboutData.addAuthor( "Allen Winter",      nullptr, "winterz@verizon.net" );
+  aboutData.addAuthor( "David Faure",       nullptr, "faure@kde.org" );
+  aboutData.addAuthor( "Espen Sand",        nullptr, "espen@kde.org" );
+  aboutData.addAuthor( "Gioele Barabucci",  nullptr, "gioele@gioelebarabucci.com" );
+  aboutData.addAuthor( "Jan Schaumann",     nullptr, "jschauma@netmeister.org" );
+  aboutData.addAuthor( "Jesper Pedersen",   nullptr, "blackie@kde.org" );
+  aboutData.addAuthor( "Kalle Dalheimer",   nullptr, "kalle@kde.org" );
+  aboutData.addAuthor( "Scott Monachello",  nullptr, "smonach@cox.net" );
+  aboutData.addAuthor( "Thorsten Staerk",   nullptr, "kde@staerk.de" );
+  aboutData.addAuthor( "Tomas Pospisek",    nullptr, "tpo_deb@sourcepole.ch" );
+  aboutData.addAuthor( "Willi Richert",     nullptr, "w.richert@gmx.net" );
 
   TDECmdLineArgs::init( argc, argv, &aboutData );
   TDECmdLineArgs::addCmdLineOptions( options );
diff --git a/karm/mainwindow.cpp b/karm/mainwindow.cpp
index 22ec82711..97f28bb1e 100644
--- a/karm/mainwindow.cpp
+++ b/karm/mainwindow.cpp
@@ -36,14 +36,14 @@
 
 MainWindow::MainWindow( const TQString &icsfile )
   : DCOPObject ( "KarmDCOPIface" ),
-    KParts::MainWindow(0,TQt::WStyle_ContextHelp), 
+    KParts::MainWindow(nullptr,TQt::WStyle_ContextHelp),
     _accel     ( new TDEAccel( this ) ),
     _watcher   ( new TDEAccelMenuWatch( _accel, this ) ),
     _totalSum  ( 0 ),
     _sessionSum( 0 )
 {
 
-  _taskView  = new TaskView( this, 0, icsfile );
+  _taskView  = new TaskView( this, nullptr, icsfile );
 
   setCentralWidget( _taskView );
   // status bar
@@ -373,7 +373,7 @@ void MainWindow::makeMenus()
   */
 
   setXMLFile( TQString::fromLatin1("karmui.rc") );
-  createGUI( 0 );
+  createGUI( nullptr );
 
   // Tool tips must be set after the createGUI.
   actionKeyBindings->setToolTip( i18n("Configure key bindings") );
diff --git a/karm/plannerparser.cpp b/karm/plannerparser.cpp
index 67f7bd53f..e26afa55b 100644
--- a/karm/plannerparser.cpp
+++ b/karm/plannerparser.cpp
@@ -79,7 +79,7 @@ test cases:
       {
         task = new Task(taskName, 0, 0, dl, _taskView);
         kdDebug() << "added" << taskName << endl;
-        task->setUid(_taskView->storage()->addTask(task, 0));	  
+        task->setUid(_taskView->storage()->addTask(task, nullptr));
       }
     
       task->setPercentComplete(taskComplete, _taskView->storage());
diff --git a/karm/preferences.cpp b/karm/preferences.cpp
index 3c04ee8f9..a1f690ade 100644
--- a/karm/preferences.cpp
+++ b/karm/preferences.cpp
@@ -17,7 +17,7 @@
 
 #include "preferences.h"
 
-Preferences *Preferences::_instance = 0;
+Preferences *Preferences::_instance = nullptr;
 
 Preferences::Preferences( const TQString& icsFile )
   : KDialogBase( IconList, i18n("Preferences"), Ok|Cancel, Ok )
@@ -38,7 +38,7 @@ Preferences::Preferences( const TQString& icsFile )
 
 Preferences *Preferences::instance( const TQString &icsfile )
 {
-  if (_instance == 0) {
+  if (!_instance) {
     _instance = new Preferences( icsfile );
   }
   return _instance;
diff --git a/karm/print.cpp b/karm/print.cpp
index 08921d329..90fa69844 100644
--- a/karm/print.cpp
+++ b/karm/print.cpp
@@ -22,7 +22,7 @@ MyPrinter::MyPrinter(const TaskView *taskView)
 void MyPrinter::print()
 {
   // FIXME: make a better caption for the printingdialog
-  if (setup(0L, i18n("Print Times"))) {
+  if (setup(nullptr, i18n("Print Times"))) {
     // setup
     TQPainter painter(this);
     TQPaintDeviceMetrics deviceMetrics(this);
diff --git a/karm/printdialog.cpp b/karm/printdialog.cpp
index 128c892af..a3f58b09b 100644
--- a/karm/printdialog.cpp
+++ b/karm/printdialog.cpp
@@ -41,7 +41,7 @@
 
 
 PrintDialog::PrintDialog()
-  : KDialogBase(0, "PrintDialog", true, i18n("Print Dialog"), Ok|Cancel,
+  : KDialogBase(nullptr, "PrintDialog", true, i18n("Print Dialog"), Ok|Cancel,
       Ok, true )
 {
   TQWidget *page = new TQWidget( this );
diff --git a/karm/task.cpp b/karm/task.cpp
index a4be2e17f..baf51eed2 100644
--- a/karm/task.cpp
+++ b/karm/task.cpp
@@ -19,7 +19,7 @@
 const int gSecondsPerMinute = 60;
 
 
-TQPtrVector<TQPixmap> *Task::icons = 0;
+TQPtrVector<TQPixmap> *Task::icons = nullptr;
 
 Task::Task( const TQString& taskName, long minutes, long sessionTime,
             DesktopList desktops, TaskView *parent)
@@ -60,7 +60,7 @@ void Task::init( const TQString& taskName, long minutes, long sessionTime,
   connect( this, TQ_SIGNAL( deletingTask( Task* ) ),
            listView(), TQ_SLOT( deletingTask( Task* ) ));
 
-  if (icons == 0) {
+  if (!icons) {
     icons = new TQPtrVector<TQPixmap>(8);
     TDEIconLoader kil("karm"); // always load icons from the KArm application
     for (int i=0; i<8; i++)
diff --git a/karm/task.h b/karm/task.h
index 97cc61091..b922bde60 100644
--- a/karm/task.h
+++ b/karm/task.h
@@ -46,9 +46,9 @@ class Task : public TQObject, public TQListViewItem
   public:
     //@{ constructors
     Task( const TQString& taskame, long minutes, long sessionTime,
-          DesktopList desktops, TaskView* parent = 0);
+          DesktopList desktops, TaskView* parent = nullptr);
     Task( const TQString& taskame, long minutes, long sessionTime,
-          DesktopList desktops, Task* parent = 0);
+          DesktopList desktops, Task* parent = nullptr);
     Task( KCal::Todo* incident, TaskView* parent );
     //@}
     /* destructor */
@@ -109,7 +109,7 @@ class Task : public TQObject, public TQListViewItem
        *                          If zero, don't save changes.
        */
       void changeTimes
-        ( long minutesSession, long minutes, KarmStorage* storage=0);
+        ( long minutesSession, long minutes, KarmStorage* storage=nullptr);
 
       /** adds minutes to total and session time
        *
@@ -206,7 +206,7 @@ class Task : public TQObject, public TQListViewItem
     TQString comment() const;
 
     /** tells you whether this task is the root of the task tree */
-    bool isRoot() const                 { return parent() == 0; }
+    bool isRoot() const                 { return parent() == nullptr; }
 
     /** remove Task with all it's children
      * @param   activeTasks - list of aktive tasks
diff --git a/karm/taskview.cpp b/karm/taskview.cpp
index 6fb09c38f..a7099bdf5 100644
--- a/karm/taskview.cpp
+++ b/karm/taskview.cpp
@@ -123,7 +123,7 @@ void TaskView::contentsMousePressEvent ( TQMouseEvent * e )
   Task* task = current_item();
   // This checks that there has been a click onto an item,  
   // not into an empty part of the TDEListView.
-  if ( task != 0 &&  // zero can happen if there is no task
+  if ( task &&  // zero can happen if there is no task
         e->pos().y() >= current_item()->itemPos() &&
         e->pos().y() < current_item()->itemPos()+current_item()->height() )
   { 
@@ -149,7 +149,7 @@ void TaskView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
   
   Task *task = current_item();
 
-  if ( task != 0 )  // current_item() exists
+  if (task)  // current_item() exists
   {
     if ( e->pos().y() >= task->itemPos() &&  // doubleclick was onto current_item()
           e->pos().y() < task->itemPos()+task->height() )
@@ -208,7 +208,7 @@ void TaskView::load( TQString fileName )
   setSelected(first_child(), true);
   setCurrentItem(first_child());
   if ( _desktopTracker->startTracking() != TQString() ) 
-    KMessageBox::error( 0, i18n("You are on a too high logical desktop, desktop tracking will not work") );
+    KMessageBox::error( nullptr, i18n("You are on a too high logical desktop, desktop tracking will not work") );
   _isloading = false;
   refresh();
 }
@@ -279,7 +279,7 @@ void TaskView::loadFromFlatFile()
   //KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this);
 
   TQString fileName(KFileDialog::getOpenFileName(TQString(), TQString(),
-        0));
+        nullptr));
   if (!fileName.isEmpty()) {
     TQString err = _storage->loadFromFlatFile(this, fileName);
     if (!err.isEmpty())
@@ -301,7 +301,7 @@ void TaskView::loadFromFlatFile()
     setCurrentItem(first_child());
 
     if ( _desktopTracker->startTracking() != TQString() )
-      KMessageBox::error(0, i18n("You are on a too high logical desktop, desktop tracking will not work") );
+      KMessageBox::error(nullptr, i18n("You are on a too high logical desktop, desktop tracking will not work") );
   }
 }
 
@@ -309,7 +309,7 @@ TQString TaskView::importPlanner(TQString fileName)
 {
   kdDebug(5970) << "entering importPlanner" << endl;
   PlannerParser* handler=new PlannerParser(this);
-  if (fileName.isEmpty()) fileName=KFileDialog::getOpenFileName(TQString(), TQString(), 0);
+  if (fileName.isEmpty()) fileName=KFileDialog::getOpenFileName(TQString(), TQString(), nullptr);
   TQFile xmlFile( fileName );
   TQXmlInputSource source( xmlFile );
   TQXmlSimpleReader reader;
@@ -388,7 +388,7 @@ void TaskView::startTimerFor(Task* task, TQDateTime startTime )
   kdDebug(5970) << "Entering TaskView::startTimerFor" << endl;
   if (save()==TQString())
   {
-    if (task != 0 && activeTasks.findRef(task) == -1) 
+    if (task && activeTasks.findRef(task) == -1)
     {
       _idleTimeDetector->startIdleDetection();
       if (!task->isComplete())
@@ -402,7 +402,7 @@ void TaskView::startTimerFor(Task* task, TQDateTime startTime )
       }
     }
   }
-  else KMessageBox::error(0,i18n("Saving is impossible, so timing is useless. \nSaving problems may result from a full harddisk, a directory name instead of a file name, or stale locks. Check that your harddisk has enough space, that your calendar file exists and is a file and remove stale locks, typically from ~/.trinity/share/apps/tdeabc/lock."));
+  else KMessageBox::error(nullptr,i18n("Saving is impossible, so timing is useless. \nSaving problems may result from a full harddisk, a directory name instead of a file name, or stale locks. Check that your harddisk has enough space, that your calendar file exists and is a file and remove stale locks, typically from ~/.trinity/share/apps/tdeabc/lock."));
 }
 
 void TaskView::clearActiveTasks()
@@ -462,7 +462,7 @@ void TaskView::resetTimeForAllTasks()
 void TaskView::stopTimerFor(Task* task)
 {
   kdDebug(5970) << "Entering stopTimerFor. task = " << task->name() << endl;
-  if ( task != 0 && activeTasks.findRef(task) != -1 ) {
+  if ( task && activeTasks.findRef(task) != -1 ) {
     activeTasks.removeRef(task);
     task->setRunning(false, _storage);
     if ( activeTasks.count() == 0 ) {
@@ -487,12 +487,12 @@ void TaskView::minuteUpdate()
 void TaskView::addTimeToActiveTasks(int minutes, bool save_data)
 {
   for( unsigned int i = 0; i < activeTasks.count(); i++ )
-    activeTasks.at(i)->changeTime(minutes, ( save_data ? _storage : 0 ) );
+    activeTasks.at(i)->changeTime(minutes, ( save_data ? _storage : nullptr ) );
 }
 
 void TaskView::newTask()
 {
-  newTask(i18n("New Task"), 0);
+  newTask(i18n("New Task"), nullptr);
 }
 
 void TaskView::newTask(TQString caption, Task *parent)
@@ -517,7 +517,7 @@ void TaskView::newTask(TQString caption, Task *parent)
     TQString uid = addTask( taskName, total, session, desktopList, parent );
     if ( uid.isNull() )
     {
-      KMessageBox::error( 0, i18n(
+      KMessageBox::error( nullptr, i18n(
             "Error storing new task. Your changes were not saved. Make sure you can edit your iCalendar file. Also quit all applications using this file and remove any lock file related to its name from ~/.trinity/share/apps/tdeabc/lock/ " ) );
     }
 
@@ -622,8 +622,8 @@ void TaskView::editTask()
 void TaskView::reinstateTask(int completion)
 {
   Task* task = current_item();
-  if (task == 0) {
-    KMessageBox::information(0,i18n("No task selected."));
+  if (!task) {
+    KMessageBox::information(nullptr,i18n("No task selected."));
     return;
   }
 
@@ -640,22 +640,22 @@ void TaskView::reinstateTask(int completion)
 void TaskView::deleteTask(bool markingascomplete)
 {
   Task *task = current_item();
-  if (task == 0) {
-    KMessageBox::information(0,i18n("No task selected."));
+  if (!task) {
+    KMessageBox::information(nullptr,i18n("No task selected."));
     return;
   }
 
   int response = KMessageBox::Continue;
   if (!markingascomplete && _preferences->promptDelete()) {
     if (task->childCount() == 0) {
-      response = KMessageBox::warningContinueCancel( 0,
+      response = KMessageBox::warningContinueCancel( nullptr,
           i18n( "Are you sure you want to delete "
           "the task named\n\"%1\" and its entire history?")
           .arg(task->name()),
           i18n( "Deleting Task"), KStdGuiItem::del());
     }
     else {
-      response = KMessageBox::warningContinueCancel( 0,
+      response = KMessageBox::warningContinueCancel( nullptr,
           i18n( "Are you sure you want to delete the task named"
           "\n\"%1\" and its entire history?\n"
           "NOTE: all its subtasks and their history will also "
@@ -814,7 +814,7 @@ void TaskView::clipTotals()
   TimeKard t;
   if (current_item() && current_item()->isRoot())
   {
-    int response = KMessageBox::questionYesNo( 0,
+    int response = KMessageBox::questionYesNo( nullptr,
         i18n("Copy totals for just this task and its subtasks, or copy totals for all tasks?"),
         i18n("Copy Totals to Clipboard"),
         i18n("Copy This Task"), i18n("Copy All Tasks") );
@@ -838,7 +838,7 @@ void TaskView::clipSession()
   TimeKard t;
   if (current_item() && current_item()->isRoot())
   {
-    int response = KMessageBox::questionYesNo( 0,
+    int response = KMessageBox::questionYesNo( nullptr,
         i18n("Copy session time for just this task and its subtasks, or copy session time for all tasks?"),
         i18n("Copy Session Time to Clipboard"),
         i18n("Copy This Task"), i18n("Copy All Tasks") );
diff --git a/karm/taskview.h b/karm/taskview.h
index c74f86cfc..36328d45f 100644
--- a/karm/taskview.h
+++ b/karm/taskview.h
@@ -45,7 +45,7 @@ class TaskView : public TDEListView
   
 
   public:
-    TaskView( TQWidget *parent = 0, const char *name = 0, const TQString &icsfile = "" );
+    TaskView( TQWidget *parent = nullptr, const char *name = nullptr, const TQString &icsfile = "" );
     virtual ~TaskView();
 
     /**  Return the first item in the view, cast to a Task pointer.  */
@@ -83,7 +83,7 @@ class TaskView : public TDEListView
 
     /** Add a task to view and storage. */
     TQString addTask( const TQString& taskame, long total, long session, const DesktopList& desktops, 
-                     Task* parent = 0 );
+                     Task* parent = nullptr );
 
   public slots:
     /** Save to persistent storage. */
diff --git a/karm/tdeaccelmenuwatch.cpp b/karm/tdeaccelmenuwatch.cpp
index 3cc72ea83..ca5798992 100644
--- a/karm/tdeaccelmenuwatch.cpp
+++ b/karm/tdeaccelmenuwatch.cpp
@@ -12,7 +12,7 @@
 TDEAccelMenuWatch::TDEAccelMenuWatch( TDEAccel *accel, TQObject *parent )
   : TQObject( parent ),
   _accel( accel ),
-  _menu ( 0 )
+  _menu ( nullptr )
 {
   _accList.setAutoDelete( true );
   _menuList.setAutoDelete( false );
@@ -47,7 +47,7 @@ void TDEAccelMenuWatch::connectAccel( int itemId, TDEStdAccel::StdAccel accel )
 
 void TDEAccelMenuWatch::updateMenus()
 {
-  assert( _accel != 0 );
+  assert(_accel);
 
   TQPtrListIterator<AccelItem> iter( _accList );
   AccelItem *item;
diff --git a/karm/tdeaccelmenuwatch.h b/karm/tdeaccelmenuwatch.h
index c9e8aae6e..a7aae8683 100644
--- a/karm/tdeaccelmenuwatch.h
+++ b/karm/tdeaccelmenuwatch.h
@@ -64,7 +64,7 @@ class TDEAccelMenuWatch : public TQObject
     /**
      * TDEAccelMenuWatch Constructor
      */
-    TDEAccelMenuWatch( TDEAccel *accel, TQObject *parent = 0 );
+    TDEAccelMenuWatch( TDEAccel *accel, TQObject *parent = nullptr );
 
     /**
      * TDEAccelMenuWatch Destructor
diff --git a/karm/test/runscripts.cpp b/karm/test/runscripts.cpp
index e3a25a15f..9d22272d6 100644
--- a/karm/test/runscripts.cpp
+++ b/karm/test/runscripts.cpp
@@ -107,7 +107,7 @@ int runscripts
     ++it;
   }
   delete s;
-  s = 0;
+  s = nullptr;
   
   return oneBadApple;
 }
diff --git a/karm/test/script.cpp b/karm/test/script.cpp
index ab6f75796..ab5506c03 100644
--- a/karm/test/script.cpp
+++ b/karm/test/script.cpp
@@ -61,7 +61,7 @@ Script::Script( const TQDir& workingDirectory )
 Script::~Script()
 {
   delete m_proc;
-  m_proc = 0;
+  m_proc = nullptr;
 }
 
 void Script::addArgument( const TQString &arg )
@@ -96,7 +96,7 @@ void Script::exit()
 {
   m_status = m_proc->exitStatus();
   delete m_proc;
-  m_proc = 0;
+  m_proc = nullptr;
 }
 
 void Script::stderr()
diff --git a/karm/tray.cpp b/karm/tray.cpp
index 9332d1e04..a9dbd3918 100644
--- a/karm/tray.cpp
+++ b/karm/tray.cpp
@@ -28,7 +28,7 @@
 #include "task.h"
 #include "tray.h"
 
-TQPtrVector<TQPixmap> *KarmTray::icons = 0;
+TQPtrVector<TQPixmap> *KarmTray::icons = nullptr;
 
 KarmTray::KarmTray(MainWindow* parent)
   : KSystemTray(parent, "Karm Tray")
@@ -38,7 +38,7 @@ KarmTray::KarmTray(MainWindow* parent)
   connect( _taskActiveTimer, TQ_SIGNAL( timeout() ), this,
                              TQ_SLOT( advanceClock()) );
 
-  if (icons == 0) {
+  if (!icons) {
     icons = new TQPtrVector<TQPixmap>(8);
     for (int i=0; i<8; i++) {
       TQPixmap *icon = new TQPixmap();
@@ -72,10 +72,10 @@ KarmTray::KarmTray(MainWindow* parent)
 }
 
 KarmTray::KarmTray(karmPart * parent)
-  : KSystemTray( 0 , "Karm Tray")
+  : KSystemTray( nullptr , "Karm Tray")
 {
 // it is not convenient if every kpart gets an icon in the systray.
-  _taskActiveTimer = 0;
+  _taskActiveTimer = nullptr;
 }
 
 KarmTray::~KarmTray()
diff --git a/kdgantt/KDGanttMinimizeSplitter.cpp b/kdgantt/KDGanttMinimizeSplitter.cpp
index ad1b252c9..67f56d362 100644
--- a/kdgantt/KDGanttMinimizeSplitter.cpp
+++ b/kdgantt/KDGanttMinimizeSplitter.cpp
@@ -468,7 +468,7 @@ void KDGanttMinimizeSplitter::resizeEvent( TQResizeEvent * )
 TQSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool first )
 {
     TQSplitterLayoutStruct *s;
-    KDGanttSplitterHandle *newHandle = 0;
+    KDGanttSplitterHandle *newHandle = nullptr;
     if ( data->list.count() > 0 ) {
 	s = new TQSplitterLayoutStruct;
 	s->mode = KeepSize;
@@ -525,7 +525,7 @@ void KDGanttMinimizeSplitter::childEvent( TQChildEvent *c )
 	recalc( isVisible() );
 
     } else if ( c->type() == TQEvent::ChildRemoved ) {
-	TQSplitterLayoutStruct *p = 0;
+	TQSplitterLayoutStruct *p = nullptr;
 	if ( data->list.count() > 1 )
 	    p = data->list.at(1); //remove handle _after_ first widget.
 	TQSplitterLayoutStruct *s = data->list.first();
@@ -729,7 +729,7 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
 void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
 {
     TQSplitterLayoutStruct *s = id < int(data->list.count()) ?
-			       data->list.at(id) : 0;
+			       data->list.at(id) : nullptr;
     if ( !s )
 	return;
     TQWidget *w = s->wid;
@@ -931,7 +931,7 @@ void KDGanttMinimizeSplitter::recalc( bool update )
     for ( int i = 0; i< n; i++ ) {
 	TQSplitterLayoutStruct *s = data->list.at(i);
 	if ( !s->isSplitter ) {
-	    TQSplitterLayoutStruct *p = (i > 0) ? data->list.at( i-1 ) : 0;
+	    TQSplitterLayoutStruct *p = (i > 0) ? data->list.at( i-1 ) : nullptr;
 	    if ( p && p->isSplitter )
 		if ( first || s->wid->isHidden() )
 		    p->wid->hide(); //may trigger new recalc
@@ -962,7 +962,7 @@ void KDGanttMinimizeSplitter::recalc( bool update )
 	}
     }
     if ( empty ) {
-        if ( parentWidget() != 0 && parentWidget()->inherits("KDGanttMinimizeSplitter") ) {
+        if ( parentWidget() && parentWidget()->inherits("KDGanttMinimizeSplitter") ) {
             // nested splitters; be nice
             maxl = maxt = 0;
         } else {
@@ -1115,7 +1115,7 @@ TQSize KDGanttMinimizeSplitter::sizeHint() const
 	TQObjectListIt it( c );
 	TQObject * o;
 
-	while( (o=it.current()) != 0 ) {
+	while ((o = it.current()) != nullptr) {
 	    ++it;
 	    if ( o->isWidgetType() &&
 		 !((TQWidget*)o)->isHidden() ) {
@@ -1145,7 +1145,7 @@ TQSize KDGanttMinimizeSplitter::minimumSizeHint() const
 	TQObjectListIt it( c );
 	TQObject * o;
 
-	while( (o=it.current()) != 0 ) {
+	while ((o = it.current()) != nullptr) {
 	    ++it;
 	    if ( o->isWidgetType() &&
 		 !((TQWidget*)o)->isHidden() ) {
diff --git a/kdgantt/KDGanttMinimizeSplitter.h b/kdgantt/KDGanttMinimizeSplitter.h
index 628a9c6ff..7092c9920 100644
--- a/kdgantt/KDGanttMinimizeSplitter.h
+++ b/kdgantt/KDGanttMinimizeSplitter.h
@@ -52,8 +52,8 @@ public:
     enum ResizeMode { Stretch, KeepSize, FollowSizeHint };
     enum Direction { Left, Right, Up, Down };
 
-    KDGanttMinimizeSplitter( TQWidget* parent=0, const char* name=0 );
-    KDGanttMinimizeSplitter( TQt::Orientation, TQWidget* parent=0, const char* name=0 );
+    KDGanttMinimizeSplitter( TQWidget* parent=nullptr, const char* name=nullptr );
+    KDGanttMinimizeSplitter( TQt::Orientation, TQWidget* parent=nullptr, const char* name=nullptr );
     ~KDGanttMinimizeSplitter();
 
     virtual void setOrientation( TQt::Orientation );
@@ -141,7 +141,7 @@ class KDGanttSplitterHandle : public TQWidget
     
 public:
     KDGanttSplitterHandle( TQt::Orientation o,
-		       KDGanttMinimizeSplitter *parent, const char* name=0 );
+		       KDGanttMinimizeSplitter *parent, const char* name=nullptr );
     void setOrientation( TQt::Orientation o );
     TQt::Orientation orientation() const { return orient; }
 
diff --git a/kdgantt/KDGanttSemiSizingControl.cpp b/kdgantt/KDGanttSemiSizingControl.cpp
index 6ea8375d3..320125727 100644
--- a/kdgantt/KDGanttSemiSizingControl.cpp
+++ b/kdgantt/KDGanttSemiSizingControl.cpp
@@ -66,7 +66,7 @@
 KDGanttSemiSizingControl::KDGanttSemiSizingControl( TQWidget* parent,
                                           const char* name ) :
     KDGanttSizingControl( parent, name ), _orient( TQt::Horizontal ), 
-    _arrowPos( Before ), _minimizedWidget(0), _maximizedWidget(0)
+    _arrowPos( Before ), _minimizedWidget(nullptr), _maximizedWidget(nullptr)
 {
     init();
 }
@@ -88,7 +88,7 @@ KDGanttSemiSizingControl::KDGanttSemiSizingControl( TQt::Orientation orientation
                                           TQWidget* parent,
                                           const char* name ) :
     KDGanttSizingControl( parent, name ), _orient( orientation ), 
-    _arrowPos( Before ), _minimizedWidget(0), _maximizedWidget(0)
+    _arrowPos( Before ), _minimizedWidget(nullptr), _maximizedWidget(nullptr)
 {
     init();
 }
@@ -112,7 +112,7 @@ KDGanttSemiSizingControl::KDGanttSemiSizingControl( ArrowPosition arrowPosition,
                                           TQWidget* parent,
                                           const char* name ) :
     KDGanttSizingControl( parent, name ), _orient( orientation ), 
-    _arrowPos( arrowPosition ), _minimizedWidget(0), _maximizedWidget(0)
+    _arrowPos( arrowPosition ), _minimizedWidget(nullptr), _maximizedWidget(nullptr)
 {
     init();
 }
@@ -249,7 +249,7 @@ void KDGanttSemiSizingControl::init()
     _but = new TQPushButton( this );
     _but->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) );
     connect( _but, TQ_SIGNAL( clicked() ), this, TQ_SLOT(changeState()) );
-    _layout = 0;
+    _layout = nullptr;
     TQWhatsThis::add( _but, "Click on this button to show the \nlegend at the bottom of the widget");
     TQToolTip::add( _but, "Show / hide legend");
 
diff --git a/kdgantt/KDGanttSemiSizingControl.h b/kdgantt/KDGanttSemiSizingControl.h
index a6d29e54c..3e2db9fbd 100644
--- a/kdgantt/KDGanttSemiSizingControl.h
+++ b/kdgantt/KDGanttSemiSizingControl.h
@@ -50,12 +50,12 @@ class KDGanttSemiSizingControl : public KDGanttSizingControl
 public:
     enum ArrowPosition { Before, After };
 
-    KDGanttSemiSizingControl( TQWidget* parent = 0, const char* name = 0 );
-    KDGanttSemiSizingControl( TQt::Orientation orientation, TQWidget* parent = 0,
-                           const char* name = 0 );
+    KDGanttSemiSizingControl( TQWidget* parent = nullptr, const char* name = nullptr );
+    KDGanttSemiSizingControl( TQt::Orientation orientation, TQWidget* parent = nullptr,
+                           const char* name = nullptr );
     KDGanttSemiSizingControl( ArrowPosition arrowPosition,
-                         TQt::Orientation orientation, TQWidget* parent = 0,
-                         const char* name = 0 );
+                         TQt::Orientation orientation, TQWidget* parent = nullptr,
+                         const char* name = nullptr );
 
     void setMinimizedWidget( TQWidget* widget );
     void setMaximizedWidget( TQWidget* widget );
diff --git a/kdgantt/KDGanttSizingControl.h b/kdgantt/KDGanttSizingControl.h
index 3ef84e7b3..3a36ceed1 100644
--- a/kdgantt/KDGanttSizingControl.h
+++ b/kdgantt/KDGanttSizingControl.h
@@ -44,7 +44,7 @@ public:
     bool isMinimized() const;
     
 protected:
-    KDGanttSizingControl( TQWidget* parent = 0, const char* name = 0, WFlags f = 0 );
+    KDGanttSizingControl( TQWidget* parent = nullptr, const char* name = nullptr, WFlags f = 0 );
 
 public slots:
     virtual void minimize( bool minimize );
diff --git a/kdgantt/KDGanttView.cpp b/kdgantt/KDGanttView.cpp
index e9adada95..c7eebe28b 100644
--- a/kdgantt/KDGanttView.cpp
+++ b/kdgantt/KDGanttView.cpp
@@ -82,14 +82,14 @@
 
 KDGanttView::KDGanttView( TQWidget* parent, const char* name  )
     : KDGanttMinimizeSplitter( TQt::Vertical, parent, name ),
-      myCanvasView(0),
-      myTimeHeaderScroll(0),
+      myCanvasView(nullptr),
+      myTimeHeaderScroll(nullptr),
       mFixedHorizon( false )
 {
 #if defined KDAB_EVAL
     EvalDialog::checkEvalLicense( "KD Gantt" );
 #endif
-  myCurrentItem = 0;
+  myCurrentItem = nullptr;
     setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
     mySplitter = new KDGanttMinimizeSplitter( this );
     mySplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Left );
@@ -201,7 +201,7 @@ KDGanttView::~KDGanttView()
 {
   setUpdateEnabled(false);
   // delete cut item, if there is any
-  myCanvasView->resetCutPaste( 0 );
+  myCanvasView->resetCutPaste( nullptr );
   myTimeTable->clearTaskLinks();
 }
 /*!
@@ -445,11 +445,11 @@ void KDGanttView::slotmouseButtonClicked ( int button, TQListViewItem * item,
 {
   KDGanttViewItem* gItem = static_cast<KDGanttViewItem*>( item );
   emit lvMouseButtonClicked ( button , gItem,  pos,  c );
-  if (gItem == 0 && myCurrentItem != 0 ) {
-    myCurrentItem = 0;
+  if (!gItem && myCurrentItem ) {
+    myCurrentItem = nullptr;
     emit lvCurrentChanged( gItem );
   }
-  if (gItem != 0 && myCurrentItem == 0 ) {
+  if (gItem && !myCurrentItem ) {
     myCurrentItem = gItem;
     emit lvCurrentChanged( gItem );
   }
@@ -865,7 +865,7 @@ void KDGanttView::print( TQPrinter* printer ,
   // get the size of the desired output for scaling.
   // here we want to print all: ListView, TimeLine, and Legend
   // for this purpose, we call drawContents() with a 0 pointer as painter
-  TQSize size = drawContents( 0, printListView, printTimeLine, printLegend );
+  TQSize size = drawContents( nullptr, printListView, printTimeLine, printLegend );
 
   // at the top, we want to print current time/date
   TQString date = "Printing Time: " + TQDateTime::currentDateTime().toString();
@@ -3087,7 +3087,7 @@ bool KDGanttView::loadXML( const TQDomDocument& doc )
                 }
             } else if( tagName == "Items" ) {
                 TQDomNode node = element.firstChild();
-                KDGanttViewItem* previous = 0;
+                KDGanttViewItem* previous = nullptr;
                 while( !node.isNull() ) {
                     TQDomElement element = node.toElement();
                     if( !element.isNull() ) { // was really an element
@@ -3562,7 +3562,7 @@ TQDomDocument KDGanttView::saveXML( bool withPI ) const
     TQDomElement taskLinksElement = doc.createElement( "TaskLinks" );
     docRoot.appendChild( taskLinksElement );
     TQPtrList<KDGanttViewTaskLink> taskLinkList = taskLinks();
-    KDGanttViewTaskLink* currentTL = 0;
+    KDGanttViewTaskLink* currentTL = nullptr;
     for( currentTL = taskLinkList.first(); currentTL;
          currentTL = taskLinkList.next() )
         currentTL->createNode( doc, taskLinksElement );
@@ -3571,7 +3571,7 @@ TQDomDocument KDGanttView::saveXML( bool withPI ) const
     TQDomElement taskLinkGroupsElement = doc.createElement( "TaskLinkGroups" );
     docRoot.appendChild( taskLinkGroupsElement );
     TQPtrList<KDGanttViewTaskLinkGroup> taskLinkGroupList = taskLinkGroups();
-    KDGanttViewTaskLinkGroup* currentTLG = 0;
+    KDGanttViewTaskLinkGroup* currentTLG = nullptr;
     for( currentTLG = taskLinkGroupList.first(); currentTLG;
          currentTLG = taskLinkGroupList.next() )
         currentTLG->createNode( doc, taskLinkGroupsElement );
@@ -3938,12 +3938,12 @@ void KDGanttView::setSelected( KDGanttViewItem* item, bool selected )
 KDGanttViewItem* KDGanttView::getItemByName( const TQString& name ) const
 {
     KDGanttViewItem* temp =  firstChild(),* ret;
-    while (temp != 0) {
+    while (temp) {
       if ( (ret = temp->getChildByName( name ) ) )
         return ret;
       temp = temp->nextSibling();
     }
-    return 0;
+    return nullptr;
 }
 
 
@@ -3992,7 +3992,7 @@ KDGanttViewItem* KDGanttView::getItemByGanttViewPos( const TQPoint& pos ) const
           return item;
       }
     }
-    return 0;
+    return nullptr;
 }
 
 
@@ -4022,14 +4022,14 @@ KDGanttViewItem* KDGanttView::getItemAt( const TQPoint& pos, bool global ) const
   */
 
   KDGanttViewItem* item;
-  KDGanttViewItem* retItem = 0;
+  KDGanttViewItem* retItem = nullptr;
   int y;
   if ( global )
     y = myCanvasView->mapFromGlobal(pos).y();
   else
     y = pos.y();
   item = firstChild();
-  while ( item != 0 ) {
+  while ( item ) {
     int yc = item->itemPos();
     if ( yc <= y && y < yc + item->height()) {
       retItem = item;
@@ -4622,7 +4622,7 @@ void  KDGanttView::setGvVScrollBarMode( TQScrollView::ScrollBarMode m )
 void  KDGanttView::notifyEditdialog( KDGanttViewItem * item)
 {
   if (myItemAttributeDialog->getItem() == item ) {
-    myItemAttributeDialog->reset( 0 );
+    myItemAttributeDialog->reset( nullptr );
   }
 }
 
diff --git a/kdgantt/KDGanttView.h b/kdgantt/KDGanttView.h
index cf5282307..f9e209ba4 100644
--- a/kdgantt/KDGanttView.h
+++ b/kdgantt/KDGanttView.h
@@ -119,7 +119,7 @@ public:
     enum HourFormat { Hour_24, Hour_12, Hour_24_FourDigit };
     enum RepaintMode { No, Medium, Always };
 
-    KDGanttView( TQWidget* parent = 0, const char* name = 0 );
+    KDGanttView( TQWidget* parent = nullptr, const char* name = nullptr );
     ~KDGanttView();
 
     virtual void show();
@@ -157,10 +157,10 @@ public:
     int horBackgroundLines( TQBrush& brush );
     bool saveProject( TQIODevice* );
     bool loadProject( TQIODevice* );
-    void print( TQPrinter* printer = 0 ,
+    void print( TQPrinter* printer = nullptr ,
 		bool printListView = true, bool printTimeLine = true,
 		bool printLegend = false );
-    TQSize drawContents( TQPainter* p = 0,
+    TQSize drawContents( TQPainter* p = nullptr,
 		      bool drawListView = true, bool drawTimeLine = true,
 		      bool drawLegend = false );
     void setZoomFactor( double factor, bool absolute );
diff --git a/kdgantt/KDGanttViewEventItem.cpp b/kdgantt/KDGanttViewEventItem.cpp
index d8880121f..28c76765b 100644
--- a/kdgantt/KDGanttViewEventItem.cpp
+++ b/kdgantt/KDGanttViewEventItem.cpp
@@ -295,7 +295,7 @@ void KDGanttViewEventItem::showItem(bool show, int coordY)
 void KDGanttViewEventItem::initItem()
 {
   isVisibleInGanttView = false;
-  myLeadTime = 0;
+  myLeadTime = nullptr;
   showItem(true);
   myGanttView->myTimeTable->updateMyContent();
   setDragEnabled( myGanttView->dragEnabled() );
diff --git a/kdgantt/KDGanttViewItem.cpp b/kdgantt/KDGanttViewItem.cpp
index a3648a64b..31b4b7920 100644
--- a/kdgantt/KDGanttViewItem.cpp
+++ b/kdgantt/KDGanttViewItem.cpp
@@ -328,7 +328,7 @@ TQString KDGanttViewItem::name() const
 KDGanttViewItem* KDGanttViewItem::find( const TQString& name )
 {
     if (name.isEmpty()) // avoid error msg from TQDict
-        return 0;
+        return nullptr;
     return sItemDict.find( name );
 }
 
@@ -365,7 +365,7 @@ void KDGanttViewItem::setEnabled( bool on )
   if ( displaySubitemsAsGroup() ) {
     myGanttView->myTimeTable->inc_blockUpdating();
     KDGanttViewItem* temp = (KDGanttViewItem*) firstChild();
-    while (temp != 0) {
+    while (temp) {
       temp->setEnabled(  on );
       temp = temp->nextSibling();
     }
@@ -749,7 +749,7 @@ void KDGanttViewItem::setHighlight( bool highlight )
     if ( displaySubitemsAsGroup() ) {
       myGanttView->myTimeTable->inc_blockUpdating();
       KDGanttViewItem* temp = (KDGanttViewItem*) firstChild();
-      while (temp != 0) {
+      while (temp) {
 	temp->setHighlight( highlight );
 	temp = temp->nextSibling();
       }
@@ -964,7 +964,7 @@ void KDGanttViewItem::setColors( const TQColor& start, const TQColor& middle,
     if ( displaySubitemsAsGroup() ) {
       myGanttView->myTimeTable->inc_blockUpdating();
       KDGanttViewItem* temp = (KDGanttViewItem*) firstChild();
-      while (temp != 0) {
+      while (temp) {
 	temp->setColors( start, middle, end );
 	temp = temp->nextSibling();
       }
@@ -1016,7 +1016,7 @@ void KDGanttViewItem::setHighlightColors( const TQColor& start, const TQColor& m
     if ( displaySubitemsAsGroup() ) {
       myGanttView->myTimeTable->inc_blockUpdating();
       KDGanttViewItem* temp = (KDGanttViewItem*) firstChild();
-      while (temp != 0) {
+      while (temp) {
 	temp->setHighlightColors( start,  middle,  end );
 	temp = temp->nextSibling();
       }
@@ -1061,7 +1061,7 @@ void KDGanttViewItem::setTextColor( const TQColor& color )
    if ( displaySubitemsAsGroup() ) {
       myGanttView->myTimeTable->inc_blockUpdating();
       KDGanttViewItem* temp = (KDGanttViewItem*) firstChild();
-      while (temp != 0) {
+      while (temp) {
 	temp->setTextColor(color);
 	temp = temp->nextSibling();
       }
@@ -1155,7 +1155,7 @@ void KDGanttViewItem::setDefaultColor( const TQColor& color )
    if ( displaySubitemsAsGroup() ) {
       myGanttView->myTimeTable->inc_blockUpdating();
       KDGanttViewItem* temp = (KDGanttViewItem*) firstChild();
-      while (temp != 0) {
+      while (temp) {
 	temp->setDefaultColor( color );
 	temp = temp->nextSibling();
       }
@@ -1200,7 +1200,7 @@ void KDGanttViewItem::setDefaultHighlightColor( const TQColor& color )
    if ( displaySubitemsAsGroup() ) {
       myGanttView->myTimeTable->inc_blockUpdating();
       KDGanttViewItem* temp = (KDGanttViewItem*) firstChild();
-      while (temp != 0) {
+      while (temp) {
 	temp->setDefaultHighlightColor( color );
 	temp = temp->nextSibling();
       }
@@ -1291,7 +1291,7 @@ KDGanttViewItem* KDGanttViewItem::itemBelow( bool includeDisabled )
     }
   }
   KDGanttViewItem*  Item2 = (KDGanttViewItem* )TQListViewItem::listView()->itemAt(TQPoint (2, TQListViewItem::itemPos() + TQListViewItem::height() +2) );
-  if ( Item2 != 0 )
+  if (Item2)
     if (!Item2->enabled() )
       return Item2;
   return retItem;
@@ -1428,17 +1428,17 @@ void KDGanttViewItem::initColorAndShapes(Type t)
     _callListViewOnSetOpen = true;
     myType = t;
     myProgress = 0;
-    progressShape = 0;
-    floatStartShape = 0;
-    floatEndShape = 0;
+    progressShape = nullptr;
+    floatStartShape = nullptr;
+    floatEndShape = nullptr;
     blockUpdating = true;
     isVisibleInGanttView = false;
-    startShape = 0;
-    midShape = 0;
-    endShape = 0;
-    startShapeBack = 0;
-    midShapeBack = 0;
-    endShapeBack = 0;
+    startShape = nullptr;
+    midShape = nullptr;
+    endShape = nullptr;
+    startShapeBack = nullptr;
+    midShapeBack = nullptr;
+    endShapeBack = nullptr;
 
     myItemSize = 10;
     myGanttView = ((KDListView *)listView())->myGanttView;
@@ -1628,7 +1628,7 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view,
         item = new KDGanttViewEventItem( view );
     else {
         tqDebug( "Unknown item type %s in KDGanttViewItem::createFromDomElement()", typeString.latin1() );
-        return 0;
+        return nullptr;
     }
 
     item->loadFromDomElement( element );
@@ -1660,7 +1660,7 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttView* view,
         item = new KDGanttViewEventItem( view, previous );
     else {
         tqDebug( "Unknown item type in KDGanttViewItem::createFromDomElement()" );
-        return 0;
+        return nullptr;
     }
 
     item->loadFromDomElement( element );
@@ -1692,7 +1692,7 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent,
         item = new KDGanttViewEventItem( parent );
     else {
         tqDebug( "Unknown item type in KDGanttViewItem::createFromDomElement()" );
-        return 0;
+        return nullptr;
     }
 
     item->loadFromDomElement( element );
@@ -1724,7 +1724,7 @@ KDGanttViewItem* KDGanttViewItem::createFromDomElement( KDGanttViewItem* parent,
         item = new KDGanttViewEventItem( parent, previous );
     else {
         tqDebug( "Unknown item type in KDGanttViewItem::createFromDomElement()" );
-        return 0;
+        return nullptr;
     }
 
     item->loadFromDomElement( element );
@@ -1841,7 +1841,7 @@ void KDGanttViewItem::loadFromDomElement( TQDomElement& element )
                     tempName = value;
             } else if( tagName == "Items" ) {
                 TQDomNode node = element.firstChild();
-                KDGanttViewItem* previous = 0;
+                KDGanttViewItem* previous = nullptr;
                 while( !node.isNull() ) {
                     TQDomElement element = node.toElement();
                     if( !element.isNull() ) { // was really an element
@@ -1922,7 +1922,7 @@ void KDGanttViewItem::showSubitemTree( int CoordY )
 
   KDGanttViewItem* temp = firstChild();
   if (temp) {
-    while (temp != 0) {
+    while (temp) {
       if (temp->isOpen() || !temp->displaySubitemsAsGroup() ) {
 	temp->showItem( true, CoordY );
 	if ( temp->firstChild() )
@@ -1954,7 +1954,7 @@ TQDateTime KDGanttViewItem::myChildStartTime()
   bool set = true;
   KDGanttViewItem* temp = (KDGanttViewItem*) firstChild();
   if (temp) {
-    while (temp != 0) {
+    while (temp) {
       if ( !temp->displaySubitemsAsGroup() ) {
 	tempTime = temp->startTime();
       } else {
@@ -1988,7 +1988,7 @@ TQDateTime KDGanttViewItem::myChildEndTime()
   bool set = true;
   KDGanttViewItem* temp = (KDGanttViewItem*) firstChild();
   if (temp) {
-    while (temp != 0) {
+    while (temp) {
       if ( !temp->displaySubitemsAsGroup() ) {
 	tempTime = temp->endTime();
       } else {
@@ -2054,12 +2054,12 @@ KDGanttViewItem* KDGanttViewItem::getChildByName( const TQString& name )
   if ( listViewText() == name )
     return this;
   KDGanttViewItem* temp =  firstChild(),* ret;
-  while (temp != 0) {
+  while (temp) {
     if ( (ret = temp->getChildByName( name )))
       return ret;
     temp = temp->nextSibling();
   }
-  return 0;
+  return nullptr;
 }
 
 
@@ -2067,7 +2067,7 @@ KDGanttViewItem* KDGanttViewItem::getChildByName( const TQString& name )
 void  KDGanttViewItem::printinfo( TQString s )
 {
   KDGanttViewItem* temp =  firstChild();
-  while (temp != 0) {
+  while (temp) {
     temp->printinfo("  "+s );
     temp = temp->nextSibling();
   }
@@ -2152,7 +2152,7 @@ int  KDGanttViewItem::computeHeight()
     int tempHeight;
     // introduced special for performance reasons
     bool special = displaySubitemsAsGroup() && myGanttView->calendarMode();
-    while (temp != 0) {
+    while (temp) {
       tempHeight = temp->computeHeight();
       if ( special ) {
 	if ( temp->displaySubitemsAsGroup() ) {
@@ -2278,7 +2278,7 @@ void  KDGanttViewItem::resetSubitemVisibility()
     setVisible( true );
     // all items can be opened
     allow = true;
-    while (temp != 0) {
+    while (temp) {
       temp->resetSubitemVisibility();
       temp = temp->nextSibling();
     }
diff --git a/kdgantt/KDGanttViewSubwidgets.cpp b/kdgantt/KDGanttViewSubwidgets.cpp
index 4b1e34725..000f9fbf4 100644
--- a/kdgantt/KDGanttViewSubwidgets.cpp
+++ b/kdgantt/KDGanttViewSubwidgets.cpp
@@ -154,7 +154,7 @@ void KDTimeTableWidget::collapseItem( TQListViewItem * item)
 void KDTimeTableWidget::highlightItem( TQListViewItem * item )
 {
     static bool itemwashighlighted;
-    static KDGanttViewItem* highlightedItem = 0;
+    static KDGanttViewItem* highlightedItem = nullptr;
     if (highlightedItem)
         highlightedItem->setHighlight(itemwashighlighted);
     highlightedItem = ( KDGanttViewItem*)item;
@@ -242,7 +242,7 @@ void KDTimeTableWidget::computeVerticalGrid()
                                   templine->setPen(colPen);
                                   templine->setPoints(i+(cw/2),0,i+(cw/2),h);
                                 */
-                                temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem);
+                                temprect = new KDCanvasRectangle(this,nullptr,Type_is_KDGanttGridItem);
                                 temprect->setPen( TQPen(TQPen::NoPen) );
                                 temprect->setBrush( TQBrush( colcol, TQt::SolidPattern) );
                                 temprect->setSize(cw ,h );
@@ -259,7 +259,7 @@ void KDTimeTableWidget::computeVerticalGrid()
         }
         // create additional Lines for vertical grid
         for ( ;i < wid;i += cw) {
-            templine = new KDCanvasLine(this,0,Type_is_KDGanttGridItem);
+            templine = new KDCanvasLine(this,nullptr,Type_is_KDGanttGridItem);
             templine->setPen(gridPen);
             templine->setPoints(i,0,i,h);
             templine->setZ(0);
@@ -282,7 +282,7 @@ void KDTimeTableWidget::computeVerticalGrid()
                             itcol.current()->show();
                             ++itcol;
                         } else {
-                            temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem);
+                            temprect = new KDCanvasRectangle(this,nullptr,Type_is_KDGanttGridItem);
                             temprect->setPen( TQPen(TQPen::NoPen) );
                             temprect->setBrush( TQBrush( colcol, TQt::SolidPattern) );
                             temprect->setSize(cw ,h );
@@ -338,7 +338,7 @@ void KDTimeTableWidget::computeVerticalGrid()
                                         itcol.current()->show();
                                         ++itcol;
                                     } else {
-                                        temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem);
+                                        temprect = new KDCanvasRectangle(this,nullptr,Type_is_KDGanttGridItem);
                                         temprect->setPen( TQPen(TQPen::NoPen) );
                                         temprect->setBrush( TQBrush( colcol, TQt::SolidPattern) );
                                         temprect->setSize(mid,h );
@@ -366,7 +366,7 @@ void KDTimeTableWidget::computeVerticalGrid()
             // create additional Lines for vertical grid
             for ( ;intIt != intItEnd  ;++intIt) {
 
-                templine = new KDCanvasLine(this,0,Type_is_KDGanttGridItem);
+                templine = new KDCanvasLine(this,nullptr,Type_is_KDGanttGridItem);
                 templine->setPen(gridPen);
                 templine->setPoints((*intIt),0,(*intIt),h);
                 templine->setZ(0);
@@ -392,7 +392,7 @@ void KDTimeTableWidget::computeVerticalGrid()
                                     itcol.current()->show();
                                     ++itcol;
                                 } else {
-                                    temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem);
+                                    temprect = new KDCanvasRectangle(this,nullptr,Type_is_KDGanttGridItem);
                                     temprect->setPen( TQPen(TQPen::NoPen) );
                                     temprect->setBrush( TQBrush( colcol, TQt::SolidPattern) );
                                     temprect->setSize(mid ,h );
@@ -447,7 +447,7 @@ void KDTimeTableWidget::computeHorizontalGrid()
         templine = ithor.current();
         ++ithor;
     } else {
-        templine = new KDCanvasLine(this,0,Type_is_KDGanttGridItem);
+        templine = new KDCanvasLine(this,nullptr,Type_is_KDGanttGridItem);
         templine->setPen(gridPen);
         templine->setZ(0);
         horGridList.append(templine);
@@ -462,7 +462,7 @@ void KDTimeTableWidget::computeHorizontalGrid()
             ++ithor;
         } else {
             //new vertical grid line
-            templine = new KDCanvasLine(this,0,Type_is_KDGanttGridItem);
+            templine = new KDCanvasLine(this,nullptr,Type_is_KDGanttGridItem);
             templine->setPen(gridPen);
             templine->setZ(0);
             horGridList.append(templine);
@@ -505,7 +505,7 @@ void KDTimeTableWidget::computeDenseLines()
                     denseLine = ithordense.current();
                     ++ithordense;
                 } else {
-                    denseLine =new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem);
+                    denseLine =new KDCanvasRectangle(this,nullptr,Type_is_KDGanttGridItem);
                     denseLine->setZ(-2);
                     horDenseList.append( denseLine );
                 }
@@ -549,7 +549,7 @@ void KDTimeTableWidget::computeShowNoInformation()
                 noInfoLine = itnoinfo.current();
                 ++itnoinfo;
             } else {
-                noInfoLine =new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem);
+                noInfoLine =new KDCanvasRectangle(this,nullptr,Type_is_KDGanttGridItem);
                 showNoInfoList.append( noInfoLine );
                 noInfoLine->setZ(-1);
             }
@@ -593,7 +593,7 @@ void KDTimeTableWidget::updateMyContent()
     /*
     // debug output
     KDGanttViewItem* temp =  myGanttView->firstChild();
-    while (temp != 0) {
+    while (temp) {
     temp->printinfo("  " );
     temp = temp->nextSibling();
     }
@@ -2543,33 +2543,33 @@ KDLegendWidget:: KDLegendWidget( TQWidget* parent,
                                parent)
 {
     myLegendParent = legendParent;
-    dock = 0;
+    dock = nullptr;
     scroll = new TQScrollView( legendParent );
     setMaximizedWidget( scroll );
 
     setMinimizedWidget( myLabel = new TQLabel( i18n( " Legend is hidden" ), this) );
     setGeometry( 0, 0, 50, 50 );
-    myLegend = 0;
+    myLegend = nullptr;
     clearLegend();
     showMe ( false );
 }
 void KDLegendWidget::setAsDoctwindow( bool dockwin )
 {
-    if ( (dock == 0 && !dockwin) || ( dock && dockwin  ) )
+    if ( (!dock && !dockwin) || ( dock && dockwin  ) )
         return;
     if ( dockwin )
         {
-            setMaximizedWidget( 0 );
+            setMaximizedWidget( nullptr );
             showMe ( false );
             if ( dock ) delete dock;
-            dock = new TQDockWindow(TQDockWindow:: OutsideDock,0 );
+            dock = new TQDockWindow(TQDockWindow:: OutsideDock,nullptr );
             dock->resize( 200, 100 );
             dock->setHorizontallyStretchable( true );
             dock->setVerticallyStretchable( true );
             dock->setCaption(i18n("Legend: ") );
             dock->setResizeEnabled (true );
             delete myLegend;
-            myLegend = 0;
+            myLegend = nullptr;
             delete scroll;
             scroll = new TQScrollView( dock );
             clearLegend();
@@ -2578,13 +2578,13 @@ void KDLegendWidget::setAsDoctwindow( bool dockwin )
             showMe ( false );
 
         } else {
-            setMaximizedWidget( 0 );
+            setMaximizedWidget( nullptr );
             showMe ( false );
             delete myLegend;
-            myLegend = 0;
+            myLegend = nullptr;
             delete scroll;
             delete dock;
-            dock = 0;
+            dock = nullptr;
             scroll = new TQScrollView( myLegendParent );
             clearLegend();
             setMaximizedWidget( scroll );
@@ -2630,7 +2630,7 @@ TQSize KDLegendWidget::legendSize()
 
 TQSize KDLegendWidget::legendSizeHint()
 {
-    TQApplication::sendPostedEvents( 0, TQEvent::LayoutHint );
+    TQApplication::sendPostedEvents( nullptr, TQEvent::LayoutHint );
     return TQSize( myLegend->sizeHint().width(), myLegend->sizeHint().height()+scroll->horizontalScrollBar()->height());
 }
 
@@ -2848,7 +2848,7 @@ void KDListView::drawAllContents(TQPainter * p, int cx, int cy, int cw, int ch)
     int tx = -1;
     KDListView::DrawableItem * current;
 
-    while ( (current = it.current()) != 0 ) {
+    while ((current = it.current()) != nullptr) {
         ++it;
         int ih = current->i->height();
         int ith = current->i->totalHeight();
@@ -2977,7 +2977,7 @@ void KDListView::dragMoveEvent ( TQDragMoveEvent * e)
         e->accept( false );
         return;
     }
-    KDGanttViewItem* draggedItem = 0;
+    KDGanttViewItem* draggedItem = nullptr;
     KDGanttViewItem* gItem = (KDGanttViewItem*)itemAt( e->pos()) ;
     setCurrentItem( gItem );
     if (  e->source() == myGanttView )
@@ -3018,16 +3018,16 @@ void KDListView::dropEvent ( TQDropEvent *e )
         return;
     }
     KDGanttViewItem* gItem = (KDGanttViewItem*)itemAt( e->pos()) ;
-    KDGanttViewItem* draggedItem = 0;
+    KDGanttViewItem* draggedItem = nullptr;
     if (  e->source() == myGanttView )
         draggedItem = myGanttView->myCanvasView->lastClickedItem;
     if (myGanttView->lvDropEvent ( e, draggedItem, gItem ))
         return;
     TQString string;
     KDGanttViewItemDrag::decode( e, string );
-    KDGanttViewItem* newItem = 0;
+    KDGanttViewItem* newItem = nullptr;
 
-    if ( gItem == myGanttView->myCanvasView->lastClickedItem && gItem != 0 ) {
+    if ( gItem == myGanttView->myCanvasView->lastClickedItem && gItem ) {
         tqDebug("KDGanttView::Possible bug in drag&drop code ");
         return;
     }
@@ -3154,17 +3154,17 @@ KDCanvasRectangle::KDCanvasRectangle( KDTimeTableWidget* canvas,
 
 KDGanttCanvasView::KDGanttCanvasView( KDGanttView* sender,TQCanvas* canvas, TQWidget* parent,  const
     char* name ) : TQCanvasView ( canvas, parent, name ),
-    movingGVItem( 0 ),
-    scrollBarTimer( 0, "scrollBarTimer" )
+    movingGVItem( nullptr ),
+    scrollBarTimer( nullptr, "scrollBarTimer" )
 {
     setHScrollBarMode (TQScrollView::AlwaysOn );
     setVScrollBarMode( TQScrollView::AlwaysOn );
     myToolTip = new KDCanvasToolTip(viewport(),this);
     mySignalSender =  sender;
-    currentItem = 0;
-    currentLink = 0;
-    cuttedItem = 0;
-    fromItem = 0;
+    currentItem = nullptr;
+    currentLink = nullptr;
+    cuttedItem = nullptr;
+    fromItem = nullptr;
     fromArea = 0;
     linkItemsEnabled = false;
     mouseDown = false;
@@ -3309,13 +3309,13 @@ void  KDGanttCanvasView::insertItemAsRoot( KDGanttViewItem* item )
 {
     mySignalSender->myListView->insertItem( item  );
     if ( item == cuttedItem )
-        cuttedItem = 0;
+        cuttedItem = nullptr;
 }
 void  KDGanttCanvasView::insertItemAsChild( KDGanttViewItem* parent, KDGanttViewItem* item )
 {
     parent->insertItem( cuttedItem );
     if ( item == cuttedItem )
-        cuttedItem = 0;
+        cuttedItem = nullptr;
 }
 void  KDGanttCanvasView::insertItemAfter( KDGanttViewItem* parent , KDGanttViewItem* item )
 {
@@ -3326,7 +3326,7 @@ void  KDGanttCanvasView::insertItemAfter( KDGanttViewItem* parent , KDGanttViewI
         mySignalSender->myListView->insertItem( item );
     item->moveItem( parent );
     if ( item == cuttedItem )
-        cuttedItem = 0;
+        cuttedItem = nullptr;
 }
 
 void  KDGanttCanvasView::cutItem()
@@ -3348,13 +3348,13 @@ void  KDGanttCanvasView::cutItem()
 
 void  KDGanttCanvasView::resetCutPaste( KDGanttViewItem* item )
 {
-    if ( item == 0 && cuttedItem ) {
+    if ( !item && cuttedItem ) {
         delete cuttedItem;
-        cuttedItem = 0;
+        cuttedItem = nullptr;
     }
     if (item == cuttedItem) {
         onItem->setItemEnabled( 3, false );
-        cuttedItem = 0;
+        cuttedItem = nullptr;
     }
 }
 
@@ -3380,13 +3380,13 @@ void  KDGanttCanvasView::pasteItem( int type )
     default:
         ;
     }
-    cuttedItem = 0;
+    cuttedItem = nullptr;
     onItem->setItemEnabled( 3, false );
     mySignalSender->myTimeTable->updateMyContent();
 }
 void  KDGanttCanvasView::newRootItem(int type)
 {
-    KDGanttViewItem* temp = 0;
+    KDGanttViewItem* temp = nullptr;
     switch( type ) {
     case 1:
         temp = new KDGanttViewEventItem( mySignalSender, i18n( "New Event" ) );
@@ -3406,7 +3406,7 @@ void  KDGanttCanvasView::newRootItem(int type)
 
 void  KDGanttCanvasView::newChildItem( int type )
 {
-    KDGanttViewItem* temp = 0;
+    KDGanttViewItem* temp = nullptr;
     switch( type ) {
     case 1:
         temp = new KDGanttViewEventItem( lastClickedItem, i18n( "New Event" ) );
@@ -3512,9 +3512,9 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
     //tqDebug("mousepress! %d ", this);
     //tqDebug("focus %d ",tqApp->focusWidget());
     setFocus();
-    currentLink = 0;
-    currentItem = 0;
-    movingItem = 0;
+    currentLink = nullptr;
+    currentItem = nullptr;
+    movingItem = nullptr;
     mouseDown = true;
     if (e->button() == TQt::RightButton && mySignalSender->editable()) {
         lastClickedItem = (KDGanttViewItem*) mySignalSender->myListView->itemAt( TQPoint(2,e->pos().y()));
@@ -3542,7 +3542,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
             case Type_is_KDGanttViewItem:
                 currentItem = getItem(*it);
                 if (! currentItem->enabled() ) {
-                    currentItem = 0;
+                    currentItem = nullptr;
                 } else if (linkItemsEnabled &&
                            !currentItem->isMyTextCanvas(*it)) {
                     fromArea = getItemArea(currentItem, e->pos().x());
@@ -3561,11 +3561,11 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
                       movingStartDate = movingGVItem->startTime();
                       movingOperation = gvItemHitTest( movingGVItem, mySignalSender->myTimeHeader, e->pos() );
                       if ( movingOperation == Moving && !movingGVItem->isMoveable() )
-                        movingGVItem = 0;
+                        movingGVItem = nullptr;
                       else if ( movingOperation != Moving && !movingGVItem->isResizeable() )
                         movingOperation = Moving;
                     } else {
-                      movingGVItem = 0;
+                      movingGVItem = nullptr;
                     }
                   }
                 }
@@ -3595,7 +3595,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
             case Type_is_KDGanttViewItem:
                 currentItem = getItem(*it);
                 if (! currentItem->enabled() )
-                    currentItem = 0;
+                    currentItem = nullptr;
                 break;
             case Type_is_KDGanttTaskLink:
                 currentLink = getLink(*it);
@@ -3607,7 +3607,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
             case Type_is_KDGanttViewItem:
                 currentItem = getItem(*it);
                 if (! currentItem->enabled() )
-                    currentItem = 0;
+                    currentItem = nullptr;
                 break;
             case Type_is_KDGanttTaskLink:
                 currentLink = getLink(*it);
@@ -3635,7 +3635,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e )
 void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e )
 {
     mouseDown = false;
-    static KDGanttViewItem* lastClicked = 0;
+    static KDGanttViewItem* lastClicked = nullptr;
     mySignalSender->gvMouseButtonClicked( e->button(), currentItem ,  e->globalPos() );
     //tqDebug("datetime %s ",mySignalSender->getDateTimeForCoordX(e->globalPos().x(), true ).toString().latin1() );
     //tqDebug("mousepos %d %d ",e->pos().x(),e->pos().y() );
@@ -3669,10 +3669,10 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e )
                     }
                 }
             }
-            fromItem = 0;
+            fromItem = nullptr;
             if ( movingGVItem ) {
               mySignalSender->gvItemMoved( movingGVItem );
-              movingGVItem = 0;
+              movingGVItem = nullptr;
             }
             break;
         case TQt::RightButton:
@@ -3699,8 +3699,8 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e )
     if ( lastClicked != currentItem )
         mySignalSender->gvCurrentChanged( currentItem );
     lastClicked = currentItem;
-    currentLink = 0;
-    currentItem = 0;
+    currentLink = nullptr;
+    currentItem = nullptr;
 }
 /**
    Handles the mouseevent if a mousekey is doubleclicked
@@ -3867,8 +3867,8 @@ void KDGanttCanvasView::contentsMouseMoveEvent ( TQMouseEvent *e )
         ++moves;
     } else {
         moves = 0;
-        currentLink = 0;
-        currentItem = 0;
+        currentLink = nullptr;
+        currentItem = nullptr;
     }
     if (autoScrollEnabled)
         mousePos = e->pos()- TQPoint(contentsX(),contentsY()); // make mousePos relative 0
@@ -3910,7 +3910,7 @@ KDGanttViewItem*  KDGanttCanvasView::getItem(TQCanvasItem* it)
     case TQCanvasItem::Rtti_Rectangle: return (KDGanttViewItem*) ((KDCanvasRectangle *)it)->myParentItem;
 
     }
-    return 0;
+    return nullptr;
 }
 KDGanttViewTaskLink*  KDGanttCanvasView::getLink(TQCanvasItem* it)
 {
@@ -3920,7 +3920,7 @@ KDGanttViewTaskLink*  KDGanttCanvasView::getLink(TQCanvasItem* it)
     case TQCanvasItem::Rtti_Text: return (KDGanttViewTaskLink*) ((KDCanvasText *)it)->myParentItem;
     case TQCanvasItem::Rtti_Polygon: return (KDGanttViewTaskLink*) ((KDCanvasPolygon *)it)->myParentItem;
     }
-    return 0;
+    return nullptr;
 }
 
 void KDGanttCanvasView::slotScrollTimer() {
@@ -3987,7 +3987,7 @@ int KDGanttCanvasView::getLinkType(int from, int to) {
   \param view parent view
  */
 KDIntervalColorRectangle::KDIntervalColorRectangle( KDGanttView* view )
-  : KDCanvasRectangle( view->timeTableWidget(), 0, Type_is_KDGanttGridItem ),
+  : KDCanvasRectangle( view->timeTableWidget(), nullptr, Type_is_KDGanttGridItem ),
   mStart(), mEnd()
 {
   setZ( -19 );
diff --git a/kdgantt/KDGanttViewSubwidgets.h b/kdgantt/KDGanttViewSubwidgets.h
index ae7009160..5c3469667 100644
--- a/kdgantt/KDGanttViewSubwidgets.h
+++ b/kdgantt/KDGanttViewSubwidgets.h
@@ -175,7 +175,7 @@ public:
       return ccList;
     }
    TQColor weekdayColor[8];
-   void repaintMe(int left, int wid, TQPainter *p = 0);
+   void repaintMe(int left, int wid, TQPainter *p = nullptr);
 
    void centerDateTime( const TQDateTime& center );
 
@@ -490,7 +490,7 @@ class KDGanttCanvasView : public TQCanvasView
   
 
 public:
-    KDGanttCanvasView(KDGanttView* sender, TQCanvas* canvas = 0, TQWidget* parent = 0, const char* name = 0 );
+    KDGanttCanvasView(KDGanttView* sender, TQCanvas* canvas = nullptr, TQWidget* parent = nullptr, const char* name = nullptr );
     ~KDGanttCanvasView();
     TQString getToolTipText(TQPoint p);
     TQString getWhatsThisText(TQPoint p);
diff --git a/kdgantt/KDGanttViewSummaryItem.cpp b/kdgantt/KDGanttViewSummaryItem.cpp
index 184bf3c07..e76603d02 100644
--- a/kdgantt/KDGanttViewSummaryItem.cpp
+++ b/kdgantt/KDGanttViewSummaryItem.cpp
@@ -367,8 +367,8 @@ void KDGanttViewSummaryItem::showItem( bool show, int coordY )
 void KDGanttViewSummaryItem::initItem()
 {
   isVisibleInGanttView = false;
-  myActualEndTime = 0;
-  myMiddleTime = 0;
+  myActualEndTime = nullptr;
+  myMiddleTime = nullptr;
   showItem(true);
   myGanttView->myTimeTable->updateMyContent();
   setDragEnabled( myGanttView->dragEnabled() );
diff --git a/kdgantt/KDGanttViewTaskItem.cpp b/kdgantt/KDGanttViewTaskItem.cpp
index 653925c09..463057576 100644
--- a/kdgantt/KDGanttViewTaskItem.cpp
+++ b/kdgantt/KDGanttViewTaskItem.cpp
@@ -243,7 +243,7 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY)
   int hei = height();
   if ( ! isVisible() ) {
     KDGanttViewItem * par = parent();
-    while ( par != 0 && !par->isVisible() )
+    while ( par && !par->isVisible() )
       par = par->parent();
     if ( par )
       hei = par->height();
diff --git a/kdgantt/KDGanttViewTaskLink.cpp b/kdgantt/KDGanttViewTaskLink.cpp
index 9b044fc4b..ce622d2d3 100644
--- a/kdgantt/KDGanttViewTaskLink.cpp
+++ b/kdgantt/KDGanttViewTaskLink.cpp
@@ -68,7 +68,7 @@ KDGanttViewTaskLink::KDGanttViewTaskLink( TQPtrList<KDGanttViewItem> from,
 {
   fromList= from;
   toList = to;
-  myGroup = 0;
+  myGroup = nullptr;
   setLinkType(type);
   initTaskLink();
 }
@@ -91,7 +91,7 @@ KDGanttViewTaskLink::KDGanttViewTaskLink( KDGanttViewItem*  from,
 {
   fromList.append(from);
   toList.append(to);
-  myGroup = 0;
+  myGroup = nullptr;
   setLinkType(type);
   initTaskLink();
 
@@ -115,7 +115,7 @@ KDGanttViewTaskLink::KDGanttViewTaskLink( KDGanttViewTaskLinkGroup* group,
 {
   fromList = from;
   toList = to;
-  myGroup = 0;
+  myGroup = nullptr;
   setLinkType(type);
   initTaskLink();
   setGroup(group);
@@ -142,7 +142,7 @@ KDGanttViewTaskLink::KDGanttViewTaskLink( KDGanttViewTaskLinkGroup* group,
 {
   fromList.append(from);
   toList.append(to);
-  myGroup = 0;
+  myGroup = nullptr;
   setLinkType(type);
   initTaskLink();
   setGroup(group);
@@ -151,7 +151,7 @@ KDGanttViewTaskLink::KDGanttViewTaskLink( KDGanttViewTaskLinkGroup* group,
 
 KDGanttViewTaskLink::~KDGanttViewTaskLink( )
 {
-  setGroup(0);
+  setGroup(nullptr);
   myTimeTable->myTaskLinkList.remove(this);
   delete horLineList;
   delete verLineList;
@@ -547,10 +547,10 @@ void KDGanttViewTaskLink::setGroup(KDGanttViewTaskLinkGroup* group)
   myTimeTable->myGanttView->addTaskLinkGroup(group);
     if(myGroup == group)
       return;
-    if (myGroup != 0)
+    if (myGroup)
       myGroup->removeItem(this);
     myGroup = group;
-    if (myGroup != 0)
+    if (myGroup)
       myGroup->insertItem(this);
 }
 
@@ -883,11 +883,11 @@ KDGanttViewTaskLink* KDGanttViewTaskLink::createFromDomElement( TQDomElement& el
     // safeguard aginst incorrect names
     if (fromItemList.isEmpty()) {
         tqDebug("Cannot create link: fromItemList is empty");
-        return 0;
+        return nullptr;
     }
     if (toItemList.isEmpty()) {
         tqDebug("Cannot create link: toItemList is empty");
-        return 0;
+        return nullptr;
     }
     KDGanttViewTaskLink* tl = new KDGanttViewTaskLink( fromItemList,
                                                        toItemList );
diff --git a/kdgantt/KDGanttViewTaskLinkGroup.cpp b/kdgantt/KDGanttViewTaskLinkGroup.cpp
index 6c8d542ed..ce2f9601c 100644
--- a/kdgantt/KDGanttViewTaskLinkGroup.cpp
+++ b/kdgantt/KDGanttViewTaskLinkGroup.cpp
@@ -106,7 +106,7 @@ bool KDGanttViewTaskLinkGroup::remove (KDGanttViewTaskLink* link)
 {
     KDGanttViewTaskLinkGroup* g = link->group();
     if ((g == this))
-        link->setGroup(0);
+        link->setGroup(nullptr);
     return (g == this);
 }
 
@@ -271,7 +271,7 @@ void KDGanttViewTaskLinkGroup::removeItem (KDGanttViewTaskLink* link)
 KDGanttViewTaskLinkGroup* KDGanttViewTaskLinkGroup::find( const TQString& name )
 {
     if (name.isEmpty()) // avoid error msg from TQDict
-        return 0;
+        return nullptr;
     return sGroupDict.find( name );
 }
 
diff --git a/kgantt/kgantt/KGantt.cpp b/kgantt/kgantt/KGantt.cpp
index 59df77645..2a871180b 100644
--- a/kgantt/kgantt/KGantt.cpp
+++ b/kgantt/kgantt/KGantt.cpp
@@ -22,8 +22,8 @@ KGantt::KGantt(KGanttItem* toplevelitem,
   printf("KGantt::KGantt()\n");
 #endif
 
-  if(toplevelitem == 0) {
-    _toplevelitem = new KGanttItem(0, "toplevelitem",
+  if(!toplevelitem) {
+    _toplevelitem = new KGanttItem(nullptr, "toplevelitem",
 			   TQDateTime::currentDateTime(),
 			   TQDateTime::currentDateTime() );
     _toplevelitem->setMode(KGanttItem::Rubberband);
diff --git a/kgantt/kgantt/KGantt.h b/kgantt/kgantt/KGantt.h
index 32c5a66a2..8d79152fa 100644
--- a/kgantt/kgantt/KGantt.h
+++ b/kgantt/kgantt/KGantt.h
@@ -102,8 +102,8 @@ public:
   /*!
    *
    */
-  KGantt(KGanttItem* toplevelitem = 0,
-	 TQWidget* parent = 0, const char * name=0, WFlags f=0 );
+  KGantt(KGanttItem* toplevelitem = nullptr,
+	 TQWidget* parent = nullptr, const char * name=nullptr, WFlags f=0 );
 
 
   ///  Destructor.
@@ -195,7 +195,7 @@ public:
    *   you want to access the pointer to a already created toolbar you
    *   can invoke this method without any parameter.
    */
-  TDEToolBar* toolbar(TQMainWindow* mw = 0) {
+  TDEToolBar* toolbar(TQMainWindow* mw = nullptr) {
     return _ganttbar->viewport()->toolbar(mw);
   }
 
diff --git a/kgantt/kgantt/KGanttBarConfig.h b/kgantt/kgantt/KGanttBarConfig.h
index 0aac50821..52b939c7a 100644
--- a/kgantt/kgantt/KGanttBarConfig.h
+++ b/kgantt/kgantt/KGanttBarConfig.h
@@ -43,7 +43,7 @@ class KGanttBarConfig : public TQWidget
 public:
 
   KGanttBarConfig(xQGanttBarView* barview,
-		  TQWidget* parent = 0, const char* name=0, WFlags f=0);
+		  TQWidget* parent = nullptr, const char* name=nullptr, WFlags f=0);
    
 
 protected slots:
diff --git a/kgantt/kgantt/KGanttItem.cpp b/kgantt/kgantt/KGanttItem.cpp
index 3df2d1f61..6c48cd651 100644
--- a/kgantt/kgantt/KGanttItem.cpp
+++ b/kgantt/kgantt/KGanttItem.cpp
@@ -363,7 +363,7 @@ KGanttItem::adjustMinMax()
     
     item = _subitems.next();
     
-    for(; item != 0; item = _subitems.next() ) {
+    for(; item ; item = _subitems.next() ) {
       
       if(_minDateTime > item->getStart()) {
 	_minDateTime = item->getStart();
@@ -487,7 +487,7 @@ KGanttItem::setStyle(int flag, bool includeSubItems)
  
     if(includeSubItems)
       for(KGanttItem* item = _subitems.first(); 
-	  item != 0; 
+	  item;
 	  item = _subitems.next() )
 	item->setStyle(flag,true);
 
@@ -537,7 +537,7 @@ KGanttItem::getTotalHeight()
   int h = _height;
 
   if( isOpen() ) {
-    for(KGanttItem* item = _subitems.first(); item != 0; item = _subitems.next() ) {
+    for(KGanttItem* item = _subitems.first(); item ; item = _subitems.next() ) {
       h += item->getTotalHeight();
     }
   }
@@ -582,11 +582,11 @@ KGanttItem::dump(TQTextOStream& cout, const TQString& pre)
   cout << pre << "|  min date/time : " << _minDateTime.toString() << endl;
   cout << pre << "|  max date/time : " << _maxDateTime.toString() << endl;
   
-  for(KGanttItem* item = _subitems.first(); item != 0; item = _subitems.next() )
+  for(KGanttItem* item = _subitems.first(); item ; item = _subitems.next() )
     item->dump(cout, pre + "|   ");
   
   for(KGanttRelation* rel = _relations.first(); 
-      rel != 0; 
+      rel;
       rel = _relations.next() )
     rel->dump(cout, pre + "|   ");
 
diff --git a/kgantt/kgantt/xQGanttBarView.h b/kgantt/kgantt/xQGanttBarView.h
index c1f4b1ba0..d5e42428b 100644
--- a/kgantt/kgantt/xQGanttBarView.h
+++ b/kgantt/kgantt/xQGanttBarView.h
@@ -62,8 +62,8 @@ public:
   /*!
    *
    */
-  xQGanttBarView(KGanttItem* toplevelitem, TQWidget* parent = 0,  
-		 const char * name=0, WFlags f=0 );
+  xQGanttBarView(KGanttItem* toplevelitem, TQWidget* parent = nullptr,
+		 const char * name=nullptr, WFlags f=0 );
 
 
   ///  Destructor.
diff --git a/kgantt/kgantt/xQGanttBarViewPort.cpp b/kgantt/kgantt/xQGanttBarViewPort.cpp
index eff6e4d5e..efee0cc4d 100644
--- a/kgantt/kgantt/xQGanttBarViewPort.cpp
+++ b/kgantt/kgantt/xQGanttBarViewPort.cpp
@@ -105,7 +105,7 @@ xQGanttBarViewPort::~xQGanttBarViewPort()
 TDEToolBar*
 xQGanttBarViewPort::toolbar(TQMainWindow* mw)
 {
-  if(_toolbar || mw == 0) return _toolbar;
+  if(_toolbar || !mw) return _toolbar;
 
   _toolbar = new TDEToolBar(mw,TQMainWindow::TQt::DockTop);
 
@@ -336,7 +336,7 @@ xQGanttBarViewPort::drawGrid(TQPainter* p, int x1, int y1, int x2, int y2)
   TQDate* ptrDate;
   TQDate cmp(start.addDays(-1));
 
-  for(ptrDate = _holidays.first(); ptrDate != 0; ptrDate = _holidays.next() ) {
+  for(ptrDate = _holidays.first(); ptrDate ; ptrDate = _holidays.next() ) {
     if(*ptrDate > cmp) {
       tmp = _toplevelitem->getStart().secsTo(TQDateTime(*ptrDate))/60;
       a = screenX( tmp );
@@ -439,7 +439,7 @@ xQGanttBarViewPort::recalc(KGanttItem* item, int xPos, int yPos,
     int h = tmpHeight;
 
     for(KGanttItem* subitem = item->getSubItems().first(); 
-	subitem != 0; 
+	subitem;
 	subitem = item->getSubItems().next() ) {
       
       recalc(subitem, 
@@ -510,7 +510,7 @@ xQGanttBarViewPort::drawItem(KGanttItem* item, TQPainter* p,
 
       //  draw relations
       for(KGanttRelation* rel = item->getRelations().first(); 
-	  rel != 0; 
+	  rel;
 	  rel = item->getRelations().next() ) {
 
 	drawRelation(p, rel);
@@ -519,7 +519,7 @@ xQGanttBarViewPort::drawItem(KGanttItem* item, TQPainter* p,
 
       //  draw subitems
       for(KGanttItem* subitem = item->getSubItems().first(); 
-	  subitem != 0; 
+	  subitem;
 	  subitem = item->getSubItems().next() ) {
 	
 	drawItem(subitem, p, rect );
@@ -891,7 +891,7 @@ xQGanttBarViewPort::addHoliday(int y, int m, int d)
   int i=0;
   
   for(ptrDate = _holidays.first(); 
-      ptrDate != 0; 
+      ptrDate;
       ptrDate = _holidays.next() ) {
     
     if(*ptrDate > *date)	
@@ -990,7 +990,7 @@ xQGanttBarViewPort::selectItem(KGanttItem* item, bool f)
   item->select(f);
 
   for(KGanttItem* subitem = item->getSubItems().first(); 
-      subitem != 0; 
+      subitem;
       subitem = item->getSubItems().next() ) {
     selectItem(subitem, f);
   }
@@ -1012,7 +1012,7 @@ xQGanttBarViewPort::deleteSelectedItems()
   getSelectedItems(_toplevelitem,list);
 
   for(KGanttItem* subitem = list.first(); 
-      subitem != 0; 
+      subitem;
       subitem =list.next() ) {
 #ifdef _DEBUG_
     printf(" : %s \n", subitem->getText().latin1() );
@@ -1058,7 +1058,7 @@ xQGanttBarViewPort::getSelectedItems (KGanttItem* item,
   if(item->isSelected()) list.append(item);
 
   for(KGanttItem* subitem = item->getSubItems().first(); 
-      subitem != 0; 
+      subitem;
       subitem = item->getSubItems().next() ) {
     
     getSelectedItems(subitem,list);
@@ -1076,7 +1076,7 @@ xQGanttBarViewPort::insertIntoSelectedItem()
   getSelectedItems(_toplevelitem,list);
 
   for(KGanttItem* subitem = list.first(); 
-      subitem != 0; 
+      subitem;
       subitem =list.next() ) {
 #ifdef _DEBUG_
     printf(" : %s \n", subitem->getText().latin1() );
diff --git a/kgantt/kgantt/xQGanttBarViewPort.h b/kgantt/kgantt/xQGanttBarViewPort.h
index 06676d731..54a1c43d5 100644
--- a/kgantt/kgantt/xQGanttBarViewPort.h
+++ b/kgantt/kgantt/xQGanttBarViewPort.h
@@ -104,8 +104,8 @@ public:
   /*!
    *
    */
-  xQGanttBarViewPort(KGanttItem* toplevelitem, xQGanttBarView* parent = 0,
-		     const char * name=0, WFlags f=0 );
+  xQGanttBarViewPort(KGanttItem* toplevelitem, xQGanttBarView* parent = nullptr,
+		     const char * name=nullptr, WFlags f=0 );
 
 
   ///  Destructor.
@@ -155,7 +155,7 @@ public:
   /*!
    *
    */
-  TDEToolBar* toolbar(TQMainWindow* mw = 0);
+  TDEToolBar* toolbar(TQMainWindow* mw = nullptr);
 
 
   //  zoom by factor sfactor and move wx,wy to the center
diff --git a/kgantt/kgantt/xQGanttListView.h b/kgantt/kgantt/xQGanttListView.h
index ec4f880a8..81d532a06 100644
--- a/kgantt/kgantt/xQGanttListView.h
+++ b/kgantt/kgantt/xQGanttListView.h
@@ -59,8 +59,8 @@ public:
   /*!
    *
    */
-  xQGanttListView(KGanttItem* toplevelitem, TQWidget* parent = 0,  
-		  const char * name=0, WFlags f=0 );
+  xQGanttListView(KGanttItem* toplevelitem, TQWidget* parent = nullptr,
+		  const char * name=nullptr, WFlags f=0 );
 
 
   ///  Destructor.
diff --git a/kgantt/kgantt/xQGanttListViewPort.cpp b/kgantt/kgantt/xQGanttListViewPort.cpp
index d74f2f42e..a5fbec541 100644
--- a/kgantt/kgantt/xQGanttListViewPort.cpp
+++ b/kgantt/kgantt/xQGanttListViewPort.cpp
@@ -142,7 +142,7 @@ xQGanttListViewPort::drawItem(KGanttItem* item, TQPainter* p, const TQRect& rect
   if(item->isOpen() && item->getSubItems().count()>0) {
     
     for(KGanttItem* subitem = item->getSubItems().first(); 
-	subitem != 0; 
+	subitem;
 	subitem = item->getSubItems().next() ) {
       
       drawItem(subitem, p, rect, offsetX + 20);
diff --git a/kgantt/kgantt/xQGanttListViewPort.h b/kgantt/kgantt/xQGanttListViewPort.h
index 1f937521e..a0a9e858c 100644
--- a/kgantt/kgantt/xQGanttListViewPort.h
+++ b/kgantt/kgantt/xQGanttListViewPort.h
@@ -61,8 +61,8 @@ public:
   /*!
    *
    */
-  xQGanttListViewPort(KGanttItem* toplevelitem, TQWidget* parent = 0,
-		     const char * name=0, WFlags f=0 );
+  xQGanttListViewPort(KGanttItem* toplevelitem, TQWidget* parent = nullptr,
+		     const char * name=nullptr, WFlags f=0 );
 
 
 
diff --git a/korganizer/aboutdata.cpp b/korganizer/aboutdata.cpp
index e9625fbad..ed5600aaf 100644
--- a/korganizer/aboutdata.cpp
+++ b/korganizer/aboutdata.cpp
@@ -35,7 +35,7 @@ AboutData::AboutData()
                 "(c) 1997-1999 Preston Brown\n"
                 "(c) 2000-2004 Cornelius Schumacher\n"
                 "(c) 2004-2005 Reinhold Kainhofer\n"
-                "(c) 2009-2010 Timothy Pearson", 0,
+                "(c) 2009-2010 Timothy Pearson", nullptr,
                 "http://www.trinitydesktop.org" )
 {
   addAuthor("Timothy Pearson",I18N_NOOP("Current Developer/Maintainer"),
diff --git a/korganizer/actionmanager.cpp b/korganizer/actionmanager.cpp
index b9c9916d7..b1ceb598d 100644
--- a/korganizer/actionmanager.cpp
+++ b/korganizer/actionmanager.cpp
@@ -77,21 +77,21 @@
 #include <tqlabel.h>
 
 // FIXME: Several places in the file don't use TDEConfigXT yet!
-KOWindowList *ActionManager::mWindowList = 0;
+KOWindowList *ActionManager::mWindowList = nullptr;
 
 ActionManager::ActionManager( KXMLGUIClient *client, CalendarView *widget,
                               TQObject *parent, KOrg::MainWindow *mainWindow,
                               bool isPart )
-  : TQObject( parent ), KCalendarIface(), mRecent( 0 ),
-    mResourceButtonsAction( 0 ), mResourceViewShowAction( 0 ), mCalendar( 0 ),
-    mCalendarResources( 0 ), mResourceView( 0 ), mIsClosing( false )
+  : TQObject( parent ), KCalendarIface(), mRecent( nullptr ),
+    mResourceButtonsAction( nullptr ), mResourceViewShowAction( nullptr ), mCalendar( nullptr ),
+    mCalendarResources( nullptr ), mResourceView( nullptr ), mIsClosing( false )
 {
   mGUIClient = client;
   mACollection = mGUIClient->actionCollection();
   mCalendarView = widget;
   mIsPart = isPart;
-  mTempFile = 0;
-  mNewStuff = 0;
+  mTempFile = nullptr;
+  mNewStuff = nullptr;
   mHtmlExportSync = false;
   mMainWindow = mainWindow;
 }
@@ -159,7 +159,7 @@ void ActionManager::init()
   connect( mCalendarView, TQ_SIGNAL( exportHTML( HTMLExportSettings * ) ),
            this, TQ_SLOT( exportHTML( HTMLExportSettings * ) ) );
 
-  processIncidenceSelection( 0, TQDate() );
+  processIncidenceSelection( nullptr, TQDate() );
 
   // Update state of paste action
   mCalendarView->checkClipboard();
@@ -647,7 +647,7 @@ void ActionManager::initActions()
   //************************* TOOLBAR ACTIONS *******************************
   TQLabel *filterLabel = new TQLabel( i18n("Filter: "), mCalendarView );
   filterLabel->hide();
-  new KWidgetAction( filterLabel, i18n("Filter: "), 0, 0, 0,
+  new KWidgetAction( filterLabel, i18n("Filter: "), 0, nullptr, nullptr,
                      mACollection, "filter_label" );
 
 }
@@ -721,7 +721,7 @@ void ActionManager::file_open( const KURL &url )
 
   // is that URL already opened somewhere else? Activate that window
   KOrg::MainWindow *korg=ActionManager::findInstance( url );
-  if ( ( 0 != korg )&&( korg != mMainWindow ) ) {
+  if ( korg && korg != mMainWindow ) {
     KWin::activateWindow( korg->topLevelWidget()->winId() );
     return;
   }
@@ -919,7 +919,7 @@ bool ActionManager::addResource( const KURL &mUrl )
 
   CalendarResourceManager *manager = cr->resourceManager();
 
-  ResourceCalendar *resource = 0;
+  ResourceCalendar *resource = nullptr;
 
   TQString name;
 
@@ -1116,7 +1116,7 @@ bool ActionManager::saveAsURL( const KURL &url )
   TQString fileOrig = mFile;
   KURL URLOrig = mURL;
 
-  KTempFile *tempFile = 0;
+  KTempFile *tempFile = nullptr;
   if ( url.isLocalFile() ) {
     mFile = url.path();
   } else {
@@ -1318,7 +1318,7 @@ KOrg::MainWindow *ActionManager::findInstance( const KURL &url )
     if ( url.isEmpty() ) return mWindowList->defaultInstance();
     else return mWindowList->findInstance( url );
   } else {
-    return 0;
+    return nullptr;
   }
 }
 
@@ -1431,7 +1431,7 @@ TQString ActionManager::localFileName()
 class ActionManager::ActionStringsVisitor : public IncidenceBase::Visitor
 {
   public:
-    ActionStringsVisitor() : mShow( 0 ), mEdit( 0 ), mDelete( 0 ) {}
+    ActionStringsVisitor() : mShow( nullptr ), mEdit( nullptr ), mDelete( nullptr ) {}
 
     bool act( IncidenceBase *incidence, TDEAction *show, TDEAction *edit, TDEAction *del )
     {
@@ -1545,7 +1545,7 @@ KCalendarIface::ResourceRequestReply ActionManager::resourceRequest( const TQVal
 
 TQPair<ResourceCalendar *, TQString> ActionManager::viewSubResourceCalendar()
 {
-  TQPair<ResourceCalendar *, TQString> p( 0, TQString() );
+  TQPair<ResourceCalendar *, TQString> p( nullptr, TQString() );
 
   // return now if we are running as a part and we aren't the currently active part
   if ( mIsPart && !mMainWindow->isCurrentlyActivePart() ) {
@@ -1652,7 +1652,7 @@ void ActionManager::openEventEditor( const TQString& summary,
                                      const TQString& attachment,
                                      const TQStringList& attendees )
 {
-  mCalendarView->newEvent( 0,  TQString(), summary, description, attachment, attendees );
+  mCalendarView->newEvent( nullptr,  TQString(), summary, description, attachment, attendees );
 }
 
 void ActionManager::openEventEditor( const TQString & summary,
@@ -1666,7 +1666,7 @@ void ActionManager::openEventEditor( const TQString & summary,
   if ( attachmentMimetype != "message/rfc822" ) {
     action = KOPrefs::Link;
   } else if ( KOPrefs::instance()->defaultEmailAttachMethod() == KOPrefs::Ask ) {
-    TDEPopupMenu *menu = new TDEPopupMenu( 0 );
+    TDEPopupMenu *menu = new TDEPopupMenu( nullptr );
     menu->insertItem( i18n("Attach as &link"), KOPrefs::Link );
     menu->insertItem( i18n("Attach &inline"), KOPrefs::InlineFull );
     menu->insertItem( i18n("Attach inline &without attachments"), KOPrefs::InlineBody );
@@ -1697,10 +1697,10 @@ void ActionManager::openEventEditor( const TQString & summary,
       msg->setContent( TQCString( f.readAll() ) );
       TQCString head = msg->head();
       msg->parse();
-      if ( msg == msg->textContent() || msg->textContent() == 0 ) { // no attachments
+      if ( msg == msg->textContent() || !msg->textContent() ) { // no attachments
         attData = file;
       } else {
-        if ( KMessageBox::warningContinueCancel( 0,
+        if ( KMessageBox::warningContinueCancel( nullptr,
               i18n("Removing attachments from an email might invalidate its signature."),
               i18n("Remove Attachments"), KStdGuiItem::cont(), "BodyOnlyInlineAttachment" )
               != KMessageBox::Continue )
@@ -1789,7 +1789,7 @@ void ActionManager::openTodoEditor(const TQString & summary,
   if ( attachmentMimetype != "message/rfc822" ) {
     action = KOPrefs::TodoAttachLink;
   } else if ( KOPrefs::instance()->defaultTodoAttachMethod() == KOPrefs::TodoAttachAsk ) {
-    TDEPopupMenu *menu = new TDEPopupMenu( 0 );
+    TDEPopupMenu *menu = new TDEPopupMenu( nullptr );
     menu->insertItem( i18n("Attach as &link"), KOPrefs::TodoAttachLink );
     menu->insertItem( i18n("Attach &inline"), KOPrefs::TodoAttachInlineFull );
     menu->insertSeparator();
diff --git a/korganizer/agendaview.h b/korganizer/agendaview.h
index 6e48f6996..1bbbbd4f8 100644
--- a/korganizer/agendaview.h
+++ b/korganizer/agendaview.h
@@ -29,7 +29,7 @@ class AgendaView : public KOEventView
   TQ_OBJECT
   
   public:
-    AgendaView( Calendar *cal,TQWidget *parent=0,const char *name=0 );
+    AgendaView( Calendar *cal,TQWidget *parent=nullptr,const char *name=nullptr );
 
     virtual void setTypeAheadReceiver( TQObject * ) = 0;
 
diff --git a/korganizer/archivedialog.h b/korganizer/archivedialog.h
index 2b22fe4fb..36413d7a3 100644
--- a/korganizer/archivedialog.h
+++ b/korganizer/archivedialog.h
@@ -43,7 +43,7 @@ class ArchiveDialog : public KDialogBase
     TQ_OBJECT
   
   public:
-    ArchiveDialog(Calendar *calendar,TQWidget *parent=0, const char *name=0);
+    ArchiveDialog(Calendar *calendar,TQWidget *parent=nullptr, const char *name=nullptr);
     virtual ~ArchiveDialog();
 
   signals:
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 5401501a8..8ae37bf34 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -114,9 +114,9 @@ using namespace KOrg;
 
 CalendarView::CalendarView( TQWidget *parent, const char *name )
   : CalendarViewBase( parent, name ),
-    mHistory( 0 ),
+    mHistory( nullptr ),
     mCalendar( CalendarNull::self() ),
-    mChanger( 0 )
+    mChanger( nullptr )
 {
   kdDebug(5850) << "CalendarView::CalendarView( Calendar )" << endl;
 
@@ -125,7 +125,7 @@ CalendarView::CalendarView( TQWidget *parent, const char *name )
 
   mModified = false;
   mReadOnly = false;
-  mSelectedIncidence = 0;
+  mSelectedIncidence = nullptr;
 
   mFilters.setAutoDelete( true );
 
@@ -269,7 +269,7 @@ CalendarView::CalendarView( TQWidget *parent, const char *name )
   TQWhatsThis::add( mEventViewer,
                    i18n( "View the details of events, journal entries or to-dos "
                          "selected in KOrganizer's main view here." ) );
-  mEventViewer->setIncidence( 0, TQDate() );
+  mEventViewer->setIncidence( nullptr, TQDate() );
 
   mViewManager->connectTodoView( mTodoList );
   mViewManager->connectView( mTodoList );
@@ -351,7 +351,7 @@ Calendar *CalendarView::calendar()
 
 TQPair<ResourceCalendar *, TQString> CalendarView::viewSubResourceCalendar()
 {
-  TQPair<ResourceCalendar *, TQString> p( 0, TQString() );
+  TQPair<ResourceCalendar *, TQString> p( nullptr, TQString() );
   KOrg::BaseView *cV = mViewManager->currentView();
   if ( cV && cV == mViewManager->multiAgendaView() ) {
     cV = mViewManager->multiAgendaView()->selectedAgendaView();
@@ -366,7 +366,7 @@ KOIncidenceEditor *CalendarView::editorDialog( Incidence *incidence ) const
 {
   if (mDialogList.find(incidence) != mDialogList.end ())
     return mDialogList[incidence];
-  else return 0;
+  else return nullptr;
 }
 
 TQDate CalendarView::activeDate( bool fallbackToToday )
@@ -460,7 +460,7 @@ bool CalendarView::openCalendar(const TQString& filename, bool merge)
     //        resource selection dialog. However, we don't have any UI methods
     //        in the calendar, only in the CalendarResources::DestinationPolicy
     //        So we need to type-cast it and extract it from the CalendarResources
-    TQWidget *tmpparent = 0;
+    TQWidget *tmpparent = nullptr;
     if ( cl ) {
       tmpparent = cl->dialogParentWidget();
       cl->setDialogParentWidget( this );
@@ -632,7 +632,7 @@ void CalendarView::readFilterSettings( TDEConfig *config )
 
   config->setGroup( "General" );
   int pos = filterList.findIndex( currentFilter );
-  mCurrentFilter = 0;
+  mCurrentFilter = nullptr;
   if ( pos>=0 ) {
     mCurrentFilter = mFilters.at( pos );
   }
@@ -791,7 +791,7 @@ void CalendarView::incidenceChanged( Incidence *oldIncidence,
           journal->setDescription( description );
 
           //TODO: recorded to-dos should save into the standard resource always
-          if ( !mChanger->addIncidence( journal, 0, TQString(), this ) ) {
+          if ( !mChanger->addIncidence( journal, nullptr, TQString(), this ) ) {
             KODialogManager::errorSaveIncidence( this, journal );
             delete journal;
             return;
@@ -1091,7 +1091,7 @@ void CalendarView::edit_paste()
 
       // KCal supports events with relations, but korganizer doesn't
       // so unset it. It can even come from other application.
-      pastedEvent->setRelatedTo( 0 );
+      pastedEvent->setRelatedTo( nullptr );
       pastedEvent->setRelatedToUid( TQString() );
 
       mChanger->addIncidence( pastedEvent, p.first, p.second, this );
@@ -1330,7 +1330,7 @@ bool CalendarView::addIncidence( const TQString &ical )
   format.setTimeZone( mCalendar->timeZoneId(), true );
   Incidence *incidence = format.fromString( ical );
   if ( !incidence ) return false;
-  if ( !mChanger->addIncidence( incidence, 0, TQString(), this ) ) {
+  if ( !mChanger->addIncidence( incidence, nullptr, TQString(), this ) ) {
     delete incidence;
     return false;
   }
@@ -1381,11 +1381,11 @@ bool CalendarView::incidence_unsub( Incidence *inc )
     return false;
   }
 
-  if ( mChanger->beginChange( inc, 0, TQString() ) ) {
+  if ( mChanger->beginChange( inc, nullptr, TQString() ) ) {
       Incidence *oldInc = inc->clone();
-      inc->setRelatedTo( 0 );
+      inc->setRelatedTo( nullptr );
       mChanger->changeIncidence( oldInc, inc, KOGlobals::RELATION_MODIFIED, this );
-      mChanger->endChange( inc, 0, TQString() );
+      mChanger->endChange( inc, nullptr, TQString() );
       delete oldInc;
       setModified(true);
       status = true;
@@ -1445,7 +1445,7 @@ void CalendarView::toggleAlarm( Incidence *incidence )
     return;
   }
   Incidence*oldincidence = incidence->clone();
-  if ( !mChanger->beginChange( incidence, 0, TQString() ) ) {
+  if ( !mChanger->beginChange( incidence, nullptr, TQString() ) ) {
     kdDebug(5850) << "Unable to lock incidence " << endl;
     delete oldincidence;
     return;
@@ -1481,7 +1481,7 @@ void CalendarView::toggleAlarm( Incidence *incidence )
     }
   }
   mChanger->changeIncidence( oldincidence, incidence, KOGlobals::ALARM_MODIFIED, this );
-  mChanger->endChange( incidence, 0, TQString() );
+  mChanger->endChange( incidence, nullptr, TQString() );
   delete oldincidence;
 
 //  mClickedItem->updateIcons();
@@ -1557,7 +1557,7 @@ void CalendarView::dissociateFutureOccurrence( Incidence *incidence, const TQDat
 
 void CalendarView::schedule_publish(Incidence *incidence)
 {
-  if (incidence == 0)
+  if (!incidence)
     incidence = selectedIncidence();
 
   if (!incidence) {
@@ -1576,7 +1576,7 @@ void CalendarView::schedule_publish(Incidence *incidence)
   }
   if ( publishdlg->exec() == TQDialog::Accepted ) {
     Incidence *inc = incidence->clone();
-    inc->registerObserver( 0 );
+    inc->registerObserver( nullptr );
     inc->clearAttendees();
 
     // Send the mail
@@ -1719,7 +1719,7 @@ void CalendarView::schedule(Scheduler::Method method, Incidence *incidence)
   }
 
   Incidence *inc = incidence->clone();
-  inc->registerObserver( 0 );
+  inc->registerObserver( nullptr );
   inc->clearAttendees();
 
   // Send the mail
@@ -1921,7 +1921,7 @@ void CalendarView::processIncidenceSelection( Incidence *incidence, const TQDate
 
   if ( incidence->type() == "Todo" ) {
     todo = true;
-    subtodo = ( incidence->relatedTo() != 0 );
+    subtodo = ( incidence->relatedTo() );
   }
 
   emit todoSelected( todo );
@@ -1978,7 +1978,7 @@ void CalendarView::updateFilter()
 
   int pos = mFilters.find( mCurrentFilter );
   if ( pos < 0 ) {
-    mCurrentFilter = 0;
+    mCurrentFilter = nullptr;
   }
 
   filters << i18n("No filter");
@@ -1998,7 +1998,7 @@ void CalendarView::updateFilter()
 */
 void CalendarView::filterActivated( int filterNo )
 {
-  CalFilter *newFilter = 0;
+  CalFilter *newFilter = nullptr;
   if ( filterNo > 0 && filterNo <= int(mFilters.count()) ) {
     newFilter = mFilters.at( filterNo-1 );
   }
@@ -2119,7 +2119,7 @@ Todo *CalendarView::selectedTodo()
   if ( incidence && incidence->type() == "Todo" ) {
     return static_cast<Todo *>( incidence );
   }
-  incidence = 0;
+  incidence = nullptr;
 
   Incidence::List selectedIncidences = mTodoList->selectedIncidences();
   if ( !selectedIncidences.isEmpty() ) incidence = selectedIncidences.first();
@@ -2127,13 +2127,13 @@ Todo *CalendarView::selectedTodo()
     return static_cast<Todo *>( incidence );
   }
 
-  return 0;
+  return nullptr;
 }
 
 void CalendarView::dialogClosing( Incidence *in )
 {
   // FIXME: this doesn't work, because if it's a new incidence, it's not locked!
-  mChanger->endChange( in, 0, TQString() );
+  mChanger->endChange( in, nullptr, TQString() );
   mDialogList.remove( in );
 }
 
@@ -2220,7 +2220,7 @@ bool CalendarView::editIncidence( Incidence *incidence, const TQDate &date, bool
   //        resource selection dialog. However, we don't have any UI methods
   //        in the calendar, only in the CalendarResources::DestinationPolicy
   //        So we need to type-cast it and extract it from the CalendarResources
-  TQWidget *tmpparent = 0;
+  TQWidget *tmpparent = nullptr;
   if ( stdcal ) {
     tmpparent = stdcal->dialogParentWidget();
     stdcal->setDialogParentWidget( this );
@@ -2463,7 +2463,7 @@ void CalendarView::deleteIncidence(Incidence *incidence, bool force)
     }
     if ( doDelete ) {
       mChanger->deleteIncidence( incidence, this );
-      processIncidenceSelection( 0, TQDate() );
+      processIncidenceSelection( nullptr, TQDate() );
     }
   }
 
@@ -2685,8 +2685,8 @@ Incidence* CalendarView::singleOccurrenceOrAll( Incidence *inc,
     return inc;
   }
 
-  Incidence *incToReturn = 0;
-  Incidence *incSaved = 0;
+  Incidence *incToReturn = nullptr;
+  Incidence *incSaved = nullptr;
   KOGlobals::WhatChanged whatChanged;
 
   bool dissociationOccurred = false;
@@ -2743,7 +2743,7 @@ Incidence* CalendarView::singleOccurrenceOrAll( Incidence *inc,
       } else {
         KMessageBox::sorry( this, i18n("Unable to add the exception item to the "
             "calendar. No change will be done."), i18n("Error Occurred") );
-        incToReturn = 0;
+        incToReturn = nullptr;
       }
 
       break; }
@@ -2765,7 +2765,7 @@ Incidence* CalendarView::singleOccurrenceOrAll( Incidence *inc,
         KMessageBox::sorry( this, i18n("Unable to add the future items to the "
             "calendar. No change will be done."), i18n("Error Occurred") );
 
-        incToReturn = 0;
+        incToReturn = nullptr;
       }
 
       break; }
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 91868296b..874afeab8 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -59,7 +59,7 @@ using namespace KCal;
 class CalendarViewExtension : public TQWidget
 {
   public:
-    CalendarViewExtension( TQWidget *parent, const char *name = 0 )
+    CalendarViewExtension( TQWidget *parent, const char *name = nullptr )
       : TQWidget( parent, name ) {}
 
     class Factory
@@ -89,13 +89,13 @@ class TDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
       @param parent   parent window
       @param name     TQt internal widget object name
     */
-    CalendarView( TQWidget *parent = 0, const char *name = 0 );
+    CalendarView( TQWidget *parent = nullptr, const char *name = nullptr );
     virtual ~CalendarView();
 
     class CalendarViewVisitor : public IncidenceBase::Visitor
     {
       public:
-        CalendarViewVisitor() : mView( 0 ) {}
+        CalendarViewVisitor() : mView( nullptr ) {}
         bool act( IncidenceBase *incidence, CalendarView *view )
         {
           mView = view;
@@ -489,15 +489,15 @@ class TDE_EXPORT CalendarView : public KOrg::CalendarViewBase, public Calendar::
     void eventUpdated( Incidence * );
 
     /* iTIP scheduling actions */
-    void schedule_publish( Incidence *incidence = 0 );
-    void schedule_request( Incidence *incidence = 0 );
-    void schedule_refresh( Incidence *incidence = 0 );
-    void schedule_cancel( Incidence *incidence = 0 );
-    void schedule_add( Incidence *incidence = 0 );
-    void schedule_reply( Incidence *incidence = 0 );
-    void schedule_counter( Incidence *incidence = 0 );
-    void schedule_declinecounter( Incidence *incidence = 0 );
-    void schedule_forward( Incidence *incidence = 0 );
+    void schedule_publish( Incidence *incidence = nullptr );
+    void schedule_request( Incidence *incidence = nullptr );
+    void schedule_refresh( Incidence *incidence = nullptr );
+    void schedule_cancel( Incidence *incidence = nullptr );
+    void schedule_add( Incidence *incidence = nullptr );
+    void schedule_reply( Incidence *incidence = nullptr );
+    void schedule_counter( Incidence *incidence = nullptr );
+    void schedule_declinecounter( Incidence *incidence = nullptr );
+    void schedule_forward( Incidence *incidence = nullptr );
     void mailFreeBusy( int daysToPublish = 30 );
     void uploadFreeBusy();
 
diff --git a/korganizer/datechecker.cpp b/korganizer/datechecker.cpp
index ebe734652..b902cf561 100644
--- a/korganizer/datechecker.cpp
+++ b/korganizer/datechecker.cpp
@@ -32,7 +32,7 @@
 #include "datechecker.h"
 
 DateChecker::DateChecker( TQObject *parent, const char *name )
-  : TQObject( parent, name ), mUpdateTimer( 0 )
+  : TQObject( parent, name ), mUpdateTimer( nullptr )
 {
   enableRollover( FollowMonth );
 }
@@ -48,7 +48,7 @@ void DateChecker::enableRollover( RolloverType r )
       if ( mUpdateTimer ) {
         mUpdateTimer->stop();
         delete mUpdateTimer;
-        mUpdateTimer = 0;
+        mUpdateTimer = nullptr;
       }
       break;
     case FollowDay:
diff --git a/korganizer/datechecker.h b/korganizer/datechecker.h
index 5665f26d0..96e73b446 100644
--- a/korganizer/datechecker.h
+++ b/korganizer/datechecker.h
@@ -39,7 +39,7 @@ class DateChecker: public TQObject
     TQ_OBJECT
   
   public:
-    DateChecker( TQObject *parent = 0, const char *name = 0 );
+    DateChecker( TQObject *parent = nullptr, const char *name = nullptr );
     ~DateChecker();
 
     /**
diff --git a/korganizer/datenavigator.h b/korganizer/datenavigator.h
index f34c1b281..9e0b86170 100644
--- a/korganizer/datenavigator.h
+++ b/korganizer/datenavigator.h
@@ -38,7 +38,7 @@ class DateNavigator : public TQObject
     TQ_OBJECT
   
   public:
-    DateNavigator( TQObject *parent = 0, const char *name = 0 );
+    DateNavigator( TQObject *parent = nullptr, const char *name = nullptr );
     ~DateNavigator();
 
     KCal::DateList selectedDates();
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp
index 3ff76feca..304189d24 100644
--- a/korganizer/datenavigatorcontainer.cpp
+++ b/korganizer/datenavigatorcontainer.cpp
@@ -41,7 +41,7 @@
 
 DateNavigatorContainer::DateNavigatorContainer( TQWidget *parent,
                                                 const char *name )
-  : TQFrame( parent, name ), mCalendar( 0 ),
+  : TQFrame( parent, name ), mCalendar( nullptr ),
     mHorizontalCount( 1 ), mVerticalCount( 1 )
 {
   mExtraViews.setAutoDelete( true );
diff --git a/korganizer/datenavigatorcontainer.h b/korganizer/datenavigatorcontainer.h
index 6a4d97ec3..33f701cca 100644
--- a/korganizer/datenavigatorcontainer.h
+++ b/korganizer/datenavigatorcontainer.h
@@ -34,7 +34,7 @@ class DateNavigatorContainer: public TQFrame
     TQ_OBJECT
   
   public:
-    DateNavigatorContainer( TQWidget *parent = 0, const char *name = 0 );
+    DateNavigatorContainer( TQWidget *parent = nullptr, const char *name = nullptr );
     ~DateNavigatorContainer();
 
     /**
diff --git a/korganizer/docprefs.cpp b/korganizer/docprefs.cpp
index f89f98094..4be2c262a 100644
--- a/korganizer/docprefs.cpp
+++ b/korganizer/docprefs.cpp
@@ -28,7 +28,7 @@
 
 #include "docprefs.h"
 
-TDESimpleConfig *DocPrefs::mConfig = 0;
+TDESimpleConfig *DocPrefs::mConfig = nullptr;
 
 DocPrefs::DocPrefs( const TQString &type )
 {
diff --git a/korganizer/eventarchiver.h b/korganizer/eventarchiver.h
index f6b02477e..faf088f0d 100644
--- a/korganizer/eventarchiver.h
+++ b/korganizer/eventarchiver.h
@@ -50,7 +50,7 @@ class EventArchiver : public TQObject
   
 
   public:
-    EventArchiver( TQObject* parent = 0, const char* name = 0 );
+    EventArchiver( TQObject* parent = nullptr, const char* name = nullptr );
     virtual ~EventArchiver();
 
     /**
diff --git a/korganizer/exportwebdialog.h b/korganizer/exportwebdialog.h
index 79ca87c1c..439d7088d 100644
--- a/korganizer/exportwebdialog.h
+++ b/korganizer/exportwebdialog.h
@@ -40,8 +40,8 @@ class ExportWebDialog : public KDialogBase, public KPrefsWidManager
     TQ_OBJECT
   
   public:
-    ExportWebDialog( HTMLExportSettings *settings, TQWidget *parent = 0,
-                     const char *name = 0 );
+    ExportWebDialog( HTMLExportSettings *settings, TQWidget *parent = nullptr,
+                     const char *name = nullptr );
     virtual ~ExportWebDialog();
 
   public slots:
diff --git a/korganizer/filtereditdialog.cpp b/korganizer/filtereditdialog.cpp
index 6a2ef703f..aed50f907 100644
--- a/korganizer/filtereditdialog.cpp
+++ b/korganizer/filtereditdialog.cpp
@@ -63,7 +63,7 @@ FilterEditDialog::FilterEditDialog( TQPtrList<CalFilter> *filters,
 FilterEditDialog::~FilterEditDialog()
 {
   delete mFilterEdit;
-  mFilterEdit = 0L;
+  mFilterEdit = nullptr;
 }
 
 void FilterEditDialog::updateFilterList()
@@ -93,7 +93,7 @@ void FilterEditDialog::setDialogConsistent(bool consistent) {
 }
 
 FilterEdit::FilterEdit(TQPtrList<CalFilter> *filters, TQWidget *parent)
-  : FilterEdit_base( parent), current(0), mCategorySelectDialog( 0 )
+  : FilterEdit_base( parent), current(nullptr), mCategorySelectDialog( nullptr )
 {
   mFilters = filters;
   TQWhatsThis::add( mNewButton, i18n( "Press this button to define a new filter." ) );
@@ -130,14 +130,14 @@ void FilterEdit::updateFilterList()
     emit(dataConsistent(true));
   }
 
-  if(current == 0L && mFilters->count() > 0)
+  if(!current && mFilters->count() > 0)
     filterSelected(mFilters->at(0));
   mDeleteButton->setEnabled( mFilters->count() > 1 );
 }
 
 void FilterEdit::saveChanges()
 {
-  if(current == 0L)
+  if(!current)
     return;
   
   current->setName(mNameLineEdit->text());
@@ -166,14 +166,14 @@ void FilterEdit::filterSelected()
 void FilterEdit::filterSelected(CalFilter *filter)
 {
   if(filter == current) return;
-  kdDebug(5850) << "Selected filter " << (filter!=0?filter->name():"") << endl;
+  kdDebug(5850) << "Selected filter " << (filter ?filter->name():"") << endl;
   saveChanges();
 
   current = filter;
   mNameLineEdit->blockSignals(true);
   mNameLineEdit->setText(current->name());
   mNameLineEdit->blockSignals(false);
-  mDetailsFrame->setEnabled(current != 0L);
+  mDetailsFrame->setEnabled(current != nullptr);
   mCompletedCheck->setChecked( current->criteria() & CalFilter::HideCompleted );
   mCompletedTimeSpan->setValue( current->completedTimeSpan() );
   mRecurringCheck->setChecked( current->criteria() & CalFilter::HideRecurring );
@@ -205,7 +205,7 @@ void FilterEdit::bDeletePressed() {
 
   unsigned int selected = mRulesList->currentItem();
   mFilters->remove( selected );
-  current = 0L;
+  current = nullptr;
   updateFilterList();
   mRulesList->setSelected(TQMIN(mRulesList->count()-1, selected), true);
   emit filterChanged();
diff --git a/korganizer/filtereditdialog.h b/korganizer/filtereditdialog.h
index 3c19d613a..45abd3636 100644
--- a/korganizer/filtereditdialog.h
+++ b/korganizer/filtereditdialog.h
@@ -47,7 +47,7 @@ class FilterEditDialog : public KDialogBase
     TQ_OBJECT
   
   public:
-    FilterEditDialog(TQPtrList<CalFilter> *,TQWidget *parent=0, const char *name=0);
+    FilterEditDialog(TQPtrList<CalFilter> *,TQWidget *parent=nullptr, const char *name=nullptr);
     virtual ~FilterEditDialog();
 
   signals:
diff --git a/korganizer/freebusymanager.cpp b/korganizer/freebusymanager.cpp
index b9338bc30..031e83141 100644
--- a/korganizer/freebusymanager.cpp
+++ b/korganizer/freebusymanager.cpp
@@ -125,7 +125,7 @@ void FreeBusyDownloadJob::slotResult( TDEIO::Job *job )
 
 FreeBusyManager::FreeBusyManager( TQObject *parent, const char *name )
   : TQObject( parent, name ),
-    mCalendar( 0 ), mTimerID( 0 ), mUploadingFreeBusy( false ),
+    mCalendar( nullptr ), mTimerID( 0 ), mUploadingFreeBusy( false ),
     mBrokenUrl( false )
 {
 }
@@ -232,7 +232,7 @@ void FreeBusyManager::publishFreeBusy()
     return;
   KURL targetURL( KOPrefs::instance()->freeBusyPublishUrl() );
   if ( targetURL.isEmpty() )  {
-    KMessageBox::sorry( 0,
+    KMessageBox::sorry( nullptr,
       i18n( "<qt>No URL configured for uploading your free/busy list. Please "
             "set it in KOrganizer's configuration dialog, on the \"Free/Busy\" page. "
             "<br>Contact your system administrator for the exact URL and the "
@@ -243,7 +243,7 @@ void FreeBusyManager::publishFreeBusy()
   if ( mBrokenUrl ) // Url is invalid, don't try again
     return;
   if ( !targetURL.isValid() ) {
-     KMessageBox::sorry( 0,
+     KMessageBox::sorry( nullptr,
       i18n( "<qt>The target URL '%1' provided is invalid."
             "</qt>" ).arg( targetURL.prettyURL() ), i18n("Invalid URL") );
     mBrokenUrl = true;
@@ -348,7 +348,7 @@ void FreeBusyManager::slotUploadFreeBusyResult(TDEIO::Job *_job)
 {
     TDEIO::FileCopyJob* job = static_cast<TDEIO::FileCopyJob *>(_job);
     if ( job->error() )
-        KMessageBox::sorry( 0,
+        KMessageBox::sorry( nullptr,
           i18n( "<qt>The software could not upload your free/busy list to the "
                 "URL '%1'. There might be a problem with the access rights, or "
                 "you specified an incorrect URL. The system said: <em>%2</em>."
@@ -466,7 +466,7 @@ bool fbExists( const KURL &url )
 
   TDEIO::Job *job = TDEIO::get( url, false, false );
   TQByteArray data;
-  if ( TDEIO::NetAccess::synchronousRun( job, 0, &data ) ) {
+  if ( TDEIO::NetAccess::synchronousRun( job, nullptr, &data ) ) {
     TQString dataStr ( data );
     if ( dataStr.contains( "BEGIN:VCALENDAR" ) ) {
       return true;
@@ -633,13 +633,13 @@ FreeBusy *FreeBusyManager::loadFreeBusy( const TQString &email )
   if ( !f.exists() ) {
     DEBUG_5850 << "FreeBusyManager::loadFreeBusy() " << f.name()
                   << " doesn't exist." << endl;
-    return 0;
+    return nullptr;
   }
 
   if ( !f.open( IO_ReadOnly ) ) {
     DEBUG_5850 << "FreeBusyManager::loadFreeBusy() Unable to open file "
               << f.name() << endl;
-    return 0;
+    return nullptr;
   }
 
   TQTextStream ts( &f );
diff --git a/korganizer/freebusymanager.h b/korganizer/freebusymanager.h
index 6650dc4dc..199e13e32 100644
--- a/korganizer/freebusymanager.h
+++ b/korganizer/freebusymanager.h
@@ -58,7 +58,7 @@ class FreeBusyDownloadJob : public TQObject
   
   public:
     FreeBusyDownloadJob( const TQString &email, const KURL &url,
-                   FreeBusyManager *manager, const char *name = 0 );
+                   FreeBusyManager *manager, const char *name = nullptr );
 
     virtual ~FreeBusyDownloadJob();
 
diff --git a/korganizer/freebusyurldialog.h b/korganizer/freebusyurldialog.h
index a0363ce88..eff41e578 100644
--- a/korganizer/freebusyurldialog.h
+++ b/korganizer/freebusyurldialog.h
@@ -38,8 +38,8 @@ class FreeBusyUrlDialog : public KDialogBase
     TQ_OBJECT
   
   public:
-    FreeBusyUrlDialog( KCal::Attendee *, TQWidget *parent = 0,
-                       const char *name = 0 );
+    FreeBusyUrlDialog( KCal::Attendee *, TQWidget *parent = nullptr,
+                       const char *name = nullptr );
 
   public slots:
     void slotOk();
@@ -53,8 +53,8 @@ class FreeBusyUrlWidget : public TQWidget
     TQ_OBJECT
   
   public:
-    FreeBusyUrlWidget( KCal::Attendee *, TQWidget *parent = 0,
-                       const char *name = 0 );
+    FreeBusyUrlWidget( KCal::Attendee *, TQWidget *parent = nullptr,
+                       const char *name = nullptr );
     ~FreeBusyUrlWidget();
 
     void loadConfig();
diff --git a/korganizer/history.cpp b/korganizer/history.cpp
index 74f8c8a35..0a64073a8 100644
--- a/korganizer/history.cpp
+++ b/korganizer/history.cpp
@@ -35,7 +35,7 @@ using namespace KCal;
 using namespace KOrg;
 
 History::History( KCal::Calendar *calendar )
-  : mCalendar( calendar ), mCurrentMultiEntry( 0 ), 
+  : mCalendar( calendar ), mCurrentMultiEntry( nullptr ),
     mUndoEntry( mEntries ), mRedoEntry( mEntries )
 {
   mEntries.setAutoDelete( true );
@@ -43,7 +43,7 @@ History::History( KCal::Calendar *calendar )
 
 void History::undo()
 {
-  if ( mCurrentMultiEntry ) mCurrentMultiEntry = 0;
+  if ( mCurrentMultiEntry ) mCurrentMultiEntry = nullptr;
   Entry *entry = mUndoEntry.current();
   if ( !entry ) return;
 
@@ -62,7 +62,7 @@ void History::undo()
 
 void History::redo()
 {
-  if ( mCurrentMultiEntry ) mCurrentMultiEntry = 0;
+  if ( mCurrentMultiEntry ) mCurrentMultiEntry = nullptr;
   Entry *entry = mRedoEntry.current();
   if ( !entry ) return;
 
@@ -145,7 +145,7 @@ void History::startMultiModify( const TQString &description )
 
 void History::endMultiModify()
 {
-  mCurrentMultiEntry = 0;
+  mCurrentMultiEntry = nullptr;
 }
 
 
@@ -271,7 +271,7 @@ void History::MultiEntry::undo()
   TQPtrListIterator<Entry> it( mEntries );
   it.toLast();
   Entry *entry;
-  while ( (entry = it.current()) != 0 ) {
+  while ((entry = it.current()) != nullptr) {
     --it;
     entry->undo();
   }
@@ -281,7 +281,7 @@ void History::MultiEntry::redo()
 {
   TQPtrListIterator<Entry> it( mEntries );
   Entry *entry;
-  while ( (entry = it.current()) != 0 ) {
+  while ((entry = it.current()) != nullptr) {
     ++it;
     entry->redo();
   }
diff --git a/korganizer/importdialog.cpp b/korganizer/importdialog.cpp
index 6edc9f71d..d722bdb79 100644
--- a/korganizer/importdialog.cpp
+++ b/korganizer/importdialog.cpp
@@ -39,7 +39,7 @@ using namespace KCal;
 
 ImportDialog::ImportDialog( const KURL &url, TQWidget *parent, bool isPart )
   : KDialogBase( Plain, i18n("Import Calendar/Event"), Ok | Cancel, Ok, parent,
-                 0, true, true ),
+                 nullptr, true, true ),
     mUrl( url )
 {
   TQFrame *topFrame = plainPage();
@@ -59,7 +59,7 @@ ImportDialog::ImportDialog( const KURL &url, TQWidget *parent, bool isPart )
   mMergeButton = new TQRadioButton( i18n("Merge into existing calendar"),
                                    radioBox );
 
-  mOpenButton = isPart ? 0 : new TQRadioButton( i18n("Open in separate window"), radioBox );
+  mOpenButton = isPart ? nullptr : new TQRadioButton( i18n("Open in separate window"), radioBox );
 
   mAddButton->setChecked( true );
 }
diff --git a/korganizer/incidencechanger.cpp b/korganizer/incidencechanger.cpp
index 51c0504d3..4627ce133 100644
--- a/korganizer/incidencechanger.cpp
+++ b/korganizer/incidencechanger.cpp
@@ -71,7 +71,7 @@ bool IncidenceChanger::sendGroupwareMessage( Incidence *incidence,
 void IncidenceChanger::cancelAttendees( Incidence *incidence )
 {
   if ( KOPrefs::instance()->mUseGroupwareCommunication ) {
-    if ( KMessageBox::questionYesNo( 0, i18n("Some attendees were removed "
+    if ( KMessageBox::questionYesNo( nullptr, i18n("Some attendees were removed "
        "from the incidence. Shall cancel messages be sent to these attendees?"),
        i18n( "Attendees Removed" ), i18n("Send Messages"), i18n("Do Not Send") ) == KMessageBox::Yes ) {
       // don't use KOGroupware::sendICalMessage here, because that asks just
@@ -197,7 +197,7 @@ class IncidenceChanger::ComparisonVisitor : public IncidenceBase::Visitor
       if ( incidence )
         return incidence->accept( *this );
       else
-        return (inc2 == 0);
+        return inc2 == nullptr;
     }
   protected:
     bool visit( Event *event )
@@ -397,7 +397,7 @@ bool IncidenceChanger::addIncidence( Incidence *incidence,
   //        resource selection dialog. However, we don't have any UI methods
   //        in the calendar, only in the CalendarResources::DestinationPolicy
   //        So we need to type-cast it and extract it from the CalendarResources
-  TQWidget *tmpparent = 0;
+  TQWidget *tmpparent = nullptr;
   if ( stdcal ) {
     tmpparent = stdcal->dialogParentWidget();
     stdcal->setDialogParentWidget( parent );
@@ -431,7 +431,7 @@ bool IncidenceChanger::addIncidence( Incidence *incidence,
   if ( !success ) {
     // We can have a failure if the user pressed [cancel] in the resource
     // selectdialog, so check the exception.
-    ErrorFormat *e = stdcal ? stdcal->exception() : 0;
+    ErrorFormat *e = stdcal ? stdcal->exception() : nullptr;
     if ( !e ||
          ( e && ( e->errorCode() != KCal::ErrorFormat::UserCancel &&
                   e->errorCode() != KCal::ErrorFormat::NoWritableFound ) ) ) {
diff --git a/korganizer/interfaces/calendar/calendardecoration.h b/korganizer/interfaces/calendar/calendardecoration.h
index cd79f233d..aaaab34a9 100644
--- a/korganizer/interfaces/calendar/calendardecoration.h
+++ b/korganizer/interfaces/calendar/calendardecoration.h
@@ -70,7 +70,7 @@ class CalendarDecoration : public Plugin
     /**
       Return a small widget. It should have the size of a pushbutton.
     */
-    virtual TQWidget *smallWidget( TQWidget *, const TQDate & ) { return 0; }
+    virtual TQWidget *smallWidget( TQWidget *, const TQDate & ) { return nullptr; }
 };
 
 class CalendarDecorationFactory : public PluginFactory
diff --git a/korganizer/interfaces/calendar/plugin.h b/korganizer/interfaces/calendar/plugin.h
index 853c3cdf0..874a1392c 100644
--- a/korganizer/interfaces/calendar/plugin.h
+++ b/korganizer/interfaces/calendar/plugin.h
@@ -49,7 +49,7 @@ class PluginFactory : public KLibFactory
     virtual TQObject *createObject( TQObject *, const char *,const char *,
                                    const TQStringList & )
     {
-      return 0;
+      return nullptr;
     }
 };
 
diff --git a/korganizer/interfaces/korganizer/baseview.h b/korganizer/interfaces/korganizer/baseview.h
index cc00b3b17..c59132a8d 100644
--- a/korganizer/interfaces/korganizer/baseview.h
+++ b/korganizer/interfaces/korganizer/baseview.h
@@ -69,9 +69,9 @@ class TDE_EXPORT BaseView : public TQWidget
       @param parent parent widget.
       @param name   name of this widget.
     */
-    BaseView( Calendar *cal, TQWidget *parent = 0, const char *name = 0 )
+    BaseView( Calendar *cal, TQWidget *parent = nullptr, const char *name = nullptr )
       : TQWidget( parent, name ),
-        mReadOnly( false ), mCalendar( cal ), mResource( 0 ), mChanger( 0 ) {}
+        mReadOnly( false ), mCalendar( cal ), mResource( nullptr ), mChanger( nullptr ) {}
 
     /**
       Destructor.  Views will do view-specific cleanups here.
diff --git a/korganizer/interfaces/korganizer/incidencechangerbase.h b/korganizer/interfaces/korganizer/incidencechangerbase.h
index 730e2936a..4c3a633f8 100644
--- a/korganizer/interfaces/korganizer/incidencechangerbase.h
+++ b/korganizer/interfaces/korganizer/incidencechangerbase.h
@@ -41,7 +41,7 @@ class IncidenceChangerBase : public TQObject
 TQ_OBJECT
   
 public:
-  IncidenceChangerBase( Calendar*cal, TQObject *parent = 0 ) :
+  IncidenceChangerBase( Calendar*cal, TQObject *parent = nullptr ) :
         TQObject( parent ), mCalendar( cal ) {}
   virtual ~IncidenceChangerBase() {}
 
diff --git a/korganizer/interfaces/korganizer/part.h b/korganizer/interfaces/korganizer/part.h
index cb0b68844..c514a57db 100644
--- a/korganizer/interfaces/korganizer/part.h
+++ b/korganizer/interfaces/korganizer/part.h
@@ -39,7 +39,7 @@ class Part : public KParts::Part
     typedef TQPtrList<Part> List;
 
     Part( MainWindow *parent, const char *name )
-      : KParts::Part( parent?(parent->topLevelWidget()):0, name ), mMainWindow( parent ) {}
+      : KParts::Part( parent?(parent->topLevelWidget()):nullptr, name ), mMainWindow( parent ) {}
 
     virtual ~Part() {}
 
@@ -56,13 +56,13 @@ class Part : public KParts::Part
 class PartFactory : public KLibFactory
 {
   public:
-    virtual Part *create( MainWindow *parent, const char *name = 0 ) = 0;
+    virtual Part *create( MainWindow *parent, const char *name = nullptr ) = 0;
 
   protected:
     virtual TQObject *createObject( TQObject *, const char *,const char *,
                                    const TQStringList & )
     {
-      return 0;
+      return nullptr;
     }
 };
 
diff --git a/korganizer/interfaces/korganizer/printplugin.h b/korganizer/interfaces/korganizer/printplugin.h
index f22279990..afd31ddb2 100644
--- a/korganizer/interfaces/korganizer/printplugin.h
+++ b/korganizer/interfaces/korganizer/printplugin.h
@@ -51,8 +51,8 @@ class CalPrinterBase
 class PrintPlugin : public KOrg::Plugin
 {
   public:
-    PrintPlugin() : KOrg::Plugin(), mConfigWidget(0), mCoreHelper(0), mPrinter(0),
-         mCalendar(0), mConfig(0) {}
+    PrintPlugin() : KOrg::Plugin(), mConfigWidget(nullptr), mCoreHelper(nullptr), mPrinter(nullptr),
+         mCalendar(nullptr), mConfig(nullptr) {}
     virtual ~PrintPlugin() {}
 
     typedef TQPtrList<PrintPlugin> List;
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index 08d57be5d..5254c87e1 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -60,7 +60,7 @@
 class JournalTitleLable : public KActiveLabel
 {
 public:
-  JournalTitleLable( TQWidget *parent, const char *name=0 ) : KActiveLabel( parent, name ) {}
+  JournalTitleLable( TQWidget *parent, const char *name=nullptr ) : KActiveLabel( parent, name ) {}
 
   void openLink( const TQString &/*link*/ ) {}
 };
@@ -70,7 +70,7 @@ JournalDateEntry::JournalDateEntry( Calendar *calendar, TQWidget *parent ) :
   TQVBox( parent ), mCalendar( calendar )
 {
 //kdDebug(5850)<<"JournalEntry::JournalEntry, parent="<<parent<<endl;
-  mChanger = 0;
+  mChanger = nullptr;
 
   mTitle = new JournalTitleLable( this );
   mTitle->setMargin(2);
@@ -151,7 +151,7 @@ void JournalDateEntry::setIncidenceChanger( IncidenceChangerBase *changer )
 
 void JournalDateEntry::emitNewJournal()
 {
-  emit newJournal( 0/*ResourceCalendar*/, TQString()/*subResource*/, mDate );
+  emit newJournal( nullptr/*ResourceCalendar*/, TQString()/*subResource*/, mDate );
 }
 
 void JournalDateEntry::journalEdited( Journal *journal )
@@ -181,7 +181,7 @@ JournalEntry::JournalEntry( Journal* j, TQWidget *parent ) :
 //kdDebug(5850)<<"JournalEntry::JournalEntry, parent="<<parent<<endl;
   mDirty = false;
   mWriteInProgress = false;
-  mChanger = 0;
+  mChanger = nullptr;
   mReadOnly = false;
 
   mLayout = new TQGridLayout( this );
@@ -282,7 +282,7 @@ void JournalEntry::printItem()
   writeJournal();
   if ( mJournal ) {
     KOCoreHelper helper;
-    CalPrinter printer( this, 0, &helper );
+    CalPrinter printer( this, nullptr, &helper );
     connect( this, TQ_SIGNAL(configChanged()), &printer, TQ_SLOT(updateConfig()) );
 
     Incidence::List selectedIncidences;
@@ -376,23 +376,23 @@ void JournalEntry::writeJournal()
   bool newJournal = false;
   mWriteInProgress = true;
 
-  Journal *oldJournal = 0;
+  Journal *oldJournal = nullptr;
 
   if ( !mJournal ) {
     newJournal = true;
     mJournal = new Journal;
     writeJournalPrivate( mJournal );
-    if ( !mChanger->addIncidence( mJournal, 0, TQString(), this ) ) {
+    if ( !mChanger->addIncidence( mJournal, nullptr, TQString(), this ) ) {
       KODialogManager::errorSaveIncidence( this, mJournal );
       delete mJournal;
-      mJournal = 0;
+      mJournal = nullptr;
     }
   } else {
     oldJournal = mJournal->clone();
-    if ( mChanger->beginChange( mJournal, 0, TQString() ) ) {
+    if ( mChanger->beginChange( mJournal, nullptr, TQString() ) ) {
       writeJournalPrivate( mJournal );
       mChanger->changeIncidence( oldJournal, mJournal, KOGlobals::DESCRIPTION_MODIFIED, this );
-      mChanger->endChange( mJournal, 0, TQString() );
+      mChanger->endChange( mJournal, nullptr, TQString() );
     }
     delete oldJournal;
   }
diff --git a/korganizer/kdatenavigator.h b/korganizer/kdatenavigator.h
index 8da31b02c..cafdebe06 100644
--- a/korganizer/kdatenavigator.h
+++ b/korganizer/kdatenavigator.h
@@ -47,7 +47,7 @@ class KDateNavigator: public TQFrame
     TQ_OBJECT
   
   public:
-    KDateNavigator( TQWidget *parent = 0, const char *name = 0 );
+    KDateNavigator( TQWidget *parent = nullptr, const char *name = nullptr );
     ~KDateNavigator();
 
     /**
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 38c1c78b3..f75c7865b 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -173,7 +173,7 @@ void MarcusBains::updateLocationRecalc( bool recalculate )
 */
 KOAgenda::KOAgenda( int columns, int rows, int rowSize, CalendarView *calendarView,
                     TQWidget *parent, const char *name, WFlags f )
-  : TQScrollView( parent, name, f ), mChanger( 0 )
+  : TQScrollView( parent, name, f ), mChanger( nullptr )
 {
   mColumns = columns;
   mRows = rows;
@@ -217,7 +217,7 @@ KOAgenda::~KOAgenda()
 
 Incidence *KOAgenda::selectedIncidence() const
 {
-  return ( mSelectedItem ? mSelectedItem->incidence() : 0 );
+  return ( mSelectedItem ? mSelectedItem->incidence() : nullptr );
 }
 
 
@@ -271,14 +271,14 @@ void KOAgenda::init()
   mOldLowerScrollValue = -1;
   mOldUpperScrollValue = -1;
 
-  mClickedItem = 0;
+  mClickedItem = nullptr;
 
-  mActionItem = 0;
-  mResPair = qMakePair( static_cast<ResourceCalendar *>( 0 ), TQString() );
+  mActionItem = nullptr;
+  mResPair = qMakePair( static_cast<ResourceCalendar *>( nullptr ), TQString() );
   mActionType = NOP;
   mItemMoved = false;
 
-  mSelectedItem = 0;
+  mSelectedItem = nullptr;
   mSelectedUid = TQString();
 
   setAcceptDrops( true );
@@ -310,14 +310,14 @@ void KOAgenda::init()
 
   // Create the Marcus Bains line.
   if( mAllDayMode ) {
-    mMarcusBains = 0;
+    mMarcusBains = nullptr;
   } else {
     mMarcusBains = new MarcusBains( this );
     addChild( mMarcusBains );
   }
 
   mTypeAhead = false;
-  mTypeAheadReceiver = 0;
+  mTypeAheadReceiver = nullptr;
 
   mReturnPressed = false;
 }
@@ -328,13 +328,13 @@ void KOAgenda::clear()
 //  kdDebug(5850) << "KOAgenda::clear()" << endl;
 
   KOAgendaItem *item;
-  for ( item = mItems.first(); item != 0; item = mItems.next() ) {
+  for ( item = mItems.first(); item ; item = mItems.next() ) {
     removeChild( item );
   }
   mItems.clear();
   mItemsToDelete.clear();
 
-  mSelectedItem = 0;
+  mSelectedItem = nullptr;
 
   clearSelection();
 }
@@ -622,8 +622,8 @@ bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me)
           if (item) {
             Incidence *incidence = item->incidence();
             if ( incidence->isReadOnly() ) {
-              mActionItem = 0;
-              mResPair = qMakePair( static_cast<ResourceCalendar *>( 0 ), TQString() );
+              mActionItem = nullptr;
+              mResPair = qMakePair( static_cast<ResourceCalendar *>( nullptr ), TQString() );
             } else {
               mActionItem = item;
               mResPair = CalHelper::incSubResourceCalendar( mCalendar, incidence );
@@ -655,9 +655,9 @@ bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me)
           // if mouse pointer is in selection, don't change selection
           TQPoint gpos = contentsToGrid( viewportToContents( viewportPos ) );
           if ( !ptInSelection( gpos ) ) {
-            selectItem(0);
-            mActionItem = 0;
-            mResPair = qMakePair( static_cast<ResourceCalendar *>( 0 ), TQString() );
+            selectItem(nullptr);
+            mActionItem = nullptr;
+            mResPair = qMakePair( static_cast<ResourceCalendar *>( nullptr ), TQString() );
             setCursor(arrowCursor);
             startSelectAction(viewportPos);
           }
@@ -723,7 +723,7 @@ bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me)
 
     case TQEvent::MouseButtonDblClick:
       if (object == viewport()) {
-        selectItem(0);
+        selectItem(nullptr);
         TQPair<ResourceCalendar *, TQString>p = mCalendarView->viewSubResourceCalendar();
         emit newEventSignal( p.first, p.second );
       } else {
@@ -917,8 +917,8 @@ void KOAgenda::performItemAction(const TQPoint& viewportPos)
       placeSubCells( mActionItem );
       emit startDragSignal( mActionItem->incidence() );
       setCursor( arrowCursor );
-      mActionItem = 0;
-      mResPair = qMakePair( static_cast<ResourceCalendar *>( 0 ), TQString() );
+      mActionItem = nullptr;
+      mResPair = qMakePair( static_cast<ResourceCalendar *>( nullptr ), TQString() );
       mActionType = NOP;
       mItemMoved = false;
       return;
@@ -951,8 +951,8 @@ void KOAgenda::performItemAction(const TQPoint& viewportPos)
         mActionItem->resetMove();
         placeSubCells( mActionItem );
         setCursor( arrowCursor );
-        mActionItem = 0;
-        mResPair = qMakePair( static_cast<ResourceCalendar *>( 0 ), TQString() );
+        mActionItem = nullptr;
+        mResPair = qMakePair( static_cast<ResourceCalendar *>( nullptr ), TQString() );
         mActionType = NOP;
         mItemMoved = false;
         return;
@@ -1166,7 +1166,7 @@ void KOAgenda::endItemAction()
 
         TQPtrList<KOAgendaItem> oldconflictItems = placeItem->conflictItems();
         KOAgendaItem *item;
-        for ( item = oldconflictItems.first(); item != 0;
+        for ( item = oldconflictItems.first(); item;
               item = oldconflictItems.next() ) {
           placeSubCells( item );
         }
@@ -1191,8 +1191,8 @@ void KOAgenda::endItemAction()
     }
   }
 
-  mActionItem = 0;
-  mResPair = qMakePair( static_cast<ResourceCalendar *>( 0 ), TQString() );
+  mActionItem = nullptr;
+  mResPair = qMakePair( static_cast<ResourceCalendar *>( nullptr ), TQString() );
   mItemMoved = false;
 
   if ( multiModify ) {
@@ -1341,7 +1341,7 @@ void KOAgenda::placeSubCells( KOAgendaItem *placeItem )
 
   TQPtrList<KOrg::CellItem> cells;
   KOAgendaItem *item;
-  for ( item = mItems.first(); item != 0; item = mItems.next() ) {
+  for ( item = mItems.first(); item ; item = mItems.next() ) {
     cells.append( item );
   }
 
@@ -1553,7 +1553,7 @@ TQMemArray<int> KOAgenda::minContentsY()
   TQMemArray<int> minArray;
   minArray.fill( timeToY( TQTime(23, 59) ), mSelectedDates.count() );
   for ( KOAgendaItem *item = mItems.first();
-        item != 0; item = mItems.next() ) {
+        item; item = mItems.next() ) {
     int ymin = item->cellYTop();
     int index = item->cellXLeft();
     if ( index>=0 && index<(int)(mSelectedDates.count()) ) {
@@ -1570,7 +1570,7 @@ TQMemArray<int> KOAgenda::maxContentsY()
   TQMemArray<int> maxArray;
   maxArray.fill( timeToY( TQTime(0, 0) ), mSelectedDates.count() );
   for ( KOAgendaItem *item = mItems.first();
-        item != 0; item = mItems.next() ) {
+        item; item = mItems.next() ) {
     int ymax = item->cellYBottom();
     int index = item->cellXLeft();
     if ( index>=0 && index<(int)(mSelectedDates.count()) ) {
@@ -1598,7 +1598,7 @@ KOAgendaItem *KOAgenda::insertItem( Incidence *incidence, const TQDate &qd, int
 {
   if ( mAllDayMode ) {
     kdDebug(5850) << "KOAgenda: calling insertItem in all-day mode is illegal." << endl;
-    return 0;
+    return nullptr;
   }
 
   mActionType = NOP;
@@ -1643,7 +1643,7 @@ KOAgendaItem *KOAgenda::insertAllDayItem( Incidence *event, const TQDate &qd,
 {
   if ( !mAllDayMode ) {
     kdDebug(5850) << "KOAgenda: calling insertAllDayItem in non all-day mode is illegal." << endl;
-    return 0;
+    return nullptr;
   }
 
   mActionType = NOP;
@@ -1689,7 +1689,7 @@ void KOAgenda::insertMultiItem( Event *event, const TQDate &qd, int XBegin, int
   TQString newtext;
   int width = XEnd - XBegin + 1;
   int count = 0;
-  KOAgendaItem *current = 0;
+  KOAgendaItem *current = nullptr;
   TQPtrList<KOAgendaItem> multiItems;
   const int visibleCount = mSelectedDates.first().daysTo( mSelectedDates.last() );
   for ( cellX = XBegin; cellX <= XEnd; ++cellX ) {
@@ -1722,16 +1722,16 @@ void KOAgenda::insertMultiItem( Event *event, const TQDate &qd, int XBegin, int
   if ( it != e ) { // .first asserts if the list is empty
     KOAgendaItem *first = multiItems.first();
     KOAgendaItem *last = multiItems.last();
-    KOAgendaItem *prev = 0, *next = 0;
+    KOAgendaItem *prev = nullptr, *next = nullptr;
 
     while ( it != e ) {
       KOAgendaItem *item = *it;
       ++it;
-      next = ( it == e ) ? 0 : (*it);
+      next = ( it == e ) ? nullptr : (*it);
       if ( item ) {
-        item->setMultiItem( ( item == first ) ? 0 : first,
+        item->setMultiItem( ( item == first ) ? nullptr : first,
                             prev, next,
-                            ( item == last ) ? 0 : last );
+                            ( item == last ) ? nullptr : last );
       }
       prev = item;
     }
@@ -1792,7 +1792,7 @@ bool KOAgenda::removeAgendaItem( KOAgendaItem *item )
   }
 
   KOAgendaItem *confitem;
-  for ( confitem = conflictItems.first(); confitem != 0;
+  for ( confitem = conflictItems.first(); confitem;
         confitem = conflictItems.next() ) {
     // the item itself is also in its own conflictItems list!
     if ( confitem != thisItem ) placeSubCells(confitem);
@@ -1854,12 +1854,12 @@ void KOAgenda::resizeAllContents()
   if ( mItems.count() > 0 ) {
     KOAgendaItem *item;
     if (mAllDayMode) {
-      for ( item=mItems.first(); item != 0; item=mItems.next() ) {
+      for ( item=mItems.first(); item ; item=mItems.next() ) {
         subCellWidth = calcSubCellWidth( item );
         placeAgendaItem( item, subCellWidth );
       }
     } else {
-      for ( item=mItems.first(); item != 0; item=mItems.next() ) {
+      for ( item=mItems.first(); item ; item=mItems.next() ) {
         subCellWidth = calcSubCellWidth( item );
         placeAgendaItem( item, subCellWidth );
       }
@@ -1962,15 +1962,15 @@ void KOAgenda::deselectItem()
     return;
   }
   mSelectedItem->select(false);
-  mSelectedItem = 0;
+  mSelectedItem = nullptr;
 }
 
 void KOAgenda::selectItem(KOAgendaItem *item)
 {
   if ((KOAgendaItem *)mSelectedItem == item) return;
   deselectItem();
-  if (item == 0) {
-    emit incidenceSelected( 0, TQDate() );
+  if (!item) {
+    emit incidenceSelected( nullptr, TQDate() );
     return;
   }
   mSelectedItem = item;
@@ -1983,7 +1983,7 @@ void KOAgenda::selectItem(KOAgendaItem *item)
 void KOAgenda::selectItemByUID( const TQString& uid )
 {
   KOAgendaItem *item;
-  for ( item = mItems.first(); item != 0; item = mItems.next() ) {
+  for ( item = mItems.first(); item ; item = mItems.next() ) {
     if( item->incidence() && item->incidence()->uid() == uid ) {
       selectItem( item );
       break;
diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h
index d123f463f..22453b508 100644
--- a/korganizer/koagenda.h
+++ b/korganizer/koagenda.h
@@ -55,7 +55,7 @@ class MarcusBains : public TQFrame
   TQ_OBJECT
   
   public:
-    MarcusBains( KOAgenda *agenda = 0, const char *name = 0 );
+    MarcusBains( KOAgenda *agenda = nullptr, const char *name = nullptr );
     void updateLocationRecalc( bool recalculate = false );
     virtual ~MarcusBains();
 
@@ -77,10 +77,10 @@ class KOAgenda : public TQScrollView
   
   public:
     KOAgenda ( int columns, int rows, int columnSize, CalendarView *calendarView,
-               TQWidget *parent=0, const char *name = 0, WFlags f = 0 );
+               TQWidget *parent=nullptr, const char *name = nullptr, WFlags f = 0 );
 
-    KOAgenda ( int columns, CalendarView *calendarView, TQWidget *parent = 0,
-               const char *name = 0, WFlags f = 0 );
+    KOAgenda ( int columns, CalendarView *calendarView, TQWidget *parent = nullptr,
+               const char *name = nullptr, WFlags f = 0 );
     virtual ~KOAgenda();
 
     Incidence *selectedIncidence() const;
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index b0a237748..95b9a2ff8 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -51,15 +51,15 @@
 
 //--------------------------------------------------------------------------
 
-TQToolTipGroup *KOAgendaItem::mToolTipGroup = 0;
+TQToolTipGroup *KOAgendaItem::mToolTipGroup = nullptr;
 
-TQPixmap *KOAgendaItem::alarmPxmp = 0;
-TQPixmap *KOAgendaItem::recurPxmp = 0;
-TQPixmap *KOAgendaItem::readonlyPxmp = 0;
-TQPixmap *KOAgendaItem::replyPxmp = 0;
-TQPixmap *KOAgendaItem::groupPxmp = 0;
-TQPixmap *KOAgendaItem::groupPxmpTentative = 0;
-TQPixmap *KOAgendaItem::organizerPxmp = 0;
+TQPixmap *KOAgendaItem::alarmPxmp = nullptr;
+TQPixmap *KOAgendaItem::recurPxmp = nullptr;
+TQPixmap *KOAgendaItem::readonlyPxmp = nullptr;
+TQPixmap *KOAgendaItem::replyPxmp = nullptr;
+TQPixmap *KOAgendaItem::groupPxmp = nullptr;
+TQPixmap *KOAgendaItem::groupPxmpTentative = nullptr;
+TQPixmap *KOAgendaItem::organizerPxmp = nullptr;
 
 //--------------------------------------------------------------------------
 
@@ -73,7 +73,7 @@ KOAgendaItem::KOAgendaItem( Calendar *calendar, Incidence *incidence,
   mIconGroup( false ), mIconGroupTentative( false ), mIconOrganizer( false ),
   mSpecialEvent( false ),
   mItemPos( itemPos ), mItemCount( itemCount ),
-  mMultiItemInfo( 0 ), mStartMoveInfo( 0 )
+  mMultiItemInfo( nullptr ), mStartMoveInfo( nullptr )
 {
   setBackgroundMode( TQt::NoBackground );
 
@@ -164,7 +164,7 @@ bool KOAgendaItem::dissociateFromMultiItem()
                             lastItem );
   }
   delete mMultiItemInfo;
-  mMultiItemInfo = 0;
+  mMultiItemInfo = nullptr;
   return true;
 }
 
@@ -239,7 +239,7 @@ KOAgendaItem* KOAgendaItem::prependMoveItem(KOAgendaItem* e)
 {
   if (!e) return e;
 
-  KOAgendaItem*first=0, *last=0;
+  KOAgendaItem*first=nullptr, *last=nullptr;
   if (isMultiItem()) {
     first=mMultiItemInfo->mFirstMultiItem;
     last=mMultiItemInfo->mLastMultiItem;
@@ -247,7 +247,7 @@ KOAgendaItem* KOAgendaItem::prependMoveItem(KOAgendaItem* e)
   if (!first) first=this;
   if (!last) last=this;
 
-  e->setMultiItem(0, 0, first, last);
+  e->setMultiItem(nullptr, nullptr, first, last);
   first->setMultiItem(e, e, first->nextMultiItem(), first->lastMultiItem() );
 
   KOAgendaItem*tmp=first->nextMultiItem();
@@ -260,7 +260,7 @@ KOAgendaItem* KOAgendaItem::prependMoveItem(KOAgendaItem* e)
     e->mStartMoveInfo=new MultiItemInfo( *mStartMoveInfo );
 //    e->moveInfo()->mFirstMultiItem = moveInfo()->mFirstMultiItem;
 //    e->moveInfo()->mLastMultiItem = moveInfo()->mLastMultiItem;
-    e->moveInfo()->mPrevMultiItem = 0;
+    e->moveInfo()->mPrevMultiItem = nullptr;
     e->moveInfo()->mNextMultiItem = first;
   }
 
@@ -274,7 +274,7 @@ KOAgendaItem* KOAgendaItem::appendMoveItem(KOAgendaItem* e)
 {
   if (!e) return e;
 
-  KOAgendaItem*first=0, *last=0;
+  KOAgendaItem*first=nullptr, *last=nullptr;
   if (isMultiItem()) {
     first=mMultiItemInfo->mFirstMultiItem;
     last=mMultiItemInfo->mLastMultiItem;
@@ -282,7 +282,7 @@ KOAgendaItem* KOAgendaItem::appendMoveItem(KOAgendaItem* e)
   if (!first) first=this;
   if (!last) last=this;
 
-  e->setMultiItem( first, last, 0, 0 );
+  e->setMultiItem( first, last, nullptr, nullptr );
   KOAgendaItem*tmp=first;
 
   while (tmp) {
@@ -296,7 +296,7 @@ KOAgendaItem* KOAgendaItem::appendMoveItem(KOAgendaItem* e)
 //    e->moveInfo()->mFirstMultiItem = moveInfo()->mFirstMultiItem;
 //    e->moveInfo()->mLastMultiItem = moveInfo()->mLastMultiItem;
     e->moveInfo()->mPrevMultiItem = last;
-    e->moveInfo()->mNextMultiItem = 0;
+    e->moveInfo()->mNextMultiItem = nullptr;
   }
   if (last && last->moveInfo()) {
     last->moveInfo()->mNextMultiItem = e;
@@ -314,18 +314,18 @@ KOAgendaItem* KOAgendaItem::removeMoveItem(KOAgendaItem* e)
     if (!last) last = this;
     if ( first==e ) {
       first = first->nextMultiItem();
-      first->setMultiItem( 0, 0, first->nextMultiItem(), first->lastMultiItem() );
+      first->setMultiItem( nullptr, nullptr, first->nextMultiItem(), first->lastMultiItem() );
     }
     if ( last==e ) {
       last=last->prevMultiItem();
-      last->setMultiItem( last->firstMultiItem(), last->prevMultiItem(), 0, 0 );
+      last->setMultiItem( last->firstMultiItem(), last->prevMultiItem(), nullptr, nullptr );
     }
 
     KOAgendaItem *tmp =  first;
     if ( first==last ) {
       delete mMultiItemInfo;
-      tmp = 0;
-      mMultiItemInfo = 0;
+      tmp = nullptr;
+      mMultiItemInfo = nullptr;
     }
     while ( tmp ) {
       next = tmp->nextMultiItem();
@@ -336,7 +336,7 @@ KOAgendaItem* KOAgendaItem::removeMoveItem(KOAgendaItem* e)
       if ( e==prev ) {
         prev = prev->prevMultiItem();
       }
-      tmp->setMultiItem((tmp==first)?0:first, (tmp==prev)?0:prev, (tmp==next)?0:next, (tmp==last)?0:last);
+      tmp->setMultiItem((tmp==first)?nullptr:first, (tmp==prev)?nullptr:prev, (tmp==next)?nullptr:next, (tmp==last)?nullptr:last);
       tmp = tmp->nextMultiItem();
     }
   }
@@ -367,10 +367,10 @@ void KOAgendaItem::startMovePrivate()
     mStartMoveInfo->mPrevMultiItem = mMultiItemInfo->mPrevMultiItem;
     mStartMoveInfo->mNextMultiItem = mMultiItemInfo->mNextMultiItem;
   } else {
-    mStartMoveInfo->mFirstMultiItem = 0;
-    mStartMoveInfo->mLastMultiItem = 0;
-    mStartMoveInfo->mPrevMultiItem = 0;
-    mStartMoveInfo->mNextMultiItem = 0;
+    mStartMoveInfo->mFirstMultiItem = nullptr;
+    mStartMoveInfo->mLastMultiItem = nullptr;
+    mStartMoveInfo->mPrevMultiItem = nullptr;
+    mStartMoveInfo->mNextMultiItem = nullptr;
   }
   if ( isMultiItem() && mMultiItemInfo->mNextMultiItem )
   {
@@ -410,7 +410,7 @@ void KOAgendaItem::resetMovePrivate()
       if ( !mStartMoveInfo->mFirstMultiItem ) {
         // This was the first multi-item when the move started, delete all previous
         KOAgendaItem*toDel=mStartMoveInfo->mPrevMultiItem;
-        KOAgendaItem*nowDel=0L;
+        KOAgendaItem*nowDel=nullptr;
         while (toDel) {
           nowDel=toDel;
           if (nowDel->moveInfo()) {
@@ -418,13 +418,13 @@ void KOAgendaItem::resetMovePrivate()
           }
           emit removeAgendaItem( nowDel );
         }
-        mMultiItemInfo->mFirstMultiItem = 0L;
-        mMultiItemInfo->mPrevMultiItem = 0L;
+        mMultiItemInfo->mFirstMultiItem = nullptr;
+        mMultiItemInfo->mPrevMultiItem = nullptr;
       }
       if ( !mStartMoveInfo->mLastMultiItem ) {
         // This was the last multi-item when the move started, delete all next
         KOAgendaItem*toDel=mStartMoveInfo->mNextMultiItem;
-        KOAgendaItem*nowDel=0L;
+        KOAgendaItem*nowDel=nullptr;
         while (toDel) {
           nowDel=toDel;
           if (nowDel->moveInfo()) {
@@ -432,18 +432,18 @@ void KOAgendaItem::resetMovePrivate()
           }
           emit removeAgendaItem( nowDel );
         }
-        mMultiItemInfo->mLastMultiItem = 0L;
-        mMultiItemInfo->mNextMultiItem = 0L;
+        mMultiItemInfo->mLastMultiItem = nullptr;
+        mMultiItemInfo->mNextMultiItem = nullptr;
       }
 
-      if ( mStartMoveInfo->mFirstMultiItem==0 && mStartMoveInfo->mLastMultiItem==0 ) {
+      if ( !mStartMoveInfo->mFirstMultiItem && !mStartMoveInfo->mLastMultiItem ) {
         // it was a single-day event before we started the move.
         delete mMultiItemInfo;
-        mMultiItemInfo = 0;
+        mMultiItemInfo = nullptr;
       }
     }
     delete mStartMoveInfo;
-    mStartMoveInfo = 0;
+    mStartMoveInfo = nullptr;
   }
   emit showAgendaItem( this );
   if ( nextMultiItem() ) {
@@ -464,7 +464,7 @@ void KOAgendaItem::endMovePrivate()
     // if first, delete all previous
     if ( !firstMultiItem() || firstMultiItem()==this ) {
       KOAgendaItem*toDel=mStartMoveInfo->mPrevMultiItem;
-      KOAgendaItem*nowDel = 0;
+      KOAgendaItem*nowDel = nullptr;
       while (toDel) {
         nowDel=toDel;
         if (nowDel->moveInfo()) {
@@ -476,7 +476,7 @@ void KOAgendaItem::endMovePrivate()
     // if last, delete all next
     if ( !lastMultiItem() || lastMultiItem()==this ) {
       KOAgendaItem*toDel=mStartMoveInfo->mNextMultiItem;
-      KOAgendaItem*nowDel = 0;
+      KOAgendaItem*nowDel = nullptr;
       while (toDel) {
         nowDel=toDel;
         if (nowDel->moveInfo()) {
@@ -487,7 +487,7 @@ void KOAgendaItem::endMovePrivate()
     }
     // also delete the moving info
     delete mStartMoveInfo;
-    mStartMoveInfo=0;
+    mStartMoveInfo=nullptr;
     if ( nextMultiItem() )
       nextMultiItem()->endMovePrivate();
   }
@@ -537,7 +537,7 @@ void KOAgendaItem::expandRight(int dx)
 
 TQToolTipGroup *KOAgendaItem::toolTipGroup()
 {
-  if (!mToolTipGroup) mToolTipGroup = new TQToolTipGroup(0);
+  if (!mToolTipGroup) mToolTipGroup = new TQToolTipGroup(nullptr);
   return mToolTipGroup;
 }
 
@@ -616,7 +616,7 @@ void KOAgendaItem::setConflictItems( TQPtrList<KOAgendaItem> ci )
 {
   mConflictItems = ci;
   KOAgendaItem *item;
-  for ( item = mConflictItems.first(); item != 0;
+  for ( item = mConflictItems.first(); item;
         item = mConflictItems.next() ) {
     item->addConflictItem( this );
   }
diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h
index eea5f68ff..98223acff 100644
--- a/korganizer/koagendaitem.h
+++ b/korganizer/koagendaitem.h
@@ -80,7 +80,7 @@ class KOAgendaItem : public TQWidget, public KOrg::CellItem
     KOAgendaItem( Calendar *calendar, Incidence *incidence, const TQDate &qd,
                   TQWidget *parent,
                   int itemPos, int itemCount,
-                  const char *name = 0, WFlags f = 0 );
+                  const char *name = nullptr, WFlags f = 0 );
 
     int cellXLeft() const { return mCellXLeft; }
     int cellXRight() const { return mCellXRight; }
@@ -111,18 +111,18 @@ class KOAgendaItem : public TQWidget, public KOrg::CellItem
     void expandRight(int dx);
 
     bool isMultiItem();
-    KOAgendaItem *prevMoveItem() const { return (mStartMoveInfo)?(mStartMoveInfo->mPrevMultiItem):0; }
-    KOAgendaItem *nextMoveItem() const { return (mStartMoveInfo)?(mStartMoveInfo->mNextMultiItem):0; }
+    KOAgendaItem *prevMoveItem() const { return (mStartMoveInfo)?(mStartMoveInfo->mPrevMultiItem):nullptr; }
+    KOAgendaItem *nextMoveItem() const { return (mStartMoveInfo)?(mStartMoveInfo->mNextMultiItem):nullptr; }
     MultiItemInfo *moveInfo() const { return mStartMoveInfo; }
     void setMultiItem(KOAgendaItem *first,KOAgendaItem *prev,
                       KOAgendaItem *next, KOAgendaItem *last);
     KOAgendaItem *prependMoveItem(KOAgendaItem*);
     KOAgendaItem *appendMoveItem(KOAgendaItem*);
     KOAgendaItem *removeMoveItem(KOAgendaItem*);
-    KOAgendaItem *firstMultiItem() const { return (mMultiItemInfo)?(mMultiItemInfo->mFirstMultiItem):0; }
-    KOAgendaItem *prevMultiItem() const { return (mMultiItemInfo)?(mMultiItemInfo->mPrevMultiItem):0; }
-    KOAgendaItem *nextMultiItem() const { return (mMultiItemInfo)?(mMultiItemInfo->mNextMultiItem):0; }
-    KOAgendaItem *lastMultiItem() const { return (mMultiItemInfo)?(mMultiItemInfo->mLastMultiItem):0; }
+    KOAgendaItem *firstMultiItem() const { return (mMultiItemInfo)?(mMultiItemInfo->mFirstMultiItem):nullptr; }
+    KOAgendaItem *prevMultiItem() const { return (mMultiItemInfo)?(mMultiItemInfo->mPrevMultiItem):nullptr; }
+    KOAgendaItem *nextMultiItem() const { return (mMultiItemInfo)?(mMultiItemInfo->mNextMultiItem):nullptr; }
+    KOAgendaItem *lastMultiItem() const { return (mMultiItemInfo)?(mMultiItemInfo->mLastMultiItem):nullptr; }
 
     bool dissociateFromMultiItem();
 
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index e90f068bc..42baa3eae 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -251,18 +251,18 @@ KOAgendaView::KOAgendaView( Calendar *cal,
                             TQWidget *parent,
                             const char *name,
                             bool isSideBySide ) :
-  KOrg::AgendaView (cal, parent,name), mExpandButton( 0 ),
+  KOrg::AgendaView (cal, parent,name), mExpandButton( nullptr ),
   mAllowAgendaUpdate( true ),
-  mUpdateItem( 0 ),
+  mUpdateItem( nullptr ),
   mIsSideBySide( isSideBySide ),
   mPendingChanges( true ),
   mAreDatesInitialized( false )
 {
   mSelectedDates.append(TQDate::currentDate());
 
-  mLayoutDayLabels = 0;
-  mDayLabelsFrame = 0;
-  mDayLabels = 0;
+  mLayoutDayLabels = nullptr;
+  mDayLabelsFrame = nullptr;
+  mDayLabels = nullptr;
 
   bool isRTL = KOGlobals::self()->reverseLayout();
 
@@ -1139,7 +1139,7 @@ void KOAgendaView::doUpdateItem()
 {
   if ( mUpdateItem ) {
     changeIncidenceDisplay( mUpdateItem, KOGlobals::INCIDENCEEDITED );
-    mUpdateItem = 0;
+    mUpdateItem = nullptr;
   }
 }
 
@@ -1410,7 +1410,7 @@ void KOAgendaView::fillAgenda()
   deleteSelectedDateTime();
 
   if( !somethingReselected ) {
-    emit incidenceSelected( 0, TQDate() );
+    emit incidenceSelected( nullptr, TQDate() );
   }
 }
 
@@ -1571,7 +1571,7 @@ void KOAgendaView::slotTodoDropped( Todo *todo, const TQPoint &gpos, bool allDay
       todo->setDtDue( newTime );
       todo->setFloats( allDay );
       todo->setHasDueDate( true );
-      if ( !mChanger->addIncidence( todo, 0, TQString(), this ) ) {
+      if ( !mChanger->addIncidence( todo, nullptr, TQString(), this ) ) {
         KODialogManager::errorSaveIncidence( this, todo );
       }
     }
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h
index bbc9c2357..1092ed6a7 100644
--- a/korganizer/koagendaview.h
+++ b/korganizer/koagendaview.h
@@ -54,8 +54,8 @@ class EventIndicator : public TQFrame
   
   public:
     enum Location { Top, Bottom };
-    EventIndicator( Location loc = Top, TQWidget *parent = 0,
-                    const char *name = 0 );
+    EventIndicator( Location loc = Top, TQWidget *parent = nullptr,
+                    const char *name = nullptr );
     virtual ~EventIndicator();
 
     void changeColumns( int columns );
@@ -79,7 +79,7 @@ class KOAlternateLabel : public TQLabel
   public:
     KOAlternateLabel( const TQString &shortlabel, const TQString &longlabel,
                       const TQString &extensivelabel = TQString(),
-                      TQWidget *parent = 0, const char *name = 0 );
+                      TQWidget *parent = nullptr, const char *name = nullptr );
     ~KOAlternateLabel();
 
     virtual TQSize minimumSizeHint() const;
@@ -112,8 +112,8 @@ class KOAgendaView : public KOrg::AgendaView, public KCal::Calendar::Observer
   public:
     KOAgendaView( Calendar *cal,
                   CalendarView *calendarView,
-                  TQWidget *parent = 0,
-                  const char *name = 0,
+                  TQWidget *parent = nullptr,
+                  const char *name = nullptr,
                   bool isSideBySide = false );
     virtual ~KOAgendaView();
 
diff --git a/korganizer/koattendeeeditor.cpp b/korganizer/koattendeeeditor.cpp
index 5c8ddc39f..400f0f97a 100644
--- a/korganizer/koattendeeeditor.cpp
+++ b/korganizer/koattendeeeditor.cpp
@@ -307,14 +307,14 @@ void KOAttendeeEditor::readEvent(KCal::Incidence * incidence)
   } else { // someone else is the organizer
     if ( mOrganizerCombo ) {
       delete mOrganizerCombo;
-      mOrganizerCombo = 0;
+      mOrganizerCombo = nullptr;
     }
     mOrganizerLabel->setText( i18n( "Organizer: %1" ).arg( incidence->organizer().fullName() ) );
   }
 
   Attendee::List al = incidence->attendees();
   Attendee::List::ConstIterator it;
-  Attendee *first = 0;
+  Attendee *first = nullptr;
   for( it = al.begin(); it != al.end(); ++it ) {
     Attendee *a = new Attendee( **it );
     if ( !first ) {
@@ -538,7 +538,7 @@ void KOAttendeeEditor::declineForMe()
 bool KOAttendeeEditor::eventFilter(TQObject *watched, TQEvent *ev)
 {
   if ( watched && watched == mNameEdit && ev->type() == TQEvent::FocusIn &&
-       currentAttendee() == 0 ) {
+       !currentAttendee() ) {
     addNewAttendee();
   }
 
diff --git a/korganizer/koattendeeeditor.h b/korganizer/koattendeeeditor.h
index 042419fdf..54b8a63a5 100644
--- a/korganizer/koattendeeeditor.h
+++ b/korganizer/koattendeeeditor.h
@@ -49,7 +49,7 @@ class KOAttendeeEditor : public TQWidget
   TQ_OBJECT
   
   public:
-    KOAttendeeEditor( TQWidget *parent, const char *name = 0 );
+    KOAttendeeEditor( TQWidget *parent, const char *name = nullptr );
 
     virtual void insertAttendee( KCal::Attendee *attendee, bool fetchFB = true ) = 0;
     virtual void removeAttendee( KCal::Attendee *attendee ) = 0;
@@ -76,7 +76,7 @@ class KOAttendeeEditor : public TQWidget
      * from the addressbook and expanding distribution lists.
      * The optional Attendee parameter can be used to pass in default values
      * to be used by the new Attendee. */
-    void insertAttendeeFromAddressee( const TDEABC::Addressee &a, const KCal::Attendee* at=0 );
+    void insertAttendeeFromAddressee( const TDEABC::Addressee &a, const KCal::Attendee* at=nullptr );
 
     void fillOrganizerCombo();
     virtual TQListViewItem* hasExampleAttendee() const = 0;
diff --git a/korganizer/kocore.cpp b/korganizer/kocore.cpp
index 5ff8a0d4c..fd9fc7270 100644
--- a/korganizer/kocore.cpp
+++ b/korganizer/kocore.cpp
@@ -41,7 +41,7 @@
 
 #include <tqwidget.h>
 
-KOCore *KOCore::mSelf = 0;
+KOCore *KOCore::mSelf = nullptr;
 
 KOCore *KOCore::self()
 {
@@ -53,13 +53,13 @@ KOCore *KOCore::self()
 }
 
 KOCore::KOCore()
-  : mCalendarDecorationsLoaded( false ), mIdentityManager( 0 )
+  : mCalendarDecorationsLoaded( false ), mIdentityManager( nullptr )
 {
 }
 
 KOCore::~KOCore()
 {
-  mSelf = 0;
+  mSelf = nullptr;
 }
 
 TDETrader::OfferList KOCore::availablePlugins( const TQString &type, int version )
@@ -102,7 +102,7 @@ KOrg::Plugin *KOCore::loadPlugin( KService::Ptr service )
   kdDebug(5850) << "loadPlugin: library: " << service->library() << endl;
 
   if ( !service->hasServiceType( KOrg::Plugin::serviceType() ) ) {
-    return 0;
+    return nullptr;
   }
 
   KLibFactory *factory = KLibLoader::self()->factory(
@@ -110,7 +110,7 @@ KOrg::Plugin *KOCore::loadPlugin( KService::Ptr service )
 
   if ( !factory ) {
     kdDebug(5850) << "KOCore::loadPlugin(): Factory creation failed" << endl;
-    return 0;
+    return nullptr;
   }
 
   KOrg::PluginFactory *pluginFactory =
@@ -118,7 +118,7 @@ KOrg::Plugin *KOCore::loadPlugin( KService::Ptr service )
 
   if ( !pluginFactory ) {
     kdDebug(5850) << "KOCore::loadPlugin(): Cast to KOrg::PluginFactory failed" << endl;
-    return 0;
+    return nullptr;
   }
 
   return pluginFactory->create();
@@ -133,7 +133,7 @@ KOrg::Plugin *KOCore::loadPlugin( const TQString &name )
       return loadPlugin( *it );
     }
   }
-  return 0;
+  return nullptr;
 }
 
 KOrg::CalendarDecoration *KOCore::loadCalendarDecoration(KService::Ptr service)
@@ -144,7 +144,7 @@ KOrg::CalendarDecoration *KOCore::loadCalendarDecoration(KService::Ptr service)
 
   if (!factory) {
     kdDebug(5850) << "KOCore::loadCalendarDecoration(): Factory creation failed" << endl;
-    return 0;
+    return nullptr;
   }
 
   KOrg::CalendarDecorationFactory *pluginFactory =
@@ -152,7 +152,7 @@ KOrg::CalendarDecoration *KOCore::loadCalendarDecoration(KService::Ptr service)
 
   if (!pluginFactory) {
     kdDebug(5850) << "KOCore::loadCalendarDecoration(): Cast failed" << endl;
-    return 0;
+    return nullptr;
   }
 
   return pluginFactory->create();
@@ -167,7 +167,7 @@ KOrg::CalendarDecoration *KOCore::loadCalendarDecoration( const TQString &name )
       return loadCalendarDecoration( *it );
     }
   }
-  return 0;
+  return nullptr;
 }
 
 KOrg::Part *KOCore::loadPart( KService::Ptr service, KOrg::MainWindow *parent )
@@ -175,7 +175,7 @@ KOrg::Part *KOCore::loadPart( KService::Ptr service, KOrg::MainWindow *parent )
   kdDebug(5850) << "loadPart: library: " << service->library() << endl;
 
   if ( !service->hasServiceType( KOrg::Part::serviceType() ) ) {
-    return 0;
+    return nullptr;
   }
 
   KLibFactory *factory = KLibLoader::self()->factory(
@@ -183,7 +183,7 @@ KOrg::Part *KOCore::loadPart( KService::Ptr service, KOrg::MainWindow *parent )
 
   if ( !factory ) {
     kdDebug(5850) << "KOCore::loadPart(): Factory creation failed" << endl;
-    return 0;
+    return nullptr;
   }
 
   KOrg::PartFactory *pluginFactory =
@@ -191,7 +191,7 @@ KOrg::Part *KOCore::loadPart( KService::Ptr service, KOrg::MainWindow *parent )
 
   if ( !pluginFactory ) {
     kdDebug(5850) << "KOCore::loadPart(): Cast failed" << endl;
-    return 0;
+    return nullptr;
   }
 
   return pluginFactory->create( parent );
@@ -202,7 +202,7 @@ KOrg::PrintPlugin *KOCore::loadPrintPlugin( KService::Ptr service )
   kdDebug(5850) << "loadPart: print plugin in library: " << service->library() << endl;
 
   if ( !service->hasServiceType( KOrg::PrintPlugin::serviceType() ) ) {
-    return 0;
+    return nullptr;
   }
 
   KLibFactory *factory = KLibLoader::self()->factory(
@@ -210,7 +210,7 @@ KOrg::PrintPlugin *KOCore::loadPrintPlugin( KService::Ptr service )
 
   if ( !factory ) {
     kdDebug(5850) << "KOCore::loadPrintPlugin(): Factory creation failed" << endl;
-    return 0;
+    return nullptr;
   }
 
   KOrg::PrintPluginFactory *pluginFactory =
@@ -218,7 +218,7 @@ KOrg::PrintPlugin *KOCore::loadPrintPlugin( KService::Ptr service )
 
   if ( !pluginFactory ) {
     kdDebug(5850) << "KOCore::loadPrintPlugins(): Cast failed" << endl;
-    return 0;
+    return nullptr;
   }
 
   return pluginFactory->create();
@@ -241,7 +241,7 @@ KXMLGUIClient* KOCore::xmlguiClient( TQWidget *wdg ) const
   if ( it != mXMLGUIClients.end() )
     return it.data();
 
-  return 0;
+  return nullptr;
 }
 
 KOrg::Part *KOCore::loadPart( const TQString &name, KOrg::MainWindow *parent )
@@ -253,7 +253,7 @@ KOrg::Part *KOCore::loadPart( const TQString &name, KOrg::MainWindow *parent )
       return loadPart( *it, parent );
     }
   }
-  return 0;
+  return nullptr;
 }
 
 KOrg::PrintPlugin *KOCore::loadPrintPlugin( const TQString &name )
@@ -265,7 +265,7 @@ KOrg::PrintPlugin *KOCore::loadPrintPlugin( const TQString &name )
       return loadPrintPlugin( *it );
     }
   }
-  return 0;
+  return nullptr;
 }
 
 KOrg::CalendarDecoration::List KOCore::calendarDecorations()
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index ad2cdf496..a3b656def 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -100,7 +100,7 @@ const int KODayMatrix::NOSELECTION = -1000;
 const int KODayMatrix::NUMDAYS = 42;
 
 KODayMatrix::KODayMatrix( TQWidget *parent, const char *name )
-  : TQFrame( parent, name ), mCalendar( 0 ), mStartDate(), mPendingChanges( false )
+  : TQFrame( parent, name ), mCalendar( nullptr ), mStartDate(), mPendingChanges( false )
 {
   // initialize dynamic arrays
   mDays = new TQDate[ NUMDAYS ];
@@ -330,7 +330,7 @@ TQString KODayMatrix::getHolidayLabel( int offset )
 {
   if ( offset < 0 || offset > NUMDAYS - 1 ) {
     kdDebug(5850) << "Wrong offset (" << offset << ") in KODayMatrix::getHolidayLabel(int)" << endl;
-    return 0;
+    return nullptr;
   }
   return mHolidays[ offset ];
 }
@@ -495,8 +495,8 @@ void KODayMatrix::dropEvent( TQDropEvent *e )
     return;
   }
 
-  Todo *existingTodo = 0;
-  Event *existingEvent = 0;
+  Todo *existingTodo = nullptr;
+  Event *existingEvent = nullptr;
 
   // Find the incidence in the calendar, then we don't need the drag object any more
   if ( event ) existingEvent = mCalendar->event( event->uid() );
diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp
index 17bb056ce..497962cc6 100644
--- a/korganizer/kodialogmanager.cpp
+++ b/korganizer/kodialogmanager.cpp
@@ -54,7 +54,7 @@
 class KODialogManager::DialogManagerVisitor : public IncidenceBase::Visitor
 {
   public:
-    DialogManagerVisitor() : mDialogManager( 0 ) {}
+    DialogManagerVisitor() : mDialogManager( nullptr ) {}
 
     bool act( IncidenceBase *incidence, KODialogManager *manager )
     {
@@ -70,7 +70,7 @@ class KODialogManager::EditorDialogVisitor :
       public KODialogManager::DialogManagerVisitor
 {
   public:
-    EditorDialogVisitor() : DialogManagerVisitor(), mEditor( 0 ) {}
+    EditorDialogVisitor() : DialogManagerVisitor(), mEditor( nullptr ) {}
     KOIncidenceEditor *editor() const { return mEditor; }
   protected:
     bool visit( Event * ) { mEditor = mDialogManager->getEventEditor(); return mEditor; }
@@ -84,10 +84,10 @@ class KODialogManager::EditorDialogVisitor :
 KODialogManager::KODialogManager( CalendarView *mainView ) :
   TQObject(), mMainView( mainView )
 {
-  mOptionsDialog = 0;
-  mSearchDialog = 0;
-  mArchiveDialog = 0;
-  mFilterEditDialog = 0;
+  mOptionsDialog = nullptr;
+  mSearchDialog = nullptr;
+  mArchiveDialog = nullptr;
+  mFilterEditDialog = nullptr;
 
   mCategoryEditDialog = new KPIM::CategoryEditDialog( KOPrefs::instance(), mMainView );
   // don't set any specific parent for the dialog, as its kept around and reused
@@ -220,12 +220,12 @@ void KODialogManager::showFilterEditDialog( TQPtrList<CalFilter> *filters )
 
 KOIncidenceEditor *KODialogManager::getEditor( Incidence *incidence )
 {
-  if ( !incidence ) return 0;
+  if ( !incidence ) return nullptr;
   EditorDialogVisitor v;
   if ( v.act( incidence, this ) ) {
     return v.editor();
   } else
-    return 0;
+    return nullptr;
 }
 
 KOEventEditor *KODialogManager::getEventEditor()
diff --git a/korganizer/koeditoralarms.cpp b/korganizer/koeditoralarms.cpp
index e7d1beb96..6fcffd57b 100644
--- a/korganizer/koeditoralarms.cpp
+++ b/korganizer/koeditoralarms.cpp
@@ -74,7 +74,7 @@ AlarmListViewItem::AlarmListViewItem( TQListView *parent, KCal::Alarm *alarm,
   if ( alarm ) {
     mAlarm = new KCal::Alarm( *alarm );
   } else {
-    mAlarm = new KCal::Alarm( 0 );
+    mAlarm = new KCal::Alarm( nullptr );
     mAlarm->setType( KCal::Alarm::Display );
     int duration; // in secs
     switch( KOPrefs::instance()->mReminderTimeUnits ) {
@@ -191,7 +191,7 @@ KOEditorAlarms::KOEditorAlarms( const TQCString &type,
                                 KCal::Alarm::List *alarms, TQWidget *parent,
                                 const char *name )
   : KDialogBase( parent, name, true, i18n("Advanced Reminders"), Ok | Cancel ),
-    mType( type ), mAlarms( alarms ),mCurrentItem( 0 )
+    mType( type ), mAlarms( alarms ),mCurrentItem( nullptr )
 {
   if ( mType != "Todo" ) {
     // only Todos and Events can have reminders
@@ -428,7 +428,7 @@ void KOEditorAlarms::slotOk()
 
 void KOEditorAlarms::slotAdd()
 {
-  mCurrentItem = new AlarmListViewItem( mWidget->mAlarmList, 0, mType );
+  mCurrentItem = new AlarmListViewItem( mWidget->mAlarmList, nullptr, mType );
   mWidget->mAlarmList->setCurrentItem( mCurrentItem );
 }
 
diff --git a/korganizer/koeditoralarms.h b/korganizer/koeditoralarms.h
index 188557334..d18abd725 100644
--- a/korganizer/koeditoralarms.h
+++ b/korganizer/koeditoralarms.h
@@ -37,8 +37,8 @@ class KOEditorAlarms : public KDialogBase
   
   public:
     KOEditorAlarms( const TQCString &type,
-                    KCal::Alarm::List *alarms, TQWidget *parent = 0,
-                    const char *name = 0 );
+                    KCal::Alarm::List *alarms, TQWidget *parent = nullptr,
+                    const char *name = nullptr );
     ~KOEditorAlarms();
 
   protected slots:
diff --git a/korganizer/koeditorattachments.cpp b/korganizer/koeditorattachments.cpp
index 833dd99bd..95b427b27 100644
--- a/korganizer/koeditorattachments.cpp
+++ b/korganizer/koeditorattachments.cpp
@@ -164,8 +164,8 @@ class AttachmentListItem : public TDEIconViewItem
 
 AttachmentEditDialog::AttachmentEditDialog( AttachmentListItem *item,
                                             TQWidget *parent )
-  : KDialogBase ( Plain, i18n( "Add Attachment" ), Ok|Cancel, Ok, parent, 0, false, false ),
-    mItem( item ), mURLRequester( 0 )
+  : KDialogBase ( Plain, i18n( "Add Attachment" ), Ok|Cancel, Ok, parent, nullptr, false, false ),
+    mItem( item ), mURLRequester( nullptr )
 {
   TQFrame *topFrame = plainPage();
   TQVBoxLayout *vbl = new TQVBoxLayout( topFrame, 0, spacingHint() );
@@ -388,7 +388,7 @@ TQDragObject * AttachmentIconView::dragObject()
   for ( TQIconViewItem *it = firstItem( ); it; it = it->nextItem( ) ) {
     if ( !it->isSelected() ) continue;
     AttachmentListItem * item = dynamic_cast<AttachmentListItem*>( it );
-    if ( !item ) return 0;
+    if ( !item ) return nullptr;
     KCal::Attachment * att = item->attachment();
     assert( att );
     KURL url;
@@ -649,7 +649,7 @@ void KOEditorAttachments::saveAttachment( TQIconViewItem *item )
 
 void KOEditorAttachments::slotAdd()
 {
-  AttachmentListItem *item = new AttachmentListItem( 0, mAttachments );
+  AttachmentListItem *item = new AttachmentListItem( nullptr, mAttachments );
 
   AttachmentEditDialog *dlg = new AttachmentEditDialog( item, mAttachments )
 ;
@@ -776,7 +776,7 @@ void KOEditorAttachments::addUriAttachment( const TQString &uri,
                                             bool inLine )
 {
   if ( !inLine ) {
-    AttachmentListItem *item = new AttachmentListItem( 0, mAttachments );
+    AttachmentListItem *item = new AttachmentListItem( nullptr, mAttachments );
     item->setUri( uri );
     item->setLabel( label );
     if ( mimeType.isEmpty() ) {
@@ -811,7 +811,7 @@ void KOEditorAttachments::addDataAttachment( const TQByteArray &data,
                                              const TQString &mimeType,
                                              const TQString &label )
 {
-  AttachmentListItem *item = new AttachmentListItem( 0, mAttachments );
+  AttachmentListItem *item = new AttachmentListItem( nullptr, mAttachments );
 
   TQString nlabel = label;
   if ( mimeType == "message/rfc822" ) {
@@ -894,7 +894,7 @@ void KOEditorAttachments::selectionChanged()
 
 void KOEditorAttachments::contextMenu(TQIconViewItem * item, const TQPoint & pos)
 {
-  const bool enable = item != 0;
+  const bool enable = item != nullptr;
 
   int numSelected = 0;
   for ( TQIconViewItem *item = mAttachments->firstItem(); item; item = item->nextItem() ) {
diff --git a/korganizer/koeditorattachments.h b/korganizer/koeditorattachments.h
index adeded3a4..429714d55 100644
--- a/korganizer/koeditorattachments.h
+++ b/korganizer/koeditorattachments.h
@@ -59,7 +59,7 @@ class AttachmentEditDialog : public KDialogBase
   TQ_OBJECT
   
   public:
-    AttachmentEditDialog( AttachmentListItem *item, TQWidget *parent=0 );
+    AttachmentEditDialog( AttachmentListItem *item, TQWidget *parent=nullptr );
 
     void accept();
 
@@ -83,8 +83,8 @@ class KOEditorAttachments : public TQWidget
     TQ_OBJECT
   
   public:
-    KOEditorAttachments( int spacing = 8, TQWidget *parent = 0,
-                         const char *name = 0 );
+    KOEditorAttachments( int spacing = 8, TQWidget *parent = nullptr,
+                         const char *name = nullptr );
     ~KOEditorAttachments();
 
     void addUriAttachment( const TQString &uri,
@@ -156,7 +156,7 @@ class AttachmentIconView : public TDEIconView
 
   friend class KOEditorAttachments;
   public:
-    AttachmentIconView( KOEditorAttachments* parent=0 );
+    AttachmentIconView( KOEditorAttachments* parent=nullptr );
     KURL tempFileForAttachment( KCal::Attachment *attachment );
     TQDragObject *mimeData();
     ~AttachmentIconView();
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index 9d570f168..02d1a18c9 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -240,7 +240,7 @@ void KOEditorDetails::removeAttendee()
 
   AttendeeListItem *nextSelectedItem = static_cast<AttendeeListItem*>( aItem->nextSibling() );
   if( mListView->childCount() == 1 )
-      nextSelectedItem = 0;
+      nextSelectedItem = nullptr;
   if( mListView->childCount() > 1 && aItem == mListView->lastItem() )
       nextSelectedItem = static_cast<AttendeeListItem*>(  mListView->firstChild() );
 
@@ -359,7 +359,7 @@ KCal::Attendee * KOEditorDetails::currentAttendee() const
   TQListViewItem *item = mListView->selectedItem();
   AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item );
   if ( !aItem )
-    return 0;
+    return nullptr;
   return aItem->data();
 }
 
@@ -423,7 +423,7 @@ TQListViewItem* KOEditorDetails::hasExampleAttendee() const
     if ( isExampleAttendee( attendee ) )
         return item;
   }
-  return 0;
+  return nullptr;
 }
 
 #include "koeditordetails.moc"
diff --git a/korganizer/koeditordetails.h b/korganizer/koeditordetails.h
index 418c8edb5..f81303367 100644
--- a/korganizer/koeditordetails.h
+++ b/korganizer/koeditordetails.h
@@ -62,7 +62,7 @@ class KOAttendeeListView : public TDEListView
 TQ_OBJECT
   
 public:
-  KOAttendeeListView (TQWidget *parent=0, const char *name=0);
+  KOAttendeeListView (TQWidget *parent=nullptr, const char *name=nullptr);
   virtual ~KOAttendeeListView();
   virtual void addAttendee( const TQString& newAttendee );
 public slots:
@@ -81,7 +81,7 @@ class KOEditorDetails : public KOAttendeeEditor
     TQ_OBJECT
   
   public:
-    KOEditorDetails (int spacing = 8,TQWidget* parent = 0, const char* name = 0);
+    KOEditorDetails (int spacing = 8,TQWidget* parent = nullptr, const char* name = nullptr);
     virtual ~KOEditorDetails();
 
     /** Set widgets to default values */
diff --git a/korganizer/koeditorfreebusy.cpp b/korganizer/koeditorfreebusy.cpp
index 05db9b5de..c86b5e0c1 100644
--- a/korganizer/koeditorfreebusy.cpp
+++ b/korganizer/koeditorfreebusy.cpp
@@ -75,7 +75,7 @@ class FreeBusyItem : public KDGanttViewTaskItem
     {
       Q_ASSERT( attendee );
       updateItem();
-      setFreeBusyPeriods( 0 );
+      setFreeBusyPeriods( nullptr );
       setDisplaySubitemsAsGroup( true );
       if ( listView () )
           listView ()->setRootIsDecorated( false );
@@ -212,7 +212,7 @@ void FreeBusyItem::setFreeBusyPeriods( FreeBusy* fb )
       //           newSubItem->setColors( TQt::red, TQt::red, TQt::red );
       //       }
       //debug only end
-      setFreeBusy( 0 );
+      setFreeBusy( nullptr );
       setShowNoInformation( true );
   }
 
@@ -808,7 +808,7 @@ KCal::Attendee * KOEditorFreeBusy::currentAttendee() const
   KDGanttViewItem *item = mGanttView->selectedItem();
   FreeBusyItem *aItem = static_cast<FreeBusyItem*>( item );
   if ( !aItem )
-    return 0;
+    return nullptr;
   return aItem->attendee();
 }
 
@@ -830,7 +830,7 @@ void KOEditorFreeBusy::removeAttendee()
 
   FreeBusyItem *nextSelectedItem = static_cast<FreeBusyItem*>( item->nextSibling() );
   if( mGanttView->childCount() == 1 )
-      nextSelectedItem = 0;
+      nextSelectedItem = nullptr;
   if( mGanttView->childCount() > 1 && item == mGanttView->lastItem() )
       nextSelectedItem = static_cast<FreeBusyItem*>(  mGanttView->firstChild() );
 
@@ -923,7 +923,7 @@ void KOEditorFreeBusy::showAttendeeStatusMenu()
 
 void KOEditorFreeBusy::listViewClicked(int button, KDGanttViewItem * item)
 {
-  if ( button == TQt::LeftButton && item == 0 )
+  if ( button == TQt::LeftButton && !item )
     addNewAttendee();
 }
 
@@ -938,8 +938,8 @@ void KOEditorFreeBusy::slotOrganizerChanged(const TQString & newOrganizer)
   if (!success) return;
 //
 
-  Attendee *currentOrganizerAttendee = 0;
-  Attendee *newOrganizerAttendee = 0;
+  Attendee *currentOrganizerAttendee = nullptr;
+  Attendee *newOrganizerAttendee = nullptr;
 
   FreeBusyItem *anItem =
     static_cast<FreeBusyItem *>( mGanttView->firstChild() );
@@ -1000,7 +1000,7 @@ TQListViewItem* KOEditorFreeBusy::hasExampleAttendee() const
     if ( isExampleAttendee( attendee ) )
         return item;
   }
-  return 0;
+  return nullptr;
 }
 
 #include "koeditorfreebusy.moc"
diff --git a/korganizer/koeditorfreebusy.h b/korganizer/koeditorfreebusy.h
index 2af15f44d..87d712cc9 100644
--- a/korganizer/koeditorfreebusy.h
+++ b/korganizer/koeditorfreebusy.h
@@ -47,8 +47,8 @@ class KOEditorFreeBusy : public KOAttendeeEditor
     TQ_OBJECT
   
   public:
-    KOEditorFreeBusy( int spacing = 8, TQWidget *parent = 0,
-                      const char *name = 0 );
+    KOEditorFreeBusy( int spacing = 8, TQWidget *parent = nullptr,
+                      const char *name = nullptr );
     virtual ~KOEditorFreeBusy();
 
     void setUpdateEnabled( bool enabled );
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 54504198a..a7bf41474 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -69,7 +69,7 @@
 #include "kohelper.h"
 
 KOEditorGeneral::KOEditorGeneral( TQObject *parent, const char* name) :
-  TQObject( parent, name ), mAttachments(0)
+  TQObject( parent, name ), mAttachments(nullptr)
 {
   mType = "Event";
   ResourceCached::setEditorWindowOpen(true);
@@ -304,7 +304,7 @@ void KOEditorGeneral::editAlarms()
 {
   if ( mAlarmIsSimple ) {
     mAlarmList.clear();
-    Alarm *al = alarmFromSimplePage( 0 );
+    Alarm *al = alarmFromSimplePage( nullptr );
     if ( al ) {
       mAlarmList.append( al );
     }
@@ -356,7 +356,7 @@ void KOEditorGeneral::setDefaults(bool /*allDay*/)
 {
   mAlarmList.clear();
   updateDefaultAlarmTime();
-  updateAlarmWidgets( 0 );
+  updateAlarmWidgets( nullptr );
 
   mSecrecyCombo->setCurrentItem( Incidence::SecrecyPublic );
   mAttachments->setDefaults();
@@ -485,7 +485,7 @@ void KOEditorGeneral::readIncidence( Incidence *incidence, Calendar *calendar )
   Alarm::List alarms = incidence->alarms();
   for( it = alarms.begin(); it != alarms.end(); ++it ) {
     Alarm *al = new Alarm( *(*it) );
-    al->setParent( 0 );
+    al->setParent( nullptr );
     mAlarmList.append( al );
   }
   updateDefaultAlarmTime();
@@ -505,7 +505,7 @@ void KOEditorGeneral::readIncidence( Incidence *incidence, Calendar *calendar )
 Alarm *KOEditorGeneral::alarmFromSimplePage( Incidence *incidence ) const
 {
   if ( mAlarmButton->isChecked() ) {
-    Alarm *alarm = new Alarm( 0 );
+    Alarm *alarm = new Alarm( nullptr );
     alarm->setDisplayAlarm( "" );
     alarm->setEnabled(true);
     TQString tmpStr = mAlarmTimeEdit->text();
@@ -528,7 +528,7 @@ Alarm *KOEditorGeneral::alarmFromSimplePage( Incidence *incidence ) const
     }
     return alarm;
   } else {
-    return 0;
+    return nullptr;
   }
 }
 void KOEditorGeneral::writeIncidence( Incidence *incidence )
diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h
index b005d6080..7d9f77bcc 100644
--- a/korganizer/koeditorgeneral.h
+++ b/korganizer/koeditorgeneral.h
@@ -68,7 +68,7 @@ class KOEditorGeneral : public TQObject
     TQ_OBJECT
   
   public:
-    KOEditorGeneral (TQObject* parent=0,const char* name=0);
+    KOEditorGeneral (TQObject* parent=nullptr,const char* name=nullptr);
     virtual ~KOEditorGeneral();
 
     void initHeader( TQWidget *parent,TQBoxLayout *topLayout );
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp
index 5f2ecae67..069c85353 100644
--- a/korganizer/koeditorgeneralevent.cpp
+++ b/korganizer/koeditorgeneralevent.cpp
@@ -491,14 +491,14 @@ bool KOEditorGeneralEvent::validateInput()
 
   if (!mAlldayEventCheckbox->isChecked()) {
     if (!mStartTimeEdit->inputIsValid()) {
-      KMessageBox::sorry( 0,
+      KMessageBox::sorry( nullptr,
           i18n("Please specify a valid start time, for example '%1'.")
           .arg( TDEGlobal::locale()->formatTime( TQTime::currentTime() ) ) );
       return false;
     }
 
     if (!mEndTimeEdit->inputIsValid()) {
-      KMessageBox::sorry( 0,
+      KMessageBox::sorry( nullptr,
           i18n("Please specify a valid end time, for example '%1'.")
           .arg( TDEGlobal::locale()->formatTime( TQTime::currentTime() ) ) );
       return false;
@@ -506,14 +506,14 @@ bool KOEditorGeneralEvent::validateInput()
   }
 
   if (!mStartDateEdit->date().isValid()) {
-    KMessageBox::sorry( 0,
+    KMessageBox::sorry( nullptr,
         i18n("Please specify a valid start date, for example '%1'.")
         .arg( TDEGlobal::locale()->formatDate( TQDate::currentDate() ) ) );
     return false;
   }
 
   if (!mEndDateEdit->date().isValid()) {
-    KMessageBox::sorry( 0,
+    KMessageBox::sorry( nullptr,
         i18n("Please specify a valid end date, for example '%1'.")
         .arg( TDEGlobal::locale()->formatDate( TQDate::currentDate() ) ) );
     return false;
@@ -529,7 +529,7 @@ bool KOEditorGeneralEvent::validateInput()
 
   if ( startDt > endDt ) {
     KMessageBox::sorry(
-      0,
+      nullptr,
       i18n( "The event ends before it starts.\n"
             "Please correct dates and times." ) );
     return false;
diff --git a/korganizer/koeditorgeneralevent.h b/korganizer/koeditorgeneralevent.h
index 0483d4006..50d67a50d 100644
--- a/korganizer/koeditorgeneralevent.h
+++ b/korganizer/koeditorgeneralevent.h
@@ -44,7 +44,7 @@ class KOEditorGeneralEvent : public KOEditorGeneral
     TQ_OBJECT
   
   public:
-    KOEditorGeneralEvent (TQObject* parent=0,const char* name=0);
+    KOEditorGeneralEvent (TQObject* parent=nullptr,const char* name=nullptr);
     virtual ~KOEditorGeneralEvent();
 
     void initTime(TQWidget *,TQBoxLayout *);
diff --git a/korganizer/koeditorgeneraljournal.cpp b/korganizer/koeditorgeneraljournal.cpp
index 34191bed4..9603a5468 100644
--- a/korganizer/koeditorgeneraljournal.cpp
+++ b/korganizer/koeditorgeneraljournal.cpp
@@ -194,7 +194,7 @@ bool KOEditorGeneralJournal::validateInput()
 //  kdDebug(5850) << "KOEditorGeneralJournal::validateInput()" << endl;
 
   if (!mDateEdit->date().isValid()) {
-    KMessageBox::sorry( 0,
+    KMessageBox::sorry( nullptr,
         i18n("Please specify a valid date, for example '%1'.")
         .arg( TDEGlobal::locale()->formatDate( TQDate::currentDate() ) ) );
     return false;
diff --git a/korganizer/koeditorgeneraljournal.h b/korganizer/koeditorgeneraljournal.h
index 0de0be427..759c44c01 100644
--- a/korganizer/koeditorgeneraljournal.h
+++ b/korganizer/koeditorgeneraljournal.h
@@ -50,7 +50,7 @@ class KOEditorGeneralJournal : public KOEditorGeneral
   TQ_OBJECT
   
   public:
-    KOEditorGeneralJournal ( TQWidget *parent=0, const char* name=0 );
+    KOEditorGeneralJournal ( TQWidget *parent=nullptr, const char* name=nullptr );
     virtual ~KOEditorGeneralJournal();
 
     void initDate( TQWidget *, TQBoxLayout * );
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index 80a6456ff..1a8d4b5a6 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -489,12 +489,12 @@ bool KOEditorGeneralTodo::validateInput()
 {
   if (mDueCheck->isChecked()) {
     if (!mDueDateEdit->date().isValid()) {
-      KMessageBox::sorry(0,i18n("Please specify a valid due date."));
+      KMessageBox::sorry(nullptr,i18n("Please specify a valid due date."));
       return false;
     }
     if (mTimeButton->isChecked()) {
       if (!mDueTimeEdit->inputIsValid()) {
-        KMessageBox::sorry(0,i18n("Please specify a valid due time."));
+        KMessageBox::sorry(nullptr,i18n("Please specify a valid due time."));
         return false;
       }
     }
@@ -502,12 +502,12 @@ bool KOEditorGeneralTodo::validateInput()
 
   if (mStartCheck->isChecked()) {
     if (!mStartDateEdit->date().isValid()) {
-      KMessageBox::sorry(0,i18n("Please specify a valid start date."));
+      KMessageBox::sorry(nullptr,i18n("Please specify a valid start date."));
       return false;
     }
     if (mTimeButton->isChecked()) {
       if (!mStartTimeEdit->inputIsValid()) {
-        KMessageBox::sorry(0,i18n("Please specify a valid start time."));
+        KMessageBox::sorry(nullptr,i18n("Please specify a valid start time."));
         return false;
       }
     }
@@ -523,7 +523,7 @@ bool KOEditorGeneralTodo::validateInput()
       dueDate.setTime(mDueTimeEdit->getTime());
     }
     if (startDate > dueDate) {
-      KMessageBox::sorry(0,
+      KMessageBox::sorry(nullptr,
                          i18n("The start date cannot be after the due date."));
       return false;
     }
@@ -629,7 +629,7 @@ void KOEditorGeneralTodo::modified (Todo* todo, KOGlobals::HowChanged modificati
     break;
   case KOGlobals::UNKNOWN_MODIFIED: // fall through
   default:
-    readTodo( todo, 0, TQDate() );
+    readTodo( todo, nullptr, TQDate() );
     break;
   }
 }
diff --git a/korganizer/koeditorgeneraltodo.h b/korganizer/koeditorgeneraltodo.h
index 07395f1ee..b35f00735 100644
--- a/korganizer/koeditorgeneraltodo.h
+++ b/korganizer/koeditorgeneraltodo.h
@@ -44,7 +44,7 @@ class KOEditorGeneralTodo : public KOEditorGeneral
     TQ_OBJECT
   
   public:
-    KOEditorGeneralTodo (TQObject* parent=0,const char* name=0);
+    KOEditorGeneralTodo (TQObject* parent=nullptr,const char* name=nullptr);
     virtual ~KOEditorGeneralTodo();
 
     void initTime(TQWidget *, TQBoxLayout *);
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp
index 5a5beae69..81b0bfdad 100644
--- a/korganizer/koeditorrecurrence.cpp
+++ b/korganizer/koeditorrecurrence.cpp
@@ -91,7 +91,7 @@ TQComboBox *RecurBase::createWeekCountCombo( TQWidget *parent, const char *name
                    i18n("The number of the week from the beginning "
                         "of the month on which this event or to-do "
                         "should recur.") );
-  if ( !combo ) return 0;
+  if ( !combo ) return nullptr;
   combo->insertItem( i18n("1st") );
   combo->insertItem( i18n("2nd") );
   combo->insertItem( i18n("3rd") );
@@ -111,7 +111,7 @@ TQComboBox *RecurBase::createWeekdayCombo( TQWidget *parent, const char *name )
   TQWhatsThis::add( combo,
                    i18n("The weekday on which this event or to-do "
                         "should recur.") );
-  if ( !combo ) return 0;
+  if ( !combo ) return nullptr;
   const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem();
   for( int i = 1; i <= 7; ++i ) {
     combo->insertItem( calSys->weekDayName( i ) );
@@ -125,7 +125,7 @@ TQComboBox *RecurBase::createMonthNameCombo( TQWidget *parent, const char *name
   TQWhatsThis::add( combo,
                    i18n("The month during which this event or to-do "
                         "should recur.") );
-  if ( !combo ) return 0;
+  if ( !combo ) return nullptr;
   const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem();
   for( int i = 1; i <= 12; ++i ) {
     // use an arbitrary year, we just need the month name...
@@ -889,7 +889,7 @@ RecurrenceChooser::RecurrenceChooser( TQWidget *parent, const char *name ) :
 
     connect( mTypeCombo, TQ_SIGNAL( activated( int ) ), TQ_SLOT( emitChoice() ) );
   } else {
-    mTypeCombo = 0;
+    mTypeCombo = nullptr;
 
     TQButtonGroup *ruleButtonGroup = new TQButtonGroup( 1, TQt::Horizontal, this );
     ruleButtonGroup->setFrameStyle( TQFrame::NoFrame );
@@ -1038,7 +1038,7 @@ KOEditorRecurrence::KOEditorRecurrence( TQWidget* parent, const char *name ) :
   showCurrentRule( mRecurrenceChooser->type() );
 
   if ( KOPrefs::instance()->mCompactDialogs ) {
-    mRecurrenceRangeWidget = 0;
+    mRecurrenceRangeWidget = nullptr;
     mRecurrenceRangeDialog = new RecurrenceRangeDialog( this );
     mRecurrenceRange = mRecurrenceRangeDialog;
     mRecurrenceRangeButton = new TQPushButton( i18n("Recurrence Range..."),
@@ -1050,7 +1050,7 @@ KOEditorRecurrence::KOEditorRecurrence( TQWidget* parent, const char *name ) :
     connect( mRecurrenceRangeButton, TQ_SIGNAL( clicked() ),
              TQ_SLOT( showRecurrenceRangeDialog() ) );
 
-    mExceptionsWidget = 0;
+    mExceptionsWidget = nullptr;
     mExceptionsDialog = new ExceptionsDialog( this );
     mExceptions = mExceptionsDialog;
     mExceptionsButton = new TQPushButton( i18n("Exceptions..."), this );
@@ -1063,15 +1063,15 @@ KOEditorRecurrence::KOEditorRecurrence( TQWidget* parent, const char *name ) :
     TQWhatsThis::add( mRecurrenceRangeWidget,
                      i18n("Options concerning the time range during which "
                           "this event or to-do should recur.") );
-    mRecurrenceRangeDialog = 0;
+    mRecurrenceRangeDialog = nullptr;
     mRecurrenceRange = mRecurrenceRangeWidget;
-    mRecurrenceRangeButton = 0;
+    mRecurrenceRangeButton = nullptr;
     topLayout->addWidget( mRecurrenceRangeWidget, 3, 0 );
 
     mExceptionsWidget = new ExceptionsWidget( this );
-    mExceptionsDialog = 0;
+    mExceptionsDialog = nullptr;
     mExceptions = mExceptionsWidget;
-    mExceptionsButton = 0;
+    mExceptionsButton = nullptr;
     topLayout->addWidget( mExceptionsWidget, 3, 1 );
   }
 
@@ -1196,7 +1196,7 @@ void KOEditorRecurrence::readIncidence(Incidence *incidence)
 
   uint recurs = incidence->recurrenceType();
   int f = 0;
-  Recurrence *r = 0;
+  Recurrence *r = nullptr;
 
   if ( recurs ) {
     r = incidence->recurrence();
@@ -1392,7 +1392,7 @@ bool KOEditorRecurrence::validateInput()
   // Check if the recurrence (if set to end at a date) is scheduled to end before the event starts.
   if ( mEnabledCheck->isChecked() && (mRecurrenceRange->duration()==0) &&
        mEventStartDt.isValid() && ((mRecurrenceRange->endDate())<mEventStartDt.date()) ) {
-    KMessageBox::sorry( 0,
+    KMessageBox::sorry( nullptr,
       i18n("The end date '%1' of the recurrence must be after the start date '%2' of the event.")
       .arg( TDEGlobal::locale()->formatDate( mRecurrenceRange->endDate() ) )
       .arg( TDEGlobal::locale()->formatDate( mEventStartDt.date() ) ) );
@@ -1406,7 +1406,7 @@ bool KOEditorRecurrence::validateInput()
     bool valid = false;
     for ( int i=0; i<7; ++i ) valid = valid || days.testBit( i );
     if ( !valid ) {
-      KMessageBox::sorry( 0,
+      KMessageBox::sorry( nullptr,
         i18n("A weekly recurring event or task has to have at least one weekday "
              "associated with it.") );
       return false;
@@ -1634,7 +1634,7 @@ void KOEditorRecurrence::restoreValues()
 }
 
 KOEditorRecurrenceDialog::KOEditorRecurrenceDialog(TQWidget * parent)
-  : KDialogBase( parent, 0, false, i18n("Recurrence"), Ok|Cancel ), mRecurEnabled( false )
+  : KDialogBase( parent, nullptr, false, i18n("Recurrence"), Ok|Cancel ), mRecurEnabled( false )
 {
   mRecurrence = new KOEditorRecurrence( this );
   setMainWidget( mRecurrence );
diff --git a/korganizer/koeditorrecurrence.h b/korganizer/koeditorrecurrence.h
index 04f979c96..a7229c9df 100644
--- a/korganizer/koeditorrecurrence.h
+++ b/korganizer/koeditorrecurrence.h
@@ -47,7 +47,7 @@ using namespace KCal;
 class RecurBase : public TQWidget
 {
   public:
-    RecurBase( TQWidget *parent = 0, const char *name = 0 );
+    RecurBase( TQWidget *parent = nullptr, const char *name = nullptr );
 
     void setFrequency( int );
     int frequency();
@@ -58,9 +58,9 @@ class RecurBase : public TQWidget
     TQWidget *frequencyEdit();
 
   protected:
-    static TQComboBox *createWeekCountCombo( TQWidget *parent=0, const char *name=0 );
-    static TQComboBox *createWeekdayCombo( TQWidget *parent=0, const char *name=0 );
-    static TQComboBox *createMonthNameCombo( TQWidget *parent=0, const char *name=0 );
+    static TQComboBox *createWeekCountCombo( TQWidget *parent=nullptr, const char *name=nullptr );
+    static TQComboBox *createWeekdayCombo( TQWidget *parent=nullptr, const char *name=nullptr );
+    static TQComboBox *createMonthNameCombo( TQWidget *parent=nullptr, const char *name=nullptr );
     TQBoxLayout *createFrequencySpinBar( TQWidget *parent, TQLayout *layout,
     TQString everyText, TQString unitText );
 
@@ -71,13 +71,13 @@ class RecurBase : public TQWidget
 class RecurDaily : public RecurBase
 {
   public:
-    RecurDaily( TQWidget *parent = 0, const char *name = 0 );
+    RecurDaily( TQWidget *parent = nullptr, const char *name = nullptr );
 };
 
 class RecurWeekly : public RecurBase
 {
   public:
-    RecurWeekly( TQWidget *parent = 0, const char *name = 0 );
+    RecurWeekly( TQWidget *parent = nullptr, const char *name = nullptr );
 
     void setDays( const TQBitArray & );
     TQBitArray days();
@@ -89,7 +89,7 @@ class RecurWeekly : public RecurBase
 class RecurMonthly : public RecurBase
 {
   public:
-    RecurMonthly( TQWidget *parent = 0, const char *name = 0 );
+    RecurMonthly( TQWidget *parent = nullptr, const char *name = nullptr );
 
     void setByDay( int day );
     void setByPos( int count, int weekday );
@@ -116,7 +116,7 @@ class RecurYearly : public RecurBase
   public:
     enum YearlyType { byDay, byPos, byMonth };
 
-    RecurYearly( TQWidget *parent = 0, const char *name = 0 );
+    RecurYearly( TQWidget *parent = nullptr, const char *name = nullptr );
 
     void setByDay( int day );
     void setByPos( int count, int weekday, int month );
@@ -151,7 +151,7 @@ class RecurrenceChooser : public TQWidget
     TQ_OBJECT
   
   public:
-    RecurrenceChooser( TQWidget *parent = 0, const char *name = 0 );
+    RecurrenceChooser( TQWidget *parent = nullptr, const char *name = nullptr );
 
     enum { Daily, Weekly, Monthly, Yearly };
 
@@ -185,7 +185,7 @@ class ExceptionsWidget : public TQWidget, public ExceptionsBase
     TQ_OBJECT
   
   public:
-    ExceptionsWidget( TQWidget *parent = 0, const char *name = 0 );
+    ExceptionsWidget( TQWidget *parent = nullptr, const char *name = nullptr );
 
     void setDates( const DateList & );
     DateList dates();
@@ -204,7 +204,7 @@ class ExceptionsWidget : public TQWidget, public ExceptionsBase
 class ExceptionsDialog : public KDialogBase, public ExceptionsBase
 {
   public:
-    ExceptionsDialog( TQWidget *parent, const char *name = 0 );
+    ExceptionsDialog( TQWidget *parent, const char *name = nullptr );
 
     void setDates( const DateList & );
     DateList dates();
@@ -233,7 +233,7 @@ class RecurrenceRangeWidget : public TQWidget, public RecurrenceRangeBase
     TQ_OBJECT
   
   public:
-    RecurrenceRangeWidget( TQWidget *parent = 0, const char *name = 0 );
+    RecurrenceRangeWidget( TQWidget *parent = nullptr, const char *name = nullptr );
 
     void setDefaults( const TQDateTime &from );
 
@@ -262,7 +262,7 @@ class RecurrenceRangeWidget : public TQWidget, public RecurrenceRangeBase
 class RecurrenceRangeDialog : public KDialogBase, public RecurrenceRangeBase
 {
   public:
-    RecurrenceRangeDialog( TQWidget *parent = 0, const char *name = 0 );
+    RecurrenceRangeDialog( TQWidget *parent = nullptr, const char *name = nullptr );
 
     void setDefaults( const TQDateTime &from );
 
@@ -284,7 +284,7 @@ class KOEditorRecurrence : public TQWidget
     TQ_OBJECT
   
   public:
-    KOEditorRecurrence ( TQWidget *parent = 0, const char *name = 0 );
+    KOEditorRecurrence ( TQWidget *parent = nullptr, const char *name = nullptr );
     virtual ~KOEditorRecurrence();
 
     enum { Daily, Weekly, Monthly, Yearly };
diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp
index 6bc3c0bef..98463df78 100644
--- a/korganizer/koeventeditor.cpp
+++ b/korganizer/koeventeditor.cpp
@@ -52,7 +52,7 @@
 
 KOEventEditor::KOEventEditor( Calendar *calendar, TQWidget *parent )
   : KOIncidenceEditor( TQString(), calendar, parent ),
-    mEvent( 0 ), mCalendar( 0 ), mGeneral( 0 ), mRecurrence( 0 ), mFreeBusy( 0 )
+    mEvent( nullptr ), mCalendar( nullptr ), mGeneral( nullptr ), mRecurrence( nullptr ), mFreeBusy( nullptr )
 {
 }
 
@@ -211,7 +211,7 @@ void KOEventEditor::editIncidence( Incidence *incidence,
 void KOEventEditor::newEvent()
 {
   init();
-  mEvent = 0;
+  mEvent = nullptr;
   loadDefaults();
   setCaption( i18n("New Event") );
 }
@@ -310,7 +310,7 @@ bool KOEventEditor::processInput()
     // NOTE: triggered by addIncidence, the kolab resource might open a non-modal dialog (parent is not available in the resource) to select a resource folder. Thus the user can close this dialog before addIncidence() returns.
     if ( !mChanger->addIncidence( mEvent, mResource, mSubResource, this ) ) {
       delete mEvent;
-      mEvent = 0;
+      mEvent = nullptr;
       return false;
     }
   }
@@ -401,7 +401,7 @@ void KOEventEditor::loadTemplate( /*const*/ CalendarLocal& cal )
         i18n("Template does not contain a valid event.") );
   } else {
     kdDebug(5850) << "KOEventEditor::slotLoadTemplate(): readTemplate" << endl;
-    readEvent( events.first(), 0, TQDate(), true );
+    readEvent( events.first(), nullptr, TQDate(), true );
   }
 }
 
diff --git a/korganizer/koeventpopupmenu.cpp b/korganizer/koeventpopupmenu.cpp
index 1ab4b89ee..0f420c385 100644
--- a/korganizer/koeventpopupmenu.cpp
+++ b/korganizer/koeventpopupmenu.cpp
@@ -45,8 +45,8 @@
 
 KOEventPopupMenu::KOEventPopupMenu()
 {
-  mCalendar = 0;
-  mCurrentIncidence = 0;
+  mCalendar = nullptr;
+  mCurrentIncidence = nullptr;
   mCurrentDate = TQDate();
   mHasAdditionalItems = false;
 
diff --git a/korganizer/koeventview.cpp b/korganizer/koeventview.cpp
index 7ac375734..6e9173b24 100644
--- a/korganizer/koeventview.cpp
+++ b/korganizer/koeventview.cpp
@@ -88,11 +88,11 @@ TQPopupMenu *KOEventView::newEventPopup()
   KXMLGUIClient *client = KOCore::self()->xmlguiClient( this );
   if ( !client ) {
     kdError() << "KOEventView::newEventPopup(): no xmlGuiClient." << endl;
-    return 0;
+    return nullptr;
   }
   if ( !client->factory() ) {
     kdError() << "KOEventView::newEventPopup(): no factory" << endl;
-    return 0; // can happen if called too early
+    return nullptr; // can happen if called too early
   }
 
   return static_cast<TQPopupMenu*>
diff --git a/korganizer/koeventview.h b/korganizer/koeventview.h
index d8b2a67ab..70f76e66b 100644
--- a/korganizer/koeventview.h
+++ b/korganizer/koeventview.h
@@ -65,7 +65,7 @@ class KOEventView : public KOrg::BaseView
      * @param parent is the parent TQWidget.
      * @param name is the view name.
      */
-    KOEventView(Calendar *cal,TQWidget *parent=0,const char *name=0);
+    KOEventView(Calendar *cal,TQWidget *parent=nullptr,const char *name=nullptr);
 
     /**
      * Destructor.  Views will do view-specific cleanups here.
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 7d36b4aa9..81f5200e8 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -42,7 +42,7 @@
 KOEventViewer::KOEventViewer( Calendar *calendar, TQWidget *parent, const char *name )
   : TQTextBrowser( parent, name ), mCalendar( calendar ), mDefaultText("")
 {
-  mIncidence = 0;
+  mIncidence = nullptr;
   connect( this, TQ_SIGNAL(highlighted(const TQString &)), TQ_SLOT(message(const TQString &)) );
 }
 
@@ -127,7 +127,7 @@ void KOEventViewer::setIncidence( Incidence *incidence, const TQDate &date )
     mIncidence = incidence;
   } else {
     clearEvents( true );
-    mIncidence = 0;
+    mIncidence = nullptr;
   }
 }
 
@@ -156,7 +156,7 @@ void KOEventViewer::changeIncidenceDisplay( Incidence *incidence, const TQDate &
       setIncidence( incidence, date );
       break;
     case KOGlobals::INCIDENCEDELETED:
-      setIncidence( 0, date );
+      setIncidence( nullptr, date );
       break;
     }
   }
diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h
index 0a71274be..17c52ce63 100644
--- a/korganizer/koeventviewer.h
+++ b/korganizer/koeventviewer.h
@@ -42,7 +42,7 @@ class TDE_EXPORT KOEventViewer : public TQTextBrowser
   TQ_OBJECT
   
   public:
-    explicit KOEventViewer( Calendar *calendar, TQWidget *parent = 0, const char *name = 0 );
+    explicit KOEventViewer( Calendar *calendar, TQWidget *parent = nullptr, const char *name = nullptr );
     virtual ~KOEventViewer();
 
     /**
diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h
index a56fc8a16..edb82209a 100644
--- a/korganizer/koeventviewerdialog.h
+++ b/korganizer/koeventviewerdialog.h
@@ -43,8 +43,8 @@ class TDE_EXPORT KOEventViewerDialog : public KDialogBase
     TQ_OBJECT
   
   public:
-    explicit KOEventViewerDialog( Calendar *calendar, TQWidget *parent = 0,
-                                  const char *name = 0, bool compact = false );
+    explicit KOEventViewerDialog( Calendar *calendar, TQWidget *parent = nullptr,
+                                  const char *name = nullptr, bool compact = false );
     virtual ~KOEventViewerDialog();
 
     void setIncidence( Incidence *incidence, const TQDate &date  )
diff --git a/korganizer/koglobals.cpp b/korganizer/koglobals.cpp
index 5d7b06e28..579225bcc 100644
--- a/korganizer/koglobals.cpp
+++ b/korganizer/koglobals.cpp
@@ -51,7 +51,7 @@ class NopAlarmClient : public AlarmClient
 };
 #endif
 
-KOGlobals *KOGlobals::mSelf = 0;
+KOGlobals *KOGlobals::mSelf = nullptr;
 
 static KStaticDeleter<KOGlobals> koGlobalsDeleter;
 
@@ -65,7 +65,7 @@ KOGlobals *KOGlobals::self()
 }
 
 KOGlobals::KOGlobals()
-  : mHolidays(0)
+  : mHolidays(nullptr)
 {
   // Needed to distinguish from global TDEInstance
   // in case we are a KPart
diff --git a/korganizer/kogroupware.cpp b/korganizer/kogroupware.cpp
index bbb8dc018..e2151d897 100644
--- a/korganizer/kogroupware.cpp
+++ b/korganizer/kogroupware.cpp
@@ -53,9 +53,9 @@
 #include <tqdir.h>
 #include <tqtimer.h>
 
-FreeBusyManager *KOGroupware::mFreeBusyManager = 0;
+FreeBusyManager *KOGroupware::mFreeBusyManager = nullptr;
 
-KOGroupware *KOGroupware::mInstance = 0;
+KOGroupware *KOGroupware::mInstance = nullptr;
 
 KOGroupware *KOGroupware::create( CalendarView *view,
                                   KCal::CalendarResources *calendar )
@@ -74,7 +74,7 @@ KOGroupware *KOGroupware::instance()
 
 
 KOGroupware::KOGroupware( CalendarView* view, KCal::CalendarResources* cal )
-   : TQObject( 0, "kmgroupware_instance" ), mView( view ), mCalendar( cal ), mDoNotNotify( false )
+   : TQObject( nullptr, "kmgroupware_instance" ), mView( view ), mCalendar( cal ), mDoNotNotify( false )
 {
   // Set up the dir watch of the three incoming dirs
   KDirWatch* watcher = KDirWatch::self();
diff --git a/korganizer/koidentitymanager.h b/korganizer/koidentitymanager.h
index 3b0b98114..c603be6aa 100644
--- a/korganizer/koidentitymanager.h
+++ b/korganizer/koidentitymanager.h
@@ -32,7 +32,7 @@ namespace KOrg {
 class IdentityManager : public KPIM::IdentityManager
 {
 public:
-  IdentityManager( TQObject * parent=0, const char * name=0 )
+  IdentityManager( TQObject * parent=nullptr, const char * name=nullptr )
     : KPIM::IdentityManager( true /*readonly*/, parent, name ) {}
 
 protected:
diff --git a/korganizer/koincidenceeditor.cpp b/korganizer/koincidenceeditor.cpp
index 72defee42..16c602181 100644
--- a/korganizer/koincidenceeditor.cpp
+++ b/korganizer/koincidenceeditor.cpp
@@ -58,9 +58,9 @@
 KOIncidenceEditor::KOIncidenceEditor( const TQString &caption,
                                       Calendar *calendar, TQWidget *parent )
   : KDialogBase( Tabbed, caption, Ok | Apply | Cancel | Default, Ok,
-                 parent, 0, false, false ),
-    mAttendeeEditor( 0 ), mResource( 0 ), mIsCounter( false ), mIsCreateTask( false ),
-    mRecurIncidence( 0 ), mRecurIncidenceAfterDissoc( 0 )
+                 parent, nullptr, false, false ),
+    mAttendeeEditor( nullptr ), mResource( nullptr ), mIsCounter( false ), mIsCreateTask( false ),
+    mRecurIncidence( nullptr ), mRecurIncidenceAfterDissoc( nullptr )
 {
   // Set this to be the group leader for all subdialogs - this means
   // modal subdialogs will only affect this dialog, not the other windows
@@ -124,7 +124,7 @@ void KOIncidenceEditor::cancelRemovedAttendees( Incidence *incidence )
   // and then only adds those that need to be cancelled (i.e. a mail needs to be sent to them).
   if ( KOPrefs::instance()->thatIsMe( incidence->organizer().email() ) ) {
     Incidence *ev = incidence->clone();
-    ev->registerObserver( 0 );
+    ev->registerObserver( nullptr );
     mAttendeeEditor->cancelAttendeeEvent( ev );
     if ( ev->attendeeCount() > 0 ) {
       emit deleteAttendee( ev );
@@ -207,7 +207,7 @@ TQWidget *KOIncidenceEditor::addDesignerTab( const TQString &uifile )
 {
   kdDebug(5850) << "Designer tab: " << uifile << endl;
 
-  KPIM::DesignerFields *wid = new KPIM::DesignerFields( uifile, 0 );
+  KPIM::DesignerFields *wid = new KPIM::DesignerFields( uifile, nullptr );
   mDesignerFields.append( wid );
 
   TQFrame *topFrame = addPage( wid->title() );
diff --git a/korganizer/koincidencetooltip.h b/korganizer/koincidencetooltip.h
index 7b8a3536d..6ba199924 100644
--- a/korganizer/koincidencetooltip.h
+++ b/korganizer/koincidencetooltip.h
@@ -40,17 +40,17 @@ class KOAgendaItem;
 class KOIncidenceToolTip : public TQToolTip
 {
   public:
-    KOIncidenceToolTip( TQWidget *widget, Calendar *calendar, const TQDate &date, TQToolTipGroup *group = 0 )
-      : TQToolTip (widget, group), mCalendar( calendar ), mDate( date ), mText(0) {}
+    KOIncidenceToolTip( TQWidget *widget, Calendar *calendar, const TQDate &date, TQToolTipGroup *group = nullptr )
+      : TQToolTip (widget, group), mCalendar( calendar ), mDate( date ), mText(nullptr) {}
 /*    ~KOIncidenceToolTip();*/
 
   public:
     static void add ( TQWidget *widget, Calendar *calendar,
                       Incidence *incidence, const TQDate &date=TQDate(),
-                      TQToolTipGroup *group = 0, const TQString &longText = "" );
+                      TQToolTipGroup *group = nullptr, const TQString &longText = "" );
     static void add( KOAgendaItem *item, Calendar *calendar,
-                     Incidence *incidence = 0, const TQDate &date=TQDate(),
-                     TQToolTipGroup *group = 0 );
+                     Incidence *incidence = nullptr, const TQDate &date=TQDate(),
+                     TQToolTipGroup *group = nullptr );
 
     /* reimplmented from TQToolTip */
     void maybeTip( const TQPoint &pos );
diff --git a/korganizer/kojournaleditor.cpp b/korganizer/kojournaleditor.cpp
index fe16b470f..03a17ab41 100644
--- a/korganizer/kojournaleditor.cpp
+++ b/korganizer/kojournaleditor.cpp
@@ -46,7 +46,7 @@ using namespace KCal;
 KOJournalEditor::KOJournalEditor( Calendar *calendar, TQWidget *parent ) :
   KOIncidenceEditor( i18n("Edit Journal Entry"), calendar, parent )
 {
-  mJournal = 0;
+  mJournal = nullptr;
 }
 
 KOJournalEditor::~KOJournalEditor()
@@ -112,7 +112,7 @@ void KOJournalEditor::editIncidence( Incidence *incidence, const TQDate &date, C
 void KOJournalEditor::newJournal()
 {
   init();
-  mJournal = 0;
+  mJournal = nullptr;
   loadDefaults();
 }
 
@@ -153,7 +153,7 @@ bool KOJournalEditor::processInput()
 
     if ( !mChanger->addIncidence( mJournal, mResource, mSubResource, this ) ) {
       delete mJournal;
-      mJournal = 0;
+      mJournal = nullptr;
       return false;
     }
   }
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp
index 252bbc53f..99ffa657f 100644
--- a/korganizer/kojournalview.cpp
+++ b/korganizer/kojournalview.cpp
@@ -63,7 +63,7 @@ KOJournalView::~KOJournalView()
 
 void KOJournalView::appendJournal( Journal*journal, const TQDate &dt)
 {
-  JournalDateEntry *entry = 0;
+  JournalDateEntry *entry = nullptr;
   if ( mEntries.contains( dt ) ) {
     entry = mEntries[dt];
   } else {
@@ -156,7 +156,7 @@ void KOJournalView::showDates( const TQDate &start, const TQDate &end )
     }
     if ( jnls.count() < 1 ) {
       // create an empty dateentry widget
-      appendJournal( 0, d );
+      appendJournal( nullptr, d );
     }
   }
 }
@@ -210,7 +210,7 @@ void KOJournalView::setIncidenceChanger( IncidenceChangerBase *changer )
 
 void KOJournalView::newJournal()
 {
-  emit newJournalSignal( 0/*ResourceCalendar*/, TQString()/*subResource*/,
+  emit newJournalSignal( nullptr/*ResourceCalendar*/, TQString()/*subResource*/,
                          TQDate::currentDate() );
 }
 
diff --git a/korganizer/kojournalview.h b/korganizer/kojournalview.h
index f2ff84a29..22b8a9aca 100644
--- a/korganizer/kojournalview.h
+++ b/korganizer/kojournalview.h
@@ -43,8 +43,8 @@ class KOJournalView : public KOrg::BaseView
     TQ_OBJECT
   
   public:
-    KOJournalView( Calendar *calendar, TQWidget *parent = 0,
-                   const char *name = 0);
+    KOJournalView( Calendar *calendar, TQWidget *parent = nullptr,
+                   const char *name = nullptr);
     ~KOJournalView();
 
     virtual int currentDateCount();
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index df52e88a7..182ba15ff 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -201,7 +201,7 @@ KOListView::KOListView( Calendar *calendar,
                         bool nonInteractive )
   : KOEventView( calendar, parent, name )
 {
-  mActiveItem = 0;
+  mActiveItem = nullptr;
   mIsNonInteractive = nonInteractive;
 
   mListView = new TDEListView( this );
@@ -328,7 +328,7 @@ void KOListView::showDates( const TQDate &start, const TQDate &end )
     date = date.addDays( 1 );
   }
 
-  emit incidenceSelected( 0, TQDate() );
+  emit incidenceSelected( nullptr, TQDate() );
 }
 
 void KOListView::showAll()
@@ -375,7 +375,7 @@ void KOListView::showIncidences( const Incidence::List &incidenceList, const TQD
   addIncidences( incidenceList, date );
 
   // After new creation of list view no events are selected.
-  emit incidenceSelected( 0, date );
+  emit incidenceSelected( nullptr, date );
 }
 
 void KOListView::changeIncidenceDisplay( Incidence *incidence, int action )
@@ -431,7 +431,7 @@ KOListViewItem *KOListView::getItemForIncidence( Incidence *incidence )
     }
     item = static_cast<KOListViewItem *>( item->nextSibling() );
   }
-  return 0;
+  return nullptr;
 }
 
 void KOListView::defaultItemAction( TQListViewItem *i )
@@ -478,7 +478,7 @@ void KOListView::processSelectionChange()
       static_cast<KOListViewItem *>( mListView->selectedItem() );
 
     if ( !item ) {
-      emit incidenceSelected( 0, TQDate() );
+      emit incidenceSelected( nullptr, TQDate() );
     } else {
       Incidence *incidence = static_cast<Incidence *>( item->data() );
       emit incidenceSelected( incidence, mDateList[incidence->uid()] );
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index 71f304af4..5a3be378a 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -71,8 +71,8 @@ class KOListView : public KOEventView
   
   public:
    explicit KOListView( Calendar *calendar,
-                        TQWidget *parent = 0,
-                        const char *name = 0,
+                        TQWidget *parent = nullptr,
+                        const char *name = nullptr,
                         bool nonInteractive = false );
     ~KOListView();
 
diff --git a/korganizer/komailclient.cpp b/korganizer/komailclient.cpp
index e259854a3..07d8990ba 100644
--- a/korganizer/komailclient.cpp
+++ b/korganizer/komailclient.cpp
@@ -244,7 +244,7 @@ bool KOMailClient::send(const TQString &from,const TQString &_to,const TQString
   } else {
     if (!tdeApp->dcopClient()->isApplicationRegistered("kmail")) {
       if (TDEApplication::startServiceByDesktopName("kmail")) {
-        KMessageBox::error(0,i18n("No running instance of KMail found."));
+        KMessageBox::error(nullptr,i18n("No running instance of KMail found."));
         return false;
       }
     }
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index af0639d51..e9be8e2c8 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -449,7 +449,7 @@ void MonthViewCell::setDate( const TQDate &date )
                           mDate,
                           static_cast<KNoScrollListBox *>( mItemList ) );
 
-  resizeEvent( 0 );
+  resizeEvent( nullptr );
 }
 
 TQDate MonthViewCell::date() const
@@ -526,7 +526,7 @@ void MonthViewCell::updateCell()
   mItemList->clear();
 
   if ( !mHolidayString.isEmpty() ) {
-    MonthViewItem *item = new MonthViewItem( 0, TQDateTime( mDate ), mHolidayString );
+    MonthViewItem *item = new MonthViewItem( nullptr, TQDateTime( mDate ), mHolidayString );
     item->setPalette( mHolidayPalette );
     mItemList->insertItem( item );
   }
@@ -536,11 +536,11 @@ class MonthViewCell::CreateItemVisitor :
       public IncidenceBase::Visitor
 {
   public:
-    CreateItemVisitor() : mItem(0) { emails = KOPrefs::instance()->allEmails(); }
+    CreateItemVisitor() : mItem(nullptr) { emails = KOPrefs::instance()->allEmails(); }
 
     bool act( IncidenceBase *incidence, TQDate date, TQPalette stdPal, int multiDay )
     {
-      mItem = 0;
+      mItem = nullptr;
       mDate = date;
       mStandardPalette = stdPal;
       mMultiDay = multiDay;
@@ -599,7 +599,7 @@ class MonthViewCell::CreateItemVisitor :
       }
 
       Attendee *me = event->attendeeByMails( emails );
-      if ( me != 0 ) {
+      if (me) {
         mItem->setReply( me->status() == Attendee::NeedsAction && me->RSVP() );
       } else
         mItem->setReply(false);
@@ -732,12 +732,12 @@ void MonthViewCell::enableScrollBars( bool enabled )
 Incidence *MonthViewCell::selectedIncidence()
 {
   int index = mItemList->currentItem();
-  if ( index < 0 ) return 0;
+  if ( index < 0 ) return nullptr;
 
   MonthViewItem *item =
       static_cast<MonthViewItem *>( mItemList->item( index ) );
 
-  if ( !item ) return 0;
+  if ( !item ) return nullptr;
 
   return item->incidence();
 }
@@ -795,7 +795,7 @@ void MonthViewCell::defaultAction( TQListBoxItem *item )
   select();
 
   if ( !item ) {
-    emit newEventSignal( 0/*ResourceCalendar*/, TQString()/*subResource*/, date() );
+    emit newEventSignal( nullptr/*ResourceCalendar*/, TQString()/*subResource*/, date() );
   } else {
     MonthViewItem *eventItem = static_cast<MonthViewItem *>( item );
     Incidence *incidence = eventItem->incidence();
@@ -822,7 +822,7 @@ void MonthViewCell::contextMenu( TQListBoxItem *item )
 KOMonthView::KOMonthView( Calendar *calendar, TQWidget *parent, const char *name )
     : KOEventView( calendar, parent, name ),
       mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ),
-      mShortDayLabels( false ), mWidthLongDayLabel( 0 ), mSelectedCell( 0 )
+      mShortDayLabels( false ), mWidthLongDayLabel( 0 ), mSelectedCell( nullptr )
 {
   mCells.setAutoDelete( true );
 
@@ -882,7 +882,7 @@ KOMonthView::KOMonthView( Calendar *calendar, TQWidget *parent, const char *name
 
   updateConfig();
 
-  emit incidenceSelected( 0, TQDate() );
+  emit incidenceSelected( nullptr, TQDate() );
 }
 
 KOMonthView::~KOMonthView()
@@ -1189,7 +1189,7 @@ void KOMonthView::setSelectedCell( MonthViewCell *cell )
   mSelectedCell = cell;
 
   if ( !mSelectedCell )
-    emit incidenceSelected( 0, TQDate() );
+    emit incidenceSelected( nullptr, TQDate() );
   else
     if ( selectedIncidenceDates().isEmpty() ) {
       emit incidenceSelected( mSelectedCell->selectedIncidence(), TQDate() );
@@ -1208,7 +1208,7 @@ void KOMonthView::processSelectionChange()
       emit incidenceSelected( incidences.first(), selectedIncidenceDates().first() );
     }
   } else {
-    emit incidenceSelected( 0, TQDate() );
+    emit incidenceSelected( nullptr, TQDate() );
   }
 }
 
@@ -1216,7 +1216,7 @@ void KOMonthView::clearSelection()
 {
   if ( mSelectedCell ) {
     mSelectedCell->deselect();
-    mSelectedCell = 0;
+    mSelectedCell = nullptr;
   }
 }
 
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 706a2e9fb..2fa22da1a 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -53,7 +53,7 @@ class KNoScrollListBox: public TQListBox
     TQ_OBJECT
   
   public:
-    KNoScrollListBox(TQWidget *parent=0, const char *name=0);
+    KNoScrollListBox(TQWidget *parent=nullptr, const char *name=nullptr);
     ~KNoScrollListBox() {}
 
     void setBackground( bool primary, bool workday );
@@ -247,7 +247,7 @@ class KOMonthView: public KOEventView
     TQ_OBJECT
   
   public:
-    KOMonthView(Calendar *cal, TQWidget *parent = 0, const char *name = 0 );
+    KOMonthView(Calendar *cal, TQWidget *parent = nullptr, const char *name = nullptr );
     ~KOMonthView();
 
     /** Returns maximum number of days supported by the komonthview */
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 88dd26547..47ed0b7f3 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -52,7 +52,7 @@
 #include <ktimezones.h>
 #include "kocore.h"
 
-KOPrefs *KOPrefs::mInstance = 0;
+KOPrefs *KOPrefs::mInstance = nullptr;
 static KStaticDeleter<KOPrefs> insd;
 
 TQColor getTextColor(const TQColor &c)
@@ -267,7 +267,7 @@ void KOPrefs::setCategoryColor( const TQString &cat, const TQColor & color)
 
 TQColor *KOPrefs::categoryColor( const TQString &cat )
 {
-  TQColor *color = 0;
+  TQColor *color = nullptr;
 
   if ( !cat.isEmpty() ) color = mCategoryColors[ cat ];
 
@@ -290,7 +290,7 @@ void KOPrefs::setResourceColor ( const TQString &cal, const TQColor &color )
 
 TQColor* KOPrefs::resourceColor( const TQString &cal )
 {
-  TQColor *color=0;
+  TQColor *color=nullptr;
   if( !cal.isEmpty() ) color = mResourceColors[cal];
 
   // assign default color if enabled
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index c35e75fe6..02bd4566c 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -451,7 +451,7 @@ class KOPrefsDialogTime : public KPrefsModule
     }
 
     void setCombo( TQComboBox *combo, const TQString &text,
-                   const TQStringList *tags = 0 )
+                   const TQStringList *tags = nullptr )
     {
       if (tags) {
         int i = tags->findIndex(text);
@@ -1136,7 +1136,7 @@ KOPrefsDialogPlugins::KOPrefsDialogPlugins( TQWidget *parent, const char* name )
 
   load();
 //  usrReadConfig();
-  selectionChanged( 0 );
+  selectionChanged( nullptr );
 }
 
 void KOPrefsDialogPlugins::usrReadConfig()
diff --git a/korganizer/koprefsdialog.h b/korganizer/koprefsdialog.h
index bd51386da..57c3649ca 100644
--- a/korganizer/koprefsdialog.h
+++ b/korganizer/koprefsdialog.h
@@ -144,7 +144,7 @@ class TDE_EXPORT KOPrefsDialogPlugins : public KPrefsModule
 class TDE_EXPORT KOPrefsDesignerFields : public KPIM::KCMDesignerFields
 {
   public:
-    KOPrefsDesignerFields( TQWidget *parent = 0, const char *name = 0 );
+    KOPrefsDesignerFields( TQWidget *parent = nullptr, const char *name = nullptr );
 
   protected:
     TQString localUiDir();
diff --git a/korganizer/korgac/alarmdialog.cpp b/korganizer/korgac/alarmdialog.cpp
index 91fb5d599..ee43bc667 100644
--- a/korganizer/korgac/alarmdialog.cpp
+++ b/korganizer/korgac/alarmdialog.cpp
@@ -175,7 +175,7 @@ AlarmDialog::~AlarmDialog()
 
 AlarmListItem *AlarmDialog::searchByUid( const TQString &uid )
 {
-  AlarmListItem *found = 0;
+  AlarmListItem *found = nullptr;
   for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ) {
     AlarmListItem *item = static_cast<AlarmListItem*>( it.current() );
     if ( item->mUid == uid ) {
@@ -396,7 +396,7 @@ void AlarmDialog::suspend()
       break;
   }
 
-  AlarmListItem *selitem = 0;
+  AlarmListItem *selitem = nullptr;
   for ( TQListViewItemIterator it( mIncidenceListView ) ; it.current() ; ++it ) {
     AlarmListItem * item = static_cast<AlarmListItem*>( it.current() );
     if ( item->isSelected() && item->isVisible() ) {
diff --git a/korganizer/korgac/alarmdialog.h b/korganizer/korgac/alarmdialog.h
index d11dc591c..53acd2f3a 100644
--- a/korganizer/korgac/alarmdialog.h
+++ b/korganizer/korgac/alarmdialog.h
@@ -46,7 +46,7 @@ class AlarmDialog : public KDialogBase {
   TQ_OBJECT
   
   public:
-    explicit AlarmDialog( CalendarResources *calendar, TQWidget *parent = 0, const char *name = 0 );
+    explicit AlarmDialog( CalendarResources *calendar, TQWidget *parent = nullptr, const char *name = nullptr );
 
     ~AlarmDialog();
 
diff --git a/korganizer/korgac/alarmdockwindow.cpp b/korganizer/korgac/alarmdockwindow.cpp
index 96c2f3387..0c17cf154 100644
--- a/korganizer/korgac/alarmdockwindow.cpp
+++ b/korganizer/korgac/alarmdockwindow.cpp
@@ -44,7 +44,7 @@
 #include <stdlib.h>
 
 AlarmDockWindow::AlarmDockWindow( const char *name )
-  : KSystemTray( 0, name )
+  : KSystemTray( nullptr, name )
 {
   // Read the autostart status from the config file
   TDEConfig *config = tdeApp->config();
diff --git a/korganizer/korgac/alarmdockwindow.h b/korganizer/korgac/alarmdockwindow.h
index 81c00a8c7..9fadf1247 100644
--- a/korganizer/korgac/alarmdockwindow.h
+++ b/korganizer/korgac/alarmdockwindow.h
@@ -33,7 +33,7 @@ class AlarmDockWindow : public KSystemTray
     TQ_OBJECT
   
   public:
-    AlarmDockWindow( const char *name = 0 );
+    AlarmDockWindow( const char *name = nullptr );
     virtual ~AlarmDockWindow();
 
     void enableAutostart( bool enabled );
diff --git a/korganizer/korgac/koalarmclient.cpp b/korganizer/korgac/koalarmclient.cpp
index e102c1dcc..0a7c13b08 100644
--- a/korganizer/korgac/koalarmclient.cpp
+++ b/korganizer/korgac/koalarmclient.cpp
@@ -40,7 +40,7 @@
 #include <tqpushbutton.h>
 
 KOAlarmClient::KOAlarmClient( TQObject *parent, const char *name )
-  : DCOPObject( "ac" ), TQObject( parent, name ), mDialog( 0 )
+  : DCOPObject( "ac" ), TQObject( parent, name ), mDialog( nullptr )
 {
   kdDebug(5890) << "KOAlarmClient::KOAlarmClient()" << endl;
 
diff --git a/korganizer/korgac/koalarmclient.h b/korganizer/korgac/koalarmclient.h
index ef6e5d272..d0ee3409f 100644
--- a/korganizer/korgac/koalarmclient.h
+++ b/korganizer/korgac/koalarmclient.h
@@ -46,7 +46,7 @@ class KOAlarmClient : public TQObject, virtual public AlarmClientIface, public K
     TQ_OBJECT
   
   public:
-    KOAlarmClient( TQObject *parent = 0, const char *name = 0 );
+    KOAlarmClient( TQObject *parent = nullptr, const char *name = nullptr );
     ~KOAlarmClient();
 
     bool commitData( TQSessionManager & );
diff --git a/korganizer/korgac/korgacmain.cpp b/korganizer/korgac/korgacmain.cpp
index c278f3c8c..aa9369ea5 100644
--- a/korganizer/korgac/korgacmain.cpp
+++ b/korganizer/korgac/korgacmain.cpp
@@ -36,7 +36,7 @@
 class MyApp : public TDEUniqueApplication
 {
   public:
-    MyApp() : mClient( 0 ) {}
+    MyApp() : mClient( nullptr ) {}
     int newInstance()
     {
       // Check if we already have a running alarm daemon widget
@@ -56,7 +56,7 @@ static const char korgacVersion[] = "0.9";
 
 static const TDECmdLineOptions options[] =
 {
-  { 0, 0, 0 }
+  { nullptr, nullptr, nullptr }
 };
 
 int main( int argc, char **argv )
@@ -66,7 +66,7 @@ int main( int argc, char **argv )
                         korgacVersion, I18N_NOOP("KOrganizer Reminder Daemon"),
                         TDEAboutData::License_GPL,
                         "(c) 2003 Cornelius Schumacher",
-                        0, "http://pim.kde.org" );
+                        nullptr, "http://pim.kde.org" );
   aboutData.addAuthor( "Cornelius Schumacher", I18N_NOOP("Maintainer"),
                        "schumacher@kde.org" );
   aboutData.addAuthor( "Reinhold Kainhofer", I18N_NOOP("Maintainer"),
diff --git a/korganizer/korganizer.cpp b/korganizer/korganizer.cpp
index 363ee43ee..8c1e3f77c 100644
--- a/korganizer/korganizer.cpp
+++ b/korganizer/korganizer.cpp
@@ -87,7 +87,7 @@ using namespace KParts;
 using namespace KOrg;
 
 KOrganizer::KOrganizer( const char *name )
-  : KParts::MainWindow( 0, name ),
+  : KParts::MainWindow( nullptr, name ),
     KOrg::MainWindow()
 {
   // Set this to be the group leader for all subdialogs - this means
@@ -213,7 +213,7 @@ void KOrganizer::initActions()
   KStdAction::quit( this, TQ_SLOT( close() ), actionCollection() );
   setAutoSaveSettings();
 
-  createGUI( 0 );
+  createGUI( nullptr );
 }
 
 bool KOrganizer::queryClose()
diff --git a/korganizer/korganizer.h b/korganizer/korganizer.h
index e569a9065..6a6b0aa88 100644
--- a/korganizer/korganizer.h
+++ b/korganizer/korganizer.h
@@ -71,7 +71,7 @@ class KOrganizer : public KPartsMainWindow, public KOrgMainWindow
       Constructs a new main window.
       @param name     TQt internal widget name
     */
-    KOrganizer( const char *name = 0 );
+    KOrganizer( const char *name = nullptr );
     virtual ~KOrganizer();
 
     void init( bool hasDocument );
diff --git a/korganizer/korganizer_options.h b/korganizer/korganizer_options.h
index fcd2b7ce4..e0c1125a4 100644
--- a/korganizer/korganizer_options.h
+++ b/korganizer/korganizer_options.h
@@ -31,13 +31,13 @@
 
 static const TDECmdLineOptions korganizer_options[] =
 {
-  { "i", 0, 0 },
-  { "import", I18N_NOOP("Import the given calendars as new resources into the default calendar"), 0 },
-  { "m", 0, 0 },
-  { "merge", I18N_NOOP("Merge the given calendars into the standard calendar (i.e. copy the events)"), 0 },
-  { "o", 0, 0 },
-  { "open", I18N_NOOP("Open the given calendars in a new window"), 0 },
-  { "+[calendars]", I18N_NOOP("Calendar files or urls. Unless -i, -o or -m is explicitly specified, the user will be asked whether to import, merge or open in a separate window."), 0 },
+  { "i", nullptr, nullptr },
+  { "import", I18N_NOOP("Import the given calendars as new resources into the default calendar"), nullptr },
+  { "m", nullptr, nullptr },
+  { "merge", I18N_NOOP("Merge the given calendars into the standard calendar (i.e. copy the events)"), nullptr },
+  { "o", nullptr, nullptr },
+  { "open", I18N_NOOP("Open the given calendars in a new window"), nullptr },
+  { "+[calendars]", I18N_NOOP("Calendar files or urls. Unless -i, -o or -m is explicitly specified, the user will be asked whether to import, merge or open in a separate window."), nullptr },
   TDECmdLineLastOption
 };
 
diff --git a/korganizer/korganizer_part.cpp b/korganizer/korganizer_part.cpp
index f0581b33a..0f291aab5 100644
--- a/korganizer/korganizer_part.cpp
+++ b/korganizer/korganizer_part.cpp
@@ -128,7 +128,7 @@ KOrganizerPart::~KOrganizerPart()
   mActionManager->writeSettings();
 
   delete mActionManager;
-  mActionManager = 0;
+  mActionManager = nullptr;
 
   closeURL();
 
diff --git a/korganizer/korganizerifaceimpl.h b/korganizer/korganizerifaceimpl.h
index 12409868a..2f5f211a4 100644
--- a/korganizer/korganizerifaceimpl.h
+++ b/korganizer/korganizerifaceimpl.h
@@ -42,7 +42,7 @@ class ActionManager;
 class TDE_EXPORT KOrganizerIfaceImpl : public TQObject, virtual public KOrganizerIface {
 public:
   KOrganizerIfaceImpl( ActionManager* mActionManager,
-                       TQObject* parent=0, const char* name=0 );
+                       TQObject* parent=nullptr, const char* name=nullptr );
   ~KOrganizerIfaceImpl();
 
   bool openURL( const TQString &url );
diff --git a/korganizer/kotimelineview.cpp b/korganizer/kotimelineview.cpp
index fc2bf0cfa..f135f388f 100644
--- a/korganizer/kotimelineview.cpp
+++ b/korganizer/kotimelineview.cpp
@@ -44,7 +44,7 @@ using namespace KCal;
 KOTimelineView::KOTimelineView(Calendar *calendar, TQWidget *parent,
                                  const char *name)
   : KOEventView(calendar, parent, name),
-  mEventPopup( 0 )
+  mEventPopup( nullptr )
 {
     TQVBoxLayout* vbox = new TQVBoxLayout(this);
     mGantt = new KDGanttView(this);
@@ -117,11 +117,11 @@ void KOTimelineView::showDates(const TQDate& start, const TQDate& end)
   mGantt->clear();
 
   // item for every calendar
-  TimelineItem *item = 0;
+  TimelineItem *item = nullptr;
   CalendarResources *calres = dynamic_cast<CalendarResources*>( calendar() );
   if ( !calres ) {
     item = new TimelineItem( i18n("Calendar"), calendar(), mGantt );
-    mCalendarItemMap[0][TQString()] = item;
+    mCalendarItemMap[nullptr][TQString()] = item;
   } else {
     CalendarResourceManager *manager = calres->resourceManager();
     for ( CalendarResourceManager::ActiveIterator it = manager->activeBegin(); it != manager->activeEnd(); ++it ) {
@@ -234,19 +234,19 @@ bool KOTimelineView::eventDurationHint(TQDateTime & startDt, TQDateTime & endDt,
 void KOTimelineView::newEventWithHint( const TQDateTime& dt )
 {
   mHintDate = dt;
-  emit newEventSignal( 0/*ResourceCalendar*/, TQString()/*subResource*/, dt );
+  emit newEventSignal( nullptr/*ResourceCalendar*/, TQString()/*subResource*/, dt );
 }
 
 TimelineItem * KOTimelineView::calendarItemForIncidence(KCal::Incidence * incidence)
 {
   CalendarResources *calres = dynamic_cast<CalendarResources*>( calendar() );
-  TimelineItem *item = 0;
+  TimelineItem *item = nullptr;
   if ( !calres ) {
-    item = mCalendarItemMap[0][TQString()];
+    item = mCalendarItemMap[nullptr][TQString()];
   } else {
     ResourceCalendar *res = calres->resource( incidence );
     if ( !res )
-      return 0;
+      return nullptr;
     if ( res->canHaveSubresources() ) {
       TQString subRes = res->subresourceIdentifier( incidence );
       item = mCalendarItemMap[res][subRes];
@@ -324,7 +324,7 @@ void KOTimelineView::itemMoved(KDGanttViewItem * item)
   if ( !tlit )
     return;
   Incidence *i = tlit->incidence();
-  mChanger->beginChange( i, 0, TQString() );
+  mChanger->beginChange( i, nullptr, TQString() );
   TQDateTime newStart = tlit->startTime();
   if ( i->doesFloat() )
     newStart = TQDateTime( newStart.date() );
@@ -342,7 +342,7 @@ void KOTimelineView::itemMoved(KDGanttViewItem * item)
   i->setDuration( duration );
   TimelineItem *parent = static_cast<TimelineItem*>( tlit->parent() );
   parent->moveItems( i, tlit->originalStart().secsTo( newStart ), duration + allDayOffset );
-  mChanger->endChange( i, 0, TQString() );
+  mChanger->endChange( i, nullptr, TQString() );
 }
 
 void KOTimelineView::overscale(KDGanttView::Scale scale)
diff --git a/korganizer/kotimelineview.h b/korganizer/kotimelineview.h
index 0e131897b..8f32b6920 100644
--- a/korganizer/kotimelineview.h
+++ b/korganizer/kotimelineview.h
@@ -46,8 +46,8 @@ class KOTimelineView : public KOEventView
     TQ_OBJECT
   
   public:
-    KOTimelineView(Calendar *calendar, TQWidget *parent = 0,
-                    const char *name = 0);
+    KOTimelineView(Calendar *calendar, TQWidget *parent = nullptr,
+                    const char *name = nullptr);
     ~KOTimelineView();
 
     virtual KCal::ListBase<KCal::Incidence> selectedIncidences();
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index e81ed7716..4432075be 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -53,7 +53,7 @@
 
 KOTodoEditor::KOTodoEditor( Calendar *calendar, TQWidget *parent ) :
   KOIncidenceEditor( TQString(), calendar, parent ),
-  mTodo( 0 ), mCalendar( 0 ), mRelatedTodo( 0 ), mGeneral( 0 ), mRecurrence( 0 )
+  mTodo( nullptr ), mCalendar( nullptr ), mRelatedTodo( nullptr ), mGeneral( nullptr ), mRecurrence( nullptr )
 {
 }
 
@@ -166,8 +166,8 @@ void KOTodoEditor::newTodo()
 {
   kdDebug(5850) << k_funcinfo << endl;
   init();
-  mTodo = 0;
-  mCalendar = 0;
+  mTodo = nullptr;
+  mCalendar = nullptr;
   setCaption( i18n("New To-do") );
   loadDefaults();
 }
@@ -187,7 +187,7 @@ void KOTodoEditor::setTexts( const TQString &summary, const TQString &descriptio
 void KOTodoEditor::loadDefaults()
 {
   kdDebug(5850) << k_funcinfo << endl;
-  setDates( TQDateTime::currentDateTime().addDays( 7 ), true, 0 );
+  setDates( TQDateTime::currentDateTime().addDays( 7 ), true, nullptr );
   mGeneral->toggleAlarm( KOPrefs::instance()->defaultTodoReminders() );
 }
 
@@ -237,7 +237,7 @@ bool KOTodoEditor::processInput()
 
     if ( !mChanger->addIncidence( mTodo, mResource, mSubResource, this ) ) {
       delete mTodo;
-      mTodo = 0;
+      mTodo = nullptr;
       return false;
     }
   }
@@ -345,7 +345,7 @@ void KOTodoEditor::loadTemplate( /*const*/ CalendarLocal& cal )
     KMessageBox::error( this,
         i18n("Template does not contain a valid to-do.") );
   } else {
-    readTodo( todos.first(), 0, TQDate() );
+    readTodo( todos.first(), nullptr, TQDate() );
   }
 }
 
diff --git a/korganizer/kotodoeditor.h b/korganizer/kotodoeditor.h
index ebccd4d28..f1ba7bf8b 100644
--- a/korganizer/kotodoeditor.h
+++ b/korganizer/kotodoeditor.h
@@ -64,7 +64,7 @@ class KOTodoEditor : public KOIncidenceEditor
     void editIncidence(Incidence *incidence, const TQDate &date, Calendar* calendar);
 
     /** Set widgets to default values */
-    void setDates( const TQDateTime &due, bool allDay = true, Todo *relatedTodo = 0 );
+    void setDates( const TQDateTime &due, bool allDay = true, Todo *relatedTodo = nullptr );
     /** Read event object and setup widgets accordingly */
     void readTodo(Todo *todo, Calendar *calendar,  const TQDate &date);
     /** Write event settings to event object */
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index bbbb71dba..80d861478 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -101,9 +101,9 @@ void KOTodoListViewToolTip::maybeTip( const TQPoint & pos)
 
 
 KOTodoListView::KOTodoListView( TQWidget *parent, const char *name )
-  : TDEListView( parent, name ), mCalendar( 0 ), mChanger( 0 )
+  : TDEListView( parent, name ), mCalendar( nullptr ), mChanger( nullptr )
 {
-  mOldCurrent = 0;
+  mOldCurrent = nullptr;
   mMousePressed = false;
 }
 
@@ -131,7 +131,7 @@ bool KOTodoListView::event(TQEvent *e)
     TDEListView::event(e);
     i=(KOTodoViewItem *)itemAtIndex(tmp);
 
-    while(i!=0)
+    while(i)
     {
       i->construct();
       tmp++;
@@ -202,7 +202,7 @@ void KOTodoListView::contentsDropEvent( TQDropEvent *e )
 
     KOTodoViewItem *destination =
         (KOTodoViewItem *)itemAt(contentsToViewport(e->pos()));
-    Todo *destinationEvent = 0;
+    Todo *destinationEvent = nullptr;
     if (destination) destinationEvent = destination->todo();
 
     Todo *existingTodo = mCalendar->todo(todo->uid());
@@ -222,10 +222,10 @@ void KOTodoListView::contentsDropEvent( TQDropEvent *e )
       }
 
       Todo*oldTodo = existingTodo->clone();
-      if ( mChanger->beginChange( existingTodo, 0, TQString() ) ) {
+      if ( mChanger->beginChange( existingTodo, nullptr, TQString() ) ) {
         existingTodo->setRelatedTo( destinationEvent );
         mChanger->changeIncidence( oldTodo, existingTodo, KOGlobals::RELATION_MODIFIED, this );
-        mChanger->endChange( existingTodo, 0, TQString() );
+        mChanger->endChange( existingTodo, nullptr, TQString() );
       } else {
         KMessageBox::sorry( this, i18n("Unable to change to-do's parent, "
                             "because the to-do cannot be locked.") );
@@ -235,7 +235,7 @@ void KOTodoListView::contentsDropEvent( TQDropEvent *e )
     } else {
 //      kdDebug(5850) << "Drop new Todo" << endl;
       todo->setRelatedTo(destinationEvent);
-      if ( !mChanger->addIncidence( todo, 0, TQString(), this ) ) {
+      if ( !mChanger->addIncidence( todo, nullptr, TQString(), this ) ) {
         KODialogManager::errorSaveIncidence( this, todo );
         delete todo;
         return;
@@ -254,7 +254,7 @@ void KOTodoListView::contentsDropEvent( TQDropEvent *e )
       //TQListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) );
       kdDebug(5850) << "Dropped : " << text << endl;
       Todo*todo = todoi->todo();
-      if( mChanger->beginChange( todo, 0, TQString() ) ) {
+      if( mChanger->beginChange( todo, nullptr, TQString() ) ) {
         Todo*oldtodo = todo->clone();
 
         if( text.startsWith( "file:" ) ) {
@@ -273,7 +273,7 @@ void KOTodoListView::contentsDropEvent( TQDropEvent *e )
         }
         //FIXME: attendees or attachment added, so there is something modified
         mChanger->changeIncidence( oldtodo, todo, KOGlobals::NOTHING_MODIFIED, this );
-        mChanger->endChange( todo, 0, TQString() );
+        mChanger->endChange( todo, nullptr, TQString() );
       } else {
         KMessageBox::sorry( this, i18n("Unable to add attendees to the to-do, "
             "because the to-do cannot be locked.") );
@@ -599,7 +599,7 @@ TQMap<Todo *,KOTodoViewItem *>::ConstIterator
     Todo *relatedTodo = dynamic_cast<Todo *>(incidence);
 
     // just make sure we know we have this item already to avoid endless recursion (Bug 101696)
-    mTodoMap.insert(todo,0);
+    mTodoMap.insert(todo,nullptr);
 
 //    kdDebug(5850) << "  has Related" << endl;
     TQMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator;
@@ -614,8 +614,8 @@ TQMap<Todo *,KOTodoViewItem *>::ConstIterator
 
     // in case we found a related parent, which has no KOTodoViewItem yet, this must
     // be the case where 2 items refer to each other, therefore simply create item as root item
-    if ( *itemIterator == 0 ) {
-      todo->setRelatedTo(0);  // break the recursion, else we will have troubles later
+    if (!*itemIterator) {
+      todo->setRelatedTo(nullptr);  // break the recursion, else we will have troubles later
       todoItem = new KOTodoViewItem(mTodoListView,todo,this);
     }
     else
@@ -690,7 +690,7 @@ void KOTodoView::changeIncidenceDisplay(Incidence *incidence, int action)
   bool isFiltered = filter && !filter->filterIncidence( incidence );
   Todo *todo = static_cast<Todo *>(incidence);
   if ( todo ) {
-    KOTodoViewItem *todoItem = 0;
+    KOTodoViewItem *todoItem = nullptr;
     if ( mTodoMap.contains( todo ) ) {
       todoItem = mTodoMap[todo];
     }
@@ -704,7 +704,7 @@ void KOTodoView::changeIncidenceDisplay(Incidence *incidence, int action)
           } else {
             // correctly update changes in relations
             Todo*parent = dynamic_cast<Todo*>( todo->relatedTo() );
-            KOTodoViewItem*parentItem = 0;
+            KOTodoViewItem*parentItem = nullptr;
             if ( parent && mTodoMap.contains(parent) ) {
               parentItem = mTodoMap[ parent ];
             }
@@ -831,7 +831,7 @@ void KOTodoView::popupMenu( TQListViewItem *item, const TQPoint &, int column )
 void KOTodoView::newTodo()
 {
   kdDebug() << k_funcinfo << endl;
-  emit newTodoSignal( 0/*ResourceCalendar*/, TQString()/*subResource*/,
+  emit newTodoSignal( nullptr/*ResourceCalendar*/, TQString()/*subResource*/,
                       TQDate::currentDate().addDays(7) );
 }
 
@@ -886,13 +886,13 @@ void KOTodoView::setNewPriority(int index)
   if ( !mActiveItem || !mChanger ) return;
   Todo *todo = mActiveItem->todo();
   if ( !todo->isReadOnly () &&
-       mChanger->beginChange( todo, 0, TQString() ) ) {
+       mChanger->beginChange( todo, nullptr, TQString() ) ) {
     Todo *oldTodo = todo->clone();
     todo->setPriority(mPriority[index]);
     mActiveItem->construct();
 
     mChanger->changeIncidence( oldTodo, todo, KOGlobals::PRIORITY_MODIFIED, this );
-    mChanger->endChange( todo, 0, TQString() );
+    mChanger->endChange( todo, nullptr, TQString() );
     delete oldTodo;
   }
 }
@@ -905,7 +905,7 @@ void KOTodoView::setNewPercentage( KOTodoViewItem *item, int percentage )
   if ( !todo ) return;
 
   if ( !todo->isReadOnly () &&
-       mChanger->beginChange( todo, 0, TQString() ) ) {
+       mChanger->beginChange( todo, nullptr, TQString() ) ) {
     Todo *oldTodo = todo->clone();
 
 /*  Old code to make sub-items's percentage related to this one's:
@@ -933,7 +933,7 @@ void KOTodoView::setNewPercentage( KOTodoViewItem *item, int percentage )
     else
       mChanger->changeIncidence( oldTodo, todo,
                                  KOGlobals::COMPLETION_MODIFIED, this );
-    mChanger->endChange( todo, 0, TQString() );
+    mChanger->endChange( todo, nullptr, TQString() );
     delete oldTodo;
   } else {
     item->construct();
@@ -952,7 +952,7 @@ void KOTodoView::setNewDate( TQDate date )
   Todo *todo = mActiveItem->todo();
   if ( !todo ) return;
 
-  if ( !todo->isReadOnly() && mChanger->beginChange( todo, 0, TQString() ) ) {
+  if ( !todo->isReadOnly() && mChanger->beginChange( todo, nullptr, TQString() ) ) {
     Todo *oldTodo = todo->clone();
 
     TQDateTime dt;
@@ -967,7 +967,7 @@ void KOTodoView::setNewDate( TQDate date )
 
     mActiveItem->construct();
     mChanger->changeIncidence( oldTodo, todo, KOGlobals::COMPLETION_MODIFIED, this );
-    mChanger->endChange( todo, 0, TQString() );
+    mChanger->endChange( todo, nullptr, TQString() );
     delete oldTodo;
   } else {
     kdDebug(5850) << "No active item, active item is read-only, or locking failed" << endl;
@@ -1026,7 +1026,7 @@ void KOTodoView::changedCategories(int index)
   Todo *todo = mActiveItem->todo();
   if ( !todo ) return;
 
-  if ( !todo->isReadOnly() && mChanger->beginChange( todo, 0, TQString() ) ) {
+  if ( !todo->isReadOnly() && mChanger->beginChange( todo, nullptr, TQString() ) ) {
     Todo *oldTodo = todo->clone();
 
     TQStringList categories = todo->categories ();
@@ -1038,7 +1038,7 @@ void KOTodoView::changedCategories(int index)
     todo->setCategories( categories );
     mActiveItem->construct();
     mChanger->changeIncidence( oldTodo, todo, KOGlobals::CATEGORY_MODIFIED, this );
-    mChanger->endChange( todo, 0, TQString() );
+    mChanger->endChange( todo, nullptr, TQString() );
     delete oldTodo;
   } else {
     kdDebug(5850) << "No active item, active item is read-only, or locking failed" << endl;
@@ -1097,7 +1097,7 @@ void KOTodoView::processSelectionChange()
     static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() );
 
   if ( !item ) {
-    emit incidenceSelected( 0, TQDate() );
+    emit incidenceSelected( nullptr, TQDate() );
   } else {
     if ( selectedIncidenceDates().isEmpty() ) {
       emit incidenceSelected( item->todo(), TQDate() );
@@ -1124,7 +1124,7 @@ void KOTodoView::addQuickTodo()
     todo->setSummary( mQuickAdd->text() );
     todo->setOrganizer( Person( KOPrefs::instance()->fullName(),
                         KOPrefs::instance()->email() ) );
-    if ( !mChanger->addIncidence( todo, 0, TQString(), this ) ) {
+    if ( !mChanger->addIncidence( todo, nullptr, TQString(), this ) ) {
       delete todo;
       return;
     }
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index e8204c74b..231856ac0 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -74,7 +74,7 @@ class KOTodoListView : public TDEListView
     TQ_OBJECT
   
   public:
-    KOTodoListView( TQWidget *parent = 0, const char *name = 0 );
+    KOTodoListView( TQWidget *parent = nullptr, const char *name = nullptr );
     ~KOTodoListView();
 
     void setCalendar( Calendar * );
@@ -115,7 +115,7 @@ class KOTodoView : public KOrg::BaseView
     TQ_OBJECT
   
   public:
-    KOTodoView( Calendar *cal, TQWidget *parent = 0, const char *name = 0 );
+    KOTodoView( Calendar *cal, TQWidget *parent = nullptr, const char *name = nullptr );
     ~KOTodoView();
 
     void setCalendar( Calendar * );
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index 92d68f9f4..a52e5f945 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -202,7 +202,7 @@ bool KOTodoViewItem::isAlternate()
   KOTodoListView *lv = static_cast<KOTodoListView *>(listView());
   if (lv && lv->alternateBackground().isValid())
   {
-    KOTodoViewItem *above = 0;
+    KOTodoViewItem *above = nullptr;
     above = dynamic_cast<KOTodoViewItem *>(itemAbove());
     m_known = above ? above->m_known : true;
     if (m_known)
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index b983d953b..aefbd685a 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -53,19 +53,19 @@
 KOViewManager::KOViewManager( CalendarView *mainView ) :
   TQObject(), mMainView( mainView )
 {
-  mCurrentView = 0;
-
-  mLastEventView = 0;
-
-  mWhatsNextView = 0;
-  mTodoView = 0;
-  mAgendaView = 0;
-  mAgendaSideBySideView = 0;
-  mMonthView = 0;
-  mListView = 0;
-  mJournalView = 0;
-  mTimelineView = 0;
-  mAgendaViewTabs = 0;
+  mCurrentView = nullptr;
+
+  mLastEventView = nullptr;
+
+  mWhatsNextView = nullptr;
+  mTodoView = nullptr;
+  mAgendaView = nullptr;
+  mAgendaSideBySideView = nullptr;
+  mMonthView = nullptr;
+  mListView = nullptr;
+  mJournalView = nullptr;
+  mTimelineView = nullptr;
+  mAgendaViewTabs = nullptr;
   mAgendaViewTabIndex = 0;
   mAgendaMode = AGENDA_NONE;
 }
@@ -159,7 +159,7 @@ void KOViewManager::showView(KOrg::BaseView *view)
 
   raiseCurrentView();
 
-  mMainView->processIncidenceSelection( 0, TQDate() );
+  mMainView->processIncidenceSelection( nullptr, TQDate() );
 
   mMainView->updateView();
 
@@ -515,9 +515,9 @@ void KOViewManager::showEventView()
 
 Incidence *KOViewManager::currentSelection()
 {
-  if ( !mCurrentView ) return 0;
+  if ( !mCurrentView ) return nullptr;
   Incidence::List incidenceList = mCurrentView->selectedIncidences();
-  if ( incidenceList.isEmpty() ) return 0;
+  if ( incidenceList.isEmpty() ) return nullptr;
 
   return incidenceList.first();
 }
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index 7c8ce447f..e97b9e919 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -188,7 +188,7 @@ void KOWhatsNextView::updateView()
   for( it2 = events.begin(); it2 != events.end(); ++it2 ) {
     Event *ev = *it2;
     Attendee *me = ev->attendeeByMails( myEmails );
-    if (me!=0) {
+    if (me) {
       if (me->status()==Attendee::NeedsAction && me->RSVP()) {
         if (replies == 0) {
           mText += "<p></p>";
@@ -209,7 +209,7 @@ void KOWhatsNextView::updateView()
   for( it3 = todos.begin(); it3 != todos.end(); ++it3 ) {
     Todo *to = *it3;
     Attendee *me = to->attendeeByMails( myEmails );
-    if (me!=0) {
+    if (me) {
       if (me->status()==Attendee::NeedsAction && me->RSVP()) {
         if (replies == 0) {
           mText += "<p></p>";
@@ -323,7 +323,7 @@ void KOWhatsNextView::appendTodo( Incidence *ev )
 void KOWhatsNextView::showIncidence( const TQString &uid )
 {
   kdDebug(5850) << "KOWhatsNextView::showIncidence(): " << uid << endl;
-  Incidence *incidence = 0;
+  Incidence *incidence = nullptr;
 
   if ( uid.startsWith( "event://" ) ) {
     incidence = calendar()->incidence( uid.mid( 8 ) );
diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h
index 126a70558..d9e44bddb 100644
--- a/korganizer/kowhatsnextview.h
+++ b/korganizer/kowhatsnextview.h
@@ -53,8 +53,8 @@ class KOWhatsNextView : public KOrg::BaseView
     TQ_OBJECT
   
   public:
-    KOWhatsNextView(Calendar *calendar, TQWidget *parent = 0,
-                    const char *name = 0);
+    KOWhatsNextView(Calendar *calendar, TQWidget *parent = nullptr,
+                    const char *name = nullptr);
     ~KOWhatsNextView();
 
     virtual int currentDateCount();
diff --git a/korganizer/kowindowlist.cpp b/korganizer/kowindowlist.cpp
index 4d9c5353e..786444bd1 100644
--- a/korganizer/kowindowlist.cpp
+++ b/korganizer/kowindowlist.cpp
@@ -29,7 +29,7 @@
 #include "kowindowlist.moc"
 
 KOWindowList::KOWindowList( const char *name )
-  : TQObject( 0, name ), mDefaultWindow( 0 )
+  : TQObject( nullptr, name ), mDefaultWindow( nullptr )
 {
 //  kdDebug(5850) << "KOWindowList::KOWindowList()" << endl;
 }
@@ -46,7 +46,7 @@ void KOWindowList::addWindow( KOrg::MainWindow *korg )
 
 void KOWindowList::removeWindow( KOrg::MainWindow *korg )
 {
-  if ( korg == mDefaultWindow ) mDefaultWindow = 0;
+  if ( korg == mDefaultWindow ) mDefaultWindow = nullptr;
   else mWindowList.removeRef( korg );
 }
 
@@ -63,7 +63,7 @@ KOrg::MainWindow *KOWindowList::findInstance( const KURL &url )
   for( inst = mWindowList.first(); inst; inst = mWindowList.next() )
     if ( inst->getCurrentURL() == url )
       return inst;
-  return 0;
+  return nullptr;
 }
 
 KOrg::MainWindow *KOWindowList::defaultInstance()
diff --git a/korganizer/kowindowlist.h b/korganizer/kowindowlist.h
index fa307b8be..07c5b86c5 100644
--- a/korganizer/kowindowlist.h
+++ b/korganizer/kowindowlist.h
@@ -49,7 +49,7 @@ class KOWindowList : public TQObject
       Constructs a new list of KOrganizer windows. There should only be one
       instance of this class. The ActionManager class takes care of this.
     */
-    KOWindowList( const char *name = 0 );
+    KOWindowList( const char *name = nullptr );
     virtual ~KOWindowList();
 
     /**
diff --git a/korganizer/multiagendaview.cpp b/korganizer/multiagendaview.cpp
index e900fa481..8fa5475c9 100644
--- a/korganizer/multiagendaview.cpp
+++ b/korganizer/multiagendaview.cpp
@@ -35,7 +35,7 @@
 #define FOREACH_VIEW(av) \
 for(TQValueList<KOAgendaView*>::ConstIterator it = mAgendaViews.constBegin(); \
   it != mAgendaViews.constEnd();) \
-  for(KOAgendaView* av = (it != mAgendaViews.constEnd() ? (*it) : 0); \
+  for(KOAgendaView* av = (it != mAgendaViews.constEnd() ? (*it) : nullptr); \
       it != mAgendaViews.constEnd(); ++it, av = (*it)  )
 
 using namespace KOrg;
@@ -43,8 +43,8 @@ using namespace KOrg;
 MultiAgendaView::MultiAgendaView( Calendar * cal, CalendarView *calendarView,
                                  TQWidget * parent, const char *name ) :
     AgendaView( cal, parent, name ),
-    mSelectedAgendaView( 0 ),
-    mLastMovedSplitter( 0 ),
+    mSelectedAgendaView( nullptr ),
+    mLastMovedSplitter( nullptr ),
     mUpdateOnShow( false ),
     mPendingChanges( true ),
     mCalendarView( calendarView )
@@ -176,8 +176,8 @@ void MultiAgendaView::deleteViews()
   }
   mAgendaViews.clear();
   mAgendaWidgets.clear();
-  mLastMovedSplitter = 0;
-  mSelectedAgendaView = 0;
+  mLastMovedSplitter = nullptr;
+  mSelectedAgendaView = nullptr;
 }
 
 void MultiAgendaView::setupViews()
@@ -250,7 +250,7 @@ void MultiAgendaView::setupViews()
 
     disconnect( agenda->agenda(),
                 TQ_SIGNAL(zoomView(const int,const TQPoint&,const TQt::Orientation)),
-                agenda, 0 );
+                agenda, nullptr );
     connect( agenda->agenda(),
              TQ_SIGNAL(zoomView(const int,const TQPoint&,const TQt::Orientation)),
              TQ_SLOT(zoomView(const int,const TQPoint&,const TQt::Orientation)) );
@@ -399,7 +399,7 @@ void MultiAgendaView::addView( const TQString &label, ResourceCalendar *res, con
   }
 
   // Now, the sub agenda view
-  KOAgendaView* av = new KOAgendaView( calendar(), mCalendarView, box, 0, true );
+  KOAgendaView* av = new KOAgendaView( calendar(), mCalendarView, box, nullptr, true );
   av->setReadOnly( readOnlyView );
   av->setResource( res, subRes );
   av->setIncidenceChanger( mChanger );
@@ -549,7 +549,7 @@ void MultiAgendaView::installSplitterEventFilter(TQSplitter * splitter)
     mUpdateOnShow = true;
   TQObjectListIt it( *objlist );
   TQObject *obj;
-  while ( (obj = it.current()) != 0 ) {
+  while ((obj = it.current()) != nullptr) {
     obj->removeEventFilter( this );
     obj->installEventFilter( this );
     ++it;
@@ -588,15 +588,15 @@ void MultiAgendaView::resourcesChanged()
         TQString subRes = mSelectedAgendaView->subResourceCalendar();
         if ( !res->subresourceWritable( subRes ) ||
              !res->subresourceActive( subRes ) ) {
-          mSelectedAgendaView = 0;
+          mSelectedAgendaView = nullptr;
         }
       } else {
         if ( res->readOnly() || !res->isActive() ) {
-          mSelectedAgendaView = 0;
+          mSelectedAgendaView = nullptr;
         }
       }
     } else {
-      mSelectedAgendaView = 0;
+      mSelectedAgendaView = nullptr;
     }
   }
 
diff --git a/korganizer/multiagendaview.h b/korganizer/multiagendaview.h
index a3dba8867..54ca5a5e1 100644
--- a/korganizer/multiagendaview.h
+++ b/korganizer/multiagendaview.h
@@ -44,11 +44,11 @@ class MultiAgendaView : public AgendaView
   
   public:
     explicit MultiAgendaView( Calendar* cal, CalendarView *calendarView,
-                              TQWidget *parent = 0, const char *name = 0 );
+                              TQWidget *parent = nullptr, const char *name = nullptr );
     ~MultiAgendaView();
 
     KOAgendaView *selectedAgendaView();
-    void deSelectAgendaView() { mSelectedAgendaView = 0; }
+    void deSelectAgendaView() { mSelectedAgendaView = nullptr; }
     Incidence::List selectedIncidences();
     DateList selectedIncidenceDates();
     int currentDateCount();
diff --git a/korganizer/navigatorbar.h b/korganizer/navigatorbar.h
index fcff809fe..6cb10b5cb 100644
--- a/korganizer/navigatorbar.h
+++ b/korganizer/navigatorbar.h
@@ -36,7 +36,7 @@ class ActiveLabel : public TQLabel
     TQ_OBJECT
   
   public:
-    ActiveLabel( TQWidget *parent, const char *name = 0 );
+    ActiveLabel( TQWidget *parent, const char *name = nullptr );
 
   signals:
     void clicked();
@@ -51,7 +51,7 @@ class NavigatorBar: public TQWidget
     TQ_OBJECT
   
   public:
-    NavigatorBar( TQWidget *parent = 0, const char *name = 0 );
+    NavigatorBar( TQWidget *parent = nullptr, const char *name = nullptr );
     ~NavigatorBar();
 
     void showButtons( bool left, bool right );
diff --git a/korganizer/plugins/datenums/configdialog.h b/korganizer/plugins/datenums/configdialog.h
index 9bc2bc87f..c8dc8f58c 100644
--- a/korganizer/plugins/datenums/configdialog.h
+++ b/korganizer/plugins/datenums/configdialog.h
@@ -28,7 +28,7 @@ class ConfigDialog : public KDialogBase
     TQ_OBJECT
   
   public:
-    ConfigDialog(TQWidget *parent=0);
+    ConfigDialog(TQWidget *parent=nullptr);
     virtual ~ConfigDialog();
 
   protected:
diff --git a/korganizer/plugins/exchange/exchange.cpp b/korganizer/plugins/exchange/exchange.cpp
index ec6a02cfe..994275d41 100644
--- a/korganizer/plugins/exchange/exchange.cpp
+++ b/korganizer/plugins/exchange/exchange.cpp
@@ -111,7 +111,7 @@ TQString Exchange::shortInfo()
 
 void  Exchange::slotIncidenceSelected( Incidence *incidence )
 {
-  emit enableIncidenceActions( incidence != 0 );
+  emit enableIncidenceActions( incidence != nullptr );
 }
 
 void Exchange::download()
@@ -142,10 +142,10 @@ void Exchange::upload()
   Event* event = dynamic_cast<Event *> ( mainWindow()->view()->currentSelection() );
   if ( ! event )
   {
-    KMessageBox::information( 0L, i18n("Please select an appointment."), i18n("Exchange Plugin") );
+    KMessageBox::information( nullptr, i18n("Please select an appointment."), i18n("Exchange Plugin") );
     return;
   }
-  if ( KMessageBox::warningContinueCancel( 0L, i18n("Exchange Upload is EXPERIMENTAL, you may lose data on this appointment!"), i18n("Exchange Plugin"), i18n("&Upload") )
+  if ( KMessageBox::warningContinueCancel( nullptr, i18n("Exchange Upload is EXPERIMENTAL, you may lose data on this appointment!"), i18n("Exchange Plugin"), i18n("&Upload") )
        == KMessageBox::Continue ) {
     kdDebug(5850) << "Trying to add appointment " << event->summary() << endl;
     int result = mClient->uploadSynchronous( event );
@@ -161,11 +161,11 @@ void Exchange::remove()
   Event* event = dynamic_cast<Event *> ( mainWindow()->view()->currentSelection() );
   if ( ! event )
   {
-    KMessageBox::information( 0L, i18n("Please select an appointment."), i18n("Exchange Plugin") );
+    KMessageBox::information( nullptr, i18n("Please select an appointment."), i18n("Exchange Plugin") );
     return;
   }
 
-  if ( KMessageBox::warningContinueCancel( 0L, i18n("Exchange Delete is EXPERIMENTAL, if this is a recurring event it will delete all instances!"), i18n("Exchange Plugin"), KGuiItem(i18n("&Delete"),"edit-delete") )
+  if ( KMessageBox::warningContinueCancel( nullptr, i18n("Exchange Delete is EXPERIMENTAL, if this is a recurring event it will delete all instances!"), i18n("Exchange Plugin"), KGuiItem(i18n("&Delete"),"edit-delete") )
        == KMessageBox::Continue ) {
     kdDebug(5850) << "Trying to delete appointment " << event->summary() << endl;
     int result = mClient->removeSynchronous( event );
diff --git a/korganizer/plugins/exchange/exchangeconfig.h b/korganizer/plugins/exchange/exchangeconfig.h
index dc46da9b6..d3aa87342 100644
--- a/korganizer/plugins/exchange/exchangeconfig.h
+++ b/korganizer/plugins/exchange/exchangeconfig.h
@@ -32,7 +32,7 @@ class ExchangeConfig : public KDialogBase
     TQ_OBJECT
   
   public:
-    ExchangeConfig(KPIM::ExchangeAccount* account, TQWidget *parent=0);
+    ExchangeConfig(KPIM::ExchangeAccount* account, TQWidget *parent=nullptr);
     virtual ~ExchangeConfig();
 
 //  protected:
diff --git a/korganizer/plugins/exchange/exchangedialog.h b/korganizer/plugins/exchange/exchangedialog.h
index fc1020722..8b2651f4b 100644
--- a/korganizer/plugins/exchange/exchangedialog.h
+++ b/korganizer/plugins/exchange/exchangedialog.h
@@ -29,7 +29,7 @@ class ExchangeDialog : public KDialogBase
     TQ_OBJECT
   
   public:
-    ExchangeDialog( const TQDate &start, const TQDate &end, TQWidget *parent=0);
+    ExchangeDialog( const TQDate &start, const TQDate &end, TQWidget *parent=nullptr);
     virtual ~ExchangeDialog();
 
   protected slots:
diff --git a/korganizer/plugins/hebrew/configdialog.h b/korganizer/plugins/hebrew/configdialog.h
index 9a9f0b456..7a2a399e1 100644
--- a/korganizer/plugins/hebrew/configdialog.h
+++ b/korganizer/plugins/hebrew/configdialog.h
@@ -32,7 +32,7 @@ class ConfigDialog:public KDialogBase
 
 public:
 
-  ConfigDialog(TQWidget * parent = 0);
+  ConfigDialog(TQWidget * parent = nullptr);
   virtual ~ ConfigDialog();
 
 protected:
diff --git a/korganizer/previewdialog.cpp b/korganizer/previewdialog.cpp
index ddf803963..67fab6966 100644
--- a/korganizer/previewdialog.cpp
+++ b/korganizer/previewdialog.cpp
@@ -51,7 +51,7 @@ using namespace KCal;
 
 PreviewDialog::PreviewDialog( const KURL &url, TQWidget *parent )
   : KDialogBase( Plain, i18n("Import Calendar/Event"), User1 | User2 | Cancel, User1, parent,
-                 0, true, true, KGuiItem( i18n("&Merge into existing calendar"), "merge" ) ),
+                 nullptr, true, true, KGuiItem( i18n("&Merge into existing calendar"), "merge" ) ),
     mOriginalUrl( url )
 {
   TQFrame *topFrame = plainPage();
@@ -75,7 +75,7 @@ PreviewDialog::PreviewDialog( const KURL &url, TQWidget *parent )
     setButtonGuiItem( User2, KGuiItem( i18n("&Add as new calendar"), "add" ) );
   }
 
-  mLocalUrl = 0;
+  mLocalUrl = nullptr;
 }
 
 PreviewDialog::~PreviewDialog()
@@ -99,10 +99,10 @@ bool PreviewDialog::loadCalendar()
     }
 
     TQString tmpFile;
-    if ( TDEIO::NetAccess::download( mOriginalUrl, tmpFile, 0 ) ) {
+    if ( TDEIO::NetAccess::download( mOriginalUrl, tmpFile, nullptr ) ) {
       mLocalUrl = new KURL( tmpFile );
     } else {
-      mLocalUrl = 0;
+      mLocalUrl = nullptr;
     }
   } else {
     mLocalUrl = &mOriginalUrl;
diff --git a/korganizer/printing/calprinter.cpp b/korganizer/printing/calprinter.cpp
index 5205d09ec..66a639af4 100644
--- a/korganizer/printing/calprinter.cpp
+++ b/korganizer/printing/calprinter.cpp
@@ -253,7 +253,7 @@ KOrg::PrintPlugin *CalPrintDialog::selectedPlugin()
   if ( mPluginIDs.contains( id ) ) {
     return mPluginIDs[id];
   } else {
-    return 0;
+    return nullptr;
   }
 }
 
diff --git a/korganizer/printing/calprinter.h b/korganizer/printing/calprinter.h
index f8d25a4b9..0dfc7c14f 100644
--- a/korganizer/printing/calprinter.h
+++ b/korganizer/printing/calprinter.h
@@ -110,7 +110,7 @@ class CalPrintDialog : public KDialogBase
   
   public:
     CalPrintDialog( KOrg::PrintPlugin::List plugins,
-                    TQWidget *parent = 0, const char *name = 0 );
+                    TQWidget *parent = nullptr, const char *name = nullptr );
     virtual ~CalPrintDialog();
     KOrg::PrintPlugin *selectedPlugin();
     void setOrientation( CalPrinter::ePrintOrientation orientation );
diff --git a/korganizer/printing/calprintpluginbase.cpp b/korganizer/printing/calprintpluginbase.cpp
index 4aff9a46b..768543c0f 100644
--- a/korganizer/printing/calprintpluginbase.cpp
+++ b/korganizer/printing/calprintpluginbase.cpp
@@ -116,7 +116,7 @@ class PrintCellItem : public KOrg::CellItem
 
 CalPrintPluginBase::CalPrintPluginBase() : PrintPlugin(), mUseColors( true ),
     mHeaderHeight( -1 ), mSubHeaderHeight( SUBHEADER_HEIGHT ), mFooterHeight( -1 ),
-    mMargin( MARGIN_SIZE ), mPadding( PADDING_SIZE), mCalSys( 0 )
+    mMargin( MARGIN_SIZE ), mPadding( PADDING_SIZE), mCalSys( nullptr )
 {
 }
 CalPrintPluginBase::~CalPrintPluginBase()
@@ -174,7 +174,7 @@ void CalPrintPluginBase::doPrint( KPrinter *printer )
   print( p, pageWidth, pageHeight );
 
   p.end();
-  mPrinter = 0;
+  mPrinter = nullptr;
 }
 
 void CalPrintPluginBase::doLoadConfig()
@@ -286,7 +286,7 @@ Event *CalPrintPluginBase::holiday( const TQDate &dt )
     holiday->setCategories( i18n("Holiday") );
     return holiday;
   }
-  return 0;
+  return nullptr;
 }
 
 const KCalendarSystem *CalPrintPluginBase::calendarSystem() const
@@ -428,7 +428,7 @@ void CalPrintPluginBase::drawVerticalBox( TQPainter &p, int linewidth, const TQR
   p.save();
   p.rotate( -90 );
   TQRect rotatedBox( -box.top()-box.height(), box.left(), box.height(), box.width() );
-  showEventBox( p, linewidth, rotatedBox, 0, str,
+  showEventBox( p, linewidth, rotatedBox, nullptr, str,
                 ( flags == -1 ) ? TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine : flags );
 
   p.restore();
@@ -745,7 +745,7 @@ int CalPrintPluginBase::drawAllDayBox(TQPainter &p, Event::List &eventList,
   if ( hd ) eventList.prepend( hd );
 
   it = eventList.begin();
-  Event *currEvent = 0;
+  Event *currEvent = nullptr;
   // First, print all floating events
   while( it!=eventList.end() ) {
     currEvent=*it;
@@ -1136,7 +1136,7 @@ void CalPrintPluginBase::drawTimeTable(TQPainter &p,
 class MonthEventStruct
 {
   public:
-    MonthEventStruct() : event(0) {}
+    MonthEventStruct() : event(nullptr) {}
     MonthEventStruct( const TQDateTime &s, const TQDateTime &e, Event *ev)
     {
       event = ev;
diff --git a/korganizer/printing/calprintpluginbase.h b/korganizer/printing/calprintpluginbase.h
index 7c265f38c..6281c2bbc 100644
--- a/korganizer/printing/calprintpluginbase.h
+++ b/korganizer/printing/calprintpluginbase.h
@@ -499,7 +499,7 @@ class TDE_EXPORT CalPrintPluginBase : public KOrg::PrintPlugin
                    int posPriority, int posSummary, int posDueDt,
                    int posPercentComplete, int level, int x, int &y,
                    int width, int pageHeight,
-                   const Todo::List &todoList, TodoParentStart *r = 0 );
+                   const Todo::List &todoList, TodoParentStart *r = nullptr );
 
     /**
       Draws single journal item.
diff --git a/korganizer/publishdialog.h b/korganizer/publishdialog.h
index e4ede2005..a8912c6a0 100644
--- a/korganizer/publishdialog.h
+++ b/korganizer/publishdialog.h
@@ -36,7 +36,7 @@ class PublishDialog : public KDialogBase
     TQ_OBJECT
   
   public:
-    PublishDialog(TQWidget* parent=0,const char* name=0,
+    PublishDialog(TQWidget* parent=nullptr,const char* name=nullptr,
                    bool modal=true );
     ~PublishDialog();
 
diff --git a/korganizer/resourceview.cpp b/korganizer/resourceview.cpp
index d8d1b6375..3cfa93dbb 100644
--- a/korganizer/resourceview.cpp
+++ b/korganizer/resourceview.cpp
@@ -92,7 +92,7 @@ static TQString labelFromIdentifier( ResourceCalendar *resource, const TQString
 }
 
 ResourceViewFactory::ResourceViewFactory( CalendarResources *calendar, CalendarView *view )
-  : mCalendar( calendar ), mCalendarView( view ), mResourceView( 0 )
+  : mCalendar( calendar ), mCalendarView( view ), mResourceView( nullptr )
 {
 }
 
@@ -230,7 +230,7 @@ void ResourceItem::setResourceColor(TQColor& color)
     }
   } else {
     mResourceColor = color ;
-    setPixmap(0,0);
+    setPixmap(0,nullptr);
   }
 }
 
@@ -660,7 +660,7 @@ void ResourceView::currentChanged( TQListViewItem *lvitem )
 ResourceItem *ResourceView::findItem( ResourceCalendar *resource )
 {
   TQListViewItem *lvitem;
-  ResourceItem *item = 0;
+  ResourceItem *item = nullptr;
   for( lvitem = mListView->firstChild(); lvitem; lvitem = lvitem->nextSibling() ) {
     item = static_cast<ResourceItem *>( lvitem );
     if ( item->resource() == resource ) break;
@@ -671,13 +671,13 @@ ResourceItem *ResourceView::findItem( ResourceCalendar *resource )
 ResourceItem *ResourceView::findItemByIdentifier( const TQString &identifier )
 {
   TQListViewItem *lvitem;
-  ResourceItem *item = 0;
+  ResourceItem *item = nullptr;
   for ( lvitem = mListView->firstChild(); lvitem; lvitem = lvitem->itemBelow() ) {
     item = static_cast<ResourceItem *>( lvitem );
     if ( item->resourceIdentifier() == identifier )
        return item;
   }
-  return 0;
+  return nullptr;
 }
 
 void ResourceView::contextMenuRequested ( TQListViewItem *lvitem, const TQPoint &pos, int )
diff --git a/korganizer/resourceview.h b/korganizer/resourceview.h
index 4c7ad2890..9dbf098c0 100644
--- a/korganizer/resourceview.h
+++ b/korganizer/resourceview.h
@@ -98,7 +98,7 @@ class ResourceView : public CalendarViewExtension
   
   public:
     ResourceView( CalendarResources *calendar, CalendarView *view,
-                  TQWidget *parent = 0, const char *name = 0 );
+                  TQWidget *parent = nullptr, const char *name = nullptr );
     ~ResourceView();
 
     CalendarResources *calendar() const { return mCalendar; }
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 4087a810f..859136deb 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -46,7 +46,7 @@
 #include "searchdialog.moc"
 
 SearchDialog::SearchDialog(Calendar *calendar,TQWidget *parent)
-  : KDialogBase(Plain,i18n("Find Events"),User1|Close,User1,parent,0,false,false,
+  : KDialogBase(Plain,i18n("Find Events"),User1|Close,User1,parent,nullptr,false,false,
                 KGuiItem( i18n("&Find"), "edit-find") )
 {
   mCalendar = calendar;
diff --git a/korganizer/searchdialog.h b/korganizer/searchdialog.h
index 5cb22dc73..89a28184a 100644
--- a/korganizer/searchdialog.h
+++ b/korganizer/searchdialog.h
@@ -48,7 +48,7 @@ class SearchDialog : public KDialogBase
     TQ_OBJECT
   
   public:
-    SearchDialog(Calendar *calendar,TQWidget *parent=0);
+    SearchDialog(Calendar *calendar,TQWidget *parent=nullptr);
     virtual ~SearchDialog();
 
     void updateView();
diff --git a/korganizer/statusdialog.h b/korganizer/statusdialog.h
index 144b7d87f..a4eb373ef 100644
--- a/korganizer/statusdialog.h
+++ b/korganizer/statusdialog.h
@@ -31,7 +31,7 @@ class StatusDialog : public KDialog
     TQ_OBJECT
   
   public:
-    StatusDialog(TQWidget* parent=0,const char* name=0);
+    StatusDialog(TQWidget* parent=nullptr,const char* name=nullptr);
     ~StatusDialog();
 
     Attendee::PartStat status();
diff --git a/korganizer/stdcalendar.cpp b/korganizer/stdcalendar.cpp
index 067997185..b689745dc 100644
--- a/korganizer/stdcalendar.cpp
+++ b/korganizer/stdcalendar.cpp
@@ -34,7 +34,7 @@ using namespace KOrg;
 
 static KStaticDeleter<StdCalendar> selfDeleter;
 
-StdCalendar *StdCalendar::mSelf = 0;
+StdCalendar *StdCalendar::mSelf = nullptr;
 
 StdCalendar *StdCalendar::self()
 {
@@ -57,7 +57,7 @@ StdCalendar::StdCalendar()
 
     TQString resourceName;
     TQString resoruceType;
-    KCal::ResourceCalendar *defaultResource = 0;
+    KCal::ResourceCalendar *defaultResource = nullptr;
     if ( !fileName.isEmpty() ) {
       KURL url( fileName );
       if ( url.isLocalFile() ) {
@@ -105,5 +105,5 @@ StdCalendar::StdCalendar()
 
 StdCalendar::~StdCalendar()
 {
-  mSelf = 0;
+  mSelf = nullptr;
 }
diff --git a/korganizer/templatemanagementdialog.cpp b/korganizer/templatemanagementdialog.cpp
index 4a1d2b5b9..b2e3f9fc4 100644
--- a/korganizer/templatemanagementdialog.cpp
+++ b/korganizer/templatemanagementdialog.cpp
@@ -107,7 +107,7 @@ void TemplateManagementDialog::slotDeleteTemplate()
 
 void TemplateManagementDialog::slotUpdateDeleteButton( TQListBoxItem *item )
 {
-  m_base->m_buttonDelete->setEnabled( item != 0 );
+  m_base->m_buttonDelete->setEnabled( item != nullptr );
 }
 
 void TemplateManagementDialog::slotApplyTemplate()
diff --git a/korganizer/timelabels.cpp b/korganizer/timelabels.cpp
index 19ae5721c..f4c78cc02 100644
--- a/korganizer/timelabels.cpp
+++ b/korganizer/timelabels.cpp
@@ -47,7 +47,7 @@ TimeLabels::TimeLabels(int rows,TQWidget *parent,const char *name,WFlags f) :
 {
   mRows = rows;
   mMiniWidth = 0;
-  mAgenda = 0;
+  mAgenda = nullptr;
 
   mCellHeight = KOPrefs::instance()->mHourSize*4;
 
diff --git a/korganizer/timelabels.h b/korganizer/timelabels.h
index 77d565b47..237b8c3e7 100644
--- a/korganizer/timelabels.h
+++ b/korganizer/timelabels.h
@@ -41,7 +41,7 @@ class TimeLabels : public TQScrollView
     TQ_OBJECT
   
   public:
-    TimeLabels( int rows, TQWidget *parent = 0, const char *name = 0,
+    TimeLabels( int rows, TQWidget *parent = nullptr, const char *name = nullptr,
                 WFlags f = 0 );
 
     /** Calculates the minimum width */
diff --git a/korganizer/timelineitem.cpp b/korganizer/timelineitem.cpp
index 1e6e11692..d11d702ad 100644
--- a/korganizer/timelineitem.cpp
+++ b/korganizer/timelineitem.cpp
@@ -95,8 +95,8 @@ TimelineSubItem::TimelineSubItem( KCal::Calendar *calendar,
                                   KCal::Incidence *incidence, TimelineItem *parent) :
     KDGanttViewTaskItem( parent ),
     mIncidence( incidence ),
-    mLeft( 0 ),
-    mRight( 0 ),
+    mLeft( nullptr ),
+    mRight( nullptr ),
     mMarkerWidth( 0 )
 {
   setTooltipText( IncidenceFormatter::toolTipStr( calendar, incidence,
diff --git a/libkcal/assignmentvisitor.cpp b/libkcal/assignmentvisitor.cpp
index 4ba41bfe7..89690509d 100644
--- a/libkcal/assignmentvisitor.cpp
+++ b/libkcal/assignmentvisitor.cpp
@@ -31,7 +31,7 @@ using namespace KCal;
 class AssignmentVisitor::Private
 {
   public:
-    Private() : mSource( 0 ) {}
+    Private() : mSource( nullptr ) {}
 
   public:
     const IncidenceBase *mSource;
@@ -48,24 +48,24 @@ AssignmentVisitor::~AssignmentVisitor()
 
 bool AssignmentVisitor::assign( IncidenceBase *target, const IncidenceBase *source )
 {
-  Q_ASSERT( target != 0 );
-  Q_ASSERT( source != 0 );
+  Q_ASSERT(target);
+  Q_ASSERT(source);
 
   d->mSource = source;
 
   bool result = target->accept( *this );
 
-  d->mSource = 0;
+  d->mSource = nullptr;
 
   return result;
 }
 
 bool AssignmentVisitor::visit( Event *event )
 {
-  Q_ASSERT( event != 0 );
+  Q_ASSERT(event);
 
   const Event *source = dynamic_cast<const Event*>( d->mSource );
-  if ( source == 0 ) {
+  if (!source) {
     kdError(5800) << "Type mismatch: source is" << d->mSource->type()
                   << "target is" << event->type() << endl;
     return false;
@@ -77,10 +77,10 @@ bool AssignmentVisitor::visit( Event *event )
 
 bool AssignmentVisitor::visit( Todo *todo )
 {
-  Q_ASSERT( todo != 0 );
+  Q_ASSERT(todo);
 
   const Todo *source = dynamic_cast<const Todo*>( d->mSource );
-  if ( source == 0 ) {
+  if (!source) {
     kdError(5800) << "Type mismatch: source is" << d->mSource->type()
                   << "target is" << todo->type() << endl;
     return false;
@@ -92,10 +92,10 @@ bool AssignmentVisitor::visit( Todo *todo )
 
 bool AssignmentVisitor::visit( Journal *journal )
 {
-  Q_ASSERT( journal != 0 );
+  Q_ASSERT(journal);
 
   const Journal *source = dynamic_cast<const Journal*>( d->mSource );
-  if ( source == 0 ) {
+  if (!source) {
     kdError(5800) << "Type mismatch: source is" << d->mSource->type()
                   << "target is" << journal->type() << endl;
     return false;
@@ -107,10 +107,10 @@ bool AssignmentVisitor::visit( Journal *journal )
 
 bool AssignmentVisitor::visit( FreeBusy *freebusy )
 {
-  Q_ASSERT( freebusy != 0 );
+  Q_ASSERT(freebusy);
 
   const FreeBusy *source = dynamic_cast<const FreeBusy*>( d->mSource );
-  if ( source == 0 ) {
+  if (!source) {
     kdError(5800) << "Type mismatch: source is" << d->mSource->type()
                   << "target is" << freebusy->type() << endl;
     return false;
diff --git a/libkcal/attachment.cpp b/libkcal/attachment.cpp
index 5ae4031a9..efe598d8d 100644
--- a/libkcal/attachment.cpp
+++ b/libkcal/attachment.cpp
@@ -41,7 +41,7 @@ Attachment::Attachment( const TQString &uri, const TQString &mime )
   mSize = 0;
   mMimeType = mime;
   mUri = uri;
-  mData = 0;
+  mData = nullptr;
   mBinary = false;
   mLocal = false;
   mShowInline = false;
@@ -92,7 +92,7 @@ char *Attachment::data() const
   if ( mBinary ) {
     return mData;
   } else {
-    return 0;
+    return nullptr;
   }
 }
 
diff --git a/libkcal/attachmenthandler.cpp b/libkcal/attachmenthandler.cpp
index 5f027a3cc..3a6436698 100644
--- a/libkcal/attachmenthandler.cpp
+++ b/libkcal/attachmenthandler.cpp
@@ -51,12 +51,12 @@ Attachment *AttachmentHandler::find( TQWidget *parent, const TQString &attachmen
                                      Incidence *incidence )
 {
   if ( !incidence ) {
-    return 0;
+    return nullptr;
   }
 
   // get the attachment by name from the incidence
   Attachment::List as = incidence->attachments();
-  Attachment *a = 0;
+  Attachment *a = nullptr;
   if ( as.count() > 0 ) {
     Attachment::List::ConstIterator it;
     for ( it = as.begin(); it != as.end(); ++it ) {
@@ -71,7 +71,7 @@ Attachment *AttachmentHandler::find( TQWidget *parent, const TQString &attachmen
     KMessageBox::error(
       parent,
       i18n( "No attachment named \"%1\" found in the incidence." ).arg( attachmentName ) );
-    return 0;
+    return nullptr;
   }
 
   if ( a->isUri() ) {
@@ -80,7 +80,7 @@ Attachment *AttachmentHandler::find( TQWidget *parent, const TQString &attachmen
         parent,
         i18n( "The attachment \"%1\" is a web link that is inaccessible from this computer. " ).
         arg( KURL::decode_string( a->uri() ) ) );
-      return 0;
+      return nullptr;
     }
   }
   return a;
@@ -90,7 +90,7 @@ Attachment *AttachmentHandler::find( TQWidget *parent,
                                      const TQString &attachmentName, const TQString &uid )
 {
   if ( uid.isEmpty() ) {
-    return 0;
+    return nullptr;
   }
 
   CalendarResources *cal = new CalendarResources( "UTC" );
@@ -102,7 +102,7 @@ Attachment *AttachmentHandler::find( TQWidget *parent,
       parent,
       i18n( "The incidence that owns the attachment named \"%1\" could not be found. "
             "Perhaps it was removed from your calendar?" ).arg( attachmentName ) );
-    return 0;
+    return nullptr;
   }
 
   return find( parent, attachmentName, incidence );
@@ -112,7 +112,7 @@ Attachment *AttachmentHandler::find( TQWidget *parent, const TQString &attachmen
                                      ScheduleMessage *message )
 {
   if ( !message ) {
-    return 0;
+    return nullptr;
   }
 
   Incidence *incidence = dynamic_cast<Incidence*>( message->event() );
@@ -121,13 +121,13 @@ Attachment *AttachmentHandler::find( TQWidget *parent, const TQString &attachmen
       parent,
       i18n( "The calendar invitation stored in this email message is broken in some way. "
             "Unable to continue." ) );
-    return 0;
+    return nullptr;
   }
 
   return find( parent, attachmentName, incidence );
 }
 
-static KTempFile *s_tempFile = 0;
+static KTempFile *s_tempFile = nullptr;
 
 static KURL tempFileForAttachment( Attachment *attachment )
 {
@@ -149,7 +149,7 @@ static KURL tempFileForAttachment( Attachment *attachment )
   if ( tf.size() != attachment->size() ) {
     //whoops. failed to write the entire attachment. return an invalid URL.
     delete s_tempFile;
-    s_tempFile = 0;
+    s_tempFile = nullptr;
     return url;
   }
 
@@ -178,7 +178,7 @@ bool AttachmentHandler::view( TQWidget *parent, Attachment *attachment )
         i18n( "Unable to create a temporary file for the attachment." ) );
     }
     delete s_tempFile;
-    s_tempFile = 0;
+    s_tempFile = nullptr;
   }
   return stat;
 }
@@ -232,7 +232,7 @@ bool AttachmentHandler::saveAs( TQWidget *parent, Attachment *attachment )
         i18n( "Unable to create a temporary file for the attachment." ) );
     }
     delete s_tempFile;
-    s_tempFile = 0;
+    s_tempFile = nullptr;
   }
   return stat;
 }
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp
index a87472b0c..589a5b65e 100644
--- a/libkcal/calendar.cpp
+++ b/libkcal/calendar.cpp
@@ -50,7 +50,7 @@ Calendar::Calendar( const TQString &timeZoneId )
 
 void Calendar::init()
 {
-  mException = 0;
+  mException = nullptr;
   mNewObserver = false;
   mObserversEnabled = true;
 
@@ -74,7 +74,7 @@ Calendar::~Calendar()
 void Calendar::clearException()
 {
   delete mException;
-  mException = 0;
+  mException = nullptr;
 }
 
 ErrorFormat *Calendar::exception() const
@@ -509,7 +509,7 @@ Incidence *Calendar::dissociateOccurrence( Incidence *incidence, TQDate date,
                                            bool single )
 {
   if ( !incidence || !incidence->doesRecur() )
-    return 0;
+    return nullptr;
 
   Incidence *newInc = incidence->clone();
   newInc->recreate();
@@ -605,7 +605,7 @@ Incidence *Calendar::incidenceFromSchedulingID( const TQString &UID )
       // Touchdown, and the crowd goes wild
       return *it;
   // Not found
-  return 0;
+  return nullptr;
 }
 
 Todo::List Calendar::sortTodos( Todo::List *todoList,
@@ -888,7 +888,7 @@ void Calendar::removeRelations( Incidence *incidence )
     if ( !mOrphanUids.find( i->uid() ) ) {
       mOrphans.insert( uid, i );
       mOrphanUids.insert( i->uid(), i );
-      i->setRelatedTo( 0 );
+      i->setRelatedTo( nullptr );
       i->setRelatedToUid( uid );
     }
   }
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index 9fa5de8c6..96c1b5b07 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -288,7 +288,7 @@ Todo *CalendarLocal::todo( const TQString &uid )
     if ( (*it)->uid() == uid ) return *it;
   }
 
-  return 0;
+  return nullptr;
 }
 
 Todo::List CalendarLocal::rawTodosForDate( const TQDate &date )
@@ -513,7 +513,7 @@ void CalendarLocal::incidenceUpdated( IncidenceBase *incidence )
 void CalendarLocal::insertEvent( Event *event )
 {
   TQString uid = event->uid();
-  if ( mEvents[ uid ] == 0 ) {
+  if (!mEvents[ uid ]) {
     mEvents.insert( uid, event );
   }
 #ifndef NDEBUG
@@ -718,7 +718,7 @@ Journal *CalendarLocal::journal( const TQString &uid )
     if ( (*it)->uid() == uid )
       return *it;
 
-  return 0;
+  return nullptr;
 }
 
 Journal::List CalendarLocal::rawJournals( JournalSortField sortField, SortDirection sortDirection )
@@ -748,7 +748,7 @@ void CalendarLocal::setTimeZoneIdViewOnly( const TQString& tz )
       "changes or rather wait and apply the new timezone on the next reload?" ) );
   int rc = KMessageBox::Yes;
   if ( isModified() ) {
-    rc = KMessageBox::questionYesNo( 0, question,
+    rc = KMessageBox::questionYesNo( nullptr, question,
                                        i18n("Save before applying timezones?"),
                                        KStdGuiItem::save(),
                                        KGuiItem(i18n("Apply Timezone Change on Next Reload")),
diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h
index b14607fc6..6cc91e216 100644
--- a/libkcal/calendarlocal.h
+++ b/libkcal/calendarlocal.h
@@ -55,7 +55,7 @@ class LIBKCAL_EXPORT CalendarLocal : public Calendar
       @param fileName the name of the calendar on disk.
       @param format the format to use. If 0, iCalendar and vCalendar will be used
     */
-    bool load( const TQString &fileName, CalFormat *format = 0 );
+    bool load( const TQString &fileName, CalFormat *format = nullptr );
 
     /**
      * Reloads the contents of the storage into memory. The associated file name
@@ -71,7 +71,7 @@ class LIBKCAL_EXPORT CalendarLocal : public Calendar
       @param format the format to use
       @return true, if successful, false on error.
     */
-    bool save( const TQString &fileName, CalFormat *format = 0 );
+    bool save( const TQString &fileName, CalFormat *format = nullptr );
 
     /**
       Clears out the current calendar, freeing all used memory etc. etc.
diff --git a/libkcal/calendarnull.cpp b/libkcal/calendarnull.cpp
index f4b07789c..a6d7b833a 100644
--- a/libkcal/calendarnull.cpp
+++ b/libkcal/calendarnull.cpp
@@ -32,7 +32,7 @@ CalendarNull::CalendarNull( const TQString &timeZoneId )
   : Calendar( timeZoneId )
 {}
 
-CalendarNull *CalendarNull::mSelf = 0;
+CalendarNull *CalendarNull::mSelf = nullptr;
 
 CalendarNull *CalendarNull::self()
 {
diff --git a/libkcal/calendarnull.h b/libkcal/calendarnull.h
index 4db35bce7..882c6bdc7 100644
--- a/libkcal/calendarnull.h
+++ b/libkcal/calendarnull.h
@@ -177,7 +177,7 @@ class LIBKCAL_EXPORT CalendarNull : public Calendar
        Return a null Event pointer.
     */
     Event *event( const TQString & /*uid*/ )
-      { return 0; }
+      { return nullptr; }
 
 // Todo Specific Methods //
 
@@ -232,7 +232,7 @@ class LIBKCAL_EXPORT CalendarNull : public Calendar
        Returns a null Todo pointer.
     */
     Todo *todo( const TQString & /*uid*/ )
-      { return 0; }
+      { return nullptr; }
 
 // Journal Specific Methods //
 
@@ -286,7 +286,7 @@ class LIBKCAL_EXPORT CalendarNull : public Calendar
        Returns an null Journal pointer.
     */
     Journal *journal( const TQString & /*uid*/ )
-      { return 0; }
+      { return nullptr; }
 
 // Alarm Specific Methods //
 
diff --git a/libkcal/calendarresources.cpp b/libkcal/calendarresources.cpp
index bee2bf319..e00020d77 100644
--- a/libkcal/calendarresources.cpp
+++ b/libkcal/calendarresources.cpp
@@ -59,7 +59,7 @@ using namespace KCal;
 class CalendarResources::Private {
   public:
 
-  Private() : mLastUsedResource( 0 ), mBatchAddingInProgress( false )
+  Private() : mLastUsedResource( nullptr ), mBatchAddingInProgress( false )
   {
   }
 
@@ -323,7 +323,7 @@ bool CalendarResources::addIncidence( Incidence *incidence,
 
   kdDebug(5800)<< "CalendarResources: validRes is " << validRes << endl;
 
-  ResourceCalendar *oldResource = 0;
+  ResourceCalendar *oldResource = nullptr;
   if ( mResourceMap.contains( incidence ) ) {
     oldResource = mResourceMap[incidence];
   }
@@ -365,7 +365,7 @@ bool CalendarResources::addIncidence( Incidence *incidence )
 
   ResourceCalendar *resource = d->mLastUsedResource;
 
-  if ( !d->mBatchAddingInProgress || d->mLastUsedResource == 0 ) {
+  if ( !d->mBatchAddingInProgress || !d->mLastUsedResource ) {
     resource = mDestinationPolicy->destination( incidence );
     d->mLastUsedResource = resource;
 
@@ -399,7 +399,7 @@ bool CalendarResources::addIncidence( Incidence *incidence )
       // the incidence isn't going to be added, do cleanup:
       mResourceMap.remove( incidence );
       d->mLastUsedResource->endAddingIncidences();
-      d->mLastUsedResource = 0;
+      d->mLastUsedResource = nullptr;
     }
   } else {
     setException( new ErrorFormat( ErrorFormat::UserCancel ) );
@@ -462,7 +462,7 @@ Event *CalendarResources::event( const TQString &uid )
   }
 
   // Not found
-  return 0;
+  return nullptr;
 }
 
 bool CalendarResources::addTodo( Todo *todo )
@@ -534,7 +534,7 @@ Todo *CalendarResources::todo( const TQString &uid )
   }
 
   // Not found
-  return 0;
+  return nullptr;
 }
 
 Todo::List CalendarResources::rawTodosForDate( const TQDate &date )
@@ -716,7 +716,7 @@ Journal *CalendarResources::journal( const TQString &uid )
   }
 
   // Not found
-  return 0;
+  return nullptr;
 }
 
 Journal::List CalendarResources::rawJournals( JournalSortField sortField,
@@ -774,7 +774,7 @@ ResourceCalendar *CalendarResources::resource( Incidence *incidence )
   if ( mResourceMap.find( incidence ) != mResourceMap.end() ) {
     return mResourceMap[ incidence ];
   }
-  return 0;
+  return nullptr;
 }
 
 void CalendarResources::resourceAdded( ResourceCalendar *resource )
@@ -829,11 +829,11 @@ CalendarResources::Ticket
 
   TDEABC::Lock *lock = resource->lock();
   if ( !lock )
-    return 0;
+    return nullptr;
   if ( lock->lock() )
     return new Ticket( resource );
   else
-    return 0;
+    return nullptr;
 }
 
 bool CalendarResources::save( Ticket *ticket, Incidence *incidence )
@@ -862,7 +862,7 @@ void CalendarResources::releaseSaveTicket( Ticket *ticket )
 
 bool CalendarResources::beginChange( Incidence *incidence )
 {
-  return beginChange( incidence, 0, TQString() );
+  return beginChange( incidence, nullptr, TQString() );
 }
 
 bool CalendarResources::beginChange( Incidence *incidence,
@@ -904,7 +904,7 @@ bool CalendarResources::beginChange( Incidence *incidence,
 
 bool CalendarResources::endChange( Incidence *incidence )
 {
-  return endChange( incidence, 0, TQString() );
+  return endChange( incidence, nullptr, TQString() );
 }
 
 bool CalendarResources::endChange( Incidence *incidence,
@@ -955,7 +955,7 @@ void CalendarResources::endAddingIncidences()
     d->mLastUsedResource->endAddingIncidences();
   }
 
-  d->mLastUsedResource = 0;
+  d->mLastUsedResource = nullptr;
 }
 
 int CalendarResources::incrementChangeCount( ResourceCalendar *r )
diff --git a/libkcal/calendarresources.h b/libkcal/calendarresources.h
index 23539fc37..13b48f64b 100644
--- a/libkcal/calendarresources.h
+++ b/libkcal/calendarresources.h
@@ -75,7 +75,7 @@ class LIBKCAL_EXPORT CalendarResources :
     {
       public:
         DestinationPolicy( CalendarResourceManager *manager,
-                              TQWidget *parent = 0  ) :
+                              TQWidget *parent = nullptr  ) :
           mManager( manager ), mParent( parent ) {}
         virtual ~DestinationPolicy() {}
 
@@ -99,7 +99,7 @@ class LIBKCAL_EXPORT CalendarResources :
     {
       public:
         StandardDestinationPolicy( CalendarResourceManager *manager,
-                              TQWidget *parent = 0  ) :
+                              TQWidget *parent = nullptr  ) :
           DestinationPolicy( manager, parent ) {}
         virtual ~StandardDestinationPolicy() {}
 
@@ -117,7 +117,7 @@ class LIBKCAL_EXPORT CalendarResources :
     {
       public:
         AskDestinationPolicy( CalendarResourceManager *manager,
-                              TQWidget *parent = 0 ) :
+                              TQWidget *parent = nullptr ) :
           DestinationPolicy( manager, parent ) {}
         virtual ~AskDestinationPolicy() {}
 
@@ -219,7 +219,7 @@ class LIBKCAL_EXPORT CalendarResources :
 
        @return true if the save was successful; false otherwise.
     */
-    virtual bool save( Ticket *ticket, Incidence *incidence = 0 );
+    virtual bool save( Ticket *ticket, Incidence *incidence = nullptr );
 
     /**
        Sync changes in memory to persistant storage.
@@ -259,7 +259,7 @@ class LIBKCAL_EXPORT CalendarResources :
 
        @note Call this method <em>before</em> load().
     */
-    void readConfig( TDEConfig *config = 0 );
+    void readConfig( TDEConfig *config = nullptr );
 
     /**
        Set the destination policy such that Incidences are always added
diff --git a/libkcal/calformat.cpp b/libkcal/calformat.cpp
index d6aa22784..f54e9fe02 100644
--- a/libkcal/calformat.cpp
+++ b/libkcal/calformat.cpp
@@ -33,7 +33,7 @@ TQString CalFormat::mProductId = TQString::fromLatin1("-//K Desktop Environment/
 
 CalFormat::CalFormat()
 {
-  mException = 0;
+  mException = nullptr;
 }
 
 CalFormat::~CalFormat()
@@ -44,7 +44,7 @@ CalFormat::~CalFormat()
 void CalFormat::clearException()
 {
   delete mException;
-  mException = 0;
+  mException = nullptr;
 }
 
 void CalFormat::setException( ErrorFormat *exception )
diff --git a/libkcal/calhelper.cpp b/libkcal/calhelper.cpp
index b78166750..c463ddf0d 100644
--- a/libkcal/calhelper.cpp
+++ b/libkcal/calhelper.cpp
@@ -60,11 +60,11 @@ bool CalHelper::isMyCalendarIncidence( Calendar *calendar, Incidence *incidence
 Incidence *CalHelper::findMyCalendarIncidenceByUid( Calendar *calendar, const TQString &uid )
 {
   // Determine if this incidence is in my calendar (and owned by me)
-  Incidence *existingIncidence = 0;
+  Incidence *existingIncidence = nullptr;
   if ( calendar ) {
     existingIncidence = calendar->incidence( uid );
     if ( !isMyCalendarIncidence( calendar, existingIncidence ) ) {
-      existingIncidence = 0;
+      existingIncidence = nullptr;
     }
     if ( !existingIncidence ) {
       const Incidence::List list = calendar->incidences();
@@ -140,7 +140,7 @@ ResourceCalendar *CalHelper::incResourceCalendar( Calendar *calendar, Incidence
 {
   CalendarResources *cal = dynamic_cast<CalendarResources*>( calendar );
   if ( !cal || !incidence ) {
-    return 0;
+    return nullptr;
   }
 
   return cal->resource( incidence );
@@ -149,7 +149,7 @@ ResourceCalendar *CalHelper::incResourceCalendar( Calendar *calendar, Incidence
 TQPair<ResourceCalendar *, TQString> CalHelper::incSubResourceCalendar( Calendar *calendar,
                                                                       Incidence *incidence )
 {
-  TQPair<ResourceCalendar *, TQString> p( 0, TQString() );
+  TQPair<ResourceCalendar *, TQString> p( nullptr, TQString() );
 
   CalendarResources *cal = dynamic_cast<CalendarResources*>( calendar );
   if ( !cal || !incidence ) {
diff --git a/libkcal/calselectdialog.cpp b/libkcal/calselectdialog.cpp
index c2a7f8971..a933fabbd 100644
--- a/libkcal/calselectdialog.cpp
+++ b/libkcal/calselectdialog.cpp
@@ -51,7 +51,7 @@ using namespace KCal;
 
 CalSelectDialog::CalSelectDialog( const TQString &caption, const TQString &label,
                                   const TQStringList &list )
-  : KDialogBase( 0, 0, true, caption, Ok|Cancel, Ok, true )
+  : KDialogBase( nullptr, nullptr, true, caption, Ok|Cancel, Ok, true )
 {
   TQFrame *frame = makeMainWidget();
   TQVBoxLayout *layout = new TQVBoxLayout( frame, 0, spacingHint() );
diff --git a/libkcal/comparisonvisitor.cpp b/libkcal/comparisonvisitor.cpp
index 79a61e2fc..6b6185923 100644
--- a/libkcal/comparisonvisitor.cpp
+++ b/libkcal/comparisonvisitor.cpp
@@ -28,7 +28,7 @@ using namespace KCal;
 class ComparisonVisitor::Private
 {
   public:
-    Private() : mReference( 0 ) {}
+    Private() : mReference( nullptr ) {}
 
   public:
     const IncidenceBase *mReference;
@@ -47,16 +47,16 @@ bool ComparisonVisitor::compare( IncidenceBase *incidence, const IncidenceBase *
 {
   d->mReference = reference;
 
-  const bool result = incidence ? incidence->accept( *this ) : reference == 0;
+  const bool result = incidence ? incidence->accept( *this ) : reference == nullptr;
 
-  d->mReference = 0;
+  d->mReference = nullptr;
 
   return result;
 }
 
 bool ComparisonVisitor::visit( Event *event )
 {
-  Q_ASSERT( event != 0 );
+  Q_ASSERT(event);
 
   const Event *refEvent = dynamic_cast<const Event*>( d->mReference );
   if ( refEvent ) {
@@ -69,7 +69,7 @@ bool ComparisonVisitor::visit( Event *event )
 
 bool ComparisonVisitor::visit( Todo *todo )
 {
-  Q_ASSERT( todo != 0 );
+  Q_ASSERT(todo);
 
   const Todo *refTodo = dynamic_cast<const Todo*>( d->mReference );
   if ( refTodo ) {
@@ -82,7 +82,7 @@ bool ComparisonVisitor::visit( Todo *todo )
 
 bool ComparisonVisitor::visit( Journal *journal )
 {
-  Q_ASSERT( journal != 0 );
+  Q_ASSERT(journal);
 
   const Journal *refJournal = dynamic_cast<const Journal*>( d->mReference );
   if ( refJournal ) {
@@ -95,7 +95,7 @@ bool ComparisonVisitor::visit( Journal *journal )
 
 bool ComparisonVisitor::visit( FreeBusy *freebusy )
 {
-  Q_ASSERT( freebusy != 0 );
+  Q_ASSERT(freebusy);
 
   const FreeBusy *refFreeBusy = dynamic_cast<const FreeBusy*>( d->mReference );
   if ( refFreeBusy ) {
diff --git a/libkcal/compat.cpp b/libkcal/compat.cpp
index 8268f9785..43a70df15 100644
--- a/libkcal/compat.cpp
+++ b/libkcal/compat.cpp
@@ -35,7 +35,7 @@ Compat *CompatFactory::createCompat( const TQString &productId )
 //  kdDebug(5800) << "CompatFactory::createCompat(): '" << productId << "'"
 //                << endl;
 
-  Compat *compat = 0;
+  Compat *compat = nullptr;
 
   int korg = productId.find( "KOrganizer" );
   int outl9 = productId.find( "Outlook 9.0" );
@@ -174,7 +174,7 @@ void CompatPre31::fixRecurrence( Incidence *incidence )
   CompatPre32::fixRecurrence( incidence );
 
   Recurrence *recur = incidence->recurrence();
-  RecurrenceRule *r = 0;
+  RecurrenceRule *r = nullptr;
   if ( recur ) r = recur->defaultRRule();
   if ( recur && r ) {
     int duration = r->duration();
diff --git a/libkcal/confirmsavedialog.h b/libkcal/confirmsavedialog.h
index 401af8796..25c0a04ee 100644
--- a/libkcal/confirmsavedialog.h
+++ b/libkcal/confirmsavedialog.h
@@ -33,7 +33,7 @@ class TDE_EXPORT ConfirmSaveDialog : public KDialogBase
 {
   public:
     ConfirmSaveDialog( const TQString &destination, TQWidget *parent,
-                       const char *name = 0 );
+                       const char *name = nullptr );
 
     void addIncidences( const Incidence::List &incidences,
                         const TQString &operation );
diff --git a/libkcal/dndfactory.cpp b/libkcal/dndfactory.cpp
index 0a1d68c08..fa7cad62f 100644
--- a/libkcal/dndfactory.cpp
+++ b/libkcal/dndfactory.cpp
@@ -46,7 +46,7 @@ class DndFactory::Private
   public:
     Incidence * pasteIncidence( Incidence *inc,
                                 const TQDate &newDate,
-                                const TQTime *newTime = 0 )
+                                const TQTime *newTime = nullptr )
     {
       if ( inc ) {
         inc = inc->clone();
@@ -134,7 +134,7 @@ Event *DndFactory::createDrop(TQDropEvent *de)
     }
   }
 
-  return 0;
+  return nullptr;
 }
 
 Todo *DndFactory::createDropTodo(TQDropEvent *de)
@@ -153,7 +153,7 @@ Todo *DndFactory::createDropTodo(TQDropEvent *de)
     }
   }
 
-  return 0;
+  return nullptr;
 }
 
 void DndFactory::cutIncidence( Incidence *selectedInc )
@@ -239,7 +239,7 @@ Incidence::List DndFactory::pasteIncidences( const TQDate &newDate, const TQTime
     } else {
       // not related to anything in the clipboard
       inc->setRelatedToUid( TQString() );
-      inc->setRelatedTo( 0 );
+      inc->setRelatedTo( nullptr );
     }
   }
 
@@ -254,13 +254,13 @@ Incidence *DndFactory::pasteIncidence( const TQDate &newDate, const TQTime *newT
   if ( !ICalDrag::decode( cb->data(), &cal ) &&
        !VCalDrag::decode( cb->data(), &cal ) ) {
     kdDebug(5800) << "Can't parse clipboard" << endl;
-    return 0;
+    return nullptr;
   }
 
   Incidence::List incList = cal.incidences();
-  Incidence *inc = incList.isEmpty() ? 0 : incList.first();
+  Incidence *inc = incList.isEmpty() ? nullptr : incList.first();
 
   Incidence *newInc = d->pasteIncidence( inc, newDate, newTime );
-  newInc->setRelatedTo( 0 );
+  newInc->setRelatedTo( nullptr );
   return newInc;
 }
diff --git a/libkcal/dndfactory.h b/libkcal/dndfactory.h
index a8712f2b8..b5df2f590 100644
--- a/libkcal/dndfactory.h
+++ b/libkcal/dndfactory.h
@@ -67,11 +67,11 @@ class LIBKCAL_EXPORT DndFactory
     bool copyIncidences( const Incidence::List &incidences );
 
     /** pastes the event or todo and returns a pointer to the new incidence pasted. */
-    Incidence *pasteIncidence( const TQDate &, const TQTime *newTime = 0 );
+    Incidence *pasteIncidence( const TQDate &, const TQTime *newTime = nullptr );
 
     /** pastes and returns the incidences from the clipboard
         If no date and time are given, the incidences will be pasted at their original time */
-    Incidence::List pasteIncidences( const TQDate &newDate = TQDate(), const TQTime *newTime = 0 );
+    Incidence::List pasteIncidences( const TQDate &newDate = TQDate(), const TQTime *newTime = nullptr );
 
   private:
     Calendar *mCalendar;
diff --git a/libkcal/filestorage.cpp b/libkcal/filestorage.cpp
index 51f4d80c9..fb8045bc2 100644
--- a/libkcal/filestorage.cpp
+++ b/libkcal/filestorage.cpp
@@ -126,7 +126,7 @@ bool FileStorage::save()
 {
   if ( mFileName.isEmpty() ) return false;
 
-  CalFormat *format = 0;
+  CalFormat *format = nullptr;
   if ( mSaveFormat ) format = mSaveFormat;
   else format = new ICalFormat;
 
diff --git a/libkcal/filestorage.h b/libkcal/filestorage.h
index 163032595..f44b0dac0 100644
--- a/libkcal/filestorage.h
+++ b/libkcal/filestorage.h
@@ -33,7 +33,7 @@ class LIBKCAL_EXPORT FileStorage : public CalStorage
 {
   public:
     FileStorage( Calendar *, const TQString &fileName = TQString(),
-                  CalFormat *format = 0 );
+                  CalFormat *format = nullptr );
     virtual ~FileStorage();
 
     void setFileName( const TQString &mFileName );
diff --git a/libkcal/freebusy.cpp b/libkcal/freebusy.cpp
index 2e67e2837..0b66d47ed 100644
--- a/libkcal/freebusy.cpp
+++ b/libkcal/freebusy.cpp
@@ -61,7 +61,7 @@ FreeBusy::FreeBusy( Calendar *calendar, const TQDateTime &start, const TQDateTim
     // in a lot of duplicated code. Instead, make a copy of the event and
     // set the period to the full day(s). This trick works for recurring,
     // multiday, and single day floating events.
-    Event *floatingEvent = 0;
+    Event *floatingEvent = nullptr;
     if ( event->doesFloat() ) {
       // Floating event. Do the hack
       kdDebug(5800) << "Floating event" << endl;
diff --git a/libkcal/freebusyurlstore.cpp b/libkcal/freebusyurlstore.cpp
index 03204f35c..242838b10 100644
--- a/libkcal/freebusyurlstore.cpp
+++ b/libkcal/freebusyurlstore.cpp
@@ -29,7 +29,7 @@ using namespace KCal;
 
 static KStaticDeleter<FreeBusyUrlStore> selfDeleter;
 
-FreeBusyUrlStore *FreeBusyUrlStore::mSelf = 0;
+FreeBusyUrlStore *FreeBusyUrlStore::mSelf = nullptr;
 
 FreeBusyUrlStore *FreeBusyUrlStore::self()
 {
diff --git a/libkcal/icaldrag.h b/libkcal/icaldrag.h
index ac91742dc..8c33f81b0 100644
--- a/libkcal/icaldrag.h
+++ b/libkcal/icaldrag.h
@@ -38,7 +38,7 @@ class LIBKCAL_EXPORT ICalDrag : public TQStoredDrag
     /**
       Create a drag&drop object for iCalendar component \a ical.
     */
-    ICalDrag( Calendar *cal, TQWidget *parent = 0, const char *name = 0 );
+    ICalDrag( Calendar *cal, TQWidget *parent = nullptr, const char *name = nullptr );
     ~ICalDrag() {};
 
     /**
diff --git a/libkcal/icalformat.cpp b/libkcal/icalformat.cpp
index 707291977..cde115e5f 100644
--- a/libkcal/icalformat.cpp
+++ b/libkcal/icalformat.cpp
@@ -52,7 +52,7 @@ extern "C" {
 
 using namespace KCal;
 
-ICalFormat::ICalFormat() : mImpl(0)
+ICalFormat::ICalFormat() : mImpl(nullptr)
 {
   setImplementation( new ICalFormatImpl( this ) );
 
@@ -163,7 +163,7 @@ bool ICalFormat::fromRawString( Calendar *cal, const TQCString &text )
   if (icalcomponent_isa(calendar) == ICAL_XROOT_COMPONENT) {
     icalcomponent *comp;
     for ( comp = icalcomponent_get_first_component(calendar, ICAL_VCALENDAR_COMPONENT);
-          comp != 0; comp = icalcomponent_get_next_component(calendar, ICAL_VCALENDAR_COMPONENT) ) {
+          comp; comp = icalcomponent_get_next_component(calendar, ICAL_VCALENDAR_COMPONENT) ) {
       // put all objects into their proper places
       if ( !mImpl->populate( cal, comp ) ) {
         kdDebug(5800) << "ICalFormat::load(): Could not populate calendar" << endl;
@@ -203,7 +203,7 @@ Incidence *ICalFormat::fromString( const TQString &text )
   CalendarLocal cal( mTimeZoneId );
   fromString(&cal, text);
 
-  Incidence *ical = 0;
+  Incidence *ical = nullptr;
   Event::List elist = cal.events();
   if ( elist.count() > 0 ) {
     ical = elist.first();
@@ -219,7 +219,7 @@ Incidence *ICalFormat::fromString( const TQString &text )
     }
   }
 
-  return ical ? ical->clone() : 0;
+  return ical ? ical->clone() : nullptr;
 }
 
 TQString ICalFormat::toString( Calendar *cal )
@@ -387,7 +387,7 @@ bool ICalFormat::fromString( RecurrenceRule * recurrence, const TQString& rrule
 TQString ICalFormat::createScheduleMessage(IncidenceBase *incidence,
                                           Scheduler::Method method)
 {
-  icalcomponent *message = 0;
+  icalcomponent *message = nullptr;
 
   // Handle scheduling ID being present
   if ( incidence->type() == "Event" || incidence->type() == "Todo" ) {
@@ -406,7 +406,7 @@ TQString ICalFormat::createScheduleMessage(IncidenceBase *incidence,
     }
   }
 
-  if ( message == 0 )
+  if (!message)
     message = mImpl->createScheduleComponent(incidence,method);
 
   // FIXME TODO: Don't we have to free message? What about the ical_string? MEMLEAK
@@ -428,13 +428,13 @@ FreeBusy *ICalFormat::parseFreeBusy( const TQString &str )
   icalcomponent *message;
   message = icalparser_parse_string( str.utf8() );
 
-  if ( !message ) return 0;
+  if ( !message ) return nullptr;
 
-  FreeBusy *freeBusy = 0;
+  FreeBusy *freeBusy = nullptr;
 
   icalcomponent *c;
   for ( c = icalcomponent_get_first_component( message, ICAL_VFREEBUSY_COMPONENT );
-        c != 0; c = icalcomponent_get_next_component( message, ICAL_VFREEBUSY_COMPONENT ) ) {
+        c; c = icalcomponent_get_next_component( message, ICAL_VFREEBUSY_COMPONENT ) ) {
     FreeBusy *fb = mImpl->readFreeBusy( c );
 
     if ( freeBusy ) {
@@ -460,7 +460,7 @@ ScheduleMessage *ICalFormat::parseScheduleMessage( Calendar *cal,
   if (messageText.isEmpty())
   {
     setException( new ErrorFormat( ErrorFormat::ParseErrorKcal, TQString::fromLatin1( "messageText was empty, unable to parse into a ScheduleMessage" ) ) );
-    return 0;
+    return nullptr;
   }
   // TODO FIXME: Don't we have to ical-free message??? MEMLEAK
   icalcomponent *message;
@@ -469,7 +469,7 @@ ScheduleMessage *ICalFormat::parseScheduleMessage( Calendar *cal,
   if (!message)
   {
     setException( new ErrorFormat( ErrorFormat::ParseErrorKcal, TQString::fromLatin1( "icalparser was unable to parse messageText into a ScheduleMessage" ) ) );
-    return 0;
+    return nullptr;
   }
 
   icalproperty *m = icalcomponent_get_first_property(message,
@@ -477,12 +477,12 @@ ScheduleMessage *ICalFormat::parseScheduleMessage( Calendar *cal,
   if (!m)
   {
     setException( new ErrorFormat( ErrorFormat::ParseErrorKcal, TQString::fromLatin1( "message didn't contain an ICAL_METHOD_PROPERTY" ) ) );
-    return 0;
+    return nullptr;
   }
 
   icalcomponent *c;
 
-  IncidenceBase *incidence = 0;
+  IncidenceBase *incidence = nullptr;
   c = icalcomponent_get_first_component(message,ICAL_VEVENT_COMPONENT);
   if (c) {
     icalcomponent *ctz = icalcomponent_get_first_component(message,ICAL_VTIMEZONE_COMPONENT);
@@ -515,7 +515,7 @@ ScheduleMessage *ICalFormat::parseScheduleMessage( Calendar *cal,
   if (!incidence) {
     kdDebug(5800) << "ICalFormat:parseScheduleMessage: object is not a freebusy, event, todo or journal" << endl;
     setException( new ErrorFormat( ErrorFormat::ParseErrorKcal, TQString::fromLatin1( "object is not a freebusy, event, todo or journal" ) ) );
-    return 0;
+    return nullptr;
   }
 
   kdDebug(5800) << "ICalFormat::parseScheduleMessage() getting method..." << endl;
@@ -585,7 +585,7 @@ ScheduleMessage *ICalFormat::parseScheduleMessage( Calendar *cal,
                                   mImpl->writeEvent(event));
     }
   } else {
-    calendarComponent = 0;
+    calendarComponent = nullptr;
   }
 
   kdDebug(5800) << "ICalFormat::parseScheduleMessage() classify..." << endl;
diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp
index 3f6feb246..6671d14f7 100644
--- a/libkcal/icalformatimpl.cpp
+++ b/libkcal/icalformatimpl.cpp
@@ -109,7 +109,7 @@ ICalFormatImpl::~ICalFormatImpl()
 class ICalFormatImpl::ToComponentVisitor : public IncidenceBase::Visitor
 {
   public:
-    ToComponentVisitor( ICalFormatImpl *impl, Scheduler::Method m ) : mImpl( impl ), mComponent( 0 ), mMethod( m ) {}
+    ToComponentVisitor( ICalFormatImpl *impl, Scheduler::Method m ) : mImpl( impl ), mComponent( nullptr ), mMethod( m ) {}
 
     bool visit( Event *e ) { mComponent = mImpl->writeEvent( e ); return true; }
     bool visit( Todo *e ) { mComponent = mImpl->writeTodo( e ); return true; }
@@ -129,7 +129,7 @@ icalcomponent *ICalFormatImpl::writeIncidence( IncidenceBase *incidence, Schedul
   ToComponentVisitor v( this, method );
   if ( incidence->accept(v) )
     return v.component();
-  else return 0;
+  else return nullptr;
 }
 
 icalcomponent *ICalFormatImpl::writeTodo(Todo *todo)
@@ -328,7 +328,7 @@ void ICalFormatImpl::writeIncidence(icalcomponent *parent,Incidence *incidence)
     // incidence->setNonKDECustomProperty("X-PILOTSTAT", TQString::number(incidence->syncStatus()));
     // incidence->setNonKDECustomProperty("X-PILOTID", TQString::number(incidence->pilotId()));
 
-    icalproperty *p = 0;
+    icalproperty *p = nullptr;
     p = icalproperty_new_x(TQString::number(incidence->syncStatus()).utf8());
     icalproperty_set_x_name(p,"X-PILOTSTAT");
     icalcomponent_add_property(parent,p);
@@ -691,7 +691,7 @@ icalproperty *ICalFormatImpl::writeAttachment( Attachment *att )
   if ( att->isUri() ) {
     attach = icalattach_new_from_url( att->uri().utf8().data() );
   } else {
-    attach = icalattach_new_from_data ( (const char *)att->data(), 0, 0 );
+    attach = icalattach_new_from_data ( (const char *)att->data(), nullptr, nullptr );
   }
   icalproperty *p = icalproperty_new_attach( attach );
 
@@ -748,7 +748,7 @@ icalrecurrencetype *ICalFormatImpl::writeRecurrenceRule( RecurrenceRule *recur )
   icalrecurrencetype *r = new icalrecurrencetype;
   icalrecurrencetype_clear(r);
 #endif
-  if ( !r ) return 0;
+  if ( !r ) return nullptr;
 
   switch( recur->recurrenceType() ) {
     case RecurrenceRule::rSecondly:
@@ -886,7 +886,7 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm)
   icalcomponent *a = icalcomponent_new(ICAL_VALARM_COMPONENT);
 
   icalproperty_action action;
-  icalattach *attach = 0;
+  icalattach *attach = nullptr;
 
   switch (alarm->type()) {
     case Alarm::Procedure:
@@ -979,7 +979,7 @@ Todo *ICalFormatImpl::readTodo(icalcomponent *vtodo)
 {
   Todo *todo = new Todo;
 
-  readIncidence(vtodo, 0, todo); // FIXME timezone
+  readIncidence(vtodo, nullptr, todo); // FIXME timezone
 
   icalproperty *p = icalcomponent_get_first_property(vtodo,ICAL_ANY_PROPERTY);
 
@@ -1053,7 +1053,7 @@ Event *ICalFormatImpl::readEvent( icalcomponent *vevent, icalcomponent *vtimezon
   icaltimezone *tz = icaltimezone_new();
   if ( !icaltimezone_set_component( tz, vtimezone ) ) {
     icaltimezone_free( tz, 1 );
-    tz = 0;
+    tz = nullptr;
   }
 
   readIncidence( vevent, tz, event);
@@ -1203,14 +1203,14 @@ Journal *ICalFormatImpl::readJournal(icalcomponent *vjournal)
 {
   Journal *journal = new Journal;
 
-  readIncidence(vjournal, 0, journal); // FIXME tz?
+  readIncidence(vjournal, nullptr, journal); // FIXME tz?
 
   return journal;
 }
 
 Attendee *ICalFormatImpl::readAttendee(icalproperty *attendee)
 {
-  icalparameter *p = 0;
+  icalparameter *p = nullptr;
 
   TQString email = TQString::fromUtf8(icalproperty_get_attendee(attendee));
   if ( email.startsWith( "mailto:", false ) ) {
@@ -1339,7 +1339,7 @@ Person ICalFormatImpl::readOrganizer( icalproperty *organizer )
 
 Attachment *ICalFormatImpl::readAttachment(icalproperty *attach)
 {
-  Attachment *attachment = 0;
+  Attachment *attachment = nullptr;
 
   const char *p;
   icalvalue *value = icalproperty_get_value( attach );
@@ -1656,10 +1656,10 @@ void ICalFormatImpl::readIncidenceBase(icalcomponent *parent,IncidenceBase *inci
   // rid of them...
   // Pointer fun, as per libical documentation
   // (documented in UsingLibical.txt)
-  icalproperty *next =0;
+  icalproperty *next =nullptr;
 
   for ( p = icalcomponent_get_first_property(parent,ICAL_X_PROPERTY);
-       p != 0;
+       p;
        p = next )
   {
 
@@ -1791,7 +1791,7 @@ void ICalFormatImpl::readRecurrence( const struct icalrecurrencetype *r, Recurre
     icaltimetype t;
     t = r->until;
     // Convert to the correct time zone! it's in UTC by specification.
-    TQDateTime endDate( readICalDateTime(0, t) );
+    TQDateTime endDate( readICalDateTime(nullptr, t) );
     recur->setEndDt( endDate );
   } else {
     if (r->count == 0)
@@ -2015,7 +2015,7 @@ icaltimetype ICalFormatImpl::writeICalDate(const TQDate &date)
 #if !ICAL_CHECK_VERSION(3,0,0)
 	t.is_utc = 0;
 #endif
-  t.zone = 0;
+  t.zone = nullptr;
 
   return t;
 }
@@ -2043,7 +2043,7 @@ icaltimetype ICalFormatImpl::writeICalDateTime(const TQDateTime &datetime)
    * the current calendar (mParent's), or, if there is none, to be floating.
    * In the later case store a floating time, in the former normalize to utc. */
   if (mParent->timeZoneId().isEmpty())
-    t = icaltime_convert_to_zone( t, 0 ); //make floating timezone
+    t = icaltime_convert_to_zone( t, nullptr ); //make floating timezone
   else {
     icaltimezone* tz = icaltimezone_get_builtin_timezone ( mParent->timeZoneId().latin1() );
     icaltimezone* utc = icaltimezone_get_utc_timezone();
@@ -2073,8 +2073,8 @@ TQDateTime ICalFormatImpl::readICalDateTime( icalproperty *p, icaltimetype& t, i
 	if ( !time_is_utc ) { // Only use the TZ if time is not UTC.{
     // FIXME: We'll need to make sure to apply the appropriate TZ, not just
     //        the first one found.
-    icalparameter *param = p ? icalproperty_get_first_parameter(p, ICAL_TZID_PARAMETER) : 0;
-		const char *tzid = param ? icalparameter_get_tzid(param) : 0;
+    icalparameter *param = p ? icalproperty_get_first_parameter(p, ICAL_TZID_PARAMETER) : nullptr;
+		const char *tzid = param ? icalparameter_get_tzid(param) : nullptr;
 		if ( tzid ) {
 				icaltimezone* icaltz;
 				// Try to match the ID with the libical time zone's location property
@@ -2177,7 +2177,7 @@ icalcomponent *ICalFormatImpl::createCalendarComponent(Calendar *cal)
   icalcomponent_add_property(calendar,p);
 
   // Custom properties
-  if( cal != 0 )
+  if(cal)
     writeCustomProperties(calendar, cal);
 
   return calendar;
@@ -2500,8 +2500,8 @@ icalcomponent *ICalFormatImpl::createScheduleComponent(IncidenceBase *incidence,
   if ( icalmethod == ICAL_METHOD_REPLY ) {
     struct icalreqstattype rst;
     rst.code = ICAL_2_0_SUCCESS_STATUS;
-    rst.desc = 0;
-    rst.debug = 0;
+    rst.desc = nullptr;
+    rst.debug = nullptr;
     icalcomponent_add_property( inc, icalproperty_new_requeststatus( rst ) );
   }
   icalcomponent_add_component( message, inc );
diff --git a/libkcal/icalformatimpl.h b/libkcal/icalformatimpl.h
index d45c4d29b..ad4b922a1 100644
--- a/libkcal/icalformatimpl.h
+++ b/libkcal/icalformatimpl.h
@@ -83,13 +83,13 @@ class ICalFormatImpl
     static icaltimetype writeICalDate(const TQDate &);
     static TQDate readICalDate(icaltimetype);
     icaltimetype writeICalDateTime(const TQDateTime &);
-    TQDateTime readICalDateTime( icalproperty*, icaltimetype&, icaltimezone* tz = 0 );
+    TQDateTime readICalDateTime( icalproperty*, icaltimetype&, icaltimezone* tz = nullptr );
     static icaldurationtype writeICalDuration(int seconds);
     static int readICalDuration(icaldurationtype);
     static icaldatetimeperiodtype writeICalDatePeriod( const TQDate &date );
     icaldatetimeperiodtype writeICalDateTimePeriod( const TQDateTime &date );
 
-    icalcomponent *createCalendarComponent(Calendar * = 0);
+    icalcomponent *createCalendarComponent(Calendar * = nullptr);
     icalcomponent *createScheduleComponent(IncidenceBase *,Scheduler::Method);
 
   protected:
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp
index 99b17e99f..8e3fc34ff 100644
--- a/libkcal/incidence.cpp
+++ b/libkcal/incidence.cpp
@@ -33,8 +33,8 @@ using namespace KCal;
 
 Incidence::Incidence() :
   IncidenceBase(),
-  mRelatedTo(0), mStatus(StatusNone), mSecrecy(SecrecyPublic),
-  mPriority(0), mRecurrence(0),
+  mRelatedTo(nullptr), mStatus(StatusNone), mSecrecy(SecrecyPublic),
+  mPriority(0), mRecurrence(nullptr),
   mHasRecurrenceID( false ), mChildRecurrenceEvents()
 {
   recreate();
@@ -52,7 +52,7 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ),Recurrence::Obse
   mSummary = i.mSummary;
   mCategories = i.mCategories;
 //  Incidence *mRelatedTo;          Incidence *mRelatedTo;
-  mRelatedTo = 0;
+  mRelatedTo = nullptr;
   mRelatedToUid = i.mRelatedToUid;
 //  Incidence::List mRelations;    Incidence::List mRelations;
   mResources = i.mResources;
@@ -87,7 +87,7 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ),Recurrence::Obse
     mRecurrence = new Recurrence( *(i.mRecurrence) );
     mRecurrence->addObserver( this );
   } else
-    mRecurrence = 0;
+    mRecurrence = nullptr;
 
   mSchedulingID = i.mSchedulingID;
 }
@@ -97,7 +97,7 @@ Incidence::~Incidence()
     Incidence::List Relations = mRelations;
     List::ConstIterator it;
     for ( it = Relations.begin(); it != Relations.end(); ++it ) {
-        if ( (*it)->relatedTo() == this ) (*it)->mRelatedTo = 0;
+        if ( (*it)->relatedTo() == this ) (*it)->mRelatedTo = nullptr;
     }
     if ( relatedTo() ) relatedTo()->removeRelation( this );
 
@@ -120,7 +120,7 @@ Incidence& Incidence::operator=( const Incidence &i )
   mDescription = i.mDescription;
   mSummary = i.mSummary;
   mCategories = i.mCategories;
-  mRelatedTo = 0;
+  mRelatedTo = nullptr;
   mRelatedToUid = i.mRelatedToUid;
   mRelations.clear();
   mResources = i.mResources;
@@ -153,7 +153,7 @@ Incidence& Incidence::operator=( const Incidence &i )
     mRecurrence = new Recurrence( *(i.mRecurrence) );
     mRecurrence->addObserver( this );
   } else
-    mRecurrence = 0;
+    mRecurrence = nullptr;
 
   mSchedulingID = i.mSchedulingID;
   return *this;
@@ -177,11 +177,11 @@ bool Incidence::operator==( const Incidence& i2 ) const
     if ( !IncidenceBase::operator==(i2) )
         return false;
 
-    bool recurrenceEqual = ( mRecurrence == 0 && i2.mRecurrence == 0 );
+    bool recurrenceEqual = ( !mRecurrence && !i2.mRecurrence );
     if ( !recurrenceEqual )
     {
-        recurrenceEqual = mRecurrence != 0 &&
-                          i2.mRecurrence != 0 &&
+        recurrenceEqual = mRecurrence &&
+                          i2.mRecurrence &&
                           *mRecurrence == *i2.mRecurrence;
     }
 
@@ -404,7 +404,7 @@ Recurrence *Incidence::recurrence() const
 void Incidence::clearRecurrence()
 {
   delete mRecurrence;
-  mRecurrence = 0;
+  mRecurrence = nullptr;
 }
 
 uint Incidence::recurrenceType() const
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp
index da314b639..cf9677cad 100644
--- a/libkcal/incidencebase.cpp
+++ b/libkcal/incidencebase.cpp
@@ -309,7 +309,7 @@ Attendee *IncidenceBase::attendeeByMail( const TQString &email ) const
     if ( (*it)->email() == email ) return *it;
   }
 
-  return 0;
+  return nullptr;
 }
 
 Attendee *IncidenceBase::attendeeByMails( const TQStringList &emails,
@@ -325,7 +325,7 @@ Attendee *IncidenceBase::attendeeByMails( const TQStringList &emails,
     }
   }
 
-  return 0;
+  return nullptr;
 }
 
 Attendee *IncidenceBase::attendeeByUid( const TQString &uid ) const
@@ -335,7 +335,7 @@ Attendee *IncidenceBase::attendeeByUid( const TQString &uid ) const
     if ( (*it)->uid() == uid ) return *it;
   }
 
-  return 0;
+  return nullptr;
 }
 
 
diff --git a/libkcal/incidenceformatter.cpp b/libkcal/incidenceformatter.cpp
index 887d000aa..ace65164c 100644
--- a/libkcal/incidenceformatter.cpp
+++ b/libkcal/incidenceformatter.cpp
@@ -898,7 +898,7 @@ class IncidenceFormatter::EventViewerVisitor : public IncidenceBase::Visitor
 {
   public:
     EventViewerVisitor()
-      : mCalendar( 0 ), mResult( "" ) {}
+      : mCalendar( nullptr ), mResult( "" ) {}
 
     bool act( Calendar *calendar, IncidenceBase *incidence, const TQDate &date )
     {
@@ -939,7 +939,7 @@ class IncidenceFormatter::EventViewerVisitor : public IncidenceBase::Visitor
 
 TQString IncidenceFormatter::extensiveDisplayString( IncidenceBase *incidence )
 {
-  return extensiveDisplayStr( 0, incidence, TQDate() );
+  return extensiveDisplayStr( nullptr, incidence, TQDate() );
 }
 
 TQString IncidenceFormatter::extensiveDisplayStr( Calendar *calendar,
@@ -1016,7 +1016,7 @@ static Attendee *findDelegatedFromMyAttendee( Incidence *incidence )
 {
   // Return the first attendee that was delegated-from me
 
-  Attendee *attendee = 0;
+  Attendee *attendee = nullptr;
   if ( !incidence ) {
     return attendee;
   }
@@ -1045,7 +1045,7 @@ static Attendee *findMyAttendee( Incidence *incidence )
 {
   // Return the attendee for the incidence that is probably me
 
-  Attendee *attendee = 0;
+  Attendee *attendee = nullptr;
   if ( !incidence ) {
     return attendee;
   }
@@ -1072,7 +1072,7 @@ static Attendee *findAttendee( Incidence *incidence, const TQString &email )
 {
   // Search for an attendee by email address
 
-  Attendee *attendee = 0;
+  Attendee *attendee = nullptr;
   if ( !incidence ) {
     return attendee;
   }
@@ -2035,7 +2035,7 @@ class IncidenceFormatter::ScheduleMessageVisitor
   : public IncidenceBase::Visitor
 {
   public:
-    ScheduleMessageVisitor() : mExistingIncidence( 0 ), mMessage( 0 ) { mResult = ""; }
+    ScheduleMessageVisitor() : mExistingIncidence( nullptr ), mMessage( nullptr ) { mResult = ""; }
     bool act( IncidenceBase *incidence, Incidence *existingIncidence, ScheduleMessage *msg,
               const TQString &sender )
     {
@@ -2116,7 +2116,7 @@ class IncidenceFormatter::IncidenceCompareVisitor
   : public IncidenceBase::Visitor
 {
   public:
-    IncidenceCompareVisitor() : mExistingIncidence(0) {}
+    IncidenceCompareVisitor() : mExistingIncidence(nullptr) {}
     bool act( IncidenceBase *incidence, Incidence *existingIncidence, int method )
     {
       Incidence *inc = dynamic_cast<Incidence*>( incidence );
@@ -2418,11 +2418,11 @@ TQString IncidenceFormatter::formatICalInvitationHelper( TQString invitation,
   IncidenceBase *incBase = msg->event();
 
   // Determine if this incidence is in my calendar (and owned by me)
-  Incidence *existingIncidence = 0;
+  Incidence *existingIncidence = nullptr;
   if ( incBase && helper->calendar() ) {
     existingIncidence = helper->calendar()->incidence( incBase->uid() );
     if ( !incidenceOwnedByMe( helper->calendar(), existingIncidence ) ) {
-      existingIncidence = 0;
+      existingIncidence = nullptr;
     }
     if ( !existingIncidence ) {
       const Incidence::List list = helper->calendar()->incidences();
@@ -2488,7 +2488,7 @@ TQString IncidenceFormatter::formatICalInvitationHelper( TQString invitation,
 
   // determine if the invitation response has already been recorded
   bool rsvpRec = false;
-  Attendee *ea = 0;
+  Attendee *ea = nullptr;
   if ( !myInc ) {
     Incidence *rsvpIncidence = existingIncidence;
     if ( !rsvpIncidence && inc && inc->revision() > 0 ) {
@@ -2606,8 +2606,8 @@ TQString IncidenceFormatter::formatICalInvitationHelper( TQString invitation,
     case Scheduler::Reply:
     {
       // Record invitation response
-      Attendee *a = 0;
-      Attendee *ea = 0;
+      Attendee *a = nullptr;
+      Attendee *ea = nullptr;
       if ( inc ) {
         // First, determine if this reply is really a counter in disguise.
         if ( replyMeansCounter( inc ) ) {
@@ -2736,12 +2736,12 @@ static struct save_tz set_tz( const char* _tc )
 
   struct save_tz rv;
 
-  rv.old_tz = 0;
-  rv.tz_env_str = 0;
+  rv.old_tz = nullptr;
+  rv.tz_env_str = nullptr;
 
   //kdDebug(5006) << "set_tz(), timezone before = " << timezone << endl;
 
-  char* tz_env = 0;
+  char* tz_env = nullptr;
   if( getenv( "TZ" ) ) {
     tz_env = strdup( getenv( "TZ" ) );
     rv.old_tz = tz_env;
@@ -3172,7 +3172,7 @@ class IncidenceFormatter::ToolTipVisitor : public IncidenceBase::Visitor
 {
   public:
     ToolTipVisitor()
-      : mCalendar( 0 ), mRichText( true ), mResult( "" ) {}
+      : mCalendar( nullptr ), mRichText( true ), mResult( "" ) {}
 
     bool act( Calendar *calendar, IncidenceBase *incidence,
               const TQDate &date=TQDate(), bool richText=true )
@@ -3555,7 +3555,7 @@ TQString IncidenceFormatter::ToolTipVisitor::generateToolTip( Incidence* inciden
 
 TQString IncidenceFormatter::toolTipString( IncidenceBase *incidence, bool richText )
 {
-  return toolTipStr( 0, incidence, TQDate(), richText );
+  return toolTipStr( nullptr, incidence, TQDate(), richText );
 }
 
 TQString IncidenceFormatter::toolTipStr( Calendar *calendar,
diff --git a/libkcal/incidenceformatter.h b/libkcal/incidenceformatter.h
index 9d6e8a758..295810205 100644
--- a/libkcal/incidenceformatter.h
+++ b/libkcal/incidenceformatter.h
@@ -39,7 +39,7 @@ class LIBKCAL_EXPORT InvitationFormatterHelper
   public:
     virtual TQString generateLinkURL( const TQString &id ) { return id; }
     virtual TQString makeLink( const TQString &id, const TQString &text );
-    virtual Calendar *calendar() const { return 0; }
+    virtual Calendar *calendar() const { return nullptr; }
 };
 
 /**
diff --git a/libkcal/recurrence.cpp b/libkcal/recurrence.cpp
index 1c64ea3d2..c39ec2f5b 100644
--- a/libkcal/recurrence.cpp
+++ b/libkcal/recurrence.cpp
@@ -152,7 +152,7 @@ void Recurrence::setFloats( bool floats )
 RecurrenceRule *Recurrence::defaultRRule( bool create ) const
 {
   if ( mRRules.isEmpty() ) {
-    if ( !create || mRecurReadOnly ) return 0;
+    if ( !create || mRecurReadOnly ) return nullptr;
     RecurrenceRule *rrule = new RecurrenceRule();
     rrule->setStartDt( startDateTime() );
     const_cast<KCal::Recurrence*>(this)->addRRule( rrule );
@@ -165,7 +165,7 @@ RecurrenceRule *Recurrence::defaultRRule( bool create ) const
 RecurrenceRule *Recurrence::defaultRRuleConst() const
 {
   if ( mRRules.isEmpty() ) {
-    return 0;
+    return nullptr;
   } else {
     return mRRules.first();
   }
@@ -558,11 +558,11 @@ TQValueList<RecurrenceRule::WDayPos> Recurrence::yearPositions() const
 
 RecurrenceRule *Recurrence::setNewRecurrenceType( RecurrenceRule::PeriodType type, int freq )
 {
-  if ( mRecurReadOnly || freq <= 0 ) return 0;
+  if ( mRecurReadOnly || freq <= 0 ) return nullptr;
   mRRules.clearAll();
   updated();
   RecurrenceRule *rrule = defaultRRule( true );
-  if ( !rrule ) return 0;
+  if ( !rrule ) return nullptr;
   rrule->setRecurrenceType( type );
   rrule->setFrequency( freq );
   rrule->setDuration( -1 );
diff --git a/libkcal/recurrencerule.cpp b/libkcal/recurrencerule.cpp
index ee161d4c3..7c7ab9075 100644
--- a/libkcal/recurrencerule.cpp
+++ b/libkcal/recurrencerule.cpp
@@ -78,8 +78,8 @@ class DateHelper {
 #endif
     static TQDate getNthWeek( int year, int weeknumber, short weekstart = 1 );
     static int weekNumbersInYear( int year, short weekstart = 1 );
-    static int getWeekNumber( const TQDate &date, short weekstart, int *year = 0 );
-    static int getWeekNumberNeg( const TQDate &date, short weekstart, int *year = 0 );
+    static int getWeekNumber( const TQDate &date, short weekstart, int *year = nullptr );
+    static int getWeekNumberNeg( const TQDate &date, short weekstart, int *year = nullptr );
 };
 
 
diff --git a/libkcal/recurrencerule.h b/libkcal/recurrencerule.h
index ca63e801f..32e951882 100644
--- a/libkcal/recurrencerule.h
+++ b/libkcal/recurrencerule.h
@@ -248,7 +248,7 @@ class LIBKCAL_EXPORT RecurrenceRule
      * @param result if non-null, *result is updated to true if successful,
      * or false if there is no recurrence.
      */
-    TQDateTime endDt( bool* result = 0 ) const;
+    TQDateTime endDt( bool* result = nullptr ) const;
     /** Sets the date and time of the last recurrence.
      * @param endDateTime the ending date/time after which to stop recurring. */
     void setEndDt(const TQDateTime &endDateTime);
diff --git a/libkcal/resourcecached.cpp b/libkcal/resourcecached.cpp
index 88aae9820..851f8f94e 100644
--- a/libkcal/resourcecached.cpp
+++ b/libkcal/resourcecached.cpp
@@ -51,9 +51,9 @@ static bool m_editoropen = false;
 ResourceCached::ResourceCached( const TDEConfig* config )
   : ResourceCalendar( config ), mCalendar( TQString::fromLatin1( "UTC" ) ),
     mReloadPolicy( ReloadNever ),  mReloadInterval( 10 ),
-    mReloadTimer( 0, "mReloadTimer" ), mReloaded( false ),
+    mReloadTimer( nullptr, "mReloadTimer" ), mReloaded( false ),
     mSavePolicy( SaveNever ), mSaveInterval( 10 ),
-    mSaveTimer( 0, "mSaveTimer" ), mIdMapper( "kcal/uidmaps/" )
+    mSaveTimer( nullptr, "mSaveTimer" ), mIdMapper( "kcal/uidmaps/" )
 {
   connect( &mReloadTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( slotReload() ) );
   connect( &mSaveTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( slotSave() ) );
diff --git a/libkcal/resourcecachedconfig.h b/libkcal/resourcecachedconfig.h
index f30cc63c2..52d1189e3 100644
--- a/libkcal/resourcecachedconfig.h
+++ b/libkcal/resourcecachedconfig.h
@@ -41,7 +41,7 @@ class TDE_EXPORT ResourceCachedReloadConfig : public TQWidget
     TQ_OBJECT
   
   public:
-    ResourceCachedReloadConfig( TQWidget *parent = 0, const char *name = 0 );
+    ResourceCachedReloadConfig( TQWidget *parent = nullptr, const char *name = nullptr );
 
   public slots:
     void loadSettings( ResourceCached *resource );
@@ -68,7 +68,7 @@ class TDE_EXPORT ResourceCachedSaveConfig : public TQWidget
     TQ_OBJECT
   
   public:
-    ResourceCachedSaveConfig( TQWidget *parent = 0, const char *name = 0 );
+    ResourceCachedSaveConfig( TQWidget *parent = nullptr, const char *name = nullptr );
 
   public slots:
     void loadSettings( ResourceCached *resource );
diff --git a/libkcal/resourcecalendar.cpp b/libkcal/resourcecalendar.cpp
index fb51f0abb..334e5a905 100644
--- a/libkcal/resourcecalendar.cpp
+++ b/libkcal/resourcecalendar.cpp
@@ -35,7 +35,7 @@ using namespace KCal;
 ResourceCalendar::ResourceCalendar( const TDEConfig *config )
   : KRES::Resource( config ), mResolveConflict( false )
 {
-  mException = 0;
+  mException = nullptr;
 }
 
 ResourceCalendar::~ResourceCalendar()
@@ -46,7 +46,7 @@ ResourceCalendar::~ResourceCalendar()
 void ResourceCalendar::clearException()
 {
   delete mException;
-  mException = 0;
+  mException = nullptr;
 }
 
 void ResourceCalendar::setException( ErrorFormat *exception )
diff --git a/libkcal/resourcecalendar.h b/libkcal/resourcecalendar.h
index f37131432..665301782 100644
--- a/libkcal/resourcecalendar.h
+++ b/libkcal/resourcecalendar.h
@@ -127,7 +127,7 @@ class LIBKCAL_EXPORT ResourceCalendar : public KRES::Resource
       @param incidence if given as 0, doSave() is called to save all incidences,
              else doSave(incidence) is called to save only the given one
     */
-    bool save( Incidence *incidence = 0 );
+    bool save( Incidence *incidence = nullptr );
 
     /**
       Return true if a save operation is still in progress, otherwise return
diff --git a/libkcal/resourcelocal.cpp b/libkcal/resourcelocal.cpp
index 617446d9e..cd0d7fbde 100644
--- a/libkcal/resourcelocal.cpp
+++ b/libkcal/resourcelocal.cpp
@@ -57,7 +57,7 @@ class ResourceLocal::Private
 };
 
 ResourceLocal::ResourceLocal( const TDEConfig* config )
-  : ResourceCached( config ), mLock( 0 )
+  : ResourceCached( config ), mLock( nullptr )
 {
   if ( config ) {
     TQString url = config->readPathEntry( "CalendarURL" );
@@ -79,7 +79,7 @@ ResourceLocal::ResourceLocal( const TDEConfig* config )
 }
 
 ResourceLocal::ResourceLocal( const TQString& fileName )
-  : ResourceCached( 0 )
+  : ResourceCached( nullptr )
 {
   mURL = KURL( fileName );
   mFormat = new ICalFormat();
diff --git a/libkcal/resourcelocalconfig.h b/libkcal/resourcelocalconfig.h
index d7747b63b..a42fc2dca 100644
--- a/libkcal/resourcelocalconfig.h
+++ b/libkcal/resourcelocalconfig.h
@@ -44,7 +44,7 @@ class LIBKCAL_EXPORT ResourceLocalConfig : public KRES::ConfigWidget
     TQ_OBJECT
   
   public:
-    ResourceLocalConfig( TQWidget* parent = 0, const char* name = 0 );
+    ResourceLocalConfig( TQWidget* parent = nullptr, const char* name = nullptr );
 
   public slots:
     virtual void loadSettings( KRES::Resource *resource);
diff --git a/libkcal/resourcelocaldir.cpp b/libkcal/resourcelocaldir.cpp
index d3d19f0b0..a3390f441 100644
--- a/libkcal/resourcelocaldir.cpp
+++ b/libkcal/resourcelocaldir.cpp
@@ -53,7 +53,7 @@
 using namespace KCal;
 
 ResourceLocalDir::ResourceLocalDir( const TDEConfig* config )
-  : ResourceCached( config ), mLock( 0 )
+  : ResourceCached( config ), mLock( nullptr )
 {
   if ( config ) {
     readConfig( config );
@@ -63,7 +63,7 @@ ResourceLocalDir::ResourceLocalDir( const TDEConfig* config )
 }
 
 ResourceLocalDir::ResourceLocalDir( const TQString& dirName )
-  : ResourceCached( 0 )
+  : ResourceCached( nullptr )
 {
   mURL = KURL( dirName );
 
diff --git a/libkcal/resourcelocaldirconfig.h b/libkcal/resourcelocaldirconfig.h
index a6538acd5..ec679f73d 100644
--- a/libkcal/resourcelocaldirconfig.h
+++ b/libkcal/resourcelocaldirconfig.h
@@ -46,7 +46,7 @@ class LIBKCAL_EXPORT ResourceLocalDirConfig : public KRES::ConfigWidget
     TQ_OBJECT
   
   public:
-    ResourceLocalDirConfig( TQWidget *parent = 0, const char *name = 0 );
+    ResourceLocalDirConfig( TQWidget *parent = nullptr, const char *name = nullptr );
 
   public slots:
     virtual void loadSettings( KRES::Resource *resource);
diff --git a/libkcal/scheduler.cpp b/libkcal/scheduler.cpp
index 45c9e49b0..4c00557d4 100644
--- a/libkcal/scheduler.cpp
+++ b/libkcal/scheduler.cpp
@@ -66,7 +66,7 @@ TQString ScheduleMessage::statusName(ScheduleMessage::Status status)
 
 struct Scheduler::Private
 {
-  Private() : mFreeBusyCache( 0 ) {}
+  Private() : mFreeBusyCache( nullptr ) {}
 
   FreeBusyCache *mFreeBusyCache;
 };
@@ -306,7 +306,7 @@ bool Scheduler::acceptRequest( IncidenceBase *incidence,
   // notify the user in case this is an update and we didn't find the to-be-updated incidence
   if ( existingIncidences.count() == 0 && inc->revision() > 0 ) {
     KMessageBox::information(
-      0,
+      nullptr,
       i18n( "<qt>"
             "You accepted an invitation update, but an earlier version of the "
             "item could not be found in your calendar.<p>"
@@ -325,7 +325,7 @@ bool Scheduler::acceptRequest( IncidenceBase *incidence,
   CalendarResources *stdcal = dynamic_cast<CalendarResources *>( mCalendar );
   if( stdcal && !stdcal->hasCalendarResources() ) {
     KMessageBox::sorry(
-      0,
+      nullptr,
       i18n( "No calendars found, unable to save the invitation." ) );
     return false;
   }
@@ -334,10 +334,10 @@ bool Scheduler::acceptRequest( IncidenceBase *incidence,
   //        resource selection dialog. However, we don't have any UI methods
   //        in the calendar, only in the CalendarResources::DestinationPolicy
   //        So we need to type-cast it and extract it from the CalendarResources
-  TQWidget *tmpparent = 0;
+  TQWidget *tmpparent = nullptr;
   if ( stdcal ) {
     tmpparent = stdcal->dialogParentWidget();
-    stdcal->setDialogParentWidget( 0 );
+    stdcal->setDialogParentWidget( nullptr );
   }
 
 TryAgain:
@@ -349,18 +349,18 @@ TryAgain:
   }
 
   if ( !success ) {
-    ErrorFormat *e = stdcal ? stdcal->exception() : 0;
+    ErrorFormat *e = stdcal ? stdcal->exception() : nullptr;
 
     if ( e && e->errorCode() == KCal::ErrorFormat::UserCancel &&
          KMessageBox::warningYesNo(
-           0,
+           nullptr,
            i18n( "You canceled the save operation. Therefore, the appointment will not be "
                  "stored in your calendar even though you accepted the invitation. "
                  "Are you certain you want to discard this invitation? " ),
            i18n( "Discard this invitation?" ),
            i18n( "Discard" ), i18n( "Go Back to Folder Selection" ) ) == KMessageBox::Yes ) {
       KMessageBox::information(
-        0,
+        nullptr,
         i18n( "The invitation \"%1\" was not saved to your calendar "
               "but you are still listed as an attendee for that appointment.\n"
               "If you mistakenly accepted the invitation or do not plan to attend, please notify "
@@ -380,7 +380,7 @@ TryAgain:
       TQString errMessage = i18n( "Unable to save %1 \"%2\"." ).
                            arg( i18n( inc->type() ) ).
                            arg( inc->summary() );
-      KMessageBox::sorry( 0, errMessage );
+      KMessageBox::sorry( nullptr, errMessage );
     }
     return false;
   }
@@ -483,7 +483,7 @@ bool Scheduler::acceptCancel( IncidenceBase *incidence,
   // in case we didn't find the to-be-removed incidence
   if ( myExistingIncidences.count() > 0 && inc->revision() > 0 ) {
     KMessageBox::information(
-      0,
+      nullptr,
       i18n( "The event or task could not be removed from your calendar. "
             "Maybe it has already been deleted or is not owned by you. "
             "Or it might belong to a read-only or disabled calendar." ) );
@@ -516,7 +516,7 @@ bool Scheduler::acceptCancel(IncidenceBase *incidence,ScheduleMessage::Status /*
 
   if ( !ret ) {
     KMessageBox::information(
-      0,
+      nullptr,
       i18n( "The event or task to be canceled could not be removed from your calendar. "
             "Maybe it has already been deleted or is not owned by you. "
             "Or it might belong to a read-only or disabled calendar." ) );
@@ -596,7 +596,7 @@ bool Scheduler::acceptReply(IncidenceBase *incidence,ScheduleMessage::Status /*
         msg = i18n("%1 wants to attend %2 on behalf of %3.").arg( attNew->fullName() )
             .arg( ev ? ev->summary() : to->summary() )
             .arg( attNew->delegator() );
-      if ( KMessageBox::questionYesNo( 0, msg, i18n("Uninvited attendee"),
+      if ( KMessageBox::questionYesNo( nullptr, msg, i18n("Uninvited attendee"),
            KGuiItem(i18n("Accept Attendance")), KGuiItem(i18n("Reject Attendance")) )
            != KMessageBox::Yes )
       {
@@ -624,7 +624,7 @@ bool Scheduler::acceptReply(IncidenceBase *incidence,ScheduleMessage::Status /*
     if ( attendeeAdded ) {
       bool sendMail = false;
       if ( ev || to ) {
-        if ( KMessageBox::questionYesNo( 0, i18n( "An attendee was added to the incidence. "
+        if ( KMessageBox::questionYesNo( nullptr, i18n( "An attendee was added to the incidence. "
                                                   "Do you want to email the attendees an update message?" ),
                                          i18n( "Attendee Added" ), i18n( "Send Messages" ),
                                          i18n( "Do Not Send" ) ) == KMessageBox::Yes ) {
diff --git a/libkcal/tests/readandwrite.cpp b/libkcal/tests/readandwrite.cpp
index 23056d6e7..9df9e75eb 100644
--- a/libkcal/tests/readandwrite.cpp
+++ b/libkcal/tests/readandwrite.cpp
@@ -38,9 +38,9 @@ using namespace KCal;
 
 static const TDECmdLineOptions options[] =
 {
-  { "verbose", "Verbose output", 0 },
-  { "+input", "Name of input file", 0 },
-  { "+output", "Name of output file", 0 },
+  { "verbose", "Verbose output", nullptr },
+  { "+input", "Name of input file", nullptr },
+  { "+output", "Name of output file", nullptr },
   TDECmdLineLastOption
 };
 
diff --git a/libkcal/tests/testcalendar.cpp b/libkcal/tests/testcalendar.cpp
index b5c15ac45..3631ec5fa 100644
--- a/libkcal/tests/testcalendar.cpp
+++ b/libkcal/tests/testcalendar.cpp
@@ -31,7 +31,7 @@ using namespace KCal;
 
 static const TDECmdLineOptions options[] =
 {
-  {"verbose", "Verbose output", 0},
+  {"verbose", "Verbose output", nullptr},
   TDECmdLineLastOption
 };
 
diff --git a/libkcal/tests/testcalselectdialog.cpp b/libkcal/tests/testcalselectdialog.cpp
index 0d6143b2c..768a04e03 100644
--- a/libkcal/tests/testcalselectdialog.cpp
+++ b/libkcal/tests/testcalselectdialog.cpp
@@ -27,7 +27,7 @@ using namespace KCal;
 
 int main( int argc, char **argv )
 {
-  TDECmdLineArgs::init( argc, argv, "testcalselectdialog", 0,
+  TDECmdLineArgs::init( argc, argv, "testcalselectdialog", nullptr,
                       "KCalSelectDialogTest", "1.0",
                       "kcalselectedialog test app" );
   TDEApplication app;
diff --git a/libkcal/tests/testfields.cpp b/libkcal/tests/testfields.cpp
index 05522dfec..8ac6d3c47 100644
--- a/libkcal/tests/testfields.cpp
+++ b/libkcal/tests/testfields.cpp
@@ -33,7 +33,7 @@ using namespace KCal;
 
 static const TDECmdLineOptions options[] =
 {
-  {"verbose", "Verbose output", 0},
+  {"verbose", "Verbose output", nullptr},
   TDECmdLineLastOption
 };
 
diff --git a/libkcal/tests/testincidence.cpp b/libkcal/tests/testincidence.cpp
index e510cf739..acbf48e94 100644
--- a/libkcal/tests/testincidence.cpp
+++ b/libkcal/tests/testincidence.cpp
@@ -33,7 +33,7 @@ using namespace KCal;
 
 static const TDECmdLineOptions options[] =
 {
-  {"verbose", "Verbose output", 0},
+  {"verbose", "Verbose output", nullptr},
   TDECmdLineLastOption
 };
 
diff --git a/libkcal/tests/testrecurprevious.cpp b/libkcal/tests/testrecurprevious.cpp
index d8cd90ab4..d164d7159 100644
--- a/libkcal/tests/testrecurprevious.cpp
+++ b/libkcal/tests/testrecurprevious.cpp
@@ -40,9 +40,9 @@ using namespace KCal;
 
 static const TDECmdLineOptions options[] =
 {
-  { "verbose", "Verbose output", 0 },
-  { "+input", "Name of input file", 0 },
-  { "[+output]", "optional name of output file for the recurrence dates", 0 },
+  { "verbose", "Verbose output", nullptr },
+  { "+input", "Name of input file", nullptr },
+  { "[+output]", "optional name of output file for the recurrence dates", nullptr },
   TDECmdLineLastOption
 };
 
@@ -65,7 +65,7 @@ int main( int argc, char **argv )
   kdDebug(5800) << "Input file: " << input << endl;
 
   TQTextStream *outstream;
-  outstream = 0;
+  outstream = nullptr;
   TQString fn("");
   if ( args->count() > 1 ) {
     fn = args->arg( 1 );
diff --git a/libkcal/tests/testrecurrence.cpp b/libkcal/tests/testrecurrence.cpp
index c8eaaa06a..a0b1b0ad8 100644
--- a/libkcal/tests/testrecurrence.cpp
+++ b/libkcal/tests/testrecurrence.cpp
@@ -40,9 +40,9 @@ using namespace KCal;
 
 static const TDECmdLineOptions options[] =
 {
-  { "verbose", "Verbose output", 0 },
-  { "+input", "Name of input file", 0 },
-  { "[+output]", "optional name of output file for the recurrence dates", 0 },
+  { "verbose", "Verbose output", nullptr },
+  { "+input", "Name of input file", nullptr },
+  { "[+output]", "optional name of output file for the recurrence dates", nullptr },
   TDECmdLineLastOption
 };
 
@@ -65,7 +65,7 @@ int main( int argc, char **argv )
   kdDebug(5800) << "Input file: " << input << endl;
 
   TQTextStream *outstream;
-  outstream = 0;
+  outstream = nullptr;
   TQString fn("");
   if ( args->count() > 1 ) {
     fn = args->arg( 1 );
diff --git a/libkcal/tests/testrecurrencetype.cpp b/libkcal/tests/testrecurrencetype.cpp
index c8eaaa06a..a0b1b0ad8 100644
--- a/libkcal/tests/testrecurrencetype.cpp
+++ b/libkcal/tests/testrecurrencetype.cpp
@@ -40,9 +40,9 @@ using namespace KCal;
 
 static const TDECmdLineOptions options[] =
 {
-  { "verbose", "Verbose output", 0 },
-  { "+input", "Name of input file", 0 },
-  { "[+output]", "optional name of output file for the recurrence dates", 0 },
+  { "verbose", "Verbose output", nullptr },
+  { "+input", "Name of input file", nullptr },
+  { "[+output]", "optional name of output file for the recurrence dates", nullptr },
   TDECmdLineLastOption
 };
 
@@ -65,7 +65,7 @@ int main( int argc, char **argv )
   kdDebug(5800) << "Input file: " << input << endl;
 
   TQTextStream *outstream;
-  outstream = 0;
+  outstream = nullptr;
   TQString fn("");
   if ( args->count() > 1 ) {
     fn = args->arg( 1 );
diff --git a/libkcal/tests/testrecurson.cpp b/libkcal/tests/testrecurson.cpp
index 028273e2e..3ac62424f 100644
--- a/libkcal/tests/testrecurson.cpp
+++ b/libkcal/tests/testrecurson.cpp
@@ -40,9 +40,9 @@ using namespace KCal;
 
 static const TDECmdLineOptions options[] =
 {
-  { "verbose", "Verbose output", 0 },
-  { "+input", "Name of input file", 0 },
-  { "[+output]", "optional name of output file for the recurrence dates", 0 },
+  { "verbose", "Verbose output", nullptr },
+  { "+input", "Name of input file", nullptr },
+  { "[+output]", "optional name of output file for the recurrence dates", nullptr },
   TDECmdLineLastOption
 };
 
@@ -65,7 +65,7 @@ int main( int argc, char **argv )
   kdDebug(5800) << "Input file: " << input << endl;
 
   TQTextStream *outstream;
-  outstream = 0;
+  outstream = nullptr;
   TQString fn("");
   if ( args->count() > 1 ) {
     fn = args->arg( 1 );
diff --git a/libkcal/tests/testresource.cpp b/libkcal/tests/testresource.cpp
index a5f207862..77d5c6c9c 100644
--- a/libkcal/tests/testresource.cpp
+++ b/libkcal/tests/testresource.cpp
@@ -47,8 +47,8 @@
 
 static const TDECmdLineOptions options[] =
 {
-  { "resource <type>", "The resource to test", 0 },
-  { "configfile <file>", "Location of a config file for the resource", 0 },
+  { "resource <type>", "The resource to test", nullptr },
+  { "configfile <file>", "Location of a config file for the resource", nullptr },
   TDECmdLineLastOption // End of options
 };
 
@@ -60,7 +60,7 @@ int main(int argc, char *argv[])
     setenv( "TDE_FORK_SLAVES", "yes", true ); // simpler, for the final cleanup
 
     TDEApplication::disableAutoDcopRegistration();
-    TDECmdLineArgs::init(argc,argv,"testresource", 0, 0, 0, 0);
+    TDECmdLineArgs::init(argc,argv,"testresource", nullptr, nullptr, nullptr, 0);
     TDECmdLineArgs::addCmdLineOptions( options );
  
     TDEApplication app;
@@ -68,7 +68,7 @@ int main(int argc, char *argv[])
     TQString type = TQString();
     if ( args->getOption( "resource" ) )
       type = TQString::fromLocal8Bit( args->getOption( "resource" ) );
-    TDEConfig *config = 0;
+    TDEConfig *config = nullptr;
     if ( args->getOption( "configfile" ) )
       config = new TDEConfig( KURL( args->getOption( "configfile" ) ).url() );
     kdDebug() << KURL( args->getOption( "configfile" ) ).url() << endl;
@@ -83,7 +83,7 @@ int main(int argc, char *argv[])
 namespace KCal {
 
 TestResource::TestResource( const TQString &type, TDEConfig *config )
- :m_resource_type( type ), m_config( config ), m_res( 0 )
+ :m_resource_type( type ), m_config( config ), m_res( nullptr )
 {}
   
 void TestResource::setup()
diff --git a/libkcal/tests/testvcalexport.cpp b/libkcal/tests/testvcalexport.cpp
index b24894e30..4f367b272 100644
--- a/libkcal/tests/testvcalexport.cpp
+++ b/libkcal/tests/testvcalexport.cpp
@@ -42,9 +42,9 @@ using namespace KCal;
 
 static const TDECmdLineOptions options[] =
 {
-  { "verbose", "Verbose output", 0 },
-  { "+input", "Name of input file", 0 },
-  { "+output", "Name of output file", 0 },
+  { "verbose", "Verbose output", nullptr },
+  { "+input", "Name of input file", nullptr },
+  { "+output", "Name of output file", nullptr },
   TDECmdLineLastOption
 };
 
diff --git a/libkcal/vcaldrag.h b/libkcal/vcaldrag.h
index 7cfbff52f..a280ba3da 100644
--- a/libkcal/vcaldrag.h
+++ b/libkcal/vcaldrag.h
@@ -38,7 +38,7 @@ class TDE_EXPORT VCalDrag : public TQStoredDrag
     /**
       Create a drag&drop object for vCalendar component \a vcal.
     */
-    VCalDrag( Calendar *vcal, TQWidget *parent = 0, const char *name = 0 );
+    VCalDrag( Calendar *vcal, TQWidget *parent = nullptr, const char *name = nullptr );
     ~VCalDrag() {}
 
     /**
diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp
index a20197cdd..2afeb3514 100644
--- a/libkcal/vcalformat.cpp
+++ b/libkcal/vcalformat.cpp
@@ -63,7 +63,7 @@ bool VCalFormat::load(Calendar *calendar, const TQString &fileName)
 
   kdDebug(5800) << "VCalFormat::load() " << fileName << endl;
 
-  VObject *vcal = 0;
+  VObject *vcal = nullptr;
 
   // this is not necessarily only 1 vcal.  Could be many vcals, or include
   // a vcard...
@@ -191,7 +191,7 @@ TQString VCalFormat::toString( Calendar *calendar )
 
   addVObjectProp( vcal, vevent );
 
-  char *buf = writeMemVObject( 0, 0, vcal );
+  char *buf = writeMemVObject( nullptr, nullptr, vcal );
 
   TQString result( buf );
 
@@ -547,7 +547,7 @@ VObject* VCalFormat::eventToVEvent(const Event *anEvent)
 //  addPropValue(vevent, VCStatusProp, anEvent->statusStr().local8Bit());
 
   // secrecy
-  const char *text = 0;
+  const char *text = nullptr;
   switch (anEvent->secrecy()) {
     case Incidence::SecrecyPublic:
       text = "PUBLIC";
@@ -657,7 +657,7 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
   Todo *anEvent = new Todo;
 
   // creation date
-  if ((vo = isAPropertyOf(vtodo, VCDCreatedProp)) != 0) {
+  if ((vo = isAPropertyOf(vtodo, VCDCreatedProp)) != nullptr) {
       anEvent->setCreated(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo))));
       deleteStr(s);
   }
@@ -672,7 +672,7 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
   }
 
   // last modification date
-  if ((vo = isAPropertyOf(vtodo, VCLastModifiedProp)) != 0) {
+  if ((vo = isAPropertyOf(vtodo, VCLastModifiedProp)) != nullptr) {
     anEvent->setLastModified(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo))));
     deleteStr(s);
   }
@@ -682,7 +682,7 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
 
   // organizer
   // if our extension property for the event's ORGANIZER exists, add it.
-  if ((vo = isAPropertyOf(vtodo, ICOrganizerProp)) != 0) {
+  if ((vo = isAPropertyOf(vtodo, ICOrganizerProp)) != nullptr) {
     anEvent->setOrganizer( s = fakeCString(vObjectUStringZValue(vo) ) );
     deleteStr(s);
   } else {
@@ -709,7 +709,7 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
                                     emailPos2 - (emailPos1 + 1)));
       } else if (tmpStr.find('@') > 0) {
         // just an email address
-        a = new Attendee(0, tmpStr);
+        a = new Attendee(nullptr, tmpStr);
       } else {
         // just a name
         // WTF??? Replacing the spaces of a name and using this as email?
@@ -718,10 +718,10 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
       }
 
       // is there an RSVP property?
-      if ((vp = isAPropertyOf(vo, VCRSVPProp)) != 0)
+      if ((vp = isAPropertyOf(vo, VCRSVPProp)) != nullptr)
         a->setRSVP(vObjectStringZValue(vp));
       // is there a status property?
-      if ((vp = isAPropertyOf(vo, VCStatusProp)) != 0)
+      if ((vp = isAPropertyOf(vo, VCStatusProp)) != nullptr)
         a->setStatus(readStatus(vObjectStringZValue(vp)));
       // add the attendee
       anEvent->addAttendee(a);
@@ -729,14 +729,14 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
   }
 
   // description for todo
-  if ((vo = isAPropertyOf(vtodo, VCDescriptionProp)) != 0) {
+  if ((vo = isAPropertyOf(vtodo, VCDescriptionProp)) != nullptr) {
     s = fakeCString(vObjectUStringZValue(vo));
     anEvent->setDescription(TQString::fromLocal8Bit(s));
     deleteStr(s);
   }
 
   // summary
-  if ((vo = isAPropertyOf(vtodo, VCSummaryProp))) {
+  if ((vo = isAPropertyOf(vtodo, VCSummaryProp)) != nullptr) {
     s = fakeCString(vObjectUStringZValue(vo));
     anEvent->setSummary(TQString::fromLocal8Bit(s));
     deleteStr(s);
@@ -744,14 +744,14 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
 
 
   // location
-  if ((vo = isAPropertyOf(vtodo, VCLocationProp)) != 0) {
+  if ((vo = isAPropertyOf(vtodo, VCLocationProp)) != nullptr) {
     s = fakeCString(vObjectUStringZValue(vo));
     anEvent->setLocation( TQString::fromLocal8Bit(s) );
     deleteStr(s);
   }
   // completed
   // was: status
-  if ((vo = isAPropertyOf(vtodo, VCStatusProp)) != 0) {
+  if ((vo = isAPropertyOf(vtodo, VCStatusProp)) != nullptr) {
     s = fakeCString(vObjectUStringZValue(vo));
     if (strcmp(s,"COMPLETED") == 0) {
       anEvent->setCompleted(true);
@@ -764,19 +764,19 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
     anEvent->setCompleted(false);
 
   // completion date
-  if ((vo = isAPropertyOf(vtodo, VCCompletedProp)) != 0) {
+  if ((vo = isAPropertyOf(vtodo, VCCompletedProp)) != nullptr) {
     anEvent->setCompleted(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo))));
     deleteStr(s);
   }
 
   // priority
-  if ((vo = isAPropertyOf(vtodo, VCPriorityProp))) {
+  if ((vo = isAPropertyOf(vtodo, VCPriorityProp)) != nullptr) {
     anEvent->setPriority(atoi(s = fakeCString(vObjectUStringZValue(vo))));
     deleteStr(s);
   }
 
   // due date
-  if ((vo = isAPropertyOf(vtodo, VCDueProp)) != 0) {
+  if ((vo = isAPropertyOf(vtodo, VCDueProp)) != nullptr) {
     anEvent->setDtDue(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo))));
     deleteStr(s);
     anEvent->setHasDueDate(true);
@@ -785,7 +785,7 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
   }
 
   // start time
-  if ((vo = isAPropertyOf(vtodo, VCDTstartProp)) != 0) {
+  if ((vo = isAPropertyOf(vtodo, VCDTstartProp)) != nullptr) {
     anEvent->setDtStart(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo))));
     //    kdDebug(5800) << "s is " << //          s << ", ISO is " << ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo))).toString() << endl;
     deleteStr(s);
@@ -796,23 +796,23 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
 
   /* alarm stuff */
   //kdDebug(5800) << "vcalformat::VTodoToEvent called" << endl;
-  if ((vo = isAPropertyOf(vtodo, VCDAlarmProp))) {
+  if ((vo = isAPropertyOf(vtodo, VCDAlarmProp)) != nullptr) {
     Alarm* alarm = anEvent->newAlarm();
     VObject *a;
-    if ((a = isAPropertyOf(vo, VCRunTimeProp))) {
+    if ((a = isAPropertyOf(vo, VCRunTimeProp)) != nullptr) {
       alarm->setTime(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(a))));
       deleteStr(s);
     }
     alarm->setEnabled(true);
-    if ((vo = isAPropertyOf(vtodo, VCPAlarmProp))) {
-      if ((a = isAPropertyOf(vo, VCProcedureNameProp))) {
+    if ((vo = isAPropertyOf(vtodo, VCPAlarmProp)) != nullptr) {
+      if ((a = isAPropertyOf(vo, VCProcedureNameProp)) != nullptr) {
         s = fakeCString(vObjectUStringZValue(a));
         alarm->setProcedureAlarm(TQFile::decodeName(s));
         deleteStr(s);
       }
     }
-    if ((vo = isAPropertyOf(vtodo, VCAAlarmProp))) {
-      if ((a = isAPropertyOf(vo, VCAudioContentProp))) {
+    if ((vo = isAPropertyOf(vtodo, VCAAlarmProp)) != nullptr) {
+      if ((a = isAPropertyOf(vo, VCAudioContentProp)) != nullptr) {
         s = fakeCString(vObjectUStringZValue(a));
         alarm->setAudioAlarm(TQFile::decodeName(s));
         deleteStr(s);
@@ -821,14 +821,14 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
   }
 
   // related todo
-  if ((vo = isAPropertyOf(vtodo, VCRelatedToProp)) != 0) {
+  if ((vo = isAPropertyOf(vtodo, VCRelatedToProp)) != nullptr) {
     anEvent->setRelatedToUid(s = fakeCString(vObjectUStringZValue(vo)));
     deleteStr(s);
     mTodosRelate.append(anEvent);
   }
 
   // categories
-  if ((vo = isAPropertyOf(vtodo, VCCategoriesProp)) != 0) {
+  if ((vo = isAPropertyOf(vtodo, VCCategoriesProp)) != nullptr) {
     s = fakeCString(vObjectUStringZValue(vo));
     TQString categories = TQString::fromLocal8Bit(s);
     deleteStr(s);
@@ -837,14 +837,14 @@ Todo *VCalFormat::VTodoToEvent(VObject *vtodo)
   }
 
   /* PILOT SYNC STUFF */
-  if ((vo = isAPropertyOf(vtodo, KPilotIdProp))) {
+  if ((vo = isAPropertyOf(vtodo, KPilotIdProp)) != nullptr) {
     anEvent->setPilotId(atoi(s = fakeCString(vObjectUStringZValue(vo))));
     deleteStr(s);
   }
   else
     anEvent->setPilotId(0);
 
-  if ((vo = isAPropertyOf(vtodo, KPiloStatusProp))) {
+  if ((vo = isAPropertyOf(vtodo, KPiloStatusProp)) != nullptr) {
     anEvent->setSyncStatus(atoi(s = fakeCString(vObjectUStringZValue(vo))));
     deleteStr(s);
   }
@@ -863,7 +863,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
   Event *anEvent = new Event;
 
   // creation date
-  if ((vo = isAPropertyOf(vevent, VCDCreatedProp)) != 0) {
+  if ((vo = isAPropertyOf(vevent, VCDCreatedProp)) != nullptr) {
       anEvent->setCreated(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo))));
       deleteStr(s);
   }
@@ -879,7 +879,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
 
   // revision
   // again NSCAL doesn't give us much to work with, so we improvise...
-  if ((vo = isAPropertyOf(vevent, VCSequenceProp)) != 0) {
+  if ((vo = isAPropertyOf(vevent, VCSequenceProp)) != nullptr) {
     anEvent->setRevision(atoi(s = fakeCString(vObjectUStringZValue(vo))));
     deleteStr(s);
   }
@@ -887,7 +887,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
     anEvent->setRevision(0);
 
   // last modification date
-  if ((vo = isAPropertyOf(vevent, VCLastModifiedProp)) != 0) {
+  if ((vo = isAPropertyOf(vevent, VCLastModifiedProp)) != nullptr) {
     anEvent->setLastModified(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo))));
     deleteStr(s);
   }
@@ -897,7 +897,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
 
   // organizer
   // if our extension property for the event's ORGANIZER exists, add it.
-  if ((vo = isAPropertyOf(vevent, ICOrganizerProp)) != 0) {
+  if ((vo = isAPropertyOf(vevent, ICOrganizerProp)) != nullptr) {
     // FIXME:  Also use the full name, not just the email address
     anEvent->setOrganizer( s = fakeCString(vObjectUStringZValue(vo) ) );
     deleteStr(s);
@@ -925,7 +925,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
                                     emailPos2 - (emailPos1 + 1)));
       } else if (tmpStr.find('@') > 0) {
         // just an email address
-        a = new Attendee(0, tmpStr);
+        a = new Attendee(nullptr, tmpStr);
       } else {
         // just a name
         TQString email = tmpStr.replace( ' ', '.' );
@@ -933,10 +933,10 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
       }
 
       // is there an RSVP property?
-      if ((vp = isAPropertyOf(vo, VCRSVPProp)) != 0)
+      if ((vp = isAPropertyOf(vo, VCRSVPProp)) != nullptr)
         a->setRSVP(vObjectStringZValue(vp));
       // is there a status property?
-      if ((vp = isAPropertyOf(vo, VCStatusProp)) != 0)
+      if ((vp = isAPropertyOf(vo, VCStatusProp)) != nullptr)
         a->setStatus(readStatus(vObjectStringZValue(vp)));
       // add the attendee
       anEvent->addAttendee(a);
@@ -955,7 +955,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
   anEvent->setFloats(false);
 
   // start time
-  if ((vo = isAPropertyOf(vevent, VCDTstartProp)) != 0) {
+  if ((vo = isAPropertyOf(vevent, VCDTstartProp)) != nullptr) {
     anEvent->setDtStart(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo))));
     //    kdDebug(5800) << "s is " << //          s << ", ISO is " << ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo))).toString() << endl;
     deleteStr(s);
@@ -964,7 +964,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
   }
 
   // stop time
-  if ((vo = isAPropertyOf(vevent, VCDTendProp)) != 0) {
+  if ((vo = isAPropertyOf(vevent, VCDTendProp)) != nullptr) {
     anEvent->setDtEnd(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(vo))));
       deleteStr(s);
       if (anEvent->dtEnd().time().isNull())
@@ -973,15 +973,15 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
 
   // at this point, there should be at least a start or end time.
   // fix up for events that take up no time but have a time associated
-  if (!(vo = isAPropertyOf(vevent, VCDTstartProp)))
+  if ((vo = isAPropertyOf(vevent, VCDTstartProp)) == nullptr)
     anEvent->setDtStart(anEvent->dtEnd());
-  if (!(vo = isAPropertyOf(vevent, VCDTendProp)))
+  if ((vo = isAPropertyOf(vevent, VCDTendProp)) == nullptr)
     anEvent->setDtEnd(anEvent->dtStart());
 
   ///////////////////////////////////////////////////////////////////////////
 
   // repeat stuff
-  if ((vo = isAPropertyOf(vevent, VCRRuleProp)) != 0) {
+  if ((vo = isAPropertyOf(vevent, VCRRuleProp)) != nullptr) {
     TQString tmpStr = (s = fakeCString(vObjectUStringZValue(vo)));
     deleteStr(s);
     tmpStr.simplifyWhiteSpace();
@@ -1159,7 +1159,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
 
 
   // recurrence exceptions
-  if ((vo = isAPropertyOf(vevent, VCExDateProp)) != 0) {
+  if ((vo = isAPropertyOf(vevent, VCExDateProp)) != nullptr) {
     s = fakeCString(vObjectUStringZValue(vo));
     TQStringList exDates = TQStringList::split(",",s);
     TQStringList::ConstIterator it;
@@ -1170,14 +1170,14 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
   }
 
   // summary
-  if ((vo = isAPropertyOf(vevent, VCSummaryProp))) {
+  if ((vo = isAPropertyOf(vevent, VCSummaryProp)) != nullptr) {
     s = fakeCString(vObjectUStringZValue(vo));
     anEvent->setSummary(TQString::fromLocal8Bit(s));
     deleteStr(s);
   }
 
   // description
-  if ((vo = isAPropertyOf(vevent, VCDescriptionProp)) != 0) {
+  if ((vo = isAPropertyOf(vevent, VCDescriptionProp)) != nullptr) {
     s = fakeCString(vObjectUStringZValue(vo));
     if (!anEvent->description().isEmpty()) {
       anEvent->setDescription(anEvent->description() + "\n" +
@@ -1189,7 +1189,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
   }
 
   // location
-  if ((vo = isAPropertyOf(vevent, VCLocationProp)) != 0) {
+  if ((vo = isAPropertyOf(vevent, VCLocationProp)) != nullptr) {
     s = fakeCString(vObjectUStringZValue(vo));
     anEvent->setLocation( TQString::fromLocal8Bit(s) );
     deleteStr(s);
@@ -1218,7 +1218,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
 
   // secrecy
   int secrecy = Incidence::SecrecyPublic;
-  if ((vo = isAPropertyOf(vevent, VCClassProp)) != 0) {
+  if ((vo = isAPropertyOf(vevent, VCClassProp)) != nullptr) {
     s = fakeCString(vObjectUStringZValue(vo));
     if (strcmp(s,"PRIVATE") == 0) {
       secrecy = Incidence::SecrecyPrivate;
@@ -1230,7 +1230,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
   anEvent->setSecrecy(secrecy);
 
   // categories
-  if ((vo = isAPropertyOf(vevent, VCCategoriesProp)) != 0) {
+  if ((vo = isAPropertyOf(vevent, VCCategoriesProp)) != nullptr) {
     s = fakeCString(vObjectUStringZValue(vo));
     TQString categories = TQString::fromLocal8Bit(s);
     deleteStr(s);
@@ -1250,7 +1250,7 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
   }
 
   // resources
-  if ((vo = isAPropertyOf(vevent, VCResourcesProp)) != 0) {
+  if ((vo = isAPropertyOf(vevent, VCResourcesProp)) != nullptr) {
     TQString resources = (s = fakeCString(vObjectUStringZValue(vo)));
     deleteStr(s);
     TQStringList tmpStrList = TQStringList::split( ';', resources );
@@ -1258,23 +1258,23 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
   }
 
   /* alarm stuff */
-  if ((vo = isAPropertyOf(vevent, VCDAlarmProp))) {
+  if ((vo = isAPropertyOf(vevent, VCDAlarmProp)) != nullptr) {
     Alarm* alarm = anEvent->newAlarm();
     VObject *a;
-    if ((a = isAPropertyOf(vo, VCRunTimeProp))) {
+    if ((a = isAPropertyOf(vo, VCRunTimeProp)) != nullptr) {
       alarm->setTime(ISOToTQDateTime(s = fakeCString(vObjectUStringZValue(a))));
       deleteStr(s);
     }
     alarm->setEnabled(true);
-    if ((vo = isAPropertyOf(vevent, VCPAlarmProp))) {
-      if ((a = isAPropertyOf(vo, VCProcedureNameProp))) {
+    if ((vo = isAPropertyOf(vevent, VCPAlarmProp)) != nullptr) {
+      if ((a = isAPropertyOf(vo, VCProcedureNameProp)) != nullptr) {
         s = fakeCString(vObjectUStringZValue(a));
         alarm->setProcedureAlarm(TQFile::decodeName(s));
         deleteStr(s);
       }
     }
-    if ((vo = isAPropertyOf(vevent, VCAAlarmProp))) {
-      if ((a = isAPropertyOf(vo, VCAudioContentProp))) {
+    if ((vo = isAPropertyOf(vevent, VCAAlarmProp)) != nullptr) {
+      if ((a = isAPropertyOf(vo, VCAudioContentProp)) != nullptr) {
         s = fakeCString(vObjectUStringZValue(a));
         alarm->setAudioAlarm(TQFile::decodeName(s));
         deleteStr(s);
@@ -1283,34 +1283,34 @@ Event* VCalFormat::VEventToEvent(VObject *vevent)
   }
 
   // priority
-  if ((vo = isAPropertyOf(vevent, VCPriorityProp))) {
+  if ((vo = isAPropertyOf(vevent, VCPriorityProp)) != nullptr) {
     anEvent->setPriority(atoi(s = fakeCString(vObjectUStringZValue(vo))));
     deleteStr(s);
   }
 
   // transparency
-  if ((vo = isAPropertyOf(vevent, VCTranspProp)) != 0) {
+  if ((vo = isAPropertyOf(vevent, VCTranspProp)) != nullptr) {
     int i = atoi(s = fakeCString(vObjectUStringZValue(vo)));
     anEvent->setTransparency( i == 1 ? Event::Transparent : Event::Opaque );
     deleteStr(s);
   }
 
   // related event
-  if ((vo = isAPropertyOf(vevent, VCRelatedToProp)) != 0) {
+  if ((vo = isAPropertyOf(vevent, VCRelatedToProp)) != nullptr) {
     anEvent->setRelatedToUid(s = fakeCString(vObjectUStringZValue(vo)));
     deleteStr(s);
     mEventsRelate.append(anEvent);
   }
 
   /* PILOT SYNC STUFF */
-  if ((vo = isAPropertyOf(vevent, KPilotIdProp))) {
+  if ((vo = isAPropertyOf(vevent, KPilotIdProp)) != nullptr) {
     anEvent->setPilotId(atoi(s = fakeCString(vObjectUStringZValue(vo))));
     deleteStr(s);
   }
   else
     anEvent->setPilotId(0);
 
-  if ((vo = isAPropertyOf(vevent, KPiloStatusProp))) {
+  if ((vo = isAPropertyOf(vevent, KPiloStatusProp)) != nullptr) {
     anEvent->setSyncStatus(atoi(s = fakeCString(vObjectUStringZValue(vo))));
     deleteStr(s);
   }
@@ -1420,8 +1420,8 @@ void VCalFormat::populate(VObject *vcal)
   VObject *curVO, *curVOProp;
   Event *anEvent;
 
-  if ((curVO = isAPropertyOf(vcal, ICMethodProp)) != 0) {
-    char *methodType = 0;
+  if ((curVO = isAPropertyOf(vcal, ICMethodProp)) != nullptr) {
+    char *methodType = nullptr;
     methodType = fakeCString(vObjectUStringZValue(curVO));
     kdDebug(5800) << "This calendar is an iTIP transaction of type '"
               << methodType << "'" << endl;
@@ -1429,7 +1429,7 @@ void VCalFormat::populate(VObject *vcal)
   }
 
   // warn the user that we might have trouble reading non-known calendar.
-  if ((curVO = isAPropertyOf(vcal, VCProdIdProp)) != 0) {
+  if ((curVO = isAPropertyOf(vcal, VCProdIdProp)) != nullptr) {
     char *s = fakeCString(vObjectUStringZValue(curVO));
     if (strcmp(productId().local8Bit(), s) != 0)
       kdDebug(5800) << "This vCalendar file was not created by KOrganizer "
@@ -1439,7 +1439,7 @@ void VCalFormat::populate(VObject *vcal)
   }
 
   // warn the user we might have trouble reading this unknown version.
-  if ((curVO = isAPropertyOf(vcal, VCVersionProp)) != 0) {
+  if ((curVO = isAPropertyOf(vcal, VCVersionProp)) != nullptr) {
     char *s = fakeCString(vObjectUStringZValue(curVO));
     if (strcmp(_VCAL_VERSION, s) != 0)
       kdDebug(5800) << "This vCalendar file has version " << s
@@ -1471,7 +1471,7 @@ void VCalFormat::populate(VObject *vcal)
     // now, check to see that the object is an event or todo.
     if (strcmp(vObjectName(curVO), VCEventProp) == 0) {
 
-      if ((curVOProp = isAPropertyOf(curVO, KPiloStatusProp)) != 0) {
+      if ((curVOProp = isAPropertyOf(curVO, KPiloStatusProp)) != nullptr) {
         char *s;
         s = fakeCString(vObjectUStringZValue(curVOProp));
         // check to see if event was deleted by the kpilot conduit
@@ -1486,7 +1486,7 @@ void VCalFormat::populate(VObject *vcal)
       // this code checks to see if we are trying to read in an event
       // that we already find to be in the calendar.  If we find this
       // to be the case, we skip the event.
-      if ((curVOProp = isAPropertyOf(curVO, VCUniqueStringProp)) != 0) {
+      if ((curVOProp = isAPropertyOf(curVO, VCUniqueStringProp)) != nullptr) {
         char *s = fakeCString(vObjectUStringZValue(curVOProp));
         TQString tmpStr(s);
         deleteStr(s);
-- 
cgit v1.2.3

